vendor: 4,798 bytes, line 1
1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[76242],{27217:(t,e,i)=>{i.r(e),i.d(e,{AUTO:()=>$,Actions:()=>tt,Animations:()=>te,BlendModes:()=>ti,CANVAS:()=>tn,Cache:()=>ts,Cameras:()=>tr,Core:()=>to,Curves:()=>ta,DOM:()=>th,DOWN:()=>tl,Data:()=>tu,Display:()=>td,Events:()=>tc,FOREVER:()=>tf,Filters:()=>tp,Game:()=>tg,GameObjects:()=>tm,Geom:()=>tv,HEADLESS:()=>tx,Input:()=>ty,LEFT:()=>tT,Loader:()=>tw,Math:()=>tb,NONE:()=>tS,Physics:()=>tC,Plugins:()=>tE,RIGHT:()=>tA,Renderer:()=>t_,Scale:()=>tM,ScaleModes:()=>tR,Scene:()=>tO,Scenes:()=>tP,Sound:()=>tL,Structs:()=>tD,Textures:()=>tF,Tilemaps:()=>tI,Time:()=>tN,TintModes:()=>tB,Tweens:()=>tk,UP:()=>tU,Utils:()=>tz,VERSION:()=>tY,WEBGL:()=>tX});var n=i(55036),s={50792(t){var e=Object.prototype.hasOwnProperty,i="~";function n(){}function s(t,e,i){this.fn=t,this.context=e,this.once=i||!1}function r(t,e,n,r,o){if("function"!=typeof n)throw TypeError("The listener must be a function");var a=new s(n,r||t,o),h=i?i+e:e;return t._events[h]?t._events[h].fn?t._events[h]=[t._events[h],a]:t._events[h].push(a):(t._events[h]=a,t._eventsCount++),t}function o(t,e){0==--t._eventsCount?t._events=new n:delete t._events[e]}function a(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(i=!1)),a.prototype.eventNames=function(){var t,n,s=[];if(0===this._eventsCount)return s;for(n in t=this._events)e.call(t,n)&&s.push(i?n.slice(1):n);return Object.getOwnPropertySymbols?s.concat(Object.getOwnPropertySymbols(t)):s},a.prototype.listeners=function(t){var e=i?i+t:t,n=this._events[e];if(!n)return[];if(n.fn)return[n.fn];for(var s=0,r=n.length,o=Array(r);s<r;s++)o[s]=n[s].fn;return o},a.prototype.listenerCount=function(t){var e=i?i+t:t,n=this._events[e];return n?n.fn?1:n.length:0},a.prototype.emit=function(t,e,n,s,r,o){var a=i?i+t:t;if(!this._events[a])return!1;var h,l,u=this._events[a],d=arguments.length;if(u.fn){switch(u.once&&this.removeListener(t,u.fn,void 0,!0),d){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,e),!0;case 3:return u.fn.call(u.context,e,n),!0;case 4:return u.fn.call(u.context,e,n,s),!0;case 5:return u.fn.call(u.context,e,n,s,r),!0;case 6:return u.fn.call(u.context,e,n,s,r,o),!0}for(l=1,h=Array(d-1);l<d;l++)h[l-1]=arguments[l];u.fn.apply(u.context,h)}else{var c,f=u.length;for(l=0;l<f;l++)switch(u[l].once&&this.removeListener(t,u[l].fn,void 0,!0),d){case 1:u[l].fn.call(u[l].context);break;case 2:u[l].fn.call(u[l].context,e);break;case 3:u[l].fn.call(u[l].context,e,n);break;case 4:u[l].fn.call(u[l].context,e,n,s);break;default:if(!h)for(c=1,h=Array(d-1);c<d;c++)h[c-1]=arguments[c];u[l].fn.apply(u[l].context,h)}}return!0},a.prototype.on=function(t,e,i){return r(this,t,e,i,!1)},a.prototype.once=function(t,e,i){return r(this,t,e,i,!0)},a.prototype.removeListener=function(t,e,n,s){var r=i?i+t:t;if(!this._events[r])return this;if(!e)return o(this,r),this;var a=this._events[r];if(a.fn)a.fn!==e||s&&!a.once||n&&a.context!==n||o(this,r);else{for(var h=0,l=[],u=a.length;h<u;h++)(a[h].fn!==e||s&&!a[h].once||n&&a[h].context!==n)&&l.push(a[h]);l.length?this._events[r]=1===l.length?l[0]:l:o(this,r)}return this},a.prototype.removeAllListeners=function(t){var e;return t?(e=i?i+t:t,this._events[e]&&o(this,e)):(this._events=new n,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=i,a.EventEmitter=a,t.exports=a},93300(t,e,i){var n=i(10312);t.exports=function(t,e){Array.isArray(t)||(t=[t]),e||(e={});for(var i=void 0===e.threshold?.5:e.threshold,s=void 0===e.blurRadius?2:e.blurRadius,r=void 0===e.blurSteps?4:e.blurSteps,o=void 0===e.blurQuality?0:e.blurQuality,a=void 0===e.blendAmount?1:e.blendAmount,h=void 0===e.blendMode?n.ADD:e.blendMode,l=[],u=0;u<t.length;u++){var d=t[u];d.enableFilters&&d.enableFilters();var c=(e.useInternal?d.filters.internal:d.filters.external).addParallelFilters(),f=c.top.addThreshold(i,1),p=c.top.addBlur(o,s,s,1,0xffffff,r);c.blend.blendMode=h,c.blend.amount=a,l.push({item:d,parallelFilters:c,threshold:f,blur:p})}return l}},56704(t,e,i){var n=i(16438),s=i(10312),r=i(41337),o=i(95643),a=i(45650);t.exports=function(t,e){e||(e={}),Array.isArray(t)||(t=[t]);var i=t[0],h=i.scene,l=void 0===e.direction?.5:e.direction%(2*Math.PI),u=void 0===e.scale?2:e.scale,d=(e.radius||.5)/u,c=e.width||i.width||128,f=e.height||i.height||128,p={x:0,y:0};l<0&&(l+=2*Math.PI),l>3*Math.PI/2?p.y=1:l>Math.PI?(p.x=1,p.y=1):l>Math.PI/2&&(p.x=1);for(var g=[],m=0;m<t.length;m++){var v,x,y=t[m],T={origin:0,width:c,height:f,config:{offset:-d,repeatMode:3,shapeMode:0,direction:l,length:u,start:p,bands:e.bands||[{interpolation:2,colorStart:0xffffff,colorEnd:[1,1,1,0],size:d},{colorStart:[1,1,1,0],size:1-d}]}},w=h.make.gradient(T,!1);
vendor: 12,973 bytes, line 1
1if(e.displacementMap){var b=e.displacement||.1;w.enableFilters().filters.internal.addDisplacement(e.displacementMap,b,b)}for(var S=a(),C=h.textures;C.exists(S);)S=a();var E=C.addDynamicTexture(S,w.width,w.height),A=h.tweens.add({targets:w,offset:1+d,repeat:-1,yoyo:!!e.yoyo,ease:e.ease,duration:e.duration||2e3,repeatDelay:e.repeatDelay||0,onUpdate:function(){E.clear().draw(w).render()}});y instanceof o&&y.enableFilters();var _=e.useExternal?y.filters.external:y.filters.internal,M=e.colorFactor||[1.15,.85,.85,1];e.reveal?v=_.addBlend(S,s.MULTIPLY,1,M):(v=(x=_.addParallelFilters()).top.addBlend(S,s.MULTIPLY,1,M),x.blend.blendMode=s.ADD);var R=function(){A.destroy(),E.destroy()};y instanceof o?y.on(r,R):y.on(n,R),g.push({item:y,dynamicTexture:E,gradient:w,tween:A,parallelFilters:x,blendFilter:v})}return g}},245(t,e,i){var n=i(95643),s=i(93232),r=i(94591);t.exports=function(t,e){Array.isArray(t)||(t=[t]),e||(e={});for(var i=void 0===e.aspectRatio?1:e.aspectRatio,o=e.padding||0,a=t[0].scene,h=[],l=0;l<t.length;l++){var u,d=t[l],c=e.region;switch(!c&&(c=e.useInternal&&d._sizeComponent?new s(0,0,d.width,d.height):new s(0,0,a.scale.width,a.scale.height)),e.shape){case"ellipse":u=a.add.ellipse(0,0,i,1,0xffffff);break;case"square":u=a.add.rectangle(0,0,1,1,0xffffff);break;case"rectangle":u=a.add.rectangle(0,0,i,1,0xffffff);break;default:u=a.add.circle(0,0,1,0xffffff)}a.children.remove(u),o&&(c=new s(c.x+o,c.y+o,c.width-2*o,c.height-2*o)),r(u,e.scaleMode,c),e.blurRadius>0&&u.enableFilters().filters.external.addBlur(e.blurQuality,e.blurRadius,e.blurRadius,1,void 0,e.blurSteps),d instanceof n&&d.enableFilters();var f=(e.useInternal?d.filters.internal:d.filters.external).addMask(u,e.invert);h.push(f)}return h}},11517(t,e,i){var n=i(38829);t.exports=function(t,e,i,s){for(var r=t[0],o=1;o<t.length;o++){var a=t[o];n(a,r,e,i,s),r=a}return t}},80318(t,e,i){var n=i(66979);t.exports=function(t,e,i,s,r){return n(t,"angle",e,i,s,r)}},60757(t){t.exports=function(t,e,i){for(var n=0;n<t.length;n++){var s=t[n];e.call(i,s)}return t}},94591(t,e,i){var n=i(87841),s=i(95540);t.exports=function(t,e,i,r){if(Array.isArray(t)||(t=[t]),void 0===e&&(e=0),!i){var o=t[0].scene;i=new n(0,0,o.scale.width,o.scale.height)}r||(r={});for(var a=0;a<t.length;a++){var h=t[a],l=s(r,"width",s(h,"width",1)),u=s(r,"height",s(h,"height",1)),d=s(r,"originX",s(h,"originX",.5)),c=s(r,"originY",s(h,"originY",.5));h.x=i.x+i.width*d,h.y=i.y+i.height*c;var f=i.width/l,p=i.height/u;switch(e){case -1:h.setScale(Math.min(f,p));break;case 0:h.setScale(f,p);break;case 1:h.setScale(Math.max(f,p))}}return h}},69927(t){t.exports=function(t,e,i){void 0===i&&(i=0);for(var n=i;n<t.length;n++){var s=t[n],r=!0;for(var o in e)s[o]!==e[o]&&(r=!1);if(r)return s}return null}},32265(t){t.exports=function(t,e,i){void 0===i&&(i=0);for(var n=t.length-1;n>=i;n--){var s=t[n],r=!0;for(var o in e)s[o]!==e[o]&&(r=!1);if(r)return s}return null}},94420(t,e,i){var n=i(11879),s=i(60461),r=i(95540),o=i(29747),a=new(i(41481))({sys:{queueDepthSort:o,events:{once:o}}},0,0,1,1).setOrigin(0,0);t.exports=function(t,e){void 0===e&&(e={});var i=e.hasOwnProperty("width"),o=e.hasOwnProperty("height"),h=r(e,"width",-1),l=r(e,"height",-1),u=r(e,"cellWidth",1),d=r(e,"cellHeight",u),c=r(e,"position",s.TOP_LEFT),f=r(e,"x",0),p=r(e,"y",0),g=0,m=0,v=h*u,x=l*d;a.setPosition(f,p),a.setSize(u,d);for(var y=0;y<t.length;y++)if(n(t[y],a,c),i&&-1===h)a.x+=u;else if(o&&-1===l)a.y+=d;else if(o&&!i){if(m+=d,a.y+=d,m===x&&(m=0,g+=u,a.y=p,a.x+=u,g===v))break}else if(g+=u,a.x+=u,g===v&&(g=0,m+=d,a.x=f,a.y+=d,m===x))break;return t}},41721(t,e,i){var n=i(66979);t.exports=function(t,e,i,s,r){return n(t,"alpha",e,i,s,r)}},67285(t,e,i){var n=i(66979);t.exports=function(t,e,i,s,r){return n(t,"x",e,i,s,r)}},9074(t,e,i){var n=i(66979);t.exports=function(t,e,i,s,r,o,a){return null==i&&(i=e),n(t,"x",e,s,o,a),n(t,"y",i,r,o,a)}},75222(t,e,i){var n=i(66979);t.exports=function(t,e,i,s,r){return n(t,"y",e,i,s,r)}},22983(t){t.exports=function(t,e,i,n){void 0===i&&(i=0),void 0===n&&(n=6.28);for(var s=i,r=(n-i)/t.length,o=e.x,a=e.y,h=e.radius,l=0;l<t.length;l++)t[l].x=o+h*Math.cos(s),t[l].y=a+h*Math.sin(s),s+=r;return t}},95253(t){t.exports=function(t,e,i,n){void 0===i&&(i=0),void 0===n&&(n=6.28);for(var s=i,r=(n-i)/t.length,o=e.width/2,a=e.height/2,h=0;h<t.length;h++)t[h].x=e.x+o*Math.cos(s),t[h].y=e.y+a*Math.sin(s),s+=r;return t}},88505(t,e,i){var n=i(15258),s=i(26708);t.exports=function(t,e,i){var r;r=i?s(e,i,t.length):n(e,t.length);for(var o=0;o<t.length;o++){var a=t[o],h=r[o];a.x=h.x,a.y=h.y}return t}},41346(t,e,i){var n=i(14649),s=i(86003),r=i(49498);t.exports=function(t,e,i){void 0===i&&(i=0);var o=n(e,!1,t.length);i>0?s(o,i):i<0&&r(o,Math.abs(i));for(var a=0;a<t.length;a++)t[a].x=o[a].x,t[a].y=o[a].y;return t}},11575(t,e,i){var n=i(84993);t.exports=function(t,e,i){var s=n({x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},i),r=n({x1:e.x2,y1:e.y2,x2:e.x3,y2:e.y3},i),o=n({x1:e.x3,y1:e.y3,x2:e.x1,y2:e.y1},i);s.pop(),r.pop(),o.pop();for(var a=(s=s.concat(r,o)).length/t.length,h=0,l=0;l<t.length;l++){var u=t[l],d=s[Math.floor(h)];u.x=d.x,u.y=d.y,h+=a}return t}},29953(t){t.exports=function(t,e,i){for(var n=0;n<t.length;n++){var s=t[n];s.anims&&s.anims.play(e,i)}return t}},66979(t){t.exports=function(t,e,i,n,s,r){void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=1);var o,a=0,h=t.length;if(1===r)for(o=s;o<h;o++)t[o][e]+=i+a*n,a++;else for(o=s;o>=0;o--)t[o][e]+=i+a*n,a++;return t}},43967(t){t.exports=function(t,e,i,n,s,r){void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=1);var o,a=0,h=t.length;if(1===r)for(o=s;o<h;o++)t[o][e]=i+a*n,a++;else for(o=s;o>=0;o--)t[o][e]=i+a*n,a++;return t}},88926(t,e,i){var n=i(28176);t.exports=function(t,e){for(var i=0;i<t.length;i++)n(e,t[i]);return t}},33286(t,e,i){var n=i(24820);t.exports=function(t,e){for(var i=0;i<t.length;i++)n(e,t[i]);return t}},96e3(t,e,i){var n=i(65822);t.exports=function(t,e){for(var i=0;i<t.length;i++)n(e,t[i]);return t}},28789(t,e,i){var n=i(26597);t.exports=function(t,e){for(var i=0;i<t.length;i++)n(e,t[i]);return t}},97154(t,e,i){var n=i(90260);t.exports=function(t,e){for(var i=0;i<t.length;i++)n(e,t[i]);return t}},20510(t,e,i){var n=i(66979);t.exports=function(t,e,i,s,r){return n(t,"rotation",e,i,s,r)}},91051(t,e,i){var n=i(1163),s=i(20339);t.exports=function(t,e,i){for(var r=e.x,o=e.y,a=0;a<t.length;a++){var h=t[a];n(h,r,o,i,Math.max(1,s(h.x,h.y,r,o)))}return t}},76332(t,e,i){var n=i(1163);t.exports=function(t,e,i,s){var r=e.x,o=e.y;if(0===s)return t;for(var a=0;a<t.length;a++)n(t[a],r,o,i,s);return t}},61619(t,e,i){var n=i(66979);t.exports=function(t,e,i,s,r){return n(t,"scaleX",e,i,s,r)}},94868(t,e,i){var n=i(66979);t.exports=function(t,e,i,s,r,o,a){return null==i&&(i=e),n(t,"scaleX",e,s,o,a),n(t,"scaleY",i,r,o,a)}},95532(t,e,i){var n=i(66979);t.exports=function(t,e,i,s,r){return n(t,"scaleY",e,i,s,r)}},8689(t,e,i){var n=i(43967);t.exports=function(t,e,i,s,r){return n(t,"alpha",e,i,s,r)}},2645(t,e,i){var n=i(43967);t.exports=function(t,e,i,s){return n(t,"blendMode",e,0,i,s)}},32372(t,e,i){var n=i(43967);t.exports=function(t,e,i,s,r){return n(t,"depth",e,i,s,r)}},85373(t){t.exports=function(t,e,i){for(var n=0;n<t.length;n++)t[n].setInteractive(e,i);return t}},81583(t,e,i){var n=i(43967);t.exports=function(t,e,i,s,r,o,a){return null==i&&(i=e),n(t,"originX",e,s,o,a),n(t,"originY",i,r,o,a),t.forEach(function(t){t.updateDisplayOrigin()}),t}},79939(t,e,i){var n=i(43967);t.exports=function(t,e,i,s,r){return n(t,"rotation",e,i,s,r)}},2699(t,e,i){var n=i(43967);t.exports=function(t,e,i,s,r,o,a){return null==i&&(i=e),n(t,"scaleX",e,s,o,a),n(t,"scaleY",i,r,o,a)}},98739(t,e,i){var n=i(43967);t.exports=function(t,e,i,s,r){return n(t,"scaleX",e,i,s,r)}},98476(t,e,i){var n=i(43967);t.exports=function(t,e,i,s,r){return n(t,"scaleY",e,i,s,r)}},6207(t,e,i){var n=i(43967);t.exports=function(t,e,i,s,r,o,a){return null==i&&(i=e),n(t,"scrollFactorX",e,s,o,a),n(t,"scrollFactorY",i,r,o,a)}},6607(t,e,i){var n=i(43967);t.exports=function(t,e,i,s,r){return n(t,"scrollFactorX",e,i,s,r)}},72248(t,e,i){var n=i(43967);t.exports=function(t,e,i,s,r){return n(t,"scrollFactorY",e,i,s,r)}},14036(t){t.exports=function(t,e,i,n,s){for(var r=0;r<t.length;r++)t[r].setTint(e,i,n,s);return t}},50159(t,e,i){var n=i(43967);t.exports=function(t,e,i,s){return n(t,"visible",e,0,i,s)}},77597(t,e,i){var n=i(43967);t.exports=function(t,e,i,s,r){return n(t,"x",e,i,s,r)}},83194(t,e,i){var n=i(43967);t.exports=function(t,e,i,s,r,o,a){return null==i&&(i=e),n(t,"x",e,s,o,a),n(t,"y",i,r,o,a)}},67678(t,e,i){var n=i(43967);t.exports=function(t,e,i,s,r){return n(t,"y",e,i,s,r)}},35850(t,e,i){var n=i(26099);t.exports=function(t,e,i,s,r){void 0===s&&(s=0),void 0===r&&(r=new n);var o,a,h=t.length;if(1===h)o=t[0].x,a=t[0].y,t[0].x=e,t[0].y=i;else{var l=1,u=0;0===s&&(u=h-1,l=h-2),o=t[u].x,a=t[u].y,t[u].x=e,t[u].y=i;for(var d=0;d<h;d++)if(!(l>=h)&&-1!==l){var c=t[l],f=c.x,p=c.y;c.x=o,c.y=a,o=f,a=p,0===s?l--:l++}}return r.x=o,r.y=a,r}},8628(t,e,i){var n=i(33680);t.exports=function(t){return n(t)}},21837(t,e,i){var n=i(7602);t.exports=function(t,e,i,s,r){void 0===r&&(r=!1);var o,a=Math.abs(s-i)/t.length;if(r)for(o=0;o<t.length;o++)t[o][e]+=n(o*a,i,s);else for(o=0;o<t.length;o++)t[o][e]=n(o*a,i,s);return t}},21910(t,e,i){var n=i(54261);t.exports=function(t,e,i,s,r){void 0===r&&(r=!1);var o,a=Math.abs(s-i)/t.length;if(r)for(o=0;o<t.length;o++)t[o][e]+=n(o*a,i,s);else for(o=0;o<t.length;o++)t[o][e]=n(o*a,i,s);return t}},62054(t){t.exports=function(t,e,i,n,s){if(void 0===s&&(s=!1),0===t.length)return t;if(1===t.length)return s?t[0][e]+=(n+i)/2:t[0][e]=(n+i)/2,t;var r,o=Math.abs(n-i)/(t.length-1);if(s)for(r=0;r<t.length;r++)t[r][e]+=r*o+i;else for(r=0;r<t.length;r++)t[r][e]=r*o+i;return t}},79815(t){t.exports=function(t){for(var e=0;e<t.length;e++)t[e].visible=!t[e].visible;return t}},39665(t,e,i){var n=i(15994);t.exports=function(t,e,i){void 0===i&&(i=0);for(var s=0;s<t.length;s++){var r=t[s];r.x=n(r.x,e.left-i,e.right+i),r.y=n(r.y,e.top-i,e.bottom+i)}return t}},61061(t,e,i){t.exports={AddEffectBloom:i(93300),AddEffectShine:i(56704),AddMaskShape:i(245),AlignTo:i(11517),Angle:i(80318),Call:i(60757),FitToRegion:i(94591),GetFirst:i(69927),GetLast:i(32265),GridAlign:i(94420),IncAlpha:i(41721),IncX:i(67285),IncXY:i(9074),IncY:i(75222),PlaceOnCircle:i(22983),PlaceOnEllipse:i(95253),PlaceOnLine:i(88505),PlaceOnRectangle:i(41346),PlaceOnTriangle:i(11575),PlayAnimation:i(29953),PropertyValueInc:i(66979),PropertyValueSet:i(43967),RandomCircle:i(88926),RandomEllipse:i(33286),RandomLine:i(96e3),RandomRectangle:i(28789),RandomTriangle:i(97154),Rotate:i(20510),RotateAround:i(91051),RotateAroundDistance:i(76332),ScaleX:i(61619),ScaleXY:i(94868),ScaleY:i(95532),SetAlpha:i(8689),SetBlendMode:i(2645),SetDepth:i(32372),SetHitArea:i(85373),SetOrigin:i(81583),SetRotation:i(79939),SetScale:i(2699),SetScaleX:i(98739),SetScaleY:i(98476),SetScrollFactor:i(6207),SetScrollFactorX:i(6607),SetScrollFactorY:i(72248),SetTint:i(14036),SetVisible:i(50159),SetX:i(77597),SetXY:i(83194),SetY:i(67678),ShiftPosition:i(35850),Shuffle:i(8628),SmootherStep:i(21910),SmoothStep:i(21837),Spread:i(62054),ToggleVisible:i(79815),WrapInRectangle:i(39665)}},42099(t,e,i){var n=i(45319),s=i(83419),r=i(74943),o=i(81957),a=i(41138),h=i(35154),l=i(90126);t.exports=new s({initialize:function(t,e,i){this.manager=t,this.key=e,this.type="frame",this.frames=this.getFrames(t.textureManager,h(i,"frames",[]),h(i,"defaultTextureKey",null),h(i,"sortFrames",!0)),this.frameRate=h(i,"frameRate",null),this.duration=h(i,"duration",null),this.msPerFrame,this.skipMissedFrames=h(i,"skipMissedFrames",!0),this.delay=h(i,"delay",0),this.repeat=h(i,"repeat",0),this.repeatDelay=h(i,"repeatDelay",0),this.yoyo=h(i,"yoyo",!1),this.showBeforeDelay=h(i,"showBeforeDelay",!1),this.showOnStart=h(i,"showOnStart",!1),this.hideOnComplete=h(i,"hideOnComplete",!1),this.randomFrame=h(i,"randomFrame",!1),this.paused=!1,this.calculateDuration(this,this.getTotalFrames(),this.duration,this.frameRate),this.manager.on&&(this.manager.on(r.PAUSE_ALL,this.pause,this),this.manager.on(r.RESUME_ALL,this.resume,this))},getTotalFrames:function(){return this.frames.length},calculateDuration:function(t,e,i,n){null===i&&null===n?(t.frameRate=24,t.duration=24/e*1e3):i&&null===n?(t.duration=i,t.frameRate=e/(i/1e3)):(t.frameRate=n,t.duration=e/n*1e3),t.msPerFrame=1e3/t.frameRate},addFrame:function(t){return this.addFrameAt(this.frames.length,t)},addFrameAt:function(t,e){var i=this.getFrames(this.manager.textureManager,e);if(i.length>0){if(0===t)this.frames=i.concat(this.frames);else if(t===this.frames.length)this.frames=this.frames.concat(i);else{var n=this.frames.slice(0,t),s=this.frames.slice(t);this.frames=n.concat(i,s)}this.updateFrameSequence()}return this},checkFrame:function(t){return t>=0&&t<this.frames.length},getFirstTick:function(t){t.accumulator=0,t.nextTick=t.frameRate===t.currentAnim.frameRate&&t.currentFrame.duration||t.msPerFrame},getFrameAt:function(t){return this.frames[t]}
1,getFrames:function(t,e,i,n){void 0===n&&(n=!0);var s,r,o,u,d=[],c=1;if("string"==typeof e){if(u=e,!t.exists(u))return console.warn('Texture "%s" not found',u),d;var f=t.get(u).getFrameNames();n&&l(f),e=[],f.forEach(function(t){e.push({key:u,frame:t})})}if(!Array.isArray(e)||0===e.length)return d;for(o=0;o<e.length;o++){var p=e[o],g=h(p,"key",i);if(g){var m=h(p,"frame",0),v=t.getFrame(g,m);if(!v){console.warn('Texture "%s" not found',g);continue}(r=new a(g,m,c,v)).duration=h(p,"duration",0),r.isFirst=!s,s&&(s.nextFrame=r,r.prevFrame=s),d.push(r),s=r,c++}}if(d.length>0){r.isLast=!0,r.nextFrame=d[0],d[0].prevFrame=r;var x=1/(d.length-1);for(o=0;o<d.length;o++)d[o].progress=o*x}return d},getNextTick:function(t){t.accumulator-=t.nextTick,t.nextTick=t.frameRate===t.currentAnim.frameRate&&t.currentFrame.duration||t.msPerFrame},getFrameByProgress:function(t){return o(t=n(t,0,1),this.frames,"progress")},nextFrame:function(t){var e=t.currentFrame;e.isLast?t.yoyo?this.handleYoyoFrame(t,!1):t.repeatCounter>0?t.inReverse&&t.forward?t.forward=!1:this.repeatAnimation(t):t.complete():this.updateAndGetNextTick(t,e.nextFrame)},handleYoyoFrame:function(t,e){if(e||(e=!1),!e===t.inReverse&&t.repeatCounter>0){(0===t.repeatDelay||t.pendingRepeat)&&(t.forward=e),this.repeatAnimation(t);return}if(t.inReverse!==e&&0===t.repeatCounter)return void t.complete();t.forward=e;var i=e?t.currentFrame.nextFrame:t.currentFrame.prevFrame;this.updateAndGetNextTick(t,i)},getLastFrame:function(){return this.frames[this.frames.length-1]},previousFrame:function(t){var e=t.currentFrame;e.isFirst?t.yoyo?this.handleYoyoFrame(t,!0):t.repeatCounter>0?(t.inReverse&&!t.forward||(t.forward=!0),this.repeatAnimation(t)):t.complete():this.updateAndGetNextTick(t,e.prevFrame)},updateAndGetNextTick:function(t,e){t.setCurrentFrame(e),this.getNextTick(t)},removeFrame:function(t){var e=this.frames.indexOf(t);return -1!==e&&this.removeFrameAt(e),this},removeFrameAt:function(t){return this.frames.splice(t,1),this.updateFrameSequence(),this},repeatAnimation:function(t){if(2===t._pendingStop)if(0===t._pendingStopValue)return t.stop();else t._pendingStopValue--;t.repeatDelay>0&&!t.pendingRepeat?(t.pendingRepeat=!0,t.accumulator-=t.nextTick,t.nextTick+=t.repeatDelay):(t.repeatCounter--,t.forward?t.setCurrentFrame(t.currentFrame.nextFrame):t.setCurrentFrame(t.currentFrame.prevFrame),t.isPlaying&&(this.getNextTick(t),t.handleRepeat()))}
vendor: 4,190 bytes, line 1
1,toJSON:function(){var t={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(e){t.frames.push(e.toJSON())}),t},updateFrameSequence:function(){for(var t,e=this.frames.length,i=1/(e-1),n=0;n<e;n++)(t=this.frames[n]).index=n+1,t.isFirst=!1,t.isLast=!1,t.progress=n*i,0===n?(t.isFirst=!0,1===e?(t.isLast=!0,t.nextFrame=t,t.prevFrame=t):(t.isLast=!1,t.prevFrame=this.frames[e-1],t.nextFrame=this.frames[n+1])):n===e-1&&e>1?(t.isLast=!0,t.prevFrame=this.frames[e-2],t.nextFrame=this.frames[0]):e>1&&(t.prevFrame=this.frames[n-1],t.nextFrame=this.frames[n+1]);return this},pause:function(){return this.paused=!0,this},resume:function(){return this.paused=!1,this},destroy:function(){this.manager.off&&(this.manager.off(r.PAUSE_ALL,this.pause,this),this.manager.off(r.RESUME_ALL,this.resume,this)),this.manager.remove(this.key);for(var t=0;t<this.frames.length;t++)this.frames[t].destroy();this.frames=[],this.manager=null}})},41138(t,e,i){t.exports=new(i(83419))({initialize:function(t,e,i,n,s){void 0===s&&(s=!1),this.textureKey=t,this.textureFrame=e,this.index=i,this.frame=n,this.isFirst=!1,this.isLast=!1,this.prevFrame=null,this.nextFrame=null,this.duration=0,this.progress=0,this.isKeyFrame=s},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration,keyframe:this.isKeyFrame}},destroy:function(){this.frame=void 0}})},60848(t,e,i){var n=i(42099),s=i(83419),r=i(90330),o=i(50792),a=i(74943),h=i(8443),l=i(95540),u=i(35154),d=i(36383),c=i(20283),f=i(41836);t.exports=new s({Extends:o,initialize:function(t){o.call(this),this.game=t,this.textureManager=null,this.globalTimeScale=1,this.anims=new r,this.mixes=new r,this.paused=!1,this.name="AnimationManager",t.events.once(h.BOOT,this.boot,this)},boot:function(){this.textureManager=this.game.textures,this.game.events.once(h.DESTROY,this.destroy,this)},addMix:function(t,e,i){var n=this.anims,s=this.mixes,r="string"==typeof t?t:t.key,o="string"==typeof e?e:e.key;if(n.has(r)&&n.has(o)){var a=s.get(r);a||(a={}),a[o]=i,s.set(r,a)}return this},removeMix:function(t,e){var i=this.mixes,n="string"==typeof t?t:t.key,s=i.get(n);if(s)if(e){var r="string"==typeof e?e:e.key;s.hasOwnProperty(r)&&delete s[r]}else e||i.delete(n);return this},getMix:function(t,e){var i=this.mixes,n="string"==typeof t?t:t.key,s="string"==typeof e?e:e.key,r=i.get(n);return r&&r.hasOwnProperty(s)?r[s]:0},add:function(t,e){return this.anims.has(t)?console.warn("Animation key exists: "+t):(e.key=t,this.anims.set(t,e),this.emit(a.ADD_ANIMATION,t,e)),this},exists:function(t){return this.anims.has(t)},createFromAseprite:function(t,e,i){var n=[],s=this.game.cache.json.get(t);if(!s)return console.warn("No Aseprite data found for: "+t),n;var r=this,o=u(s,"meta",null),a=u(s,"frames",null);return o&&a&&u(o,"frameTags",[]).forEach(function(s){var o=[],h=l(s,"name",null),u=l(s,"from",0),c=l(s,"to",0),f=l(s,"direction","forward");if(h&&(!e||e&&e.indexOf(h)>-1)){for(var p,g=0,m=u;m<=c;m++){var v=m.toString(),x=a[v];if(x){var y=l(x,"duration",d.MAX_SAFE_INTEGER);o.push({key:t,frame:v,duration:y}),g+=y}}"reverse"===f&&(o=o.reverse());var T={key:h,frames:o,duration:g,yoyo:"pingpong"===f};i?i.anims&&(p=i.anims.create(T)):p=r.create(T),p&&n.push(p)}}),n},create:function(t){var e=t.key,i=!1;return e&&((i=this.get(e))?console.warn("AnimationManager key already exists: "+e):(i=new n(this,e,t),this.anims.set(e,i),this.emit(a.ADD_ANIMATION,e,i))),i},fromJSON:function(t,e){void 0===e&&(e=!1),e&&this.anims.clear(),"string"==typeof t&&(t=JSON.parse(t));var i=[];if(t.hasOwnProperty("anims")&&Array.isArray(t.anims)){for(var n=0;n<t.anims.length;n++)i.push(this.create(t.anims[n]));t.hasOwnProperty("globalTimeScale")&&(this.globalTimeScale=t.globalTimeScale)}else t.hasOwnProperty("key")&&"frame"===t.type&&i.push(this.create(t));return i},generateFrameNames:function(t,e){var i,n=u(e,"prefix",""),s=u(e,"start",0),r
1=u(e,"end",0),o=u(e,"suffix",""),a=u(e,"zeroPad",0),h=u(e,"outputArray",[]),l=u(e,"frames",!1);if(!this.textureManager.exists(t))return console.warn('Texture "%s" not found',t),h;var d=this.textureManager.get(t);if(!d)return h;if(e)for(l||(l=c(s,r)),i=0;i<l.length;i++){var p=n+f(l[i],a,"0",1)+o;d.has(p)?h.push({key:t,frame:p}):console.warn('Frame "%s" not found in texture "%s"',p,t)}else for(i=0,l=d.getFrameNames();i<l.length;i++)h.push({key:t,frame:l[i]});return h},generateFrameNumbers:function(t,e){var i=u(e,"start",0),n=u(e,"end",-1),s=u(e,"first",!1),r=u(e,"outputArray",[]),o=u(e,"frames",!1);if(!this.textureManager.exists(t))return console.warn('Texture "%s" not found',t),r;var a=this.textureManager.get(t);if(!a)return r;s&&a.has(s)&&r.push({key:t,frame:s}),o||(-1===n&&(n=a.frameTotal-2),o=c(i,n));for(var h=0;h<o.length;h++){var l=o[h];a.has(l)?r.push({key:t,frame:l}):console.warn('Frame "%s" not found in texture "%s"',l,t)}return r},get:function(t){return this.anims.get(t)},getAnimsFromTexture:function(t){for(var e=this.textureManager.get(t).key,i=this.anims.getArray(),n=[],s=0;s<i.length;s++)for(var r=i[s],o=r.frames,a=0;a<o.length;a++)if(o[a].textureKey===e){n.push(r.key);break}return n},pauseAll:function(){return this.paused||(this.paused=!0,this.emit(a.PAUSE_ALL)),this},play:function(t,e){Array.isArray(e)||(e=[e]);for(var i=0;i<e.length;i++)e[i].anims.play(t);return this},staggerPlay:function(t,e,i,n){void 0===i&&(i=0),void 0===n&&(n=!0),Array.isArray(e)||(e=[e]);var s=e.length;!n&&s--;for(var r=0;r<e.length;r++){var o=i<0?Math.abs(i)*(s-r):i*r;e[r].anims.playAfterDelay(t,o)}return this},remove:function(t){var e=this.get(t);
vendor: 10,092 bytes, line 1
1return e&&(this.emit(a.REMOVE_ANIMATION,t,e),this.anims.delete(t),this.removeMix(t)),e},resumeAll:function(){return this.paused&&(this.paused=!1,this.emit(a.RESUME_ALL)),this},toJSON:function(t){var e={anims:[],globalTimeScale:this.globalTimeScale};return void 0!==t&&""!==t?e.anims.push(this.anims.get(t).toJSON()):this.anims.each(function(t,i){e.anims.push(i.toJSON())}),e},destroy:function(){this.anims.clear(),this.mixes.clear(),this.textureManager=null,this.game=null}})},9674(t,e,i){var n=i(42099),s=i(30976),r=i(83419),o=i(90330),a=i(74943),h=i(95540);t.exports=new r({initialize:function(t){this.parent=t,this.animationManager=t.scene.sys.anims,this.animationManager.on(a.REMOVE_ANIMATION,this.globalRemove,this),this.textureManager=this.animationManager.textureManager,this.anims=null,this.isPlaying=!1,this.hasStarted=!1,this.currentAnim=null,this.currentFrame=null,this.nextAnim=null,this.nextAnimsQueue=[],this.timeScale=1,this.frameRate=0,this.duration=0,this.msPerFrame=0,this.skipMissedFrames=!0,this.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(t){var e=this.parent;if(void 0===t)return this.nextAnimsQueue.length=0,this.nextAnim=null,e;Array.isArray(t)||(t=[t]);for(var i=0;i<t.length;i++){var n=t[i];this.nextAnim?this.nextAnimsQueue.push(n):this.nextAnim=n}return this.parent},getName:function(){return this.currentAnim?this.currentAnim.key:""},getFrameName:function(){return this.currentFrame?this.currentFrame.textureFrame:""},load:function(t){this.isPlaying&&this.stop();var e=this.animationManager,i="string"==typeof t?t:h(t,"key",null),n=this.exists(i)?this.get(i):e.get(i);if(n){this.currentAnim=n;var r=n.getTotalFrames(),o=h(t,"frameRate",n.frameRate),a=h(t,"duration",n.duration);n.calculateDuration(this,r,a,o),this.delay=h(t,"delay",n.delay),this.repeat=h(t,"repeat",n.repeat),this.repeatDelay=h(t,"repeatDelay",n.repeatDelay),this.yoyo=h(t,"yoyo",n.yoyo),this.showBeforeDelay=h(t,"showBeforeDelay",n.showBeforeDelay),this.showOnStart=h(t,"showOnStart",n.showOnStart),this.hideOnComplete=h(t,"hideOnComplete",n.hideOnComplete),this.skipMissedFrames=h(t,"skipMissedFrames",n.skipMissedFrames),this.randomFrame=h(t,"randomFrame",n.randomFrame),this.timeScale=h(t,"timeScale",this.timeScale);var l=h(t,"startFrame",0);l>r&&(l=0),this.randomFrame&&(l=s(0,r-1));var u=n.frames[l];0!==l||this.forward||(u=n.getLastFrame()),this.currentFrame=u}else console.warn("Missing animation: "+i);return this.parent},pause:function(t){return this._paused||(this._paused=!0,this._wasPlaying=this.isPlaying,this.isPlaying=!1),void 0!==t&&this.setCurrentFrame(t),this.parent},resume:function(t){return this._paused&&(this._paused=!1,this.isPlaying=this._wasPlaying),void 0!==t&&this.setCurrentFrame(t),this.parent},playAfterDelay:function(t,e){if(this.isPlaying){var i=this.nextAnim,n=this.nextAnimsQueue;i&&n.unshift(i),this.nextAnim=t,this._pendingStop=1,this._pendingStopValue=e}else this.delayCounter=e,this.play(t,!0);return this.parent},playAfterRepeat:function(t,e){if(void 0===e&&(e=1),this.isPlaying){var i=this.nextAnim,n=this.nextAnimsQueue;i&&n.unshift(i),-1!==this.repeatCounter&&e>this.repeatCounter&&(e=this.repeatCounter),this.nextAnim=t,this._pendingStop=2,this._pendingStopValue=e}else this.play(t);return this.parent},play:function(t,e){void 0===e&&(e=!1);var i=this.currentAnim,n=this.parent,s="string"==typeof t?t:t.key;if(e&&this.isPlaying&&i.key===s)return n;if(i&&this.isPlaying){var r=this.animationManager.getMix(i.key,t);if(r>0)return this.playAfterDelay(t,r)}return this.forward=!0,this.inReverse=!1,this._paused=!1,this._wasPlaying=!0,this.startAnimation(t)},playReverse:function(t,e){void 0===e&&(e=!1);var i="string"==typeof t?t:t.key;return e&&this.isPlaying&&this.currentAnim.key===i?this.parent:(this.forward=!1,this.inReverse=!0,this._paused=!1,this._wasPlaying=!0,this.startAnimation(t))},startAnimation:function(t){this.load(t);var e=this.currentAnim,i=this.parent;return e&&(this.repeatCounter=-1===this.repeat?Number.MAX_VALUE:this.repeat,e.getFirstTick(this),this.isPlaying=!0,this.pendingRepeat=!1,this.hasStarted=!1,this._pendingStop=0,this._pendingStopValue=0,this._paused=!1,this.delayCounter+=this.delay,0===this.delayCounter?this.handleStart():this.showBeforeDelay&&this.setCurrentFrame(this.currentFrame)),i},handleStart:function(){this.showOnStart&&this.parent.setVisible(!0),this.setCurrentFrame(this.currentFrame),this.hasStarted=!0,this.emitEvents(a.ANIMATION_START)},handleRepeat:function(){this.pendingRepeat=!1,this.emitEvents(a.ANIMATION_REPEAT)},handleStop:function(){this._pendingStop=0,this.isPlaying=!1,this.emitEvents(a.ANIMATION_STOP)},handleComplete:function(){this._pendingStop=0,this.isPlaying=!1,this.hideOnComplete&&this.parent.setVisible(!1),this.emitEvents(a.ANIMATION_COMPLETE,a.ANIMATION_COMPLETE_KEY)},emitEvents:function(t,e){var i=this.currentAnim;if(i){var n=this.currentFrame,s=this.parent,r=n.textureFrame;s.emit(t,i,n,s,r),e&&s.emit(e+i.key,i,n,s,r)}},reverse:function(){return this.isPlaying&&(this.inReverse=!this.inReverse,this.forward=!this.forward),this.parent},getProgress:function(){var t=this.currentFrame;if(!t)return 0;var e=t.progress;return this.inReverse&&(e*=-1),e},setProgress:function(t){return this.forward||(t=1-t),this.setCurrentFrame(this.currentAnim.getFrameByProgress(t)),this.parent},setRepeat:function(t){return this.repeatCounter=-1===t?Number.MAX_VALUE:t,this.parent},globalRemove:function(t,e){void 0===e&&(e=this.currentAnim),this.isPlaying&&e.key===this.currentAnim.key&&(this.stop(),this.setCurrentFrame(this.currentAnim.frames[0]))},restart:function(t,e){void 0===t&&(t=!1),void 0===e&&(e=!1);var i=this.currentAnim,n=this.parent;return i?(e&&(this.repeatCounter=-1===this.repeat?Number.MAX_VALUE:this.repeat),i.getFirstTick(this),this.emitEvents(a.ANIMATION_RESTART),this.isPlaying=!0,this.pendingRepeat=!1,this.hasStarted=!t,this._pendingStop=0,this._pendingStopValue=0,this._paused=!1,this.setCurrentFrame(i.frames[0]),this.parent):n},complete:function(){if(this._pendingStop=0,this.isPlaying=!1,this.currentAnim&&this.handleComplete(),this.nextAnim){var t=this.nextAnim;this.nextAnim=this.nextAnimsQueue.length>0?this.nextAnimsQueue.shift():null,this.play(t)}return this.parent},stop:function(){if(this._pendingStop=0,this.isPlaying=!1,this.delayCounter=0,this.currentAnim&&this.handleStop(),this.nextAnim){var t=this.nextAnim;this.nextAnim=this.nextAnimsQueue.shift(),this.play(t)}return this.parent},stopAfterDelay:function(t){return this._pendingStop=1,this._pendingStopValue=t,this.parent},stopAfterRepeat:function(t){return void 0===t&&(t=1),-1!==this.repeatCounter&&t>this.repeatCounter&&(t=this.repeatCounter),this._pendingStop=2,this._pendingStopValue=t,this.parent},stopOnFrame:function(t){return this._pendingStop=3,this._pendingStopValue=t,this.parent},getTotalFrames:function(){return this.currentAnim?this.currentAnim.getTotalFrames():0},update:function(t,e){var i=this.currentAnim;if(this.isPlaying&&i&&!i.paused){if(this.accumulator+=e*this.timeScale*this.animationManager.globalTimeScale,1===this._pendingStop&&(this._pendingStopValue-=e,this._pendingStopValue<=0))return this.stop();if(this.hasStarted){if(this.accumulator>=this.nextTick&&(this.forward?i.nextFrame(this):i.previousFrame(this),this.isPlaying&&0===this._pendingStop&&this.skipMissedFrames&&this.accumulator>this.nextTick)){var n=0;do this.forward?i.nextFrame(this):i.previousFrame(this),n++;while(this.isPlaying&&this.accumulator>this.nextTick&&n<60)}}else this.accumulator>=this.delayCounter&&(this.accumulator-=this.delayCounter,this.handleStart())}},setCurrentFrame:function(t){var e=this.parent;return this.currentFrame=t,e.texture=t.frame.texture,e.frame=t.frame,e.isCropped&&e.frame.updateCropUVs(e._crop,e.flipX,e.flipY),t.setAlpha&&(e.alpha=t.alpha),e.setSizeToFrame(),e._originComponent&&(t.frame.customPivot?e.setOrigin(t.frame.pivotX,t.frame.pivotY):e.updateDisplayOrigin()),this.isPlaying&&this.hasStarted&&(this.emitEvents(a.ANIMATION_UPDATE),3===this._pendingStop&&this._pendingStopValue===t&&this.stop()),e},nextFrame:function(){return this.currentAnim&&this.currentAnim.nextFrame(this),this.parent},previousFrame:function(){return this.currentAnim&&this.currentAnim.previousFrame(this),this.parent},get:function(t){return this.anims?this.anims.get(t):null},exists:function(t){return!!this.anims&&this.anims.has(t)},create:function(t){var e=t.key,i=!1;return e&&((i=this.get(e))?console.warn("Animation key already exists: "+e):(i=new n(this,e,t),this.anims||(this.anims=new o),this.anims.set(e,i))),i},createFromAseprite:function(t,e){return this.animationManager.createFromAseprite(t,e,this.parent)},generateFrameNames:function(t,e){return this.animationManager.generateFrameNames(t,e)},generateFrameNumbers:function(t,e){return this.animationManager.generateFrameNumbers(t,e)},remove:function(t){var e=this.get(t);return e&&(this.currentAnim===e&&this.stop(),this.anims.delete(t)),e},destroy:function(){this.animationManager.off(a.REMOVE_ANIMATION,this.globalRemove,this),this.anims&&this.anims.clear(),this.animationManager=null,this.parent=null,this.nextAnim=null,this.nextAnimsQueue.length=0,this.currentAnim=null,this.currentFrame=null},isPaused:{get:function(){return this._paused}}})},57090(t){t.exports="add"},25312(t){t.exports="animationcomplete"},89580(t){t.exports="animationcomplete-"},52860(t){t.exports="animationrepeat"},63850(t){t.exports="animationrestart"},99085(t){t.exports="animationstart"},28087(t){t.exports="animationstop"},1794(t){t.exports="animationupdate"},52562(t){t.exports="pauseall"},57953(t){t.exports="remove"},68339(t){t.exports="resumeall"},74943(t,e,i){t.exports={ADD_ANIMATION:i(57090),ANIMATION_COMPLETE:i(25312),ANIMATION_COMPLETE_KEY:i(89580),ANIMATION_REPEAT:i(52860),ANIMATION_RESTART:i(63850),ANIMATION_
1START:i(99085),ANIMATION_STOP:i(28087),ANIMATION_UPDATE:i(1794),PAUSE_ALL:i(52562),REMOVE_ANIMATION:i(57953),RESUME_ALL:i(68339)}},60421(t,e,i){t.exports={Animation:i(42099),AnimationFrame:i(41138),AnimationManager:i(60848),AnimationState:i(9674),Events:i(74943)}},2161(t,e,i){var n=i(83419),s=i(90330),r=i(50792),o=i(24736);t.exports=new n({initialize:function(){this.entries=new s,this.events=new r},add:function(t,e){return this.entries.set(t,e),this.events.emit(o.ADD,this,t,e),this},has:function(t){return this.entries.has(t)},exists:function(t){return this.entries.has(t)},get:function(t){return this.entries.get(t)},remove:function(t){var e=this.get(t);return e&&(this.entries.delete(t),this.events.emit(o.REMOVE,this,t,e.data)),this},getKeys:function(){return this.entries.keys()},destroy:function(){this.entries.clear(),this.events.removeAllListeners(),this.entries=null,this.events=null}})},24047(t,e,i){var n=i(2161),s=i(83419),r=i(8443);t.exports=new s({initialize:function(t){this.game=t,this.binary=new n,this.bitmapFont=new n,this.json=new n,this.physics=new n,this.shader=new n,this.audio=new n,this.video=new n,this.text=new n,this.html=new n,this.tilemap=new n,this.xml=new n,this.atlas=new n,this.custom={},this.game.events.once(r.DESTROY,this.destroy,this)},addCustom:function(t){return this.custom.hasOwnProperty(t)||(this.custom[t]=new n),this.custom[t]},destroy:function(){for(var t=["binary","bitmapFont","json","physics","shader","audio","video","text","html","tilemap","xml","atlas"],e=0;e<t.length;e++)this[t[e]].destroy(),this[t[e]]=null;for(var i in this.custom)this.custom[i].destroy();this.custom=null,this.game=null}})},51464(t){t.exports="add"},59261(t){t.exports="remove"},24736(t,e,i){t.exports={ADD:i(51464),REMOVE:i(59261)}},83388(t,e,i){t.exports={BaseCache:i(2161),CacheManager:i(24047),Events:i(24736)}},71911(t,e,i){var n=i(83419),s=i(39506),r=i(50792),o=i(19715),a=i(87841),h=i(88509),l=i(61340),u=i(59715),d=i(80333),c=i(26099);t.exports=new n({Extends:r,Mixins:[h,u],initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=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 a,this.dirty=!0,this._x=t,this._y=e,this._width=i,this._height=n,this._bounds=new a,this._scrollX=0,this._scrollY=0,this._zoomX=1,this._zoomY=1,this._rotation=0,this.matrix=new l,this.matrixCombined=new l,this.matrixExternal=new l,this.transparent=!0,this.backgroundColor=d("rgba(0,0,0,0)"),this.disableCull=!1,this.culledObjects=[],this.midPoint=new c(i/2,n/2),this.originX=.5,this.originY=.5,this._customViewport=!1,this.mask=null,this._maskCamera=null,this.renderList=[],this.isSceneCamera=!0,this.forceComposite=!1,this.renderRoundPixels=!0},addToRenderList:function(t){this.renderList.push(t)},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this},getScroll:function(t,e,i){void 0===i&&(i=new c);var n=.5*this.width,s=.5*this.height;return i.x=t-n,i.y=e-s,this.useBounds&&(i.x=this.clampX(i.x),i.y=this.clampY(i.y)),i},centerOnX:function(t){var e=.5*this.width;return this.midPoint.x=t,this.scrollX=t-e,this.useBounds&&(this.scrollX=this.clampX(this.scrollX)),this},centerOnY:function(t){var e=.5*this.height;return this.midPoint.y=t,this.scrollY=t-e,this.useBounds&&(this.scrollY=this.clampY(this.scrollY)),this},centerOn:function(t,e){return this.centerOnX(t),this.centerOnY(e),this},centerToBounds:function(){if(this.useBounds){var t=this._bounds,e=.5*this.width,i=.5*this.height;this.midPoint.set(t.centerX,t.centerY),this.scrollX=t.centerX-e,this.scrollY=t.centerY-i}return this},centerToSize:function(){return this.scrollX=.5*this.width,this.scrollY=.5*this.height,this},cull:function(t){if(this.disableCull)return t;var e=this.matrix.matrix,i=e[0],n=e[1],s=e[2],r=e[3],o=i*r-n*s;if(!o)return t;var a=this.scrollX,h=this.scrollY,l=this.width,u=this.height,d=this.y,c=d+u,f=this.x,p=f+l,g=this.culledObjects,m=t.length;o=1/o,g.length=0;for(var v=0;v<m;++v){var x=t[v];if(!x.hasOwnProperty("width")||x.parentContainer){g.push(x);continue}var y=x.width,T=x.height,w=x.x-a*x.scrollFactorX-y*x.originX,b=x.y-h*x.scrollFactorY-T*x.originY,S=w*i+b*s,C=w*n+b*r,E=(w+y)*i+(b+T)*s,A=(w+y)*n+(b+T)*r;E>f&&S<p&&A>d&&C<c&&g.push(x)}return g}
vendor: 13,081 bytes, line 1
1,getWorldPoint:function(t,e,i){void 0===i&&(i=new c);var n=this.matrixCombined.matrix,s=n[0],r=n[1],o=n[2],a=n[3],h=n[4],l=n[5],u=s*a-r*o;if(!u)return i.x=t,i.y=e,i;var d=a*(u=1/u),f=-r*u,p=-o*u,g=s*u,m=(o*l-a*h)*u,v=(r*h-s*l)*u;return i.x=t*d+e*p+m,i.y=t*f+e*g+v,i},ignore:function(t){var e=this.id;Array.isArray(t)||(t=[t]);for(var i=0;i<t.length;i++){var n=t[i];Array.isArray(n)?this.ignore(n):n.isParent?this.ignore(n.getChildren()):n.cameraFilter|=e}return this},clampX:function(t){var e=this._bounds,i=this.displayWidth,n=e.x+(i-this.width)/2,s=Math.max(n,n+e.width-i);return t<n?t=n:t>s&&(t=s),t},clampY:function(t){var e=this._bounds,i=this.displayHeight,n=e.y+(i-this.height)/2,s=Math.max(n,n+e.height-i);return t<n?t=n:t>s&&(t=s),t},removeBounds:function(){return this.useBounds=!1,this.dirty=!0,this._bounds.setEmpty(),this},setAngle:function(t){return void 0===t&&(t=0),this.rotation=s(t),this},setBackgroundColor:function(t){return void 0===t&&(t="rgba(0,0,0,0)"),this.backgroundColor=d(t),this.transparent=0===this.backgroundColor.alpha,this},setBounds:function(t,e,i,n,s){return void 0===s&&(s=!1),this._bounds.setTo(t,e,i,n),this.dirty=!0,this.useBounds=!0,s?this.centerToBounds():(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},setForceComposite:function(t){return this.forceComposite=t,this},getBounds:function(t){void 0===t&&(t=new a);var e=this._bounds;return t.setTo(e.x,e.y,e.width,e.height),t},setName:function(t){return void 0===t&&(t=""),this.name=t,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setRoundPixels:function(t){return this.roundPixels=t,this},setScene:function(t,e){void 0===e&&(e=!0),this.scene&&this._customViewport&&this.sceneManager.customViewports--,this.scene=t,this.isSceneCamera=e;var i=t.sys;return this.sceneManager=i.game.scene,this.scaleManager=i.scale,this.cameraManager=i.cameras,this.updateSystem(),this},setScroll:function(t,e){return void 0===e&&(e=t),this.scrollX=t,this.scrollY=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},setViewport:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setZoom:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),0===t&&(t=.001),0===e&&(e=.001),this.zoomX=t,this.zoomY=e,this},setMask:function(t,e){return void 0===e&&(e=!0),this.mask=t,this._maskCamera=e?this.cameraManager.default:this,this},clearMask:function(t){return void 0===t&&(t=!1),t&&this.mask&&this.mask.destroy(),this.mask=null,this},toJSON:function(){var t={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&&(t.bounds={x:this._bounds.x,y:this._bounds.y,width:this._bounds.width,height:this._bounds.height}),t},update:function(){},setIsSceneCamera:function(t){return this.isSceneCamera=t,this},updateSystem:function(){if(this.scaleManager&&this.isSceneCamera){var t=0!==this._x||0!==this._y||this.scaleManager.width!==this._width||this.scaleManager.height!==this._height,e=this.sceneManager;t&&!this._customViewport?e.customViewports++:!t&&this._customViewport&&e.customViewports--,this.dirty=!0,this._customViewport=t}},destroy:function(){this.emit(o.DESTROY,this),this.removeAllListeners(),this.matrix.destroy(),this.matrixCombined.destroy(),this.matrixExternal.destroy(),this.culledObjects=[],this._customViewport&&this.sceneManager.customViewports--,this.renderList=[],this._bounds=null,this.scene=null,this.scaleManager=null,this.sceneManager=null,this.cameraManager=null},x:{get:function(){return this._x},set:function(t){this._x=t,this.updateSystem()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.updateSystem()}},width:{get:function(){return this._width},set:function(t){this._width=t,this.updateSystem()}},height:{get:function(){return this._height},set:function(t){this._height=t,this.updateSystem()}},scrollX:{get:function(){return this._scrollX},set:function(t){t!==this._scrollX&&(this._scrollX=t,this.dirty=!0)}},scrollY:{get:function(){return this._scrollY},set:function(t){t!==this._scrollY&&(this._scrollY=t,this.dirty=!0)}},zoom:{get:function(){return(this._zoomX+this._zoomY)/2},set:function(t){this._zoomX=t,this._zoomY=t,this.dirty=!0}},zoomX:{get:function(){return this._zoomX},set:function(t){this._zoomX=t,this.dirty=!0}},zoomY:{get:function(){return this._zoomY},set:function(t){this._zoomY=t,this.dirty=!0}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=t,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}}})},38058(t,e,i){var n=i(71911),s=i(67502),r=i(45319),o=i(83419),a=i(31401),h=i(20052),l=i(19715),u=i(28915),d=i(87841),c=i(26099);t.exports=new o({Extends:n,initialize:function(t,e,i,s){n.call(this,t,e,i,s),this.filters={internal:new a.FilterList(this),external:new a.FilterList(this)},this.isObjectInversion=!1,this.inputEnabled=!0,this.fadeEffect=new h.Fade(this),this.flashEffect=new h.Flash(this),this.shakeEffect=new h.Shake(this),this.panEffect=new h.Pan(this),this.rotateToEffect=new h.RotateTo(this),this.zoomEffect=new h.Zoom(this),this.lerp=new c(1,1),this.followOffset=new c,this.deadzone=null,this._follow=null},setDeadzone:function(t,e){if(void 0===t)this.deadzone=null;else{if(this.deadzone?(this.deadzone.width=t,this.deadzone.height=e):this.deadzone=new d(0,0,t,e),this._follow){var i=this.width/2,n=this.height/2,r=this._follow.x-this.followOffset.x,o=this._follow.y-this.followOffset.y;this.midPoint.set(r,o),this.scrollX=r-i,this.scrollY=o-n}s(this.deadzone,this.midPoint.x,this.midPoint.y)}return this},fadeIn:function(t,e,i,n,s,r){return this.fadeEffect.start(!1,t,e,i,n,!0,s,r)},fadeOut:function(t,e,i,n,s,r){return this.fadeEffect.start(!0,t,e,i,n,!0,s,r)},fadeFrom:function(t,e,i,n,s,r,o){return this.fadeEffect.start(!1,t,e,i,n,s,r,o)},fade:function(t,e,i,n,s,r,o){return this.fadeEffect.start(!0,t,e,i,n,s,r,o)},flash:function(t,e,i,n,s,r,o){return this.flashEffect.start(t,e,i,n,s,r,o)},shake:function(t,e,i,n,s){return this.shakeEffect.start(t,e,i,n,s)},pan:function(t,e,i,n,s,r,o){return this.panEffect.start(t,e,i,n,s,r,o)},rotateTo:function(t,e,i,n,s,r,o){return this.rotateToEffect.start(t,e,i,n,s,r,o)},zoomTo:function(t,e,i,n,s,r){return this.zoomEffect.start(t,e,i,n,s,r)},preRender:function(){this.renderList.length=0;var t=this.width,e=this.height,i=this.zoomX,n=this.zoomY;this.renderRoundPixels=this.roundPixels&&Number.isInteger(i)&&Number.isInteger(n);var r=t*this.originX,o=e*this.originY,a=this._follow,h=this.deadzone,d=this.scrollX,c=this.scrollY;h&&s(h,this.midPoint.x,this.midPoint.y);var f=!1;if(a&&!this.panEffect.isRunning){var p=this.lerp,g=a.x-this.followOffset.x,m=a.y-this.followOffset.y;h?(g<h.x?d=u(d,d-(h.x-g),p.x):g>h.right&&(d=u(d,d+(g-h.right),p.x)),m<h.y?c=u(c,c-(h.y-m),p.y):m>h.bottom&&(c=u(c,c+(m-h.bottom),p.y))):(d=u(d,g-r,p.x),c=u(c,m-o,p.y)),f=!0}this.useBounds&&(d=this.clampX(d),c=this.clampY(c)),this.scrollX=d,this.scrollY=c;var v=d+.5*t,x=c+.5*e;this.midPoint.set(v,x);var y=t/i,T=e/n;this.worldView.setTo(v-y/2,x-T/2,y,T);var w=this.matrix,b=this.matrixExternal;this.isObjectInversion?(w.loadIdentity(),w.translate(r,o),w.scale(i,n),w.rotate(this.rotation)):w.applyITRS(r,o,this.rotation,i,n),w.translate(-d-r,-c-o),b.applyITRS(this.x,this.y,0,1,1),this.shakeEffect.preRender(),b.multiply(w,this.matrixCombined),f&&this.emit(l.FOLLOW_UPDATE,this,a)},getViewMatrix:function(t){return t||this.forceComposite||this.filters.external.length>0||this.filters.internal.length>0?this.matrix:this.matrixCombined},getPaddingWrapper:function(t){var e={padding:0},i=new Proxy(this,{get:function(t,i){switch(i){case"padding":return e.padding;case"x":case"y":case"scrollX":case"scrollY":return t[i]+e.padding;case"width":case"height":return t[i]-2*e.padding;default:return t[i]}},set:function(i,n,s){switch(n){case"padding":var r=e.padding;e.padding=s;var o=e.padding-r;return i.x-=o,i.y-=o,i.width+=2*o,i.height+=2*o,i.scrollX-=o,i.scrollY-=o,t;case"x":case"y":case"scrollX":case"scrollY":return i[n]=s-e.padding;case"width":case"height":return i[n]=s+2*e.padding;default:return i[n]=s}}});return i.padding=t||0,i},setLerp:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.lerp.set(t,e),this},setFollowOffset:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=0),this.followOffset.set(t,e),this},startFollow:function(t,e,i,n,s,o){void 0===e&&(e=!1),void 0===i&&(i=1),void 0===n&&(n=i),void 0===s&&(s=0),void 0===o&&(o=s),this._follow=t,this.roundPixels=e,i=r(i,0,1),n=r(n,0,1),this.lerp.set(i,n),this.followOffset.set(s,o);var a=this.width/2,h=this.height/2,l=t.x-s,u=t.y-o;return this.midPoint.set(l,u),this.scrollX=l-a,this.scrollY=u-h,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(t,e){this.visible&&(this.rotateToEffect.update(t,e),this.panEffect.update(t,e),this.zoomEffect.update(t,e),this.shakeEffect.update(t,e),this.flashEffect.update(t,e),this.fadeEffect.update(t,e))},destroy:function(){this.resetFX(),this.filters.internal.destroy(),this.filters.external.destroy(),n.prototype.destroy.call(this),this._follow=null,this.deadzone=null}})},32743(t,e,i){var n=i(38058),s=i(83419),r=i(95540),o=i(37277),a=i(37303),h=i(97480),l=i(44594),u=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.roundPixels=t.sys.game.config.roundPixels,this.cameras=[],this.main,this.default,t.sys.events.once(l.BOOT,this.boot,this),t.sys.events.on(l.START,this.start,this)},boot:function(){var t=this.systems;t.settings.cameras?this.fromJSON(t.settings.cameras):this.add(),this.main=this.cameras[0],this.default=new n(0,0,t.scale.width,t.scale.height).setScene(this.scene),t.game.scale.on(h.RESIZE,this.onResize,this),this.systems.events.once(l.DESTROY,this.destroy,this)},start:function(){if(!this.main){var t=this.systems;t.settings.cameras?this.fromJSON(t.settings.cameras):this.add(),this.main=this.cameras[0]}var e=this.systems.events;e.on(l.UPDATE,this.update,this),e.once(l.SHUTDOWN,this.shutdown,this)},add:function(t,e,i,s,r,o){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.scale.width),void 0===s&&(s=this.scene.sys.scale.height),void 0===r&&(r=!1),void 0===o&&(o="");var a=new n(t,e,i,s);return a.setName(o),a.setScene(this.scene),a.setRoundPixels(this.roundPixels),a.id=this.getNextID(),this.cameras.push(a),r&&(this.main=a),a},addExisting:function(t,e){return(void 0===e&&(e=!1),-1===this.cameras.indexOf(t))?(t.id=this.getNextID(),t.setRoundPixels(this.roundPixels),this.cameras.push(t),e&&(this.main=t),t):null},getNextID:function(){for(var t=this.cameras,e=1,i=0;i<32;i++){for(var n=!1,s=0;s<t.length;s++){var r=t[s];if(r&&r.id===e){n=!0;continue}}if(!n)return e;e<<=1}return 0},getTotal:function(t){void 0===t&&(t=!1);for(var e=0,i=this.cameras,n=0;n<i.length;n++){var s=i[n];(!t||t&&s.visible)&&e++}return e},fromJSON:function(t){Array.isArray(t)||(t=[t]);for(var e=this.scene.sys.scale.width,i=this.scene.sys.scale.height,n=0;n<t.length;n++){var s=t[n],o=r(s,"x",0),a=r(s,"y",0),h=r(s,"width",e),l=r(s,"height",i),u=this.add(o,a,h,l);u.name=r(s,"name",""),u.zoom=r(s,"zoom",1),u.rotation=r(s,"rotation",0),u.scrollX=r(s,"scrollX",0),u.scrollY=r(s,"scrollY",0),u.roundPixels=r(s,"roundPixels",!1),u.visible=r(s,"visible",!0);var d=r(s,"backgroundColor",!1);d&&u.setBackgroundColor(d);var c=r(s,"bounds",null);if(c){var f=r(c,"x",0),p=r(c,"y",0),g=r(c,"width",e),m=r(c,"height",i);u.setBounds(f,p,g,m)}}return this},getCamera:function(t){for(var e=this.cameras,i=0;i<e.length;i++)if(e[i].name===t)return e[i];return null},getCamerasBelowPointer:function(t){for(var e=this.cameras,i=t.x,n=t.y,s=[],r=0;r<e.length;r++){var o=e[r];o.visible&&o.inputEnabled&&a(o,i,n)&&s.unshift(o)}return s},remove:function(t,e){void 0===e&&(e=!0),Array.isArray(t)||(t=[t]);for(var i=0,n=this.cameras,s=0;s<t.length;s++){var r=n.indexOf(t[s]);-1!==r&&(e?n[r].destroy():n[r].renderList=[],n.splice(r,1),i++)}return!this.main&&n[0]&&(this.main=n[0]),i},render:function(t,e){for(var i=this.scene,n=this.cameras,s=0;s<n.length;s++){var r=n[s];if(r.visible&&r.alpha>0){r.preRender();var o=this.getVisibleChildren(e.getChildren(),r);t.render(i,o,r)}}},getVisibleChildren:function(t,e){return t.filter(function(t){return t.willRender(e)})},resetAll:function(){for(var t=0;t<this.cameras.length;t++)this.cameras[t].destroy();return this.cameras=[],this.main=this.add(),this.main},update:function(t,e){for(var i=0;i<this.cameras.length;i++)this.cameras[i].update(t,e)}
1,onResize:function(t,e,i,n,s){for(var r=0;r<this.cameras.length;r++){var o=this.cameras[r];0===o._x&&0===o._y&&o._width===n&&o._height===s&&o.setSize(e.width,e.height)}},resize:function(t,e){for(var i=0;i<this.cameras.length;i++)this.cameras[i].setSize(t,e)},shutdown:function(){this.main=void 0;for(var t=0;t<this.cameras.length;t++)this.cameras[t].destroy();this.cameras=[];var e=this.systems.events;e.off(l.UPDATE,this.update,this),e.off(l.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.default.destroy(),this.systems.events.off(l.START,this.start,this),this.systems.events.off(l.DESTROY,this.destroy,this),this.systems.game.scale.off(h.RESIZE,this.onResize,this),this.scene=null,this.systems=null}});o.register("CameraManager",u,"cameras"),t.exports=u},5020(t,e,i){var n=i(45319),s=i(83419),r=i(19715);t.exports=new s({initialize:function(t){this.camera=t,this.isRunning=!1,this.isComplete=!1,this.direction=!0,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,n,s,o,a,h){if(void 0===t&&(t=!0),void 0===e&&(e=1e3),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===o&&(o=!1),void 0===a&&(a=null),void 0===h&&(h=this.camera.scene),!o&&this.isRunning)return this.camera;this.isRunning=!0,this.isComplete=!1,this.duration=e,this.direction=t,this.progress=0,this.red=i,this.green=n,this.blue=s,this.alpha=t?5e-324:1,this._elapsed=0,this._onUpdate=a,this._onUpdateScope=h;var l=t?r.FADE_OUT_START:r.FADE_IN_START;
1return this.camera.emit(l,this.camera,this,e,i,n,s),this.camera},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=n(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,this.effectComplete()))},postRenderCanvas:function(t){if(!this.isRunning&&!this.isComplete)return!1;var e=this.camera;return t.fillStyle="rgba("+this.red+","+this.green+","+this.blue+","+this.alpha+")",t.fillRect(e.x,e.y,e.width,e.height),!0},postRenderWebGL:function(){return this.isRunning||this.isComplete},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.isComplete=!0;var t=this.direction?r.FADE_OUT_COMPLETE:r.FADE_IN_COMPLETE;this.camera.emit(t,this.camera,this)},reset:function(){this.isRunning=!1,this.isComplete=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null}})},10662(t,e,i){var n=i(45319),s=i(83419),r=i(19715);t.exports=new s({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=1,this.progress=0,this._elapsed=0,this._alpha,this._onUpdate,this._onUpdateScope},start:function(t,e,i,n,s,o,a){return void 0===t&&(t=250),void 0===e&&(e=255),void 0===i&&(i=255),void 0===n&&(n=255),void 0===s&&(s=!1),void 0===o&&(o=null),void 0===a&&(a=this.camera.scene),!s&&this.isRunning||(this.isRunning=!0,this.duration=t,this.progress=0,this.red=e,this.green=i,this.blue=n,this._alpha=this.alpha,this._elapsed=0,this._onUpdate=o,this._onUpdateScope=a,this.camera.emit
vendor: 29,563 bytes, line 1
1(r.FLASH_START,this.camera,this,t,e,i,n)),this.camera},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=n(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(t){if(!this.isRunning)return!1;var e=this.camera;return t.fillStyle="rgba("+this.red+","+this.green+","+this.blue+","+this.alpha+")",t.fillRect(e.x,e.y,e.width,e.height),!0},postRenderWebGL:function(){return this.isRunning},effectComplete:function(){this.alpha=this._alpha,this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(r.FLASH_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null}})},20359(t,e,i){var n=i(45319),s=i(83419),r=i(62640),o=i(19715),a=i(26099);t.exports=new s({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.source=new a,this.current=new a,this.destination=new a,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,n,s,a,h){void 0===i&&(i=1e3),void 0===n&&(n=r.Linear),void 0===s&&(s=!1),void 0===a&&(a=null),void 0===h&&(h=this.camera.scene);var l=this.camera;return!s&&this.isRunning||(this.isRunning=!0,this.duration=i,this.progress=0,this.source.set(l.scrollX,l.scrollY),this.destination.set(t,e),l.getScroll(t,e,this.current),"string"==typeof n&&r.hasOwnProperty(n)?this.ease=r[n]:"function"==typeof n&&(this.ease=n),this._elapsed=0,this._onUpdate=a,this._onUpdateScope=h,this.camera.emit(o.PAN_START,this.camera,this,i,t,e)),l},update:function(t,e){if(this.isRunning){this._elapsed+=e;var i=n(this._elapsed/this.duration,0,1);this.progress=i;var s=this.camera;if(this._elapsed<this.duration){var r=this.ease(i);s.getScroll(this.destination.x,this.destination.y,this.current);var o=this.source.x+(this.current.x-this.source.x)*r,a=this.source.y+(this.current.y-this.source.y)*r;s.setScroll(o,a),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,s,i,o,a)}else s.centerOn(this.destination.x,this.destination.y),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,s,i,s.scrollX,s.scrollY),this.effectComplete()}},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(o.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}})},34208(t,e,i){var n=i(45319),s=i(83419),r=i(19715),o=i(62640),a=i(86554);t.exports=new s({initialize:function(t){this.camera=t,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(t,e,i,n,s,h,l){void 0===i&&(i=1e3),void 0===n&&(n=o.Linear),void 0===s&&(s=!1),void 0===h&&(h=null),void 0===l&&(l=this.camera.scene),void 0===e&&(e=!1);var u=this.camera;if(!s&&this.isRunning)return u;if(this.shortestPath=e,this.isRunning=!0,this.duration=i,this.progress=0,this.source=u.rotation,this.destination=t,"string"==typeof n&&o.hasOwnProperty(n)?this.ease=o[n]:"function"==typeof n&&(this.ease=n),this._elapsed=0,this._onUpdate=h,this._onUpdateScope=l,this.shortestPath){var d=a(this.destination-this.source);this.destination=this.source+d,this.clockwise=d>=0}else this.clockwise=this.destination>=this.source;return this.camera.emit(r.ROTATE_START,this.camera,this,i,this.destination),u},update:function(t,e){if(this.isRunning){this._elapsed+=e;var i=n(this._elapsed/this.duration,0,1);this.progress=i;var s=this.camera;if(this._elapsed<this.duration){var r=this.ease(i),o=this.source+r*(this.destination-this.source);s.rotation=o,this.current=o,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,s,i,o)}else s.rotation=this.destination,this.current=this.destination,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,s,i,this.destination),this.effectComplete()}},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(r.ROTATE_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null,this.source=null,this.destination=null}})},30330(t,e,i){var n=i(45319),s=i(83419),r=i(19715),o=i(26099);t.exports=new s({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.intensity=new o,this.progress=0,this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,n,s){return void 0===t&&(t=100),void 0===e&&(e=.05),void 0===i&&(i=!1),void 0===n&&(n=null),void 0===s&&(s=this.camera.scene),!i&&this.isRunning||(this.isRunning=!0,this.duration=t,this.progress=0,"number"==typeof e?this.intensity.set(e):this.intensity.set(e.x,e.y),this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate=n,this._onUpdateScope=s,this.camera.emit(r.SHAKE_START,this.camera,this,t,e)),this.camera},preRender:function(){this.isRunning&&this.camera.matrix.translate(this._offsetX,this._offsetY)},update:function(t,e){if(this.isRunning)if(this._elapsed+=e,this.progress=n(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed<this.duration){var i=this.intensity,s=this.camera.width,r=this.camera.height,o=this.camera.zoom;this._offsetX=(Math.random()*i.x*s*2-i.x*s)*o,this._offsetY=(Math.random()*i.y*r*2-i.y*r)*o,this.camera.roundPixels&&(this._offsetX=Math.round(this._offsetX),this._offsetY=Math.round(this._offsetY))}else this.effectComplete()},effectComplete:function(){this._offsetX=0,this._offsetY=0,this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(r.SHAKE_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._offsetX=0,this._offsetY=0,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null,this.intensity=null}})},45641(t,e,i){var n=i(45319),s=i(83419),r=i(62640),o=i(19715);t.exports=new s({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.source=1,this.destination=1,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,n,s,a){void 0===e&&(e=1e3),void 0===i&&(i=r.Linear),void 0===n&&(n=!1),void 0===s&&(s=null),void 0===a&&(a=this.camera.scene);var h=this.camera;return!n&&this.isRunning||(this.isRunning=!0,this.duration=e,this.progress=0,this.source=h.zoom,this.destination=t,"string"==typeof i&&r.hasOwnProperty(i)?this.ease=r[i]:"function"==typeof i&&(this.ease=i),this._elapsed=0,this._onUpdate=s,this._onUpdateScope=a,this.camera.emit(o.ZOOM_START,this.camera,this,e,t)),h},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=n(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(o.ZOOM_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null}})},20052(t,e,i){t.exports={Fade:i(5020),Flash:i(10662),Pan:i(20359),Shake:i(30330),RotateTo:i(34208),Zoom:i(45641)}},16438(t){t.exports="cameradestroy"},32726(t){t.exports="camerafadeincomplete"},87807(t){t.exports="camerafadeinstart"},45917(t){t.exports="camerafadeoutcomplete"},95666(t){t.exports="camerafadeoutstart"},47056(t){t.exports="cameraflashcomplete"},91261(t){t.exports="cameraflashstart"},45047(t){t.exports="followupdate"},81927(t){t.exports="camerapancomplete"},74264(t){t.exports="camerapanstart"},54419(t){t.exports="postrender"},79330(t){t.exports="prerender"},93183(t){t.exports="camerarotatecomplete"},80112(t){t.exports="camerarotatestart"},62252(t){t.exports="camerashakecomplete"},86017(t){t.exports="camerashakestart"},539(t){t.exports="camerazoomcomplete"},51892(t){t.exports="camerazoomstart"},19715(t,e,i){t.exports={DESTROY:i(16438),FADE_IN_COMPLETE:i(32726),FADE_IN_START:i(87807),FADE_OUT_COMPLETE:i(45917),FADE_OUT_START:i(95666),FLASH_COMPLETE:i(47056),FLASH_START:i(91261),FOLLOW_UPDATE:i(45047),PAN_COMPLETE:i(81927),PAN_START:i(74264),POST_RENDER:i(54419),PRE_RENDER:i(79330),ROTATE_COMPLETE:i(93183),ROTATE_START:i(80112),SHAKE_COMPLETE:i(62252),SHAKE_START:i(86017),ZOOM_COMPLETE:i(539),ZOOM_START:i(51892)}},87969(t,e,i){t.exports={Camera:i(38058),BaseCamera:i(71911),CameraManager:i(32743),Effects:i(20052),Events:i(19715)}},63091(t,e,i){var n=i(83419),s=i(35154);t.exports=new n({initialize:function(t){this.camera=s(t,"camera",null),this.left=s(t,"left",null),this.right=s(t,"right",null),this.up=s(t,"up",null),this.down=s(t,"down",null),this.zoomIn=s(t,"zoomIn",null),this.zoomOut=s(t,"zoomOut",null),this.zoomSpeed=s(t,"zoomSpeed",.01),this.minZoom=s(t,"minZoom",.001),this.maxZoom=s(t,"maxZoom",1e3),this.speedX=0,this.speedY=0;var e=s(t,"speed",null);"number"==typeof e?(this.speedX=e,this.speedY=e):(this.speedX=s(t,"speed.x",0),this.speedY=s(t,"speed.y",0)),this._zoom=0,this.active=null!==this.camera},start:function(){return this.active=null!==this.camera,this},stop:function(){return this.active=!1,this},setCamera:function(t){return this.camera=t,this},update:function(t){if(this.active){void 0===t&&(t=1);var e=this.camera;this.up&&this.up.isDown?e.scrollY-=this.speedY*t|0:this.down&&this.down.isDown&&(e.scrollY+=this.speedY*t|0),this.left&&this.left.isDown?e.scrollX-=this.speedX*t|0:this.right&&this.right.isDown&&(e.scrollX+=this.speedX*t|0),this.zoomIn&&this.zoomIn.isDown?(e.zoom-=this.zoomSpeed,e.zoom<this.minZoom&&(e.zoom=this.minZoom)):this.zoomOut&&this.zoomOut.isDown&&(e.zoom+=this.zoomSpeed,e.zoom>this.maxZoom&&(e.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}})},58818(t,e,i){var n=i(83419),s=i(35154);t.exports=new n({initialize:function(t){this.camera=s(t,"camera",null),this.left=s(t,"left",null),this.right=s(t,"right",null),this.up=s(t,"up",null),this.down=s(t,"down",null),this.zoomIn=s(t,"zoomIn",null),this.zoomOut=s(t,"zoomOut",null),this.zoomSpeed=s(t,"zoomSpeed",.01),this.minZoom=s(t,"minZoom",.001),this.maxZoom=s(t,"maxZoom",1e3),this.accelX=0,this.accelY=0;var e=s(t,"acceleration",null);"number"==typeof e?(this.accelX=e,this.accelY=e):(this.accelX=s(t,"acceleration.x",0),this.accelY=s(t,"acceleration.y",0)),this.dragX=0,this.dragY=0;var i=s(t,"drag",null);"number"==typeof i?(this.dragX=i,this.dragY=i):(this.dragX=s(t,"drag.x",0),this.dragY=s(t,"drag.y",0)),this.maxSpeedX=0,this.maxSpeedY=0;var n=s(t,"maxSpeed",null);"number"==typeof n?(this.maxSpeedX=n,this.maxSpeedY=n):(this.maxSpeedX=s(t,"maxSpeed.x",0),this.maxSpeedY=s(t,"maxSpeed.y",0)),this._speedX=0,this._speedY=0,this._zoom=0,this.active=null!==this.camera},start:function(){return this.active=null!==this.camera,this},stop:function(){return this.active=!1,this},setCamera:function(t){return this.camera=t,this},update:function(t){if(this.active){void 0===t&&(t=1);var e=this.camera;this._speedX>0?(this._speedX-=this.dragX*t,this._speedX<0&&(this._speedX=0)):this._speedX<0&&(this._speedX+=this.dragX*t,this._speedX>0&&(this._speedX=0)),this._speedY>0?(this._speedY-=this.dragY*t,this._speedY<0&&(this._speedY=0)):this._speedY<0&&(this._speedY+=this.dragY*t,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,0!==this._speedX&&(e.scrollX-=this._speedX*t|0),0!==this._speedY&&(e.scrollY-=this._speedY*t|0),0!==this._zoom&&(e.zoom+=this._zoom,e.zoom<this.minZoom?e.zoom=this.minZoom:e.zoom>this.maxZoom&&(e.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}})},38865(t,e,i){t.exports={FixedKeyControl:i(63091),SmoothedKeyControl:i(58818)}},26638(t,e,i){t.exports={Controls:i(38865),Scene2D:i(87969)}},8054(t,e,i){t.exports={VERSION:"4.0.0",LOG_VERSION:"v400",BlendModes:i(10312),ScaleModes:i(29795),AUTO:0,CANVAS:1,WEBGL:2,HEADLESS:3,FOREVER:-1,NONE:4,UP:5,DOWN:6,LEFT:7,RIGHT:8}},69547(t,e,i){var n=i(83419),s=i(8054),r=i(42363),o=i(82264),a=i(95540),h=i(35154),l=i(41212),u=i(29747),d=i(75508),c=i(80333);t.exports=new n({initialize:function(t){void 0===t&&(t={});var e=h(t,"scale",null);this.width=h(e,"width",1024,t),this.height=h(e,"height",768,t),this.zoom=h(e,"zoom",1,t),this.parent=h(e,"parent",void 0,t),this.scaleMode=h(e,e?"mode":"scaleMode",0,t),this.expandParent=h(e,"expandParent",!0,t),this.autoRound=h(e,"autoRound",!1,t),this.autoCenter=h(e,"autoCenter",0,t),this.resizeInterval=h(e,"resizeInterval",500,t),this.fullscreenTarget=h(e,"fullscreenTarget",null,t),this.minWidth=h(e,"min.width",0,t),this.maxWidth=h(e,"max.width",0,t),this.minHeight=h(e,"min.height",0,t),this.maxHeight=h(e,"max.height",0,t),this.snapWidth=h(e,"snap.width",0,t),this.snapHeight=h(e,"snap.height",0,t),this.renderType=h(t,"type",s.AUTO),this.canvas=h(t,"canvas",null),this.context=h(t,"context",null),this.canvasStyle=h(t,"canvasStyle",null),this.customEnvironment=h(t,"customEnvironment",!1),this.sceneConfig=h(t,"scene",null),this.seed=h(t,"seed",[(Date.now()*Math.random()).toString()]),d.RND=new d.RandomDataGenerator(this.seed),this.gameTitle=h(t,"title",""),this.gameURL=h(t,"url","https://phaser.io/"+s.LOG_VERSION),this.gameVersion=h(t,"version",""),this.autoFocus=h(t,"autoFocus",!0),this.stableSort=h(t,"stableSort",-1),-1===this.stableSort&&(this.stableSort=+!!o.browser.es2019),o.features.stableSort=this.stableSort,this.domCreateContainer=h(t,"dom.createContainer",!1),this.domPointerEvents=h(t,"dom.pointerEvents","none"),this.inputKeyboard=h(t,"input.keyboard",!0),this.inputKeyboardEventTarget=h(t,"input.keyboard.target",window),this.inputKeyboardCapture=h(t,"input.keyboard.capture",[]),this.inputMouse=h(t,"input.mouse",!0),this.inputMouseEventTarget=h(t,"input.mouse.target",null),this.inputMousePreventDefaultDown=h(t,"input.mouse.preventDefaultDown",!0),this.inputMousePreventDefaultUp=h(t,"input.mouse.preventDefaultUp",!0),this.inputMousePreventDefaultMove=h(t,"input.mouse.preventDefaultMove",!0),this.inputMousePreventDefaultWheel=h(t,"input.mouse.preventDefaultWheel",!0),this.inputTouch=h(t,"input.touch",o.input.touch),this.inputTouchEventTarget=h(t,"input.touch.target",null),this.inputTouchCapture=h(t,"input.touch.capture",!0),this.inputActivePointers=h(t,"input.activePointers",1),this.inputSmoothFactor=h(t,"input.smoothFactor",0),this.inputWindowEvents=h(t,"input.windowEvents",!0),this.inputGamepad=h(t,"input.gamepad",!1),this.inputGamepadEventTarget=h(t,"input.gamepad.target",window),this.disableContextMenu=h(t,"disableContextMenu",!1),this.audio=h(t,"audio",{}),this.hideBanner=!1===h(t,"banner",null),this.hidePhaser=h(t,"banner.hidePhaser",!1),this.bannerTextColor=h(t,"banner.text","#ffffff"),this.bannerBackgroundColor=h(t,"banner.background",["#000814","#001d3d","#003566"]),""===this.gameTitle&&this.hidePhaser&&(this.hideBanner=!0),this.fps=h(t,"fps",null);var i=h(t,"render",null);this.autoMobileTextures=h(i,"autoMobileTextures",!0,t),this.antialias=h(i,"antialias",!0,t),this.antialiasGL=h(i,"antialiasGL",!0,t),this.mipmapFilter=h(i,"mipmapFilter","",t),this.desynchronized=h(i,"desynchronized",!1,t),this.roundPixels=h(i,"roundPixels",!1,t),this.selfShadow=h(i,"selfShadow",!1,t),this.pathDetailThreshold=h(i,"pathDetailThreshold",1,t),this.pixelArt=h(i,"pixelArt",!1,t),this.pixelArt&&(this.antialias=!1,this.antialiasGL=!1,this.roundPixels=!0),this.smoothPixelArt=h(i,"smoothPixelArt",!1,t),this.smoothPixelArt&&(this.antialias=!0,this.antialiasGL=!0,this.pixelArt=!1),this.transparent=h(i,"transparent",!1,t),this.clearBeforeRender=h(i,"clearBeforeRender",!0,t),this.preserveDrawingBuffer=h(i,"preserveDrawingBuffer",!1,t),this.premultipliedAlpha=h(i,"premultipliedAlpha",!0,t),this.skipUnreadyShaders=h(i,"skipUnreadyShaders",!1,t),this.failIfMajorPerformanceCaveat=h(i,"failIfMajorPerformanceCaveat",!1,t),this.powerPreference=h(i,"powerPreference","default",t),this.batchSize=h(i,"batchSize",16384,t),this.maxTextures=h(i,"maxTextures",-1,t),this.maxLights=h(i,"maxLights",10,t),this.renderNodes=h(i,"renderNodes",{},t);var n=h(t,"backgroundColor",0);this.backgroundColor=c(n),this.transparent&&(this.backgroundColor=c(0),this.backgroundColor.alpha=0),this.preBoot=h(t,"callbacks.preBoot",u),this.postBoot=h(t,"callbacks.postBoot",u),this.physics=h(t,"physics",{}),this.defaultPhysicsSystem=h(this.physics,"default",!1),this.loaderBaseURL=h(t,"loader.baseURL",""),this.loaderPath=h(t,"loader.path",""),this.loaderMaxParallelDownloads=h(t,"loader.maxParallelDownloads",o.os.android?6:32),this.loaderCrossOrigin=h(t,"loader.crossOrigin",void 0),this.loaderResponseType=h(t,"loader.responseType",""),this.loaderAsync=h(t,"loader.async",!0),this.loaderUser=h(t,"loader.user",""),this.loaderPassword=h(t,"loader.password",""),this.loaderTimeout=h(t,"loader.timeout",0),this.loaderMaxRetries=h(t,"loader.maxRetries",2),this.loaderWithCredentials=h(t,"loader.withCredentials",!1),this.loaderImageLoadType=h(t,"loader.imageLoadType","XHR"),this.loaderLocalScheme=h(t,"loader.localScheme",["file://","capacitor://"]),this.glowQuality=h(t,"filters.glow.quality",10),this.glowDistance=h(t,"filters.glow.distance",10),this.installGlobalPlugins=[],this.installScenePlugins=[];var f=h(t,"plugins",null),p=r.DefaultScene;f&&(Array.isArray(f)?this.defaultPlugins=f:l(f)&&(this.installGlobalPlugins=a(f,"global",[]),this.installScenePlugins=a(f,"scene",[]),Array.isArray(f.default)?p=f.default:Array.isArray(f.defaultMerge)&&(p=p.concat(f.defaultMerge)))),this.defaultPlugins=p;var g="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=h(t,"images.default",g+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=h(t,"images.missing",g+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="),this.whiteImage=h(t,"images.white","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABdJREFUeNpi/P//PwMMMDEgAdwcgAADAJZuAwXJYZOzAAAAAElFTkSuQmCC"),window&&(window.FORCE_WEBGL?this.renderType=s.WEBGL:window.FORCE_CANVAS&&(this.renderType=s.CANVAS))}})},86054(t,e,i){var n=i(20623),s=i(27919),r=i(8054),o=i(89357);t.exports=function(t){var e,a,h=t.config;if((h.customEnvironment||h.canvas)&&h.renderType===r.AUTO)throw Error("Must set explicit renderType in custom environment");if(!h.customEnvironment&&!h.canvas&&h.renderType!==r.HEADLESS)if(h.renderType===r.AUTO&&(h.renderType=o.webGL?r.WEBGL:r.CANVAS),h.renderType===r.WEBGL){if(!o.webGL)throw Error("Cannot create WebGL context, aborting.")}else if(h.renderType===r.CANVAS){if(!o.canvas)throw Error("Cannot create Canvas context, aborting.")}else throw Error("Unknown value for renderer type: "+h.renderType);h.antialias||s.disableSmoothing();var l=t.scale.baseSize,u=l.width,d=l.height;h.canvas?(t.canvas=h.canvas,t.canvas.width=u,t.canvas.height=d):t.canvas=s.create(t,u,d,h.renderType),h.canvasStyle&&(t.canvas.style=h.canvasStyle),h.antialias||n.setCrisp(t.canvas),h.renderType!==r.HEADLESS&&(e=i(68627),a=i(74797),h.renderType===r.WEBGL?t.renderer=new a(t):(t.renderer=new e(t),t.context=t.renderer.gameContext))}},96391(t,e,i){var n=i(8054);t.exports=function(t){var e,i=t.config;if(!i.hideBanner){var s="WebGL";i.renderType===n.CANVAS?s="Canvas":i.renderType===n.HEADLESS&&(s="Headless");var r=i.audio,o=t.device.audio;if(e=o.webAudio&&!r.disableWebAudio?"Web Audio":!r.noAudio&&(o.webAudio||o.audioData)?"HTML5 Audio":"No Audio",t.device.browser.ie)window.console&&console.log("Phaser v"+n.VERSION+" / https://phaser.io");else{var a="color: "+i.bannerTextColor+";",h=Array.isArray(i.bannerBackgroundColor)?i.bannerBackgroundColor:[i.bannerBackgroundColor];1===h.length&&(h=[h[0],h[0]]);var l="%c",u=[null,a+=' background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAOCAYAAAAmL5yKAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAARBJREFUeNpi/P//P0OHsPB/BiCoePuWkYFEwALSXJElzMBgLwE2CNkQxgWr/yMr/p8QimlBu5DQ//+8vBBco/ofzAe6imH+qv/53/6jYJAYSA4ZoxoANYTPKhiuCQZwGcJU+e4dqpMmvsDq14krV2MPAxDha2CMKvoXoiE/PBQUDgQD8j82UFae9B9bOIC8B9UD9gIjjIMN7Ns6lWHn4XMoYu62RgxO3tkMjIyMII2MYAOAtmFVhA+ADHf2ycGMRhANjUq8YO+WKWCvgAORIV8CkpDCrzIwsLIymC1qAtuAD4Bsh3sBmqAY3qcGwL2AC4DCpKtzHlgzOLWihwEuzTCN0GhDJHeYC4gByBphACDAAH2dDIxdjr+VAAAAAElFTkSuQmCC"), linear-gradient(to bottom, '+h.join(", ")+"); background-repeat: no-repeat; background-position: 4px center, 0 0; padding: 2px 6px 2px 24px;"];u.push("background: transparent"),i.gameTitle&&(l=l.concat(i.gameTitle),i.gameVersion&&(l=l.concat(" v"+i.gameVersion)),i.hidePhaser||(l=l.concat(" / "))),i.hidePhaser||(l=l.concat("Phaser v"+n.VERSION+" ("+s+" | "+e+")")),l=l.concat("%c "+i.gameURL),u[0]=l,console.log.apply(console,u)}}}},50127(t,e,i){var n=i(40366),s=i(60848),r=i(24047),o=i(27919),a=i(83419),h=i(69547),l=i(83719),u=i(86054),d=i(45893),c=i(96391),f=i(82264),p=i(57264),g=i(50792),m=i(8443),v=i(7003),x=i(37277),y=i(77332),T=i(76531),w=i(60903),b=i(69442),S=i(17130),C=i(65898),E=i(51085),A=i(14747);t.exports=new a({initialize:function(t){this.config=new h(t),this.renderer=null,this.domContainer=null,this.canvas=null,this.context=null,this.isBooted=!1,this.isRunning=!1,this.events=new g,this.anims=new s(this),this.textures=new S(this),this.cache=new r(this),this.registry=new d(this,new g),this.input=new v(this,this.config),this.scene=new w(this,this.config.sceneConfig),this.device=f,this.scale=new T(this,this.config),this.sound=null,this.sound=A.create(this),this.loop=new C(this,this.config.fps),this.plugins=new y(this,this.config),this.pendingDestroy=!1,this.removeCanvas=!1,this.noReturn=!1,this.hasFocus=!1,this.isPaused=!1,p(this.boot.bind(this))},boot:function(){x.hasCore("EventEmitter")?(this.isBooted=!0,this.config.preBoot(this),this.scale.preBoot(),u(this),l(this),c(this),n(this.canvas,this.config.parent),this.textures.once(b.READY,this.texturesReady,this),this.events.emit(m.BOOT)):console.warn("Aborting. Core Plugins missing.")},texturesReady:function(){this.events.emit(m.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)),E(this);var t=this.events;t.on(m.HIDDEN,this.onHidden,this),t.on(m.VISIBLE,this.onVisible,this),t.on(m.BLUR,this.onBlur,this),t.on(m.FOCUS,this.onFocus,this)},step:function(t,e){if(this.pendingDestroy)return this.runDestroy();if(!this.isPaused){var i=this.events;i.emit(m.PRE_STEP,t,e),i.emit(m.STEP,t,e),this.scene.update(t,e),i.emit(m.POST_STEP,t,e);var n=this.renderer;n.preRender(),i.emit(m.PRE_RENDER,n,t,e),this.scene.render(n),n.postRender(),i.emit(m.POST_RENDER,n,t,e)}},headlessStep:function(t,e){if(this.pendingDestroy)return this.runDestroy();if(!this.isPaused){var i=this.events;i.emit(m.PRE_STEP,t,e),i.emit(m.STEP,t,e),this.scene.update(t,e),i.emit(m.POST_STEP,t,e),this.scene.isProcessing=!1,i.emit(m.PRE_RENDER,null,t,e),i.emit(m.POST_RENDER,null,t,e)}},onHidden:function(){this.loop.pause(),this.events.emit(m.PAUSE)},pause:function(){var t=this.isPaused;this.isPaused=!0,t||this.events.emit(m.PAUSE)},onVisible:function(){this.loop.resume(),this.events.emit(m.RESUME,this.loop.pauseDuration)},resume:function(){var t=this.isPaused;this.isPaused=!1,t&&this.events.emit(m.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(t,e){void 0===e&&(e=!1),this.pendingDestroy=!0,this.removeCanvas=t,this.noReturn=e},runDestroy:function(){this.scene.destroy(),this.events.emit(m.DESTROY),this.events.removeAllListeners(),this.renderer&&this.renderer.destroy(),this.removeCanvas&&this.canvas&&(o.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}})},65898(t,e,i){var n=i(83419),s=i(35154),r=i(29747),o=i(43092);t.exports=new n({initialize:function(t,e){this.game=t,this.raf=new o,this.started=!1,this.running=!1,this.minFps=s(e,"min",5),this.targetFps=s(e,"target",60),this.fpsLimit=s(e,"limit",0),this.hasFpsLimit=this.fpsLimit>0,this._limitRate=this.hasFpsLimit?1e3/this.fpsLimit:0,this._min=1e3/this.minFps,this._target=1e3/this.targetFps,this.actualFps=this.targetFps,this.nextFpsUpdate=0,this.framesThisSecond=0,this.callback=r,this.forceSetTimeOut=s(e,"forceSetTimeOut",!1),this.time=0,this.startTime=0,this.lastTime=0,this.frame=0,this.inFocus=!0,this.pauseDuration=0,this._pauseTime=0,this._coolDown=0,this.delta=0,this.deltaIndex=0,this.deltaHistory=[],this.deltaSmoothingMax=s(e,"deltaHistory",10),this.panicMax=s(e,"panicMax",120),this.rawDelta=0,this.now=0,this.smoothStep=s(e,"smoothStep",!0)},blur:function(){this.inFocus=!1},focus:function(){this.inFocus=!0,this.resetDelta()},pause:function(){this._pauseTime=window.performance.now()},resume:function(){this.resetDelta(),this.pauseDuration=this.time-this._pauseTime,this.startTime+=this.pauseDuration},resetDelta:function(){var t=window.performance.now();this.time=t,this.lastTime=t,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0;for(var e=0;e<this.deltaSmoothingMax;e++)this.deltaHistory[e]=Math.min(this._target,this.deltaHistory[e]);this.delta=0,this.deltaIndex=0,this._coolDown=this.panicMax},start:function(t){if(this.started)return this;this.started=!0,this.running=!0;for(var e=0;e<this.deltaSmoothingMax;e++)this.deltaHistory[e]=this._target;this.resetDelta(),this.startTime=window.performance.now(),this.callback=t;var i=this.hasFpsLimit?this.stepLimitFPS.bind(this):this.step.bind(this);this.raf.start(i,this.forceSetTimeOut,this._target)},smoothDelta:function(t){var e=this.deltaIndex,i=this.deltaHistory,n=this.deltaSmoothingMax;(this._coolDown>0||!this.inFocus)&&(this._coolDown--,t=Math.min(t,this._target)),t>this._min&&(t=Math.min(t=i[e],this._min)),i[e]=t,this.deltaIndex++,this.deltaIndex>=n&&(this.deltaIndex=0);for(var s=0,r=0;r<n;r++)s+=i[r];return s/n},updateFPS:function(t){this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0},stepLimitFPS:function(t){this.now=t;var e=Math.max(0,t-this.lastTime);this.rawDelta=e,this.time+=this.rawDelta,this.smoothStep&&(e=this.smoothDelta(e)),this.delta+=e,t>=this.nextFpsUpdate&&this.updateFPS(t),this.framesThisSecond++,this.delta>=this._limitRate&&(this.callback(t,this.delta),this.delta%=this._limitRate),this.lastTime=t,this.frame++},step:function(t){this.now=t;var e=Math.max(0,t-this.lastTime);this.rawDelta=e,this.time+=this.rawDelta,this.smoothStep&&(e=this.smoothDelta(e)),this.delta=e,t>=this.nextFpsUpdate&&this.updateFPS(t),this.framesThisSecond++,this.callback(t,e),this.lastTime=t,this.frame++},tick:function(){var t=window.performance.now();this.hasFpsLimit?this.stepLimitFPS(t):this.step(t)},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(t){void 0===t&&(t=!1);var e=window.performance.now();if(!this.running){t&&(this.startTime+=-this.lastTime+(this.lastTime+e));var i=this.hasFpsLimit?this.stepLimitFPS.bind(this):this.step.bind(this);this.raf.start(i,this.forceSetTimeOut,this._target),this.running=!0,this.nextFpsUpdate=e+1e3,this.framesThisSecond=0,this.fpsLimitTriggered=!1,this.tick()}},getDuration:function(){return Math.round(this.lastTime-this.startTime)/1e3},getDurationMS:function(){return Math.round(this.lastTime-this.startTime)},stop:function(){return this.running=!1,this.started=!1,this.raf.stop(),this},destroy:function(){this.stop(),this.raf.destroy(),this.raf=null,this.game=null,this.callback=null}})},51085(t,e,i){var n=i(8443);t.exports=function(t){var e,i=t.events;void 0!==document.hidden?e="visibilitychange":["webkit","moz","ms"].forEach(function(t){void 0!==document[t+"Hidden"]&&(document.hidden=function(){return document[t+"Hidden"]},e=t+"visibilitychange")}),e&&document.addEventListener(e,function(t){document.hidden||"pause"===t.type?i.emit(n.HIDDEN):i.emit(n.VISIBLE)}
1,!1),window.onblur=function(){i.emit(n.BLUR)},window.onfocus=function(){i.emit(n.FOCUS)},window.focus&&t.config.autoFocus&&window.focus()}},97217(t){t.exports="blur"},47548(t){t.exports="boot"},19814(t){t.exports="contextlost"},68446(t){t.exports="destroy"},41700(t){t.exports="focus"},25432(t){t.exports="hidden"},65942(t){t.exports="pause"},59211(t){t.exports="postrender"},47789(t){t.exports="poststep"},39066(t){t.exports="prerender"},460(t){t.exports="prestep"},16175(t){t.exports="ready"},42331(t){t.exports="resume"},11966(t){t.exports="step"},32969(t){t.exports="systemready"},94830(t){t.exports="visible"},8443(t,e,i){t.exports={BLUR:i(97217),BOOT:i(47548),CONTEXT_LOST:i(19814),DESTROY:i(68446),FOCUS:i(41700),HIDDEN:i(25432),PAUSE:i(65942),POST_RENDER:i(59211),POST_STEP:i(47789),PRE_RENDER:i(39066),PRE_STEP:i(460),READY:i(16175),RESUME:i(42331),STEP:i(11966),SYSTEM_READY:i(32969),VISIBLE:i(94830)}},42857(t,e,i){t.exports={Config:i(69547),CreateRenderer:i(86054),DebugHeader:i(96391),Events:i(8443),TimeStep:i(65898),VisibilityHandler:i(51085)}},46728(t,e,i){var n=i(83419),s=i(36316),r=i(80021),o=i(26099),a=new n({Extends:r,initialize:function(t,e,i,n){r.call(this,"CubicBezierCurve"),Array.isArray(t)&&(n=new o(t[6],t[7]),i=new o(t[4],t[5]),e=new o(t[2],t[3]),t=new o(t[0],t[1])),this.p0=t,this.p1=e,this.p2=i,this.p3=n},getStartPoint:function(t){return void 0===t&&(t=new o),t.copy(this.p0)},getResolution:function(t){return t},getPoint:function(t,e){void 0===e&&(e=new o);var i=this.p0,n=this.p1,r=this.p2,a=this.p3;return e.set(s(t,i.x,n.x,r.x,a.x),s(t,i.y,n.y,r.y,a.y))},draw:function(t,e){void 0===e&&(e=32);var i=this.getPoints(e);t.beginPath(),t.moveTo(this.p0.x,this.p0.y);for(var n=1;n<i.length;n++)t.lineTo(i[n].x,i[n].y);return t.strokePath(),t},toJSON:function(){return{type:this.type,points:[this.p0.x,this.p0.y,this.p1.x,this.p1.y,this.p2.x,this.p2.y,this.p3.x,this.p3.y]}}});a.fromJSON=function(t){var e=t.points;return new a(new o(e[0],e[1]),new o(e[2],e[3]),new o(e[4],e[5]),new o(e[6],e[7]))},t.exports=a},80021(t,e,i){var n=i(83419),s=i(19217),r=i(87841),o=i(26099);t.exports=new n({initialize:function(t){this.type=t,this.defaultDivisions=5,this.arcLengthDivisions=100,this.cacheArcLengths=[],this.needsUpdate=!0,this.active=!0,this._tmpVec2A=new o,this._tmpVec2B=new o},draw:function(t,e){return void 0===e&&(e=32),t.strokePoints(this.getPoints(e))},getBounds:function(t,e){t||(t=new r),void 0===e&&(e=16);var i=this.getLength();e>i&&(e=i/2);var n=Math.max(1,Math.round(i/e));return s(this.getSpacedPoints(n),t)},getDistancePoints:function(t){var e=Math.max(1,this.getLength()/t);return this.getSpacedPoints(e)},getEndPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(1,t)},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(void 0===t&&(t=this.arcLengthDivisions),this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e,i=[],n=this.getPoint(0,this._tmpVec2A),s=0;i.push(0);for(var r=1;r<=t;r++)i.push(s+=(e=this.getPoint(r/t,this._tmpVec2B)).distance(n)),n.copy(e);return this.cacheArcLengths=i,i},getPointAt:function(t,e){var i=this.getUtoTmapping(t);return this.getPoint(i,e)},getPoints:function(t,e,i){void 0===i&&(i=[]),t||(t=e?this.getLength()/e:this.defaultDivisions);for(var n=0;n<=t;n++)i.push(this.getPoint(n/t));return i},getRandomPoint:function(t){return void 0===t&&(t=new o),this.getPoint(Math.random(),t)},getSpacedPoints:function(t,e,i){void 0===i&&(i=[]),t||(t=e?this.getLength()/e:this.defaultDivisions);for(var n=0;n<=t;n++){var s=this.getUtoTmapping(n/t,null,t);i.push(this.getPoint(s))}return i},getStartPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(0,t)},getTangent:function(t,e){void 0===e&&(e=new o);var i=t-1e-4,n=t+1e-4;return i<0&&(i=0),n>1&&(n=1),this.getPoint(i,this._tmpVec2A),this.getPoint(n,e),e.subtract(this._tmpVec2A).normalize()},getTangentAt:function(t,e){var i=this.getUtoTmapping(t);return this.getTangent(i,e)},getTFromDistance:function(t,e){return t<=0?0:this.getUtoTmapping(0,t,e)}
1,getUtoTmapping:function(t,e,i){var n,s,r=this.getLengths(i),o=0,a=r.length;n=e?Math.min(e,r[a-1]):t*r[a-1];for(var h=0,l=a-1;h<=l;)if((s=r[o=Math.floor(h+(l-h)/2)]-n)<0)h=o+1;else if(s>0)l=o-1;else{l=o;break}if(r[o=l]===n)return o/(a-1);var u=r[o],d=r[o+1];return(o+(n-u)/(d-u))/(a-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}})},73825(t,e,i){var n=i(83419),s=i(80021),r=i(39506),o=i(35154),a=i(43396),h=i(26099),l=new n({Extends:s,initialize:function(t,e,i,n,a,l,u,d){if("object"==typeof t){var c=t;t=o(c,"x",0),e=o(c,"y",0),i=o(c,"xRadius",0),n=o(c,"yRadius",i),a=o(c,"startAngle",0),l=o(c,"endAngle",360),u=o(c,"clockwise",!1),d=o(c,"rotation",0)}else void 0===n&&(n=i),void 0===a&&(a=0),void 0===l&&(l=360),void 0===u&&(u=!1),void 0===d&&(d=0);s.call(this,"EllipseCurve"),this.p0=new h(t,e),this._xRadius=i,this._yRadius=n,this._startAngle=r(a),this._endAngle=r(l),this._clockwise=u,this._rotation=r(d)},getStartPoint:function(t){return void 0===t&&(t=new h),this.getPoint(0,t)},getResolution:function(t){return 2*t},getPoint:function(t,e){void 0===e&&(e=new h);for(var i=2*Math.PI,n=this._endAngle-this._startAngle,s=Math.abs(n)<Number.EPSILON;n<0;)n+=i;for(;n>i;)n-=i;n<Number.EPSILON&&(n=s?0:i),this._clockwise&&!s&&(n===i?n=-i:n-=i);var r=this._startAngle+t*n,o=this.p0.x+this._xRadius*Math.cos(r),a=this.p0.y+this._yRadius*Math.sin(r);if(0!==this._rotation){var l=Math.cos(this._rotation),u=Math.sin(this._rotation),d=o-this.p0.x,c=a-this.p0.y;o=d*l-c*u+this.p0.x,a=d*u+c*l+this.p0.y}return e.set(o,a)},setXRadius:function(t){return this.xRadius=t,this},setYRadius:function(t){return this.yRadius=t,this},setWidth:function(t){return this.xRadius=t/2,this},setHeight:function(t){return this.yRadius=t/2,this},setStartAngle:function(t){return this.startAngle=t,this},setEndAngle:function(t){return this.endAngle=t,this},setClockwise:function(t){return this.clockwise=t,this},setRotation:function(t){return this.rotation=t,this},x:{get:function(){return this.p0.x},set:function(t){this.p0.x=t}},y:{get:function(){return this.p0.y},set:function(t){this.p0.y=t}},xRadius:{get:function(){return this._xRadius},set:function(t){this._xRadius=t}},yRadius:{get:function(){return this._yRadius},set:function(t){this._yRadius=t}},startAngle:{get:function(){return a(this._startAngle)},set:function(t){this._startAngle=r(t)}},endAngle:{get:function(){return a(this._endAngle)},set:function(t){this._endAngle=r(t)}},clockwise:{get:function(){return this._clockwise},set:function(t){this._clockwise=t}},angle:{get:function(){return a(this._rotation)},set:function(t){this._rotation=r(t)}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=t}},toJSON:function(){return{type:this.type,x:this.p0.x,y:this.p0.y,xRadius:this._xRadius,yRadius:this._yRadius,startAngle:a(this._startAngle),endAngle:a(this._endAngle),clockwise:this._clockwise,rotation:a(this._rotation)}}});l.fromJSON=function(t){return new l(t)},t.exports=l},33951(t,e,i){var n=i(83419),s=i(80021),r=i(19217),o=i(87841),a=i(26099),h=new n({Extends:s,initialize:function(t,e){s.call(this,"LineCurve"),Array.isArray(t)&&(e=new a(t[2],t[3]),t=new a(t[0],t[1])),this.p0=t,this.p1=e,this.arcLengthDivisions=1},getBounds:function(t){return void 0===t&&(t=new o),r([this.p0,this.p1],t)},getStartPoint:function(t){return void 0===t&&(t=new a),t.copy(this.p0)},getResolution:function(t){return void 0===t&&(t=1),t},getPoint:function(t,e){return(void 0===e&&(e=new a),1===t)?e.copy(this.p1):(e.copy(this.p1).subtract(this.p0).scale(t).add(this.p0),e)},getPointAt:function(t,e){return this.getPoint(t,e)},getTangent:function(t,e){return void 0===e&&(e=new a),e.copy(this.p1).subtract(this.p0).normalize(),e},getUtoTmapping:function(t,e,i){var n;if(e){var s=this.getLengths(i),r=s[s.length-1];n=Math.min(e,r)/r}else n=t;return n},draw:function(t){return t.lineBetween(this.p0.x,this.p0.y,this.p1.x,this.p1.y),t},toJSON:function(){return{type:this.type,points:[this.p0.x,this.p0.y,this.p1.x,this.p1.y]}}});h.fromJSON=function(t){var e=t.points;return new h(new a(e[0],e[1]),new a(e[2],e[3]))},t.exports=h},14744(t,e,i){var n=i(83419),s=i(80021),r=i(32112),o=i(26099),a=new n({Extends:s,initialize:function(t,e,
vendor: 9,631 bytes, line 1
1i){s.call(this,"QuadraticBezierCurve"),Array.isArray(t)&&(i=new o(t[4],t[5]),e=new o(t[2],t[3]),t=new o(t[0],t[1])),this.p0=t,this.p1=e,this.p2=i},getStartPoint:function(t){return void 0===t&&(t=new o),t.copy(this.p0)},getResolution:function(t){return t},getPoint:function(t,e){void 0===e&&(e=new o);var i=this.p0,n=this.p1,s=this.p2;return e.set(r(t,i.x,n.x,s.x),r(t,i.y,n.y,s.y))},draw:function(t,e){void 0===e&&(e=32);var i=this.getPoints(e);t.beginPath(),t.moveTo(this.p0.x,this.p0.y);for(var n=1;n<i.length;n++)t.lineTo(i[n].x,i[n].y);return t.strokePath(),t},toJSON:function(){return{type:this.type,points:[this.p0.x,this.p0.y,this.p1.x,this.p1.y,this.p2.x,this.p2.y]}}});a.fromJSON=function(t){var e=t.points;return new a(new o(e[0],e[1]),new o(e[2],e[3]),new o(e[4],e[5]))},t.exports=a},42534(t,e,i){var n=i(87842),s=i(83419),r=i(80021),o=i(26099),a=new s({Extends:r,initialize:function(t){void 0===t&&(t=[]),r.call(this,"SplineCurve"),this.points=[],this.addPoints(t)},addPoints:function(t){for(var e=0;e<t.length;e++){var i=new o;"number"==typeof t[e]?(i.x=t[e],i.y=t[e+1],e++):Array.isArray(t[e])?(i.x=t[e][0],i.y=t[e][1]):(i.x=t[e].x,i.y=t[e].y),this.points.push(i)}return this},addPoint:function(t,e){var i=new o(t,e);return this.points.push(i),i},getStartPoint:function(t){return void 0===t&&(t=new o),t.copy(this.points[0])},getResolution:function(t){return t*this.points.length},getPoint:function(t,e){void 0===e&&(e=new o);var i=this.points,s=(i.length-1)*t,r=Math.floor(s),a=s-r,h=i[0===r?r:r-1],l=i[r],u=i[r>i.length-2?i.length-1:r+1],d=i[r>i.length-3?i.length-1:r+2];return e.set(n(a,h.x,l.x,u.x,d.x),n(a,h.y,l.y,u.y,d.y))},toJSON:function(){for(var t=[],e=0;e<this.points.length;e++)t.push(this.points[e].x),t.push(this.points[e].y);return{type:this.type,points:t}}});a.fromJSON=function(t){return new a(t.points)},t.exports=a},25410(t,e,i){t.exports={Path:i(46669),MoveTo:i(68618),CubicBezier:i(46728),Curve:i(80021),Ellipse:i(73825),Line:i(33951),QuadraticBezier:i(14744),Spline:i(42534)}},68618(t,e,i){var n=i(83419),s=i(26099);t.exports=new n({initialize:function(t,e){this.active=!1,this.p0=new s(t,e)},getPoint:function(t,e){return void 0===e&&(e=new s),e.copy(this.p0)},getPointAt:function(t,e){return this.getPoint(t,e)},getResolution:function(){return 1},getLength:function(){return 0},toJSON:function(){return{type:"MoveTo",points:[this.p0.x,this.p0.y]}}})},46669(t,e,i){var n=i(83419),s=i(46728),r=i(73825),o=i(39429),a=i(33951),h=i(68618),l=i(14744),u=i(87841),d=i(42534),c=i(26099),f=i(36383),p=new n({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.name="",this.defaultDivisions=12,this.curves=[],this.cacheLengths=[],this.autoClose=!1,this.startPoint=new c,this._tmpVec2A=new c,this._tmpVec2B=new c,"object"==typeof t?this.fromJSON(t):this.startPoint.set(t,e)},add:function(t){return this.curves.push(t),this},circleTo:function(t,e,i){return void 0===e&&(e=!1),this.ellipseTo(t,t,0,360,e,i)},closePath:function(){var t=this.curves[0].getPoint(0),e=this.curves[this.curves.length-1].getPoint(1);return t.equals(e)||this.curves.push(new a(e,t)),this},cubicBezierTo:function(t,e,i,n,r,o){var a,h,l,u=this.getEndPoint();return t instanceof c?(a=t,h=e,l=i):(a=new c(i,n),h=new c(r,o),l=new c(t,e)),this.add(new s(u,a,h,l))},quadraticBezierTo:function(t,e,i,n){var s,r,o=this.getEndPoint();return t instanceof c?(s=t,r=e):(s=new c(i,n),r=new c(t,e)),this.add(new l(o,s,r))},draw:function(t,e){for(var i=0;i<this.curves.length;i++){var n=this.curves[i];n.active&&n.draw(t,e)}return t},ellipseTo:function(t,e,i,n,s,o){var a=new r(0,0,t,e,i,n,s,o),h=this.getEndPoint(this._tmpVec2A),l=a.getStartPoint(this._tmpVec2B);return h.subtract(l),a.x=h.x,a.y=h.y,this.add(a)},fromJSON:function(t){this.curves=[],this.cacheLengths=[],this.startPoint.set(t.x,t.y),this.autoClose=t.autoClose;for(var e=0;e<t.curves.length;e++){var i=t.curves[e];switch(i.type){case"LineCurve":this.add(a.fromJSON(i));break;case"EllipseCurve":this.add(r.fromJSON(i));break;case"SplineCurve":this.add(d.fromJSON(i));break;case"CubicBezierCurve":this.add(s.fromJSON(i));break;case"QuadraticBezierCurve":this.add(l.fromJSON(i))}}return this},getBounds:function(t,e){void 0===t&&(t=new u),void 0===e&&(e=16),t.x=Number.MAX_VALUE,t.y=Number.MAX_VALUE;for(var i=new u,n=f.MIN_SAFE_INTEGER,s=f.MIN_SAFE_INTEGER,r=0;r<this.curves.length;r++){var o=this.curves[r];o.active&&(o.getBounds(i,e),t.x=Math.min(t.x,i.x),t.y=Math.min(t.y,i.y),n=Math.max(n,i.right),s=Math.max(s,i.bottom))}return t.right=n,t.bottom=s,t},getCurveLengths:function(){if(this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var t=[],e=0,i=0;i<this.curves.length;i++)t.push(e+=this.curves[i].getLength());return this.cacheLengths=t,t},getCurveAt:function(t){for(var e=t*this.getLength(),i=this.getCurveLengths(),n=0;n<i.length;){if(i[n]>=e)return this.curves[n];n++}return null},getEndPoint:function(t){return void 0===t&&(t=new c),this.curves.length>0?this.curves[this.curves.length-1].getPoint(1,t):t.copy(this.startPoint),t},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},getPoint:function(t,e){void 0===e&&(e=new c);for(var i=t*this.getLength(),n=this.getCurveLengths(),s=0;s<n.length;){if(n[s]>=i){var r=n[s]-i,o=this.curves[s],a=o.getLength(),h=0===a?0:1-r/a;return o.getPointAt(h,e)}s++}return null},getPoints:function(t,e){t||e||(t=this.defaultDivisions);for(var i,n=[],s=0;s<this.curves.length;s++){var r=this.curves[s];if(r.active)for(var o=r.getResolution(t),a=r.getPoints(o,e),h=0;h<a.length;h++){var l=a[h];i&&i.equals(l)||(n.push(l),i=l)}}return this.autoClose&&n.length>1&&!n[n.length-1].equals(n[0])&&n.push(n[0]),n},getRandomPoint:function(t){return void 0===t&&(t=new c),this.getPoint(Math.random(),t)},getSpacedPoints:function(t){void 0===t&&(t=40);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return this.autoClose&&e.push(e[0]),e},getStartPoint:function(t){return void 0===t&&(t=new c),t.copy(this.startPoint)},getTangent:function(t,e){void 0===e&&(e=new c);for(var i=t*this.getLength(),n=this.getCurveLengths(),s=0;s<n.length;){if(n[s]>=i){var r=n[s]-i,o=this.curves[s],a=o.getLength(),h=0===a?0:1-r/a;return o.getTangentAt(h,e)}s++}return null},lineTo:function(t,e){t instanceof c?this._tmpVec2B.copy(t):"object"==typeof t?this._tmpVec2B.setFromObject(t):this._tmpVec2B.set(t,e);var i=this.getEndPoint(this._tmpVec2A);return this.add(new a([i.x,i.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(t){return t.unshift(this.getEndPoint()),this.add(new d(t))},moveTo:function(t,e){return t instanceof c?this.add(new h(t.x,t.y)):this.add(new h(t,e))},toJSON:function(){for(var t=[],e=0;e<this.curves.length;e++)t.push(this.curves[e].toJSON());return{type:"Path",x:this.startPoint.x,y:this.startPoint.y,autoClose:this.autoClose,curves:t}},updateArcLengths:function(){this.cacheLengths=[],this.getCurveLengths()},destroy:function(){this.curves.length=0,this.cacheLengths.length=0,this.startPoint=void 0}});o.register("path",function(t,e){return new p(t,e)}),t.exports=p},45893(t,e,i){var n=i(83419),s=i(24882);t.exports=new n({initialize:function(t,e){this.parent=t,this.events=e,e||(this.events=t.events?t.events:t),this.list={},this.values={},this._frozen=!1,!t.hasOwnProperty("sys")&&this.events&&this.events.once(s.DESTROY,this.destroy,this)},get:function(t){var e=this.list;if(!Array.isArray(t))return e[t];for(var i=[],n=0;n<t.length;n++)i.push(e[t[n]]);return i},getAll:function(){var t={};for(var e in this.list)this.list.hasOwnProperty(e)&&(t[e]=this.list[e]);return t},query:function(t){var e={};for(var i in this.list)this.list.hasOwnProperty(i)&&i.match(t)&&(e[i]=this.list[i]);return e},set:function(t,e){if(this._frozen)return this;if("string"==typeof t)return this.setValue(t,e);for(var i in t)this.setValue(i,t[i]);return this},inc:function(t,e){if(this._frozen)return this;void 0===e&&(e=1);var i=this.get(t);return void 0===i&&(i=0),this.set(t,i+e),this},toggle:function(t){return this._frozen||this.set(t,!this.get(t)),this},setValue:function(t,e){if(this._frozen)return this;if(this.has(t))this.values[t]=e;else{var i=this,n=this.list,r=this.events,o=this.parent;Object.defineProperty(this.values,t,{enumerable:!0,configurable:!0,get:function(){return n[t]},set:function(e){if(!i._frozen){var a=n[t];n[t]=e,r.emit(s.CHANGE_DATA,o,t,e,a),r.emit(s.CHANGE_DATA_KEY+t,o,e,a)}}}),n[t]=e,r.emit(s.SET_DATA,o,t,e)}return this},each:function(t,e){for(var i=[this.parent,null,void 0],n=1;n<arguments.length;n++)i.push(arguments[n]);for(var s in this.list)i[1]=s,i[2]=this.list[s],t.apply(e,i);return this},merge:function(t,e){for(var i in void 0===e&&(e=!0),t)t.hasOwnProperty(i)&&(e||!e&&!this.has(i))&&this.setValue(i,t[i]);return this},remove:function(t){if(this._frozen)return this;if(!Array.isArray(t))return this.removeValue(t);for(var e=0;e<t.length;e++)this.removeValue(t[e]);return this},removeValue:function(t){if(this.has(t)){var e=this.list[t];delete this.list[t],delete this.values[t],this.events.emit(s.REMOVE_DATA,this.parent,t,e)}return this},pop:function(t){var e=void 0;return!this._frozen&&this.has(t)&&(e=this.list[t],delete this.list[t],delete this.values[t],this.events.emit(s.REMOVE_DATA,this.parent,t,e)),e},has:function(t){return this.list.hasOwnProperty(t)},setFreeze:function(t){return this._frozen=t,this},reset:function(){for(var t in this.list)delete this.list[t],delete this.values[t];return this._frozen=!1,this},destroy:function(){this.reset(),this.events.off(s.CHANGE_DATA),this.events.off(s.SET_DATA),this.events.off(s.REMOVE_DATA),this.parent=null},freeze:{get:function(){return this._frozen},set:function(t){this._frozen=!!t}}
1,count:{get:function(){var t=0;for(var e in this.list)void 0!==this.list[e]&&t++;return t}}})},63646(t,e,i){var n=i(83419),s=i(45893),r=i(37277),o=i(44594),a=new n({Extends:s,initialize:function(t){s.call(this,t,t.sys.events),this.scene=t,this.systems=t.sys,t.sys.events.once(o.BOOT,this.boot,this),t.sys.events.on(o.START,this.start,this)},boot:function(){this.events=this.systems.events,this.events.once(o.DESTROY,this.destroy,this)},start:function(){this.events.once(o.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.systems.events.off(o.SHUTDOWN,this.shutdown,this)},destroy:function(){s.prototype.destroy.call(this),this.events.off(o.START,this.start,this),this.scene=null,this.systems=null}});r.register("DataManagerPlugin",a,"data"),t.exports=a},10700(t){t.exports="changedata"},93608(t){t.exports="changedata-"},60883(t){t.exports="destroy"},69780(t){t.exports="removedata"},22166(t){t.exports="setdata"},24882(t,e,i){t.exports={CHANGE_DATA:i(10700),CHANGE_DATA_KEY:i(93608),DESTROY:i(60883),REMOVE_DATA:i(69780),SET_DATA:i(22166)}},44965(t,e,i){t.exports={DataManager:i(45893),DataManagerPlugin:i(63646),Events:i(24882)}},7098(t,e,i){var n=i(84148),s={flac:!1,aac:!1,audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};t.exports=function(){if("function"==typeof importScripts)return s;s.audioData=!!window.Audio,s.webAudio=!!(window.AudioContext||window.webkitAudioContext);var t=document.createElement("audio"),e=!!t.canPlayType;try{if(e){var i=function(e,i){var n=t.canPlayType("audio/"+e).replace(/^no$/,"");return i?!!(n||t.canPlayType("audio/"+i).replace(/^no$/,"")):!!n};if(s.ogg=i('ogg; codecs="vorbis"'),s.opus=i('ogg; codecs="opus"',"opus"),s.mp3=i("mpeg"),s.wav=i("wav"),s.m4a=i("x-m4a"),s.aac=i("aac"),s.flac=i("flac","x-flac"),s.webm=i('webm; codecs="vorbis"'),""!==t.canPlayType('audio/mp4; codecs="ec-3"')){if(n.edge)s.dolby=!0;else if(n.safari&&n.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var r=parseInt(RegExp.$1,10),o=parseInt(RegExp.$2,10);(10===r&&o>=11||r>10)&&(s.dolby=!0)}}}}catch(t){}return s}()},84148(t,e,i){var n,s=i(25892),r={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};n=navigator.userAgent,/Edg\/\d+/.test(n)?(r.edge=!0,r.es2019=!0):/OPR/.test(n)?(r.opera=!0,r.es2019=!0):/Chrome\/(\d+)/.test(n)&&!s.windowsPhone?(r.chrome=!0,r.chromeVersion=parseInt(RegExp.$1,10),r.es2019=r.chromeVersion>69):/Firefox\D+(\d+)/.test(n)?(r.firefox=!0,r.firefoxVersion=parseInt(RegExp.$1,10),r.es2019=r.firefoxVersion>10):/AppleWebKit\/(?!.*CriOS)/.test(n)&&s.iOS?(r.mobileSafari=!0,r.es2019=!0):/MSIE (\d+\.\d+);/.test(n)?(r.ie=!0,r.ieVersion=parseInt(RegExp.$1,10)):/Version\/(\d+\.\d+(\.\d+)?) Safari/.test(n)&&!s.windowsPhone?(r.safari=!0,r.safariVersion=parseInt(RegExp.$1,10),r.es2019=r.safariVersion>10):/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(n)&&(r.ie=!0,r.trident=!0,r.tridentVersion=parseInt(RegExp.$1,10),r.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(n)&&(r.silk=!0),t.exports=r},89289(t,e,i){var n=i(27919),s={supportInverseAlpha:!1,supportNewBlendModes:!1};t.exports=function(){if("function"!=typeof importScripts&&void 0!==document){var t;(t=new Image).onload=function(){var e=new Image;e.onload=function(){var i=n.create2D(e,6).getContext("2d",{willReadFrequently:!0});if(i.globalCompositeOperation="multiply",i.drawImage(t,0,0),i.drawImage(e,2,0),!i.getImageData(2,0,1,1))return!1;var r=i.getImageData(2,0,1,1).data;n.remove(e),s.supportNewBlendModes=255===r[0]&&0===r[1]&&0===r[2]},e.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX//wCKxvRFAAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg=="},t.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/AP804Oa6AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",s.supportNewBlendModes=!1,s.supportInverseAlpha=function(){var t=n.create2D(this,2).getContext("2d",{willReadFrequently:!0});t.fillStyle="rgba(10, 20, 30, 0.5)",t.fillRect(0,0,1,1);var e=t.getImageData(0,0,1,1);if(null===e)return!1;t.putImageData(e,1,0);var i=t.getImageData(1,0,1,1),s=i.data[0]===e.data[0]&&i.data[1]===e.data[1]&&i.data[2]===e.data[2]&&i.data[3]===e.data[3];return n.remove(this),s}()}return s}()},89357(t,e,i){var n=i(25892),s=i(84148),r=i(27919),o={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};t.exports=function(){if("function"==typeof importScripts)return o;o.canvas=!!window.CanvasRenderingContext2D;try{o.localStorage=!!localStorage.getItem}catch(t){o.localStorage=!1}o.file=!!window.File&&!!window.FileReader&&!!window.FileList&&!!window.Blob,o.fileSystem=!!window.requestFileSystem;var t,e,i,a=!1;return o.webGL=function(){if(window.WebGLRenderingContext)try{var t=r.createWebGL(this),e=t.getContext("webgl")||t.getContext("experimental-webgl"),i=r.create2D(this);return a=i.getContext("2d",{willReadFrequently:!0}).createImageData(1,1).data instanceof Uint8ClampedArray,r.remove(t),r.remove(i),!!e}catch(t){}return!1}(),o.worker=!!window.Worker,o.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,o.getUserMedia=o.getUserMedia&&!!navigator.getUserMedia&&!!window.URL,s.firefox&&s.firefoxVersion<21&&(o.getUserMedia=!1),!n.iOS&&(s.ie||s.firefox||s.chrome)&&(o.canvasBitBltShift=!0),(s.safari||s.mobileSafari)&&(o.c
1anvasBitBltShift=!1),navigator.vibrate=navigator.vibrate||navigator.webkitVibrate||navigator.mozVibrate||navigator.msVibrate,navigator.vibrate&&(o.vibration=!0),"u">typeof ArrayBuffer&&"u">typeof Uint8Array&&"u">typeof Uint32Array&&(e=new Uint8Array(t=new ArrayBuffer(4)),i=new Uint32Array(t),e[0]=161,e[1]=178,e[2]=195,e[3]=212,o.littleEndian=0xd4c3b2a1===i[0]||0xa1b2c3d4!==i[0]&&null),o.support32bit="u">typeof ArrayBuffer&&"u">typeof Uint8ClampedArray&&"u">typeof Int32Array&&null!==o.littleEndian&&a,o}()},91639(t){var e={available:!1,cancel:"",keyboard:!1,request:""};t.exports=function(){if("function"==typeof importScripts)return e;var t,i="Fullscreen",n="FullScreen",s=["request"+i,"request"+n,"webkitRequest"+i,"webkitRequest"+n,"msRequest"+i,"msRequest"+n,"mozRequest"+n,"mozRequest"+i];for(t=0;t<s.length;t++)if(document.documentElement[s[t]]){e.available=!0,e.request=s[t];break}var r=["cancel"+n,"exit"+i,"webkitCancel"+n,"webkitExit"+i,"msCancel"+n,"msExit"+i,"mozCancel"+n,"mozExit"+i];if(e.available){for(t=0;t<r.length;t++)if(document[r[t]]){e.cancel=r[t];break}}return window.Element&&Element.ALLOW_KEYBOARD_INPUT&&!/ Version\/5\.1(?:\.\d+)? Safari\//.test(navigator.userAgent)&&(e.keyboard=!0),Object.defineProperty(e,"active",{get:function(){return!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)}}),e}()},31784(t,e,i){var n=i(84148),s={gamepads:!1,mspointer:!1,touch:!1,wheelEvent:null};"function"==typeof importScripts||(("ontouchstart"in document.documentElement||navigator.maxTouchPoints&&navigator.maxTouchPoints>=1)&&(s.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(s.mspointer=!0),navigator.getGamepads&&(s.gamepads=!0),"onwheel"in window||n.ie&&"WheelEvent"in window?s.wheelEvent="wheel":"onmousewheel"in window?s.wheelEvent="mou
1sewheel":n.firefox&&"MouseScrollEvent"in window&&(s.wheelEvent="DOMMouseScroll")),t.exports=s},25892(t){var e={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};t.exports=function(){if("function"==typeof importScripts)return e;var t=navigator.userAgent;/Windows/.test(t)?e.windows=!0:/Mac OS/.test(t)&&!/like Mac OS/.test(t)?navigator.maxTouchPoints&&navigator.maxTouchPoints>2?(e.iOS=!0,e.iPad=!0,navigator.appVersion.match(/Version\/(\d+)/),e.iOSVersion=parseInt(RegExp.$1,10)):e.macOS=!0:/Android/.test(t)?e.android=!0:/Linux/.test(t)?e.linux=!0:/iP[ao]d|iPhone/i.test(t)?(e.iOS=!0,navigator.appVersion.match(/OS (\d+)/),e.iOSVersion=parseInt(RegExp.$1,10),e.iPhone=-1!==t.toLowerCase().indexOf("iphone"),e.iPad=-1!==t.toLowerCase().indexOf("ipad")):/Kindle/.test(t)||/\bKF[A-Z][A-Z]+/.test(t)||/Silk.*Mobile Safari/.test(t)?e.kindle=!0:/CrOS/.test(t)&&(e.chromeOS=!0),(/Windows Phone/i.test(t)||/IEMobile/i.test(t))&&(e.android=!1,e.iOS=!1,e.macOS=!1,e.windows=!0,e.windowsPhone=!0);var i=/Silk/.test(t);return(e.windows||e.macOS||e.linux&&!i||e.chromeOS)&&(e.desktop=!0),(e.windowsPhone||/Windows NT/i.test(t)&&/Touch/i.test(t))&&(e.desktop=!1),navigator.standalone&&(e.webApp=!0),"function"!=typeof importScripts&&(void 0!==window.cordova&&(e.cordova=!0),void 0!==window.ejecta&&(e.ejecta=!0)),void 0!==n&&n.versions&&n.versions.node&&(e.node=!0),e.node&&"object"==typeof n.versions&&(e.nodeWebkit=!!n.versions["node-webkit"],e.electron=!!n.versions.electron),/Crosswalk/.test(t)&&(e.crosswalk=!0),e.pixelRatio=window.devicePixelRatio||1,e}()},43267(t,e,i){var n=i(95540),s={h264:!1,hls:!1,mov:!1,mp4:!1,m4v:!1,ogg:!1,vp9:!1,webm:!1,hasRequestVideoFrame:!1};t.exports=function(){if("function"==typeof importScripts)return s;var t=document.createElement("video"),e=!!t.canPlayType,i=/^no$/;try{e&&(t.canPlayType('video/ogg; codecs="theora"').replace(i,"")&&(s.ogg=!0),t.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(i,"")&&(s.h264=!0,s.mp4=!0),t.canPlayType('video/quicktime4; codecs="avc1.42E01E"').replace(i,"")&&(s.mov=!0),t.canPlayType("video/x-m4v").replace(i,"")&&(s.m4v=!0),t.canPlayType('video/webm; codecs="vp8, vorbis"').replace(i,"")&&(s.webm=!0),t.canPlayType('video/webm; codecs="vp9"').replace(i,"")&&(s.vp9=!0),t.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(i,"")&&(s.hls=!0))}catch(t){}return t.parentNode&&t.parentNode.removeChild(t),s.getVideoURL=function(t){Array.isArray(t)||(t=[t]);for(var e=0;e<t.length;e++){var i,r=n(t[e],"url",t[e]);if(0===r.indexOf("blob:"))return{url:r,type:""};if(i=0===r.indexOf("data:")?r.split(",")[0].match(/\/(.*?);/):r.match(/\.([a-zA-Z0-9]+)($|\?)/),s[i=n(t[e],"type",i?i[1]:"").toLowerCase()])return{url:r,type:i}}return null},s}()},82264(t,e,i){t.exports={os:i(25892),browser:i(84148),features:i(89357),input:i(31784),audio:i(7098),video:i(43267),fullscreen:i(91639),canvasFeatures:i(89289)}},34664(t,e,i){var n=i(79980),s=i(28915),r=i(83419),o=i(40987),a=i(13699);t.exports=new r({initialize:function(t){t||(t={}),this.isColorBand=!0,this.colorStart=new o,this.colorEnd=new o,this.start=t.start||0,this.middle=void 0===t.middle?.5:t.middle,this.end=1,void 0!==t.end?this.end=t.end:void 0!==t.size&&(this.end=this.start+t.size),this.interpolation=t.interpolation||0,this.colorSpace=t.colorSpace||0,this.setColors(t.colorStart,t.colorEnd)},setColors:function(t,e){var i;return void 0===t&&(t=0),void 0===e&&(e=t),"number"==typeof t?o.IntegerToColor(t,this.colorStart):"string"==typeof t?o.HexStringToColor(t,this.colorStart):Array.isArray(t)?(i=void 0===t[3]?1:t[3],this.colorStart.setGLTo(t[0],t[1],t[2],i)):t instanceof o&&this.colorStart.setTo(t.red,t.green,t.blue,t.alpha),"number"==typeof e?o.IntegerToColor(e,this.colorEnd):"string"==typeof e?o.HexStringToColor(e,this.colorEnd):Array.isArray(e)?(i=void 0===e[3]?1:e[3],this.colorEnd.setGLTo(e[0],e[1],e[2],i)):e instanceof o&&this.colorEnd.setTo(e.red,e.green,e.blue,e.alpha),this},getColor:function(t){switch(t=Math.min(Math.max(0,t=Math.pow(t,Math.log(.5)/Math.log(this.middle))),1),this.interpolation){case 1:t=(t*=2)<1?.5*Math.sqrt(1- --t*t):1-.5*Math.sqrt(1-(t=1-t)*t);break;case 2:t=n.InOut(t);break;case 3:t=n.Out(t);break;case 4:t=n.In(t)}var e=0;2===this.colorSpace?e=1:3===this.colorSpace&&(e=-1);var i=a.ColorWithColor(this.colorStart,this.colorEnd,1,t,0!==this.colorSpace,e);return i.a=s(this.colorStart.alpha,this.colorEnd.alpha,t),i}})},89422(t,e,i){var n=i(83419),s=new Float32Array(20),r=new n({initialize:function(){this._matrix=new Float32Array(20),this.alpha=1,this._dirty=!0,this._data=new Float32Array(20),this.reset()},set:function(t){return this._matrix.set(t),this._dirty=!0,this},reset:function(){var t=this._matrix;return t.fill(0),t[0]=1,t[6]=1,t[12]=1,t[18]=1,this.alpha=1,this._dirty=!0,this},getData:function(){var t=this._data;return this._dirty&&(t.set(this._matrix),t[4]/=255,t[9]/=255,t[14]/=255,t[19]/=255,this._dirty=!1),t},brightness:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1);var i=t;return this.multiply([i,0,0,0,0,0,i,0,0,0,0,0,i,0,0,0,0,0,1,0],e)},saturate:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1);var i=2*t/3+1,n=-((i-1)*.5);return this.multiply([i,n,n,0,0,n,i,n,0,0,n,n,i,0,0,0,0,0,1,0],e)},desaturate:function(t){return void 0===t&&(t=!1),this.saturate(-1,t)},hue:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1);var i=Math.cos(t=t/180*Math.PI),n=Math.sin(t);return this.multiply([.213+.787*i+-(.213*n),.715+-(.715*i)+-(.715*n),.072+-(.072*i)+.928*n,0,0,.213+-(.213*i)+.143*n,.715+.28500000000000003*i+.14*n,.072+-(.072*i)+-.283*n,0,0,.213+-(.213*i)+-(.787*n),.715+-(.715*i)+.715*n,.072+.928*i+.072*n,0,0,0,0,0,1,0],e)},grayscale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=!1),this.saturate(-t,e)},blackWhite:function(t){return void 0===t&&(t=!1),this.multiply(r.BLACK_WHITE,t)},black:function(t){return this.multiply(r.BLACK,t)},contrast:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1);var i=t+1,n=-.5*(i-1);return this.multiply([i,0,0,0,n,0,i,0,0,n,0,0,i,0,n,0,0,0,1,0],e)},negative:function(t){return void 0===t&&(t=!1),this.multiply(r.NEGATIVE,t)},desaturateLuminance:function(t){return void 0===t&&(t=!1),this.multiply(r.DESATURATE_LUMINANCE,t)},sepia:function(t){return void 0===t&&(t=!1),this.multiply(r.SEPIA,t)},night:function(t,e){return void 0===t&&(t=.1),void 0===e&&(e=!1),this.multiply([-2*t,-t,0,0,0,-t,0,t,0,0,0,t,2*t,0,0,0,0,0,1,0],e)},lsd:function(t){return void 0===t&&(t=!1),this.multiply(r.LSD,t)},brown:function(t){return void 0===t&&(t=!1),this.multiply(r.BROWN,t)},vintagePinhole:function(t){return void 0===t&&(t=!1),this.multiply(r.VINTAGE,t)},kodachrome:function(t){return void 0===t&&(t=!1),this.multiply(r.KODACHROME,t)},technicolor:function(t){return void 0===t&&(t=!1),this.multiply(r.TECHNICOLOR,t)},polaroid:function(t){return void 0===t&&(t=!1),this.multiply(r.POLAROID,t)},alphaToBrightness:function(t){return void 0===t&&(t=!1),this.multiply(r.ALPHA_TO_BRIGHTNESS,t)},alphaToBrightnessInverse:function(t){return void 0===t&&(t=!1),this.multiply(r.ALPHA_TO_BRIGHTNESS_INVERSE,t)},brightnessToAlpha:function(t){return void 0===t&&(t=!1),this.multiply(r.BRIGHTNESS_TO_ALPHA,t)},brightnessToAlphaInverse:function(t){return void 0===t&&(t=!1),this.multiply(r.BRIGHTNESS_TO_ALPHA_INVERSE,t)},shiftToBGR:function(t){return void 0===t&&(t=!1),this.multiply(r.SHIFT_BGR,t)},multiply:function(t,e){void 0===e&&(e=!1),e||this.reset();var i=this._matrix;return s.set(i),i.set([s[0]*t[0]+s[1]*t[5]+s[2]*t[10]+s[3]*t[15],s[0]*t[1]+s[1]*t[6]+s[2]*t[11]+s[3]*t[16],s[0]*t[2]+s[1]*t[7]+s[2]*t[12]+s[3]*t[17],s[0]*t[3]+s[1]*t[8]+s[2]*t[13]+s[3]*t[18],s[0]*t[4]+s[1]*t[9]+s[2]*t[14]+s[3]*t[19]+s[4],s[5]*t[0]+s[6]*t[5]+s[7]*t[10]+s[8]*t[15],s[5]*t[1]+s[6]*t[6]+s[7]*t[11]+s[8]*t[16],s[5]*t[2]+s[6]*t[7]+s[7]*t[12]+s[8]*t[17],s[5]*t[3]+s[6]*t[8]+s[7]*t[13]+s[8]*t[18],s[5]*t[4]+s[6]*t[9]+s[7]*t[14]+s[8]*t[19]+s[9],s[10]*t[0]+s[11]*t[5]+s[12]*t[10]+s[13]*t[15],s[10]*t[1]+s[11]*t[6]+s[12]*t[11]+s[13]*t[16],s[10]*t[2]+s[11]*t[7]+s[12]*t[12]+s[13]*t[17],s[10]*t[3]+s[11]*t[8]+s[12]*t[13]+s[13]*t[18],s[10]*t[4]+s[11]*t[9]+s[12]*t[14]+s[13]*t[19]+s[14],s[15]*t[0]+s[16]*t[5]+s[17]*t[10]+s[18]*t[15],s[15]*t[1]+s[16]*t[6]+s[17]*t[11]+s[18]*t[16],s[15]*t[2]+s[16]*t[7]+s[17]*t[12]+s[18]*t[17],s[15]*t[3]+s[16]*t[8]+s[17]*t[13]+s[18]*t[18],s[15]*t[4]+s[16]*t[9]+s[17]*t[14]+s[18]*t[19]+s[19]]),this._dirty=!0,this}});r.BLACK=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0],r.BLACK_WHITE=[.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0],r.NEGATIVE=[-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0],r.DESATURATE_LUMINANCE=[.2764723,.929708,.0938197,
vendor: 4,193 bytes, line 1
10,-37.1,.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,0,0,0,1,0],r.SEPIA=[.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0],r.LSD=[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],r.BROWN=[.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0],r.VINTAGE=[.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0],r.KODACHROME=[1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0],r.TECHNICOLOR=[1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0],r.POLAROID=[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],r.ALPHA_TO_BRIGHTNESS=[0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,255],r.ALPHA_TO_BRIGHTNESS_INVERSE=[0,0,0,-1,255,0,0,0,-1,255,0,0,0,-1,255,0,0,0,0,255],r.BRIGHTNESS_TO_ALPHA=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,.3,.6,.1,0,0],r.BRIGHTNESS_TO_ALPHA_INVERSE=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,-.3,-.6,-.1,0,255],r.SHIFT_BGR=[0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0],t.exports=r},73043(t,e,i){var n=i(28915),s=i(70554),r=i(83419),o=i(45650),a=i(34664),h=s.getTintFromFloats;t.exports=new r({initialize:function(t,e,i){void 0===i&&(i=!0),this.scene=t,this.bands=[],this.gpuEncode=i,this.dataTexture=null,this.glTexture=null,this.dataTextureFirstBand=0,this.bandTreeDepth=0,this.dataTextureResolution=[0,0],this.setBands(e)},setBands:function(t,e){this.bands.length=0,Array.isArray(t)||(t=[t]);for(var i=0,n=0;n<t.length;n++){var s=t[n];if(s.isColorBand){this.bands.push(s),i=s.end;continue}void 0===s.start&&(s=Object.assign({start:i},s));var r=new a(s);this.bands.push(r),i=r.end}return!1!==e&&this.gpuEncode&&this.encode(),this},encode:function(){var t=this.bands.length,e=Math.ceil(Math.log2(t));this.bandTreeDepth=e;var i=Math.pow(2,e)-1,n=(8+4*i+12*t)/4,s=1;n>4096&&(s=Math.ceil(n/4096),n=4096),this.dataTextureResolution[0]=n,this.dataTextureResolution[1]=s;var r=new ArrayBuffer(n*s*4),a=new Uint32Array(r),l=new Uint8Array(r),u=0;a[u++]=Math.round(65536*this.bands[0].start),a[u++]=Math.round(65536*this.bands[this.bands.length-1].end);for(var d=0;d<=e;d++)for(var c=Math.pow(2,d),f=1;f<c;f+=2){var p=Math.floor(i*f/c),g=this.bands[Math.min(p,t-1)];a[u++]=Math.round(65536*g.end)}this.dataTextureFirstBand=u;for(var m=0;m<t;m++){var v=(g=this.bands[m]).colorStart,x=g.colorEnd;a[u++]=h(v.blueGL,v.greenGL,v.redGL,v.alphaGL),a[u++]=h(x.blueGL,x.greenGL,x.redGL,x.alphaGL);var y=255*g.colorSpace,T=g.interpolation,w=g.middle/2;a[u++]=65536*(y+T+w)}if(this.glTexture){var b=this.glTexture;b.update(l,n,s,b.flipY,b.wrapS,b.wrapT,b.minFilter,b.magFilter,b.format)}else{var S=this.scene.renderer.createUint8ArrayTexture(l,n,s,!1,!1);this.glTexture=S;for(var C=o();this.scene.textures.exists(C);)C=o();this.dataTexture=this.scene.textures.addGLTexture(C,S)}},fixFit:function(t,e,i,n){var s=this.bands;if(0===s.length)return this;void 0===i&&(i=!0),void 0===n&&(n=!0),void 0!==t&&(s[0].start=t),void 0!==e&&(s[s.length-1].end=e);for(var r=0;r<s.length-1;r++){var o=s[r],a=s[r+1];a.start=o.end,a.start>a.end&&(a.end=a.start)}return i&&(this.bands=s.filter(function(t){return t.start<t.end})),n&&this.encode(),this},splitBand:function(t,e,i,s){if(0===e)return this;void 0===e&&(e=2),void 0===s&&(s=!0);var r=0;if("number"==typeof t)r=t,t=this.bands[t];else if(-1===(r=this.bands.indexOf(t)))return this;if(!t)return this;this.bands.splice(r,1);for(var o=0;o<e;o++){var h=o/e,l=(o+1)/e;i&&(h=o/(e-1),l=(o+1)/(e-1));var u=t.getColor(h),d=t.getColor(l);
1i&&(d=u);var c=new a({colorStart:[u.r/255,u.g/255,u.b/255,u.a/255],colorEnd:[d.r/255,d.g/255,d.b/255,d.a/255],start:n(t.start,t.end,h),end:n(t.start,t.end,l),middle:t.middle,interpolation:t.interpolation,colorSpace:t.colorSpace});this.bands.splice(r++,0,c)}return s&&this.encode(),this},getColor:function(t){for(var e,i=0;i<this.bands.length;i++){var n=this.bands[i];if(n.start<=t&&n.end>=t){e=n;break}}return e?(t=(t-e.start)/(e.end-e.start),e.getColor(t)):{r:0,g:0,b:0,a:0,color:0}},destroy:function(){this.scene=null,this.dataTexture&&this.dataTexture.destroy()}})},51767(t,e,i){var n=i(83419),s=i(29747);t.exports=new n({initialize:function(t,e,i){this._rgb=[0,0,0],this.onChangeCallback=s,this.dirty=!1,this.set(t,e,i)},set:function(t,e,i){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),this._rgb=[t,e,i],this.onChange(),this},equals:function(t,e,i){var n=this._rgb;return n[0]===t&&n[1]===e&&n[2]===i},onChange:function(){this.dirty=!0;var t=this._rgb;this.onChangeCallback.call(this,t[0],t[1],t[2])},r:{get:function(){return this._rgb[0]},set:function(t){this._rgb[0]=t,this.onChange()}},g:{get:function(){return this._rgb[1]},set:function(t){this._rgb[1]=t,this.onChange()}},b:{get:function(){return this._rgb[2]},set:function(t){this._rgb[2]=t,this.onChange()}},destroy:function(){this.onChangeCallback=null}})},60461(t){t.exports={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}},54312(t,e,i){var n=i(62235),s=i(35893),r=i(86327),o=i(88417);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},46768(t,e,i){var n=i(62235),s=i(26541),r=i(86327),o=i(385);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},35827(t,e,i){var n=i(62235),s=i(54380),r=i(86327),o=i(40136);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},46871(t,e,i){var n=i(66786),s=i(35893),r=i(7702);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),n(t,s(e)+i,r(e)+o),t}},5198(t,e,i){var n=i(7702),s=i(26541),r=i(20786),o=i(385);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},11879(t,e,i){var n=i(60461),s=[];s[n.BOTTOM_CENTER]=i(54312),s[n.BOTTOM_LEFT]=i(46768),s[n.BOTTOM_RIGHT]=i(35827),s[n.CENTER]=i(46871),s[n.LEFT_CENTER]=i(5198),s[n.RIGHT_CENTER]=i(80503),s[n.TOP_CENTER]=i(89698),s[n.TOP_LEFT]=i(922),s[n.TOP_RIGHT]=i(21373),s[n.LEFT_BOTTOM]=s[n.BOTTOM_LEFT],s[n.LEFT_TOP]=s[n.TOP_LEFT],s[n.RIGHT_BOTTOM]=s[n.BOTTOM_RIGHT],s[n.RIGHT_TOP]=s[n.TOP_RIGHT],t.exports=function(t,e,i,n,r){return s[i](t,e,n,r)}},80503(t,e,i){var n=i(7702),s=i(54380),r=i(20786),o=i(40136);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},89698(t,e,i){var n=i(35893),s=i(17717),r=i(88417),o=i(66737);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)+i),o(t,s(e)-a),t}},922(t,e,i){var n=i(26541),s=i(17717),r=i(385),o=i(66737);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)-i),o(t,s(e)-a),t}},21373(t,e,i){var n=i(54380),s=i(17717),r=i(40136),o=i(66737);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)+i),o(t,s(e)-a),t}},91660(t,e,i){t.exports={BottomCenter:i(54312),BottomLeft:i(46768),BottomRight:i(35827),Center:i(46871),LeftCenter:i(5198),QuickSet:i(11879),RightCenter:i(80503),TopCenter:i(89698),TopLeft:i(922),TopRight:i(21373)}},71926(t,e,i){var n=i(60461);t.exports=i(79291)(!1,{In:i(91660),To:i(16694)},n)},21578(t,e,i){var n=i(62235),s=i(35893),r=i(88417),o=i(66737);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,s(e)+i),o(t,n(e)+a),t}},10210(t,e,i){var n=i(62235),s=i(26541),r=i(385),o=i(66737);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,s(e)-i),o(t,n(e)+a),t}},82341(t,e,i){var n=i(62235),s=i(54380),r=i(40136),o=i(66737);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,s(e)+i),o(t,n(e)+a),t}},87958(t,e,i){var n=i(62235),s=i(26541),r=i(86327),o=i(40136);
1t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},40080(t,e,i){var n=i(7702),s=i(26541),r=i(20786),o=i(40136);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},88466(t,e,i){var n=i(26541),s=i(17717),r=i(40136),o=i(66737);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)-i),o(t,s(e)-a),t}},38829(t,e,i){var n=i(60461),s=[];s[n.BOTTOM_CENTER]=i(21578),s[n.BOTTOM_LEFT]=i(10210),s[n.BOTTOM_RIGHT]=i(82341),s[n.LEFT_BOTTOM]=i(87958),s[n.LEFT_CENTER]=i(40080),s[n.LEFT_TOP]=i(88466),s[n.RIGHT_BOTTOM]=i(19211),s[n.RIGHT_CENTER]=i(34609),s[n.RIGHT_TOP]=i(48741),s[n.TOP_CENTER]=i(49440),s[n.TOP_LEFT]=i(81288),s[n.TOP_RIGHT]=i(61323),t.exports=function(t,e,i,n,r){return s[i](t,e,n,r)}},19211(t,e,i){var n=i(62235),s=i(54380),r=i(86327),o=i(385);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},34609(t,e,i){var n=i(7702),s=i(54380),r=i(20786),o=i(385);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},48741(t,e,i){var n=i(54380),s=i(17717),r=i(385),o=i(66737);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)+i),o(t,s(e)-a),t}},49440(t,e,i){var n=i(35893),s=i(17717),r=i(86327),o=i(88417);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)+i),r(t,s(e)-a),t}},81288(t,e,i){var n=i(26541),s=i(17717),r=i(86327),o=i(385);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)-i),r(t,s(e)-a),t}},61323(t,e,i){var n=i(54380),s=i(17717),r=i(86327),o=i(40136);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)+i),r(t,s(e)-a),t}},16694(t,e,i){t.exports={BottomCenter:i(21578),BottomLeft:i(10210),BottomRight:i(82341),LeftBottom:i(87958),LeftCenter:i(40080),LeftTop:i(88466),QuickSet:i(38829),RightBottom:i(19211),RightCenter:i(34609),RightTop:i(48741),TopCenter:i(49440),TopLeft:i(81288),TopRight:i(61323)}},66786(t,e,i){var n=i(88417),s=i(20786);t.exports=function(t,e,i){return n(t,e),s(t,i)}},62235(t){t.exports=function(t){return t.y+t.height-t.height*t.originY}},72873(t,e,i){var n=i(62235),s=i(26541),r=i(54380),o=i(17717),a=i(87841);t.exports=function(t,e){void 0===e&&(e=new a);var i=s(t),h=o(t);return e.x=i,e.y=h,e.width=r(t)-i,e.height=n(t)-h,e}},35893(t){t.exports=function(t){return t.x-t.width*t.originX+.5*t.width}},7702(t){t.exports=function(t){return t.y-t.height*t.originY+.5*t.height}},26541(t){t.exports=function(t){return t.x-t.width*t.originX}},87431(t){t.exports=function(t){return t.width*t.originX}},46928(t){t.exports=function(t){return t.height*t.originY}},54380(t){t.exports=function(t){return t.x+t.width-t.width*t.originX}},17717(t){t.exports=function(t){return t.y-t.height*t.originY}},86327(t){t.exports=function(t,e){return t.y=e-t.height+t.height*t.originY,t}},88417(t){t.exports=function(t,e){var i=t.width*t.originX;return t.x=e+i-.5*t.width,t}},20786(t){t.exports=function(t,e){var i=t.height*t.originY;return t.y=e+i-.5*t.height,t}},385(t){t.exports=function(t,e){return t.x=e+t.width*t.originX,t}},40136(t){t.exports=function(t,e){return t.x=e-t.width+t.width*t.originX,t}},66737(t){t.exports=function(t,e){return t.y=e+t.height*t.originY,t}},58724(t,e,i){t.exports={CenterOn:i(66786),GetBottom:i(62235),GetBounds:i(72873),GetCenterX:i(35893),GetCenterY:i(7702),GetLeft:i(26541),GetOffsetX:i(87431),GetOffsetY:i(46928),GetRight:i(54380),GetTop:i(17717),SetBottom:i(86327),SetCenterX:i(88417),SetCenterY:i(20786),SetLeft:i(385),SetRight:i(40136),SetTop:i(66737)}},20623(t){t.exports={setCrisp:function(t){return["optimizeSpeed","-moz-crisp-edges","-o-crisp-edges","-webkit-optimize-contrast","optimize-contrast","crisp-edges","pixelated"].forEach(function(e){t.style["image-rendering"]=e}),t.style.msInterpolationMode="nearest-neighbor",t},setBicubic:function(t){return t.style["image-rendering"]="auto",t.style.msInterpolationMode="bicubic",t}}},27919(t,e,i){var n,s,r,o=i(8054),a=i(68703),h=[],l=!1;n=function(t,e,i,n,r){void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=o.CANVAS),void 0===r&&(r=!1);var u,d=s(n);return null===d?(d={parent:t,canvas:document.createElement("canvas"),type:n},n===o.CANVAS&&h.push(d)):d.parent=t,u=d.canvas,r&&(d.parent=u),u.width=e,u.height=i,l&&n===o.CANVAS&&a.disable(u.getContext("2d",{willReadFrequently:!1})),u},s=function(t){if(void 0===t&&(t=o.CANVAS),t===o.WEBGL)return null;for(var e=0;e<h.length;e++){var i=h[e];if(!i.parent&&i.type===t)return i}return null},r=function(){var t=0;return h.forEach(function(e){e.parent&&t++}),t}
vendor: 5,077 bytes, line 1
1,t.exports={create2D:function(t,e,i){return n(t,e,i,o.CANVAS)},create:n,createWebGL:function(t,e,i){return n(t,e,i,o.WEBGL)},disableSmoothing:function(){l=!0},enableSmoothing:function(){l=!1},first:s,free:function(){return h.length-r()},pool:h,remove:function(t){var e=t instanceof HTMLCanvasElement;h.forEach(function(i){(e&&i.canvas===t||!e&&i.parent===t)&&(i.parent=null,i.canvas.width=1,i.canvas.height=1)})},total:r}},68703(t){var e,i="";t.exports={disable:function(t){return""===i&&(i=e(t)),i&&(t[i]=!1),t},enable:function(t){return""===i&&(i=e(t)),i&&(t[i]=!0),t},getPrefix:e=function(t){for(var e=["i","webkitI","msI","mozI","oI"],i=0;i<e.length;i++){var n=e[i]+"mageSmoothingEnabled";if(n in t)return n}return null},isEnabled:function(t){return null!==i?t[i]:null}}},65208(t){t.exports=function(t,e){return void 0===e&&(e="none"),t.style.msTouchAction=e,t.style["ms-touch-action"]=e,t.style["touch-action"]=e,t}},91610(t){t.exports=function(t,e){return void 0===e&&(e="none"),["-webkit-","-khtml-","-moz-","-ms-",""].forEach(function(i){t.style[i+"user-select"]=e}),t.style["-webkit-touch-callout"]=e,t.style["-webkit-tap-highlight-color"]="rgba(0, 0, 0, 0)",t}},26253(t,e,i){t.exports={CanvasInterpolation:i(20623),CanvasPool:i(27919),Smoothing:i(68703),TouchAction:i(65208),UserSelect:i(91610)}},40987(t,e,i){var n=i(83419),s=i(37589),r=i(1e3),o=i(7537),a=i(87837),h=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=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(t,e,i,n)},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(t,e,i,n,s){return void 0===n&&(n=255),void 0===s&&(s=!0),this._locked=!0,this.red=t,this.green=e,this.blue=i,this.alpha=n,this._locked=!1,this.update(s)},setGLTo:function(t,e,i,n){return void 0===n&&(n=1),this._locked=!0,this.redGL=t,this.greenGL=e,this.blueGL=i,this.alphaGL=n,this._locked=!1,this.update(!0)},setFromRGB:function(t){return this._locked=!0,this.red=t.r,this.green=t.g,this.blue=t.b,t.hasOwnProperty("a")&&(this.alpha=t.a),this._locked=!1,this.update(!0)},setFromHSV:function(t,e,i){return o(t,e,i,this)},update:function(t){if(void 0===t&&(t=!1),this._locked)return this;var e=this.r,i=this.g,n=this.b,o=this.a;return this._color=s(e,i,n),this._color32=r(e,i,n,o),this._rgba="rgba("+e+","+i+","+n+","+o/255+")",t&&a(e,i,n,this),this},updateHSV:function(){return a(this.r,this.g,this.b,this),this},clone:function(){return new h(this.r,this.g,this.b,this.a)},gray:function(t){return this.setTo(t,t,t)},random:function(t,e){void 0===t&&(t=0),void 0===e&&(e=255);var i=Math.floor(t+Math.random()*(e-t)),n=Math.floor(t+Math.random()*(e-t)),s=Math.floor(t+Math.random()*(e-t));return this.setTo(i,n,s)},randomGray:function(t,e){void 0===t&&(t=0),void 0===e&&(e=255);var i=Math.floor(t+Math.random()*(e-t));return this.setTo(i,i,i)},saturate:function(t){return this.s+=t/100,this},desaturate:function(t){return this.s-=t/100,this},lighten:function(t){return this.v+=t/100,this},darken:function(t){return this.v-=t/100,this},brighten:function(t){var e=this.r,i=this.g,n=this.b;return e=Math.max(0,Math.min(255,e-Math.round(-(t/100*255)))),i=Math.max(0,Math.min(255,i-Math.round(-(t/100*255)))),n=Math.max(0,Math.min(255,n-Math.round(-(t/100*255)))),this.setTo(e,i,n)},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(t){this.gl[0]=Math.min(Math.abs(t),1),this.r=Math.floor(255*this.gl[0]),this.update(!0)}},greenGL:{get:function(){return this.gl[1]},set:function(t){this.gl[1]=Math.min(Math.abs(t),1),this.g=Math.floor(255*this.gl[1]),this.update(!0)}},blueGL:{get:function(){return this.gl[2]},set:function(t){this.gl[2]=Math.min(Math.abs(t),1),this.b=Math.floor(255*this.gl[2]),this.update(!0)}},alphaGL:{get:function(){return this.gl[3]},set:function(t){this.gl[3]=Math.min(Math.abs(t),1),this.a=Math.floor(255*this.gl[3]),this.update()}},red:{get:function(){return this.r},set:function(t){t=Math.floor(Math.abs(t)),this.r=Math.min(t,255),this.gl[0]=t/255,this.update(!0)}},green:{get:function(){return this.g},set:function(t){t=Math.floor(Math.abs(t)),this.g=Math.min(t,255),this.gl[1]=t/255,this.update(!0)}},blue:{get:function(){return this.b},set:function(t){t=Math.floor(Math.abs(t)),this.b=Math.min(t,255),this.gl[2]=t/255,this.update(!0)}},alpha:{get:function(){return this.a},set:function(t){t=Math.floor(Math.abs(t)),this.a=Math.min(t,255),this.gl[3]=t/255,this.update()}},h:{get:function(){return this._h},set:function(t){this._h=t,o(t,this._s,this._v,this)}},s:{get:function(){return this._s},set:function(t){this._s=t,o(this._h,t,this._v,this)}},v:{get:function(){return this._v},set:function(t){this._v=t,o(this._h,this._s,t,this)}}});t.exports=h},92728(t,e,i){var n=i(37589);t.exports=function(t){void 0===t&&(t=1024);
1var e,i=[],s=255,r=0,o=0;for(e=0;e<=255;e++)i.push({r:s,g:e,b:o,color:n(s,e,o)});for(e=255,r=255;e>=0;e--)i.push({r:e,g:r,b:o,color:n(e,r,o)});for(e=0,s=0;e<=255;e++,r--)i.push({r:s,g:r,b:e,color:n(s,r,e)});for(e=0,r=0,o=255;e<=255;e++,o--,s++)i.push({r:s,g:r,b:o,color:n(s,r,o)});if(1024===t)return i;var a=[],h=0,l=1024/t;for(e=0;e<t;e++)a.push(i[Math.floor(h)]),h+=l;return a}},91588(t){t.exports=function(t){var e={r:t>>16&255,g:t>>8&255,b:255&t,a:255};return t>0xffffff&&(e.a=t>>>24),e}},62957(t){t.exports=function(t){var e=t.toString(16);return 1===e.length?"0"+e:e}},37589(t){t.exports=function(t,e,i){return t<<16|e<<8|i}},1e3(t){t.exports=function(t,e,i,n){return n<<24|t<<16|e<<8|i}},62183(t,e,i){var n=i(40987),s=i(89528);t.exports=function(t,e,i,r){r||(r=new n);var o=i,a=i,h=i;if(0!==e){var l=i<.5?i*(1+e):i+e-i*e,u=2*i-l;o=s(u,l,t+1/3),a=s(u,l,t),h=s(u,l,t-1/3)}return r.setGLTo(o,a,h,1)}},27939(t,e,i){var n=i(7537);t.exports=function(t,e){void 0===t&&(t=1),void 0===e&&(e=1);for(var i=[],s=0;s<=359;s++)i.push(n(s/359,t,e));return i}},7537(t,e,i){var n=i(37589);function s(t,e,i,n){var s=(t+6*e)%6;return Math.round(255*(n-n*i*Math.max(0,Math.min(s,4-s,1))))}t.exports=function(t,e,i,r){void 0===e&&(e=1),void 0===i&&(i=1);var o=s(5,t,e,i),a=s(3,t,e,i),h=s(1,t,e,i);return r?r.setTo?r.setTo(o,a,h,r.alpha,!0):(r.r=o,r.g=a,r.b=h,r.color=n(o,a,h),r):{r:o,g:a,b:h,color:n(o,a,h)}}},70238(t,e,i){var n=i(40987);t.exports=function(t,e){e||(e=new n),t=t.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,function(t,e,i,n){return e+e+i+i+n+n});var i=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);if(i){var s=parseInt(i[1],16),r=parseInt(i[2],16),o=parseInt(i[3],16);e.setTo(s,r,o)}return e}},89528(t){t.exports=function(t,e,i){return(i<0&&(i+=1),i>1&&(i-=1),i<1/6)?t+(e-t)*6*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}},30100(t,e,i){var n=i(40987),s=i(90664);t.exports=function(t,e){var i=s(t);return e?e.setTo(i.r,i.g,i.b,i.a):new n(i.r,i.g,i.b,i.a)}},90664(t){t.exports=function(t){return t>0xffffff?{a:t>>>24,r:t>>16&255,g:t>>8&255,b:255&t}:{a:255,r:t>>16&255,g:t>>8&255,b:255&t}}},13699(t,e,i){var n=i(28915),s=i(37589),r=i(7537),o=function(t,e,i,r,o,a,h,l){void 0===h&&(h=100),void 0===l&&(l=0);var u=l/h,d=n(t,r,u),c=n(e,o,u),f=n(i,a,u);return{r:d,g:c,b:f,a:255,color:s(d,c,f)}},a=function(t,e,i,s,o,a,h,l,u){if(void 0===u&&(u=0),0===u){var d=t-s;d>.5?t-=1:d<-.5&&(t+=1)}else u>0?t>s&&(t-=1):t<s&&(t+=1);var c=l/h;return r(n(t,s,c),n(e,o,c),n(i,a,c))};t.exports={RGBWithRGB:o,HSVWithHSV:a,ColorWithRGB:function(t,e,i,n,s,r){return void 0===s&&(s=100),void 0===r&&(r=0),o(t.r,t.g,t.b,e,i,n,s,r)},ColorWithColor:function(t,e,i,n,s,r){return(void 0===i&&(i=100),void 0===n&&(n=0),s)?a(t.h,t.s,t.v,e.h,e.s,e.v,i,n,r):o(t.r,t.g,t.b,e.r,e.g,e.b,i,n)}}},68957(t,e,i){var n=i(40987);t.exports=function(t,e){return e?e.setTo(t.r,t.g,t.b,t.a):new n(t.r,t.g,t.b,t.a)}},87388(t,e,i){var n=i(40987);t.exports=function(t,e){e||(e=new n);var i=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(t.toLowerCase());if(i){var s=parseInt(i[1],10),r=parseInt(i[2],10),o=parseInt(i[3],10),a=void 0!==i[4]?parseFloat(i[4]):1;e.setTo(s,r,o,255*a)}return e}},87837(t){t.exports=function(t,e,i,n){void 0===n&&(n={h:0,s:0,v:0});var s=Math.min(t/=255,e/=255,i/=255),r=Math.max(t,e,i),o=r-s,a=0,h=0===r?0:o/r;return r!==s&&(r===t?a=(e-i)/o+6*(e<i):r===e?a=(i-t)/o+2:r===i&&(a=(t-e)/o+4),a/=6),n.hasOwnProperty("_h")?(n._h=a,n._s=h,n._v=r):(n.h=a,n.s=h,n.v=r),n}},75723(t,e,i){var n=i(62957);t.exports=function(t,e,i,s,r){return(void 0===s&&(s=255),void 0===r&&(r="#"),"#"===r)?"#"+(0x1000000+(t<<16)+(e<<8)+i).toString(16).slice(1,7):"0x"+n(s)+n(t)+n(e)+n(i)}},85386(t,e,i){var n=i(30976),s=i(40987);t.exports=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=255),new s(n(t,e),n(t,e),n(t,e))}},80333(t,e,i){var n=i(70238),s=i(30100),r=i(68957),o=i(87388);t.exports=function(t,e){switch(typeof t){case"string":if("rgb"===t.substr(0,3).toLowerCase())return o(t,e);return n(t,e);case"number":return s(t,e);case"object":return r(t,e)}}},3956(t,e,i){var n=i(40987);n.ColorSpectrum=i(92728),n.ColorToRGBA=i(91588),n.ComponentToHex=i(62957),n.GetColor=i(37589),n.GetColor32=i(1e3),n.HexStringToColor=i(70238),n.HSLToColor=i(62183),n.HSVColorWheel=i(27939),n.HSVToRGB=i(7537),n.HueToComponent=i(89528),n.IntegerToColor=i(30100),n.IntegerToRGB=i(90664),n.Interpolate=i(13699),n.ObjectToColor=i(68957),n.RandomRGB=i(85386),n.RGBStringToColor=i(87388),n.RGBToHSV=i(87837),n.RGBToString=i(75723),n.ValueToColor=i(80333),t.exp
1orts=n},27460(t,e,i){t.exports={Align:i(71926),BaseShader:i(73894),Bounds:i(58724),Canvas:i(26253),Color:i(3956),ColorBand:i(34664),ColorMatrix:i(89422),ColorRamp:i(73043),Masks:i(69781),RGB:i(51767)}},80661(t,e,i){t.exports=new(i(83419))({initialize:function(t,e){this.geometryMask=e},setShape:function(t){return this.geometryMask=t,this},preRenderCanvas:function(t,e,i){var n=this.geometryMask;t.currentContext.save(),n.renderCanvas(t,n,i,null,null,!0),t.currentContext.clip()},postRenderCanvas:function(t){t.currentContext.restore()},destroy:function(){this.geometryMask=null}})},69781(t,e,i){t.exports={GeometryMask:i(80661)}},73894(t,e,i){t.exports=new(i(83419))({initialize:function(t,e,i){void 0===i&&(i={}),this.key=t,this.glsl=e,this.metadata=i}})},40366(t){t.exports=function(t,e){var i;if(e)"string"==typeof e?i=document.getElementById(e):"object"==typeof e&&1===e.nodeType&&(i=e);else if(t.parentElement||null===e)return t;return i||(i=document.body),i.appendChild(t),t}},83719(t,e,i){var n=i(40366);t.exports=function(t){var e=t.config;if(e.parent&&e.domCreateContainer){var i=document.createElement("div");i.style.cssText=["display: block;","width: "+t.scale.width+"px;","height: "+t.scale.height+"px;","padding: 0; margin: 0; position: absolute; overflow: hidden;","pointer-events: "+e.domPointerEvents+";","transform: scale(1); transform-origin: left top;"].join(" "),t.domContainer=i,n(i,e.parent)}}},57264(t,e,i){var n=i(25892);t.exports=function(t){if("complete"===document.readyState||"interactive"===document.readyState)return void t();var e=function(){document.removeEventListener("deviceready",e,!0),document.removeEventListener("DOMContentLoaded",e,!0),window.removeEventListener("load",e,!0),t()};document.body?n.cordova?document.addEventListener("deviceready",e,!1):(document.addEventListener("DOMContentLoaded",e,!0),window.addEventListener("load",e,!0)):window.setTimeout(e,20)}},57811(t){t.exports=function(t){if(!t)return window.innerHeight;var e=Math.abs(window.orientation),i={w:0,h:0},n=document.createElement("div");return(n.setAttribute("style","position: fixed; height: 100vh; width: 0; top: 0"),document.documentElement.appendChild(n),i.w=90===e?n.offsetHeight:window.innerWidth,i.h=90===e?window.innerWidth:n.offsetHeight,document.documentElement.removeChild(n),n=null,90!==Math.abs(window.orientation))?i.h:i.w}},45818(t,e,i){var n=i(13560);t.exports=function(t,e){var i=window.screen,s=!!i&&(i.orientation||i.mozOrientation||i.msOrientation);return s&&"string"==typeof s.type?s.type:"string"==typeof s?s:"number"==typeof window.orientation?0===window.orientation||180===window.orientation?n.ORIENTATION.PORTRAIT:n.ORIENTATION.LANDSCAPE:window.matchMedia?window.matchMedia("(orientation: portrait)").matches?n.ORIENTATION.PORTRAIT:window.matchMedia("(orientation: landscape)").matches?n.ORIENTATION.LANDSCAPE:void 0:e>t?n.ORIENTATION.PORTRAIT:n.ORIENTATION.LANDSCAPE}},74403(t){t.exports=function(t){var e;return""!==t&&("string"==typeof t?e=document.getElementById(t):t&&1===t.nodeType&&(e=t)),e||(e=document.body),e}},56836(t){t.exports=function(t){var e="";try{window.DOMParser?e=new DOMParser().parseFromString(t,"text/xml"):(e=new ActiveXObject("Microsoft.XMLDOM")).loadXML(t)}catch(t){e=null}return e&&e.documentElement&&!e.getElementsByTagName("parsererror").length?e:null}},35846(t){t.exports=function(t){t.parentNode&&t.parentNode.removeChild(t)}},43092(t,e,i){var n=i(83419),s=i(29747);t.exports=new n({initialize:function(){this.isRunning=!1,this.callback=s,this.isSetTimeOut=!1,this.timeOutID=null,this.delay=0;var t=this;this.step=function e(i){t.callback(i),t.isRunning&&(t.timeOutID=window.requestAnimationFrame(e))},this.stepTimeout=function e(){t.isRunning&&(t.timeOutID=window.setTimeout(e,t.delay)),t.callback(window.performance.now())}},start:function(t,e,i){this.isRunning||(this.callback=t,this.isSetTimeOut=e,this.delay=i,this.isRunning=!0,this.timeOutID=e?window.setTimeout(this.stepTimeout,0):window.requestAnimationFrame(this.step))},stop:function(){this.isRunning=!1,this.isSetTimeOut?clearTimeout(this.timeOutID):window.cancelAnimationFrame(this.timeOutID)},destroy:function(){this.stop(),this.callback=s}})},84902(t,e,i){t.exports={AddToDOM:i(40366),DOMContentLoaded:i(57264),GetInnerHeight:i(57811),GetScreenOrientation:i(45818),GetTarget:i(74403),ParseXML:i(56836),RemoveFromDOM:i(35846),RequestAnimationFrame:i(43092)}},47565(t,e,i){var n=i(83419),s=i(50792),r=i(37277),o=new n({Extends:s,initialize:function(){s.c
1all(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});r.register("EventEmitter",o,"events"),t.exports=o},93055(t,e,i){t.exports={EventEmitter:i(47565)}},10189(t,e,i){var n=i(83419),s=i(13045);t.exports=new n({Extends:s,initialize:function(t,e){void 0===e&&(e=1),s.call(this,t,"FilterBarrel"),this.amount=e}})},16762(t,e,i){var n=i(83419),s=i(13045);t.exports=new n({Extends:s,initialize:function(t,e,i,n,r){void 0===e&&(e="__WHITE"),void 0===i&&(i=0),void 0===n&&(n=1),void 0===r&&(r=[1,1,1,1]),s.call(this,t,"FilterBlend"),this.glTexture,this.blendMode=i,this.amount=n,this.color=r,this.setTexture(e)},setTexture:function(t){var e=this.camera.scene.sys.textures.getFrame(t);return e&&(this.glTexture=e.glTexture),this}})},37597(t,e,i){var n=i(83419),s=i(13045);t.exports=new n({Extends:s,initialize:function(t,e){s.call(this,t,"FilterBlocky"),this.size={x:4,y:4},this.offset={x:0,y:0},e&&(void 0!==e.size&&("number"==typeof e.size?(this.size.x=e.size,this.size.y=e.size):(this.size.x=e.size.x,this.size.y=e.size.y)),void 0!==e.offset&&("number"==typeof e.offset?(this.offset.x=e.offset,this.offset.y=e.offset):(this.offset.x=e.offset.x,this.offset.y=e.offset.y)))}})},88344(t,e,i){var n=i(83419),s=i(13045);t.exports=new n({Extends:s,initialize:function(t,e,i,n,r,o,a){void 0===e&&(e=0),void 0===i&&(i=2),void 0===n&&(n=2),void 0===r&&(r=1),void 0===a&&(a=4),s.call(this,t,"FilterBlur"),this.quality=e,this.x=i,this.y=n,this.strength=r,this.glcolor=[1,1,1],null!=o&&(this.color=o),this.steps=a},color:{get:function(){var t=this.glcolor;return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},set:function(t){var e=this.glcolor;e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255}},getPadding:function(){var t=this.paddingOverride;if(t)return this.currentPadding.setTo(t.x,t.y,t.width,t.height),t;var e=this.quality,i=this.steps*this.strength*(0===e?1.333:1===e?3.2307692308:5.176470588235294),n=Math.ceil(this.x*i),s=Math.ceil(this.y*i);return this.currentPadding.setTo(-n,-s,2*n,2*s),this.currentPadding}})},47564(t,e,i){var n=i(83419),s=i(13045);t.exports=new n({Extends:s,initialize:function(t,e,i,n,r,o,a,h){void 0===e&&(e=.5),void 0===i&&(i=1),void 0===n&&(n=.2),void 0===r&&(r=!1),void 0===o&&(o=1),void 0===a&&(a=1),void 0===h&&(h=1),s.call(this,t,"FilterBokeh"),this.radius=e,this.amount=i,this.contrast=n,this.isTiltShift=r,this.blurX=o,this.blurY=a,this.strength=h},getPadding:function(){var t=this.paddingOverride;if(t)return this.currentPadding.setTo(t.x,t.y,t.width,t.height),t;var e=Math.ceil(this.camera.height*this.radius*.021426096060426905);return this.currentPadding.setTo(-e,-e,2*e,2*e),this.currentPadding}})},77011(t,e,i){var n=i(83419),s=i(13045),r=i(89422);t.exports=new n({Extends:s,initialize:function(t){s.call(this,t,"FilterColorMatrix"),this.colorMatrix=new r},destroy:function(){this.colorMatrix=null,s.prototype.destroy.call(this)}})},95200(t,e,i){var n=i(83419),s=i(13045),r=i(89422);t.exports=new n({Extends:s,initialize:function(t,e){s.call(this,t,"FilterCombineColorMatrix"),this.glTexture,this.colorMatrixSelf=new r,this.colorMatrixTransfer=new r,this.additions=[1,1,1,0],this.multiplications=[0,0,0,1],this.setTexture(e||"__WHITE")},setTexture:function(t){var e=t instanceof Phaser.Textures.Texture?t:this.camera.scene.sys.textures.getFrame(t);return e&&(this.glTexture=e.glTexture),this},setupAlphaTransfer:function(t,e,i,n,s,r){var o=this.colorMatrixSelf,a=this.colorMatrixTransfer;o.reset(),a.reset(),this.additions=[1,1,1,0],this.multiplications=[0,0,0,1],t||o.black(),e||a.black(),s?o.brightnessToAlphaInverse(!0):i&&o.brightnessToAlpha(!0),r?a.brightnessToAlphaInverse(!0):n&&a.brightnessToAlpha(!0)},destroy:function(){this.colorMatrixSelf=null,this.colorMatrixTransfer=null,s.prototype.destroy.call(this)}})},13045(t,e,i){var n=i(83419),s=i(87841);t.exports=new n({initialize:function(t,e){this.active=!0,this.camera=t,this.renderNode=e,this.paddingOverride=new s,this.currentPadding=new s,this.allowBaseDraw=!0,this.ignoreDestroy=!1},getPadding:function(){return this.paddingOverride||this.currentPadding}
vendor: 23,355 bytes, line 1
1,setPaddingOverride:function(t,e,i,n){return null===t?this.paddingOverride=null:(void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.paddingOverride=new s(t,e,i-t,n-e)),this},setActive:function(t){return this.active=t,this},destroy:function(){this.active=!1,this.renderNode=null,this.camera=null}})},16898(t,e,i){var n=i(83419),s=i(13045);t.exports=new n({Extends:s,initialize:function(t,e,i,n){void 0===e&&(e="__WHITE"),void 0===i&&(i=.005),void 0===n&&(n=.005),s.call(this,t,"FilterDisplacement"),this.x=i,this.y=n,this.glTexture,this.setTexture(e)},setTexture:function(t){var e=this.camera.scene.sys.textures.getFrame(t);return e&&(this.glTexture=e.glTexture),this},getPadding:function(){var t=this.paddingOverride;if(t)return this.currentPadding.setTo(t.x,t.y,t.width,t.height),t;var e=this.camera,i=Math.ceil(e.width*this.x*.5),n=Math.ceil(e.height*this.y*.5);return this.currentPadding.setTo(-i,-n,2*i,2*n),this.currentPadding}})},42652(t,e,i){var n=i(83419),s=i(13045);t.exports=new n({Extends:s,initialize:function(t,e,i,n,r,o,a,h){void 0===i&&(i=4),void 0===n&&(n=0),void 0===r&&(r=1),void 0===o&&(o=!1),void 0===a&&(a=t.scene.sys.game.config.glowQuality),void 0===h&&(h=t.scene.sys.game.config.glowDistance),s.call(this,t,"FilterGlow"),this.outerStrength=i,this.innerStrength=n,this.scale=r,this.knockout=o,this._quality=Math.max(Math.round(a),1),this._distance=Math.max(Math.round(h),1),this.glcolor=[1,1,1,1],void 0!==e&&(this.color=e)},color:{get:function(){var t=this.glcolor;return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},set:function(t){var e=this.glcolor;e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255}},distance:{get:function(){return this._distance}},quality:{get:function(){return this._quality}},getPadding:function(){var t=this.paddingOverride;if(t)return this.currentPadding.setTo(t.x,t.y,t.width,t.height),t;var e=this.currentPadding,i=Math.ceil(this.distance*this.scale);return e.left=-i,e.top=-i,e.right=i,e.bottom=i,e}})},43927(t,e,i){var n=i(83419),s=i(13045),r=i(73043);t.exports=new n({Extends:s,initialize:function(t,e){e||(e={});var i=t.scene;s.call(this,t,"FilterGradientMap");var n=e.ramp;n||(n={colorStart:0,colorEnd:0xffffff}),n instanceof r||(n=new r(i,n,!0)),this.ramp=n,this.dither=!!e.dither,this.color=[0,0,0,0],e.color&&(this.color[0]=e.color[0]||0,this.color[1]=e.color[1]||0,this.color[2]=e.color[2]||0,this.color[3]=e.color[3]||0),this.colorFactor=[.3,.6,.1,0],e.colorFactor&&(this.colorFactor[0]=e.colorFactor[0]||0,this.colorFactor[1]=e.colorFactor[1]||0,this.colorFactor[2]=e.colorFactor[2]||0,this.colorFactor[3]=e.colorFactor[3]||0),this.unpremultiply=void 0===e.unpremultiply||e.unpremultiply,this.alpha=void 0===e.alpha?1:e.alpha}})},84714(t,e,i){var n=i(83419),s=i(13045),r=i(37867),o=i(61340);t.exports=new n({Extends:s,initialize:function(t,e){s.call(this,t,"FilterImageLight"),this.normalGlTexture,this.environmentGlTexture,this.viewMatrix=new r,this.modelRotation=e.modelRotation||0,this.modelRotationSource=e.modelRotationSource||null,this.bulge=e.bulge||0,this.colorFactor=e.colorFactor||[1,1,1],this._tempMatrix=new o,this._tempParentMatrix=new o,this.setEnvironmentMap(e.environmentMap||"__WHITE"),this.setNormalMap(e.normalMap||"__NORMAL"),e.viewMatrix&&this.viewMatrix.set(e.viewMatrix)},setEnvironmentMap:function(t){var e=t instanceof Phaser.Textures.Texture?t:this.camera.scene.sys.textures.getFrame(t);return e&&(this.environmentGlTexture=e.glTexture),this},setNormalMap:function(t){var e=t instanceof Phaser.Textures.Texture?t:this.camera.scene.sys.textures.getFrame(t);return e&&(this.normalGlTexture=e.glTexture),this},setNormalMapFromGameObject:function(t){var e=t.texture.dataSource[0];return e&&(this.normalGlTexture=e.glTexture),this},getModelRotation:function(){return this.modelRotationSource?"function"==typeof this.modelRotationSource?this.modelRotationSource():this.modelRotationSource.hasTransformComponent?this.modelRotationSource.getWorldTransformMatrix(this._tempMatrix,this._tempParentMatrix).rotationNormalized:this.modelRotation:this.modelRotation}})},51890(t,e,i){var n=i(83419),s=i(13045),r=i(40987);t.exports=new n({Extends:s,initialize:function(t,e){void 0===e&&(e={}),s.call(this,t,"FilterKey"),this.color=[1,1,1,1],void 0!==e.color&&this.setColor(e.color),void 0!==e.alpha&&this.setAlpha(e.alpha),this.isolate=!1,void 0!==e.isolate&&(this.isolate=e.isolate),this.threshold=.0625,void 0!==e.threshold&&(this.threshold=e.threshold),this.feather=0,void 0!==e.feather&&(this.feather=e.feather)},setAlpha:function(t){return this.color[3]=t,this},setColor:function(t){var e=this.color[3];if("number"==typeof t){var i=r.IntegerToRGB(t);this.color=[i.r/255,i.g/255,i.b/255,e]}else if("string"==typeof t){var n=r.HexStringToColor(t);this.color=[n.redGL,n.greenGL,n.blueGL,e]}else Array.isArray(t)?this.color=[t[0],t[1],t[2],e]:t instanceof r&&(this.color=[t.redGL,t.greenGL,t.blueGL,e]);return this}})},97797(t,e,i){var n=i(83419),s=i(45650),r=i(13045);t.exports=new n({Extends:r,initialize:function(t,e,i,n,s,o){void 0===e&&(e="__WHITE"),void 0===i&&(i=!1),void 0===o&&(o=1),r.call(this,t,"FilterMask"),this.glTexture,this._dynamicTexture=null,this.maskGameObject=null,this.invert=i,this.autoUpdate=!0,this.needsUpdate=!1,this.viewTransform=s||"world",this.viewCamera=n,this.scaleFactor=o,"string"==typeof e?this.setTexture(e):this.setGameObject(e)},updateDynamicTexture:function(t,e){var i=this.scaleFactor,n=t*i,r=e*i,o=this.maskGameObject;if(o){if(this._dynamicTexture)this._dynamicTexture.width!==n||this._dynamicTexture.height!==r?this._dynamicTexture.setSize(n,r,!1):this._dynamicTexture.clear();else{var a=this.camera.scene.sys.textures;this._dynamicTexture=a.addDynamicTexture(s(),n,r,!1)}this.glTexture=this._dynamicTexture.get().glTexture;var h=this.viewCamera||o.scene.renderer.currentViewCamera;this._dynamicTexture.capture(o,{transform:this.viewTransform,camera:h}),this._dynamicTexture.render(),this.needsUpdate=!1}},setGameObject:function(t){return this.maskGameObject=t,this.needsUpdate=!0,this},setTexture:function(t){var e=this.camera.scene.sys.textures.getFrame(t);return e&&(this.maskGameObject=null,this.glTexture=e.glTexture),this},destroy:function(){this._dynamicTexture&&this._dynamicTexture.destroy(),this.maskGameObject=null,this._dynamicTexture=null,r.prototype.destroy.call(this)}})},37911(t,e,i){var n=i(83419),s=i(13045),r=i(37867),o=i(25836);t.exports=new n({Extends:s,initialize:function(t,e){e=e||{},s.call(this,t,"FilterNormalTools"),this._rotation=0,this.viewMatrix=new r,this.setRotation(e.rotation||0),this.rotationSource=e.rotationSource||null,this.facingPower=e.facingPower||1,this.outputRatio=e.outputRatio||!1,this.ratioVector=new o(0,0,1),e.ratioVector&&this.ratioVector.set(e.ratioVector[0],e.ratioVector[1],e.ratioVector[2]),this.ratioRadius=e.ratioRadius||1},getRotation:function(){if(this.rotationSource){if("function"==typeof this.rotationSource)return this.rotationSource();if(this.rotationSource.hasTransformComponent)return this.rotationSource.getWorldTransformMatrix().rotationNormalized}return this._rotation},setRotation:function(t){return this.viewMatrix.identity().rotateZ(t),this._rotation=t,this},updateRotation:function(){if(this.rotationSource){var t=this.getRotation();this.viewMatrix.identity().rotateZ(t),this._rotation=t}return this}})},6379(t,e,i){var n=i(83419),s=i(13045);t.exports=new n({Extends:s,initialize:function(t,e){void 0===e&&(e={}),s.call(this,t,"FilterPanoramaBlur"),this.radius=e.radius||1,this.samplesX=e.samplesX||32,this.samplesY=e.samplesY||16,this.power=e.power||1}})},2195(t,e,i){var n=i(83419),s=i(53427),r=i(13045),o=i(16762),a=new n({Extends:r,initialize:function(t){r.call(this,t,"FilterParallelFilters"),this.top=new s(t),this.bottom=new s(t),this.blend=new o(t)}});s.prototype.addParallelFilters=function(){return this.add(new a(this.camera))},t.exports=a},29861(t,e,i){var n=i(83419),s=i(13045);t.exports=new n({Extends:s,initialize:function(t,e){void 0===e&&(e=1),s.call(this,t,"FilterPixelate"),this.amount=e}})},14366(t,e,i){var n=i(83419),s=i(13045);t.exports=new n({Extends:s,initialize:function(t,e){e||(e={}),s.call(this,t,"FilterQuantize"),this.steps=[8,8,8,8],e.steps&&(this.steps[0]=e.steps[0],this.steps[1]=e.steps[1],this.steps[2]=e.steps[2],this.steps[3]=e.steps[3]),this.gamma=[1,1,1,1],e.gamma&&(this.gamma[0]=e.gamma[0],this.gamma[1]=e.gamma[1],this.gamma[2]=e.gamma[2],this.gamma[3]=e.gamma[3]),this.offset=[0,0,0,0],e.offset&&(this.offset[0]=e.offset[0],this.offset[1]=e.offset[1],this.offset[2]=e.offset[2],this.offset[3]=e.offset[3]),this.mode=e.mode||0,this.dither=!!e.dither}})},63785(t,e,i){var n=i(83419),s=i(13045);t.exports=new n({Extends:s,initialize:function(t,e,i){void 0===i&&(i=null),s.call(this,t,"FilterSampler"),this.allowBaseDraw=!1,this.callback=e,this.region=i}})},62229(t,e,i){var n=i(83419),s=i(13045);t.exports=new n({Extends:s,initialize:function(t,e,i,n,r,o,a,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=.1),void 0===r&&(r=1),void 0===a&&(a=6),void 0===h&&(h=1),s.call(this,t,"FilterShadow"),this.x=e,this.y=i,this.decay=n,this.power=r,this.glcolor=[0,0,0,1],this.samples=a,this.intensity=h,void 0!==o&&(this.color=o)},color:{get:function(){var t=this.glcolor;return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},set:function(t){var e=this.glcolor;e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255}},getPadding:function(){var t=this.paddingOverride;if(t)return this.currentPadding.setTo(t.x,t.y,t.width,t.height),t;var e=this.camera,i=this.decay*this.intensity,n=Math.ceil(Math.abs(this.x)*e.width*i),s=Math.ceil(Math.abs(this.y)*e.height*i);return this.currentPadding.setTo(-n,-s,2*n,2*s),this.currentPadding}})},99534(t,e,i){var n=i(83419),s=i(13045);t.exports=new n({Extends:s,initialize:function(t,e,i,n){s.call(this,t,"FilterThreshold"),this.edge1=[.5,.5,.5,.5],this.edge2=[.5,.5,.5,.5],this.invert=[!1,!1,!1,!1],this.setEdge(e,i),this.setInvert(n)},setEdge:function(t,e){void 0===t&&(t=.5),"number"==typeof t&&(t=[t,t,t,t]),this.edge1[0]=t[0],this.edge1[1]=t[1],this.edge1[2]=t[2],this.edge1[3]=t[3],void 0===e&&(e=t),"number"==typeof e&&(e=[e,e,e,e]),this.edge2[0]=e[0],this.edge2[1]=e[1],this.edge2[2]=e[2],this.edge2[3]=e[3];for(var i=0;i<4;i++)if(this.edge1[i]>this.edge2[i]){var n=this.edge1[i];this.edge1[i]=this.edge2[i],this.edge2[i]=n}return this},setInvert:function(t){return void 0===t&&(t=!1),"boolean"==typeof t&&(t=[t,t,t,t]),this.invert[0]=t[0],this.invert[1]=t[1],this.invert[2]=t[2],this.invert[3]=t[3],this}})},20263(t,e,i){var n=i(83419),s=i(13045),r=i(40987);t.exports=new n({Extends:s,initialize:function(t,e,i,n,o,a,h){void 0===e&&(e=.5),void 0===i&&(i=.5),void 0===n&&(n=.5),void 0===o&&(o=.5),void 0===a&&(a=0),void 0===h&&(h=0),s.call(this,t,"FilterVignette"),this.x=e,this.y=i,this.radius=n,this.strength=o,this.color=new r,this.blendMode=h,this.setColor(a)},setColor:function(t){return"number"==typeof t?r.IntegerToColor(t,this.color):"string"==typeof t?r.HexStringToColor(t,this.color):t.setTo?this.color.setTo(t.red,t.green,t.blue,t.alpha):t?this.color.setTo(t.r||0,t.g||0,t.b||0,t.a||255):this.color.setTo(0,0,0,255),this}})},90002(t,e,i){var n=i(83419),s=i(13045),r=i(79237);t.exports=new n({Extends:s,initialize:function(t,e,i,n,r,o){void 0===e&&(e=.1),s.call(this,t,"FilterWipe"),this.progress=0,this.wipeWidth=e,this.direction=i||0,this.axis=n||0,this.reveal=r||0,this.wipeTexture=null,this.setTexture(o)},setWipeWidth:function(t){return void 0===t&&(t=.1),this.wipeWidth=t,this},setLeftToRight:function(){return this.direction=0,this.axis=0,this},setRightToLeft:function(){return this.direction=1,this.axis=0,this},setTopToBottom:function(){return this.direction=1,this.axis=1,this},setBottomToTop:function(){return this.direction=0,this.axis=1,this},setWipeEffect:function(){return this.reveal=0,this.progress=0,this},setRevealEffect:function(){return this.setTexture(),this.reveal=1,this.progress=0,this},setTexture:function(t){return void 0===t&&(t="__DEFAULT"),t instanceof r?this.wipeTexture=t:this.wipeTexture=this.camera.scene.sys.textures.get(t)||this.camera.scene.sys.textures.get("__DEFAULT"),this},setProgress:function(t){return this.progress=t,this}})},11889(t,e,i){t.exports={Controller:i(13045),Barrel:i(10189),Blend:i(16762),Blocky:i(37597),Blur:i(88344),Bokeh:i(47564),ColorMatrix:i(77011),CombineColorMatrix:i(95200),Displacement:i(16898),Glow:i(42652),GradientMap:i(43927),ImageLight:i(84714),Key:i(51890),Mask:i(97797),NormalTools:i(37911),PanoramaBlur:i(6379),ParallelFilters:i(2195),Pixelate:i(29861),Quantize:i(14366),Sampler:i(63785),Shadow:i(62229),Threshold:i(99534),Vignette:i(20263),Wipe:i(90002)}},25305(t,e,i){var n=i(10312),s=i(23568);t.exports=function(t,e,i){e.x=s(i,"x",0),e.y=s(i,"y",0),e.depth=s(i,"depth",0),e.flipX=s(i,"flipX",!1),e.flipY=s(i,"flipY",!1);var r=s(i,"scale",null);"number"==typeof r?e.setScale(r):null!==r&&(e.scaleX=s(r,"x",1),e.scaleY=s(r,"y",1));var o=s(i,"scrollFactor",null);"number"==typeof o?e.setScrollFactor(o):null!==o&&(e.scrollFactorX=s(o,"x",1),e.scrollFactorY=s(o,"y",1)),e.rotation=s(i,"rotation",0);var a=s(i,"angle",null);null!==a&&(e.angle=a),e.alpha=s(i,"alpha",1);var h=s(i,"origin",null);if("number"==typeof h)e.setOrigin(h);else if(null!==h){var l=s(h,"x",.5),u=s(h,"y",.5);e.setOrigin(l,u)}return e.blendMode=s(i,"blendMode",n.NORMAL),e.visible=s(i,"visible",!0),s(i,"add",!0)&&t.sys.displayList.add(e),e.preUpdate&&t.sys.updateList.add(e),e}},13059(t,e,i){var n=i(23568);t.exports=function(t,e){var i=n(e,"anims",null);if(null===i)return t;if("string"==typeof i)t.anims.play(i);else if("object"==typeof i){var s=t.anims,r=n(i,"key",void 0);if(r){var o=n(i,"startFrame",void 0),a=n(i,"delay",0),h=n(i,"repeat",0),l=n(i,"repeatDelay",0),u=n(i,"yoyo",!1),d=n(i,"play",!1),c=n(i,"delayedPlay",0),f={key:r,delay:a,repeat:h,repeatDelay:l,yoyo:u,startFrame:o};d?s.play(f):c>0?s.playAfterDelay(f,c):s.load(f)}}return t}},8050(t,e,i){var n=i(83419),s=i(73162),r=i(37277),o=i(51708),a=i(44594),h=i(19186),l=new n({Extends:s,initialize:function(t){s.call(this,t),this.sortChildrenFlag=!1,this.scene=t,this.systems=t.sys,this.events=t.sys.events,this.addCallback=this.addChildCallback,this.removeCallback=this.removeChildCallback,this.events.once(a.BOOT,this.boot,this),this.events.on(a.START,this.start,this)},boot:function(){this.events.once(a.DESTROY,this.destroy,this)},addChildCallback:function(t){t.displayList&&t.displayList!==this&&t.removeFromDisplayList(),t.parentContainer&&t.parentContainer.remove(t),t.displayList||(this.queueDepthSort(),t.displayList=this,t.emit(o.ADDED_TO_SCENE,t,this.scene),this.events.emit(a.ADDED_TO_SCENE,t,this.scene))},removeChildCallback:function(t){this.queueDepthSort(),t.displayList=null,t.emit(o.REMOVED_FROM_SCENE,t,this.scene),this.events.emit(a.REMOVED_FROM_SCENE,t,this.scene)},start:function(){this.events.once(a.SHUTDOWN,this.shutdown,this)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(h(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(t,e){return t._depth-e._depth},getChildren:function(){return this.list},shutdown:function(){for(var t=this.list,e=t.length;e--;)t[e]&&t[e].destroy(!0);t.length=0,this.events.off(a.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(a.START,this.start,this),this.scene=null,this.systems=null,this.events=null}});r.register("DisplayList",l,"displayList"),t.exports=l},95643(t,e,i){var n=i(83419),s=i(31401),r=i(53774),o=i(45893),a=i(50792),h=i(51708),l=i(44594),u=new n({Extends:a,Mixins:[s.Filters,s.RenderSteps],initialize:function(t,e){a.call(this),this.scene=t,this.displayList=null,this.type=e,this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.vertexRoundMode="safeAuto",this.input=null,this.body=null,this.ignoreDestroy=!1,this.isDestroyed=!1,this.addRenderStep&&this.addRenderStep(this.renderWebGL),this.on(h.ADDED_TO_SCENE,this.addedToScene,this),this.on(h.REMOVED_FROM_SCENE,this.removedFromScene,this),t.sys.queueDepthSort()},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=t,this},setState:function(t){return this.state=t,this},setDataEnabled:function(){return this.data||(this.data=new o(this)),this},setData:function(t,e){return this.data||(this.data=new o(this)),this.data.set(t,e),this},incData:function(t,e){return this.data||(this.data=new o(this)),this.data.inc(t,e),this},toggleData:function(t){return this.data||(this.data=new o(this)),this.data.toggle(t),this},getData:function(t){return this.data||(this.data=new o(this)),this.data.get(t)},setInteractive:function(t,e,i){return this.scene.sys.input.enable(this,t,e,i),this},disableInteractive:function(t){return void 0===t&&(t=!1),this.scene.sys.input.disable(this,t),this},removeInteractive:function(t){return void 0===t&&(t=!1),this.scene.sys.input.clear(this),t&&this.scene.sys.input.resetCursor(),this.input=void 0,this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return r(this)},willRender:function(t){return!(!(!this.displayList||!this.displayList.active||this.displayList.willRender(t))||u.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},willRoundVertices:function(t,e){switch(this.vertexRoundMode){case"safe":return e;case"safeAuto":return e&&t.roundPixels;case"full":return!0;case"fullAuto":return t.roundPixels;default:return!1}},setVertexRoundMode:function(t){return this.vertexRoundMode=t,this},getIndexList:function(){for(var t=this,e=this.parentContainer,i=[];e;)if(i.unshift(e.getIndex(t)),t=e,e.parentContainer)e=e.parentContainer;else break;return this.displayList?i.unshift(this.displayList.getIndex(t)):i.unshift(this.scene.sys.displayList.getIndex(t)),i},addToDisplayList:function(t){return void 0===t&&(t=this.scene.sys.displayList),this.displayList&&this.displayList!==t&&this.removeFromDisplayList(),t.exists(this)||(this.displayList=t,t.add(this,!0),t.queueDepthSort(),this.emit(h.ADDED_TO_SCENE,this,this.scene),t.events.emit(l.ADDED_TO_SCENE,this,this.scene)),this},addToUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.add(this),this},removeFromDisplayList:function(){var t=this.displayList||this.scene.sys.displayList;return t&&t.exists(this)&&(t.remove(this,!0),t.queueDepthSort(),this.displayList=null,this.emit(h.REMOVED_FROM_SCENE,this,this.scene),t.events.emit(l.REMOVED_FROM_SCENE,this,this.scene)),this},removeFromUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.remove(this),this},getDisplayList:function(){var t=null;return this.parentContainer?t=this.parentContainer.list:this.displayList&&(t=this.displayList.list),t},destroy:function(t){this.scene&&!this.ignoreDestroy&&(void 0===t&&(t=!1),this.isDestroyed=!0,this.preDestroy&&this.preDestroy.call(this),this.emit(h.DESTROY,this,t),this.removeAllListeners(),this.removeFromDisplayList(),this.removeFromUpdateList(),this.input&&(this.scene.sys.input.clear(this),this.input=void 0),this.data&&(this.data.destroy(),this.data=void 0),this.body&&(this.body.destroy(),this.body=void 0),this.filterCamera&&(this.filterCamera.destroy(),this.filterCamera=void 0),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0)}});u.RENDER_MASK=15,t.exports=u},44603(t,e,i){var n=i(83419),s=i(37277),r=i(44594),o=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.events=t.sys.events,this.displayList,this.updateList,this.events.once(r.BOOT,this.boot,this),this.events.on(r.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(r.DESTROY,this.destroy,this)},start:function(){this.events.once(r.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.events.off(r.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(r.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});o.register=function(t,e){o.prototype.hasOwnProperty(t)||(o.prototype[t]=e)},o.remove=function(t){o.prototype.hasOwnProperty(t)&&delete o.prototype[t]},s.register("GameObjectCreator",o,"make"),t.exports=o},39429(t,e,i){var n=i(83419),s=i(37277),r=i(44594),o=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.events=t.sys.events,this.displayList,this.updateList,this.events.once(r.BOOT,this.boot,this),this.events.on(r.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(r.DESTROY,this.destroy,this)},start:function(){this.events.once(r.SHUTDOWN,this.shutdown,this)},existing:function(t){return(t.renderCanvas||t.renderWebGL)&&this.displayList.add(t),t.preUpdate&&this.updateList.add(t),t},shutdown:function(){this.events.off(r.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(r.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});o.register=function(t,e){o.prototype.hasOwnProperty(t)||(o.prototype[t]=e)},o.remove=function(t){o.prototype.hasOwnProperty(t)&&delete o.prototype[t]},s.register("GameObjectFactory",o,"add"),t.exports=o},91296(t,e,i){var n=i(61340),s=new n,r=new n,o=new n,a=new n,h={camera:s,sprite:r,calc:o,cameraExternal:a};t.exports=function(t,e,i,n){return n?a.loadIdentity():a.copyFrom(e.matrixExternal),s.copyWithScrollFactorFrom(n?e.matrix:e.matrixCombined,e.scrollX,e.scrollY,t.scrollFactorX,t.scrollFactorY),o.copyFrom(s),i&&o.multiply(i),r.applyITRS(t.x,t.y,t.rotation,t.scaleX,t.scaleY),o.multiply(r),h}},45027(t,e,i){var n=i(83419),s=i(25774),r=i(37277),o=i(44594),a=new n({Extends:s,initialize:function(t){s.call(this),this.checkQueue=!0,this.scene=t,this.systems=t.sys,t.sys.events.once(o.BOOT,this.boot,this),t.sys.events.on(o.START,this.start,this)},boot:function(){this.systems.events.once(o.DESTROY,this.destroy,this)},start:function(){var t=this.systems.events;t.on(o.PRE_UPDATE,this.update,this),t.on(o.UPDATE,this.sceneUpdate,this),t.once(o.SHUTDOWN,this.shutdown,this)},sceneUpdate:function(t,e){for(var i=this._active,n=i.length,s=0;s<n;s++){var r=i[s];r.active&&r.preUpdate.call(r,t,e)}},shutdown:function(){for(var t=this._active.length;t--;)this._active[t].destroy(!0);for(t=this._pending.length;t--;)this._pending[t].destroy(!0);for(t=this._destroy.length;t--;)this._destroy[t].destroy(!0);this._toProcess=0,this._pending=[],this._active=[],this._destroy=[],this.removeAllListeners();var e=this.systems.events;e.off(o.PRE_UPDATE,this.update,this),e.off(o.UPDATE,this.sceneUpdate,this),e.off(o.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.systems.events.off(o.START,this.start,this),this.scene=null,this.systems=null}});r.register("UpdateList",a,"updateList"),t.exports=a},3217(t){var e={frame:null,uvSource:null},i={quad:new Float32Array(8)};t.exports=function(t,n,s,r,o,a,h,l,u){e.frame=s.frame,e.uvSource=o;var d=r.x-s.displayOriginX+a,c=r.y-s.displayOriginY+h,f=d+r.w,p=c+r.h,g=l.a,m=l.b,v=l.c,x=l.d,y=l.e,T=l.f;i.quad[0]=d*g+c*v+y,i.quad[1]=d*m+c*x+T,i.quad[2]=d*g+p*v+y,i.quad[3]=d*m+p*x+T,i.quad[4]=f*g+p*v+y,i.quad[5]=f*m+p*x+T,i.quad[6]=f*g+c*v+y,i.quad[7]=f*m+c*x+T,n.run(t,s,void 0,0,e,i,u)}}
1,53048(t){t.exports=function(t,e,i,n){if(void 0===i&&(i=!1),void 0===n)return{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};var s,r,o,a=t.text,h=a.length,l=t.maxWidth,u=t.wordWrapCharCode,d=Number.MAX_VALUE,c=Number.MAX_VALUE,f=0,p=0,g=t.fontData.chars,m=t.fontData.lineHeight,v=t.letterSpacing,x=t.lineSpacing,y=0,T=0,w=0,b=null,S=t._align,C=0,E=0,A=t.fontSize/t.fontData.size,_=A*t.scaleX,M=A*t.scaleY,R=null,O=0,P=[],L=Number.MAX_VALUE,D=0,F=0,I=0,N=[],B=[],k=null;if(l>0){o=a.split("\n");var U=[];for(s=0;s<o.length;s++){var z=o[s],Y="",X="",W="",G="";for(r=0;r<z.length;r++)w=z.charCodeAt(r),Y+=z[r],(w===u||r===z.length-1)&&(function(t,e){for(var i=0,n=0;n<t.length;n++){var s=t.charCodeAt(n),r=e.chars[s];r&&(i+=r.xAdvance)}return i*_}(G=W+Y,t.fontData)<=l?W=G:(X=X.slice(0,-1),X+=(X?"\n":"")+W,W=Y),Y="");X=X.slice(0,-1),X+=(X?"\n":"")+W,U.push(X)}a=U.join("\n"),n.wrappedText=a,h=a.length}var V=0;for(s=0;s<h;s++){if(10===(w=a.charCodeAt(s))){null!==k&&(N.push({word:k.word,i:k.i,x:k.x*_,y:k.y*M,w:k.w*_,h:k.h*M}),k=null),R=null,P[F]=I,I>D&&(D=I),I<L&&(L=I),I=0,y=0,T=(m+x)*++F;continue}if(b=g[w]){if(C=y,E=T,null!==R){var H=b.kerning[O];C+=void 0!==H?H:0}d>C&&(d=C),c>E&&(c=E);var j=C+b.xAdvance,q=E+m;f<j&&(f=j),p<q&&(p=q);var K=b.xOffset+b.xAdvance+(void 0!==H?H:0);w===u?null!==k&&(N.push({word:k.word,i:k.i,x:k.x*_,y:k.y*M,w:k.w*_,h:k.h*M}),k=null):(null===k&&(k={word:"",i:V,x:y,y:T,w:0,h:m}),k.word=k.word.concat(a[s]),k.w+=K),B.push({i:V,idx:s,char:a[s],code:w,x:(b.xOffset+C)*A,y:(b.yOffset+T)*A,w:b.width*A,h:b.height*A,t:T*A,r:j*A,b:m*A,line:F,glyph:b}),y+=b.xAdvance+v+(void 0!==H?H:0),R=b,O=w,I=j*A,V++}}if(null!==k&&N.push({word:k.word,i:k.i,x:k.x*_,y:k.y*M,w:k.w*_,h:k.h*M}),P[F]=I,I>D&&(D=I),I<L&&(L=I),S>0)for(var Z=0;Z<B.length;Z++){var Q=B[Z];if(1===S){var J=(D-P[Q.line])/2;Q.x+=J,Q.r+=J}else if(2===S){var $=D-P[Q.line];Q.x+=$,Q.r+=$}}var tt=n.local,te=n.global;return o=n.lines,tt.x=d*A,tt.y=c*A,tt.width=f*A,tt.height=p*A,te.x=t.x-t._displayOriginX+d*_,te.y=t.y-t._displayOriginY+c*M,te.width=f*_,te.height=p*M,o.shortest=L,o.longest=D,o.lengths=P,e&&(tt.x=Math.ceil(tt.x),tt.y=Math.ceil(tt.y),tt.width=Math.ceil(tt.width),tt.height=Math.ceil(tt.height),te.x=Math.ceil(te.x),te.y=Math.ceil(te.y),te.width=Math.ceil(te.width),te.height=Math.ceil(te.height),o.shortest=Math.ceil(L),o.longest=Math.ceil(D)),i&&(t._displayOriginX=t.originX*tt.width,t._displayOriginY=t.originY*tt.height,te.x=t.x-t._displayOriginX*t.scaleX,te.y=t.y-t._displayOriginY*t.scaleY,e&&(te.x=Math.ceil(te.x),te.y=Math.ceil(te.y))),n.words=N,n.characters=B,n.lines.height=m,n.scale=A,n.scaleX=t.scaleX,n.scaleY=t.scaleY,n}},61327(t,e,i){var n=i(21859);t.exports=function(t,e,i,s,r,o,a){var h=t.sys.textures.get(i),l=h.get(s),u=t.sys.cache.xml.get(r);if(!l||!u)return!1;var d=n(u,l,o,a,h);return t.sys.cache.bitmapFont.add(e,{data:d,texture:i,frame:s,fromAtlas:!0}),!0}},6925(t,e,i){var n=i(35154);t.exports=function(t,e){var i=e.width,s=e.height,r=Math.floor(i/2),o=Math.floor(s/2),a=n(e,"chars","");if(""!==a){var h=n(e,"image",""),l=t.sys.textures.getFrame(h),u=l.cutX,d=l.cutY,c=l.source.width,f=l.source.height,p=n(e,"offset.x",0),g=n(e,"offset.y",0),m=n(e,"spacing.x",0),v=n(e,"spacing.y",0),x=n(e,"lineSpacing",0),y=n(e,"charsPerRow",null);null===y&&(y=c/i)>a.length&&(y=a.length);for(var T=p,w=g,b={retroFont:!0,font:h,size:i,lineHeight:s+x,chars:{}},S=0,C=0;C<a.length;C++){var E=a.charCodeAt(C),A=(u+T)/c,_=1-(d+w)/f,M=(u+T+i)/c,R=1-(d+w+s)/f;b.chars[E]={x:T,y:w,width:i,height:s,centerX:r,centerY:o,xOffset:0,yOffset:0,xAdvance:i,data:{},kerning:{},u0:A,v0:_,u1:M,v1:R},++S===y?(S=0,T=p,w+=s+v):T+=i+m}return{data:b,frame:null,texture:h}}}},21859(t){function e(t,e){return parseInt(t.getAttribute(e),10)}t.exports=function(t,i,n,s,r){void 0===n&&(n=0),void 0===s&&(s=0);var o=i.cutX,a=i.cutY,h=i.source.width,l=i.source.height,u=i.sourceIndex,d={},c=t.getElementsByTagName("info")[0],f=t.getElementsByTagName("common")[0];d.font=c.getAttribute("face"),d.size=e(c,"size"),d.lineHeight=e(f,"lineHeight")+s,d.chars={};var p=t.getElementsByTagName("char"),g=void 0!==i&&i.trimmed;if(g)var m=i.data.spriteSourceSize.x,v=i.data.spriteSourceSize.y;for(var x=0;x<p.length;x++){var y=p[x],T=e(y,"id"),w=String.fromCharCode(T),b=e(y,"x"),S=e(y,"y"),C=e(y,"width"),E=e(y,"height");g&&(b-=m,S-=v);var A=(o+b)/h,_=1-(a+S)/l,M=(o+b+C)/h,R=1-(a+S+E)/l;d.chars[T]={x:b,y:S,width:C,height:E,centerX:Math.floor(C/2),centerY:Math.floor(E/2),xOffset:e(y,"xoffset"),yOffset:e(y,"yoffset"),xAdvance:e(y,"xadvance")+n,data:{},kerning:{},u0:A,v0:_,u1:M,v1:R},r&&0!==C&&0!==E&&r.add(w,u,b+i.data.cut.x,S+i.data.cut.y,C,E)}var O=t.getElementsByTagName("kerning");for(x=0;x<O.length;x++){var P=O[x],L=e(P,"first"),D=e(P,"second"),F=e(P,"amount");d.chars[D].kerning[L]=F}return d}},196(t,e,i){var n=i(87662);t.exports=i(79291)(!1,{Parse:i(6925)},n)},87662(t){t.exports={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"}},2638(t,e,i){var n=i(22186);t.exports=new(i(83419))({Extends:n,Mixins:[i(12310)],initialize:function(t,e,
vendor: 9,155 bytes, line 1
1i,s,r,o,a){n.call(this,t,e,i,s,r,o,a),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(t,e){return this.cropWidth=t,this.cropHeight=e,this},setDisplayCallback:function(t){return this.displayCallback=t,this},setScrollX:function(t){return this.scrollX=t,this},setScrollY:function(t){return this.scrollY=t,this}})},86741(t,e,i){var n=i(20926);t.exports=function(t,e,i,s){var r=e._text,o=r.length,a=t.currentContext;if(0!==o&&n(t,a,e,i,s)){i.addToRenderList(e);var h=e.fromAtlas?e.frame:e.texture.frames.__BASE,l=e.displayCallback,u=e.callbackData,d=e.fontData.chars,c=e.fontData.lineHeight,f=e._letterSpacing,p=0,g=0,m=0,v=null,x=0,y=0,T=0,w=0,b=0,S=0,C=null,E=0,A=e.frame.source.image,_=h.cutX,M=h.cutY,R=0,O=0,P=e._fontSize/e.fontData.size,L=e._align,D=0,F=0;e.getTextBounds(!1);var I=e._bounds.lines;1===L?F=(I.longest-I.lengths[0])/2:2===L&&(F=I.longest-I.lengths[0]),a.translate(-e.displayOriginX,-e.displayOriginY);var N=i.roundPixels;e.cropWidth>0&&e.cropHeight>0&&(a.beginPath(),a.rect(0,0,e.cropWidth,e.cropHeight),a.clip());for(var B=0;B<o;B++){if(O=P,R=0,10===(m=r.charCodeAt(B))){D++,1===L?F=(I.longest-I.lengths[D])/2:2===L&&(F=I.longest-I.lengths[D]),p=0,g+=c,C=null;continue}if(v=d[m]){if(x=_+v.x,y=M+v.y,T=v.width,w=v.height,b=v.xOffset+p-e.scrollX,S=v.yOffset+g-e.scrollY,null!==C){var k=v.kerning[E];b+=void 0!==k?k:0}if(l){u.index=B,u.charCode=m,u.x=b,u.y=S,u.scale=O,u.rotation=R,u.data=v.data;var U=l(u);b=U.x,S=U.y,O=U.scale,R=U.rotation}b*=O,S*=O,b+=F,p+=v.xAdvance+f+(void 0!==k?k:0),C=v,E=m,0!==T&&0!==w&&32!==m&&(N&&(b=Math.round(b),S=Math.round(S)),a.save(),a.translate(b,S),a.rotate(R),a.scale(O,O),a.drawImage(A,x,y,T,w,0,0,T,w),a.restore())}}a.restore()}}},11164(t,e,i){var n=i(2638),s=i(25305),r=i(44603),o=i(23568);r.register("dynamicBitmapText",function(t,e){void 0===t&&(t={});var i=o(t,"font",""),r=o(t,"text",""),a=o(t,"size",!1),h=new n(this.scene,0,0,i,r,a);return void 0!==e&&(t.add=e),s(this.scene,h,t),h})},72566(t,e,i){var n=i(2638);i(39429).register("dynamicBitmapText",function(t,e,i,s,r){return this.displayList.add(new n(this.scene,t,e,i,s,r))})},12310(t,e,i){var n=i(29747),s=n,r=n;s=i(73482),t.exports={renderWebGL:s,renderCanvas:r=i(86741)}},73482(t,e,i){var n=i(91296),s=i(84322),r=i(61340),o=i(70554),a=new r,h={frame:null,uvSource:null},l={tintEffect:s.MULTIPLY,tintTopLeft:0,tintTopRight:0,tintBottomLeft:0,tintBottomRight:0};t.exports=function(t,e,i,r){var u,d,c=e.text,f=c.length;if(0!==f){var p=i.camera;p.addToRenderList(e);var g=i,m=e.customRenderNodes.Submitter||e.defaultRenderNodes.Submitter,v=n(e,p,r,!i.useCanvas),x=v.sprite,y=v.calc,T=e.cropWidth>0||e.cropHeight>0;T&&((g=i.getClone()).setScissorEnable(!0),g.setScissorBox(y.tx,y.ty,e.cropWidth*y.scaleX,e.cropHeight*y.scaleY),g.use()),h.frame=e.frame;var w=s.MULTIPLY,b=o.getTintAppendFloatAlpha(e.tintTopLeft,e._alphaTL),S=o.getTintAppendFloatAlpha(e.tintTopRight,e._alphaTR),C=o.getTintAppendFloatAlpha(e.tintBottomLeft,e._alphaBL),E=o.getTintAppendFloatAlpha(e.tintBottomRight,e._alphaBR),A=0,_=0,M=0,R=0,O=e.letterSpacing,P=0,L=0,D=e.scrollX,F=e.scrollY,I=e.fontData,N=I.chars,B=I.lineHeight,k=e.fontSize/I.size,U=0,z=e._align,Y=0,X=0,W=e.getTextBounds(!1);e.maxWidth>0&&(f=(c=W.wrappedText).length);var G=e._bounds.lines;1===z?X=(G.longest-G.lengths[0])/2:2===z&&(X=G.longest-G.lengths[0]);for(var V=e.displayCallback,H=e.callbackData,j=0;j<f;j++){if(10===(M=c.charCodeAt(j))){Y++,1===z?X=(G.longest-G.lengths[Y])/2:2===z&&(X=G.longest-G.lengths[Y]),A=0,_+=B,d=null;continue}if(u=N[M]){h.uvSource=u,P=u.width,L=u.height;var q=u.xOffset+A-D,K=u.yOffset+_-F;if(null!==d){var Z=u.kerning[R]||0;q+=Z,A+=Z}if(A+=u.xAdvance+O,d=u,R=M,0!==P&&0!==L&&32!==M){if(k=e.fontSize/e.fontData.size,U=0,V){H.color=0,H.tintMode=w,H.tint.topLeft=b,H.tint.topRight=S,H.tint.bottomLeft=C,H.tint.bottomRight=E,H.index=j,H.charCode=M,H.x=q,H.y=K,H.scale=k,H.rotation=U,H.data=u.data;var Q=V(H);q=Q.x,K=Q.y,k=Q.scale,U=Q.rotation,Q.color?(b=Q.color,S=Q.color,C=Q.color,E=Q.color):(b=Q.tint.topLeft,S=Q.tint.topRight,C=Q.tint.bottomLeft,E=Q.tint.bottomRight),w=Q.tintMode,b=o.getTintAppendFloatAlpha(b,e._alphaTL),S=o.getTintAppendFloatAlpha(S,e._alphaTR),C=o.getTintAppendFloatAlpha(C,e._alphaBL),E=o.getTintAppendFloatAlpha(E,e._alphaBR)}l.tintEffect=w,l.tintTopLeft=b,l.tintTopRight=S,l.tintBottomLeft=C,l.tintBottomRight=E,q*=k,K*=k,q-=e.displayOriginX,K-=e.displayOriginY,q+=X,a.applyITRS(q,K,U,k,k),y.multiply(a,x);var J=P,$=L,tt=x.e,te=x.f,ti=$*x.c+x.e,tn=$*x.d+x.f,ts=J*x.a+$*x.c+x.e,tr=J*x.b+$*x.d+x.f,to=J*x.a+x.e,ta=J*x.b+x.f;m.run(g,e,void 0,0,h,{quad:[tt,te,ti,tn,ts,tr,to,ta]},l)}}}T&&i.use()}}},22186(t,e,i){var n=i(70972),s=i(83419),r=i(45319),o=i(31401),a=i(95643),h=i(53048),l=i(61327),u=i(21859),d=i(87841),c=i(18658),f=i(84322),p=new s({Extends:a,Mixins:[o.Alpha,o.BlendMode,o.Depth,o.GetBounds,o.Lighting,o.Mask,o.Origin,o.RenderNodes,o.ScrollFactor,o.Texture,o.Tint,o.Transform,o.Visible,c],initialize:function(t,e,i,n,s,r,o){void 0===s&&(s=""),void 0===o&&(o=0),a.call(this,t,"BitmapText"),this.font=n;var l=this.scene.sys.cache.bitmapFont.get(n);l||console.warn("Invalid BitmapText key: "+n),this.fontData=l.data,this._text="",this._fontSize=r||this.fontData.size,this._letterSpacing=0,this._lineSpacing=0,this._align=o,this._bounds=h(),this._dirty=!0,this._maxWidth=0,this.wordWrapCharCode=32,this.charColors=[],this.dropShadowX=0,this.dropShadowY=0,this.dropShadowColor=0,this.dropShadowAlpha=.5,this.fromAtlas=l.fromAtlas,this.setTexture(l.texture,l.frame),this.setPosition(e,i),this.setOrigin(0,0),this.initRenderNodes(this._defaultRenderNodesMap),this.setText(s)},_defaultRenderNodesMap:{get:function(){return n}},setLeftAlign:function(){return this._align=p.ALIGN_LEFT,this._dirty=!0,this},setCenterAlign:function(){return this._align=p.ALIGN_CENTER,this._dirty=!0,this},setRightAlign:function(){return this._align=p.ALIGN_RIGHT,this._dirty=!0,this},setFontSize:function(t){return this._fontSize=t,this._dirty=!0,this},setLetterSpacing:function(t){return void 0===t&&(t=0),this._letterSpacing=t,this._dirty=!0,this},setLineSpacing:function(t){return void 0===t&&(t=0),this.lineSpacing=t,this},setText:function(t){return t||0===t||(t=""),Array.isArray(t)&&(t=t.join("\n")),t!==this.text&&(this._text=t.toString(),this._dirty=!0,this.updateDisplayOrigin()),this},setDropShadow:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=.5),this.dropShadowX=t,this.dropShadowY=e,this.dropShadowColor=i,this.dropShadowAlpha=n,this},setCharacterTint:function(t,e,i,n,s,o,a){void 0===t&&(t=0),void 0===e&&(e=1),void 0===i&&(i=f.MULTIPLY),void 0===n&&(n=-1),void 0===s&&(s=n,o=n,a=n);var h=this.text.length;-1===e&&(e=h),t<0&&(t=h+t),t=r(t,0,h-1);for(var l=r(t+e,t,h),u=this.charColors,d=t;d<l;d++){var c=u[d];if(-1===n)u[d]=null;else{var p=i;c?(c.tintEffect=p,c.tintTL=n,c.tintTR=s,c.tintBL=o,c.tintBR=a):u[d]={tintEffect:p,tintTL:n,tintTR:s,tintBL:o,tintBR:a}}}return this},setWordTint:function(t,e,i,n,s,r,o){void 0===e&&(e=1);for(var a=this.getTextBounds().words,h="number"==typeof t,l=0,u=0;u<a.length;u++){var d=a[u];if((h&&u===t||!h&&d.word===t)&&(this.setCharacterTint(d.i,d.word.length,i,n,s,r,o),++l===e))break}return this},getTextBounds:function(t){var e=this._bounds;return(this._dirty||t||this.scaleX!==e.scaleX||this.scaleY!==e.scaleY)&&(h(this,t,!0,e),this._dirty=!1),e},getCharacterAt:function(t,e,i){for(var n=this.getLocalPoint(t,e,null,i),s=this.getTextBounds().characters,r=new d,o=0;o<s.length;o++){var a=s[o];if(r.setTo(a.x,a.t,a.r-a.x,a.b),r.contains(n.x,n.y))return a}return null},updateDisplayOrigin:function(){return this._dirty=!0,this.getTextBounds(!1),this},setFont:function(t,e,i){void 0===e&&(e=this._fontSize),void 0===i&&(i=this._align);var n=this.scene.sys.cache.bitmapFont.get(t);return n&&(this.font=t,this.fontData=n.data,this._fontSize=e,this._align=i,this.fromAtlas=!0===n.fromAtlas,this.setTexture(n.texture,n.frame),h(this,!1,!0,this._bounds)),this},setMaxWidth:function(t,e){return this._maxWidth=t,this._dirty=!0,void 0!==e&&(this.wordWrapCharCode=e),this},setDisplaySize:function(t,e){this.setScale(1,1),this.getTextBounds(!1);var i=t/this.width,n=e/this.height;return this.setScale(i,n),this},align:{set:function(t){this._align=t,this._dirty=!0},get:function(){return this._align}},text:{set:function(t){this.setText(t)},get:function(){return this._text}},fontSize:{set:function(t){this._fontSize=t,this._dirty=!0},get:function(){return this._fontSize}},letterSpacing:{set:function(t){this._letterSpacing=t,this._dirty=!0},get:function(){return this._letterSpacing}},lineSpacing:{set:function(t){this._lineSpacing=t,this._dirty=!0},get:function(){return this._lineSpacing}},maxWidth:{set:function(t){this._maxWidth=t,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.he
1ight}},displayWidth:{set:function(t){this.setScaleX(1),this.getTextBounds(!1);var e=t/this.width;this.setScaleX(e)},get:function(){return this.width}},displayHeight:{set:function(t){this.setScaleY(1),this.getTextBounds(!1);var e=t/this.height;this.setScaleY(e)},get:function(){return this.height}},toJSON:function(){var t=o.ToJSON(this);return t.data={font:this.font,text:this.text,fontSize:this.fontSize,letterSpacing:this.letterSpacing,lineSpacing:this.lineSpacing,align:this.align},t},preDestroy:function(){this.charColors.length=0,this._bounds=null,this.fontData=null}});p.ALIGN_LEFT=0,p.ALIGN_CENTER=1,p.ALIGN_RIGHT=2,p.ParseFromAtlas=l,p.ParseXMLBitmapFont=u,t.exports=p},37289(t,e,i){var n=i(20926);t.exports=function(t,e,i,s){var r=e._text,o=r.length,a=t.currentContext;if(0!==o&&n(t,a,e,i,s)){i.addToRenderList(e);var h=e.fromAtlas?e.frame:e.texture.frames.__BASE,l=e.fontData.chars,u=e.fontData.lineHeight,d=e._letterSpacing,c=e._lineSpacing,f=0,p=0,g=0,m=null,v=0,x=0,y=0,T=0,w=0,b=0,S=null,C=0,E=h.source.image,A=h.cutX,_=h.cutY,M=e._fontSize/e.fontData.size,R=e._align,O=0,P=0,L=e.getTextBounds(!1);e.maxWidth>0&&(o=(r=L.wrappedText).length);var D=e._bounds.lines;1===R?P=(D.longest-D.lengths[0])/2:2===R&&(P=D.longest-D.lengths[0]),a.translate(-e.displayOriginX,-e.displayOriginY);for(var F=i.roundPixels,I=0;I<o;I++){if(10===(g=r.charCodeAt(I))){O++,1===R?P=(D.longest-D.lengths[O])/2:2===R&&(P=D.longest-D.lengths[O]),f=0,p+=u+c,S=null;continue}if(m=l[g]){if(v=A+m.x,x=_+m.y,y=m.width,T=m.height,w=m.xOffset+f,b=m.yOffset+p,null!==S){var N=m.kerning[C];w+=void 0!==N?N:0}w*=M,b*=M,w+=P,f+=m.xAdvance+d+(void 0!==N?N:0),S=m,C=g,0!==y&&0!==T&&32!==g&&(F&&(w=Math.round(w),b=Math.round(b)),a.save(),a.translate(w,b),a.scale(M,M),a.drawImage(E,v,x,y,T,0,0,y,T),a.restore())}}a.restore()}}},57336(t,e,i){var n=i(22186),s=i(25305),r=i(44603),o=i(23568),a=i(35154);r.register("bitmapText",function(t,e){void 0===t&&(t={});var i=a(t,"font",""),r=o(t,"text",""),h=o(t,"size",!1),l=a(t,"align",0),u=new n(this.scene,0,0,i,r,h,l);return void 0!==e&&(t.add=e),s(this.scene,u,t),u})},34914(t,e,i){var n=i(22186);i(39429).register("bitmapText",function(t,e,i,s,r,o){return this.displayList.add(new n(this.scene,t,e,i,s,r,o))})},18658(t,e,i){var n=i(29747),s=n,r=n;s=i(33590),t.exports={renderWebGL:s,renderCanvas:r=i(37289)}},33590(t,e,i){var n=i(3217),s=i(91296),r=i(70554),o={tintEffect:0,tintTopLeft:0,tintTopRight:0,tintBottomLeft:0,tintBottomRight:0},a={tintEffect:0,tintTopLeft:0,tintTopRight:0,tintBottomLeft:0,tintBottomRight:0};t.exports=function(t,e,i,h){var l,u,d;if(0!==e._text.length){var c=i.camera;c.addToRenderList(e);var f=e.customRenderNodes.Submitter||e.defaultRenderNodes.Submitter,p=s(e,c,h,!i.useCanvas).calc,g=e.charColors,m=r.getTintAppendFloatAlpha;o.tintEffect=e.tintMode,o.tintTopLeft=m(e.tintTopLeft,e._alphaTL),o.tintTopRight=m(e.tintTopRight,e._alphaTR),o.tintBottomLeft=m(e.tintBottomLeft,e._alphaBL),o.tintBottomRight=m(e.tintBottomRight,e._alphaBR);var v=e.getTextBounds(!1).characters,x=e.dropShadowX,y=e.dropShadowY;if(0!==x||0!==y){var T=e.dropShadowColor,w=e.dropShadowAlpha;for(l=0,a.tintEffect=1,a.tintTopLeft=m(T,w*e._alphaTL),a.tintTopRight=m(T,w*e._alphaTR),a.tintBottomLeft=m(T,w*e._alphaBL),a.tintBottomRight=m(T,w*e._alphaBR);l<v.length;l++)d=(u=v[l]).glyph,32!==u.code&&0!==d.width&&0!==d.height&&n(i,f,e,u,d,x,y,p,a)}for(l=0;l<v.length;l++)if(d=(u=v[l]).glyph,32!==u.code&&0!==d.width&&0!==d.height)if(g[u.i]){var b=g[u.i];a.tintEffect=b.tintEffect,a.tintTopLeft=m(b.tintTL,e._alphaTL),a.tintTopRight=m(b.tintTR,e._alphaTR),a.tintBottomLeft=m(b.tintBL,e._alphaBL),a.tintBottomRight=m(b.tintBR,e._alphaBR),n(i,f,e,u,d,0,0,p,a)}else n(i,f,e,u,d,0,0,p,o)}}},6107(t,e,i){var n=i(48011),s=i(46590),r=i(98682),o=i(83419),a=i(31401),h=i(4327),l=i(95643),u=i(73162);t.exports=new o({Extends:l,Mixins:[a.Alpha,a.BlendMode,a.Depth,a.Lighting,a.Mask,a.RenderNodes,a.ScrollFactor,a.Size,a.Texture,a.Transform,a.Visible,n],initialize:function(t,e,i,n,s){l.call(this,t,"Blitter"),this.setTexture(n,s),this.setPosition(e,i),this.initRenderNodes(this._defaultRenderNodesMap),this.children=new u,this.renderList=[],this.dirty=!1},_defaultRenderNodesMap:{get:function(){return r}}
vendor: 8,060 bytes, line 1
1,create:function(t,e,i,n,r){void 0===n&&(n=!0),void 0===r&&(r=this.children.length),void 0===i?i=this.frame:i instanceof h||(i=this.texture.get(i));var o=new s(this,t,e,i,n);return this.children.addAt(o,r,!1),this.dirty=!0,o},createFromCallback:function(t,e,i,n){for(var s=this.createMultiple(e,i,n),r=0;r<s.length;r++){var o=s[r];t.call(this,o,r)}return s},createMultiple:function(t,e,i){void 0===e&&(e=this.frame.name),void 0===i&&(i=!0),Array.isArray(e)||(e=[e]);var n=[],s=this;return e.forEach(function(e){for(var r=0;r<t;r++)n.push(s.create(0,0,e,i))}),n},childCanRender:function(t){return t.visible&&t.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=[]}})},72396(t){t.exports=function(t,e,i,n){var s=e.getRenderList();if(0!==s.length){var r=t.currentContext,o=i.alpha*e.alpha;if(0!==o){i.addToRenderList(e),r.globalCompositeOperation=t.blendModes[e.blendMode],r.imageSmoothingEnabled=!e.frame.source.scaleMode;var a=e.x-i.scrollX*e.scrollFactorX,h=e.y-i.scrollY*e.scrollFactorY;r.save(),n&&n.copyToContext(r);for(var l=i.roundPixels,u=0;u<s.length;u++){var d=s[u],c=d.flipX||d.flipY,f=d.frame,p=f.canvasData,g=f.x,m=f.y,v=1,x=1,y=d.alpha*o;0!==y&&(r.globalAlpha=y,c?(d.flipX&&(v=-1,g-=p.width),d.flipY&&(x=-1,m-=p.height),p.width>0&&p.height>0&&(r.save(),r.translate(d.x+a,d.y+h),r.scale(v,x),r.drawImage(f.source.image,p.x,p.y,p.width,p.height,g,m,p.width,p.height),r.restore())):(l&&(g=Math.round(g),m=Math.round(m)),p.width>0&&p.height>0&&r.drawImage(f.source.image,p.x,p.y,p.width,p.height,g+d.x+a,m+d.y+h,p.width,p.height)))}r.restore()}}}},9403(t,e,i){var n=i(6107),s=i(25305),r=i(44603),o=i(23568);r.register("blitter",function(t,e){void 0===t&&(t={});var i=o(t,"key",null),r=o(t,"frame",null),a=new n(this.scene,0,0,i,r);return void 0!==e&&(t.add=e),s(this.scene,a,t),a})},12709(t,e,i){var n=i(6107);i(39429).register("blitter",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},48011(t,e,i){var n=i(29747),s=n,r=n;s=i(99485),t.exports={renderWebGL:s,renderCanvas:r=i(72396)}},99485(t,e,i){var n=i(61340),s=i(70554),r=new n,o={quad:new Float32Array(8)},a={},h={};t.exports=function(t,e,i,n){var l=e.getRenderList(),u=i.camera,d=e.alpha;if(0!==l.length&&0!==d){u.addToRenderList(e);var c=r.copyWithScrollFactorFrom(u.getViewMatrix(!i.useCanvas),u.scrollX,u.scrollY,e.scrollFactorX,e.scrollFactorY);n&&c.multiply(n);for(var f=e.x,p=e.y,g=e.customRenderNodes,m=e.defaultRenderNodes,v=0;v<l.length;v++){var x=l[v],y=x.frame,T=x.alpha*d;if(0!==T){var w=y.width,b=y.height,S=f+x.x+y.x,C=p+x.y+y.y;x.flipX&&(w*=-1,S+=y.width),x.flipY&&(b*=-1,C+=y.height),c.setQuad(S,C,S+w,C+b,o.quad),a.frame=y,a.uvSource=y;var E=s.getTintAppendFloatAlpha(x.tint,T);h.tintTopLeft=E,h.tintBottomLeft=E,h.tintTopRight=E,h.tintBottomRight=E,(g.Submitter||m.Submitter).run(i,e,n,0,a,o,h,void 0,0)}}}}},46590(t,e,i){var n=i(83419),s=i(4327);t.exports=new n({initialize:function(t,e,i,n,s){this.parent=t,this.x=e,this.y=i,this.frame=n,this.data={},this.tint=0xffffff,this._visible=s,this._alpha=1,this.flipX=!1,this.flipY=!1,this.hasTransformComponent=!0},setFrame:function(t){return void 0===t?this.frame=this.parent.frame:t instanceof s&&t.texture===this.parent.texture?this.frame=t:this.frame=this.parent.texture.get(t),this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this},reset:function(t,e,i){return this.x=t,this.y=e,this.flipX=!1,this.flipY=!1,this._alpha=1,this._visible=!0,this.parent.dirty=!0,i&&this.setFrame(i),this},setPosition:function(t,e){return this.x=t,this.y=e,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,e){return this.flipX=t,this.flipY=e,this},setVisible:function(t){return this.visible=t,this},setAlpha:function(t){return this.alpha=t,this},setTint:function(t){return this.tint=t,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(t){this.parent.dirty|=this._visible!==t,this._visible=t}},alpha:{get:function(){return this._alpha},set:function(t){this.parent.dirty|=this._alpha>0!=t>0,this._alpha=t}}})},43451(t,e,i){var n=i(87774),s=i(30529),r=i(83419),o=i(31401),a=i(95643),h=i(36683);t.exports=new r({Extends:a,Mixins:[o.BlendMode,o.Depth,o.RenderNodes,o.Visible,h],initialize:function(t,e){a.call(this,t,"CaptureFrame");var i=t.renderer;this.drawingContext=new n(i,{width:i.width,height:i.height}),this.captureTexture=t.sys.textures.addGLTexture(e,this.drawingContext.texture),this.initRenderNodes(this._defaultRenderNodesMap)},_defaultRenderNodesMap:{get:function(){return s}},setAlpha:function(t){return this},setScrollFactor:function(t,e){return this}})},23675(t,e,i){var n=i(44603),s=i(23568),r=i(43451);n.register("captureFrame",function(t,e){void 0===t&&(t={});var i=s(t,"depth",0),n=s(t,"key",null),o=s(t,"visible",!0),a=new r(this.scene,n);return void 0!==e&&(t.add=e),a.setDepth(i).setVisible(o),t.add&&this.scene.sys.displayList.add(a),a})},20421(t,e,i){var n=i(43451);i(39429).register("captureFrame",function(t){return this.displayList.add(new n(this.scene,t))})},36683(t,e,i){var n=i(29747),s=n;t.exports={renderWebGL:s=i(82237),renderCanvas:n}},82237(t){var e=!1;t.exports=function(t,i,n){if(n.useCanvas){e||(e=!0,console.warn("CaptureFrame: Cannot capture from main canvas. Activate `forceComposite` on the camera to use this feature. This warning will now mute."));return}n.camera.addToRenderList(i);var s=n.width,r=n.height,o=i.customRenderNodes,a=i.defaultRenderNodes;i.drawingContext.resize(s,r),i.drawingContext.use(),(o.BatchHandler||a.BatchHandler).batch(i.drawingContext,n.texture,0,r,0,0,s,r,s,0,0,0,1,1,!1,0xffffffff,0xffffffff,0xffffffff,0xffffffff,{}),i.drawingContext.release()}},16005(t,e,i){var n=i(45319);t.exports={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t,e,i,s){return void 0===t&&(t=1),void 0===e?this.alpha=t:(this._alphaTL=n(t,0,1),this._alphaTR=n(e,0,1),this._alphaBL=n(i,0,1),this._alphaBR=n(s,0,1)),this},alpha:{get:function(){return this._alpha},set:function(t){var e=n(t,0,1);this._alpha=e,this._alphaTL=e,this._alphaTR=e,this._alphaBL=e,this._alphaBR=e,0===e?this.renderFlags&=-3:this.renderFlags|=2}},alphaTopLeft:{get:function(){return this._alphaTL},set:function(t){var e=n(t,0,1);this._alphaTL=e,0!==e&&(this.renderFlags|=2)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(t){var e=n(t,0,1);this._alphaTR=e,0!==e&&(this.renderFlags|=2)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(t){var e=n(t,0,1);this._alphaBL=e,0!==e&&(this.renderFlags|=2)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(t){var e=n(t,0,1);this._alphaBR=e,0!==e&&(this.renderFlags|=2)}}}},88509(t,e,i){var n=i(45319);t.exports={_alpha:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t){return void 0===t&&(t=1),this.alpha=t,this},alpha:{get:function(){return this._alpha},set:function(t){var e=n(t,0,1);this._alpha=e,0===e?this.renderFlags&=-3:this.renderFlags|=2}}}},90065(t,e,i){var n=i(10312);t.exports={_blendMode:n.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(t){"string"==typeof t&&(t=n[t]),(t|=0)>=-1&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}}},94215(t){t.exports={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}}},61683(t){t.exports={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,
1i,n){return void 0===t?this.isCropped=!1:this.frame&&("number"==typeof t?this.frame.setCropUVs(this._crop,t,e,i,n,this.flipX,this.flipY):this.frame.setCropUVs(this._crop,t.x,t.y,t.width,t.height,this.flipX,this.flipY),this.isCropped=!0),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}}}},89272(t,e,i){var n=i(37105);t.exports={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.displayList&&this.displayList.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this},setToTop:function(){var t=this.getDisplayList();return t&&n.BringToTop(t,this),this},setToBack:function(){var t=this.getDisplayList();return t&&n.SendToBack(t,this),this},setAbove:function(t){var e=this.getDisplayList();return e&&t&&n.MoveAbove(e,this,t),this},setBelow:function(t){var e=this.getDisplayList();return e&&t&&n.MoveBelow(e,this,t),this}}},3248(t){t.exports={timeElapsed:0,timeElapsedResetPeriod:36e5,timePaused:!1,setTimerResetPeriod:function(t){return this.timeElapsedResetPeriod=t,this},setTimerPaused:function(t){return this.timePaused=!!t,this},resetTimer:function(t){return void 0===t&&(t=0),this.timeElapsed=t,this},updateTimer:function(t,e){return!this.timePaused&&(this.timeElapsed+=e,this.timeElapsed>=this.timeElapsedResetPeriod&&(this.timeElapsed-=this.timeElapsedResetPeriod)),this}}},53427(t,e,i){var n=i(83419),s=i(10189),r=i(16762),o=i(37597),a=i(88344),h=i(47564),l=i(77011),u=i(95200),d=i(16898),c=i(42652),f=i(43927),p=i(84714),g=i(51890),m=i(97797),v=i(37911),x=i(6379),y=i(29861),T=i(14366),w=i(63785),b=i(62229),S=i(99534),C=i(20263),E=i(90002);function A(t){return t.active}t.exports=new n({initialize:function(t){this.camera=t,this.list=[]},clear:function(){for(var t=0;t<this.list.length;t++){var e=this.list[t];e.ignoreDestroy||e.destroy()}return this.list.length=0,this},add:function(t,e){return void 0===e?this.list.push(t):this.list.splice(e,0,t),t},remove:function(t,e){var i=this.list.indexOf(t);return -1!==i&&(this.list.splice(i,1),(!t.ignoreDestroy||e)&&t.destroy()),this},getActive:function(){return this.list.filter(A)},addBarrel:function(t){return this.add(new s(this.camera,t))},addBlend:function(t,e,i,n){return this.add(new r(this.camera,t,e,i,n))},addBlocky:function(t){return this.add(new o(this.camera,t))},addBlur:function(t,e,i,n,s,r){return this.add(new a(this.camera,t,e,i,n,s,r))},addBokeh:function(t,e,i){return this.add(new h(this.camera,t,e,i))},addColorMatrix:function(){return this.add(new l(this.camera))},addCombineColorMatrix:function(t){return this.add(new u(this.camera,t))},addDisplacement:function(t,e,i){return this.add(new d(this.camera,t,e,i))},addGlow:function(t,e,i,n,s,r,o){return this.add(new c(this.camera,t,e,i,n,s,r,o))},addGradientMap:function(t){return this.add(new f(this.camera,t))},addImageLight:function(t){return this.add(new p(this.camera,t))},addKey:function(t){return this.add(new g(this.camera,t))},addMask:function(t,e,i,n,s){return this.add(new m(this.camera,t,e,i,n,s))},addNormalTools:function(t){return this.add(new v(this.camera,t))},addPanoramaBlur:function(t){return this.add(new x(this.camera,t))},addPixelate:function(t){return this.add(new y(this.camera,t))},addQuantize:function(t){return this.add(new T(this.camera,t))},addSampler:function(t,e){return this.add(new w(this.camera,t,e))},addShadow:function(t,e,i,n,s,r,o){return this.add(new b(this.camera,t,e,i,n,s,r,o))},addThreshold:function(t,e,i){return this.add(new S(this.camera,t,e,i))},addTiltShift:function(t,e,i,n,s,r){return this.add(new h(this.camera,t,e,i,!0,n,s,r))},addVignette:function(t,e,i,n,s,r){return this.add(new C(this.camera,t,e,i,n,s,r))},addWipe:function(t,e,i,n,s){return this.add(new E(this.camera,t,e,i,n,s))},destroy:function(){this.clear(),this.camera=null}})},43102(t,e,i){var n=null,s=i(26099),r=i(61340);t.exports={filterCamera:null,filters:{get:function(){return this.filterCamera?this.filterCamera.filters:null}},renderFilters:!0,maxFilterSize:null,filtersAutoFocus:!0,filtersFocusContext:!1,filtersForceComposite:!1,_filtersMatrix:null,_filtersViewMatrix:null,willRenderFilters:function(){return this.renderFilters&&this.filters&&(this.filters.internal.getActive().length>0||this.filters.external.getActive().length>0||this.filtersForceComposite)},enableFilters:function(){if(this.filterCamera||!this.scene.renderer.gl)return this;var t=this.scene;if(n||(n=i(38058)),this.filterCamera=new n(0,0,1,1).setScene(t,!1),this.filterCamera.isObjectInversion=!0,t.game.config.roundPixels&&(this.filterCamera.roundPixels=!0),!this.maxFilterSize){var e=t.renderer.getMaxTextureSize();this.maxFilterSize=new s(e,e)}return this._filtersMatrix=new r,this._filtersViewMatrix=new r,this.getBounds&&void 0!==this.width&&void 0!==this.height&&0!==this.width&&0!==this.height||(this.filtersFocusContext=!0),this.addRenderStep(this.renderWebGLFilters,0),this}
vendor: 5,771 bytes, line 1
1,renderWebGLFilters:function(t,e,i,n,s){if(!e.willRenderFilters())return void e.renderWebGLStep(t,e,i,n,s+1);var r=i.camera,o=e.filtersAutoFocus,a=e.filtersFocusContext;o&&(a?e.focusFiltersOnCamera(r):e.focusFilters());var h=e.filterCamera;h.preRender();var l=h.roundPixels;if(h.roundPixels=e.willRoundVertices(h,e.rotation%(2*Math.PI)==0&&(e.scaleX,1===e.scaleY)),o&&a){var u=e.parentContainer;if(u){var d=u.getWorldTransformMatrix();h.matrix.multiply(d)}}var c=e._filtersMatrix,f=e._filtersViewMatrix.copyWithScrollFactorFrom(r.getViewMatrix(!i.useCanvas),r.scrollX,r.scrollY,e.scrollFactorX,e.scrollFactorY);if(n&&f.multiply(n),a)c.loadIdentity();else{if("Layer"===e.type)c.loadIdentity();else{var p=e.flipX?-1:1,g=e.flipY?-1:1;c.applyITRS(e.x,e.y,e.rotation,e.scaleX*p,e.scaleY*g)}var m=h.width,v=h.height;c.translate(-m*h.originX,-v*h.originY),f.multiply(c,c)}var x=e.scrollFactorX,y=e.scrollFactorY;e.scrollFactorX=1,e.scrollFactorY=1,t.cameraRenderNode.run(i,[e],h,c,!0,s+1),e.scrollFactorX=x,e.scrollFactorY=y,h.roundPixels=l;for(var T=h.renderList.length,w=0;w<T;w++)r.addToRenderList(h.renderList[w])},focusFilters:function(){var t=this.x,e=this.y,i=this.originX,n=this.originY,s=this.width,r=this.height;if("Layer"===this.type||isNaN(t)||isNaN(e)||isNaN(s)||isNaN(r)||isNaN(i)||isNaN(n)||0===s||0===r)return this.filtersFocusContext=!0,this;var o=this.rotation,a=this.scaleX,h=this.scaleY;this.flipX&&(a*=-1,i=1-i),this.flipY&&(h*=-1,n=1-n);var l=t+s*(.5-i),u=e+r*(.5-n);return this.setFilterSize(s,r),this.filterCamera.centerOn(l,u).setRotation(-o).setOrigin(i,n).setZoom(1/a,1/h),this},focusFiltersOnCamera:function(t){var e=t.width,i=t.height,n=t.scrollX,s=t.scrollY,r=t.rotation,o=t.zoomX,a=t.zoomY;return this.setFilterSize(e,i),this.filterCamera.setScroll(n,s),this.filterCamera.setRotation(r),this.filterCamera.setZoom(o,a),this},focusFiltersOverride:function(t,e,i,n){var s=this.filterCamera;void 0===i&&(i=s.width),void 0===n&&(n=s.height),void 0===t&&(t=i/2),void 0===e&&(e=n/2);var r=this.x,o=this.y;this.setFilterSize(i,n),s.setScroll(r-t,o-e);var a=t/i,h=e/n;return s.setOrigin(a,h),this.filtersAutoFocus=!1,this},setFilterSize:function(t,e){t=Math.max(1,Math.min(Math.ceil(t),this.maxFilterSize.x)),e=Math.max(1,Math.min(Math.ceil(e),this.maxFilterSize.y));var i=this.filterCamera;return i&&i.setSize(t,e),this},setFiltersAutoFocus:function(t){return this.filtersAutoFocus=t,this},setFiltersFocusContext:function(t){return this.filtersFocusContext=t,this},setFiltersForceComposite:function(t){return this.filtersForceComposite=t,this},setRenderFilters:function(t){return this.renderFilters=t,this}}},54434(t){t.exports={flipX:!1,flipY:!1,toggleFlipX:function(){return this.flipX=!this.flipX,this},toggleFlipY:function(){return this.flipY=!this.flipY,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,e){return this.flipX=t,this.flipY=e,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}}},8004(t,e,i){var n=i(87841),s=i(11520),r=i(26099);t.exports={prepareBoundsOutput:function(t,e){return void 0===e&&(e=!1),0!==this.rotation&&s(t,this.x,this.y,this.rotation),e&&this.parentContainer&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t),t},getCenter:function(t,e){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getTopLeft:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getTopCenter:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getTopRight:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getLeftCenter:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getRightCenter:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getBottomLeft:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBottomCenter:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBottomRight:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBounds:function(t){if(void 0===t&&(t=new n),this.parentContainer){var e,i,s,r,o,a,h,l,u=this.parentContainer.getBoundsTransformMatrix();this.getTopLeft(t),u.transformPoint(t.x,t.y,t),e=t.x,i=t.y,this.getTopRight(t),u.transformPoint(t.x,t.y,t),s=t.x,r=t.y,this.getBottomLeft(t),u.transformPoint(t.x,t.y,t),o=t.x,a=t.y,this.getBottomRight(t),u.transformPoint(t.x,t.y,t),h=t.x,l=t.y}else this.getTopLeft(t),e=t.x,i=t.y,this.getTopRight(t),s=t.x,r=t.y,this.getBottomLeft(t),o=t.x,a=t.y,this.getBottomRight(t),h=t.x,l=t.y;return t.x=Math.min(e,s,o,h),t.y=Math.min(i,r,a,l),t.width=Math.max(e,s,o,h)-t.x,t.height=Math.max(i,r,a,l)-t.y,t}}},73629(t){t.exports={lighting:!1,selfShadow:{enabled:null,penumbra:.5,diffuseFlatThreshold:1/3},setLighting:function(t){return this.lighting=t,this}
1,setSelfShadow:function(t,e,i){return void 0!==t&&(null===t?this.selfShadow.enabled=this.scene.sys.game.config.selfShadow:this.selfShadow.enabled=t),void 0!==e&&(this.selfShadow.penumbra=e),void 0!==i&&(this.selfShadow.diffuseFlatThreshold=i),this}}},8573(t,e,i){var n=i(8054),s=i(80661);t.exports={mask:null,setMask:function(t){return this.scene.renderer.type===n.WEBGL?console.warn("Phaser.GameObjects.Components.Mask.setMask: This method is not supported in WebGL. Create a Mask filter instead."):this.mask=t,this},clearMask:function(t){return void 0===t&&(t=!1),t&&this.mask&&this.mask.destroy(),this.mask=null,this},createGeometryMask:function(t){return void 0===t&&("Graphics"===this.type||this.geom)&&(t=this),new s(this.scene,t)}}},27387(t){t.exports={_originComponent:!0,originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(t){this._displayOriginX=t,this.originX=t/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(t){this._displayOriginY=t,this.originY=t/this.height}},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this.updateDisplayOrigin()},setOriginFromFrame:function(){return this.frame&&this.frame.customPivot?(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin()):this.setOrigin()},setDisplayOrigin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.displayOriginX=t,this.displayOriginY=e,this},updateDisplayOrigin:function(){return this._displayOriginX=this.originX*this.width,this._displayOriginY=this.originY*this.height,this}}},37640(t,e,i){var n=i(39506),s=i(57355),r=i(35154),o=i(86353),a=i(26099);t.exports={path:null,rotateToPath:!1,pathRotationOffset:0,pathOffset:null,pathVector:null,pathDelta:null,pathTween:null,pathConfig:null,_prevDirection:o.PLAYING_FORWARD,setPath:function(t,e){void 0===e&&(e=this.pathConfig);var i=this.pathTween;return i&&i.isPlaying()&&i.stop(),this.path=t,e&&this.startFollow(e),this},setRotateToPath:function(t,e){return void 0===e&&(e=0),this.rotateToPath=t,this.pathRotationOffset=e,this},isFollowing:function(){var t=this.pathTween;return t&&t.isPlaying()},startFollow:function(t,e){void 0===t&&(t={}),void 0===e&&(e=0);var i=this.pathTween;i&&i.isPlaying()&&i.stop(),"number"==typeof t&&(t={duration:t}),t.from=r(t,"from",0),t.to=r(t,"to",1);var h=s(t,"positionOnPath",!1);this.rotateToPath=s(t,"rotateToPath",!1),this.pathRotationOffset=r(t,"rotationOffset",0);var l=r(t,"startAt",e);if(l&&(t.onStart=function(t){var e=t.data[0];e.progress=l,e.elapsed=e.duration*l;var i=e.ease(e.progress);e.current=e.start+(e.end-e.start)*i,e.setTargetValue()}),this.pathOffset||(this.pathOffset=new a(this.x,this.y)),this.pathVector||(this.pathVector=new a),this.pathDelta||(this.pathDelta=new a),this.pathDelta.reset(),t.persist=!0,this.pathTween=this.scene.sys.tweens.addCounter(t),this.path.getStartPoint(this.pathOffset),h&&(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=o.PLAYING_FORWARD,this.rotateToPath){var u=this.path.getPoint(.1);this.rotation=Math.atan2(u.y-this.y,u.x-this.x)+n(this.pathRotationOffset)}return this.pathConfig=t,this},pauseFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.pause(),this},resumeFollow:function(){var t=this.pathTween;return t&&t.isPaused()&&t.resume(),this},stopFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.stop(),this},pathUpdate:function(){var t=this.pathTween;if(t&&t.data){var e=t.data[0],i=this.pathDelta,s=this.pathVector;if(i.copy(s).negate(),e.state===o.COMPLETE){this.path.getPoint(e.end,s),i.add(s),s.add(this.pathOffset),this.setPosition(s.x,s.y);return}if(e.state!==o.PLAYING_FORWARD&&e.state!==o.PLAYING_BACKWARD)return;this.path.getPoint(t.getValue(),s),i.add(s),s.add(this.pathOffset);var r=this.x,a=this.y;this.setPosition(s.x,s.y);var h=this.x-r,l=this.y-a;if(0===h&&0===l)return;if(e.state!==this._prevDirection){this._prevDirection=e.state;return}this.rotateToPath&&(this.rotation=Math.atan2(l,h)+n(this.pathRotationOffset))}}}},68680(t,e,i){var n=i(62644);t.exports={customRenderNodes:null,defaultRenderNodes:null,renderNodeData:null,initRenderNodes:function(t){this.customRenderNodes={},this.defaultRenderNodes={},this.renderNodeData={};var e=this.scene.sys.renderer;if(e){var i=e.renderNodes;if(i&&t){var n=this.defaultRenderNodes;t.each(function(t,e){n[t]=i.getNode(e)})}}}
1,setRenderNodeRole:function(t,e,i,s){var r=this.scene.sys.renderer;if(!r)return this;var o=r.renderNodes;if(!o)return this;if(null!==e){if("string"==typeof e&&(e=o.getNode(e)),!e)return this;this.customRenderNodes[t]=e,i?this.renderNodeData[e.name]=s?n(i):i:this.renderNodeData[e.name]={}}else{var a=this.customRenderNodes[t];a&&(delete this.renderNodeData[a.name],delete this.customRenderNodes[t])}return this},setRenderNodeData:function(t,e,i){var n=t;"string"!=typeof t&&(n=t.name);var s=this.renderNodeData[n];return void 0===i?delete s[e]:s[e]=i,this}}},86038(t){t.exports={_renderSteps:null,renderWebGLStep:function(t,e,i,n,s,r,o){void 0===s&&(s=0);var a=e._renderSteps[s];a&&(r?void 0===o&&(o=0):(r=[e],o=0),a(t,e,i,n,s,r,o))},addRenderStep:function(t,e){return(this._renderSteps||(this._renderSteps=[]),void 0===e)?this._renderSteps.push(t):this._renderSteps.splice(e,0,t),this}}},80227(t){t.exports={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,e){return void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this}}},16736(t){t.exports={_sizeComponent:!0,width:0,height:0,displayWidth:{get:function(){return Math.abs(this.scaleX*this.frame.realWidth)},set:function(t){this.scaleX=t/this.frame.realWidth}},displayHeight:{get:function(){return Math.abs(this.scaleY*this.frame.realHeight)},set:function(t){this.scaleY=t/this.frame.realHeight}},setSizeToFrame:function(t){t||(t=this.frame),this.width=t.realWidth,this.height=t.realHeight;var e=this.input;return e&&!e.customHitArea&&(e.hitArea.width=this.width,e.hitArea.height=this.height),this},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}}},37726(t,e,i){var n=i(4327);t.exports={texture:null,frame:null,isCropped:!1,setTexture:function(t,e,i,n){return this.texture=this.scene.sys.textures.get(t),this.setFrame
1(e,i,n)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),t instanceof n?(this.texture=this.scene.sys.textures.get(t.texture.key),this.frame=t):this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this}}},79812(t,e,i){var n=i(4327);t.exports={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,n){return void 0===t?this.isCropped=!1:this.frame&&("number"==typeof t?this.frame.setCropUVs(this._crop,t,e,i,n,this.flipX,this.flipY):this.frame.setCropUVs(this._crop,t.x,t.y,t.width,t.height,this.flipX,this.flipY),this.isCropped=!0),this},setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),t instanceof n?(this.texture=this.scene.sys.textures.get(t.texture.key),this.frame=t):this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(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,
vendor: 34,588 bytes, line 1
1ch:0}}}},27472(t,e,i){var n=i(84322);t.exports={tintTopLeft:0xffffff,tintTopRight:0xffffff,tintBottomLeft:0xffffff,tintBottomRight:0xffffff,tintMode:n.MULTIPLY,clearTint:function(){return this.setTint(0xffffff),this.setTintMode(n.MULTIPLY),this},setTint:function(t,e,i,n){return void 0===t&&(t=0xffffff),void 0===e&&(e=t,i=t,n=t),this.tintTopLeft=t,this.tintTopRight=e,this.tintBottomLeft=i,this.tintBottomRight=n,this},setTintMode:function(t){return this.tintMode=t,this},setTintFill:function(){console.error("`setTintFill(color)` is removed as of Phaser 4. Use setTint(color).setTintMode(Phaser.TintModes.FILL)` instead.")},tint:{get:function(){return this.tintTopLeft},set:function(t){this.setTint(t,t,t,t)}},isTinted:{get:function(){return this.tintMode!==n.MULTIPLY||0xffffff!==this.tintTopLeft||0xffffff!==this.tintTopRight||0xffffff!==this.tintBottomLeft||0xffffff!==this.tintBottomRight}}}},53774(t){t.exports=function(t){var e={name:t.name,type:t.type,x:t.x,y:t.y,depth:t.depth,scale:{x:t.scaleX,y:t.scaleY},origin:{x:t.originX,y:t.originY},flipX:t.flipX,flipY:t.flipY,rotation:t.rotation,alpha:t.alpha,visible:t.visible,blendMode:t.blendMode,textureKey:"",frameKey:"",data:{}};return t.texture&&(e.textureKey=t.texture.key,e.frameKey=t.frame.name),e}},16901(t,e,i){var n=i(36383),s=i(61340),r=i(85955),o=i(86554),a=i(30954),h=i(26099);t.exports={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(t){this._scaleX=t,this._scaleY=t,0===t?this.renderFlags&=-5:this.renderFlags|=4}},scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,0===t?this.renderFlags&=-5:0!==this._scaleY&&(this.renderFlags|=4)}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,0===t?this.renderFlags&=-5:0!==this._scaleX&&(this.renderFlags|=4)}},angle:{get:function(){return a(this._rotation*n.RAD_TO_DEG)},set:function(t){this.rotation=a(t)*n.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=o(t)}},setPosition:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===n&&(n=0),this.x=t,this.y=e,this.z=i,this.w=n,this},copyPosition:function(t){return void 0!==t.x&&(this.x=t.x),void 0!==t.y&&(this.y=t.y),void 0!==t.z&&(this.z=t.z),void 0!==t.w&&(this.w=t.w),this},setRandomPosition:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.scale.width),void 0===n&&(n=this.scene.sys.scale.height),this.x=t+Math.random()*i,this.y=e+Math.random()*n,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setAngle:function(t){return void 0===t&&(t=0),this.angle=t,this},setScale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.scaleX=t,this.scaleY=e,this},setX:function(t){return void 0===t&&(t=0),this.x=t,this},setY:function(t){return void 0===t&&(t=0),this.y=t,this},setZ:function(t){return void 0===t&&(t=0),this.z=t,this},setW:function(t){return void 0===t&&(t=0),this.w=t,this},getLocalTransformMatrix:function(t){return void 0===t&&(t=new s),t.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY)},getWorldTransformMatrix:function(t,e){void 0===t&&(t=new s);var i=this.parentContainer;if(!i)return this.getLocalTransformMatrix(t);var n=!1;for(e||(e=new s,n=!0),t.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY);i;)e.applyITRS(i.x,i.y,i._rotation,i._scaleX,i._scaleY),e.multiply(t,t),i=i.parentContainer;return n&&e.destroy(),t},getLocalPoint:function(t,e,i,n){i||(i=new h),n||(n=this.scene.sys.cameras.main);var s=n.scrollX,o=n.scrollY,a=t+s*this.scrollFactorX-s,l=e+o*this.scrollFactorY-o;return this.parentContainer?this.getWorldTransformMatrix().applyInverse(a,l,i):r(a,l,this.x,this.y,this.rotation,this.scaleX,this.scaleY,i),this._originComponent&&(i.x+=this._displayOriginX,i.y+=this._displayOriginY),i},getWorldPoint:function(t,e,i){if(void 0===t&&(t=new h),!this.parentContainer)return t.x=this.x,t.y=this.y,t;var n=this.getWorldTransformMatrix(e,i);return t.x=n.tx,t.y=n.ty,t},getParentRotation:function(){for(var t=0,e=this.parentContainer;e;)t+=e.rotation,e=e.parentContainer;return t}}},61340(t,e,i){var n=i(83419),s=i(36383),r=i(26099);t.exports=new n({initialize:function(t,e,i,n,s,r){void 0===t&&(t=1),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=1),void 0===s&&(s=0),void 0===r&&(r=0),this.matrix=new Float32Array([t,e,i,n,s,r,0,0,1]),this.decomposedMatrix={translateX:0,translateY:0,scaleX:1,scaleY:1,rotation:0},this.quad=new Float32Array(8)},a:{get:function(){return this.matrix[0]},set:function(t){this.matrix[0]=t}},b:{get:function(){return this.matrix[1]},set:function(t){this.matrix[1]=t}},c:{get:function(){return this.matrix[2]},set:function(t){this.matrix[2]=t}},d:{get:function(){return this.matrix[3]},set:function(t){this.matrix[3]=t}},e:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},f:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},tx:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},ty:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},rotation:{get:function(){return Math.acos(this.a/this.scaleX)*(0>Math.atan(-this.c/this.a)?-1:1)}},rotationNormalized:{get:function(){var t=this.matrix,e=t[0],i=t[1],n=t[2],r=t[3];return e||i?i>0?Math.acos(e/this.scaleX):-Math.acos(e/this.scaleX):n||r?s.PI_OVER_2-(r>0?Math.acos(-n/this.scaleY):-Math.acos(n/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 t=this.matrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,this},translate:function(t,e){var i=this.matrix;return i[4]=i[0]*t+i[2]*e+i[4],i[5]=i[1]*t+i[3]*e+i[5],this},scale:function(t,e){var i=this.matrix;return i[0]*=t,i[1]*=t,i[2]*=e,i[3]*=e,this},rotate:function(t){var e=Math.sin(t),i=Math.cos(t),n=this.matrix,s=n[0],r=n[1],o=n[2],a=n[3];return n[0]=s*i+o*e,n[1]=r*i+a*e,n[2]=-(s*e)+o*i,n[3]=-(r*e)+a*i,this},multiply:function(t,e){var i=this.matrix,n=t.matrix,s=i[0],r=i[1],o=i[2],a=i[3],h=i[4],l=i[5],u=n[0],d=n[1],c=n[2],f=n[3],p=n[4],g=n[5],m=void 0===e?i:e.matrix;return m[0]=u*s+d*o,m[1]=u*r+d*a,m[2]=c*s+f*o,m[3]=c*r+f*a,m[4]=p*s+g*o+h,m[5]=p*r+g*a+l,m},multiplyWithOffset:function(t,e,i){var n=this.matrix,s=t.matrix,r=n[0],o=n[1],a=n[2],h=n[3],l=n[4],u=n[5],d=s[0],c=s[1],f=s[2],p=s[3],g=s[4],m=s[5];return n[0]=d*r+c*a,n[1]=d*o+c*h,n[2]=f*r+p*a,n[3]=f*o+p*h,n[4]=g*r+m*a+(e*r+i*a+l),n[5]=g*o+m*h+(e*o+i*h+u),this},transform:function(t,e,i,n,s,r){var o=this.matrix,a=o[0],h=o[1],l=o[2],u=o[3],d=o[4],c=o[5];return o[0]=t*a+e*l,o[1]=t*h+e*u,o[2]=i*a+n*l,o[3]=i*h+n*u,o[4]=s*a+r*l+d,o[5]=s*h+r*u+c,this},transformPoint:function(t,e,i){void 0===i&&(i={x:0,y:0});var n=this.matrix,s=n[0],r=n[1],o=n[2],a=n[3],h=n[4],l=n[5];return i.x=t*s+e*o+h,i.y=t*r+e*a+l,i},invert:function(){var t=this.matrix,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=e*s-i*n;return t[0]=s/a,t[1]=-i/a,t[2]=-n/a,t[3]=e/a,t[4]=(n*o-s*r)/a,t[5]=-(e*o-i*r)/a,this},copyFrom:function(t){var e=this.matrix;return e[0]=t.a,e[1]=t.b,e[2]=t.c,e[3]=t.d,e[4]=t.e,e[5]=t.f,this},copyFromArray:function(t){var e=this.matrix;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],this},copyWithScrollFactorFrom:function(t,e,i,n,s){var r=this.matrix;r[0]=t.a,r[1]=t.b,r[2]=t.c,r[3]=t.d;var o=e*(1-n),a=i*(1-s);return r[4]=t.a*o+t.c*a+t.e,r[5]=t.b*o+t.d*a+t.f,this},copyToContext:function(t){var e=this.matrix;return t.transform(e[0],e[1],e[2],e[3],e[4],e[5]),t},setToContext:function(t){return t.setTransform(this.a,this.b,this.c,this.d,this.e,this.f),t},copyToArray:function(t){var e=this.matrix;return void 0===t?t=[e[0],e[1],e[2],e[3],e[4],e[5]]:(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5]),t},setTransform:function(t,e,i,n,s,r){var o=this.matrix;return o[0]=t,o[1]=e,o[2]=i,o[3]=n,o[4]=s,o[5]=r,this},decomposeMatrix:function(){var t=this.decomposedMatrix,e=this.matrix,i=e[0],n=e[1],s=e[2],r=e[3],o=i*r-n*s;if(t.translateX=e[4],t.translateY=e[5],i||n){var a=Math.sqrt(i*i+n*n);t.rotation=n>0?Math.acos(i/a):-Math.acos(i/a),t.scaleX=a,t.scaleY=o/a}else if(s||r){var h=Math.sqrt(s*s+r*r);t.rotation=.5*Math.PI-(r>0?Math.acos(-s/h):-Math.acos(s/h)),t.scaleX=o/h,t.scaleY=h}else t.rotation=0,t.scaleX=0,t.scaleY=0;return t},applyITRS:function(t,e,i,n,s){var r=this.matrix,o=Math.sin(i),a=Math.cos(i);return r[4]=t,r[5]=e,r[0]=a*n,r[1]=o*n,r[2]=-o*s,r[3]=a*s,this},applyInverse:function(t,e,i){void 0===i&&(i=new r);var n=this.matrix,s=n[0],o=n[1],a=n[2],h=n[3],l=n[4],u=n[5],d=1/(s*h+-(a*o));return i.x=h*d*t+-a*d*e+(u*a-l*h)*d,i.y=s*d*e+-o*d*t+(-u*s+l*o)*d,i},setQuad:function(t,e,i,n,s){void 0===s&&(s=this.quad);var r=this.matrix,o=r[0],a=r[1],h=r[2],l=r[3],u=r[4],d=r[5];return s[0]=t*o+e*h+u,s[1]=t*a+e*l+d,s[2]=t*o+n*h+u,s[3]=t*a+n*l+d,s[4]=i*o+n*h+u,s[5]=i*a+n*l+d,s[6]=i*o+e*h+u,s[7]=i*a+e*l+d,s},getX:function(t,e){return t*this.a+e*this.c+this.e},getY:function(t,e){return t*this.b+e*this.d+this.f},getXRound:function(t,e,i){var n=this.getX(t,e);return i&&(n=Math.floor(n+.5)),n},getYRound:function(t,e,i){var n=this.getY(t,e);return i&&(n=Math.floor(n+.5)),n},getCSSMatrix:function(){var t=this.matrix;return"matrix("+t[0]+","+t[1]+","+t[2]+","+t[3]+","+t[4]+","+t[5]+")"},destroy:function(){this.matrix=null,this.quad=null,this.decomposedMatrix=null}})},59715(t){t.exports={_visible:!0,visible:{get:function(){return this._visible},set:function(t){t?(this._visible=!0,this.renderFlags|=1):(this._visible=!1,this.renderFlags&=-2)}},setVisible:function(t){return this.visible=t,this}}},31401(t,e,i){t.exports={Alpha:i(16005),AlphaSingle:i(88509),BlendMode:i(90065),ComputedSize:i(94215),Crop:i(61683),Depth:i(89272),ElapseTimer:i(3248),FilterList:i(53427),Filters:i(43102),Flip:i(54434),GetBounds:i(8004),Lighting:i(73629),Mask:i(8573),Origin:i(27387),PathFollower:i(37640),RenderNodes:i(68680),RenderSteps:i(86038),ScrollFactor:i(80227),Size:i(16736),Texture:i(37726),TextureCrop:i(79812),Tint:i(27472),ToJSON:i(53774),Transform:i(16901),TransformMatrix:i(61340),Visible:i(59715)}},31559(t,e,i){var n=i(37105),s=i(10312),r=i(83419),o=i(31401),a=i(51708),h=i(95643),l=i(87841),u=i(29959),d=i(36899),c=i(26099),f=new o.TransformMatrix;t.exports=new r({Extends:h,Mixins:[o.AlphaSingle,o.BlendMode,o.ComputedSize,o.Depth,o.Mask,o.Transform,o.Visible,u],initialize:function(t,e,i,n){h.call(this,t,"Container"),this.list=[],this.exclusive=!0,this.maxSize=-1,this.position=0,this.localTransform=new o.TransformMatrix,this._sortKey="",this._sysEvents=t.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.setPosition(e,i),this.setBlendMode(s.SKIP_CHECK),n&&this.add(n)},originX:{get:function(){return .5}},originY:{get:function(){return .5}},displayOriginX:{get:function(){return .5*this.width}},displayOriginY:{get:function(){return .5*this.height}},setExclusive:function(t){return void 0===t&&(t=!0),this.exclusive=t,this},getBounds:function(t){if(void 0===t&&(t=new l),t.setTo(this.x,this.y,0,0),this.parentContainer){var e=this.parentContainer.getBoundsTransformMatrix().transformPoint(this.x,this.y);t.setTo(e.x,e.y,0,0)}if(this.list.length>0){var i=this.list,n=new l,s=!1;t.setEmpty();for(var r=0;r<i.length;r++){var o=i[r];o.getBounds&&(o.getBounds(n),s?d(n,t,t):(t.setTo(n.x,n.y,n.width,n.height),s=!0))}}return t},addHandler:function(t){t.once(a.DESTROY,this.onChildDestroyed,this),this.exclusive&&(t.parentContainer&&t.parentContainer.remove(t),t.parentContainer=this,t.removeFromDisplayList(),t.addedToScene())},removeHandler:function(t){t.off(a.DESTROY,this.remove,this),this.exclusive&&(t.parentContainer=null,t.removedFromScene(),t.addToDisplayList())},pointToContainer:function(t,e){return void 0===e&&(e=new c),this.parentContainer?this.parentContainer.pointToContainer(t,e):(e.x=t.x,e.y=t.y),f.applyITRS(this.x,this.y,this.rotation,this.scaleX,this.scaleY),f.invert(),f.transformPoint(t.x,t.y,e),e},getBoundsTransformMatrix:function(){return this.getWorldTransformMatrix(f,this.localTransform)},add:function(t){return n.Add(this.list,t,this.maxSize,this.addHandler,this),this},addAt:function(t,e){return n.AddAt(this.list,t,e,this.maxSize,this.addHandler,this),this},getAt:function(t){return this.list[t]},getIndex:function(t){return this.list.indexOf(t)},sort:function(t,e){return t&&(void 0===e&&(e=function(e,i){return e[t]-i[t]}),n.StableSort(this.list,e)),this},getByName:function(t){return n.GetFirst(this.list,"name",t)},getRandom:function(t,e){return n.GetRandom(this.list,t,e)},getFirst:function(t,e,i,s){return n.GetFirst(this.list,t,e,i,s)},getAll:function(t,e,i,s){return n.GetAll(this.list,t,e,i,s)},count:function(t,e,i,s){return n.CountAllMatching(this.list,t,e,i,s)},swap:function(t,e){return n.Swap(this.list,t,e),this},moveTo:function(t,e){return n.MoveTo(this.list,t,e),this},moveAbove:function(t,e){return n.MoveAbove(this.list,t,e),this},moveBelow:function(t,e){return n.MoveBelow(this.list,t,e),this},remove:function(t,e){var i=n.Remove(this.list,t,this.removeHandler,this);if(e&&i){Array.isArray(i)||(i=[i]);for(var s=0;s<i.length;s++)i[s].destroy()}return this},removeAt:function(t,e){var i=n.RemoveAt(this.list,t,this.removeHandler,this);return e&&i&&i.destroy(),this},removeBetween:function(t,e,i){var s=n.RemoveBetween(this.list,t,e,this.removeHandler,this);if(i)for(var r=0;r<s.length;r++)s[r].destroy();return this},removeAll:function(t){var e=this.list;if(t){for(var i=0;i<e.length;i++)e[i]&&e[i].scene&&(e[i].off(a.DESTROY,this.onChildDestroyed,this),e[i].destroy());this.list=[]}else n.RemoveBetween(e,0,e.length,this.removeHandler,this);return this},bringToTop:function(t){return n.BringToTop(this.list,t),this},sendToBack:function(t){return n.SendToBack(this.list,t),this},moveUp:function(t){return n.MoveUp(this.list,t),this},moveDown:function(t){return n.MoveDown(this.list,t),this},reverse:function(){return this.list.reverse(),this},shuffle:function(){return n.Shuffle(this.list),this},replace:function(t,e,i){return n.Replace(this.list,t,e)&&(this.addHandler(e),this.removeHandler(t),i&&t.destroy()),this},exists:function(t){return this.list.indexOf(t)>-1},setAll:function(t,e,i,s){return n.SetAll(this.list,t,e,i,s),this},each:function(t,e){var i,n=[null],s=this.list.slice(),r=s.length;for(i=2;i<arguments.length;i++)n.push(arguments[i]);for(i=0;i<r;i++)n[0]=s[i],t.apply(e,n);return this},iterate:function(t,e){var i,n=[null];for(i=2;i<arguments.length;i++)n.push(arguments[i]);for(i=0;i<this.list.length;i++)n[0]=this.list[i],t.apply(e,n);return this},setScrollFactor:function(t,e,i){return void 0===e&&(e=t),void 0===i&&(i=!1),this.scrollFactorX=t,this.scrollFactorY=e,i&&(n.SetAll(this.list,"scrollFactorX",t),n.SetAll(this.list,"scrollFactorY",e)),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(t){n.Remove(this.list,t),this.exclusive&&(t.parentContainer=null,t.removedFromScene())}})},53584(t){t.exports=function(t,e,i,n){i.addToRenderList(e);var s=e.list;if(0!==s.length){var r=e.localTransform;n?(r.loadIdentity(),r.multiply(n),r.translate(e.x,e.y),r.rotate(e.rotation),r.scale(e.scaleX,e.scaleY)):r.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var o=-1!==e.blendMode;o||t.setBlendMode(0);var a=e._alpha,h=e.scrollFactorX,l=e.scrollFactorY;e.mask&&e.mask.preRenderCanvas(t,null,i);for(var u=0;u<s.length;u++){var d=s[u];if(d.willRender(i)){var c=d.alpha,f=d.scrollFactorX,p=d.scrollFactorY;o||d.blendMode===t.currentBlendMode||t.setBlendMode(d.blendMode),d.setScrollFactor(f*h,p*l),d.setAlpha(c*a),d.renderCanvas(t,d,i,r),d.setAlpha(c),d.setScrollFactor(f,p)}}e.mask&&e.mask.postRenderCanvas(t)}}},77143(t,e,i){var n=i(25305),s=i(31559),r=i(44603),o=i(23568),a=i(95540);r.register("container",function(t,e){void 0===t&&(t={});var i=o(t,"x",0),r=o(t,"y",0),h=a(t,"children",null),l=new s(this.scene,i,r,h);return void 0!==e&&(t.add=e),n(this.scene,l,t),l})},24961(t,e,i){var n=i(31559);i(39429).register("container",function(t,e,i){return this.displayList.add(new n(this.scene,t,e,i))})},29959(t,e,i){var n=i(29747),s=n,r=n;s=i(72249),t.exports={renderWebGL:s,renderCanvas:r=i(53584)}},72249(t,e,i){var n=i(8054);t.exports=function(t,e,i,s,r,o,a){var h=i.camera;h.addToRenderList(e);var l=e.list,u=l.length;if(0!==u){var d=i,c=e.localTransform;s?(c.loadIdentity(),c.multiply(s),c.translate(e.x,e.y),c.rotate(e.rotation),c.scale(e.scaleX,e.scaleY)):c.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var f=-1!==e.blendMode;f||0===d.blendMode||((d=d.getClone()).setBlendMode(0),d.use());for(var p=d,g=e.alpha,m=e.scrollFactorX,v=e.scrollFactorY,x=0;x<u;x++){var y,T,w,b,S=l[x];if(S.willRender(h)){if(void 0!==S.alphaTopLeft)y=S.alphaTopLeft,T=S.alphaTopRight,w=S.alphaBottomLeft,b=S.alphaBottomRight;else{var C=S.alpha;y=C,T=C,w=C,b=C}var E=S.scrollFactorX,A=S.scrollFactorY;f||S.blendMode===p.blendMode||S.blendMode===n.BlendModes.SKIP_CHECK||((p=d.getClone()).setBlendMode(S.blendMode),p.use()),S.setScrollFactor(E*m,A*v),S.setAlpha(y*g,T*g,w*g,b*g),S.renderWebGLStep(t,S,p,c,void 0,l,x),S.setAlpha(y,T,w,b),S.setScrollFactor(E,A)}}p!==i&&p.release()}}},47407(t){t.exports=["normal","multiply","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]},3069(t,e,i){var n=i(83419),s=i(31401),r=i(441),o=i(95643),a=i(41212),h=i(35846),l=i(44594),u=i(61369);t.exports=new n({Extends:o,Mixins:[s.AlphaSingle,s.BlendMode,s.Depth,s.Origin,s.ScrollFactor,s.Transform,s.Visible,r],initialize:function(t,e,i,n,s,r){if(o.call(this,t,"DOMElement"),this.parent=t.sys.game.domContainer,!this.parent)throw Error("No DOM Container set in game config");this.cache=t.sys.cache.html,this.node,this.transformOnly=!1,this.skewX=0,this.skewY=0,this.rotate3d=new u,this.rotate3dAngle="deg",this.pointerEvents="auto",this.width=0,this.height=0,this.displayWidth=0,this.displayHeight=0,this.handler=this.dispatchNativeEvent.bind(this),this.setPosition(e,i),"string"==typeof n?"#"===n[0]?this.setElement(n.substr(1),s,r):this.createElement(n,s,r):n&&this.setElement(n,s,r),t.sys.events.on(l.SLEEP,this.handleSceneEvent,this),t.sys.events.on(l.WAKE,this.handleSceneEvent,this),t.sys.events.on(l.PRE_RENDER,this.preRender,this)},handleSceneEvent:function(t){var e=this.node,i=e.style;e&&(i.display=t.settings.visible?"block":"none")},setSkew:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.skewX=t,this.skewY=e,this},setPerspective:function(t){return this.parent.style.perspective=t+"px",this},perspective:{get:function(){return parseFloat(this.parent.style.perspective)},set:function(t){this.parent.style.perspective=t+"px"}},addListener:function(t){if(this.node){t=t.split(" ");for(var e=0;e<t.length;e++)this.node.addEventListener(t[e],this.handler,!1)}return this},removeListener:function(t){if(this.node){t=t.split(" ");for(var e=0;e<t.length;e++)this.node.removeEventListener(t[e],this.handler)}return this},dispatchNativeEvent:function(t){this.emit(t.type,t)},createElement:function(t,e,i){return this.setElement(document.createElement(t),e,i)},setElement:function(t,e,i){var n;if(this.removeElement(),"string"==typeof t?("#"===t[0]&&(t=t.substr(1)),n=document.getElementById(t)):"object"==typeof t&&1===t.nodeType&&(n=t),!n)return this;if(this.node=n,e&&a(e))for(var s in e)n.style[s]=e[s];else"string"==typeof e&&(n.style=e);return n.style.zIndex="0",n.style.display="inline",n.style.position="absolute",n.phaser=this,this.parent.appendChild(n),i&&(n.innerText=i),this.updateSize()},createFromCache:function(t,e){var i=this.cache.get(t);return i&&this.createFromHTML(i,e),this},createFromHTML:function(t,e){void 0===e&&(e="div"),this.removeElement();var i=document.createElement(e);return this.node=i,i.style.zIndex="0",i.style.display="inline",i.style.position="absolute",i.phaser=this,this.parent.appendChild(i),i.innerHTML=t,this.updateSize()},removeElement:function(){return this.node&&(h(this.node),this.node=null),this},updateSize:function(){var t=this.node;return this.width=t.clientWidth,this.height=t.clientHeight,this.displayWidth=this.width*this.scaleX,this.displayHeight=this.height*this.scaleY,this},getChildByProperty:function(t,e){if(this.node){for(var i=this.node.querySelectorAll("*"),n=0;n<i.length;n++)if(i[n][t]===e)return i[n]}return null},getChildByID:function(t){return this.getChildByProperty("id",t)},getChildByName:function(t){return this.getChildByProperty("name",t)},setClassName:function(t){return this.node&&(this.node.className=t,this.updateSize()),this},setText:function(t){return this.node&&(this.node.innerText=t,this.updateSize()),this},setHTML:function(t){return this.node&&(this.node.innerHTML=t,this.updateSize()),this},preRender:function(){var t=this.parentContainer,e=this.node;e&&t&&!t.willRender()&&(e.style.display="none")},willRender:function(){return!0},preDestroy:function(){this.removeElement(),this.scene.sys.events.off(l.SLEEP,this.handleSceneEvent,this),this.scene.sys.events.off(l.WAKE,this.handleSceneEvent,this),this.scene.sys.events.off(l.PRE_RENDER,this.preRender,this)}})},49381(t,e,i){var n=i(47407),s=i(95643),r=i(61340),o=new r,a=new r,h=new r;t.exports=function(t,e,i,r){if(e.node){i.camera&&(i=i.camera);var l=e.node.style,u=e.scene.sys.settings;if(!l||!u.visible||s.RENDER_MASK!==e.renderFlags||0!==e.cameraFilter&&e.cameraFilter&i.id||e.parentContainer&&!e.parentContainer.willRender()){l.display="none";return}var d=e.parentContainer,c=i.alpha*e.alpha;d&&(c*=d.alpha);var f=e.width*e.originX,p=e.height*e.originY,g="0%",m="0%";o.copyWithScrollFactorFrom(i.matrix,i.scrollX,i.scrollY,e.scrollFactorX,e.scrollFactorY),r?(o.multiply(r),f*=e.scaleX,p*=e.scaleY):(g=100*e.originX+"%",m=100*e.originY+"%"),o.translate(-f,-p),a.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),o.multiply(a,h),e.transformOnly||(l.display="block",l.opacity=c,l.zIndex=e._depth,l.pointerEvents=e.pointerEvents,l.mixBlendMode=n[e._blendMode]),l.transform=h.getCSSMatrix()+" skew("+e.skewX+"rad, "+e.skewY+"rad) rotate3d("+e.rotate3d.x+","+e.rotate3d.y+","+e.rotate3d.z+","+e.rotate3d.w+e.rotate3dAngle+")",l.transformOrigin=g+" "+m}}},2611(t,e,i){var n=i(3069);i(39429).register("dom",function(t,e,i,s,r){var o=new n(this.scene,t,e,i,s,r);return this.displayList.add(o),o})},441(t,e,i){var n=i(29747),s=n,r=n;s=i(49381),t.exports={renderWebGL:s,renderCanvas:r=i(49381)}},62980(t){t.exports="addedtoscene"},41337(t){t.exports="destroy"},44947(t){t.exports="removedfromscene"},49358(t){t.exports="complete"},35163(t){t.exports="created"},97249(t){t.exports="error"},19483(t){t.exports="locked"},56059(t){t.exports="loop"},26772(t){t.exports="metadata"},64437(t){t.exports="playing"},83411(t){t.exports="play"},75780(t){t.exports="seeked"},67799(t){t.exports="seeking"},63500(t){t.exports="stalled"},55541(t){t.exports="stop"},53208(t){t.exports="textureready"},4992(t){t.exports="unlocked"},12(t){t.exports="unsupported"},51708(t,e,i){t.exports={ADDED_TO_SCENE:i(62980),DESTROY:i(41337),REMOVED_FROM_SCENE:i(44947),VIDEO_COMPLETE:i(49358),VIDEO_CREATED:i(35163),VIDEO_ERROR:i(97249),VIDEO_LOCKED:i(19483),VIDEO_LOOP:i(56059),VIDEO_METADATA:i(26772),VIDEO_PLAY:i(83411),VIDEO_PLAYING:i(64437),VIDEO_SEEKED:i(75780),VIDEO_SEEKING:i(67799),VIDEO_STALLED:i(63500),VIDEO_STOP:i(55541),VIDEO_TEXTURE:i(53208),VIDEO_UNLOCKED:i(4992),VIDEO_UNSUPPORTED:i(12)}},42421(t,e,i){var n=i(83419),s=i(31401),r=i(95643),o=i(64993);t.exports=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.Origin,s.ScrollFactor,s.Size,s.Texture,s.Tint,s.Transform,s.Visible,o],initialize:function(t){r.call(this,t,"Extern")},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(){},render:function(){}})},70217(){},56315(t,e,i){var n=i(42421);i(39429).register("extern",function(){var t=new n(this.scene);return this.displayList.add(t),t})},64993(t,e,i){var n=i(29747),s=n,r=n;s=i(80287),t.exports={renderWebGL:s,renderCanvas:r=i(70217)}},80287(t,e,i){var n=i(91296);t.exports=function(t,e,i,s,r,o,a){t.renderNodes.getNode("YieldContext").run(i);var h=n(e,i.camera,s,!i.useCanvas).calc;e.render.call(e,t,i,h,o,a),t.renderNodes.getNode("RebindContext").run(i)}},34637(t,e,i){var n=i(73043),s=i(26099),r=i(41509),o=i(68589),a=i(83419),h=i(20071);t.exports=new a({Extends:h,initialize:function(t,e,i,a,l,u){e||(e={});var d={name:"gradient",fragmentSource:r,shaderAdditions:[{name:"RAMP_0",tags:"RAMP",additions:{fragmentHeader:o}}],initialUniforms:{uRampTexture:0},setupUniforms:this._setupUniforms,updateShaderConfig:this._updateShaderConfig};if(h.call(this,t,d,i,a,l,u),this.type="Gradient",this.ramp=new n(this.scene,e.bands||{colorStart:0,colorEnd:0xffffff}),this.offset=e.offset||0,this.repeatMode=e.repeatMode||0,this.shapeMode=e.shapeMode||0,this.start=new s(0,0),e.start&&this.start.copy(e.start),this.shape=new s(1,0),e.shape)this.shape.copy(e.shape);else{var c=void 0===e.length?1:e.length,f=e.direction||0;this.shape.setTo(c*Math.cos(f),c*Math.sin(f))}this.dither=!!e.dither,this.setTextures([this.ramp.dataTexture])},_setupUniforms:function(t,e){t("uRampResolution",this.ramp.dataTextureResolution),t("uRampBandStart",this.ramp.dataTextureFirstBand),t("uOffset",this.offset),t("uRepeatMode",this.repeatMode),t("uShapeMode",this.shapeMode),t("uStart",[this.start.x,1-this.start.y]),t("uShape",[this.shape.x,-this.shape.y]),t("uDither",this.dither)},_updateShaderConfig:function(t,e,i){var n=e.ramp.bandTreeDepth,s=i.programManager.getAdditionsByTag("RAMP")[0];s.name="RAMP_"+n,s.additions.fragmentHeader=o.replace("#define BAND_TREE_DEPTH 0.0","#define BAND_TREE_DEPTH "+n+".0")},preDestroy:function(){this.ramp.destroy(),h.prototype.preDestroy.call(this)}})},26353(t,e,i){var n=i(25305),s=i(44603),r=i(23568),o=i(34637);s.register("gradient",function(t,e){void 0===t&&(t={});var i=r(t,"config",null),s=r(t,"x",0),a=r(t,"y",0),h=r(t,"width",128),l=r(t,"height",128),u=new o(this.scene,i,s,a,h,l);return void 0!==e&&(t.add=e),n(this.scene,u,t),u})},69315(t,e,i){var n=i(34637);i(39429).register("gradient",function(t,e,i,s,r){return this.displayList.add(new n(this.scene,t,e,i,s,r))})},85592(t){t.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(t,e,i){var n=i(71911),s=i(83419),r=i(85592),o=i(31401),a=i(8497),h=i(95643),l=i(87891),u=i(95540),d=i(35154),c=i(36383),f=i(84503),p=new s({Extends:h,Mixins:[o.AlphaSingle,o.BlendMode,o.Depth,o.Lighting,o.Mask,o.RenderNodes,o.Transform,o.Visible,o.ScrollFactor,f],initialize:function(t,e){var i=d(e,"x",0),n=d(e,"y",0);h.call(this,t,"Graphics"),this.setPosition(i,n),this.initRenderNodes(this._defaultRenderNodesMap),this.displayOriginX=0,this.displayOriginY=0,this.commandBuffer=[],this.defaultFillColor=-1,this.defaultFillAlpha=1,this.defaultStrokeWidth=1,this.defaultStrokeColor=-1,this.defaultStrokeAlpha=1,this._lineWidth=1,this.pathDetailThreshold=-1,this.lineStyle(1,0,0),this.fillStyle(0,0),this.setDefaultStyles(e)},_defaultRenderNodesMap:{get:function(){return l}},setDefaultStyles:function(t){return d(t,"lineStyle",null)&&(this.defaultStrokeWidth=d(t,"lineStyle.width",1),this.defaultStrokeColor=d(t,"lineStyle.color",0xffffff),this.defaultStrokeAlpha=d(t,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),d(t,"fillStyle",null)&&(this.defaultFillColor=d(t,"fillStyle.color",0xffffff),this.defaultFillAlpha=d(t,"fillStyle.alpha",1),this.fillStyle(this.defaultFillColor,this.defaultFillAlpha)),this},lineStyle:function(t,e,i){return void 0===i&&(i=1),this.commandBuffer.push(r.LINE_STYLE,t,e,i),this._lineWidth=t,this},fillStyle:function(t,e){return void 0===e&&(e=1),this.commandBuffer.push(r.FILL_STYLE,t,e),this},fillGradientStyle:function(t,e,i,n,s,o,a,h){return void 0===s&&(s=1),void 0===o&&(o=s),void 0===a&&(a=s),void 0===h&&(h=s),this.commandBuffer.push(r.GRADIENT_FILL_STYLE,s,o,a,h,t,e,i,n),this},lineGradientStyle:function(t,e,i,n,s,o){return void 0===o&&(o=1),this.commandBuffer.push(r.GRADIENT_LINE_STYLE,t,o,e,i,n,s),this},beginPath:function(){return this.commandBuffer.push(r.BEGIN_PATH),this},closePath:function(){return this.commandBuffer.push(r.CLOSE_PATH),this},fillPath:function(){return this.commandBuffer.push(r.FILL_PATH),this},fill:function(){return this.commandBuffer.push(r.FILL_PATH),this},strokePath:function(){return this.commandBuffer.push(r.STROKE_PATH),this},stroke:function(){return this.commandBuffer.push(r.STROKE_PATH),this},fillCircleShape:function(t){return this.fillCircle(t.x,t.y,t.radius)},strokeCircleShape:function(t){return this.strokeCircle(t.x,t.y,t.radius)},fillCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,c.TAU),this.fillPath(),this},strokeCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,c.TAU),this.strokePath(),this},fillRectShape:function(t){return this.fillRect(t.x,t.y,t.width,t.height)},strokeRectShape:function(t){return this.strokeRect(t.x,t.y,t.width,t.height)},fillRect:function(t,e,i,n){return this.commandBuffer.push(r.FILL_RECT,t,e,i,n),this},strokeRect:function(t,e,i,n){var s=this._lineWidth/2,r=t-s,o=t+s;return this.beginPath(),this.moveTo(t,e),this.lineTo(t,e+n),this.strokePath(),this.beginPath(),this.moveTo(t+i,e),this.lineTo(t+i,e+n),this.strokePath(),this.beginPath(),this.moveTo(r,e),this.lineTo(o+i,e),this.strokePath(),this.beginPath(),this.moveTo(r,e+n),this.lineTo(o+i,e+n),this.strokePath(),this},fillRoundedRect:function(t,e,i,n,s){void 0===s&&(s=20);var r=s,o=s,a=s,h=s;"number"!=typeof s&&(r=u(s,"tl",20),o=u(s,"tr",20),a=u(s,"bl",20),h=u(s,"br",20));var l=r>=0,d=o>=0,f=a>=0,p=h>=0;return r=Math.abs(r),o=Math.abs(o),a=Math.abs(a),h=Math.abs(h),this.beginPath(),this.moveTo(t+r,e),this.lineTo(t+i-o,e),d?this.arc(t+i-o,e+o,o,-c.PI_OVER_2,0):this.arc(t+i,e,o,Math.PI,c.PI_OVER_2,!0),this.lineTo(t+i,e+n-h),p?this.arc(t+i-h,e+n-h,h,0,c.PI_OVER_2):this.arc(t+i,e+n,h,-c.PI_OVER_2,Math.PI,!0),this.lineTo(t+a,e+n),f?this.arc(t+a,e+n-a,a,c.PI_OVER_2,Math.PI):this.arc(t,e+n,a,0,-c.PI_OVER_2,!0),this.lineTo(t,e+r),l?this.arc(t+r,e+r,r,-Math.PI,-c.PI_OVER_2):this.arc(t,e,r,c.PI_OVER_2,0,!0),this.fillPath(),this},strokeRoundedRect:function(t,e,i,n,s){void 0===s&&(s=20);var r=s,o=s,a=s,h=s,l=Math.min(i,n)/2;"number"!=typeof s&&(r=u(s,"tl",20),o=u(s,"tr",20),a=u(s,"bl",20),h=u(s,"br",20));var d=r>=0,f=o>=0,p=a>=0,g=h>=0;return r=Math.min(Math.abs(r),l),o=Math.min(Math.abs(o),l),a=Math.min(Math.abs(a),l),h=Math.min(Math.abs(h),l),this.beginPath(),this.moveTo(t+r,e),this.lineTo(t+i-o,e),this.moveTo(t+i-o,e),f?this.arc(t+i-o,e+o,o,-c.PI_OVER_2,0):this.arc(t+i,e,o,Math.PI,c.PI_OVER_2,!0),this.lineTo(t+i,e+n-h),this.moveTo(t+i,e+n-h),g?this.arc(t+i-h,e+n-h,h,0,c.PI_OVER_2):this.arc(t+i,e+n,h,-c.PI_OVER_2,Math.PI,!0),this.lineTo(t+a,e+n),this.moveTo(t+a,e+n),p?this.arc(t+a,e+n-a,a,c.PI_OVER_2,Math.PI):this.arc(t,e+n,a,0,-c.PI_OVER_2,!0),this.lineTo(t,e+r),this.moveTo(t,e+r),d?this.arc(t+r,e+r,r,-Math.PI,-c.PI_OVER_2):this.arc(t,e,r,c.PI_OVER_2,0,!0),this.strokePath(),this},fillPointShape:function(t,e){return this.fillPoint(t.x,t.y,e)},fillPoint:function(t,e,i){return!i||i<1?i=1:(t-=i/2,e-=i/2),this.commandBuffer.push(r.FILL_RECT,t,e,i,i),this},fillTriangleShape:function(t){return this.fillTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},strokeTriangleShape:function(t){return this.strokeTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},fillTriangle:function(t,e,i,n,s,o){return this.commandBuffer.push(r.FILL_TRIANGLE,t,e,i,n,s,o),this},strokeTriangle:function(t,e,i,n,s,o){return this.commandBuffer.push(r.STROKE_TRIANGLE,t,e,i,n,s,o),this},strokeLineShape:function(t){return this.lineBetween(t.x1,t.y1,t.x2,t.y2)},lineBetween:function(t,e,i,n){return this.beginPath(),this.moveTo(t,e),this.lineTo(i,n),this.strokePath(),this},lineTo:function(t,e){return this.commandBuffer.push(r.LINE_TO,t,e),this},moveTo:function(t,e){return this.commandBuffer.push(r.MOVE_TO,t,e),this},strokePoints:function(t,e,i,n){void 0===e&&(e=!1),void 0===i&&(i=!1),void 0===n&&(n=t.length),this.beginPath(),this.moveTo(t[0].x,t[0].y);for(var s=1;s<n;s++)this.lineTo(t[s].x,t[s].y);return e&&this.lineTo(t[0].x,t[0].y),i&&this.closePath(),this.strokePath(),this},fillPoints:function(t,e,i,n){void 0===e&&(e=!1),void 0===i&&(i=!1),void 0===n&&(n=t.length),this.beginPath(),this.moveTo(t[0].x,t[0].y);for(var s=1;s<n;s++)this.lineTo(t[s].x,t[s].y);return e&&this.lineTo(t[0].x,t[0].y),i&&this.closePath(),this.fillPath(),this},strokeEllipseShape:function(t,e){void 0===e&&(e=32);var i=t.getPoints(e);return this.strokePoints(i,!0)},strokeEllipse:function(t,e,i,n,s){void 0===s&&(s=32);var r=new a(t,e,i,n).getPoints(s);return this.strokePoints(r,!0)},fillEllipseShape:function(t,e){void 0===e&&(e=32);var i=t.getPoints(e);return this.fillPoints(i,!0)},fillEllipse:function(t,e,i,n,s){void 0===s&&(s=32);var r=new a(t,e,i,n).getPoints(s);return this.fillPoints(r,!0)},arc:function(t,e,i,n,s,o,a){return void 0===o&&(o=!1),void 0===a&&(a=0),this.commandBuffer.push(r.ARC,t,e,i,n,s,o,a),this},slice:function(t,e,i,n,s,o,a){return void 0===o&&(o=!1),void 0===a&&(a=0),this.commandBuffer.push(r.BEGIN_PATH),this.commandBuffer.push(r.MOVE_TO,t,e),this.commandBuffer.push(r.ARC,t,e,i,n,s,o,a),this.commandBuffer.push(r.CLOSE_PATH),this},save:function(){return this.commandBuffer.push(r.SAVE),this},restore:function(){return this.commandBuffer.push(r.RESTORE),this},translateCanvas:function(t,e){return this.commandBuffer.push(r.TRANSLATE,t,e),this},scaleCanvas:function(t,e){return this.commandBuffer.push(r.SCALE,t,e),this},rotateCanvas:function(t){return this.commandBuffer.push(r.ROTATE,t),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}
1,generateTexture:function(t,e,i){var n,s,r=this.scene.sys,o=r.game.renderer;void 0===e&&(e=r.scale.width),void 0===i&&(i=r.scale.height),p.TargetCamera.setScene(this.scene),p.TargetCamera.setViewport(0,0,e,i),p.TargetCamera.scrollX=this.x,p.TargetCamera.scrollY=this.y;var a={willReadFrequently:!0};if("string"==typeof t)if(r.textures.exists(t)){var h=(n=r.textures.get(t)).getSourceImage();h instanceof HTMLCanvasElement&&(s=h.getContext("2d",a))}else s=(n=r.textures.createCanvas(t,e,i)).getSourceImage().getContext("2d",a);else t instanceof HTMLCanvasElement&&(s=t.getContext("2d",a));return s&&(this.renderCanvas(o,this,p.TargetCamera,null,s,!1),n&&n.refresh()),this},preDestroy:function(){this.commandBuffer=[]}});p.TargetCamera=new n,t.exports=p},32768(t,e,i){var n=i(85592),s=i(20926);t.exports=function(t,e,i,r,o,a){var h=e.commandBuffer,l=h.length,u=o||t.currentContext;if(0!==l&&s(t,u,e,i,r)){i.addToRenderList(e);var d=1,c=1,f=0,p=0,g=1;u.beginPath();for(var m=0;m<l;++m)switch(h[m]){case n.ARC:u.arc(h[m+1],h[m+2],h[m+3],h[m+4],h[m+5],h[m+6]),m+=7;break;case n.LINE_STYLE:g=h[m+1],f=h[m+2],u.strokeStyle="rgba("+((0xff0000&f)>>>16)+","+((65280&f)>>>8)+","+(255&f)+","+(d=h[m+3])+")",u.lineWidth=g,m+=3;break;case n.FILL_STYLE:p=h[m+1],u.fillStyle="rgba("+((0xff0000&p)>>>16)+","+((65280&p)>>>8)+","+(255&p)+","+(c=h[m+2])+")",m+=2;break;case n.BEGIN_PATH:u.beginPath();break;case n.CLOSE_PATH:u.closePath();break;case n.FILL_PATH:a||u.fill();break;case n.STROKE_PATH:a||u.stroke();break;case n.FILL_RECT:a?u.rect(h[m+1],h[m+2],h[m+3],h[m+4]):u.fillRect(h[m+1],h[m+2],h[m+3],h[m+4]),m+=4;break;case n.FILL_TRIANGLE:u.beginPath(),u.moveTo(h[m+1],h[m+2]),u.lineTo(h[m+3],h[m+4]),u.lineTo(h[m+5],h[m+6]),u.closePath(),a||u.fill(),m+=6;break;case n.STROKE_TRIANGLE:u.beginPath(),u.moveTo(h[m+1],h[m+2]),u.lineTo(h[m+3],h[m+4]),u.lineTo(h[m+5],h[m+6]),u.closePath(),a||u.stroke(),m+=6;break;case n.LINE_TO:u.lineTo(h[m+1],h[m+2]),m+=2;break;case n.MOVE_TO:u.moveTo(h[m+1],h[m+2]),m+=2;break;case n.LINE_FX_TO:u.lineTo(h[m+1],h[m+2]),m+=5;break;case n.MOVE_FX_TO:u.moveTo(h[m+1],h[m+2]),m+=5;break;case n.SAVE:u.save();break;case n.RESTORE:u.restore();break;
vendor: 4,230 bytes, line 1
1case n.TRANSLATE:u.translate(h[m+1],h[m+2]),m+=2;break;case n.SCALE:u.scale(h[m+1],h[m+2]),m+=2;break;case n.ROTATE:u.rotate(h[m+1]),m+=1;break;case n.GRADIENT_FILL_STYLE:m+=5;break;case n.GRADIENT_LINE_STYLE:m+=6}u.restore()}}},87079(t,e,i){var n=i(44603),s=i(43831);n.register("graphics",function(t,e){void 0===t&&(t={}),void 0!==e&&(t.add=e);var i=new s(this.scene,t);return t.add&&this.scene.sys.displayList.add(i),i})},1201(t,e,i){var n=i(43831);i(39429).register("graphics",function(t){return this.displayList.add(new n(this.scene,t))})},84503(t,e,i){var n=i(29747),s=n,r=n;s=i(77545),r=i(32768),t.exports={renderWebGL:s,renderCanvas:r=i(32768)}},77545(t,e,i){var n=i(85592),s=i(91296),r=i(70554),o=i(61340),a=function(t,e,i){this.x=t,this.y=e,this.width=i},h=function(t,e,i){this.points=[],this.points[0]=new a(t,e,i),this.addPoint=function(t,e,i){var n=this.points[this.points.length-1];(n.x!==t||n.y!==e)&&this.points.push(new a(t,e,i))}},l=[],u=new o,d=new o,c={TL:0,TR:0,BL:0,BR:0},f={TL:0,TR:0,BL:0,BR:0},p=[{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0}];t.exports=function(t,e,i,o){if(0!==e.commandBuffer.length){var a=e.customRenderNodes,g=e.defaultRenderNodes,m=a.Submitter||g.Submitter,v=e.lighting,x=i.camera;x.addToRenderList(e);for(var y=s(e,x,o,!i.useCanvas).calc,T=u.loadIdentity(),w=e.commandBuffer,b=e.alpha,S=Math.max(e.pathDetailThreshold,t.config.pathDetailThreshold,0),C=1,E=0,A=0,_=0,M=2*Math.PI,R=[],O=0,P=!0,L=null,D=r.getTintAppendFloatAlpha,F=0;F<w.length;F++)switch(w[F]){case n.BEGIN_PATH:R.length=0,L=null,P=!0;break;case n.CLOSE_PATH:P=!1,L&&L.points.length&&L.points.push(L.points[0]);break;case n.FILL_PATH:for(y.multiply(T,d),O=0;O<R.length;O++)(a.FillPath||g.FillPath).run(i,d,m,R[O].points,c.TL,c.TR,c.BL,S,v);break;case n.STROKE_PATH:for(y.multiply(T,d),O=0;O<R.length;O++)(a.StrokePath||g.StrokePath).run(i,m,R[O].points,C,P,d,f.TL,f.TR,f.BL,f.BR,S,v);break;case n.LINE_STYLE:C=w[++F];var I=D(w[++F],w[++F]*b);f.TL=I,f.TR=I,f.BL=I,f.BR=I;break;case n.FILL_STYLE:var N=D(w[++F],w[++F]*b);c.TL=N,c.TR=N,c.BL=N,c.BR=N;break;case n.GRADIENT_FILL_STYLE:var B=w[++F]*b,k=w[++F]*b,U=w[++F]*b,z=w[++F]*b;c.TL=D(w[++F],B),c.TR=D(w[++F],k),c.BL=D(w[++F],U),c.BR=D(w[++F],z);break;case n.GRADIENT_LINE_STYLE:C=w[++F];var Y=w[++F]*b;f.TL=D(w[++F],Y),f.TR=D(w[++F],Y),f.BL=D(w[++F],Y),f.BR=D(w[++F],Y);break;case n.ARC:var X=0,W=w[++F],G=w[++F],V=w[++F],H=w[++F],j=w[++F],q=w[++F],K=w[++F];for(j-=H,q?j<-M?j=-M:j>0&&(j=-M+j%M):j>M?j=M:j<0&&(j=M+j%M),null===L&&(L=new h(W+Math.cos(H)*V,G+Math.sin(H)*V,C),R.push(L),X+=.01);X<1+K;)E=W+Math.cos(_=j*X+H)*V,A=G+Math.sin(_)*V,L.addPoint(E,A,C),X+=.01;E=W+Math.cos(_=j+H)*V,A=G+Math.sin(_)*V,L.addPoint(E,A,C);break;case n.FILL_RECT:y.multiply(T,d),(a.FillRect||g.FillRect).run(i,d,m,w[++F],w[++F],w[++F],w[++F],c.TL,c.TR,c.BL,c.BR,v);break;case n.FILL_TRIANGLE:y.multiply(T,d),(a.FillTri||g.FillTri).run(i,d,m,w[++F],w[++F],w[++F],w[++F],w[++F],w[++F],c.TL,c.TR,c.BL,v);break;case n.STROKE_TRIANGLE:y.multiply(T,d),p[0].x=w[++F],p[0].y=w[++F],p[0].width=C,p[1].x=w[++F],p[1].y=w[++F],p[1].width=C,p[2].x=w[++F],p[2].y=w[++F],p[2].width=C,p[3].x=p[0].x,p[3].y=p[0].y,p[3].width=C,(a.StrokePath||g.StrokePath).run(i,m,p,C,!1,d,f.TL,f.TR,f.BL,f.BR,v);break;case n.LINE_TO:W=w[++F],G=w[++F],null!==L?L.addPoint(W,G,C):(L=new h(W,G,C),R.push(L));break;case n.MOVE_TO:L=new h(w[++F],w[++F],C),R.push(L);break;case n.SAVE:l.push(T.copyToArray());break;case n.RESTORE:T.copyFromArray(l.pop());break;case n.TRANSLATE:W=w[++F],G=w[++F],T.translate(W,G);break;case n.SCALE:W=w[++F],G=w[++F],T.scale(W,G);break;case n.ROTATE:T.rotate(w[++F])}}}},26479(t,e,i){var n=i(61061),s=i(83419),r=i(51708),o=i(50792),a=i(46710),h=i(95540),l=i(35154),u=i(97022),d=i(41212),c=i(88492),f=i(68287);t.exports=new s({Extends:o,initialize:function(t,e,i){o.call(this),i?e&&!Array.isArray(e)&&(e=[e]):Array.isArray(e)?d(e[0])&&(i=e,e=null):d(e)&&(i=e,e=null),this.scene=t,this.children=new Set,this.isParent=!0,this.type="Group",this.classType=h(i,"classType",f),this.name=h(i,"name",""),this.active=h(i,"active",!0),this.maxSize=h(i,"maxSize",-1),this.defaultKey=h(i,"defaultKey",null),this.defaultFrame=h(i,"defaultFrame",null),this.runChildUpdate=h(i,"runC
1hildUpdate",!1),this.createCallback=h(i,"createCallback",null),this.removeCallback=h(i,"removeCallback",null),this.createMultipleCallback=h(i,"createMultipleCallback",null),this.internalCreateCallback=h(i,"internalCreateCallback",null),this.internalRemoveCallback=h(i,"internalRemoveCallback",null),e&&this.addMultiple(e),i&&this.createMultiple(i),this.on(r.ADDED_TO_SCENE,this.addedToScene,this),this.on(r.REMOVED_FROM_SCENE,this.removedFromScene,this)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},create:function(t,e,i,n,s,r){if(void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.defaultKey),void 0===n&&(n=this.defaultFrame),void 0===s&&(s=!0),void 0===r&&(r=!0),this.isFull())return null;var o=new this.classType(this.scene,t,e,i,n);return o.addToDisplayList(this.scene.sys.displayList),o.addToUpdateList(),o.visible=s,o.setActive(r),this.add(o),o},createMultiple:function(t){if(this.isFull())return[];Array.isArray(t)||(t=[t]);var e=[];if(t[0].key)for(var i=0;i<t.length;i++){var n=this.createFromConfig(t[i]);e=e.concat(n)}return e},createFromConfig:function(t){if(this.isFull())return[];this.classType=h(t,"classType",this.classType);var e=h(t,"key",void 0),i=h(t,"frame",null),s=h(t,"visible",!0),r=h(t,"active",!0),o=[];if(void 0===e)return o;Array.isArray(e)||(e=[e]),Array.isArray(i)||(i=[i]);var a=h(t,"repeat",0),d=h(t,"randomKey",!1),f=h(t,"randomFrame",!1),p=h(t,"yoyo",!1),g=h(t,"quantity",!1),m=h(t,"frameQuantity",1),v=c(e,i,{max:h(t,"max",0),qty:g||m,random:d,randomB:f,repeat:a,yoyo:p});t.createCallback&&(this.createCallback=t.createCallback),t.removeCallback&&(this.removeCallback=t.removeCallback),t.internalCreateCallback&&(this.internalCreateCallback=t.internalCreateCallback),t.internalRemoveCallback&&(this.internalRemoveCallback=t.internalRemoveCallback);for(var x=0;x<v.length;x++){var y=this.create(0,0,v[x].a,v[x].b,s,r);if(!y)break;o.push(y)}if(u(t,"setXY")){var T=l(t,"setXY.x",0),w=l(t,"setXY.y",0),b=l(t,"setXY.stepX",0),S=l(t,"setXY.stepY",0);n.SetXY(o,T,w,b,S)}if(u(t,"setRotation")){var C=l(t,"setRotation.value",0),E=l(t,"setRotation.step",0);n.SetRotation(o,C,E)}if(u(t,"setScale")){var A=l(t,"setScale.x",1),_=l(t,"setScale.y",A),M=l(t,"setScale.stepX",0),R=l(t,"setScale.stepY",0);n.SetScale(o,A,_,M,R)}if(u(t,"setOrigin")){var O=l(t,"setOrigin.x",.5),P=l(t,"setOrigin.y",O),L=l(t,"setOrigin.stepX",0),D=l(t,"setOrigin.stepY",0);n.SetOrigin(o,O,P,L,D)}if(u(t,"setAlpha")){var F=l(t,"setAlpha.value",1),I=l(t,"setAlpha.step",0);n.SetAlpha(o,F,I)}if(u(t,"setDepth")){var N=l(t,"setDepth.value",0),B=l(t,"setDepth.step",0);n.SetDepth(o,N,B)}if(u(t,"setScrollFactor")){var k=l(t,"setScrollFactor.x",1),U=l(t,"setScrollFactor.y",k),z=l(t,"setScrollFactor.stepX",0),Y=l(t,"setScrollFactor.stepY",0);n.SetScrollFactor(o,k,U,z,Y)}var X=h(t,"hitArea",null),W=h(t,"hitAreaCallback",null);X&&n.SetHitArea(o,X,W);var G=h(t,"gridAlign",!1);return G&&n.GridAlign(o,G),this.createMultipleCallback&&this.createMultipleCallback.call(this,o),o},preUpdate:function(t,e){this.runChildUpdate&&0!==this.children.size&&this.children.forEach(function(i){i.active&&i.update(t,e)})},add:function(t,e){return void 0===e&&(e=!1),this.isFull()||(this.children.add(t),this.internalCreateCallback&&this.internalCreateCallback.call(this,t),this.createCallback&&this.createCallback.call(this,t),e&&(t.addToDisplayList(this.scene.sys.displayList),t.addToUpdateList()),t.on(r.DESTROY,this.remove,this)),this},addMultiple:function(t,e){if(void 0===e&&(e=!1),Array.isArray(t))for(var i=0;i<t.length;i++)this.add(t[i],e);return this},remove:function(t,e,i){return void 0===e&&(e=!1),void 0===i&&(i=!1),this.children.has(t)&&(this.children.delete(t),this.internalRemoveCallback&&this.internalRemoveCallback.call(this,t),this.removeCallback&&this.removeCallback.call(this,t),t.off(r.DESTROY,this.remove,this),i?t.destroy():e&&(t.removeFromDisplayList(),t.removeFromUpdateList())),this},clear:function(t,e){void 0===t&&(t=!1),void 0===e&&(e=!1);var i=this.children;return i.forEach(function(i){i.off(r.DESTROY,this.remove,this),e?i.destroy():t&&(i.removeFromDisplayList(),i.removeFromUpdateList())},this),i.clear(),this},contains:function(t){return this.children.has(t)},getChildren:function(){return Array.from(this.children)},getLength:function(){return this.children.size}
vendor: 8,317 bytes, line 1
1,getMatching:function(t,e,i,n){return a(Array.from(this.children),t,e,i,n)},getFirst:function(t,e,i,n,s,r,o){return this.getHandler(!0,1,t,e,i,n,s,r,o)},getFirstNth:function(t,e,i,n,s,r,o,a){return this.getHandler(!0,t,e,i,n,s,r,o,a)},getLast:function(t,e,i,n,s,r,o){return this.getHandler(!1,1,t,e,i,n,s,r,o)},getLastNth:function(t,e,i,n,s,r,o,a){return this.getHandler(!1,t,e,i,n,s,r,o,a)},getHandler:function(t,e,i,n,s,r,o,a,h){void 0===i&&(i=!1),void 0===n&&(n=!1);var l,u,d=0,c=Array.from(this.children);if(t)for(u=0;u<c.length;u++)if((l=c[u]).active===i){if(++d===e)break}else l=null;else for(u=c.length-1;u>=0;u--)if((l=c[u]).active===i){if(++d===e)break}else l=null;return l?("number"==typeof s&&(l.x=s),"number"==typeof r&&(l.y=r),l):n?this.create(s,r,o,a,h):null},get:function(t,e,i,n,s){return this.getFirst(!1,!0,t,e,i,n,s)},getFirstAlive:function(t,e,i,n,s,r){return this.getFirst(!0,t,e,i,n,s,r)},getFirstDead:function(t,e,i,n,s,r){return this.getFirst(!1,t,e,i,n,s,r)},playAnimation:function(t,e){return n.PlayAnimation(Array.from(this.children),t,e),this},isFull:function(){return -1!==this.maxSize&&this.children.size>=this.maxSize},countActive:function(t){void 0===t&&(t=!0);var e=0;return this.children.forEach(function(i){i.active===t&&e++}),e},getTotalUsed:function(){return this.countActive()},getTotalFree:function(){var t=this.getTotalUsed();return(-1===this.maxSize?0xe8d4a50fff:this.maxSize)-t},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=t,this},propertyValueSet:function(t,e,i,s,r){return n.PropertyValueSet(Array.from(this.children),t,e,i,s,r),this},propertyValueInc:function(t,e,i,s,r){return n.PropertyValueInc(Array.from(this.children),t,e,i,s,r),this},setX:function(t,e){return n.SetX(Array.from(this.children),t,e),this},setY:function(t,e){return n.SetY(Array.from(this.children),t,e),this},setXY:function(t,e,i,s){return n.SetXY(Array.from(this.children),t,e,i,s),this},incX:function(t,e){return n.IncX(Array.from(this.children),t,e),this},incY:function(t,e){return n.IncY(Array.from(this.children),t,e),this},incXY:function(t,e,i,s){return n.IncXY(Array.from(this.children),t,e,i,s),this},shiftPosition:function(t,e,i){return n.ShiftPosition(Array.from(this.children),t,e,i),this},angle:function(t,e){return n.Angle(Array.from(this.children),t,e),this},rotate:function(t,e){return n.Rotate(Array.from(this.children),t,e),this},rotateAround:function(t,e){return n.RotateAround(Array.from(this.children),t,e),this},rotateAroundDistance:function(t,e,i){return n.RotateAroundDistance(Array.from(this.children),t,e,i),this},setAlpha:function(t,e){return n.SetAlpha(Array.from(this.children),t,e),this},setTint:function(t,e,i,s){return n.SetTint(Array.from(this.children),t,e,i,s),this},setOrigin:function(t,e,i,s){return n.SetOrigin(Array.from(this.children),t,e,i,s),this},scaleX:function(t,e){return n.ScaleX(Array.from(this.children),t,e),this},scaleY:function(t,e){return n.ScaleY(Array.from(this.children),t,e),this},scaleXY:function(t,e,i,s){return n.ScaleXY(Array.from(this.children),t,e,i,s),this},setDepth:function(t,e){return n.SetDepth(Array.from(this.children),t,e),this},setBlendMode:function(t){return n.SetBlendMode(Array.from(this.children),t),this},setHitArea:function(t,e){return n.SetHitArea(Array.from(this.children),t,e),this},shuffle:function(){return n.Shuffle(Array.from(this.children)),this},kill:function(t){this.children.has(t)&&t.setActive(!1)},killAndHide:function(t){this.children.has(t)&&(t.setActive(!1),t.setVisible(!1))},setVisible:function(t,e,i){return n.SetVisible(Array.from(this.children),t,e,i),this},toggleVisible:function(){return n.ToggleVisible(Array.from(this.children)),this},destroy:function(t,e){void 0===t&&(t=!1),void 0===e&&(e=!1),this.scene&&!this.ignoreDestroy&&(this.emit(r.DESTROY,this),this.removeAllListeners(),this.scene.sys.updateList.remove(this),this.clear(e,t),this.scene=void 0,this.children=void 0)}})},94975(t,e,i){var n=i(44603),s=i(26479);n.register("group",function(t){return new s(this.scene,null,t)})},3385(t,e,i){var n=i(26479);i(39429).register("group",function(t,e){return this.updateList.add(new n(this.scene,t,e))})},88571(t,e,i){var n=i(40939),s=i(83419),r=i(31401),o=i(95643),a=i(59819);t.exports=new s({Extends:o,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Flip,r.GetBounds,r.Lighting,r.Mask,r.Origin,r.RenderNodes,r.ScrollFactor,r.Size,r.TextureCrop,r.Tint,r.Transform,r.Visible,a],initialize:function(t,e,i,n,s){o.call(this,t,"Image"),this._crop=this.resetCropObject(),this.setTexture(n,s),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initRenderNodes(this._defaultRenderNodesMap)},_defaultRenderNodesMap:{get:function(){return n}}})},40652(t){t.exports=function(t,e,i,n){i.addToRenderList(e),t.batchSprite(e,e.frame,i,n)}},82459(t,e,i){var n=i(25305),s=i(44603),r=i(23568),o=i(88571);s.register("image",function(t,e){void 0===t&&(t={});var i=r(t,"key",null),s=r(t,"frame",null),a=new o(this.scene,0,0,i,s);return void 0!==e&&(t.add=e),n(this.scene,a,t),a})},2117(t,e,i){var n=i(88571);i(39429).register("image",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},59819(t,e,i){var n=i(29747),s=n,r=n;s=i(99517),t.exports={renderWebGL:s,renderCanvas:r=i(40652)}},99517(t){t.exports=function(t,e,i,n){i.camera.addToRenderList(e);var s=e.customRenderNodes,r=e.defaultRenderNodes;(s.Submitter||r.Submitter).run(i,e,n,0,s.Texturer||r.Texturer,s.Transformer||r.Transformer)}},77856(t,e,i){var n={Events:i(51708),DisplayList:i(8050),GameObjectCreator:i(44603),GameObjectFactory:i(39429),UpdateList:i(45027),Components:i(31401),GetCalcMatrix:i(91296),BuildGameObject:i(25305),BuildGameObjectAnimation:i(13059),GameObject:i(95643),BitmapText:i(22186),Blitter:i(6107),Bob:i(46590),Container:i(31559),DOMElement:i(3069),DynamicBitmapText:i(2638),Extern:i(42421),Graphics:i(43831),Group:i(26479),Image:i(88571),Layer:i(93595),Particles:i(18404),PathFollower:i(1159),RenderTexture:i(591),RetroFont:i(196),Rope:i(77757),Sprite:i(68287),Stamp:i(14727),Text:i(50171),GetTextSize:i(14220),MeasureText:i(79557),TextStyle:i(35762),TileSprite:i(20839),Zone:i(41481),Video:i(18471),Shape:i(17803),Arc:i(23629),Curve:i(89),Ellipse:i(19921),Grid:i(30479),IsoBox:i(61475),IsoTriangle:i(16933),Line:i(57847),Polygon:i(24949),Rectangle:i(74561),Star:i(55911),Triangle:i(36931),Factories:{Blitter:i(12709),Container:i(24961),DOMElement:i(2611),DynamicBitmapText:i(72566),Extern:i(56315),Graphics:i(1201),Group:i(3385),Image:i(2117),Layer:i(20005),Particles:i(676),PathFollower:i(90145),RenderTexture:i(60505),Rope:i(96819),Sprite:i(46409),Stamp:i(85326),StaticBitmapText:i(34914),Text:i(68005),TileSprite:i(91681),Zone:i(84175),Video:i(89025),Arc:i(42563),Curve:i(40511),Ellipse:i(1543),Grid:i(34137),IsoBox:i(3933),IsoTriangle:i(49803),Line:i(2481),Polygon:i(64827),Rectangle:i(87959),Star:i(93697),Triangle:i(45245)},Creators:{Blitter:i(9403),Container:i(77143),DynamicBitmapText:i(11164),Graphics:i(87079),Group:i(94975),Image:i(82459),Layer:i(25179),Particles:i(92730),RenderTexture:i(34495),Rope:i(26209),Sprite:i(15567),Stamp:i(31479),StaticBitmapText:i(57336),Text:i(71259),TileSprite:i(14167),Zone:i(95261),Video:i(11511)}};n.CaptureFrame=i(43451),n.Gradient=i(34637),n.Noise=i(35387),n.NoiseCell2D=i(51513),n.NoiseCell3D=i(15686),n.NoiseCell4D=i(41946),n.NoiseSimplex2D=i(1792),n.NoiseSimplex3D=i(51098),n.Shader=i(20071),n.NineSlice=i(28103),n.PointLight=i(80321),n.SpriteGPULayer=i(76573),n.Factories.CaptureFrame=i(20421),n.Factories.Gradient=i(69315),n.Factories.Noise=i(34757),n.Factories.NoiseCell2D=i(26590),n.Factories.NoiseCell3D=i(89918),n.Factories.NoiseCell4D=i(65874),n.Factories.NoiseSimplex2D=i(80308),n.Factories.NoiseSimplex3D=i(73810),n.Factories.Shader=i(74177),n.Factories.NineSlice=i(47521),n.Factories.PointLight=i(71255),n.Factories.SpriteGPULayer=i(96019),n.Creators.CaptureFrame=i(23675),n.Creators.Gradient=i(26353),n.Creators.Noise=i(39931),n.Creators.NoiseCell2D=i(98292),n.Creators.NoiseCell3D=i(97044),n.Creators.NoiseCell4D=i(20136),n.Creators.NoiseSimplex2D=i(51754),n.Creators.NoiseSimplex3D=i(71112),n.Creators.Shader=i(54935),n.Creators.NineSlice=i(28279),n.Creators.PointLight=i(39829),n.Creators.SpriteGPULayer=i(16193),n.Light=i(41432),n.LightsManager=i(61356),n.LightsPlugin=i(88992),t.exports=n}
1,93595(t,e,i){var n=i(10312),s=i(83419),r=i(31401),o=i(53774),a=i(45893),h=i(50792),l=i(51708),u=i(73162),d=i(33963),c=i(44594),f=i(19186);t.exports=new s({Extends:u,Mixins:[r.AlphaSingle,r.BlendMode,r.Depth,r.Filters,r.Mask,r.RenderSteps,r.Visible,h,d],initialize:function(t,e){u.call(this,t),h.call(this),this.scene=t,this.displayList=null,this.type="Layer",this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,this.systems=t.sys,this.events=t.sys.events,this.sortChildrenFlag=!1,this.addCallback=this.addChildCallback,this.removeCallback=this.removeChildCallback,this.clearAlpha(),this.setBlendMode(n.SKIP_CHECK),e&&this.add(e),this.addRenderStep&&this.addRenderStep(this.renderWebGL),t.sys.queueDepthSort()},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=t,this},setState:function(t){return this.state=t,this},setDataEnabled:function(){return this.data||(this.data=new a(this)),this},setData:function(t,e){return this.data||(this.data=new a(this)),this.data.set(t,e),this},incData:function(t,e){return this.data||(this.data=new a(this)),this.data.inc(t,e),this},toggleData:function(t){return this.data||(this.data=new a(this)),this.data.toggle(t),this},getData:function(t){return this.data||(this.data=new a(this)),this.data.get(t)},setInteractive:function(){return this},disableInteractive:function(){return this},removeInteractive:function(){return this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return o(this)},willRender:function(t){return!(15!==this.renderFlags||0===this.list.length||0!==this.cameraFilter&&this.cameraFilter&t.id)},getIndexList:function(){for(var t=this,e=this.parentContainer,i=[];e;)if(i.unshift(e.getIndex(t)),t=e,e.parentContainer)e=e.parentContainer;else break;return i.unshift(this.displayList.getIndex(t)),i},addChildCallback:function(t){var e=t.displayList;e&&e!==this&&t.removeFromDisplayList(),t.displayList||(this.queueDepthSort(),t.displayList=this,t.emit(l.ADDED_TO_SCENE,t,this.scene),this.events.emit(c.ADDED_TO_SCENE,t,this.scene))},removeChildCallback:function(t){this.queueDepthSort(),t.displayList=null,t.emit(l.REMOVED_FROM_SCENE,t,this.scene),this.events.emit(c.REMOVED_FROM_SCENE,t,this.scene)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(f(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(t,e){return t._depth-e._depth},getChildren:function(){return this.list},addToDisplayList:function(t){return void 0===t&&(t=this.scene.sys.displayList),this.displayList&&this.displayList!==t&&this.removeFromDisplayList(),t.exists(this)||(this.displayList=t,t.add(this,!0),t.queueDepthSort(),this.emit(l.ADDED_TO_SCENE,this,this.scene),t.events.emit(c.ADDED_TO_SCENE,this,this.scene)),this},removeFromDisplayList:function(){var t=this.displayList||this.scene.sys.displayList;return t.exists(this)&&(t.remove(this,!0),t.queueDepthSort(),this.displayList=null,this.emit(l.REMOVED_FROM_SCENE,this,this.scene),t.events.emit(c.REMOVED_FROM_SCENE,this,this.scene)),this},getDisplayList:function(){var t=null;return this.parentContainer?t=this.parentContainer.list:this.displayList&&(t=this.displayList.list),t},destroy:function(t){if(this.scene&&!this.ignoreDestroy){this.emit(l.DESTROY,this);for(var e=this.list;e.length;)e[0].destroy(t);this.removeAllListeners(),this.displayList&&(this.displayList.remove(this,!0,!1),this.displayList.queueDepthSort()),this.data&&(this.data.destroy(),this.data=void 0),this.filterCamera&&(this.filterCamera.destroy(),this.filterCamera=void 0),this.active=!1,this.visible=!1,this.list=void 0,this.scene=void 0,this.displayList=void 0,this.systems=void 0,this.events=void 0}}})},2956(t){t.exports=function(t,e,i){var n=e.list;if(0!==n.length){e.depthSort();var s=-1!==e.blendMode;s||t.setBlendMode(0);var r=e._alpha;e.mask&&e.mask.preRenderCanvas(t,null,i);for(var o=0;o<n.length;o++){var a=n[o];if(a.willRender(i)){var h=a.alpha;s||a.blendMode===t.currentBlendMode||t.setBlendMode(a.blendMode),a.setAlpha(h*r),a.renderCanvas(t,a,i),a.setAlpha(h)}}e.mask&&e.mask.postRenderCanvas(t)}}},25179(t,e,i){var n=i(25305),s=i(93595),r=i(44603),o=i(23568);r.register("layer",function(t,e){void 0===t&&(t={});var i=o(t,"children",null),r=new s(this.scene,i);return void 0!==e&&(t.add=e),n(this.scene,r,t),r})},20005(t,e,i){var n=i(93595);i(39429).register("layer",function(t){return this.displayList.add(new n(this.scene,t))})},33963(t,e,i){var n=i(29747),s=n,r=n;s=i(15869),t.exports={renderWebGL:s,renderCanvas:r=i(2956)}},15869(t,e,i){var n=i(8054);
vendor: 33,985 bytes, line 1
1t.exports=function(t,e,i,s,r,o,a){var h=e.list,l=h.length;if(0!==l){var u=i,d=u.camera;e.depthSort();var c=e.blendMode!==n.BlendModes.SKIP_CHECK;c||0===u.blendMode||((u=u.getClone()).setBlendMode(0),u.use());for(var f=e.alpha,p=0;p<l;p++){var g,m,v,x,y=h[p];if(y.willRender(d)){if(void 0!==y.alphaTopLeft)g=y.alphaTopLeft,m=y.alphaTopRight,v=y.alphaBottomLeft,x=y.alphaBottomRight;else{var T=y.alpha;g=T,m=T,v=T,x=T}c||y.blendMode===u.blendMode||y.blendMode===n.BlendModes.SKIP_CHECK||((u=u.getClone()).setBlendMode(y.blendMode),u.use()),y.setAlpha(g*f,m*f,v*f,x*f),y.renderWebGLStep(t,y,u,void 0,void 0,h,p),y.setAlpha(g,m,v,x)}}u!==i&&u.release()}}},41432(t,e,i){var n=i(96503),s=i(83419),r=i(31401),o=i(51767),a=i(70554),h=new s({Extends:n,Mixins:[r.Origin,r.ScrollFactor,r.Visible],initialize:function(t,e,i,s,r,a,h,l){n.call(this,t,e,i),this.color=new o(s,r,a),this.intensity=h,this.z=void 0===l?.1*i:l,this.renderFlags=15,this.cameraFilter=0,this.setScrollFactor(1,1),this.setOrigin(),this.setDisplayOrigin(i)},displayWidth:{get:function(){return this.diameter},set:function(t){this.diameter=t}},displayHeight:{get:function(){return this.diameter},set:function(t){this.diameter=t}},width:{get:function(){return this.diameter},set:function(t){this.diameter=t}},height:{get:function(){return this.diameter},set:function(t){this.diameter=t}},zNormal:{get:function(){return this.z/this.radius},set:function(t){this.z=t*this.radius}},willRender:function(t){return!(h.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},setColor:function(t){var e=a.getFloatsFromUintRGB(t);return this.color.set(e[0],e[1],e[2]),this},setIntensity:function(t){return this.intensity=t,this},setRadius:function(t){return this.radius=t,this},setZ:function(t){return this.z=t,this},setZNormal:function(t){return this.z=t*this.radius,this}});h.RENDER_MASK=15,t.exports=h},61356(t,e,i){var n=i(81491),s=i(83419),r=i(20339),o=i(41432),a=i(80321),h=i(51767),l=i(19133),u=i(19186),d=i(70554);t.exports=new s({initialize:function(){this.lights=[],this.ambientColor=new h(.1,.1,.1),this.active=!1,this.maxLights=-1,this.visibleLights=0},addPointLight:function(t,e,i,n,s,r){return this.systems.displayList.add(new a(this.scene,t,e,i,n,s,r))},enable:function(){return -1===this.maxLights&&(this.maxLights=this.systems.renderer.config.maxLights),this.active=!0,this},disable:function(){return this.active=!1,this},getLights:function(t){for(var e=this.lights,i=t.worldView,s=[],o=0;o<e.length;o++){var a=e[o];a.willRender(t)&&n(a,i)&&s.push({light:a,distance:r(a.x,a.y,i.centerX,i.centerY)})}return s.length>this.maxLights&&(u(s,this.sortByDistance),s=s.slice(0,this.maxLights)),this.visibleLights=s.length,s},sortByDistance:function(t,e){return t.distance>=e.distance},setAmbientColor:function(t){var e=d.getFloatsFromUintRGB(t);return this.ambientColor.set(e[0],e[1],e[2]),this},getMaxVisibleLights:function(){return this.maxLights},getLightCount:function(){return this.lights.length},addLight:function(t,e,i,n,s,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=128),void 0===n&&(n=0xffffff),void 0===s&&(s=1),void 0===r&&(r=.1*i);var a=d.getFloatsFromUintRGB(n),h=new o(t,e,i,a[0],a[1],a[2],s,r);return this.lights.push(h),h},removeLight:function(t){var e=this.lights.indexOf(t);return e>=0&&l(this.lights,e),this},shutdown:function(){this.lights.length=0},destroy:function(){this.shutdown()}})},88992(t,e,i){var n=i(83419),s=i(61356),r=i(37277),o=i(44594),a=new n({Extends:s,initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once(o.BOOT,this.boot,this),s.call(this)},boot:function(){var t=this.systems.events;t.on(o.SHUTDOWN,this.shutdown,this),t.on(o.DESTROY,this.destroy,this)},destroy:function(){this.shutdown(),this.scene=void 0,this.systems=void 0}});r.register("LightsPlugin",a,"lights"),t.exports=a},28103(t,e,i){var n=i(30529),s=i(83419),r=i(31401),o=i(95643),a=i(78023),h=i(84322),l=i(82513);t.exports=new s({Extends:o,Mixins:[r.AlphaSingle,r.BlendMode,r.Depth,r.GetBounds,r.Mask,r.Origin,r.RenderNodes,r.ScrollFactor,r.Texture,r.Transform,r.Visible,a],initialize:function(t,e,i,n,s,r,a,u,d,c,f,p,g){o.call(this,t,"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.tileX=p||!1,this.tileY=g||!1,this._repeatCountX=1,this._repeatCountY=1,this.tint=0xffffff,this.tintMode=h.MULTIPLY;var m=t.textures.getFrame(n,s);this.is3Slice=!c&&!f,m&&m.scale9&&(this.is3Slice=m.is3Slice);for(var v=this.is3Slice?18:54,x=0;x<v;x++)this.vertices.push(new l);this.setPosition(e,i),this.setTexture(n,s),this.setSlices(r,a,u,d,c,f,!1),this.updateDisplayOrigin(),this.initRenderNodes(this._defaultRenderNodesMap)},_defaultRenderNodesMap:{get:function(){return n}},setSlices:function(t,e,i,n,s,r,o){void 0===i&&(i=10),void 0===n&&(n=10),void 0===s&&(s=0),void 0===r&&(r=0),void 0===o&&(o=!1);var a=this.frame,h=!1;if(this.is3Slice&&o&&0!==s&&0!==r&&(h=!0),h)console.warn("Cannot change 9 slice to 3 slice");else{if(a&&a.scale9&&!o){var l=a.data.scale9Borders,u=l.x,d=l.y;i=u,n=a.width-l.w-u,s=d,r=a.height-l.h-d,void 0===t&&(t=a.width),void 0===e&&(e=a.height)}else void 0===t&&(t=256),void 0===e&&(e=256);this._width=t,this._height=e,this.leftWidth=i,this.rightWidth=n,this.topHeight=s,this.bottomHeight=r,this.is3Slice&&(e=a.height,this._height=e,this.topHeight=e,this.bottomHeight=0),this.updateVertices(),this.updateUVs()}return this},updateUVs:function(){var t=this.leftWidth,e=this.rightWidth,i=this.topHeight,n=this.bottomHeight,s=this.frame.width,r=this.frame.height,o=t/s,a=1-e/s,h=i/r,l=1-n/r,u=0;if(this.is3Slice)this._updateUVRow(u,o,a,0,h);else{u=this._updateUVRow(u,o,a,0,h);for(var d=0;d<this._repeatCountY;d++)u=this._updateUVRow(u,o,a,h,l);this._updateUVRow(u,o,a,l,1)}},_updateUVRow:function(t,e,i,n,s){this.updateQuadUVs(t,0,n,e,s),t+=6;for(var r=0;r<this._repeatCountX;r++)this.updateQuadUVs(t,e,n,i,s),t+=6;return this.updateQuadUVs(t,i,n,1,s),t+=6},updateVertices:function(){var t=this.leftWidth,e=this.rightWidth,i=this.topHeight,n=this.bottomHeight,s=this.width,r=this.height,o=this.frame,a=this.tileX?this._calcRepeatCount(s-t-e,o.width-t-e):1,h=this.tileY&&!this.is3Slice?this._calcRepeatCount(r-i-n,o.height-i-n):1,l=this._rebuildVertexArray(a,h),u=-.5+t/s,d=.5-e/s,c=.5-i/r,f=(d-u)/a,p=0;if(this.is3Slice)this._updateVertexRow(p,-.5,u,d,.5,.5,c,f);else{var g=-.5+n/r,m=(c-g)/h;p=this._updateVertexRow(p,-.5,u,d,.5,.5,c,f);for(var v=0;v<h;v++){var x=c-v*m,y=c-(v+1)*m;p=this._updateVertexRow(p,-.5,u,d,.5,x,y,f)}this._updateVertexRow(p,-.5,u,d,.5,g,-.5,f)}l&&this.updateUVs()},_calcRepeatCount:function(t,e){return e>0?Math.max(1,Math.floor(t/e)):1},_rebuildVertexArray:function(t,e){if(t===this._repeatCountX&&e===this._repeatCountY)return!1;this._repeatCountX=t,this._repeatCountY=e;var i=(t+2)*(this.is3Slice?1:e+2)*6,n=this.vertices;if(n.length!==i){n.length=0;for(var s=0;s<i;s++)n.push(new l)}return!0},_updateVertexRow:function(t,e,i,n,s,r,o,a){this.updateQuad(t,e,r,i,o),t+=6;for(var h=0;h<this._repeatCountX;h++)this.updateQuad(t,i+h*a,r,i+(h+1)*a,o),t+=6;return this.updateQuad(t,n,r,s,o),t+=6},updateQuad:function(t,e,i,n,s){var r=this.width,o=this.height,a=this.originX,h=this.originY,l=this.vertices;l[t+0].resize(e,i,r,o,a,h),l[t+1].resize(e,s,r,o,a,h),l[t+2].resize(n,i,r,o,a,h),l[t+3].resize(e,s,r,o,a,h),l[t+4].resize(n,s,r,o,a,h),l[t+5].resize(n,i,r,o,a,h)},updateQuadUVs:function(t,e,i,n,s){var r=this.vertices,o=this.frame,a=o.u0,h=o.v0,l=o.u1,u=o.v1;if(0!==a||1!==l){var d=l-a;e=a+e*d,n=a+n*d}if(0!==h||1!==u){var c=u-h;i=h+i*c,s=h+s*c}r[t+0].setUVs(e,i),r[t+1].setUVs(e,s),r[t+2].setUVs(n,i),r[t+3].setUVs(e,s),r[t+4].setUVs(n,s),r[t+5].setUVs(n,i)},clearTint:function(){return this.setTint(0xffffff),this.setTintMode(),this},setTint:function(t){return void 0===t&&(t=0xffffff),this.tint=t,this},setTintMode:function(t){return void 0===t&&(t=h.MULTIPLY),this.tintMode=t,this},isTinted:{get:function(){return 0xffffff!==this.tint||this.tintMode!==h.MULTIPLY}},width:{get:function(){return this._width},set:function(t){this._width=Math.max(t,this.leftWidth+this.rightWidth),this.updateVertices()}},height:{get:function(){return this._height},set:function(t){this.is3Slice||(this._height=Math.max(t,this.topHeight+this.bottomHeight),this.updateVertices())}},displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}},setSize:function(t,e){this.width=t,this.height=e,this.updateDisplayOrigin();var i=this.input;return i&&!i.customHitArea&&(i.hitArea.width=this.width,i.hitArea.height=this.height),this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this},originX:{get:function(){return this._originX},set:function(t){this._originX=t,this.updateVertices()}},originY:{get:function(){return this._originY},set:function(t){this._originY=t,this.updateVertices()}},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this._originX=t,this._originY=e,this.updateVertices(),this.updateDisplayOrigin()},setSizeToFrame:function(){if(this.is3Slice){var t=this.frame.height;this._height=t,this.topHeight=t,this.bottomHeight=0}return this.updateUVs(),this},preDestroy:function(){this.vertices=[]}})},28279(t,e,i){var n=i(25305),s=i(44603),r=i(23568),o=i(35154),a=i(28103);s.register("nineslice",function(t,e){void 0===t&&(t={});var i=r(t,"key",null),s=r(t,"frame",null),h=o(t,"width",256),l=o(t,"height",256),u=o(t,"leftWidth",10),d=o(t,"rightWidth",10),c=o(t,"topHeight",0),f=o(t,"bottomHeight",0),p=o(t,"tileX",!1),g=o(t,"tileY",!1),m=new a(this.scene,0,0,i,s,h,l,u,d,c,f,p,g);return void 0!==e&&(t.add=e),n(this.scene,m,t),m})},47521(t,e,i){var n=i(28103);i(39429).register("nineslice",function(t,e,i,s,r,o,a,h,l,u,d,c){return this.displayList.add(new n(this.scene,t,e,i,s,r,o,a,h,l,u,d,c))})},78023(t,e,i){var n=i(29747),s=n;t.exports={renderWebGL:s=i(52230),renderCanvas:n}},82513(t,e,i){var n=i(83419),s=i(26099);t.exports=new n({Extends:s,initialize:function(t,e,i,n){s.call(this,t,e),this.vx=0,this.vy=0,this.u=i,this.v=n},setUVs:function(t,e){return this.u=t,this.v=e,this},resize:function(t,e,i,n,s,r){return this.x=t,this.y=e,this.vx=this.x*i,this.vy=-this.y*n,s<.5?this.vx+=i*(.5-s):s>.5&&(this.vx-=i*(s-.5)),r<.5?this.vy+=n*(.5-r):r>.5&&(this.vy-=n*(r-.5)),this}})},52230(t,e,i){var n=i(91296),s=i(70554),r={multiTexturing:!0};t.exports=function(t,e,i,o){var a,h,l,u=e.vertices,d=u.length;if(0!==d){var c=i.camera;c.addToRenderList(e);for(var f=e.alpha,p=e.customRenderNodes.BatchHandler||e.defaultRenderNodes.BatchHandler,g=n(e,c,o,!i.useCanvas).calc,m=s.getTintAppendFloatAlpha(e.tint,f),v=e.frame.source.glTexture,x=e.tintMode,y=0;y<d;y+=6)h=u[y+1],l=u[y+2],a=g.setQuad(h.vx,h.vy,l.vx,l.vy),p.batch(i,v,a[0],a[1],a[2],a[3],a[6],a[7],a[4],a[5],h.u,h.v,l.u-h.u,l.v-h.v,x,m,m,m,m,r)}}},35387(t,e,i){var n=i(83419),s=i(20071),r=i(40987),o=i(16421);t.exports=new n({Extends:s,initialize:function(t,e,i,n,a,h){e||(e={});var l={name:"noise",fragmentSource:o,setupUniforms:this._setupUniforms};s.call(this,t,l,i,n,a,h),this.type="Noise",this.noiseOffset=[0,0],e.noiseOffset&&(this.noiseOffset=e.noiseOffset),this.noisePower=void 0===e.noisePower?1:e.noisePower,this.noiseColorStart=new r(0,0,0),this.noiseColorEnd=new r(255,255,255),(void 0!==e.noiseColorStart||void 0!==e.noiseColorEnd)&&this.setNoiseColor(e.noiseColorStart,e.noiseColorEnd),this.noiseRandomChannels=!!e.noiseRandomChannels,this.noiseRandomNormal=!!e.noiseRandomNormal},setNoiseColor:function(t,e){var i;return void 0===t&&(t=0),void 0===e&&(e=0xffffff),"number"==typeof t?r.IntegerToColor(t,this.noiseColorStart):"string"==typeof t?r.HexStringToColor(t,this.noiseColorStart):Array.isArray(t)?(i=void 0===t[3]?1:t[3],this.noiseColorStart.setGLTo(t[0],t[1],t[2],i)):t instanceof r&&this.noiseColorStart.setTo(t.red,t.green,t.blue,t.alpha),"number"==typeof e?r.IntegerToColor(e,this.noiseColorEnd):"string"==typeof e?r.HexStringToColor(e,this.noiseColorEnd):Array.isArray(e)?(i=void 0===e[3]?1:e[3],this.noiseColorEnd.setGLTo(e[0],e[1],e[2],i)):e instanceof r&&this.noiseColorEnd.setTo(e.red,e.green,e.blue,e.alpha),this},_setupUniforms:function(t){t("uOffset",this.noiseOffset),t("uColorStart",this.noiseColorStart.gl),t("uColorEnd",this.noiseColorEnd.gl),t("uPower",this.noisePower);var e=0;this.noiseRandomChannels&&(e=1),this.noiseRandomNormal&&(e=2),t("uMode",e)}})},39931(t,e,i){var n=i(25305),s=i(44603),r=i(23568),o=i(35387);s.register("noise",function(t,e){void 0===t&&(t={});var i=r(t,"config",null),s=r(t,"x",0),a=r(t,"y",0),h=r(t,"width",128),l=r(t,"height",128),u=new o(this.scene,i,s,a,h,l);return void 0!==e&&(t.add=e),n(this.scene,u,t),u})},34757(t,e,i){var n=i(35387);i(39429).register("noise",function(t,e,i,s,r){return this.displayList.add(new n(this.scene,t,e,i,s,r))})},51513(t,e,i){var n=i(83419),s=i(20071),r=i(40987),o=i(17205);t.exports=new n({Extends:s,initialize:function(t,e,i,n,a,h){e||(e={});var l={name:"noiseCell2D",fragmentSource:o,shaderAdditions:[{name:"MODE_DISTANCE",tags:["MODE"],additions:{fragmentMode:"#define MODE_DISTANCE"}},{name:"ITERATION_COUNT_1",tags:["ITERATION_COUNT"],additions:{fragmentIterations:"#define ITERATION_COUNT 1.0"}},{name:"NORMALMAP",tags:["NORMALMAP"],additions:{fragmentNormalMap:"#define NORMAL_MAP\n#extension GL_OES_standard_derivatives : enable"},disable:!e.noiseNormalMap}],setupUniforms:this._setupUniforms,updateShaderConfig:this._updateShaderConfig};s.call(this,t,l,i,n,a,h),this.type="NoiseCell2D",this.noiseCells=[32,32],e.noiseCells&&(this.noiseCells=e.noiseCells),this.noiseWrap=[this.noiseCells[0],this.noiseCells[1]],e.noiseWrap&&(this.noiseWrap=e.noiseWrap),this.noiseOffset=[0,0],e.noiseOffset&&(this.noiseOffset=e.noiseOffset),this.noiseVariation=[1,1],e.noiseVariation&&(this.noiseVariation=e.noiseVariation),this.noiseIterations=1,e.noiseIterations&&(this.noiseIterations=e.noiseIterations),this.noiseMode=0,e.noiseMode&&(this.noiseMode=e.noiseMode),this.noiseSmoothing=1,e.noiseSmoothing&&(this.noiseSmoothing=e.noiseSmoothing),this.noiseNormalMap=!!e.noiseNormalMap,this.noiseNormalScale=1,void 0!==e.noiseNormalScale&&(this.noiseNormalScale=e.noiseNormalScale),this.noiseColorStart=new r(0,0,0),this.noiseColorEnd=new r(255,255,255),(void 0!==e.noiseColorStart||void 0!==e.noiseColorEnd)&&this.setNoiseColor(e.noiseColorStart,e.noiseColorEnd),this.noiseSeed=[1,2,3,4,5,6,7,8],e.noiseSeed&&(this.noiseSeed=e.noiseSeed),e.randomizeNoiseSeed&&this.randomizeNoiseSeed(),this.keepAwake=!0},setNoiseColor:function(t,e){var i;return void 0===t&&(t=0),void 0===e&&(e=0xffffff),"number"==typeof t?r.IntegerToColor(t,this.noiseColorStart):"string"==typeof t?r.HexStringToColor(t,this.noiseColorStart):Array.isArray(t)?(i=void 0===t[3]?1:t[3],this.noiseColorStart.setGLTo(t[0],t[1],t[2],i)):t instanceof r&&this.noiseColorStart.setTo(t.red,t.green,t.blue,t.alpha),"number"==typeof e?r.IntegerToColor(e,this.noiseColorEnd):"string"==typeof e?r.HexStringToColor(e,this.noiseColorEnd):Array.isArray(e)?(i=void 0===e[3]?1:e[3],this.noiseColorEnd.setGLTo(e[0],e[1],e[2],i)):e instanceof r&&this.noiseColorEnd.setTo(e.red,e.green,e.blue,e.alpha),this},randomizeNoiseSeed:function(){for(var t=this.noiseSeed.length,e=0;e<t;e++)this.noiseSeed[e]=Math.random();return this},wrapNoise:function(){for(var t=this.noiseWrap.length,e=0;e<t;e++)this.noiseWrap[e]=this.noiseCells[e];return this},_setupUniforms:function(t){if(this.keepAwake){var e=Math.sin(this.scene.time.now)/4096/256;t("uCellOffset",[this.noiseOffset[0]+e,this.noiseOffset[1]+e])}else t("uCellOffset",this.noiseOffset);t("uSeedX",this.noiseSeed.slice(0,2)),t("uSeedY",this.noiseSeed.slice(2,4)),t("uCells",this.noiseCells),t("uVariation",this.noiseVariation),t("uWrap",this.noiseWrap),t("uSmoothing",this.noiseSmoothing),t("uNormalScale",this.noiseNormalScale),t("uColorStart",this.noiseColorStart.gl),t("uColorEnd",this.noiseColorEnd.gl)},_updateShaderConfig:function(t,e,i){var n=Math.max(1,Math.floor(e.noiseIterations)),s=i.programManager.getAdditionsByTag("ITERATION_COUNT")[0];s.name="ITERATION_COUNT_"+n,s.additions.fragmentIterations="#define ITERATION_COUNT "+n+".0";var r="MODE_DISTANCE";switch(e.noiseMode){case 1:r="MODE_INDEX";break;case 2:r="MODE_DISTANCE_SMOOTH"}var o=i.programManager.getAdditionsByTag("MODE")[0];o.name=r,o.additions.fragmentMode="#define "+r,i.programManager.getAdditionsByTag("NORMALMAP")[0].disable=!e.noiseNormalMap}})},98292(t,e,i){var n=i(25305),s=i(44603),r=i(23568),o=i(51513);s.register("noisecell2d",function(t,e){void 0===t&&(t={});var i=r(t,"config",null),s=r(t,"x",0),a=r(t,"y",0),h=r(t,"width",128),l=r(t,"height",128),u=new o(this.scene,i,s,a,h,l);return void 0!==e&&(t.add=e),n(this.scene,u,t),u})},26590(t,e,i){var n=i(51513);i(39429).register("noisecell2d",function(t,e,i,s,r){return this.displayList.add(new n(this.scene,t,e,i,s,r))})},15686(t,e,i){var n=i(83419),s=i(20071),r=i(40987),o=i(79814);t.exports=new n({Extends:s,initialize:function(t,e,i,n,a,h){e||(e={});var l={name:"noiseCell3D",fragmentSource:o,shaderAdditions:[{name:"MODE_DISTANCE",tags:["MODE"],additions:{fragmentMode:"#define MODE_DISTANCE"}},{name:"ITERATION_COUNT_1",tags:["ITERATION_COUNT"],additions:{fragmentIterations:"#define ITERATION_COUNT 1.0"}},{name:"NORMALMAP",tags:["NORMALMAP"],additions:{fragmentNormalMap:"#define NORMAL_MAP\n#extension GL_OES_standard_derivatives : enable"},disable:!e.noiseNormalMap}],setupUniforms:this._setupUniforms,updateShaderConfig:this._updateShaderConfig};s.call(this,t,l,i,n,a,h),this.type="NoiseCell3D",this.noiseCells=[32,32,32],e.noiseCells&&(this.noiseCells=e.noiseCells),this.noiseWrap=[this.noiseCells[0],this.noiseCells[1],this.noiseCells[2]],e.noiseWrap&&(this.noiseWrap=e.noiseWrap),this.noiseOffset=[0,0,0],e.noiseOffset&&(this.noiseOffset=e.noiseOffset),this.noiseVariation=[1,1,1],e.noiseVariation&&(this.noiseVariation=e.noiseVariation),this.noiseIterations=1,e.noiseIterations&&(this.noiseIterations=e.noiseIterations),this.noiseMode=0,e.noiseMode&&(this.noiseMode=e.noiseMode),this.noiseSmoothing=1,e.noiseSmoothing&&(this.noiseSmoothing=e.noiseSmoothing),this.noiseNormalMap=!!e.noiseNormalMap,this.noiseNormalScale=1,void 0!==e.noiseNormalScale&&(this.noiseNormalScale=e.noiseNormalScale),this.noiseColorStart=new r(0,0,0),this.noiseColorEnd=new r(255,255,255),(void 0!==e.noiseColorStart||void 0!==e.noiseColorEnd)&&this.setNoiseColor(e.noiseColorStart,e.noiseColorEnd),this.noiseSeed=[1,2,3,4,5,6,7,8,9,10,11,12],e.noiseSeed&&(this.noiseSeed=e.noiseSeed),e.randomizeNoiseSeed&&this.randomizeNoiseSeed(),this.keepAwake=!0},setNoiseColor:function(t,e){var i;return void 0===t&&(t=0),void 0===e&&(e=0xffffff),"number"==typeof t?r.IntegerToColor(t,this.noiseColorStart):"string"==typeof t?r.HexStringToColor(t,this.noiseColorStart):Array.isArray(t)?(i=void 0===t[3]?1:t[3],this.noiseColorStart.setGLTo(t[0],t[1],t[2],i)):t instanceof r&&this.noiseColorStart.setTo(t.red,t.green,t.blue,t.alpha),"number"==typeof e?r.IntegerToColor(e,this.noiseColorEnd):"string"==typeof e?r.HexStringToColor(e,this.noiseColorEnd):Array.isArray(e)?(i=void 0===e[3]?1:e[3],this.noiseColorEnd.setGLTo(e[0],e[1],e[2],i)):e instanceof r&&this.noiseColorEnd.setTo(e.red,e.green,e.blue,e.alpha),this},randomizeNoiseSeed:function(){for(var t=this.noiseSeed.length,e=0;e<t;e++)this.noiseSeed[e]=Math.random();return this},wrapNoise:function(){for(var t=this.noiseWrap.length,e=0;e<t;e++)this.noiseWrap[e]=this.noiseCells[e];return this},_setupUniforms:function(t){if(this.keepAwake){var e=Math.sin(this.scene.time.now)/4096/256;t("uCellOffset",[this.noiseOffset[0]+e,this.noiseOffset[1]+e,this.noiseOffset[2]+e])}else t("uCellOffset",this.noiseOffset);t("uSeedX",this.noiseSeed.slice(0,3)),t("uSeedY",this.noiseSeed.slice(3,6)),t("uSeedZ",this.noiseSeed.slice(6,9)),t("uCells",this.noiseCells),t("uVariation",this.noiseVariation),t("uWrap",this.noiseWrap),t("uSmoothing",this.noiseSmoothing),t("uNormalScale",this.noiseNormalScale),t("uColorStart",this.noiseColorStart.gl),t("uColorEnd",this.noiseColorEnd.gl)},_updateShaderConfig:function(t,e,i){var n=Math.max(1,Math.floor(e.noiseIterations)),s=i.programManager.getAdditionsByTag("ITERATION_COUNT")[0];s.name="ITERATION_COUNT_"+n,s.additions.fragmentIterations="#define ITERATION_COUNT "+n+".0";var r="MODE_DISTANCE";switch(e.noiseMode){case 1:r="MODE_INDEX";break;case 2:r="MODE_DISTANCE_SMOOTH"}var o=i.programManager.getAdditionsByTag("MODE")[0];o.name=r,o.additions.fragmentMode="#define "+r,i.programManager.getAdditionsByTag("NORMALMAP")[0].disable=!e.noiseNormalMap}})},97044(t,e,i){var n=i(25305),s=i(44603),r=i(23568),o=i(15686);s.register("noisecell3d",function(t,e){void 0===t&&(t={});var i=r(t,"config",null),s=r(t,"x",0),a=r(t,"y",0),h=r(t,"width",128),l=r(t,"height",128),u=new o(this.scene,i,s,a,h,l);return void 0!==e&&(t.add=e),n(this.scene,u,t),u})},89918(t,e,i){var n=i(15686);i(39429).register("noisecell3d",function(t,e,i,s,r){return this.displayList.add(new n(this.scene,t,e,i,s,r))})},41946(t,e,i){var n=i(83419),s=i(20071),r=i(40987),o=i(99595);t.exports=new n({Extends:s,initialize:function(t,e,i,n,a,h){e||(e={});var l={name:"noiseCell4D",fragmentSource:o,shaderAdditions:[{name:"MODE_DISTANCE",tags:["MODE"],additions:{fragmentMode:"#define MODE_DISTANCE"}},{name:"ITERATION_COUNT_1",tags:["ITERATION_COUNT"],additions:{fragmentIterations:"#define ITERATION_COUNT 1.0"}},{name:"NORMALMAP",tags:["NORMALMAP"],additions:{fragmentNormalMap:"#define NORMAL_MAP\n#extension GL_OES_standard_derivatives : enable"},disable:!e.noiseNormalMap}],setupUniforms:this._setupUniforms,updateShaderConfig:this._updateShaderConfig};s.call(this,t,l,i,n,a,h),this.type="NoiseCell4D",this.noiseCells=[32,32,32,32],e.noiseCells&&(this.noiseCells=e.noiseCells),this.noiseWrap=[this.noiseCells[0],this.noiseCells[1],this.noiseCells[2],this.noiseCells[3]],e.noiseWrap&&(this.noiseWrap=e.noiseWrap),this.noiseOffset=[0,0,0,0],e.noiseOffset&&(this.noiseOffset=e.noiseOffset),this.noiseVariation=[1,1,1,1],e.noiseVariation&&(this.noiseVariation=e.noiseVariation),this.noiseIterations=1,e.noiseIterations&&(this.noiseIterations=e.noiseIterations),this.noiseMode=0,e.noiseMode&&(this.noiseMode=e.noiseMode),this.noiseSmoothing=1,e.noiseSmoothing&&(this.noiseSmoothing=e.noiseSmoothing),this.noiseNormalMap=!!e.noiseNormalMap,this.noiseNormalScale=1,void 0!==e.noiseNormalScale&&(this.noiseNormalScale=e.noiseNormalScale),this.noiseColorStart=new r(0,0,0),this.noiseColorEnd=new r(255,255,255),(void 0!==e.noiseColorStart||void 0!==e.noiseColorEnd)&&this.setNoiseColor(e.noiseColorStart,e.noiseColorEnd),this.noiseSeed=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],e.noiseSeed&&(this.noiseSeed=e.noiseSeed),e.randomizeNoiseSeed&&this.randomizeNoiseSeed(),this.keepAwake=!0},setNoiseColor:function(t,e){var i;return void 0===t&&(t=0),void 0===e&&(e=0xffffff),"number"==typeof t?r.IntegerToColor(t,this.noiseColorStart):"string"==typeof t?r.HexStringToColor(t,this.noiseColorStart):Array.isArray(t)?(i=void 0===t[3]?1:t[3],this.noiseColorStart.setGLTo(t[0],t[1],t[2],i)):t instanceof r&&this.noiseColorStart.setTo(t.red,t.green,t.blue,t.alpha),"number"==typeof e?r.IntegerToColor(e,this.noiseColorEnd):"string"==typeof e?r.HexStringToColor(e,this.noiseColorEnd):Array.isArray(e)?(i=void 0===e[3]?1:e[3],this.noiseColorEnd.setGLTo(e[0],e[1],e[2],i)):e instanceof r&&this.noiseColorEnd.setTo(e.red,e.green,e.blue,e.alpha),this},randomizeNoiseSeed:function(){for(var t=this.noiseSeed.length,e=0;e<t;e++)this.noiseSeed[e]=Math.random();return this},wrapNoise:function(){for(var t=this.noiseWrap.length,e=0;e<t;e++)this.noiseWrap[e]=this.noiseCells[e];return this},_setupUniforms:function(t){if(this.keepAwake){var e=Math.sin(this.scene.time.now)/4096/256;t("uCellOffset",[this.noiseOffset[0]+e,this.noiseOffset[1]+e,this.noiseOffset[2]+e,this.noiseOffset[3]+e])}else t("uCellOffset",this.noiseOffset);t("uSeedX",this.noiseSeed.slice(0,4)),t("uSeedY",this.noiseSeed.slice(4,8)),t("uSeedZ",this.noiseSeed.slice(8,12)),t("uSeedW",this.noiseSeed.slice(12,16)),t("uCells",this.noiseCells),t("uVariation",this.noiseVariation),t("uWrap",this.noiseWrap),t("uSmoothing",this.noiseSmoothing),t("uNormalScale",this.noiseNormalScale),t("uColorStart",this.noiseColorStart.gl),t("uColorEnd",this.noiseColorEnd.gl)},_updateShaderConfig:function(t,e,i){var n=Math.max(1,Math.floor(e.noiseIterations)),s=i.programManager.getAdditionsByTag("ITERATION_COUNT")[0];s.name="ITERATION_COUNT_"+n,s.additions.fragmentIterations="#define ITERATION_COUNT "+n+".0";var r="MODE_DISTANCE";switch(e.noiseMode){case 1:r="MODE_INDEX";break;case 2:r="MODE_DISTANCE_SMOOTH"}var o=i.programManager.getAdditionsByTag("MODE")[0];o.name=r,o.additions.fragmentMode="#define "+r,i.programManager.getAdditionsByTag("NORMALMAP")[0].disable=!e.noiseNormalMap}})},20136(t,e,i){var n=i(25305),s=i(44603),r=i(23568),o=i(41946);s.register("noisecell4d",function(t,e){void 0===t&&(t={});var i=r(t,"config",null),s=r(t,"x",0),a=r(t,"y",0),h=r(t,"width",128),l=r(t,"height",128),u=new o(this.scene,i,s,a,h,l);return void 0!==e&&(t.add=e),n(this.scene,u,t),u})},65874(t,e,i){var n=i(41946);i(39429).register("noisecell4d",function(t,e,i,s,r){return this.displayList.add(new n(this.scene,t,e,i,s,r))})},1792(t,e,i){var n=i(83419),s=i(20071),r=i(40987),o=i(83587);t.exports=new n({Extends:s,initialize:function(t,e,i,n,a,h){e||(e={});var l={name:"noiseSimplex2D",fragmentSource:o,shaderAdditions:[{name:"ITERATION_COUNT_1_WARP_ITERATION_COUNT_1",tags:["ITERATION_COUNT"],additions:{fragmentIterations:"#define ITERATION_COUNT 1.0\n#define WARP_ITERATION_COUNT 1.0"}},{name:"NORMALMAP",tags:["NORMALMAP"],additions:{fragmentNormalMap:"#define NORMAL_MAP\n#extension GL_OES_standard_derivatives : enable"},disable:!e.noiseNormalMap}],setupUniforms:this._setupUniforms,updateShaderConfig:this._updateShaderConfig};s.call(this,t,l,i,n,a,h),this.type="NoiseSimplex2D",this.noiseCells=e.noiseCells||[32,32],this.noisePeriod=[this.noiseCells[0],this.noiseCells[1]],e.noisePeriod&&(this.noisePeriod=e.noisePeriod),this.noiseOffset=[0,0],e.noiseOffset&&(this.noiseOffset=e.noiseOffset),this.noiseFlow=e.noiseFlow||0,this.noiseWarpAmount=e.noiseWarpAmount||0,this.noiseIterations=e.noiseIterations||1,this.noiseWarpIterations=e.noiseWarpIterations||1,this.noiseDetailPower=e.noiseDetailPower||2,this.noiseFlowPower=e.noiseFlowPower||2,this.noiseContributionPower=e.noiseContributionPower||2,this.noiseWarpDetailPower=e.noiseWarpDetailPower||2,this.noiseWarpFlowPower=e.noiseWarpFlowPower||2,this.noiseWarpContributionPower=e.noiseWarpContributionPower||2,this.noiseNormalMap=!!e.noiseNormalMap,this.noiseNormalScale=1,void 0!==e.noiseNormalScale&&(this.noiseNormalScale=e.noiseNormalScale),this.noiseValueFactor=void 0===e.noiseValueFactor?.5:e.noiseValueFactor,this.noiseValueAdd=void 0===e.noiseValueAdd?.5:e.noiseValueAdd,this.noiseValuePower=void 0===e.noiseValuePower?1:e.noiseValuePower,this.noiseColorStart=new r(0,0,0),this.noiseColorEnd=new r(255,255,255),(void 0!==e.noiseColorStart||void 0!==e.noiseColorEnd)&&this.setNoiseColor(e.noiseColorStart,e.noiseColorEnd),this.noiseSeed=e.noiseSeed||[1,2]},setNoiseColor:function(t,e){var i;return void 0===t&&(t=0),void 0===e&&(e=0xffffff),"number"==typeof t?r.IntegerToColor(t,this.noiseColorStart):"string"==typeof t?r.HexStringToColor(t,this.noiseColorStart):Array.isArray(t)?(i=void 0===t[3]?1:t[3],this.noiseColorStart.setGLTo(t[0],t[1],t[2],i)):t instanceof r&&this.noiseColorStart.setTo(t.red,t.green,t.blue,t.alpha),"number"==typeof e?r.IntegerToColor(e,this.noiseColorEnd):"string"==typeof e?r.HexStringToColor(e,this.noiseColorEnd):Array.isArray(e)?(i=void 0===e[3]?1:e[3],this.noiseColorEnd.setGLTo(e[0],e[1],e[2],i)):e instanceof r&&this.noiseColorEnd.setTo(e.red,e.green,e.blue,e.alpha),this},randomizeNoiseSeed:function(){for(var t=this.noiseSeed.length,e=0;e<t;e++)this.noiseSeed[e]=Math.random();return this},wrapNoise:function(){for(var t=this.noisePeriod.length,e=0;e<t;e++)this.noisePeriod[e]=this.noiseCells[e];return this},_setupUniforms:function(t){t("uCells",this.noiseCells),t("uPeriod",this.noisePeriod),t("uOffset",this.noiseOffset),t("uFlow",this.noiseFlow),t("uDetailPower",this.noiseDetailPower),t("uFlowPower",this.noiseFlowPower),t("uContributionPower",this.noiseContributionPower),t("uWarpDetailPower",this.noiseWarpDetailPower),t("uWarpFlowPower",this.noiseWarpFlowPower),t("uWarpContributionPower",this.noiseWarpContributionPower),t("uWarpAmount",this.noiseWarpAmount),t("uNormalScale",this.noiseNormalScale),t("uValueFactor",this.noiseValueFactor),t("uValueAdd",this.noiseValueAdd),t("uValuePower",this.noiseValuePower),t("uColorStart",this.noiseColorStart.gl),t("uColorEnd",this.noiseColorEnd.gl),t("uSeed",this.noiseSeed)},_updateShaderConfig:function(t,e,i){var n=Math.max(1,Math.floor(e.noiseIterations)),s=Math.max(1,Math.floor(e.noiseWarpIterations)),r=i.programManager.getAdditionsByTag("ITERATION_COUNT")[0];r.name="ITERATION_COUNT_"+n+"_WARP_ITERATION_COUNT_"+s,r.additions.fragmentIterations="#define ITERATION_COUNT "+n+".0\n#define WARP_ITERATION_COUNT "+s+".0",i.programManager.getAdditionsByTag("NORMALMAP")[0].disable=!e.noiseNormalMap}})},51754(t,e,i){var n=i(25305),s=i(44603),r=i(23568),o=i(1792);s.register("noisesimplex2d",function(t,e){void 0===t&&(t={});var i=r(t,"config",null),s=r(t,"x",0),a=r(t,"y",0),h=r(t,"width",128),l=r(t,"height",128),u=new o(this.scene,i,s,a,h,l);return void 0!==e&&(t.add=e),n(this.scene,u,t),u})},80308(t,e,i){var n=i(1792);i(39429).register("noisesimplex2d",function(t,e,i,s,r){return this.displayList.add(new n(this.scene,t,e,i,s,r))})},51098(t,e,i){var n=i(83419),s=i(20071),r=i(40987),o=i(13460);t.exports=new n({Extends:s,initialize:function(t,e,i,n,a,h){e||(e={});var l={name:"noiseSimplex3D",fragmentSource:o,shaderAdditions:[{name:"ITERATION_COUNT_1_WARP_ITERATION_COUNT_1",tags:["ITERATION_COUNT"],additions:{fragmentIterations:"#define ITERATION_COUNT 1.0\n#define WARP_ITERATION_COUNT 1.0"}},{name:"NORMALMAP",tags:["NORMALMAP"],additions:{fragmentNormalMap:"#define NORMAL_MAP\n#extension GL_OES_standard_derivatives : enable"},disable:!e.noiseNormalMap}],setupUniforms:this._setupUniforms,updateShaderConfig:this._updateShaderConfig};s.call(this,t,l,i,n,a,h),this.type="NoiseSimplex3D",this.noiseCells=e.noiseCells||[32,32,32],this.noisePeriod=[this.noiseCells[0],this.noiseCells[1],this.noiseCells[2]],e.noisePeriod&&(this.noisePeriod=e.noisePeriod),this.noiseOffset=[0,0,0],e.noiseOffset&&(this.noiseOffset=e.noiseOffset),this.noiseFlow=e.noiseFlow||0,this.noiseWarpAmount=e.noiseWarpAmount||0,this.noiseIterations=e.noiseIterations||1,this.noiseWarpIterations=e.noiseWarpIterations||1,this.noiseDetailPower=e.noiseDetailPower||2,this.noiseFlowPower=e.noiseFlowPower||2,this.noiseContributionPower=e.noiseContributionPower||2,this.noiseWarpDetailPower=e.noiseWarpDetailPower||2,this.noiseWarpFlowPower=e.noiseWarpFlowPower||2,this.noiseWarpContributionPower=e.noiseWarpContributionPower||2,this.noiseNormalMap=!!e.noiseNormalMap,this.noiseNormalScale=1,void 0!==e.noiseNormalScale&&(this.noiseNormalScale=e.noiseNormalScale),this.noiseValueFactor=void 0===e.noiseValueFactor?.5:e.noiseValueFactor,this.noiseValueAdd=void 0===e.noiseValueAdd?.5:e.noiseValueAdd,this.noiseValuePower=void 0===e.noiseValuePower?1:e.noiseValuePower,this.noiseColorStart=new r(0,0,0),this.noiseColorEnd=new r(255,255,255),(void 0!==e.noiseColorStart||void 0!==e.noiseColorEnd)&&this.setNoiseColor(e.noiseColorStart,e.noiseColorEnd),this.noiseSeed=e.noiseSeed||[1,2,3]},setNoiseColor:function(t,e){var i;return void 0===t&&(t=0),void 0===e&&(e=0xffffff),"number"==typeof t?r.IntegerToColor(t,this.noiseColorStart):"string"==typeof t?r.HexStringToColor(t,this.noiseColorStart):Array.isArray(t)?(i=void 0===t[3]?1:t[3],this.noiseColorStart.setGLTo(t[0],t[1],t[2],i)):t instanceof r&&this.noiseColorStart.setTo(t.red,t.green,t.blue,t.alpha),"number"==typeof e?r.IntegerToColor(e,this.noiseColorEnd):"string"==typeof e?r.HexStringToColor(e,this.noiseColorEnd):Array.isArray(e)?(i=void 0===e[3]?1:e[3],this.noiseColorEnd.setGLTo(e[0],e[1],e[2],i)):e instanceof r&&this.noiseColorEnd.setTo(e.red,e.green,e.blue,e.alpha),this},randomizeNoiseSeed:function(){for(var t=this.noiseSeed.length,e=0;e<t;e++)this.noiseSeed[e]=Math.random();return this},wrapNoise:function(){for(var t=this.noisePeriod.length,e=0;e<t;e++)this.noisePeriod[e]=this.noiseCells[e];return this},_setupUniforms:function(t){t("uCells",this.noiseCells),t("uPeriod",this.noisePeriod),t("uOffset",this.noiseOffset),t("uFlow",this.noiseFlow),t("uDetailPower",this.noiseDetailPower),t("uFlowPower",this.noiseFlowPower),t("uContributionPower",this.noiseContributionPower),t("uWarpDetailPower",this.noiseWarpDetailPower),t("uWarpFlowPower",this.noiseWarpFlowPower),t("uWarpContributionPower",this.noiseWarpContributionPower),t("uWarpAmount",this.noiseWarpAmount),t("uNormalScale",this.noiseNormalScale),t("uValueFactor",this.noiseValueFactor),t("uValueAdd",this.noiseValueAdd),t("uValuePower",this.noiseValuePower),t("uColorStart",this.noiseColorStart.gl),t("uColorEnd",this.noiseColorEnd.gl),t("uSeed",this.noiseSeed)},_updateShaderConfig:function(t,e,i){var n=Math.max(1,Math.floor(e.noiseIterations)),s=Math.max(1,Math.floor(e.noiseWarpIterations)),r=i.programManager.getAdditionsByTag("ITERATION_COUNT")[0];r.name="ITERATION_COUNT_"+n+"_WARP_ITERATION_COUNT_"+s,r.additions.fragmentIterations="#define ITERATION_COUNT "+n+".0\n#define WARP_ITERATION_COUNT "+s+".0",i.programManager.getAdditionsByTag("NORMALMAP")[0].disable=!e.noiseNormalMap}})},71112(t,e,i){var n=i(25305),s=i(44603),r=i(23568),o=i(51098);s.register("noisesimplex3d",function(t,e){void 0===t&&(t={});var i=r(t,"config",null),s=r(t,"x",0),a=r(t,"y",0),h=r(t,"width",128),l=r(t,"height",128),u=new o(this.scene,i,s,a,h,l);return void 0!==e&&(t.add=e),n(this.scene,u,t),u})},73810(t,e,i){var n=i(51098);
1i(39429).register("noisesimplex3d",function(t,e,i,s,r){return this.displayList.add(new n(this.scene,t,e,i,s,r))})},76472(t,e,i){var n=i(83419),s=i(44777),r=i(37589),o=i(6113),a=i(91389),h=i(90664);t.exports=new n({Extends:s,initialize:function(t){s.call(this,t,null,!1),this.active=!1,this.easeName="Linear",this.r=[],this.g=[],this.b=[]},getMethod:function(){return 9*(null!==this.propertyValue)},setMethods:function(){var t=this.propertyValue,e=t,i=this.defaultEmit,n=this.defaultUpdate;if(9===this.method){this.start=t[0],this.ease=o("Linear"),this.interpolation=a("linear"),i=this.easedValueEmit,n=this.easeValueUpdate,e=t[0],this.active=!0,this.r.length=0,this.g.length=0,this.b.length=0;for(var s=0;s<t.length;s++){var r=h(t[s]);this.r.push(r.r),this.g.push(r.g),this.b.push(r.b)}}return this.onEmit=i,this.onUpdate=n,this.current=e,this},setEase:function(t){this.easeName=t,this.ease=o(t)},easedValueEmit:function(){return this.current=this.start,this.start},easeValueUpdate:function(t,e,i){var n=this.ease(i),s=r(this.interpolation(this.r,n),this.interpolation(this.g,n),this.interpolation(this.b,n));return this.current=s,s}})},44777(t,e,i){var n=i(30976),s=i(45319),r=i(83419),o=i(99472),a=i(6113),h=i(95540),l=i(91389),u=i(77720),d=i(15994);t.exports=new r({initialize:function(t,e,i){void 0===i&&(i=!1),this.propertyKey=t,this.propertyValue=e,this.defaultValue=e,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=i,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.active=!0,this.method=0,this._onEmit,this._onUpdate},loadConfig:function(t,e){void 0===t&&(t={}),e&&(this.propertyKey=e),this.propertyValue=h(t,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(t){var e;switch(this.method){case 1:case 3:case 8:e=t;break;case 2:this.propertyValue.indexOf(t)>=0&&(e=t);break;case 4:e=u(t,(this.end-this.start)/this.steps),this.counter=e;break;case 5:case 6:case 7:e=s(t,this.start,this.end);break;case 9:e=this.start[0]}return this.current=e,this},getMethod:function(){var t=this.propertyValue;if(null===t)return 0;var e=typeof t;if("number"===e)return 1;if(Array.isArray(t))return 2;if("function"===e)return 3;if("object"===e){if(this.hasBoth(t,"start","end"))if(this.has(t,"steps"))return 4;else return 5;else if(this.hasBoth(t,"min","max"))return 6;else if(this.has(t,"random"))return 7;else if(this.hasEither(t,"onEmit","onUpdate"))return 8;else if(this.hasEither(t,"values","interpolation"))return 9}return 0},setMethods:function(){var t=this.propertyValue,e=t,i=this.defaultEmit,n=this.defaultUpdate;switch(this.method){case 1:i=this.staticValueEmit;break;case 2:i=this.randomStaticValueEmit,e=t[0];break;case 3:this._onEmit=t,i=this.proxyEmit,e=this.defaultValue;break;case 4:this.start=t.start,this.end=t.end,this.steps=t.steps,this.counter=this.start,this.yoyo=!!this.has(t,"yoyo")&&t.yoyo,this.direction=0,i=this.steppedEmit,e=this.start;break;case 5:this.start=t.start,this.end=t.end;var s=this.has(t,"ease")?t.ease:"Linear";this.ease=a(s,t.easeParams),i=this.has(t,"random")&&t.random?this.randomRangedValueEmit:this.easedValueEmit,n=this.easeValueUpdate,e=this.start;break;case 6:this.start=t.min,this.end=t.max,i=this.has(t,"int")&&t.int?this.randomRangedIntEmit:this.randomRangedValueEmit,e=this.start;break;case 7:var r=t.random;Array.isArray(r)&&(this.start=r[0],this.end=r[1]),i=this.randomRangedIntEmit,e=this.start;break;case 8:this._onEmit=this.has(t,"onEmit")?t.onEmit:this.defaultEmit,this._onUpdate=this.has(t,"onUpdate")?t.onUpdate:this.defaultUpdate,i=this.proxyEmit,n=this.proxyUpdate,e=this.defaultValue;break;case 9:this.start=t.values;var o=this.has(t,"ease")?t.ease:"Linear";this.ease=a(o,t.easeParams),this.interpolation=l(t.interpolation),i=this.easedValueEmit,n=this.easeValueUpdate,e=this.start[0]}return this.onEmit=i,this.onUpdate=n,this.current=e,this},has:function(t,e){return t.hasOwnProperty(e)}
vendor: 5,402 bytes, line 1
1,hasBoth:function(t,e,i){return t.hasOwnProperty(e)&&t.hasOwnProperty(i)},hasEither:function(t,e,i){return t.hasOwnProperty(e)||t.hasOwnProperty(i)},defaultEmit:function(){return this.defaultValue},defaultUpdate:function(t,e,i,n){return n},proxyEmit:function(t,e,i){var n=this._onEmit(t,e,i);return this.current=n,n},proxyUpdate:function(t,e,i,n){var s=this._onUpdate(t,e,i,n);return this.current=s,s},staticValueEmit:function(){return this.current},staticValueUpdate:function(){return this.current},randomStaticValueEmit:function(){var t=Math.floor(Math.random()*this.propertyValue.length);return this.current=this.propertyValue[t],this.current},randomRangedValueEmit:function(t,e){var i=o(this.start,this.end);return t&&t.data[e]&&(t.data[e].min=i,t.data[e].max=this.end),this.current=i,i},randomRangedIntEmit:function(t,e){var i=n(this.start,this.end);return t&&t.data[e]&&(t.data[e].min=i,t.data[e].max=this.end),this.current=i,i},steppedEmit:function(){var t,e=this.counter,i=e,n=(this.end-this.start)/this.steps;return this.yoyo?(0===this.direction?(i+=n)>=this.end&&(t=i-this.end,i=this.end-t,this.direction=1):(i-=n)<=this.start&&(t=this.start-i,i=this.start+t,this.direction=0),this.counter=i):this.counter=d(i+n,this.start,this.end),this.current=e,e},easedValueEmit:function(t,e){if(t&&t.data[e]){var i=t.data[e];i.min=this.start,i.max=this.end}return this.current=this.start,this.start},easeValueUpdate:function(t,e,i){var n,s=t.data[e],r=this.ease(i);return n=this.interpolation?this.interpolation(this.start,r):(s.max-s.min)*r+s.min,this.current=n,n},destroy:function(){this.propertyValue=null,this.defaultValue=null,this.ease=null,this.interpolation=null,this._onEmit=null,this._onUpdate=null}})},24502(t,e,i){var n=i(83419),s=i(95540),r=i(20286);t.exports=new n({Extends:r,initialize:function(t,e,i,n,o){if("object"==typeof t){var a=t;t=s(a,"x",0),e=s(a,"y",0),i=s(a,"power",0),n=s(a,"epsilon",100),o=s(a,"gravity",50)}else void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=100),void 0===o&&(o=50);r.call(this,t,e,!0),this._gravity=o,this._power=i*o,this._epsilon=n*n},update:function(t,e){var i=this.x-t.x,n=this.y-t.y,s=i*i+n*n;if(0!==s){var r=Math.sqrt(s);s<this._epsilon&&(s=this._epsilon);var o=this._power*e/(s*r)*100;t.velocityX+=i*o,t.velocityY+=n*o}},epsilon:{get:function(){return Math.sqrt(this._epsilon)},set:function(t){this._epsilon=t*t}},power:{get:function(){return this._power/this._gravity},set:function(t){this._power=t*this._gravity}},gravity:{get:function(){return this._gravity},set:function(t){var e=this.power;this._gravity=t,this.power=e}}})},56480(t,e,i){var n=i(9674),s=i(45319),r=i(83419),o=i(39506),a=i(87841),h=i(11520),l=i(26099);t.exports=new r({initialize:function(t){this.emitter=t,this.texture=null,this.frame=null,this.x=0,this.y=0,this.worldPosition=new l,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=0xffffff,this.life=1e3,this.lifeCurrent=1e3,this.delayCurrent=0,this.holdCurrent=0,this.lifeT=0,this.data={tint:{min:0xffffff,max:0xffffff},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=t.scene,this.anims=null,this.emitter.anims.length>0&&(this.anims=new n(this)),this.bounds=new a},emit:function(t,e,i,n,s,r){return this.emitter.emit(t,e,i,n,s,r)},isAlive:function(){return this.lifeCurrent>0},kill:function(){this.lifeCurrent=0},setPosition:function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.x=t,this.y=e},fire:function(t,e){var i=this.emitter,n=i.ops,s=i.getAnim();if(s?this.anims.play(s):(this.frame=i.getFrame(),this.texture=this.frame.texture),!this.frame)throw Error("Particle has no texture frame");if(i.getEmitZone(this),void 0===t?this.x+=n.x.onEmit(this,"x"):n.x.steps>0?this.x+=t+n.x.onEmit(this,"x"):this.x+=t,void 0===e?this.y+=n.y.onEmit(this,"y"):n.y.steps>0?this.y+=e+n.y.onEmit(this,"y"):this.y+=e,this.life=n.lifespan.onEmit(this,"lifespan"),this.lifeCurrent=this.life,this.lifeT=0,this.delayCurrent=n.delay.onEmit(this,"delay"),this.holdCurrent=n.hold.onEmit(this,"hold"),this.scaleX=n.scaleX.onEmit(this,"scaleX"),this.scaleY=n.scaleY.active?n.scaleY.onEmit(this,"scaleY"):this.scaleX,this.angle=n.rotate.onEmit(this,"rotate"),this.rotation=o(this.angle),i.worldMatrix.transformPoint(this.x,this.y,this.worldPosition),0===this.delayCurrent&&i.getDeathZone(this))return this.lifeCurrent=0,!1;var r=n.speedX.onEmit(this,"speedX"),a=n.speedY.active?n.speedY.onEmit(this,"speedY"):r;if(i.radial){var h=o(n.angle.onEmit(this,"angle"));this.velocityX=Math.cos(h)*Math.abs(r),this.velocityY=Math.sin(h)*Math.abs(a)}else if(i.moveTo){var l=n.moveToX.onEmit(this,"moveToX"),u=n.moveToY.onEmit(this,"moveToY"),d=this.life/1e3;this.velocityX=(l-this.x)/d,this.velocityY=(u-this.y)/d}else this.velocityX=r,this.velocityY=a;return i.acceleration&&(this.accelerationX=n.accelerationX.onEmit(this,"accelerationX"),this.accelerationY=n.accelerationY.onEmit(this,"accelerationY")),this.maxVelocityX=n.maxVelocityX.onEmit(this,"maxVelocityX"),this.maxVelocityY=n.maxVelocityY.onEm
1it(this,"maxVelocityY"),this.bounce=n.bounce.onEmit(this,"bounce"),this.alpha=n.alpha.onEmit(this,"alpha"),n.color.active?this.tint=n.color.onEmit(this,"tint"):this.tint=n.tint.onEmit(this,"tint"),!0},update:function(t,e,i){if(this.lifeCurrent<=0)if(this.holdCurrent>0)return this.holdCurrent-=t,this.holdCurrent<=0;else return!0;if(this.delayCurrent>0)return this.delayCurrent-=t,!1;this.anims&&this.anims.update(0,t);var n=this.emitter,r=n.ops,a=1-this.lifeCurrent/this.life;if(this.lifeT=a,this.x=r.x.onUpdate(this,"x",a,this.x),this.y=r.y.onUpdate(this,"y",a,this.y),n.moveTo){var h=r.moveToX.onUpdate(this,"moveToX",a,n.moveToX),l=r.moveToY.onUpdate(this,"moveToY",a,n.moveToY),u=this.lifeCurrent/1e3;this.velocityX=(h-this.x)/u,this.velocityY=(l-this.y)/u}return(this.computeVelocity(n,t,e,i,a),this.scaleX=r.scaleX.onUpdate(this,"scaleX",a,this.scaleX),r.scaleY.active?this.scaleY=r.scaleY.onUpdate(this,"scaleY",a,this.scaleY):this.scaleY=this.scaleX,this.angle=r.rotate.onUpdate(this,"rotate",a,this.angle),this.rotation=o(this.angle),n.getDeathZone(this))?(this.lifeCurrent=0,!0):(this.alpha=s(r.alpha.onUpdate(this,"alpha",a,this.alpha),0,1),r.color.active?this.tint=r.color.onUpdate(this,"color",a,this.tint):this.tint=r.tint.onUpdate(this,"tint",a,this.tint),this.lifeCurrent-=t,this.lifeCurrent<=0&&this.holdCurrent<=0)},computeVelocity:function(t,e,i,n,r){var o=t.ops,a=this.velocityX,h=this.velocityY,l=o.accelerationX.onUpdate(this,"accelerationX",r,this.accelerationX),u=o.accelerationY.onUpdate(this,"accelerationY",r,this.accelerationY),d=o.maxVelocityX.onUpdate(this,"maxVelocityX",r,this.maxVelocityX),c=o.maxVelocityY.onUpdate(this,"maxVelocityY",r,this.maxVelocityY);this.bounce=o.bounce.onUpdate(this,"bounce",r,this.bounce),a+=t.gravityX*i+l*i,h+=t.gravityY*i+u*i,a=s(a,-d,d),h=s(h,-c,c),this.velocityX=a,this.velocityY=h,this.x+=a*i,this.y+=h*i,t.worldMatrix.transformPoint(this.x,this.y,this.worldPosition);for(var f=0;f<n.length;f++){var p=n[f];p.active&&p.update(this,e,i,r)}},setSizeToFrame:function(){},getBounds:function(t){void 0===t&&(t=this.emitter.getWorldTransformMatrix());var e=Math.abs(t.scaleX)*this.scaleX,i=Math.abs(t.scaleY)*this.scaleY,n=this.x,s=this.y,r=this.rotation,o=this.frame.width*e/2,a=this.frame.height*i/2,u=this.bounds,d=new l(n-o,s-a),c=new l(n+o,s-a),f=new l(n-o,s+a),p=new l(n+o,s+a);return 0!==r&&(h(d,n,s,r),h(c,n,s,r),h(f,n,s,r),h(p,n,s,r)),t.transformPoint(d.x,d.y,d),t.transformPoint(c.x,c.y,c),t.transformPoint(f.x,f.y,f),t.transformPoint(p.x,p.y,p),u.x=Math.min(d.x,c.x,f.x,p.x),u.y=Math.min(d.y,c.y,f.y,p.y),u.width=Math.max(d.x,c.x,f.x,p.x)-u.x,u.height=Math.max(d.y,c.y,f.y,p.y)-u.y,u},destroy:function(){this.anims&&this.anims.destroy(),this.anims=null,this.emitter=null,this.texture=null,this.frame=null,this.scene=null}})},69601(t,e,i){var n=i(83419),s=i(20286),r=i(87841);t.exports=new n({Extends:s,initialize:function(t,e,i,n,o,a,h,l){void 0===o&&(o=!0),void 0===a&&(a=!0),void 0===h&&(h=!0),void 0===l&&(l=!0),s.call(this,t,e,!0),this.bounds=new r(t,e,i,n),this.collideLeft=o,this.collideRight=a,this.collideTop=h,this.collideBottom=l},update:function(t){var e=this.bounds,i=-t.bounce,n=t.worldPosition;n.x<e.x&&this.collideLeft?(t.x+=e.x-n.x,t.velocityX*=i):n.x>e.right&&this.collideRight&&(t.x-=n.x-e.right,t.velocityX*=i),n.y<e.y&&this.collideTop?(t.y+=e.y-n.y,t.velocityY*=i):n.y>e.bottom&&this.collideBottom&&(t.y-=n.y-e.bottom,t.velocityY*=i)}})},31600(t,e,i){var n=i(68668),s=i(83419),r=i(31401),o=i(53774),a=i(43459),h=i(26388),l=i(19909),u=i(76472),d=i(44777),c=i(20696),f=i(95643),p=i(95540),g=i(26546),m=i(24502),v=i(69036),x=i(1985),y=i(97022),T=i(86091),w=i(73162),b=i(20074),S=i(269),C=i(56480),E=i(69601),A=i(68875),_=i(87841),M=i(59996),R=i(72905),O=i(90668),P=i(19186),L=i(84322),D=i(61340),F=i(26099),I=i(15994),N=["active","advance","blendMode","colorEase","deathCallback","deathCallbackScope","duration","emitCallback","emitCallbackScope","follow","frequency","gravityX","gravityY","maxAliveParticles","maxParticles","name","emitting","particleBringToTop","particleClass","radial","sortCallback","sortOrderAsc","sortProperty","stopAfter","tintMode","timeScale","trackVisible","visible"],B=["accelerationX","accelerationY","alpha","angle","bounce","color","delay","hold","lifespan","maxVelocityX","maxVelocityY","moveToX","moveToY","quantity","rotate","scaleX","scaleY","speedX","speedY","tint","x","y"];
vendor: 4,269 bytes, line 1
1t.exports=new s({Extends:f,Mixins:[r.AlphaSingle,r.BlendMode,r.Depth,r.Lighting,r.Mask,r.RenderNodes,r.ScrollFactor,r.Texture,r.Transform,r.Visible,O],initialize:function(t,e,i,n,s){f.call(this,t,"ParticleEmitter"),this.particleClass=C,this.config=null,this.ops={accelerationX:new d("accelerationX",0),accelerationY:new d("accelerationY",0),alpha:new d("alpha",1),angle:new d("angle",{min:0,max:360},!0),bounce:new d("bounce",0),color:new u("color"),delay:new d("delay",0,!0),hold:new d("hold",0,!0),lifespan:new d("lifespan",1e3,!0),maxVelocityX:new d("maxVelocityX",1e4),maxVelocityY:new d("maxVelocityY",1e4),moveToX:new d("moveToX",0),moveToY:new d("moveToY",0),quantity:new d("quantity",1,!0),rotate:new d("rotate",0),scaleX:new d("scaleX",1),scaleY:new d("scaleY",1),speedX:new d("speedX",0,!0),speedY:new d("speedY",0,!0),tint:new d("tint",0xffffff),x:new d("x",0),y:new d("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 F,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 D,this.sortProperty="",this.sortOrderAsc=!0,this.sortCallback=this.depthSortCallback,this.processors=new w(this),this.tintMode=L.MULTIPLY,this.initRenderNodes(this._defaultRenderNodesMap),this.setPosition(e,i),this.setTexture(n),s&&this.setConfig(s)},_defaultRenderNodesMap:{get:function(){return n}},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},setConfig:function(t){if(!t)return this;this.config=t;var e=0,i="",n=this.ops;for(e=0;e<B.length;e++)n[i=B[e]].loadConfig(t);for(e=0;e<N.length;e++)y(t,i=N[e])&&(this[i]=p(t,i));if(this.acceleration=0!==this.accelerationX||0!==this.accelerationY,this.moveTo=v(t,["moveToX","moveToY"]),y(t,"speed")&&(n.speedX.loadConfig(t,"speed"),n.speedY.active=!1),(x(t,["speedX","speedY"])||this.moveTo)&&(this.radial=!1),y(t,"scale")&&(n.scaleX.loadConfig(t,"scale"),n.scaleY.active=!1),y(t,"callbackScope")){var s=p(t,"callbackScope",null);this.emitCallbackScope=s,this.deathCallbackScope=s}if(y(t,"emitZone")&&this.addEmitZone(t.emitZone),y(t,"deathZone")&&this.addDeathZone(t.deathZone),y(t,"bounds")){var r=this.addParticleBounds(t.bounds);r.collideLeft=p(t,"collideLeft",!0),r.collideRight=p(t,"collideRight",!0),r.collideTop=p(t,"collideTop",!0),r.collideBottom=p(t,"collideBottom",!0)}return y(t,"followOffset")&&this.followOffset.setFromObject(p(t,"followOffset",0)),y(t,"texture")&&this.setTexture(t.texture),y(t,"frame")?this.setEmitterFrame(t.frame):y(t,"anim")&&this.setAnim(t.anim),y(t,"reserve")&&this.reserve(t.reserve),y(t,"advance")&&this.fastForward(t.advance),this.resetCounters(this.frequency,this.emitting),this.emitting&&this.emit(c.START,this),this},updateConfig:function(t){return t&&(this.config?this.setConfig(S(this.config,t)):this.setConfig(t)),this},toJSON:function(){var t=o(this),e=0,i="";for(e=0;e<N.length;e++)t[i=N[e]]=this[i];var n=this.ops;for(e=0;e<B.length;e++)n[i=B[e]]&&(t[i]=n[i].toJSON());return n.speedY.active||(delete t.speedX,t.speed=n.speedX.toJSON()),this.scaleX===this.scaleY&&(delete t.scaleX,delete t.scaleY,t.scale=n.scaleX.toJSON()),t},resetCounters:function(t,e){var i=this.counters;i.fill(0),i[0]=t,e&&(i[5]=1)},startFollow:function(t,e,i,n){return void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=!1),this.follow=t,this.followOffset.set(e,i),this.trackVisible=n,this},stopFollow:function(){return this.follow=null,this.followOffset.set(0,0),this.trackVisible=!1,this},getFrame:function(){var t,e=this.frames,i=e.length;return 1===i?t=e[0]:this.randomFrame?t=g(e):(t=e[this.currentFrame],this.frameCounter++,this.frameCounter===this.frameQuantity&&(this.frameCounter=0,this.currentFrame++,this.currentFrame===i&&(this.currentFrame=0))
1),this.texture.get(t)},setEmitterFrame:function(t,e,i){void 0===e&&(e=!0),void 0===i&&(i=1),this.randomFrame=e,this.frameQuantity=i,this.currentFrame=0;var n=typeof t;if(this.frames.length=0,Array.isArray(t))this.frames=this.frames.concat(t);else if("string"===n||"number"===n)this.frames.push(t);else if("object"===n){var s=t;(t=p(s,"frames",null))&&(this.frames=this.frames.concat(t));var r=p(s,"cycle",!1);this.randomFrame=!r,this.frameQuantity=p(s,"quantity",i)}return 1===this.frames.length&&(this.frameQuantity=1,this.randomFrame=!1),this},getAnim:function(){var t=this.anims,e=t.length;if(0===e)return null;if(1===e)return t[0];if(this.randomAnim)return g(t);var i=t[this.currentAnim];return this.animCounter++,this.animCounter>=this.animQuantity&&(this.animCounter=0,this.currentAnim=I(this.currentAnim+1,0,e)),i},setAnim:function(t,e,i){void 0===e&&(e=!0),void 0===i&&(i=1),this.randomAnim=e,this.animQuantity=i,this.currentAnim=0;var n=typeof t;if(this.anims.length=0,Array.isArray(t))this.anims=this.anims.concat(t);else if("string"===n)this.anims.push(t);else if("object"===n){var s=t;(t=p(s,"anims",null))&&(this.anims=this.anims.concat(t));var r=p(s,"cycle",!1);this.randomAnim=!r,this.animQuantity=p(s,"quantity",i)}return 1===this.anims.length&&(this.animQuantity=1,this.randomAnim=!1),this},setRadial:function(t){return void 0===t&&(t=!0),this.radial=t,this},addParticleBounds:function(t,e,i,n,s,r,o,a){if("object"==typeof t){var h=t;t=h.x,e=h.y,i=y(h,"w")?h.w:h.width,n=y(h,"h")?h.h:h.height}return this.addParticleProcessor(new E(t,e,i,n,s,r,o,a))},setParticleSpeed:function(t,e){return void 0===e&&(e=t),this.ops.speedX.onChange(t),t===e?this.ops.speedY.active=!1:this.ops.speedY.onChange(e),this.radial=!0,this},setParticleScale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.ops.scaleX.onChange(t),this.ops.scaleY.onChange(e),this},setParticleGravity:function(t,e){return this.gravityX=t,this.gravityY=e,this},setParticleAlpha:function(t){return this.ops.alpha.onChange(t),this},setParticleTint:function(t){return this.ops.tint.onChange(t),this},setEmitterAngle:function(t){return this.ops.angle.onChange(t),this},setParticleLifespan:function(t){return this.ops.lifespan.onChange(t),this},setQuantity:function(t){return this.quantity=t,this},setFrequency:function(t,e){return this.frequency=t,this.flowCounter=t>0?t:0,e&&(this.quantity=e),this},addDeathZone:function(t){Array.isArray(t)||(t=[t]);for(var e,i=[],n=0;n<t.length;n++)if((e=t[n])instanceof h)i.push(e);else if("function"==typeof e.contains)e=new h(e,!0),i.push(e);else{var s=p(e,"type","onEnter"),r=p(e,"source",null);r&&"function"==typeof r.contains&&(e=new h(r,"onEnter"===s),i.push(e))}return this.deathZones=this.deathZones.concat(i),i},removeDeathZone:function(t){return R(this.deathZones,t),this},clearDeathZones:function(){return this.deathZones.length=0,this},addEmitZone:function(t){Array.isArray(t)||(t=[t]);for(var e,i=[],n=0;n<t.length;n++)if((e=t[n])instanceof A||e instanceof l)i.push(e);else{var s=p(e,"source",null);if(s){var r=p(e,"type","random");"random"===r&&"function"==typeof s.getRandomPoint?(e=new A(s),i.push(e)):"edge"===r&&"function"==typeof s.getPoints&&(e=new l(s,p(e,"quantity",1),p(e,"stepRate",0),p(e,"yoyo",!1),p(e,"seamless",!0),p(e,"total",-1)),i.push(e))}}return this.emitZones=this.emitZones.concat(i),i},removeEmitZone:function(t){return R(this.emitZones,t),this.zoneIndex=0,this},clearEmitZones:function(){return this.emitZones.length=0,this.zoneIndex=0,this},getEmitZone:function(t){var e=this.emitZones,i=e.length;if(0!==i){var n=e[this.zoneIndex];n.getPoint(t),n.total>-1&&(this.zoneTotal++,this.zoneTotal===n.total&&(this.zoneTotal=0,this.zoneIndex++,this.zoneIndex===i&&(this.zoneIndex=0)))}},getDeathZone:function(t){for(var e=this.deathZones,i=0;i<e.length;i++){var n=e[i];if(n.willKill(t))return this.emit(c.DEATH_ZONE,this,t,n),!0}return!1},setEmitZone:function(t){var e;return(e=isFinite(t)?t:this.emitZones.indexOf(t))>=0&&(this.zoneIndex=e),this},addParticleProcessor:function(t){return this.processors.exists(t)||(t.emitter&&t.emitter.removeParticleProcessor(t),this.processors.add(t),t.emitter=this),t},removeParticleProcessor:function(t){return this.processors.exists(t)&&(this.processors.remove(t,!0),t.emitter=null),t},getProcessors:function(){return this.processors.getAll("active",!0)},createGravityWell:function(t){return this.addParticleProcessor(new m(t))},reserve:function(t){var e=this.dead;if(this.maxParticles>0){var i=this.getParticleCount();i+t>this.maxParticles&&(t=this.maxParticles-(i+t))}for(var n=0;n<t;n++)e.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)||this.maxAliveParticles>0&&this.getAliveParticleCount()>=this.maxAliveParticles},onParticleEmit:function(t,e){return void 0===t?(this.emitCallback=null,this.emitCallbackScope=null):"function"==typeof t&&(this.emitCallback=t,e&&(this.emitCallbackScope=e)),this},onParticleDeath:function(t,e){return void 0===t?(this.deathCallback=null,this.deathCallbackScope=null):"function"==typeof t&&(this.deathCallback=t,e&&(this.deathCallbackScope=e)),this},killAll:function(){for(var t=this.dead,e=this.alive;e.length>0;)t.push(e.pop());return this}
vendor: 4,197 bytes, line 1
1,forEachAlive:function(t,e){for(var i=this.alive,n=i.length,s=0;s<n;s++)t.call(e,i[s],this);return this},forEachDead:function(t,e){for(var i=this.dead,n=i.length,s=0;s<n;s++)t.call(e,i[s],this);return this},start:function(t,e){return void 0===t&&(t=0),this.emitting||(t>0&&this.fastForward(t),this.emitting=!0,this.resetCounters(this.frequency,!0),void 0!==e&&(this.duration=Math.abs(e)),this.emit(c.START,this)),this},stop:function(t){return void 0===t&&(t=!1),this.emitting&&(this.emitting=!1,t&&this.killAll(),this.emit(c.STOP,this)),this},pause:function(){return this.active=!1,this},resume:function(){return this.active=!0,this},setSortProperty:function(t,e){return void 0===t&&(t=""),void 0===e&&(e=this.true),this.sortProperty=t,this.sortOrderAsc=e,this.sortCallback=this.depthSortCallback,this},setSortCallback:function(t){return t=""!==this.sortProperty?this.depthSortCallback:null,this.sortCallback=t,this},depthSort:function(){return P(this.alive,this.sortCallback.bind(this)),this},depthSortCallback:function(t,e){var i=this.sortProperty;return this.sortOrderAsc?t[i]-e[i]:e[i]-t[i]},flow:function(t,e,i){return void 0===e&&(e=1),this.emitting=!1,this.frequency=t,this.quantity=e,void 0!==i&&(this.stopAfter=i),this.start()},explode:function(t,e,i){this.frequency=-1,this.resetCounters(-1,!0);var n=this.emitParticle(t,e,i);return this.emit(c.EXPLODE,this,n),n},emitParticleAt:function(t,e,i){return this.emitParticle(i,t,e)},emitParticle:function(t,e,i){if(!this.atLimit()){void 0===t&&(t=this.ops.quantity.onEmit());for(var n=this.dead,s=this.stopAfter,r=this.follow?this.follow.x+this.followOffset.x:e,o=this.follow?this.follow.y+this.followOffset.y:i,a=0;a<t;a++){var h=n.pop();if(h||(h=new this.particleClass(this)),h.fire(r,o)?(this.particleBringToTop?this.alive.push(h):this.alive.unshift(h),this.emitCallback&&this.emitCallback.call(this.emitCallbackScope,h,this)):this.dead.push(h),s>0&&(this.stopCounter++,this.stopCounter>=s)||this.atLimit())break}return h}},fastForward:function(t,e){void 0===e&&(e=1e3/60);var i=0;for(this.skipping=!0;i<Math.abs(t);)this.preUpdate(0,e),i+=e;return this.skipping=!1,this},preUpdate:function(t,e){var i=(e*=this.timeScale)/1e3;this.trackVisible&&(this.visible=this.follow.visible),this.getWorldTransformMatrix(this.worldMatrix);var n=this.getProcessors(),s=this.alive,r=this.dead,o=0,a=[],h=s.length;for(o=0;o<h;o++){var l=s[o];l.update(e,i,n)&&a.push({index:o,particle:l})}if((h=a.length)>0){var u=this.deathCallback,d=this.deathCallbackScope;for(o=h-1;o>=0;o--){var f=a[o];s.splice(f.index,1),r.push(f.particle),u&&u.call(d,f.particle),f.particle.setPosition()}}if(!this.emitting&&!this.skipping){1===this.completeFlag&&0===s.length&&(this.completeFlag=0,this.emit(c.COMPLETE,this));return}if(0===this.frequency)this.emitParticle();else if(this.frequency>0)for(this.flowCounter-=e;this.flowCounter<=0;)this.emitParticle(),this.flowCounter+=this.frequency;!this.skipping&&(this.duration>0&&(this.elapsed+=e,this.elapsed>=this.duration&&this.stop()),this.stopAfter>0&&this.stopCounter>=this.stopAfter&&this.stop())},overlap:function(t){for(var e=this.getWorldTransformMatrix(),i=this.alive,n=i.length,s=[],r=0;r<n;r++){var o=i[r];M(t,o.getBounds(e))&&s.push(o)}return s},getBounds:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=1e3/60),void 0===n&&(n=new _);var s,r,o=this.getWorldTransformMatrix(),h=this.alive,l=!1;if(n.setTo(0,0,0,0),e>0){var u=0;for(this.skipping=!0;u<Math.abs(e);){for(this.preUpdate(0,i),s=0;s<h.length;s++)r=h[s].getBounds(o),l?b(n,r):(l=!0,a(r,n));u+=i}this.skipping=!1}else for(s=0;s<h.length;s++)r=h[s].getBounds(o),l?b(n,r):(l=!0,a(r,n));return t>0&&T(n,t,t),n},createEmitter:function(){throw Error("createEmitter removed. See ParticleEmitter docs for info")},particleX:{get:function(){return this.ops.x.current},set:function(t){this.ops.x.onChange(t)}},particleY:{get:function(){return this.ops.y.current},set:function(t){this.ops.y.onChange(t)}},accelerationX:{get:function(){return this.ops.accelerationX.current},set:function(t){this.ops.accelerationX.onChange(t)}},accelerationY:{get:function(){return this.ops.accelerationY.current},set:function(t){this.ops.accelerationY.onChange(t)}
1},maxVelocityX:{get:function(){return this.ops.maxVelocityX.current},set:function(t){this.ops.maxVelocityX.onChange(t)}},maxVelocityY:{get:function(){return this.ops.maxVelocityY.current},set:function(t){this.ops.maxVelocityY.onChange(t)}},speed:{get:function(){return this.ops.speedX.current},set:function(t){this.ops.speedX.onChange(t),this.ops.speedY.onChange(t)}},speedX:{get:function(){return this.ops.speedX.current},set:function(t){this.ops.speedX.onChange(t)}},speedY:{get:function(){return this.ops.speedY.current},set:function(t){this.ops.speedY.onChange(t)}},moveToX:{get:function(){return this.ops.moveToX.current},set:function(t){this.ops.moveToX.onChange(t)}},moveToY:{get:function(){return this.ops.moveToY.current},set:function(t){this.ops.moveToY.onChange(t)}},bounce:{get:function(){return this.ops.bounce.current},set:function(t){this.ops.bounce.onChange(t)}},particleScaleX:{get:function(){return this.ops.scaleX.current},set:function(t){this.ops.scaleX.onChange(t)}},particleScaleY:{get:function(){return this.ops.scaleY.current},set:function(t){this.ops.scaleY.onChange(t)}},particleColor:{get:function(){return this.ops.color.current},set:function(t){this.ops.color.onChange(t)}},colorEase:{get:function(){return this.ops.color.easeName},set:function(t){this.ops.color.setEase(t)}},particleTint:{get:function(){return this.ops.tint.current},set:function(t){this.ops.tint.onChange(t)}},particleAlpha:{get:function(){return this.ops.alpha.current},set:function(t){this.ops.alpha.onChange(t)}},lifespan:{get:function(){return this.ops.lifespan.current},set:function(t){this.ops.lifespan.onChange(t)}},particleAngle:{get:function(){return this.ops.angle.current},set:function(t){this.ops.angle.onChange(t)}},particleRotate:{get:function(){return this.ops.rotate.current},set:function(t){this.ops.rotate.onChange(t)}},quantity:{get:function(){return this.ops.quantity.current},set:function(t){this.ops.quantity.onChange(t)}},delay:{get:function(){return this.ops.delay.current},set:function(t){this.ops.delay.onChange(t)}},hold:{get:function(){return this.ops.hold.current},set:function(t){this.ops.hold.onChange(t)}},flowCounter:{get:function(){return this.counters[0]},set:function(t){this.counters[0]=t}},frameCounter:{get:function(){return this.counters[1]},set:function(t){this.counters[1]=t}},animCounter:{get:function(){return this.counters[2]},set:function(t){this.counters[2]=t}},elapsed:{get:function(){return this.counters[3]},set:function(t){this.counters[3]=t}},stopCounter:{get:function(){return this.counters[4]},set:function(t){this.counters[4]=t}},completeFlag:{get:function(){return this.counters[5]},set:function(t){this.counters[5]=t}},zoneIndex:{get:function(){return this.counters[6]},set:function(t){this.counters[6]=t}},zoneTotal:{get:function(){return this.counters[7]},set:function(t){this.counters[7]=t}},currentFrame:{get:function(){return this.counters[8]},set:function(t){this.counters[8]=t}},currentAnim:{get:function(){return this.counters[9]},set:function(t){this.counters[9]=t}},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 t,e=this.ops;for(t=0;t<B.length;t++)e[B[t]].destroy();for(t=0;t<this.alive.length;t++)this.alive[t].destroy();for(t=0;t<this.dead.length;t++)this.dead[t].destroy();this.ops=null,this.alive=[],this.dead=[],this.worldMatrix.destroy()}})},9871(t,e,i){var n=i(59996),s=i(61340),r=new s,o=new s,a=new s,h=new s;t.exports=function(t,e,i,s){i.addToRenderList(e),r.copyWithScrollFactorFrom(i.matrix,i.scrollX,i.scrollY,e.scrollFactorX,e.scrollFactorY),s&&r.multiply(s),h.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),r.multiply(h);var l=t.currentContext,u=i.roundPixels,d=i.alpha,c=e.alpha,f=e.alive,p=f.length,g=e.viewBounds;if(e.visible&&0!==p&&(!g||n(g,i.worldView))){e.sortCallback&&e.depthSort(),l.save(),l.globalCompositeOperation=t.blendModes[e.blendMode];for(var m=0;m<p;m++){var v=f[m],x=v.alpha*c*d;if(!(x<=0)&&0!==v.scaleX&&0!==v.scaleY){a.applyITRS(v.x,v.y,v.rotation,v.scaleX,v.scaleY),r.multiply(a,o);var y=v.frame,T=y.canvasData;if(T.width>0&&T.height>0){var w=-y.halfWidth,b=-y.halfHeight;l.globalAlpha=x,l.save(),o.setToContext(l),u&&(w=Math.round(w),b=Math.round(b)),l.imageSmoothingEnabled=!y.source.scaleMode,l.drawImage(y.source.image,T.x,T.y,T.width,T.height,w,b,T.width,T.height),l.restore(
1)}}}l.restore()}}},92730(t,e,i){var n=i(25305),s=i(44603),r=i(23568),o=i(95540),a=i(31600);s.register("particles",function(t,e){void 0===t&&(t={});var i=r(t,"key",null),s=o(t,"config",null),h=new a(this.scene,0,0,i);return void 0!==e&&(t.add=e),n(this.scene,h,t),s&&h.setConfig(s),h})},676(t,e,i){var n=i(39429),s=i(31600);n.register("particles",function(t,e,i,n){return void 0!==t&&"string"==typeof t&&console.warn("ParticleEmitterManager was removed in Phaser 3.60. See documentation for details"),this.displayList.add(new s(this.scene,t,e,i,n))})},90668(t,e,i){var n=i(29747),s=n,r=n;s=i(21188),t.exports={renderWebGL:s,renderCanvas:r=i(9871)}},21188(t,e,i){var n=i(59996),s=i(61340),r=i(70554),o=new s,a=new s,h=new s,l=new s,u={},d={},c={quad:new Float32Array(8)};t.exports=function(t,e,i,s){var f=i.camera;f.addToRenderList(e),o.copyWithScrollFactorFrom(f.getViewMatrix(!i.useCanvas),f.scrollX,f.scrollY,e.scrollFactorX,e.scrollFactorY),s&&o.multiply(s),l.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),o.multiply(l);var p=r.getTintAppendFloatAlpha,g=e.alpha,m=e.alive,v=m.length,x=e.viewBounds;if(0!==v&&(!x||n(x,f.worldView))){e.sortCallback&&e.depthSort();for(var y=e.tintMode,T=0;T<v;T++){var w,b,S=m[T],C=S.alpha*g;if(!(C<=0)&&0!==S.scaleX&&0!==S.scaleY){h.applyITRS(S.x,S.y,S.rotation,S.scaleX,S.scaleY),o.multiply(h,a);var E=S.frame,A=-E.halfWidth,_=-E.halfHeight;a.setQuad(A,_,A+E.width,_+E.height,c.quad),u.frame!==E&&(u.frame=E,u.uvSource=E);var M=p(S.tint,C);d.tintTopLeft=M,d.tintBottomLeft=M,d.tintTopRight=M,d.tintBottomRight=M,d.tintEffect=y,e.lighting&&(S.texture&&(w=E.texture.dataSource[E.sourceIndex]),b=S.rotation,e.parentContainer&&(b=e.getWorldTransformMatrix(o,a).rotate(S.rotation).rotationNormalized));var R=e.customRenderNodes,O=e.defaultRenderNodes;(R.Submitter||O.Submitter).run(i,e,s,0,u,c,d,w,b)}}}}},20286(t,e,i){t.exports=new(i(83419))({initialize:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=!0),this.emitter,this.x=t,this.y=e,this.active=i},update:function(){},destroy:function(){this.emitter=null}})},9774(t){t.exports="complete"},812(t){t.exports="deathzone"},30522(t){t.exports="explode"},96695(t){t.exports="start"},18677(t){t.exports="stop"},20696(t,e,i){t.exports={COMPLETE:i(9774),DEATH_ZONE:i(812),EXPLODE:i(30522),START:i(96695),STOP:i(18677)}},18404(t,e,i){t.exports={EmitterColorOp:i(76472),EmitterOp:i(44777),Events:i(20696),GravityWell:i(24502),Particle:i(56480),ParticleBounds:i(69601),ParticleEmitter:i(31600),ParticleProcessor:i(20286),Zones:i(21024)}},26388(t,e,i){t.exports=new(i(83419))({initialize:function(t,e){this.source=t,this.killOnEnter=e},willKill:function(t){var e=t.worldPosition,i=this.source.contains(e.x,e.y);return i&&this.killOnEnter||!i&&!this.killOnEnter}})},19909(t,e,i){t.exports=new(i(83419))({initialize:function(t,e,i,n,s,r){void 0===n&&(n=!1),void 0===s&&(s=!0),void 0===r&&(r=-1),this.source=t,this.points=[],this.quantity=e,this.stepRate=i,this.yoyo=n,this.counter=-1,this.seamless=s,this._length=0,this._direction=0,this.total=r,this.updateSource()},updateSource:function(){if(this.points=this.source.getPoints(this.quantity,this.stepRate),this.seamless){var t=this.points[0],e=this.points[this.points.length-1];t.x===e.x&&t.y===e.y&&this.points.pop()}var i=this._length;return this._length=this.points.length,this._length<i&&this.counter>this._length&&(this.counter=this._length-1),this},changeSource:function(t){return this.source=t,this.updateSource()},getPoint:function(t){0===this._direction?(this.counter++,this.counter>=this._length&&(this.yoyo?(this._direction=1,this.counter=this._length-1):this.counter=0)):(this.counter--,-1===this.counter&&(this.yoyo?(this._direction=0,this.counter=0):this.counter=this._length-1));var e=this.points[this.counter];e&&(t.x=e.x,t.y=e.y)}})},68875(t,e,i){var n=i(83419),s=i(26099);t.exports=new n({initialize:function(t){this.source=t,this._tempVec=new s,this.total=-1},getPoint:function(t){var e=this._tempVec;this.source.getRandomPoint(e),t.x=e.x,t.y=e.y}})},21024(t,e,i){t.exports={DeathZone:i(26388),EdgeZone:i(19909),RandomZone:i(68875)}},1159(t,e,i){var n=i(83419),s=i(31401),r=i(68287);t.exports=new n({Extends:r,Mixins:[s.PathFollower],initialize:function(t,e,
vendor: 4,445 bytes, line 1
1i,n,s,o){r.call(this,t,i,n,s,o),this.path=e},preUpdate:function(t,e){this.anims.update(t,e),this.pathUpdate(t)}})},90145(t,e,i){var n=i(39429),s=i(1159);n.register("follower",function(t,e,i,n,r){var o=new s(this.scene,t,e,i,n,r);return this.displayList.add(o),this.updateList.add(o),o})},80321(t,e,i){var n=i(43246),s=i(83419),r=i(31401),o=i(95643),a=i(30100),h=i(67277);t.exports=new s({Extends:o,Mixins:[r.AlphaSingle,r.BlendMode,r.Depth,r.Mask,r.RenderNodes,r.ScrollFactor,r.Transform,r.Visible,h],initialize:function(t,e,i,n,s,r,h){void 0===n&&(n=0xffffff),void 0===s&&(s=128),void 0===r&&(r=1),void 0===h&&(h=.1),o.call(this,t,"PointLight"),this.initRenderNodes(this._defaultRenderNodesMap),this.setPosition(e,i),this.color=a(n),this.intensity=r,this.attenuation=h,this.width=2*s,this.height=2*s,this._radius=s},_defaultRenderNodesMap:{get:function(){return n}},radius:{get:function(){return this._radius},set:function(t){this._radius=t,this.width=2*t,this.height=2*t}},originX:{get:function(){return .5}},originY:{get:function(){return .5}},displayOriginX:{get:function(){return this._radius}},displayOriginY:{get:function(){return this._radius}}})},39829(t,e,i){var n=i(25305),s=i(44603),r=i(23568),o=i(80321);s.register("pointlight",function(t,e){void 0===t&&(t={});var i=r(t,"color",0xffffff),s=r(t,"radius",128),a=r(t,"intensity",1),h=r(t,"attenuation",.1),l=new o(this.scene,0,0,i,s,a,h);return void 0!==e&&(t.add=e),n(this.scene,l,t),l})},71255(t,e,i){var n=i(39429),s=i(80321);n.register("pointlight",function(t,e,i,n,r,o){return this.displayList.add(new s(this.scene,t,e,i,n,r,o))})},67277(t,e,i){var n=i(29747),s=n;t.exports={renderWebGL:s=i(57787),renderCanvas:n}},57787(t,e,i){var n=i(91296);t.exports=function(t,e,i,s){var r=i.camera;r.addToRenderList(e);var o=n(e,r,s,!i.useCanvas).calc,a=e.width,h=e.height,l=-e._radius,u=-e._radius,d=l+a,c=u+h,f=o.getX(0,0),p=o.getY(0,0),g=o.getX(l,u),m=o.getY(l,u),v=o.getX(l,c),x=o.getY(l,c),y=o.getX(d,c),T=o.getY(d,c),w=o.getX(d,u),b=o.getY(d,u);(e.customRenderNodes.BatchHandler||e.defaultRenderNodes.BatchHandler).batch(i,e,g,m,v,x,w,b,y,T,f,p)}},591(t,e,i){var n=i(83419),s=i(45650),r=i(88571),o=i(83999),a=i(58855);t.exports=new n({Extends:r,Mixins:[o],initialize:function(t,e,i,n,o,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=32),void 0===o&&(o=32),void 0===h&&(h=!0);var l=t.sys.textures.addDynamicTexture(s(),n,o,h);r.call(this,t,e,i,l),this.type="RenderTexture",this.camera=this.texture.camera,this._saved=!1,this.renderMode=a.RENDER,this.isCurrentlyRendering=!1},setSize:function(t,e){this.width=t,this.height=e,this.updateDisplayOrigin();var i=this.input;return i&&!i.customHitArea&&(i.hitArea.width=t,i.hitArea.height=e),this},resize:function(t,e,i){return this.texture.setSize(t,e,i),this.setSize(this.texture.width,this.texture.height),this},saveTexture:function(t){var e=this.texture;return e.key=t,e.manager.addDynamicTexture(e)&&(this._saved=!0),e},setRenderMode:function(t,e){return this.renderMode=t,e&&this.texture.preserve(!0),this},render:function(){return this.texture.render(),this},fill:function(t,e,i,n,s,r){return this.texture.fill(t,e,i,n,s,r),this},clear:function(t,e,i,n){return this.texture.clear(t,e,i,n),this},stamp:function(t,e,i,n,s){return this.texture.stamp(t,e,i,n,s),this},erase:function(t,e,i){return this.texture.erase(t,e,i),this},draw:function(t,e,i,n,s){return this.texture.draw(t,e,i,n,s),this},capture:function(t,e){return this.texture.capture(t,e),this},repeat:function(t,e,i,n,s,r,o){return this.texture.repeat(t,e,i,n,s,r,o),this},preserve:function(t){return this.texture.preserve(t),this},callback:function(t){return this.texture.callback(t),this},snapshotArea:function(t,e,i,n,s,r,o){return this.texture.snapshotArea(t,e,i,n,s,r,o),this},snapshot:function(t,e,i){return this.texture.snapshot(t,e,i)},snapshotPixel:function(t,e,i){return this.texture.snapshotPixel(t,e,i)},preDestroy:function(){this.camera=null,this._saved||this.texture.destroy()}})},97272(t,e,i){var n=i(40652),s=i(58855);t.exports=function(t,e,i,r){var o=!0,a=!0;e.renderMode===s.REDRAW?a=!1:e.renderMode===s.RENDER&&(o=!1),o&&e.render(),a&&n(t,e,i,r)}},34495(t,e,i){var n=i(25305),s=i(44603),r=i(23568),o=i(591);s.register("renderTexture",function(t,e){void 0===t&&(t={});var i=r(t,"x",0),s=r(t,"y",0),a=r(t,"width",32),h=r(t,"height",32),l=new o(this.scene,i,s,a,h);return void 0!==e&&(t.add=e),n(this.scene,l,t),l})},60505(t,e,i){var n=i(39429),s=i(591);
1n.register("renderTexture",function(t,e,i,n){return this.displayList.add(new s(this.scene,t,e,i,n))})},83999(t,e,i){var n=i(29747),s=n,r=n;s=i(53937),t.exports={renderWebGL:s,renderCanvas:r=i(97272)}},58855(t){t.exports={RENDER:"render",REDRAW:"redraw",ALL:"all"}},53937(t,e,i){var n=i(99517),s=i(58855);t.exports=function(t,e,i,r){if(!e.isCurrentlyRendering){e.isCurrentlyRendering=!0;var o=!0,a=!0;e.renderMode===s.REDRAW?a=!1:e.renderMode===s.RENDER&&(o=!1),o&&e.render(),a&&n(t,e,i,r),e.isCurrentlyRendering=!1}}},77757(t,e,i){var n=i(9674),s=i(85760),r=i(83419),o=i(31401),a=i(95643),h=i(38745),l=i(84322),u=i(26099);t.exports=new r({Extends:a,Mixins:[o.AlphaSingle,o.BlendMode,o.Depth,o.Flip,o.Mask,o.RenderNodes,o.Size,o.Texture,o.Transform,o.Visible,o.ScrollFactor,h],initialize:function(t,e,i,s,r,o,h,d,c){void 0===s&&(s="__DEFAULT"),void 0===o&&(o=2),void 0===h&&(h=!0),a.call(this,t,"Rope"),this.anims=new n(this),this.points=o,this.vertices,this.uv,this.colors,this.alphas,this.tintMode="__DEFAULT"===s?l.FILL:l.MULTIPLY,this.dirty=!1,this.horizontal=h,this._flipX=!1,this._flipY=!1,this._perp=new u,this.debugCallback=null,this.debugGraphic=null,this.setTexture(s,r),this.setPosition(e,i),this.setSizeToFrame(),this.initRenderNodes(this._defaultRenderNodesMap),Array.isArray(o)&&this.resizeArrays(o.length),this.setPoints(o,d,c),this.updateVertices()},_defaultRenderNodesMap:{get:function(){return s}},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(t,e){var i=this.anims.currentFrame;this.anims.update(t,e),this.anims.currentFrame!==i&&(this.updateUVs(),this.updateVertices())},play:function(t,e,i){return this.anims.play(t,e,i),this},setDirty:function(){return this.dirty=!0,this},setHorizontal:function(t,e,i){return(void 0===t&&(t=this.points.length),this.horizontal)?this:(this.horizontal=!0,this.setPoints(t,e,i))},setVertical:function(t,e,i){return(void 0===t&&(t=this.points.length),this.horizontal)?(this.horizontal=!1,this.setPoints(t,e,i)):this},setTintMode:function(t){return void 0===t&&(t=l.MULTIPLY),this.tintMode=t,this},setAlphas:function(t,e){var i,n=this.points.length;if(n<1)return this;var s=this.alphas;void 0===t?t=[1]:Array.isArray(t)||void 0!==e||(t=[t]);var r=0;if(void 0!==e)for(i=0;i<n;i++)s[r=2*i]=t,s[r+1]=e;else if(t.length===n)for(i=0;i<n;i++)s[r=2*i]=t[i],s[r+1]=t[i];else{var o=t[0];for(i=0;i<n;i++)r=2*i,t.length>r&&(o=t[r]),s[r]=o,t.length>r+1&&(o=t[r+1]),s[r+1]=o}return this},setColors:function(t){var e,i=this.points.length;if(i<1)return this;var n=this.colors;void 0===t?t=[0xffffff]:Array.isArray(t)||(t=[t]);var s=0;if(t.length===i)for(e=0;e<i;e++)n[s=2*e]=t[e],n[s+1]=t[e];else{var r=t[0];for(e=0;e<i;e++)s=2*e,t.length>s&&(r=t[s]),n[s]=r,t.length>s+1&&(r=t[s+1]),n[s+1]=r}return this},setPoints:function(t,e,i){if(void 0===t&&(t=2),"number"==typeof t){var n,s,r,o=t;if(o<2&&(o=2),t=[],this.horizontal)for(n=0,r=-this.frame.halfWidth,s=this.frame.width/(o-1);n<o;n++)t.push({x:r+n*s,y:0});else for(n=0,r=-this.frame.halfHeight,s=this.frame.height/(o-1);n<o;n++)t.push({x:0,y:r+n*s})}var a=t.length,h=this.points.length;return a<1?console.warn("Rope: Not enough points given"):(1===a&&(t.unshift({x:0,y:0}),a++),h!==a&&this.resizeArrays(a),this.dirty=!0,this.points=t,this.updateUVs(),null!=e&&this.setColors(e),null!=i&&this.setAlphas(i)),this},updateUVs:function(){for(var t=this.uv,e=this.points.length,i=this.frame.u0,n=this.frame.v0,s=this.frame.u1,r=this.frame.v1,o=(s-i)/(e-1),a=(r-n)/(e-1),h=0;h<e;h++){var l,u,d,c,f=4*h;this.horizontal?(this._flipX?(l=s-h*o,d=s-h*o):(l=i+h*o,d=i+h*o),this._flipY?(u=r,c=n):(u=n,c=r)):(this._flipX?(l=i,d=s):(l=s,d=i),this._flipY?(u=r-h*a,c=r-h*a):(u=n+h*a,c=n+h*a)),t[f+0]=l,t[f+1]=u,t[f+2]=d,t[f+3]=c}return this},resizeArrays:function(t){var e=this.colors,i=this.alphas;this.vertices=new Float32Array(4*t),this.uv=new Float32Array(4*t),e=new Uint32Array(2*t),i=new Float32Array(2*t);for(var n=0;n<2*t;n++)e[n]=0xffffff,i[n]=1;return this.colors=e,this.alphas=i,this.dirty=!0,this},updateVertices:function(){var t,e=this._perp,i=this.points,n=this.vertices,s=i.length;if(this.dirty=!1,!(s<1)){for(var r=i[0],o=this.horizontal?this.frame.halfHeight:this.frame.halfWidth,a=0;a<s;a++){var h=i[a],l=4*a;e.x=(t=a<s-1?i[a+1]:h).y-r.y,e.y=-(t.x-r.x);var u=e.length();e.x/=u,e.y/=u,e.x*=o,e.y*=o,n[l]=h.x+e.x,n[l+1]=h.y+e.y,n[l+2]=h.x-e.x,n[l+3]=h.y-e.y,r=h}return this}},setDebug:function(t,e){return this.debugGraphic=t,t||e?e?this.debugCallback=e:this.debugCallback=this.renderDebugVerts:this.debugCallback=null,this}
vendor: 5,007 bytes, line 1
1,renderDebugVerts:function(t,e,i){var n=t.debugGraphic,s=i[0],r=i[1],o=i[2],a=i[3];n.lineBetween(s,r,o,a);for(var h=4;h<e;h+=4){var l=i[h+0],u=i[h+1],d=i[h+2],c=i[h+3];n.lineBetween(s,r,l,u),n.lineBetween(o,a,d,c),n.lineBetween(o,a,l,u),n.lineBetween(l,u,d,c),s=l,r=u,o=d,a=c}},preDestroy:function(){this.anims.destroy(),this.anims=void 0,this.points=null,this.vertices=null,this.uv=null,this.colors=null,this.alphas=null,this.debugCallback=null,this.debugGraphic=null},flipX:{get:function(){return this._flipX},set:function(t){return this._flipX=t,this.updateUVs()}},flipY:{get:function(){return this._flipY},set:function(t){return this._flipY=t,this.updateUVs()}}})},95262(t){t.exports=function(){}},26209(t,e,i){var n=i(25305),s=i(44603),r=i(23568),o=i(35154),a=i(77757);s.register("rope",function(t,e){void 0===t&&(t={});var i=r(t,"key",null),s=r(t,"frame",null),h=r(t,"horizontal",!0),l=o(t,"points",void 0),u=o(t,"colors",void 0),d=o(t,"alphas",void 0),c=new a(this.scene,0,0,i,s,l,h,u,d);return void 0!==e&&(t.add=e),n(this.scene,c,t),c})},96819(t,e,i){var n=i(77757);i(39429).register("rope",function(t,e,i,s,r,o,a,h){return this.displayList.add(new n(this.scene,t,e,i,s,r,o,a,h))})},38745(t,e,i){var n=i(29747),s=n,r=n;s=i(20439),t.exports={renderWebGL:s,renderCanvas:r=i(95262)}},20439(t,e,i){var n=i(91296),s={multiTexturing:!1,smoothPixelArt:!1};t.exports=function(t,e,i,r){var o=i.camera;o.addToRenderList(e);var a=n(e,o,r,!i.useCanvas).calc;e.dirty&&e.updateVertices();var h=e.texture;s.smoothPixelArt=h&&null!==h.smoothPixelArt?h.smoothPixelArt:e.scene.sys.game.config.smoothPixelArt,(e.customRenderNodes.BatchHandler||e.defaultRenderNodes.BatchHandler).batchStrip(i,e,a,e.texture.source[0].glTexture,e.vertices,e.uv,e.colors,e.alphas,e.alpha,e.tintMode,s,e.debugCallback)}},20071(t,e,i){var n=i(71911),s=i(26099),r=i(55403),o=i(87774),a=i(83419),h=i(95540),l=i(31401),u=i(95643),d=i(25479);t.exports=new a({Extends:u,Mixins:[l.BlendMode,l.ComputedSize,l.Depth,l.GetBounds,l.Origin,l.ScrollFactor,l.Transform,l.Visible,d],initialize:function(t,e,i,n,o,a,l){void 0===e&&(e={}),"string"==typeof e&&(e={fragmentKey:e}),void 0===i&&(i=0),void 0===n&&(n=0),void 0===o&&(o=128),void 0===a&&(a=128),u.call(this,t,"Shader");var d=t.sys.renderer;this.textures=[],this.renderNode=new r(d.renderNodes,e),this.setupUniforms=h(e,"setupUniforms",function(){}),e.updateShaderConfig&&(this.renderNode.updateShaderConfig=e.updateShaderConfig),Object.entries(h(e,"initialUniforms",{})).forEach(function(t){this.setUniform(t[0],t[1])},this),this.drawingContext=null,this.glTexture=null,this.renderToTexture=!1,this.texture=null,this.textureCoordinateTopLeft=new s(0,1),this.textureCoordinateTopRight=new s(1,1),this.textureCoordinateBottomLeft=new s(0,0),this.textureCoordinateBottomRight=new s(1,0),this.setTextures(l),this.setPosition(i,n),this.setSize(o,a),this.setOrigin(.5,.5)},getUniform:function(t){return this.renderNode.programManager.uniforms[t]},setUniform:function(t,e){return this.renderNode.programManager.setUniform(t,e),this},setTextures:function(t){void 0===t&&(t=[]),this.textures.length=0;for(var e=0;e<t.length;e++){var i=t[e];"string"==typeof i&&(i=this.scene.textures.get(i)),this.textures.push(i)}return this},setRenderToTexture:function(t){if(this.renderToTexture)return this;var e=this.width,i=this.height,s=this.scene.sys.renderer,r=this.scene,a=new n(0,0,e,i).setScene(r.game.scene.systemScene,!1);return this.drawingContext=new o(s,{width:e,height:i,camera:a}),this.glTexture=this.drawingContext.texture,t&&(this.texture=r.sys.textures.addGLTexture(t,this.glTexture)),this.renderToTexture=!0,this.renderWebGLStep(s,this,this.drawingContext),this},renderImmediate:function(){return this.renderWebGLStep(this.scene.renderer,this,this.drawingContext),this},setupUniforms:function(t,e){},setAlpha:function(){return this},setTextureCoordinates:function(t,e,i,n,s,r,o,a){return void 0===t&&(t=0),void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=1),void 0===s&&(s=0),void 0===r&&(r=0),void 0===o&&(o=1),void 0===a&&(a=0),this.textureCoordinateTopLeft.set(t,e),this.textureCoordinateTopRight.set(i,n),this.textureCoordinateBottomLeft.set(s,r),this.textureCoordinateBottomRight.set(o,a),this},setTextureCoordinatesFromFrame:function(t,e){"string"==typeof t&&(e?"string"==typeof e&&(e=this.scene.textures.get(e)):e=this.textures[0],t=e.get(t));var i=t.u0,n=t.v0,s=t.u1,r=t.v1;this.setTextureCoordinates(i,n,s,n,i,r,s,r)},preDestroy:function(){this.renderNode=null,this.textures.length=0,this.drawingContext&&(this.drawingContext.destroy(),this.texture&&this.texture.destroy(),this.drawingContext=null,this.glTexture=null,this.texture=null)}})},80464(t){t.exports=function(){}},54935(t,e,i){var n=i(25305),s=i(44603),r=i(23568),o=i(20071);s.register("shader",function(t,e){void 0===t&&(t={});var i=r(t,"config",null),s=r(t,"x",0),a=r(t,"y",0),h=r(t,"width",128),l=r(t,"height",128),u=new o(this.scene,i,s,a,h,l);return void 0!==e&&(t.add=e),n(this.scene,u,t),u})},74177(t,e,i){var n=i(20071);
1i(39429).register("shader",function(t,e,i,s,r,o){return this.displayList.add(new n(this.scene,t,e,i,s,r,o))})},25479(t,e,i){var n=i(29747),s=n,r=n;s=i(19257),t.exports={renderWebGL:s,renderCanvas:r=i(80464)}},19257(t){t.exports=function(t,e,i,n){if(i.camera.addToRenderList(e),e.renderToTexture){if((i=e.drawingContext).width!==e.width||i.height!==e.height){var s=e.width,r=e.height;i.resize(s,r),i.camera.setSize(s,r)}i.use()}e.renderNode.run(i,e,n),e.renderToTexture&&i.release()}},10441(t,e,i){var n=i(70554);t.exports=function(t,e,i,s,r,o,a){var h,l,u,d,c,f=n.getTintAppendFloatAlpha(s.fillColor,s.fillAlpha*r),p=s.pathData,g=s.pathIndexes,m=p.length,v=Array(2*m),x=Array(m),y=0,T=0;for(h=0;h<m;h+=2)l=p[h]-o,u=p[h+1]-a,d=i.getX(l,u),c=i.getY(l,u),v[y++]=d,v[y++]=c,x[T++]=f;e.batch(t,g,v,x,s.lighting)}},65960(t){t.exports=function(t,e,i,n){var s=i||e.fillColor;t.fillStyle="rgba("+((0xff0000&s)>>>16)+","+((65280&s)>>>8)+","+(255&s)+","+(n||e.fillAlpha)+")"}},75177(t){t.exports=function(t,e,i,n){var s=i||e.strokeColor;t.strokeStyle="rgba("+((0xff0000&s)>>>16)+","+((65280&s)>>>8)+","+(255&s)+","+(n||e.strokeAlpha)+")",t.lineWidth=e.lineWidth}},17803(t,e,i){var n=i(87891),s=i(83419),r=i(31401),o=i(95643),a=i(23031);t.exports=new s({Extends:o,Mixins:[r.AlphaSingle,r.BlendMode,r.Depth,r.GetBounds,r.Lighting,r.Mask,r.Origin,r.RenderNodes,r.ScrollFactor,r.Transform,r.Visible],initialize:function(t,e,i){void 0===e&&(e="Shape"),o.call(this,t,e),this.geom=i,this.pathData=[],this.pathIndexes=[],this.fillColor=0xffffff,this.fillAlpha=1,this.strokeColor=0xffffff,this.strokeAlpha=1,this.lineWidth=1,this.isFilled=!1,this.isStroked=!1,this.closePath=!0,this._tempLine=new a,this.width=0,this.height=0,this.enableFilters&&(this.filtersFocusContext=!0),this.initRenderNodes(this._defaultRenderNodesMap)},_defaultRenderNodesMap:{get:function(){return n}},setFillStyle:function(t,e){return void 0===e&&(e=1),void 0===t?this.isFilled=!1:(this.fillColor=t,this.fillAlpha=e,this.isFilled=!0),this},setStrokeStyle:function(t,e,i){return void 0===i&&(i=1),void 0===t?this.isStroked=!1:(this.lineWidth=t,this.strokeColor=e,this.strokeAlpha=i,this.isStroked=!0),this},setClosePath:function(t){return this.closePath=t,this},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this},preDestroy:function(){this.geom=null,this._tempLine=null,this.pathData=[],this.pathIndexes=[]},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}}})},34682(t,e,i){var n=i(70554);t.exports=function(t,e,i,s,r,o,a){var h=n.getTintAppendFloatAlpha(s.strokeColor,s.strokeAlpha*r),l=s.pathData,u=l.length-1,d=s.lineWidth,c=!s.closePath,f=s.customRenderNodes.StrokePath||s.defaultRenderNodes.StrokePath,p=[];c&&(u-=2);for(var g=0;g<u;g+=2){var m=l[g]-o,v=l[g+1]-a;g>0&&m===l[g-2]&&v===l[g-1]||p.push({x:m,y:v,width:d})}f.run(t,e,p,d,c,i,h,h,h,h,void 0,s.lighting)}},23629(t,e,i){var n=i(13609),s=i(83419),r=i(39506),o=i(94811),a=i(96503),h=i(36383),l=i(17803);t.exports=new s({Extends:l,Mixins:[n],initialize:function(t,e,i,n,s,r,o,h,u){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=128),void 0===s&&(s=0),void 0===r&&(r=360),void 0===o&&(o=!1),l.call(this,t,"Arc",new a(0,0,n)),this._startAngle=s,this._endAngle=r,this._anticlockwise=o,this._iterations=.01,this.setPosition(e,i);var d=2*this.geom.radius;this.setSize(d,d),void 0!==h&&this.setFillStyle(h,u),this.updateDisplayOrigin(),this.updateData()},iterations:{get:function(){return this._iterations},set:function(t){this._iterations=t,this.updateData()}},radius:{get:function(){return this.geom.radius},set:function(t){this.geom.radius=t;var e=2*t;this.setSize(e,e),this.updateDisplayOrigin(),this.updateData()}},startAngle:{get:function(){return this._startAngle},set:function(t){this._startAngle=t,this.updateData()}},endAngle:{get:function(){return this._endAngle},set:function(t){this._endAngle=t,this.updateData()}},anticlockwise:{get:function(){return this._anticlockwise},set:function(t){this._anticlockwise=t,this.updateData()}},setRadius:function(t){return this.radius=t,this},setIterations:function(t){return void 0===t&&(t=.01),this.iterations=t,this},setStartAngle:function(t,e){return this._startAngle=t,void 0!==e&&(this._anticlockwise=e),this.updateData()},setEndAngle:function(t,e){return this._endAngle=t,void 0!==e&&(this._anticlockwise=e),this.updateData()},updateData:function(){var t,e=this._iterations,i=e,n=this.geom.radius,s=r(this._startAngle),a=r(this._endAngle),l=this._anticlockwise;a-=s,l?a<-h.TAU?a=-h.TAU:a>0&&(a=-h.TAU+a%h.TAU):a>h.TAU?a=h.TAU:a<0&&(a=h.TAU+a%h.TAU);for(var u=[n+Math.cos(s)*n,n+Math.sin(s)*n];i<1;)t=a*i+s,u.push(n+Math.cos(t)*n,n+Math.sin(t)*n),i+=e;return t=a+s,u.push(n+Math.cos(t)*n,n+Math.sin(t)*n),u.push(n+Math.cos(s)*n,n+Math.sin(s)*n),this.pathIndexes=o(u),this.pathData=u,this}})},42542(t,e,i){var n=i(39506),s=i(65960),r=i(75177),o=i(20926);
vendor: 4,234 bytes, line 1
1t.exports=function(t,e,i,a){i.addToRenderList(e);var h=t.currentContext;if(o(t,h,e,i,a)){var l=e.radius;h.beginPath(),h.arc(l-e.originX*(2*l),l-e.originY*(2*l),l,n(e._startAngle),n(e._endAngle),e.anticlockwise),e.closePath&&h.closePath(),e.isFilled&&(s(h,e),h.fill()),e.isStroked&&(r(h,e),h.stroke()),h.restore()}}},42563(t,e,i){var n=i(23629),s=i(39429);s.register("arc",function(t,e,i,s,r,o,a,h){return this.displayList.add(new n(this.scene,t,e,i,s,r,o,a,h))}),s.register("circle",function(t,e,i,s,r){return this.displayList.add(new n(this.scene,t,e,i,0,360,!1,s,r))})},13609(t,e,i){var n=i(29747),s=n,r=n;s=i(41447),t.exports={renderWebGL:s,renderCanvas:r=i(42542)}},41447(t,e,i){var n=i(91296),s=i(10441),r=i(34682);t.exports=function(t,e,i,o){var a=i.camera;a.addToRenderList(e);var h=n(e,a,o,!i.useCanvas).calc,l=e._displayOriginX,u=e._displayOriginY,d=e.alpha,c=e.customRenderNodes.Submitter||e.defaultRenderNodes.Submitter;e.isFilled&&s(i,c,h,e,d,l,u),e.isStroked&&r(i,c,h,e,d,l,u)}},89(t,e,i){var n=i(83419),s=i(33141),r=i(94811),o=i(87841),a=i(17803);t.exports=new n({Extends:a,Mixins:[s],initialize:function(t,e,i,n,s,r){void 0===e&&(e=0),void 0===i&&(i=0),a.call(this,t,"Curve",n),this._smoothness=32,this._curveBounds=new o,this.closePath=!1,this.setPosition(e,i),void 0!==s&&this.setFillStyle(s,r),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(t){this._smoothness=t,this.updateData()}},setSmoothness:function(t){return this._smoothness=t,this.updateData()},updateData:function(){var t=this._curveBounds,e=this._smoothness;this.geom.getBounds(t,e),this.setSize(t.width,t.height),this.updateDisplayOrigin();for(var i=[],n=this.geom.getPoints(e),s=0;s<n.length;s++)i.push(n[s].x,n[s].y);return i.push(n[0].x,n[0].y),this.pathIndexes=r(i),this.pathData=i,this}})},3170(t,e,i){var n=i(65960),s=i(75177),r=i(20926);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.currentContext;if(r(t,a,e,i,o)){var h=e._displayOriginX+e._curveBounds.x,l=e._displayOriginY+e._curveBounds.y,u=e.pathData,d=u.length-1,c=u[0]-h,f=u[1]-l;a.beginPath(),a.moveTo(c,f),e.closePath||(d-=2);for(var p=2;p<d;p+=2){var g=u[p]-h,m=u[p+1]-l;a.lineTo(g,m)}e.closePath&&a.closePath(),e.isFilled&&(n(a,e),a.fill()),e.isStroked&&(s(a,e),a.stroke()),a.restore()}}},40511(t,e,i){var n=i(39429),s=i(89);n.register("curve",function(t,e,i,n,r){return this.displayList.add(new s(this.scene,t,e,i,n,r))})},33141(t,e,i){var n=i(29747),s=n,r=n;s=i(53987),t.exports={renderWebGL:s,renderCanvas:r=i(3170)}},53987(t,e,i){var n=i(10441),s=i(91296),r=i(34682);t.exports=function(t,e,i,o){var a=i.camera;a.addToRenderList(e);var h=s(e,a,o,!i.useCanvas).calc,l=e._displayOriginX+e._curveBounds.x,u=e._displayOriginY+e._curveBounds.y,d=e.alpha,c=e.customRenderNodes.Submitter||e.defaultRenderNodes.Submitter;e.isFilled&&n(i,c,h,e,d,l,u),e.isStroked&&r(i,c,h,e,d,l,u)}},19921(t,e,i){var n=i(83419),s=i(94811),r=i(54205),o=i(8497),a=i(17803);t.exports=new n({Extends:a,Mixins:[r],initialize:function(t,e,i,n,s,r,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=128),void 0===s&&(s=128),a.call(this,t,"Ellipse",new o(n/2,s/2,n,s)),this._smoothness=64,this.setPosition(e,i),this.width=n,this.height=s,void 0!==r&&this.setFillStyle(r,h),this.updateDisplayOrigin(),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(t){this._smoothness=t,this.updateData()}},setSize:function(t,e){return this.width=t,this.height=e,this.geom.setPosition(t/2,e/2),this.geom.setSize(t,e),this.updateDisplayOrigin(),this.updateData()},setSmoothness:function(t){return this._smoothness=t,this.updateData()},updateData:function(){for(var t=[],e=this.geom.getPoints(this._smoothness),i=0;i<e.length;i++)t.push(e[i].x,e[i].y);return t.push(e[0].x,e[0].y),this.pathIndexes=s(t),this.pathData=t,this}})},7930(t,e,i){var n=i(65960),s=i(75177),r=i(20926);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.currentContext;if(r(t,a,e,i,o)){var h=e._displayOriginX,l=e._displayOriginY,u=e.pathData,d=u.length-1,c=u[0]-h,f=u[1]-l;a.beginPath(),a.moveTo(c,f),e.closePath||(d-=2);for(var p=2;p<d;p+=2){var g=u[p]-h,m=u[p+1]-l;a.lineTo(g,m)}a.closePath(),e.isFilled&&(n(a,e),a.fill()),e.isStroked&&(s(a,e),a.stroke()),a.restore(
1)}}},1543(t,e,i){var n=i(19921);i(39429).register("ellipse",function(t,e,i,s,r,o){return this.displayList.add(new n(this.scene,t,e,i,s,r,o))})},54205(t,e,i){var n=i(29747),s=n,r=n;s=i(19467),t.exports={renderWebGL:s,renderCanvas:r=i(7930)}},19467(t,e,i){var n=i(10441),s=i(91296),r=i(34682);t.exports=function(t,e,i,o){var a=i.camera;a.addToRenderList(e);var h=s(e,a,o,!i.useCanvas).calc,l=e._displayOriginX,u=e._displayOriginY,d=e.alpha,c=e.customRenderNodes.Submitter||e.defaultRenderNodes.Submitter;e.isFilled&&n(i,c,h,e,d,l,u),e.isStroked&&r(i,c,h,e,d,l,u)}},30479(t,e,i){var n=i(83419),s=i(17803);t.exports=new n({Extends:s,Mixins:[i(26015)],initialize:function(t,e,i,n,r,o,a,h,l,u,d){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=128),void 0===r&&(r=128),void 0===o&&(o=32),void 0===a&&(a=32),s.call(this,t,"Grid",null),this.cellWidth=o,this.cellHeight=a,this.showAltCells=!1,this.altFillColor,this.altFillAlpha,this.cellPadding=.5,this.strokeOutside=!1,this.strokeOutsideIncomplete=!0,this.setPosition(e,i),this.setSize(n,r),this.setFillStyle(h,l),void 0!==u&&this.setStrokeStyle(1,u,d),this.updateDisplayOrigin()},setAltFillStyle:function(t,e){return void 0===e&&(e=1),void 0===t?this.showAltCells=!1:(this.altFillColor=t,this.altFillAlpha=e,this.showAltCells=!0),this},setCellPadding:function(t){return this.cellPadding=t||0,this},setStrokeOutside:function(t,e){return this.strokeOutside=t,void 0!==e&&(this.strokeOutsideIncomplete=e),this}})},49912(t,e,i){var n=i(65960),s=i(75177),r=i(20926);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.currentContext;if(r(t,a,e,i,o)){var h=-e._displayOriginX,l=-e._displayOriginY,u=i.alpha*e.alpha,d=e.width,c=e.height,f=e.cellWidth,p=e.cellHeight,g=Math.ceil(d/f),m=Math.ceil(c/p),v=f,x=p,y=f-(g*f-d),T=p-(m*p-c),w=e.isFilled,b=e.showAltCells,S=e.isStroked,C=e.cellPadding,E=e.lineWidth/2,A=0,_=0,M=0,R=0,O=0;if(C&&(v-=2*C,x-=2*C,y-=2*C,T-=2*C),w&&e.fillAlpha>0)for(n(a,e),_=0;_<m;_++)for(b&&(M=_%2),A=0;A<g;A++){if(b&&M){M=0;continue}M++,R=A<g-1?v:y,O=_<m-1?x:T,R>0&&O>0&&a.fillRect(h+A*f+C,l+_*p+C,R,O)}if(b&&e.altFillAlpha>0)for(n(a,e,e.altFillColor,e.altFillAlpha*u),_=0;_<m;_++)for(b&&(M=_%2),A=0;A<g;A++){if(b&&!M){M=1;continue}M=0,R=A<g-1?v:y,O=_<m-1?x:T,R>0&&O>0&&a.fillRect(h+A*f+C,l+_*p+C,R,O)}if(S&&e.strokeAlpha>0){s(a,e,e.strokeColor,e.strokeAlpha*u);var P=+!e.strokeOutside;for(A=P;A<g;A++){var L=A*f;a.beginPath(),a.moveTo(L+h,l),a.lineTo(L+h,c+l),a.stroke()}for(_=P;_<m;_++){var D=_*p;a.beginPath(),a.moveTo(h,D+l),a.lineTo(h+d,D+l),a.stroke()}e.strokeOutside&&(d>E&&(a.beginPath(),a.moveTo(d+h,l),a.lineTo(d+h,c+l),a.stroke()),c>E&&(a.beginPath(),a.moveTo(h,c+l),a.lineTo(d+h,c+l),a.stroke()))}a.restore()}}},34137(t,e,i){var n=i(39429),s=i(30479);n.register("grid",function(t,e,i,n,r,o,a,h,l,u){return this.displayList.add(new s(this.scene,t,e,i,n,r,o,a,h,l,u))})},26015(t,e,i){var n=i(29747),s=n,r=n;s=i(46161),t.exports={renderWebGL:s,renderCanvas:r=i(49912)}},46161(t,e,i){var n=i(91296),s=i(70554);t.exports=function(t,e,i,r){var o,a=i.camera;a.addToRenderList(e);var h=e.customRenderNodes.FillRect||e.defaultRenderNodes.FillRect,l=e.customRenderNodes.Submitter||e.defaultRenderNodes.Submitter,u=n(e,a,r,!i.useCanvas).calc;u.translate(-e._displayOriginX,-e._displayOriginY);var d=e.alpha,c=e.width,f=e.height,p=e.cellWidth,g=e.cellHeight,m=Math.ceil(c/p),v=Math.ceil(f/g),x=p,y=g,T=p-(m*p-c),w=g-(v*g-f),b=e.isFilled,S=e.showAltCells,C=e.isStroked,E=e.cellPadding,A=e.lineWidth,_=A/2,M=0,R=0,O=0,P=0,L=0;if(E&&(x-=2*E,y-=2*E,T-=2*E,w-=2*E),b&&e.fillAlpha>0)for(R=0,o=s.getTintAppendFloatAlpha(e.fillColor,e.fillAlpha*d);R<v;R++)for(S&&(O=R%2),M=0;M<m;M++){if(S&&O){O=0;continue}O++,P=M<m-1?x:T,L=R<v-1?y:w,P>0&&L>0&&h.run(i,u,l,M*p+E,R*g+E,P,L,o,o,o,o,e.lighting)}if(S&&e.altFillAlpha>0)for(R=0,o=s.getTintAppendFloatAlpha(e.altFillColor,e.altFillAlpha*d);R<v;R++)for(S&&(O=R%2),M=0;M<m;M++){if(S&&!O){O=1;continue}O=0,P=M<m-1?x:T,L=R<v-1?y:w,P>0&&L>0&&h.run(i,u,l,M*p+E,R*g+E,P,L,o,o,o,o)}if(C&&e.strokeAlpha>0){var D=s.getTintAppendFloatAlpha(e.strokeColor,e.strokeAlpha*d),F=+!e.strokeOutside;for(M=F;M<m;M++){var I=M*p-_;h.run(i,u,l,I,0,A,f,D,D,D,D)}for(R=F;R<v;
vendor: 1,792 bytes, line 1
1R++){var N=R*g-_;h.run(i,u,l,0,N,c,A,D,D,D,D)}e.strokeOutside&&e.strokeOutsideIncomplete&&(c>_&&h.run(i,u,l,c-_,0,A,f,D,D,D,D),f>_&&h.run(i,u,l,0,f-_,c,A,D,D,D,D))}}},61475(t,e,i){var n=i(99651),s=i(83419),r=i(17803);t.exports=new s({Extends:r,Mixins:[n],initialize:function(t,e,i,n,s,o,a,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=48),void 0===s&&(s=32),void 0===o&&(o=0xeeeeee),void 0===a&&(a=0x999999),void 0===h&&(h=0xcccccc),r.call(this,t,"IsoBox",null),this.projection=4,this.fillTop=o,this.fillLeft=a,this.fillRight=h,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isFilled=!0,this.setPosition(e,i),this.setSize(n,s),this.updateDisplayOrigin()},setProjection:function(t){return this.projection=t,this},setFaces:function(t,e,i){return void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===i&&(i=!0),this.showTop=t,this.showLeft=e,this.showRight=i,this},setFillStyle:function(t,e,i){return this.fillTop=t,this.fillLeft=e,this.fillRight=i,this.isFilled=!0,this}})},11508(t,e,i){var n=i(65960),s=i(20926);t.exports=function(t,e,i,r){i.addToRenderList(e);var o=t.currentContext;if(s(t,o,e,i,r)&&e.isFilled){var a=e.width,h=e.height,l=a/2,u=a/e.projection;e.showTop&&(n(o,e,e.fillTop),o.beginPath(),o.moveTo(-l,-h),o.lineTo(0,-u-h),o.lineTo(l,-h),o.lineTo(l,-1),o.lineTo(0,u-1),o.lineTo(-l,-1),o.lineTo(-l,-h),o.fill()),e.showLeft&&(n(o,e,e.fillLeft),o.beginPath(),o.moveTo(-l,0),o.lineTo(0,u),o.lineTo(0,u-h),o.lineTo(-l,-h),o.lineTo(-l,0),o.fill()),e.showRight&&(n(o,e,e.fillRight),o.beginPath(),o.moveTo(l,0),o.lineTo(0,u),o.lineTo(0,u-h),o.lineTo(l,-h),o.lineTo(l,0),o.fill()),o.restore()}}},3933(t,e,i){var n=i(39429),s=i(61475);n.register("isobox",function(t,e,i,n,r,o,a){return this.displayList.add(new s(this.scene,t,e,i,n,r,o,a))})},99651(t,e,i){var n=i(29747),s=n,r=n;
1s=i(68149),t.exports={renderWebGL:s,renderCanvas:r=i(11508)}},68149(t,e,i){var n=i(91296),s=i(70554);t.exports=function(t,e,i,r){if(e.isFilled){var o,a,h,l,u,d,c,f,p,g=i.camera;g.addToRenderList(e);var m=e.customRenderNodes.FillTri||e.defaultRenderNodes.FillTri,v=e.customRenderNodes.Submitter||e.defaultRenderNodes.Submitter,x=n(e,g,r,!i.useCanvas).calc,y=e.width,T=e.height,w=y/2,b=y/e.projection,S=e.alpha,C=e.lighting;e.showTop&&(o=s.getTintAppendFloatAlpha(e.fillTop,S),a=-w,h=-T,l=0,u=-b-T,d=w,c=-T,f=0,p=b-T,m.run(i,x,v,a,h,l,u,d,c,o,o,o,C),m.run(i,x,v,d,c,f,p,a,h,o,o,o,C)),e.showLeft&&(o=s.getTintAppendFloatAlpha(e.fillLeft,S),a=-w,h=0,l=0,u=b,d=0,c=b-T,f=-w,p=-T,m.run(i,x,v,a,h,l,u,d,c,o,o,o,C),m.run(i,x,v,d,c,f,p,a,h,o,o,o,C)),e.showRight&&(o=s.getTintAppendFloatAlpha(e.fillRight,S),a=w,h=0,l=0,u=b,d=0,c=b-T,f=w,p=-T,m.run(i,x,v,a,h,l,u,d,c,o,o,o,C),m.run(i,x,v,d,c,f,p,a,h,o,o,o,C))}}},16933(t,e,i){var n=i(83419),s=i(60561),r=i(17803);t.exports=new n({Extends:r,Mixins:[s],initialize:function(t,e,i,n,s,o,a,h,l){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=48),void 0===s&&(s=32),void 0===o&&(o=!1),void 0===a&&(a=0xeeeeee),void 0===h&&(h=0x999999),void 0===l&&(l=0xcccccc),r.call(this,t,"IsoTriangle",null),this.projection=4,this.fillTop=a,this.fillLeft=h,this.fillRight=l,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isReversed=o,this.isFilled=!0,this.setPosition(e,i),this.setSize(n,s),this.updateDisplayOrigin()},setProjection:function(t){return this.projection=t,this},setReversed:function(t){return this.isReversed=t,this},setFaces:function(t,e,i){return void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===i&&(i=!0),this.showTop=t,this.showLeft=e,this.showRight=i,this},setFillStyle:function(t,e,i){return this.fillTop=t,this.fillLeft=e,this.fillRight=i,this.isFilled=!0,this}})},79590(t,e,i){var n=i(65960),s=i(20926);t.exports=function(t,e,i,r){i.addToRenderList(e);var o=t.currentContext;if(s(t,o,e,i,r)&&e.isFilled){var a=e.width,h=e.height,l=a/2,u=a/e.projection,d=e.isReversed;e.showTop&&d&&(n(o,e,e.fillTop),o.beginPath(),o.moveTo(-l,-h),o.lineTo(0,-u-h),o.lineTo(l,-h),o.lineTo(0,u-h),o.fill()),e.showLeft&&(n(o,e,e.fillLeft),o.beginPath(),d?o.moveTo(-l,-h):o.moveTo(-l,0),o.lineTo(0,u),o.lineTo(0,u-h),o.fill()),e.showRight&&(n(o,e,e.fillRight),o.beginPath(),d?o.moveTo(l,-h):o.moveTo(l,0),o.lineTo(0,u),o.lineTo(0,u-h),o.fill()),o.restore()}}},49803(t,e,i){var n=i(39429),s=i(16933);n.register("isotriangle",function(t,e,i,n,r,o,a,h){return this.displayList.add(new s(this.scene,t,e,i,n,r,o,a,h))})},60561(t,e,i){var n=i(29747),s=n,r=n;s=i(51503),t.exports={renderWebGL:s,renderCanvas:r=i(79590)}},51503(t,e,i){var n=i(91296),s=i(70554);t.exports=function(t,e,i,r){if(e.isFilled){var o,a,h,l,u,d,c,f=i.camera;f.addToRenderList(e);var p=e.customRenderNodes.FillTri||e.defaultRenderNodes.FillTri,g=e.customRenderNodes.Submitter||e.defaultRenderNodes.Submitter,m=n(e,f,r,!i.useCanvas).calc,v=e.width,x=e.height,y=v/2,T=v/e.projection,w=e.isReversed,b=e.alpha,S=e.lighting;if(e.showTop&&w){o=s.getTintAppendFloatAlpha(e.fillTop,b),a=-y,h=-x,l=0,u=-T-x,d=y,c=-x;var C=T-x;p.run(i,m,g,a,h,l,u,d,c,o,o,o,S),p.run(i,m,g,d,c,0,C,a,h,o,o,o,S)}e.showLeft&&(o=s.getTintAppendFloatAlpha(e.fillLeft,b),w?(a=-y,h=-x):(a=-y,h=0),l=0,u=T,d=0,c=T-x,p.run(i,m,g,a,h,l,u,d,c,o,o,o,S)),e.showRight&&(o=s.getTintAppendFloatAlpha(e.fillRight,b),w?(a=y,h=-x):(a=y,h=0),l=0,u=T,d=0,c=T-x,p.run(i,m,g,a,h,l,u,d,c,o,o,o,S))}}},57847(t,e,i){var n=i(83419),s=i(17803),r=i(23031);t.exports=new n({Extends:s,Mixins:[i(36823)],initialize:function(t,e,i,n,o,a,h,l,u){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===o&&(o=0),void 0===a&&(a=128),void 0===h&&(h=0),s.call(this,t,"Line",new r(n,o,a,h));var d=Math.max(1,this.geom.right-this.geom.left),c=Math.max(1,this.geom.bottom-this.geom.top);this.lineWidth=1,this._startWidth=1,this._endWidth=1,this.setPosition(e,i),this.setSize(d,c),void 0!==l&&this.setStrokeStyle(1,l,u),this.updateDisplayOrigin()},setLineWidth:function(t,e){return void 0===e&&(e=t),this._startWidth=t,this._endWidth=e,this.lineWidth=t,this}
vendor: 3,009 bytes, line 1
1,setTo:function(t,e,i,n){return this.geom.setTo(t,e,i,n),this}})},17440(t,e,i){var n=i(75177),s=i(20926);t.exports=function(t,e,i,r){i.addToRenderList(e);var o=t.currentContext;if(s(t,o,e,i,r)){var a=e._displayOriginX,h=e._displayOriginY;e.isStroked&&(n(o,e),o.beginPath(),o.moveTo(e.geom.x1-a,e.geom.y1-h),o.lineTo(e.geom.x2-a,e.geom.y2-h),o.stroke()),o.restore()}}},2481(t,e,i){var n=i(39429),s=i(57847);n.register("line",function(t,e,i,n,r,o,a,h){return this.displayList.add(new s(this.scene,t,e,i,n,r,o,a,h))})},36823(t,e,i){var n=i(29747),s=n,r=n;s=i(77385),t.exports={renderWebGL:s,renderCanvas:r=i(17440)}},77385(t,e,i){var n=i(91296),s=i(70554),r=[{x:0,y:0,width:0},{x:0,y:0,width:0}];t.exports=function(t,e,i,o){var a=i.camera;a.addToRenderList(e);var h=n(e,a,o,!i.useCanvas).calc,l=e._displayOriginX,u=e._displayOriginY,d=e.alpha;if(e.isStroked){var c=s.getTintAppendFloatAlpha(e.strokeColor,e.strokeAlpha*d);r[0].x=e.geom.x1-l,r[0].y=e.geom.y1-u,r[0].width=e._startWidth,r[1].x=e.geom.x2-l,r[1].y=e.geom.y2-u,r[1].width=e._endWidth,(e.customRenderNodes.StrokePath||e.defaultRenderNodes.StrokePath).run(i,e.customRenderNodes.Submitter||e.defaultRenderNodes.Submitter,r,1,!0,h,c,c,c,c,void 0,e.lighting)}}},24949(t,e,i){var n=i(90273),s=i(83419),r=i(94811),o=i(13829),a=i(25717),h=i(17803),l=i(5469);t.exports=new s({Extends:h,Mixins:[n],initialize:function(t,e,i,n,s,r){void 0===e&&(e=0),void 0===i&&(i=0),h.call(this,t,"Polygon",new a(n));var l=o(this.geom);this.setPosition(e,i),this.setSize(l.width,l.height),void 0!==s&&this.setFillStyle(s,r),this.updateDisplayOrigin(),this.updateData()},smooth:function(t){void 0===t&&(t=1);for(var e=0;e<t;e++)l(this.geom);return this.updateData()},setTo:function(t){this.geom.setTo(t);var e=o(this.geom);return this.setSize(e.width,e.height),this.updateDisplayOrigin(),this.updateData()},updateData:function(){for(var t=[],e=this.geom.points,i=0;i<e.length;i++)t.push(e[i].x,e[i].y);return t.push(e[0].x,e[0].y),this.pathIndexes=r(t),this.pathData=t,this}})},38710(t,e,i){var n=i(65960),s=i(75177),r=i(20926);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.currentContext;if(r(t,a,e,i,o)){var h=e._displayOriginX,l=e._displayOriginY,u=e.pathData,d=u.length-1,c=u[0]-h,f=u[1]-l;a.beginPath(),a.moveTo(c,f),e.closePath||(d-=2);for(var p=2;p<d;p+=2){var g=u[p]-h,m=u[p+1]-l;a.lineTo(g,m)}e.closePath&&a.closePath(),e.isFilled&&(n(a,e),a.fill()),e.isStroked&&(s(a,e),a.stroke()),a.restore()}}},64827(t,e,i){var n=i(39429),s=i(24949);n.register("polygon",function(t,e,i,n,r){return this.displayList.add(new s(this.scene,t,e,i,n,r))})},90273(t,e,i){var n=i(29747),s=n,r=n;s=i(73695),t.exports={renderWebGL:s,renderCanvas:r=i(38710)}},73695(t,e,i){var n=i(10441),s=i(91296),r=i(34682);t.exports=function(t,e,i,o){var a=i.camera;a.addToRenderList(e);var h=s(e,a,o,!i.useCanvas).calc,l=e._displayOriginX,u=e._displayOriginY,d=e.alpha,c=e.customRenderNodes.Submitter||e.defaultRenderNodes.Submitter;e.isFilled&&n(i,c,h,e,d,l,u),e.isStroked&&r(i,c,h,e,d,l,u)}}
1,74561(t,e,i){var n=i(83419),s=i(94811),r=i(87841),o=i(17803);t.exports=new n({Extends:o,Mixins:[i(95597)],initialize:function(t,e,i,n,s,a,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=128),void 0===s&&(s=128),o.call(this,t,"Rectangle",new r(0,0,n,s)),this.radius=20,this.isRounded=!1,this.setPosition(e,i),this.setSize(n,s),void 0!==a&&this.setFillStyle(a,h),this.updateDisplayOrigin(),this.updateData()},setRounded:function(t){return void 0===t&&(t=16),this.radius=t,this.isRounded=t>0,this.updateRoundedData()},setSize:function(t,e){this.width=t,this.height=e,this.geom.setSize(t,e),this.updateData(),this.updateDisplayOrigin();var i=this.input;return i&&!i.customHitArea&&(i.hitArea.width=t,i.hitArea.height=e),this},updateData:function(){if(this.isRounded)return this.updateRoundedData();var t=[],e=this.geom,i=this._tempLine;return e.getLineA(i),t.push(i.x1,i.y1,i.x2,i.y2),e.getLineB(i),t.push(i.x2,i.y2),e.getLineC(i),t.push(i.x2,i.y2),e.getLineD(i),t.push(i.x2,i.y2),this.pathData=t,this},updateRoundedData:function(){var t=[],e=this.width/2,i=this.height/2,n=Math.min(e,i),r=Math.min(this.radius,n),o=Math.max(4,Math.min(16,Math.ceil(r/2)));return this.arcTo(t,e-e+r,i-i+r,r,Math.PI,1.5*Math.PI,o),t.push(e+e-r,i-i),this.arcTo(t,e+e-r,i-i+r,r,1.5*Math.PI,2*Math.PI,o),t.push(e+e,i+i-r),this.arcTo(t,e+e-r,i+i-r,r,0,.5*Math.PI,o),t.push(e-e+r,i+i),this.arcTo(t,e-e+r,i+i-r,r,.5*Math.PI,Math.PI,o),t.push(e-e,i-i+r),this.pathIndexes=s(t),this.pathData=t,this},arcTo:function(t,e,i,n,s,r,o){for(var a=(r-s)/o,h=0;h<=o;h++){var l=s+a*h;t.push(e+Math.cos(l)*n,i+Math.sin(l)*n)}}})},48682(t,e,i){var n=i(65960),s=i(75177),r=i(20926),o=function(t,e,i,n,s,r){var o=Math.min(r,Math.min(n/2,s/2));0===o?t.rect(e,i,n,s):(t.moveTo(e+o,i),t.lineTo(e+n-o,i),t.arcTo(e+n,i,e+n,i+o,o),t.lineTo(e+n,i+s-o),t.arcTo(e+n,i+s,e+n-o,i+s,o),t.lineTo(e+o,i+s),t.arcTo(e,i+s,e,i+s-o,o),t.lineTo(e,i+o),t.arcTo(e,i,e+o,i,o),t.closePath())};t.exports=function(t,e,i,a){i.addToRenderList(e);var h=t.currentContext;if(r(t,h,e,i,a)){var l=e._displayOriginX,u=e._displayOriginY;e.isFilled&&(n(h,e),e.isRounded?(h.beginPath(),o(h,-l,-u,e.width,e.height,e.radius),h.fill()):h.fillRect(-l,-u,e.width,e.height)),e.isStroked&&(s(h,e),h.beginPath(),e.isRounded?o(h,-l,-u,e.width,e.height,e.radius):h.rect(-l,-u,e.width,e.height),h.stroke()),h.restore()}}},87959(t,e,i){var n=i(39429),s=i(74561);n.register("rectangle",function(t,e,i,n,r,o){return this.displayList.add(new s(this.scene,t,e,i,n,r,o))})},95597(t,e,i){var n=i(29747),s=n,r=n;s=i(52059),t.exports={renderWebGL:s,renderCanvas:r=i(48682)}},52059(t,e,i){var n=i(10441),s=i(91296),r=i(34682),o=i(70554);t.exports=function(t,e,i,a){var h=i.camera;h.addToRenderList(e);var l=s(e,h,a,!i.useCanvas).calc,u=e._displayOriginX,d=e._displayOriginY,c=e.alpha,f=e.customRenderNodes,p=e.defaultRenderNodes,g=f.Submitter||p.Submitter;if(e.isRounded&&e.isFilled)n(pipeline,result.calc,e,c,u,d);else if(e.isFilled)if(e.isRounded)n(i,g,l,e,c,u,d);else{var m=o.getTintAppendFloatAlpha(e.fillColor,e.fillAlpha*c);(f.FillRect||p.FillRect).run(i,l,g,-u,-d,e.width,e.height,m,m,m,m,e.lighting)}e.isStroked&&r(i,g,l,e,c,u,d)}},55911(t,e,i){var n=i(81991),s=i(83419),r=i(94811),o=i(17803);t.exports=new s({Extends:o,Mixins:[n],initialize:function(t,e,i,n,s,r,a,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=5),void 0===s&&(s=32),void 0===r&&(r=64),o.call(this,t,"Star",null),this._points=n,this._innerRadius=s,this._outerRadius=r,this.setPosition(e,i),this.setSize(2*r,2*r),void 0!==a&&this.setFillStyle(a,h),this.updateDisplayOrigin(),this.updateData()},setPoints:function(t){return this._points=t,this.updateData()},setInnerRadius:function(t){return this._innerRadius=t,this.updateData()},setOuterRadius:function(t){return this._outerRadius=t,this.updateData()},points:{get:function(){return this._points},set:function(t){this._points=t,this.updateData()}},innerRadius:{get:function(){return this._innerRadius},set:function(t){this._innerRadius=t,this.updateData()}},outerRadius:{get:function(){return this._outerRadius},set:function(t){this._outerRadius=t,this.updateData()}},updateData:function(){var t=[],e=this._points,i=this._innerRadius,n=this._outerRadius,s=Math.PI/2*3,o=Math.PI/e;t.push(n,n+-n);for(var a=0;a<e;a++)t.push(n+Math.cos(s)*n,n+Math.sin(s)*n),s+=o,t.push(n+Math.cos(s)*i,n+Math.sin(s)*i),s+=o;return t.push(n,n+-n),this.pathIndexes=r(t),this.pathData=t,this}})},64272(t,e,i){var n=i(65960),s=i(75177),r=i(20926);
vendor: 27,439 bytes, line 1
1t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.currentContext;if(r(t,a,e,i,o)){var h=e._displayOriginX,l=e._displayOriginY,u=e.pathData,d=u.length-1,c=u[0]-h,f=u[1]-l;a.beginPath(),a.moveTo(c,f),e.closePath||(d-=2);for(var p=2;p<d;p+=2){var g=u[p]-h,m=u[p+1]-l;a.lineTo(g,m)}a.closePath(),e.isFilled&&(n(a,e),a.fill()),e.isStroked&&(s(a,e),a.stroke()),a.restore()}}},93697(t,e,i){var n=i(55911);i(39429).register("star",function(t,e,i,s,r,o,a){return this.displayList.add(new n(this.scene,t,e,i,s,r,o,a))})},81991(t,e,i){var n=i(29747),s=n,r=n;s=i(57017),t.exports={renderWebGL:s,renderCanvas:r=i(64272)}},57017(t,e,i){var n=i(10441),s=i(91296),r=i(34682);t.exports=function(t,e,i,o){var a=i.camera;a.addToRenderList(e);var h=s(e,a,o,!i.useCanvas).calc,l=e._displayOriginX,u=e._displayOriginY,d=e.alpha,c=e.customRenderNodes.Submitter||e.defaultRenderNodes.Submitter;e.isFilled&&n(i,c,h,e,d,l,u),e.isStroked&&r(i,c,h,e,d,l,u)}},36931(t,e,i){var n=i(83419),s=i(17803),r=i(16483);t.exports=new n({Extends:s,Mixins:[i(96195)],initialize:function(t,e,i,n,o,a,h,l,u,d,c){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===o&&(o=128),void 0===a&&(a=64),void 0===h&&(h=0),void 0===l&&(l=128),void 0===u&&(u=128),s.call(this,t,"Triangle",new r(n,o,a,h,l,u));var f=this.geom.right-this.geom.left,p=this.geom.bottom-this.geom.top;this.setPosition(e,i),this.setSize(f,p),void 0!==d&&this.setFillStyle(d,c),this.updateDisplayOrigin(),this.updateData()},setTo:function(t,e,i,n,s,r){return this.geom.setTo(t,e,i,n,s,r),this.updateData()},updateData:function(){var t=[],e=this.geom,i=this._tempLine;return e.getLineA(i),t.push(i.x1,i.y1,i.x2,i.y2),e.getLineB(i),t.push(i.x2,i.y2),e.getLineC(i),t.push(i.x2,i.y2),this.pathData=t,this}})},85172(t,e,i){var n=i(65960),s=i(75177),r=i(20926);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.currentContext;if(r(t,a,e,i,o)){var h=e._displayOriginX,l=e._displayOriginY,u=e.geom.x1-h,d=e.geom.y1-l,c=e.geom.x2-h,f=e.geom.y2-l,p=e.geom.x3-h,g=e.geom.y3-l;a.beginPath(),a.moveTo(u,d),a.lineTo(c,f),a.lineTo(p,g),a.closePath(),e.isFilled&&(n(a,e),a.fill()),e.isStroked&&(s(a,e),a.stroke()),a.restore()}}},45245(t,e,i){var n=i(39429),s=i(36931);n.register("triangle",function(t,e,i,n,r,o,a,h,l,u){return this.displayList.add(new s(this.scene,t,e,i,n,r,o,a,h,l,u))})},96195(t,e,i){var n=i(29747),s=n,r=n;s=i(83253),t.exports={renderWebGL:s,renderCanvas:r=i(85172)}},83253(t,e,i){var n=i(91296),s=i(34682),r=i(70554);t.exports=function(t,e,i,o){var a=i.camera;a.addToRenderList(e);var h=n(e,a,o,!i.useCanvas).calc,l=e._displayOriginX,u=e._displayOriginY,d=e.alpha,c=e.customRenderNodes,f=e.defaultRenderNodes,p=c.Submitter||f.Submitter;if(e.isFilled){var g=r.getTintAppendFloatAlpha(e.fillColor,e.fillAlpha*d),m=e.geom.x1-l,v=e.geom.y1-u,x=e.geom.x2-l,y=e.geom.y2-u,T=e.geom.x3-l,w=e.geom.y3-u;(c.FillTri||f.FillTri).run(i,h,p,m,v,x,y,T,w,g,g,g,e.lighting)}e.isStroked&&s(i,p,h,e,d,l,u)}},68287(t,e,i){var n=i(9674),s=i(40939),r=i(83419),o=i(31401),a=i(95643),h=i(92751);t.exports=new r({Extends:a,Mixins:[o.Alpha,o.BlendMode,o.Depth,o.Flip,o.GetBounds,o.Lighting,o.Mask,o.Origin,o.RenderNodes,o.ScrollFactor,o.Size,o.TextureCrop,o.Tint,o.Transform,o.Visible,h],initialize:function(t,e,i,s,r){a.call(this,t,"Sprite"),this._crop=this.resetCropObject(),this.anims=new n(this),this.setTexture(s,r),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initRenderNodes(this._defaultRenderNodesMap)},_defaultRenderNodesMap:{get:function(){return s}},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(t,e){this.anims.update(t,e)},play:function(t,e){return this.anims.play(t,e)},playReverse:function(t,e){return this.anims.playReverse(t,e)},playAfterDelay:function(t,e){return this.anims.playAfterDelay(t,e)},playAfterRepeat:function(t,e){return this.anims.playAfterRepeat(t,e)},chain:function(t){return this.anims.chain(t)},stop:function(){return this.anims.stop()},stopAfterDelay:function(t){return this.anims.stopAfterDelay(t)},stopAfterRepeat:function(t){return this.anims.stopAfterRepeat(t)},stopOnFrame:function(t){return this.anims.stopOnFrame(t)},toJSON:function(){return o.ToJSON(this)},preDestroy:function(){this.anims.destroy(),this.anims=void 0}})},76552(t){t.exports=function(t,e,i,n){i.addToRenderList(e),t.batchSprite(e,e.frame,i,n)}},15567(t,e,i){var n=i(25305),s=i(13059),r=i(44603),o=i(23568),a=i(68287);r.register("sprite",function(t,e){void 0===t&&(t={});var i=o(t,"key",null),r=o(t,"frame",null),h=new a(this.scene,0,0,i,r);return void 0!==e&&(t.add=e),n(this.scene,h,t),s(h,t),h})},46409(t,e,i){var n=i(39429),s=i(68287);n.register("sprite",function(t,e,i,n){return this.displayList.add(new s(this.scene,t,e,i,n))})},92751(t,e,i){var n=i(29747),s=n,r=n;s=i(9409),t.exports={renderWebGL:s,renderCanvas:r=i(76552)}},9409(t){t.exports=function(t,e,i,n){i.camera.addToRenderList(e);var s=e.customRenderNodes,r=e.defaultRenderNodes;(s.Submitter||r.Submitter).run(i,e,n,0,s.Texturer||r.Texturer,s.Transformer||r.Transformer)}},18207(t){t.exports={None:0,Power0:1,Power1:10,Power2:20,Power3:30,Power4:40,Linear:1,Gravity:2,Quad:10,"Quad.easeOut":10,"Quad.easeIn":11,"Quad.easeInOut":12,Cubic:20,"Cubic.easeOut":20,"Cubic.easeIn":21,"Cubic.easeInOut":22,Quart:30,"Quart.easeOut":30,"Quart.easeIn":31,"Quart.easeInOut":32,Quint:40,"Quint.easeOut":40,"Quint.easeIn":41,"Quint.easeInOut":42,Sine:50,"Sine.easeOut":50,"Sine.easeIn":51,"Sine.easeInOut":52,Expo:60,"Expo.easeOut":60,"Expo.easeIn":61,"Expo.easeInOut":62,Circ:70,"Circ.easeOut":70,"Circ.easeIn":71,"Circ.easeInOut":72,Back:90,"Back.easeOut":90,"Back.easeIn":91,"Back.easeInOut":92,Bounce:100,"Bounce.easeOut":100,"Bounce.easeIn":101,"Bounce.easeInOut":102,Stepped:110,Smoothstep:120,"Smoothstep.easeOut":120,"Smoothstep.easeIn":121,"Smoothstep.easeInOut":122}},68218(t,e,i){for(var n=i(18207),s={},r=Object.keys(n),o=r.length,a=0;a<o;a++){var h=r[a];s[n[h]]=h}t.exports=s},76573(t,e,i){var n=i(83419),s=i(31401),r=i(95643),o=i(53384),a=i(70554),h=i(18207),l=i(68218),u=i(71238),d=a.getTintAppendFloatAlpha;t.exports=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.ElapseTimer,s.Lighting,s.Mask,s.RenderNodes,s.TextureCrop,s.Visible,u],initialize:function(t,e,i){r.call(this,t,"SpriteGPULayer"),this.memberCount=0,this.size=Math.max(i,0),this._segments=24,this.MAX_BUFFER_UPDATE_SEGMENTS_FULL=0xffffff,this.bufferUpdateSegments=0,this.bufferUpdateSegmentSize=Math.ceil(this.size/this._segments),this.gravity=1024,this._animationsEnabled={};for(var n=Object.keys(h),s=n.length,a=0;a<s;a++)this._animationsEnabled[n[a]]=!1;this.EASE=h,this.EASE_CODES=l,this.setTexture(e),this.initRenderNodes(new Phaser.Structs.Map),this.frameDataTexture=null,this.frameDataIndices={},this.frameDataIndicesInv={},this.animationData=[],this.animationDataNames={},this.animationDataIndices={},this.generateFrameDataTexture(),this.submitterNode=new o(t.renderer.renderNodes,{},this),this.defaultRenderNodes.Submitter=this.submitterNode,this.renderNodeData[this.submitterNode.name]={},this.resize(this.size),this.nextMember=new ArrayBuffer(this.getDataByteSize()),this.nextMemberF32=new Float32Array(this.nextMember),this.nextMemberU32=new Uint32Array(this.nextMember)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(t,e){this.updateTimer(t,e)},getDataByteSize:function(){return this.submitterNode.instanceBufferLayout.layout.stride},getShaderFeatures:function(){for(var t=[],e=Object.keys(this._animationsEnabled),i=e.length,n=0;n<i;n++)this._animationsEnabled[e[n]]&&t.push(e[n]);return t},setAnimations:function(t){for(var e=t.length,i=this.texture.getFrameNames(!0).length,n=0;n<e;n++){var s=t[n],r={};s.key?(r.name=s.key,r.duration=s.duration,r.frames=s.frames):(r.name=s.name,r.duration=s.duration,r.frames=s.frames.slice()),r.index=i,r.frameCount=r.frames.length,i+=r.frameCount,this.animationData.push(r),this.animationDataNames[r.name]=r,this.animationDataIndices[r.index]=r}return this.generateFrameDataTexture(),this},generateFrameDataTexture:function(){var t=this.texture,e=t.getFrameNames(!0),i=e.length;this.frameDataIndices={},this.frameDataIndicesInv={};for(var n=0;n<i;n++){var s=e[n],r=t.get(s);this.frameDataIndices[s]=n,this.frameDataIndicesInv[n]=s}var o=this.animationData.length;for(n=0;n<o;n++)for(var a=this.animationData[n],h=a.frameCount,l=0;l<h;l++)e.push(a.frames[l]);var u=3*(i=e.length),d=Math.min(u,4096),c=Math.ceil(u/4096),f=t.manager,p=new ArrayBuffer(d*c*4),g=new Uint16Array(p),m=new Uint8Array(p);for(n=0;n<i;n++){var v=e[n];r="string"==typeof v?t.get(e[n]):v&&void 0!==v.key?f.get(v.key).get(v.frame):v.frame;var x=3*n*g.BYTES_PER_ELEMENT;g[x]=r.cutX,g[x+1]=r.cutY,g[x+2]=r.cutWidth,g[x+3]=r.cutHeight;var y=.5,T=.5;r.customPivot&&(y=r.pivotX,T=r.pivotY),g[x+4]=Math.round((y-.5)*r.cutWidth)+32768,g[x+5]=Math.round((T-.5)*r.cutHeight)+32768}this.frameDataTexture&&this.frameDataTexture.destroy(),this.frameDataTexture=this.scene.renderer.createUint8ArrayTexture(m,d,c,!1,!1)},resize:function(t,e){var i=this.submitterNode.instanceBufferLayout,n=i.buffer,s=n.viewU8,r=t*i.layout.stride;if(this.size=t,n.resize(r),e)this.memberCount=0;else{var o=n.viewU8;o.set(s.subarray(0,Math.min(o.byteLength,r))),this.memberCount=Math.min(this.memberCount,t)}return this.bufferUpdateSegmentSize=Math.ceil(this.size/this._segments),this.setAllSegmentsNeedUpdate(),this},setSegmentNeedsUpdate:function(t){if(!(t<0)&&!(t>=this.size)&&this.bufferUpdateSegments!==this.MAX_BUFFER_UPDATE_SEGMENTS_FULL){var e=Math.floor(t/this.bufferUpdateSegmentSize);this.bufferUpdateSegments|=1<<e}},setAllSegmentsNeedUpdate:function(){this.bufferUpdateSegments=this.MAX_BUFFER_UPDATE_SEGMENTS_FULL},clearAllSegmentsNeedUpdate:function(){this.bufferUpdateSegments=0},addData:function(t){if(this.memberCount>=this.size)return this;var e=this.submitterNode.instanceBufferLayout,i=e.buffer.viewF32,n=this.memberCount*e.layout.stride;return i.set(t,n/i.BYTES_PER_ELEMENT),this.setSegmentNeedsUpdate(this.memberCount),this.memberCount++,this},addMember:function(t){if(this.memberCount>=this.size)return this;var e,i=this.nextMemberF32,n=this.nextMemberU32;t||(t={});var s=this.frame;if(void 0!==t.frame&&(s=t.frame.base?t.frame.base:t.frame),"string"==typeof s&&!(s=this.texture.get(s)))return this;var r=0;this._setAnimatedValue(t.x,r),r+=4,this._setAnimatedValue(t.y,r),r+=4,this._setAnimatedValue(t.rotation,r),r+=4,this._setAnimatedValue(t.scaleX,r,1),r+=4,this._setAnimatedValue(t.scaleY,r,1),r+=4,this._setAnimatedValue(t.alpha,r,1),r+=4;var o=t.animation;if(o)if("string"==typeof o||"number"==typeof o)e="string"==typeof o?this.animationDataNames[o]:this.animationDataIndices[o],this._setAnimatedValue({base:e.index,amplitude:e.frameCount,duration:e.duration,ease:h.Linear,yoyo:!1},r);else{var a=o.base;e="string"==typeof a?this.animationDataNames[a]:"number"==typeof a?this.animationDataIndices[a]:this.animationData[0],this._setAnimatedValue({base:e.index,amplitude:"number"==typeof o.amplitude?o.amplitude:e.frameCount,duration:o.duration||e.duration,delay:o.delay||0,ease:o.ease||h.Linear,yoyo:!!o.yoyo},r)}else{var l=this.frameDataIndices[s.name],u=t.frame;u&&void 0!==u.base?this._setAnimatedValue({base:l,amplitude:u.amplitude,duration:u.duration,delay:u.delay,ease:u.ease,yoyo:u.yoyo},r):this._setAnimatedValue(l,r)}r+=4,this._setAnimatedValue(t.tintBlend,r,1),r+=4;var c=void 0===t.tintBottomLeft?0xffffff:t.tintBottomLeft,f=void 0===t.tintTopLeft?0xffffff:t.tintTopLeft,p=void 0===t.tintBottomRight?0xffffff:t.tintBottomRight,g=void 0===t.tintTopRight?0xffffff:t.tintTopRight,m=void 0===t.alphaBottomLeft?1:t.alphaBottomLeft,v=void 0===t.alphaTopLeft?1:t.alphaTopLeft,x=void 0===t.alphaBottomRight?1:t.alphaBottomRight,y=void 0===t.alphaTopRight?1:t.alphaTopRight;return n[r++]=d(c,m),n[r++]=d(f,v),n[r++]=d(p,x),n[r++]=d(g,y),i[r++]=void 0===t.originX?.5:t.originX,i[r++]=void 0===t.originY?.5:t.originY,i[r++]=t.tintMode||0,i[r++]=void 0===t.creationTime?this.timeElapsed:t.creationTime,i[r++]=void 0===t.scrollFactorX?1:t.scrollFactorX,i[r++]=void 0===t.scrollFactorY?1:t.scrollFactorY,this.addData(this.nextMemberF32),this},editMember:function(t,e){if(t<0||t>=this.memberCount)return this;var i=this.memberCount;return this.memberCount=t,this.addMember(e),this.memberCount=i,this},patchMember:function(t,e,i){if(!(t<0)&&!(t>=this.memberCount)){var n=this.submitterNode.instanceBufferLayout,s=n.buffer,r=t*n.layout.stride,o=s.viewU32,a=r/4;if(i)for(var h=0;h<e.length;h++)i[h]&&(o[a+h]=e[h]);else o.set(e,a);this.setSegmentNeedsUpdate(t)}},getMember:function(t){if(t<0||t>=this.memberCount)return null;var e=this.submitterNode.instanceBufferLayout,i=e.buffer,n=e.layout.stride,s=i.viewF32,r=i.viewU32,o={},a=t*n/s.BYTES_PER_ELEMENT;o.x=this._getAnimatedValue(a),a+=4,o.y=this._getAnimatedValue(a),a+=4,o.rotation=this._getAnimatedValue(a),a+=4,o.scaleX=this._getAnimatedValue(a),a+=4,o.scaleY=this._getAnimatedValue(a),a+=4,o.alpha=this._getAnimatedValue(a),a+=4;var h=this._getAnimatedValue(a);a+=4,"number"!=typeof h&&(h=h.base);var l=this.frameDataIndicesInv[h];if(void 0===l){var u=this.animationDataIndices[h];u&&(o.animation=u.name)}else o.frame=l;return o.tintBlend=this._getAnimatedValue(a),a+=4,o.tintBottomLeft=r[a++],o.tintTopLeft=r[a++],o.tintBottomRight=r[a++],o.tintTopRight=r[a++],o.alphaBottomLeft=(o.tintBottomLeft>>>24)/255,o.alphaTopLeft=(o.tintTopLeft>>>24)/255,o.alphaBottomRight=(o.tintBottomRight>>>24)/255,o.alphaTopRight=(o.tintTopRight>>>24)/255,o.tintBottomLeft&=0xffffff,o.tintTopLeft&=0xffffff,o.tintBottomRight&=0xffffff,o.tintTopRight&=0xffffff,o.originX=s[a++],o.originY=s[a++],o.tintMode=s[a++],o.creationTime=s[a++],o.scrollFactorX=s[a++],o.scrollFactorY=s[a++],o},getMemberData:function(t,e){if(t<0||t>=this.memberCount)return null;var i=this.submitterNode.instanceBufferLayout,n=i.buffer,s=i.layout.stride,r=t*s;e||(e=this.nextMemberU32);var o=n.viewU32,a=o.BYTES_PER_ELEMENT;return e.set(o.subarray(r/a,r/a+s/a)),e},removeMembers:function(t,e){if(t<0||t>=this.memberCount)return this;void 0===e&&(e=1),e=Math.min(e,this.memberCount-t);var i=this.submitterNode.instanceBufferLayout,n=i.layout.stride,s=t*n,r=e*n,o=i.buffer.viewU8;o.set(o.subarray(s+r),s);for(var a=t;a<this.memberCount;a+=this.bufferUpdateSegmentSize)this.setSegmentNeedsUpdate(a);return this.memberCount-=e,this},insertMembers:function(t,e){if(t<0||t>this.memberCount)return this;Array.isArray(e)||(e=[e]);var i=this.memberCount,n=this.submitterNode.instanceBufferLayout,s=n.layout.stride,r=t*s,o=e.length*s;n.buffer.viewU8.copyWithin(r+o,r,i*s),this.memberCount=t;for(var a=0;a<e.length;a++)this.addMember(e[a]);for(this.memberCount=Math.min(this.size,i+e.length),a=t;a<this.memberCount;a+=this.bufferUpdateSegmentSize)this.setSegmentNeedsUpdate(a);return this},insertMembersData:function(t,e){if(t<0||t>this.memberCount)return this;var i=e.length*e.BYTES_PER_ELEMENT,n=this.submitterNode.instanceBufferLayout,s=n.layout.stride,r=t*s;n.buffer.viewU8.copyWithin(r+i,r,this.memberCount*s),n.buffer.viewU32.set(e,r/e.BYTES_PER_ELEMENT),this.memberCount=Math.min(this.size,this.memberCount+i/s);for(var o=t;o<this.memberCount;o+=this.bufferUpdateSegmentSize)this.setSegmentNeedsUpdate(o);return this},_setAnimatedValue:function(t,e,i){var n=this.nextMemberF32;if(void 0===i&&(i=0),"number"==typeof t)n[e++]=t,n[e++]=0,n[e++]=0,n[e]=0;else if(void 0===t)n[e++]=i,n[e++]=0,n[e++]=0,n[e]=0;else{var s=t.base||0,r=t.ease||0,o=t.amplitude||0,a=Math.abs(t.duration||0),l=t.delay||0,u=void 0===t.yoyo||t.yoyo,d=void 0===t.loop||t.loop;"string"==typeof r&&(r=this.EASE[r]||0);var c=this.EASE_CODES[r];if(this._animationsEnabled[c]||this.setAnimationEnabled(c,!0),r===h.Gravity){var f=t.velocity||0,p=t.gravityFactor||1;p>=1?p=0:p<-1&&(p=-.999),o=Math.floor(f)+(p=(p+1)/2)}(l=a>0?l/a%2:0)<0&&(l+=2),l/=2,l+=r,u&&(a=-a),d||(l=-l),n[e++]=s,n[e++]=o,n[e++]=a,n[e]=l}},_getAnimatedValue:function(t){var e=this.submitterNode.instanceBufferLayout.buffer.viewF32,i=e[t++],n=e[t++],s=e[t++],r=e[t];if(0===n||0===s||0===a)return i;r>0||(r=-r);var o=s<0;o&&(s=-s);var a=Math.floor(r);if(r-=a,r=r*s*2%s,a===h.Gravity){var l=Math.floor(n),u=(n-l)*2-1;return 0===u&&(u=1),{base:i,ease:a,duration:s,delay:r,yoyo:o,velocity:l,gravityFactor:u}}return{base:i,ease:a,amplitude:n,duration:s,delay:r,yoyo:o}},setAnimationEnabled:function(t,e){return this._animationsEnabled[t]=!!e,this},preDestroy:function(){this.frameDataTexture.destroy()}})},16193(t,e,i){var n=i(10312),s=i(44603),r=i(23568),o=i(76573);s.register("spriteGPULayer",function(t,e){void 0===t&&(t={});var i=r(t,"key",null),s=r(t,"size",1),a=new o(this.scene,i,s);return void 0!==e&&(t.add=e),a.alpha=r(t,"alpha",1),a.blendMode=r(t,"blendMode",n.NORMAL),a.visible=r(t,"visible",!0),e&&this.scene.sys.displayList.add(a),a})},96019(t,e,i){var n=i(76573);i(39429).register("spriteGPULayer",function(t,e){return this.displayList.add(new n(this.scene,t,e))})},71238(t,e,i){var n=i(29747);t.exports={renderWebGL:i(97591),renderCanvas:n}},97591(t){t.exports=function(t,e,i,n){i.camera.addToRenderList(e);var s=e.customRenderNodes,r=e.defaultRenderNodes;(s.Submitter||r.Submitter).run(i)}},14727(t,e,i){var n=i(78705),s=i(83419),r=i(88571);t.exports=new s({Extends:r,Mixins:[i(74759)],initialize:function(t,e,i,n,s){r.call(this,t,e,i,n,s),this.type="Stamp"},_defaultRenderNodesMap:{get:function(){return n}}})},656(t,e,i){var n=new(i(61340));t.exports=function(t,e,i){i.addToRenderList(e),n.copyFrom(i.matrix),i.matrix.loadIdentity();var s=i.scrollX,r=i.scrollY;i.scrollX=0,i.scrollY=0,t.batchSprite(e,e.frame,i),i.scrollX=s,i.scrollY=r,i.matrix.copyFrom(n)}},31479(t,e,i){var n=i(25305),s=i(44603),r=i(23568),o=i(14727);s.register("stamp",function(t,e){void 0===t&&(t={});var i=r(t,"key",null),s=r(t,"frame",null),a=new o(this.scene,0,0,i,s);return void 0!==e&&(t.add=e),n(this.scene,a,t),a})},85326(t,e,i){var n=i(14727);i(39429).register("stamp",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},74759(t,e,i){var n=i(29747);t.exports={renderCanvas:n=i(656)}},14220(t){t.exports=function(t,e,i){var n=t.canvas,s=t.context,r=t.style,o=[],a=0,h=i.length;r.maxLines>0&&r.maxLines<i.length&&(h=r.maxLines),r.syncFont(n,s);for(var l=t.letterSpacing,u=0;u<h;u++){var d=r.strokeThickness;if(0===l)d+=s.measureText(i[u]).width;else{for(var c=i[u],f=0;f<c.length;f++)d+=s.measureText(c[f]).width;c.length>1&&(d+=l*(c.length-1))}r.wordWrap&&(d-=s.measureText(" ").width),o[u]=Math.ceil(d),a=Math.max(a,o[u])}var p=e.fontSize+r.strokeThickness,g=p*h,m=t.lineSpacing;return h>1&&(g+=m*(h-1)),{width:a,height:g,lines:h,lineWidths:o,lineSpacing:m,lineHeight:p}}},79557(t,e,i){var n=i(27919);t.exports=function(t){var e,i,s=n.create(this),r=s.getContext("2d",{willReadFrequently:!0});t.syncFont(s,r);var o=r.measureText(t.testString);if("actualBoundingBoxAscent"in o){var a=o.actualBoundingBoxAscent,h=o.actualBoundingBoxDescent;return n.remove(s),{ascent:a,descent:h,fontSize:a+h}}var l=Math.ceil(o.width*t.baselineX),u=l,d=2*u;u=u*t.baselineY|0,s.width=l,s.height=d,r.fillStyle="#f00",r.fillRect(0,0,l,d),r.font=t._font,r.textBaseline="alphabetic",r.fillStyle="#000",r.fillText(t.testString,0,u);var c={ascent:0,descent:0,fontSize:0},f=r.getImageData(0,0,l,d);if(!f)return c.ascent=u,c.descent=u+6,c.fontSize=c.ascent+c.descent,n.remove(s),c;var p=f.data,g=p.length,m=4*l,v=0,x=!1;for(e=0;e<u;e++){for(i=0;i<m;i+=4)if(255!==p[v+i]){x=!0;break}if(x)break;v+=m}for(c.ascent=u-e,v=g-m,x=!1,e=d;e>u;e--){for(i=0;i<m;i+=4)if(255!==p[v+i]){x=!0;break}if(x)break;v-=m}return c.descent=e-u,c.fontSize=c.ascent+c.descent,n.remove(s),c}},50171(t,e,i){var n=i(40366),s=i(27919),r=i(40939),o=i(83419),a=i(31401),h=i(95643),l=i(14220),u=i(35154),d=i(35846),c=i(61771),f=i(35762),p=i(45650);t.exports=new o({Extends:h,Mixins:[a.Alpha,a.BlendMode,a.ComputedSize,a.Crop,a.Depth,a.Flip,a.GetBounds,a.Lighting,a.Mask,a.Origin,a.RenderNodes,a.ScrollFactor,a.Tint,a.Transform,a.Visible,c],initialize:function(t,e,i,n,r){void 0===e&&(e=0),void 0===i&&(i=0),h.call(this,t,"Text"),this.renderer=t.sys.renderer,this.setPosition(e,i),this.setOrigin(0,0),this.initRenderNodes(this._defaultRenderNodesMap),this.canvas=s.create(this),this.context,this.style=new f(this,r),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,0===this.style.resolution&&(this.style.resolution=1),this._crop=this.resetCropObject(),this._textureKey=p(),this.texture=t.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(n),r&&r.padding&&this.setPadding(r.padding),r&&r.lineSpacing&&this.setLineSpacing(r.lineSpacing),r&&r.letterSpacing&&this.setLetterSpacing(r.letterSpacing)},_defaultRenderNodesMap:{get:function(){return r}},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",n(this.canvas,this.scene.sys.canvas),this.originX=1},runWordWrap:function(t){var e=this.style;if(e.wordWrapCallback){var i=e.wordWrapCallback.call(e.wordWrapCallbackScope,t,this);return Array.isArray(i)&&(i=i.join("\n")),i}return e.wordWrapWidth?e.wordWrapUseAdvanced?this.advancedWordWrap(t,this.context,this.style.wordWrapWidth):this.basicWordWrap(t,this.context,this.style.wordWrapWidth):t},advancedWordWrap:function(t,e,i){for(var n="",s=t.replace(/ +/gi," ").split(this.splitRegExp),r=s.length,o=0;o<r;o++){var a=s[o],h="",l=(a=a.replace(/^ *|\s*$/gi,"")).length*this.letterSpacing;if(e.measureText(a).width+l<i){n+=a+"\n";continue}for(var u=i,d=a.split(" "),c=0;c<d.length;c++){var f=d[c],p=f+" ",g=p.length*this.letterSpacing,m=e.measureText(p).width+g;if(m>u){if(0===c){for(var v=p;v.length;){var x=(v=v.slice(0,-1)).length*this.letterSpacing;if((m=e.measureText(v).width+x)<=u)break}if(!v.length)throw Error("wordWrapWidth < a single character");var y=f.substr(v.length);d[c]=y,h+=v}var T=d[c].length?c:c+1,w=d.slice(T).join(" ").replace(/[ \n]*$/gi,"");s.splice(o+1,0,w),r=s.length;break}h+=p,u-=m}n+=h.replace(/[ \n]*$/gi,"")+"\n"}return n.replace(/[\s|\n]*$/gi,"")},basicWordWrap:function(t,e,i){for(var n="",s=t.split(this.splitRegExp),r=s.length-1,o=e.measureText(" ").width,a=0;a<=r;a++){for(var h=i,l=s[a].split(" "),u=l.length-1,d=0;d<=u;d++){var c=l[d],f=c.length*this.letterSpacing,p=e.measureText(c).width+f,g=p;d<u&&(g+=o),g>h&&d>0&&(n+="\n",h=i),n+=c,d<u?(n+=" ",h-=g):h-=p}a<r&&(n+="\n")}return n},getWrappedText:function(t){return void 0===t&&(t=this._text),this.style.syncFont(this.canvas,this.context),this.runWordWrap(t).split(this.splitRegExp)},setText:function(t){return t||0===t||(t=""),Array.isArray(t)&&(t=t.join("\n")),t!==this._text&&(this._text=t.toString(),this.updateText()),this},appendText:function(t,e){void 0===e&&(e=!0),t||0===t||(t=""),Array.isArray(t)&&(t=t.join("\n")),t=t.toString();var i=this._text.concat(e?"\n"+t:t);return i!==this._text&&(this._text=i,this.updateText()),this},setStyle:function(t){return this.style.setStyle(t)},setFont:function(t){return this.style.setFont(t)},setFontFamily:function(t){return this.style.setFontFamily(t)},setFontSize:function(t){return this.style.setFontSize(t)},setFontStyle:function(t){return this.style.setFontStyle(t)},setFixedSize:function(t,e){return this.style.setFixedSize(t,e)},setBackgroundColor:function(t){return this.style.setBackgroundColor(t)},setFill:function(t){return this.style.setFill(t)},setColor:function(t){return this.style.setColor(t)},setStroke:function(t,e){return this.style.setStroke(t,e)},setShadow:function(t,e,i,n,s,r){return this.style.setShadow(t,e,i,n,s,r)},setShadowOffset:function(t,e){return this.style.setShadowOffset(t,e)},setShadowColor:function(t){return this.style.setShadowColor(t)},setShadowBlur:function(t){return this.style.setShadowBlur(t)},setShadowStroke:function(t){return this.style.setShadowStroke(t)},setShadowFill:function(t){return this.style.setShadowFill(t)},setWordWrapWidth:function(t,e){return this.style.setWordWrapWidth(t,e)},setWordWrapCallback:function(t,e){return this.style.setWordWrapCallback(t,e)},setAlign:function(t){return this.style.setAlign(t)},setResolution:function(t){return this.style.setResolution(t)},setLineSpacing:function(t){return this.lineSpacing=t,this.updateText()},setLetterSpacing:function(t){return this.letterSpacing=t,this.updateText()},setPadding:function(t,e,i,n){if("object"==typeof t){var s=t,r=u(s,"x",null);null!==r?(t=r,i=r):(t=u(s,"left",0),i=u(s,"right",t));var o=u(s,"y",null);null!==o?(e=o,n=o):(e=u(s,"top",0),n=u(s,"bottom",e))}else void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=t),void 0===n&&(n=e);return this.padding.left=t,this.padding.top=e,this.padding.right=i,this.padding.bottom=n,this.updateText()},setMaxLines:function(t){return this.style.setMaxLines(t)},setRTL:function(t){void 0===t&&(t=!0);var e=this.style;return e.rtl===t||(e.rtl=t,t?(this.canvas.dir="rtl",this.context.direction="rtl",this.canvas.style.display="none",n(this.canvas,this.scene.sys.canvas)):(this.canvas.dir="ltr",this.context.direction="ltr"),"left"===e.align?e.align="right":"right"===e.align&&(e.align="left")),this},updateText:function(){var t,e,i,n=this.canvas,s=this.context,r=this.style,o=r.resolution,a=r.metrics;r.syncFont(n,s);var h=this._text;(r.wordWrapWidth||r.wordWrapCallback)&&(h=this.runWordWrap(this._text));var u=h.split(this.splitRegExp),d=l(this,a,u),c=this.padding;0===r.fixedWidth?(this.width=d.width+c.left+c.right,t=d.width):(this.width=r.fixedWidth,(t=this.width-c.left-c.right)<d.width&&(t=d.width)),0===r.fixedHeight?this.height=d.height+c.top+c.bottom:this.height=r.fixedHeight;var f=this.width,p=this.height;this.updateDisplayOrigin(),f*=o,p*=o,f=Math.max(f,1),p=Math.max(p,1),n.width!==f||n.height!==p?(n.width=f,n.height=p,this.frame.setSize(f,p),this.frame.source.updateSize(f,p),this.frame.source.resolution=o,this.frame.updateUVs(),r.syncFont(n,s),r.rtl&&(s.direction="rtl")):s.clearRect(0,0,f,p),s.save(),s.scale(o,o),r.backgroundColor&&(s.fillStyle=r.backgroundColor,s.fillRect(0,0,f,p)),r.syncStyle(n,s),s.translate(c.left,c.top);for(var g=0;g<d.lines;g++){if(e=r.strokeThickness/2,i=r.strokeThickness/2+g*d.lineHeight+a.ascent,g>0&&(i+=d.lineSpacing*g),r.rtl)e=f-e-c.left-c.right;else if("right"===r.align)e+=t-d.lineWidths[g];else if("center"===r.align)e+=(t-d.lineWidths[g])/2;else if("justify"===r.align&&d.lineWidths[g]/d.width>=.85){for(var m=d.width-d.lineWidths[g],v=s.measureText(" ").width,x=u[g].trim(),y=x.split(" "),T=Math.floor((m+=(u[g].length-x.length)*v)/v),w=0;T>0;)y[w]+=" ",w=(w+1)%(y.length-1||1),--T;u[g]=y.join(" ")}this.autoRound&&(e=Math.round(e),i=Math.round(i));var b=this.letterSpacing;if(r.strokeThickness&&0===b&&(r.syncShadow(s,r.shadowStroke),s.strokeText(u[g],e,i)),r.color)if(r.syncShadow(s,r.shadowFill),0!==b)for(var S=0,C=u[g].split(""),E=0;E<C.length;E++)r.strokeThickness&&(r.syncShadow(s,r.shadowStroke),s.strokeText(C[E],e+S,i),r.syncShadow(s,r.shadowFill)),s.fillText(C[E],e+S,i),S+=s.measureText(C[E]).width+b;else s.fillText(u[g],e,i)}
1s.restore(),this.renderer&&this.renderer.gl&&(this.frame.source.glTexture=this.renderer.canvasToTexture(n,this.frame.source.glTexture,!0));var A=this.input;return A&&!A.customHitArea&&(A.hitArea.width=this.width,A.hitArea.height=this.height),this},getTextMetrics:function(){return this.style.getTextMetrics()},text:{get:function(){return this._text},set:function(t){this.setText(t)}},toJSON:function(){var t=a.ToJSON(this);return t.data={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}},t},preDestroy:function(){d(this.canvas),s.remove(this.canvas);var t=this.texture;t&&t.destroy()}})},79724(t){t.exports=function(t,e,i,n){0!==e.width&&0!==e.height&&(i.addToRenderList(e),t.batchSprite(e,e.frame,i,n))}},71259(t,e,i){var n=i(25305),s=i(44603),r=i(23568),o=i(50171);s.register("text",function(t,e){void 0===t&&(t={});var i=r(t,"text",""),s=r(t,"style",null),a=r(t,"padding",null);null!==a&&(s.padding=a);var h=new o(this.scene,0,0,i,s);return void 0!==e&&(t.add=e),n(this.scene,h,t),h.autoRound=r(t,"autoRound",!0),h.resolution=r(t,"resolution",1),h})},68005(t,e,i){var n=i(50171);i(39429).register("text",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},61771(t,e,i){var n=i(29747),s=n,r=n;s=i(34397),t.exports={renderWebGL:s,renderCanvas:r=i(79724)}},35762(t,e,i){var n=i(83419),s=i(23568),r=i(35154),o=i(79557),a={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\xc3â°qgy"],baselineX:["baselineX",1.2],baselineY:["baselineY",1.4],wordWrapWidth:["wordWrap.width",null],wordWrapCallback:["wordWrap.callback",null],wordWrapCallbackScope:["wordWrap.callbackScope",null],wordWrapUseAdvanced:["wordWrap.useAdvancedWrap",!1]};t.exports=new n({initialize:function(t,e){this.parent=t,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(e,!1,!0)},setStyle:function(t,e,i){for(var n in void 0===e&&(e=!0),void 0===i&&(i=!1),a){var h=i?a[n][1]:this[n];"wordWrapCallback"===n||"wordWrapCallbackScope"===n?this[n]=r(t,a[n][0],h):t&&"fontSize"===n&&"number"==typeof t.fontSize?this[n]=t.fontSize.toString()+"px":this[n]=s(t,a[n][0],h)}var l=r(t,"font",null);null!==l&&this.setFont(l,!1),this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim();var u=r(t,"fill",null);null!==u&&(this.color=u);var d=r(t,"metrics",!1);return(d?this.metrics={ascent:r(d,"ascent",0),descent:r(d,"descent",0),fontSize:r(d,"fontSize",0)}:(e||!this.metrics)&&(this.metrics=o(this)),e)?this.parent.updateText():this.parent},syncFont:function(t,e){e.font=this._font},syncStyle:function(t,e){e.textBaseline="alphabetic",e.fillStyle=this.color,e.strokeStyle=this.stroke,e.lineWidth=this.strokeThickness,e.lineCap="round",e.lineJoin="round"},syncShadow:function(t,e){e?(t.shadowOffsetX=this.shadowOffsetX,t.shadowOffsetY=this.shadowOffsetY,t.shadowColor=this.shadowColor,t.shadowBlur=this.shadowBlur):(t.shadowOffsetX=0,t.shadowOffsetY=0,t.shadowColor=0,t.shadowBlur=0)},update:function(t){return t&&(this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim(),this.metrics=o(this)),this.parent.updateText()},setFont:function(t,e){void 0===e&&(e=!0);var i=t,n="",s="";if("string"!=typeof t)i=r(t,"fontFamily","Courier"),n=r(t,"fontSize","16px"),s=r(t,"fontStyle","");else{var o=t.split(" "),a=0;s=o.length>2?o[a++]:"",n=o[a++]||"16px",i=o[a++]||"Courier"}return(i!==this.fontFamily||n!==this.fontSize||s!==this.fontStyle)&&(this.fontFamily=i,this.fontSize=n,this.fontStyle=s,e&&this.update(!0)),this.parent},setFontFamily:function(t){return this.fontFamily!==t&&(this.fontFamily=t,this.update(!0)),this.parent},setFontStyle:function(t){return this.fontStyle!==t&&(this.fontStyle=t,this.update(!0)),this.parent},setFontSize:function(t){return"number"==typeof t&&(t=t.toString()+"px"),this.fontSize!==t&&(this.fontSize=t,this.update(!0)),this.parent},setTestString:function(t){return this.testString=t,this.update(!0)},setFixedSize:function(t,e){return this.fixedWidth=t,this.fixedHeight=e,t&&(this.parent.width=t),e&&(this.parent.height=e),this.update(!1)}
vendor: 13,610 bytes, line 1
1,setBackgroundColor:function(t){return this.backgroundColor=t,this.update(!1)},setFill:function(t){return this.color=t,this.update(!1)},setColor:function(t){return this.color=t,this.update(!1)},setResolution:function(t){return this.resolution=t,this.update(!1)},setStroke:function(t,e){return void 0===e&&(e=this.strokeThickness),void 0===t&&0!==this.strokeThickness?(this.strokeThickness=0,this.update(!0)):(this.stroke!==t||this.strokeThickness!==e)&&(this.stroke=t,this.strokeThickness=e,this.update(!0)),this.parent},setShadow:function(t,e,i,n,s,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i="#000"),void 0===n&&(n=0),void 0===s&&(s=!1),void 0===r&&(r=!0),this.shadowOffsetX=t,this.shadowOffsetY=e,this.shadowColor=i,this.shadowBlur=n,this.shadowStroke=s,this.shadowFill=r,this.update(!1)},setShadowOffset:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.shadowOffsetX=t,this.shadowOffsetY=e,this.update(!1)},setShadowColor:function(t){return void 0===t&&(t="#000"),this.shadowColor=t,this.update(!1)},setShadowBlur:function(t){return void 0===t&&(t=0),this.shadowBlur=t,this.update(!1)},setShadowStroke:function(t){return this.shadowStroke=t,this.update(!1)},setShadowFill:function(t){return this.shadowFill=t,this.update(!1)},setWordWrapWidth:function(t,e){return void 0===e&&(e=!1),this.wordWrapWidth=t,this.wordWrapUseAdvanced=e,this.update(!1)},setWordWrapCallback:function(t,e){return void 0===e&&(e=null),this.wordWrapCallback=t,this.wordWrapCallbackScope=e,this.update(!1)},setAlign:function(t){return void 0===t&&(t="left"),this.align=t,this.update(!1)},setMaxLines:function(t){return void 0===t&&(t=0),this.maxLines=t,this.update(!1)},getTextMetrics:function(){var t=this.metrics;return{ascent:t.ascent,descent:t.descent,fontSize:t.fontSize}},toJSON:function(){var t={};for(var e in a)t[e]=this[e];return t.metrics=this.getTextMetrics(),t},destroy:function(){this.parent=void 0}})},34397(t){t.exports=function(t,e,i,n){if(0!==e.width&&0!==e.height){i.camera.addToRenderList(e);var s=e.customRenderNodes,r=e.defaultRenderNodes;(s.Submitter||r.Submitter).run(i,e,n,0,s.Texturer||r.Texturer,s.Transformer||r.Transformer)}}},20839(t,e,i){var n=i(9674),s=i(27919),r=i(41571),o=i(83419),a=i(31401),h=i(95643),l=i(68703),u=i(56295),d=i(45650),c=i(26099);t.exports=new o({Extends:h,Mixins:[a.Alpha,a.BlendMode,a.ComputedSize,a.Depth,a.Flip,a.GetBounds,a.Lighting,a.Mask,a.Origin,a.RenderNodes,a.ScrollFactor,a.Texture,a.Tint,a.Transform,a.Visible,u],initialize:function(t,e,i,r,o,a,l){var u=t.sys.renderer,f=u&&!u.gl;h.call(this,t,"TileSprite");var p=t.sys.textures.get(a).get(l);r=r?Math.floor(r):p.width,o=o?Math.floor(o):p.height,this._tilePosition=new c,this._tileScale=new c(1,1),this._tileRotation=0,this.dirty=!1,this.renderer=u,this.canvas=f?s.create(this,r,o):null,this.context=f?this.canvas.getContext("2d",{willReadFrequently:!1}):null,this._displayTextureKey=d(),this.displayTexture=f?t.sys.textures.addCanvas(this._displayTextureKey,this.canvas):null,this.displayFrame=this.displayTexture?this.displayTexture.get():null,this.currentFrame=null,this.fillCanvas=f?s.create2D(this,p.width,this.displayFrame.height):null,this.fillContext=this.fillCanvas?this.fillCanvas.getContext("2d",{willReadFrequently:!1}):null,this.fillPattern=null,this.anims=new n(this),this.setTexture(a,l),this.setPosition(e,i),this.setSize(r,o),this.setOrigin(.5,.5),this.initRenderNodes(this._defaultRenderNodesMap)},_defaultRenderNodesMap:{get:function(){return r}},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(t,e){this.anims.update(t,e)},setFrame:function(t){var e=this.texture.get(t);return e.cutWidth&&e.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this.frame=e,this.dirty=!0,this},setSizeToFrame:function(){return this},setTilePosition:function(t,e){return void 0!==t&&(this.tilePositionX=t),void 0!==e&&(this.tilePositionY=e),this},setTileRotation:function(t){return void 0===t&&(t=0),this.tileRotation=t,this},setTileScale:function(t,e){return void 0===t&&(t=this.tileScaleX),void 0===e&&(e=t),this.tileScaleX=t,this.tileScaleY=e,this},updateTileTexture:function(){if(this.renderer&&!this.renderer.gl){var t=this.frame,e=this.fillContext,i=this.fillCanvas,n=t.cutWidth,s=t.cutHeight;e.clearRect(0,0,n,s),i.width=n,i.height=s,e.drawImage(t.source.image,t.cutX,t.cutY,t.cutWidth,t.cutHeight,0,0,n,s),this.fillPattern=e.createPattern(i,"repeat"),this.currentFrame=t}},updateCanvas:function(){var t=this.canvas,e=this.width,i=this.height,n=this.currentFrame!==this.frame;if((t.width!==e||t.height!==i||n)&&(t.width=e,t.height=i,this.displayFrame.setSize(e,i),this.updateDisplayOrigin(),n&&this.updateTileTexture(),this.dirty=!0),!this.dirty||this.renderer&&this.renderer.gl){this.dirty=!1;return}var s=this.context;this.scene.sys.game.config.antialias||l.disable(s);var r=this._tileScale.x,o=this._tileScale.y,a=this._tilePosition.x,h=this._tilePosition.y;s.clearRect(0,0,e,i),s.save(),s.rotate(this._tileRotation),s.scale(r,o),s.translate(-a,-h),s.fillStyle=this.fillPattern;var u=Math.max(e,Math.abs(e/r)),d=Math.max(i,Math.abs(i/o)),c=Math.sqrt(u*u+d*d);s.fillRect(a-c,h-c,2*c,2*c),s.restore(),this.dirty=!1},setSize:function(t,e){this.width=t,this.height=e,this.updateDisplayOrigin();var i=this.input;return i&&!i.customHitArea&&(i.hitArea.width=t,i.hitArea.height=e),this},preDestroy:function(){this.canvas&&s.remove(this.canvas),this.fillCanvas&&s.remove(this.fillCanvas),this.fillPattern=null,this.fillContext=null,this.fillCanvas=null,this.displayTexture=null,this.displayFrame=null,this.renderer=null,this.anims.destroy(),this.anims=void 0},tilePositionX:{get:function(){return this._tilePosition.x},set:function(t){this._tilePosition.x=t,this.dirty=!0}},tilePositionY:{get:function(){return this._tilePosition.y},set:function(t){this._tilePosition.y=t,this.dirty=!0}},tileRotation:{get:function(){return this._tileRotation},set:function(t){this._tileRotation=t,this.dirty=!0}},tileScaleX:{get:function(){return this._tileScale.x},set:function(t){this._tileScale.x=t,this.dirty=!0}},tileScaleY:{get:function(){return this._tileScale.y},set:function(t){this._tileScale.y=t,this.dirty=!0}}})},46992(t){t.exports=function(t,e,i,n){e.updateCanvas(),i.addToRenderList(e),t.batchSprite(e,e.displayFrame,i,n)}},14167(t,e,i){var n=i(25305),s=i(44603),r=i(23568),o=i(20839);s.register("tileSprite",function(t,e){void 0===t&&(t={});var i=r(t,"x",0),s=r(t,"y",0),a=r(t,"width",512),h=r(t,"height",512),l=r(t,"key",""),u=r(t,"frame",""),d=new o(this.scene,i,s,a,h,l,u);return void 0!==e&&(t.add=e),n(this.scene,d,t),d})},91681(t,e,i){var n=i(20839);i(39429).register("tileSprite",function(t,e,i,s,r,o){return this.displayList.add(new n(this.scene,t,e,i,s,r,o))})},56295(t,e,i){var n=i(29747),s=n,r=n;s=i(18553),t.exports={renderWebGL:s,renderCanvas:r=i(46992)}},18553(t){t.exports=function(t,e,i,n){var s=e.width,r=e.height;if(0!==s&&0!==r){i.camera.addToRenderList(e);var o=e.customRenderNodes,a=e.defaultRenderNodes;(o.Submitter||a.Submitter).run(i,e,n,0,o.Texturer||a.Texturer,o.Transformer||a.Transformer)}}},18471(t,e,i){var n=i(45319),s=i(40939),r=i(83419),o=i(31401),a=i(51708),h=i(8443),l=i(95643),u=i(36383),d=i(14463),c=i(45650),f=i(10247);t.exports=new r({Extends:l,Mixins:[o.Alpha,o.BlendMode,o.ComputedSize,o.Depth,o.Flip,o.GetBounds,o.Lighting,o.Mask,o.Origin,o.RenderNodes,o.ScrollFactor,o.TextureCrop,o.Tint,o.Transform,o.Visible,f],initialize:function(t,e,i,n){l.call(this,t,"Video"),this.video,this.videoTexture,this.videoTextureSource,this.snapshotTexture,this.glFlipY=!0,this._key=c(),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 s=t.sys.game;this._device=s.device.video,this.setPosition(e,i),this.setSize(256,256),this.initRenderNodes(this._defaultRenderNodesMap),s.events.on(h.PAUSE,this.globalPause,this),s.events.on(h.RESUME,this.globalResume,this);var r=t.sys.sound;r&&r.on(d.GLOBAL_MUTE,this.globalMute,this),n&&this.load(n)},_defaultRenderNodesMap:{get:function(){return s}},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},load:function(t){var e=this.scene.sys.cache.video.get(t);return e?(this.cacheKey=t,this.loadHandler(e.url,e.noAudio,e.crossOrigin)):console.warn("No video in cache for key: "+t),this},changeSource:function(t,e,i,n,s){void 0===e&&(e=!0),void 0===i&&(i=!1),this.cacheKey!==t&&(this.load(t),e&&this.play(i,n,s))},getVideoKey:function(){return this.cacheKey},loadURL:function(t,e,i){void 0===e&&(e=!1);var n=this._device.getVideoURL(t);return n?(this.cacheKey="",this.loadHandler(n.url,e,i)):console.warn("No supported video format found for "+t),this},loadMediaStream:function(t,e,i){return this.loadHandler(null,e,i,t)},loadHandler:function(t,e,i,n){e||(e=!1);var s=this.video;if(s?(this.removeLoadEventHandlers(),this.stop()):((s=document.createElement("video")).controls=!1,s.setAttribute("playsinline","playsinline"),s.setAttribute("preload","auto"),s.setAttribute("disablePictureInPicture","true")),e?(s.muted=!0,s.defaultMuted=!0,s.setAttribute("autoplay","autoplay")):(s.muted=!1,s.defaultMuted=!1,s.removeAttribute("autoplay")),i?s.setAttribute("crossorigin",i):s.removeAttribute("crossorigin"),n)if("srcObject"in s)try{s.srcObject=n}catch(t){if("TypeError"!==t.name)throw t;s.src=URL.createObjectURL(n)}else s.src=URL.createObjectURL(n);else s.src=t;this.retry=0,this.video=s,this._playCalled=!1,s.load(),this.addLoadEventHandlers();var r=this.scene.sys.textures.get(this._key);return this.setTexture(r),this},requestVideoFrame:function(t,e){var i=this.video;if(i){var n=e.width,s=e.height,r=this.videoTexture,o=this.videoTextureSource,h=!r||o.source!==i;h?(this._codePaused=i.paused,this._codeMuted=i.muted,r?(o.source=i,o.width=n,o.height=s,r.get().setSize(n,s)):((r=this.scene.sys.textures.create(this._key,i,n,s)).add("__BASE",0,0,0,n,s),this.setTexture(r),this.videoTexture=r,this.videoTextureSource=r.source[0],this.videoTextureSource.setFlipY(this.glFlipY),this.emit(a.VIDEO_TEXTURE,this,r)),this.setSizeToFrame(),this.updateDisplayOrigin()):o.update(),this.isStalled=!1,this.metadata=e;var l=e.mediaTime;h&&(this._lastUpdate=l,this.emit(a.VIDEO_CREATED,this,n,s),this.frameReady||(this.frameReady=!0,this.emit(a.VIDEO_PLAY,this))),this._playingMarker?l>=this._markerOut&&(i.loop?(i.currentTime=this._markerIn,this.emit(a.VIDEO_LOOP,this)):(this.stop(!1),this.emit(a.VIDEO_COMPLETE,this))):l<this._lastUpdate&&this.emit(a.VIDEO_LOOP,this),this._lastUpdate=l,this._getFrame?(this.removeEventHandlers(),i.pause(),this._getFrame=!1):this._rfvCallbackId=this.video.requestVideoFrameCallback(this.requestVideoFrame.bind(this))}},play:function(t,e,i){void 0===e&&(e=-1),void 0===i&&(i=u.MAX_SAFE_INTEGER);var n=this.video;return!n||this.isPlaying()?n||console.warn("Video not loaded"):(void 0===t&&(t=n.loop),n.loop=t,this._markerIn=e,this._markerOut=i,this._playingMarker=e>-1&&i>e&&i<u.MAX_SAFE_INTEGER,this._playCalled||(this._getFrame=!1,this._rfvCallbackId=n.requestVideoFrameCallback(this.requestVideoFrame.bind(this)),this._playCalled=!0,this.createPlayPromise())),this},getFirstFrame:function(){var t=this.video;return!t||this.isPlaying()?t||console.warn("Video not loaded"):this._playCalled||(this._getFrame=!0,this._rfvCallbackId=t.requestVideoFrameCallback(this.requestVideoFrame.bind(this)),this.createPlayPromise()),this},addLoadEventHandlers:function(){var t=this.video;t&&(t.addEventListener("error",this._loadCallbackHandler),t.addEventListener("abort",this._loadCallbackHandler),t.addEventListener("loadedmetadata",this._metadataCallbackHandler))},removeLoadEventHandlers:function(){var t=this.video;t&&(t.removeEventListener("error",this._loadCallbackHandler),t.removeEventListener("abort",this._loadCallbackHandler))},addEventHandlers:function(){var t=this.video;if(t){var e=this._callbacks;for(var i in e)t.addEventListener(i,e[i])}},removeEventHandlers:function(){var t=this.video;if(t){var e=this._callbacks;for(var i in e)t.removeEventListener(i,e[i])}},createPlayPromise:function(t){void 0===t&&(t=!0);var e=this.video,i=e.play();if(void 0!==i){var n=this.playSuccess.bind(this),s=this.playError.bind(this);if(!t){var r=this;s=function(){r.failedPlayAttempts++}}i.then(n).catch(s)}else e.addEventListener("playing",this._callbacks.legacy),!t&&this.failedPlayAttempts++},addMarker:function(t,e,i){return!isNaN(e)&&e>=0&&!isNaN(i)&&i>e&&(this.markers[t]=[e,i]),this},playMarker:function(t,e){var i=this.markers[t];return i&&this.play(e,i[0],i[1]),this},removeMarker:function(t){return delete this.markers[t],this},snapshot:function(t,e){return void 0===t&&(t=this.width),void 0===e&&(e=this.height),this.snapshotArea(0,0,this.width,this.height,t,e)}
1,snapshotArea:function(t,e,i,n,s,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.width),void 0===n&&(n=this.height),void 0===s&&(s=i),void 0===r&&(r=n);var o=this.video,a=this.snapshotTexture;return a?a.setSize(s,r):(a=this.scene.sys.textures.createCanvas(c(),s,r),this.snapshotTexture=a),o&&a.context.drawImage(o,t,e,i,n,0,0,s,r),a.update()},saveSnapshotTexture:function(t){return this.snapshotTexture?this.scene.sys.textures.renameTexture(this.snapshotTexture.key,t):this.snapshotTexture=this.scene.sys.textures.createCanvas(t,this.width,this.height),this.snapshotTexture},playSuccess:function(){if(this._playCalled){this.addEventHandlers(),this._codePaused=!1,this.touchLocked&&(this.touchLocked=!1,this.emit(a.VIDEO_UNLOCKED,this));var t=this.scene.sys.sound;t&&t.mute&&this.setMute(!0),this._markerIn>-1&&(this.video.currentTime=this._markerIn)}},playError:function(t){var e=t.name;"NotAllowedError"===e?(this.touchLocked=!0,this.playWhenUnlocked=!0,this.failedPlayAttempts=1,this.emit(a.VIDEO_LOCKED,this)):"NotSupportedError"===e?(this.stop(!1),this.emit(a.VIDEO_UNSUPPORTED,this,t)):(this.stop(!1),this.emit(a.VIDEO_ERROR,this,t))},legacyPlayHandler:function(){var t=this.video;t&&(this.playSuccess(),t.removeEventListener("playing",this._callbacks.legacy))},playingHandler:function(){this.isStalled=!1,this.emit(a.VIDEO_PLAYING,this)},loadErrorHandler:function(t){this.stop(!1),this.emit(a.VIDEO_ERROR,this,t)},metadataHandler:function(t){this.emit(a.VIDEO_METADATA,this,t)},setSizeToFrame:function(t){t||(t=this.frame),this.width=t.realWidth,this.height=t.realHeight,1!==this.scaleX&&(this.scaleX=this.displayWidth/this.width),1!==this.scaleY&&(this.scaleY=this.displayHeight/this.height);var e=this.input;return e&&!e.customHitArea&&(e.hitArea.width=this.width,e.hitArea.height=this.height),this},stalledHandler:function(t){this.isStalled=!0,this.emit(a.VIDEO_STALLED,this,t)},completeHandler:function(){this._playCalled=!1,this.emit(a.VIDEO_COMPLETE,this)},preUpdate:function(t,e){this.video&&this._playCalled&&this.touchLocked&&this.playWhenUnlocked&&(this.retry+=e,this.retry>=this.retryInterval&&(this.createPlayPromise(!1),this.retry=0))},seekTo:function(t){var e=this.video;if(e){var i=e.duration;i===1/0||isNaN(i)||this.setCurrentTime(i*t)}return this},getCurrentTime:function(){return this.video?this.video.currentTime:0},setCurrentTime:function(t){var e=this.video;if(e){if("string"==typeof t){var i=t[0],n=parseFloat(t.substr(1));"+"===i?t=e.currentTime+n:"-"===i&&(t=e.currentTime-n)}e.currentTime=t}return this},seekingHandler:function(){this.isSeeking=!0,this.emit(a.VIDEO_SEEKING,this)},seekedHandler:function(){this.isSeeking=!1,this.emit(a.VIDEO_SEEKED,this)},getProgress:function(){var t=this.video;if(t){var e=t.duration;if(e!==1/0&&!isNaN(e))return t.currentTime/e}return -1},getDuration:function(){return this.video?this.video.duration:0},setMute:function(t){void 0===t&&(t=!0),this._codeMuted=t;var e=this.video;return e&&(e.muted=!!this._systemMuted||t),this},isMuted:function(){return this._codeMuted},globalMute:function(t,e){this._systemMuted=e;var i=this.video;
vendor: 8,218 bytes, line 1
1i&&(i.muted=!!this._codeMuted||e)},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(t){void 0===t&&(t=!0);var e=this.video;return this._codePaused=t,e&&!e.ended&&(t?e.paused||(this.removeEventHandlers(),e.pause()):t||(this._playCalled?e.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(t){return void 0===t&&(t=1),this.video&&(this.video.volume=n(t,0,1)),this},getPlaybackRate:function(){return this.video?this.video.playbackRate:1},setPlaybackRate:function(t){return this.video&&(this.video.playbackRate=t),this},getLoop:function(){return!!this.video&&this.video.loop},setLoop:function(t){return void 0===t&&(t=!0),this.video&&(this.video.loop=t),this},isPlaying:function(){return!!this.video&&!(this.video.paused||this.video.ended)},isPaused:function(){return this.video&&this._playCalled&&this.video.paused||this._codePaused||this._systemPaused},saveTexture:function(t,e){return void 0===e&&(e=!0),this.videoTexture&&(this.scene.sys.textures.renameTexture(this._key,t),this.videoTextureSource.setFlipY(e)),this._key=t,this.glFlipY=e,!!this.videoTexture},stop:function(t){void 0===t&&(t=!0);var e=this.video;return e&&(this.removeEventHandlers(),e.cancelVideoFrameCallback(this._rfvCallbackId),e.pause()),this.retry=0,this._playCalled=!1,t&&this.emit(a.VIDEO_STOP,this),this},removeVideoElement:function(){var t=this.video;if(t){for(t.parentNode&&t.parentNode.removeChild(t);t.hasChildNodes();)t.removeChild(t.firstChild);t.removeAttribute("autoplay"),t.removeAttribute("src"),this.video=null}},preDestroy:function(){this.stop(!1),this.removeLoadEventHandlers(),this.removeVideoElement();var t=this.scene.sys.game.events;t.off(h.PAUSE,this.globalPause,this),t.off(h.RESUME,this.globalResume,this);var e=this.scene.sys.sound;e&&e.off(d.GLOBAL_MUTE,this.globalMute,this)}})},58352(t){t.exports=function(t,e,i,n){e.videoTexture&&(i.addToRenderList(e),t.batchSprite(e,e.frame,i,n))}},11511(t,e,i){var n=i(25305),s=i(44603),r=i(23568),o=i(18471);s.register("video",function(t,e){void 0===t&&(t={});var i=r(t,"key",null),s=new o(this.scene,0,0,i);return void 0!==e&&(t.add=e),n(this.scene,s,t),s})},89025(t,e,i){var n=i(18471);i(39429).register("video",function(t,e,i){return this.displayList.add(new n(this.scene,t,e,i))})},10247(t,e,i){var n=i(29747),s=n,r=n;s=i(29849),t.exports={renderWebGL:s,renderCanvas:r=i(58352)}},29849(t){t.exports=function(t,e,i,n){if(e.videoTexture){i.camera.addToRenderList(e);var s=e.customRenderNodes,r=e.defaultRenderNodes;(s.Submitter||r.Submitter).run(i,e,n,0,s.Texturer||r.Texturer,s.Transformer||r.Transformer)}}},41481(t,e,i){var n=i(10312),s=i(96503),r=i(87902),o=i(83419),a=i(31401),h=i(95643),l=i(87841),u=i(37303);t.exports=new o({Extends:h,Mixins:[a.Depth,a.GetBounds,a.Origin,a.Transform,a.ScrollFactor,a.Visible],initialize:function(t,e,i,s,r){void 0===s&&(s=1),void 0===r&&(r=s),h.call(this,t,"Zone"),this.setPosition(e,i),this.width=s,this.height=r,this.blendMode=n.NORMAL,this.updateDisplayOrigin()},displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}},setSize:function(t,e,i){void 0===i&&(i=!0),this.width=t,this.height=e,this.updateDisplayOrigin();var n=this.input;return i&&n&&!n.customHitArea&&(n.hitArea.width=t,n.hitArea.height=e),this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this},setCircleDropZone:function(t){return this.setDropZone(new s(0,0,t),r)},setRectangleDropZone:function(t,e){return this.setDropZone(new l(0,0,t,e),u)},setDropZone:function(t,e){return this.input||this.setInteractive(t,e,!0),this},setAlpha:function(){},setBlendMode:function(){},renderCanvas:function(t,e,i){i.addToRenderList(e)},renderWebGL:function(t,e,i){i.camera.addToRenderList(e)}})},95261(t,e,i){var n=i(44603),s=i(23568),r=i(41481);n.register("zone",function(t){var e=s(t,"x",0),i=s(t,"y",0),n=s(t,"width",1),o=s(t,"height",n);return new r(this.scene,e,i,n,o)})},84175(t,e,i){var n=i(41481);i(39429).register("zone",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},95166(t){t.exports=function(t){return t.radius>0?Math.PI*t.radius*t.radius:0}},96503(t,e,i){var n=i(83419),s=i(87902),r=i(26241),o=i(79124),a=i(23777),h=i(28176);t.exports=new n({initialize:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),this.type=a.CIRCLE,this.x=t,this.y=e,this._radius=i,this._diameter=2*i},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return h(this,t)},setTo:function(t,e,i){return this.x=t,this.y=e,this._radius=i,this._diameter=2*i,this},setEmpty:function(){return this._radius=0,this._diameter=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},isEmpty:function(){return this._radius<=0},radius:{get:function(){return this._radius},set:function(t){this._radius=t,this._diameter=2*t}},diameter:{get:function(){return this._diameter},set:function(t){this._diameter=t,this._radius=.5*t}},left:{get:function(){return this.x-this._radius},set:function(t){this.x=t+this._radius}},right:{get:function(){return this.x+this._radius},set:function(t){this.x=t-this._radius}},top:{get:function(){return this.y-this._radius},set:function(t){this.y=t+this._radius}},bottom:{get:function(){return this.y+this._radius},set:function(t){this.y=t-this._radius}}})},71562(t){t.exports=function(t){return 2*(Math.PI*t.radius)}},92110(t,e,i){var n=i(26099);t.exports=function(t,e,i){return void 0===i&&(i=new n),i.x=t.x+t.radius*Math.cos(e),i.y=t.y+t.radius*Math.sin(e),i}},42250(t,e,i){var n=i(96503);t.exports=function(t){return new n(t.x,t.y,t.radius)}},87902(t){t.exports=function(t,e,i){return t.radius>0&&e>=t.left&&e<=t.right&&i>=t.top&&i<=t.bottom&&(t.x-e)*(t.x-e)+(t.y-i)*(t.y-i)<=t.radius*t.radius}},5698(t,e,i){var n=i(87902);t.exports=function(t,e){return n(t,e.x,e.y)}},70588(t,e,i){var n=i(87902);t.exports=function(t,e){return n(t,e.x,e.y)&&n(t,e.right,e.y)&&n(t,e.x,e.bottom)&&n(t,e.right,e.bottom)}},26394(t){t.exports=function(t,e){return e.setTo(t.x,t.y,t.radius)}},76278(t){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.radius===e.radius}},2074(t,e,i){var n=i(87841);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.left,e.y=t.top,e.width=t.diameter,e.height=t.diameter,e}},26241(t,e,i){var n=i(92110),s=i(62945),r=i(36383),o=i(26099);t.exports=function(t,e,i){return void 0===i&&(i=new o),n(t,s(e,0,r.TAU),i)}},79124(t,e,i){var n=i(71562),s=i(92110),r=i(62945),o=i(36383);t.exports=function(t,e,i,a){void 0===a&&(a=[]),!e&&i>0&&(e=n(t)/i);for(var h=0;h<e;h++){var l=r(h/e,0,o.TAU);a.push(s(t,l))}return a}},50884(t){t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},39212(t){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},28176(t,e,i){var n=i(26099);t.exports=function(t,e){void 0===e&&(e=new n);var i=2*Math.PI*Math.random(),s=Math.random()+Math.random(),r=s>1?2-s:s,o=r*Math.cos(i),a=r*Math.sin(i);return e.x=t.x+o*t.radius,e.y=t.y+a*t.radius,e}},88911(t,e,i){var n=i(96503);n.Area=i(95166),n.Circumference=i(71562),n.CircumferencePoint=i(92110),n.Clone=i(42250),n.Contains=i(87902),n.ContainsPoint=i(5698),n.ContainsRect=i(70588),n.CopyFrom=i(26394),n.Equals=i(76278),n.GetBounds=i(2074),n.GetPoint=i(26241),n.GetPoints=i(79124),n.Offset=i(50884),n.OffsetPoint=i(39212),n.Random=i(28176),t.exports=n},23777(t){t.exports={CIRCLE:0,ELLIPSE:1,LINE:2,POINT:3,POLYGON:4,RECTANGLE:5,TRIANGLE:6}},78874(t){t.exports=function(t){return t.isEmpty()?0:t.getMajorRadius()*t.getMinorRadius()*Math.PI}},92990(t){t.exports=function(t){var e=t.width/2,i=t.height/2,n=Math.pow(e-i,2)/Math.pow(e+i,2);return Math.PI*(e+i)*(1+3*n/(10+Math.sqrt(4-3*n)))}},79522(t,e,i){var n=i(26099);
1t.exports=function(t,e,i){void 0===i&&(i=new n);var s=t.width/2,r=t.height/2;return i.x=t.x+s*Math.cos(e),i.y=t.y+r*Math.sin(e),i}},58102(t,e,i){var n=i(8497);t.exports=function(t){return new n(t.x,t.y,t.width,t.height)}},81154(t){t.exports=function(t,e,i){if(t.width<=0||t.height<=0)return!1;var n=(e-t.x)/t.width,s=(i-t.y)/t.height;return n*=n,s*=s,n+s<.25}},46662(t,e,i){var n=i(81154);t.exports=function(t,e){return n(t,e.x,e.y)}},1632(t,e,i){var n=i(81154);t.exports=function(t,e){return n(t,e.x,e.y)&&n(t,e.right,e.y)&&n(t,e.x,e.bottom)&&n(t,e.right,e.bottom)}},65534(t){t.exports=function(t,e){return e.setTo(t.x,t.y,t.width,t.height)}},8497(t,e,i){var n=i(83419),s=i(81154),r=i(90549),o=i(48320),a=i(23777),h=i(24820);t.exports=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.type=a.ELLIPSE,this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return h(this,t)},setTo:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setEmpty:function(){return this.width=0,this.height=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,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(t){this.x=t+this.width/2}},right:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},top:{get:function(){return this.y-this.height/2},set:function(t){this.y=t+this.height/2}},bottom:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}})},36146(t){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}},23694(t,e,i){var n=i(87841);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.left,e.y=t.top,e.width=t.width,e.height=t.height,e}},90549(t,e,i){var n=i(79522),s=i(62945),r=i(36383),o=i(26099);t.exports=function(t,e,i){return void 0===i&&(i=new o),n(t,s(e,0,r.TAU),i)}},48320(t,e,i){var n=i(92990),s=i(79522),r=i(62945),o=i(36383);t.exports=function(t,e,i,a){void 0===a&&(a=[]),!e&&i>0&&(e=n(t)/i);for(var h=0;h<e;h++){var l=r(h/e,0,o.TAU);a.push(s(t,l))}return a}},73424(t){t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},44808(t){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},24820(t,e,i){var n=i(26099);t.exports=function(t,e){void 0===e&&(e=new n);var i=Math.random()*Math.PI*2,s=Math.sqrt(Math.random());return e.x=t.x+s*Math.cos(i)*t.width/2,e.y=t.y+s*Math.sin(i)*t.height/2,e}},49203(t,e,i){var n=i(8497);n.Area=i(78874),n.Circumference=i(92990),n.CircumferencePoint=i(79522),n.Clone=i(58102),n.Contains=i(81154),n.ContainsPoint=i(46662),n.ContainsRect=i(1632),n.CopyFrom=i(65534),n.Equals=i(36146),n.GetBounds=i(23694),n.GetPoint=i(90549),n.GetPoints=i(48320),n.Offset=i(73424),n.OffsetPoint=i(44808),n.Random=i(24820),t.exports=n},55738(t,e,i){var n=i(23777);t.exports=i(79291)(!1,{Circle:i(88911),Ellipse:i(49203),Intersects:i(91865),Line:i(2529),Polygon:i(58423),Rectangle:i(93232),Triangle:i(84435)},n)},2044(t,e,i){var n=i(20339);t.exports=function(t,e){return n(t.x,t.y,e.x,e.y)<=t.radius+e.radius}},81491(t){t.exports=function(t,e){var i=e.width/2,n=e.height/2,s=Math.abs(t.x-e.x-i),r=Math.abs(t.y-e.y-n),o=i+t.radius,a=n+t.radius;if(s>o||r>a)return!1;if(s<=i||r<=n)return!0;var h=s-i,l=r-n;return h*h+l*l<=t.radius*t.radius}},63376(t,e,i){var n=i(26099),s=i(2044);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e)){var r,o,a,h,l=t.x,u=t.y,d=t.radius,c=e.x,f=e.y,p=e.radius;if(u===f)h=(p*p-d*d-c*c+l*l)/(2*(l-c)),r=1,0==(a=(o=-2*f)*o-4*r*(c*c+h*h-2*c*h+f*f-p*p))?i.push(new n(h,-o/(2*r))):a>0&&(i.push(new n(h,(-o+Math.sqrt(a))/(2*r))),i.push(new n(h,(-o-Math.sqrt(a))/(2*r))));else{var g=(l-c)/(u-f),m=(p*p-d*d-c*c+l*l-f*f+u*u)/(2*(u-f));r=g*g+1,0==(a=(o=2*u*g-2*m*g-2*l)*o-4*r*(l*l+u*u+m*m-d*d-2*u*m))?(h=-o/(2*r),i.push(new n(h,m-h*g))):a>0&&(h=(-o+Math.sqrt(a))/(2*r),i.push(new n(h,m-h*g)),h=(-o-Math.sqrt(a))/(2*r),i.push(new n(h,m-h*g)))}}return i}},97439(t,e,i){var n=i(4042),s=i(81491);
vendor: 4,230 bytes, line 1
1t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e)){var r=e.getLineA(),o=e.getLineB(),a=e.getLineC(),h=e.getLineD();n(r,t,i),n(o,t,i),n(a,t,i),n(h,t,i)}return i}},4042(t,e,i){var n=i(26099),s=i(80462);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e)){var r,o,a=t.x1,h=t.y1,l=t.x2,u=t.y2,d=e.x,c=e.y,f=e.radius,p=l-a,g=u-h,m=a-d,v=h-c,x=p*p+g*g,y=2*(p*m+g*v),T=y*y-4*x*(m*m+v*v-f*f);if(0===T){var w=-y/(2*x);r=a+w*p,o=h+w*g,w>=0&&w<=1&&i.push(new n(r,o))}else if(T>0){var b=(-y-Math.sqrt(T))/(2*x);r=a+b*p,o=h+b*g,b>=0&&b<=1&&i.push(new n(r,o));var S=(-y+Math.sqrt(T))/(2*x);r=a+S*p,o=h+S*g,S>=0&&S<=1&&i.push(new n(r,o))}}return i}},36100(t,e,i){var n=i(25836);t.exports=function(t,e,i,s){void 0===i&&(i=!1);var r,o,a,h=t.x1,l=t.y1,u=t.x2,d=t.y2,c=e.x1,f=e.y1,p=e.x2,g=e.y2,m=u-h,v=d-l,x=p-c,y=g-f,T=m*y-v*x;if(0===T)return null;if(i){if(r=(m*(f-l)+v*(h-c))/(x*v-y*m),0!==m)o=(c+x*r-h)/m;else{if(0===v)return null;o=(f+y*r-l)/v}if(o<0||r<0||r>1)return null;a=o}else{if(r=((c-h)*y-(f-l)*x)/T,o=((l-f)*m-(h-c)*v)/T,r<0||r>1||o<0||o>1)return null;a=r}return void 0===s&&(s=new n),s.set(h+m*a,l+v*a,a)}},3073(t,e,i){var n=i(36100),s=i(23031),r=i(25836),o=new s,a=new r;t.exports=function(t,e,i,s){void 0===i&&(i=!1),void 0===s&&(s=new r);var h=!1;s.set(),a.set();for(var l=e[e.length-1],u=0;u<e.length;u++){var d=e[u];o.setTo(l.x,l.y,d.x,d.y),l=d,n(t,o,i,a)&&(!h||a.z<s.z)&&(s.copy(a),h=!0)}return h?s:null}},56362(t,e,i){var n=i(25836),s=i(61369),r=i(3073),o=new n;t.exports=function(t,e,i,n){void 0===n&&(n=new s),Array.isArray(e)||(e=[e]);var a=!1;n.set(),o.set();for(var h=0;h<e.length;h++)r(t,e[h].points,i,o)&&(!a||o.z<n.z)&&(n.set(o.x,o.y,o.z,h),a=!0);return a?n:null}},60646(t,e,i){var n=i(26099),s=i(76112),r=i(92773);t.exports=function(t,e,i){if(void 0===i&&(i=[]),r(t,e))for(var o=e.getLineA(),a=e.getLineB(),h=e.getLineC(),l=e.getLineD(),u=[new n,new n,new n,new n],d=[s(o,t,u[0]),s(a,t,u[1]),s(h,t,u[2]),s(l,t,u[3])],c=0;c<4;c++)d[c]&&i.push(u[c]);return i}},71147(t,e,i){var n=i(61369),s=i(56362),r=new(i(23031));function o(t,e,i,o,a){var h=Math.cos(t),l=Math.sin(t);r.setTo(e,i,e+h,i+l);var u=s(r,o,!0);u&&a.push(new n(u.x,u.y,t,u.w))}function a(t,e){return t.z-e.z}t.exports=function(t,e,i){Array.isArray(i)||(i=[i]);for(var n=[],s=[],r=0;r<i.length;r++)for(var h=i[r].points,l=0;l<h.length;l++){var u=Math.atan2(h[l].y-e,h[l].x-t);-1===s.indexOf(u)&&(o(u,t,e,i,n),o(u-1e-5,t,e,i,n),o(u+1e-5,t,e,i,n),s.push(u))}return n.sort(a)}},68389(t,e,i){var n=i(87841),s=i(59996);t.exports=function(t,e,i){return void 0===i&&(i=new n),s(t,e)&&(i.x=Math.max(t.x,e.x),i.y=Math.max(t.y,e.y),i.width=Math.min(t.right,e.right)-i.x,i.height=Math.min(t.bottom,e.bottom)-i.y),i}},52784(t,e,i){var n=i(60646),s=i(59996);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e)){var r=t.getLineA(),o=t.getLineB(),a=t.getLineC(),h=t.getLineD();n(r,e,i),n(o,e,i),n(a,e,i),n(h,e,i)}return i}},26341(t,e,i){var n=i(89265),s=i(60646);t.exports=function(t,e,i){if(void 0===i&&(i=[]),n(t,e)){var r=e.getLineA(),o=e.getLineB(),a=e.getLineC();s(r,t,i),s(o,t,i),s(a,t,i)}return i}},38720(t,e,i){var n=i(4042),s=i(67636);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e)){var r=t.getLineA(),o=t.getLineB(),a=t.getLineC();n(r,e,i),n(o,e,i),n(a,e,i)}return i}},13882(t,e,i){var n=i(26099),s=i(2822),r=i(76112);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e))for(var o=t.getLineA(),a=t.getLineB(),h=t.getLineC(),l=[new n,new n,new n],u=[r(o,e,l[0]),r(a,e,l[1]),r(h,e,l[2])],d=0;d<3;d++)u[d]&&i.push(l[d]);return i}},75636(t,e,i){var n=i(82944),s=i(13882);t.exports=function(t,e,i){if(void 0===i&&(i=[]),n(t,e)){var r=e.getLineA(),o=e.getLineB(),a=e.getLineC();s(t,r,i),s(t,o,i),s(t,a,i)}return i}},80462(t,e,i){var n=i(87902),s=new(i(26099));t.exports=function(t,e,i){if(void 0===i&&(i=s),n(e,t.x1,t.y1))return i.x=t.x1,i.y=t.y1,!0;if(n(e,t.x2,t.y2))return i.x=t.x2,i.y=t.y2,!0;var r=t.x2-t.x1,o=t.y2-t.y1,a=e.x-t.x1,h=e.y-t.y1,l=r*r+o*o,u=r,d=o;if(l>0){var c=(a*r+h*o)/l;u*=c,d*=c}return i.x=t.x1+u,i.y=t.y1+d,u*u+d*d<=l&&u*r+d*o>=0&&n(e,i.x,i.y)}},76112(t){t.exports=function(t,e,i){var n=t.x1,s=t.y1,r=t.x2,o=t.y2,a=e.x1,h=e.y1,l=e.x2,u=e.y2;if(n===r&&s===o||a===l&&h===u)return!1;var d=(u-h)*(r-n)-(l-a)*(o-s);if(0===d)return!1;
1var c=((l-a)*(s-h)-(u-h)*(n-a))/d,f=((r-n)*(s-h)-(o-s)*(n-a))/d;return!(c<0)&&!(c>1)&&!(f<0)&&!(f>1)&&(i&&(i.x=n+c*(r-n),i.y=s+c*(o-s)),!0)}},92773(t){t.exports=function(t,e){var i=t.x1,n=t.y1,s=t.x2,r=t.y2,o=e.x,a=e.y,h=e.right,l=e.bottom,u=0;if(i>=o&&i<=h&&n>=a&&n<=l||s>=o&&s<=h&&r>=a&&r<=l)return!0;if(i<o&&s>=o){if((u=n+(r-n)*(o-i)/(s-i))>a&&u<=l)return!0}else if(i>h&&s<=h&&(u=n+(r-n)*(h-i)/(s-i))>=a&&u<=l)return!0;if(n<a&&r>=a){if((u=i+(s-i)*(a-n)/(r-n))>=o&&u<=h)return!0}else if(n>l&&r<=l&&(u=i+(s-i)*(l-n)/(r-n))>=o&&u<=h)return!0;return!1}},16204(t){t.exports=function(t,e,i){void 0===i&&(i=1);var n=e.x1,s=e.y1,r=e.x2,o=e.y2,a=t.x,h=t.y,l=(r-n)*(r-n)+(o-s)*(o-s);if(0===l)return!1;var u=((a-n)*(r-n)+(h-s)*(o-s))/l;return u<0?Math.sqrt((n-a)*(n-a)+(s-h)*(s-h))<=i:u>=0&&u<=1?Math.abs(((s-h)*(r-n)-(n-a)*(o-s))/l)*Math.sqrt(l)<=i:Math.sqrt((r-a)*(r-a)+(o-h)*(o-h))<=i}},14199(t,e,i){var n=i(16204);t.exports=function(t,e){if(!n(t,e))return!1;var i=Math.min(e.x1,e.x2),s=Math.max(e.x1,e.x2),r=Math.min(e.y1,e.y2),o=Math.max(e.y1,e.y2);return t.x>=i&&t.x<=s&&t.y>=r&&t.y<=o}},59996(t){t.exports=function(t,e){return!(t.width<=0)&&!(t.height<=0)&&!(e.width<=0)&&!(e.height<=0)&&!(t.right<e.x||t.bottom<e.y||t.x>e.right||t.y>e.bottom)}},89265(t,e,i){var n=i(76112),s=i(37303),r=i(48653),o=i(77493);t.exports=function(t,e){if(e.left>t.right||e.right<t.left||e.top>t.bottom||e.bottom<t.top)return!1;var i=e.getLineA(),a=e.getLineB(),h=e.getLineC();if(s(t,i.x1,i.y1)||s(t,i.x2,i.y2)||s(t,a.x1,a.y1)||s(t,a.x2,a.y2)||s(t,h.x1,h.y1)||s(t,h.x2,h.y2))return!0;var l=t.getLineA(),u=t.getLineB(),d=t.getLineC(),c=t.getLineD();return!!(n(i,l)||n(i,u)||n(i,d)||n(i,c)||n(a,l)||n(a,u)||n(a,d)||n(a,c)||n(h,l)||n(h,u)||n(h,d)||n(h,c))||r(e,o(t),!0).length>0}},84411(t){t.exports=function(t,e,i,n,s,r){return void 0===r&&(r=0),!(e>t.right+r||i<t.left-r||n>t.bottom+r||s<t.top-r)}},67636(t,e,i){var n=i(80462),s=i(10690);t.exports=function(t,e){return!(t.left>e.right)&&!(t.right<e.left)&&!(t.top>e.bottom)&&!(t.bottom<e.top)&&!!(s(t,e.x,e.y)||n(t.getLineA(),e)||n(t.getLineB(),e)||n(t.getLineC(),e))}},2822(t,e,i){var n=i(76112);t.exports=function(t,e){return!!(t.contains(e.x1,e.y1)||t.contains(e.x2,e.y2)||n(t.getLineA(),e)||n(t.getLineB(),e)||n(t.getLineC(),e))}},82944(t,e,i){var n=i(48653),s=i(71694),r=i(76112);t.exports=function(t,e){if(t.left>e.right||t.right<e.left||t.top>e.bottom||t.bottom<e.top)return!1;var i=t.getLineA(),o=t.getLineB(),a=t.getLineC(),h=e.getLineA(),l=e.getLineB(),u=e.getLineC();if(r(i,h)||r(i,l)||r(i,u)||r(o,h)||r(o,l)||r(o,u)||r(a,h)||r(a,l)||r(a,u))return!0;var d=s(t),c=n(e,d,!0);return!!(c.length>0)||!!((c=n(t,d=s(e),!0)).length>0)}},91865(t,e,i){t.exports={CircleToCircle:i(2044),CircleToRectangle:i(81491),GetCircleToCircle:i(63376),GetCircleToRectangle:i(97439),GetLineToCircle:i(4042),GetLineToLine:i(36100),GetLineToPoints:i(3073),GetLineToPolygon:i(56362),GetLineToRectangle:i(60646),GetRaysFromPointToPolygon:i(71147),GetRectangleIntersection:i(68389),GetRectangleToRectangle:i(52784),GetRectangleToTriangle:i(26341),GetTriangleToCircle:i(38720),GetTriangleToLine:i(13882),GetTriangleToTriangle:i(75636),LineToCircle:i(80462),LineToLine:i(76112),LineToRectangle:i(92773),PointToLine:i(16204),PointToLineSegment:i(14199),RectangleToRectangle:i(59996),RectangleToTriangle:i(89265),RectangleToValues:i(84411),TriangleToCircle:i(67636),TriangleToLine:i(2822),TriangleToTriangle:i(82944)}},91938(t){t.exports=function(t){return Math.atan2(t.y2-t.y1,t.x2-t.x1)}},84993(t){t.exports=function(t,e,i){void 0===e&&(e=1),void 0===i&&(i=[]);var n=Math.round(t.x1),s=Math.round(t.y1),r=Math.round(t.x2),o=Math.round(t.y2),a=Math.abs(r-n),h=Math.abs(o-s),l=n<r?1:-1,u=s<o?1:-1,d=a-h;i.push({x:n,y:s});for(var c=1;n!==r||s!==o;){var f=d<<1;f>-h&&(d-=h,n+=l),f<a&&(d+=a,s+=u),c%e==0&&i.push({x:n,y:s}),c++}return i}},36469(t){t.exports=function(t,e,i){var n=e-(t.x1+t.x2)/2,s=i-(t.y1+t.y2)/2;return t.x1+=n,t.y1+=s,t.x2+=n,t.y2+=s,t}},31116(t,e,i){var n=i(23031);t.exports=function(t){return new n(t.x1,t.y1,t.x2,t.y2)}},59944(t){t.exports=function(t,e){return e.setTo(t.x1,t.y1,t.x2,t.y2)}},59220(t){t.exports=function(t,e){return t.x1===e.x1&&t.y1===e.y1&&t.x2===e.x2&&t.y2===e.y2}},78177(t,e,i){var n=i(35001);
vendor: 4,401 bytes, line 1
1t.exports=function(t,e,i){void 0===i&&(i=e);var s=n(t),r=t.x2-t.x1,o=t.y2-t.y1;return e&&(t.x1=t.x1-r/s*e,t.y1=t.y1-o/s*e),i&&(t.x2=t.x2+r/s*i,t.y2=t.y2+o/s*i),t}},26708(t,e,i){var n=i(52816),s=i(6113),r=i(26099);t.exports=function(t,e,i,o,a){void 0===o&&(o=0),void 0===a&&(a=[]);var h,l,u=[],d=t.x1,c=t.y1,f=t.x2-d,p=t.y2-c,g=s(e,a),m=i-1;for(h=0;h<m;h++)l=g(h/m),u.push(new r(d+f*l,c+p*l));if(l=g(1),u.push(new r(d+f*l,c+p*l)),!(o>0))return u;var v=u[0],x=[v];for(h=1;h<u.length-1;h++){var y=u[h];n(v,y)>=o&&(x.push(y),v=y)}var T=u[u.length-1];return n(v,T)<o&&x.pop(),x.push(T),x}},32125(t,e,i){var n=i(26099);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=(t.x1+t.x2)/2,e.y=(t.y1+t.y2)/2,e}},99569(t,e,i){var n=i(26099);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=t.x1,r=t.y1,o=t.x2,a=t.y2,h=(o-s)*(o-s)+(a-r)*(a-r);if(0===h)return i;var l=((e.x-s)*(o-s)+(e.y-r)*(a-r))/h;return i.x=s+l*(o-s),i.y=r+l*(a-r),i}},34638(t,e,i){var n=i(36383),s=i(91938),r=i(26099);t.exports=function(t,e){void 0===e&&(e=new r);var i=s(t)-n.PI_OVER_2;return e.x=Math.cos(i),e.y=Math.sin(i),e}},13151(t,e,i){var n=i(26099);t.exports=function(t,e,i){return void 0===i&&(i=new n),i.x=t.x1+(t.x2-t.x1)*e,i.y=t.y1+(t.y2-t.y1)*e,i}},15258(t,e,i){var n=i(35001),s=i(26099);t.exports=function(t,e,i,r){void 0===r&&(r=[]),!e&&i>0&&(e=n(t)/i);for(var o=t.x1,a=t.y1,h=t.x2,l=t.y2,u=0;u<e;u++){var d=u/e,c=o+(h-o)*d,f=a+(l-a)*d;r.push(new s(c,f))}return r}},26408(t){t.exports=function(t,e){var i=t.x1,n=t.y1,s=t.x2,r=t.y2,o=(s-i)*(s-i)+(r-n)*(r-n);return 0!==o&&Math.abs(((n-e.y)*(s-i)-(i-e.x)*(r-n))/o)*Math.sqrt(o)}},98770(t){t.exports=function(t){return Math.abs(t.y1-t.y2)}},35001(t){t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},23031(t,e,i){var n=i(83419),s=i(13151),r=i(15258),o=i(23777),a=i(65822),h=i(26099);t.exports=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.type=o.LINE,this.x1=t,this.y1=e,this.x2=i,this.y2=n},getPoint:function(t,e){return s(this,t,e)},getPoints:function(t,e,i){return r(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this},setFromObjects:function(t,e){return this.x1=t.x,this.y1=t.y,this.x2=e.x,this.y2=e.y,this},getPointA:function(t){return void 0===t&&(t=new h),t.set(this.x1,this.y1),t},getPointB:function(t){return void 0===t&&(t=new h),t.set(this.x2,this.y2),t},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(t){this.x1<=this.x2?this.x1=t:this.x2=t}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(t){this.x1>this.x2?this.x1=t:this.x2=t}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(t){this.y1<=this.y2?this.y1=t:this.y2=t}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(t){this.y1>this.y2?this.y1=t:this.y2=t}}})},64795(t,e,i){var n=i(36383),s=i(15994),r=i(91938);t.exports=function(t){return s(r(t)-n.PI_OVER_2,-Math.PI,Math.PI)}},52616(t,e,i){var n=i(36383),s=i(91938);t.exports=function(t){return Math.cos(s(t)-n.PI_OVER_2)}},87231(t,e,i){var n=i(36383),s=i(91938);t.exports=function(t){return Math.sin(s(t)-n.PI_OVER_2)}},89662(t){t.exports=function(t,e,i){return t.x1+=e,t.y1+=i,t.x2+=e,t.y2+=i,t}},71165(t){t.exports=function(t){return-((t.x2-t.x1)/(t.y2-t.y1))}},65822(t,e,i){var n=i(26099);t.exports=function(t,e){void 0===e&&(e=new n);var i=Math.random();return e.x=t.x1+i*(t.x2-t.x1),e.y=t.y1+i*(t.y2-t.y1),e}},69777(t,e,i){var n=i(91938),s=i(64795);t.exports=function(t,e){return 2*s(e)-Math.PI-n(t)}},39706(t,e,i){var n=i(64400);t.exports=function(t,e){var i=(t.x1+t.x2)/2,s=(t.y1+t.y2)/2;return n(t,i,s,e)}},82585(t,e,i){var n=i(64400);t.exports=function(t,e,i){return n(t,e.x,e.y,i)}},64400(t){t.exports=function(t,e,i,n){var s=Math.cos(n),r=Math.sin(n),o=t.x1-e,a=t.y1-i;return t.x1=o*s-a*r+e,t.y1=o*r+a*s+i,o=t.x2-e,a=t.y2-i,t.x2=o*s-a*r+e,t.y2=o*r+a*s+i,t}},62377(t){t.exports=function(t,e,i,n,s){return t.x1=e,t.y1=i,t.x2=e+Math.cos(n)*s,t.y2=i+Math.sin(n)*s,t}},71366(t){t.exports=function(t){return(t.y2-t.y1)/(t.x2-t.x1)}},10809(t){t.exports=function(t){return Math.abs(t.x1-t.x2)}},2529(t,e,i){var n=i(23031);n.Angle=i(91938),n.BresenhamPoints=i(84993),n.CenterOn=i(36469),n.Clone=i(31116),n.
1CopyFrom=i(59944),n.Equals=i(59220),n.Extend=i(78177),n.GetEasedPoints=i(26708),n.GetMidPoint=i(32125),n.GetNearestPoint=i(99569),n.GetNormal=i(34638),n.GetPoint=i(13151),n.GetPoints=i(15258),n.GetShortestDistance=i(26408),n.Height=i(98770),n.Length=i(35001),n.NormalAngle=i(64795),n.NormalX=i(52616),n.NormalY=i(87231),n.Offset=i(89662),n.PerpSlope=i(71165),n.Random=i(65822),n.ReflectAngle=i(69777),n.Rotate=i(39706),n.RotateAroundPoint=i(82585),n.RotateAroundXY=i(64400),n.SetToAngle=i(62377),n.Slope=i(71366),n.Width=i(10809),t.exports=n},12306(t,e,i){var n=i(25717);t.exports=function(t){return new n(t.points)}},63814(t){t.exports=function(t,e,i){for(var n=!1,s=-1,r=t.points.length-1;++s<t.points.length;r=s){var o=t.points[s].x,a=t.points[s].y,h=t.points[r].x,l=t.points[r].y;(a<=i&&i<l||l<=i&&i<a)&&e<(h-o)*(i-a)/(l-a)+o&&(n=!n)}return n}},99338(t,e,i){var n=i(63814);t.exports=function(t,e){return n(t,e.x,e.y)}},94811(t){function e(t,e,u){u=u||2;var d,p,m,v,x,y,T,w=e&&e.length,b=w?e[0]*u:t.length,S=i(t,0,b,u,!0),C=[];if(!S||S.next===S.prev)return C;if(w&&(S=function(t,e,r,h){var l,u,d,p,g,m=[];for(l=0,u=e.length;l<u;l++)d=e[l]*h,p=l<u-1?e[l+1]*h:t.length,(g=i(t,d,p,h,!1))===g.next&&(g.steiner=!0),m.push(function(t){var e=t,i=t;do(e.x<i.x||e.x===i.x&&e.y<i.y)&&(i=e),e=e.next;while(e!==t);return i}(g));for(m.sort(s),l=0;l<m.length;l++)r=function(t,e){var i=function(t,e){var i,n,s,r=e,h=t.x,l=t.y,u=-1/0;do{if(l<=r.y&&l>=r.next.y&&r.next.y!==r.y){var d=r.x+(l-r.y)*(r.next.x-r.x)/(r.next.y-r.y
1);if(d<=h&&d>u&&(u=d,s=r.x<r.next.x?r:r.next,d===h))return s}r=r.next}while(r!==e);if(!s)return null;var f,p=s,g=s.x,m=s.y,v=1/0;r=s;do{h>=r.x&&r.x>=g&&h!==r.x&&o(l<m?h:u,l,g,m,l<m?u:h,l,r.x,r.y)&&(f=Math.abs(l-r.y)/(h-r.x),c(r,t)&&(f<v||f===v&&(r.x>s.x||r.x===s.x&&(i=s,n=r,0>a(i.prev,i,n.prev)&&0>a(n.next,i,i.next))))&&(s=r,v=f)),r=r.next}while(r!==p);return s}(t,e);if(!i)return e;var s=f(i,t);return n(s,s.next),n(i,i.next)}(m[l],r);return r}(t,e,S,u)),t.length>80*u){d=m=t[0],p=v=t[1];for(var E=u;E<b;E+=u)x=t[E],y=t[E+1],x<d&&(d=x),y<p&&(p=y),x>m&&(m=x),y>v&&(v=y);T=0!==(T=Math.max(m-d,v-p))?32767/T:0}return function t(e,i,s,u,d,p,m){if(e){!m&&p&&function(t,e,i,n){var s=t;do 0===s.z&&(s.z=r(s.x,s.y,e,i,n)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next;while(s!==t);s.prevZ.nextZ=null,s.prevZ=null,function(t){var e,i,n,s,r,o,a,h,l=1;do{for(i=t,t=null,r=null,o=0;i;){for(o++,n=i,a=0,e=0;e<l&&(a++,n=n.nextZ);e++);for(h=l;a>0||h>0&&n;)0!==a&&(0===h||!n||i.z<=n.z)?(s=i,i=i.nextZ,a--):(s=n,n=n.nextZ,h--),r?r.nextZ=s:t=s,s.prevZ=r,r=s;i=n}r.nextZ=null,l*=2}while(o>1)}(s)}(e,u,d,p);for(var v,x,y=e;e.prev!==e.next;){if(v=e.prev,x=e.next,p?function(t,e,i,n){var s=t.prev,h=t.next;if(a(s,t,h)>=0)return!1;for(var l=s.x,u=t.x,d=h.x,c=s.y,f=t.y,p=h.y,g=l<u?l<d?l:d:u<d?u:d,m=c<f?c<p?c:p:f<p?f:p,v=l>u?l>d?l:d:u>d?u:d,x=c>f?c>p?c:p:f>p?f:p,y=r(g,m,e,i,n),T=r(v,x,e,i,n),w=t.prevZ,b=t.nextZ;w&&w.z>=y&&b&&b.z<=T;){if(w.x>=g&&w.x<=v&&w.y>=m&&w.y<=x&&w!==s&&w!==h&&o(l,c,u,f,d,p,w.x,w.y)&&a(w.prev,w,w.next)>=0||(w=w.prevZ,b.x>=g&&b.x<=v&&b.y>=m&&b.y<=x&&b!==s&&b!==h&&o(l,c,u,f,d,p,b.x,b.y)&&a(b.prev,b,b.next)>=0))return!1;b=b.nextZ}for(;w&&w.z>=y;){if(w.x>=g&&w.x<=v&&w.y>=m&&w.y<=x&&w!==s&&w!==h&&o(l,c,u,f,d,p,w.x,w.y)&&a(w.prev,w,w.next)>=0)return!1;w=w.prevZ}for(;b&&b.z<=T;){if(b.x>=g&&b.x<=v&&b.y>=m&&b.y<=x&&b!==s&&b!==h&&o(l,c,u,f,d,p,b.x,b.y)&&a(b.prev,b,b.next)>=0)return!1;b=b.nextZ}return!0}(e,u,d,p):function(t){var e=t.prev,i=t.next;if(a(e,t,i)>=0)return!1;for(var n=e.x,s=t.x,r=i.x,h=e.y,l=t.y,u=i.y,d=n<s?n<r?n:r:s<r?s:r,c=h<l?h<u?h:u:l<u?l:u,f=n>s?n>r?n:r:s>r?s:r,p=h>l?h>u?h:u:l>u?l:u,g=i.next;g!==e;){if(g.x>=d&&g.x<=f&&g.y>=c&&g.y<=p&&o(n,h,s,l,r,u,g.x,g.y)&&a(g.prev,g,g.next)>=0)return!1;g=g.next}return!0}(e)){i.push(v.i/s|0),i.push(e.i/s|0),i.push(x.i/s|0),g(e),e=x.next,y=x.next;continue}if((e=x)===y){m?1===m?t(e=function(t,e,i){var s=t;do{var r=s.prev,o=s.next.next;!h(r,o)&&l(r,s,s.next,o)&&c(r,o)&&c(o,r)&&(e.push(r.i/i|0),e.push(s.i/i|0),e.push(o.i/i|0),g(s),g(s.next),s=t=o),s=s.next}while(s!==t);return n(s)}(n(e),i,s),i,s,u,d,p,2):2===m&&function(e,i,s,r,o,u){var d=e;do{for(var p,g,m=d.next.next;m!==d.prev;){if(d.i!==m.i&&(p=d,g=m,p.next.i!==g.i&&p.prev.i!==g.i&&!function(t,e){var i=t;do{if(i.i!==t.i&&i.next.i!==t.i&&i.i!==e.i&&i.next.i!==e.i&&l(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(p,g)&&(c(p,g)&&c(g,p)&&function(t,e){var i=t,n=!1,s=(t.x+e.x)/2,r=(t.y+e.y)/2;do i.y>r!=i.next.y>r&&i.next.y!==i.y&&s<(i.next.x-i.x)*(r-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next;while(i!==t);return n}(p,g)&&(a(p.prev,p,g.prev)||a(p,g.prev,g))||h(p,g)&&a(p.prev,p,p.next)>0&&a(g.prev,g,g.next)>0))){var v=f(d,m);d=n(d,d.next),v=n(v,v.next),t(d,i,s,r,o,u,0),t(v,i,s,r,o,u,0);return}m=m.next}d=d.next}while(d!==e)}(e,i,s,u,d,p):t(n(e),i,s,u,d,p,1);break}}}}(S,C,u,d,p,T,0),C}function i(t,e,i,n,s){var r,o;if(s===v(t,e,i,n)>0)for(r=e;r<i;r+=n)o=p(r,t[r],t[r+1],o);else for(r=i-n;r>=e;r-=n)o=p(r,t[r],t[r+1],o);return o&&h(o,o.next)&&(g(o),o=o.next),o}function n(t,e){if(!t)return t;e||(e=t);var i,n=t;do if(i=!1,!n.steiner&&(h(n,n.next)||0===a(n.prev,n,n.next))){if(g(n),(n=e=n.prev)===n.next)break;i=!0}else n=n.next;while(i||n!==e);return e}function s(t,e){return t.x-e.x}function r(t,e,i,n,s){return(t=((t=((t=((t=((t=(t-i)*s|0)|t<<8)&0xff00ff)|t<<4)&0xf0f0f0f)|t<<2)&0x33333333)|t<<1)&0x55555555)|(e=((e=((e=((e=((e=(e-n)*s|0)|e<<8)&0xff00ff)|e<<4)&0xf0f0f0f)|e<<2)&0x33333333)|e<<1)&0x55555555)<<1}function o(t,e,i,n,s,r,o,a){return(s-o)*(e-a)>=(t-o)*(r-a)&&(t-o)*(n-a)>=(i-o)*(e-a)&&(i-o)*(r-a)>=(s-o)*(n-a)}function a(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function h(t,e){return t.x===e.x&&t.y===e.y}function l(t,e,i,n){var s=d(a(t,e,i)),r=d(a(t,e,n)),o=d(a(i,n,t)),h=d(a(i,n,e));return!!(s!==r&&o!==h||0===s&&u(t,i,e)||0===r&&u(t,n,e)||0===o&&u(i,t,n)||0===h&&u(i,e,n))}function u(t,e,i){return e.x<=Math.max(t.x,i.x)&&e.x>=Math.min(t.x,i.x)&&e.y<=Math.max(t.y,i.y)&&e.y>=Math.min(t.y,i.y)}function d(t){return t>0?1:t<0?-1:0}function c(t,e){return 0>a(t.prev,t,t.next)?a(t,e,t.next)>=0&&a(t,t.prev,e)>=0:0>a(t,e,t.prev)||0>a(t,t.next,e)}function f(t,e){var i=new m(t.i,t.x,t.y),n=new m(e.i,e.x,e.y),s=t.next,r=e.prev;return t.next=e,e.prev=t,i.next=s,s.prev=i,n.next=i,i.prev=n,r.next=n,n.prev=r,n}
1function p(t,e,i,n){var s=new m(t,e,i);return n?(s.next=n.next,s.prev=n,n.next.prev=s,n.next=s):(s.prev=s,s.next=s),s}function g(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function m(t,e,i){this.i=t,this.x=e,this.y=i,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function v(t,e,i,n){for(var s=0,r=e,o=i-n;r<i;r+=n)s+=(t[o]-t[r])*(t[r+1]+t[o+1]),o=r;return s}e.deviation=function(t,e,i,n){var s=e&&e.length,r=s?e[0]*i:t.length,o=Math.abs(v(t,0,r,i));if(s)for(var a=0,h=e.length;a<h;a++){var l=e[a]*i,u=a<h-1?e[a+1]*i:t.length;o-=Math.abs(v(t,l,u,i))}var d=0;for(a=0;a<n.length;a+=3){var c=n[a]*i,f=n[a+1]*i,p=n[a+2]*i;d+=Math.abs((t[c]-t[p])*(t[f+1]-t[c+1])-(t[c]-t[f])*(t[p+1]-t[c+1]))}return 0===o&&0===d?0:Math.abs((d-o)/o)},e.flatten=function(t){for(var e=t[0][0].length,i={vertices:[],holes:[],dimensions:e},n=0,s=0;s<t.length;s++){for(var r=0;r<t[s].length;r++)for(var o=0;o<e;o++)i.vertices.push(t[s][r][o]);s>0&&(n+=t[s-1].length,i.holes.push(n))}return i},t.exports=e},13829(t,e,i){var n=i(87841);t.exports=function(t,e){void 0===e&&(e=new n);for(var i,s=1/0,r=1/0,o=-1/0,a=-1/0,h=0;h<t.points.length;h++)s=Math.min(s,(i=t.points[h]).x),r=Math.min(r,i.y),o=Math.max(o,i.x),a=Math.max(a,i.y);return e.x=s,e.y=r,e.width=o-s,e.height=a-r,e}},26173(t){t.exports=function(t,e){void 0===e&&(e=[]);for(var i=0;i<t.points.length;i++)e.push(t.points[i].x),e.push(t.points[i].y);return e}},9564(t,e,i){var n=i(35001),s=i(23031),r=i(30052);t.exports=function(t,e,i,o){void 0===o&&(o=[]);var a=t.points,h=r(t);!e&&i>0&&(e=h/i);for(var l=0;l<e;l++)for(var u=l/e*h,d=0,c=0;c<a.length;c++){var f=a[c],p=a[(c+1)%a.length],g=new s(f.x,f.y,p.x,p.y),m=n(g);if(u<d||u>d+m){d+=m;continue}var v=g.getPoint((u-d)/m);o.push(v);break}return o}},30052(t,e,i){var n=i(35001),s=i(23031);t.exports=function(t){for(var e=t.points,i=0,r=0;r<e.length;r++){var o=e[r],a=e[(r+1)%e.length];i+=n(new s(o.x,o.y,a.x,a.y))}return i}},25717(t,e,i){var n=i(83419),s=i(63814),r=i(9564),o=i(23777);t.exports=new n({initialize:function(t){this.type=o.POLYGON,this.area=0,this.points=[],t&&this.setTo(t)},contains:function(t,e){return s(this,t,e)},setTo:function(t){if(this.area=0,this.points=[],"string"==typeof t&&(t=t.split(" ")),!Array.isArray(t))return this;for(var e,i=0;i<t.length;i++)e={x:0,y:0},"number"==typeof t[i]||"string"==typeof t[i]?(e.x=parseFloat(t[i]),e.y=parseFloat(t[i+1]),i++):Array.isArray(t[i])?(e.x=t[i][0],e.y=t[i][1]):(e.x=t[i].x,e.y=t[i].y),this.points.push(e);return this.calculateArea(),this},calculateArea:function(){if(this.points.length<3)return this.area=0,this.area;for(var t,e,i=0,n=0;n<this.points.length-1;n++)t=this.points[n],i+=((e=this.points[n+1]).x-t.x)*(t.y+e.y);return t=this.points[0],e=this.points[this.points.length-1],i+=(t.x-e.x)*(e.y+t.y),this.area=-(.5*i),this.area},getPoints:function(t,e,i){return r(this,t,e,i)}})},8133(t){t.exports=function(t){return t.points.reverse(),t}},29524(t){t.exports=function(t,e,i){void 0===e&&(e=1),void 0===i&&(i=!1);var n=t.points;if(n.length>2){var s,r,o,a=e*e;i||(n=function(t,e){for(var i,n=t[0],s=[n],r=1,o=t.length;r<o;r++)(function(t,e){var i=t.x-e.x,n=t.y-e.y;return i*i+n*n})(i=t[r],n)>e&&(s.push(i),n=i);return n!==i&&s.push(i),s}(n,a)),t.setTo((r=(s=n).length-1,o=[s[0]],!function t(e,i,n,s,r){for(var o,a=s,h=i+1;h<n;h++){var l=function(t,e,i){var n=e.x,s=e.y,r=i.x-n,o=i.y-s;if(0!==r||0!==o){var a=((t.x-n)*r+(t.y-s)*o)/(r*r+o*o);a>1?(n=i.x,s=i.y):a>0&&(n+=r*a,s+=o*a)}return(r=t.x-n)*r+(o=t.y-s)*o}(e[h],e[i],e[n]);l>a&&(o=h,a=l)}a>s&&(o-i>1&&t(e,i,o,s,r),r.push(e[o]),n-o>1&&t(e,o,n,s,r))}(s,0,r,a,o),o.push(s[r]),o))}return t}},5469(t){var e=function(t,e){return t[0]=e[0],t[1]=e[1],t};t.exports=function(t){var i,n=[],s=t.points;for(i=0;i<s.length;i++)n.push([s[i].x,s[i].y]);var r=[];for(n.length>0&&r.push(e([0,0],n[0])),i=0;i<n.length-1;i++){var o=n[i],a=n[i+1],h=o[0],l=o[1],u=a[0],d=a[1];r.push([.85*h+.15*u,.85*l+.15*d]),r.push([.15*h+.85*u,.15*l+.85*d])}return n.length>1&&r.push(e([0,0],n[n.length-1])),t.setTo(r)}}
vendor: 9,080 bytes, line 1
1,24709(t){t.exports=function(t,e,i){for(var n=t.points,s=0;s<n.length;s++)n[s].x+=e,n[s].y+=i;return t}},58423(t,e,i){var n=i(25717);n.Clone=i(12306),n.Contains=i(63814),n.ContainsPoint=i(99338),n.Earcut=i(94811),n.GetAABB=i(13829),n.GetNumberArray=i(26173),n.GetPoints=i(9564),n.Perimeter=i(30052),n.Reverse=i(8133),n.Simplify=i(29524),n.Smooth=i(5469),n.Translate=i(24709),t.exports=n},39843(t){t.exports=function(t){return t.width*t.height}},98615(t){t.exports=function(t){return t.x=Math.ceil(t.x),t.y=Math.ceil(t.y),t}},31688(t){t.exports=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}},67502(t){t.exports=function(t,e,i){return t.x=e-t.width/2,t.y=i-t.height/2,t}},65085(t,e,i){var n=i(87841);t.exports=function(t){return new n(t.x,t.y,t.width,t.height)}},37303(t){t.exports=function(t,e,i){return!(t.width<=0)&&!(t.height<=0)&&t.x<=e&&t.x+t.width>=e&&t.y<=i&&t.y+t.height>=i}},96553(t,e,i){var n=i(37303);t.exports=function(t,e){return n(t,e.x,e.y)}},70273(t){t.exports=function(t,e){return!(e.width*e.height>t.width*t.height)&&e.x>t.x&&e.x<t.right&&e.right>t.x&&e.right<t.right&&e.y>t.y&&e.y<t.bottom&&e.bottom>t.y&&e.bottom<t.bottom}},43459(t){t.exports=function(t,e){return e.setTo(t.x,t.y,t.width,t.height)}},77493(t){t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x,y:t.y}),e.push({x:t.right,y:t.y}),e.push({x:t.right,y:t.bottom}),e.push({x:t.x,y:t.bottom}),e}},9219(t){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}},53751(t,e,i){var n=i(8249);t.exports=function(t,e){var i=n(t);return i<n(e)?t.setSize(e.height*i,e.height):t.setSize(e.width,e.width/i),t.setPosition(e.centerX-t.width/2,e.centerY-t.height/2)}},16088(t,e,i){var n=i(8249);t.exports=function(t,e){var i=n(t);return i>n(e)?t.setSize(e.height*i,e.height):t.setSize(e.width,e.width/i),t.setPosition(e.centerX-t.width/2,e.centerY-t.height/2)}},80774(t){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t}},83859(t){t.exports=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}},19217(t,e,i){var n=i(87841),s=i(36383);t.exports=function(t,e){if(void 0===e&&(e=new n),0===t.length)return e;for(var i,r,o,a=Number.MAX_VALUE,h=Number.MAX_VALUE,l=s.MIN_SAFE_INTEGER,u=s.MIN_SAFE_INTEGER,d=0;d<t.length;d++)Array.isArray(i=t[d])?(r=i[0],o=i[1]):(r=i.x,o=i.y),a=Math.min(a,r),h=Math.min(h,o),l=Math.max(l,r),u=Math.max(u,o);return e.x=a,e.y=h,e.width=l-a,e.height=u-h,e}},9477(t,e,i){var n=i(87841);t.exports=function(t,e,i,s,r){return void 0===r&&(r=new n),r.setTo(Math.min(t,i),Math.min(e,s),Math.abs(t-i),Math.abs(e-s))}},8249(t){t.exports=function(t){return 0===t.height?NaN:t.width/t.height}},27165(t,e,i){var n=i(26099);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.centerX,e.y=t.centerY,e}},20812(t,e,i){var n=i(13019),s=i(26099);t.exports=function(t,e,i){if(void 0===i&&(i=new s),e<=0||e>=1)return i.x=t.x,i.y=t.y,i;var r=n(t)*e;return e>.5?(r-=t.width+t.height)<=t.width?(i.x=t.right-r,i.y=t.bottom):(i.x=t.x,i.y=t.bottom-(r-t.width)):r<=t.width?(i.x=t.x+r,i.y=t.y):(i.x=t.right,i.y=t.y+(r-t.width)),i}},34819(t,e,i){var n=i(20812),s=i(13019);t.exports=function(t,e,i,r){void 0===r&&(r=[]),!e&&i>0&&(e=s(t)/i);for(var o=0;o<e;o++){var a=o/e;r.push(n(t,a))}return r}},51313(t,e,i){var n=i(26099);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.width,e.y=t.height,e}},86091(t,e,i){var n=i(67502);t.exports=function(t,e,i){var s=t.centerX,r=t.centerY;return t.setSize(t.width+2*e,t.height+2*i),n(t,s,r)}},53951(t,e,i){var n=i(87841),s=i(59996);t.exports=function(t,e,i){return void 0===i&&(i=new n),s(t,e)?(i.x=Math.max(t.x,e.x),i.y=Math.max(t.y,e.y),i.width=Math.min(t.right,e.right)-i.x,i.height=Math.min(t.bottom,e.bottom)-i.y):i.setEmpty(),i}},14649(t,e,i){var n=i(13019),s=i(26099);t.exports=function(t,e,i,r){if(void 0===r&&(r=[]),!e&&!i)return r;e?i=Math.round(n(t)/e):e=n(t)/i;for(var o=t.x,a=t.y,h=0,l=0;l<i;l++)switch(r.push(new s(o,a)),h){case 0:(o+=e)>=t.right&&(h=1,a+=o-t.right,o=t.right);break;case 1:(a+=e)>=t.bottom&&(h=2,o-=a-t.bottom,a=t.bottom);break;case 2:(o-=e)<=t.left&&(h=3,a-=t.left-o,o=t.left);break;case 3:(a-=e)<=t.top&&(h=0,a=t.top)}return r}},33595(t){t.exports=function(t,e){for(var i=t.x,n=t.right,s=t.y,r=t.bottom,o=0;o<e.length;o++)i=Math.min(i,e[o].x),n=Math.max(n,e[o].x),s=Math.min(s,e[o].y),r=Math.max(r,e[o].y);return t.x=i,t.y=s,t.width=n-i,t.height=r-s,t}},20074(t){t.exports=function(t,e){var i=Math.min(t.x,e.x),n=Math.max(t.right,e.right);t.x=i,t.width=n-i;var s=Math.min(t.y,e.y),r=Math.max(t.bottom,e.bottom);return t.y=s,t.height=r-s,t}},92171(t){t.exports=function(t,e,i){var n=Math.min(t.x,e),s=Math.max(t.right,e);t.x=n,t.width=s-n;var r=Math.min(t.y,i),o=Math.max(t.bottom,i);return t.y=r,t.height=o-r,t}},42981(t){t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},46907(t){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},60170(t){t.exports=function(t,e){return t.x<e.right&&t.right>e.x&&t.y<e.bottom&&t.bottom>e.y}},13019(t){t.exports=function(t){return 2*(t.width+t.height)}},85133(t,e,i){var n=i(26099),s=i(39506);t.exports=function(t,e,i){void 0===i&&(i=new n);var r=Math.sin(e=s(e)),o=Math.cos(e),a=o>0?t.width/2:-(t.width/2),h=r>0?t.height/2:-(t.height/2);return Math.abs(a*r)<Math.abs(h*o)?h=a*r/o:a=h*o/r,i.x=a+t.centerX,i.y=h+t.centerY,i}},26597(t,e,i){var n=i(26099);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.x+Math.random()*t.width,e.y=t.y+Math.random()*t.height,e}},86470(t,e,i){var n=i(30976),s=i(70273),r=i(26099);t.exports=function(t,e,i){if(void 0===i&&(i=new r),s(t,e))switch(n(0,3)){case 0:i.x=t.x+Math.random()*(e.right-t.x),i.y=t.y+Math.random()*(e.top-t.y);break;case 1:i.x=e.x+Math.random()*(t.right-e.x),i.y=e.bottom+Math.random()*(t.bottom-e.bottom);break;case 2:i.x=t.x+Math.random()*(e.x-t.x),i.y=e.y+Math.random()*(t.bottom-e.y);break;case 3:i.x=e.right+Math.random()*(t.right-e.right),i.y=t.y+Math.random()*(e.bottom-t.y)}return i}},87841(t,e,i){var n=i(83419),s=i(37303),r=i(20812),o=i(34819),a=i(23777),h=i(23031),l=i(26597);t.exports=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.type=a.RECTANGLE,this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return l(this,t)},setTo:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setEmpty:function(){return this.setTo(0,0,0,0)},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getLineA:function(t){return void 0===t&&(t=new h),t.setTo(this.x,this.y,this.right,this.y),t},getLineB:function(t){return void 0===t&&(t=new h),t.setTo(this.right,this.y,this.right,this.bottom),t},getLineC:function(t){return void 0===t&&(t=new h),t.setTo(this.right,this.bottom,this.x,this.bottom),t},getLineD:function(t){return void 0===t&&(t=new h),t.setTo(this.x,this.bottom,this.x,this.y),t},left:{get:function(){return this.x},set:function(t){t>=this.right?this.width=0:this.width=this.right-t,this.x=t}},right:{get:function(){return this.x+this.width},set:function(t){t<=this.x?this.width=0:this.width=t-this.x}},top:{get:function(){return this.y},set:function(t){t>=this.bottom?this.height=0:this.height=this.bottom-t,this.y=t}},bottom:{get:function(){return this.y+this.height},set:function(t){t<=this.y?this.height=0:this.height=t-this.y}},centerX:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}})},94845(t){t.exports=function(t,e){return t.width===e.width&&t.height===e.height}},31730(t){t.exports=function(t,e,i){return void 0===i&&(i=e),t.width*=e,t.height*=i,t}},36899(t,e,i){var n=i(87841);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=Math.min(t.x,e.x),r=Math.min(t.y,e.y),o=Math.max(t.right,e.right)-s,a=Math.max(t.bottom,e.bottom)-r;return i.setTo(s,r,o,a)}},93232(t,e,i){var n=i(87841);n.Area=i(39843),n.Ceil=i(98615),n.CeilAll=i(31688),n.CenterOn=i(67502),n.Clone=i(65085),n.Contains=i(37303),n.ContainsPoint=i(96553),n.ContainsRect=i(70273),n.CopyFrom=i(43459),n.Decompose=i(77493),n.Equals=i(9219),n.FitInside=i(53751),n.FitOutside=i(16088),n.Floor=i(80774),n.FloorAll=i(83859),n.FromPoints=i(19217),n.FromXY=i(9477),n.GetAspectRatio=i(8249),n.GetCenter=i(27165),n.GetPoint=i(20812),n.GetPoints=i(34819),n.GetSize=i(51313),n.Inflate=i(86091),n.Intersection=i(53951),n.MarchingAnts=i(14649),n.MergePoints=i(33595),n.MergeRect=i(20074),n.MergeXY=i(92171),n.Offset=i(42981),n.OffsetPoint=i(46907),n.Overlaps=i(60170),n.Perimeter=i(13019),n.PerimeterPoint=i(85133),n.Random=i(26597),n.RandomOutside=i(86470),n.SameDimensions=i(94845),n.Scale=i(31730),n.Union=i(36899),t.exp
1orts=n},41658(t){t.exports=function(t){var e=t.x1,i=t.y1,n=t.x2,s=t.y2;return Math.abs(((t.x3-e)*(s-i)-(n-e)*(t.y3-i))/2)}},39208(t,e,i){var n=i(16483);t.exports=function(t,e,i){var s=Math.sqrt(3)/2*i;return new n(t,e,t+i/2,e+s,t-i/2,e+s)}},39545(t,e,i){var n=i(94811),s=i(16483);t.exports=function(t,e,i,r,o){void 0===e&&(e=null),void 0===i&&(i=1),void 0===r&&(r=1),void 0===o&&(o=[]);for(var a,h,l,u,d,c,f,p,g,m=n(t,e),v=0;v<m.length;v+=3)a=m[v],h=m[v+1],l=m[v+2],u=t[2*a]*i,d=t[2*a+1]*r,c=t[2*h]*i,f=t[2*h+1]*r,p=t[2*l]*i,g=t[2*l+1]*r,o.push(new s(u,d,c,f,p,g));return o}},90301(t,e,i){var n=i(16483);t.exports=function(t,e,i,s){void 0===s&&(s=i);var r=e-s,o=t+i;return new n(t,e,t,r,o,e)}},23707(t,e,i){var n=i(97523),s=i(13584);t.exports=function(t,e,i,r){void 0===r&&(r=n);var o=r(t);return s(t,e-o.x,i-o.y)}},97523(t,e,i){var n=i(26099);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=(t.x1+t.x2+t.x3)/3,e.y=(t.y1+t.y2+t.y3)/3,e}},24951(t,e,i){var n=i(26099);t.exports=function(t,e){void 0===e&&(e=new n);var i,s,r=t.x3,o=t.y3,a=t.x1-r,h=t.y1-o,l=t.x2-r,u=t.y2-o,d=2*(a*u-h*l),c=(i=a*a+h*h,h*(l*l+u*u)-i*u),f=(s=a*a+h*h,a*(l*l+u*u)-s*l);return e.x=r-c/d,e.y=o+f/d,e}},85614(t,e,i){var n=i(96503);t.exports=function(t,e){void 0===e&&(e=new n);var i,s,r=t.x1,o=t.y1,a=t.x2,h=t.y2,l=t.x3,u=t.y3,d=a-r,c=h-o,f=l-r,p=u-o,g=d*(r+a)+c*(o+h),m=f*(r+l)+p*(o+u),v=2*(d*(u-h)-c*(l-a));if(1e-6>Math.abs(v)){var x=Math.min(r,a,l),y=Math.min(o,h,u);i=(Math.max(r,a,l)-x)*.5,s=(Math.max(o,h,u)-y)*.5,e.x=x+i,e.y=y+s,e.radius=Math.sqrt(i*i+s*s)}else e.x=(p*g-c*m)/v,e.y=(d*m-f*g)/v,i=e.x-r,s=e.y-o,e.radius=Math.sqrt(i*i+s*s);return e}},74422(t,e,i){var n=i(16483);t.exports=function(t){return new n(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)}},10690(t){t.exports=function(t,e,i){var n=t.x3-t.x1,s=t.y3-t.y1,r=t.x2-t.x1,o=t.y2-t.y1,a=e-t.x1,h=i-t.y1,l=n*n+s*s,u=n*r+s*o,d=n*a+s*h,c=r*r+o*o,f=r*a+o*h,p=l*c-u*u,g=0===p?0:1/p,m=(c*d-u*f)*g,v=(l*f-u*d)*g;return m>=0&&v>=0&&m+v<1}},48653(t){t.exports=function(t,e,i,n){void 0===i&&(i=!1),void 0===n&&(n=[]);for(var s,r,o,a,h,l,u=t.x3-t.x1,d=t.y3-t.y1,c=t.x2-t.x1,f=t.y2-t.y1,p=u*u+d*d,g=u*c+d*f,m=c*c+f*f,v=p*m-g*g,x=0===v?0:1/v,y=t.x1,T=t.y1,w=0;w<e.length&&(s=(m*(h=u*(o=e[w].x-y)+d*(a=e[w].y-T))-g*(l=c*o+f*a))*x,r=(p*l-g*h)*x,!(s>=0)||!(r>=0)||!(s+r<1)||(n.push({x:e[w].x,y:e[w].y}),!i));w++);return n}},96006(t,e,i){var n=i(10690);t.exports=function(t,e){return n(t,e.x,e.y)}},71326(t){t.exports=function(t,e){return e.setTo(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)}},71694(t){t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x1,y:t.y1}),e.push({x:t.x2,y:t.y2}),e.push({x:t.x3,y:t.y3}),e}},33522(t){t.exports=function(t,e){return t.x1===e.x1&&t.y1===e.y1&&t.x2===e.x2&&t.y2===e.y2&&t.x3===e.x3&&t.y3===e.y3}},20437(t,e,i){var n=i(26099),s=i(35001);t.exports=function(t,e,i){void 0===i&&(i=new n);var r=t.getLineA(),o=t.getLineB(),a=t.getLineC();if(e<=0||e>=1)return i.x=r.x1,i.y=r.y1,i;var h=s(r),l=s(o),u=s(a),d=(h+l+u)*e,c=0;return d<h?(c=d/h,i.x=r.x1+(r.x2-r.x1)*c,i.y=r.y1+(r.y2-r.y1)*c):d>h+l?(d-=h+l,c=d/u,i.x=a.x1+(a.x2-a.x1)*c,i.y=a.y1+(a.y2-a.y1)*c):(d-=h,c=d/l,i.x=o.x1+(o.x2-o.x1)*c,i.y=o.y1+(o.y2-o.y1)*c),i}},80672(t,e,i){var n=i(35001),s=i(26099);t.exports=function(t,e,i,r){void 0===r&&(r=[]);var o=t.getLineA(),a=t.getLineB(),h=t.getLineC(),l=n(o),u=n(a),d=n(h),c=l+u+d;!e&&i>0&&(e=c/i);for(var f=0;f<e;f++){var p=f/e*c,g=0,m=new s;p<l?(g=p/l,m.x=o.x1+(o.x2-o.x1)*g,m.y=o.y1+(o.y2-o.y1)*g):p>l+u?(p-=l+u,g=p/d,m.x=h.x1+(h.x2-h.x1)*g,m.y=h.y1+(h.y2-h.y1)*g):(p-=l,g=p/u,m.x=a.x1+(a.x2-a.x1)*g,m.y=a.y1+(a.y2-a.y1)*g),r.push(m)}return r}},39757(t,e,i){var n=i(26099);function s(t,e,i,n){var s=t-i,r=e-n;return Math.sqrt(s*s+r*r)}t.exports=function(t,e){void 0===e&&(e=new n);var i=t.x1,r=t.y1,o=t.x2,a=t.y2,h=t.x3,l=t.y3,u=s(h,l,o,a),d=s(i,r,h,l),c=s(o,a,i,r),f=u+d+c;return e.x=(i*u+o*d+h*c)/f,e.y=(r*u+a*d+l*c)/f,e}},13584(t){t.exports=function(t,e,i){return t.x1+=e,t.y1+=i,t.x2+=e,t.y2+=i,t.x3+=e,t.y3+=i,t}},1376(t,e,i){var n=i(35001);t.exports=function(t){var e=t.getLineA(),i=t.getLineB(),s=t.getLineC();return n(e)+n(i)+n(s)}},90260(t,e,i){var n=i(26099);t.exports=function(t,e){void 0===e&&(e=new n);var i=t.x2-t.x1,s=t.y2-t.y1,r=t.x3-t.x1,o=t.y3-t.y1,a=Math.random(),h=Math.random();return a+h>=1&&(a=1-a,h=1-h),e.x=t.x1+(i*a+r*h),e.y=t.y1+(s*a+o*h),e}},52172(t,e,i){var n=i(99614),s=i(39757);t.exports=function(t,e){var i=s(t);return n(t,i.x,i.y,e)}},49907(t,e,i){var n=i(99614);
vendor: 4,834 bytes, line 1
1t.exports=function(t,e,i){return n(t,e.x,e.y,i)}},99614(t){t.exports=function(t,e,i,n){var s=Math.cos(n),r=Math.sin(n),o=t.x1-e,a=t.y1-i;return t.x1=o*s-a*r+e,t.y1=o*r+a*s+i,o=t.x2-e,a=t.y2-i,t.x2=o*s-a*r+e,t.y2=o*r+a*s+i,o=t.x3-e,a=t.y3-i,t.x3=o*s-a*r+e,t.y3=o*r+a*s+i,t}},16483(t,e,i){var n=i(83419),s=i(10690),r=i(20437),o=i(80672),a=i(23777),h=i(23031),l=i(90260);t.exports=new n({initialize:function(t,e,i,n,s,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=0),this.type=a.TRIANGLE,this.x1=t,this.y1=e,this.x2=i,this.y2=n,this.x3=s,this.y3=r},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return l(this,t)},setTo:function(t,e,i,n,s,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this.x3=s,this.y3=r,this},getLineA:function(t){return void 0===t&&(t=new h),t.setTo(this.x1,this.y1,this.x2,this.y2),t},getLineB:function(t){return void 0===t&&(t=new h),t.setTo(this.x2,this.y2,this.x3,this.y3),t},getLineC:function(t){return void 0===t&&(t=new h),t.setTo(this.x3,this.y3,this.x1,this.y1),t},left:{get:function(){return Math.min(this.x1,this.x2,this.x3)},set:function(t){var e=0;e=this.x1<=this.x2&&this.x1<=this.x3?this.x1-t:this.x2<=this.x1&&this.x2<=this.x3?this.x2-t:this.x3-t,this.x1-=e,this.x2-=e,this.x3-=e}},right:{get:function(){return Math.max(this.x1,this.x2,this.x3)},set:function(t){var e=0;e=this.x1>=this.x2&&this.x1>=this.x3?this.x1-t:this.x2>=this.x1&&this.x2>=this.x3?this.x2-t:this.x3-t,this.x1-=e,this.x2-=e,this.x3-=e}},top:{get:function(){return Math.min(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1<=this.y2&&this.y1<=this.y3?this.y1-t:this.y2<=this.y1&&this.y2<=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}},bottom:{get:function(){return Math.max(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1>=this.y2&&this.y1>=this.y3?this.y1-t:this.y2>=this.y1&&this.y2>=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}}})},84435(t,e,i){var n=i(16483);n.Area=i(41658),n.BuildEquilateral=i(39208),n.BuildFromPolygon=i(39545),n.BuildRight=i(90301),n.CenterOn=i(23707),n.Centroid=i(97523),n.CircumCenter=i(24951),n.CircumCircle=i(85614),n.Clone=i(74422),n.Contains=i(10690),n.ContainsArray=i(48653),n.ContainsPoint=i(96006),n.CopyFrom=i(71326),n.Decompose=i(71694),n.Equals=i(33522),n.GetPoint=i(20437),n.GetPoints=i(80672),n.InCenter=i(39757),n.Perimeter=i(1376),n.Offset=i(13584),n.Random=i(90260),n.Rotate=i(52172),n.RotateAroundPoint=i(49907),n.RotateAroundXY=i(99614),t.exports=n},74457(t){t.exports=function(t,e,i){return{gameObject:t,enabled:!0,draggable:!1,dropZone:!1,cursor:!1,target:null,camera:null,hitArea:e,hitAreaCallback:i,hitAreaDebug:null,customHitArea:!1,localX:0,localY:0,dragState:0,dragStartX:0,dragStartY:0,dragStartXGlobal:0,dragStartYGlobal:0,dragStartCamera:null,dragX:0,dragY:0}}},84409(t){t.exports=function(t,e){return function(i,n,s,r){var o=t.getPixelAlpha(n,s,r.texture.key,r.frame.name);return o&&o>=e}}},7003(t,e,i){var n=i(83419),s=i(93301),r=i(50792),o=i(8214),a=i(8443),h=i(78970),l=i(85098),u=i(42515),d=i(36210),c=i(61340),f=i(85955);t.exports=new n({initialize:function(t,e){this.game=t,this.scaleManager,this.canvas,this.config=e,this.enabled=!0,this.events=new r,this.isOver=!0,this.defaultCursor="",this.keyboard=e.inputKeyboard?new h(this):null,this.mouse=e.inputMouse?new l(this):null,this.touch=e.inputTouch?new d(this):null,this.pointers=[],this.pointersTotal=e.inputActivePointers;for(var i=0;i<=this.pointersTotal;i++){var n=new u(this,i);n.smoothFactor=e.inputSmoothFactor,this.pointers.push(n)}this.mousePointer=e.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 c,this._tempMatrix2=new c,this._tempSkip=!1,this.mousePointerContainer=[this.mousePointer],t.events.once(a.BOOT,this.boot,this)},boot:function(){var t=this.game,e=t.events;this.canvas=t.canvas,this.scaleManager=t.scale,this.events.emit(o.MANAGER_BOOT),e.on(a.PRE_RENDER,this.preRender,this),e.once(a.DESTROY,this.destroy,this)},setCanvasOver:function(t){this.isOver=!0,this.events.emit(o.GAME_OVER,t)},setCanvasOut:function(t){this.isOver=!1,this.events.emit(o.GAME_OUT,t)},preRender:function(){var t=this.game.loop.now,e=this.game.loop.delta,i=this.game.scene.getScenes(!0,!0);this.time=t,this.events.emit(o.MANAGER_UPDATE);for(var n=0;n<i.length;n++){var s=i[n];if(s.sys.input&&s.sys.input.updatePoll(t,e)&&this.globalTopOnly)return}},setDefaultCursor:function(t){this.defaultCursor=t,this.canvas.style.cursor!==t&&(this.canvas.style.cursor=t)}
vendor: 4,473 bytes, line 1
1,setCursor:function(t){t.cursor&&(this.canvas.style.cursor=t.cursor)},resetCursor:function(t,e){(e||t&&t.cursor)&&this.canvas&&(this.canvas.style.cursor=this.defaultCursor)},addPointer:function(t){void 0===t&&(t=1);var e=[];this.pointersTotal+t>10&&(t=10-this.pointersTotal);for(var i=0;i<t;i++){var n=new u(this,this.pointers.length);n.smoothFactor=this.config.inputSmoothFactor,this.pointers.push(n),this.pointersTotal++,e.push(n)}return e},updateInputPlugins:function(t,e){var i=this.game.scene.getScenes(!1,!0);this._tempSkip=!1;for(var n=0;n<i.length;n++){var s=i[n];if(s.sys.input&&(s.sys.input.update(t,e)&&this.globalTopOnly||this._tempSkip))return}},onTouchStart:function(t){for(var e=this.pointers,i=[],n=0;n<t.changedTouches.length;n++)for(var r=t.changedTouches[n],o=1;o<e.length;o++){var a=e[o];if(!a.active){a.touchstart(r,t),this.activePointer=a,i.push(a);break}}this.updateInputPlugins(s.TOUCH_START,i)},onTouchMove:function(t){for(var e=this.pointers,i=[],n=0;n<t.changedTouches.length;n++)for(var r=t.changedTouches[n],o=1;o<e.length;o++){var a=e[o];if(a.active&&a.identifier===r.identifier){var h=document.elementFromPoint(r.clientX,r.clientY)===this.canvas;!this.isOver&&h?this.setCanvasOver(t):this.isOver&&!h&&this.setCanvasOut(t),this.isOver&&(a.touchmove(r,t),this.activePointer=a,i.push(a));break}}this.updateInputPlugins(s.TOUCH_MOVE,i)},onTouchEnd:function(t){for(var e=this.pointers,i=[],n=0;n<t.changedTouches.length;n++)for(var r=t.changedTouches[n],o=1;o<e.length;o++){var a=e[o];if(a.active&&a.identifier===r.identifier){a.touchend(r,t),i.push(a);break}}this.updateInputPlugins(s.TOUCH_END,i)},onTouchCancel:function(t){for(var e=this.pointers,i=[],n=0;n<t.changedTouches.length;n++)for(var r=t.changedTouches[n],o=1;o<e.length;o++){var a=e[o];if(a.active&&a.identifier===r.identifier){a.touchcancel(r,t),i.push(a);break}}this.updateInputPlugins(s.TOUCH_CANCEL,i)},onMouseDown:function(t){var e=this.mousePointer;e.down(t),e.updateMotion(),this.activePointer=e,this.updateInputPlugins(s.MOUSE_DOWN,this.mousePointerContainer)},onMouseMove:function(t){var e=this.mousePointer;e.move(t),e.updateMotion(),this.activePointer=e,this.updateInputPlugins(s.MOUSE_MOVE,this.mousePointerContainer)},onMouseUp:function(t){var e=this.mousePointer;e.up(t),e.updateMotion(),this.activePointer=e,this.updateInputPlugins(s.MOUSE_UP,this.mousePointerContainer)},onMouseWheel:function(t){var e=this.mousePointer;e.wheel(t),this.activePointer=e,this.updateInputPlugins(s.MOUSE_WHEEL,this.mousePointerContainer)},onPointerLockChange:function(t){var e=this.mouse.locked;this.mousePointer.locked=e,this.events.emit(o.POINTERLOCK_CHANGE,t,e)},inputCandidate:function(t,e){var i=t.input;if(!i||!i.enabled||!t.willRender(e))return!1;var n=!0,s=t.parentContainer;if(s)do{if(!s.willRender(e)){n=!1;break}s=s.parentContainer}while(s);return n},hitTest:function(t,e,i,n){void 0===n&&(n=this._tempHitTest);var s=this._tempPoint,r=i.scrollX,o=i.scrollY;n.length=0;var a=t.x,h=t.y;i.getWorldPoint(a,h,s),t.worldX=s.x,t.worldY=s.y;for(var l={x:0,y:0},u=this._tempMatrix,d=this._tempMatrix2,c=0;c<e.length;c++){var p=e[c];if(this.inputCandidate(p,i)){var g=s.x+r*p.scrollFactorX-r,m=s.y+o*p.scrollFactorY-o;p.parentContainer?(p.getWorldTransformMatrix(u,d),u.applyInverse(g,m,l)):f(g,m,p.x,p.y,p.rotation,p.scaleX,p.scaleY,l),this.pointWithinHitArea(p,l.x,l.y)&&n.push(p)}}return n},pointWithinHitArea:function(t,e,i){e+=t.displayOriginX,i+=t.displayOriginY;var n=t.input;return!!(n&&n.hitAreaCallback(n.hitArea,e,i,t))&&(n.localX=e,n.localY=i,!0)},pointWithinInteractiveObject:function(t,e,i){return!!t.hitArea&&(e+=t.gameObject.displayOriginX,i+=t.gameObject.displayOriginY,t.localX=e,t.localY=i,t.hitAreaCallback(t.hitArea,e,i,t))},transformPointer:function(t,e,i,n){var s=t.position,r=t.prevPosition;r.x=s.x,r.y=s.y;var o=this.scaleManager.transformX(e),a=this.scaleManager.transformY(i),h=t.smoothFactor;n&&0!==h?(s.x=o*h+r.x*(1-h),s.y=a*h+r.y*(1-h)):(s.x=o,s.y=a)},destroy:function(){this.events.removeAllListeners(),this.game.events.off(a.PRE_RENDER),this.keyboard&&this.keyboard.destroy(),this.mouse&&this.mouse.destroy(),this.touch&&this.touch.destroy();for(var t=0;t<this.pointers.length;t++)this.pointers[t].destroy();this.pointers=[],this._tempHitTest=[],this._tempMatrix.destroy(),this.canvas=null,this.game=null}})},48205(t,e,i){var n=i(96503),s=i(87902),r=i(83419),o=i(93301),a=i(74457),h=i(84409),l=i(20339),u=i(8497),d=i(81154),c=i(8214),f=i(50792),p=i(95540
vendor: 4,903 bytes, line 1
1),g=i(23777),m=i(89639),v=i(41212),x=i(37277),y=i(87841),T=i(37303),w=i(44594),b=i(16483),S=i(10690),C=new r({Extends:f,initialize:function(t){f.call(this),this.scene=t,this.systems=t.sys,this.settings=t.sys.settings,this.manager=t.sys.game.input,this.pluginEvents=new f,this.enabled=!0,this.displayList,this.cameras,m.install(this),this.mouse=this.manager.mouse,this.topOnly=!0,this.pollRate=-1,this._pollTimer=0;var e={cancelled:!1};this._eventContainer={stopPropagation:function(){e.cancelled=!0}},this._eventData=e,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,t.sys.events.once(w.BOOT,this.boot,this),t.sys.events.on(w.START,this.start,this)},boot:function(){this.cameras=this.systems.cameras,this.displayList=this.systems.displayList,this.systems.events.once(w.DESTROY,this.destroy,this),this.pluginEvents.emit(c.BOOT)},start:function(){var t=this.systems.events;t.on(w.TRANSITION_START,this.transitionIn,this),t.on(w.TRANSITION_OUT,this.transitionOut,this),t.on(w.TRANSITION_COMPLETE,this.transitionComplete,this),t.on(w.PRE_UPDATE,this.preUpdate,this),t.once(w.SHUTDOWN,this.shutdown,this),this.manager.events.on(c.GAME_OUT,this.onGameOut,this),this.manager.events.on(c.GAME_OVER,this.onGameOver,this),this.enabled=!0,this._dragState=[0,0,0,0,0,0,0,0,0,0],this.pluginEvents.emit(c.START)},onGameOver:function(t){this.isActive()&&this.emit(c.GAME_OVER,t.timeStamp,t)},onGameOut:function(t){this.isActive()&&this.emit(c.GAME_OUT,t.timeStamp,t)},preUpdate:function(){this.pluginEvents.emit(c.PRE_UPDATE);var t=this._pendingRemoval,e=this._pendingInsertion,i=t.length,n=e.length;if(0!==i||0!==n){for(var s=this._list,r=0;r<i;r++){var o=t[r],a=s.indexOf(o);a>-1&&(s.splice(a,1),this.clear(o,!0))}this._pendingRemoval.length=0,this._list=s.concat(e.splice(0))}},isActive:function(){return this.manager&&this.manager.enabled&&this.enabled&&this.scene.sys.canInput()},setCursor:function(t){this.manager&&this.manager.setCursor(t)},resetCursor:function(){this.manager&&this.manager.resetCursor(null,!0)},updatePoll:function(t,e){if(!this.isActive())return!1;if(this.pluginEvents.emit(c.UPDATE,t,e),this._updatedThisFrame)return this._updatedThisFrame=!1,!1;var i,n=this.manager.pointers;for(i=0;i<n.length;i++)n[i].updateMotion();if(0===this._list.length)return!1;var s=this.pollRate;if(-1===s)return!1;if(s>0){if(this._pollTimer-=e,!(this._pollTimer<0))return!1;this._pollTimer=this.pollRate}var r=!1;for(i=0;i<n.length;i++){var o=0,a=n[i];this._tempZones=[],this._temp=this.hitTestPointer(a),this.sortGameObjects(this._temp,a),this.sortDropZones(this._tempZones),this.topOnly&&(this._temp.length&&this._temp.splice(1),this._tempZones.length&&this._tempZones.splice(1)),o+=this.processOverOutEvents(a),2===this.getDragState(a)&&this.processDragThresholdEvent(a,t),o>0&&(r=!0)}return r},update:function(t,e){if(!this.isActive())return!1;for(var i=!1,n=0;n<e.length;n++){var s=0,r=e[n];switch(this._tempZones=[],this._temp=this.hitTestPointer(r),this.sortGameObjects(this._temp,r),this.sortDropZones(this._tempZones),this.topOnly&&(this._temp.length&&this._temp.splice(1),this._tempZones.length&&this._tempZones.splice(1)),t){case o.MOUSE_DOWN:s+=this.processDragDownEvent(r),s+=this.processDownEvents(r),s+=this.processOverOutEvents(r);break;case o.MOUSE_UP:s+=this.processDragUpEvent(r),s+=this.processUpEvents(r),s+=this.processOverOutEvents(r);break;case o.TOUCH_START:s+=this.processDragDownEvent(r),s+=this.processDownEvents(r),s+=this.processOverEvents(r);break;case o.TOUCH_END:case o.TOUCH_CANCEL:s+=this.processDragUpEvent(r),s+=this.processUpEvents(r),s+=this.processOutEvents(r);break;case o.MOUSE_MOVE:case o.TOUCH_MOVE:s+=this.processDragMoveEvent(r),s+=this.processMoveEvents(r),s+=this.processOverOutEvents(r);break;case o.MOUSE_WHEEL:s+=this.processWheelEvent(r)}s>0&&(i=!0)}return this._updatedThisFrame=!0,i},clear:function(t,e){void 0===e&&(e=!1),this.disable(t);var i=t.input;i&&(this.removeDebug(t),this.manager.resetCursor(i),i.gameObject=void 0,i.target=void 0,i.hitArea=void 0,i.hitAreaCallback=void 0,i.callbackContext=void 0,t.input=null),e||this.queueForRemoval(t);var n=this._draggable.indexOf(t);return n>-1&&this._draggable.splice(n,1),t},disable:function(t,e){void 0===e&&(e=!1);var i=t.input;i&&(i.enabled=!1,i.dragState=0);for(var n,s=this._drag,r=this._over,o=this.manager,a=0;a<o.pointers.length;a++)(n=s[a].indexOf(t))>-1&&s[a].splice(n,1),(n=r[a].indexOf(t))>-1&&r[a].splice(n,1);return e&&this.resetCursor(),this}
1,enable:function(t,e,i,n){return void 0===n&&(n=!1),t.input?t.input.enabled=!0:this.setHitArea(t,e,i),t.input&&n&&!t.input.dropZone&&(t.input.dropZone=n),this},hitTestPointer:function(t){for(var e=this.cameras.getCamerasBelowPointer(t),i=0;i<e.length;i++){for(var n=e[i],s=this.manager.hitTest(t,this._list,n),r=0;r<s.length;r++){var o=s[r];o.input.dropZone&&this._tempZones.push(o)}if(s.length>0)return t.camera=n,s}return t.camera=e[0],[]},processDownEvents:function(t){var e=0,i=this._temp,n=this._eventData,s=this._eventContainer;n.cancelled=!1;for(var r=0;r<i.length;r++){var o=i[r];if(o.input&&o.input.enabled&&(e++,o.emit(c.GAMEOBJECT_POINTER_DOWN,t,o.input.localX,o.input.localY,s),n.cancelled||!this.isActive()||o.input&&o.input.enabled&&(this.emit(c.GAMEOBJECT_DOWN,t,o,s),n.cancelled||!this.isActive())))break}return!n.cancelled&&this.isActive()&&(t.downElement===this.manager.game.canvas?this.emit(c.POINTER_DOWN,t,i):this.emit(c.POINTER_DOWN_OUTSIDE,t)),e},getDragState:function(t){return this._dragState[t.id]},setDragState:function(t,e){this._dragState[t.id]=e},processDragThresholdEvent:function(t,e){var i=!1,n=this.dragTimeThreshold,s=this.dragDistanceThreshold;if(s>0&&l(t.x,t.y,t.downX,t.downY)>=s?i=!0:n>0&&e>=t.downTime+n&&(i=!0),i)return this.setDragState(t,3),this.processDragStartList(t)},processDragStartList:function(t){if(3!==this.getDragState(t))return 0;var e=this._drag[t.id];e.length>1&&(e=e.slice(0));for(var i=0;i<e.length;i++){var n=e[i],s=n.input;s.dragState=2,s.dragStartX=n.x,s.dragStartY=n.y,s.dragStartXGlobal=t.worldX,s.dragStartYGlobal=t.worldY,s.dragStartCamera=t.camera,s.dragX=s.dragStartXGlobal-s.dragStartX,s.dragY=s.dragStartYGlobal-s.dragStartY,n.emit(c.GAMEOBJECT_DRAG_START,t,s.dragX,s.dragY),this.emit(c.DRAG_START,t,n)}return this.setDragState(t,4),e.length},processDragDownEvent:function(t){var e=this._temp;if(0===this._draggable.length||0===e.length||!t.primaryDown||0!==this.getDragState(t))return 0;this.setDragState(t,1);for(var i=[],n=0;n<e.length;n++){var s=e[n];s.input.draggable&&0===s.input.dragState&&i.push(s)}return 0===i.length?(this.setDragState(t,0),0):(i.length>1&&(this.sortGameObjects(i,t),this.topOnly&&i.splice(1)),this._drag[t.id]=i,0===this.dragDistanceThreshold&&0===this.dragTimeThreshold)?(this.setDragState(t,3),this.processDragStartList(t)):(this.setDragState(t,2),0)},processDragMoveEvent:function(t){if(2===this.getDragState(t)&&this.processDragThresholdEvent(t,this.manager.game.loop.now),4!==this.getDragState(t))return 0;var e=this._tempZones,i=this._drag[t.id];i.length>1&&(i=i.slice(0));for(var n=0;n<i.length;n++){var s,r,o=i[n],a=o.input,h=a.target;if(h){var l=e.indexOf(h);0===l?(o.emit(c.GAMEOBJECT_DRAG_OVER,t,h),this.emit(c.DRAG_OVER,t,o,h)):l>0?(o.emit(c.GAMEOBJECT_DRAG_LEAVE,t,h),this.emit(c.DRAG_LEAVE,t,o,h),a.target=e[0],h=a.target,o.emit(c.GAMEOBJECT_DRAG_ENTER,t,h),this.emit(c.DRAG_ENTER,t,o,h)):(o.emit(c.GAMEOBJECT_DRAG_LEAVE,t,h),this.emit(c.DRAG_LEAVE,t,o,h),e[0]?(a.target=e[0],h=a.target,o.emit(c.GAMEOBJECT_DRAG_ENTER,t,h),this.emit(c.DRAG_ENTER,t,o,h)):a.target=null)}else!h&&e[0]&&(a.target=e[0],h=a.target,o.emit(c.GAMEOBJECT_DRAG_ENTER,t,h),this.emit(c.DRAG_ENTER,t,o,h));var u=t.positionToCamera(a.dragStartCamera);if(o.parentContainer){var d=u.x-a.dragStartXGlobal,f=u.y-a.dragStartYGlobal,p=o.getParentRotation(),g=d*Math.cos(p)+f*Math.sin(p),m=f*Math.cos(p)-d*Math.sin(p);g*=1/o.parentContainer.scaleX,m*=1/o.parentContainer.scaleY,s=g+a.dragStartX,r=m+a.dragStartY}else s=u.x-a.dragX,r=u.y-a.dragY;o.emit(c.GAMEOBJECT_DRAG,t,s,r),this.emit(c.DRAG,t,o,s,r)}return i.length},processDragUpEvent:function(t){var e=this._drag[t.id];e.length>1&&(e=e.slice(0));for(var i=0;i<e.length;i++){var n=e[i],s=n.input;if(s&&2===s.dragState){s.dragState=0,s.dragX=s.localX-n.displayOriginX,s.dragY=s.localY-n.displayOriginY,s.dragStartCamera=null;var r=!1,o=s.target;o&&(n.emit(c.GAMEOBJECT_DROP,t,o),this.emit(c.DROP,t,n,o),s.target=null,r=!0),n.input&&n.input.enabled&&(n.emit(c.GAMEOBJECT_DRAG_END,t,s.dragX,s.dragY,r),this.emit(c.DRAG_END,t,n,r))}}return this.setDragState(t,0),e.splice(0),0},processMoveEvents:function(t){var e=0,i=this._temp,n=this._eventData,s=this._eventContainer;n.cancelled=!1;for(var r=0;r<i.length;r++){var o=i[r];if(o.input&&o.input.enabled&&(e++,o.emit(c.GAMEOBJECT_POINTER_MO
1VE,t,o.input.localX,o.input.localY,s),n.cancelled||!this.isActive()||o.input&&o.input.enabled&&(this.emit(c.GAMEOBJECT_MOVE,t,o,s),n.cancelled||!this.isActive()||this.topOnly)))break}return!n.cancelled&&this.isActive()&&this.emit(c.POINTER_MOVE,t,i),e},processWheelEvent:function(t){var e=0,i=this._temp,n=this._eventData,s=this._eventContainer;n.cancelled=!1;for(var r=t.deltaX,o=t.deltaY,a=t.deltaZ,h=0;h<i.length;h++){var l=i[h];if(l.input&&l.input.enabled&&(e++,l.emit(c.GAMEOBJECT_POINTER_WHEEL,t,r,o,a,s),n.cancelled||!this.isActive()||l.input&&l.input.enabled&&(this.emit(c.GAMEOBJECT_WHEEL,t,l,r,o,a,s),n.cancelled||!this.isActive())))break}return!n.cancelled&&this.isActive()&&this.emit(c.POINTER_WHEEL,t,i,r,o,a),e},processOverEvents:function(t){var e=this._temp,i=0,n=e.length,s=[];if(n>0){var r=this.manager,o=this._eventData,a=this._eventContainer;o.cancelled=!1;for(var h=0;h<n;h++){var l=e[h];if(l.input&&l.input.enabled&&(s.push(l),r.setCursor(l.input),l.emit(c.GAMEOBJECT_POINTER_OVER,t,l.input.localX,l.input.localY,a),i++,o.cancelled||!this.isActive()||l.input&&l.input.enabled&&(this.emit(c.GAMEOBJECT_OVER,t,l,a),o.cancelled||!this.isActive())))break}!o.cancelled&&this.isActive()&&this.emit(c.POINTER_OVER,t,s)}return this._over[t.id]=s,i},processOutEvents:function(t){var e=this._over[t.id],i=0,n=e.length;if(n>0){var s=this.manager,r=this._eventData,o=this._eventContainer;r.cancelled=!1,this.sortGameObjects(e,t);for(var a=0;a<n;a++){var h=e[a];if((h=e[a]).input&&h.input.enabled&&(s.resetCursor(h.input),h.emit(c.GAMEOBJECT_POINTER_OUT,t,o),i++,r.cancelled||!this.isActive()||h.input&&h.input.enabled&&(this.emit(c.GAMEOBJECT_OUT,t,h,o),r.cancelled||!this.isActive())))break}!r.cancelled&&this.isActive()&&this.emit(c.POINTER_OUT,t,e),this._over[t.id]=[]}return i},processOverOutEvents:function(t){var e,i,n=this._temp,s=[],r=[],o=[],a=this._over[t.id],h=this._drag[t.id],l=this.manager;for(e=0;e<a.length;e++)i=a[e],-1===n.indexOf(i)&&-1===h.indexOf(i)?s.push(i):o.push(i);for(e=0;e<n.length;e++)i=n[e],-1===a.indexOf(i)&&r.push(i);var u=s.length,d=0,f=this._eventData,p=this._eventContainer;if(f.cancelled=!1,u>0){for(this.sortGameObjects(s,t),e=0;e<u&&(!(i=s[e]).input||!i.input.enabled||(l.resetCursor(i.input),i.emit(c.GAMEOBJECT_POINTER_OUT,t,p),d++,!f.cancelled&&this.isActive()&&(!i.input||!i.input.enabled||(this.emit(c.GAMEOBJECT_OUT,t,i,p),!f.cancelled&&this.isActive()))));e++);(!f.cancelled||this.isActive())&&this.emit(c.POINTER_OUT,t,s)}if(u=r.length,f.cancelled=!1,u>0){for(this.sortGameObjects(r,t),e=0;e<u&&(!(i=r[e]).input||!i.input.enabled||(l.setCursor(i.input),i.emit(c.GAMEOBJECT_POINTER_OVER,t,i.input.localX,i.input.localY,p),d++,!f.cancelled&&this.isActive()&&(!i.input||!i.input.enabled||(this.emit(c.GAMEOBJECT_OVER,t,i,p),!f.cancelled&&this.isActive()))));e++);!f.cancelled&&this.isActive()&&this.emit(c.POINTER_OVER,t,r)}return a=o.concat(r),this._over[t.id]=this.sortGameObjects(a,t),d},processUpEvents:function(t){var e=this._temp,i=this._eventData,n=this._eventContainer;i.cancelled=!1;for(var s=0;s<e.length;s++){var r=e[s];if(r.input&&r.input.enabled&&(r.emit(c.GAMEOBJECT_POINTER_UP,t,r.input.localX,r.input.localY,n),i.cancelled||!this.isActive()||r.input&&r.input.enabled&&(this.emit(c.GAMEOBJECT_UP,t,r,n),i.cancelled||!this.isActive())))break}return!i.cancelled&&this.isActive()&&(t.upElement===this.manager.game.canvas?this.emit(c.POINTER_UP,t,e):this.emit(c.POINTER_UP_OUTSIDE,t)),e.length},forceDownState:function(t,e){this.forceState(t,e,c.GAMEOBJECT_POINTER_DOWN,c.GAMEOBJECT_DOWN,!1)}
vendor: 48,871 bytes, line 1
1,forceUpState:function(t,e){this.forceState(t,e,c.GAMEOBJECT_POINTER_UP,c.GAMEOBJECT_UP,!1)},forceOverState:function(t,e){this.forceState(t,e,c.GAMEOBJECT_POINTER_OVER,c.GAMEOBJECT_OVER,!0)},forceOutState:function(t,e){this.forceState(t,e,c.GAMEOBJECT_POINTER_OUT,c.GAMEOBJECT_OUT,!1)},forceState:function(t,e,i,n,s){var r=this._eventData,o=this._eventContainer;r.cancelled=!1,e.input&&e.input.enabled&&(e.emit(i,t,e.input.localX,e.input.localY,o),s&&this.setCursor(e.input),!r.cancelled&&this.isActive()&&e.input&&e.input.enabled&&this.emit(n,t,e,o))},queueForInsertion:function(t){return -1===this._pendingInsertion.indexOf(t)&&-1===this._list.indexOf(t)&&this._pendingInsertion.push(t),this},queueForRemoval:function(t){return this._pendingRemoval.push(t),this},setDraggable:function(t,e){void 0===e&&(e=!0),Array.isArray(t)||(t=[t]);for(var i=0;i<t.length;i++){var n=t[i];n.input.draggable=e;var s=this._draggable.indexOf(n);e&&-1===s?this._draggable.push(n):!e&&s>-1&&this._draggable.splice(s,1)}return this},makePixelPerfect:function(t){return void 0===t&&(t=1),h(this.systems.textures,t)},setHitArea:function(t,e,i){if(void 0===e)return this.setHitAreaFromTexture(t);Array.isArray(t)||(t=[t]);var n=!1,s=!1,r=!1,o=!1,h=!1,l=!0;if(v(e)&&Object.keys(e).length){var u=e;e=p(u,"hitArea",null),i=p(u,"hitAreaCallback",null),h=p(u,"pixelPerfect",!1);var d=p(u,"alphaTolerance",1);h&&(e={},i=this.makePixelPerfect(d)),n=p(u,"draggable",!1),s=p(u,"dropZone",!1),r=p(u,"cursor",!1),o=p(u,"useHandCursor",!1),e&&i||(this.setHitAreaFromTexture(t),l=!1)}else"function"!=typeof e||i||(i=e,e={});for(var c=0;c<t.length;c++){var f=t[c];if(h&&"Container"===f.type){console.warn("Cannot pixelPerfect test a Container. Use a custom callback.");continue}var g=f.input?f.input:a(f,e,i);g.customHitArea=l,g.dropZone=s,g.cursor=o?"pointer":r,f.input=g,n&&this.setDraggable(f),this.queueForInsertion(f)}return this},setHitAreaCircle:function(t,e,i,r,o){void 0===o&&(o=s);var a=new n(e,i,r);return this.setHitArea(t,a,o)},setHitAreaEllipse:function(t,e,i,n,s,r){void 0===r&&(r=d);var o=new u(e,i,n,s);return this.setHitArea(t,o,r)},setHitAreaFromTexture:function(t,e){void 0===e&&(e=T),Array.isArray(t)||(t=[t]);for(var i=0;i<t.length;i++){var n=t[i],s=n.frame,r=0,o=0;if(n.width?(r=n.width,o=n.height):s&&(r=s.realWidth,o=s.realHeight),"Container"===n.type&&(0===r||0===o)){console.warn("Container.setInteractive must specify a Shape or call setSize() first");continue}0!==r&&0!==o&&(n.input=a(n,new y(0,0,r,o),e),this.queueForInsertion(n))}return this},setHitAreaRectangle:function(t,e,i,n,s,r){void 0===r&&(r=T);var o=new y(e,i,n,s);return this.setHitArea(t,o,r)},setHitAreaTriangle:function(t,e,i,n,s,r,o,a){void 0===a&&(a=S);var h=new b(e,i,n,s,r,o);return this.setHitArea(t,h,a)},enableDebug:function(t,e){void 0===e&&(e=65280);var i=t.input;if(!i||!i.hitArea)return this;var n=i.hitArea,s=n.type,r=i.hitAreaDebug,o=this.systems.add,a=this.systems.updateList;r&&(a.remove(r),r.destroy(),r=null);var h=0,l=0;switch(s){case g.CIRCLE:r=o.arc(0,0,n.radius),h=n.x-n.radius,l=n.y-n.radius;break;case g.ELLIPSE:r=o.ellipse(0,0,n.width,n.height),h=n.x-n.width/2,l=n.y-n.height/2;break;case g.LINE:r=o.line(0,0,n.x1,n.y1,n.x2,n.y2);break;case g.POLYGON:r=o.polygon(0,0,n.points);break;case g.RECTANGLE:r=o.rectangle(0,0,n.width,n.height),h=n.x,l=n.y;break;case g.TRIANGLE:r=o.triangle(0,0,n.x1,n.y1,n.x2,n.y2,n.x3,n.y3)}return r&&(r.isFilled=!1,r.strokeColor=e,r.preUpdate=function(){r.setVisible(t.visible),r.setStrokeStyle(1/t.scale,r.strokeColor),r.setDisplayOrigin(t.displayOriginX,t.displayOriginY);var e=t.x,i=t.y,n=t.rotation,s=t.scaleX,o=t.scaleY;if(t.parentContainer){var a=t.getWorldTransformMatrix();e=a.tx,i=a.ty,n=a.rotation,s=a.scaleX,o=a.scaleY}r.setRotation(n),r.setScale(s,o),r.setPosition(e+h*s,i+l*o),r.setScrollFactor(t.scrollFactorX,t.scrollFactorY),r.setDepth(t.depth)},a.add(r),i.hitAreaDebug=r),this},removeDebug:function(t){var e=t.input;return e&&e.hitAreaDebug&&(e.hitAreaDebug.destroy(),e.hitAreaDebug=null),this},setPollAlways:function(){return this.setPollRate(0)},setPollOnMove:function(){return this.setPollRate(-1)},setPollRate:function(t){return this.pollRate=t,this._pollTimer=0,this},setGlobalTopOnly:function(t){return this.manager.globalTopOnly=t,this},setTopOnly:function(t){return this.topOnly=t,this},sortGameObjects:function(t,e){if(t.length<2||!e.camera)return t;var i=e.camera.renderList;return t.sort(function(t,e){var n=Math.max(i.indexOf(t),0);return Math.max(i.indexOf(e),0)-n})},sortDropZones:function(t){return t.length<2?t:(this.scene.sys.depthSort(),t.sort(this.sortDropZoneHandler.bind(this)))},sortDropZoneHandler:function(t,e){if(!t.parentContainer&&!e.parentContainer)return this.displayList.getIndex(e)-this.displayList.getIndex(t);if(t.parentContainer===e.parentContainer)return e.parentContainer.getIndex(e)-t.parentContainer.getIndex(t);if(t.parentContainer===e)return -1;if(e.parentContainer===t)return 1;for(var i=t.getIndexList(),n=e.getIndexList(),s=Math.min(i.length,n.length),r=0;r<s;r++){var o=i[r],a=n[r];if(o!==a)return a-o}return n.length-i.length},stopPropagation:function(){return this.manager._tempSkip=!0,this},addPointer:function(t){return this.manager.addPointer(t)},setDefaultCursor:function(t){return this.manager.setDefaultCursor(t),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(c.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 t=0;t<10;t++)this._drag[t]=[],this._over[t]=[];this.removeAllListeners();var e=this.manager;e.canvas.style.cursor=e.defaultCursor;var i=this.systems.events;i.off(w.TRANSITION_START,this.transitionIn,this),i.off(w.TRANSITION_OUT,this.transitionOut,this),i.off(w.TRANSITION_COMPLETE,this.transitionComplete,this),i.off(w.PRE_UPDATE,this.preUpdate,this),e.events.off(c.GAME_OUT,this.onGameOut,this),e.events.off(c.GAME_OVER,this.onGameOver,this),i.off(w.SHUTDOWN,this.shutdown,this)},resetPointers:function(){for(var t=this.manager.pointers,e=0;e<t.length;e++)t[e].reset()},destroy:function(){this.shutdown(),this.pluginEvents.emit(c.DESTROY),this.pluginEvents.removeAllListeners(),this.scene.sys.events.off(w.START,this.start,this),this.scene=null,this.cameras=null,this.manager=null,this.events=null,this.mouse=null},x:{get:function(){return this.manager.activePointer.x}},y:{get:function(){return this.manager.activePointer.y}},isOver:{get:function(){return this.manager.isOver}},mousePointer:{get:function(){return this.manager.mousePointer}},activePointer:{get:function(){return this.manager.activePointer}},pointer1:{get:function(){return this.manager.pointers[1]}},pointer2:{get:function(){return this.manager.pointers[2]}},pointer3:{get:function(){return this.manager.pointers[3]}},pointer4:{get:function(){return this.manager.pointers[4]}},pointer5:{get:function(){return this.manager.pointers[5]}},pointer6:{get:function(){return this.manager.pointers[6]}},pointer7:{get:function(){return this.manager.pointers[7]}},pointer8:{get:function(){return this.manager.pointers[8]}},pointer9:{get:function(){return this.manager.pointers[9]}},pointer10:{get:function(){return this.manager.pointers[10]}}});x.register("InputPlugin",C,"input"),t.exports=C},89639(t,e,i){var n=i(35154),s={},r={};r.register=function(t,e,i,n,r){s[t]={plugin:e,mapping:i,settingsKey:n,configKey:r}},r.getPlugin=function(t){return s[t]},r.install=function(t){var e=t.scene.sys,i=e.settings.input,r=e.game.config;for(var o in s){var a=s[o].plugin,h=s[o].mapping;n(i,s[o].settingsKey,r[s[o].configKey])&&(t[h]=new a(t))}},r.remove=function(t){s.hasOwnProperty(t)&&delete s[t]},t.exports=r},42515(t,e,i){var n=i(31040),s=i(83419),r=i(20339),o=i(43855),a=i(47235),h=i(26099),l=i(25892);t.exports=new s({initialize:function(t,e){this.manager=t,this.id=e,this.event,this.downElement,this.upElement,this.camera=null,this.button=0,this.buttons=0,this.position=new h,this.prevPosition=new h,this.midPoint=new h(-1,-1),this.velocity=new h,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=0===e,this.locked=!1,this.deltaX=0,this.deltaY=0,this.deltaZ=0},updateWorldPoint:function(t){var e=t.getWorldPoint(this.x,this.y);return this.worldX=e.x,this.worldY=e.y,this},positionToCamera:function(t,e){return t.getWorldPoint(this.x,this.y,e)},updateMotion:function(){var t=this.position.x,e=this.position.y,i=this.midPoint.x,s=this.midPoint.y;if(t!==i||e!==s){var r=a(this.motionFactor,i,t),h=a(this.motionFactor,s,e);o(r,t,.1)&&(r=t),o(h,e,.1)&&(h=e),this.midPoint.set(r,h);var l=t-r,u=e-h;this.velocity.set(l,u),this.angle=n(r,h,t,e),this.distance=Math.sqrt(l*l+u*u)}},up:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.button=t.button,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),0===t.button&&(this.primaryDown=!1,this.upX=this.x,this.upY=this.y),0===this.buttons&&(this.isDown=!1,this.upTime=t.timeStamp,this.wasTouch=!1)},down:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.button=t.button,this.downElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),0===t.button&&(this.primaryDown=!0,this.downX=this.x,this.downY=this.y),l.macOS&&t.ctrlKey&&(this.buttons=2,this.primaryDown=!1),this.isDown||(this.isDown=!0,this.downTime=t.timeStamp),this.wasTouch=!1},move:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.manager.transformPointer(this,t.pageX,t.pageY,!0),this.locked&&(this.movementX=t.movementX||t.mozMovementX||t.webkitMovementX||0,this.movementY=t.movementY||t.mozMovementY||t.webkitMovementY||0),this.moveTime=t.timeStamp,this.wasTouch=!1},wheel:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.deltaX=t.deltaX,this.deltaY=t.deltaY,this.deltaZ=t.deltaZ,this.wasTouch=!1},touchstart:function(t,e){t.pointerId&&(this.pointerId=t.pointerId),this.identifier=t.identifier,this.target=t.target,this.active=!0,this.buttons=1,this.event=e,this.downElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=e.timeStamp,this.isDown=!0,this.wasTouch=!0,this.wasCanceled=!1,this.updateMotion()},touchmove:function(t,e){this.event=e,this.manager.transformPointer(this,t.pageX,t.pageY,!0),this.moveTime=e.timeStamp,this.wasTouch=!0,this.updateMotion()},touchend:function(t,e){this.buttons=0,this.event=e,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=e.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!1,this.active=!1,this.updateMotion()},touchcancel:function(t,e){this.buttons=0,this.event=e,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=e.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!0,this.active=!1},noButtonDown:function(){return 0===this.buttons},leftButtonDown:function(){return!!(1&this.buttons)},rightButtonDown:function(){return!!(2&this.buttons)},middleButtonDown:function(){return!!(4&this.buttons)},backButtonDown:function(){return!!(8&this.buttons)},forwardButtonDown:function(){return!!(16&this.buttons)},leftButtonReleased:function(){return 0===this.buttons?0===this.button&&!this.isDown:0===this.button},rightButtonReleased:function(){return 0===this.buttons?2===this.button&&!this.isDown:2===this.button},middleButtonReleased:function(){return 0===this.buttons?1===this.button&&!this.isDown:1===this.button},backButtonReleased:function(){return 0===this.buttons?3===this.button&&!this.isDown:3===this.button},forwardButtonReleased:function(){return 0===this.buttons?4===this.button&&!this.isDown:4===this.button},getDistance:function(){return this.isDown?r(this.downX,this.downY,this.x,this.y):r(this.downX,this.downY,this.upX,this.upY)},getDistanceX:function(){return this.isDown?Math.abs(this.downX-this.x):Math.abs(this.downX-this.upX)},getDistanceY:function(){return this.isDown?Math.abs(this.downY-this.y):Math.abs(this.downY-this.upY)},getDuration:function(){return this.isDown?this.manager.time-this.downTime:this.upTime-this.downTime},getAngle:function(){return this.isDown?n(this.downX,this.downY,this.x,this.y):n(this.downX,this.downY,this.upX,this.upY)},getInterpolatedPosition:function(t,e){void 0===t&&(t=10),void 0===e&&(e=[]);for(var i=this.prevPosition.x,n=this.prevPosition.y,s=this.position.x,r=this.position.y,o=0;o<t;o++){var h=1/t*o;e[o]={x:a(h,i,s),y:a(h,n,r)}}return e},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=0===this.id},destroy:function(){this.camera=null,this.manager=null,this.position=null},x:{get:function(){return this.position.x},set:function(t){this.position.x=t}},y:{get:function(){return this.position.y},set:function(t){this.position.y=t}},time:{get:function(){return this.event?this.event.timeStamp:0}}})},93301(t){t.exports={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}},7179(t){t.exports="boot"},85375(t){t.exports="destroy"},62224(t){t.exports="dragend"},23388(t){t.exports="dragenter"},16133(t){t.exports="drag"},27829(t){t.exports="dragleave"},53904(t){t.exports="dragover"},56058(t){t.exports="dragstart"},2642(t){t.exports="drop"},88171(t){t.exports="gameobjectdown"},36147(t){t.exports="dragend"},71692(t){t.exports="dragenter"},96149(t){t.exports="drag"},81285(t){t.exports="dragleave"},74048(t){t.exports="dragover"},21322(t){t.exports="dragstart"},49378(t){t.exports="drop"},86754(t){t.exports="gameobjectmove"},86433(t){t.exports="gameobjectout"},60709(t){t.exports="gameobjectover"},24081(t){t.exports="pointerdown"},11172(t){t.exports="pointermove"},18907(t){t.exports="pointerout"},95579(t){t.exports="pointerover"},35368(t){t.exports="pointerup"},26972(t){t.exports="wheel"},47078(t){t.exports="gameobjectup"},73802(t){t.exports="gameobjectwheel"},56718(t){t.exports="gameout"},25936(t){t.exports="gameover"},27503(t){t.exports="boot"},50852(t){t.exports="process"},96438(t){t.exports="update"},59152(t){t.exports="pointerlockchange"},47777(t){t.exports="pointerdown"},27957(t){t.exports="pointerdownoutside"},19444(t){t.exports="pointermove"},54251(t){t.exports="pointerout"},18667(t){t.exports="pointerover"},27192(t){t.exports="pointerup"},24652(t){t.exports="pointerupoutside"},45132(t){t.exports="wheel"},44512(t){t.exports="preupdate"},15757(t){t.exports="shutdown"},41637(t){t.exports="start"},93802(t){t.exports="update"},8214(t,e,i){t.exports={BOOT:i(7179),DESTROY:i(85375),DRAG_END:i(62224),DRAG_ENTER:i(23388),DRAG:i(16133),DRAG_LEAVE:i(27829),DRAG_OVER:i(53904),DRAG_START:i(56058),DROP:i(2642),GAME_OUT:i(56718),GAME_OVER:i(25936),GAMEOBJECT_DOWN:i(88171),GAMEOBJECT_DRAG_END:i(36147),GAMEOBJECT_DRAG_ENTER:i(71692),GAMEOBJECT_DRAG:i(96149),GAMEOBJECT_DRAG_LEAVE:i(81285),GAMEOBJECT_DRAG_OVER:i(74048),GAMEOBJECT_DRAG_START:i(21322),GAMEOBJECT_DROP:i(49378),GAMEOBJECT_MOVE:i(86754),GAMEOBJECT_OUT:i(86433),GAMEOBJECT_OVER:i(60709),GAMEOBJECT_POINTER_DOWN:i(24081),GAMEOBJECT_POINTER_MOVE:i(11172),GAMEOBJECT_POINTER_OUT:i(18907),GAMEOBJECT_POINTER_OVER:i(95579),GAMEOBJECT_POINTER_UP:i(35368),GAMEOBJECT_POINTER_WHEEL:i(26972),GAMEOBJECT_UP:i(47078),GAMEOBJECT_WHEEL:i(73802),MANAGER_BOOT:i(27503),MANAGER_PROCESS:i(50852),MANAGER_UPDATE:i(96438),POINTER_DOWN:i(47777),POINTER_DOWN_OUTSIDE:i(27957),POINTER_MOVE:i(19444),POINTER_OUT:i(54251),POINTER_OVER:i(18667),POINTER_UP:i(27192),POINTER_UP_OUTSIDE:i(24652),POINTER_WHEEL:i(45132),POINTERLOCK_CHANGE:i(59152),PRE_UPDATE:i(44512),SHUTDOWN:i(15757),START:i(41637),UPDATE:i(93802)}},97421(t,e,i){t.exports=new(i(83419))({initialize:function(t,e){this.pad=t,this.events=t.events,this.index=e,this.value=0,this.threshold=.1},update:function(t){this.value=t},getValue:function(){return Math.abs(this.value)<this.threshold?0:this.value},destroy:function(){this.pad=null,this.events=null}})},28884(t,e,i){var n=i(83419),s=i(92734);t.exports=new n({initialize:function(t,e,i){void 0===i&&(i=!1),this.pad=t,this.events=t.manager,this.index=e,this.value=0,this.threshold=1,this.pressed=i},update:function(t){this.value=t;var e=this.pad,i=this.index;t>=this.threshold?this.pressed||(this.pressed=!0,this.events.emit(s.BUTTON_DOWN,e,this,t),this.pad.emit(s.GAMEPAD_BUTTON_DOWN,i,t,this)):this.pressed&&(this.pressed=!1,this.events.emit(s.BUTTON_UP,e,this,t),this.pad.emit(s.GAMEPAD_BUTTON_UP,i,t,this))},destroy:function(){this.pad=null,this.events=null}})},99125(t,e,i){var n=i(97421),s=i(28884),r=i(83419),o=i(50792),a=i(26099);t.exports=new r({Extends:o,initialize:function(t,e){o.call(this),this.manager=t,this.pad=e,this.id=e.id,this.index=e.index;for(var i=[],r=0;r<e.buttons.length;r++)i.push(new s(this,r,e.buttons[r].value>=.5));this.buttons=i;var h=[];for(r=0;r<e.axes.length;r++)h.push(new n(this,r));this.axes=h,this.vibration=e.vibrationActuator;var l={value:0,pressed:!1};this._LCLeft=i[14]?i[14]:l,this._LCRight=i[15]?i[15]:l,this._LCTop=i[12]?i[12]:l,this._LCBottom=i[13]?i[13]:l,this._RCLeft=i[2]?i[2]:l,this._RCRight=i[1]?i[1]:l,this._RCTop=i[3]?i[3]:l,this._RCBottom=i[0]?i[0]:l,this._FBLeftTop=i[4]?i[4]:l,this._FBLeftBottom=i[6]?i[6]:l,this._FBRightTop=i[5]?i[5]:l,this._FBRightBottom=i[7]?i[7]:l;var u={value:0};this._HAxisLeft=h[0]?h[0]:u,this._VAxisLeft=h[1]?h[1]:u,this._HAxisRight=h[2]?h[2]:u,this._VAxisRight=h[3]?h[3]:u,this.leftStick=new a,this.rightStick=new a,this._created=performance.now()},getAxisTotal:function(){return this.axes.length},getAxisValue:function(t){return this.axes[t].getValue()},setAxisThreshold:function(t){for(var e=0;e<this.axes.length;e++)this.axes[e].threshold=t},getButtonTotal:function(){return this.buttons.length},getButtonValue:function(t){return this.buttons[t].value},isButtonDown:function(t){return this.buttons[t].pressed},update:function(t){if(!(t.timestamp<this._created)){var e,i=this.buttons,n=t.buttons,s=i.length;for(e=0;e<s;e++)i[e].update(n[e].value);var r=this.axes,o=t.axes;for(e=0,s=r.length;e<s;e++)r[e].update(o[e]);s>=2&&(this.leftStick.set(r[0].getValue(),r[1].getValue()),s>=4&&this.rightStick.set(r[2].getValue(),r[3].getValue()))}},destroy:function(){var t;for(this.removeAllListeners(),this.manager=null,this.pad=null,t=0;t<this.buttons.length;t++)this.buttons[t].destroy();for(t=0;t<this.axes.length;t++)this.axes[t].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}}})},56654(t,e,i){var n=i(83419),s=i(50792),r=i(92734),o=i(99125),a=i(35154),h=i(89639),l=i(8214),u=new n({Extends:s,initialize:function(t){s.call(this),this.scene=t.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=t,this.enabled=!0,this.target,this.gamepads=[],this.queue=[],this.onGamepadHandler,this._pad1,this._pad2,this._pad3,this._pad4,t.pluginEvents.once(l.BOOT,this.boot,this),t.pluginEvents.on(l.START,this.start,this)},boot:function(){var t=this.scene.sys.game,e=this.settings.input,i=t.config;this.enabled=a(e,"gamepad",i.inputGamepad)&&t.device.input.gamepads,this.target=a(e,"gamepad.target",i.inputGamepadEventTarget),this.sceneInputPlugin.pluginEvents.once(l.DESTROY,this.destroy,this)},start:function(){this.enabled&&(this.startListeners(),this.refreshPads()),this.sceneInputPlugin.pluginEvents.once(l.SHUTDOWN,this.shutdown,this)},isActive:function(){return this.enabled&&this.scene.sys.isActive()},startListeners:function(){var t=this,e=this.target,i=function(e){!e.defaultPrevented&&t.isActive()&&(t.refreshPads(),t.queue.push(e))};this.onGamepadHandler=i,e.addEventListener("gamepadconnected",i,!1),e.addEventListener("gamepaddisconnected",i,!1),this.sceneInputPlugin.pluginEvents.on(l.UPDATE,this.update,this)},stopListeners:function(){this.target.removeEventListener("gamepadconnected",this.onGamepadHandler),this.target.removeEventListener("gamepaddisconnected",this.onGamepadHandler),this.sceneInputPlugin.pluginEvents.off(l.UPDATE,this.update);for(var t=this.gamepads,e=0;e<t.length;e++)t[e]&&t[e].removeAllListeners()},disconnectAll:function(){for(var t=this.gamepads,e=0;e<t.length;e++)t[e]&&(t[e].pad.connected=!1)},refreshPads:function(){var t=navigator.getGamepads();if(t)for(var e=this.gamepads,i=0;i<t.length;i++){var n=t[i];if(n){var s=n.id,r=n.index,a=e[r];if(a)a.id!==s?(a.destroy(),e[r]=new o(this,n)):a.update(n);else{var h=new o(this,n);e[r]=h,this._pad1?this._pad2?this._pad3?this._pad4||(this._pad4=h):this._pad3=h:this._pad2=h:this._pad1=h}}}else this.disconnectAll()},getAll:function(){for(var t=[],e=this.gamepads,i=0;i<e.length;i++)e[i]&&t.push(e[i]);return t},getPad:function(t){for(var e=this.gamepads,i=0;i<e.length;i++)if(e[i]&&e[i].index===t)return e[i]},update:function(){if(this.enabled){this.refreshPads();var t=this.queue.length;if(0!==t)for(var e=this.queue.splice(0,t),i=0;i<t;i++){var n=e[i],s=this.getPad(n.gamepad.index);"gamepadconnected"===n.type?this.emit(r.CONNECTED,s,n):"gamepaddisconnected"===n.type&&this.emit(r.DISCONNECTED,s,n)}}},shutdown:function(){this.stopListeners(),this.removeAllListeners()},destroy:function(){this.shutdown();for(var t=0;t<this.gamepads.length;t++)this.gamepads[t]&&this.gamepads[t].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}}});h.register("GamepadPlugin",u,"gamepad","gamepad","inputGamepad"),t.exports=u},89651(t){t.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(t){t.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(t){t.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(t,e,i){t.exports={DUALSHOCK_4:i(65294),SNES_USB:i(89651),XBOX_360:i(90089)}},46008(t){t.exports="down"},7629(t){t.exports="up"},42206(t){t.exports="connected"},86544(t){t.exports="disconnected"},94784(t){t.exports="down"},14325(t){t.exports="up"},92734(t,e,i){t.exports={BUTTON_DOWN:i(46008),BUTTON_UP:i(7629),CONNECTED:i(42206),DISCONNECTED:i(86544),GAMEPAD_BUTTON_DOWN:i(94784),GAMEPAD_BUTTON_UP:i(14325)}},48646(t,e,i){t.exports={Axis:i(97421),Button:i(28884),Events:i(92734),Gamepad:i(99125),GamepadPlugin:i(56654),Configs:i(64894)}},14350(t,e,i){var n=i(93301);t.exports=i(79291)(!1,{CreatePixelPerfectHandler:i(84409),CreateInteractiveObject:i(74457),Events:i(8214),Gamepad:i(48646),InputManager:i(7003),InputPlugin:i(48205),InputPluginCache:i(89639),Keyboard:i(51442),Mouse:i(87078),Pointer:i(42515),Touch:i(95618)},n)},78970(t,e,i){var n=i(72905),s=i(83419),r=i(8443),o=i(8214),a=i(46032),h=i(29747);t.exports=new s({initialize:function(t){this.manager=t,this.queue=[],this.preventDefault=!0,this.captures=[],this.enabled=!1,this.target,this.onKeyDown=h,this.onKeyUp=h,t.events.once(o.MANAGER_BOOT,this.boot,this)},boot:function(){var t=this.manager.config;this.enabled=t.inputKeyboard,this.target=t.inputKeyboardEventTarget,this.addCapture(t.inputKeyboardCapture),!this.target&&window&&(this.target=window),this.enabled&&this.target&&this.startListeners(),this.manager.game.events.on(r.POST_STEP,this.postUpdate,this)},startListeners:function(){var t=this;this.onKeyDown=function(e){if(!e.defaultPrevented&&t.enabled&&t.manager){t.queue.push(e),t.manager.events.emit(o.MANAGER_PROCESS);var i=e.altKey||e.ctrlKey||e.shiftKey||e.metaKey;t.preventDefault&&!i&&t.captures.indexOf(e.keyCode)>-1&&e.preventDefault()}},this.onKeyUp=function(e){if(!e.defaultPrevented&&t.enabled&&t.manager){t.queue.push(e),t.manager.events.emit(o.MANAGER_PROCESS);var i=e.altKey||e.ctrlKey||e.shiftKey||e.metaKey;t.preventDefault&&!i&&t.captures.indexOf(e.keyCode)>-1&&e.preventDefault()}};var e=this.target;e&&(e.addEventListener("keydown",this.onKeyDown,!1),e.addEventListener("keyup",this.onKeyUp,!1),this.enabled=!0)},stopListeners:function(){var t=this.target;t.removeEventListener("keydown",this.onKeyDown,!1),t.removeEventListener("keyup",this.onKeyUp,!1),this.enabled=!1},postUpdate:function(){this.queue=[]},addCapture:function(t){"string"==typeof t&&(t=t.split(",")),Array.isArray(t)||(t=[t]);for(var e=this.captures,i=0;i<t.length;i++){var n=t[i];"string"==typeof n&&(n=a[n.trim().toUpperCase()]),-1===e.indexOf(n)&&e.push(n)}this.preventDefault=e.length>0},removeCapture:function(t){"string"==typeof t&&(t=t.split(",")),Array.isArray(t)||(t=[t]);for(var e=this.captures,i=0;i<t.length;i++){var s=t[i];"string"==typeof s&&(s=a[s.toUpperCase()]),n(e,s)}this.preventDefault=e.length>0},clearCaptures:function(){this.captures=[],this.preventDefault=!1},destroy:function(){this.stopListeners(),this.clearCaptures(),this.queue=[],this.manager.game.events.off(r.POST_STEP,this.postUpdate,this),this.target=null,this.enabled=!1,this.manager=null}})},28846(t,e,i){var n=i(83419),s=i(50792),r=i(95922),o=i(8443),a=i(35154),h=i(8214),l=i(89639),u=i(30472),d=i(46032),c=i(87960),f=i(74600),p=i(44594),g=i(56583),m=new n({Extends:s,initialize:function(t){s.call(this),this.game=t.systems.game,this.scene=t.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=t,this.manager=t.manager.keyboard,this.enabled=!0,this.keys=[],this.combos=[],this.prevCode=null,this.prevTime=0,this.prevType=null,t.pluginEvents.once(h.BOOT,this.boot,this),t.pluginEvents.on(h.START,this.start,this)},boot:function(){var t=this.settings.input;this.enabled=a(t,"keyboard",!0);var e=a(t,"keyboard.capture",null);e&&this.addCaptures(e),this.sceneInputPlugin.pluginEvents.once(h.DESTROY,this.destroy,this)},start:function(){this.sceneInputPlugin.manager.events.on(h.MANAGER_PROCESS,this.update,this),this.sceneInputPlugin.pluginEvents.once(h.SHUTDOWN,this.shutdown,this),this.game.events.on(o.BLUR,this.resetKeys,this),this.scene.sys.events.on(p.PAUSE,this.resetKeys,this),this.scene.sys.events.on(p.SLEEP,this.resetKeys,this)},isActive:function(){return this.enabled&&this.scene.sys.canInput()},addCapture:function(t){return this.manager.addCapture(t),this},removeCapture:function(t){return this.manager.removeCapture(t),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:d.UP,down:d.DOWN,left:d.LEFT,right:d.RIGHT,space:d.SPACE,shift:d.SHIFT})},addKeys:function(t,e,i){void 0===e&&(e=!0),void 0===i&&(i=!1);var n={};if("string"==typeof t){t=t.split(",");for(var s=0;s<t.length;s++){var r=t[s].trim();r&&(n[r]=this.addKey(r,e,i))}}else for(var o in t)n[o]=this.addKey(t[o],e,i);return n},addKey:function(t,e,i){void 0===e&&(e=!0),void 0===i&&(i=!1);var n=this.keys;if(t instanceof u){var s=n.indexOf(t);return s>-1?n[s]=t:n[t.keyCode]=t,e&&this.addCapture(t.keyCode),t.setEmitOnRepeat(i),t}return"string"==typeof t&&(t=d[t.toUpperCase()]),n[t]||(n[t]=new u(this,t),e&&this.addCapture(t),n[t].setEmitOnRepeat(i)),n[t]},removeKey:function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var n,s=this.keys;if(t instanceof u){var r=s.indexOf(t);r>-1&&(n=this.keys[r],this.keys[r]=void 0)}else"string"==typeof t&&(t=d[t.toUpperCase()]);return s[t]&&(n=s[t],s[t]=void 0),n&&(n.plugin=null,i&&this.removeCapture(n.keyCode),e&&n.destroy()),this},removeAllKeys:function(t,e){void 0===t&&(t=!1),void 0===e&&(e=!1);for(var i=this.keys,n=0;n<i.length;n++){var s=i[n];s&&(i[n]=void 0,e&&this.removeCapture(s.keyCode),t&&s.destroy())}return this},createCombo:function(t,e){return new c(this,t,e)},checkDown:function(t,e){if(void 0===e&&(e=0),this.enabled&&t.isDown){var i=g(this.time-t.timeDown,e);if(i>t._tick)return t._tick=i,!0}return!1},update:function(){var t=this.manager.queue,e=t.length;if(this.isActive()&&0!==e)for(var i=this.keys,n=0;n<e;n++){var s=t[n],o=s.keyCode,a=i[o],h=!1;void 0===s.cancelled&&(s.cancelled=0,s.stopImmediatePropagation=function(){s.cancelled=1},s.stopPropagation=function(){s.cancelled=-1}),-1!==s.cancelled&&(o!==this.prevCode||s.timeStamp!==this.prevTime||s.type!==this.prevType)&&(this.prevCode=o,this.prevTime=s.timeStamp,this.prevType=s.type,"keydown"===s.type?(a&&(h=a.isDown,a.onDown(s)),s.cancelled||a&&h||(f[o]&&this.emit(r.KEY_DOWN+f[o],s),s.cancelled||this.emit(r.ANY_KEY_DOWN,s))):(a&&a.onUp(s),!s.cancelled&&(f[o]&&this.emit(r.KEY_UP+f[o],s),s.cancelled||this.emit(r.ANY_KEY_UP,s))),1===s.cancelled&&(s.cancelled=0))}},resetKeys:function(){for(var t=this.keys,e=0;e<t.length;e++)t[e]&&t[e].reset();return this},shutdown:function(){this.removeAllKeys(!0),this.removeAllListeners(),this.sceneInputPlugin.manager.events.off(h.MANAGER_PROCESS,this.update,this),this.game.events.off(o.BLUR,this.resetKeys),this.scene.sys.events.off(p.PAUSE,this.resetKeys,this),this.scene.sys.events.off(p.SLEEP,this.resetKeys,this),this.queue=[]},destroy:function(){this.shutdown();for(var t=this.keys,e=0;e<t.length;e++)t[e]&&t[e].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}}});l.register("KeyboardPlugin",m,"keyboard","keyboard","inputKeyboard"),t.exports=m},66970(t){t.exports=function(t,e){return e.timeLastMatched=t.timeStamp,e.index++,e.index===e.size||(e.current=e.keyCodes[e.index],!1)}},87960(t,e,i){var n=i(83419),s=i(95922),r=i(95540),o=i(68769),a=i(92803);t.exports=new n({initialize:function(t,e,i){if(void 0===i&&(i={}),e.length<2)return!1;this.manager=t,this.enabled=!0,this.keyCodes=[];for(var n=0;n<e.length;n++){var h=e[n];"string"==typeof h?this.keyCodes.push(h.toUpperCase().charCodeAt(0)):"number"==typeof h?this.keyCodes.push(h):h.hasOwnProperty("keyCode")&&this.keyCodes.push(h.keyCode)}this.current=this.keyCodes[0],this.index=0,this.size=this.keyCodes.length,this.timeLastMatched=0,this.matched=!1,this.timeMatched=0,this.resetOnWrongKey=r(i,"resetOnWrongKey",!0),this.maxKeyDelay=r(i,"maxKeyDelay",0),this.resetOnMatch=r(i,"resetOnMatch",!1),this.deleteOnMatch=r(i,"deleteOnMatch",!1);var l=this;this.onKeyDown=function(t){!l.matched&&l.enabled&&o(t,l)&&(l.manager.emit(s.COMBO_MATCH,l,t),l.resetOnMatch?a(l):l.deleteOnMatch&&l.destroy())},this.manager.on(s.ANY_KEY_DOWN,this.onKeyDown)},progress:{get:function(){return this.index/this.size}},destroy:function(){this.enabled=!1,this.keyCodes=[],this.manager.off(s.ANY_KEY_DOWN,this.onKeyDown),this.manager=null}})},68769(t,e,i){var n=i(66970);t.exports=function(t,e){if(e.matched)return!0;var i=!1,s=!1;if(t.keyCode===e.current)if(e.index>0&&e.maxKeyDelay>0){var r=e.timeLastMatched+e.maxKeyDelay;t.timeStamp<=r&&(s=!0,i=n(t,e))}else s=!0,i=n(t,e);return!s&&e.resetOnWrongKey&&(e.index=0,e.current=e.keyCodes[0]),i&&(e.timeLastMatched=t.timeStamp,e.matched=!0,e.timeMatched=t.timeStamp),i}},92803(t){t.exports=function(t){return t.current=t.keyCodes[0],t.index=0,t.timeLastMatched=0,t.matched=!1,t.timeMatched=0,t}},92612(t){t.exports="keydown"},23345(t){t.exports="keyup"},21957(t){t.exports="keycombomatch"},44743(t){t.exports="down"},3771(t){t.exports="keydown-"},46358(t){t.exports="keyup-"},75674(t){t.exports="up"},95922(t,e,i){t.exports={ANY_KEY_DOWN:i(92612),ANY_KEY_UP:i(23345),COMBO_MATCH:i(21957),DOWN:i(44743),KEY_DOWN:i(3771),KEY_UP:i(46358),UP:i(75674)}},51442(t,e,i){t.exports={Events:i(95922),KeyboardManager:i(78970),KeyboardPlugin:i(28846),Key:i(30472),KeyCodes:i(46032),KeyCombo:i(87960),AdvanceKeyCombo:i(66970),ProcessKeyCombo:i(68769),ResetKeyCombo:i(92803),JustDown:i(90229),JustUp:i(38796),DownDuration:i(37015),UpDuration:i(41170)}},37015(t){t.exports=function(t,e){void 0===e&&(e=50);var i=t.plugin.game.loop.time-t.timeDown;return t.isDown&&i<e}},90229(t){t.exports=function(t){return!!t._justDown&&(t._justDown=!1,!0)}},38796(t){t.exports=function(t){return!!t._justUp&&(t._justUp=!1,!0)}},30472(t,e,i){var n=i(83419),s=i(50792),r=i(95922);t.exports=new n({Extends:s,initialize:function(t,e){s.call(this),this.plugin=t,this.keyCode=e,this.originalEvent=void 0,this.enabled=!0,this.isDown=!1,this.isUp=!0,this.altKey=!1,this.ctrlKey=!1,this.shiftKey=!1,this.metaKey=!1,this.location=0,this.timeDown=0,this.duration=0,this.timeUp=0,this.emitOnRepeat=!1,this.repeats=0,this._justDown=!1,this._justUp=!1,this._tick=-1},setEmitOnRepeat:function(t){return this.emitOnRepeat=t,this},onDown:function(t){this.originalEvent=t,this.enabled&&(this.altKey=t.altKey,this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.metaKey=t.metaKey,this.location=t.location,this.repeats++,this.isDown?this.emitOnRepeat&&this.emit(r.DOWN,this,t):(this.isDown=!0,this.isUp=!1,this.timeDown=t.timeStamp,this.duration=0,this._justDown=!0,this._justUp=!1,this.emit(r.DOWN,this,t)))},onUp:function(t){this.originalEvent=t,this.enabled&&(this.isDown=!1,this.isUp=!0,this.timeUp=t.timeStamp,this.duration=this.timeUp-this.timeDown,this.repeats=0,this._justDown=!1,this._justUp=!0,this._tick=-1,this.emit(r.UP,this,t))},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}})},46032(t){t.exports={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}},74600(t,e,i){var n=i(46032),s={};for(var r in n)s[n[r]]=r;t.exports=s},41170(t){t.exports=function(t,e){void 0===e&&(e=50);var i=t.plugin.game.loop.time-t.timeUp;return t.isUp&&i<e}},85098(t,e,i){var n=i(83419),s=i(89357),r=i(8214),o=i(29747);t.exports=new n({initialize:function(t){this.manager=t,this.preventDefaultDown=!0,this.preventDefaultUp=!0,this.preventDefaultMove=!0,this.preventDefaultWheel=!1,this.enabled=!1,this.target,this.locked=!1,this.onMouseMove=o,this.onMouseDown=o,this.onMouseUp=o,this.onMouseDownWindow=o,this.onMouseUpWindow=o,this.onMouseOver=o,this.onMouseOut=o,this.onMouseWheel=o,this.pointerLockChange=o,this.isTop=!0,t.events.once(r.MANAGER_BOOT,this.boot,this)},boot:function(){var t=this.manager.config;this.enabled=t.inputMouse,this.target=t.inputMouseEventTarget,this.passive=t.inputMousePassive,this.preventDefaultDown=t.inputMousePreventDefaultDown,this.preventDefaultUp=t.inputMousePreventDefaultUp,this.preventDefaultMove=t.inputMousePreventDefaultMove,this.preventDefaultWheel=t.inputMousePreventDefaultWheel,this.target?"string"==typeof this.target&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,t.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return this.target.addEventListener("contextmenu",function(t){return t.preventDefault(),!1}),this},requestPointerLock:function(){if(s.pointerLock){var t=this.target;t.requestPointerLock=t.requestPointerLock||t.mozRequestPointerLock||t.webkitRequestPointerLock,t.requestPointerLock()}},releasePointerLock:function(){s.pointerLock&&(document.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock,document.exitPointerLock())},startListeners:function(){var t=this.target;if(t){var e=this,i=this.manager,n=i.canvas,r=window&&window.focus&&i.game.config.autoFocus;this.onMouseMove=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onMouseMove(t),e.preventDefaultMove&&t.preventDefault())},this.onMouseDown=function(t){r&&window.focus(),!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onMouseDown(t),e.preventDefaultDown&&t.target===n&&t.preventDefault())},this.onMouseDownWindow=function(t){(!t.sourceCapabilities||!t.sourceCapabilities.firesTouchEvents)&&!t.defaultPrevented&&e.enabled&&i&&i.enabled&&t.target!==n&&i.onMouseDown(t)},this.onMouseUp=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onMouseUp(t),e.preventDefaultUp&&t.target===n&&t.preventDefault())},this.onMouseUpWindow=function(t){(!t.sourceCapabilities||!t.sourceCapabilities.firesTouchEvents)&&!t.defaultPrevented&&e.enabled&&i&&i.enabled&&t.target!==n&&i.onMouseUp(t)},this.onMouseOver=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&i.setCanvasOver(t)},this.onMouseOut=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&i.setCanvasOut(t)},this.onMouseWheel=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&i.onMouseWheel(t),e.preventDefaultWheel&&t.target===n&&t.preventDefault()};var o={passive:!0};if(t.addEventListener("mousemove",this.onMouseMove),t.addEventListener("mousedown",this.onMouseDown),t.addEventListener("mouseup",this.onMouseUp),t.addEventListener("mouseover",this.onMouseOver,o),t.addEventListener("mouseout",this.onMouseOut,o),this.preventDefaultWheel?t.addEventListener("wheel",this.onMouseWheel,{passive:!1}):t.addEventListener("wheel",this.onMouseWheel,o),window&&i.game.config.inputWindowEvents)try{window.top.addEventListener("mousedown",this.onMouseDownWindow,o),window.top.addEventListener("mouseup",this.onMouseUpWindow,o)}catch(t){window.addEventListener("mousedown",this.onMouseDownWindow,o),window.addEventListener("mouseup",this.onMouseUpWindow,o),this.isTop=!1}s.pointerLock&&(this.pointerLockChange=function(t){var n=e.target;e.locked=document.pointerLockElement===n||document.mozPointerLockElement===n||document.webkitPointerLockElement===n,i.onPointerLockChange(t)},document.addEventListener("pointerlockchange",this.pointerLockChange,!0),document.addEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.addEventListener("webkitpointerlockchange",this.pointerLockChange,!0)),this.enabled=!0}},stopListeners:function(){var t=this.target;t.removeEventListener("mousemove",this.onMouseMove),t.removeEventListener("mousedown",this.onMouseDown),t.removeEventListener("mouseup",this.onMouseUp),t.removeEventListener("mouseover",this.onMouseOver),t.removeEventListener("mouseout",this.onMouseOut),window&&((t=this.isTop?window.top:window).removeEventListener("mousedown",this.onMouseDownWindow),t.removeEventListener("mouseup",this.onMouseUpWindow)),s.pointerLock&&(document.removeEventListener("pointerlockchange",this.pointerLockChange,!0),document.removeEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.removeEventListener("webkitpointerlockchange",this.pointerLockChange,!0))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}})},87078(t,e,i){t.exports={MouseManager:i(85098)}},36210(t,e,i){var n=i(83419),s=i(8214),r=i(29747);t.exports=new n({initialize:function(t){this.manager=t,this.capture=!0,this.enabled=!1,this.target,this.onTouchStart=r,this.onTouchStartWindow=r,this.onTouchMove=r,this.onTouchEnd=r,this.onTouchEndWindow=r,this.onTouchCancel=r,this.onTouchCancelWindow=r,this.isTop=!0,t.events.once(s.MANAGER_BOOT,this.boot,this)},boot:function(){var t=this.manager.config;this.enabled=t.inputTouch,this.target=t.inputTouchEventTarget,this.capture=t.inputTouchCapture,this.target?"string"==typeof this.target&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,t.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return this.target.addEventListener("contextmenu",function(t){return t.preventDefault(),!1}),this},startListeners:function(){var t=this.target;if(t){var e=this,i=this.manager,n=i.canvas,s=window&&window.focus&&i.game.config.autoFocus;this.onTouchMove=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onTouchMove(t),e.capture&&t.cancelable&&t.preventDefault())},this.onTouchStart=function(t){s&&window.focus(),!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onTouchStart(t),e.capture&&t.cancelable&&t.target===n&&t.preventDefault())},this.onTouchStartWindow=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&t.target!==n&&i.onTouchStart(t)},this.onTouchEnd=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onTouchEnd(t),e.capture&&t.cancelable&&t.target===n&&t.preventDefault())},this.onTouchEndWindow=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&t.target!==n&&i.onTouchEnd(t)},this.onTouchCancel=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onTouchCancel(t),e.capture&&t.preventDefault())},this.onTouchCancelWindow=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&i.onTouchCancel(t)};var r=this.capture,o={passive:!0},a={passive:!1};if(t.addEventListener("touchstart",this.onTouchStart,r?a:o),t.addEventListener("touchmove",this.onTouchMove,r?a:o),t.addEventListener("touchend",this.onTouchEnd,r?a:o),t.addEventListener("touchcancel",this.onTouchCancel,r?a:o),window&&i.game.config.inputWindowEvents)try{window.top.addEventListener("touchstart",this.onTouchStartWindow,a),window.top.addEventListener("touchend",this.onTouchEndWindow,a),window.top.addEventListener("touchcancel",this.onTouchCancelWindow,a)}catch(t){window.addEventListener("touchstart",this.onTouchStartWindow,a),window.addEventListener("touchend",this.onTouchEndWindow,a),window.addEventListener("touchcancel",this.onTouchCancelWindow,a),this.isTop=!1}this.enabled=!0}},stopListeners:function(){var t=this.target;t.removeEventListener("touchstart",this.onTouchStart),t.removeEventListener("touchmove",this.onTouchMove),t.removeEventListener("touchend",this.onTouchEnd),t.removeEventListener("touchcancel",this.onTouchCancel),window&&((t=this.isTop?window.top:window).removeEventListener("touchstart",this.onTouchStartWindow),t.removeEventListener("touchend",this.onTouchEndWindow),t.removeEventListener("touchcancel",this.onTouchCancelWindow))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}})},95618(t,e,i){t.exports={TouchManager:i(36210)}},41299(t,e,i){var n=i(83419),s=i(23906),r=i(54899),o=i(95540),a=i(98356),h=i(3374),l=i(84376),u=i(92638),d=new n({initialize:function(t,e){if(this.loader=t,this.cache=o(e,"cache",!1),this.type=o(e,"type",!1),!this.type)throw Error("Invalid File type: "+this.type);this.key=o(e,"key",!1);var i=this.key;if(t.prefix&&""!==t.prefix&&(this.key=t.prefix+i),!this.key)throw Error("Invalid File key: "+this.key);var n=o(e,"url");void 0===n?n=t.path+i+"."+o(e,"extension",""):"string"!=typeof n||n.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)||(n=t.path+n),this.url=n,this.src="",this.xhrSettings=u(o(e,"responseType",void 0)),o(e,"xhrSettings",!1)&&(this.xhrSettings=h(this.xhrSettings,o(e,"xhrSettings",{}))),this.xhrLoader=null,this.state="function"==typeof this.url?s.FILE_POPULATED:s.FILE_PENDING,this.bytesTotal=0,this.bytesLoaded=-1,this.percentComplete=-1,this.crossOrigin=void 0,this.data=void 0,this.config=o(e,"config",{}),this.multiFile,this.linkFile,this.base64="string"==typeof n&&0===n.indexOf("data:"),this.retryAttempts=o(e,"maxRetries",t.maxRetries)},setLink:function(t){this.linkFile=t,t.linkFile=this},resetXHR:function(){this.xhrLoader&&(this.xhrLoader.onload=void 0,this.xhrLoader.onerror=void 0,this.xhrLoader.onprogress=void 0)},load:function(){if(this.state===s.FILE_POPULATED)this.loader.nextFile(this,!0);else{if(this.state=s.FILE_LOADING,this.src=a(this,this.loader.baseURL),!this.src)throw Error("URL Error in File: "+this.key+" from: "+this.url);0===this.src.indexOf("data:")&&(this.base64=!0),this.xhrLoader=l(this,this.loader.xhr)}},onLoad:function(t,e){var i=t.responseURL&&this.loader.localSchemes.some(function(e){return 0===t.responseURL.indexOf(e)})&&0===e.target.status,n=!(e.target&&200!==e.target.status)||i;4===t.readyState&&t.status>=400&&t.status<=599&&(n=!1),this.state=s.FILE_LOADED,this.resetXHR(),this.loader.nextFile(this,n)},onBase64Load:function(t){this.xhrLoader=t,this.state=s.FILE_LOADED,this.percentComplete=1,this.loader.emit(r.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(t){t.lengthComputable&&(this.bytesLoaded=t.loaded,this.bytesTotal=t.total,this.percentComplete=Math.min(this.bytesLoaded/this.bytesTotal,1),this.loader.emit(r.FILE_PROGRESS,this,this.percentComplete))},onProcess:function(){this.state=s.FILE_PROCESSING,this.onProcessComplete()},onProcessComplete:function(){this.state=s.FILE_COMPLETE,this.multiFile&&this.multiFile.onFileComplete(this),this.loader.fileProcessComplete(this)},onProcessError:function(){console.error('Failed to process file: %s "%s"',this.type,this.key),this.state=s.FILE_ERRORED,this.multiFile&&this.multiFile.onFileFailed(this),this.loader.fileProcessComplete(this)},hasCacheConflict:function(){return this.cache&&this.cache.exists(this.key)},addToCache:function(){this.cache&&this.data&&this.cache.add(this.key,this.data)},pendingDestroy:function(t){if(this.state!==s.FILE_PENDING_DESTROY){void 0===t&&(t=this.data);var e=this.key,i=this.type;this.loader.emit(r.FILE_COMPLETE,e,i,t),this.loader.emit(r.FILE_KEY_COMPLETE+i+"-"+e,e,i,t),this.loader.flagForRemoval(this),this.state=s.FILE_PENDING_DESTROY}},destroy:function(){this.loader=null,this.cache=null,this.xhrSettings=null,this.multiFile=null,this.linkFile=null,this.data=null}});d.createObjectURL=function(t,e,i){if("function"==typeof URL)t.src=URL.createObjectURL(e);else{var n=new FileReader;n.onload=function(){t.removeAttribute("crossOrigin"),t.src="data:"+(e.type||i)+";base64,"+n.result.split(",")[1]},n.onerror=t.onerror,n.readAsDataURL(e)}},d.revokeObjectURL=function(t){"function"==typeof URL&&URL.revokeObjectURL(t.src)},t.exports=d},74099(t){var e={};t.exports={install:function(t){for(var i in e)t[i]=e[i]},register:function(t,i){e[t]=i},destroy:function(){e={}}}},98356(t){t.exports=function(t,e){return!!t.url&&(t.url.match(/^(?:blob:|data:|capacitor:\/\/|file:\/\/|http:\/\/|https:\/\/|\/\/)/)?t.url:e+t.url)}},74261(t,e,i){var n=i(83419),s=i(23906),r=i(50792),o=i(54899),a=i(74099),h=i(95540
1),l=i(35154),u=i(41212),d=i(37277),c=i(44594),f=i(92638),p=new n({Extends:r,initialize:function(t){r.call(this);var e=t.sys.game.config,i=t.sys.settings.loader;this.scene=t,this.systems=t.sys,this.cacheManager=t.sys.cache,this.textureManager=t.sys.textures,this.sceneManager=t.sys.game.scene,a.install(this),this.prefix="",this.path="",this.baseURL="",this.setBaseURL(h(i,"baseURL",e.loaderBaseURL)),this.setPath(h(i,"path",e.loaderPath)),this.setPrefix(h(i,"prefix",e.loaderPrefix)),this.maxParallelDownloads=h(i,"maxParallelDownloads",e.loaderMaxParallelDownloads),this.xhr=f(h(i,"responseType",e.loaderResponseType),h(i,"async",e.loaderAsync),h(i,"user",e.loaderUser),h(i,"password",e.loaderPassword),h(i,"timeout",e.loaderTimeout),h(i,"withCredentials",e.loaderWithCredentials)),this.crossOrigin=h(i,"crossOrigin",e.loaderCrossOrigin),this.imageLoadType=h(i,"imageLoadType",e.loaderImageLoadType),this.localSchemes=h(i,"localScheme",e.loaderLocalScheme),this.totalToLoad=0,this.progress=0,this.list=new Set,this.inflight=new Set,this.queue=new Set,this._deleteQueue=new Set,this.totalFailed=0,this.totalComplete=0,this.state=s.LOADER_IDLE,this.multiKeyIndex=0,this.maxRetries=h(i,"maxRetries",e.loaderMaxRetries),t.sys.events.once(c.BOOT,this.boot,this),t.sys.events.on(c.START,this.pluginStart,this)},boot:function(){this.systems.events.once(c.DESTROY,this.destroy,this)},pluginStart:function(){this.systems.events.once(c.SHUTDOWN,this.shutdown,this)},setBaseURL:function(t){return void 0===t&&(t=""),""!==t&&"/"!==t.substr(-1)&&(t=t.concat("/")),this.baseURL=t,this},setPath:function(t){return void 0===t&&(t=""),""!==t&&"/"!==t.substr(-1)&&(t=t.concat("/")),this.path=t,this},setPrefix:function(t){return void 0===t&&(t=""),this.prefix=t,this},setCORS:function(t){return this.crossOrigin=t,this},addFile:function(t){Array.isArray(t)||(t=[t]);for(var e=0;e<t.length;e++){var i=t[e];!this.keyExists(i)&&(this.list.add(i),this.emit(o.ADD,i.key,i.type,this,i),this.isLoading()&&(this.totalToLoad++,this.updateProgress()))}},keyExists:function(t){var e=t.hasCacheConflict();return e||this.list.forEach(function(i){if(i.type===t.type&&i.key===t.key)return e=!0,!1}),!e&&this.isLoading()&&(this.inflight.forEach(function(i){if(i.type===t.type&&i.key===t.key)return e=!0,!1}),this.queue.forEach(function(i){if(i.type===t.type&&i.key===t.key)return e=!0,!1})),e},addPack:function(t,e){if("string"==typeof e){var i=l(t,e);i&&(t={packKey:i})}var n=0,s=this.baseURL,r=this.path,o=this.prefix;for(var a in t)if(Object.prototype.hasOwnProperty.call(t,a)){var u=t[a],d=h(u,"baseURL",s),c=h(u,"path",r),f=h(u,"prefix",o),p=h(u,"files",null),g=h(u,"defaultType","void");if(Array.isArray(p)){this.setBaseURL(d),this.setPath(c),this.setPrefix(f);for(var m=0;m<p.length;m++){var v=p[m],x=v.hasOwnProperty("type")?v.type:g;this[x]&&(this[x](v),n++)}}}return this.setBaseURL(s),this.setPath(r),this.setPrefix(o),n>0},removePack:function(t,e){var i,n=this.systems.anims,s=this.cacheManager,r=this.textureManager,o={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"};if(u(t))i=t;else if(!(i=s.json.get(t)))return void console.warn("Asset Pack not found in JSON cache:",t);for(var a in e&&(i={_:i[e]}),i){var l=i[a],d=h(l,"prefix",""),c=h(l,"files"),f=h(l,"defaultType");if(Array.isArray(c))for(var p=0;p<c.length;p++){var g=c[p],m=g.hasOwnProperty("type")?g.type:f;if(!m){console.warn("No type:",g);continue}var v=d+g.key;if("animation"===m&&n.remove(v),"aseprite"!==m&&"atlas"!==m&&"atlasXML"!==m&&"htmlTexture"!==m&&"image"!==m&&"multiatlas"!==m&&"spritesheet"!==m&&"svg"!==m&&"texture"!==m&&"unityAtlas"!==m||(r.remove(v),o[m])){if("pack"===m){this.removePack(v,g.dataKey);continue}if("spine"===m){var x=s.custom.spine.get(v);if(!x)continue;var y=void 0===x.prefix?"":x.prefix;s.custom.spine.remove(v);var T=s.custom.spineTextures.get(v);if(!T)continue;s.custom.spineTextures.remove(v);for(var w=0;w<T.pages.length;w++){var b=y+T.pages[w].name,S=v+":"+b;r.exists(S)?r.remove(S):r.remove(b)}}var C=o[m];if(null!==C){if(!C){console.warn("Unknown type:",m);continue}s[C].remove(v)}}}}},isLoading:function(){return this.state===s.LOADER_LOADING||this.state===s.LOADER_PROCESSING},isReady:function(){return this.state===s.LOADER_IDLE||this.state===s.LOADER_COMPLETE},start:function(){this.isReady()&&(this.progress=0,this.totalFailed=0,this.totalComplete=0,this.totalToLoad=this.list.size,this.emit
vendor: 42,875 bytes, line 1
1(o.START,this),0===this.list.size?this.loadComplete():(this.state=s.LOADER_LOADING,this.inflight.clear(),this.queue.clear(),this.updateProgress(),this.checkLoadQueue(),this.systems.events.on(c.UPDATE,this.update,this)))},updateProgress:function(){this.progress=1-(this.list.size+this.inflight.size)/this.totalToLoad,this.emit(o.PROGRESS,this.progress)},update:function(){this.state===s.LOADER_LOADING&&this.list.size>0&&this.inflight.size<this.maxParallelDownloads&&this.checkLoadQueue()},checkLoadQueue:function(){this.list.forEach(function(t){if((t.state===s.FILE_POPULATED||t.state===s.FILE_PENDING&&this.inflight.size<this.maxParallelDownloads)&&(this.inflight.add(t),this.list.delete(t),t.crossOrigin||(t.crossOrigin=this.crossOrigin),t.load()),this.inflight.size===this.maxParallelDownloads)return!1},this)},nextFile:function(t,e){this.inflight&&(this.inflight.delete(t),this.updateProgress(),e?(this.totalComplete++,this.queue.add(t),this.emit(o.FILE_LOAD,t),t.onProcess()):(this.totalFailed++,this._deleteQueue.add(t),this.emit(o.FILE_LOAD_ERROR,t),this.fileProcessComplete(t)))},fileProcessComplete:function(t){this.scene&&this.systems&&this.systems.game&&!this.systems.game.pendingDestroy&&(t.state===s.FILE_ERRORED?t.multiFile&&t.multiFile.onFileFailed(t):t.state===s.FILE_COMPLETE&&(t.multiFile?t.multiFile.isReadyToProcess()&&(t.multiFile.addToCache(),t.multiFile.pendingDestroy()):(t.addToCache(),t.pendingDestroy())),this.queue.delete(t),0===this.list.size&&0===this.inflight.size&&0===this.queue.size&&this.loadComplete())},loadComplete:function(){this.emit(o.POST_PROCESS,this),this.list.clear(),this.inflight.clear(),this.queue.clear(),this.progress=1,this.state=s.LOADER_COMPLETE,this.systems.events.off(c.UPDATE,this.update,this),this._deleteQueue.forEach(function(t){t.destroy()}),this._deleteQueue.clear(),this.emit(o.COMPLETE,this,this.totalComplete,this.totalFailed)},flagForRemoval:function(t){this._deleteQueue.add(t)},saveJSON:function(t,e){return this.save(JSON.stringify(t),e)},save:function(t,e,i){void 0===e&&(e="file.json"),void 0===i&&(i="application/json");var n=new Blob([t],{type:i}),s=URL.createObjectURL(n),r=document.createElement("a");return r.download=e,r.textContent="Download "+e,r.href=s,r.click(),this},reset:function(){this.list.clear(),this.inflight.clear(),this.queue.clear();var t=this.systems.game.config,e=this.systems.settings.loader;this.setBaseURL(h(e,"baseURL",t.loaderBaseURL)),this.setPath(h(e,"path",t.loaderPath)),this.setPrefix(h(e,"prefix",t.loaderPrefix)),this.state=s.LOADER_IDLE},shutdown:function(){this.reset(),this.state=s.LOADER_SHUTDOWN,this.removeAllListeners(),this.systems.events.off(c.UPDATE,this.update,this),this.systems.events.off(c.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.state=s.LOADER_DESTROYED,this.systems.events.off(c.UPDATE,this.update,this),this.systems.events.off(c.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}});d.register("Loader",p,"load"),t.exports=p},3374(t,e,i){var n=i(79291),s=i(92638);t.exports=function(t,e){var i=void 0===t?s():n({},t);if(e)for(var r in e)void 0!==e[r]&&(i[r]=e[r]);return i}},26430(t,e,i){var n=i(83419),s=i(23906),r=i(54899);t.exports=new n({initialize:function(t,e,i,n){var r=[];n.forEach(function(t){t&&r.push(t)}),this.loader=t,this.type=e,this.key=i;var o=this.key;t.prefix&&""!==t.prefix&&(this.key=t.prefix+o),this.multiKeyIndex=t.multiKeyIndex++,this.files=r,this.state=s.FILE_PENDING,this.complete=!1,this.pending=r.length,this.failed=0,this.config={},this.baseURL=t.baseURL,this.path=t.path,this.prefix=t.prefix;for(var a=0;a<r.length;a++)r[a].multiFile=this},isReadyToProcess:function(){return 0===this.pending&&0===this.failed&&!this.complete},addToMultiFile:function(t){return this.files.push(t),t.multiFile=this,this.pending++,this.complete=!1,this},onFileComplete:function(t){-1!==this.files.indexOf(t)&&this.pending--},onFileFailed:function(t){-1!==this.files.indexOf(t)&&(this.failed++,console.error('File failed: %s "%s" (via %s "%s")',this.type,this.key,t.type,t.key))},pendingDestroy:function(){if(this.state!==s.FILE_PENDING_DESTROY){var t=this.key,e=this.type;this.loader.emit(r.FILE_COMPLETE,t,e),this.loader.emit(r.FILE_KEY_COMPLETE+e+"-"+t,t,e),this.loader.flagForRemoval(this);for(var i=0;i<this.files.length;i++)this.files[i].pendingDestroy();this.state=s.FILE_PENDING_DESTROY}},destroy:function(){this.loader=null,this.files=null,this.config=null}})},84376(t,e,i){var n=i(3374);t.exports=function(t,e){var i=n(e,t.xhrSettings);if(t.base64){var s,r=t.url.split(";base64,").pop()||t.url.split(",").pop();s="arraybuffer"===t.xhrSettings.responseType?{response:Uint8Array.from(atob(r),function(t){return t.charCodeAt(0)}).buffer}:{responseText:atob(r)},t.onBase64Load(s);return}var o=new XMLHttpRequest;if(o.open("GET",t.src,i.async,i.user,i.password),o.responseType=t.xhrSettings.responseType,o.timeout=i.timeout,i.headers)for(var a in i.headers)o.setRequestHeader(a,i.headers[a]);return i.header&&i.headerValue&&o.setRequestHeader(i.header,i.headerValue),i.requestedWith&&o.setRequestHeader("X-Requested-With",i.requestedWith),i.overrideMimeType&&o.overrideMimeType(i.overrideMimeType),i.withCredentials&&(o.withCredentials=!0),o.onload=t.onLoad.bind(t,o),o.onerror=t.onError.bind(t,o),o.onprogress=t.onProgress.bind(t),o.ontimeout=t.onError.bind(t,o),o.send(),o}},92638(t){t.exports=function(t,e,i,n,s,r){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===n&&(n=""),void 0===s&&(s=0),void 0===r&&(r=!1),{responseType:t,async:e,user:i,password:n,timeout:s,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:r}}},23906(t){t.exports={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}},42155(t){t.exports="addfile"},38991(t){t.exports="complete"},27540(t){t.exports="filecomplete"},87464(t){t.exports="filecomplete-"},94486(t){t.exports="loaderror"},13035(t){t.exports="load"},38144(t){t.exports="fileprogress"},97520(t){t.exports="postprocess"},85595(t){t.exports="progress"},55680(t){t.exports="start"},54899(t,e,i){t.exports={ADD:i(42155),COMPLETE:i(38991),FILE_COMPLETE:i(27540),FILE_KEY_COMPLETE:i(87464),FILE_LOAD_ERROR:i(94486),FILE_LOAD:i(13035),FILE_PROGRESS:i(38144),POST_PROCESS:i(97520),PROGRESS:i(85595),START:i(55680)}},14135(t,e,i){var n=i(83419),s=i(74099),r=i(518),o=i(54899),a=new n({Extends:r,initialize:function(t,e,i,n,s){r.call(this,t,e,i,n,s),this.type="animationJSON"},onProcess:function(){this.loader.once(o.POST_PROCESS,this.onLoadComplete,this),r.prototype.onProcess.call(this)},onLoadComplete:function(){this.loader.systems.anims.fromJSON(this.data)}});s.register("animation",function(t,e,i,n){if(Array.isArray(t))for(var s=0;s<t.length;s++)this.addFile(new a(this,t[s]));else this.addFile(new a(this,t,e,n,i));return this}),t.exports=a},76272(t,e,i){var n=i(83419),s=i(74099),r=i(95540),o=i(19550),a=i(41212),h=i(518),l=i(26430),u=new n({Extends:l,initialize:function(t,e,i,n,s,u){if(a(e)){var d,c,f=e;d=new o(t,{key:e=r(f,"key"),url:r(f,"textureURL"),extension:r(f,"textureExtension","png"),normalMap:r(f,"normalMap"),xhrSettings:r(f,"textureXhrSettings")}),c=new h(t,{key:e,url:r(f,"atlasURL"),extension:r(f,"atlasExtension","json"),xhrSettings:r(f,"atlasXhrSettings")})}else d=new o(t,e,i,s),c=new h(t,e,n,u);d.linkFile?l.call(this,t,"atlasjson",e,[d,c,d.linkFile]):l.call(this,t,"atlasjson",e,[d,c])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1],i=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlas(t.key,t.data,e.data,i),e.addToCache(),this.complete=!0}}});s.register("aseprite",function(t,e,i,n,s){var r;if(Array.isArray(t))for(var o=0;o<t.length;o++)r=new u(this,t[o]),this.addFile(r.files);else r=new u(this,t,e,i,n,s),this.addFile(r.files);return this}),t.exports=u},38734(t,e,i){var n=i(83419),s=i(74099),r=i(95540),o=i(19550),a=i(41212),h=i(518),l=i(26430),u=new n({Extends:l,initialize:function(t,e,i,n,s,u){if(a(e)){var d,c,f=e;d=new o(t,{key:e=r(f,"key"),url:r(f,"textureURL"),extension:r(f,"textureExtension","png"),normalMap:r(f,"normalMap"),xhrSettings:r(f,"textureXhrSettings")}),c=new h(t,{key:e,url:r(f,"atlasURL"),extension:r(f,"atlasExtension","json"),xhrSettings:r(f,"atlasXhrSettings")})}else d=new o(t,e,i,s),c=new h(t,e,n,u);d.linkFile?l.call(this,t,"atlasjson",e,[d,c,d.linkFile]):l.call(this,t,"atlasjson",e,[d,c])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1],i=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlas(t.key,t.data,e.data,i),this.complete=!0}}});s.register("atlas",function(t,e,i,n,s){var r;if(Array.isArray(t))for(var o=0;o<t.length;o++)r=new u(this,t[o]),this.addFile(r.files);else r=new u(this,t,e,i,n,s),this.addFile(r.files);return this}),t.exports=u},74599(t,e,i){var n=i(83419),s=i(74099),r=i(95540),o=i(19550),a=i(41212),h=i(26430),l=i(57318),u=new n({Extends:h,initialize:function(t,e,i,n,s,u){if(a(e)){var d,c,f=e;d=new o(t,{key:e=r(f,"key"),url:r(f,"textureURL"),extension:r(f,"textureExtension","png"),normalMap:r(f,"normalMap"),xhrSettings:r(f,"textureXhrSettings")}),c=new l(t,{key:e,url:r(f,"atlasURL"),extension:r(f,"atlasExtension","xml"),xhrSettings:r(f,"atlasXhrSettings")})}else d=new o(t,e,i,s),c=new l(t,e,n,u);d.linkFile?h.call(this,t,"atlasxml",e,[d,c,d.linkFile]):h.call(this,t,"atlasxml",e,[d,c])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1],i=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlasXML(t.key,t.data,e.data,i),this.complete=!0}}});s.register("atlasXML",function(t,e,i,n,s){var r;if(Array.isArray(t))for(var o=0;o<t.length;o++)r=new u(this,t[o]),this.addFile(r.files);else r=new u(this,t,e,i,n,s),this.addFile(r.files);return this}),t.exports=u},21097(t,e,i){var n=i(83419),s=i(23906),r=i(41299),o=i(74099),a=i(95540),h=i(89749),l=i(41212),u=new n({Extends:r,initialize:function(t,e,i,n,s){if(l(e)){var o=e;e=a(o,"key"),n=a(o,"xhrSettings"),s=a(o,"context",s)}var h={type:"audio",cache:t.cacheManager.audio,extension:i.type,responseType:"arraybuffer",key:e,url:i.url,xhrSettings:n,config:{context:s}};r.call(this,t,h)},onProcess:function(){this.state=s.FILE_PROCESSING;var t=this;this.config.context.decodeAudioData(this.xhrLoader.response,function(e){t.data=e,t.onProcessComplete()},function(e){console.error("Error decoding audio: "+t.key+" - ",e?e.message:null),t.onProcessError()}),this.config.context=null}});u.create=function(t,e,i,n,s){var r=t.systems.game,o=r.config.audio,d=r.device.audio;l(e)&&(i=a(e,"url",[]),n=a(e,"config",{}));var c=u.getAudioURL(r,i);return c?d.webAudio&&!o.disableWebAudio?new u(t,e,c,s,r.sound.context):new h(t,e,c,n):(console.warn('No audio URLs for "%s" can play on this device',e),null)},u.getAudioURL=function(t,e){Array.isArray(e)||(e=[e]);for(var i=0;i<e.length;i++){var n=a(e[i],"url",e[i]);if(0===n.indexOf("blob:")||0===n.indexOf("data:"))return{url:n,type:""};var s=n.match(/\.([a-zA-Z0-9]+)($|\?)/);if(s=a(e[i],"type",s?s[1]:"").toLowerCase(),t.device.audio[s])return{url:n,type:s}}return null},o.register("audio",function(t,e,i,n){var s,r=this.systems.game,o=r.config.audio,a=r.device.audio;if(o.noAudio||!a.webAudio&&!a.audioData)return this;if(Array.isArray(t))for(var h=0;h<t.length;h++)(s=u.create(this,t[h]))&&this.addFile(s);else(s=u.create(this,t,e,i,n))&&this.addFile(s);return this}),t.exports=u},89524(t,e,i){var n=i(21097),s=i(83419),r=i(74099),o=i(95540),a=i(41212),h=i(518),l=i(26430),u=new s({Extends:l,initialize:function(t,e,i,s,r,u,d){if(a(e)){var c,f=e;e=o(f,"key"),i=o(f,"jsonURL"),s=o(f,"audioURL"),r=o(f,"audioConfig"),u=o(f,"audioXhrSettings"),d=o(f,"jsonXhrSettings")}if(s){var p=n.create(t,e,s,r,u);p&&(c=new h(t,e,i,d),l.call(this,t,"audiosprite",e,[p,c]),this.config.resourceLoad=!1)}else c=new h(t,e,i,d),l.call(this,t,"audiosprite",e,[c]),this.config.resourceLoad=!0,this.config.audioConfig=r,this.config.audioXhrSettings=u},onFileComplete:function(t){if(-1!==this.files.indexOf(t)&&(this.pending--,this.config.resourceLoad&&"json"===t.type&&t.data.hasOwnProperty("resources"))){var e=t.data.resources,i=o(this.config,"audioConfig"),s=o(this.config,"audioXhrSettings"),r=n.create(this.loader,t.key,e,i,s);r&&(this.addToMultiFile(r),this.loader.addFile(r))}},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1];t.addToCache(),e.addToCache(),this.complete=!0}}});r.register("audioSprite",function(t,e,i,n,s,r){var o,a=this.systems.game,h=a.config.audio,l=a.device.audio;if(h&&h.noAudio||!l.webAudio&&!l.audioData)return this;if(Array.isArray(t))for(var d=0;d<t.length;d++)(o=new u(this,t[d])).files&&this.addFile(o.files);else(o=new u(this,t,e,i,n,s,r)).files&&this.addFile(o.files);return this})},85722(t,e,i){var n=i(83419),s=i(23906),r=i(41299),o=i(74099),a=i(95540),h=i(41212),l=new n({Extends:r,initialize:function(t,e,i,n,s){var o="bin";if(h(e)){var l=e;e=a(l,"key"),i=a(l,"url"),n=a(l,"xhrSettings"),o=a(l,"extension",o),s=a(l,"dataType",s)}var u={type:"binary",cache:t.cacheManager.binary,extension:o,responseType:"arraybuffer",key:e,url:i,xhrSettings:n,config:{dataType:s}};r.call(this,t,u)},onProcess:function(){this.state=s.FILE_PROCESSING;var t=this.config.dataType;this.data=t?new t(this.xhrLoader.response):this.xhrLoader.response,this.onProcessComplete()}});o.register("binary",function(t,e,i,n){if(Array.isArray(t))for(var s=0;s<t.length;s++)this.addFile(new l(this,t[s]));else this.addFile(new l(this,t,e,n,i));return this}),t.exports=l},97025(t,e,i){var n=i(83419),s=i(74099),r=i(95540),o=i(19550),a=i(41212),h=i(26430),l=i(21859),u=i(57318),d=new n({Extends:h,initialize:function(t,e,i,n,s,l){if(a(e)){var d,c,f=e;d=new o(t,{key:e=r(f,"key"),url:r(f,"textureURL"),extension:r(f,"textureExtension","png"),normalMap:r(f,"normalMap"),xhrSettings:r(f,"textureXhrSettings")}),c=new u(t,{key:e,url:r(f,"fontDataURL"),extension:r(f,"fontDataExtension","xml"),xhrSettings:r(f,"fontDataXhrSettings")})}else d=new o(t,e,i,s),c=new u(t,e,n,l);d.linkFile?h.call(this,t,"bitmapfont",e,[d,c,d.linkFile]):h.call(this,t,"bitmapfont",e,[d,c])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1];t.addToCache();var i=t.cache.get(t.key),n=l(e.data,t.cache.getFrame(t.key),0,0,i);this.loader.cacheManager.bitmapFont.add(t.key,{data:n,texture:t.key,frame:null}),this.complete=!0}}});s.register("bitmapFont",function(t,e,i,n,s){var r;if(Array.isArray(t))for(var o=0;o<t.length;o++)r=new d(this,t[o]),this.addFile(r.files);else r=new d(this,t,e,i,n,s),this.addFile(r.files);return this}),t.exports=d},16024(t,e,i){var n=i(83419),s=i(23906),r=i(41299),o=i(74099),a=i(95540),h=i(41212),l=new n({Extends:r,initialize:function(t,e,i,n){var s="css";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),n=a(o,"xhrSettings"),s=a(o,"extension",s)}var l={type:"script",cache:!1,extension:s,responseType:"text",key:e,url:i,xhrSettings:n};r.call(this,t,l)},onProcess:function(){this.state=s.FILE_PROCESSING,this.data=document.createElement("style"),this.data.defer=!1,this.data.innerHTML=this.xhrLoader.responseText,document.head.appendChild(this.data),this.onProcessComplete()}});o.register("css",function(t,e,i){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new l(this,t[n]));else this.addFile(new l(this,t,e,i));return this}),t.exports=l},69559(t,e,i){var n=i(38734),s=i(85722),r=i(83419),o=i(74099),a=i(95540),h=i(19550),l=i(41212),u=i(518),d=i(31403),c=i(46975),f=i(59327),p=i(26430),g=i(82038),m=i(55222),v=new r({Extends:p,initialize:function(t,e,i,n){if(i.multiAtlasURL){var r=new u(t,{key:e,url:i.multiAtlasURL,xhrSettings:n,config:i});p.call(this,t,"texture",e,[r])}else{var o=i.textureURL.substr(i.textureURL.length-3);i.type||(i.type="ktx"===o.toLowerCase()?"KTX":"PVR");var a=new s(t,{key:e,url:i.textureURL,extension:o,xhrSettings:n,config:i});if(i.atlasURL){var h=new u(t,{key:e,url:i.atlasURL,xhrSettings:n,config:i});p.call(this,t,"texture",e,[a,h])}else p.call(this,t,"texture",e,[a])}this.config=i},onFileComplete:function(t){if(-1!==this.files.indexOf(t)&&(this.pending--,this.config.multiAtlasURL)&&"json"===t.type&&t.data.hasOwnProperty("textures")){var e=t.data.textures,i=this.config,n=this.loader,r=n.baseURL,o=n.path,h=n.prefix,l=a(i,"multiBaseURL",this.baseURL),u=a(i,"multiPath",this.path),d=a(i,"prefix",this.prefix),c=a(i,"textureXhrSettings");l&&n.setBaseURL(l),u&&n.setPath(u),d&&n.setPrefix(d);for(var f=0;f<e.length;f++){var p=e[f].image,g="CMA"+this.multiKeyIndex+"_"+p,m=new s(n,g,p,c);if(this.addToMultiFile(m),n.addFile(m),e[f].normalMap){var v=new s(n,g,e[f].normalMap,c);v.type="normalMap",m.setLink(v),this.addToMultiFile(v),n.addFile(v)}}n.setBaseURL(r),n.setPath(o),n.setPrefix(h)}},addToCache:function(){function t(t){console.warn('Compressed Texture Invalid: "'+r.key+'". '+t)}if(this.isReadyToProcess()){var e=this.config;if(e.multiAtlasURL)this.addMultiToCache();else{var i,n=this.loader.systems.renderer,s=this.loader.textureManager,r=this.files[0],o=this.files[1];if("PVR"===e.type?i=g(r.data):"KTX"===e.type&&((i=d(r.data))||t("KTX file contains unsupported format.")),i&&!m(i)&&(t("Texture dimensions failed verification. Check the texture format specifications for "+e.format+" 0x"+i.internalFormat.toString(16)+"."),i=null),i&&!n.supportsCompressedTexture(e.format,i.internalFormat)&&(t("Texture format "+e.format+" with internal format "+i.internalFormat+" not supported by the GPU. Texture invalid. This is often due to the texture using sRGB instead of linear RGB."),i=null),i){i.format=n.getCompressedTextureName(e.format,i.internalFormat);var a=o&&o.data?o.data:null;s.addCompressedTexture(r.key,i,a)}}this.complete=!0}},addMultiToCache:function(){for(var t,e=this.config,i=this.files[0],n=[],s=[],r=[],o=this.loader.systems.renderer,a=this.loader.textureManager,h=1;h<this.files.length;h++){var l=this.files[h];if("normalMap"!==l.type)for(var u=l.key.indexOf("_"),c=l.key.substr(u+1),f=l.data,p=0;p<i.data.textures.length;p++){var m=i.data.textures[p];if(m.image===c){"PVR"===e.type?t=g(f):"KTX"===e.type&&(t=d(f)),t&&o.supportsCompressedTexture(e.format,t.internalFormat)&&(t.format=o.getCompressedTextureName(e.format,t.internalFormat),s.push(t),n.push(m),l.linkFile&&r.push(l.linkFile.data));break}}}0===r.length&&(r=void 0),a.addAtlasJSONArray(this.key,s,n,r),this.complete=!0}});o.register("texture",function(t,e,i){var s=this.systems.renderer,r=function(t,e,i,r){var o,u={format:null,type:null,textureURL:void 0,atlasURL:void 0,multiAtlasURL:void 0,multiPath:void 0,multiBaseURL:void 0};if(l(e)){var d=e;e=a(d,"key"),i=a(d,"url"),r=a(d,"xhrSettings")}var p=!1;for(var g in i)if(s.supportsCompressedTexture(g)){var m=i[g];"string"==typeof m?u.textureURL=m:u=c(m,u),u.format=g.toUpperCase(),p=!0;break}if(p)if("IMG"===u.format)o=u.multiAtlasURL?new f(t,e,u.multiAtlasURL,u.multiPath,u.multiBaseURL,r).files:u.atlasURL?new n(t,e,u.textureURL,u.atlasURL,r).files:new h(t,e,u.textureURL,r),t.addFile(o);else{var x=new v(t,e,u,r);t.addFile(x.files)}else console.warn("No supported compressed texture format or IMG fallback",e)};if(Array.isArray(t))for(var o=0;o<t.length;o++)r(this,t[o]);else r(this,t,e,i);return this}),t.exports=v},87674(t,e,i){var n=i(83419),s=i(23906),r=i(41299),o=i(74099),a=i(95540),h=i(98356),l=i(41212),u=new n({Extends:r,initialize:function(t,e,i,n,o,h){var u="ttf";if(l(e)){var d=e;e=a(d,"key"),i=a(d,"url"),n=a(d,"format","truetype"),o=a(d,"descriptors",null),h=a(d,"xhrSettings"),u=a(d,"extension",u)}else void 0===n&&(n="truetype");var c={type:"font",cache:!1,extension:u,responseType:"text",key:e,url:i,xhrSettings:h};r.call(this,t,c),this.data={format:n,descriptors:o},this.state=s.FILE_POPULATED},onProcess:function(){this.state=s.FILE_PROCESSING,this.src=h(this,this.loader.baseURL);var t,e=this.key,i="url("+this.src+') format("'+this.data.format+'")';t=this.data.descriptors?new FontFace(e,i,this.data.descriptors):new FontFace(e,i);var n=this;t.load().then(function(){document.fonts.add(t),document.body.classList.add("fonts-loaded"),n.onProcessComplete()}).catch(function(){console.warn("Font failed to load",i),n.onProcessComplete()})}});o.register("font",function(t,e,i,n,s){if(Array.isArray(t))for(var r=0;r<t.length;r++)this.addFile(new u(this,t[r]));else this.addFile(new u(this,t,e,i,n,s));return this}),t.exports=u},47931(t,e,i){var n=i(83419),s=i(23906),r=i(41299),o=i(74099),a=i(95540),h=i(41212),l=i(73894),u=new n({Extends:r,initialize:function(t,e,i,n){var s="glsl";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),n=a(o,"xhrSettings"),s=a(o,"extension",s)}var l={type:"glsl",cache:t.cacheManager.shader,extension:s,responseType:"text",key:e,url:i,xhrSettings:n};r.call(this,t,l)},onProcess:function(){this.state=s.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){this.cache.add(this.key,new l(this.key,this.data))}});o.register("glsl",function(t,e,i){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new u(this,t[n]));else this.addFile(new u(this,t,e,i));return this}),t.exports=u},89749(t,e,i){var n=i(83419),s=i(54899),r=i(41299),o=i(95540),a=i(98356),h=i(41212);t.exports=new n({Extends:r,initialize:function(t,e,i,n){if(h(e)){var s=e;e=o(s,"key"),n=o(s,"config",n)}var a={type:"audio",cache:t.cacheManager.audio,extension:i.type,key:e,url:i.url,config:n};r.call(this,t,a),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 t=0;t<this.data.length;t++){var e=this.data[t];e.oncanplaythrough=null,e.onerror=null}this.loader.nextFile(this,!1)},onProgress:function(t){var e=t.target;e.oncanplaythrough=null,e.onerror=null,this.filesLoaded++,this.percentComplete=Math.min(this.filesLoaded/this.filesTotal,1),this.loader.emit(s.FILE_PROGRESS,this,this.percentComplete),this.filesLoaded===this.filesTotal&&this.onLoad()},load:function(){this.data=[];var t=this.config&&this.config.instances||1;this.filesTotal=t,this.filesLoaded=0,this.percentComplete=0;for(var e=0;e<t;e++){var i=new Audio;i.dataset||(i.dataset={}),i.dataset.name=this.key+("0"+e).slice(-2),i.dataset.used="false",this.locked?i.dataset.locked="true":(i.dataset.locked="false",i.preload="auto",i.oncanplaythrough=this.onProgress.bind(this),i.onerror=this.onError.bind(this)),this.data.push(i)}for(e=0;e<this.data.length;e++)(i=this.data[e]).src=a(this,this.loader.baseURL),this.locked||i.load();this.locked&&setTimeout(this.onLoad.bind(this))}})},88470(t,e,i){var n=i(83419),s=i(23906),r=i(41299),o=i(74099),a=i(95540),h=i(41212),l=new n({Extends:r,initialize:function(t,e,i,n){var s="html";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),n=a(o,"xhrSettings"),s=a(o,"extension",s)}var l={type:"text",cache:t.cacheManager.html,extension:s,responseType:"text",key:e,url:i,xhrSettings:n};r.call(this,t,l)},onProcess:function(){this.state=s.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});o.register("html",function(t,e,i){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new l(this,t[n]));else this.addFile(new l(this,t,e,i));return this}),t.exports=l},14643(t,e,i){var n=i(83419),s=i(23906),r=i(41299),o=i(74099),a=i(95540),h=i(41212),l=new n({Extends:r,initialize:function(t,e,i,n,s,o){void 0===n&&(n=512),void 0===s&&(s=512);var l="html";if(h(e)){var u=e;e=a(u,"key"),i=a(u,"url"),o=a(u,"xhrSettings"),l=a(u,"extension",l),n=a(u,"width",n),s=a(u,"height",s)}var d={type:"html",cache:t.textureManager,extension:l,responseType:"text",key:e,url:i,xhrSettings:o,config:{width:n,height:s}};r.call(this,t,d)},onProcess:function(){this.state=s.FILE_PROCESSING;var t=this.config.width,e=this.config.height,i=[];i.push('<svg width="'+t+'px" height="'+e+'px" viewBox="0 0 '+t+" "+e+'" xmlns="http://www.w3.org/2000/svg">'),i.push('<foreignObject width="100%" height="100%">'),i.push('<body xmlns="http://www.w3.org/1999/xhtml">'),i.push(this.xhrLoader.responseText),i.push("</body>"),i.push("</foreignObject>"),i.push("</svg>");var n=[i.join("\n")],o=this;try{var a=new window.Blob(n,{type:"image/svg+xml;charset=utf-8"})}catch(t){o.state=s.FILE_ERRORED,o.onProcessComplete();return}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){r.revokeObjectURL(o.data),o.onProcessComplete()},this.data.onerror=function(){r.revokeObjectURL(o.data),o.onProcessError()},r.createObjectURL(this.data,a,"image/svg+xml")},addToCache:function(){this.cache.addImage(this.key,this.data)}});o.register("htmlTexture",function(t,e,i,n,s){if(Array.isArray(t))for(var r=0;r<t.length;r++)this.addFile(new l(this,t[r]));else this.addFile(new l(this,t,e,i,n,s));return this}),t.exports=l},19550(t,e,i){var n=i(83419),s=i(23906),r=i(41299),o=i(74099),a=i(95540),h=i(41212),l=i(98356),u=new n({Extends:r,initialize:function t(e,i,n,s,o){var l,u="png";if(h(i)){var d=i;i=a(d,"key"),n=a(d,"url"),l=a(d,"normalMap"),s=a(d,"xhrSettings"),u=a(d,"extension",u),o=a(d,"frameConfig")}Array.isArray(n)&&(l=n[1],n=n[0]);var c={type:"image",cache:e.textureManager,extension:u,responseType:"blob",key:i,url:n,xhrSettings:s,config:o};if(r.call(this,e,c),l){var f=new t(e,this.key,l,s,o);f.type="normalMap",this.setLink(f),e.addFile(f)}this.useImageElementLoad="HTMLImageElement"===e.imageLoadType||this.base64,this.useImageElementLoad&&(this.load=this.loadImage,this.onProcess=this.onProcessImage)},onProcess:function(){this.state=s.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){r.revokeObjectURL(t.data),t.onProcessComplete()},this.data.onerror=function(){r.revokeObjectURL(t.data),t.onProcessError()},r.createObjectURL(this.data,this.xhrLoader.response,"image/png")},onProcessImage:function(){var t=this.state;this.state=s.FILE_PROCESSING,t===s.FILE_LOADED?this.onProcessComplete():this.onProcessError()},loadImage:function(){this.state=s.FILE_LOADING,this.src=l(this,this.loader.baseURL),this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){t.state=s.FILE_LOADED,t.loader.nextFile(t,!0)},this.data.onerror=function(){t.loader.nextFile(t,!1)},this.data.src=this.src},addToCache:function(){var t=this.linkFile;t?t.state>=s.FILE_COMPLETE&&("spritesheet"===t.type?t.addToCache():"normalMap"===this.type?this.cache.addImage(this.key,t.data,this.data):this.cache.addImage(this.key,this.data,t.data)):this.cache.addImage(this.key,this.data)}});o.register("image",function(t,e,i){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new u(this,t[n]));else this.addFile(new u(this,t,e,i));return this}),t.exports=u},518(t,e,i){var n=i(83419),s=i(23906),r=i(41299),o=i(74099),a=i(95540),h=i(35154),l=i(41212),u=new n({Extends:r,initialize:function(t,e,i,n,o){var u="json";if(l(e)){var d=e;e=a(d,"key"),i=a(d,"url"),n=a(d,"xhrSettings"),u=a(d,"extension",u),o=a(d,"dataKey",o)}var c={type:"json",cache:t.cacheManager.json,extension:u,responseType:"text",key:e,url:i,xhrSettings:n,config:o};r.call(this,t,c),l(i)&&(o?this.data=h(i,o):this.data=i,this.state=s.FILE_POPULATED)},onProcess:function(){if(this.state!==s.FILE_POPULATED){this.state=s.FILE_PROCESSING;try{var t=JSON.parse(this.xhrLoader.responseText)}catch(t){throw this.onProcessError(),t}var e=this.config;"string"==typeof e?this.data=h(t,e,t):this.data=t}this.onProcessComplete()}});o.register("json",function(t,e,i,n){if(Array.isArray(t))for(var s=0;s<t.length;s++)this.addFile(new u(this,t[s]));else this.addFile(new u(this,t,e,n,i));return this}),t.exports=u},59327(t,e,i){var n=i(83419),s=i(74099),r=i(95540),o=i(19550),a=i(41212),h=i(518),l=i(26430),u=new n({Extends:l,initialize:function(t,e,i,n,s,o,u){if(a(e)){var d=e;e=r(d,"key"),i=r(d,"url",!1)?r(d,"url"):r(d,"atlasURL"),o=r(d,"xhrSettings"),n=r(d,"path"),s=r(d,"baseURL"),u=r(d,"textureXhrSettings")}var c=new h(t,e,i,o);l.call(this,t,"multiatlas",e,[c]),this.config.path=n,this.config.baseURL=s,this.config.textureXhrSettings=u},onFileComplete:function(t){if(-1!==this.files.indexOf(t)&&(this.pending--,"json"===t.type&&t.data.hasOwnProperty("textures"))){var e=t.data.textures,i=this.config,n=this.loader,s=n.baseURL,a=n.path,h=n.prefix,l=r(i,"baseURL",this.baseURL),u=r(i,"path",this.path),d=r(i,"prefix",this.prefix),c=r(i,"textureXhrSettings");n.setBaseURL(l),n.setPath(u),n.setPrefix(d);for(var f=0;f<e.length;f++){var p=e[f].image,g="MA"+this.multiKeyIndex+"_"+p,m=new o(n,g,p,c);if(this.addToMultiFile(m),n.addFile(m),e[f].normalMap){var v=new o(n,g,e[f].normalMap,c);v.type="normalMap",m.setLink(v),this.addToMultiFile(v),n.addFile(v)}}n.setBaseURL(s),n.setPath(a),n.setPrefix(h)}},addToCache:function(){if(this.isReadyToProcess()){for(var t=this.files[0],e=[],i=[],n=[],s=1;s<this.files.length;s++){var r=this.files[s];if("normalMap"!==r.type)for(var o=r.key.indexOf("_"),a=r.key.substr(o+1),h=r.data,l=0;l<t.data.textures.length;l++){var u=t.data.textures[l];if(u.image===a){i.push(h),e.push(u),r.linkFile&&n.push(r.linkFile.data);break}}}0===n.length&&(n=void 0),this.loader.textureManager.addAtlasJSONArray(this.key,i,e,n),this.complete=!0}}});s.register("multiatlas",function(t,e,i,n,s){var r;if(Array.isArray(t))for(var o=0;o<t.length;o++)r=new u(this,t[o]),this.addFile(r.files);else r=new u(this,t,e,i,n,s),this.addFile(r.files);return this}),t.exports=u},99297(t,e,i){var n=i(83419),s=i(74099),r=i(95540),o=i(41212),a=i(26430),h=i(34328),l=new n({Extends:a,initialize:function(t,e,i,n){var s="js",l=[];if(o(e)){var u=e;e=r(u,"key"),i=r(u,"url"),n=r(u,"xhrSettings"),s=r(u,"extension",s)}Array.isArray(i)||(i=[i]);for(var d=0;d<i.length;d++){var c=new h(t,{key:e+"_"+d.toString(),url:i[d],extension:s,xhrSettings:n});c.onProcess=function(){this.onProcessComplete()},l.push(c)}a.call(this,t,"scripts",e,l)},addToCache:function(){if(this.isReadyToProcess()){for(var t=0;t<this.files.length;t++){var e=this.files[t];e.data=document.createElement("script"),e.data.language="javascript",e.data.type="text/javascript",e.data.defer=!1,e.data.text=e.xhrLoader.responseText,document.head.appendChild(e.data)}this.complete=!0}}});s.register("scripts",function(t,e,i){var n;if(Array.isArray(t))for(var s=0;s<t.length;s++)n=new l(this,t[s]),this.addFile(n.files);else n=new l(this,t,e,i),this.addFile(n.files);return this}),t.exports=l},11069(t,e,i){var n=i(83419),s=i(23906),r=i(41299),o=i(74099),a=i(95540),h=i(19550),l=i(41212),u=i(26430),d=i(39620),c=new n({Extends:r,initialize:function(t,e,i,n){var s={type:"pct",cache:t.cacheManager.atlas,extension:"pct",responseType:"text",key:e,url:i,xhrSettings:n};r.call(this,t,s)},onProcess:function(){this.state=s.FILE_PROCESSING;var t=d(this.xhrLoader.responseText);t?(this.data=t,this.onProcessComplete()):this.onProcessError()}}),f=new n({Extends:u,initialize:function(t,e,i,n,s,r,o){if(l(e)){var h=e;e=a(h,"key"),i=a(h,"url",!1)?a(h,"url"):a(h,"atlasURL"),r=a(h,"xhrSettings"),n=a(h,"path"),s=a(h,"baseURL"),o=a(h,"textureXhrSettings")}var d=new c(t,e,i,r);u.call(this,t,"pctatlas",e,[d]),this.config.path=n,this.config.baseURL=s,this.config.textureXhrSettings=o},onFileComplete:function(t){if(-1!==this.files.indexOf(t)&&(this.pending--,"pct"===t.type&&t.data&&Array.isArray(t.data.pages))){var e=t.data.pages,i=this.config,n=this.loader,s=n.baseURL,r=n.path,o=n.prefix,l=a(i,"baseURL",this.baseURL),u=a(i,"path",this.path),d=a(i,"prefix",this.prefix),c=a(i,"textureXhrSettings");n.setBaseURL(l),n.setPath(u),n.setPrefix(d);for(var f=0;f<e.length;f++){var p=e[f].filename,g=new h(n,"PCT"+this.multiKeyIndex+"_"+p,p,c);this.addToMultiFile(g),n.addFile(g)}n.setBaseURL(s),n.setPath(r),n.setPrefix(o)}},addToCache:function(){if(this.isReadyToProcess()){for(var t=this.files[0].data,e=t.pages,i="PCT"+this.multiKeyIndex+"_",n={},s=1;s<this.files.length;s++){var r=this.files[s],o=r.key,a=o.indexOf(i);n[a>=0?o.substring(a+i.length):o]=r.data}for(var h=[],l=0;l<e.length;l++){var u=n[e[l].filename];u&&h.push(u)}this.loader.cacheManager.atlas.add(this.key,t),this.loader.textureManager.addAtlasPCT(this.key,h,t),this.complete=!0}}});o.register("atlasPCT",function(t,e,i,n,s){var r;if(Array.isArray(t))for(var o=0;o<t.length;o++)r=new f(this,t[o]),this.addFile(r.files);else r=new f(this,t,e,i,n,s),this.addFile(r.files);return this}),t.exports=f},58610(t,e,i){var n=i(83419),s=i(23906),r=i(74099),o=i(518),a=new n({Extends:o,initialize:function(t,e,i,n,s){o.call(this,t,e,i,n,s),this.type="packfile"},onProcess:function(){if(this.state!==s.FILE_POPULATED&&(this.state=s.FILE_PROCESSING,this.data=JSON.parse(this.xhrLoader.responseText)),this.data.hasOwnProperty("files")&&this.config){var t={};t[this.config]=this.data,this.data=t}this.loader.addPack(this.data,this.config),this.onProcessComplete()}});r.register("pack",function(t,e,i,n){if(Array.isArray(t))for(var s=0;s<t.length;s++)this.addFile(new a(this,t[s]));else this.addFile(new a(this,t,e,n,i));return this}),t.exports=a},48988(t,e,i){var n=i(83419),s=i(23906),r=i(41299),o=i(74099),a=i(95540),h=i(41212),l=new n({Extends:r,initialize:function(t,e,i,n,o,l){var u="js";if(h(e)){var d=e;e=a(d,"key"),i=a(d,"url"),l=a(d,"xhrSettings"),u=a(d,"extension",u),n=a(d,"start"),o=a(d,"mapping")}var c={type:"plugin",cache:!1,extension:u,responseType:"text",key:e,url:i,xhrSettings:l,config:{start:n,mapping:o}};r.call(this,t,c),"function"==typeof i&&(this.data=i,this.state=s.FILE_POPULATED)},onProcess:function(){var t=this.loader.systems.plugins,e=this.config,i=a(e,"start",!1),n=a(e,"mapping",null);if(this.state===s.FILE_POPULATED)t.install(this.key,this.data,i,n);else{this.state=s.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data);var r=t.install(this.key,window[this.key],i,n);(i||n)&&(this.loader.systems[n]=r,this.loader.scene[n]=r)}this.onProcessComplete()}});o.register("plugin",function(t,e,i,n,s){if(Array.isArray(t))for(var r=0;r<t.length;r++)this.addFile(new l(this,t[r]));else this.addFile(new l(this,t,e,i,n,s));return this}),t.exports=l},67397(t,e,i){var n=i(83419),s=i(23906),r=i(41299),o=i(74099),a=i(95540),h=i(41212),l=new n({Extends:r,initialize:function(t,e,i,n,s){var o="svg";if(h(e)){var l=e;e=a(l,"key"),i=a(l,"url"),n=a(l,"svgConfig",{}),s=a(l,"xhrSettings"),o=a(l,"extension",o)}var u={type:"svg",cache:t.textureManager,extension:o,responseType:"text",key:e,url:i,xhrSettings:s,config:{width:a(n,"width"),height:a(n,"height"),scale:a(n,"scale")}};r.call(this,t,u)},onProcess:function(){this.state=s.FILE_PROCESSING;var t=this.xhrLoader.responseText,e=[t],i=this.config.width,n=this.config.height,o=this.config.scale;t:if(i&&n||o){var a=new DOMParser().parseFromString(t,"text/xml").getElementsByTagName("svg")[0],h=a.hasAttribute("viewBox"),l=parseFloat(a.getAttribute("width")),u=parseFloat(a.getAttribute("height"));if(!h&&l&&u)a.setAttribute("viewBox","0 0 "+l+" "+u);else if(h&&!l&&!u){var d=a.getAttribute("viewBox").split(/\s+|,/);l=d[2],u=d[3]}if(o)if(l&&u)i=l*o,n=u*o;else break t;a.setAttribute("width",i.toString()+"px"),a.setAttribute("height",n.toString()+"px"),e=[new XMLSerializer().serializeToString(a)]}try{var c=new window.Blob(e,{type:"image/svg+xml;charset=utf-8"})}catch(t){this.onProcessError();return}this.data=new Image,this.data.crossOrigin=this.crossOrigin;var f=this,p=!1;this.data.onload=function(){p||r.revokeObjectURL(f.data),f.onProcessComplete()},this.data.onerror=function(){p?f.onProcessError():(p=!0,r.revokeObjectURL(f.data),f.data.src="data:image/svg+xml,"+encodeURIComponent(e.join("")))},r.createObjectURL(this.data,c,"image/svg+xml")},addToCache:function(){this.cache.addImage(this.key,this.data)}});o.register("svg",function(t,e,i,n){if(Array.isArray(t))for(var s=0;s<t.length;s++)this.addFile(new l(this,t[s]));else this.addFile(new l(this,t,e,i,n));return this}),t.exports=l},88423(t,e,i){var n=i(83419),s=i(23906),r=i(41299),o=i(74099),a=i(95540),h=i(41212),l=new n({Extends:r,initialize:function(t,e,i,n){var s="js";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),n=a(o,"xhrSettings"),s=a(o,"extension",s)}var l={type:"text",extension:s,responseType:"text",key:e,url:i,xhrSettings:n};r.call(this,t,l)},onProcess:function(){this.state=s.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var t=this.data.concat("(function(){\nreturn new "+this.key+"();\n}).call(this);"),e=eval;this.loader.sceneManager.add(this.key,e(t)),this.complete=!0}});o.register("sceneFile",function(t,e,i){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new l(this,t[n]));else this.addFile(new l(this,t,e,i));return this}),t.exports=l},56812(t,e,i){var n=i(83419),s=i(23906),r=i(41299),o=i(74099),a=i(95540),h=i(41212),l=new n({Extends:r,initialize:function(t,e,i,n,o,l){var u="js";if(h(e)){var d=e;e=a(d,"key"),i=a(d,"url"),l=a(d,"xhrSettings"),u=a(d,"extension",u),n=a(d,"systemKey"),o=a(d,"sceneKey")}var c={type:"scenePlugin",cache:!1,extension:u,responseType:"text",key:e,url:i,xhrSettings:l,config:{systemKey:n,sceneKey:o}};r.call(this,t,c),"function"==typeof i&&(this.data=i,this.state=s.FILE_POPULATED)},onProcess:function(){var t=this.loader.systems.plugins,e=this.config,i=this.key,n=a(e,"systemKey",i),r=a(e,"sceneKey",i);this.state===s.FILE_POPULATED?t.installScenePlugin(n,this.data,r,this.loader.scene,!0):(this.state=s.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data),t.installScenePlugin(n,window[this.key],r,this.loader.scene,!0)),this.onProcessComplete()}});o.register("scenePlugin",function(t,e,i,n,s){if(Array.isArray(t))for(var r=0;r<t.length;r++)this.addFile(new l(this,t[r]));else this.addFile(new l(this,t,e,i,n,s));return this}),t.exports=l},34328(t,e,i){var n=i(83419),s=i(23906),r=i(41299),o=i(74099),a=i(95540),h=i(41212),l=new n({Extends:r,initialize:function(t,e,i,n,s){var o="js";if(h(e)){var l=e;e=a(l,"key"),i=a(l,"url"),n=a(l,"type","script"),s=a(l,"xhrSettings"),o=a(l,"extension",o)}else void 0===n&&(n="script");var u={type:n,cache:!1,extension:o,responseType:"text",key:e,url:i,xhrSettings:s};r.call(this,t,u)},onProcess:function(){this.state=s.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data),this.onProcessComplete()}});o.register("script",function(t,e,i,n){if(Array.isArray(t))for(var s=0;s<t.length;s++)this.addFile(new l(this,t[s]));else this.addFile(new l(this,t,e,i,n));return this}),t.exports=l},85035(t,e,i){var n=i(83419),s=i(23906),r=i(74099),o=i(19550),a=new n({Extends:o,initialize:function(t,e,i,n,s){o.call(this,t,e,i,s,n),this.type="spritesheet"},addToCache:function(){var t=this.linkFile;t?t.state>=s.FILE_COMPLETE&&("normalMap"===this.type?this.cache.addSpriteSheet(this.key,t.data,this.config,this.data):this.cache.addSpriteSheet(this.key,this.data,this.config,t.data)):this.cache.addSpriteSheet(this.key,this.data,this.config)}});r.register("spritesheet",function(t,e,i,n){if(Array.isArray(t))for(var s=0;s<t.length;s++)this.addFile(new a(this,t[s]));else this.addFile(new a(this,t,e,i,n));return this}),t.exports=a},78776(t,e,i){var n=i(83419),s=i(23906),r=i(41299),o=i(74099),a=i(95540),h=i(41212),l=new n({Extends:r,initialize:function(t,e,i,n){var s="text",o="txt",l=t.cacheManager.text;if(h(e)){var u=e;e=a(u,"key"),i=a(u,"url"),n=a(u,"xhrSettings"),o=a(u,"extension",o),s=a(u,"type",s),l=a(u,"cache",l)}var d={type:s,cache:l,extension:o,responseType:"text",key:e,url:i,xhrSettings:n};r.call(this,t,d)},onProcess:function(){this.state=s.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});o.register("text",function(t,e,i){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new l(this,t[n]));else this.addFile(new l(this,t,e,i));return this}),t.exports=l},49477(t,e,i){var n=i(83419),s=i(23906),r=i(41299),o=i(74099),a=i(95540),h=i(41212),l=i(80341),u=new n({Extends:r,initialize:function(t,e,i,n){var s="csv";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),n=a(o,"xhrSettings"),s=a(o,"extension",s)}var u={type:"tilemapCSV",cache:t.cacheManager.tilemap,extension:s,responseType:"text",key:e,url:i,xhrSettings:n};r.call(this,t,u),this.tilemapFormat=l.CSV},onProcess:function(){this.state=s.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var t={format:this.tilemapFormat,data:this.data};this.cache.add(this.key,t)}});o.register("tilemapCSV",function(t,e,i){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new u(this,t[n]));else this.addFile(new u(this,t,e,i));return this}),t.exports=u},40807(t,e,i){var n=i(83419),s=i(74099),r=i(518),o=i(80341),a=new n({Extends:r,initialize:function(t,e,i,n){r.call(this,t,e,i,n),this.type="tilemapJSON",this.cache=t.cacheManager.tilemap},addToCache:function(){var t={format:o.WELTMEISTER,data:this.data};this.cache.add(this.key,t)}});s.register("tilemapImpact",function(t,e,i){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new a(this,t[n]));else this.addFile(new a(this,t,e,i));return this}),t.exports=a},56775(t,e,i){var n=i(83419),s=i(74099),r=i(518),o=i(80341),a=new n({Extends:r,initialize:function(t,e,i,n){r.call(this,t,e,i,n),this.type="tilemapJSON",this.cache=t.cacheManager.tilemap},addToCache:function(){var t={format:o.TILED_JSON,data:this.data};this.cache.add(this.key,t)}});s.register("tilemapTiledJSON",function(t,e,i){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new a(this,t[n]));else this.addFile(new a(this,t,e,i));return this}),t.exports=a},25771(t,e,i){var n=i(83419),s=i(74099),r=i(95540),o=i(19550),a=i(41212),h=i(26430),l=i(78776),u=new n({Extends:h,initialize:function(t,e,i,n,s,u){if(a(e)){var d,c,f=e;d=new o(t,{key:e=r(f,"key"),url:r(f,"textureURL"),extension:r(f,"textureExtension","png"),normalMap:r(f,"normalMap"),xhrSettings:r(f,"textureXhrSettings")}),c=new l(t,{key:e,url:r(f,"atlasURL"),extension:r(f,"atlasExtension","txt"),xhrSettings:r(f,"atlasXhrSettings")})}else d=new o(t,e,i,s),c=new l(t,e,n,u);d.linkFile?h.call(this,t,"unityatlas",e,[d,c,d.linkFile]):h.call(this,t,"unityatlas",e,[d,c])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1],i=this.files[2]?this.files[2].data:null;this.loader.textureManager.addUnityAtlas(t.key,t.data,e.data,i),this.complete=!0}}});
1s.register("unityAtlas",function(t,e,i,n,s){var r;if(Array.isArray(t))for(var o=0;o<t.length;o++)r=new u(this,t[o]),this.addFile(r.files);else r=new u(this,t,e,i,n,s),this.addFile(r.files);return this}),t.exports=u},33720(t,e,i){var n=i(83419),s=i(23906),r=i(41299),o=i(74099),a=i(98356),h=i(95540),l=i(41212),u=new n({Extends:r,initialize:function(t,e,i,n){if(void 0===n&&(n=!1),l(e)){var s=e;e=h(s,"key"),i=h(s,"url",[]),n=h(s,"noAudio",!1)}var o=t.systems.game.device.video.getVideoURL(i);o||console.warn("VideoFile: No supported format for "+e);var a={type:"video",cache:t.cacheManager.video,extension:o.type,key:e,url:o.url,config:{noAudio:n}};r.call(this,t,a)},onProcess:function(){this.data={url:this.src,noAudio:this.config.noAudio,crossOrigin:this.crossOrigin},this.onProcessComplete()},load:function(){this.src=a(this,this.loader.baseURL),this.state=s.FILE_LOADED,this.loader.nextFile(this,!0)}});o.register("video",function(t,e,i){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new u(this,t[n]));else this.addFile(new u(this,t,e,i));return this}),t.exports=u},57318(t,e,i){var n=i(83419),s=i(23906),r=i(41299),o=i(74099),a=i(95540),h=i(41212),l=i(56836),u=new n({Extends:r,initialize:function(t,e,i,n){var s="xml";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),n=a(o,"xhrSettings"),s=a(o,"extension",s)}var l={type:"xml",cache:t.cacheManager.xml,extension:s,responseType:"text",key:e,url:i,xhrSettings:n};r.call(this,t,l)},onProcess:function(){this.state=s.FILE_PROCESSING,this.data=l(this.xhrLoader.responseText),this.data?this.onProcessComplete():this.onProcessError()}});o.register("xml",function(t,e,i){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new u(this,t[n]));else this.addFile(new u(this,t,e,i));return this}),t.exports=u},64589(t,e,i){t.exports={AnimationJSONFile:i(14135),AsepriteFile:i(76272),AtlasJSONFile:i(38734),AtlasXMLFile:i(74599),AudioFile:i(21097),AudioSpriteFile:i(89524),BinaryFile:i(85722),BitmapFontFile:i(97025),CompressedTextureFile:i(69559),CSSFile:i(16024),FontFile:i(87674),GLSLFile:i(47931),HTML5AudioFile:i(89749),HTMLFile:i(88470),HTMLTextureFile:i(14643),ImageFile:i(19550),JSONFile:i(518),MultiAtlasFile:i(59327),MultiScriptFile:i(99297),PackFile:i(58610),PCTAtlasFile:i(11069),PluginFile:i(48988),SceneFile:i(88423),ScenePluginFile:i(56812),ScriptFile:i(34328),SpriteSheetFile:i(85035),SVGFile:i(67397),TextFile:i(78776),TilemapCSVFile:i(49477),TilemapImpactFile:i(40807),TilemapJSONFile:i(56775),UnityAtlasFile:i(25771),VideoFile:i(33720),XMLFile:i(57318)}},57777(t,e,i){var n=i(23906);t.exports=i(79291)(!1,{Events:i(54899),FileTypes:i(64589),File:i(41299),FileTypesManager:i(74099),GetURL:i(98356),LoaderPlugin:i(74261),MergeXHRSettings:i(3374),MultiFile:i(26430),XHRLoader:i(84376),XHRSettings:i(92638)},n)},53307(t){t.exports=function(t){for(var e=0,i=0;i<t.length;i++)e+=+t[i];return e/t.length}},85710(t,e,i){var n=i(6411);t.exports=function(t,e){return n(t)/n(e)/n(t-e)}},30976(t){t.exports=function(t,e){return Math.floor(Math.random()*(e-t+1)+t)}},87842(t){t.exports=function(t,e,i,n,s){var r=(n-e)*.5,o=(s-i)*.5,a=t*t;return t*a*(2*i-2*n+r+o)+(-3*i+3*n-2*r-o)*a+r*t+i}},26302(t){t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var n=Math.pow(i,-e);return Math.ceil(t*n)/n}},45319(t){t.exports=function(t,e,i){return Math.max(e,Math.min(i,t))}},39506(t,e,i){var n=i(36383);t.exports=function(t){return t*n.DEG_TO_RAD}},61241(t){t.exports=function(t,e){return Math.abs(t-e)}},38857(t,e,i){var n=i(45319),s=i(83419),r=i(37867),o=i(29747),a=new r,h=new s({initialize:function t(e,i,n,s){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=t.DefaultOrder),this._x=e,this._y=i,this._z=n,this._order=s,this.onChangeCallback=o},x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback(this)}},order:{get:function(){return this._order},set:function(t){this._order=t,this.onChangeCallback(this)}}
1,set:function(t,e,i,n){return void 0===n&&(n=this._order),this._x=t,this._y=e,this._z=i,this._order=n,this.onChangeCallback(this),this},copy:function(t){return this.set(t.x,t.y,t.z,t.order)},setFromQuaternion:function(t,e,i){return void 0===e&&(e=this._order),void 0===i&&(i=!1),a.fromQuat(t),this.setFromRotationMatrix(a,e,i)},setFromRotationMatrix:function(t,e,i){void 0===e&&(e=this._order),void 0===i&&(i=!1);var s=t.val,r=s[0],o=s[4],a=s[8],h=s[1],l=s[5],u=s[9],d=s[2],c=s[6],f=s[10],p=0,g=0,m=0;switch(e){case"XYZ":g=Math.asin(n(a,-1,1)),.99999>Math.abs(a)?(p=Math.atan2(-u,f),m=Math.atan2(-o,r)):p=Math.atan2(c,l);break;case"YXZ":p=Math.asin(-n(u,-1,1)),.99999>Math.abs(u)?(g=Math.atan2(a,f),m=Math.atan2(h,l)):g=Math.atan2(-d,r);break;case"ZXY":p=Math.asin(n(c,-1,1)),.99999>Math.abs(c)?(g=Math.atan2(-d,f),m=Math.atan2(-o,l)):m=Math.atan2(h,r);break;case"ZYX":g=Math.asin(-n(d,-1,1)),.99999>Math.abs(d)?(p=Math.atan2(c,f),m=Math.atan2(h,r)):m=Math.atan2(-o,l);break;case"YZX":m=Math.asin(n(h,-1,1)),.99999>Math.abs(h)?(p=Math.atan2(-u,l),g=Math.atan2(-d,r)):g=Math.atan2(a,f);break;case"XZY":m=Math.asin(-n(o,-1,1)),.99999>Math.abs(o)?(p=Math.atan2(c,l),g=Math.atan2(a,r)):p=Math.atan2(-u,f)}return this._x=p,this._y=g,this._z=m,this._order=e,i&&this.onChangeCallback(this),this}});h.RotationOrders=["XYZ","YXZ","ZXY","ZYX","YZX","XZY"],h.DefaultOrder="XYZ",t.exports=h},6411(t){t.exports=function(t){if(0===t)return 1;for(var e=t;--t;)e*=t;return e}},99472(t){t.exports=function(t,e){return Math.random()*(e-t)+t}},77623(t){t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var n=Math.pow(i,-e);return Math.floor(t*n)/n}},62945(t,e,i){var n=i(45319);t.exports=function(t,e,i){return(i-e)*(t=n(t,0,1))+e}},2672(t,e,i){var n=i(26099);t.exports=function(t,e){void 0===e&&(e=new n);var i=t.length;if(!Array.isArray(t)||0===i)throw Error("GetCentroid points be a non-empty array");if(1===i)e.x=t[0].x,e.y=t[0].y;else{for(var s=0;s<i;s++)e.x+=t[s].x,e.y+=t[s].y;e.x/=i,e.y/=i}return e}},38265(t){t.exports=function(t,e){return t/e/1e3}},55133(t,e,i){var n=i(87841);t.exports=function(t,e){void 0===e&&(e=new n);for(var i=-1/0,s=1/0,r=-1/0,o=1/0,a=0;a<t.length;a++){var h=t[a];h.x>i&&(i=h.x),h.x<s&&(s=h.x),h.y>r&&(r=h.y),h.y<o&&(o=h.y)}return e.x=s,e.y=o,e.width=i-s,e.height=r-o,e}},72958(t,e,i){var n=i(26099),s=i(25836),r=i(61369),o=new n,a=new s,h=new r,l=new n(12.9898,78.233),u=new s(12.9898,78.233,9441.8953),d=new r(12.9898,78.233,9441.8953,61.99),c=function(t){var e;switch(t.length){case 4:h.set(t[0],t[1],t[2],t[3]),e=43757.5453*Math.sin(h.dot(d));break;case 3:a.set(t[0],t[1],t[2]),e=43757.5453*Math.sin(a.dot(u));break;case 2:o.set(t[0],t[1]),e=43757.5453*Math.sin(o.dot(l));break;default:e=43757.5453*Math.sin(12.9898*t[0])}return e-Math.floor(e)},f=function(t,e){switch(t.length){case 4:i=19*t[0]+47*t[1]+101*t[2]+173*t[3];break;case 3:i=19*t[0]+47*t[1]+101*t[2];break;case 2:i=19*t[0]+47*t[1];break;default:i=19*t[0]}e&&(i*=Math.pow(2,32-Math.floor(Math.log2(i))));var i,n=(i>>>0)*0x2c9277b5+0xac564b05,s=(n>>>(n>>>28)+4^n)*0x108ef2d9,r=(s>>>22^s)>>>0;return r/0x100000000};t.exports=function(t,e){switch("number"==typeof t&&(t=[t]),e){case 2:return f(t,!0);case 1:return f(t);default:return c(t)}}},84854(t,e,i){var n=i(72958),s=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],r=[,,,,],o=[,,,,],a=[,,,,],h=[,,,,],l=[,,,,],u=[,,,,],d=function(t,e,i){var n,s,h,l,u=e.noiseMode||0,d=void 0===e.noiseSmoothing?1:e.noiseSmoothing,p=Math.max(1,Math.min(t.length,4)),g=e.noiseCells||[32,32,32,32].slice(0,p);for(n=0;n<p;n++){var m=t[n]*i*g[n];r[n]=Math.floor(m),o[n]=m%1}var v=0,x=0;(0===u||1===u)&&(v=4*p);var y=Math.pow(3,p);for(l=0;l<y;l++)switch(a[0]=l%3-1,p>1&&(a[1]=Math.floor(l/3)%3-1,p>2&&(a[2]=Math.floor(l/9)%3-1,p>3&&(a[3]=Math.floor(l/27)%3-1))),s=c(p,r,a,e,i),h=f(p,a,o,s),u){case 0:h<v&&(v=h);break;case 1:h<v&&(v=h,x=s[0]);break;case 2:v+=Math.pow(2,-32/d*(h=Math.sqrt(h)))}return 0===u?Math.sqrt(v):1===u?x:-(1/32*d)*Math.log2(v)},c=function(t,e,i,r,o){var a,u,d=r.noiseWrap?r.noiseWrap:r.noiseCells||[32,32,32,32],c=r.noiseSeed?r.noiseSeed:s;for(a=0;a<t;a++)h[a]=(e[a]+i[a])%(d[a]*o);for(a=0;a<t;a++){var f=Array(t);for(u=0;
1u<t;u++)f[u]=h[u]+c[a*t+u];l[a]=n(f,r.algorithm)}return l},f=function(t,e,i,n){for(s=0;s<t;s++)u[s]=e[s]-i[s]+n[s];var s,r=0;for(s=0;s<t;s++)r+=u[s]*u[s];return r};t.exports=function(t,e){"number"==typeof t&&(t=[t]),e||(e={});for(var i=0,n=e.noiseIterations||1,s=0;s<n;s++){var r=Math.pow(2,s);i+=(d(t,e,r)-.5)/r}return i+.5}},84366(t){var e=[0,0,0],i=[0,0,0],n=[0,0,0],s=[0,0,0],r=function(t,e,s,r,o,a,h){for(var l,u=0,d=0,c=r.noiseCells||[32,32,32],f=r.noisePeriod||c,p=r.noiseFlow||0,g=0;g<t;g++){var m=Math.pow(o,g),v=Math.pow(a,g);for(l=0;l<e;l++)i[l]=(s[l]+g)*m;for(l=0;l<e;l++)n[l]=f[l]*m;2===e?d=F(i,n,p*v+g):3===e&&(d=tO(i,n,p*v+g)),u+=d/Math.pow(h,g)}return u},o={x:0,y:0},a={x:0,y:0},h={x:0,y:0},l={x:0,y:0},u={x:0,y:0},d={x:0,y:0},c={x:0,y:0},f={x:0,y:0},p={x:0,y:0},g={x:0,y:0},m={x:0,y:0},v={x:0,y:0},x=[0,0,0],y=[0,0,0],T=[0,0,0],w=[0,0,0],b=[0,0,0],S=[0,0,0],C=[0,0,0],E=[0,0,0],A={x:0,y:0},_={x:0,y:0},M={x:0,y:0},R=[0,0,0],O=[0,0,0],P=[0,0,0],L=[0,0,0];function D(t,e){return t.x*e.x+t.y*e.y}var F=function(t,e,i){var n,r=t[0],F=t[1];o.x=r+.5*F,o.y=F,a.x=Math.floor(o.x),a.y=Math.floor(o.y),h.x=o.x-a.x,h.y=o.y-a.y;var I=+(h.y<=h.x);if(l.x=I,l.y=1-I,u.x=a.x+l.x,u.y=a.y+l.y,d.x=a.x+1,d.y=a.y+1,c.x=a.x-.5*a.y,c.y=a.y,f.x=c.x+l.x-.5*l.y,f.y=c.y+l.y,p.x=c.x+.5,p.y=c.y+1,g.x=r-c.x,g.y=F-c.y,m.x=r-f.x,m.y=F-f.y,v.x=r-p.x,v.y=F-p.y,e[0]>0||e[1]>0)for(T[0]=c.x,T[1]=f.x,T[2]=p.x,w[0]=c.y,w[1]=f.y,w[2]=p.y,e[0]>0&&(T[0]=(c.x%e[0]+e[0])%e[0],T[1]=(f.x%e[0]+e[0])%e[0],T[2]=(p.x%e[0]+e[0])%e[0]),e[1]>0&&(w[0]=(c.y%e[1]+e[1])%e[1],w[1]=(f.y%e[1]+e[1])%e[1],w[2]=(p.y%e[1]+e[1])%e[1]),n=0;n<3;n++)x[n]=Math.floor(T[n]+.5*w[n]+.5),y[n]=Math.floor(w[n]+.5);else x[0]=a.x,x[1]=u.x,x[2]=d.x,y[0]=a.y,y[1]=u.y,y[2]=d.y;for(x[0]+=s[0],x[1]+=s[0],x[2]+=s[0],y[0]+=s[1],y[1]+=s[1],y[2]+=s[1],n=0;n<3;n++)b[n]=x[n]%289,b[n]<0&&(b[n]+=289);for(n=0;n<3;n++)b[n]=((51*b[n]+2)*b[n]+y[n])%289;for(n=0;n<3;n++)b[n]=(34*b[n]+10)*b[n]%289;for(n=0;n<3;n++)S[n]=.07482*b[n]+i,C[n]=Math.cos(S[n]),E[n]=Math.sin(S[n]);for(n=0,A.x=C[0],A.y=E[0],_.x=C[1],_.y=E[1],M.x=C[2],M.y=E[2],R[0]=.8-D(g,g),R[1]=.8-D(m,m),R[2]=.8-D(v,v);n<3;n++)R[n]=Math.max(R[n],0),O[n]=R[n]*R[n],P[n]=O[n]*O[n];return L[0]=D(A,g),L[1]=D(_,m),L[2]=D(M,v),10.9*(P[0]*L[0]+P[1]*L[1]+P[2]*L[2])},I=[0,0,0],N=[0,0,0],B=[0,0,0],k=[0,0,0],U=[0,0,0],z=[0,0,0],Y=[0,0,0],X=[0,0,0],W=[0,0,0],G=[0,0,0],V=[0,0,0],H=[0,0,0],j=[0,0,0],q=[0,0,0],K=[0,0,0],Z=[0,0,0],Q=[0,0,0],J=[0,0,0],$=[0,0,0],tt=[0,0,0],te=[0,0,0,0],ti=[0,0,0,0],tn=[0,0,0,0],ts=[0,0,0,0],tr=[0,0,0,0],to=[0,0,0,0],ta=[0,0,0,0],th=[0,0,0,0],tl=[0,0,0,0],tu=[0,0,0,0],td=[0,0,0,0],tc=[0,0,0,0],tf=[0,0,0,0],tp=[0,0,0,0],tg=[0,0,0,0],tm=[0,0,0,0],tv=[0,0,0,0],tx=[0,0,0,0],ty=[0,0,0,0],tT=[0,0,0,0],tw=[0,0,0,0],tb=[0,0,0,0],tS=[0,0,0,0],tC=[0,0,0,0],tE=[0,0,0,0],tA=[0,0,0,0],t_=[0,0,0,0],tM=[0,0,0,0],tR=function(t,e){for(var i=0;i<4;i++){var n=t[i]%289;n<0&&(n+=289),e[i]=(34*n+10)*n%289}},tO=function(t,e,i){I[0]=0*t[0]+ +t[1]+ +t[2],I[1]=+t[0]+0*t[1]+ +t[2],I[2]=+t[0]+ +t[1]+0*t[2];for(var n=0;n<3;n++)N[n]=Math.floor(I[n]),B[n]=I[n]-N[n];for(n=0,k[0]=B[0]>B[1]?0:1,k[1]=B[1]>B[2]?0:1,k[2]=B[0]>B[2]?0:1,U[0]=1-k[0],U[1]=1-k[1],U[2]=1-k[2],z[0]=U[2],z[1]=k[0],z[2]=k[1],Y[0]=U[0],Y[1]=U[1],Y[2]=k[2];n<3;n++)X[n]=Math.min(z[n],Y[n]),W[n]=Math.max(z[n],Y[n]);for(n=0;n<3;n++)G[n]=N[n]+X[n],V[n]=N[n]+W[n],H[n]=N[n]+1;var r=N[0],o=N[1],a=N[2],h=G[0],l=G[1],u=G[2],d=V[0],c=V[1],f=V[2],p=H[0],g=H[1],m=H[2];for(n=0,j[0]=-.5*r+.5*o+.5*a,j[1]=.5*r-.5*o+.5*a,j[2]=.5*r+.5*o-.5*a,q[0]=-.5*h+.5*l+.5*u,q[1]=.5*h-.5*l+.5*u,q[2]=.5*h+.5*l-.5*u,K[0]=-.5*d+.5*c+.5*f,K[1]=.5*d-.5*c+.5*f,K[2]=.5*d+.5*c-.5*f,Z[0]=-.5*p+.5*g+.5*m,Z[1]=.5*p-.5*g+.5*m,Z[2]=.5*p+.5*g-.5*m;n<3;n++)Q[n]=t[n]-j[n],J[n]=t[n]-q[n],$[n]=t[n]-K[n],tt[n]=t[n]-Z[n];if(e[0]>0||e[1]>0||e[2]>0){if(te[0]=j[0],te[1]=q[0],te[2]=K[0],te[3]=Z[0],ti[0]=j[1],ti[1]=q[1],ti[2]=K[1],ti[3]=Z[1],tn[0]=j[2],tn[1]=q[2],tn[2]=K[2],tn[3]=Z[2],e[0]>0)for(n=0;n<4;n++)te[n]=(te[n]%e[0]+e[0])%e[0];if(e[1]>0)for(n=0;n<4;n++)ti[n]=(ti[n]%e[1]+e[1])%e[1];if(e[2]>0)for(n=0;n<4;n++)tn[n]=(tn[n]%e[2]+e[2])%e[2];var v=te[0],x=ti[0],y=tn[0],T=te[1],w=ti[1],b=tn[1],S=te[2],C=ti[2],E=tn[2],A=te[3],_=ti[3],M=tn[3];N[0]=Math.floor(0*v+ +x+ +y+.5),N[1]=Math.floor(+v+0*x+ +y+.5),N[2]=Math.floor(+v+ +x+0*y+.5),G[0]=Math.floor(0*T+ +w+ +b+.5),G[1]=Math.floor(+T+0*w+ +b+.5),G[2]=Math.floor(+T+ +w+0*b+.5),V[0]=Math.floor(0*S+ +C+ +E+.5),V[1]=Math.floor(+S+0*C+ +E+.5),V[2]=Math.floor(+S+ +C+0*E+.5),H[0]=Math.floor(0*A+ +_+ +M+.5),H[1]=Math.floor(+A+0*_+ +M+.5),H[2]=Math.floor(+A+ +_+0*M+.5)}N[0]+=s[0],N[1]+=s[1],N[2]+=s[2],G[0]+=s[0],G[1]+=s[1],G[2]+=s[2],V[0]+=s[0],V[1]+=s[1],V[2]+=s[2],H[0]+=s[0],H[1]+=s[1],H[2]+=s[2];for(te[0]=N[2],te[1]=G[2],te[2]=V[2],te[3]=H[2],tR(te,ti),ti[0]+=N[1],ti[1]+=G[1],ti[2]+=V[1],ti[3]+=H[1],tR(ti,te),te[0]+=N[0],te[1]+=G[0],te[2]+=V[0],te[3]+=H[0],tR(te,ts),n=0;n<4;n++)tr[n]=3.883222077*ts[n],to[n]=.996539792-.006920415*ts[n],ta[n]=.108705628*ts[n],th[n]=Math.cos(tr[n]),tl[n]=Math.sin(tr[n]),tu[n]=Math.sqrt(Math.max(0,1-to[n]*to[n]));if(0!==i)for(n=0;n<4;n++)tp[n]=th[n]*tu[n],tg[n]=tl[n]*tu[n],tm[n]=to[n],tv[n]=Math.sin(ta[n]),tx[n]=Math.cos(ta[n]),ty[n]=tl[n]*tv[n]-th[n]*tx[n],tT[n]=(1-to[n])*(ty[n]*tl[n])+to[n]*tv[n],tw[n]=(1-to[n])*(-ty[n]*th[n])+to[n]*tx[n],tb[n]=-(tg[n]*tx[n]+tp[n]*tv[n]),tS[n]=Math.sin(i),tC[n]=Math.cos(i),td[n]=tC[n]*tp[n]+tS[n]*tT[n],tc[n]=tC[n]*tg[n]+tS[n]*tw[n],tf[n]=tC[n]*tm[n]+tS[n]*tb[n];else for(n=0;n<4;n++)td[n]=th[n]*tu[n],tc[n]=tl[n]*tu[n],tf[n]=to[n];for(n=0;n<4;n++){var R=0===n?Q[0]:1===n?J[0]:2===n?$[0]:tt[0],O=0===n?Q[1]:1===n?J[1]:2===n?$[1]:tt[1],P=0===n?Q[2]:1===n?J[2]:2===n?$[2]:tt[2],L=R*R+O*O+P*P;tE[n]=.5-L,tE[n]<0&&(tE[n]=0),tA[n]=tE[n]*tE[n],t_[n]=tA[n]*tE[n]}for(n=0;n<4;n++){var D=td[n],F=tc[n],tO=tf[n],tP=0===n?Q[0]:1===n?J[0]:2===n?$[0]:tt[0],tL=0===n?Q[1]:1===n?J[1]:2===n?$[1]:tt[1],tD=0===n?Q[2]:1===n?J[2]:2===n?$[2]:tt[2];tM[n]=D*tP+F*tL+tO*tD}var tF=0;for(n=0;n<4;n++)tF+=t_[n]*tM[n];return 39.5*tF};t.exports=function(t,n){"number"==typeof t&&(t=[t]),n||(n={});for(var o=Math.min(3,t.length),a=0;o<2;)t.push(0),o++;var h=n.noiseIterations||1,l=n.noiseWarpIterations||1,u=n.noiseDetailPower||2,d=n.noiseFlowPower||2,c=n.noiseContributionPower||2,f=n.noiseWarpDetailPower||2,p=n.noiseWarpFlowPower||2,g=n.noiseWarpContributionPower||2,m=n.noiseCells||[32,32,32],v=n.noiseOffset||[0,0,0],x=n.noiseWarpAmount||0;if(n.noiseSeed)for(var y=[1,2,3],T=0;T<o;T++)s[T]=void 0===n.noiseSeed[T]?y[T]:n.noiseSeed[T];for(T=0;T<o;T++)e[T]=t[T]*m[T]+v[T];if(x>0&&l>0&&o>=2){if(2===o){var w=r(l,2,e,n,f,p,g);i[0]=e[0]+11.3,i[1]=e[1]+23.7;var b=r(l,2,i,n,f,p,g);e[0]+=w*x,e[1]+=b*x}else if(3===o){var S=r(l,3,e,n,f,p,g);i[0]=e[0]+11.3,i[1]=e[1]+23.7,i[2]=e[2]+13.1;var C=r(l,3,i,n,f,p,g);i[0]=e[0]+29.9,i[1]=e[1]+2.3,i[2]=e[2]+31.7;var E=r(l,3,i,n,f,p,g);e[0]+=S*x,e[1]+=C*x,e[2]+=E*x}}return r(h,o,e,n,u,d,c)}},78702(t){t.exports=function(t){return t==parseFloat(t)?!(t%2):void 0}},94883(t){t.exports=function(t){return t===parseFloat(t)?!(t%2):void 0}}
vendor: 33,008 bytes, line 1
1,28915(t){t.exports=function(t,e,i){return(e-t)*i+t}},94908(t){t.exports=function(t,e,i){return void 0===i&&(i=0),t.clone().lerp(e,i)}},94434(t,e,i){var n=new(i(83419))({initialize:function(t){this.val=new Float32Array(9),t?this.copy(t):this.identity()},clone:function(){return new n(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this},fromMat4:function(t){var e=t.val,i=this.val;return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[4],i[4]=e[5],i[5]=e[6],i[6]=e[8],i[7]=e[9],i[8]=e[10],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],n=t[5];return t[1]=t[3],t[2]=t[6],t[3]=e,t[5]=t[7],t[6]=i,t[7]=n,this},invert:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=l*r-o*h,d=-l*s+o*a,c=h*s-r*a,f=e*u+i*d+n*c;return f?(f=1/f,t[0]=u*f,t[1]=(-l*i+n*h)*f,t[2]=(o*i-n*r)*f,t[3]=d*f,t[4]=(l*e-n*a)*f,t[5]=(-o*e+n*s)*f,t[6]=c*f,t[7]=(-h*e+i*a)*f,t[8]=(r*e-i*s)*f,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return t[0]=r*l-o*h,t[1]=n*h-i*l,t[2]=i*o-n*r,t[3]=o*a-s*l,t[4]=e*l-n*a,t[5]=n*s-e*o,t[6]=s*h-r*a,t[7]=i*a-e*h,t[8]=e*r-i*s,this},determinant:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return e*(l*r-o*h)+i*(-l*s+o*a)+n*(h*s-r*a)},multiply:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=e[6],l=e[7],u=e[8],d=t.val,c=d[0],f=d[1],p=d[2],g=d[3],m=d[4],v=d[5],x=d[6],y=d[7],T=d[8];return e[0]=c*i+f*r+p*h,e[1]=c*n+f*o+p*l,e[2]=c*s+f*a+p*u,e[3]=g*i+m*r+v*h,e[4]=g*n+m*o+v*l,e[5]=g*s+m*a+v*u,e[6]=x*i+y*r+T*h,e[7]=x*n+y*o+T*l,e[8]=x*s+y*a+T*u,this},translate:function(t){var e=this.val,i=t.x,n=t.y;return e[6]=i*e[0]+n*e[3]+e[6],e[7]=i*e[1]+n*e[4]+e[7],e[8]=i*e[2]+n*e[5]+e[8],this},rotate:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=Math.sin(t),l=Math.cos(t);return e[0]=l*i+h*r,e[1]=l*n+h*o,e[2]=l*s+h*a,e[3]=l*r-h*i,e[4]=l*o-h*n,e[5]=l*a-h*s,this},scale:function(t){var e=this.val,i=t.x,n=t.y;return e[0]=i*e[0],e[1]=i*e[1],e[2]=i*e[2],e[3]=n*e[3],e[4]=n*e[4],e[5]=n*e[5],this},fromQuat:function(t){var e=t.x,i=t.y,n=t.z,s=t.w,r=e+e,o=i+i,a=n+n,h=e*r,l=e*o,u=e*a,d=i*o,c=i*a,f=n*a,p=s*r,g=s*o,m=s*a,v=this.val;return v[0]=1-(d+f),v[3]=l+m,v[6]=u-g,v[1]=l-m,v[4]=1-(h+f),v[7]=c+p,v[2]=u+g,v[5]=c-p,v[8]=1-(h+d),this},normalFromMat4:function(t){var e=t.val,i=this.val,n=e[0],s=e[1],r=e[2],o=e[3],a=e[4],h=e[5],l=e[6],u=e[7],d=e[8],c=e[9],f=e[10],p=e[11],g=e[12],m=e[13],v=e[14],x=e[15],y=n*h-s*a,T=n*l-r*a,w=n*u-o*a,b=s*l-r*h,S=s*u-o*h,C=r*u-o*l,E=d*m-c*g,A=d*v-f*g,_=d*x-p*g,M=c*v-f*m,R=c*x-p*m,O=f*x-p*v,P=y*O-T*R+w*M+b*_-S*A+C*E;return P?(P=1/P,i[0]=(h*O-l*R+u*M)*P,i[1]=(l*_-a*O-u*A)*P,i[2]=(a*R-h*_+u*E)*P,i[3]=(r*R-s*O-o*M)*P,i[4]=(n*O-r*_+o*A)*P,i[5]=(s*_-n*R-o*E)*P,i[6]=(m*C-v*S+x*b)*P,i[7]=(v*w-g*C-x*T)*P,i[8]=(g*S-m*w+x*y)*P,this):null}});t.exports=n},37867(t,e,i){var n=i(83419),s=i(25836),r=new n({initialize:function(t){this.val=new Float32Array(16),t?this.copy(t):this.identity()},clone:function(){return new r(this)},set:function(t){return this.copy(t)},setValues:function(t,e,i,n,s,r,o,a,h,l,u,d,c,f,p,g){var m=this.val;return m[0]=t,m[1]=e,m[2]=i,m[3]=n,m[4]=s,m[5]=r,m[6]=o,m[7]=a,m[8]=h,m[9]=l,m[10]=u,m[11]=d,m[12]=c,m[13]=f,m[14]=p,m[15]=g,this},copy:function(t){var e=t.val;return this.setValues(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])},fromArray:function(t){return this.setValues(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},zero:function(){return this.setValues(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)},transform:function(t,e,i){var n=o.fromQuat(i).val,s=e.x,r=e.y,a=e.z;return this.setValues(n[0]*s,n[1]*s,n[2]*s,0,n[4]*r,n[5]*r,n[6]*r,0,n[8]*a,n[9]*a,n[10]*a,0,t.x,t.y,t.z,1)},xyz:function(t,e,i){this.identity();var n=this.val;return n[12]=t,n[13]=e,n[14]=i,this},scaling:function(t,e,i){this.zero();var n=this.val;return n[0]=t,n[5]=e,n[10]=i,n[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 t=this.val,e=t[1],i=t[2],n=t[3],s=t[6],r=t[7],o=t[11];return t[1]=t[4],t[2]=t[8],t[3]=t[12],t[4]=e,t[6]=t[9],t[7]=t[13],t[8]=i,t[9]=s,t[11]=t[14],t[12]=n,t[13]=r,t[14]=o,this},getInverse:function(t){return this.copy(t),this.invert()},invert:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],d=t[10],c=t[11],f=t[12],p=t[13],g=t[14],m=t[15],v=e*o-i*r,x=e*a-n*r,y=e*h-s*r,T=i*a-n*o,w=i*h-s*o,b=n*h-s*a,S=l*p-u*f,C=l*g-d*f,E=l*m-c*f,A=u*g-d*p,_=u*m-c*p,M=d*m-c*g,R=v*M-x*_+y*A+T*E-w*C+b*S;return R?(R=1/R,this.setValues((o*M-a*_+h*A)*R,(n*_-i*M-s*A)*R,(p*b-g*w+m*T)*R,(d*w-u*b-c*T)*R,(a*E-r*M-h*C)*R,(e*M-n*E+s*C)*R,(g*y-f*b-m*x)*R,(l*b-d*y+c*x)*R,(r*_-o*E+h*S)*R,(i*E-e*_-s*S)*R,(f*w-p*y+m*v)*R,(u*y-l*w-c*v)*R,(o*C-r*A-a*S)*R,(e*A-i*C+n*S)*R,(p*x-f*T-g*v)*R,(l*T-u*x+d*v)*R)):this},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],d=t[10],c=t[11],f=t[12],p=t[13],g=t[14],m=t[15];return this.setValues(o*(d*m-c*g)-u*(a*m-h*g)+p*(a*c-h*d),-(i*(d*m-c*g)-u*(n*m-s*g)+p*(n*c-s*d)),i*(a*m-h*g)-o*(n*m-s*g)+p*(n*h-s*a),-(i*(a*c-h*d)-o*(n*c-s*d)+u*(n*h-s*a)),-(r*(d*m-c*g)-l*(a*m-h*g)+f*(a*c-h*d)),e*(d*m-c*g)-l*(n*m-s*g)+f*(n*c-s*d),-(e*(a*m-h*g)-r*(n*m-s*g)+f*(n*h-s*a)),e*(a*c-h*d)-r*(n*c-s*d)+l*(n*h-s*a),r*(u*m-c*p)-l*(o*m-h*p)+f*(o*c-h*u),-(e*(u*m-c*p)-l*(i*m-s*p)+f*(i*c-s*u)),e*(o*m-h*p)-r*(i*m-s*p)+f*(i*h-s*o),-(e*(o*c-h*u)-r*(i*c-s*u)+l*(i*h-s*o)),-(r*(u*g-d*p)-l*(o*g-a*p)+f*(o*d-a*u)),e*(u*g-d*p)-l*(i*g-n*p)+f*(i*d-n*u),-(e*(o*g-a*p)-r*(i*g-n*p)+f*(i*a-n*o)),e*(o*d-a*u)-r*(i*d-n*u)+l*(i*a-n*o))},determinant:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],d=t[10],c=t[11],f=t[12],p=t[13],g=t[14],m=t[15];return(e*o-i*r)*(d*m-c*g)-(e*a-n*r)*(u*m-c*p)+(e*h-s*r)*(u*g-d*p)+(i*a-n*o)*(l*m-c*f)-(i*h-s*o)*(l*g-d*f)+(n*h-s*a)*(l*p-u*f)},multiply:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=e[6],l=e[7],u=e[8],d=e[9],c=e[10],f=e[11],p=e[12],g=e[13],m=e[14],v=e[15],x=t.val,y=x[0],T=x[1],w=x[2],b=x[3];return e[0]=y*i+T*o+w*u+b*p,e[1]=y*n+T*a+w*d+b*g,e[2]=y*s+T*h+w*c+b*m,e[3]=y*r+T*l+w*f+b*v,y=x[4],T=x[5],w=x[6],b=x[7],e[4]=y*i+T*o+w*u+b*p,e[5]=y*n+T*a+w*d+b*g,e[6]=y*s+T*h+w*c+b*m,e[7]=y*r+T*l+w*f+b*v,y=x[8],T=x[9],w=x[10],b=x[11],e[8]=y*i+T*o+w*u+b*p,e[9]=y*n+T*a+w*d+b*g,e[10]=y*s+T*h+w*c+b*m,e[11]=y*r+T*l+w*f+b*v,y=x[12],T=x[13],w=x[14],b=x[15],e[12]=y*i+T*o+w*u+b*p,e[13]=y*n+T*a+w*d+b*g,e[14]=y*s+T*h+w*c+b*m,e[15]=y*r+T*l+w*f+b*v,this},multiplyLocal:function(t){var e=this.val,i=t.val;return this.setValues(e[0]*i[0]+e[1]*i[4]+e[2]*i[8]+e[3]*i[12],e[0]*i[1]+e[1]*i[5]+e[2]*i[9]+e[3]*i[13],e[0]*i[2]+e[1]*i[6]+e[2]*i[10]+e[3]*i[14],e[0]*i[3]+e[1]*i[7]+e[2]*i[11]+e[3]*i[15],e[4]*i[0]+e[5]*i[4]+e[6]*i[8]+e[7]*i[12],e[4]*i[1]+e[5]*i[5]+e[6]*i[9]+e[7]*i[13],e[4]*i[2]+e[5]*i[6]+e[6]*i[10]+e[7]*i[14],e[4]*i[3]+e[5]*i[7]+e[6]*i[11]+e[7]*i[15],e[8]*i[0]+e[9]*i[4]+e[10]*i[8]+e[11]*i[12],e[8]*i[1]+e[9]*i[5]+e[10]*i[9]+e[11]*i[13],e[8]*i[2]+e[9]*i[6]+e[10]*i[10]+e[11]*i[14],e[8]*i[3]+e[9]*i[7]+e[10]*i[11]+e[11]*i[15],e[12]*i[0]+e[13]*i[4]+e[14]*i[8]+e[15]*i[12],e[12]*i[1]+e[13]*i[5]+e[14]*i[9]+e[15]*i[13],e[12]*i[2]+e[13]*i[6]+e[14]*i[10]+e[15]*i[14],e[12]*i[3]+e[13]*i[7]+e[14]*i[11]+e[15]*i[15])},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var i=t.val,n=e.val,s=i[0],r=i[4],o=i[8],a=i[12],h=i[1],l=i[5],u=i[9],d=i[13],c=i[2],f=i[6],p=i[10],g=i[14],m=i[3],v=i[7],x=i[11],y=i[15],T=n[0],w=n[4],b=n[8],S=n[12],C=n[1],E=n[5],A=n[9],_=n[13],M=n[2],R=n[6],O=n[10],P=n[14],L=n[3],D=n[7],F=n[11],I=n[15];return this.setValues(s*T+r*C+o*M+a*L,h*T+l*C+u*M+d*L,c*T+f*C+p*M+g*L,m*T+v*C+x*M+y*L,s*w+r*E+o*R+a*D,h*w+l*E+u*R+d*D,c*w+f*E+p*R+g*D,m*w+v*E+x*R+y*D,s*b+r*A+o*O+a*F,h*b+l*A+u*O+d*F,c*b+f*A+p*O+g*F,m*b+v*A+x*O+y*F,s*S+r*_+o*P+a*I,h*S+l*_+u*P+d*I,c*S+f*_+p*P+g*I,m*S+v*_+x*P+y*I)},translate:function(t){return this.translateXYZ(t.x,t.y,t.z)},translateXYZ:function(t,e,i){var n=this.val;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this},scale:function(t){return this.scaleXYZ(t.x,t.y,t.z)},scaleXYZ:function(t,e,i){var n=this.val;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this},makeRotationAxis:function(t,e){var i=Math.cos(e),n=Math.sin(e),s=1-i,r=t.x,o=t.y,a=t.z,h=s*r,l=s*o;return this.setValues(h*r+i,h*o-n*a,h*a+n*o,0,h*o+n*a,l*o+i,l*a-n*r,0,h*a-n*o,l*a+n*r,s*a*a+i,0,0,0,0,1)},rotate:function(t,e){var i=this.val,n=e.x,s=e.y,r=e.z,o=Math.sqrt(n*n+s*s+r*r);if(1e-6>Math.abs(o))return this;n*=o=1/o,s*=o,r*=o;var a=Math.sin(t),h=Math.cos(t),l=1-h,u=i[0],d=i[1],c=i[2],f=i[3],p=i[4],g=i[5],m=i[6],v=i[7],x=i[8],y=i[9],T=i[10],w=i[11],b=i[12],S=i[13],C=i[14],E=i[15],A=n*n*l+h,_=s*n*l+r*a,M=r*n*l-s*a,R=n*s*l-r*a,O=s*s*l+h,P=r*s*l+n*a,L=n*r*l+s*a,D=s*r*l-n*a,F=r*r*l+h;return this.setValues(u*A+p*_+x*M,d*A+g*_+y*M,c*A+m*_+T*M,f*A+v*_+w*M,u*R+p*O+x*P,d*R+g*O+y*P,c*R+m*O+T*P,f*R+v*O+w*P,u*L+p*D+x*F,d*L+g*D+y*F,c*L+m*D+T*F,f*L+v*D+w*F,b,S,C,E)},rotateX:function(t){var e=this.val,i=Math.sin(t),n=Math.cos(t),s=e[4],r=e[5],o=e[6],a=e[7],h=e[8],l=e[9],u=e[10],d=e[11];return e[4]=s*n+h*i,e[5]=r*n+l*i,e[6]=o*n+u*i,e[7]=a*n+d*i,e[8]=h*n-s*i,e[9]=l*n-r*i,e[10]=u*n-o*i,e[11]=d*n-a*i,this},rotateY:function(t){var e=this.val,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[8],l=e[9],u=e[10],d=e[11];return e[0]=s*n-h*i,e[1]=r*n-l*i,e[2]=o*n-u*i,e[3]=a*n-d*i,e[8]=s*i+h*n,e[9]=r*i+l*n,e[10]=o*i+u*n,e[11]=a*i+d*n,this},rotateZ:function(t){var e=this.val,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[4],l=e[5],u=e[6],d=e[7];return e[0]=s*n+h*i,e[1]=r*n+l*i,e[2]=o*n+u*i,e[3]=a*n+d*i,e[4]=h*n-s*i,e[5]=l*n-r*i,e[6]=u*n-o*i,e[7]=d*n-a*i,this},fromRotationTranslation:function(t,e){var i=t.x,n=t.y,s=t.z,r=t.w,o=i+i,a=n+n,h=s+s,l=i*o,u=i*a,d=i*h,c=n*a,f=n*h,p=s*h,g=r*o,m=r*a,v=r*h;return this.setValues(1-(c+p),u+v,d-m,0,u-v,1-(l+p),f+g,0,d+m,f-g,1-(l+c),0,e.x,e.y,e.z,1)},fromQuat:function(t){var e=t.x,i=t.y,n=t.z,s=t.w,r=e+e,o=i+i,a=n+n,h=e*r,l=e*o,u=e*a,d=i*o,c=i*a,f=n*a,p=s*r,g=s*o,m=s*a;return this.setValues(1-(d+f),l+m,u-g,0,l-m,1-(h+f),c+p,0,u+g,c-p,1-(h+d),0,0,0,0,1)},frustum:function(t,e,i,n,s,r){var o=1/(e-t),a=1/(n-i),h=1/(s-r);return this.setValues(2*s*o,0,0,0,0,2*s*a,0,0,(e+t)*o,(n+i)*a,(r+s)*h,-1,0,0,r*s*2*h,0)},perspective:function(t,e,i,n){var s=1/Math.tan(t/2),r=1/(i-n);return this.setValues(s/e,0,0,0,0,s,0,0,0,0,(n+i)*r,-1,0,0,2*n*i*r,0)},perspectiveLH:function(t,e,i,n){return this.setValues(2*i/t,0,0,0,0,2*i/e,0,0,0,0,-n/(i-n),1,0,0,i*n/(i-n),0)},ortho:function(t,e,i,n,s,r){var o=t-e,a=i-n,h=s-r;return o=0===o?o:1/o,a=0===a?a:1/a,h=0===h?h:1/h,this.setValues(-2*o,0,0,0,0,-2*a,0,0,0,0,2*h,0,(t+e)*o,(n+i)*a,(r+s)*h,1)},lookAtRH:function(t,e,i){var n=this.val;return u.subVectors(t,e),0===u.lengthSq()&&(u.z=1),u.normalize(),h.crossVectors(i,u),0===h.lengthSq()&&(1===Math.abs(i.z)?u.x+=1e-4:u.z+=1e-4,u.normalize(),h.crossVectors(i,u)),h.normalize(),l.crossVectors(u,h),n[0]=h.x,n[1]=h.y,n[2]=h.z,n[4]=l.x,n[5]=l.y,n[6]=l.z,n[8]=u.x,n[9]=u.y,n[10]=u.z,this},lookAt:function(t,e,i){var n=t.x,s=t.y,r=t.z,o=i.x,a=i.y,h=i.z,l=e.x,u=e.y,d=e.z;if(1e-6>Math.abs(n-l)&&1e-6>Math.abs(s-u)&&1e-6>Math.abs(r-d))return this.identity();var c=n-l,f=s-u,p=r-d,g=1/Math.sqrt(c*c+f*f+p*p);c*=g,f*=g;var m=a*(p*=g)-h*f,v=h*c-o*p,x=o*f-a*c;(g=Math.sqrt(m*m+v*v+x*x))?(m*=g=1/g,v*=g,x*=g):(m=0,v=0,x=0);var y=f*x-p*v,T=p*m-c*x,w=c*v-f*m;return(g=Math.sqrt(y*y+T*T+w*w))?(y*=g=1/g,T*=g,w*=g):(y=0,T=0,w=0),this.setValues(m,y,c,0,v,T,f,0,x,w,p,0,-(m*n+v*s+x*r),-(y*n+T*s+w*r),-(c*n+f*s+p*r),1)},yawPitchRoll:function(t,e,i){this.zero(),o.zero(),a.zero();var n=this.val,s=o.val,r=a.val,h=Math.sin(i),l=Math.cos(i);return n[10]=1,n[15]=1,n[0]=l,n[1]=h,n[4]=-h,n[5]=l,h=Math.sin(e),l=Math.cos(e),s[0]=1,s[15]=1,s[5]=l,s[10]=l,s[9]=-h,s[6]=h,h=Math.sin(t),l=Math.cos(t),r[5]=1,r[15]=1,r[0]=l,r[2]=-h,r[8]=h,r[10]=l,this.multiplyLocal(o),this.multiplyLocal(a),this},setWorldMatrix:function(t,e,i,n,s){return this.yawPitchRoll(t.y,t.x,t.z),o.scaling(i.x,i.y,i.z),a.xyz(e.x,e.y,e.z),this.multiplyLocal(o),this.multiplyLocal(a),n&&this.multiplyLocal(n),s&&this.multiplyLocal(s),this},multiplyToMat4:function(t,e){var i=this.val,n=t.val,s=i[0],r=i[1],o=i[2],a=i[3],h=i[4],l=i[5],u=i[6],d=i[7],c=i[8],f=i[9],p=i[10],g=i[11],m=i[12],v=i[13],x=i[14],y=i[15],T=n[0],w=n[1],b=n[2],S=n[3],C=n[4],E=n[5],A=n[6],_=n[7],M=n[8],R=n[9],O=n[10],P=n[11],L=n[12],D=n[13],F=n[14],I=n[15];return e.setValues(T*s+w*h+b*c+S*m,w*r+w*l+b*f+S*v,b*o+w*u+b*p+S*x,S*a+w*d+b*g+S*y,C*s+E*h+A*c+_*m,C*r+E*l+A*f+_*v,C*o+E*u+A*p+_*x,C*a+E*d+A*g+_*y,M*s+R*h+O*c+P*m,M*r+R*l+O*f+P*v,M*o+R*u+O*p+P*x,M*a+R*d+O*g+P*y,L*s+D*h+F*c+I*m,L*r+D*l+F*f+I*v,L*o+D*u+F*p+I*x,L*a+D*d+F*g+I*y)},fromRotationXYTranslation:function(t,e,i){var n=e.x,s=e.y,r=e.z,o=Math.sin(t.x),a=Math.cos(t.x),h=Math.sin(t.y),l=Math.cos(t.y),u=n,d=s,c=r,f=-o,p=0-f*h,g=0-a*h,m=f*l,v=a*l;return i||(u=l*n+h*r,d=p*n+a*s+m*r,c=g*n+o*s+v*r),this.setValues(l,p,g,0,0,a,o,0,h,m,v,0,u,d,c,1)},getMaxScaleOnAxis:function(){var t=this.val;return Math.sqrt(Math.max(t[0]*t[0]+t[1]*t[1]+t[2]*t[2],t[4]*t[4]+t[5]*t[5]+t[6]*t[6],t[8]*t[8]+t[9]*t[9]+t[10]*t[10]))}}),o=new r,a=new r,h=new s,l=new s,u=new s;t.exports=r},86883(t){t.exports=function(t,e,i){return Math.min(t+e,i)}},50040(t){t.exports=function(t){var e=t.length;if(0===e)return 0;t.sort(function(t,e){return t-e});var i=Math.floor(e/2);return e%2==0?(t[i]+t[i-1])/2:t[i]}},37204(t){t.exports=function(t,e,i){return Math.max(t-e,i)}},65201(t){t.exports=function(t,e,i,n){void 0===i&&(i=e+1);var s=(t-e)/(i-e);return s>1?void 0!==n?(s=(n-t)/(n-i))<0&&(s=0):s=1:s<0&&(s=0),s}},15746(t,e,i){var n=i(83419),s=i(94434),r=i(29747),o=i(25836),a=new Int8Array([1,2,0]),h=new Float32Array([0,0,0]),l=new o(1,0,0),u=new o(0,1,0),d=new o,c=new s;t.exports=new n({initialize:function(t,e,i,n){this.onChangeCallback=r,this.set(t,e,i,n)},x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback(this)}},w:{get:function(){return this._w},set:function(t){this._w=t,this.onChangeCallback(this)}},copy:function(t){return this.set(t)},set:function(t,e,i,n,s){return void 0===s&&(s=!0),"object"==typeof t?(this._x=t.x||0,this._y=t.y||0,this._z=t.z||0,this._w=t.w||0):(this._x=t||0,this._y=e||0,this._z=i||0,this._w=n||0),s&&this.onChangeCallback(this),this},add:function(t){return this._x+=t.x,this._y+=t.y,this._z+=t.z,this._w+=t.w,this.onChangeCallback(this),this},subtract:function(t){return this._x-=t.x,this._y-=t.y,this._z-=t.z,this._w-=t.w,this.onChangeCallback(this),this},scale:function(t){return this._x*=t,this._y*=t,this._z*=t,this._w*=t,this.onChangeCallback(this),this},length:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},normalize:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n;return s>0&&(s=1/Math.sqrt(s),this._x=t*s,this._y=e*s,this._z=i*s,this._w=n*s),this.onChangeCallback(this),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z,r=this.w;return this.set(i+e*(t.x-i),n+e*(t.y-n),s+e*(t.z-s),r+e*(t.w-r))},rotationTo:function(t,e){var i=t.x*e.x+t.y*e.y+t.z*e.z;return i<-.999999?(1e-6>d.copy(l).cross(t).length()&&d.copy(u).cross(t),d.normalize(),this.setAxisAngle(d,Math.PI)):i>.999999?this.set(0,0,0,1):(d.copy(t).cross(e),this._x=d.x,this._y=d.y,this._z=d.z,this._w=1+i,this.normalize())},setAxes:function(t,e,i){var n=c.val;return n[0]=e.x,n[3]=e.y,n[6]=e.z,n[1]=i.x,n[4]=i.y,n[7]=i.z,n[2]=-t.x,n[5]=-t.y,n[8]=-t.z,this.fromMat3(c).normalize()},identity:function(){return this.set(0,0,0,1)},setAxisAngle:function(t,e){var i=Math.sin(e*=.5);return this.set(i*t.x,i*t.y,i*t.z,Math.cos(e))},multiply:function(t){var e=this.x,i=this.y,n=this.z,s=this.w,r=t.x,o=t.y,a=t.z,h=t.w;return this.set(e*h+s*r+i*a-n*o,i*h+s*o+n*r-e*a,n*h+s*a+e*o-i*r,s*h-e*r-i*o-n*a)},slerp:function(t,e){var i=this.x,n=this.y,s=this.z,r=this.w,o=t.x,a=t.y,h=t.z,l=t.w,u=i*o+n*a+s*h+r*l;u<0&&(u=-u,o=-o,a=-a,h=-h,l=-l);var d=1-e,c=e;if(1-u>1e-6){var f=Math.acos(u),p=Math.sin(f);d=Math.sin((1-e)*f)/p,c=Math.sin(e*f)/p}return this.set(d*i+c*o,d*n+c*a,d*s+c*h,d*r+c*l)},invert:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n,r=s?1/s:0;return this.set(-t*r,-e*r,-i*r,n*r)},conjugate:function(){return this._x=-this.x,this._y=-this.y,this._z=-this.z,this.onChangeCallback(this),this},rotateX:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.set(e*o+s*r,i*o+n*r,n*o-i*r,s*o-e*r)},rotateY:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.set(e*o-n*r,i*o+s*r,n*o+e*r,s*o-i*r)},rotateZ:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.set(e*o+i*r,i*o-e*r,n*o+s*r,s*o-n*r)},calculateW:function(){var t=this.x,e=this.y,i=this.z;return this.w=-Math.sqrt(1-t*t-e*e-i*i),this},setFromEuler:function(t,e){var i=t.x/2,n=t.y/2,s=t.z/2,r=Math.cos(i),o=Math.cos(n),a=Math.cos(s),h=Math.sin(i),l=Math.sin(n),u=Math.sin(s);switch(t.order){case"XYZ":this.set(h*o*a+r*l*u,r*l*a-h*o*u,r*o*u+h*l*a,r*o*a-h*l*u,e);break;case"YXZ":this.set(h*o*a+r*l*u,r*l*a-h*o*u,r*o*u-h*l*a,r*o*a+h*l*u,e);break;case"ZXY":this.set(h*o*a-r*l*u,r*l*a+h*o*u,r*o*u+h*l*a,r*o*a-h*l*u,e);break;case"ZYX":this.set(h*o*a-r*l*u,r*l*a+h*o*u,r*o*u-h*l*a,r*o*a+h*l*u,e);break;case"YZX":this.set(h*o*a+r*l*u,r*l*a+h*o*u,r*o*u-h*l*a,r*o*a-h*l*u,e);break;case"XZY":this.set(h*o*a-r*l*u,r*l*a-h*o*u,r*o*u+h*l*a,r*o*a+h*l*u,e)}return this},setFromRotationMatrix:function(t){var e,i=t.val,n=i[0],s=i[4],r=i[8],o=i[1],a=i[5],h=i[9],l=i[2],u=i[6],d=i[10],c=n+a+d;return c>0?(e=.5/Math.sqrt(c+1),this.set((u-h)*e,(r-l)*e,(o-s)*e,.25/e)):n>a&&n>d?(e=2*Math.sqrt(1+n-a-d),this.set(.25*e,(s+o)/e,(r+l)/e,(u-h)/e)):a>d?(e=2*Math.sqrt(1+a-n-d),this.set((s+o)/e,.25*e,(h+u)/e,(r-l)/e)):(e=2*Math.sqrt(1+d-n-a),this.set((r+l)/e,(h+u)/e,.25*e,(o-s)/e)),this},fromMat3:function(t){var e,i=t.val,n=i[0]+i[4]+i[8];if(n>0)e=Math.sqrt(n+1),this.w=.5*e,e=.5/e,this._x=(i[7]-i[5])*e,this._y=(i[2]-i[6])*e,this._z=(i[3]-i[1])*e;else{var s=0;i[4]>i[0]&&(s=1),i[8]>i[3*s+s]&&(s=2);var r=a[s],o=a[r];e=Math.sqrt(i[3*s+s]-i[3*r+r]-i[3*o+o]+1),h[s]=.5*e,e=.5/e,h[r]=(i[3*r+s]+i[3*s+r])*e,h[o]=(i[3*o+s]+i[3*s+o])*e,this._x=h[0],this._y=h[1],this._z=h[2],this._w=(i[3*o+r]-i[3*r+o])*e}return this.onChangeCallback(this),this}})},43396(t,e,i){var n=i(36383);t.exports=function(t){return t*n.RAD_TO_DEG}},74362(t){t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI;return t.x=Math.cos(i)*e,t.y=Math.sin(i)*e,t}},60706(t){t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI,n=2*Math.random()-1,s=Math.sqrt(1-n*n)*e;return t.x=Math.cos(i)*s,t.y=Math.sin(i)*s,t.z=n*e,t}},67421(t){t.exports=function(t,e){return void 0===e&&(e=1),t.x=(2*Math.random()-1)*e,t.y=(2*Math.random()-1)*e,t.z=(2*Math.random()-1)*e,t.w=(2*Math.random()-1)*e,t}},36305(t){t.exports=function(t,e){var i=t.x,n=t.y;return t.x=i*Math.cos(e)-n*Math.sin(e),t.y=i*Math.sin(e)+n*Math.cos(e),t}},11520(t){t.exports=function(t,e,i,n){var s=Math.cos(n),r=Math.sin(n),o=t.x-e,a=t.y-i;return t.x=o*s-a*r+e,t.y=o*r+a*s+i,t}},1163(t){t.exports=function(t,e,i,n,s){var r=n+Math.atan2(t.y-i,t.x-e);return t.x=e+s*Math.cos(r),t.y=i+s*Math.sin(r),t}},70336(t){t.exports=function(t,e,i,n,s){return t.x=e+s*Math.cos(n),t.y=i+s*Math.sin(n),t}},72678(t,e,i){var n=i(25836),s=i(37867),r=i(15746),o=new s,a=new r,h=new n;t.exports=function(t,e,i){return a.setAxisAngle(e,i),o.fromRotationTranslation(a,h.set(0,0,0)),t.transformMat4(o)}},2284(t){t.exports=function(t){return t>0?Math.ceil(t):Math.floor(t)}},41013(t){t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var n=Math.pow(i,-e);return Math.round(t*n)/n}},7602(t){t.exports=function(t,e,i){return t<=e?0:t>=i?1:(t=(t-e)/(i-e))*t*(3-2*t)}},54261(t){t.exports=function(t,e,i){return(t=Math.max(0,Math.min(1,(t-e)/(i-e))))*t*t*(t*(6*t-15)+10)}},44408(t,e,i){var n=i(26099);t.exports=function(t,e,i,s){void 0===s&&(s=new n);var r=0,o=0;return t>0&&t<=e*i&&(t>e-1?(o=Math.floor(t/e),r=t-o*e):r=t),s.set(r,o)}},85955(t,e,i){var n=i(26099);t.exports=function(t,e,i,s,r,o,a,h){void 0===h&&(h=new n);var l=Math.sin(r),u=Math.cos(r),d=u*o,c=l*o,f=-l*a,p=u*a,g=1/(d*p+-(f*c));return h.x=p*g*t+-f*g*e+(s*f-i*p)*g,h.y=d*g*e+-c*g*t+(-s*d+i*c)*g,h}},26099(t,e,i){var n=i(83419),s=i(43855),r=new n({initialize:function(t,e){this.x=0,this.y=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0):(void 0===e&&(e=t),this.x=t||0,this.y=e||0)},clone:function(){return new r(this.x,this.y)},copy:function(t){return this.x=t.x||0,this.y=t.y||0,this},setFromObject:function(t){return this.x=t.x||0,this.y=t.y||0,this},set:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setTo:function(t,e){return this.set(t,e)},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},invert:function(){return this.set(this.y,this.x)},setToPolar:function(t,e){return null==e&&(e=1),this.x=Math.cos(t)*e,this.y=Math.sin(t)*e,this},equals:function(t){return this.x===t.x&&this.y===t.y},fuzzyEquals:function(t,e){return s(this.x,t.x,e)&&s(this.y,t.y,e)},angle:function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t},setAngle:function(t){return this.setToPolar(t,this.length())},add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t):(this.x=0,this.y=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this},negate:function(){return this.x=-this.x,this.y=-this.y,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y;return e*e+i*i},length:function(){var t=this.x,e=this.y;return Math.sqrt(t*t+e*e)},setLength:function(t){return this.normalize().scale(t)},lengthSq:function(){var t=this.x,e=this.y;return t*t+e*e},normalize:function(){var t=this.x,e=this.y,i=t*t+e*e;return i>0&&(i=1/Math.sqrt(i),this.x=t*i,this.y=e*i),this},normalizeRightHand:function(){var t=this.x;return this.x=-1*this.y,this.y=t,this},normalizeLeftHand:function(){var t=this.x;return this.x=this.y,this.y=-1*t,this},dot:function(t){return this.x*t.x+this.y*t.y},cross:function(t){return this.x*t.y-this.y*t.x},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this},transformMat3:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[3]*i+n[6],this.y=n[1]*e+n[4]*i+n[7],this},transformMat4:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[4]*i+n[12],this.y=n[1]*e+n[5]*i+n[13],this},reset:function(){return this.x=0,this.y=0,this},limit:function(t){var e=this.length();return e&&e>t&&this.scale(t/e),this},reflect:function(t){return t=t.clone().normalize(),this.subtract(t.scale(2*this.dot(t)))},mirror:function(t){return this.reflect(t).negate()},rotate:function(t){var e=Math.cos(t),i=Math.sin(t);return this.set(e*this.x-i*this.y,i*this.x+e*this.y)},project:function(t){var e=this.dot(t)/t.dot(t);return this.copy(t).scale(e)},projectUnit:function(t,e){void 0===e&&(e=new r);var i=this.x*t.x+this.y*t.y;return 0!==i&&(e.x=i*t.x,e.y=i*t.y),e}});r.ZERO=new r,r.RIGHT=new r(1,0),r.LEFT=new r(-1,0),r.UP=new r(0,-1),r.DOWN=new r(0,1),r.ONE=new r(1,1),t.exports=r},25836(t,e,i){var n=new(i(83419))({initialize:function(t,e,i){this.x=0,this.y=0,this.z=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this},clone:function(){return new n(this.x,this.y,this.z)},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this},subVectors:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this},crossVectors:function(t,e){var i=t.x,n=t.y,s=t.z,r=e.x,o=e.y,a=e.z;return this.x=n*a-s*o,this.y=s*r-i*a,this.z=i*o-n*r,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this},set:function(t,e,i){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0),this},setFromMatrixPosition:function(t){return this.fromArray(t.val,12)},setFromMatrixColumn:function(t,e){return this.fromArray(t.val,4*e)},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this},addScale:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t,this.z*=t):(this.x=0,this.y=0,this.z=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0;return Math.sqrt(e*e+i*i+n*n)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0;return e*e+i*i+n*n},length:function(){var t=this.x,e=this.y,i=this.z;return Math.sqrt(t*t+e*e+i*i)},lengthSq:function(){var t=this.x,e=this.y,i=this.z;return t*t+e*e+i*i},normalize:function(){var t=this.x,e=this.y,i=this.z,n=t*t+e*e+i*i;return n>0&&(n=1/Math.sqrt(n),this.x=t*n,this.y=e*n,this.z=i*n),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},cross:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z;return this.x=i*o-n*r,this.y=n*s-e*o,this.z=e*r-i*s,this},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this},applyMatrix3:function(t){var e=this.x,i=this.y,n=this.z,s=t.val;return this.x=s[0]*e+s[3]*i+s[6]*n,this.y=s[1]*e+s[4]*i+s[7]*n,this.z=s[2]*e+s[5]*i+s[8]*n,this},applyMatrix4:function(t){var e=this.x,i=this.y,n=this.z,s=t.val,r=1/(s[3]*e+s[7]*i+s[11]*n+s[15]);return this.x=(s[0]*e+s[4]*i+s[8]*n+s[12])*r,this.y=(s[1]*e+s[5]*i+s[9]*n+s[13])*r,this.z=(s[2]*e+s[6]*i+s[10]*n+s[14])*r,this},transformMat3:function(t){var e=this.x,i=this.y,n=this.z,s=t.val;return this.x=e*s[0]+i*s[3]+n*s[6],this.y=e*s[1]+i*s[4]+n*s[7],this.z=e*s[2]+i*s[5]+n*s[8],this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,s=t.val;return this.x=s[0]*e+s[4]*i+s[8]*n+s[12],this.y=s[1]*e+s[5]*i+s[9]*n+s[13],this.z=s[2]*e+s[6]*i+s[10]*n+s[14],this},transformCoordinates:function(t){var e=this.x,i=this.y,n=this.z,s=t.val,r=e*s[0]+i*s[4]+n*s[8]+s[12],o=e*s[1]+i*s[5]+n*s[9]+s[13],a=e*s[2]+i*s[6]+n*s[10]+s[14],h=e*s[3]+i*s[7]+n*s[11]+s[15];return this.x=r/h,this.y=o/h,this.z=a/h,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z,a=t.w,h=a*e+r*n-o*i,l=a*i+o*e-s*n,u=a*n+s*i-r*e,d=-s*e-r*i-o*n;return this.x=h*a+-(d*s)+-(l*o)- -(u*r),this.y=l*a+-(d*r)+-(u*s)- -(h*o),this.z=u*a+-(d*o)+-(h*r)- -(l*s),this},project:function(t){var e=this.x,i=this.y,n=this.z,s=t.val,r=s[0],o=s[1],a=s[2],h=s[3],l=s[4],u=s[5],d=s[6],c=s[7],f=s[8],p=s[9],g=s[10],m=s[11],v=s[12],x=s[13],y=s[14],T=1/(e*h+i*c+n*m+s[15]);return this.x=(e*r+i*l+n*f+v)*T,this.y=(e*o+i*u+n*p+x)*T,this.z=(e*a+i*d+n*g+y)*T,this},projectViewMatrix:function(t,e){return this.applyMatrix4(t).applyMatrix4(e)},unprojectViewMatrix:function(t,e){return this.applyMatrix4(t).applyMatrix4(e)},unproject:function(t,e){var i=t.x,n=t.y,s=t.z,r=t.w,o=this.x-i,a=r-this.y-1-n,h=this.z;return this.x=2*o/s-1,this.y=2*a/r-1,this.z=2*h-1,this.project(e)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});n.ZERO=new n,n.RIGHT=new n(1,0,0),n.LEFT=new n(-1,0,0),n.UP=new n(0,-1,0),n.DOWN=new n(0,1,0),n.FORWARD=new n(0,0,1),n.BACK=new n(0,0,-1),n.ONE=new n(1,1,1),t.exports=n},61369(t,e,i){var n=new(i(83419))({initialize:function(t,e,i,n){this.x=0,this.y=0,this.z=0,this.w=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0)},clone:function(){return new n(this.x,this.y,this.z,this.w)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this.w=t.w||0,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z&&this.w===t.w},set:function(t,e,i,n){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this.w+=t.w||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this.w-=t.w||0,this},scale:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},length:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},normalize:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n;return s>0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s,this.w=n*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z,r=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this.w=r+e*(t.w-r),this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this.w*=t.w||1,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this.w/=t.w||1,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,s=t.w-this.w||0;return Math.sqrt(e*e+i*i+n*n+s*s)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,s=t.w-this.w||0;return e*e+i*i+n*n+s*s},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,s=this.w,r=t.val;return this.x=r[0]*e+r[4]*i+r[8]*n+r[12]*s,this.y=r[1]*e+r[5]*i+r[9]*n+r[13]*s,this.z=r[2]*e+r[6]*i+r[10]*n+r[14]*s,this.w=r[3]*e+r[7]*i+r[11]*n+r[15]*s,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z,a=t.w,h=a*e+r*n-o*i,l=a*i+o*e-s*n,u=a*n+s*i-r*e,d=-s*e-r*i-o*n;return this.x=h*a+-(d*s)+-(l*o)- -(u*r),this.y=l*a+-(d*r)+-(u*s)- -(h*o),this.z=u*a+-(d*o)+-(h*r)- -(l*s),this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});n.prototype.sub=n.prototype.subtract,n.prototype.mul=n.prototype.multiply,n.prototype.div=n.prototype.divide,n.prototype.dist=n.prototype.distance,n.prototype.distSq=n.prototype.distanceSq,n.prototype.len=n.prototype.length,n.prototype.lenSq=n.prototype.lengthSq,t.exports=n},60417(t){t.exports=function(t,e,i){return Math.abs(t-e)<=i}},15994(t){t.exports=function(t,e,i){var n=i-e;return e+((t-e)%n+n)%n}},31040(t){t.exports=function(t,e,i,n){return Math.atan2(n-e,i-t)}},55495(t){t.exports=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)}},128(t){t.exports=function(t,e){return Math.atan2(e.x-t.x,e.y-t.y)}},41273(t){t.exports=function(t,e,i,n){return Math.atan2(i-t,n-e)}},1432(t,e,i){var n=i(36383);t.exports=function(t){return t>Math.PI&&(t-=n.TAU),Math.abs(((t+n.PI_OVER_2)%n.TAU-n.TAU)%n.TAU)}},49127(t,e,i){var n=i(12407);t.exports=function(t,e){return n(e-t)}},52285(t,e,i){var n=i(36383),s=i(12407),r=n.TAU;t.exports=function(t,e){var i=s(e-t);return i>0&&(i-=r),i}},67317(t,e,i){var n=i(86554);t.exports=function(t,e){return n(e-t)}},12407(t){t.exports=function(t){return(t%=2*Math.PI)>=0?t:t+2*Math.PI}},53993(t,e,i){var n=i(99472);t.exports=function(){return n(-Math.PI,Math.PI)}},86564(t,e,i){var n=i(99472);t.exports=function(){return n(-180,180)}},90154(t,e,i){var n=i(12407);t.exports=function(t){return n(t+Math.PI)}},48736(t,e,i){var n=i(36383);
1t.exports=function(t,e,i){return void 0===i&&(i=.05),t===e||(Math.abs(e-t)<=i||Math.abs(e-t)>=n.TAU-i?t=e:(Math.abs(e-t)>Math.PI&&(e<t?e+=n.TAU:e-=n.TAU),e>t?t+=i:e<t&&(t-=i))),t}},61430(t){t.exports=function(t,e){var i=e-t;if(0===i)return 0;var n=Math.floor((i- -180)/360);return i-360*n}},86554(t,e,i){var n=i(15994);t.exports=function(t){return n(t,-Math.PI,Math.PI)}},30954(t,e,i){var n=i(15994);t.exports=function(t){return n(t,-180,180)}},25588(t,e,i){t.exports={Between:i(31040),BetweenPoints:i(55495),BetweenPointsY:i(128),BetweenY:i(41273),CounterClockwise:i(1432),GetClockwiseDistance:i(49127),GetCounterClockwiseDistance:i(52285),GetShortestDistance:i(67317),Normalize:i(12407),Random:i(53993),RandomDegrees:i(86564),Reverse:i(90154),RotateTo:i(48736),ShortestBetween:i(61430),Wrap:i(86554),WrapDegrees:i(30954)}},36383(t){t.exports={TAU:2*Math.PI,PI_OVER_2:Math.PI/2,EPSILON:1e-6,DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,RND:null,MIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER||-0x1fffffffffffff,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||0x1fffffffffffff}},20339(t){t.exports=function(t,e,i,n){var s=t-i,r=e-n;return Math.sqrt(s*s+r*r)}},52816(t){t.exports=function(t,e){var i=t.x-e.x,n=t.y-e.y;return Math.sqrt(i*i+n*n)}},64559(t){t.exports=function(t,e){var i=t.x-e.x,n=t.y-e.y;return i*i+n*n}},82340(t){t.exports=function(t,e,i,n){return Math.max(Math.abs(t-i),Math.abs(e-n))}},14390(t){t.exports=function(t,e,i,n,s){return void 0===s&&(s=2),Math.sqrt(Math.pow(i-t,s)+Math.pow(n-e,s))}},2243(t){t.exports=function(t,e,i,n){return Math.abs(t-i)+Math.abs(e-n)}},89774(t){t.exports=function(t,e,i,n){var s=t-i,r=e-n;return s*s+r*r}},50994(t,e,i){t.exports={Between:i(20339),BetweenPoints:i(52816),BetweenPointsSquared:i(64559),Chebyshev:i(82340),Power:i(14390),Snake:i(2243),Squared:i(89774)}},62640(t,e,i){var n=i(54178),s=i(41521),r=i(79980),o=i(85433),a=i(99140),h=i(48857),l=i(81596),u=i(59133),d=i(98516),c=i(35248),f=i(82500),p=i(49752);t.exports={Power0:l,Power1:u.Out,Power2:o.Out,Power3:d.Out,Power4:c.Out,Linear:l,Quad:u.Out,Cubic:o.Out,Quart:d.Out,Quint:c.Out,Sine:f.Out,Expo:h.Out,Circ:r.Out,Elastic:a.Out,Back:n.Out,Bounce:s.Out,Stepped:p,"Quad.easeIn":u.In,"Cubic.easeIn":o.In,"Quart.easeIn":d.In,"Quint.easeIn":c.In,"Sine.easeIn":f.In,"Expo.easeIn":h.In,"Circ.easeIn":r.In,"Elastic.easeIn":a.In,"Back.easeIn":n.In,"Bounce.easeIn":s.In,"Quad.easeOut":u.Out,"Cubic.easeOut":o.Out,"Quart.easeOut":d.Out,"Quint.easeOut":c.Out,"Sine.easeOut":f.Out,"Expo.easeOut":h.Out,"Circ.easeOut":r.Out,"Elastic.easeOut":a.Out,"Back.easeOut":n.Out,"Bounce.easeOut":s.Out,"Quad.easeInOut":u.InOut,"Cubic.easeInOut":o.InOut,"Quart.easeInOut":d.InOut,"Quint.easeInOut":c.InOut,"Sine.easeInOut":f.InOut,"Expo.easeInOut":h.InOut,"Circ.easeInOut":r.InOut,"Elastic.easeInOut":a.InOut,"Back.easeInOut":n.InOut,"Bounce.easeInOut":s.InOut}},1639(t){t.exports=function(t,e){return void 0===e&&(e=1.70158),t*t*((e+1)*t-e)}},50099(t){t.exports=function(t,e){void 0===e&&(e=1.70158);var i=1.525*e;return(t*=2)<1?t*t*((i+1)*t-i)*.5:.5*((t-=2)*t*((i+1)*t+i)+2)}},41286(t){t.exports=function(t,e){return void 0===e&&(e=1.70158),--t*t*((e+1)*t+e)+1}},54178(t,e,i){t.exports={In:i(1639),Out:i(41286),InOut:i(50099)}},59590(t){t.exports=function(t){return(t=1-t)<1/2.75?1-7.5625*t*t:t<2/2.75?1-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}},41788(t){t.exports=function(t){var e=!1;return(t<.5?(t=1-2*t,e=!0):t=2*t-1,t=t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e)?(1-t)*.5:.5*t+.5}},69905(t){t.exports=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}},41521(t,e,i){t.exports={In:i(59590),Out:i(69905),InOut:i(41788)}},91861(t){t.exports=function(t){return 1-Math.sqrt(1-t*t)}},4177(t){t.exports=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},57512(t){t.exports=function(t){return Math.sqrt(1- --t*t)}},79980(t,e,i){t.exports={In:i(91861),Out:i(57512),InOut:i(4177)}},51150(t){t.exports=function(t){return t*t*t}},82820(t){t.exports=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},35033(t){t.exports=function(t){return--t*t*t+1}},85433(t,e,i){t.exports={In:i(51150),Out:i(35033),InOut:i(82820)}}
1,69965(t){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),-(e*Math.pow(2,10*(t-=1))*Math.sin(2*Math.PI*(t-n)/i))}},50665(t){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return(e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),(t*=2)<1)?-.5*(e*Math.pow(2,10*(t-=1))*Math.sin(2*Math.PI*(t-n)/i)):e*Math.pow(2,-10*(t-=1))*Math.sin(2*Math.PI*(t-n)/i)*.5+1}},7744(t){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*t)*Math.sin(2*Math.PI*(t-n)/i)+1}},99140(t,e,i){t.exports={In:i(69965),Out:i(7744),InOut:i(50665)}},24590(t){t.exports=function(t){return Math.pow(2,10*(t-1))-.001}},87844(t){t.exports=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))}},89433(t){t.exports=function(t){return 1-Math.pow(2,-10*t)}},48857(t,e,i){t.exports={In:i(24590),Out:i(89433),InOut:i(87844)}},48820(t,e,i){t.exports={Back:i(54178),Bounce:i(41521),Circular:i(79980),Cubic:i(85433),Elastic:i(99140),Expo:i(48857),Linear:i(81596),Quadratic:i(59133),Quartic:i(98516),Quintic:i(35248),Sine:i(82500),Stepped:i(49752)}},7147(t){t.exports=function(t){return t}},81596(t,e,i){t.exports=i(7147)},34826(t){t.exports=function(t){return t*t}},20544(t){t.exports=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},92029(t){t.exports=function(t){return t*(2-t)}},59133(t,e,i){t.exports={In:i(34826),Out:i(92029),InOut:i(20544)}},64413(t){t.exports=function(t){return t*t*t*t}},78137(t){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},45840(t){t.exports=function(t){return 1- --t*t*t*t}},98516(t,e,i){t.exports={In:i(64413),Out:i(45840),InOut:i(78137)}},87745(t){t.exports=function(t){return t*t*t*t*t}},16509(t){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},17868(t){t.exports=function(t){return--t*t*t*t*t+1}},35248(t,e,i){t.exports={In:i(87745),Out:i(17868),InOut:i(16509)}},80461(t){t.exports=function(t){return 0===t?0:1===t?1:1-Math.cos(t*Math.PI/2)}},34025(t){t.exports=function(t){return 0===t?0:1===t?1:.5*(1-Math.cos(Math.PI*t))}},52768(t){t.exports=function(t){return 0===t?0:1===t?1:Math.sin(t*Math.PI/2)}},82500(t,e,i){t.exports={In:i(80461),Out:i(52768),InOut:i(34025)}},72251(t){t.exports=function(t,e){return(void 0===e&&(e=1),t<=0)?0:t>=1?1:1/e*((e*t|0)+1)}},49752(t,e,i){t.exports=i(72251)},75698(t){t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.ceil(t-e)}},43855(t){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),Math.abs(t-e)<i}},25777(t){t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.floor(t+e)}},5470(t){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t>e-i}},94977(t){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t<e+i}},48379(t,e,i){t.exports={Ceil:i(75698),Equal:i(43855),Floor:i(25777),GreaterThan:i(5470),LessThan:i(94977)}},75508(t,e,i){var n=i(36383);t.exports=i(79291)(!1,{Angle:i(25588),Distance:i(50994),Easing:i(48820),Fuzzy:i(48379),Interpolation:i(38289),Pow2:i(49001),Snap:i(73697),RandomDataGenerator:i(28453),Average:i(53307),Bernstein:i(85710),Between:i(30976),CatmullRom:i(87842),CeilTo:i(26302),Clamp:i(45319),DegToRad:i(39506),Difference:i(61241),Euler:i(38857),Factorial:i(6411),FloatBetween:i(99472),FloorTo:i(77623),FromPercent:i(62945),GetCentroid:i(2672),GetSpeed:i(38265),GetVec2Bounds:i(55133),Hash:i(72958),HashCell:i(84854),HashSimplex:i(84366),IsEven:i(78702),IsEvenStrict:i(94883),Linear:i(28915),LinearXY:i(94908),MaxAdd:i(86883),Median:i(50040),MinSub:i(37204),Percent:i(65201),RadToDeg:i(43396),RandomXY:i(74362),RandomXYZ:i(60706),RandomXYZW:i(67421),Rotate:i(36305),RotateAround:i(11520),RotateAroundDistance:i(1163),RotateTo:i(70336),RoundAwayFromZero:i(2284),RoundTo:i(41013),SmootherStep:i(54261),SmoothStep:i(7602),ToXY:i(44408),TransformXY:i(85955),Within:i(60417),Wrap:i(15994),Vector2:i(26099),Vector3:i(25836),Vector4:i(61369),Matrix3:i(94434),Matrix4:i(37867),Quaternion:i(15746),RotateVec3:i(72678)},n)},89318(t,e,i){var n=i(85710);t.exports=function(t,e){for(var i=0,s=t.length-1,r=0;r<=s;r++)i+=Math.pow(1-e,s-r)*Math.pow(e,r)*t[r]*n(s,r);return i}}
1,77259(t,e,i){var n=i(87842);t.exports=function(t,e){var i=t.length-1,s=i*e,r=Math.floor(s);return t[0]===t[i]?(e<0&&(r=Math.floor(s=i*(1+e))),n(s-r,t[(r-1+i)%i],t[r],t[(r+1)%i],t[(r+2)%i])):e<0?t[0]-(n(-s,t[0],t[0],t[1],t[1])-t[0]):e>1?t[i]-(n(s-i,t[i],t[i],t[i-1],t[i-1])-t[i]):n(s-r,t[r?r-1:0],t[r],t[i<r+1?i:r+1],t[i<r+2?i:r+2])}},36316(t){t.exports=function(t,e,i,n,s){var r,o;return(r=1-t)*r*r*e+3*(o=1-t)*o*t*i+3*(1-t)*t*t*n+t*t*t*s}},28392(t,e,i){var n=i(28915);t.exports=function(t,e){var i=t.length-1,s=i*e,r=Math.floor(s);return e<0?n(t[0],t[1],s):e>1?n(t[i],t[i-1],i-s):n(t[r],t[r+1>i?i:r+1],s-r)}},32112(t){t.exports=function(t,e,i,n){var s;return(s=1-t)*s*e+2*(1-t)*t*i+t*t*n}},47235(t,e,i){var n=i(7602);t.exports=function(t,e,i){return e+(i-e)*n(t,0,1)}},50178(t,e,i){var n=i(54261);t.exports=function(t,e,i){return e+(i-e)*n(t,0,1)}},38289(t,e,i){t.exports={Bezier:i(89318),CatmullRom:i(77259),CubicBezier:i(36316),Linear:i(28392),QuadraticBezier:i(32112),SmoothStep:i(47235),SmootherStep:i(50178)}},98439(t){t.exports=function(t){return 1<<Math.ceil(Math.log(t)/.6931471805599453)}},50030(t){t.exports=function(t,e){return t>0&&(t&t-1)==0&&e>0&&(e&e-1)==0}},81230(t){t.exports=function(t){return t>0&&(t&t-1)==0}},49001(t,e,i){t.exports={GetNext:i(98439),IsSize:i(50030),IsValue:i(81230)}},28453(t,e,i){t.exports=new(i(83419))({initialize:function(t){void 0===t&&(t=[(Date.now()*Math.random()).toString()]),this.c=1,this.s0=0,this.s1=0,this.s2=0,this.n=0,this.signs=[-1,1],t&&this.init(t)},rnd:function(){var t=2091639*this.s0+23283064365386963e-26*this.c;return this.c=0|t,this.s0=this.s1,this.s1=this.s2,this.s2=t-this.c,this.s2},hash:function(t){var e,i=this.n;t=t.toString();for(var n=0;n<t.length;n++)i+=t.charCodeAt(n),i=(e=.02519603282416938*i)>>>0,e-=i,e*=i,i=e>>>0,e-=i,i+=0x100000000*e;return this.n=i,(i>>>0)*23283064365386963e-26},init:function(t){"string"==typeof t?this.state(t):this.sow(t)},sow:function(t){if(this.n=0xefc8249d,this.s0=this.hash(" "),this.s1=this.hash(" "),this.s2=this.hash(" "),this.c=1,t)for(var e=0;e<t.length&&null!=t[e];e++){var i=t[e];this.s0-=this.hash(i),this.s0+=~~(this.s0<0),this.s1-=this.hash(i),this.s1+=~~(this.s1<0),this.s2-=this.hash(i),this.s2+=~~(this.s2<0)}},integer:function(){return 0x100000000*this.rnd()},frac:function(){return this.rnd()+(2097152*this.rnd()|0)*11102230246251565e-32},real:function(){return this.integer()+this.frac()},integerInRange:function(t,e){return Math.floor(this.realInRange(0,e-t+1)+t)},between:function(t,e){return Math.floor(this.realInRange(0,e-t+1)+t)},realInRange:function(t,e){return this.frac()*(e-t)+t},normal:function(){return 1-2*this.frac()},uuid:function(){var t="",e="";for(e=t="";t++<36;e+=~t%5|3*t&4?(15^t?8^this.frac()*(20^t?16:4):4).toString(16):"-");return e},pick:function(t){return t[this.integerInRange(0,t.length-1)]},sign:function(){return this.pick(this.signs)},weightedPick:function(t){return t[~~(Math.pow(this.frac(),2)*(t.length-.5)+.5)]},timestamp:function(t,e){return this.realInRange(t||9466848e5,e||1577862e6)},angle:function(){return this.integerInRange(-180,180)},rotation:function(){return this.realInRange(-3.1415926,3.1415926)},state:function(t){return"string"==typeof t&&t.match(/^!rnd/)&&(t=t.split(","),this.c=parseFloat(t[1]),this.s0=parseFloat(t[2]),this.s1=parseFloat(t[3]),this.s2=parseFloat(t[4])),["!rnd",this.c,this.s0,this.s1,this.s2].join(",")},shuffle:function(t){for(var e=t.length-1,i=e;i>0;i--){var n=Math.floor(this.frac()*(i+1)),s=t[n];t[n]=t[i],t[i]=s}return t}})},63448(t){t.exports=function(t,e,i,n){return(void 0===i&&(i=0),0===e)?t:(t-=i,t=e*Math.ceil(t/e),n?(i+t)/e:i+t)}},56583(t){t.exports=function(t,e,i,n){return(void 0===i&&(i=0),0===e)?t:(t-=i,t=e*Math.floor(t/e),n?(i+t)/e:i+t)}},77720(t){t.exports=function(t,e,i,n){return(void 0===i&&(i=0),0===e)?t:(t-=i,t=e*Math.round(t/e),n?(i+t)/e:i+t)}},73697(t,e,i){t.exports={Ceil:i(63448),Floor:i(56583),To:i(77720)}},71289(t,e,i){var n=i(83419),s=i(92209),r=i(88571);t.exports=new n({Extends:r,Mixins:[s.Acceleration,s.Angular,s.Bounce,s.Collision,s.Debug,s.Drag,s.Enable,s.Friction,s.Gravity,s.Immovable,s.Mass,s.Pushable,s.Size,s.Velocity],initialize:function(t,e,
vendor: 43,617 bytes, line 1
1i,n,s){r.call(this,t,e,i,n,s),this.body=null}})},86689(t,e,i){var n=i(83419),s=i(39506),r=i(20339),o=i(89774),a=i(66022),h=i(95540),l=i(46975),u=i(72441),d=i(47956),c=i(37277),f=i(44594),p=i(26099),g=i(82248),m=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.config=this.getConfig(),this.world,this.add,this._category=1,t.sys.events.once(f.BOOT,this.boot,this),t.sys.events.on(f.START,this.start,this)},boot:function(){this.world=new g(this.scene,this.config),this.add=new a(this.world),this.systems.events.once(f.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new g(this.scene,this.config),this.add=new a(this.world));var t=this.systems.events;h(this.config,"customUpdate",!1)||t.on(f.UPDATE,this.world.update,this.world),t.on(f.POST_UPDATE,this.world.postUpdate,this.world),t.once(f.SHUTDOWN,this.shutdown,this)},enableUpdate:function(){this.systems.events.on(f.UPDATE,this.world.update,this.world)},disableUpdate:function(){this.systems.events.off(f.UPDATE,this.world.update,this.world)},getConfig:function(){var t=this.systems.game.config.physics;return l(h(this.systems.settings.physics,"arcade",{}),h(t,"arcade",{}))},nextCategory:function(){return this._category=this._category<<1,this._category},overlap:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.world.collideObjects(t,e,i,n,s,!0)},collide:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.world.collideObjects(t,e,i,n,s,!1)},collideTiles:function(t,e,i,n,s){return this.world.collideTiles(t,e,i,n,s)},overlapTiles:function(t,e,i,n,s){return this.world.overlapTiles(t,e,i,n,s)},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},accelerateTo:function(t,e,i,n,s,r){void 0===n&&(n=60);var o=Math.atan2(i-t.y,e-t.x);return t.body.acceleration.setToPolar(o,n),void 0!==s&&void 0!==r&&t.body.maxVelocity.set(s,r),o},accelerateToObject:function(t,e,i,n,s){return this.accelerateTo(t,e.x,e.y,i,n,s)},closest:function(t,e){e||(e=Array.from(this.world.bodies));for(var i=Number.MAX_VALUE,n=null,s=t.x,r=t.y,a=e.length,h=0;h<a;h++){var l=e[h],u=l.body||l;if(t!==l&&t!==u&&t!==u.gameObject&&t!==u.center){var d=o(s,r,u.center.x,u.center.y);d<i&&(n=l,i=d)}}return n},furthest:function(t,e){e||(e=Array.from(this.world.bodies));for(var i=-1,n=null,s=t.x,r=t.y,a=e.length,h=0;h<a;h++){var l=e[h],u=l.body||l;if(t!==l&&t!==u&&t!==u.gameObject&&t!==u.center){var d=o(s,r,u.center.x,u.center.y);d>i&&(n=l,i=d)}}return n},moveTo:function(t,e,i,n,s){void 0===n&&(n=60),void 0===s&&(s=0);var o=Math.atan2(i-t.y,e-t.x);return s>0&&(n=r(t.x,t.y,e,i)/(s/1e3)),t.body.velocity.setToPolar(o,n),o},moveToObject:function(t,e,i,n){return this.moveTo(t,e.x,e.y,i,n)},velocityFromAngle:function(t,e,i){return void 0===e&&(e=60),void 0===i&&(i=new p),i.setToPolar(s(t),e)},velocityFromRotation:function(t,e,i){return void 0===e&&(e=60),void 0===i&&(i=new p),i.setToPolar(t,e)},overlapRect:function(t,e,i,n,s,r){return d(this.world,t,e,i,n,s,r)},overlapCirc:function(t,e,i,n,s){return u(this.world,t,e,i,n,s)},shutdown:function(){if(this.world){var t=this.systems.events;t.off(f.UPDATE,this.world.update,this.world),t.off(f.POST_UPDATE,this.world.postUpdate,this.world),t.off(f.SHUTDOWN,this.shutdown,this),this.add.destroy(),this.world.destroy(),this.add=null,this.world=null,this._category=1}},destroy:function(){this.shutdown(),this.scene.sys.events.off(f.START,this.start,this),this.scene=null,this.systems=null}});c.register("ArcadePhysics",m,"arcadePhysics"),t.exports=m},13759(t,e,i){var n=i(83419),s=i(92209),r=i(68287);t.exports=new n({Extends:r,Mixins:[s.Acceleration,s.Angular,s.Bounce,s.Collision,s.Debug,s.Drag,s.Enable,s.Friction,s.Gravity,s.Immovable,s.Mass,s.Pushable,s.Size,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t,e,i,n,s),this.body=null}})},37742(t,e,i){var n=i(83419),s=i(78389),r=i(37747),o=i(63012),a=i(43396),h=i(87841),l=i(37303),u=i(95829),d=i(26099);t.exports=new n({Mixins:[s],initialize:function(t,e){var i=64,n=64,s=void 0!==e;s&&e.displayWidth&&(i=e.displayWidth,n=e.displayHeight),s||(e={x:0,y:0,angle:0,rotation:0,scaleX:1,scaleY:1,displayOriginX:0,displayOriginY:0}),this.world=t,this.gameObject=s?e:void 0,this.isBody=!0,this.transform={x:e.x,y:e.y,rotation:e.angle,scaleX:e.scaleX,scaleY:e.scaleY,displayOriginX:e.displayOriginX,displayOriginY:e.displayOriginY},this.debugShowBody=t.defaults.debugShowBody,this.debugShowVelocity=t.defaults.debugShowVelocity,this.debugBodyColor=t.defaults.bodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new d,this.position=new d(e.x-e.scaleX*e.displayOriginX,e.y-e.scaleY*e.displayOriginY),this.prev=this.position.clone(),this.prevFrame=this.position.clone(),this.allowRotation=!0,this.rotation=e.angle,this.preRotation=e.angle,this.width=i,this.height=n,this.sourceWidth=i,this.sourceHeight=n,e.frame&&(this.sourceWidth=e.frame.realWidth,this.sourceHeight=e.frame.realHeight),this.halfWidth=Math.abs(i/2),this.halfHeight=Math.abs(n/2),this.center=new d(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=new d,this.newVelocity=new d,this.deltaMax=new d,this.acceleration=new d,this.allowDrag=!0,this.drag=new d,this.allowGravity=!0,this.gravity=new d,this.bounce=new d,this.worldBounce=null,this.customBoundsRectangle=t.bounds,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.maxVelocity=new d(1e4,1e4),this.maxSpeed=-1,this.friction=new d(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=r.FACING_NONE,this.immovable=!1,this.pushable=!0,this.slideFactor=new d(1,1),this.moves=!0,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision=u(!1),this.touching=u(!0),this.wasTouching=u(!0),this.blocked=u(!0),this.syncBounds=!1,this.physicsType=r.DYNAMIC_BODY,this.collisionCategory=1,this.collisionMask=1,this._sx=e.scaleX,this._sy=e.scaleY,this._dx=0,this._dy=0,this._tx=0,this._ty=0,this._bounds=new h,this.directControl=!1,this.autoFrame=this.position.clone()},updateBounds:function(){var t=this.gameObject,e=this.transform;if(t.parentContainer){var i=t.getWorldTransformMatrix(this.world._tempMatrix,this.world._tempMatrix2);e.x=i.tx,e.y=i.ty,e.rotation=a(i.rotation),e.scaleX=i.scaleX,e.scaleY=i.scaleY,e.displayOriginX=t.displayOriginX,e.displayOriginY=t.displayOriginY}else e.x=t.x,e.y=t.y,e.rotation=t.angle,e.scaleX=t.scaleX,e.scaleY=t.scaleY,e.displayOriginX=t.displayOriginX,e.displayOriginY=t.displayOriginY;var n=!1;if(this.syncBounds){var s=t.getBounds(this._bounds);this.width=s.width,this.height=s.height,n=!0}else{var r=Math.abs(e.scaleX),o=Math.abs(e.scaleY);(this._sx!==r||this._sy!==o)&&(this.width=this.sourceWidth*r,this.height=this.sourceHeight*o,this._sx=r,this._sy=o,n=!0)}n&&(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 t=this.transform;this.position.x=t.x+t.scaleX*(this.offset.x-t.displayOriginX),this.position.y=t.y+t.scaleY*(this.offset.y-t.displayOriginY),this.updateCenter()},resetFlags:function(t){void 0===t&&(t=!1);var e=this.wasTouching,i=this.touching,n=this.blocked;t?u(!0,e):(e.none=i.none,e.up=i.up,e.down=i.down,e.left=i.left,e.right=i.right),u(!0,i),u(!0,n),this.overlapR=0,this.overlapX=0,this.overlapY=0,this.embedded=!1},preUpdate:function(t,e){if(t&&this.resetFlags(),this.gameObject&&this.updateFromGameObject(),this.rotation=this.transform.rotation,this.preRotation=this.rotation,this.moves){var i=this.position;this.prev.x=i.x,this.prev.y=i.y,this.prevFrame.x=i.x,this.prevFrame.y=i.y}t&&this.update(e)},update:function(t){var e=this.prev,i=this.position,n=this.velocity;if(e.set(i.x,i.y),!this.moves){this._dx=i.x-e.x,this._dy=i.y-e.y;return}if(this.directControl){var s=this.autoFrame;n.set((i.x-s.x)/t,(i.y-s.y)/t),this.world.updateMotion(this,t),this._dx=i.x-s.x,this._dy=i.y-s.y}else this.world.updateMotion(this,t),this.newVelocity.set(n.x*t,n.y*t),i.add(this.newVelocity),this._dx=i.x-e.x,this._dy=i.y-e.y;var r=n.x,a=n.y;if(this.updateCenter(),this.angle=Math.atan2(a,r),this.speed=Math.sqrt(r*r+a*a),this.collideWorldBounds&&this.checkWorldBounds()&&this.onWorldBounds){var h=this.blocked;this.world.emit(o.WORLD_BOUNDS,this,h.up,h.down,h.left,h.right)}},postUpdate:function(){var t=this.position,e=t.x-this.prevFrame.x,i=t.y-this.prevFrame.y,n=this.gameObject;if(this.moves){var s=this.deltaMax.x,o=this.deltaMax.y;0!==s&&0!==e&&(e<0&&e<-s?e=-s:e>0&&e>s&&(e=s)),0!==o&&0!==i&&(i<0&&i<-o?i=-o:i>0&&i>o&&(i=o)),n&&(n.x+=e,n.y+=i)}e<0?this.facing=r.FACING_LEFT:e>0&&(this.facing=r.FACING_RIGHT),i<0?this.facing=r.FACING_UP:i>0&&(this.facing=r.FACING_DOWN),this.allowRotation&&n&&(n.angle+=this.deltaZ()),this._tx=e,this._ty=i,this.autoFrame.set(t.x,t.y)},setBoundsRectangle:function(t){return this.customBoundsRectangle=t||this.world.bounds,this},checkWorldBounds:function(){var t=this.position,e=this.velocity,i=this.blocked,n=this.customBoundsRectangle,s=this.world.checkCollision,r=this.worldBounce?-this.worldBounce.x:-this.bounce.x,o=this.worldBounce?-this.worldBounce.y:-this.bounce.y,a=!1;return t.x<n.x&&s.left?(t.x=n.x,e.x*=r,i.left=!0,a=!0):this.right>n.right&&s.right&&(t.x=n.right-this.width,e.x*=r,i.right=!0,a=!0),t.y<n.y&&s.up?(t.y=n.y,e.y*=o,i.up=!0,a=!0):this.bottom>n.bottom&&s.down&&(t.y=n.bottom-this.height,e.y*=o,i.down=!0,a=!0),a&&(this.blocked.none=!1,this.updateCenter()),a},setOffset:function(t,e){return void 0===e&&(e=t),this.offset.set(t,e),this},setGameObject:function(t,e){if(void 0===e&&(e=!0),!t||!t.hasTransformComponent)return this;var i=this.world;return this.gameObject&&this.gameObject.body&&(i.disable(this.gameObject),this.gameObject.body=null),t.body&&i.disable(t),this.gameObject=t,t.body=this,this.setSize(),this.enable=e,this},setSize:function(t,e,i){void 0===i&&(i=!0);var n=this.gameObject;if(n&&(!t&&n.frame&&(t=n.frame.realWidth),!e&&n.frame&&(e=n.frame.realHeight)),this.sourceWidth=t,this.sourceHeight=e,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(),i&&n&&n.getCenter){var s=(n.width-t)/2,r=(n.height-e)/2;this.offset.set(s,r)}return this.isCircle=!1,this.radius=0,this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.isCircle=!0,this.radius=t,this.sourceWidth=2*t,this.sourceHeight=2*t,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(e,i),this.updateCenter()):this.isCircle=!1,this},reset:function(t,e){this.stop();var i=this.gameObject;i&&(i.setPosition(t,e),this.rotation=i.angle,this.preRotation=i.angle);var n=this.position;i&&i.getTopLeft?i.getTopLeft(n):n.set(t,e),this.prev.copy(n),this.prevFrame.copy(n),this.autoFrame.copy(n),i&&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(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?this.radius>0&&t>=this.left&&t<=this.right&&e>=this.top&&e<=this.bottom&&(this.center.x-t)*(this.center.x-t)+(this.center.y-e)*(this.center.y-e)<=this.radius*this.radius:l(this,t,e)},onFloor:function(){return this.blocked.down},onCeiling:function(){return this.blocked.up},onWall:function(){return this.blocked.left||this.blocked.right},deltaAbsX:function(){return this._dx>0?this._dx:-this._dx},deltaAbsY:function(){return this._dy>0?this._dy:-this._dy},deltaX:function(){return this._dx},deltaY:function(){return this._dy},deltaXFinal:function(){return this._tx},deltaYFinal:function(){return this._ty},deltaZ:function(){return this.rotation-this.preRotation},destroy:function(){this.enable=!1,this.world&&this.world.pendingDestroy.add(this)},drawDebug:function(t){var e=this.position,i=e.x+this.halfWidth,n=e.y+this.halfHeight;this.debugShowBody&&(t.lineStyle(t.defaultStrokeWidth,this.debugBodyColor),this.isCircle?t.strokeCircle(i,n,this.width/2):(this.checkCollision.up&&t.lineBetween(e.x,e.y,e.x+this.width,e.y),this.checkCollision.right&&t.lineBetween(e.x+this.width,e.y,e.x+this.width,e.y+this.height),this.checkCollision.down&&t.lineBetween(e.x,e.y+this.height,e.x+this.width,e.y+this.height),this.checkCollision.left&&t.lineBetween(e.x,e.y,e.x,e.y+this.height))),this.debugShowVelocity&&(t.lineStyle(t.defaultStrokeWidth,this.world.defaults.velocityDebugColor,1),t.lineBetween(i,n,i+this.velocity.x/2,n+this.velocity.y/2))},willDrawDebug:function(){return this.debugShowBody||this.debugShowVelocity},setDirectControl:function(t){return void 0===t&&(t=!0),this.directControl=t,this},setCollideWorldBounds:function(t,e,i,n){void 0===t&&(t=!0),this.collideWorldBounds=t;var s=void 0!==e,r=void 0!==i;return(s||r)&&(this.worldBounce||(this.worldBounce=new d),s&&(this.worldBounce.x=e),r&&(this.worldBounce.y=i)),void 0!==n&&(this.onWorldBounds=n),this},setVelocity:function(t,e){return this.velocity.set(t,e),t=this.velocity.x,e=this.velocity.y,this.speed=Math.sqrt(t*t+e*e),this},setVelocityX:function(t){return this.setVelocity(t,this.velocity.y)},setVelocityY:function(t){return this.setVelocity(this.velocity.x,t)},setMaxVelocity:function(t,e){return this.maxVelocity.set(t,e),this},setMaxVelocityX:function(t){return this.maxVelocity.x=t,this},setMaxVelocityY:function(t){return this.maxVelocity.y=t,this},setMaxSpeed:function(t){return this.maxSpeed=t,this},setSlideFactor:function(t,e){return this.slideFactor.set(t,e),this},setBounce:function(t,e){return this.bounce.set(t,e),this},setBounceX:function(t){return this.bounce.x=t,this},setBounceY:function(t){return this.bounce.y=t,this},setAcceleration:function(t,e){return this.acceleration.set(t,e),this},setAccelerationX:function(t){return this.acceleration.x=t,this},setAccelerationY:function(t){return this.acceleration.y=t,this},setAllowDrag:function(t){return void 0===t&&(t=!0),this.allowDrag=t,this},setAllowGravity:function(t){return void 0===t&&(t=!0),this.allowGravity=t,this},setAllowRotation:function(t){return void 0===t&&(t=!0),this.allowRotation=t,this},setDrag:function(t,e){return this.drag.set(t,e),this},setDamping:function(t){return this.useDamping=t,this},setDragX:function(t){return this.drag.x=t,this},setDragY:function(t){return this.drag.y=t,this},setGravity:function(t,e){return this.gravity.set(t,e),this},setGravityX:function(t){return this.gravity.x=t,this},setGravityY:function(t){return this.gravity.y=t,this},setFriction:function(t,e){return this.friction.set(t,e),this},setFrictionX:function(t){return this.friction.x=t,this},setFrictionY:function(t){return this.friction.y=t,this},setAngularVelocity:function(t){return this.angularVelocity=t,this},setAngularAcceleration:function(t){return this.angularAcceleration=t,this},setAngularDrag:function(t){return this.angularDrag=t,this},setMass:function(t){return this.mass=t,this},setImmovable:function(t){return void 0===t&&(t=!0),this.immovable=t,this},setEnable:function(t){return void 0===t&&(t=!0),this.enable=t,this},processX:function(t,e,i,n){this.x+=t,this.updateCenter(),null!==e&&(this.velocity.x=e*this.slideFactor.x);var s=this.blocked;i&&(s.left=!0,s.none=!1),n&&(s.right=!0,s.none=!1)},processY:function(t,e,i,n){this.y+=t,this.updateCenter(),null!==e&&(this.velocity.y=e*this.slideFactor.y);var s=this.blocked;i&&(s.up=!0,s.none=!1),n&&(s.down=!0,s.none=!1)},x:{get:function(){return this.position.x},set:function(t){this.position.x=t}},y:{get:function(){return this.position.y},set:function(t){this.position.y=t}},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}}})},79342(t,e,i){t.exports=new(i(83419))({initialize:function(t,e,i,n,s,r,o){this.world=t,this.name="",this.active=!0,this.overlapOnly=e,this.object1=i,this.object2=n,this.collideCallback=s,this.processCallback=r,this.callbackContext=o},setName:function(t){return this.name=t,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}})},66022(t,e,i){var n=i(71289),s=i(13759),r=i(37742),o=i(83419),a=i(37747),h=i(60758),l=i(72624),u=i(71464);t.exports=new o({initialize:function(t){this.world=t,this.scene=t.scene,this.sys=t.scene.sys},collider:function(t,e,i,n,s){return this.world.addCollider(t,e,i,n,s)},overlap:function(t,e,i,n,s){return this.world.addOverlap(t,e,i,n,s)},existing:function(t,e){var i=e?a.STATIC_BODY:a.DYNAMIC_BODY;return this.world.enableBody(t,i),t},staticImage:function(t,e,i,s){var r=new n(this.scene,t,e,i,s);return this.sys.displayList.add(r),this.world.enableBody(r,a.STATIC_BODY),r},image:function(t,e,i,s){var r=new n(this.scene,t,e,i,s);return this.sys.displayList.add(r),this.world.enableBody(r,a.DYNAMIC_BODY),r},staticSprite:function(t,e,i,n){var r=new s(this.scene,t,e,i,n);return this.sys.displayList.add(r),this.sys.updateList.add(r),this.world.enableBody(r,a.STATIC_BODY),r},sprite:function(t,e,i,n){var r=new s(this.scene,t,e,i,n);return this.sys.displayList.add(r),this.sys.updateList.add(r),this.world.enableBody(r,a.DYNAMIC_BODY),r},staticGroup:function(t,e){return this.sys.updateList.add(new u(this.world,this.world.scene,t,e))},group:function(t,e){return this.sys.updateList.add(new h(this.world,this.world.scene,t,e))},body:function(t,e,i,n){var s=new r(this.world);return s.position.set(t,e),i&&n&&s.setSize(i,n),this.world.add(s,a.DYNAMIC_BODY),s},staticBody:function(t,e,i,n){var s=new l(this.world);return s.position.set(t,e),i&&n&&s.setSize(i,n),this.world.add(s,a.STATIC_BODY),s},destroy:function(){this.world=null,this.scene=null,this.sys=null}})},79599(t){t.exports=function(t){var e=0;if(Array.isArray(t))for(var i=0;i<t.length;i++)e|=t[i];else e=t;return e}},64897(t,e,i){var n=i(37747);t.exports=function(t,e,i,s){var r=0,o=t.deltaAbsX()+e.deltaAbsX()+s;return 0===t._dx&&0===e._dx?(t.embedded=!0,e.embedded=!0):t._dx>e._dx?(r=t.right-e.x)>o&&!i||!1===t.checkCollision.right||!1===e.checkCollision.left?r=0:(t.touching.none=!1,t.touching.right=!0,e.touching.none=!1,e.touching.left=!0,e.physicsType!==n.STATIC_BODY||i||(t.blocked.none=!1,t.blocked.right=!0),t.physicsType!==n.STATIC_BODY||i||(e.blocked.none=!1,e.blocked.left=!0)):t._dx<e._dx&&(-(r=t.x-e.width-e.x)>o&&!i||!1===t.checkCollision.left||!1===e.checkCollision.right?r=0:(t.touching.none=!1,t.touching.left=!0,e.touching.none=!1,e.touching.right=!0,e.physicsType!==n.STATIC_BODY||i||(t.blocked.none=!1,t.blocked.left=!0),t.physicsType!==n.STATIC_BODY||i||(e.blocked.none=!1,e.blocked.right=!0))),t.overlapX=r,e.overlapX=r,r}},45170(t,e,i){var n=i(37747);t.exports=function(t,e,i,s){var r=0,o=t.deltaAbsY()+e.deltaAbsY()+s;return 0===t._dy&&0===e._dy?(t.embedded=!0,e.embedded=!0):t._dy>e._dy?(r=t.bottom-e.y)>o&&!i||!1===t.checkCollision.down||!1===e.checkCollision.up?r=0:(t.touching.none=!1,t.touching.down=!0,e.touching.none=!1,e.touching.up=!0,e.physicsType!==n.STATIC_BODY||i||(t.blocked.none=!1,t.blocked.down=!0),t.physicsType!==n.STATIC_BODY||i||(e.blocked.none=!1,e.blocked.up=!0)):t._dy<e._dy&&(-(r=t.y-e.bottom)>o&&!i||!1===t.checkCollision.up||!1===e.checkCollision.down?r=0:(t.touching.none=!1,t.touching.up=!0,e.touching.none=!1,e.touching.down=!0,e.physicsType!==n.STATIC_BODY||i||(t.blocked.none=!1,t.blocked.up=!0),t.physicsType!==n.STATIC_BODY||i||(e.blocked.none=!1,e.blocked.down=!0))),t.overlapY=r,e.overlapY=r,r}},60758(t,e,i){var n=i(13759),s=i(83419),r=i(78389),o=i(37747),a=i(95540),h=i(26479),l=i(41212);t.exports=new s({Extends:h,Mixins:[r],initialize:function(t,e,i,s){if(i||s)if(l(i))s=i,i=null,s.internalCreateCallback=this.createCallbackHandler,s.internalRemoveCallback=this.removeCallbackHandler;else if(Array.isArray(i)&&l(i[0])){var r=this;i.forEach(function(t){t.internalCreateCallback=r.createCallbackHandler,t.internalRemoveCallback=r.removeCallbackHandler,t.classType=a(t,"classType",n)}),s=null}else s={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};else s={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};this.world=t,s&&(s.classType=a(s,"classType",n)),this.physicsType=o.DYNAMIC_BODY,this.collisionCategory=1,this.collisionMask=0x7fffffff,this.defaults={setCollideWorldBounds:a(s,"collideWorldBounds",!1),setBoundsRectangle:a(s,"customBoundsRectangle",null),setAccelerationX:a(s,"accelerationX",0),setAccelerationY:a(s,"accelerationY",0),setAllowDrag:a(s,"allowDrag",!0),setAllowGravity:a(s,"allowGravity",!0),setAllowRotation:a(s,"allowRotation",!0),setDamping:a(s,"useDamping",!1),setBounceX:a(s,"bounceX",0),setBounceY:a(s,"bounceY",0),setDragX:a(s,"dragX",0),setDragY:a(s,"dragY",0),setEnable:a(s,"enable",!0),setGravityX:a(s,"gravityX",0),setGravityY:a(s,"gravityY",0),setFrictionX:a(s,"frictionX",0),setFrictionY:a(s,"frictionY",0),setMaxSpeed:a(s,"maxSpeed",-1),setMaxVelocityX:a(s,"maxVelocityX",1e4),setMaxVelocityY:a(s,"maxVelocityY",1e4),setVelocityX:a(s,"velocityX",0),setVelocityY:a(s,"velocityY",0),setAngularVelocity:a(s,"angularVelocity",0),setAngularAcceleration:a(s,"angularAcceleration",0),setAngularDrag:a(s,"angularDrag",0),setMass:a(s,"mass",1),setImmovable:a(s,"immovable",!1)},h.call(this,e,i,s),this.type="PhysicsGroup"},createCallbackHandler:function(t){t.body&&t.body.physicsType===o.DYNAMIC_BODY||(t.body&&(t.body.destroy(),t.body=null),this.world.enableBody(t,o.DYNAMIC_BODY));var e=t.body;for(var i in this.defaults)e[i](this.defaults[i])},removeCallbackHandler:function(t){t.body&&this.world.disableBody(t)},setVelocity:function(t,e,i){void 0===i&&(i=0);for(var n=this.getChildren(),s=0;s<n.length;s++)n[s].body.velocity.set(t+s*i,e+s*i);return this},setVelocityX:function(t,e){void 0===e&&(e=0);for(var i=this.getChildren(),n=0;n<i.length;n++)i[n].body.velocity.x=t+n*e;return this},setVelocityY:function(t,e){void 0===e&&(e=0);for(var i=this.getChildren(),n=0;n<i.length;n++)i[n].body.velocity.y=t+n*e;return this}})},3017(t){var e,i,n,s,r,o,a,h,l,u,d,c,f,p,g,m,v,x=function(){return u&&g&&i.blocked.right?(e.processX(-v,a,!1,!0),1):l&&m&&i.blocked.left?(e.processX(v,a,!0),1):f&&m&&e.blocked.right?(i.processX(-v,h,!1,!0),2):c&&g&&e.blocked.left?(i.processX(v,h,!0),2):0},y=function(t){if(n&&s)v*=.5,0===t||3===t?(e.processX(v,r),i.processX(-v,o)):(e.processX(-v,r),i.processX(v,o));else if(n&&!s)0===t||3===t?e.processX(v,a,!0):e.processX(-v,a,!1,!0);else if(!n&&s)0===t||3===t?i.processX(-v,h,!1,!0):i.processX(v,h,!0);else{var g=.5*v;0===t?p?(e.processX(v,0,!0),i.processX(0,null,!1,!0)):f?(e.processX(g,0,!0),i.processX(-g,0,!1,!0)):(e.processX(g,i.velocity.x,!0),i.processX(-g,null,!1,!0)):1===t?d?(e.processX(0,null,!1,!0),i.processX(v,0,!0)):u?(e.processX(-g,0,!1,!0),i.processX(g,0,!0)):(e.processX(-g,null,!1,!0),i.processX(g,e.velocity.x,!0)):2===t?p?(e.processX(-v,0,!1,!0),i.processX(0,null,!0)):c?(e.processX(-g,0,!1,!0),i.processX(g,0,!0)):(e.processX(-g,i.velocity.x,!1,!0),i.processX(g,null,!0)):3===t&&(d?(e.processX(0,null,!0),i.processX(-v,0,!1,!0)):l?(e.processX(g,0,!0),i.processX(-g,0,!1,!0)):(e.processX(g,i.velocity.x,!0),i.processX(-g,null,!1,!0)))}return!0};t.exports={BlockCheck:x,Check:function(){var t=e.velocity.x,n=i.velocity.x,s=Math.sqrt(n*n*i.mass/e.mass)*(n>0?1:-1),a=Math.sqrt(t*t*e.mass/i.mass)*(t>0?1:-1),h=(s+a)*.5;return(s-=h,a-=h,r=h+s*e.bounce.x,o=h+a*i.bounce.x,l&&m)?y(0):c&&g?y(1):u&&g?y(2):!!f&&!!m&&y(3)},Set:function(t,r,o){e=t,i=r;var y=e.velocity.x,T=i.velocity.x;return n=e.pushable,l=e._dx<0,u=e._dx>0,d=0===e._dx,g=Math.abs(e.right-i.x)<=Math.abs(i.right-e.x),a=T-y*e.bounce.x,s=i.pushable,c=i._dx<0,f=i._dx>0,p=0===i._dx,m=!g,h=y-T*i.bounce.x,v=Math.abs(o),x()},Run:y,RunImmovableBody1:function(t){if(1===t?i.velocity.x=0:g?i.processX(v,h,!0):i.processX(-v,h,!1,!0),e.moves){var n=e.directControl?e.y-e.autoFrame.y:e.y-e.prev.y;i.y+=n*e.friction.y,i._dy=i.y-i.prev.y}},RunImmovableBody2:function(t){if(2===t?e.velocity.x=0:m?e.processX(v,a,!0):e.processX(-v,a,!1,!0),i.moves){var n=i.directControl?i.y-i.autoFrame.y:i.y-i.prev.y;e.y+=n*i.friction.y,e._dy=e.y-e.prev.y}}}},47962(t){var e,i,n,s,r,o,a,h,l,u,d,c,f,p,g,m,v,x=function(){return u&&g&&i.blocked.down?(e.processY(-v,a,!1,!0),1):l&&m&&i.blocked.up?(e.processY(v,a,!0),1):f&&m&&e.blocked.down?(i.processY(-v,h,!1,!0),2):c&&g&&e.blocked.up?(i.processY(v,h,!0),2):0},y=function(t){if(n&&s)v*=.5,0===t||3===t?(e.processY(v,r),i.processY(-v,o)):(e.processY(-v,r),i.processY(v,o));else if(n&&!s)0===t||3===t?e.processY(v,a,!0):e.processY(-v,a,!1,!0);else if(!n&&s)0===t||3===t?i.processY(-v,h,!1,!0):i.processY(v,h,!0);else{var g=.5*v;0===t?p?(e.processY(v,0,!0),i.processY(0,null,!1,!0)):f?(e.processY(g,0,!0),i.processY(-g,0,!1,!0)):(e.processY(g,i.velocity.y,!0),i.processY(-g,null,!1,!0)):1===t?d?(e.processY(0,null,!1,!0),i.processY(v,0,!0)):u?(e.processY(-g,0,!1,!0),i.processY(g,0,!0)):(e.processY(-g,null,!1,!0),i.processY(g,e.velocity.y,!0)):2===t?p?(e.processY(-v,0,!1,!0),i.processY(0,null,!0)):c?(e.processY(-g,0,!1,!0),i.processY(g,0,!0)):(e.processY(-g,i.velocity.y,!1,!0),i.processY(g,null,!0)):3===t&&(d?(e.processY(0,null,!0),i.processY(-v,0,!1,!0)):l?(e.processY(g,0,!0),i.processY(-g,0,!1,!0)):(e.processY(g,i.velocity.y,!0),i.processY(-g,null,!1,!0)))}return!0};t.exports={BlockCheck:x,Check:function(){var t=e.velocity.y,n=i.velocity.y,s=Math.sqrt(n*n*i.mass/e.mass)*(n>0?1:-1),a=Math.sqrt(t*t*e.mass/i.mass)*(t>0?1:-1),h=(s+a)*.5;return(s-=h,a-=h,r=h+s*e.bounce.y,o=h+a*i.bounce.y,l&&m)?y(0):c&&g?y(1):u&&g?y(2):!!f&&!!m&&y(3)},Set:function(t,r,o){e=t,i=r;var y=e.velocity.y,T=i.velocity.y;return n=e.pushable,l=e._dy<0,u=e._dy>0,d=0===e._dy,g=Math.abs(e.bottom-i.y)<=Math.abs(i.bottom-e.y),a=T-y*e.bounce.y,s=i.pushable,c=i._dy<0,f=i._dy>0,p=0===i._dy,m=!g,h=y-T*i.bounce.y,v=Math.abs(o),x()},Run:y,RunImmovableBody1:function(t){if(1===t?i.velocity.y=0:g?i.processY(v,h,!0):i.processY(-v,h,!1,!0),e.moves){var n=e.directControl?e.x-e.autoFrame.x:e.x-e.prev.x;i.x+=n*e.friction.x,i._dx=i.x-i.prev.x}},RunImmovableBody2:function(t){if(2===t?e.velocity.y=0:m?e.processY(v,a,!0):e.processY(-v,a,!1,!0),i.moves){var n=i.directControl?i.x-i.autoFrame.x:i.x-i.prev.x;e.x+=n*i.friction.x,e._dx=e.x-e.prev.x}}}},14087(t,e,i){var n=i(64897),s=i(3017);t.exports=function(t,e,i,r,o){void 0===o&&(o=n(t,e,i,r));var a=t.immovable,h=e.immovable;if(i||0===o||a&&h||t.customSeparateX||e.customSeparateX)return 0!==o||t.embedded&&e.embedded;var l=s.Set(t,e,o);return a||h?(a?s.RunImmovableBody1(l):h&&s.RunImmovableBody2(l),!0):l>0||s.Check()}},89936(t,e,i){var n=i(45170),s=i(47962);t.exports=function(t,e,i,r,o){void 0===o&&(o=n(t,e,i,r));var a=t.immovable,h=e.immovable;if(i||0===o||a&&h||t.customSeparateY||e.customSeparateY)return 0!==o||t.embedded&&e.embedded;var l=s.Set(t,e,o);return a||h?(a?s.RunImmovableBody1(l):h&&s.RunImmovableBody2(l),!0):l>0||s.Check()}},95829(t){t.exports=function(t,e){return void 0===e&&(e={}),e.none=t,e.up=!1,e.down=!1,e.left=!1,e.right=!1,t||(e.up=!0,e.down=!0,e.left=!0,e.right=!0),e}},72624(t,e,i){var n=i(87902),s=i(83419),r=i(78389),o=i(37747),a=i(37303),h=i(95829),l=i(26099);t.exports=new s({Mixins:[r],initialize:function(t,e){var i=64,n=64,s=void 0!==e;s&&e.displayWidth&&(i=e.displayWidth,n=e.displayHeight),s||(e={x:0,y:0,angle:0,rotation:0,scaleX:1,scaleY:1,displayOriginX:0,displayOriginY:0}),this.world=t,this.gameObject=s?e:void 0,this.isBody=!0,this.debugShowBody=t.defaults.debugShowStaticBody,this.debugBodyColor=t.defaults.staticBodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new l,this.position=new l(e.x-i*e.originX,e.y-n*e.originY),this.width=i,this.height=n,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center=new l(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=l.ZERO,this.allowGravity=!1,this.gravity=l.ZERO,this.bounce=l.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=h(!1),this.touching=h(!0),this.wasTouching=h(!0),this.blocked=h(!0),this.physicsType=o.STATIC_BODY,this.collisionCategory=1,this.collisionMask=1,this._dx=0,this._dy=0},setGameObject:function(t,e,i){if(void 0===e&&(e=!0),void 0===i&&(i=!0),!t||!t.hasTransformComponent)return this;var n=this.world;return this.gameObject&&this.gameObject.body&&(n.disable(this.gameObject),this.gameObject.body=null),t.body&&n.disable(t),this.gameObject=t,t.body=this,this.setSize(),e&&this.updateFromGameObject(),this.enable=i,this},updateFromGameObject:function(){this.world.staticTree.remove(this);var t=this.gameObject;return t.getTopLeft(this.position),this.width=t.displayWidth,this.height=t.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(t,e){return void 0===e&&(e=t),this.world.staticTree.remove(this),this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(t,e),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this),this},setSize:function(t,e,i){void 0===i&&(i=!0);var n=this.gameObject;if(n&&n.frame&&(t||(t=n.frame.realWidth),e||(e=n.frame.realHeight)),this.world.staticTree.remove(this),this.width=t,this.height=e,this.halfWidth=Math.floor(t/2),this.halfHeight=Math.floor(e/2),i&&n&&n.getCenter){var s=n.displayWidth/2,r=n.displayHeight/2;this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(s-this.halfWidth,r-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(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.world.staticTree.remove(this),this.isCircle=!0,this.radius=t,this.width=2*t,this.height=2*t,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),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(t,e){var i=this.gameObject;void 0===t&&(t=i.x),void 0===e&&(e=i.y),this.world.staticTree.remove(this),i.setPosition(t,e),i.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(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?n(this,t,e):a(this,t,e)},postUpdate:function(){},deltaAbsX:function(){return 0},deltaAbsY:function(){return 0},deltaX:function(){return 0},deltaY:function(){return 0},deltaZ:function(){return 0},destroy:function(){this.enable=!1,this.world.pendingDestroy.add(this)},drawDebug:function(t){var e=this.position,i=e.x+this.halfWidth,n=e.y+this.halfHeight;this.debugShowBody&&(t.lineStyle(t.defaultStrokeWidth,this.debugBodyColor,1),this.isCircle?t.strokeCircle(i,n,this.width/2):t.strokeRect(e.x,e.y,this.width,this.height))},willDrawDebug:function(){return this.debugShowBody},setMass:function(t){return t<=0&&(t=.1),this.mass=t,this},x:{get:function(){return this.position.x},set:function(t){this.world.staticTree.remove(this),this.position.x=t,this.world.staticTree.insert(this)}},y:{get:function(){return this.position.y},set:function(t){this.world.staticTree.remove(this),this.position.y=t,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}}})},71464(t,e,i){var n=i(13759),s=i(83419),r=i(78389),o=i(37747),a=i(95540),h=i(26479),l=i(41212);t.exports=new s({Extends:h,Mixins:[r],initialize:function(t,e,i,s){i||s?l(i)?(s=i,i=null,s.internalCreateCallback=this.createCallbackHandler,s.internalRemoveCallback=this.removeCallbackHandler,s.createMultipleCallback=this.createMultipleCallbackHandler,s.classType=a(s,"classType",n)):Array.isArray(i)&&l(i[0])?(s=i,i=null,s.forEach(function(t){t.internalCreateCallback=this.createCallbackHandler,t.internalRemoveCallback=this.removeCallbackHandler,t.createMultipleCallback=this.createMultipleCallbackHandler,t.classType=a(t,"classType",n)},this)):s={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler}:s={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler,createMultipleCallback:this.createMultipleCallbackHandler,classType:n},this.world=t,this.physicsType=o.STATIC_BODY,this.collisionCategory=1,this.collisionMask=1,h.call(this,e,i,s),this.type="StaticPhysicsGroup"},createCallbackHandler:function(t){t.body&&t.body.physicsType===o.STATIC_BODY||(t.body&&(t.body.destroy(),t.body=null),this.world.enableBody(t,o.STATIC_BODY))},removeCallbackHandler:function(t){t.body&&this.world.disableBody(t)},createMultipleCallbackHandler:function(){this.refresh()},refresh:function(){for(var t=Array.from(this.children),e=0;e<t.length;e++)t[e].body.reset();return this}})},82248(t,e,i){var n=i(55495),s=i(37742),r=i(45319),o=i(83419),a=i(79342),h=i(37747),l=i(20339),u=i(52816),d=i(50792),c=i(63012),f=i(43855),p=i(5470),g=i(94977),m=i(64897),v=i(45170),x=i(96523),y=i(35154),T=i(36383),w=i(25774),b=i(96602),S=i(87841),C=i(59542),E=i(40012),A=i(14087),_=i(89936),M=i(72624),R=i(2483),O=i(61340),P=i(26099),L=i(15994);t.exports=new o({Extends:d,initialize:function(t,e){d.call(this),this.scene=t,this.bodies=new Set,this.staticBodies=new Set,this.pendingDestroy=new Set,this.colliders=new w,this.gravity=new P(y(e,"gravity.x",0),y(e,"gravity.y",0)),this.bounds=new S(y(e,"x",0),y(e,"y",0),y(e,"width",t.sys.scale.width),y(e,"height",t.sys.scale.height)),this.checkCollision={up:y(e,"checkCollision.up",!0),down:y(e,"checkCollision.down",!0),left:y(e,"checkCollision.left",!0),right:y(e,"checkCollision.right",!0)},this.fps=y(e,"fps",60),this.fixedStep=y(e,"fixedStep",!0),this._elapsed=0,this._frameTime=1/this.fps,this._frameTimeMS=1e3*this._frameTime,this.stepsLastFrame=0,this.timeScale=y(e,"timeScale",1),this.OVERLAP_BIAS=y(e,"overlapBias",4),this.TILE_BIAS=y(e,"tileBias",16),this.forceX=y(e,"forceX",!1),this.isPaused=y(e,"isPaused",!1),this._total=0,this.drawDebug=y(e,"debug",!1),this.debugGraphic,this.defaults={debugShowBody:y(e,"debugShowBody",!0),debugShowStaticBody:y(e,"debugShowStaticBody",!0),debugShowVelocity:y(e,"debugShowVelocity",!0),bodyDebugColor:y(e,"debugBodyColor",0xff00ff),staticBodyDebugColor:y(e,"debugStaticBodyColor",255),velocityDebugColor:y(e,"debugVelocityColor",65280)},this.maxEntries=y(e,"maxEntries",16),this.useTree=y(e,"useTree",!0),this.tree=new C(this.maxEntries),this.staticTree=new C(this.maxEntries),this.treeMinMax={minX:0,minY:0,maxX:0,maxY:0},this._tempMatrix=new O,this._tempMatrix2=new O,this.tileFilterOptions={isColliding:!0,isNotEmpty:!0,hasInterestingFace:!0},this.drawDebug&&this.createDebugGraphic()},enable:function(t,e){void 0===e&&(e=h.DYNAMIC_BODY),Array.isArray(t)||(t=[t]);for(var i=0;i<t.length;i++){var n=t[i];if(n.isParent)for(var s=n.getChildren(),r=0;r<s.length;r++){var o=s[r];o.isParent?this.enable(o,e):this.enableBody(o,e)}else this.enableBody(n,e)}},enableBody:function(t,e){return void 0===e&&(e=h.DYNAMIC_BODY),t.hasTransformComponent&&(t.body||(e===h.DYNAMIC_BODY?t.body=new s(this,t):e===h.STATIC_BODY&&(t.body=new M(this,t))),this.add(t.body)),t},add:function(t){return t.physicsType===h.DYNAMIC_BODY?this.bodies.add(t):t.physicsType===h.STATIC_BODY&&(this.staticBodies.add(t),this.staticTree.insert(t)),t.enable=!0,t},disable:function(t){Array.isArray(t)||(t=[t]);for(var e=0;e<t.length;e++){var i=t[e];if(i.isParent)for(var n=i.getChildren(),s=0;s<n.length;s++){var r=n[s];r.isParent?this.disable(r):this.disableBody(r.body)}else this.disableBody(i.body)}},disableBody:function(t){this.remove(t),t.enable=!1},remove:function(t){t.physicsType===h.DYNAMIC_BODY?(this.tree.remove(t),this.bodies.delete(t)):t.physicsType===h.STATIC_BODY&&(this.staticBodies.delete(t),this.staticTree.remove(t))},createDebugGraphic:function(){var t=this.scene.sys.add.graphics({x:0,y:0});return t.setDepth(Number.MAX_VALUE),this.debugGraphic=t,this.drawDebug=!0,t},setBounds:function(t,e,i,n,s,r,o,a){return this.bounds.setTo(t,e,i,n),void 0!==s&&this.setBoundsCollision(s,r,o,a),this},setBoundsCollision:function(t,e,i,n){return void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===i&&(i=!0),void 0===n&&(n=!0),this.checkCollision.left=t,this.checkCollision.right=e,this.checkCollision.up=i,this.checkCollision.down=n,this},pause:function(){return this.isPaused=!0,this.emit(c.PAUSE),this},resume:function(){return this.isPaused=!1,this.emit(c.RESUME),this},addCollider:function(t,e,i,n,s){void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i);var r=new a(this,!1,t,e,i,n,s);return this.colliders.add(r),r},addOverlap:function(t,e,i,n,s){void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i);var r=new a(this,!0,t,e,i,n,s);return this.colliders.add(r),r},removeCollider:function(t){return this.colliders.remove(t),this},setFPS:function(t){return this.fps=t,this._frameTime=1/this.fps,this._frameTimeMS=1e3*this._frameTime,this},update:function(t,e){if(!this.isPaused&&0!==this.bodies.size){var i=this._frameTime,n=this._frameTimeMS*this.timeScale;this._elapsed+=e;var s=this.bodies,r=this._elapsed>=n;if(this.fixedStep||(i=.001*e,r=!0,this._elapsed=0),s.forEach(function(t){t.enable&&t.preUpdate(r,i)}),r){this._elapsed-=n,this.stepsLastFrame=1,this.useTree&&(this.tree.clear(),this.tree.load(Array.from(s)));for(var o=this.colliders.update(),a=0;a<o.length;a++){var h=o[a];h.active&&h.update()}this.emit(c.WORLD_STEP,i)}for(;this._elapsed>=n;)this._elapsed-=n,this.step(i)}},step:function(t){var e=this.bodies;e.forEach(function(e){e.enable&&e.update(t)}),this.useTree&&(this.tree.clear(),this.tree.load(Array.from(e)));for(var i=this.colliders.update(),n=0;n<i.length;n++){var s=i[n];s.active&&s.update()}this.emit(c.WORLD_STEP,t),this.stepsLastFrame++},singleStep:function(){this.update(0,this._frameTimeMS),this.postUpdate()},postUpdate:function(){var t=this.bodies,e=this.staticBodies;if(this.stepsLastFrame&&(this.stepsLastFrame=0,t.forEach(function(t){t.enable&&t.postUpdate()})),this.drawDebug){var i=this.debugGraphic;i.clear(),t.forEach(function(t){t.willDrawDebug()&&t.drawDebug(i)}),e.forEach(function(t){t.willDrawDebug()&&t.drawDebug(i)})}var n=this.pendingDestroy;if(n.size>0){var s=this.tree,r=this.staticTree;n.forEach(function(i){i.physicsType===h.DYNAMIC_BODY?(s.remove(i),t.delete(i)):i.physicsType===h.STATIC_BODY&&(r.remove(i),e.delete(i)),i.world=void 0,i.gameObject=void 0}),n.clear()}},updateMotion:function(t,e){t.allowRotation&&this.computeAngularVelocity(t,e),this.computeVelocity(t,e)},computeAngularVelocity:function(t,e){var i=t.angularVelocity,n=t.angularAcceleration,s=t.angularDrag,o=t.maxAngular;n?i+=n*e:t.allowDrag&&s&&(p(i-(s*=e),0,.1)?i-=s:g(i+s,0,.1)?i+=s:i=0);var a=(i=r(i,-o,o))-t.angularVelocity;t.angularVelocity+=a,t.rotation+=t.angularVelocity*e},computeVelocity:function(t,e){var i=t.velocity.x,n=t.acceleration.x,s=t.drag.x,o=t.maxVelocity.x,a=t.velocity.y,h=t.acceleration.y,l=t.drag.y,u=t.maxVelocity.y,d=t.speed,c=t.maxSpeed,m=t.allowDrag,v=t.useDamping;t.allowGravity&&(i+=(this.gravity.x+t.gravity.x)*e,a+=(this.gravity.y+t.gravity.y)*e),n?i+=n*e:m&&s&&(v?(i*=s=Math.pow(s,e),f(d=Math.sqrt(i*i+a*a),0,.001)&&(i=0)):p(i-(s*=e),0,.01)?i-=s:g(i+s,0,.01)?i+=s:i=0),h?a+=h*e:m&&l&&(v?(a*=l=Math.pow(l,e),f(d=Math.sqrt(i*i+a*a),0,.001)&&(a=0)):p(a-(l*=e),0,.01)?a-=l:g(a+l,0,.01)?a+=l:a=0),i=r(i,-o,o),a=r(a,-u,u),t.velocity.set(i,a),c>-1&&t.velocity.length()>c&&(t.velocity.normalize().scale(c),d=c),t.speed=d},separate:function(t,e,i,n,s){var r,o,a=!1,h=!0;if(!t.enable||!e.enable||t.checkCollision.none||e.checkCollision.none||!this.intersects(t,e)||(t.collisionMask&e.collisionCategory)==0||(e.collisionMask&t.collisionCategory)==0||i&&!1===i.call(n,t.gameObject||t,e.gameObject||e))return a;if(t.isCircle||e.isCircle){var l=this.separateCircle(t,e,s);l.result?(a=!0,h=!1):(r=l.x,o=l.y,h=!0)}if(h){var u=!1,d=!1,f=this.OVERLAP_BIAS;s?(u=A(t,e,s,f,r),d=_(t,e,s,f,o)):this.forceX||Math.abs(this.gravity.y+t.gravity.y)<Math.abs(this.gravity.x+t.gravity.x)?(u=A(t,e,s,f,r),this.intersects(t,e)&&(d=_(t,e,s,f,o))):(d=_(t,e,s,f,o),this.intersects(t,e)&&(u=A(t,e,s,f,r))),a=u||d}return a&&(s?(t.onOverlap||e.onOverlap)&&this.emit(c.OVERLAP,t.gameObject,e.gameObject,t,e):(t.onCollide||e.onCollide)&&this.emit(c.COLLIDE,t.gameObject,e.gameObject,t,e)),a},separateCircle:function(t,e,i){m(t,e,!1,0),v(t,e,!1,0);var s=t.isCircle,r=e.isCircle,o=t.center,a=e.center,h=t.immovable,d=e.immovable,c=t.velocity,f=e.velocity,p=0,g=!0;if(s!==r){g=!1;var x=o.x,y=o.y,w=t.halfWidth,b=e.position.x,S=e.position.y,C=e.right,E=e.bottom;r&&(x=a.x,y=a.y,w=e.halfWidth,b=t.position.x,S=t.position.y,C=t.right,E=t.bottom),y<S?x<b?p=l(x,y,b,S)-w:x>C&&(p=l(x,y,C,S)-w):y>E&&(x<b?p=l(x,y,b,E)-w:x>C&&(p=l(x,y,C,E)-w)),p*=-1}else p=t.halfWidth+e.halfWidth-u(o,a);t.overlapR=p,e.overlapR=p;var A=n(o,a),_=(p+T.EPSILON)*Math.cos(A),M=(p+T.EPSILON)*Math.sin(A),R={overlap:p,result:!1,x:_,y:M};if(i&&(!g||g&&0!==p))return R.result=!0,R;if(!g&&0===p||h&&d||t.customSeparateX||e.customSeparateX)return R.x=void 0,R.y=void 0,R;var O=!t.pushable&&!e.pushable;if(g){var P=Math.sqrt(Math.pow(o.x-a.x,2)+Math.pow(o.y-a.y,2)),L=(a.x-o.x)/P||0,D=(a.y-o.y)/P||0,F=2*(c.x*L+c.y*D-f.x*L-f.y*D)/(t.mass+e.mass);(h||d||!t.pushable||!e.pushable)&&(F*=2),!h&&t.pushable&&(c.x=c.x-F/t.mass*L,c.y=c.y-F/t.mass*D,c.multiply(t.bounce)),!d&&e.pushable&&(f.x=f.x+F/e.mass*L,f.y=f.y+F/e.mass*D,f.multiply(e.bounce)),h||d||(_*=.5,M*=.5),(!h||t.pushable||O)&&(t.x-=_,t.y-=M,t.updateCenter()),(!d||e.pushable||O)&&(e.x+=_,e.y+=M,e.updateCenter()),R.result=!0}else!h&&(t.pushable||O)&&(t.x-=_,t.y-=M,t.updateCenter()),(!d||e.pushable||O)&&(e.x+=_,e.y+=M,e.updateCenter()),R.x=void 0,R.y=void 0;return R},intersects:function(t,e){return t!==e&&(t.isCircle||e.isCircle?t.isCircle?e.isCircle?u(t.center,e.center)<=t.halfWidth+e.halfWidth:this.circleBodyIntersects(t,e):this.circleBodyIntersects(e,t):!(t.right<=e.left||t.bottom<=e.top||t.left>=e.right||t.top>=e.bottom))},circleBodyIntersects:function(t,e){var i=r(t.center.x,e.left,e.right),n=r(t.center.y,e.top,e.bottom);return(t.center.x-i)*(t.center.x-i)+(t.center.y-n)*(t.center.y-n)<=t.halfWidth*t.halfWidth}
1,overlap:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!0)},collide:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!1)},collideObjects:function(t,e,i,n,s,r){t.isParent&&(void 0===t.physicsType||void 0===e||t===e)&&(t=Array.from(t.children)),e&&e.isParent&&void 0===e.physicsType&&(e=Array.from(e.children));var o,a,h=Array.isArray(t),l=Array.isArray(e);if(this._total=0,h||l)if(!h&&l)for(o=0;o<e.length;o++)this.collideHandler(t,e[o],i,n,s,r);else if(h&&!l)if(e)for(o=0;o<t.length;o++)this.collideHandler(t[o],e,i,n,s,r);else for(o=0;o<t.length;o++){var u=t[o];for(a=o+1;a<t.length;a++)o!==a&&this.collideHandler(u,t[a],i,n,s,r)}else for(o=0;o<t.length;o++)for(a=0;a<e.length;a++)this.collideHandler(t[o],e[a],i,n,s,r);else this.collideHandler(t,e,i,n,s,r);return this._total>0},collideHandler:function(t,e,i,n,s,r){if(void 0===e&&t.isParent)return this.collideGroupVsGroup(t,t,i,n,s,r);if(!t||!e)return!1;if(t.body||t.isBody){if(e.body||e.isBody)return this.collideSpriteVsSprite(t,e,i,n,s,r);else if(e.isParent)return this.collideSpriteVsGroup(t,e,i,n,s,r);else if(e.isTilemap)return this.collideSpriteVsTilemapLayer(t,e,i,n,s,r)}else if(t.isParent){if(e.body||e.isBody)return this.collideSpriteVsGroup(e,t,i,n,s,r);else if(e.isParent)return this.collideGroupVsGroup(t,e,i,n,s,r);else if(e.isTilemap)return this.collideGroupVsTilemapLayer(t,e,i,n,s,r)}else if(t.isTilemap){if(e.body||e.isBody)return this.collideSpriteVsTilemapLayer(e,t,i,n,s,r);else if(e.isParent)return this.collideGroupVsTilemapLayer(e,t,i,n,s,r)}},canCollide:function(t,e){return t&&e&&(t.collisionMask&e.collisionCategory)!=0&&(e.collisionMask&t.collisionCategory)!=0},collideSpriteVsSprite:function(t,e,i,n,s,r){var o=t.isBody?t:t.body,a=e.isBody?e:e.body;return!!this.canCollide(o,a)&&(this.separate(o,a,n,s,r)&&(i&&i.call(s,t,e),this._total++),!0)},collideSpriteVsGroup:function(t,e,i,n,s,r){var o,a,l,u=t.isBody?t:t.body;if(0!==e.getLength()&&u&&u.enable&&!u.checkCollision.none&&this.canCollide(u,e))if(this.useTree||e.physicsType===h.STATIC_BODY){var d=this.treeMinMax;d.minX=u.left,d.minY=u.top,d.maxX=u.right,d.maxY=u.bottom;var c=e.physicsType===h.DYNAMIC_BODY?this.tree.search(d):this.staticTree.search(d);for(o=0,a=c.length;o<a;o++)u!==(l=c[o])&&l.enable&&!l.checkCollision.none&&e.contains(l.gameObject)&&this.separate(u,l,n,s,r)&&(i&&i.call(s,u.gameObject,l.gameObject),this._total++)}else{var f=e.getChildren(),p=f.indexOf(t);for(o=0,a=f.length;o<a;o++)(l=f[o].body)&&o!==p&&l.enable&&this.separate(u,l,n,s,r)&&(i&&i.call(s,u.gameObject,l.gameObject),this._total++)}},collideGroupVsTilemapLayer:function(t,e,i,n,s,r){if(!this.canCollide(t,e))return!1;var o=t.getChildren();if(0===o.length)return!1;for(var a=!1,h=0;h<o.length;h++)(o[h].body||o[h].isBody)&&this.collideSpriteVsTilemapLayer(o[h],e,i,n,s,r)&&(a=!0);return a},collideTiles:function(t,e,i,n,s){return 0!==e.length&&(!t.body||!!t.body.enable)&&(!t.isBody||!!t.enable)&&this.collideSpriteVsTilesHandler(t,e,i,n,s,!1,!1)},overlapTiles:function(t,e,i,n,s){return 0!==e.length&&(!t.body||!!t.body.enable)&&(!t.isBody||!!t.enable)&&this.collideSpriteVsTilesHandler(t,e,i,n,s,!0,!1)},collideSpriteVsTilemapLayer:function(t,e,i,n,s,r){var o=t.isBody?t:t.body;if(!o.enable||o.checkCollision.none||!this.canCollide(o,e))return!1;var a=e.layer,h=x(o.x-a.tileWidth*e.scaleX,o.y-a.tileHeight*e.scaleY,o.width+a.tileWidth*e.scaleX,o.height+a.tileHeight*e.scaleY,r?null:this.tileFilterOptions,e.scene.cameras.main,e.layer);return 0!==h.length&&this.collideSpriteVsTilesHandler(t,h,i,n,s,r,!0)},collideSpriteVsTilesHandler:function(t,e,i,n,s,r,o){for(var a,h,l=t.isBody?t:t.body,u={left:0,right:0,top:0,bottom:0},d=!1,f=0;f<e.length;f++){var p=(h=(a=e[f]).tilemapLayer).tileToWorldXY(a.x,a.y);u.left=p.x,u.top=p.y,u.right=u.left+a.width*h.scaleX,u.bottom=u.top+a.height*h.scaleY,R(u,l)&&(!n||n.call(s,t,a))&&b(a,t)&&(r||E(f,l,a,u,h,this.TILE_BIAS,o))&&(this._total++,d=!0,i&&i.call(s,t,a),r&&l.onOverlap?this.emit(c.TILE_OVERLAP,t,a,l):l.onCollide&&this.emit
1(c.TILE_COLLIDE,t,a,l))}return d},collideGroupVsGroup:function(t,e,i,n,s,r){if(0!==t.getLength()&&0!==e.getLength()&&this.canCollide(t,e))for(var o=t.getChildren(),a=0;a<o.length;a++)this.collideSpriteVsGroup(o[a],e,i,n,s,r)},wrap:function(t,e){t.body?this.wrapObject(t,e):t.getChildren?this.wrapArray(t.getChildren(),e):Array.isArray(t)?this.wrapArray(t,e):this.wrapObject(t,e)},wrapArray:function(t,e){for(var i=0;i<t.length;i++)this.wrapObject(t[i],e)},wrapObject:function(t,e){void 0===e&&(e=0),t.x=L(t.x,this.bounds.left-e,this.bounds.right+e),t.y=L(t.y,this.bounds.top-e,this.bounds.bottom+e)},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)}})},1093(t){t.exports={setAcceleration:function(t,e){return this.body.acceleration.set(t,e),this},setAccelerationX:function(t){return this.body.acceleration.x=t,this},setAccelerationY:function(t){return this.body.acceleration.y=t,this}}},59023(t){t.exports={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}}},62069(t){t.exports={setBounce:function(t,e){return this.body.bounce.set(t,e),this},setBounceX:function(t){return this.body.bounce.x=t,this},setBounceY:function(t){return this.body.bounce.y=t,this},setCollideWorldBounds:function(t,e,i,n){return this.body.setCollideWorldBounds(t,e,i,n),this}}},78389(t,e,i){var n=i(79599);t.exports={setCollisionCategory:function(t){return(this.body?this.body:this).collisionCategory=t,this},willCollideWith:function(t){return((this.body?this.body:this).collisionMask&t)!=0},addCollidesWith:function(t){var e=this.body?this.body:this;return e.collisionMask=e.collisionMask|t,this},removeCollidesWith:function(t){var e=this.body?this.body:this;return e.collisionMask=e.collisionMask&~t,this},setCollidesWith:function(t){return(this.body?this.body:this).collisionMask=n(t),this},resetCollisionCategory:function(){var t=this.body?this.body:this;return t.collisionCategory=1,t.collisionMask=0x7fffffff,this}}},87118(t){t.exports={setDebug:function(t,e,i){return this.debugShowBody=t,this.debugShowVelocity=e,this.debugBodyColor=i,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}}}},52819(t){t.exports={setDrag:function(t,e){return this.body.drag.set(t,e),this},setDragX:function(t){return this.body.drag.x=t,this},setDragY:function(t){return this.body.drag.y=t,this},setDamping:function(t){return this.body.useDamping=t,this}}},4074(t){t.exports={setDirectControl:function(t){return this.body.setDirectControl(t),this},enableBody:function(t,e,i,n,s){return t&&this.body.reset(e,i),n&&(this.body.gameObject.active=!0),s&&(this.body.gameObject.visible=!0),this.body.enable=!0,this},disableBody:function(t,e){return void 0===t&&(t=!1),void 0===e&&(e=!1),this.body.stop(),this.body.enable=!1,t&&(this.body.gameObject.active=!1),e&&(this.body.gameObject.visible=!1),this},refreshBody:function(){return this.body.updateFromGameObject(),this}}},40831(t){t.exports={setFriction:function(t,e){return this.body.friction.set(t,e),this},setFrictionX:function(t){return this.body.friction.x=t,this},setFrictionY:function(t){return this.body.friction.y=t,this}}},26775(t){t.exports={setGravity:function(t,e){return this.body.gravity.set(t,e),this},setGravityX:function(t){return this.body.gravity.x=t,this},setGravityY:function(t){return this.body.gravity.y=t,this}}},9437(t){t.exports={setImmovable:function(t){return void 0===t&&(t=!0),this.body.immovable=t,this}}},30621(t){t.exports={setMass:function(t){return this.body.mass=t,this}}},72441(t,e,i){var n=i(47956),s=i(96503),r=i(2044),o=i(81491);
vendor: 4,292 bytes, line 1
1t.exports=function(t,e,i,a,h,l){var u=n(t,e-a,i-a,2*a,2*a,h,l);if(0===u.length)return u;for(var d=new s(e,i,a),c=new s,f=[],p=0;p<u.length;p++){var g=u[p];g.isCircle?(c.setTo(g.center.x,g.center.y,g.halfWidth),r(d,c)&&f.push(g)):o(d,g)&&f.push(g)}return f}},47956(t){t.exports=function(t,e,i,n,s,r,o){void 0===r&&(r=!0),void 0===o&&(o=!1);var a=[],h=[],l=t.treeMinMax;if(l.minX=e,l.minY=i,l.maxX=e+n,l.maxY=i+s,o&&(h=t.staticTree.search(l)),r&&t.useTree)a=t.tree.search(l);else if(r)for(var u=Array.from(t.bodies),d={position:{x:e,y:i},left:e,top:i,right:e+n,bottom:i+s,isCircle:!1},c=t.intersects,f=0;f<u.length;f++){var p=u[f];c(p,d)&&a.push(p)}return h.concat(a)}},62121(t){t.exports={setPushable:function(t){return void 0===t&&(t=!0),this.body.pushable=t,this}}},29384(t){t.exports={setOffset:function(t,e){return this.body.setOffset(t,e),this},setSize:function(t,e,i){return this.body.setSize(t,e,i),this},setBodySize:function(t,e,i){return this.body.setSize(t,e,i),this},setCircle:function(t,e,i){return this.body.setCircle(t,e,i),this}}},15098(t){t.exports={setVelocity:function(t,e){return this.body.setVelocity(t,e),this},setVelocityX:function(t){return this.body.setVelocityX(t),this},setVelocityY:function(t){return this.body.setVelocityY(t),this},setMaxVelocity:function(t,e){return this.body.maxVelocity.set(t,e),this}}},92209(t,e,i){t.exports={Acceleration:i(1093),Angular:i(59023),Bounce:i(62069),Collision:i(78389),Debug:i(87118),Drag:i(52819),Enable:i(4074),Friction:i(40831),Gravity:i(26775),Immovable:i(9437),Mass:i(30621),OverlapCirc:i(72441),OverlapRect:i(47956),Pushable:i(62121),Size:i(29384),Velocity:i(15098)}},37747(t){t.exports={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}},20009(t){t.exports="collide"},36768(t){t.exports="overlap"},60473(t){t.exports="pause"},89954(t){t.exports="resume"},61804(t){t.exports="tilecollide"},7161(t){t.exports="tileoverlap"},34689(t){t.exports="worldbounds"},16006(t){t.exports="worldstep"},63012(t,e,i){t.exports={COLLIDE:i(20009),OVERLAP:i(36768),PAUSE:i(60473),RESUME:i(89954),TILE_COLLIDE:i(61804),TILE_OVERLAP:i(7161),WORLD_BOUNDS:i(34689),WORLD_STEP:i(16006)}},27064(t,e,i){var n=i(37747);t.exports=i(79291)(!1,{ArcadePhysics:i(86689),Body:i(37742),Collider:i(79342),Components:i(92209),Events:i(63012),Factory:i(66022),GetCollidesWith:i(79599),GetOverlapX:i(64897),GetOverlapY:i(45170),SeparateX:i(14087),SeparateY:i(89936),Group:i(60758),Image:i(71289),Sprite:i(13759),StaticBody:i(72624),StaticGroup:i(71464),Tilemap:i(55173),World:i(82248)},n)},96602(t){t.exports=function(t,e){return t.collisionCallback?!t.collisionCallback.call(t.collisionCallbackContext,e,t):!t.layer.callbacks[t.index]||!t.layer.callbacks[t.index].callback.call(t.layer.callbacks[t.index].callbackContext,e,t)}},36294(t){t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.left=!0):e>0&&(t.blocked.none=!1,t.blocked.right=!0),t.position.x-=e,t.updateCenter(),0===t.bounce.x?t.velocity.x=0:t.velocity.x=-t.velocity.x*t.bounce.x}},67013(t){t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.up=!0):e>0&&(t.blocked.none=!1,t.blocked.down=!0),t.position.y-=e,t.updateCenter(),0===t.bounce.y?t.velocity.y=0:t.velocity.y=-t.velocity.y*t.bounce.y}},40012(t,e,i){var n=i(21329),s=i(53442),r=i(2483);t.exports=function(t,e,i,o,a,h,l){var u=o.left,d=o.top,c=o.right,f=o.bottom,p=i.faceLeft||i.faceRight,g=i.faceTop||i.faceBottom;if(l||(p=!0,g=!0),!p&&!g)return!1;var m=0,v=0,x=0,y=1;if(e.deltaAbsX()>e.deltaAbsY()?x=-1:e.deltaAbsX()<e.deltaAbsY()&&(y=-1),0!==e.deltaX()&&0!==e.deltaY()&&p&&g&&(x=Math.min(Math.abs(e.position.x-c),Math.abs(e.right-u)),y=Math.min(Math.abs(e.position.y-f),Math.abs(e.bottom-d))),x<y){if(p&&0!==(m=n(e,i,u,c,h,l))&&!r(o,e))return!0;g&&(v=s(e,i,d,f,h,l))}else{if(g&&0!==(v=s(e,i,d,f,h,l))&&!r(o,e))return!0;p&&(m=n(e,i,u,c,h,l))}return 0!==m||0!==v}},21329(t,e,i){var n=i(36294);t.exports=function(t,e,i,s,r,o){var a=0,h=e.faceLeft,l=e.faceRight,u=e.collideLeft,d=e.collideRight;return o||(h=!0,l=!0,u=!0,d=!0),0>t.deltaX()&&d&&t.checkCollision.left?l&&t.x<s&&(a=t.x-s)<-r&&(a=0):t.deltaX()>0&&u&&t.checkCollision.right&&h&&t.right>i&&(a=t.right-i)>r&&(a=0),0!==a&&(t.customSeparateX?t.overlapX=a:n(t,a)),a}},53442(t,e,i){var n=i(67013);
vendor: 4,099 bytes, line 1
1t.exports=function(t,e,i,s,r,o){var a=0,h=e.faceTop,l=e.faceBottom,u=e.collideUp,d=e.collideDown;return o||(h=!0,l=!0,u=!0,d=!0),0>t.deltaY()&&d&&t.checkCollision.up?l&&t.y<s&&(a=t.y-s)<-r&&(a=0):t.deltaY()>0&&u&&t.checkCollision.down&&h&&t.bottom>i&&(a=t.bottom-i)>r&&(a=0),0!==a&&(t.customSeparateY?t.overlapY=a:n(t,a)),a}},2483(t){t.exports=function(t,e){return!(e.right<=t.left||e.bottom<=t.top||e.position.x>=t.right||e.position.y>=t.bottom)}},55173(t,e,i){t.exports={ProcessTileCallbacks:i(96602),ProcessTileSeparationX:i(36294),ProcessTileSeparationY:i(67013),SeparateTile:i(40012),TileCheckX:i(21329),TileCheckY:i(53442),TileIntersectsBody:i(2483)}},44563(t,e,i){t.exports={Arcade:i(27064),Matter:i(3875)}},68174(t,e,i){var n=i(83419),s=i(26099);t.exports=new n({initialize:function(){this.boundsCenter=new s,this.centerDiff=new s},parseBody:function(t){if(!(t=t.hasOwnProperty("body")?t.body:t).hasOwnProperty("bounds")||!t.hasOwnProperty("centerOfMass"))return!1;var e=this.boundsCenter,i=this.centerDiff,n=t.bounds.max.x-t.bounds.min.x,s=t.bounds.max.y-t.bounds.min.y,r=n*t.centerOfMass.x,o=s*t.centerOfMass.y;return e.set(n/2,s/2),i.set(r-e.x,o-e.y),!0},getTopLeft:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var n=this.boundsCenter,r=this.centerDiff;return new s(e+n.x+r.x,i+n.y+r.y)}return!1},getTopCenter:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var n=this.boundsCenter,r=this.centerDiff;return new s(e+r.x,i+n.y+r.y)}return!1},getTopRight:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var n=this.boundsCenter,r=this.centerDiff;return new s(e-(n.x-r.x),i+n.y+r.y)}return!1},getLeftCenter:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var n=this.boundsCenter,r=this.centerDiff;return new s(e+n.x+r.x,i+r.y)}return!1},getCenter:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var n=this.centerDiff;return new s(e+n.x,i+n.y)}return!1},getRightCenter:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var n=this.boundsCenter,r=this.centerDiff;return new s(e-(n.x-r.x),i+r.y)}return!1},getBottomLeft:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var n=this.boundsCenter,r=this.centerDiff;return new s(e+n.x+r.x,i-(n.y-r.y))}return!1},getBottomCenter:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var n=this.boundsCenter,r=this.centerDiff;return new s(e+r.x,i-(n.y-r.y))}return!1},getBottomRight:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var n=this.boundsCenter,r=this.centerDiff;return new s(e-(n.x-r.x),i-(n.y-r.y))}return!1}})},19933(t,e,i){var n=i(6790);n.Body=i(22562),n.Composite=i(69351),n.World=i(4372),n.Collision=i(52284),n.Detector=i(81388),n.Pairs=i(99561),n.Pair=i(4506),n.Query=i(73296),n.Resolver=i(66272),n.Constraint=i(48140),n.Common=i(53402),n.Engine=i(48413),n.Events=i(35810),n.Sleeping=i(53614),n.Plugin=i(73832),n.Bodies=i(66280),n.Composites=i(74116),n.Axes=i(66615),n.Bounds=i(15647),n.Svg=i(74058),n.Vector=i(31725),n.Vertices=i(41598),n.World.add=n.Composite.add,n.World.remove=n.Composite.remove,n.World.addComposite=n.Composite.addComposite,n.World.addBody=n.Composite.addBody,n.World.addConstraint=n.Composite.addConstraint,n.World.clear=n.Composite.clear,t.exports=n},28137(t,e,i){var n=i(66280),s=i(83419),r=i(74116),o=i(48140),a=i(74058),h=i(75803),l=i(23181),u=i(34803),d=i(73834),c=i(19496),f=i(85791),p=i(98713),g=i(41598);t.exports=new s({initialize:function(t){this.world=t,this.scene=t.scene,this.sys=t.scene.sys},rectangle:function(t,e,i,s,r){var o=n.rectangle(t,e,i,s,r);return this.world.add(o),o},trapezoid:function(t,e,i,s,r,o){var a=n.trapezoid(t,e,i,s,r,o);return this.world.add(a),a},circle:function(t,e,i,s,r){var o=n.circle(t,e,i,s,r);return this.world.add(o),o},polygon:function(t,e,i,s,r){var o=n.polygon(t,e,i,s,r);return this.world.add(o),o},fromVertices:function(t,e,i,s,r,o,a){"string"==typeof i&&(i=g.fromPath(i));var h=n.fromVertices(t,e,i,s,r,o,a);return this.world.add(h),h}
1,fromPhysicsEditor:function(t,e,i,n,s){void 0===s&&(s=!0);var r=c.parseBody(t,e,i,n);return s&&!this.world.has(r)&&this.world.add(r),r},fromSVG:function(t,e,i,s,r,o){void 0===s&&(s=1),void 0===r&&(r={}),void 0===o&&(o=!0);for(var h=i.getElementsByTagName("path"),l=[],u=0;u<h.length;u++){var d=a.pathToVertices(h[u],30);1!==s&&g.scale(d,s,s),l.push(d)}var c=n.fromVertices(t,e,l,r);return o&&this.world.add(c),c},fromJSON:function(t,e,i,n,s){void 0===n&&(n={}),void 0===s&&(s=!0);var r=f.parseBody(t,e,i,n);return r&&s&&this.world.add(r),r},imageStack:function(t,e,i,n,s,o,a,h,u){void 0===a&&(a=0),void 0===h&&(h=0),void 0===u&&(u={});var d=this.world,c=this.sys.displayList;u.addToWorld=!1;var f=r.stack(i,n,s,o,a,h,function(i,n){var s=new l(d,i,n,t,e,u);return c.add(s),s.body});return d.add(f),f},stack:function(t,e,i,n,s,o,a){var h=r.stack(t,e,i,n,s,o,a);return this.world.add(h),h},pyramid:function(t,e,i,n,s,o,a){var h=r.pyramid(t,e,i,n,s,o,a);return this.world.add(h),h},chain:function(t,e,i,n,s,o){return r.chain(t,e,i,n,s,o)},mesh:function(t,e,i,n,s){return r.mesh(t,e,i,n,s)},newtonsCradle:function(t,e,i,n,s){var o=r.newtonsCradle(t,e,i,n,s);return this.world.add(o),o},car:function(t,e,i,n,s){var o=r.car(t,e,i,n,s);return this.world.add(o),o},softBody:function(t,e,i,n,s,o,a,h,l,u){var d=r.softBody(t,e,i,n,s,o,a,h,l,u);return this.world.add(d),d},joint:function(t,e,i,n,s){return this.constraint(t,e,i,n,s)},spring:function(t,e,i,n,s){return this.constraint(t,e,i,n,s)},constraint:function(t,e,i,n,s){void 0===n&&(n=1),void 0===s&&(s={}),s.bodyA="body"===t.type?t:t.body,s.bodyB="body"===e.type?e:e.body,isNaN(i)||(s.length=i),s.stiffness=n;var r=o.create(s);return this.world.add(r),r},worldConstraint:function(t,e,i,n){void 0===i&&(i=1),void 0===n&&(n={}),n.bodyB="body"===t.type?t:t.body,isNaN(e)||(n.length=e),n.stiffness=i;var s=o.create(n);return this.world.add(s),s},mouseSpring:function(t){return this.pointerConstraint(t)},pointerConstraint:function(t){void 0===t&&(t={}),t.hasOwnProperty("render")||(t.render={visible:!1});var e=new p(this.scene,this.world,t);return this.world.add(e.constraint),e},image:function(t,e,i,n,s){var r=new l(this.world,t,e,i,n,s);return this.sys.displayList.add(r),r},tileBody:function(t,e){return new d(this.world,t,e)},sprite:function(t,e,i,n,s){var r=new u(this.world,t,e,i,n,s);return this.sys.displayList.add(r),this.sys.updateList.add(r),r},gameObject:function(t,e,i){return h(this.world,t,e,i)},destroy:function(){this.world=null,this.scene=null,this.sys=null}})},75803(t,e,i){var n=i(9503),s=i(95540),r=i(26099);t.exports=function(t,e,i,o){void 0===i&&(i={}),void 0===o&&(o=!0);var a=e.x,h=e.y;if(e.body={temp:!0,position:{x:a,y:h}},[n.Bounce,n.Collision,n.Force,n.Friction,n.Gravity,n.Mass,n.Sensor,n.SetBody,n.Sleep,n.Static,n.Transform,n.Velocity].forEach(function(t){for(var i in t){var n;(n=t[i]).get&&"function"==typeof n.get||n.set&&"function"==typeof n.set?Object.defineProperty(e,i,{get:t[i].get,set:t[i].set}):Object.defineProperty(e,i,{value:t[i]})}}),e.world=t,e._tempVec2=new r(a,h),i.hasOwnProperty("type")&&"body"===i.type)e.setExistingBody(i,o);else{var l=s(i,"shape",null);l||(l="rectangle"),i.addToWorld=o,e.setBody(l,i)}return e}},23181(t,e,i){var n=i(83419),s=i(9503),r=i(95643),o=i(95540),a=i(88571),h=i(26099);t.exports=new n({Extends:a,Mixins:[s.Bounce,s.Collision,s.Force,s.Friction,s.Gravity,s.Mass,s.Sensor,s.SetBody,s.Sleep,s.Static,s.Transform,s.Velocity],initialize:function(t,e,i,n,s,a){r.call(this,t.scene,"Image"),this._crop=this.resetCropObject(),this.setTexture(n,s),this.setSizeToFrame(),this.setOrigin(),this.initRenderNodes(this._defaultRenderNodesMap),this.world=t,this._tempVec2=new h(e,i);var l=o(a,"shape",null);l?this.setBody(l,a):this.setRectangle(this.width,this.height,a),this.setPosition(e,i)}})},42045(t,e,i){var n=i(60461),s=i(66615),r=i(66280),o=i(22562),a=i(68174),h=i(15647),l=i(83419),u=i(52284),d=i(53402),c=i(69351),f=i(74116),p=i(48140),g=i(81388),m=i(20339),v=i(28137),x=i(95540),y=i(35154),T=i(46975),w=i(4506),b=i(99561),S=i(37277),C=i(73296),E=i(66272),A=i(44594),_=i(74058),M=i(31725),R=i(41598),O=i(68243);d.setDecomp(i(55973));var P=new l({initialize:function(t){this.scene=t,this.systems=t.sys,this.config=this.getConfig(),this.world,this.add,this.bodyBounds,this.body=o,this.composite=c,this.collision=u,this.detector=g,this.pair=w,this.pairs=b,this.query=C,this.resolver=E,this.constraint=p,this.bodies=r,this.composites=f,this.axes=s,this.bounds=h,this.svg=_,this.vector=M,this.vertices=R,this.verts=R,this._tempVec2=M.create(),E._restingThresh=y(this.config,"restingThresh",4),E._restingThreshTangent=y(this.config,"restingThreshTangent",6),E._positionDampen=y(this.config,"positionDampen",.9),E._positionWarming=y(this.config,"positionWarming",.8),E._frictionNormalMultiplier=y(this.config,"frictionNormalMultiplier",5),t.sys.events.once(A.BOOT,this.boot,this),t.sys.events.on(A.START,this.start,this)},boot:function(){this.world=new O(this.scene,this.config),this.add=new v(this.world),this.bodyBounds=new a,this.systems.events.once(A.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new O(this.scene,this.config),this.add=new v(this.world));var t=this.systems.events;t.on(A.UPDATE,this.world.update,this.world),t.on(A.POST_UPDATE,this.world.postUpdate,this.world),t.once(A.SHUTDOWN,this.shutdown,this)},getConfig:function(){var t=this.systems.game.config.physics;return T(x(this.systems.settings.physics,"matter",{}),x(t,"matter",{}))},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(t,e){this.world.step(t,e)}
1,containsPoint:function(t,e,i){t=this.getMatterBodies(t);var n=M.create(e,i);return C.point(t,n).length>0},intersectPoint:function(t,e,i){i=this.getMatterBodies(i);var n=M.create(t,e),s=[];return C.point(i,n).forEach(function(t){-1===s.indexOf(t)&&s.push(t)}),s},intersectRect:function(t,e,i,n,s,r){void 0===s&&(s=!1),r=this.getMatterBodies(r);var o=[];return C.region(r,{min:{x:t,y:e},max:{x:t+i,y:e+n}},s).forEach(function(t){-1===o.indexOf(t)&&o.push(t)}),o},intersectRay:function(t,e,i,n,s,r){void 0===s&&(s=1),r=this.getMatterBodies(r);for(var o=[],a=C.ray(r,M.create(t,e),M.create(i,n),s),h=0;h<a.length;h++)o.push(a[h].body);return o},intersectBody:function(t,e){e=this.getMatterBodies(e);for(var i=[],n=C.collides(t,e),s=0;s<n.length;s++){var r=n[s];r.bodyA===t?i.push(r.bodyB):i.push(r.bodyA)}return i},overlap:function(t,e,i,n,s){void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),Array.isArray(t)||(t=[t]),t=this.getMatterBodies(t),e=this.getMatterBodies(e);for(var r=!1,o=0;o<t.length;o++)for(var a=t[o],h=C.collides(a,e),l=0;l<h.length;l++){var u=h[l],d=u.bodyA.id===a.id?u.bodyB:u.bodyA;if(!n||n.call(s,a,d,u)){if(r=!0,i)i.call(s,a,d,u);else if(!n)return!0}}return r},setCollisionCategory:function(t,e){return(t=this.getMatterBodies(t)).forEach(function(t){t.collisionFilter.category=e}),this},setCollisionGroup:function(t,e){return(t=this.getMatterBodies(t)).forEach(function(t){t.collisionFilter.group=e}),this},setCollidesWith:function(t,e){t=this.getMatterBodies(t);var i=0;if(Array.isArray(e))for(var n=0;n<e.length;n++)i|=e[n];else i=e;return t.forEach(function(t){t.collisionFilter.mask=i}),this},getMatterBodies:function(t){if(!t)return this.world.getAllBodies();Array.isArray(t)||(t=[t]);for(var e=[],i=0;i<t.length;i++){var n=t[i].hasOwnProperty("body")?t[i].body:t[i];e.push(n)}return e},setVelocity:function(t,e,i){t=this.getMatterBodies(t);var n=this._tempVec2;return n.x=e,n.y=i,t.forEach(function(t){o.setVelocity(t,n)}),this},setVelocityX:function(t,e){t=this.getMatterBodies(t);var i=this._tempVec2;return i.x=e,t.forEach(function(t){i.y=t.velocity.y,o.setVelocity(t,i)}),this},setVelocityY:function(t,e){t=this.getMatterBodies(t);var i=this._tempVec2;return i.y=e,t.forEach(function(t){i.x=t.velocity.x,o.setVelocity(t,i)}),this},setAngularVelocity:function(t,e){return(t=this.getMatterBodies(t)).forEach(function(t){o.setAngularVelocity(t,e)}),this},applyForce:function(t,e){t=this.getMatterBodies(t);var i=this._tempVec2;return t.forEach(function(t){i.x=t.position.x,i.y=t.position.y,o.applyForce(t,i,e)}),this},applyForceFromPosition:function(t,e,i,n){t=this.getMatterBodies(t);var s=this._tempVec2;return t.forEach(function(t){void 0===n&&(n=t.angle),s.x=i*Math.cos(n),s.y=i*Math.sin(n),o.applyForce(t,e,s)}),this},applyForceFromAngle:function(t,e,i){t=this.getMatterBodies(t);var n=this._tempVec2;return t.forEach(function(t){void 0===i&&(i=t.angle),n.x=e*Math.cos(i),n.y=e*Math.sin(i),o.applyForce(t,{x:t.position.x,y:t.position.y},n)}),this},getConstraintLength:function(t){var e=t.pointA.x,i=t.pointA.y,n=t.pointB.x,s=t.pointB.y;return t.bodyA&&(e+=t.bodyA.position.x,i+=t.bodyA.position.y),t.bodyB&&(n+=t.bodyB.position.x,s+=t.bodyB.position.y),m(e,i,n,s)}
vendor: 6,638 bytes, line 1
1,alignBody:function(t,e,i,s){var r;switch(t=t.hasOwnProperty("body")?t.body:t,s){case n.TOP_LEFT:case n.LEFT_TOP:r=this.bodyBounds.getTopLeft(t,e,i);break;case n.TOP_CENTER:r=this.bodyBounds.getTopCenter(t,e,i);break;case n.TOP_RIGHT:case n.RIGHT_TOP:r=this.bodyBounds.getTopRight(t,e,i);break;case n.LEFT_CENTER:r=this.bodyBounds.getLeftCenter(t,e,i);break;case n.CENTER:r=this.bodyBounds.getCenter(t,e,i);break;case n.RIGHT_CENTER:r=this.bodyBounds.getRightCenter(t,e,i);break;case n.LEFT_BOTTOM:case n.BOTTOM_LEFT:r=this.bodyBounds.getBottomLeft(t,e,i);break;case n.BOTTOM_CENTER:r=this.bodyBounds.getBottomCenter(t,e,i);break;case n.BOTTOM_RIGHT:case n.RIGHT_BOTTOM:r=this.bodyBounds.getBottomRight(t,e,i)}return r&&o.setPosition(t,r),this},shutdown:function(){var t=this.systems.events;this.world&&(t.off(A.UPDATE,this.world.update,this.world),t.off(A.POST_UPDATE,this.world.postUpdate,this.world)),t.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}});S.register("MatterPhysics",P,"matterPhysics"),t.exports=P},34803(t,e,i){var n=i(9674),s=i(83419),r=i(9503),o=i(95643),a=i(95540),h=i(68287),l=i(26099);t.exports=new s({Extends:h,Mixins:[r.Bounce,r.Collision,r.Force,r.Friction,r.Gravity,r.Mass,r.Sensor,r.SetBody,r.Sleep,r.Static,r.Transform,r.Velocity],initialize:function(t,e,i,s,r,h){o.call(this,t.scene,"Sprite"),this._crop=this.resetCropObject(),this.anims=new n(this),this.setTexture(s,r),this.setSizeToFrame(),this.setOrigin(),this.initRenderNodes(this._defaultRenderNodesMap),this.world=t,this._tempVec2=new l(e,i);var u=a(h,"shape",null);u?this.setBody(u,h):this.setRectangle(this.width,this.height,h),this.setPosition(e,i)}})},73834(t,e,i){var n=i(66280),s=i(22562),r=i(83419),o=i(9503),a=i(62644),h=i(50792),l=i(95540),u=i(97022),d=i(41598);t.exports=new r({Extends:h,Mixins:[o.Bounce,o.Collision,o.Friction,o.Gravity,o.Mass,o.Sensor,o.Sleep,o.Static],initialize:function(t,e,i){h.call(this),this.tile=e,this.world=t,e.physics.matterBody&&e.physics.matterBody.destroy(),e.physics.matterBody=this;var n=l(i,"body",null),r=l(i,"addToWorld",!0);if(n?this.setBody(n,r):(l(e.getCollisionGroup(),"objects",[]).length>0?this.setFromTileCollision(i):this.setFromTileRectangle(i),n=this.body),e.flipX||e.flipY){var o={x:e.getCenterX(),y:e.getCenterY()},a=e.flipX?-1:1,u=e.flipY?-1:1;s.scale(n,a,u,o)}},setFromTileRectangle:function(t){void 0===t&&(t={}),u(t,"isStatic")||(t.isStatic=!0),u(t,"addToWorld")||(t.addToWorld=!0);var e=this.tile.getBounds(),i=e.x+e.width/2,s=e.y+e.height/2,r=n.rectangle(i,s,e.width,e.height,t);return this.setBody(r,t.addToWorld),this},setFromTileCollision:function(t){void 0===t&&(t={}),u(t,"isStatic")||(t.isStatic=!0),u(t,"addToWorld")||(t.addToWorld=!0);for(var e=this.tile.tilemapLayer.scaleX,i=this.tile.tilemapLayer.scaleY,r=this.tile.getLeft(),o=this.tile.getTop(),h=l(this.tile.getCollisionGroup(),"objects",[]),c=[],f=0;f<h.length;f++){var p=h[f],g=r+p.x*e,m=o+p.y*i,v=p.width*e,x=p.height*i,y=null;if(p.rectangle)y=n.rectangle(g+v/2,m+x/2,v,x,t);else if(p.ellipse)y=n.circle(g+v/2,m+x/2,v/2,t);else if(p.polygon||p.polyline){var T=(p.polygon?p.polygon:p.polyline).map(function(t){return{x:t.x*e,y:t.y*i}}),w=d.create(T),b=d.centre(w);g+=b.x,m+=b.y,y=n.fromVertices(g,m,w,t)}y&&c.push(y)}if(1===c.length)this.setBody(c[0],t.addToWorld);else if(c.length>1){var S=a(t);S.parts=c,this.setBody(s.create(S),S.addToWorld)}return this},setBody:function(t,e){return void 0===e&&(e=!0),this.body&&this.removeBody(),this.body=t,this.body.gameObject=this,e&&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()}})},19496(t,e,i){var n=i(66280),s=i(22562),r=i(53402),o=i(95540),a=i(41598);t.exports={parseBody:function(t,e,i,n){void 0===n&&(n={});for(var a=o(i,"fixtures",[]),h=[],l=0;l<a.length;l++)for(var u=this.parseFixture(a[l]),d=0;d<u.length;d++)h.push(u[d]);var c=r.clone(i,!0);r.extend(c,n,!0),delete c.fixtures,delete c.type;var f=s.create(c);return s.setParts(f,h),s.setPosition(f,{x:t,y:e}),f},parseFixture:function(t){var e,i=r.extend({},!1,t);if(delete i.circle,delete i.vertices,t.circle){var s=o(t.circle,"x"),a=o(t.circle,"y"),h=o(t.circle,"radius");e=[n.circle(s,a,h,i)]}else t.vertices&&(e=this.parseVertices(t.vertices,i));return e},parseVertices:function(t,e){void 0===e&&(e={});for(var i=[],o=0;o<t.length;o++)a.clockwiseSort(t[o]),i.push(s.create(r.extend({position:a.centre(t[o]),vertices:t[o]},e)));return n.flagCoincidentParts(i)}}},85791(t,e,i){var n=i(66280),s=i(22562);t.exports={parseBody:function(t,e,i,r){void 0===r&&(r={});var o,a=i.vertices;if(1===a.length)r.vertices=a[0],o=s.create(r),n.flagCoincidentParts(o.parts);else{for(var h=[],l=0;l<a.length;l++){var u=s.create({vertices:a[l]});h.push(u)}n.flagCoincidentParts(h),r.parts=h,o=s.create(r)}return o.label=i.label,s.setPosition(o,{x:t,y:e}),o}}},98713(t,e,i){var n=i(15647),s=i(83419),r=i(69351),o=i(48140),a=i(81388),h=i(1121),l=i(8214),u=i(46975),d=i(53614),c=i(26099),f=i(41598);t.exports=new s({initialize:function(t,e,i){void 0===i&&(i={}),this.scene=t,this.world=e,this.camera=null,this.pointer=null,this.active=!0,this.position=new c,this.body=null,this.part=null,this.constraint=o.create(u(i,{label:"Pointer Constraint",pointA:{x:0,y:0},pointB:{x:0,y:0},length:.01,stiffness:.1,angularStiffness:1,collisionFilter:{category:1,mask:0xffffffff,group:0}})),this.world.on(h.BEFORE_UPDATE,this.update,this),t.sys.input.on(l.POINTER_DOWN,this.onDown,this),t.sys.input.on(l.POINTER_UP,this.onUp,this)},onDown:function(t){this.pointer||(this.pointer=t,this.camera=t.camera)},onUp:function(t){t===this.pointer&&(this.pointer=null)},getBody:function(t){var e=this.position,i=this.constraint;this.camera.getWorldPoint(t.x,t.y,e);for(var s=r.allBodies(this.world.localWorld),o=0;o<s.length;o++){var l=s[o];if(!l.ignorePointer&&n.contains(l.bounds,e)&&a.canCollide(l.collisionFilter,i.collisionFilter)&&this.hitTestBody(l,e))return this.world.emit(h.DRAG_START,l,this.part,this),!0}return!1},hitTestBody:function(t,e){for(var i=this.constraint,n=t.parts.length,s=+(n>1),r=s;r<n;r++){var o=t.parts[r];if(f.contains(o.vertices,e))return i.pointA=e,i.pointB={x:e.x-t.position.x,y:e.y-t.position.y},i.bodyB=t,i.angleB=t.angle,d.set(t,!1),this.part=o,this.body=t,!0}return!1},update:function(){var t=this.pointer,e=this.body;
1if(!this.active||!t){e&&this.stopDrag();return}if(!t.isDown&&e)return void this.stopDrag();if(t.isDown){if(!this.camera||!e&&!this.getBody(t))return;e=this.body;var i=this.position,n=this.constraint;this.camera.getWorldPoint(t.x,t.y,i),n.pointA.x=i.x,n.pointA.y=i.y,d.set(e,!1),this.world.emit(h.DRAG,e,this)}},stopDrag:function(){var t=this.body,e=this.constraint;e.bodyB=null,e.pointB=null,this.pointer=null,this.body=null,this.part=null,t&&this.world.emit(h.DRAG_END,t,this)},destroy:function(){this.world.removeConstraint(this.constraint),this.pointer=null,this.constraint=null,this.body=null,this.part=null,this.world.off(h.BEFORE_UPDATE,this.update),this.scene.sys.input.off(l.POINTER_DOWN,this.onDown,this),this.scene.sys.input.off(l.POINTER_UP,this.onUp,this)}})},68243(t,e,i){var n=i(66280),s=i(22562),r=i(83419),o=i(53402),a=i(69351),h=i(48413),l=i(50792),u=i(1121),d=i(95540),c=i(35154),f=i(22562),p=i(35810),g=i(73834),m=i(4372),v=i(13037),x=i(31725);t.exports=new r({Extends:l,initialize:function(t,e){l.call(this),this.scene=t,this.engine=h.create(e),this.localWorld=this.engine.world;var i=c(e,"gravity",null);i?this.setGravity(i.x,i.y,i.scale):!1===i&&this.setGravity(0,0,0),this.walls={left:null,right:null,top:null,bottom:null},this.enabled=c(e,"enabled",!0),this.getDelta=c(e,"getDelta",this.update60Hz);var n=d(e,"runner",{});d(n,"fps",!1)&&(n.delta=1e3/d(n,"fps",60)),this.runner=v.create(n),this.autoUpdate=c(e,"autoUpdate",!0);var s=c(e,"debug",!1);if(this.drawDebug="object"==typeof s||s,this.debugGraphic,this.debugConfig={showAxes:d(s,"showAxes",!1),showAngleIndicator:d(s,"showAngleIndicator",!1),angleColor:d(s,"angleColor",0xe81153),showBroadphase:d(s,"showBroadphase",!1),broadphaseColor:d(s,"broadphaseColor",0xffb400),showBounds:d(s,"showBounds",!1),boundsColor:d(s,"boundsColor",0xffffff),showVelocity:d(s,"showVelocity",!1),velocityColor:d(s,"velocityColor",44783),showCollisions:d(s,"showCollisions",!1),collisionColor:d(s,"collisionColor",0xf5950c),showSeparations:d(s,"showSeparations",!1),separationColor:d(s,"separationColor",0xffa500),showBody:d(s,"showBody",!0),showStaticBody:d(s,"showStaticBody",!0),showInternalEdges:d(s,"showInternalEdges",!1),renderFill:d(s,"renderFill",!1),renderLine:d(s,"renderLine",!0),fillColor:d(s,"fillColor",1075465),fillOpacity:d(s,"fillOpacity",1),lineColor:d(s,"lineColor",2678297),lineOpacity:d(s,"lineOpacity",1),lineThickness:d(s,"lineThickness",1),staticFillColor:d(s,"staticFillColor",857979),staticLineColor:d(s,"staticLineColor",1255396),showSleeping:d(s,"showSleeping",!1),staticBodySleepOpacity:d(s,"staticBodySleepOpacity",.7),sleepFillColor:d(s,"sleepFillColor",4605510),sleepLineColor:d(s,"sleepLineColor",0x999a99),showSensors:d(s,"showSensors",!0),sensorFillColor:d(s,"sensorFillColor",857979),sensorLineColor:d(s,"sensorLineColor",1255396),showPositions:d(s,"showPositions",!0),positionSize:d(s,"positionSize",4),positionColor:d(s,"positionColor",0xe042da),showJoint:d(s,"showJoint",!0),jointColor:d(s,"jointColor",0xe0e042),jointLineOpacity:d(s,"jointLineOpacity",1),jointLineThickness:d(s,"jointLineThickness",2),pinSize:d(s,"pinSize",4),pinColor:d(s,"pinColor",4382944),springColor:d(s,"springColor",0xe042e0),anchorColor:d(s,"anchorColor",0xefefef),anchorSize:d(s,"anchorSize",4),showConvexHulls:d(s,"showConvexHulls",!1),hullColor:d(s,"hullColor",0xd703d0)},this.drawDebug&&this.createDebugGraphic(),this.setEventsProxy(),d(e,"setBounds",!1)){var r=e.setBounds;if("boolean"==typeof r)this.setBounds();else{var o=d(r,"x",0),a=d(r,"y",0),u=d(r,"width",t.sys.scale.width),f=d(r,"height",t.sys.scale.height),p=d(r,"thickness",64),g=d(r,"left",!0),m=d(r,"right",!0),x=d(r,"top",!0),y=d(r,"bottom",!0);this.setBounds(o,a,u,f,p,g,m,x,y)}}},setCompositeRenderStyle:function(t){var e,i,n,s=t.bodies,r=t.constraints,o=t.composites;for(e=0;e<s.length;e++)n=(i=s[e]).render,this.setBodyRenderStyle(i,n.lineColor,n.lineOpacity,n.lineThickness,n.fillColor,n.fillOpacity);for(e=0;e<r.length;e++)n=(i=r[e]).render,this.setConstraintRenderStyle(i,n.lineColor,n.lineOpacity,n.lineThickness,n.pinSize,n.anchorColor,n.anchorSize);for(e=0;e<o.length;e++)i=o[e],this.setCompositeRenderStyle(i);return this}
vendor: 38,691 bytes, line 1
1,setBodyRenderStyle:function(t,e,i,n,s,r){var o=t.render,a=this.debugConfig;return o&&(null==e&&(e=t.isStatic?a.staticLineColor:a.lineColor),null==i&&(i=a.lineOpacity),null==n&&(n=a.lineThickness),null==s&&(s=t.isStatic?a.staticFillColor:a.fillColor),null==r&&(r=a.fillOpacity),!1!==e&&(o.lineColor=e),!1!==i&&(o.lineOpacity=i),!1!==n&&(o.lineThickness=n),!1!==s&&(o.fillColor=s),!1!==r&&(o.fillOpacity=r)),this},setConstraintRenderStyle:function(t,e,i,n,s,r,o){var a=t.render,h=this.debugConfig;if(!a)return this;if(null==e){var l=a.type;"line"===l?e=h.jointColor:"pin"===l?e=h.pinColor:"spring"===l&&(e=h.springColor)}return null==i&&(i=h.jointLineOpacity),null==n&&(n=h.jointLineThickness),null==s&&(s=h.pinSize),null==r&&(r=h.anchorColor),null==o&&(o=h.anchorSize),!1!==e&&(a.lineColor=e),!1!==i&&(a.lineOpacity=i),!1!==n&&(a.lineThickness=n),!1!==s&&(a.pinSize=s),!1!==r&&(a.anchorColor=r),!1!==o&&(a.anchorSize=o),this},setEventsProxy:function(){var t=this,e=this.engine,i=this.localWorld;this.drawDebug&&(p.on(i,"compositeModified",function(e){t.setCompositeRenderStyle(e)}),p.on(i,"beforeAdd",function(e){for(var i=[].concat(e.object),n=0;n<i.length;n++){var s=i[n],r=s.render;"body"===s.type?t.setBodyRenderStyle(s,r.lineColor,r.lineOpacity,r.lineThickness,r.fillColor,r.fillOpacity):"composite"===s.type?t.setCompositeRenderStyle(s):"constraint"===s.type&&t.setConstraintRenderStyle(s,r.lineColor,r.lineOpacity,r.lineThickness,r.pinSize,r.anchorColor,r.anchorSize)}})),p.on(i,"beforeAdd",function(e){t.emit(u.BEFORE_ADD,e)}),p.on(i,"afterAdd",function(e){t.emit(u.AFTER_ADD,e)}),p.on(i,"beforeRemove",function(e){t.emit(u.BEFORE_REMOVE,e)}),p.on(i,"afterRemove",function(e){t.emit(u.AFTER_REMOVE,e)}),p.on(e,"beforeUpdate",function(e){t.emit(u.BEFORE_UPDATE,e)}),p.on(e,"afterUpdate",function(e){t.emit(u.AFTER_UPDATE,e)}),p.on(e,"collisionStart",function(e){var i,n,s=e.pairs;s.length>0&&s.map(function(t){i=t.bodyA,n=t.bodyB,i.gameObject&&i.gameObject.emit("collide",i,n,t),n.gameObject&&n.gameObject.emit("collide",n,i,t),p.trigger(i,"onCollide",{pair:t}),p.trigger(n,"onCollide",{pair:t}),i.onCollideCallback&&i.onCollideCallback(t),n.onCollideCallback&&n.onCollideCallback(t),i.onCollideWith[n.id]&&i.onCollideWith[n.id](n,t),n.onCollideWith[i.id]&&n.onCollideWith[i.id](i,t)}),t.emit(u.COLLISION_START,e,i,n)}),p.on(e,"collisionActive",function(e){var i,n,s=e.pairs;s.length>0&&s.map(function(t){i=t.bodyA,n=t.bodyB,i.gameObject&&i.gameObject.emit("collideActive",i,n,t),n.gameObject&&n.gameObject.emit("collideActive",n,i,t),p.trigger(i,"onCollideActive",{pair:t}),p.trigger(n,"onCollideActive",{pair:t}),i.onCollideActiveCallback&&i.onCollideActiveCallback(t),n.onCollideActiveCallback&&n.onCollideActiveCallback(t)}),t.emit(u.COLLISION_ACTIVE,e,i,n)}),p.on(e,"collisionEnd",function(e){var i,n,s=e.pairs;s.length>0&&s.map(function(t){i=t.bodyA,n=t.bodyB,i.gameObject&&i.gameObject.emit("collideEnd",i,n,t),n.gameObject&&n.gameObject.emit("collideEnd",n,i,t),p.trigger(i,"onCollideEnd",{pair:t}),p.trigger(n,"onCollideEnd",{pair:t}),i.onCollideEndCallback&&i.onCollideEndCallback(t),n.onCollideEndCallback&&n.onCollideEndCallback(t)}),t.emit(u.COLLISION_END,e,i,n)})},setBounds:function(t,e,i,n,s,r,o,a,h){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.scale.width),void 0===n&&(n=this.scene.sys.scale.height),void 0===s&&(s=64),void 0===r&&(r=!0),void 0===o&&(o=!0),void 0===a&&(a=!0),void 0===h&&(h=!0),this.updateWall(r,"left",t-s,e-s,s,n+2*s),this.updateWall(o,"right",t+i,e-s,s,n+2*s),this.updateWall(a,"top",t,e-s,i,s),this.updateWall(h,"bottom",t,e+n,i,s),this},updateWall:function(t,e,i,n,s,r){var o=this.walls[e];t?(o&&m.remove(this.localWorld,o),i+=s/2,n+=r/2,this.walls[e]=this.create(i,n,s,r,{isStatic:!0,friction:0,frictionStatic:0})):(o&&m.remove(this.localWorld,o),this.walls[e]=null)},createDebugGraphic:function(){var t=this.scene.sys.add.graphics({x:0,y:0});return t.setDepth(Number.MAX_VALUE),this.debugGraphic=t,this.drawDebug=!0,t},disableGravity:function(){return this.localWorld.gravity.x=0,this.localWorld.gravity.y=0,this.localWorld.gravity.scale=0,this},setGravity:function(t,e,i){return void 0===t&&(t=0),void 0===e&&(e=1),void 0===i&&(i=.001),this.localWorld.gravity.x=t,this.localWorld.gravity.y=e,this.localWorld.gravity.scale=i,this},create:function(t,e,i,s,r){var o=n.rectangle(t,e,i,s,r);return m.add(this.localWorld,o),o},add:function(t){return m.add(this.localWorld,t),this},remove:function(t,e){Array.isArray(t)||(t=[t]);for(var i=0;i<t.length;i++){var n=t[i],s=n.body?n.body:n;a.remove(this.localWorld,s,e)}return this},removeConstraint:function(t,e){return a.remove(this.localWorld,t,e),this},convertTilemapLayer:function(t,e){var i=t.layer,n=t.getTilesWithin(0,0,i.width,i.height,{isColliding:!0});return this.convertTiles(n,e),this},convertTiles:function(t,e){if(0===t.length)return this;for(var i=0;i<t.length;i++)new g(this,t[i],e);return this},nextGroup:function(t){return f.nextGroup(t)},nextCategory:function(){return f.nextCategory()},pause:function(){return this.enabled=!1,this.emit(u.PAUSE),this},resume:function(){return this.enabled=!0,this.runner.timeLastTick=o.now(),this.emit(u.RESUME),this},update:function(t){if(this.enabled&&this.autoUpdate){var e=this.engine,i=this.runner,n=o.now(),s=i.delta,r=0,a=t-i.timeLastTick;if((!a||!i.timeLastTick||a>Math.max(v._maxFrameDelta,i.maxFrameTime))&&(a=i.frameDelta||v._frameDeltaFallback),i.frameDeltaSmoothing){i.frameDeltaHistory.push(a),i.frameDeltaHistory=i.frameDeltaHistory.slice(-i.frameDeltaHistorySize);var l=i.frameDeltaHistory.slice(0).sort(),u=i.frameDeltaHistory.slice(l.length*v._smoothingLowerBound,l.length*v._smoothingUpperBound);a=v._mean(u)||a}i.frameDeltaSnapping&&(a=1e3/Math.round(1e3/a)),i.frameDelta=a,i.timeLastTick=t,i.timeBuffer+=i.frameDelta,i.timeBuffer=o.clamp(i.timeBuffer,0,i.frameDelta+s*v._timeBufferMargin),i.lastUpdatesDeferred=0;for(var d=i.maxUpdates||Math.ceil(i.maxFrameTime/s),c=o.now();s>0&&i.timeBuffer>=s*v._timeBufferMargin;){h.update(e,s),i.timeBuffer-=s,r+=1;var f=o.now()-n,p=o.now()-c,g=f+v._elapsedNextEstimate*p/r;if(r>=d||g>i.maxFrameTime){i.lastUpdatesDeferred=Math.round(Math.max(0,i.timeBuffer/s-v._timeBufferMargin));break}}}},step:function(t){h.update(this.engine,t)},update60Hz:function(){return 1e3/60},update30Hz:function(){return 1e3/30},has:function(t){var e=t.hasOwnProperty("body")?t.body:t;return null!==a.get(this.localWorld,e.id,e.type)},getAllBodies:function(){return a.allBodies(this.localWorld)},getAllConstraints:function(){return a.allConstraints(this.localWorld)},getAllComposites:function(){return a.allComposites(this.localWorld)},postUpdate:function(){if(this.drawDebug){var t=this.debugConfig,e=this.engine,i=this.debugGraphic,n=a.allBodies(this.localWorld);this.debugGraphic.clear(),t.showBroadphase&&e.broadphase.controller&&this.renderGrid(e.broadphase,i,t.broadphaseColor,.5),t.showBounds&&this.renderBodyBounds(n,i,t.boundsColor,.5),(t.showBody||t.showStaticBody)&&this.renderBodies(n),t.showJoint&&this.renderJoints(),(t.showAxes||t.showAngleIndicator)&&this.renderBodyAxes(n,i,t.showAxes,t.angleColor,.5),t.showVelocity&&this.renderBodyVelocity(n,i,t.velocityColor,1,2),t.showSeparations&&this.renderSeparations(e.pairs.list,i,t.separationColor),t.showCollisions&&this.renderCollisions(e.pairs.list,i,t.collisionColor)}},renderGrid:function(t,e,i,n){e.lineStyle(1,i,n);for(var s=o.keys(t.buckets),r=0;r<s.length;r++){var a=s[r];if(!(t.buckets[a].length<2)){var h=a.split(/C|R/);e.strokeRect(parseInt(h[1],10)*t.bucketWidth,parseInt(h[2],10)*t.bucketHeight,t.bucketWidth,t.bucketHeight)}}return this},renderSeparations:function(t,e,i){e.lineStyle(1,i,1);for(var n=0;n<t.length;n++){var s=t[n];if(s.isActive){var r=s.collision,o=r.bodyA,a=r.bodyB,h=o.position,l=a.position,u=r.penetration,d=o.isStatic||a.isStatic?1:4;a.isStatic&&(d=0),e.lineBetween(l.x,l.y,l.x-u.x*d,l.y-u.y*d),d=o.isStatic||a.isStatic?1:4,o.isStatic&&(d=0),e.lineBetween(h.x,h.y,h.x-u.x*d,h.y-u.y*d)}}return this},renderCollisions:function(t,e,i){for(e.lineStyle(1,i,.5),e.fillStyle(i,1),n=0;n<t.length;n++)if((s=t[n]).isActive)for(var n,s,r=0;r<s.contactCount;r++){var o=s.contacts[r].vertex;o&&e.fillRect(o.x-2,o.y-2,5,5)}for(n=0;n<t.length;n++)if((s=t[n]).isActive){var a=s.collision,h=s.contacts;if(s.contactCount>0){var l=h[0].vertex.x,u=h[0].vertex.y;2===s.contactCount&&(l=(h[0].vertex.x+h[1].vertex.x)/2,u=(h[0].vertex.y+h[1].vertex.y)/2),a.bodyB===a.supports[0].body||a.bodyA.isStatic?e.lineBetween(l-8*a.normal.x,u-8*a.normal.y,l,u):e.lineBetween(l+8*a.normal.x,u+8*a.normal.y,l,u)}}return this},renderBodyBounds:function(t,e,i,n){e.lineStyle(1,i,n);for(var s=0;s<t.length;s++){var r=t[s];if(r.render.visible){var o=r.bounds;if(o)e.strokeRect(o.min.x,o.min.y,o.max.x-o.min.x,o.max.y-o.min.y);else for(var a=r.parts,h=+(a.length>1);h<a.length;h++){var l=a[h];e.strokeRect(l.bounds.min.x,l.bounds.min.y,l.bounds.max.x-l.bounds.min.x,l.bounds.max.y-l.bounds.min.y)}}}return this},renderBodyAxes:function(t,e,i,n,s){e.lineStyle(1,n,s);for(var r=0;r<t.length;r++){var o,a,h,l=t[r],u=l.parts;if(l.render.visible)if(i)for(a=+(u.length>1);a<u.length;a++)for(h=0,o=u[a];h<o.axes.length;h++){var d=o.axes[h];e.lineBetween(o.position.x,o.position.y,o.position.x+20*d.x,o.position.y+20*d.y)}else for(a=+(u.length>1);a<u.length;a++)for(h=0,o=u[a];h<o.axes.length;h++)e.lineBetween(o.position.x,o.position.y,(o.vertices[0].x+o.vertices[o.vertices.length-1].x)/2,(o.vertices[0].y+o.vertices[o.vertices.length-1].y)/2)}return this},renderBodyVelocity:function(t,e,i,n,s){e.lineStyle(s,i,n);for(var r=0;r<t.length;r++){var o=t[r];o.render.visible&&e.lineBetween(o.position.x,o.position.y,o.position.x+(o.position.x-o.positionPrev.x)*2,o.position.y+(o.position.y-o.positionPrev.y)*2)}return this},renderBodies:function(t){for(var e=this.debugGraphic,i=this.debugConfig,n=i.showBody,s=i.showStaticBody,r=i.showSleeping,o=i.showInternalEdges,a=i.showConvexHulls,h=i.renderFill,l=i.renderLine,u=i.staticBodySleepOpacity,d=i.sleepFillColor,c=i.sleepLineColor,f=i.hullColor,p=0;p<t.length;p++){var g=t[p];if(g.render.visible&&(s||!g.isStatic)&&(n||g.isStatic)){var m=g.render.lineColor,v=g.render.lineOpacity,x=g.render.lineThickness,y=g.render.fillColor,T=g.render.fillOpacity;r&&g.isSleeping&&(g.isStatic?(v*=u,T*=u):(m=c,y=d)),h||(y=null),l||(m=null),this.renderBody(g,e,o,m,v,x,y,T);var w=g.parts.length;a&&w>1&&this.renderConvexHull(g,e,f,x)}}},renderBody:function(t,e,i,n,s,r,o,a){void 0===n&&(n=null),void 0===s&&(s=null),void 0===r&&(r=1),void 0===o&&(o=null),void 0===a&&(a=null);for(var h=this.debugConfig,l=h.sensorFillColor,u=h.sensorLineColor,d=t.parts,c=d.length,f=+(c>1);f<c;f++){var p=d[f],g=p.render,m=g.opacity;if(g.visible&&0!==m&&(!p.isSensor||h.showSensors)){var v=p.circleRadius;if(e.beginPath(),p.isSensor?(null!==o&&e.fillStyle(l,a*m),null!==n&&e.lineStyle(r,u,s*m)):(null!==o&&e.fillStyle(o,a*m),null!==n&&e.lineStyle(r,n,s*m)),v)e.arc(p.position.x,p.position.y,v,0,2*Math.PI);else{var x=p.vertices,y=x.length;e.moveTo(x[0].x,x[0].y);for(var T=1;T<y;T++){var w=x[T];if(!x[T-1].isInternal||i?e.lineTo(w.x,w.y):e.moveTo(w.x,w.y),T<y&&w.isInternal&&!i){var b=(T+1)%y;e.moveTo(x[b].x,x[b].y)}}e.closePath()}null!==o&&e.fillPath(),null!==n&&e.strokePath()}}if(h.showPositions&&!t.isStatic){var S=t.position.x,C=t.position.y,E=Math.ceil(h.positionSize/2);e.fillStyle(h.positionColor,1),e.fillRect(S-E,C-E,h.positionSize,h.positionSize)}return this},renderConvexHull:function(t,e,i,n){if(void 0===n&&(n=1),t.parts.length>1){var s=t.vertices;e.lineStyle(n,i),e.beginPath(),e.moveTo(s[0].x,s[0].y);for(var r=1;r<s.length;r++)e.lineTo(s[r].x,s[r].y);e.lineTo(s[0].x,s[0].y),e.strokePath()}return this},renderJoints:function(){for(var t=this.debugGraphic,e=a.allConstraints(this.localWorld),i=0;i<e.length;i++){var n=e[i].render,s=n.lineColor,r=n.lineOpacity,o=n.lineThickness,h=n.pinSize,l=n.anchorColor,u=n.anchorSize;this.renderConstraint(e[i],t,s,r,o,h,l,u)}},renderConstraint:function(t,e,i,n,s,r,a,h){var l=t.render;if(!l.visible||!t.pointA||!t.pointB)return this;e.lineStyle(s,i,n);var u=t.bodyA,d=t.bodyB;if(c=u?x.add(u.position,t.pointA):t.pointA,"pin"===l.type)e.strokeCircle(c.x,c.y,r);else{if(f=d?x.add(d.position,t.pointB):t.pointB,e.beginPath(),e.moveTo(c.x,c.y),"spring"===l.type)for(var c,f,p,g=x.sub(f,c),m=x.perp(x.normalise(g)),v=Math.ceil(o.clamp(t.length/5,12,20)),y=1;y<v;y+=1)p=y%2==0?1:-1,e.lineTo(c.x+g.x*(y/v)+m.x*p*4,c.y+g.y*(y/v)+m.y*p*4);e.lineTo(f.x,f.y)}return e.strokePath(),l.anchors&&h>0&&(e.fillStyle(a),e.fillCircle(c.x,c.y,h),e.fillCircle(f.x,f.y,h)),this},resetCollisionIDs:function(){return s._nextCollidingGroupId=1,s._nextNonCollidingGroupId=-1,s._nextCategory=1,this},shutdown:function(){p.off(this.engine),this.removeAllListeners(),m.clear(this.localWorld,!1),h.clear(this.engine),this.drawDebug&&this.debugGraphic.destroy()},destroy:function(){this.shutdown()}})},70410(t){t.exports={setBounce:function(t){return this.body.restitution=t,this}}},66968(t){t.exports={setCollisionCategory:function(t){return this.body.collisionFilter.category=t,this},setCollisionGroup:function(t){return this.body.collisionFilter.group=t,this},setCollidesWith:function(t){var e=0;if(Array.isArray(t))for(var i=0;i<t.length;i++)e|=t[i];else e=t;return this.body.collisionFilter.mask=e,this},setOnCollide:function(t){return this.body.onCollideCallback=t,this},setOnCollideEnd:function(t){return this.body.onCollideEndCallback=t,this},setOnCollideActive:function(t){return this.body.onCollideActiveCallback=t,this},setOnCollideWith:function(t,e){Array.isArray(t)||(t=[t]);for(var i=0;i<t.length;i++){var n=t[i].hasOwnProperty("body")?t[i].body:t[i];this.body.setOnCollideWith(n,e)}return this}}},51607(t,e,i){var n=i(22562);t.exports={applyForce:function(t){return this._tempVec2.set(this.body.position.x,this.body.position.y),n.applyForce(this.body,this._tempVec2,t),this},applyForceFrom:function(t,e){return n.applyForce(this.body,t,e),this},thrust:function(t){var e=this.body.angle;return this._tempVec2.set(t*Math.cos(e),t*Math.sin(e)),n.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustLeft:function(t){var e=this.body.angle-Math.PI/2;return this._tempVec2.set(t*Math.cos(e),t*Math.sin(e)),n.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustRight:function(t){var e=this.body.angle+Math.PI/2;return this._tempVec2.set(t*Math.cos(e),t*Math.sin(e)),n.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustBack:function(t){var e=this.body.angle-Math.PI;return this._tempVec2.set(t*Math.cos(e),t*Math.sin(e)),n.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this}}},5436(t){t.exports={setFriction:function(t,e,i){return this.body.friction=t,void 0!==e&&(this.body.frictionAir=e),void 0!==i&&(this.body.frictionStatic=i),this},setFrictionAir:function(t){return this.body.frictionAir=t,this},setFrictionStatic:function(t){return this.body.frictionStatic=t,this}}},39858(t){t.exports={setIgnoreGravity:function(t){return this.body.ignoreGravity=t,this}}},37302(t,e,i){var n=i(22562),s=i(26099);t.exports={setMass:function(t){return n.setMass(this.body,t),this},setDensity:function(t){return n.setDensity(this.body,t),this},centerOfMass:{get:function(){return new s(this.body.centerOfMass.x,this.body.centerOfMass.y)}}}},39132(t){t.exports={setSensor:function(t){return this.body.isSensor=t,this},isSensor:function(){return this.body.isSensor}}},57772(t,e,i){var n=i(66280),s=i(22562),r=i(43855),o=i(95540),a=i(19496),h=i(85791),l=i(41598);t.exports={setRectangle:function(t,e,i){return this.setBody({type:"rectangle",width:t,height:e},i)},setCircle:function(t,e){return this.setBody({type:"circle",radius:t},e)},setPolygon:function(t,e,i){return this.setBody({type:"polygon",sides:e,radius:t},i)},setTrapezoid:function(t,e,i,n){return this.setBody({type:"trapezoid",width:t,height:e,slope:i},n)},setExistingBody:function(t,e){void 0===e&&(e=!0),this.body&&this.world.remove(this.body,!0),this.body=t;for(var i=0;i<t.parts.length;i++)t.parts[i].gameObject=this;var n=this;if(t.destroy=function(){n.world.remove(n.body,!0),n.body.gameObject=null},e&&(this.world.has(t)&&this.world.remove(t,!0),this.world.add(t)),this._originComponent){var s=t.render.sprite.xOffset,o=t.render.sprite.yOffset,a=t.centerOfMass.x,h=t.centerOfMass.y;if(r(a,.5)&&r(h,.5))this.setOrigin(s+.5,o+.5);else{var l=t.centerOffset.x,u=t.centerOffset.y;this.setOrigin(s+l/this.displayWidth,o+u/this.displayHeight)}}return this},setBody:function(t,e){if(!t)return this;"string"==typeof t&&(t={type:t});var i,r=o(t,"type","rectangle"),u=o(t,"x",this._tempVec2.x),d=o(t,"y",this._tempVec2.y),c=o(t,"width",this.width),f=o(t,"height",this.height);switch(r){case"rectangle":i=n.rectangle(u,d,c,f,e);break;case"circle":var p=o(t,"radius",Math.max(c,f)/2),g=o(t,"maxSides",25);i=n.circle(u,d,p,e,g);break;case"trapezoid":var m=o(t,"slope",.5);i=n.trapezoid(u,d,c,f,m,e);break;case"polygon":var v=o(t,"sides",5),x=o(t,"radius",Math.max(c,f)/2);i=n.polygon(u,d,v,x,e);break;case"fromVertices":case"fromVerts":var y=o(t,"verts",null);if(y)if("string"==typeof y&&(y=l.fromPath(y)),this.body&&!this.body.hasOwnProperty("temp"))s.setVertices(this.body,y),i=this.body;else{var T=o(t,"flagInternal",!1),w=o(t,"removeCollinear",.01),b=o(t,"minimumArea",10);i=n.fromVertices(u,d,y,e,T,w,b)}break;case"fromPhysicsEditor":i=a.parseBody(u,d,t,e);break;case"fromPhysicsTracer":i=h.parseBody(u,d,t,e)}return i&&this.setExistingBody(i,t.addToWorld),this}}},38083(t,e,i){var n=i(1121),s=i(53614),r=i(35810);t.exports={setToSleep:function(){return s.set(this.body,!0),this},setAwake:function(){return s.set(this.body,!1),this},setSleepThreshold:function(t){return void 0===t&&(t=60),this.body.sleepThreshold=t,this},setSleepEvents:function(t,e){return this.setSleepStartEvent(t),this.setSleepEndEvent(e),this},setSleepStartEvent:function(t){if(t){var e=this.world;r.on(this.body,"sleepStart",function(t){e.emit(n.SLEEP_START,t,this)})}else r.off(this.body,"sleepStart");return this},setSleepEndEvent:function(t){if(t){var e=this.world;r.on(this.body,"sleepEnd",function(t){e.emit(n.SLEEP_END,t,this)})}else r.off(this.body,"sleepEnd");return this}}},90556(t,e,i){var n=i(22562);t.exports={setStatic:function(t){return n.setStatic(this.body,t),this},isStatic:function(){return this.body.isStatic}}},85436(t,e,i){var n=i(22562),s=i(36383),r=i(86554),o=i(30954);t.exports={x:{get:function(){return this.body.position.x},set:function(t){this._tempVec2.set(t,this.y),n.setPosition(this.body,this._tempVec2)}},y:{get:function(){return this.body.position.y},set:function(t){this._tempVec2.set(this.x,t),n.setPosition(this.body,this._tempVec2)}},scale:{get:function(){return(this._scaleX+this._scaleY)/2},set:function(t){this.setScale(t,t)}},scaleX:{get:function(){return this._scaleX},set:function(t){var e=1/this._scaleX,i=1/this._scaleY;this._scaleX=t,0===this._scaleX?this.renderFlags&=-5:this.renderFlags|=4,n.scale(this.body,e,i),n.scale(this.body,t,this._scaleY)}},scaleY:{get:function(){return this._scaleY},set:function(t){var e=1/this._scaleX,i=1/this._scaleY;this._scaleY=t,0===this._scaleY?this.renderFlags&=-5:this.renderFlags|=4,n.scale(this.body,e,i),n.scale(this.body,this._scaleX,t)}},angle:{get:function(){return o(this.body.angle*s.RAD_TO_DEG)},set:function(t){this.rotation=o(t)*s.DEG_TO_RAD}},rotation:{get:function(){return this.body.angle},set:function(t){this._rotation=r(t),n.setAngle(this.body,this._rotation)}},setPosition:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this._tempVec2.set(t,e),n.setPosition(this.body,this._tempVec2),this},setRotation:function(t){return void 0===t&&(t=0),this._rotation=r(t),n.setAngle(this.body,t),this},setFixedRotation:function(){return n.setInertia(this.body,1/0),this},setAngle:function(t){return void 0===t&&(t=0),this.angle=t,n.setAngle(this.body,this.rotation),this},setScale:function(t,e,i){void 0===t&&(t=1),void 0===e&&(e=t);var s=1/this._scaleX,r=1/this._scaleY;return this._scaleX=t,this._scaleY=e,n.scale(this.body,s,r,i),n.scale(this.body,t,e,i),this}}},42081(t,e,i){var n=i(22562);t.exports={setVelocityX:function(t){return this._tempVec2.set(t,this.body.velocity.y),n.setVelocity(this.body,this._tempVec2),this},setVelocityY:function(t){return this._tempVec2.set(this.body.velocity.x,t),n.setVelocity(this.body,this._tempVec2),this},setVelocity:function(t,e){return this._tempVec2.set(t,e),n.setVelocity(this.body,this._tempVec2),this},getVelocity:function(){return n.getVelocity(this.body)},setAngularVelocity:function(t){return n.setAngularVelocity(this.body,t),this},getAngularVelocity:function(){return n.getAngularVelocity(this.body)},setAngularSpeed:function(t){return n.setAngularSpeed(this.body,t),this},getAngularSpeed:function(){return n.getAngularSpeed(this.body)}}},9503(t,e,i){t.exports={Bounce:i(70410),Collision:i(66968),Force:i(51607),Friction:i(5436),Gravity:i(39858),Mass:i(37302),Sensor:i(39132),SetBody:i(57772),Sleep:i(38083),Static:i(90556),Transform:i(85436),Velocity:i(42081)}},85608(t){t.exports="afteradd"},1213(t){t.exports="afterremove"},25968(t){t.exports="afterupdate"},67205(t){t.exports="beforeadd"},39438(t){t.exports="beforeremove"},44823(t){t.exports="beforeupdate"},92593(t){t.exports="collisionactive"},60128(t){t.exports="collisionend"},76861(t){t.exports="collisionstart"},92362(t){t.exports="dragend"},76408(t){t.exports="drag"},93971(t){t.exports="dragstart"},5656(t){t.exports="pause"},47861(t){t.exports="resume"},79099(t){t.exports="sleepend"},35906(t){t.exports="sleepstart"},1121(t,e,i){t.exports={AFTER_ADD:i(85608),AFTER_REMOVE:i(1213),AFTER_UPDATE:i(25968),BEFORE_ADD:i(67205),BEFORE_REMOVE:i(39438),BEFORE_UPDATE:i(44823),COLLISION_ACTIVE:i(92593),COLLISION_END:i(60128),COLLISION_START:i(76861),DRAG_END:i(92362),DRAG:i(76408),DRAG_START:i(93971),PAUSE:i(5656),RESUME:i(47861),SLEEP_END:i(79099),SLEEP_START:i(35906)}},3875(t,e,i){t.exports={BodyBounds:i(68174),Components:i(9503),Events:i(1121),Factory:i(28137),MatterGameObject:i(75803),Image:i(23181),Matter:i(19933),MatterPhysics:i(42045),PolyDecomp:i(55973),Sprite:i(34803),TileBody:i(73834),PhysicsEditorParser:i(19496),PhysicsJSONParser:i(85791),PointerConstraint:i(98713),World:i(68243)}},22562(t,e,i){var n,s={};t.exports=s;var r=i(41598),o=i(31725),a=i(53614),h=i(53402),l=i(15647),u=i(66615);s._timeCorrection=!0,s._inertiaScale=4,s._nextCollidingGroupId=1,s._nextNonCollidingGroupId=-1,s._nextCategory=1,s._baseDelta=1e3/60,s.create=function(t){var e={id:h.nextId(),type:"body",label:"Body",parts:[],plugin:{},attractors:t.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:0xffffffff,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:1e3/60,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:{}};!t.hasOwnProperty("position")&&t.hasOwnProperty("vertices")?t.position=r.centre(t.vertices):t.hasOwnProperty("vertices")||(e.vertices=r.fromPath("L 0 0 L 40 0 L 40 40 L 0 40"));var i=h.extend(e,t);return n(i,t),i.setOnCollideWith=function(t,e){return e?this.onCollideWith[t.id]=e:delete this.onCollideWith[t.id],this},i},s.nextGroup=function(t){return t?s._nextNonCollidingGroupId--:s._nextCollidingGroupId++},s.nextCategory=function(){return s._nextCategory=s._nextCategory<<1,s._nextCategory},n=function(t,e){if(e=e||{},s.set(t,{bounds:t.bounds||l.create(t.vertices),positionPrev:t.positionPrev||o.clone(t.position),anglePrev:t.anglePrev||t.angle,vertices:t.vertices,parts:t.parts||[t],isStatic:t.isStatic,isSleeping:t.isSleeping,parent:t.parent||t}),r.rotate(t.vertices,t.angle,t.position),u.rotate(t.axes,t.angle),l.update(t.bounds,t.vertices,t.velocity),s.set(t,{axes:e.axes||t.axes,area:e.area||t.area,mass:e.mass||t.mass,inertia:e.inertia||t.inertia}),1===t.parts.length){var i=t.bounds,n=t.centerOfMass,a=t.centerOffset,h=i.max.x-i.min.x,d=i.max.y-i.min.y;n.x=-(i.min.x-t.position.x)/h,n.y=-(i.min.y-t.position.y)/d,a.x=h*n.x,a.y=d*n.y}},s.set=function(t,e,i){var n;for(n in"string"==typeof e&&(n=e,(e={})[n]=i),e)if(Object.prototype.hasOwnProperty.call(e,n))switch(i=e[n],n){case"isStatic":s.setStatic(t,i);break;case"isSleeping":a.set(t,i);break;case"mass":s.setMass(t,i);break;case"density":s.setDensity(t,i);break;case"inertia":s.setInertia(t,i);break;case"vertices":s.setVertices(t,i);break;case"position":s.setPosition(t,i);break;case"angle":s.setAngle(t,i);break;case"velocity":s.setVelocity(t,i);break;case"angularVelocity":s.setAngularVelocity(t,i);break;case"speed":s.setSpeed(t,i);break;case"angularSpeed":s.setAngularSpeed(t,i);break;case"parts":s.setParts(t,i);break;case"centre":s.setCentre(t,i);break;default:t[n]=i}},s.setStatic=function(t,e){for(var i=0;i<t.parts.length;i++){var n=t.parts[i];e?(n.isStatic||(n._original={restitution:n.restitution,friction:n.friction,mass:n.mass,inertia:n.inertia,density:n.density,inverseMass:n.inverseMass,inverseInertia:n.inverseInertia}),n.restitution=0,n.friction=1,n.mass=n.inertia=n.density=1/0,n.inverseMass=n.inverseInertia=0,n.positionPrev.x=n.position.x,n.positionPrev.y=n.position.y,n.anglePrev=n.angle,n.angularVelocity=0,n.speed=0,n.angularSpeed=0,n.motion=0):n._original&&(n.restitution=n._original.restitution,n.friction=n._original.friction,n.mass=n._original.mass,n.inertia=n._original.inertia,n.density=n._original.density,n.inverseMass=n._original.inverseMass,n.inverseInertia=n._original.inverseInertia,n._original=null),n.isStatic=e}},s.setMass=function(t,e){var i=t.inertia/(t.mass/6);t.inertia=e/6*i,t.inverseInertia=1/t.inertia,t.mass=e,t.inverseMass=1/t.mass,t.density=t.mass/t.area},s.setDensity=function(t,e){s.setMass(t,e*t.area),t.density=e},s.setInertia=function(t,e){t.inertia=e,t.inverseInertia=1/t.inertia},s.setVertices=function(t,e){e[0].body===t?t.vertices=e:t.vertices=r.create(e,t),t.axes=u.fromVertices(t.vertices),t.area=r.area(t.vertices),s.setMass(t,t.density*t.area);var i=r.centre(t.vertices);r.translate(t.vertices,i,-1),s.setInertia(t,s._inertiaScale*r.inertia(t.vertices,t.mass)),r.translate(t.vertices,t.position),l.update(t.bounds,t.vertices,t.velocity)},s.setParts=function(t,e,i){for(e=e.slice(0),t.parts.length=0,t.parts.push(t),t.parent=t,n=0;n<e.length;n++){var n,o=e[n];o!==t&&(o.parent=t,t.parts.push(o))}if(1!==t.parts.length){if(i=void 0===i||i){var a=[];for(n=0;n<e.length;n++)a=a.concat(e[n].vertices);r.clockwiseSort(a);var h=r.hull(a),u=r.centre(h);s.setVertices(t,h),r.translate(t.vertices,u)}var d=s._totalProperties(t),c=d.centre.x,f=d.centre.y,p=t.bounds,g=t.centerOfMass,m=t.centerOffset;l.update(p,t.vertices,t.velocity),g.x=-(p.min.x-c)/(p.max.x-p.min.x),g.y=-(p.min.y-f)/(p.max.y-p.min.y),m.x=c,m.y=f,t.area=d.area,t.parent=t,t.position.x=c,t.position.y=f,t.positionPrev.x=c,t.positionPrev.y=f,s.setMass(t,d.mass),s.setInertia(t,d.inertia),s.setPosition(t,d.centre)}},s.setCentre=function(t,e,i){i?(t.positionPrev.x+=e.x,t.positionPrev.y+=e.y,t.position.x+=e.x,t.position.y+=e.y):(t.positionPrev.x=e.x-(t.position.x-t.positionPrev.x),t.positionPrev.y=e.y-(t.position.y-t.positionPrev.y),t.position.x=e.x,t.position.y=e.y)},s.setPosition=function(t,e,i){var n=o.sub(e,t.position);i?(t.positionPrev.x=t.position.x,t.positionPrev.y=t.position.y,t.velocity.x=n.x,t.velocity.y=n.y,t.speed=o.magnitude(n)):(t.positionPrev.x+=n.x,t.positionPrev.y+=n.y);for(var s=0;s<t.parts.length;s++){var a=t.parts[s];a.position.x+=n.x,a.position.y+=n.y,r.translate(a.vertices,n),l.update(a.bounds,a.vertices,t.velocity)}},s.setAngle=function(t,e,i){var n=e-t.angle;i?(t.anglePrev=t.angle,t.angularVelocity=n,t.angularSpeed=Math.abs(n)):t.anglePrev+=n;for(var s=0;s<t.parts.length;s++){var a=t.parts[s];a.angle+=n,r.rotate(a.vertices,n,t.position),u.rotate(a.axes,n),l.update(a.bounds,a.vertices,t.velocity),s>0&&o.rotateAbout(a.position,n,t.position,a.position)}},s.setVelocity=function(t,e){var i=t.deltaTime/s._baseDelta;t.positionPrev.x=t.position.x-e.x*i,t.positionPrev.y=t.position.y-e.y*i,t.velocity.x=(t.position.x-t.positionPrev.x)/i,t.velocity.y=(t.position.y-t.positionPrev.y)/i,t.speed=o.magnitude(t.velocity)},s.getVelocity=function(t){var e=s._baseDelta/t.deltaTime;return{x:(t.position.x-t.positionPrev.x)*e,y:(t.position.y-t.positionPrev.y)*e}},s.getSpeed=function(t){return o.magnitude(s.getVelocity(t))},s.setSpeed=function(t,e){s.setVelocity(t,o.mult(o.normalise(s.getVelocity(t)),e))},s.setAngularVelocity=function(t,e){var i=t.deltaTime/s._baseDelta;t.anglePrev=t.angle-e*i,t.angularVelocity=(t.angle-t.anglePrev)/i,t.angularSpeed=Math.abs(t.angularVelocity)},s.getAngularVelocity=function(t){return(t.angle-t.anglePrev)*s._baseDelta/t.deltaTime},s.getAngularSpeed=function(t){return Math.abs(s.getAngularVelocity(t))},s.setAngularSpeed=function(t,e){s.setAngularVelocity(t,h.sign(s.getAngularVelocity(t))*e)},s.translate=function(t,e,i){s.setPosition(t,o.add(t.position,e),i)},s.rotate=function(t,e,i,n){if(i){var r=Math.cos(e),o=Math.sin(e),a=t.position.x-i.x,h=t.position.y-i.y;s.setPosition(t,{x:i.x+(a*r-h*o),y:i.y+(a*o+h*r)},n),s.setAngle(t,t.angle+e,n)}else s.setAngle(t,t.angle+e,n)},s.scale=function(t,e,i,n){var o=0,a=0;n=n||t.position;for(var h=t.inertia===1/0,d=0;d<t.parts.length;d++){var c=t.parts[d];c.scale.x=e,c.scale.y=i,r.scale(c.vertices,e,i,n),c.axes=u.fromVertices(c.vertices),c.area=r.area(c.vertices),s.setMass(c,t.density*c.area),r.translate(c.vertices,{x:-c.position.x,y:-c.position.y}),s.setInertia(c,s._inertiaScale*r.inertia(c.vertices,c.mass)),r.translate(c.vertices,{x:c.position.x,y:c.position.y}),d>0&&(o+=c.area,a+=c.inertia),c.position.x=n.x+(c.position.x-n.x)*e,c.position.y=n.y+(c.position.y-n.y)*i,l.update(c.bounds,c.vertices,t.velocity)}t.parts.length>1&&(t.area=o,t.isStatic||(s.setMass(t,t.density*o),s.setInertia(t,a))),t.circleRadius&&(e===i?t.circleRadius*=e:t.circleRadius=null),h&&s.setInertia(t,1/0)},s.update=function(t,e){var i=(e=(void 0!==e?e:1e3/60)*t.timeScale)*e,n=s._timeCorrection?e/(t.deltaTime||e):1,a=1-t.frictionAir*(e/h._baseDelta),d=(t.position.x-t.positionPrev.x)*n,c=(t.position.y-t.positionPrev.y)*n;t.velocity.x=d*a+t.force.x/t.mass*i,t.velocity.y=c*a+t.force.y/t.mass*i,t.positionPrev.x=t.position.x,t.positionPrev.y=t.position.y,t.position.x+=t.velocity.x,t.position.y+=t.velocity.y,t.deltaTime=e,t.angularVelocity=(t.angle-t.anglePrev)*a*n+t.torque/t.inertia*i,t.anglePrev=t.angle,t.angle+=t.angularVelocity,t.speed=o.magnitude(t.velocity),t.angularSpeed=Math.abs(t.angularVelocity);for(var f=0;f<t.parts.length;f++){var p=t.parts[f];r.translate(p.vertices,t.velocity),f>0&&(p.position.x+=t.velocity.x,p.position.y+=t.velocity.y),0!==t.angularVelocity&&(r.rotate(p.vertices,t.angularVelocity,t.position),u.rotate(p.axes,t.angularVelocity),f>0&&o.rotateAbout(p.position,t.angularVelocity,t.position,p.position)),l.update(p.bounds,p.vertices,t.velocity)}},s.updateVelocities=function(t){var e=s._baseDelta/t.deltaTime,i=t.velocity;i.x=(t.position.x-t.positionPrev.x)*e,i.y=(t.position.y-t.positionPrev.y)*e,t.speed=Math.sqrt(i.x*i.x+i.y*i.y),t.angularVelocity=(t.angle-t.anglePrev)*e,t.angularSpeed=Math.abs(t.angularVelocity)},s.applyForce=function(t,e,i){var n={x:e.x-t.position.x,y:e.y-t.position.y};t.force.x+=i.x,t.force.y+=i.y,t.torque+=n.x*i.y-n.y*i.x},s._totalProperties=function(t){for(var e={mass:0,area:0,inertia:0,centre:{x:0,y:0}},i=+(1!==t.parts.length);i<t.parts.length;i++){var n=t.parts[i],s=n.mass!==1/0?n.mass:1;e.mass+=s,e.area+=n.area,e.inertia+=n.inertia,e.centre=o.add(e.centre,o.mult(n.position,s))}return e.centre=o.div(e.centre,e.mass),e},s.wrap=function(t,e){var i=l.wrap(t.bounds,e);return i&&s.translate(t,i),i}},69351(t,e,i){var n={};t.exports=n;var s=i(35810),r=i(53402),o=i(15647),a=i(22562);n.create=function(t){return r.extend({id:r.nextId(),type:"composite",parent:null,isModified:!1,bodies:[],constraints:[],composites:[],label:"Composite",plugin:{},wrapBounds:null,cache:{allBodies:null,allConstraints:null,allComposites:null}},t)},n.setModified=function(t,e,i,r){if(s.trigger(t,"compositeModified",t),t.isModified=e,e&&t.cache&&(t.cache.allBodies=null,t.cache.allConstraints=null,t.cache.allComposites=null),i&&t.parent&&n.setModified(t.parent,e,i,r),r)for(var o=0;o<t.composites.length;o++){var a=t.composites[o];n.setModified(a,e,i,r)}},n.add=function(t,e){var i=[].concat(e);s.trigger(t,"beforeAdd",{object:e});for(var o=0;o<i.length;o++){var a=i[o];switch(a.type){case"body":if(a.parent!==a){r.warn("Composite.add: skipped adding a compound body part (you must add its parent instead)");break}n.addBody(t,a);break;case"constraint":n.addConstraint(t,a);break;case"composite":n.addComposite(t,a);break;case"mouseConstraint":n.addConstraint(t,a.constraint)}}return s.trigger(t,"afterAdd",{object:e}),t},n.remove=function(t,e,i){var r=[].concat(e);s.trigger(t,"beforeRemove",{object:e});for(var o=0;o<r.length;o++){var a=r[o];switch(a.type){case"body":n.removeBody(t,a,i);break;case"constraint":n.removeConstraint(t,a,i);break;case"composite":n.removeComposite(t,a,i);break;case"mouseConstraint":n.removeConstraint(t,a.constraint)}}return s.trigger(t,"afterRemove",{object:e}),t},n.addComposite=function(t,e){return t.composites.push(e),e.parent=t,n.setModified(t,!0,!0,!1),t},n.removeComposite=function(t,e,i){var s=r.indexOf(t.composites,e);if(-1!==s){var o=n.allBodies(e);n.removeCompositeAt(t,s);for(var a=0;a<o.length;a++)o[a].sleepCounter=0}if(i)for(var a=0;a<t.composites.length;a++)n.removeComposite(t.composites[a],e,!0);return t},n.removeCompositeAt=function(t,e){return t.composites.splice(e,1),n.setModified(t,!0,!0,!1),t},n.addBody=function(t,e){return t.bodies.push(e),n.setModified(t,!0,!0,!1),t},n.removeBody=function(t,e,i){var s=r.indexOf(t.bodies,e);if(-1!==s&&(n.removeBodyAt(t,s),e.sleepCounter=0),i)for(var o=0;o<t.composites.length;o++)n.removeBody(t.composites[o],e,!0);return t},n.removeBodyAt=function(t,e){return t.bodies.splice(e,1),n.setModified(t,!0,!0,!1),t},n.addConstraint=function(t,e){return t.constraints.push(e),n.setModified(t,!0,!0,!1),t},n.removeConstraint=function(t,e,i){var s=r.indexOf(t.constraints,e);if(-1!==s&&n.removeConstraintAt(t,s),i)for(var o=0;o<t.composites.length;o++)n.removeConstraint(t.composites[o],e,!0);return t},n.removeConstraintAt=function(t,e){return t.constraints.splice(e,1),n.setModified(t,!0,!0,!1),t},n.clear=function(t,e,i){if(i)for(var s=0;s<t.composites.length;s++)n.clear(t.composites[s],e,!0);return e?t.bodies=t.bodies.filter(function(t){return t.isStatic}):t.bodies.length=0,t.constraints.length=0,t.composites.length=0,n.setModified(t,!0,!0,!1),t},n.allBodies=function(t){if(t.cache&&t.cache.allBodies)return t.cache.allBodies;for(var e=[].concat(t.bodies),i=0;i<t.composites.length;i++)e=e.concat(n.allBodies(t.composites[i]));return t.cache&&(t.cache.allBodies=e),e},n.allConstraints=function(t){if(t.cache&&t.cache.allConstraints)return t.cache.allConstraints;for(var e=[].concat(t.constraints),i=0;i<t.composites.length;i++)e=e.concat(n.allConstraints(t.composites[i]));return t.cache&&(t.cache.allConstraints=e),e},n.allComposites=function(t){if(t.cache&&t.cache.allComposites)return t.cache.allComposites;for(var e=[].concat(t.composites),i=0;i<t.composites.length;i++)e=e.concat(n.allComposites(t.composites[i]));return t.cache&&(t.cache.allComposites=e),e},n.get=function(t,e,i){var s,r;switch(i){case"body":s=n.allBodies(t);break;case"constraint":s=n.allConstraints(t);break;case"composite":s=n.allComposites(t).concat(t)}return s?0===(r=s.filter(function(t){return t.id.toString()===e.toString()})).length?null:r[0]:null},n.move=function(t,e,i){return n.remove(t,e),n.add(i,e),t},n.rebase=function(t){for(var e=n.allBodies(t).concat(n.allConstraints(t)).concat(n.allComposites(t)),i=0;i<e.length;i++)e[i].id=r.nextId();return t},n.translate=function(t,e,i){for(var s=i?n.allBodies(t):t.bodies,r=0;r<s.length;r++)a.translate(s[r],e);return t},n.rotate=function(t,e,i,s){for(var r=Math.cos(e),o=Math.sin(e),h=s?n.allBodies(t):t.bodies,l=0;l<h.length;l++){var u=h[l],d=u.position.x-i.x,c=u.position.y-i.y;a.setPosition(u,{x:i.x+(d*r-c*o),y:i.y+(d*o+c*r)}),a.rotate(u,e)}return t},n.scale=function(t,e,i,s,r){for(var o=r?n.allBodies(t):t.bodies,h=0;h<o.length;h++){var l=o[h],u=l.position.x-s.x,d=l.position.y-s.y;a.setPosition(l,{x:s.x+u*e,y:s.y+d*i}),a.scale(l,e,i)}return t},n.bounds=function(t){for(var e=n.allBodies(t),i=[],s=0;s<e.length;s+=1){var r=e[s];i.push(r.bounds.min,r.bounds.max)}return o.create(i)},n.wrap=function(t,e){var i=o.wrap(n.bounds(t),e);return i&&n.translate(t,i),i}},4372(t,e,i){var n={};t.exports=n;var s=i(69351);n.create=s.create,n.add=s.add,n.remove=s.remove,n.clear=s.clear,n.addComposite=s.addComposite,n.addBody=s.addBody,n.addConstraint=s.addConstraint},52284(t,e,i){var n,s,r,o={};t.exports=o;var a=i(41598),h=i(4506);n=[],s={overlap:0,axis:null},r={overlap:0,axis:null},o.create=function(t,e){return{pair:null,collided:!1,bodyA:t,bodyB:e,parentA:t.parent,parentB:e.parent,depth:0,normal:{x:0,y:0},tangent:{x:0,y:0},penetration:{x:0,y:0},supports:[null,null],supportCount:0}},o.collides=function(t,e,i){if(o._overlapAxes(s,t.vertices,e.vertices,t.axes),s.overlap<=0||(o._overlapAxes(r,e.vertices,t.vertices,e.axes),r.overlap<=0))return null;var n,l,u=i&&i.table[h.id(t,e)];u?l=u.collision:((l=o.create(t,e)).collided=!0,l.bodyA=t.id<e.id?t:e,l.bodyB=t.id<e.id?e:t,l.parentA=l.bodyA.parent,l.parentB=l.bodyB.parent),t=l.bodyA,e=l.bodyB,n=s.overlap<r.overlap?s:r;var d=l.normal,c=l.tangent,f=l.penetration,p=l.supports,g=n.overlap,m=n.axis,v=m.x,x=m.y;v*(e.position.x-t.position.x)+x*(e.position.y-t.position.y)>=0&&(v=-v,x=-x),d.x=v,d.y=x,c.x=-x,c.y=v,f.x=v*g,f.y=x*g,l.depth=g;var y=o._findSupports(t,e,d,1),T=0;if(a.contains(t.vertices,y[0])&&(p[T++]=y[0]),a.contains(t.vertices,y[1])&&(p[T++]=y[1]),T<2){var w=o._findSupports(e,t,d,-1);a.contains(e.vertices,w[0])&&(p[T++]=w[0]),T<2&&a.contains(e.vertices,w[1])&&(p[T++]=w[1])}return 0===T&&(p[T++]=y[0]),l.supportCount=T,l}
1,o._overlapAxes=function(t,e,i,n){var s,r,o,a,h,l,u=e.length,d=i.length,c=e[0].x,f=e[0].y,p=i[0].x,g=i[0].y,m=n.length,v=Number.MAX_VALUE,x=0;for(h=0;h<m;h++){var y=n[h],T=y.x,w=y.y,b=c*T+f*w,S=p*T+g*w,C=b,E=S;for(l=1;l<u;l+=1)(a=e[l].x*T+e[l].y*w)>C?C=a:a<b&&(b=a);for(l=1;l<d;l+=1)(a=i[l].x*T+i[l].y*w)>E?E=a:a<S&&(S=a);if((s=(r=C-S)<(o=E-b)?r:o)<v&&(v=s,x=h,s<=0))break}t.axis=n[x],t.overlap=v},o._findSupports=function(t,e,i,s){var r,o,a,h=e.vertices,l=h.length,u=t.position.x,d=t.position.y,c=i.x*s,f=i.y*s,p=h[0],g=p,m=c*(u-g.x)+f*(d-g.y);for(a=1;a<l;a+=1)(o=c*(u-(g=h[a]).x)+f*(d-g.y))<m&&(m=o,p=g);return(m=c*(u-(r=h[(l+p.index-1)%l]).x)+f*(d-r.y),c*(u-(g=h[(p.index+1)%l]).x)+f*(d-g.y)<m)?(n[0]=p,n[1]=g):(n[0]=p,n[1]=r),n}},43424(t){var e={};t.exports=e,e.create=function(t){return{vertex:t,normalImpulse:0,tangentImpulse:0}}},81388(t,e,i){var n={};t.exports=n;var s=i(53402),r=i(52284);n.create=function(t){return s.extend({bodies:[],collisions:[],pairs:null},t)},n.setBodies=function(t,e){t.bodies=e.slice(0)},n.clear=function(t){t.bodies=[],t.collisions=[]},n.collisions=function(t){var e,i,s=t.pairs,o=t.bodies,a=o.length,h=n.canCollide,l=r.collides,u=t.collisions,d=0;for(o.sort(n._compareBoundsX),e=0;e<a;e++){var c=o[e],f=c.bounds,p=c.bounds.max.x,g=c.bounds.max.y,m=c.bounds.min.y,v=c.isStatic||c.isSleeping,x=c.parts.length,y=1===x;for(i=e+1;i<a;i++){var T=o[i],w=T.bounds;if(w.min.x>p)break;if(!(g<w.min.y)&&!(m>w.max.y)&&(!v||!T.isStatic&&!T.isSleeping)&&h(c.collisionFilter,T.collisionFilter)){var b=T.parts.length;if(y&&1===b){var S=l(c,T,s);S&&(u[d++]=S)}else for(var C=+(x>1),E=+(b>1),A=C;A<x;A++)for(var _=c.parts[A],f=_.bounds,M=E;M<b;M++){var R=T.parts[M],w=R.bounds;if(!(f.min.x>w.max.x)&&!(f.max.x<w.min.x)&&!(f.max.y<w.min.y)&&!(f.min.y>w.max.y)){var S=l(_,R,s);S&&(u[d++]=S)}}}}}return u.length!==d&&(u.length=d),u},n.canCollide=function(t,e){return t.group===e.group&&0!==t.group?t.group>0:(t.mask&e.category)!=0&&(e.mask&t.category)!=0},n._compareBoundsX=function(t,e){return t.bounds.min.x-e.bounds.min.x}},4506(t,e,i){var n={};t.exports=n;var s=i(43424);n.create=function(t,e){var i=t.bodyA,r=t.bodyB,o={id:n.id(i,r),bodyA:i,bodyB:r,collision:t,contacts:[s.create(),s.create()],contactCount:0,separation:0,isActive:!0,isSensor:i.isSensor||r.isSensor,timeCreated:e,timeUpdated:e,inverseMass:0,friction:0,frictionStatic:0,restitution:0,slop:0};return n.update(o,t,e),o},n.update=function(t,e,i){var n=e.supports,s=e.supportCount,r=t.contacts,o=e.parentA,a=e.parentB;t.isActive=!0,t.timeUpdated=i,t.collision=e,t.separation=e.depth,t.inverseMass=o.inverseMass+a.inverseMass,t.friction=o.friction<a.friction?o.friction:a.friction,t.frictionStatic=o.frictionStatic>a.frictionStatic?o.frictionStatic:a.frictionStatic,t.restitution=o.restitution>a.restitution?o.restitution:a.restitution,t.slop=o.slop>a.slop?o.slop:a.slop,t.contactCount=s,e.pair=t;var h=n[0],l=r[0],u=n[1],d=r[1];(d.vertex===h||l.vertex===u)&&(r[1]=l,r[0]=l=d,d=r[1]),l.vertex=h,d.vertex=u},n.setActive=function(t,e,i){e?(t.isActive=!0,t.timeUpdated=i):(t.isActive=!1,t.contactCount=0)},n.id=function(t,e){return t.id<e.id?t.id.toString(36)+":"+e.id.toString(36):e.id.toString(36)+":"+t.id.toString(36)}}
vendor: 21,273 bytes, line 1
1,99561(t,e,i){var n={};t.exports=n;var s=i(4506),r=i(53402);n.create=function(t){return r.extend({table:{},list:[],collisionStart:[],collisionActive:[],collisionEnd:[]},t)},n.update=function(t,e,i){var n,r,o,a=s.update,h=s.create,l=s.setActive,u=t.table,d=t.list,c=d.length,f=c,p=t.collisionStart,g=t.collisionEnd,m=t.collisionActive,v=e.length,x=0,y=0,T=0;for(o=0;o<v;o++)(r=(n=e[o]).pair)?(r.isActive&&(m[T++]=r),a(r,n,i)):(u[(r=h(n,i)).id]=r,p[x++]=r,d[f++]=r);for(o=0,f=0,c=d.length;o<c;o++)(r=d[o]).timeUpdated>=i?d[f++]=r:(l(r,!1,i),r.collision.bodyA.sleepCounter>0&&r.collision.bodyB.sleepCounter>0?d[f++]=r:(g[y++]=r,delete u[r.id]));d.length!==f&&(d.length=f),p.length!==x&&(p.length=x),g.length!==y&&(g.length=y),m.length!==T&&(m.length=T)},n.clear=function(t){return t.table={},t.list.length=0,t.collisionStart.length=0,t.collisionActive.length=0,t.collisionEnd.length=0,t}},73296(t,e,i){var n={};t.exports=n;var s=i(31725),r=i(52284),o=i(15647),a=i(66280),h=i(41598);n.collides=function(t,e){for(var i=[],n=e.length,s=t.bounds,a=r.collides,h=o.overlaps,l=0;l<n;l++){var u=e[l],d=u.parts.length,c=+(1!==d);if(t!==u&&h(u.bounds,s))for(var f=c;f<d;f++){var p=u.parts[f];if(h(p.bounds,s)){var g=a(p,t);if(g){i.push(g);break}}}}return i},n.ray=function(t,e,i,r){r=r||1e-100;for(var o=s.angle(e,i),h=s.magnitude(s.sub(e,i)),l=(i.x+e.x)*.5,u=(i.y+e.y)*.5,d=a.rectangle(l,u,h,r,{angle:o}),c=n.collides(d,t),f=0;f<c.length;f+=1){var p=c[f];p.body=p.bodyB=p.bodyA}return c},n.region=function(t,e,i){for(var n=[],s=0;s<t.length;s++){var r=t[s],a=o.overlaps(r.bounds,e);(a&&!i||!a&&i)&&n.push(r)}return n},n.point=function(t,e){for(var i=[],n=0;n<t.length;n++){var s=t[n];if(o.contains(s.bounds,e))for(var r=+(1!==s.parts.length);r<s.parts.length;r++){var a=s.parts[r];if(o.contains(a.bounds,e)&&h.contains(a.vertices,e)){i.push(s);break}}}return i}},66272(t,e,i){var n={};t.exports=n;var s=i(41598),r=i(53402),o=i(15647);n._restingThresh=2,n._restingThreshTangent=Math.sqrt(6),n._positionDampen=.9,n._positionWarming=.8,n._frictionNormalMultiplier=5,n._frictionMaxStatic=Number.MAX_VALUE,n.preSolvePosition=function(t){var e,i,n,s=t.length;for(e=0;e<s;e++)(i=t[e]).isActive&&(n=i.contactCount,i.collision.parentA.totalContacts+=n,i.collision.parentB.totalContacts+=n)},n.solvePosition=function(t,e,i){var s,o,a,h,l,u,d,c,f=n._positionDampen*(i||1),p=r.clamp(e/r._baseDelta,0,1),g=t.length;for(s=0;s<g;s++)(o=t[s]).isActive&&!o.isSensor&&(h=(a=o.collision).parentA,l=a.parentB,u=a.normal,o.separation=a.depth+u.x*(l.positionImpulse.x-h.positionImpulse.x)+u.y*(l.positionImpulse.y-h.positionImpulse.y));for(s=0;s<g;s++)(o=t[s]).isActive&&!o.isSensor&&(h=(a=o.collision).parentA,l=a.parentB,u=a.normal,c=o.separation-o.slop*p,(h.isStatic||l.isStatic)&&(c*=2),h.isStatic||h.isSleeping||(d=f/h.totalContacts,h.positionImpulse.x+=u.x*c*d,h.positionImpulse.y+=u.y*c*d),l.isStatic||l.isSleeping||(d=f/l.totalContacts,l.positionImpulse.x-=u.x*c*d,l.positionImpulse.y-=u.y*c*d))},n.postSolvePosition=function(t){for(var e=n._positionWarming,i=t.length,r=s.translate,a=o.update,h=0;h<i;h++){var l=t[h],u=l.positionImpulse,d=u.x,c=u.y,f=l.velocity;if(l.totalContacts=0,0!==d||0!==c){for(var p=0;p<l.parts.length;p++){var g=l.parts[p];r(g.vertices,u),a(g.bounds,g.vertices,f),g.position.x+=d,g.position.y+=c}l.positionPrev.x+=d,l.positionPrev.y+=c,d*f.x+c*f.y<0?(u.x=0,u.y=0):(u.x*=e,u.y*=e)}}},n.preSolveVelocity=function(t){var e,i,n=t.length;for(e=0;e<n;e++){var s=t[e];if(s.isActive&&!s.isSensor){var r=s.contacts,o=s.contactCount,a=s.collision,h=a.parentA,l=a.parentB,u=a.normal,d=a.tangent;for(i=0;i<o;i++){var c=r[i],f=c.vertex,p=c.normalImpulse,g=c.tangentImpulse;if(0!==p||0!==g){var m=u.x*p+d.x*g,v=u.y*p+d.y*g;h.isStatic||h.isSleeping||(h.positionPrev.x+=m*h.inverseMass,h.positionPrev.y+=v*h.inverseMass,h.anglePrev+=h.inverseInertia*((f.x-h.position.x)*v-(f.y-h.position.y)*m)),l.isStatic||l.isSleeping||(l.positionPrev.x-=m*l.inverseMass,l.positionPrev.y-=v*l.inverseMass,l.anglePrev-=l.inverseInertia*((f.x-l.position.x)*v-(f.y-l.position.y)*m))}}}}},n.solveVelocity=function(t,e){var i,s,o,a,h=e/r._baseDelta,l=h*h*h,u=-n._restingThresh*h,d=n._restingThreshTangent,c=n._frictionNormalMultiplier*h,f=n._frictionMaxStatic,p=t.length;for(o=0;o<p;o++){var g=t[o];if(g.isActive&&!g.isSensor){var m=g.collision,v=m.parentA,x=m.parentB,y=m.normal.x,T=m.normal.y,w=m.tangent.x,b=m.tangent.y,S=g.inverseMass,C=g.friction*g.frictionStatic*c,E=g.contacts,A=g.contactCount,_=1/A,M=v.position.x-v.positionPrev.x,R=v.position.y-v.positionPrev.y,O=v.angle-v.anglePrev,P=x.position.x-x.positionPrev.x,L=x.position.y-x.positionPrev.y,D=x.angle-x.anglePrev;for(a=0;a<A;a++){var F=E[a],I=F.vertex,N=I.x-v.position.x,B=I.y-v.position.y,k=I.x-x.position.x,U=I.y-x.position.y,z=M-B*O-(P-U*D),Y=R+N*O-(L+k*D),X=y*z+T*Y,W=w*z+b*Y,G=g.separation+X,V=Math.min(G,1),H=(V=G<0?0:V)*C;W<-H||W>H?(s=W>0?W:-W,(i=g.friction*(W>0?1:-1)*l)<-s?i=-s:i>s&&(i=s)):(i=W,s=f);var j=N*T-B*y,q=k*T-U*y,K=_/(S+v.inverseInertia*j*j+x.inverseInertia*q*q),Z=(1+g.restitution)*X*K;if(i*=K,X<u)F.normalImpulse=0;else{var Q=F.normalImpulse;F.normalImpulse+=Z,F.normalImpulse>0&&(F.normalImpulse=0),Z=F.normalImpulse-Q}if(W<-d||W>d)F.tangentImpulse=0;else{var J=F.tangentImpulse;F.tangentImpulse+=i,F.tangentImpulse<-s&&(F.tangentImpulse=-s),F.tangentImpulse>s&&(F.tangentImpulse=s),i=F.tangentImpulse-J}var $=y*Z+w*i,tt=T*Z+b*i;v.isStatic||v.isSleeping||(v.positionPrev.x+=$*v.inverseMass,v.positionPrev.y+=tt*v.inverseMass,v.anglePrev+=(N*tt-B*$)*v.inverseInertia),x.isStatic||x.isSleeping||(x.positionPrev.x-=$*x.inverseMass,x.positionPrev.y-=tt*x.inverseMass,x.anglePrev-=(k*tt-U*$)*x.inverseInertia)}}}}},48140(t,e,i){var n={};t.exports=n;var s=i(41598),r=i(31725),o=i(53614),a=i(15647),h=i(66615),l=i(53402);n._warming=.4,n._torqueDampen=1,n._minLength=1e-6,n.create=function(t){t.bodyA&&!t.pointA&&(t.pointA={x:0,y:0}),t.bodyB&&!t.pointB&&(t.pointB={x:0,y:0});var e=t.bodyA?r.add(t.bodyA.position,t.pointA):t.pointA,i=t.bodyB?r.add(t.bodyB.position,t.pointB):t.pointB,n=r.magnitude(r.sub(e,i));t.length=void 0!==t.length?t.length:n,t.id=t.id||l.nextId(),t.label=t.label||"Constraint",t.type="constraint",t.stiffness=t.stiffness||(t.length>0?1:.7),t.damping=t.damping||0,t.angularStiffness=t.angularStiffness||0,t.angleA=t.bodyA?t.bodyA.angle:t.angleA,t.angleB=t.bodyB?t.bodyB.angle:t.angleB,t.plugin={};var s={visible:!0,type:"line",anchors:!0,lineColor:null,lineOpacity:null,lineThickness:null,pinSize:null,anchorColor:null,anchorSize:null};return 0===t.length&&t.stiffness>.1?(s.type="pin",s.anchors=!1):t.stiffness<.9&&(s.type="spring"),t.render=l.extend(s,t.render),t},n.preSolveAll=function(t){for(var e=0;e<t.length;e+=1){var i=t[e],n=i.constraintImpulse;i.isStatic||0===n.x&&0===n.y&&0===n.angle||(i.position.x+=n.x,i.position.y+=n.y,i.angle+=n.angle)}},n.solveAll=function(t,e){for(var i=l.clamp(e/l._baseDelta,0,1),s=0;s<t.length;s+=1){var r=t[s],o=!r.bodyA||r.bodyA&&r.bodyA.isStatic,a=!r.bodyB||r.bodyB&&r.bodyB.isStatic;(o||a)&&n.solve(t[s],i)}for(s=0;s<t.length;s+=1)o=!(r=t[s]).bodyA||r.bodyA&&r.bodyA.isStatic,a=!r.bodyB||r.bodyB&&r.bodyB.isStatic,o||a||n.solve(t[s],i)},n.solve=function(t,e){var i=t.bodyA,s=t.bodyB,o=t.pointA,a=t.pointB;if(i||s){i&&!i.isStatic&&(r.rotate(o,i.angle-t.angleA,o),t.angleA=i.angle),s&&!s.isStatic&&(r.rotate(a,s.angle-t.angleB,a),t.angleB=s.angle);var h=o,l=a;if(i&&(h=r.add(i.position,o)),s&&(l=r.add(s.position,a)),h&&l){var u=r.sub(h,l),d=r.magnitude(u);d<n._minLength&&(d=n._minLength);var c,f,p,g,m,v=(d-t.length)/d,x=t.stiffness>=1||0===t.length?t.stiffness*e:t.stiffness*e*e,y=t.damping*e,T=r.mult(u,v*x),w=(i?i.inverseMass:0)+(s?s.inverseMass:0),b=w+((i?i.inverseInertia:0)+(s?s.inverseInertia:0));if(y>0){var S=r.create();p=r.div(u,d),m=r.sub(s&&r.sub(s.position,s.positionPrev)||S,i&&r.sub(i.position,i.positionPrev)||S),g=r.dot(p,m)}i&&!i.isStatic&&(f=i.inverseMass/w,i.constraintImpulse.x-=T.x*f,i.constraintImpulse.y-=T.y*f,i.position.x-=T.x*f,i.position.y-=T.y*f,y>0&&(i.positionPrev.x-=y*p.x*g*f,i.positionPrev.y-=y*p.y*g*f),c=r.cross(o,T)/b*n._torqueDampen*i.inverseInertia*(1-t.angularStiffness),i.constraintImpulse.angle-=c,i.angle-=c),s&&!s.isStatic&&(f=s.inverseMass/w,s.constraintImpulse.x+=T.x*f,s.constraintImpulse.y+=T.y*f,s.position.x+=T.x*f,s.position.y+=T.y*f,y>0&&(s.positionPrev.x+=y*p.x*g*f,s.positionPrev.y+=y*p.y*g*f),c=r.cross(a,T)/b*n._torqueDampen*s.inverseInertia*(1-t.angularStiffness),s.constraintImpulse.angle+=c,s.angle+=c)}}},n.postSolveAll=function(t){for(var e=0;e<t.length;e++){var i=t[e],l=i.constraintImpulse;if(!i.isStatic&&(0!==l.x||0!==l.y||0!==l.angle)){o.set(i,!1);for(var u=0;u<i.parts.length;u++){var d=i.parts[u];s.translate(d.vertices,l),u>0&&(d.position.x+=l.x,d.position.y+=l.y),0!==l.angle&&(s.rotate(d.vertices,l.angle,i.position),h.rotate(d.axes,l.angle),u>0&&r.rotateAbout(d.position,l.angle,i.position,d.position)),a.update(d.bounds,d.vertices,i.velocity)}l.angle*=n._warming,l.x*=n._warming,l.y*=n._warming}}},n.pointAWorld=function(t){return{x:(t.bodyA?t.bodyA.position.x:0)+(t.pointA?t.pointA.x:0),y:(t.bodyA?t.bodyA.position.y:0)+(t.pointA?t.pointA.y:0)}},n.pointBWorld=function(t){return{x:(t.bodyB?t.bodyB.position.x:0)+(t.pointB?t.pointB.x:0),y:(t.bodyB?t.bodyB.position.y:0)+(t.pointB?t.pointB.y:0)}},n.currentLength=function(t){var e=(t.bodyA?t.bodyA.position.x:0)+(t.pointA?t.pointA.x:0),i=(t.bodyA?t.bodyA.position.y:0)+(t.pointA?t.pointA.y:0),n=(t.bodyB?t.bodyB.position.x:0)+(t.pointB?t.pointB.x:0),s=(t.bodyB?t.bodyB.position.y:0)+(t.pointB?t.pointB.y:0),r=e-n,o=i-s;return Math.sqrt(r*r+o*o)}},53402(t,e,i){var n,s={};t.exports=s,s._baseDelta=1e3/60,s._nextId=0,s._seed=0,s._nowStartTime=+new Date,s._warnedOnce={},s._decomp=null,s.extend=function(t,e){var i,n;"boolean"==typeof e?(i=2,n=e):(i=1,n=!0);for(var r=i;r<arguments.length;r++){var o=arguments[r];if(o)for(var a in o)n&&o[a]&&o[a].constructor===Object?t[a]&&t[a].constructor!==Object?t[a]=o[a]:(t[a]=t[a]||{},s.extend(t[a],n,o[a])):t[a]=o[a]}return t},s.clone=function(t,e){return s.extend({},e,t)},s.keys=function(t){if(Object.keys)return Object.keys(t);var e=[];for(var i in t)e.push(i);return e},s.values=function(t){var e=[];if(Object.keys){for(var i=Object.keys(t),n=0;n<i.length;n++)e.push(t[i[n]]);return e}for(var s in t)e.push(t[s]);return e},s.get=function(t,e,i,n){e=e.split(".").slice(i,n);for(var s=0;s<e.length;s+=1)t=t[e[s]];return t},s.set=function(t,e,i,n,r){var o=e.split(".").slice(n,r);return s.get(t,e,0,-1)[o[o.length-1]]=i,i},s.shuffle=function(t){for(var e=t.length-1;e>0;e--){var i=Math.floor(s.random()*(e+1)),n=t[e];t[e]=t[i],t[i]=n}return t},s.choose=function(t){return t[Math.floor(s.random()*t.length)]},s.isElement=function(t){return"u">typeof HTMLElement?t instanceof HTMLElement:!!(t&&t.nodeType&&t.nodeName)},s.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)},s.isFunction=function(t){return"function"==typeof t},s.isPlainObject=function(t){return"object"==typeof t&&t.constructor===Object},s.isString=function(t){return"[object String]"===toString.call(t)},s.clamp=function(t,e,i){return t<e?e:t>i?i:t},s.sign=function(t){return t<0?-1:1},s.now=function(){if("u">typeof window&&window.performance){if(window.performance.now)return window.performance.now();else if(window.performance.webkitNow)return window.performance.webkitNow()}return Date.now?Date.now():new Date-s._nowStartTime},s.random=function(t,e){return e=void 0!==e?e:1,(t=void 0!==t?t:0)+n()*(e-t)},n=function(){return s._seed=(9301*s._seed+49297)%233280,s._seed/233280},s.colorToNumber=function(t){return 3==(t=t.replace("#","")).length&&(t=t.charAt(0)+t.charAt(0)+t.charAt(1)+t.charAt(1)+t.charAt(2)+t.charAt(2)),parseInt(t,16)},s.logLevel=1,s.log=function(){console&&s.logLevel>0&&s.logLevel<=3&&console.log.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},s.info=function(){console&&s.logLevel>0&&s.logLevel<=2&&console.info.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},s.warn=function(){console&&s.logLevel>0&&s.logLevel<=3&&console.warn.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},s.warnOnce=function(){var t=Array.prototype.slice.call(arguments).join(" ");s._warnedOnce[t]||(s.warn(t),s._warnedOnce[t]=!0)},s.deprecated=function(t,e,i){t[e]=s.chain(function(){s.warnOnce("\uD83D\uDD05 deprecated \uD83D\uDD05",i)},t[e])},s.nextId=function(){return s._nextId++},s.indexOf=function(t,e){if(t.indexOf)return t.indexOf(e);for(var i=0;i<t.length;i++)if(t[i]===e)return i;return -1},s.map=function(t,e){if(t.map)return t.map(e);for(var i=[],n=0;n<t.length;n+=1)i.push(e(t[n]));return i},s.topologicalSort=function(t){var e=[],i=[],n=[];for(var r in t)i[r]||n[r]||s._topologicalSort(r,i,n,t,e);return e},s._topologicalSort=function(t,e,i,n,r){var o=n[t]||[];i[t]=!0;for(var a=0;a<o.length;a+=1){var h=o[a];!i[h]&&(e[h]||s._topologicalSort(h,e,i,n,r))}i[t]=!1,e[t]=!0,r.push(t)},s.chain=function(){for(var t=[],e=0;e<arguments.length;e+=1){var i=arguments[e];i._chained?t.push.apply(t,i._chained):t.push(i)}var n=function(){for(var e,i=Array(arguments.length),n=0,s=arguments.length;n<s;n++)i[n]=arguments[n];for(n=0;n<t.length;n+=1){var r=t[n].apply(e,i);void 0!==r&&(e=r)}return e};return n._chained=t,n},s.chainPathBefore=function(t,e,i){return s.set(t,e,s.chain(i,s.get(t,e)))},s.chainPathAfter=function(t,e,i){return s.set(t,e,s.chain(s.get(t,e),i))},s.setDecomp=function(t){s._decomp=t},s.getDecomp=function(){var t=s._decomp;try{!t&&"u">typeof window&&(t=window.decomp),t||void 0===i.g||(t=i.g.decomp)}catch(e){t=null}return t}},48413(t,e,i){var n={};t.exports=n;var s=i(53614),r=i(66272),o=i(81388),a=i(99561),h=i(35810),l=i(69351),u=i(48140),d=i(53402),c=i(22562);n._deltaMax=1e3/60,n.create=function(t){t=t||{};var e=d.extend({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}},t);return e.world=t.world||l.create({label:"World"}),e.pairs=t.pairs||a.create(),e.detector=t.detector||o.create(),e.detector.pairs=e.pairs,e.grid={buckets:[]},e.world.gravity=e.gravity,e.broadphase=e.grid,e.metrics={},e},n.update=function(t,e){var i,c=d.now(),f=t.world,p=t.detector,g=t.pairs,m=t.timing,v=m.timestamp;e>n._deltaMax&&d.warnOnce("Matter.Engine.update: delta argument is recommended to be less than or equal to",n._deltaMax.toFixed(3),"ms."),e=(void 0!==e?e:d._baseDelta)*m.timeScale,m.timestamp+=e,m.lastDelta=e;var x={timestamp:m.timestamp,delta:e};h.trigger(t,"beforeUpdate",x);var y=l.allBodies(f),T=l.allConstraints(f),w=l.allComposites(f);for(f.isModified&&(o.setBodies(p,y),l.setModified(f,!1,!1,!0)),t.enableSleeping&&s.update(y,e),n._bodiesApplyGravity(y,t.gravity),n.wrap(y,w),n.attractors(y),e>0&&n._bodiesUpdate(y,e),h.trigger(t,"beforeSolve",x),u.preSolveAll(y),i=0;i<t.constraintIterations;i++)u.solveAll(T,e);u.postSolveAll(y);var b=o.collisions(p);a.update(g,b,v),t.enableSleeping&&s.afterCollisions(g.list),g.collisionStart.length>0&&h.trigger(t,"collisionStart",{pairs:g.collisionStart,timestamp:m.timestamp,delta:e});var S=d.clamp(20/t.positionIterations,0,1);for(r.preSolvePosition(g.list),i=0;i<t.positionIterations;i++)r.solvePosition(g.list,e,S);for(r.postSolvePosition(y),u.preSolveAll(y),i=0;i<t.constraintIterations;i++)u.solveAll(T,e);for(u.postSolveAll(y),r.preSolveVelocity(g.list),i=0;i<t.velocityIterations;i++)r.solveVelocity(g.list,e);return n._bodiesUpdateVelocities(y),g.collisionActive.length>0&&h.trigger(t,"collisionActive",{pairs:g.collisionActive,timestamp:m.timestamp,delta:e}),g.collisionEnd.length>0&&h.trigger(t,"collisionEnd",{pairs:g.collisionEnd,timestamp:m.timestamp,delta:e}),n._bodiesClearForces(y),h.trigger(t,"afterUpdate",x),t.timing.lastElapsed=d.now()-c,t},n.merge=function(t,e){if(d.extend(t,e),e.world){t.world=e.world,n.clear(t);for(var i=l.allBodies(t.world),r=0;r<i.length;r++){var o=i[r];s.set(o,!1),o.id=d.nextId()}}},n.clear=function(t){a.clear(t.pairs),o.clear(t.detector)},n._bodiesClearForces=function(t){for(var e=t.length,i=0;i<e;i++){var n=t[i];n.force.x=0,n.force.y=0,n.torque=0}},n._bodiesApplyGravity=function(t,e){var i=void 0!==e.scale?e.scale:.001,n=t.length;if((0!==e.x||0!==e.y)&&0!==i)for(var s=0;s<n;s++){var r=t[s];r.ignoreGravity||r.isStatic||r.isSleeping||(r.force.y+=r.mass*e.y*i,r.force.x+=r.mass*e.x*i)}},n._bodiesUpdate=function(t,e){for(var i=t.length,n=0;n<i;n++){var s=t[n];s.isStatic||s.isSleeping||c.update(s,e)}},n._bodiesUpdateVelocities=function(t){for(var e=t.length,i=0;i<e;i++)c.updateVelocities(t[i])},n.wrap=function(t,e){for(var i=0;i<t.length;i+=1){var n=t[i];null!==n.wrapBounds&&c.wrap(n,n.wrapBounds)}for(i=0;i<e.length;i+=1){var s=e[i];null!==s.wrapBounds&&l.wrap(s,s.wrapBounds)}},n.attractors=function(t){for(var e=0;e<t.length;e++){var i=t[e],n=i.attractors;if(n&&n.length>0)for(var s=0;s<t.length;s++){var r=t[s];if(e!==s)for(var o=0;o<n.length;o++){var a=n[o],h=a;d.isFunction(a)&&(h=a(i,r)),h&&c.applyForce(r,r.position,h)}}}}},35810(t,e,i){var n={};t.exports=n;var s=i(53402);n.on=function(t,e,i){for(var n,s=e.split(" "),r=0;r<s.length;r++)n=s[r],t.events=t.events||{},t.events[n]=t.events[n]||[],t.events[n].push(i);return i},n.off=function(t,e,i){if(!e){t.events={};return}"function"==typeof e&&(i=e,e=s.keys(t.events).join(" "));for(var n=e.split(" "),r=0;r<n.length;r++){var o=t.events[n[r]],a=[];if(i&&o)for(var h=0;h<o.length;h++)o[h]!==i&&a.push(o[h]);t.events[n[r]]=a}},n.trigger=function(t,e,i){var n,r,o,a,h=t.events;if(h&&s.keys(h).length>0){i||(i={}),n=e.split(" ");for(var l=0;l<n.length;l++)if(o=h[r=n[l]]){(a=s.clone(i,!1)).name=r,a.source=t;for(var u=0;u<o.length;u++)o[u].apply(t,[a])}}}},6790(t,e,i){var n={};t.exports=n;var s=i(73832),r=i(53402);n.name="matter-js",n.version="0.20.0",n.uses=[],n.used=[],n.use=function(){s.use(n,Array.prototype.slice.call(arguments))},n.before=function(t,e){return t=t.replace(/^Matter./,""),r.chainPathBefore(n,t,e)},n.after=function(t,e){return t=t.replace(/^Matter./,""),r.chainPathAfter(n,t,e)}},73832(t,e,i){var n={};t.exports=n;var s=i(53402);n._registry={},n.register=function(t){if(n.isPlugin(t)||s.warn("Plugin.register:",n.toString(t),"does not implement all required fields."),t.name in n._registry){var e=n._registry[t.name],i=n.versionParse(t.version).number,r=n.versionParse(e.version).number;i>r?(s.warn("Plugin.register:",n.toString(e),"was upgraded to",n.toString(t)),n._registry[t.name]=t):i<r?s.warn("Plugin.register:",n.toString(e),"can not be downgraded to",n.toString(t)):t!==e&&s.warn("Plugin.register:",n.toString(t),"is already registered to different plugin object")}else n._registry[t.name]=t;return t},n.resolve=function(t){return n._registry[n.dependencyParse(t).name]},n.toString=function(t){return"string"==typeof t?t:(t.name||"anonymous")+"@"+(t.version||t.range||"0.0.0")},n.isPlugin=function(t){return t&&t.name&&t.version&&t.install},n.isUsed=function(t,e){return t.used.indexOf(e)>-1},n.isFor=function(t,e){var i=t.for&&n.dependencyParse(t.for);return!t.for||e.name===i.name&&n.versionSatisfies(e.version,i.range)},n.use=function(t,e){if(t.uses=(t.uses||[]).concat(e||[]),0===t.uses.length)return void s.warn("Plugin.use:",n.toString(t),"does not specify any dependencies to install.");for(var i=n.dependencies(t),r=s.topologicalSort(i),o=[],a=0;a<r.length;a+=1)if(r[a]!==t.name){var h=n.resolve(r[a]);if(!h){o.push("â "+r[a]);continue}n.isUsed(t,h.name)||(n.isFor(h,t)||(s.warn("Plugin.use:",n.toString(h),"is for",h.for,"but installed on",n.toString(t)+"."),h._warned=!0),h.install?h.install(t):(s.warn("Plugin.use:",n.toString(h),"does not specify an install function."),h._warned=!0),h._warned?(o.push("\uD83D\uDD36 "+n.toString(h)),delete h._warned):o.push("â
"+n.toString(h)),t.used.push(h.name))}o.length>0&&!h.silent&&s.info(o.join(" "))},n.dependencies=function(t,e){var i=n.dependencyParse(t),r=i.name;if(!(r in(e=e||{}))){t=n.resolve(t)||t,e[r]=s.map(t.uses||[],function(e){n.isPlugin(e)&&n.register(e);var r=n.dependencyParse(e),o=n.resolve(e);return o&&!n.versionSatisfies(o.version,r.range)?(s.warn("Plugin.dependencies:",n.toString(o),"does not satisfy",n.toString(r),"used by",n.toString(i)+"."),o._warned=!0,t._warned=!0):o||(s.warn("Plugin.dependencies:",n.toString(e),"used by",n.toString(i),"could not be resolved."),t._warned=!0),r.name});for(var o=0;o<e[r].length;o+=1)n.dependencies(e[r][o],e);return e}},n.dependencyParse=function(t){return s.isString(t)?(/^[\w-]+(@(\*|[\^~]?\d+\.\d+\.\d+(-[0-9A-Za-z-+]+)?))?$/.test(t)||s.warn("Plugin.dependencyParse:",t,"is not a valid dependency string."),{name:t.split("@")[0],range:t.split("@")[1]||"*"}):{name:t.name,range:t.range||t.version}},n.versionParse=function(t){var e=/^(\*)|(\^|~|>=|>)?\s*((\d+)\.(\d+)\.(\d+))(-[0-9A-Za-z-+]+)?$/;e.test(t)||s.warn("Plugin.versionParse:",t,"is not a valid version or range.");var i=e.exec(t),n=Number(i[4]),r=Number(i[5]),o=Number(i[6]);return{isRange:!!(i[1]||i[2]),version:i[3],range:t,operator:i[1]||i[2]||"",major:n,minor:r,patch:o,parts:[n,r,o],prerelease:i[7],number:1e8*n+1e4*r+o}},n.versionSatisfies=function(t,e){e=e||"*";var i=n.versionParse(e),s=n.versionParse(t);if(i.isRange){if("*"===i.operator||"*"===t)return!0;
1if(">"===i.operator)return s.number>i.number;if(">="===i.operator)return s.number>=i.number;if("~"===i.operator)return s.major===i.major&&s.minor===i.minor&&s.patch>=i.patch;if("^"===i.operator)return i.major>0?s.major===i.major&&s.number>=i.number:i.minor>0?s.minor===i.minor&&s.patch>=i.patch:s.patch===i.patch}return t===e||"*"===t}},13037(t,e,i){var n,s={};t.exports=s;var r=i(35810),o=i(48413),a=i(53402);s._maxFrameDelta=1e3/15,s._frameDeltaFallback=1e3/60,s._timeBufferMargin=1.5,s._elapsedNextEstimate=1,s._smoothingLowerBound=.1,s._smoothingUpperBound=.9,s.create=function(t){var e=a.extend({delta:1e3/60,frameDelta:null,frameDeltaSmoothing:!0,frameDeltaSnapping:!0,frameDeltaHistory:[],frameDeltaHistorySize:100,frameRequestId:null,timeBuffer:0,timeLastTick:null,maxUpdates:null,maxFrameTime:1e3/30,lastUpdatesDeferred:0,enabled:!0},t);return e.fps=0,e},s.run=function(t,e){return t.timeBuffer=s._frameDeltaFallback,!function i(n){t.frameRequestId=s._onNextFrame(t,i),n&&t.enabled&&s.tick(t,e,n)}(),t},s.tick=function(t,e,i){var h=a.now(),l=t.delta,u=0,d=i-t.timeLastTick;if((!d||!t.timeLastTick||d>Math.max(s._maxFrameDelta,t.maxFrameTime))&&(d=t.frameDelta||s._frameDeltaFallback),t.frameDeltaSmoothing){t.frameDeltaHistory.push(d),t.frameDeltaHistory=t.frameDeltaHistory.slice(-t.frameDeltaHistorySize);var c=t.frameDeltaHistory.slice(0).sort();d=n(t.frameDeltaHistory.slice(c.length*s._smoothingLowerBound,c.length*s._smoothingUpperBound))||d}t.frameDeltaSnapping&&(d=1e3/Math.round(1e3/d)),t.frameDelta=d,t.timeLastTick=i,t.timeBuffer+=t.frameDelta,t.timeBuffer=a.clamp(t.timeBuffer,0,t.frameDelta+l*s._timeBufferMargin),t.lastUpdatesDeferred=0;var f=t.maxUpdates||Math.ceil(t.maxFrameTime/l),p={timestamp:e.timing.timestamp};r.trigger(t,"beforeTick",p),r.trigger(t,"tick",p);for(var g=a.now();l>0&&t.timeBuffer>=l*s._timeBufferMargin;){r.trigger(t,"beforeUpdate",p),o.update(e,l),r.trigger(t,"afterUpdate",p),t.timeBuffer-=l,u+=1;var m=a.now()-h,v=a.now()-g,x=m+s._elapsedNextEstimate*v/u;if(u>=f||x>t.maxFrameTime){t.lastUpdatesDeferred=Math.round(Math.max(0,t.timeBuffer/l-s._timeBufferMargin));break}}e.timing.lastUpdatesPerFrame=u,r.trigger(t,"afterTick",p),t.frameDeltaHistory.length>=100&&(t.lastUpdatesDeferred&&Math.round(t.frameDelta/l)>f?a.warnOnce("Matter.Runner: runner reached runner.maxUpdates, see docs."):t.lastUpdatesDeferred&&a.warnOnce("Matter.Runner: runner reached runner.maxFrameTime, see docs."),void 0!==t.isFixed&&a.warnOnce("Matter.Runner: runner.isFixed is now redundant, see docs."),(t.deltaMin||t.deltaMax)&&a.warnOnce("Matter.Runner: runner.deltaMin and runner.deltaMax were removed, see docs."),0!==t.fps&&a.warnOnce("Matter.Runner: runner.fps was replaced by runner.delta, see docs."))},s.stop=function(t){s._cancelNextFrame(t)},s._onNextFrame=function(t,e){if("u">typeof window&&window.requestAnimationFrame)t.frameRequestId=window.requestAnimationFrame(e);else throw Error("Matter.Runner: missing required global window.requestAnimationFrame.");return t.frameRequestId},s._cancelNextFrame=function(t){if("u">typeof window&&window.cancelAnimationFrame)window.cancelAnimationFrame(t.frameRequestId);else throw Error("Matter.Runner: missing required global window.cancelAnimationFrame.")},s._mean=n=function(t){for(var e=0,i=t.length,n=0;n<i;n+=1)e+=t[n];return e/i||0}},53614(t,e,i){var n={};t.exports=n;var s=i(22562),r=i(35810),o=i(53402);n._motionWakeThreshold=.18,n._motionSleepThreshold=.08,n._minBias=.9,n.update=function(t,e){for(var i=e/o._baseDelta,r=n._motionSleepThreshold,a=0;a<t.length;a++){var h=t[a],l=s.getSpeed(h),u=s.getAngularSpeed(h),d=l*l+u*u;if(0!==h.force.x||0!==h.force.y){n.set(h,!1);continue}var c=Math.min(h.motion,d),f=Math.max(h.motion,d);h.motion=n._minBias*c+(1-n._minBias)*f,h.sleepThreshold>0&&h.motion<r?(h.sleepCounter+=1,h.sleepCounter>=h.sleepThreshold/i&&n.set(h,!0)):h.sleepCounter>0&&(h.sleepCounter-=1)}},n.afterCollisions=function(t){for(var e=n._motionSleepThreshold,i=0;i<t.length;i++){var s=t[i];if(s.isActive){var r=s.collision,o=r.bodyA.parent,a=r.bodyB.parent;if((!o.isSleeping||!a.isSleeping)&&!o.isStatic&&!a.isStatic&&(o.isSleeping||a.isSleeping)){var h=o.isSleeping&&!o.isStatic?o:a,l=h===o?a:o;!h.isStatic&&l.motion>e&&n.set(h,!1)}}}},n.set=function(t,e){var i=t.isSleeping;e?(t.isSleeping=!0,t.sleepCounter=t.sleepThreshold,t.positionImpulse.x=0,t.positionImpulse.y=0,t.positionPrev.x=t.position.x,t.positionPrev.y=t.position.y,t.anglePrev=t.angle,t.speed=0,t.angularSpeed=0,t.motion=0,i||r.trigger(t,"sleepStart")):(t.isSleeping=!1,t.sleepCounter=0,i&&r.trigger(t,"sleepEnd"))}},66280(t,e,i){var n={};t.exports=n;var s=i(41598),r=i(53402),o=i(22562),a=i(15647),h=i(31725);
1n.rectangle=function(t,e,i,n,a){a=a||{};var h={label:"Rectangle Body",position:{x:t,y:e},vertices:s.fromPath("L 0 0 L "+i+" 0 L "+i+" "+n+" L 0 "+n)};if(a.chamfer){var l=a.chamfer;h.vertices=s.chamfer(h.vertices,l.radius,l.quality,l.qualityMin,l.qualityMax),delete a.chamfer}return o.create(r.extend({},h,a))},n.trapezoid=function(t,e,i,n,a,h){h=h||{},a>=1&&r.warn("Bodies.trapezoid: slope parameter must be < 1.");var l,u=(1-2*(a*=.5))*i,d=i*a,c=d+u,f=c+d;l=a<.5?"L 0 0 L "+d+" "+-n+" L "+c+" "+-n+" L "+f+" 0":"L 0 0 L "+c+" "+-n+" L "+f+" 0";var p={label:"Trapezoid Body",position:{x:t,y:e},vertices:s.fromPath(l)};if(h.chamfer){var g=h.chamfer;p.vertices=s.chamfer(p.vertices,g.radius,g.quality,g.qualityMin,g.qualityMax),delete h.chamfer}return o.create(r.extend({},p,h))},n.circle=function(t,e,i,s,o){s=s||{};var a=Math.ceil(Math.max(10,Math.min(o=o||25,i)));return a%2==1&&(a+=1),n.polygon(t,e,a,i,r.extend({},{label:"Circle Body",circleRadius:i},s))},n.polygon=function(t,e,i,a,h){if(h=h||{},i<3)return n.circle(t,e,a,h);for(var l=2*Math.PI/i,u="",d=.5*l,c=0;c<i;c+=1){var f=d+c*l,p=Math.cos(f)*a,g=Math.sin(f)*a;u+="L "+p.toFixed(3)+" "+g.toFixed(3)+" "}var m={label:"Polygon Body",position:{x:t,y:e},vertices:s.fromPath(u)};if(h.chamfer){var v=h.chamfer;m.vertices=s.chamfer(m.vertices,v.radius,v.quality,v.qualityMin,v.qualityMax),delete h.chamfer}return o.create(r.extend({},m,h))},n.fromVertices=function(t,e,i,n,l,u,d,c){var f,p,g,m,v,x,y,T,w,b,S=r.getDecomp();for(f=!!(S&&S.quickDecomp),n=n||{},g=[],l=void 0!==l&&l,u=void 0!==u?u:.01,d=void 0!==d?d:10,c=void 0!==c?c:.01,r.isArray(i[0])||(i=[i]),w=0;w<i.length;w+=1)if(v=i[w],(m=s.isConvex(v))||f||r.warnOnce("Bodies.fromVertices: Install the 'poly-decomp' library and use Common.setDecomp or provide 'decomp' as a global to decompose concave vertices."),m||!f)v=m?s.clockwiseSort(v):s.hull(v),g.push({position:{x:t,y:e},vertices:v});else{var C=v.map(function(t){return[t.x,t.y]});S.makeCCW(C),!1!==u&&S.removeCollinearPoints(C,u),!1!==c&&S.removeDuplicatePoints&&S.removeDuplicatePoints(C,c);var E=S.quickDecomp(C);for(x=0;x<E.length;x++){var A=E[x].map(function(t){return{x:t[0],y:t[1]}});d>0&&s.area(A)<d||g.push({position:s.centre(A),vertices:A})}}for(x=0;x<g.length;x++)g[x]=o.create(r.extend(g[x],n));if(l)for(x=0;x<g.length;x++){var _=g[x];for(y=x+1;y<g.length;y++){var M=g[y];if(a.overlaps(_.bounds,M.bounds)){var R=_.vertices,O=M.vertices;for(T=0;T<_.vertices.length;T++)for(b=0;b<M.vertices.length;b++){var P=h.magnitudeSquared(h.sub(R[(T+1)%R.length],O[b])),L=h.magnitudeSquared(h.sub(R[T],O[(b+1)%O.length]));P<5&&L<5&&(R[T].isInternal=!0,O[b].isInternal=!0)}}}}return g.length>1?(p=o.create(r.extend({parts:g.slice(0)},n)),o.setPosition(p,{x:t,y:e}),p):g[0]},n.flagCoincidentParts=function(t,e){void 0===e&&(e=5);for(var i=0;i<t.length;i++)for(var n=t[i],s=i+1;s<t.length;s++){var r=t[s];if(a.overlaps(n.bounds,r.bounds))for(var o=n.vertices,l=r.vertices,u=0;u<n.vertices.length;u++)for(var d=0;d<r.vertices.length;d++){var c=h.magnitudeSquared(h.sub(o[(u+1)%o.length],l[d])),f=h.magnitudeSquared(h.sub(o[u],l[(d+1)%l.length]));c<e&&f<e&&(o[u].isInternal=!0,l[d].isInternal=!0)}}return t}},74116(t,e,i){var n={};t.exports=n;var s=i(69351),r=i(48140),o=i(53402),a=i(22562),h=i(66280);n.stack=function(t,e,i,n,r,o,h){for(var l,u=s.create({label:"Stack"}),d=t,c=e,f=0,p=0;p<n;p++){for(var g=0,m=0;m<i;m++){var v=h(d,c,m,p,l,f);if(v){var x=v.bounds.max.y-v.bounds.min.y,y=v.bounds.max.x-v.bounds.min.x;x>g&&(g=x),a.translate(v,{x:.5*y,y:.5*x}),d=v.bounds.max.x+r,s.addBody(u,v),l=v,f+=1}else d+=r}c+=g+o,d=t}return u},n.chain=function(t,e,i,n,a,h){for(var l=t.bodies,u=1;u<l.length;u++){var d=l[u-1],c=l[u],f=d.bounds.max.y-d.bounds.min.y,p=d.bounds.max.x-d.bounds.min.x,g=c.bounds.max.y-c.bounds.min.y,m=c.bounds.max.x-c.bounds.min.x,v={bodyA:d,pointA:{x:p*e,y:f*i},bodyB:c,pointB:{x:m*n,y:g*a}},x=o.extend(v,h);s.addConstraint(t,r.create(x))}return t.label+=" Chain",t},n.mesh=function(t,e,i,n,a){var h,l,u,d,c,f=t.bodies;for(h=0;h<i;h++){for(l=1;l<e;l++)u=f[l-1+h*e],d=f[l+h*e],s.addConstraint(t,r.create(o.extend({bodyA:u,bodyB:d},a)));if(h>0)for(l=0;l<e;
1l++)u=f[l+(h-1)*e],d=f[l+h*e],s.addConstraint(t,r.create(o.extend({bodyA:u,bodyB:d},a))),n&&l>0&&(c=f[l-1+(h-1)*e],s.addConstraint(t,r.create(o.extend({bodyA:c,bodyB:d},a)))),n&&l<e-1&&(c=f[l+1+(h-1)*e],s.addConstraint(t,r.create(o.extend({bodyA:c,bodyB:d},a))))}return t.label+=" Mesh",t},n.pyramid=function(t,e,i,s,r,o,h){return n.stack(t,e,i,s,r,o,function(e,n,o,l,u,d){var c=Math.min(s,Math.ceil(i/2)),f=u?u.bounds.max.x-u.bounds.min.x:0;if(!(l>c)){var p=l=c-l,g=i-1-l;if(!(o<p)&&!(o>g))return 1===d&&a.translate(u,{x:(o+(i%2==1?1:-1))*f,y:0}),h(t+(u?o*f:0)+o*r,n,o,l,u,d)}})},n.newtonsCradle=function(t,e,i,n,o){for(var a=s.create({label:"Newtons Cradle"}),l=0;l<i;l++){var u=h.circle(t+1.9*n*l,e+o,n,{inertia:1/0,restitution:1,friction:0,frictionAir:1e-4,slop:1}),d=r.create({pointA:{x:t+1.9*n*l,y:e},bodyB:u});s.addBody(a,u),s.addConstraint(a,d)}return a},n.car=function(t,e,i,n,o){var l=a.nextGroup(!0),u=-(.5*i)+20,d=.5*i-20,c=s.create({label:"Car"}),f=h.rectangle(t,e,i,n,{collisionFilter:{group:l},chamfer:{radius:.5*n},density:2e-4}),p=h.circle(t+u,e+0,o,{collisionFilter:{group:l},friction:.8}),g=h.circle(t+d,e+0,o,{collisionFilter:{group:l},friction:.8}),m=r.create({bodyB:f,pointB:{x:u,y:0},bodyA:p,stiffness:1,length:0}),v=r.create({bodyB:f,pointB:{x:d,y:0},bodyA:g,stiffness:1,length:0});return s.addBody(c,f),s.addBody(c,p),s.addBody(c,g),s.addConstraint(c,m),s.addConstraint(c,v),c},n.softBody=function(t,e,i,s,r,a,l,u,d,c){d=o.extend({inertia:1/0},d),c=o.extend({stiffness:.2,render:{type:"line",anchors:!1}},c);var f=n.stack(t,e,i,s,r,a,function(t,e){return h.circle(t,e,u,d)});return n.mesh(f,i,s,l,c),f.label="Soft Body",f}},66615(t,e,i){var n={};t.exports=n;var s=i(31725),r=i(53402);n.fromVertices=function(t){for(var e={},i=0;i<t.length;i++){var n=(i+1)%t.length,o=s.normalise({x:t[n].y-t[i].y,y:t[i].x-t[n].x}),a=0===o.y?1/0:o.x/o.y;e[a=a.toFixed(3).toString()]=o}return r.values(e)},n.rotate=function(t,e){if(0!==e)for(var i=Math.cos(e),n=Math.sin(e),s=0;s<t.length;s++){var r,o=t[s];r=o.x*i-o.y*n,o.y=o.x*n+o.y*i,o.x=r}}},15647(t){var e={};t.exports=e,e.create=function(t){var i={min:{x:0,y:0},max:{x:0,y:0}};return t&&e.update(i,t),i},e.update=function(t,e,i){t.min.x=1/0,t.max.x=-1/0,t.min.y=1/0,t.max.y=-1/0;for(var n=0;n<e.length;n++){var s=e[n];s.x>t.max.x&&(t.max.x=s.x),s.x<t.min.x&&(t.min.x=s.x),s.y>t.max.y&&(t.max.y=s.y),s.y<t.min.y&&(t.min.y=s.y)}i&&(i.x>0?t.max.x+=i.x:t.min.x+=i.x,i.y>0?t.max.y+=i.y:t.min.y+=i.y)},e.contains=function(t,e){return e.x>=t.min.x&&e.x<=t.max.x&&e.y>=t.min.y&&e.y<=t.max.y},e.overlaps=function(t,e){return t.min.x<=e.max.x&&t.max.x>=e.min.x&&t.max.y>=e.min.y&&t.min.y<=e.max.y},e.translate=function(t,e){t.min.x+=e.x,t.max.x+=e.x,t.min.y+=e.y,t.max.y+=e.y},e.shift=function(t,e){var i=t.max.x-t.min.x,n=t.max.y-t.min.y;t.min.x=e.x,t.max.x=e.x+i,t.min.y=e.y,t.max.y=e.y+n},e.wrap=function(t,e,i){var n=null,s=null;if(void 0!==e.min.x&&void 0!==e.max.x&&(t.min.x>e.max.x?n=e.min.x-t.max.x:t.max.x<e.min.x&&(n=e.max.x-t.min.x)),void 0!==e.min.y&&void 0!==e.max.y&&(t.min.y>e.max.y?s=e.min.y-t.max.y:t.max.y<e.min.y&&(s=e.max.y-t.min.y)),null!==n||null!==s)return{x:n||0,y:s||0}}},74058(t,e,i){var n={};t.exports=n,i(15647);var s=i(53402);n.pathToVertices=function(t,e){!("u">typeof window)||"SVGPathSeg"in window||s.warn("Svg.pathToVertices: SVGPathSeg not defined, a polyfill is required.");var i,r,o,a,h,l,u,d,c,f,p,g=[],m=0,v=0,x=0;e=e||15;var y=function(t,e,i){var n=i%2==1&&i>1;if(!c||t!=c.x||e!=c.y){c&&n?(f=c.x,p=c.y):(f=0,p=0);var s={x:f+t,y:p+e};(n||!c)&&(c=s),g.push(s),v=f+t,x=p+e}},T=function(t){var e=t.pathSegTypeAsLetter.toUpperCase();if("Z"!==e){switch(e){case"M":case"L":case"T":case"C":case"S":case"Q":v=t.x,x=t.y;break;case"H":v=t.x;break;case"V":x=t.y}y(v,x,t.pathSegType)}};for(n._svgPathToAbsolute(t),o=t.getTotalLength(),l=[],i=0;i<t.pathSegList.numberOfItems;i+=1)l.push(t.pathSegList.getItem(i));for(u=l.concat();m<o;){if((h=l[t.getPathSegAtLength(m)])!=d){for(;u.length&&u[0]!=h;)T(u.shift());d=h}switch(h.pathSegTypeAsLetter.toUpperCase()){case"C":case"T":case"S":case"Q":case"A":y((a=t.getPointAtLength(m)).x,a.y,0)}m+=e}for(i=0,r=u.length;i<r;++i)T(u[i]);return g},n._svgPathToAbsolute=function(t){for(var e,i,n,s,r,o,a=t.pathSegList,h=0,l=0,u=a.numberOfItems,d=0;d<u;++d){var c=a.getItem(d),f=c.pathSegTypeAsLetter;if(/[MLHVCSQTA]/.test(f))"x"in c&&(h=c.x),"y"in c&&(l=c.y);else switch("x1"in c&&(n=h+c.x1),"x2"in c&&(r=h+c.x2),"y1"in c&&(s=l+c.y1),"y2"in c&&(o=l+c.y2),"x"in c&&(h+=c.x),"y"in c&&(l+=c.y),f){case"m":a.replaceItem(t.createSVGPathSegMovetoAbs(h,l),d);break;case"l":a.replaceItem(t.createSVGPathSegLinetoAbs(h,l),d);break;case"h":a.replaceItem(t.createSVGPathSegLinetoHorizontalAbs(h),d);break;case"v":a.replaceItem(t.createSVGPathSegLinetoVerticalAbs(l),d);break;case"c":a.replaceItem(t.createSVGPathSegCurvetoCubicAbs(h,l,n,s,r,o),d);break;case"s":a.replaceItem(t.createSVGPathSegCurvetoCubicSmoothAbs(h,l,r,o),d);break;case"q":a.replaceItem(t.createSVGPathSegCurvetoQuadraticAbs(h,l,n,s),d);break;case"t":a.replaceItem(t.createSVGPathSegCurvetoQuadraticSmoothAbs(h,l),d);break;case"a":a.replaceItem(t.createSVGPathSegArcAbs(h,l,c.r1,c.r2,c.angle,c.largeArcFlag,c.sweepFlag),d);break;case"z":case"Z":h=e,l=i}("M"==f||"m"==f)&&(e=h,i=l)}}},31725(t){var e={};t.exports=e,e.create=function(t,e){return{x:t||0,y:e||0}},e.clone=function(t){return{x:t.x,y:t.y}},e.magnitude=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},e.magnitudeSquared=function(t){return t.x*t.x+t.y*t.y}
1,e.rotate=function(t,e,i){var n=Math.cos(e),s=Math.sin(e);i||(i={});var r=t.x*n-t.y*s;return i.y=t.x*s+t.y*n,i.x=r,i},e.rotateAbout=function(t,e,i,n){var s=Math.cos(e),r=Math.sin(e);n||(n={});var o=i.x+((t.x-i.x)*s-(t.y-i.y)*r);return n.y=i.y+((t.x-i.x)*r+(t.y-i.y)*s),n.x=o,n},e.normalise=function(t){var i=e.magnitude(t);return 0===i?{x:0,y:0}:{x:t.x/i,y:t.y/i}},e.dot=function(t,e){return t.x*e.x+t.y*e.y},e.cross=function(t,e){return t.x*e.y-t.y*e.x},e.cross3=function(t,e,i){return(e.x-t.x)*(i.y-t.y)-(e.y-t.y)*(i.x-t.x)},e.add=function(t,e,i){return i||(i={}),i.x=t.x+e.x,i.y=t.y+e.y,i},e.sub=function(t,e,i){return i||(i={}),i.x=t.x-e.x,i.y=t.y-e.y,i},e.mult=function(t,e){return{x:t.x*e,y:t.y*e}},e.div=function(t,e){return{x:t.x/e,y:t.y/e}},e.perp=function(t,e){return{x:-((e=!0===e?-1:1)*t.y),y:e*t.x}},e.neg=function(t){return{x:-t.x,y:-t.y}},e.angle=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)},e._temp=[e.create(),e.create(),e.create(),e.create(),e.create(),e.create()]},41598(t,e,i){var n={};t.exports=n;var s=i(31725),r=i(53402);n.create=function(t,e){for(var i=[],n=0;n<t.length;n++){var s=t[n],r={x:s.x,y:s.y,index:n,body:e,isInternal:!1};i.push(r)}return i},n.fromPath=function(t,e){var i=[];return t.replace(/L?\s*([-\d.e]+)[\s,]*([-\d.e]+)*/ig,function(t,e,n){i.push({x:parseFloat(e),y:parseFloat(n)})}),n.create(i,e)},n.centre=function(t){for(var e,i,r,o=n.area(t,!0),a={x:0,y:0},h=0;h<t.length;h++)r=(h+1)%t.length,e=s.cross(t[h],t[r]),i=s.mult(s.add(t[h],t[r]),e),a=s.add(a,i);return s.div(a,6*o)},n.mean=function(t){for(var e={x:0,y:0},i=0;i<t.length;i++)e.x+=t[i].x,e.y+=t[i].y;return s.div(e,t.length)},n.area=function(t,e){for(var i=0,n=t.length-1,s=0;s<t.length;s++)i+=(t[n].x-t[s].x)*(t[n].y+t[s].y),n=s;return e?i/2:Math.abs(i)/2},n.inertia=function(t,e){for(var i,n,r=0,o=0,a=0;a<t.length;a++)n=(a+1)%t.length,r+=(i=Math.abs(s.cross(t[n],t[a])))*(s.dot(t[n],t[n])+s.dot(t[n],t[a])+s.dot(t[a],t[a])),o+=i;return e/6*(r/o)},n.translate=function(t,e,i){i=void 0!==i?i:1;var n,s=t.length,r=e.x*i,o=e.y*i;for(n=0;n<s;n++)t[n].x+=r,t[n].y+=o;return t},n.rotate=function(t,e,i){if(0!==e){var n,s,r,o,a=Math.cos(e),h=Math.sin(e),l=i.x,u=i.y,d=t.length;for(o=0;o<d;o++)s=(n=t[o]).x-l,r=n.y-u,n.x=l+(s*a-r*h),n.y=u+(s*h+r*a);return t}},n.contains=function(t,e){for(var i,n=e.x,s=e.y,r=t.length,o=t[r-1],a=0;a<r;a++){if(i=t[a],(n-o.x)*(i.y-o.y)+(s-o.y)*(o.x-i.x)>0)return!1;o=i}return!0},n.scale=function(t,e,i,r){if(1===e&&1===i)return t;r=r||n.centre(t);for(var o,a,h=0;h<t.length;h++)o=t[h],a=s.sub(o,r),t[h].x=r.x+a.x*e,t[h].y=r.y+a.y*i;return t},n.chamfer=function(t,e,i,n,o){e="number"==typeof e?[e]:e||[8],i=void 0!==i?i:-1,n=n||2,o=o||14;for(var a=[],h=0;h<t.length;h++){var l=t[h-1>=0?h-1:t.length-1],u=t[h],d=t[(h+1)%t.length],c=e[h<e.length?h:e.length-1];if(0===c){a.push(u);continue}var f=s.normalise({x:u.y-l.y,y:l.x-u.x}),p=s.normalise({x:d.y-u.y,y:u.x-d.x}),g=Math.sqrt(2*Math.pow(c,2)),m=s.mult(r.clone(f),c),v=s.normalise(s.mult(s.add(f,p),.5)),x=s.sub(u,s.mult(v,g)),y=i;-1===i&&(y=1.75*Math.pow(c,.32)),(y=r.clamp(y,n,o))%2==1&&(y+=1);for(var T=Math.acos(s.dot(f,p))/y,w=0;w<y;w++)a.push(s.add(s.rotate(m,T*w),x))}return a},n.clockwiseSort=function(t){var e=n.mean(t);return t.sort(function(t,i){return s.angle(e,t)-s.angle(e,i)}),t},n.isConvex=function(t){var e,i,n,s,r=0,o=t.length;if(o<3)return null;for(e=0;e<o;e++)if(i=(e+1)%o,n=(e+2)%o,(s=(t[i].x-t[e].x)*(t[n].y-t[i].y)-(t[i].y-t[e].y)*(t[n].x-t[i].x))<0?r|=1:s>0&&(r|=2),3===r)return!1;return 0!==r||null},n.hull=function(t){var e,i,n=[],r=[];for((t=t.slice(0)).sort(function(t,e){var i=t.x-e.x;return 0!==i?i:t.y-e.y}),i=0;i<t.length;i+=1){for(e=t[i];r.length>=2&&0>=s.cross3(r[r.length-2],r[r.length-1],e);)r.pop();r.push(e)}for(i=t.length-1;i>=0;i-=1){for(e=t[i];n.length>=2&&0>=s.cross3(n[n.length-2],n[n.length-1],e);)n.pop();n.push(e)}return n.pop(),r.pop(),n.concat(r)}},55973(t){function e(t,e,i,n){var s=e[0]-t[0],r=e[1]-t[1],o=n[0]-i[0],a=n[1]-i[1];if(o*r-a*s==0)return!1;var h=(s*(i[1]-t[1])+r*(t[0]-i[0]))/(o*r-a*s),l=(o*(t[1]-i[1])+a*(i[0]-t[0]))/(a*s-o*r);return h>=0&&h<=1&&l>=0&&l<=1}function i(t,e,i){return(e[0]-t[0])*(i[1]-t[1])-(i[0]-t[0])*(e[1]-t[1])}t.exports={decomp:function(t){var e=function t(e){for(var s=[],r=[],h=[],f=[],g=Number.MAX_VALUE,m=0;m<e.length;++m)if(l(e,m)){for(var v=0;v<e.length;++v)if(function(t,e,s){if(l=a(t,e+1),i(l,a(t,e),a(t,s))>=0&&n(a(t,e-1),a(t,e),a(t,s)))return!1;h=o(a(t,e),a(t,s));for(var r,h,l,c,f=0;f!==t.length;++f)if((f+1)%t.length!==e&&f!==e&&(c=a(t,e),i(c,a(t,s),a(t,f+1))>=0&&n(a(t,e),a(t,s),a(t,f))&&(u[0]=a(t,e),u[1]=a(t,s),d[0]=a(t,f),d[1]=a(t,f+1),r=function(t,e,
1i){i=i||0;var n,s,r,o,a,h,l,u=[0,0];return n=t[1][1]-t[0][1],s=t[0][0]-t[1][0],r=n*t[0][0]+s*t[0][1],o=e[1][1]-e[0][1],a=e[0][0]-e[1][0],h=o*e[0][0]+a*e[0][1],p(l=n*a-o*s,0,i)||(u[0]=(a*r-s*h)/l,u[1]=(n*h-o*r)/l),u}(u,d),o(a(t,e),r)<h)))return!1;return!0}(e,m,v)){r=t(c(e,m,v,f)),h=t(c(e,v,m,f));for(var x=0;x<h.length;x++)r.push(h[x]);r.length<g&&(s=r,g=r.length,s.push([a(e,m),a(e,v)]))}}return s}(t);return e.length>0?function t(e,i){if(0===i.length)return[e];if(i instanceof Array&&i.length&&i[0]instanceof Array&&2===i[0].length&&i[0][0]instanceof Array){for(var n=[e],s=0;s<i.length;s++)for(var r=i[s],o=0;o<n.length;o++){var a=t(n[o],r);if(a){n.splice(o,1),n.push(a[0],a[1]);break}}return n}var r=i,s=e.indexOf(r[0]),o=e.indexOf(r[1]);return -1!==s&&-1!==o&&[c(e,s,o),c(e,o,s)]}(t,e):[t]},quickDecomp:function t(s,r,u,d,c,p,g){p=p||100,g=g||0,c=c||25,r=void 0!==r?r:[],u=u||[],d=d||[];var m=[0,0],v=[0,0],x=[0,0],y=0,T=0,w=0,b=0,S=0,C=0,E=0,A=[],_=[];if(s.length<3)return r;if(++g>p)return console.warn("quickDecomp: max level ("+p+") reached."),r;for(var M=0;M<s.length;++M)if(l(s,M)){u.push(s[M]),y=T=Number.MAX_VALUE;for(var R=0;R<s.length;++R)O=a(s,M-1),i(O,a(s,M),a(s,R))>0&&n(a(s,M-1),a(s,M),a(s,R-1))&&(x=f(a(s,M-1),a(s,M),a(s,R),a(s,R-1)),P=a(s,M+1),0>i(P,a(s,M),x)&&(w=o(s[M],x))<T&&(T=w,v=x,C=R)),L=a(s,M+1),i(L,a(s,M),a(s,R+1))>0&&n(a(s,M+1),a(s,M),a(s,R))&&(x=f(a(s,M+1),a(s,M),a(s,R),a(s,R+1)),D=a(s,M-1),i(D,a(s,M),x)>0&&(w=o(s[M],x))<y&&(y=w,m=x,S=R));if(C===(S+1)%s.length)x[0]=(v[0]+m[0])/2,x[1]=(v[1]+m[1])/2,d.push(x),M<S?(h(A,s,M,S+1),A.push(x),_.push(x),0!==C&&h(_,s,C,s.length),h(_,s,0,M+1)):(0!==M&&h(A,s,M,s.length),h(A,s,0,S+1),A.push(x),_.push(x),h(_,s,C,M+1));else{if(C>S&&(S+=s.length),b=Number.MAX_VALUE,S<C)return r;for(var O,P,L,D,F,R=C;R<=S;++R)F=a(s,M-1),i(F,a(s,M),a(s,R))>=0&&n(a(s,M+1),a(s,M),a(s,R))&&(w=o(a(s,M),a(s,R)))<b&&function(t,i,n){for(var s=0;s!==t.length;++s)if(s!==i&&s!==n&&(s+1)%t.length!==i&&(s+1)%t.length!==n&&e(a(t,i),a(t,n),a(t,s),a(t,s+1)))return!1;return!0}(s,M,R)&&(b=w,E=R%s.length);M<E?(h(A,s,M,E+1),0!==E&&h(_,s,E,s.length),h(_,s,0,M+1)):(0!==M&&h(A,s,M,s.length),h(A,s,0,E+1),h(_,s,E,M+1))}return A.length<_.length?(t(A,r,u,d,c,p,g),t(_,r,u,d,c,p,g)):(t(_,r,u,d,c,p,g),t(A,r,u,d,c,p,g)),r}return r.push(s),r},isSimple:function(t){var i;for(i=0;i<t.length-1;i++)for(var n=0;n<i-1;n++)if(e(t[i],t[i+1],t[n],t[n+1]))return!1;for(i=1;i<t.length-2;i++)if(e(t[0],t[t.length-1],t[i],t[i+1]))return!1;return!0},removeCollinearPoints:function(t,e){for(var n,o,h,l=0,u=t.length-1;t.length>3&&u>=0;--u)n=a(t,u-1),o=a(t,u),h=a(t,u+1),(e?(s[0]=o[0]-n[0],s[1]=o[1]-n[1],r[0]=h[0]-o[0],r[1]=h[1]-o[1],Math.acos((s[0]*r[0]+s[1]*r[1])/(Math.sqrt(s[0]*s[0]+s[1]*s[1])*Math.sqrt(r[0]*r[0]+r[1]*r[1])))<e):0===i(n,o,h))&&(t.splice(u%t.length,1),l++);return l},removeDuplicatePoints:function(t,e){for(var i,n,s,r=t.length-1;r>=1;--r)for(var o=t[r],a=r-1;a>=0;--a){if(i=o,n=t[a],s=e,p(i[0],n[0],s)&&p(i[1],n[1],s)){t.splice(r,1);continue}}},makeCCW:function(t){for(var e,n=0,s=1;s<t.length;++s)(t[s][1]<t[n][1]||t[s][1]===t[n][1]&&t[s][0]>t[n][0])&&(n=s);return e=a(t,n-1),!(i(e,a(t,n),a(t,n+1))>0)&&(function(t){for(var e=[],i=t.length,n=0;n!==i;n++)e.push(t.pop());for(var n=0;n!==i;n++)t[n]=e[n]}(t),!0)}};function n(t,e,n){return 0>=i(t,e,n)}var s=[],r=[];function o(t,e){var i=e[0]-t[0],n=e[1]-t[1];return i*i+n*n}function a(t,e){var i=t.length;return t[e<0?e%i+i:e%i]}function h(t,e,i,n){for(var s=i;s<n;s++)t.push(e[s])}function l(t,e){var n;return n=a(t,e-1),0>i(n,a(t,e),a(t,e+1))}var u=[],d=[];function c(t,e,i,n){var s=n||[];if(s.length=0,e<i)for(var r=e;r<=i;r++)s.push(t[r]);else{for(var r=0;r<=i;r++)s.push(t[r]);for(var r=e;r<t.length;r++)s.push(t[r])}return s}function f(t,e,i,n,s){s=s||0;var r=e[1]-t[1],o=t[0]-e[0],a=r*t[0]+o*t[1],h=n[1]-i[1],l=i[0]-n[0],u=h*i[0]+l*i[1],d=r*l-h*o;return p(d,0,s)?[0,0]:[(l*a-o*u)/d,(r*u-h*a)/d]}function p(t,e,i){return Math.abs(t-e)<=(i=i||0)}},52018(t,e,i){t.exports=new(i(83419))({initialize:function(t){this.pluginManager=t,this.game=t.game},init:function(){},start:function(){},stop:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}})},42363(t){var e={Global:["game","anims","cache","plugins","registry","scale","sound","textures","renderer"],CoreScene:["EventEmitter","CameraManager","GameObjectCreator","GameObjectFactory","ScenePlugin","DisplayList","UpdateList"],DefaultScene:["Clock","DataManagerPlugin","InputPlugin","Loa
1der","TweenManager","LightsPlugin"]};e.DefaultScene.push("CameraManager3D"),e.Global.push("facebook"),t.exports=e},37277(t){var e={},i={},n={};n.register=function(t,i,n,s){void 0===s&&(s=!1),e[t]={plugin:i,mapping:n,custom:s}},n.registerCustom=function(t,e,n,s){i[t]={plugin:e,mapping:n,data:s}},n.hasCore=function(t){return e.hasOwnProperty(t)},n.hasCustom=function(t){return i.hasOwnProperty(t)},n.getCore=function(t){return e[t]},n.getCustom=function(t){return i[t]},n.getCustomClass=function(t){return i.hasOwnProperty(t)?i[t].plugin:null},n.remove=function(t){e.hasOwnProperty(t)&&delete e[t]},n.removeCustom=function(t){i.hasOwnProperty(t)&&delete i[t]},n.destroyCorePlugins=function(){for(var t in e)e.hasOwnProperty(t)&&delete e[t]},n.destroyCustomPlugins=function(){for(var t in i)i.hasOwnProperty(t)&&delete i[t]},t.exports=n},77332(t,e,i){var n=i(83419),s=i(8443),r=i(50792),o=i(74099),a=i(44603),h=i(39429),l=i(95540),u=i(37277),d=i(72905),c=i(8054);t.exports=new n({Extends:r,initialize:function(t){r.call(this),this.game=t,this.plugins=[],this.scenePlugins=[],this._pendingGlobal=[],this._pendingScene=[],t.isBooted||t.config.renderType===c.HEADLESS?this.boot():t.events.once(s.BOOT,this.boot,this)},boot:function(){var t,e,i,n,r,o,a,h=this.game.config,u=h.installGlobalPlugins;for(t=0,u=u.concat(this._pendingGlobal);t<u.length;t++)i=l(e=u[t],"key",null),n=l(e,"plugin",null),r=l(e,"start",!1),o=l(e,"mapping",null),a=l(e,"data",null),i&&(n?this.install(i,n,r,o,a):console.warn("Missing `plugin` for key: "+i));for(t=0,u=(u=h.installScenePlugins).concat(this._pendingScene);t<u.length;t++)i=l(e=u[t],"key",null),n=l(e,"plugin",null),o=l(e,"mapping",null),i&&(n?this.installScenePlugin(i,n,o):console.warn("Missing `plugin` for key: "+i));this._pendingGlobal=[],this._pendingScene=[],this.game.events.once(s.DESTROY,this.destroy,this)},addToScene:function(t,e,i){var n,s,r,o=this.game,a=t.scene,h=t.settings.map,l=t.settings.isBooted;for(n=0;n<e.length;n++)o[s=e[n]]?(t[s]=o[s],h.hasOwnProperty(s)&&(a[h[s]]=t[s])):"game"===s&&h.hasOwnProperty(s)&&(a[h[s]]=o);for(var d=0;d<i.length;d++)for(n=0,r=i[d];n<r.length;n++)if(s=r[n],u.hasCore(s)){var c=u.getCore(s),f=c.mapping,p=new c.plugin(a,this,f);t[f]=p,c.custom?a[f]=p:h.hasOwnProperty(f)&&(a[h[f]]=p),l&&p.boot()}for(n=0,r=this.plugins;n<r.length;n++){var g=r[n];g.mapping&&(a[g.mapping]=g.plugin)}},getDefaultScenePlugins:function(){var t=this.game.config.defaultPlugins;return t.concat(this.scenePlugins)},installScenePlugin:function(t,e,i,n,s){if(void 0===s&&(s=!1),"function"!=typeof e)return void console.warn("Invalid Scene Plugin: "+t);if(u.hasCore(t)||u.register(t,e,i,!0),-1===this.scenePlugins.indexOf(t))this.scenePlugins.push(t);else if(!s&&u.hasCore(t))return void console.warn("Scene Plugin key in use: "+t);if(n){var r=new e(n,this,t);n.sys[t]=r,i&&""!==i&&(n[i]=r),r.boot()}},install:function(t,e,i,n,s){if(void 0===i&&(i=!1),void 0===n&&(n=null),void 0===s&&(s=null),"function"!=typeof e)return console.warn("Invalid Plugin: "+t),null;if(u.hasCustom(t))return console.warn("Plugin key in use: "+t),null;if(null!==n&&(i=!0),this.game.isBooted){if(u.registerCustom(t,e,n,s),i)return this.start(t)}else this._pendingGlobal.push({key:t,plugin:e,start:i,mapping:n,data:s});return null},getIndex:function(t){for(var e=this.plugins,i=0;i<e.length;i++)if(e[i].key===t)return i;return -1},getEntry:function(t){var e=this.getIndex(t);if(-1!==e)return this.plugins[e]},isActive:function(t){var e=this.getEntry(t);return e&&e.active},start:function(t,e){void 0===e&&(e=t);var i=this.getEntry(e);return i&&!i.active?(i.active=!0,i.plugin.start()):i||(i=this.createEntry(t,e)),i?i.plugin:null},createEntry:function(t,e){var i=u.getCustom(t);if(i){var n=new i.plugin(this);i={key:e,plugin:n,active:!0,mapping:i.mapping,data:i.data},this.plugins.push(i),n.init(i.data),n.start()}return i},stop:function(t){var e=this.getEntry(t);return e&&e.active&&(e.active=!1,e.plugin.stop()),this},get:function(t,e){void 0===e&&(e=!0);var i=this.getEntry(t);if(i)return i.plugin;var n=this.getClass(t);return n&&e?(i=this.createEntry(t,t))?i.plugin:null:n?n:null},getClass:function(t){return u.getCustomClass(t)},removeGlobalPlugin:function(t){var e=this.getEntry(t);e&&d(this.plugins,e),u.removeCustom(t)},removeScenePlugin:function(t){d(this.scenePlugins,t),u.remove(t)}
1,registerGameObject:function(t,e,i){return e&&h.register(t,e),i&&a.register(t,i),this},removeGameObject:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),e&&h.remove(t),i&&a.remove(t),this},registerFileType:function(t,e,i){o.register(t,e),i&&i.sys.load&&(i.sys.load[t]=e)},destroy:function(){for(var t=0;t<this.plugins.length;t++)this.plugins[t].plugin.destroy();u.destroyCustomPlugins(),this.game.noReturn&&u.destroyCorePlugins(),this.game=null,this.plugins=[],this.scenePlugins=[]}})},45145(t,e,i){var n=i(52018),s=i(83419),r=i(44594);t.exports=new s({Extends:n,initialize:function(t,e,i){n.call(this,e),this.scene=t,this.systems=t.sys,this.pluginKey=i,t.sys.events.once(r.BOOT,this.boot,this)},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}})},18922(t,e,i){t.exports={BasePlugin:i(52018),DefaultPlugins:i(42363),PluginCache:i(37277),PluginManager:i(77332),ScenePlugin:i(45145)}},63595(){"u">typeof HTMLVideoElement&&!("requestVideoFrameCallback"in HTMLVideoElement.prototype)&&"getVideoPlaybackQuality"in HTMLVideoElement.prototype&&(HTMLVideoElement.prototype._rvfcpolyfillmap={},HTMLVideoElement.prototype.requestVideoFrameCallback=function(t){let e=performance.now(),i=this.getVideoPlaybackQuality(),n=this.mozPresentedFrames||this.mozPaintedFrames||i.totalVideoFrames-i.droppedVideoFrames,s=(r,o)=>{let a=this.getVideoPlaybackQuality(),h=this.mozPresentedFrames||this.mozPaintedFrames||a.totalVideoFrames-a.droppedVideoFrames;if(h>n){let n=this.mozFrameDelay||a.totalFrameDelay-i.totalFrameDelay||0,s=o-r;t(o,{presentationTime:o+1e3*n,expectedDisplayTime:o+s,width:this.videoWidth,height:this.videoHeight,mediaTime:Math.max(0,this.currentTime||0)+s/1e3,presentedFrames:h,processingDuration:n}),delete this._rvfcpolyfillmap[e]}else this._rvfcpolyfillmap[e]=requestAnimationFrame(t=>s(o,t))};return this._rvfcpolyfillmap[e]=requestAnimationFrame(t=>s(e,t)),e},HTMLVideoElement.prototype.cancelVideoFrameCallback=function(t){cancelAnimationFrame(this._rvfcpolyfillmap[t]),delete this._rvfcpolyfillmap[t]})},10312(t){t.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(t){t.exports={DEFAULT:0,LINEAR:0,NEAREST:1}},84322(t){t.exports={MULTIPLY:0,FILL:1,ADD:2,SCREEN:4,OVERLAY:5,HARD_LIGHT:6}},68627(t,e,i){var n=i(19715),s=i(32880),r=i(83419),o=i(8054),a=i(50792),h=i(92503),l=i(56373),u=i(97480),d=i(69442),c=i(8443),f=i(61340);t.exports=new r({Extends:a,initialize:function(t){a.call(this);var e=t.config;this.config={clearBeforeRender:e.clearBeforeRender,backgroundColor:e.backgroundColor,antialias:e.antialias,roundPixels:e.roundPixels,transparent:e.transparent},this.game=t,this.type=o.CANVAS,this.drawCount=0,this.width=0,this.height=0,this.gameCanvas=t.canvas;var i={alpha:e.transparent,desynchronized:e.desynchronized,willReadFrequently:!1};this.gameContext=e.context?e.context:this.gameCanvas.getContext("2d",i),this.currentContext=this.gameContext,this.antialias=e.antialias,this.blendModes=l(),this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92},this._tempMatrix1=new f,this._tempMatrix2=new f,this._tempMatrix3=new f,this.isBooted=!1,this.init()},init:function(){var t=this.game;t.events.once(c.BOOT,function(){var t=this.config;if(!t.transparent){var e=this.gameContext,i=this.gameCanvas;e.fillStyle=t.backgroundColor.rgba,e.fillRect(0,0,i.width,i.height)}},this),t.textures.once(d.READY,this.boot,this)},boot:function(){var t=this.game,e=t.scale.baseSize;this.width=e.width,this.height=e.height,this.isBooted=!0,t.scale.on(u.RESIZE,this.onResize,this),this.resize(e.width,e.height)},onResize:function(t,e){(e.width!==this.width||e.height!==this.height)&&this.resize(e.width,e.height)}
vendor: 19,828 bytes, line 1
1,resize:function(t,e){this.width=t,this.height=e,this.emit(h.RESIZE,t,e)},resetTransform:function(){this.currentContext.setTransform(1,0,0,1,0,0)},setBlendMode:function(t){return this.currentContext.globalCompositeOperation=t,this},setContext:function(t){return this.currentContext=t||this.gameContext,this},setAlpha:function(t){return this.currentContext.globalAlpha=t,this},preRender:function(){var t=this.gameContext,e=this.config,i=this.width,n=this.height;t.globalAlpha=1,t.globalCompositeOperation="source-over",t.setTransform(1,0,0,1,0,0),this.emit(h.PRE_RENDER_CLEAR),e.clearBeforeRender&&(t.clearRect(0,0,i,n),e.transparent||(t.fillStyle=e.backgroundColor.rgba,t.fillRect(0,0,i,n))),t.save(),this.drawCount=0,this.emit(h.PRE_RENDER)},render:function(t,e,i){var s=e.length;this.emit(h.RENDER,t,i);var r=i.x,o=i.y,a=i.width,l=i.height,u=i.renderToTexture?i.context:t.sys.context;u.save(),this.game.scene.customViewports&&(u.beginPath(),u.rect(r,o,a,l),u.clip()),i.emit(n.PRE_RENDER,i),this.currentContext=u;var d=i.mask;d&&d.preRenderCanvas(this,null,i._maskCamera),i.transparent||(u.fillStyle=i.backgroundColor.rgba,u.fillRect(r,o,a,l)),u.globalAlpha=i.alpha,u.globalCompositeOperation="source-over",this.drawCount+=s,i.renderToTexture&&i.emit(n.PRE_RENDER,i),i.matrix.copyToContext(u);for(var c=0;c<s;c++){var f=e[c];f.mask&&f.mask.preRenderCanvas(this,f,i),f.renderCanvas(this,f,i),f.mask&&f.mask.postRenderCanvas(this,f,i)}u.setTransform(1,0,0,1,0,0),u.globalCompositeOperation="source-over",u.globalAlpha=1,i.flashEffect.postRenderCanvas(u),i.fadeEffect.postRenderCanvas(u),i.dirty=!1,d&&d.postRenderCanvas(this),u.restore(),i.renderToTexture&&(i.emit(n.POST_RENDER,i),i.renderToGame&&t.sys.context.drawImage(i.canvas,r,o)),i.emit(n.POST_RENDER,i)},postRender:function(){this.gameContext.restore(),this.emit(h.POST_RENDER);var t=this.snapshotState;t.callback&&(s(this.gameCanvas,t),t.callback=null)},snapshotCanvas:function(t,e,i,n,r,o,a,h,l){void 0===i&&(i=!1),this.snapshotArea(n,r,o,a,e,h,l);var u=this.snapshotState;return u.getPixel=i,s(t,u),u.callback=null,this},snapshot:function(t,e,i){return this.snapshotArea(0,0,this.gameCanvas.width,this.gameCanvas.height,t,e,i)},snapshotArea:function(t,e,i,n,s,r,o){var a=this.snapshotState;return a.callback=s,a.type=r,a.encoder=o,a.getPixel=!1,a.x=t,a.y=e,a.width=Math.min(i,this.gameCanvas.width),a.height=Math.min(n,this.gameCanvas.height),this},snapshotPixel:function(t,e,i){return this.snapshotArea(t,e,1,1,i),this.snapshotState.getPixel=!0,this},batchSprite:function(t,e,i,n){var s=i.alpha*t.alpha;if(0!==s){var r=this.currentContext,o=this._tempMatrix1,a=this._tempMatrix2,h=e.canvasData,l=h.x,u=h.y,d=e.cutWidth,c=e.cutHeight,f=e.customPivot,p=e.source.resolution,g=t.displayOriginX,m=t.displayOriginY,v=-g+e.x,x=-m+e.y;if(t.isCropped){var y=t._crop;(y.flipX!==t.flipX||y.flipY!==t.flipY)&&e.updateCropUVs(y,t.flipX,t.flipY),d=y.cw,c=y.ch,l=y.cx,u=y.cy,v=-g+y.x,x=-m+y.y,t.flipX&&(v>=0?v=-(v+d):v<0&&(v=Math.abs(v)-d)),t.flipY&&(x>=0?x=-(x+c):x<0&&(x=Math.abs(x)-c))}var T=1,w=1;t.flipX&&(f||(v+=-e.realWidth+2*g),T=-1),t.flipY&&(f||(x+=-e.realHeight+2*m),w=-1);var b=t.x,S=t.y;if(i.roundPixels&&(b=Math.floor(b),S=Math.floor(S)),a.applyITRS(b,S,t.rotation,t.scaleX*T,t.scaleY*w),o.copyWithScrollFactorFrom(i.matrixCombined,i.scrollX,i.scrollY,t.scrollFactorX,t.scrollFactorY),n&&o.multiply(n),o.multiply(a),i.renderRoundPixels&&(o.e=Math.floor(o.e+.5),o.f=Math.floor(o.f+.5)),r.save(),o.setToContext(r),r.globalCompositeOperation=this.blendModes[t.blendMode],r.globalAlpha=s,r.imageSmoothingEnabled=!e.source.scaleMode,t.mask&&t.mask.preRenderCanvas(this,t,i),d>0&&c>0){var C=d/p,E=c/p;i.roundPixels&&(v=Math.floor(v+.5),x=Math.floor(x+.5),C+=.5,E+=.5),r.drawImage(e.source.image,l,u,d,c,v,x,C,E)}t.mask&&t.mask.postRenderCanvas(this,t,i),r.restore()}},destroy:function(){this.removeAllListeners(),this.game=null,this.gameCanvas=null,this.gameContext=null}})},55830(t,e,i){t.exports={CanvasRenderer:i(68627),GetBlendModes:i(56373),SetTransform:i(20926)}},56373(t,e,i){var n=i(10312),s=i(89289);t.exports=function(){var t=[],e=s.supportNewBlendModes,i="source-over";return t[n.NORMAL]=i,t[n.ADD]="lighter",t[n.MULTIPLY]=e?"multiply":i,t[n.SCREEN]=e?"screen":i,t[n.OVERLAY]=e?"overlay":i,t[n.DARKEN]=e?"darken":i,t[n.LIGHTEN]=e?"lighten":i,t[n.COLOR_DODGE]=e?"color-dodge":i,t[n.COLOR_BURN]=e?"color-burn":i,t[n.HARD_LIGHT]=e?"hard-light":i,t[n.SOFT_LIGHT]=e?"soft-light":i,t[n.DIFFERENCE]=e?"difference":i,t[n.EXCLUSION]=e?"exclusion":i,t[n.HUE]=e?"hue":i,t[n.SATURATION]=e?"saturation":i,t[n.COLOR]=e?"color":i,t[n.LUMINOSITY]=e?"luminosity":i,t[n.ERASE]="destination-out",t[n.SOURCE_IN]="source-in",t[n.SOURCE_OUT]="source-out",t[n.SOURCE_ATOP]="source-atop",t[n.DESTINATION_OVER]="destination-over",t[n.DESTINATION_IN]="destination-in",t[n.DESTINATION_OUT]="destination-out",t[n.DESTINATION_ATOP]="destination-atop",t[n.LIGHTER]="lighter",t[n.COPY]="copy",t[n.XOR]="xor",t}},20926(t,e,i){var n=i(91296);t.exports=function(t,e,i,s,r){var o=s.alpha*i.alpha;if(o<=0)return!1;var a=n(i,s,r).calc;return e.globalCompositeOperation=t.blendModes[i.blendMode],e.globalAlpha=o,e.save(),a.setToContext(e),e.imageSmoothingEnabled=i.frame?!i.frame.source.scaleMode:t.antialias,!0}},63899(t){t.exports="losewebgl"},6119(t){t.exports="postrender"},31124(t){t.exports="prerenderclear"},48070(t){t.exports="prerender"},15640(t){t.exports="render"},8912(t){t.exports="resize"},87124(t){t.exports="restorewebgl"},53998(t){t.exports="setparalleltextureunits"},92503(t,e,i){t.exports={LOSE_WEBGL:i(63899),POST_RENDER:i(6119),PRE_RENDER:i(48070),PRE_RENDER_CLEAR:i(31124),RENDER:i(15640),RESIZE:i(8912),RESTORE_WEBGL:i(87124),SET_PARALLEL_TEXTURE_UNITS:i(53998)}},36909(t,e,i){t.exports={Events:i(92503),Snapshot:i(89966)},t.exports.Canvas=i(55830),t.exports.WebGL=i(4159)},32880(t,e,i){var n=i(27919),s=i(40987),r=i(95540);t.exports=function(t,e){var i=r(e,"callback"),o=r(e,"type","image/png"),a=r(e,"encoder",.92),h=Math.abs(Math.round(r(e,"x",0))),l=Math.abs(Math.round(r(e,"y",0))),u=Math.floor(r(e,"width",t.width)),d=Math.floor(r(e,"height",t.height));if(r(e,"getPixel",!1)){var c=t.getContext("2d",{willReadFrequently:!1}).getImageData(h,l,1,1).data;i.call(null,new s(c[0],c[1],c[2],c[3]))}else if(0!==h||0!==l||u!==t.width||d!==t.height){var f=n.createWebGL(this,u,d),p=f.getContext("2d",{willReadFrequently:!0});u>0&&d>0&&p.drawImage(t,h,l,u,d,0,0,u,d);var g=new Image;g.onerror=function(){i.call(null),n.remove(f)},g.onload=function(){i.call(null,g),n.remove(f)},g.src=f.toDataURL(o,a)}else{var m=new Image;m.onerror=function(){i.call(null)},m.onload=function(){i.call(null,m)},m.src=t.toDataURL(o,a)}}},88815(t,e,i){var n=i(27919),s=i(40987),r=i(95540);t.exports=function(t,e){var i=r(e,"callback"),o=r(e,"type","image/png"),a=r(e,"encoder",.92),h=Math.abs(Math.round(r(e,"x",0))),l=Math.abs(Math.round(r(e,"y",0))),u=r(e,"getPixel",!1),d=r(e,"isFramebuffer",!1),c=d?r(e,"bufferWidth",1):t.drawingBufferWidth,f=d?r(e,"bufferHeight",1):t.drawingBufferHeight;if(u){var p=new Uint8Array(4),g=f-l-1;t.readPixels(h,g,1,1,t.RGBA,t.UNSIGNED_BYTE,p),i.call(null,new s(p[0],p[1],p[2],p[3]))}else{var m=Math.floor(r(e,"width",c)),v=Math.floor(r(e,"height",f)),x=new Uint8Array(m*v*4);t.readPixels(h,f-l-v,m,v,t.RGBA,t.UNSIGNED_BYTE,x);for(var y=n.createWebGL(this,m,v),T=y.getContext("2d",{willReadFrequently:!0}),w=T.getImageData(0,0,m,v),b=w.data,S=0;S<v;S++)for(var C=0;C<m;C++){var E=((v-S-1)*m+C)*4,A=(S*m+C)*4,_=x[E+0],M=x[E+1],R=x[E+2],O=x[E+3];if(e.unpremultiplyAlpha&&0!==O){var P=255/O;_=Math.floor(_*P),M=Math.floor(M*P),R=Math.floor(R*P)}b[A+0]=_,b[A+1]=M,b[A+2]=R,b[A+3]=O}T.putImageData(w,0,0);var L=new Image;L.onerror=function(){i.call(null),n.remove(y)},L.onload=function(){i.call(null,L),n.remove(y)},L.src=y.toDataURL(o,a)}}},89966(t,e,i){t.exports={Canvas:i(32880),WebGL:i(88815)}},87774(t,e,i){var n=new(i(83419))({initialize:function(t,e){void 0===e&&(e={}),this.renderer=t,this.camera=null,this.setCamera(e.camera||null),this.state={bindings:{framebuffer:null},blend:{},colorClearValue:e.clearColor||[0,0,0,0],scissor:{box:[0,0,0,0],enable:!0},viewport:[0,0,0,0]},this.blendMode=-1,this.setBlendMode(e.blendMode||0),this.autoClear=0,void 0===e.autoClear||!0===e.autoClear?this.setAutoClear(!0,!0,!0):Array.isArray(e.autoClear)&&this.setAutoClear.apply(this,e.autoClear),this.useCanvas=!!e.useCanvas,this.framebuffer=null,this.texture=null,this.pool=e.pool||null,this.lastUsed=0,this.width=0,this.height=0,this._locks=[],e.copyFrom?this.copy(e.copyFrom):this.resize(e.width||t.width,e.height||t.height)},resize:function(t,e){if((t=Math.round(t))<=0&&(t=1),(e=Math.round(e))<=0&&(e=1),this.useCanvas)this.framebuffer||(this.framebuffer=this.renderer.createFramebuffer(null));else if(this.framebuffer)this.framebuffer.resize(t,e);else{var i=this.renderer;this.texture=i.createTextureFromSource(null,t,e,0),this.framebuffer=i.createFramebuffer(this.texture,!0,!1)}this.state.bindings.framebuffer=this.framebuffer,this.width=t,this.height=e,this.state.scissor.box=[0,0,t,e],this.state.viewport=[0,0,t,e]},copy:function(t){var e=t.state,i=e.blend,n=e.scissor;this.autoClear=t.autoClear,this.useCanvas=t.useCanvas,this.framebuffer=t.framebuffer,this.texture=t.texture,this.camera=t.camera,this.blendMode=t.blendMode,this.width=t.width,this.height=t.height,this.state={bindings:{framebuffer:e.bindings.framebuffer},blend:{color:i.color&&i.color.slice(),enable:i.enable,equation:i.equation,func:i.func},colorClearValue:e.colorClearValue.slice(),scissor:{box:n.box.slice(),enable:n.enable},viewport:e.viewport.slice()}},getClone:function(t){var e=new n(this.renderer,{copyFrom:this});return t||e.setAutoClear(!1,!1,!1),e},setAutoClear:function(t,e,i){var n=0,s=this.renderer.gl;t&&(n|=s.COLOR_BUFFER_BIT),e&&(n|=s.DEPTH_BUFFER_BIT),i&&(n|=s.STENCIL_BUFFER_BIT),this.autoClear=n},setBlendMode:function(t,e){if(t!==this.blendMode){var i=this.state.blend,n=this.renderer.blendModes[t];i.enable=n.enable,i.equation=n.equation,i.func=n.func,e?i.color=e:i.color=void 0,this.blendMode=t}},setCamera:function(t){this.camera=t},setClearColor:function(t,e,i,n){var s=this.state.colorClearValue;(t!==s[0]||e!==s[1]||i!==s[2]||n!==s[3])&&(this.state.colorClearValue=[t,e,i,n])},setScissorBox:function(t,e,i,n){e=this.height-e-n,this.state.scissor.box=[t,e,i,n]},setScissorEnable:function(t){this.state.scissor.enable=t},use:function(){this.renderer.renderNodes.finishBatch(),this.autoClear&&this.clear()},release:function(){this.pool&&0===this._locks.length&&(this.lastUsed=Date.now(),this.pool.add(this)),this.renderer.renderNodes.finishBatch()},lock:function(t){-1===this._locks.indexOf(t)&&this._locks.push(t)},unlock:function(t,e){var i=this._locks.indexOf(t);-1!==i&&this._locks.splice(i,1),e&&this.release()},isLocked:function(){return this._locks.length>0},beginDraw:function(){this.framebuffer&&this.renderer.glTextureUnits.unbindTexture(this.texture),this.renderer.glWrapper.update(this.state)},clear:function(t){this.beginDraw(),void 0===t&&(t=this.autoClear),this.renderer.renderNodes.finishBatch(),this.renderer.gl.clear(t)},destroy:function(){this.renderer.deleteTexture(this.texture),this.renderer.deleteFramebuffer(this.state.bindings.framebuffer),this.renderer=null,this.camera=null,this.state=null,this.framebuffer=null,this.texture=null}});t.exports=n},65656(t,e,i){var n=i(83419),s=i(87774);t.exports=new n({initialize:function(t,e,i){this.renderer=t,this.maxAge=e,this.maxPoolSize=i,this.agePool=[],this.sizePool={}},add:function(t){if(-1===this.agePool.indexOf(t)){var e=t.width+"x"+t.height;this.sizePool[e]?this.sizePool[e].push(t):this.sizePool[e]=[t],this.agePool.push(t)}},get:function(t,e){var i,n,r=this.renderer;void 0===t&&(t=r.width),void 0===e&&(e=r.height);var o=r.getMaxTextureSize();t>o&&(t=o),e>o&&(e=o);var a=t+"x"+e,h=this.sizePool[a];if(h&&h.length>0)return i=h.pop(),n=this.agePool.indexOf(i),this.agePool.splice(n,1),i;if(this.agePool.length>0){var l=Date.now(),u=this.maxAge;if(l-(i=this.agePool[0]).lastUsed>u){this.agePool.shift();var d=i.width+"x"+i.height;return n=(h=this.sizePool[d]).indexOf(i),h.splice(n,1),i.resize(t,e),i}}return this.agePool.length<this.maxPoolSize?i=new s(r,{autoClear:!0,pool:this,width:t,height:e}):(i=this.agePool.shift())?(n=(h=this.sizePool[a]).indexOf(i),h.splice(n,1),i.resize(t,e),i):i=new s(r,{autoClear:!0,pool:this,width:t,height:e})},setMaxAge:function(t){this.maxAge=t},setMaxPoolSize:function(t){this.maxPoolSize=t},clear:function(){for(var t=0;t<this.agePool.length;t++)this.agePool[t].destroy();this.sizePool={},this.agePool.length=0},prune:function(){var t=this.sizePool,e=this.agePool,i=e.length-this.maxPoolSize;if(i>0)for(var n=e.splice(0,i),s=0;s<i;s++){var r=n[s],o=t[r.width+"x"+r.height],a=o.indexOf(r);o.splice(a,1),r.destroy()}}})},56436(t,e,i){var n=i(83419),s=i(62644);t.exports=new n({initialize:function(t,e,i){this.renderer=t,this.indexBuffer=i,this.attributeBufferLayouts=e,this.currentProgramKey=null,this.currentConfig={base:{vertexShader:"",fragmentShader:""},additions:[],features:[]},this.programs={},this.uniforms={}},getCurrentProgramSuite:function(){var t=this.currentConfig,e=this.renderer,i=e.shaderProgramFactory,n=i.getKey(t.base,t.additions,t.features);if(!this.programs[n]){var r=i.getShaderProgram(t.base,t.additions,t.features);r.compiling&&r.checkParallelCompile(),r.compiling||(this.programs[n]={program:r,vao:e.createVAO(r,this.indexBuffer,this.attributeBufferLayouts),config:s(t)})}return this.programs[n]||null},resetCurrentConfig:function(){this.currentConfig.base.vertexShader="",this.currentConfig.base.fragmentShader="",this.currentConfig.additions.length=0,this.currentConfig.features.length=0},setUniform:function(t,e){this.uniforms[t]=e},removeUniform:function(t){delete this.uniforms[t]},clearUniforms:function(){this.uniforms={}},applyUniforms:function(t){var e=this.uniforms;for(var i in e)t.setUniform(i,e[i])},setBaseShader:function(t,e,i){var n=this.currentConfig.base;n.name=t,n.vertexShader=e,n.fragmentShader=i},addAddition:function(t,e){void 0===e?this.currentConfig.additions.push(t):this.currentConfig.additions.splice(e,0,t)},getAddition:function(t){for(var e=this.currentConfig.additions,i=0;i<e.length;i++){var n=e[i];if(n.name===t)return n}return null},getAdditionsByTag:function(t){return this.currentConfig.additions.filter(function(e){return!!e.tags&&e.tags.includes(t)})},getAdditionIndex:function(t){return this.currentConfig.additions.findIndex(function(e){return e.name===t})},removeAddition:function(t){this.currentConfig.additions=this.currentConfig.additions.filter(function(e){return e.name!==t})},replaceAddition:function(t,e){var i=this.currentConfig.additions.findIndex(function(e){return e.name===t});-1!==i&&(this.currentConfig.additions[i]=e)},addFeature:function(t){-1===this.currentConfig.features.indexOf(t)&&this.currentConfig.features.push(t)},removeFeature:function(t){this.currentConfig.features=this.currentConfig.features.filter(function(e){return e!==t})},clearFeatures:function(){this.currentConfig.features.length=0}})},18804(t,e,i){t.exports=new(i(83419))({initialize:function(t){this.renderer=t,this.programs={}},has:function(t){return void 0!==this.programs[t]},getShaderProgram:function(t,e,i){var n=this.getKey(t,e,i),s=this.programs[n];return s||(s=this.createShaderProgram(n,t,e,i)),s},getKey:function(t,e,i){var n=t.name;if(e&&e.length>0){n+="_";for(var s=0;s<e.length;s++){var r=e[s];r.disable||(n+="_"+r.name)}}return i&&i.length>0&&(n+="__",n+=i.sort().join("_")),n},createShaderProgram:function(t,e,i,n){var s=e.vertexShader,r=e.fragmentShader;if(s=s.replace(/\r/g,""),r=r.replace(/\r/g,""),i){for(var o,a,h={},l=0;l<i.length;l++){var u=i[l];if(!u.disable)for(o in u.additions)a=(a=u.additions[o]).replace(/\r/g,""),h[o]||(h[o]=""),h[o]+=a+"\n"}for(o in h){var d="#pragma phaserTemplate("+o+")\n";a=h[o],s=s.replace(d,a),r=r.replace(d,a)}}if(n){var c="",f=/[^a-zA-Z0-9]/g;for(l=0;l<n.length;l++)c+="#define FEATURE_"+n[l].toUpperCase().replace(f,"_")+"\n";s=s.replace("#pragma phaserTemplate(features)",c),r=r.replace("#pragma phaserTemplate(features)",c)}s=s.replace("#pragma phaserTemplate(shaderName)","#define SHADER_NAME "+t+"__VERTEX"),r=r.replace("#pragma phaserTemplate(shaderName)","#define SHADER_NAME "+t+"__FRAGMENT");var p=/\s*#pragma phaserTemplate\(.*/g;s=s.replace(p,""),r=r.replace(p,"");var g=this.renderer.createProgram(s,r);return this.programs[t]=g,g}})},70554(t,e,i){var n=i(61340);t.exports={getTintFromFloats:function(t,e,i,n){return((255*n&255)<<24|(255*t&255)<<16|(255*e&255)<<8|255*i&255)>>>0},getTintAppendFloatAlpha:function(t,e){return((255*e&255)<<24|t)>>>0},getTintAppendFloatAlphaAndSwap:function(t,e){return((255*e&255)<<24|(255&t)<<16|(t>>8&255)<<8|t>>16&255)>>>0},getFloatsFromUintRGB:function(t){return[(t>>16&255)/255,(t>>8&255)/255,(255&t)/255]},checkShaderMax:function(t,e){var i=Math.min(16,t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS));return e&&-1!==e?Math.min(i,e):i},updateLightingUniforms:function(t,e,i,s,r,o,a,h){var l=e.camera,u=l.scene.sys.lights;if(u&&u.active){var d=u.getLights(l),c=d.length,f=u.ambientColor,p=e.height;if(t){i.setUniform("uNormSampler",s),i.setUniform("uCamera",[l.x,l.y,l.rotation,l.zoom]),i.setUniform("uAmbientLightColor",[f.r,f.g,f.b]),i.setUniform("uLightCount",c);for(var g=new n,m=0;m<c;m++){var v=d[m].light,x=v.color,y="uLights["+m+"].";g.copyWithScrollFactorFrom(l.matrixCombined,l.scrollX,l.scrollY,v.scrollFactorX,v.scrollFactorY),g.transformPoint(v.x,v.y,r),i.setUniform(y+"position",[r.x,p-r.y,v.z*l.zoom]),i.setUniform(y+"color",[x.r,x.g,x.b]),i.setUniform(y+"intensity",v.intensity),i.setUniform(y+"radius",v.radius)}o&&(i.setUniform("uDiffuseFlatThreshold",3*h),i.setUniform("uPenumbra",a))}else for(i.removeUniform("uNormSampler"),i.removeUniform("uCamera"),i.removeUniform("uAmbientLightColor"),i.removeUniform("uLightCount"),i.removeUniform("uPenumbra"),i.removeUniform("uDiffuseFlatThreshold"),m=0;m<c;m++)y="uLights["+m+"].",i.removeUniform(y+"position"),i.removeUniform(y+"color"),i.removeUniform(y+"intensity"),i.removeUniform(y+"radius")}}}},74797(t,e,i){var n=i(95428),s=i(72905),r=i(83419),o=i(8054),a=i(50792),h=i(92503),l=i(50030),u=i(37867),d=i(29747),c=i(87774),f=i(97480),p=i(69442),g=i(70554),m=i(88815),v=i(26128),x=i(37959),y=i(1482),T=i(86272),w=i(82751),b=i(13760),S=i(84387),C=i(85788),E=i(47774),A=i(53314),_=i(30130),M=i(65656),R=i(18804);t.exports=new r({Extends:a,initialize:function(t){a.call(this);var e=t.config,i={alpha:e.transparent,desynchronized:e.desynchronized,depth:!0,antialias:e.antialiasGL,premultipliedAlpha:e.premultipliedAlpha,stencil:!0,failIfMajorPerformanceCaveat:e.failIfMajorPerformanceCaveat,powerPreference:e.powerPreference,preserveDrawingBuffer:e.preserveDrawingBuffer,willReadFrequently:!1};this.config={clearBeforeRender:e.clearBeforeRender,antialias:e.antialias,backgroundColor:e.backgroundColor,contextCreation:i,roundPixels:e.roundPixels,pathDetailThreshold:e.pathDetailThreshold,maxTextures:e.maxTextures,maxTextureSize:e.maxTextureSize,batchSize:e.batchSize,maxLights:e.maxLights,mipmapFilter:e.mipmapFilter},this.game=t,this.type=o.WEBGL,this.renderNodes=null,this.cameraRenderNode=null,this.shaderProgramFactory=new R(this),this.width=0,this.height=0,this.canvas=t.canvas,this.blendModes=[],this.contextLost=!1,this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92,isFramebuffer:!1,bufferWidth:0,bufferHeight:0,unpremultiplyAlpha:!0},this.maxTextures=0,this.textureUnitIndices=[],this.glBufferWrappers=[],this.glProgramWrappers=[],this.glTextureWrappers=[],this.glFramebufferWrappers=[],this.glVAOWrappers=[],this.genericQuadIndexBuffer=null,this.baseDrawingContext=null,this.currentViewCamera=null,this.drawingContextPool=new M(this,1e3,1024),this.contextLostHandler=d,this.contextRestoredHandler=
1d,this.previousContextLostHandler=d,this.previousContextRestoredHandler=d,this.gl=null,this.glWrapper=null,this.glTextureUnits=null,this.supportedExtensions=null,this.instancedArraysExtension=null,this.parallelShaderCompileExtension=null,this.standardDerivativesExtension=null,this.vaoExtension=null,this.extensions={},this.glFormats,this.compression,this.drawingBufferHeight=0,this.blankTexture=null,this.normalTexture=null,this.whiteTexture=null,this.shaderSetters=null,this.mipmapFilter=null,this.isBooted=!1,this.projectionMatrix,this.projectionWidth=0,this.projectionHeight=0,this.projectionFlipY=!1,this.spector=null,this._debugCapture=!1,this.init(this.config)},init:function(t){var e,i=this.game,n=this.canvas,s=t.backgroundColor;if(!(e=i.config.context?i.config.context:n.getContext("webgl",t.contextCreation)||n.getContext("experimental-webgl",t.contextCreation))||e.isContextLost())throw this.contextLost=!0,Error("WebGL unsupported");this.gl=e,this.setExtensions(),this.setContextHandlers(),i.context=e;for(var r=0;r<=27;r++)this.blendModes.push(E.createCombined(this));for(this.blendModes[1].func=[e.ONE,e.DST_ALPHA,e.ONE,e.DST_ALPHA],this.blendModes[2].func=[e.DST_COLOR,e.ONE_MINUS_SRC_ALPHA,e.DST_COLOR,e.ONE_MINUS_SRC_ALPHA],this.blendModes[3].func=[e.ONE,e.ONE_MINUS_SRC_COLOR,e.ONE,e.ONE_MINUS_SRC_COLOR],this.blendModes[17].equation=[e.FUNC_REVERSE_SUBTRACT,e.FUNC_REVERSE_SUBTRACT],this.blendModes[17].func=[e.ZERO,e.ONE_MINUS_SRC_ALPHA,e.ZERO,e.ONE_MINUS_SRC_ALPHA],this.glFormats=[e.BYTE,e.SHORT,e.UNSIGNED_BYTE,e.UNSIGNED_SHORT,e.FLOAT],this.shaderSetters=new T(this),t.maxTextures&&-1!==t.maxTextures||(t.maxTextures=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS)),t.maxTextureSize||(t.maxTextureSize=e.getParameter(e.MAX_TEXTURE_SIZE)),this.compression=this.getCompressedTextures(),this.glWrapper=new x(this),this.glWrapper.update(void 0,!0),e.clearColor(s.redGL,s.greenGL,s.blueGL,s.alphaGL),e.clear(e.COLOR_BUFFER_BIT),-1!==["NEAREST","LINEAR","NEAREST_MIPMAP_NEAREST","LINEAR_MIPMAP_NEAREST","NEAREST_MIPMAP_LINEAR","LINEAR_MIPMAP_LINEAR"].indexOf(t.mipmapFilter)&&(this.mipmapFilter=e[t.mipmapFilter]),this.maxTextures=g.checkShaderMax(e,t.maxTextures),r=0;r<this.maxTextures;r++)this.textureUnitIndices.push(r);return this.glTextureUnits=new b(this),this.projectionMatrix=new u().identity(),i.textures.once(p.READY,this.boot,this),this},boot:function(){var t=this.game,e=this.gl,i=t.scale.baseSize,n=i.width,s=i.height;this.width=n,this.height=s,this.isBooted=!0,this.glWrapper.updateVAO({vao:null}),this.genericQuadIndexBuffer=this.createIndexBuffer(new Uint16Array([0,1,2,3]),e.STATIC_DRAW),this.renderNodes=new _(this),this.cameraRenderNode=this.renderNodes.getNode("Camera"),this.blankTexture=t.textures.getFrame("__DEFAULT").glTexture,this.normalTexture=t.textures.getFrame("__NORMAL").glTexture,this.whiteTexture=t.textures.getFrame("__WHITE").glTexture,this.baseDrawingContext=new c(this,{autoClear:!0,useCanvas:!0,clearColor:[this.config.backgroundColor.redGL,this.config.backgroundColor.greenGL,this.config.backgroundColor.blueGL,this.config.backgroundColor.alphaGL]}),this.on(h.RESIZE,this.baseDrawingContext.resize,this.baseDrawingContext),t.scale.on(f.RESIZE,this.onResize,this),this.resize(n,s)},setExtensions:function(){var t=this.gl,e=this.game,i=t.getSupportedExtensions();this.supportedExtensions=i;var n="ANGLE_instanced_arrays";if(this.instancedArraysExtension=i.indexOf(n)>-1?t.getExtension(n):null,e.config.skipUnreadyShaders){var s="KHR_parallel_shader_compile";this.parallelShaderCompileExtension=i.indexOf(s)>-1?t.getExtension(s):null,this.parallelShaderCompileExtension||(e.config.skipUnreadyShaders=!1)}var r="OES_vertex_array_object";this.vaoExtension=i.indexOf(r)>-1?t.getExtension(r):null;var o="OES_standard_derivatives";if(this.standardDerivativesExtension=i.indexOf(o)>-1?t.getExtension(o):null,t instanceof WebGLRenderingContext){if(this.instancedArraysExtension)t.vertexAttribDivisor=this.instancedArraysExtension.vertexAttribDivisorANGLE.bind(this.instancedArraysExtension),t.drawArraysInstanced=this.instancedArraysExtension.drawArraysInstancedANGLE.bind(this.instancedArraysExtension),t.drawElementsInstanced=this.instancedArraysExtension.drawElementsInstancedANGLE.bind(this.instancedArraysExtension);else throw Error("ANGLE_instanced_arrays extension not supported. Required for rendering.");if(this.vaoExtension)t.createVertexArray=this.vaoExtension.createVertexArrayOES.bind(this.vaoExtension),t.bindVertexArray=this.vaoExtension.bindVertexArrayOES.bind(this.vaoExtension),t.deleteVertexArray=this.vaoExtension.deleteVertexArrayOES.bind(this.vaoExtension),t.isVertexArray=this.vaoExtension.isVertexArrayOES.bind(this.vaoExtension);else throw Error("OES_vertex_array_object extension not supported. Required for rendering.");if(this.standardDerivativesExtension)t.FRAGMENT_SHADER_DERIVATIVE_HINT=this.standardDerivativesExtension.FRAGMENT_SHADER_DERIVATIVE_HINT_OES;else if(e.config.smoothPixelArt)throw Error("OES_standard_derivatives extension not supported. Cannot use smoothPixelArt.")}},setContextHandlers:function(t,e){this.previousContextLostHandler&&this.canvas.removeEventListener("webglcontextlost",this.previousContextLostHandler,!1),this.previousContextRestoredHandler&&this.canvas.removeEventListener("webglcontextrestored",this.previousContextRestoredHandler,!1),"function"==typeof t?this.contextLostHandler=t.bind(this):this.contextLostHandler=this.dispatchContextLost.bind(this),"function"==typeof e?this.contextRestoredHandler=e.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(t){this.contextLost=!0,console&&console.warn("WebGL Context lost. Renderer disabled"),this.emit
1(h.LOSE_WEBGL,this),t.preventDefault()},dispatchContextRestored:function(t){if(this.gl.isContextLost()){console&&console.log("WebGL Context restored, but context is still lost");return}this.setExtensions(),this.glWrapper.update(A.getDefault(this),!0),this.glTextureUnits.init(),this.compression=this.getCompressedTextures();var e=function(t){t.createResource()};n(this.glTextureWrappers,e),n(this.glBufferWrappers,e),n(this.glFramebufferWrappers,e),n(this.glProgramWrappers,e),n(this.glVAOWrappers,e),this.glTextureUnits.bindUnits(this.glTextureUnits.units,!0),this.resize(this.game.scale.baseSize.width,this.game.scale.baseSize.height),this.contextLost=!1,console&&console.warn("WebGL Context restored. Renderer running again."),this.emit(h.RESTORE_WEBGL,this),t.preventDefault()},captureFrame:function(t,e){void 0===t&&(t=!1),void 0===e&&(e=!1)},captureNextFrame:function(){},getFps:function(){},log:function(){},startCapture:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=!1),void 0===i&&(i=!1)},stopCapture:function(){},onCapture:function(t){},onResize:function(t,e){(e.width!==this.width||e.height!==this.height)&&this.resize(e.width,e.height)},resize:function(t,e){var i=this.gl;return this.width=t,this.height=e,this.setProjectionMatrix(t,e),this.drawingBufferHeight=i.drawingBufferHeight,this.glWrapper.update({scissor:{box:[0,i.drawingBufferHeight-e,t,e]},viewport:[0,0,t,e]}),this.emit(h.RESIZE,t,e),this},getCompressedTextures:function(){var t="WEBGL_compressed_texture_",e="WEBKIT_"+t,i=function(i,n){var s=i.getExtension(t+n)||i.getExtension(e+n)||i.getExtension("EXT_texture_compression_"+n);if(s){var r={};for(var o in s)r[s[o]]=o;return r}},n=this.gl;return{ETC:i(n,"etc"),ETC1:i(n,"etc1"),ATC:i(n,"atc"),ASTC:i(n,"astc"),BPTC:i(n,"bptc"),RGTC:i(n,"rgtc"),PVRTC:i(n,"pvrtc"),S3TC:i(n,"s3tc"),S3TCSRGB:i(n,"s3tc_srgb"),IMG:!0}},getCompressedTextureName:function(t,e){var i=this.compression[t.toUpperCase()];if(e in i)return i[e]},supportsCompressedTexture:function(t,e){var i=this.compression[t.toUpperCase()];if(i)if(e)return e in i;else return!0;return!1},getAspectRatio:function(){return this.width/this.height},setProjectionMatrix:function(t,e,i){return(t!==this.projectionWidth||e!==this.projectionHeight||i!==this.projectionFlipY)&&(this.projectionWidth=t,this.projectionHeight=e,this.projectionFlipY=!!i,i?this.projectionMatrix.ortho(0,t,0,e,-1e3,1e3):this.projectionMatrix.ortho(0,t,e,0,-1e3,1e3)),this},setProjectionMatrixFromDrawingContext:function(t){return this.setProjectionMatrix(t.width,t.height,!1)},resetProjectionMatrix:function(){return this.setProjectionMatrix(this.width,this.height)},hasExtension:function(t){return!!this.supportedExtensions&&this.supportedExtensions.indexOf(t)},getExtension:function(t){return this.hasExtension(t)?(t in this.extensions||(this.extensions[t]=this.gl.getExtension(t)),this.extensions[t]):null},addBlendMode:function(t,e){return this.blendModes.push(E.createCombined(this,!0,void 0,e,t[0],t[1]))-1-1},updateBlendMode:function(t,e,i){if(t>17&&this.blendModes[t]){var n=this.blendModes[t];2===e.length?n.func=[e[0],e[1],e[0],e[1]]:n.func=[e[0],e[1],e[2],e[3]],"number"==typeof i?n.equation=[i,i]:n.equation=[i[0],i[1]]}return this},removeBlendMode:function(t){return t>17&&this.blendModes[t]&&this.blendModes.splice(t,1),this},clearFramebuffer:function(t,e,i){var n=this.gl,s=0;t&&(this.glWrapper.updateColorClearValue({colorClearValue:t}),s|=n.COLOR_BUFFER_BIT),void 0!==e&&(this.glWrapper.updateStencilClear({stencil:{clear:e}}),s|=n.STENCIL_BUFFER_BIT),void 0!==i&&(s|=n.DEPTH_BUFFER_BIT),n.clear(s)},createTextureFromSource:function(t,e,i,n,s,r){void 0===s&&(s=!1);var a=this.gl,h=a.NEAREST,u=a.NEAREST,d=a.CLAMP_TO_EDGE,c=l(e=t?t.width:e,i=t?t.height:i);if(c&&!s&&(d=a.REPEAT),n===o.ScaleModes.LINEAR&&this.config.antialias){var f=t&&t.compressed,p=!f&&c||f&&t.mipmaps.length>1;h=this.mipmapFilter&&p?this.mipmapFilter:a.LINEAR,u=a.LINEAR}return t||"number"!=typeof e||"number"!=typeof i?this.createTexture2D(0,h,u,d,d,a.RGBA,t,void 0,void 0,void 0,void 0,r):this.createTexture2D(0,h,u,d,d,a.RGBA,null,e,i,void 0,void 0,r)}
1,createTexture2D:function(t,e,i,n,s,r,o,a,h,l,u,d){"number"!=typeof a&&(a=o?o.width:1),"number"!=typeof h&&(h=o?o.height:1);var c=new w(this,t,e,i,n,s,r,o,a,h,l,u,d);return this.glTextureWrappers.push(c),c},createFramebuffer:function(t,e,i){Array.isArray(t)||null===t||(t=[t]);var n=new S(this,t,e,i);return this.glFramebufferWrappers.push(n),n},createProgram:function(t,e){var i=new y(this,t,e);return this.glProgramWrappers.push(i),i},createVertexBuffer:function(t,e){var i=new v(this,t,this.gl.ARRAY_BUFFER,e);return this.glBufferWrappers.push(i),i},createIndexBuffer:function(t,e){var i=new v(this,t,this.gl.ELEMENT_ARRAY_BUFFER,e);return this.glBufferWrappers.push(i),i},createVAO:function(t,e,i){var n=new C(this,t,e,i);return this.glVAOWrappers.push(n),n},deleteTexture:function(t){if(t)return s(this.glTextureWrappers,t),t.destroy(),this},deleteFramebuffer:function(t){return t&&(s(this.glFramebufferWrappers,t),t.destroy()),this},deleteProgram:function(t){return t&&(s(this.glProgramWrappers,t),t.destroy()),this},deleteBuffer:function(t){return t&&(s(this.glBufferWrappers,t),t.destroy()),this},preRender:function(){if(!this.contextLost){this.emit(h.PRE_RENDER_CLEAR);var t=this.baseDrawingContext;if(this.config.clearBeforeRender){var e=this.config.backgroundColor;t.setClearColor(e.redGL,e.greenGL,e.blueGL,e.alphaGL),t.setAutoClear(!0,!0,!0)}else t.setAutoClear(!1,!1,!1);t.use(),this.emit(h.PRE_RENDER)}}
vendor: 13,610 bytes, line 1
1,render:function(t,e,i){this.contextLost||(this.emit(h.RENDER,t,i),this.currentViewCamera=i,this.cameraRenderNode.run(this.baseDrawingContext,e,i),this.currentViewCamera=null)},postRender:function(){if(this.baseDrawingContext.release(),!this.contextLost){this.emit(h.POST_RENDER);var t=this.snapshotState;t.callback&&(m(this.gl,t),t.callback=null)}},drawElements:function(t,e,i,n,s,r,o){var a=this.gl;t.beginDraw(),i.bind(),n.bind(),this.glTextureUnits.bindUnits(e),a.drawElements(o||a.TRIANGLE_STRIP,s,a.UNSIGNED_SHORT,r)},drawInstancedArrays:function(t,e,i,n,s,r,o,a){var h=this.gl;t.beginDraw(),i.bind(),n.bind(),this.glTextureUnits.bindUnits(e),h.drawArraysInstanced(a||h.TRIANGLE_STRIP,s,r,o)},snapshot:function(t,e,i){return this.snapshotArea(0,0,this.gl.drawingBufferWidth,this.gl.drawingBufferHeight,t,e,i)},snapshotArea:function(t,e,i,n,s,r,o){var a=this.snapshotState;return a.callback=s,a.type=r,a.encoder=o,a.getPixel=!1,a.x=t,a.y=e,a.width=i,a.height=n,a.unpremultiplyAlpha=this.game.config.premultipliedAlpha,this},snapshotPixel:function(t,e,i){return this.snapshotArea(t,e,1,1,i),this.snapshotState.getPixel=!0,this},snapshotFramebuffer:function(t,e,i,n,s,r,o,a,h,l,u){void 0===s&&(s=!1),void 0===r&&(r=0),void 0===o&&(o=0),void 0===a&&(a=e),void 0===h&&(h=i),"pixel"===l&&(s=!0,l="image/png"),this.snapshotArea(r,o,a,h,n,l,u);var d=this.snapshotState;return d.getPixel=s,d.isFramebuffer=!0,d.bufferWidth=e,d.bufferHeight=i,d.width=Math.min(d.width,e),d.height=Math.min(d.height,i),this.glWrapper.updateBindingsFramebuffer({bindings:{framebuffer:t}}),m(this.gl,d),d.callback=null,d.isFramebuffer=!1,this},canvasToTexture:function(t,e,i,n){void 0===i&&(i=!1),void 0===n&&(n=!0);var s=this.gl,r=s.NEAREST,o=s.NEAREST,a=t.width,h=t.height,u=s.CLAMP_TO_EDGE,d=l(a,h);return(!i&&d&&(u=s.REPEAT),this.config.antialias&&(r=d&&this.mipmapFilter?this.mipmapFilter:s.LINEAR,o=s.LINEAR),e)?(e.update(t,a,h,n,u,u,r,o,e.format),e):this.createTexture2D(0,r,o,u,u,s.RGBA,t,a,h,!0,!1,n)},createCanvasTexture:function(t,e,i){return void 0===e&&(e=!1),void 0===i&&(i=!0),this.canvasToTexture(t,null,e,i)},updateCanvasTexture:function(t,e,i,n){return void 0===i&&(i=!0),void 0===n&&(n=!1),this.canvasToTexture(t,e,n,i)},videoToTexture:function(t,e,i,n){void 0===i&&(i=!1),void 0===n&&(n=!0);var s=this.gl,r=s.NEAREST,o=s.NEAREST,a=t.videoWidth,h=t.videoHeight,u=s.CLAMP_TO_EDGE,d=l(a,h);return(!i&&d&&(u=s.REPEAT),this.config.antialias&&(r=d&&this.mipmapFilter?this.mipmapFilter:s.LINEAR,o=s.LINEAR),e)?(e.update(t,a,h,n,u,u,r,o,e.format),e):this.createTexture2D(0,r,o,u,u,s.RGBA,t,a,h,!0,!0,n)},createVideoTexture:function(t,e,i){return void 0===e&&(e=!1),void 0===i&&(i=!0),this.videoToTexture(t,null,e,i)},updateVideoTexture:function(t,e,i,n){return void 0===i&&(i=!0),void 0===n&&(n=!1),this.videoToTexture(t,e,n,i)},createUint8ArrayTexture:function(t,e,i,n,s){var r=this.gl,o=r.NEAREST,a=r.NEAREST,h=r.CLAMP_TO_EDGE;return l(e,i)&&(h=r.REPEAT),void 0===n&&(n=!0),void 0===s&&(s=!0),this.createTexture2D(0,o,a,h,h,r.RGBA,t,e,i,n,!1,s)},setTextureFilter:function(t,e){var i=this.gl,n=0===e?i.LINEAR:i.NEAREST,s=this.glTextureUnits,r=s.units[0];return s.bind(t,0),t.update(t.pixels,t.width,t.height,t.flipY,t.wrapS,t.wrapT,n,n,t.format),r&&s.bind(r,0),this},setTextureWrap:function(t,e,i){var n=this.gl;if(!l(t.width,t.height)&&(e!==n.CLAMP_TO_EDGE||i!==n.CLAMP_TO_EDGE))return this;var s=this.glTextureUnits,r=s.units[0];return s.bind(t,0),t.update(t.pixels,t.width,t.height,t.flipY,e,i,t.minFilter,t.magFilter,t.format),r&&s.bind(r,0),this},getMaxTextureSize:function(){return this.config.maxTextureSize},destroy:function(){this.off(h.RESIZE,this.baseDrawingContext.resize,this.baseDrawingContext),this.canvas.removeEventListener("webglcontextlost",this.contextLostHandler,!1),this.canvas.removeEventListener("webglcontextrestored",this.contextRestoredHandler,!1);var t=function(t){t.destroy()};n(this.glBufferWrappers,t),n(this.glFramebufferWrappers,t),n(this.glProgramWrappers,t),n(this.glTextureWrappers,t),this.removeAllListeners(),this.extensions={},this.gl=null,this.game=null,this.canvas=null,this.contextLost=!0}})},14500(t){t.exports={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}}},4159(t,e,i){var n=i(14500);t.exports=i(79291)(!1,{Shaders:i(89350),ShaderAdditionMakers:i(83786),DrawingContext:i(87774),DrawingContextPool:i(65656),ProgramManager:i(56436),RenderNodes:i(54521),ShaderProgramFactory:i(18804),Utils:i(70554),WebGLRenderer:i(74797),Wrappers:i(31884)},n)},47774(t){t.exports={createCombined:function(t,e,i,n,s,r){var o=t.gl;return void 0===e&&(e=!0),void 0===i&&(i=[0,0,0,0]),void 0===n&&(n=o.FUNC_ADD),void 0===s&&(s=o.ONE),void 0===r&&(r=o.ONE_MINUS_SRC_ALPHA),{enabled:e,color:i,equation:[n,n],func:[s,r,s,r]}},createSeparate:function(t,e,i,n,s,r,o,a,h){var l=t.gl;return void 0===e&&(e=!0),void 0===i&&(i=[0,0,0,0]),void 0===n&&(n=l.FUNC_ADD),void 0===s&&(s=l.FUNC_ADD),void 0===r&&(r=l.ONE),void 0===o&&(o=l.ONE_MINUS_SRC_ALPHA),void 0===a&&(a=l.ONE),void 0===h&&(h=l.ONE_MINUS_SRC_ALPHA),{enabled:e,color:i,equation:[n,s],func:[r,o,a,h]}}}},53314(t,e,i){var n=i(8054),s=i(62644),r=i(71623);t.exports={getDefault:function(t){return{bindings:{activeTexture:0,arrayBuffer:null,elementArrayBuffer:null,framebuffer:null,program:null,renderbuffer:null},blend:s(t.blendModes[n.BlendModes.NORMAL]),colorClearValue:[0,0,0,1],colorWritemask:[!0,!0,!0,!0],cullFace:!1,depthTest:!1,scissor:{enable:!0,box:[0,0,0,0]},stencil:r.create(t),texturing:{flipY:!1,premultiplyAlpha:!1},vao:null,viewport:[0,0,0,0]}}}},71623(t){t.exports={create:function(t,e,i,n,s,r,o,a,h){var l=t.gl;return void 0===e&&(e=!1),void 0===i&&(i=l.ALWAYS),void 0===n&&(n=0),void 0===s&&(s=255),void 0===r&&(r=l.KEEP),void 0===o&&(o=l.KEEP),void 0===a&&(a=l.KEEP),void 0===h&&(h=0),{enabled:e,func:{func:i,ref:n,mask:s},op:{fail:r,zfail:o,zpass:a},clear:h}}}},13961(t,e,i){var n=i(83419),s=i(56436),r=i(40952),o=i(6141),a=i(36909);t.exports=new n({Extends:o,initialize:function(t,e,i){var n=t.renderer,h=n.gl,l=(i=this._copyAndCompleteConfig(t,i||{},e)).name;if(!l)throw Error("BatchHandler must have a name");o.call(this,l,t),this.instancesPerBatch=-1,this.verticesPerInstance=i.verticesPerInstance;var u=Math.floor(65536/this.verticesPerInstance),d=i.instancesPerBatch||n.config.batchSize||u;this.instancesPerBatch=Math.min(d,u),this.indicesPerInstance=i.indicesPerInstance,this.bytesPerIndexPerInstance=this.indicesPerInstance*Uint16Array.BYTES_PER_ELEMENT,this.maxTexturesPerBatch=1,this.manager.on(a.Events.SET_PARALLEL_TEXTURE_UNITS,this.updateTextureCount,this),n.glWrapper.updateVAO({vao:null}),this.indexBuffer=n.createIndexBuffer(this._generateElementIndices(this.instancesPerBatch),i.indexBufferDynamic?h.DYNAMIC_DRAW:h.STATIC_DRAW);var c=i.vertexBufferLayout;if(c.count=this.instancesPerBatch*this.verticesPerInstance,this.vertexBufferLayout=new r(n,c,null),this.programManager=new s(n,[this.vertexBufferLayout],this.indexBuffer),this.programManager.setBaseShader(i.shaderName,i.vertexSource,i.fragmentSource),i.shaderAdditions)for(var f=0;f<i.shaderAdditions.length;f++){var p=i.shaderAdditions[f];this.programManager.addAddition(p)}if(i.shaderFeatures)for(f=0;f<i.shaderFeatures.length;f++)this.programManager.addFeature(i.shaderFeatures[f]);this.bytesPerInstance=this.vertexBufferLayout.layout.stride*this.verticesPerInstance,this.floatsPerInstance=this.bytesPerInstance/Float32Array.BYTES_PER_ELEMENT,this.currentBatchEntry={start:0,count:0,unit:0,texture:[]},this.batchEntries=[],this.instanceCount=0,this.updateTextureCount(t.maxParallelTextureUnits),this.resize(n.width,n.height),n.on(a.Events.RESIZE,this.resize,this)},_copyAndCompleteConfig:function(t,e,i){var n={};n.name=e.name||i.name,n.verticesPerInstance=e.verticesPerInstance||i.verticesPerInstance,n.indicesPerInstance=e.indicesPerInstance||i.indicesPerInstance,n.shaderName=e.shaderName||i.shaderName,n.vertexSource=e.vertexSource||i.vertexSource,n.fragmentSource=e.fragmentSource||i.fragmentSource,n.shaderAdditions=e.shaderAdditions||i.shaderAdditions,Array.isArray(n.shaderAdditions)&&(n.shaderAdditions=n.shaderAdditions.map(function(t){return Object.assign({},t)})),n.shaderFeatures=e.shaderFeatures||i.shaderFeatures,n.indexBufferDynamic=e.indexBufferDynamic||i.indexBufferDynamic,n.instancesPerBatch=e.instancesPerBatch,n.maxTexturesPerBatch=e.maxTexturesPerBatch;var s=e.vertexBufferLayout||i.vertexBufferLayout;n.vertexBufferLayout={},n.vertexBufferLayout.usage=s.usage,n.vertexBufferLayout.layout=[];for(var r=e.vertexBufferLayoutRemove||[],o=0;o<s.layout.length;o++){var a=s.layout[o];-1===r.indexOf(a.name)&&(n.vertexBufferLayout.layout[o]={name:a.name,size:a.size||1,type:a.type||"FLOAT",normalized:a.normalized||!1})}if(e.vertexBufferLayoutAdd){var h=e.vertexBufferLayoutAdd||[];for(o=0;o<h.length;o++){var l=h[o];n.vertexBufferLayout.layout.push({name:l.name,size:l.size||1,type:l.type||"FLOAT",normalized:l.normalized||!1})}}return n},_generateElementIndices:function(t){return new ArrayBuffer(t*this.bytesPerInstance)},resize:function(t,e){},updateTextureCount:function(t){},run:function(t){},batch:function(){}})},16971(t,e,i){var n=i(83419),s=i(4127),r=i(89924),o=i(13961);t.exports=new n({Extends:o,initialize:function(t,e){o.call(this,t,this.defaultConfig,e),this._emptyTextures=[]},defaultConfig:{name:"BatchHandlerPointLight",verticesPerInstance:4,indicesPerInstance:6,shaderName:"POINTLIGHT",vertexSource:r,fragmentSource:s,vertexBufferLayout:{usage:"DYNAMIC_DRAW",layout:[{name:"inPosition",size:2},{name:"inLightPosition",size:2},{name:"inLightRadius",size:1},{name:"inLightAttenuation",size:1},{name:"inLightColor",size:4}]}},_generateElementIndices:function(t){for(var e=new ArrayBuffer(6*t*2),i=new Uint16Array(e),n=0,s=0;s<t;s++){var r=4*s;i[n++]=r,i[n++]=r,i[n++]=r+1,i[n++]=r+2,i[n++]=r+3,i[n++]=r+3}return e},setupUniforms:function(t){var e=this.programManager,i=t.width,n=t.height;e.setUniform("uCameraZoom",t.camera.zoom),e.setUniform("uResolution",[i,n]),t.renderer.setProjectionMatrixFromDrawingContext(t),e.setUniform("uProjectionMatrix",t.renderer.projectionMatrix.val)},run:function(t){var e=this.instanceCount;if(0!==e){this.onRunBegin(t);var i=this.programManager,n=i.getCurrentProgramSuite();if(n){var s=n.program,r=n.vao;this.setupUniforms(t),i.applyUniforms(s),this.vertexBufferLayout.buffer.update(this.instanceCount*this.bytesPerInstance),this.manager.renderer.drawElements(t,this._emptyTextures,s,r,e*this.indicesPerInstance,0)}this.instanceCount=0,this.onRunEnd(t)}},batch:function(t,e,i,n,s,r,o,a,h,l,u,d){0===this.instanceCount&&this.manager.setCurrentBatchNode(this,t);var c=e.color,f=e.intensity,p=e.radius,g=e.attenuation,m=c.r*f,v=c.g*f,x=c.b*f,y=e.alpha,T=this.instanceCount*this.floatsPerInstance,w=this.vertexBufferLayout.buffer.viewF32;w[T++]=s,w[T++]=r,w[T++]=u,w[T++]=d,w[T++]=p,w[T++]=g,w[T++]=m,w[T++]=v,w[T++]=x,w[T++]=y,w[T++]=i,w[T++]=n,w[T++]=u,w[T++]=d,w[T++]=p,w[T++]=g,w[T++]=m,w[T++]=v,w[T++]=x,w[T++]=y,w[T++]=h,w[T++]=l,w[T++]=u,w[T++]=d,w[T++]=p,w[T++]=g,w[T++]=m,w[T++]=v,w[T++]=x,w[T++]=y,w[T++]=o,w[T++]=a,w[T++]=u,w[T++]=d,w[T++]=p,w[T++]=g,w[T++]=m,w[T++]=v,w[T++]=x,w[T++]=y,this.instanceCount++,this.instanceCount===this.instancesPerBatch&&this.run(t)}})},15214(t,e,i){var n=i(26099),s=i(83419),r=i(62644),o=i(70554),a=i(98840),h=i(44667),l=i(81084),u=i(44349),d=i(6184),c=i(11653),f=i(40829),p=i(42792),g=i(96049),m=i(33997),v=i(79532),x=i(65217),y=i(74505),T=i(13961);t.exports=new s({Extends:T,initialize:function(t,e){this.renderOptions={multiTexturing:!1,texRes:!1,lighting:!1,selfShadow:!1,selfShadowPenumbra:0,selfShadowThreshold:0,smoothPixelArt:!1},T.call(this,t,this.defaultConfig,e),this.programManager.setUniform("uMainSampler[0]",this.manager.renderer.textureUnitIndices),this.nextRenderOptions=r(this.renderOptions),this._renderOptionsChanged=!1,this._lightVector=new n},defaultConfig:{name:"BatchHandlerQuad",verticesPerInstance:4,indicesPerInstance:6,shaderName:"STANDARD",vertexSource:h,fragmentSource:a,shaderAdditions:[p(),g(!0),y(!0),c(1),m(),u(),d(!0),x(!0),v(!0),f(!0),l(!0)],vertexBufferLayout:{usage:"DYNAMIC_DRAW",layout:[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexDatum"},{name:"inTintEffect"},{name:"inTint",size:4,type:"UNSIGNED_BYTE",normalized:!0}]}},_generateElementIndices:function(t){for(var e=new ArrayBuffer(6*t*2),i=new Uint16Array(e),n=0,s=0;s<t;s++){var r=4*s;i[n++]=r,i[n++]=r,i[n++]=r+1,i[n++]=r+2,i[n++]=r+3,i[n++]=r+3}return e},updateTextureCount:function(t){var e=this.manager.renderer;void 0===t&&(t=e.maxTextures);var i=Math.max(1,Math.min(t,e.maxTextures));if(i!==this.maxTexturesPerBatch){if(i<this.currentBatchEntry.unit&&this.manager.currentBatchNode===this&&this.manager.finishBatch(),this.maxTexturesPerBatch=i,this.renderOptions.multiTexturing){var n=this.programManager,s=n.getAdditionsByTag("TEXTURE")[0];s&&n.replaceAddition(s.name,m(this.maxTexturesPerBatch))}this.resize(e.width,e.height)}},setupUniforms:function(t){var e=this.programManager,i=this.renderOptions;e.setUniform("uResolution",[t.width,t.height]),t.renderer.setProjectionMatrixFromDrawingContext(t),e.setUniform("uProjectionMatrix",t.renderer.projectionMatrix.val),this.renderOptions.lighting&&o.updateLightingUniforms(i.lighting,t,e,1,this._lightVector,i.selfShadow,i.selfShadowThreshold,i.selfShadowPenumbra)},setupTextureUniforms:function(t){var e=this.programManager;if(this.renderOptions.multiTexturing){for(var i=[],n=0;n<t.length;n++)i.push(t[n].width,t[n].height);
1e.setUniform("uMainResolution[0]",i)}else e.setUniform("uMainResolution[0]",[t[0].width,t[0].height])},finalizeTextureCount:function(t){var e=this.programManager;this.renderOptions.lighting&&(t=1);var i=e.getAdditionsByTag("TEXTURE")[0];i&&e.replaceAddition(i.name,m(t));var n=e.getAdditionsByTag("TexCount")[0];n&&e.replaceAddition(n.name,c(t))},updateRenderOptions:function(t){var e=this.nextRenderOptions,i=this.renderOptions,n=!1,s=!!t.multiTexturing&&!t.lighting;s!==i.multiTexturing&&(e.multiTexturing=s,n=!0);var r=!!t.lighting;r!==i.lighting&&(e.lighting=r,n=!0);var o=r&&t.lighting.selfShadow&&t.lighting.selfShadow.enabled;o!==i.selfShadow&&(e.selfShadow=o,n=!0);var a=o?t.lighting.selfShadow.penumbra:0;a!==i.selfShadowPenumbra&&(e.selfShadowPenumbra=a,n=!0);var h=o?t.lighting.selfShadow.diffuseFlatThreshold:0;h!==i.selfShadowThreshold&&(e.selfShadowThreshold=h,n=!0);var l=!!t.smoothPixelArt;l!==i.smoothPixelArt&&(e.smoothPixelArt=l,e.texRes=l,n=!0),this._renderOptionsChanged=n},updateShaderConfig:function(){var t,e=this.programManager,i=this.renderOptions,n=this.nextRenderOptions;if(i.multiTexturing!==n.multiTexturing){var s=n.multiTexturing;i.multiTexturing=s;var r=e.getAdditionsByTag("TexCount")[0];r&&e.replaceAddition(r.name,c(s?this.maxTexturesPerBatch:1));var o=e.getAdditionsByTag("TEXTURE")[0];o&&e.replaceAddition(o.name,m(s?this.maxTexturesPerBatch:1))}if(i.lighting!==n.lighting){var a=n.lighting;i.lighting=a;var h=e.getAdditionsByTag("LIGHTING");for(t=0;t<h.length;t++)h[t].disable=!a;if(a){var l=e.getAddition("DefineLights");l&&(l.additions.fragmentDefine="#define LIGHT_COUNT "+this.manager.renderer.config.maxLights)}}if(i.selfShadow!==n.selfShadow){var u=n.selfShadow;i.selfShadow=u,u?e.addFeature("SELFSHADOW"):e.removeFeature("SELFSHADOW")}if(i.selfShadowPenumbra=n.selfShadowPenumbra,i.selfShadowThreshold=n.selfShadowThreshold,i.smoothPixelArt!==n.smoothPixelArt){var d=n.smoothPixelArt;i.smoothPixelArt=d;var f=e.getAddition("SmoothPixelArt");f&&(f.disable=!d)}if(i.texRes!==n.texRes){var p=n.texRes;i.texRes=p;var g=e.getAddition("GetTexRes");g&&(g.disable=!p)}},run:function(t){if(0!==this.instanceCount){this.onRunBegin(t),this.pushCurrentBatchEntry();var e=this.programManager,i=this.bytesPerIndexPerInstance,n=this.indicesPerInstance,s=this.manager.renderer;this.vertexBufferLayout.buffer.update(this.instanceCount*this.bytesPerInstance);for(var r=this.batchEntries.length,o=0;o<r;o++){var a=this.batchEntries[o];this.finalizeTextureCount(a.unit);var h=e.getCurrentProgramSuite();if(h){var l=h.program,u=h.vao;this.setupUniforms(t),e.applyUniforms(l),this.renderOptions.texRes&&(this.setupTextureUniforms(a.texture),e.applyUniforms(l)),s.drawElements(t,a.texture,l,u,a.count*n,a.start*i)}}this.instanceCount=0,this.currentBatchEntry.start=0,this.batchEntries.length=0,this.onRunEnd(t)}},batch:function(t,e,i,n,s,r,o,a,h,l,u,d,c,f,p,g,m,v,x,y){0===this.instanceCount&&this.manager.setCurrentBatchNode(this,t),this.updateRenderOptions(y),this._renderOptionsChanged&&(this.run(t),this.updateShaderConfig());var T=this.batchTextures(e,y),w=this.instanceCount*this.floatsPerInstance,b=this.vertexBufferLayout.buffer,S=b.viewF32,C=b.viewU32;S[w++]=s,S[w++]=r,S[w++]=u,S[w++]=d+f,S[w++]=T,S[w++]=p,C[w++]=m,S[w++]=i,S[w++]=n,S[w++]=u,S[w++]=d,S[w++]=T,S[w++]=p,C[w++]=g,S[w++]=h,S[w++]=l,S[w++]=u+c,S[w++]=d+f,S[w++]=T,S[w++]=p,C[w++]=x,S[w++]=o,S[w++]=a,S[w++]=u+c,S[w++]=d,S[w++]=T,S[w++]=p,C[w++]=v,this.instanceCount++,this.currentBatchEntry.count++,this.instanceCount===this.instancesPerBatch&&this.run(t)},batchTextures:function(t,e){var i=this.renderOptions,n=0,s=this.currentBatchEntry;if(i.multiTexturing)-1===(n=t.batchUnit)&&(s.texture.length===this.maxTexturesPerBatch&&(this.pushCurrentBatchEntry(),s=this.currentBatchEntry),t.batchUnit=n=s.unit,s.texture[n]=t,s.unit++);else if(i.lighting){n=e.lighting.normalMapRotation;var r=e.lighting.normalGLTexture;(s.texture[0]!==t||s.texture[1]!==r)&&(this.pushCurrentBatchEntry(),s=this.currentBatchEntry,t.batchUnit=0,r.batchUnit=1,s.texture[0]=t,s.texture[1]=r,s.unit=2)}else s.texture[0]!==t&&(this.pushCurrentBatchEntry(),s=this.currentBatchEntry,t.batchUnit=0,s.texture[0]=t,s.unit=1);return n},pushCurrentBatchEntry:function(){if(!(this.currentBatchEntry.count<1)){this.batchEntries.push(this.currentBatchEntry);for(var t=this.currentBatchEntry.texture,e=0;e<t.length;e++)t[e].batchUnit=-1;this.currentBatchEntry={start:this.instanceCount,count:0,unit:0,texture:[]}}}})},72266(t,e,i){var n=i(83419),s=i(15214);t.exports=new n({Extends:s,initialize:function(t,e){void 0===e&&(e={}),e.name||(e.name="BatchHandlerQuadSingle"),e.shaderName||(e.shaderName="STANDARD_SINGLE"),e.instancesPerBatch||(e.instancesPerBatch=1),s.call(this,t,e)}})},62791(t,e,i){var n=i(83419),s=i(98840),r=i(44667),o=i(44349),a=i(11653),h=i(42792),l=i(96049),u=i(74505),d=i(33997),c=i(70554),f=i(15214),p=c.getTintAppendFloatAlpha;t.exports=new n({Extends:f,initialize:function(t,e){f.call(this,t,e),this.renderOptions.multiTexturing=!0},defaultConfig:{name:"BatchHandlerStrip",verticesPerInstance:2,indicesPerInstance:2,shaderName:"STRIP",vertexSource:r,fragmentSource:s,shaderAdditions:[h(),l(!0),u(!0),a(1),d(),o()],vertexBufferLayout:{usage:"DYNAMIC_DRAW",layout:[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexDatum"},{name:"inTintEffect"},{name:"inTint",size:4,type:"UNSIGNED_BYTE",normalized:!0}]}},_generateElementIndices:function(t){for(var e=new ArrayBuffer(2*t*2),i=new Uint16Array(e),n=i.length,s=0;s<n;s++)i[s]=s;return e}
1,batchStrip:function(t,e,i,n,s,r,o,a,h,l,u,d){0===this.instanceCount&&this.manager.setCurrentBatchNode(this,t);var c,f=s.length/(2*this.verticesPerInstance);if(f>this.instancesPerBatch)throw Error("BatchHandlerStrip: Vertex count exceeds maximum per batch ("+this.maxVerticesPerBatch+")");this.instanceCount+f>this.instancesPerBatch&&this.run(t),this.updateRenderOptions(u),this._renderOptionsChanged&&(this.run(t),this.updateShaderConfig());var g=this.batchTextures(n),m=this.instanceCount*this.floatsPerInstance,v=this.vertexBufferLayout.buffer,x=v.viewF32,y=v.viewU32,T=!1;if(this.instanceCount>0){var w=1+this.floatsPerInstance/this.verticesPerInstance;x[m++]=x[m-w],x[m++]=x[m-w],x[m++]=x[m-w],x[m++]=x[m-w],x[m++]=x[m-w],x[m++]=x[m-w],y[m++]=y[m-w],T=!0}d&&(c=[]);for(var b=i.a,S=i.b,C=i.c,E=i.d,A=i.e,_=i.f,M=s.length,R=0;R<M;R+=2){var O=s[R],P=s[R+1],L=O*b+P*C+A,D=O*S+P*E+_;x[m++]=L,x[m++]=D,x[m++]=r[R],x[m++]=r[R+1],x[m++]=g,x[m++]=l,y[m++]=p(o[R/2],a[R/2]*h),T?(R-=2,this.instanceCount++,this.currentBatchEntry.count++,T=!1):c&&c.push(L,D),R%4==2&&(this.instanceCount++,this.currentBatchEntry.count++)}d&&d.call(e,e,M,c)}})},21832(t,e,i){var n=i(83419),s=i(98840),r=i(44667),o=i(81084),a=i(44349),h=i(6184),l=i(11653),u=i(40829),d=i(42792),c=i(96049),f=i(33997),p=i(10455),g=i(79532),m=i(65217),v=i(74505),x=i(44832),y=i(23295),T=i(15214);t.exports=new n({Extends:T,initialize:function(t,e){T.call(this,t,e)},defaultConfig:{name:"BatchHandlerTileSprite",verticesPerInstance:4,indicesPerInstance:6,shaderName:"TILESPRITE",vertexSource:r,fragmentSource:s,shaderAdditions:[p(),d(),c(!0),y(!0),x(!0),v(!0),l(1),f(),a(),h(!0),m(!0),g(!0),u(!0),o(!0)],vertexBufferLayout:{usage:"DYNAMIC_DRAW",layout:[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inFrame",size:4},{name:"inTexDatum"},{name:"inTintEffect"},{name:"inTint",size:4,type:"UNSIGNED_BYTE",normalized:!0}]}},updateRenderOptions:function(t){T.prototype.updateRenderOptions.call(this,t);var e=this.renderOptions,i=this.nextRenderOptions,n=this._renderOptionsChanged;i.clampFrame=!!t.clampFrame,i.clampFrame!==e.clampFrame&&(n=!0),i.wrapFrame=!!t.wrapFrame,i.wrapFrame!==e.wrapFrame&&(n=!0),i.texRes=i.clampFrame||i.texRes,i.texRes!==e.texRes&&(n=!0),n&&(this._renderOptionsChanged=!0)},updateShaderConfig:function(){T.prototype.updateShaderConfig.call(this);var t=this.programManager,e=this.renderOptions,i=this.nextRenderOptions;if(i.clampFrame!==e.clampFrame&&(e.clampFrame=i.clampFrame,t.getAddition("TexCoordFrameClamp").disable=!i.clampFrame),i.wrapFrame!==e.wrapFrame){var n=i.wrapFrame;e.wrapFrame=n,t.getAddition("TexCoordFrameWrap").disable=!n}},batch:function(t,e,i,n,s,r,o,a,h,l,u,d,c,f,p,g,m,v,x,y,T,w,b,S,C,E,A,_){0===this.instanceCount&&this.manager.setCurrentBatchNode(this,t),this.updateRenderOptions(y),this._renderOptionsChanged&&(this.run(t),this.updateShaderConfig());var M=this.batchTextures(e,y),R=this.instanceCount*this.floatsPerInstance,O=this.vertexBufferLayout.buffer,P=O.viewF32,L=O.viewU32;P[R++]=s,P[R++]=r,P[R++]=b,P[R++]=S,P[R++]=u,P[R++]=d,P[R++]=c,P[R++]=f,P[R++]=M,P[R++]=p,L[R++]=m,P[R++]=i,P[R++]=n,P[R++]=T,P[R++]=w,P[R++]=u,P[R++]=d,P[R++]=c,P[R++]=f,P[R++]=M,P[R++]=p,L[R++]=g,P[R++]=h,P[R++]=l,P[R++]=A,P[R++]=_,P[R++]=u,P[R++]=d,P[R++]=c,P[R++]=f,P[R++]=M,P[R++]=p,L[R++]=x,P[R++]=o,P[R++]=a,P[R++]=C,P[R++]=E,P[R++]=u,P[R++]=d,P[R++]=c,P[R++]=f,P[R++]=M,P[R++]=p,L[R++]=v,this.instanceCount++,this.currentBatchEntry.count++,this.instanceCount===this.instancesPerBatch&&this.run(t)}})},62087(t,e,i){var n=i(26099),s=i(83419),r=i(81084),o=i(6184),a=i(13198),h=i(73416),l=i(91627),u=i(70554),d=i(13961);t.exports=new s({Extends:d,initialize:function(t,e){d.call(this,t,this.defaultConfig,e),this._emptyTextures=[],this.vertexCount=0,this._lightVector=new n,this.renderOptions={lighting:!1},this.nextRenderOptions={lighting:!1},this._renderOptionsChanged=!1},defaultConfig:{name:"BatchHandlerTriFlat",verticesPerInstance:3,indicesPerInstance:3,shaderName:"FLAT",vertexSource:l,fragmentSource:h,shaderAdditions:[o(!0),a(!0),r(!0)],indexBufferDynamic:!0,vertexBufferLayout:{usage:"DYNAMIC_DRAW",layout:[{name:"inPosition",size:2},{name:"inTint",size:4,type:"UNSIGNED_BYTE",normalized:!0}]}},_generateElementIndices:function(t){return new ArrayBuffer(3*t*2)},setupUniforms:function(t){var e=this.programManager;t.renderer.setProjectionMatrixFromDrawingContext(t),e.setUniform("uProjectionMatrix",t.renderer.projectionMatrix.val),this.renderOptions.lighting&&(u.updateLightingUniforms(this.renderOptions.lighting,t,e,1,this._lightVector),e.setUniform("uResolution",[t.width,t.height]))},updateRenderOptions:function(t){var e=this.nextRenderOptions,i=this.renderOptions,n=!1;t!==i.lighting&&(e.lighting=t,n=!0),this._renderOptionsChanged=n},updateShaderConfig:function(){var t=this.programManager,e=this.renderOptions,i=this.nextRenderOptions;if(e.lighting!==i.lighting){var n=i.lighting;e.lighting=n;for(var s=t.getAdditionsByTag("LIGHTING"),r=0;r<s.length;r++)s[r].disable=!n;if(n){var o=t.getAddition("DefineLights");o&&(o.additions.fragmentDefine="#define LIGHT_COUNT "+this.manager.renderer.config.maxLights)}}},run:function(t){if(0!==this.instanceCount){this.onRunBegin(t);
vendor: 15,962 bytes, line 1
1var e=this.programManager,i=e.getCurrentProgramSuite();if(i){var n=i.program,s=i.vao;this.setupUniforms(t),e.applyUniforms(n);var r=this.indicesPerInstance,o=this.instanceCount,a=this.manager.renderer,h=this.vertexBufferLayout.buffer,l=this.vertexBufferLayout.layout.stride;h.update(this.vertexCount*l),s.bind(),s.indexBuffer.update(o*r*2),a.drawElements(t,this._emptyTextures,n,s,o*r,0,a.gl.TRIANGLES)}this.instanceCount=0,this.vertexCount=0,this.onRunEnd(t)}},batch:function(t,e,i,n,s){0===this.instanceCount&&this.manager.setCurrentBatchNode(this,t),this.updateRenderOptions(s),this._renderOptionsChanged&&(this.run(t),this.updateShaderConfig());for(var r=0,o=0,a=this.instancesPerBatch,h=this.vertexBufferLayout.layout.stride,l=this.verticesPerInstance,u=this.indexBuffer.viewU16,d=this.instanceCount*this.indicesPerInstance,c=this.vertexBufferLayout.buffer,f=c.viewF32,p=c.viewU32,g=this.vertexCount*h/f.BYTES_PER_ELEMENT,m=[],v=0,x=[],y=0,T=0;T<e.length;T++){var w=e[T],b=2*w;m[T]!==r&&(f[g++]=i[b],f[g++]=i[b+1],p[g++]=n[w],m[v++]=r,x[y++]=this.vertexCount,this.vertexCount++);var S=x[y-1];u[d++]=S,++o===l&&(this.instanceCount++,o=0),(this.instanceCount===a||0===o&&d+l>=u.length)&&(r++,this.run(t),d=this.instanceCount*this.indicesPerInstance,g=this.vertexCount*h/f.BYTES_PER_ELEMENT,v=0,y=0)}}})},61842(t,e,i){var n=i(19715),s=i(1e3),r=i(61340),o=i(87841),a=i(43855),h=i(83419),l=i(70554),u=i(6141);function d(t){return l.getTintAppendFloatAlpha(0xffffff,t)}t.exports=new h({Extends:u,initialize:function(t){u.call(this,"Camera",t),this.batchHandlerQuadSingleNode=t.getNode("BatchHandlerQuadSingle"),this.fillCameraNode=t.getNode("FillCamera"),this.listCompositorNode=t.getNode("ListCompositor"),this._parentTransformMatrix=new r},run:function(t,e,i,r,h,l){this.onRunBegin(t);var u=t.renderer.drawingContextPool,c=this.manager,f=i.alpha,p=i.filters.internal.getActive(),g=i.filters.external.getActive(),m=h||i.forceComposite||p.length||g.length||f<1;r?i.matrixExternal.multiply(r,r):r=this._parentTransformMatrix.copyFrom(i.matrixExternal);var v=r.decomposeMatrix(),x=a(v.translateX,0)&&a(v.translateY,0)&&a(v.rotation,0)&&a(v.scaleX,1)&&a(v.scaleY,1),y=i.x,T=i.y,w=i.width,b=i.height,S=t.getClone();S.setCamera(i),m?((I=u.get(w,b)).setCamera(i),I.setScissorBox(0,0,w,b)):(I=S).setScissorBox(y,T,w,b),I.use();var C=this.fillCameraNode;if(i.backgroundColor.alphaGL>0){var E=i.backgroundColor,A=s(E.red,E.green,E.blue,E.alpha);C.run(I,A,m)}this.listCompositorNode.run(I,e,null,l);var _=i.flashEffect;_.postRenderWebGL()&&(A=s(_.red,_.green,_.blue,255*_.alpha),C.run(I,A,m));var M=i.fadeEffect;if(M.postRenderWebGL()&&(A=s(M.red,M.green,M.blue,255*M.alpha),C.run(I,A,m)),c.finishBatch(),m){var R={smoothPixelArt:c.renderer.game.config.smoothPixelArt},O=new o(0,0,I.width,I.height);for(N=0;N<p.length;N++)B=p[N],I=c.getNode(B.renderNode).run(B,I),k=B.getPadding(),O.setTo(O.x+k.x,O.y+k.y,O.width+k.width,O.height+k.height);var P=I,L=g.length>0,D=!L,F=new o(0,0,S.width,S.height);if(L){for(N=g.length-1;N>=0;N--)(B=g[N]).active&&(k=B.getPadding(),F.setTo(F.x+k.x,F.y+k.y,F.width+k.width,F.height+k.height));(D=F.width!==I.width||F.height!==I.height||!x)&&((I=u.get(F.width,F.height)).setScissorBox(0,0,F.width,F.height),I.setCamera(S.camera),I.use())}else I=S;if(D){var I,N,B,k,U,z,Y=F.x,X=F.y;r.setQuad(O.x,O.y,O.x+O.width,O.y+O.height),z=r.quad,U=L?0xffffffff:d(f),i.roundPixels&&(z[0]=Math.round(z[0]),z[1]=Math.round(z[1]),z[2]=Math.round(z[2]),z[3]=Math.round(z[3]),z[4]=Math.round(z[4]),z[5]=Math.round(z[5]),z[6]=Math.round(z[6]),z[7]=Math.round(z[7])),this.batchHandlerQuadSingleNode.batch(I,P.texture,z[0]-Y,z[1]-X,z[2]-Y,z[3]-X,z[6]-Y,z[7]-X,z[4]-Y,z[5]-X,0,1,1,-1,!1,U,U,U,U,R)}if(P!==I&&P.release(),L){var W=!1;for(N=0,P=null,k=new o;N<g.length;N++)(B=g[N]).allowBaseDraw&&I.width===S.width&&I.height===S.height&&N===g.length-1&&1===f&&(W=!0,P=S),I=c.getNode(B.renderNode).run(B,I,P,k),(k=B.currentPadding).x=-k.x,k.y=-k.y,k.width=-k.width,k.height=-k.height;if(!W){U=d(f);var G=-k.x,V=-k.y,H=I.width+k.right,j=I.height+k.bottom;this.batchHandlerQuadSingleNode.batch(S,I.texture,G,j,G,V,H,j,H,V,0,0,1,1,!1,U,U,U,U,R),I.release()}}}i.dirty=!1,i.emit(n.POST_RENDER,i),this.onRunEnd(t)}})},76409(t,e,i){var n=i(83419),s=i(6141);t.exports=new n({Extends:s,initialize:function(t){s.call(this,"DrawLine",t)},run:function(t,e,i,n,s,r,o,a,h){this.onRunBegin(t);var l=s-i,u=r-n,d=Math.sqrt(l*l+u*u),c=o*(r-n)/d,f=o*(i-s)/d,p=a*(r-n)/d,g=a*(i-s)/d,m=s-p,v=r-g,x=i-c,y=n-f,T=s+p,w=r+g,b=i+c,S=n+f,C=h.length;e?(h[C+0]=e.getX(b,S),h[C+1]=e.getY(b,S),h[C+2]=e.getX(x,y),h[C+3]=e.getY(x,y),h[C+4]=e.getX(m,v),h[C+5]=e.getY(m,v),h[C+6]=e.getX(T,w),h[C+7]=e.getY(T,w)):(h[C+0]=b,h[C+1]=S,h[C+2]=x,h[C+3]=y,h[C+4]=m,h[C+5]=v,h[C+6]=T,h[C+7]=w),this.onRunEnd(t)}})},95449(t,e,i){var n=i(19715),s=i(42538),r=i(83419),o=i(10312),a=i(6141);t.exports=new r({Extends:a,initialize:function(t){a.call(this,"DynamicTextureHandler",t),this.fillRectNode=this.manager.getNode("FillRect")},run:function(t){var e,i,r,a,h,l,u,d,c,f,p,g,m,v,x=t.drawingContext,y=x.camera,T=x.renderer,w=t.manager;this.onRunBegin(x);var b=x.framebuffer.renderTexture;if(b)for(var S=T.glTextureUnits,C=S.units,E=0;E<C.length;E++)C[E]===b&&S.bind(null,E);x.setScissorBox(0,0,y.width,y.height),x.use();for(var A=t.commandBuffer,_=A.length,M=!1,R=null,O=!1,P=x,L=T.gl,D=0;D<_;D++)switch(A[D]){case s.CLEAR:m=A[++D],v=A[++D],g=A[++D],a=A[++D];var F=P.getClone();F.setScissorEnable(!0),F.setScissorBox(m,v,g,a),F.use(),F.clear(L.COLOR_BUFFER_BIT|L.DEPTH_BUFFER_BIT|L.STENCIL_BUFFER_BIT),F.release();break;case s.FILL:var I=A[++D];m=A[++D],v=A[++D],g=A[++D],a=A[++D],this.fillRectNode.run(P,null,null,m,v,g,a,I,I,I,I,!1);break;case s.STAMP:h=A[++D],r=A[++D],m=A[++D],v=A[++D],e=A[++D],p=A[++D],d=A[++D],c=A[++D],f=A[++D],l=A[++D],u=A[++D],i=A[++D];var N=w.resetStamp(e,p);N.setPosition(m,v).setRotation(d).setTexture(h,r).setOrigin(l,u).setScale(c,f).setBlendMode(i),P=this._draw(T,N,P,x,R);break;case s.REPEAT:h=A[++D],r=A[++D],m=A[++D],v=A[++D],e=A[++D],p=A[++D],d=A[++D],c=A[++D],f=A[++D],l=A[++D],u=A[++D],i=A[++D],g=A[++D],a=A[++D];var B=A[++D],k=A[++D],U=A[++D],z=A[++D],Y=A[++D],X=w.resetTileSprite(e,p);X.setPosition(m,v).setRotation(d).setTexture(h,r).setSize(g,a).setOrigin(l,u).setScale(c,f).setBlendMode(i).setTilePosition(B,k).setTileRotation(U).setTileScale(z,Y),P=this._draw(T,X,P,x,R);break;case s.DRAW:var W=A[++D];if(m=A[++D],v=A[++D],void 0!==m){var G=W.x;W.x+=m}if(void 0!==v){var V=W.y;W.y+=v}P=this._draw(T,W,P,x,R),void 0!==m&&(W.x=G),void 0!==v&&(W.y=V);break;case s.SET_ERASE:A[++D]?(R||(R=x.getClone()).setBlendMode(o.ERASE),P!==R&&(P.release(),P=R,R.use())):P===R&&(R.release(),P=x,x.use());break;case s.PRESERVE:O=A[++D];break;case s.CALLBACK:(0,A[++D])();break;case s.CAPTURE:W=A[++D];var H=A[++D],j=t.startCapture(W,H),q=P;H.camera&&((q=q.getClone()).setCamera(H.camera),q.use()),this._draw(T,W,q,x,R,j.transform),t.finishCapture(W,j),H.camera&&q.release()}O||(A.length=0),P.release(),y.emit(n.POST_RENDER,y),this.onRunEnd(x)},_draw:function(t,e,i,n,s,r){if(i!==s&&e.blendMode!==i.blendMode&&e.blendMode!==o.SKIP_CHECK){i.release();var a=e.blendMode;a===n.blendMode?i=n:(i=n.getClone()).setBlendMode(a),i.use()}return e.renderWebGLStep(t,e,i,r),i}})},61199(t,e,i){var n=i(83419),s=i(6141);t.exports=new n({Extends:s,initialize:function(t){s.call(this,"FillCamera",t),this.fillRectNode=this.manager.getNode("FillRect")},run:function(t,e,i){this.onRunBegin(t);var n=t.camera,s=i?0:n.x,r=i?0:n.y,o=n.width,a=n.height;this.fillRectNode.run(t,null,null,s,r,o,a,e,e,e,e),this.onRunEnd(t)}})},14255(t,e,i){var n=i(94811),s=i(83419),r=i(6141);t.exports=new s({Extends:r,initialize:function(t){r.call(this,"FillPath",t)},run:function(t,e,i,s,r,o,a,h,l){this.onRunBegin(t),void 0===h&&(h=0);var u,d,c,f,p,g,m=s.length,v=0,x=0,y=[],T=[],w=0;for(d=0;d<m;d++)c=s[d],p=e.getX(c.x,c.y),g=e.getY(c.x,c.y),d>0&&d<m-1&&Math.abs(p-y[v-2])<=h&&Math.abs(g-y[v-1])<=h||(y[v++]=p,y[v++]=g);if(f=n(y),r===o&&r===a){var b=y.length;for(u=0;u<b;u+=2)T[w++]=r;i.batch(t,f,y,T,l)}else{var S=f.length,C=Array(S),E=Array(2*S),A=0;for(u=0;u<S;u+=3){var _=2*f[u];p=y[_+0],g=y[_+1],E[A++]=p,E[A++]=g,p=y[(_=2*f[u+1])+0],g=y[_+1],E[A++]=p,E[A++]=g,p=y[(_=2*f[u+2])+0],g=y[_+1],E[A++]=p,E[A++]=g,T[w++]=r,T[w++]=o,T[w++]=a,C[x++]=u+0,C[x++]=u+1,C[x++]=u+2}i.batch(t,C,E,T,l)}this.onRunEnd(t)}})},12682(t,e,i){var n=i(61340),s=i(83419),r=i(6141);t.exports=new s({Extends:r,initialize:function(t){r.call(this,"FillRect",t),this._batchHandlerDefault=t.getNode("BatchHandlerTriFlat"),this._identityMatrix=new n,this._indexedTriangles=[0,1,2,2,3,0]},run:function(t,e,i,n,s,r,o,a,h,l,u,d){this.onRunBegin(t),e||(e=this._identityMatrix),i||(i=this._batchHandlerDefault);var c=e.setQuad(n,s,n+r,s+o);i.batch(t,this._indexedTriangles,c,[a,l,u,h],d),this.onRunEnd(t)}})},13119(t,e,i){var n=i(83419),s=i(6141);t.exports=new n({Extends:s,initialize:function(t){s.call(this,"FillTri",t),this._indexedTriangles=[0,1,2]},run:function(t,e,i,n,s,r,o,a,h,l,u,d,c){this.onRunBegin(t),e?i.batch(t,this._indexedTriangles,[e.getX(n,s),e.getY(n,s),e.getX(r,o),e.getY(r,o),e.getX(a,h),e.getY(a,h)],[l,u,d],c):i.batch(t,this._indexedTriangles,[n,s,r,o,a,h],[l,u,d],c),this.onRunEnd(t)}})},27996(t,e,i){var n=i(83419),s=i(8054),r=i(6141);t.exports=new n({Extends:r,initialize:function(t){r.call(this,"ListCompositor",t)},run:function(t,e,i,n){this.onRunBegin(t);for(var r=t,o=t.blendMode,a=o,h=this.manager.renderer,l=0;l<e.length;l++){var u=e[l];u.blendMode!==a&&u.blendMode!==s.BlendModes.SKIP_CHECK&&(r!==t&&r.release(),(a=u.blendMode)===o?r=t:((r=t.getClone()).setBlendMode(a),r.use())),u.renderWebGLStep(h,u,r,i,n,e,l)}r!==t&&r.release(),this.onRunEnd(t)}})},56432(t,e,i){var n=i(83419),s=i(46975),r=i(6141);t.exports=new n({Extends:r,initialize:function(t){r.call(this,"RebindContext",t),this._state={bindings:{activeTexture:0,arrayBuffer:null,elementArrayBuffer:null,framebuffer:null,program:null,renderbuffer:null},vao:null}},run:function(t){this.onRunBegin(t);var e=this.manager.renderer,i=e.glWrapper;e.clearFramebuffer(void 0,void 0,0),i.update(s(this._state,i.state),!0),e.glTextureUnits.unbindAllUnits(),this.onRunEnd(t)}})},6141(t,e,i){t.exports=new(i(83419))({initialize:function(t,e){this.name=t,this.manager=e,this._run=null},run:function(){},onRunBegin:function(t){},onRunEnd:function(t){},setDebug:function(t){t?(this._run=this.run,this.run=function(){var t=this.manager;t.pushDebug(this.name);var e=this._run.apply(this,arguments);return t.popDebug(),e}):(this.run=this._run,this._run=null)}})},30130(t,e,i){var n=i(50792),s=i(83419),r=i(92503),o=i(47406),a=i(53663),h=i(16971),l=i(15214),u=i(72266),d=i(62791),c=i(21832),f=i(62087),p=i(61842),g=i(76409),m=i(95449),v=i(61199),x=i(14255),y=i(12682),T=i(13119),w=i(22731),b=i(57032),S=i(52903),C=i(13922),E=i(33466),A=i(75798),_=i(90830),M=i(52302),R=i(34989),O=i(91614),P=i(15600),L=i(99786),D=i(26825),F=i(54900),I=i(34652),N=i(26703),B=i(56165),k=i(40305),U=i(55905),z=i(58167),Y=i(40752),X=i(13279),W=i(27459),G=i(88856),V=i(10845),H=i(99184),j=i(27996),q=i(56432),K=i(17486),Z=i(31029),Q=i(94494),J=i(87469),$=i(89723),tt=i(12913),te=i(22995),ti=i(86081),tn=i(88383),ts=i(34454),tr=i(46211),to=i(95433);t.exports=new s({Extends:n,initialize:function(t){n.call(this),this.renderer=t;var e=t.game;this.maxParallelTextureUnits=e.config.autoMobileTextures&&!e.device.os.desktop?1:t.maxTextures,this._nodes={},this._nodeConstructors={BaseFilter:o,BaseFilterShader:a,BatchHandlerPointLight:h,BatchHandlerQuad:l,BatchHandlerQuadSingle:u,BatchHandlerStrip:d,BatchHandlerTileSprite:c,BatchHandlerTriFlat:f,Camera:p,DrawLine:g,DynamicTextureHandler:m,FillCamera:v,FillPath:x,FillRect:y,FillTri:T,FilterBarrel:w,FilterBlend:b,FilterBlocky:S,FilterBlur:C,FilterBlurHigh:E,FilterBlurLow:A,FilterBlurMed:_,FilterBokeh:M,FilterColorMatrix:R,FilterCombineColorMatrix:O,FilterDisplacement:P,FilterGlow:L,FilterGradientMap:D,FilterImageLight:F,FilterKey:I,FilterMask:N,FilterNormalTools:B,FilterPanoramaBlur:k,FilterParallelFilters:U,FilterPixelate:z,FilterQuantize:Y,FilterSampler:X,FilterShadow:W,FilterThreshold:G,FilterVignette:V,FilterWipe:H,ListCompositor:j,RebindContext:q,StrokePath:K,SubmitterQuad:Z,SubmitterTile:Q,SubmitterTilemapGPULayer:J,SubmitterTileSprite:$,TexturerImage:tt,TexturerTileSprite:te,TransformerImage:ti,TransformerStamp:tn,TransformerTile:ts,TransformerTileSprite:tr,YieldContext:to},Object.entries(e.config.renderNodes).forEach(function(t){var e=t[0],i=t[1];this.addNodeConstructor(e,i)},this),this.currentBatchNode=null,this.currentBatchDrawingContext=null,this.debug=!1,this.debugGraph=null,this.currentDebugNode=null},addNode:function(t,e){if(this._nodes[t])throw Error("node "+t+" already exists.");this._nodes[t]=e,this.debug&&e.setDebug(!0)},addNodeConstructor:function(t,e){if(this._nodeConstructors[t])throw Error("node constructor "+t+" already exists.");this._nodeConstructors[t]=e},getNode:function(t){if(this._nodes[t])return this._nodes[t];if(this._nodeConstructors[t]){var e=new this._nodeConstructors[t](this);return this.addNode(t,e),e}return null},hasNode:function(t,e){return!!this._nodes[t]||!e&&!!this._nodeConstructors[t]},setCurrentBatchNode:function(t,e){this.currentBatchNode!==t&&(null!==this.currentBatchNode&&this.currentBatchNode.run(this.currentBatchDrawingContext),this.currentBatchNode=t,this.currentBatchDrawingContext=t?e:null)},setMaxParallelTextureUnits:function(t){this.maxParallelTextureUnits=Math.max(1,Math.min(t,this.renderer.maxTextures)),this.emit(r.SET_PARALLEL_TEXTURE_UNITS,this.maxParallelTextureUnits)},finishBatch:function(){null!==this.currentBatchNode&&this.setCurrentBatchNode(null)},startStandAloneRender:function(){this.finishBatch()},setDebug:function(t){for(var e in this.debug=t,this._nodes)this._nodes[e].setDebug(t);t&&(this.debugGraph=null,this.currentDebugNode=null,this.pushDebug("[Render Tree Root]"),this.renderer.once(r.POST_RENDER,function(){this.setDebug(!1)},this))},pushDebug:function(t){if(this.debug){var e={name:t,children:[],parent:this.currentDebugNode};this.debugGraph?this.currentDebugNode.children.push(e):this.debugGraph=e,this.currentDebugNode=e}},popDebug:function(){this.debug&&(this.currentDebugNode.parent?this.currentDebugNode=this.currentDebugNode.parent:this.currentDebugNode=null)},debugToString:function(){return function t(e,i){for(var n=" ".repeat(i)+e.name+"\n",s=0;s<e.children.length;s++)n+=t(e.children[s],i+1);return n}(this.debugGraph,0)}})},55403(t,e,i){var n=i(83419),s=i(40952),r=i(56436),o=i(6141),a=i(65884),h=i(72823);t.exports=new n({Extends:o,initialize:function(t,e){o.call(this,"ShaderQuad",t);var i=t.renderer;this.renderer=i,(e=this._completeConfig(e)).updateShaderConfig&&(this.updateShaderConfig=e.updateShaderConfig),this.indexBuffer=i.genericQuadIndexBuffer,this.vertexBufferLayout=new s(i,e.vertexBufferLayout,null),this.programManager=new r(i,[this.vertexBufferLayout],this.indexBuffer),this.programManager.setBaseShader(e.shaderName,e.vertexSource,e.fragmentSource);for(var n=0;n<e.shaderAdditions.length;n++){var a=e.shaderAdditions[n];this.programManager.addAddition(a)}this.setUniform=this.programManager.setUniform.bind(this.programManager),this.transformerNode=t.getNode("TransformerImage"),this._texturerProxy={frameWidth:1,frameHeight:1,frame:{realWidth:1,realHeight:1},uvSource:{x:0,y:0}}},_completeConfig:function(t){var e=this.renderer.gl,i=t.vertexSource;if(!i){var n=t.vertexKey;if(n){var s=this.manager.renderer.game.cache.shader.get(n);s&&s.glsl&&(i=s.glsl)}}i||(i=a);var r=t.fragmentSource;if(!r){var o=t.fragmentKey;o&&(s=this.manager.renderer.game.cache.shader.get(o))&&s.glsl&&(r=s.glsl)}return r||(r=h),{name:t.name||"ShaderQuad",shaderName:t.shaderName||t.name||"ShaderQuad",vertexSource:i,fragmentSource:r,shaderAdditions:t.shaderAdditions||[],vertexBufferLayout:{usage:"DYNAMIC_DRAW",count:4,layout:[{name:"inPosition",size:2,type:e.FLOAT,normalized:!1},{name:"inTexCoord",size:2,type:e.FLOAT,normalized:!1}]}}}
1,run:function(t,e,i){var n,s,r,o,a,h,l,u,d=this.manager,c=this.renderer;d.startStandAloneRender(),this.onRunBegin(t);var f=e.width,p=e.height;if(this._texturerProxy.frame.realWidth=f,this._texturerProxy.frame.realHeight=p,this._texturerProxy.frameWidth=f,this._texturerProxy.frameHeight=p,e.renderToTexture)n=0,s=0,r=0,o=p,a=f,h=p,l=f,u=0;else{var g=this.transformerNode;g.run(t,e,this._texturerProxy,i);var m=g.quad;n=m[0],s=m[1],r=m[2],o=m[3],a=m[4],h=m[5],l=m[6],u=m[7]}var v=this.vertexBufferLayout.layout.stride,x=this.vertexBufferLayout.buffer,y=x.viewF32,T=0;y[T++]=r,y[T++]=o,y[T++]=e.textureCoordinateBottomLeft.x,y[T++]=e.textureCoordinateBottomLeft.y,y[T++]=n,y[T++]=s,y[T++]=e.textureCoordinateTopLeft.x,y[T++]=e.textureCoordinateTopLeft.y,y[T++]=a,y[T++]=h,y[T++]=e.textureCoordinateBottomRight.x,y[T++]=e.textureCoordinateBottomRight.y,y[T++]=l,y[T++]=u,y[T++]=e.textureCoordinateTopRight.x,y[T++]=e.textureCoordinateTopRight.y,x.update(4*v);var w=this.programManager;this.updateShaderConfig(t,e,this);var b=w.getCurrentProgramSuite();if(b){var S=b.program,C=b.vao,E=this.setUniform;c.setProjectionMatrixFromDrawingContext(t),E("uProjectionMatrix",t.renderer.projectionMatrix.val),e.setupUniforms(E,t),w.applyUniforms(S),c.drawElements(t,this.setupTextures(e),S,C,4,0)}this.onRunEnd(t)},setupTextures:function(t){for(var e=t.textures,i=[],n=0;n<e.length;n++){var s=e[n].get().source.glTexture;i.push(s)}return i},updateShaderConfig:function(t,e,i){}})},17486(t,e,i){var n=i(83419),s=i(6141);t.exports=new n({Extends:s,initialize:function(t){s.call(this,"StrokePath",t),this.drawLineNode=this.manager.getNode("DrawLine")},run:function(t,e,i,n,s,r,o,a,h,l,u,d){this.onRunBegin(t);var c,f,p,g,m,v,x,y,T,w,b=this.drawLineNode,S=i.length-1,C=!1,E=!1;n>2&&S>1&&(C=!0,s||(E=!0));for(var A=[],_=0,M=[],R=0,O=[],P=0,L=u*u,D=0;D<S;D+=w){if(y=0===D,T=D===S-1,w=1,c=i[D],f=i[D+w],L&&!T)for(g=f.x-c.x,m=f.y-c.y,v=r.getX(g,m)-r.tx,x=r.getY(g,m)-r.ty;D+w<S-1&&v*v+x*x<=L;)g=(f=i[D+ ++w]).x-c.x,m=f.y-c.y,v=r.getX(g,m)-r.tx,x=r.getY(g,m)-r.ty;b.run(t,r,c.x,c.y,f.x,f.y,c.width/2,f.width/2,M),R+=8,p=R/2,O[P++]=o,O[P++]=h,O[P++]=l,O[P++]=a,A[_++]=p-4,A[_++]=p-3,A[_++]=p-2,A[_++]=p-2,A[_++]=p-1,A[_++]=p-4,C&&!y&&(A[_++]=p-4,A[_++]=p-3,A[_++]=p-6,A[_++]=p-6,A[_++]=p-5,A[_++]=p-4,E&&T&&(A[_++]=p-2,A[_++]=p-1,A[_++]=0,A[_++]=0,A[_++]=1,A[_++]=p-2))}e.batch(t,A,M,O,d),this.onRunEnd(t)}})},95433(t,e,i){var n=i(83419),s=i(6141);t.exports=new n({Extends:s,initialize:function(t){s.call(this,"YieldContext",t),this._state={blend:this.manager.renderer.blendModes[0],vao:null}},run:function(t){this.onRunBegin(t);var e=this.manager,i=e.renderer;e.startStandAloneRender(),i.glWrapper.update(this._state),i.glTextureUnits.unbindAllUnits(),this.onRunEnd(t)}})},70972(t,e,i){t.exports=new(i(90330))([["Submitter","SubmitterQuad"],["BatchHandler","BatchHandlerQuad"]])},98682(t,e,i){t.exports=new(i(90330))([["Submitter","SubmitterQuad"],["BatchHandler","BatchHandlerQuad"]])},87891(t,e,i){t.exports=new(i(90330))([["Submitter","BatchHandlerTriFlat"],["FillPath","FillPath"],["FillRect","FillRect"],["FillTri","FillTri"],["StrokePath","StrokePath"]])},40939(t,e,i){t.exports=new(i(90330))([["Submitter","SubmitterQuad"],["BatchHandler","BatchHandlerQuad"],["Transformer","TransformerImage"],["Texturer","TexturerImage"]])},68668(t,e,i){t.exports=new(i(90330))([["Submitter","SubmitterQuad"],["BatchHandler","BatchHandlerQuad"]])},43246(t,e,i){t.exports=new(i(90330))([["BatchHandler","BatchHandlerPointLight"]])},30529(t,e,i){t.exports=new(i(90330))([["BatchHandler","BatchHandlerQuad"]])},85760(t,e,i){t.exports=new(i(90330))([["BatchHandler","BatchHandlerStrip"]])},78705(t,e,i){t.exports=new(i(90330))([["Submitter","SubmitterQuad"],["BatchHandler","BatchHandlerQuad"],["Transformer","TransformerStamp"],["Texturer","TexturerImage"]])},41571(t,e,i){t.exports=new(i(90330))([["Submitter","SubmitterTileSprite"],["BatchHandler","BatchHandlerTileSprite"],["Transformer","TransformerTileSprite"],["Texturer","TexturerTileSprite"]])},67743(t,e,i){t.exports=new(i(90330))([["Submitter","SubmitterTilemapGPULayer"]])}
1,79317(t,e,i){t.exports=new(i(90330))([["Submitter","SubmitterTile"],["BatchHandler","BatchHandlerTileSprite"],["Transformer","TransformerTile"]])},59212(t,e,i){t.exports={DefaultBitmapTextNodes:i(70972),DefaultBlitterNodes:i(98682),DefaultGraphicsNodes:i(87891),DefaultImageNodes:i(40939),DefaultParticleEmitterNodes:i(68668),DefaultPointLightNodes:i(43246),DefaultQuadNodes:i(30529),DefaultRopeNodes:i(85760),DefaultStampNodes:i(78705),DefaultTilemapGPULayerNodes:i(67743),DefaultTilemapLayerNodes:i(79317),DefaultTileSpriteNodes:i(41571)}},47406(t,e,i){var n=i(83419),s=i(6141);t.exports=new n({Extends:s,initialize:function(t,e){s.call(this,t,e)},run:function(t,e,i,n){}})},53663(t,e,i){var n=i(83419),s=i(2807),r=i(99501),o=i(56436),a=i(40952),h=i(47406);function l(t,e,i){return(e=(1/e+1)*.5)+t*((i=(1/i+1)*.5)-e)}t.exports=new n({Extends:h,initialize:function(t,e,i,n,l){if(!n){var u=e.renderer.game.cache.shader.get(i);if(!(u&&u.glsl))throw Error("BaseFilterShader: No fragment shader source provided and no shader found with key "+i);n=u.glsl}h.call(this,t,e);var d=e.renderer,c=d.gl,f={name:t,shaderName:t,vertexSource:s,fragmentSource:n,shaderAdditions:l||[],vertexBufferLayout:{usage:"DYNAMIC_DRAW",count:4,layout:[{name:"inPosition",size:2,type:c.FLOAT,normalized:!1},{name:"inTexCoord",size:2,type:c.FLOAT,normalized:!1}]}};f.shaderAdditions.push(r()),this.indexBuffer=d.genericQuadIndexBuffer,this.vertexBufferLayout=new a(d,f.vertexBufferLayout,null),this.programManager=new o(d,[this.vertexBufferLayout],this.indexBuffer),this.programManager.setBaseShader(f.shaderName,f.vertexSource,f.fragmentSource);for(var p=0;p<f.shaderAdditions.length;p++){var g=f.shaderAdditions[p];this.programManager.addAddition(g)}this.programManager.setUniform("uMainSampler",0)},run:function(t,e,i,n){var s=this.manager,r=s.renderer;s.startStandAloneRender(),n||(n=t.getPadding()),i||(i=r.drawingContextPool.get(e.width+n.width,e.height+n.height)),i.use(),this.onRunBegin(i);var o=[e.texture];this.setupTextures(t,o,i);var a=-1,h=-1,u=-1,d=1,c=1,f=1,p=1,g=-1;if(n.left){var m=2*n.left/i.width;a-=m,u-=m}if(n.right){var v=2*n.right/i.width;p-=v,c-=v}if(n.top){var x=2*n.top/i.height;d+=x,f+=x}if(n.bottom){var y=2*n.bottom/i.height;h+=y,g+=y}var T=this.vertexBufferLayout.layout.stride,w=this.vertexBufferLayout.buffer,b=w.viewF32,S=0;b[S++]=-1,b[S++]=-1,b[S++]=l(0,a,p),b[S++]=l(0,h,g),b[S++]=-1,b[S++]=1,b[S++]=l(0,u,c),b[S++]=l(1,d,f),b[S++]=1,b[S++]=-1,b[S++]=l(1,a,p),b[S++]=l(0,h,g),b[S++]=1,b[S++]=1,b[S++]=l(1,u,c),b[S++]=l(1,d,f),w.update(4*T);var C=this.programManager;this.updateShaderConfig(t,i);var E=C.getCurrentProgramSuite();if(E){var A=E.program,_=E.vao;this.setupUniforms(t,i),C.applyUniforms(A),r.drawElements(i,o,A,_,4,0)}return e.release(),this.onRunEnd(i),i},updateShaderConfig:function(t,e){},setupTextures:function(t,e,i){},setupUniforms:function(t,e){}})},22731(t,e,i){var n=i(83419),s=i(53663),r=i(10235);t.exports=new n({Extends:s,initialize:function(t){s.call(this,"FilterBarrel",t,null,r)},setupUniforms:function(t,e){this.programManager.setUniform("amount",t.amount)}})},57032(t,e,i){var n=i(90330),s=i(83419),r=i(10312),o=i(53663),a=i(65980);t.exports=new s({Extends:o,initialize:function(t){this._blendModeMap=new n;var e=this._blendModeMap;Object.entries(r).forEach(function(t){e.set(t[1],t[0])});var i=e.get(r.NORMAL);o.call(this,"FilterBlend",t,null,a,[{name:i,additions:{fragmentHeader:"#define BLEND "+i},tags:["blendmode"]}])},updateShaderConfig:function(t,e){var i=t.blendMode;i===r.SKIP_CHECK&&(i=r.NORMAL);var n=this._blendModeMap.get(i)||this._blendModeMap.get(r.NORMAL),s=this.programManager.getAdditionsByTag("blendmode")[0];s.name=n,s.additions.fragmentHeader="#define BLEND "+n},setupTextures:function(t,e,i){e[1]=t.glTexture},setupUniforms:function(t,e){var i=this.programManager;i.setUniform("uMainSampler2",1),i.setUniform("amount",t.amount),i.setUniform("color",t.color)}})},52903(t,e,i){var n=i(83419),s=i(53663),r=i(5899);t.exports=new n({Extends:s,initialize:function(t){s.call(this,"FilterBlocky",t,null,r)},setupUniforms:function(t,e){var i=this.programManager,n=Math.max(1,t.size.x),s=Math.max(1,t.size.y);i.setUniform("resolution",[e.width,e.height]),i.setUniform("uSizeAndOffset",[n,s,t.offset.x,t.offset.y])}})},13922(t,e,i){var n=i(87841),s=i(83419),r=i(47406);t.exports=new s({Extends:r,initialize:function(t){r.call(this,"FilterBlur",t)}
vendor: 9,473 bytes, line 1
1,run:function(t,e,i,s){this.onRunBegin(i);var r=t.quality,o=t.steps,a=null;switch(r){case 2:a=this.manager.getNode("FilterBlurHigh");break;case 1:a=this.manager.getNode("FilterBlurMed");break;default:a=this.manager.getNode("FilterBlurLow")}var h={strength:t.strength,color:t.glcolor,x:t.x,y:t.y};s||(s=t.getPadding());for(var l=e,u=0;u<o;u++){h.x=t.x,h.y=0,l=a.run(h,l,null,s),0===u&&(s=new n);var d=u===o-1?i:null;h.x=0,h.y=t.y,l=a.run(h,l,d,s)}return i=l,this.onRunEnd(i),i}})},33466(t,e,i){var n=i(83419),s=i(53663),r=i(20784);t.exports=new n({Extends:s,initialize:function(t){s.call(this,"FilterBlurHigh",t,null,r)},setupUniforms:function(t,e){var i=this.programManager;i.setUniform("resolution",[e.width,e.height]),i.setUniform("strength",t.strength),i.setUniform("color",t.color),i.setUniform("offset",[t.x,t.y])}})},75798(t,e,i){var n=i(83419),s=i(53663),r=i(65122);t.exports=new n({Extends:s,initialize:function(t){s.call(this,"FilterBlurLow",t,null,r)},setupUniforms:function(t,e){var i=this.programManager;i.setUniform("resolution",[e.width,e.height]),i.setUniform("strength",t.strength),i.setUniform("color",t.color),i.setUniform("offset",[t.x,t.y])}})},90830(t,e,i){var n=i(83419),s=i(53663),r=i(60942);t.exports=new n({Extends:s,initialize:function(t){s.call(this,"FilterBlurMed",t,null,r)},setupUniforms:function(t,e){var i=this.programManager;i.setUniform("resolution",[e.width,e.height]),i.setUniform("strength",t.strength),i.setUniform("color",t.color),i.setUniform("offset",[t.x,t.y])}})},52302(t,e,i){var n=i(83419),s=i(53663),r=i(43722);t.exports=new n({Extends:s,initialize:function(t){s.call(this,"FilterBokeh",t,null,r)},setupUniforms:function(t,e){var i=this.programManager;i.setUniform("radius",t.radius),i.setUniform("amount",t.amount),i.setUniform("contrast",t.contrast),i.setUniform("strength",t.strength),i.setUniform("blur",[t.blurX,t.blurY]),i.setUniform("isTiltShift",t.isTiltShift),i.setUniform("resolution",[e.width,e.height])}})},34989(t,e,i){var n=i(83419),s=i(53663),r=i(19883);t.exports=new n({Extends:s,initialize:function(t){s.call(this,"FilterColorMatrix",t,null,r)},setupUniforms:function(t,e){var i=this.programManager;i.setUniform("uColorMatrix[0]",t.colorMatrix.getData()),i.setUniform("uAlpha",t.colorMatrix.alpha)}})},91614(t,e,i){var n=i(83419),s=i(53663),r=i(32624);t.exports=new n({Extends:s,initialize:function(t){s.call(this,"FilterCombineColorMatrix",t,null,r)},setupTextures:function(t,e,i){e[1]=t.glTexture},setupUniforms:function(t,e){var i=this.programManager;i.setUniform("uTransferSampler",1),i.setUniform("uColorMatrixSelf[0]",t.colorMatrixSelf.getData()),i.setUniform("uColorMatrixTransfer[0]",t.colorMatrixTransfer.getData()),i.setUniform("uAlphaSelf",t.colorMatrixSelf.alpha),i.setUniform("uAlphaTransfer",t.colorMatrixTransfer.alpha),i.setUniform("uAdditions",t.additions),i.setUniform("uMultiplications",t.multiplications)}})},15600(t,e,i){var n=i(83419),s=i(53663),r=i(12886);t.exports=new n({Extends:s,initialize:function(t){s.call(this,"FilterDisplacement",t,null,r)},setupTextures:function(t,e){e[1]=t.glTexture},setupUniforms:function(t,e){var i=this.programManager;i.setUniform("uDisplacementSampler",1),i.setUniform("amount",[t.x,t.y])}})},99786(t,e,i){var n=i(83419),s=i(53663),r=i(33016);t.exports=new n({Extends:s,initialize:function(t){s.call(this,"FilterGlow",t,null,r,[{name:"distance_10.0",additions:{fragmentDefine:"#define DISTANCE 10.0"},tags:["distance"]},{name:"quality_0.1",additions:{fragmentDefine:"#define QUALITY 0.1"},tags:["quality"]}])},updateShaderConfig:function(t,e){var i=this.programManager,n=t.distance.toFixed(0)+".0",s=i.getAdditionsByTag("distance")[0];s.name="distance_"+n,s.additions.fragmentDefine="#undef DISTANCE\n#define DISTANCE "+n;var r=t.quality.toFixed(0)+".0",o=i.getAdditionsByTag("quality")[0];o.name="quality_"+r,o.additions.fragmentDefine="#undef QUALITY\n#define QUALITY "+r},setupUniforms:function(t,e){var i=this.programManager;i.setUniform("resolution",[e.width,e.height]),i.setUniform("glowColor",t.glcolor),i.setUniform("outerStrength",t.outerStrength),i.setUniform("innerStrength",t.innerStrength),i.setUniform("scale",t.scale),i.setUniform("knockout",t.knockout)}})},26825(t,e,i){var n=i(83419),s=i(53663),r=i(33179),o=i(68589);t.exports=new n({Extends:s,initialize:function(t){var e=[{name:"RAMP_0",tags:"RAMP",additions:{fragmentHeader:o}}];s.call(this,"FilterGradientMap",t,null,r,e)},setupTextures:function(t,e,i){e[1]=t.ramp.glTexture},setupUniforms:function(t,e){var i=this.programManager,n=t.ramp;i.setUniform("uRampTexture",1),i.setUniform("uRampResolution",n.dataTextureResolution),i.setUniform("uRampBandStart",n.dataTextureFirstBand),i.setUniform("uDither",t.dither),i.setUniform("uUnpremultiply",t.unpremultiply),i.setUniform("uColor",t.color),i.setUniform("uColorFactor",t.colorFactor),i.setUniform("uAlpha",t.alpha)},updateShaderConfig:function(t,e){var i=t.ramp.bandTreeDepth,n=this.programManager.getAdditionsByTag("RAMP")[0];n.name="RAMP_"+i,n.additions.fragmentHeader=o.replace("#define BAND_TREE_DEPTH 0.0","#define BAND_TREE_DEPTH "+i+".0")}})},54900(t,e,i){var n=i(83419),s=i(53663),r=i(94526);t.exports=new n({Extends:s,initialize:function(t){s.call(this,"FilterImageLight",t,null,r)},setupTextures:function(t,e,i){e[1]=t.environmentGlTexture,e[2]=t.normalGlTexture},setupUniforms:function(t,e){var i=this.programManager;i.setUniform("uEnvSampler",1),i.setUniform("uNormSampler",2),i.setUniform("uViewMatrix",t.viewMatrix.val),i.setUniform("uModelRotation",t.getModelRotation()),i.setUniform("uBulge",t.bulge),i.setUniform("uColorFactor",t.colorFactor)}})},34652(t,e,i){var n=i(83419),s=i(53663),r=i(4488);t.exports=new n({Extends:s,initialize:function(t){s.call(this,"FilterKey",t,null,r)},setupUniforms:function(t,e){var i=this.programManager;i.setUniform("uColor",t.color),i.setUniform("uIsolateThresholdFeather",[t.isolate,t.threshold,t.feather])}})},26703(t,e,i){var n=i(83419),s=i(53663),r=i(39603);t.exports=new n({Extends:s,initialize:function(t){s.call(this,"FilterMask",t,null,r)},setupTextures:function(t,e,i){t.maskGameObject&&(t.needsUpdate||t.autoUpdate)&&t.updateDynamicTexture(i.width,i.height),e[1]=t.glTexture},setupUniforms:function(t,e){var i=this.programManager;i.setUniform("uMaskSampler",1),i.setUniform("invert",t.invert)}})},56165(t,e,i){var n=i(83419),s=i(53663),r=i(60047);t.exports=new n({Extends:s,initialize:function(t){s.call(this,"FilterNormalTools",t,null,r,[{name:"view",additions:{fragmentHeader:"#define VIEW_MATRIX"},tags:["header"]}])},updateShaderConfig:function(t,e){var i=this.programManager.getAdditionsByTag("header")[0];i.name="view",i.additions.fragmentHeader="#define VIEW_MATRIX",1!==t.facingPower&&(i.name+="_facingPower",i.additions.fragmentHeader+="\n#define FACING_POWER"),t.outputRatio&&(i.name+="_ratio",i.additions.fragmentHeader+="\n#define OUTPUT_RATIO")},setupUniforms:function(t,e){var i=this.programManager;if(i.setUniform("uViewMatrix",t.viewMatrix.val),1!==t.facingPower&&i.setUniform("uFacingPower",t.facingPower),t.outputRatio){var n=t.ratioVector;i.setUniform("uRatioVector",[n.x,n.y,n.z]),i.setUniform("uRatioRadius",t.ratioRadius)}}})},40305(t,e,i){var n=i(83419),s=i(53663),r=i(7529);t.exports=new n({Extends:s,initialize:function(t){s.call(this,"FilterPanoramaBlur",t,null,r,[{name:"samples_32_16",additions:{fragmentHeader:"#define SAMPLES_X 32.0\n#define SAMPLES_Y 16.0"},tags:["samples"]}])},updateShaderConfig:function(t,e){var i=t.samplesX.toFixed(0),n=t.samplesY.toFixed(0),s=this.programManager.getAdditionsByTag("samples")[0];s.name="samples_"+i+"_"+n,s.additions.fragmentHeader="#define SAMPLES_X "+i+".0\n#define SAMPLES_Y "+n+".0"},setupUniforms:function(t,e){var i=this.programManager;i.setUniform("uRadius",t.radius),i.setUniform("uPower",t.power)}})},55905(t,e,i){var n=i(87841),s=i(83419),r=i(10312),o=i(47406);t.exports=new s({Extends:o,initialize:function(t){o.call(this,"FilterParallelFilters",t)},run:function(t,e,i,s){this.onRunBegin(i),e.lock(this);var o=t.bottom.getActive(),a=t.top.getActive(),h=s||t.getPadding();if(o.length+a.length>0){var l=e,u=e;if(o.length>0){s=h;for(var d=0;d<o.length;d++){var c=o[d],f=this.manager.getNode(c.renderNode);l=f.run(c,l,null,s),0===d&&d<o.length-1&&(s=new n)}}if(a.length>0)for(d=0,s=h;d<a.length;d++)c=a[d],u=(f=this.manager.getNode(c.renderNode)).run(c,u,null,s),0===d&&d<a.length-1&&(s=new n);e.unlock(this),e!==l&&e!==u&&e.release(),t.blend.glTexture=u.texture,f=this.manager.getNode("FilterBlend"),i=this.manager.getNode("FilterBlend").run(t.blend,l,i,s),u.release()}else{f=this.manager.getNode("FilterBlend");var p={blendMode:r.COPY,glTexture:e.texture,amount:1,color:[1,1,1,1]};e.unlock(this),i=f.run(p,e,i,h)}return this.onRunEnd(i),i}})},58167(t,e,i){var n=i(83419),s=i(53663),r=i(99191);t.exports=new n({Extends:s,initialize:function(t){s.call(this,"FilterPixelate",t,null,r)},setupUniforms:function(t,e){var i=this.programManager;i.setUniform("amount",t.amount),i.setUniform("resolution",[e.width,e.height])}})},40752(t,e,i){var n=i(83419),s=i(53663),r=i(88430);t.exports=new n({Extends:s,initialize:function(t){s.call(this,"FilterQuantize",t,null,r)},setupUniforms:function(t,e){var i=this.programManager;i.setUniform("uSteps",t.steps),i.setUniform("uGamma",t.gamma),i.setUniform("uOffset",t.offset),i.setUniform("uMode",t.mode),i.setUniform("uDither",t.dither)}})},13279(t,e,i){var n=i(83419),s=i(47406);t.exports=new n({Extends:s,initialize:function(t){s.call(this,"FilterSampler",t)}
1,run:function(t,e,i,n){this.onRunBegin(e);var s=this.manager.renderer,r=0,o=0,a=1,h=1,l=e.width,u=e.height,d=!1;return t.region?(r=t.region.x,o=t.region.y,void 0!==t.region.width?(a=t.region.width,h=t.region.height):d=!0):(a=l,h=u),s.snapshotFramebuffer(e.framebuffer,l,u,t.callback,d,r,o,a,h),this.onRunEnd(e),e}})},27459(t,e,i){var n=i(83419),s=i(53663),r=i(69355);t.exports=new n({Extends:s,initialize:function(t){s.call(this,"FilterShadow",t,null,r)},setupUniforms:function(t,e){var i=this.programManager,n=t.samples;i.setUniform("lightPosition",[t.x,1-t.y]),i.setUniform("decay",t.decay),i.setUniform("power",t.power/n),i.setUniform("color",t.glcolor),i.setUniform("samples",n),i.setUniform("intensity",t.intensity)}})},88856(t,e,i){var n=i(83419),s=i(53663),r=i(92636);t.exports=new n({Extends:s,initialize:function(t){s.call(this,"FilterThreshold",t,null,r)},setupUniforms:function(t,e){var i=this.programManager;i.setUniform("edge1",t.edge1),i.setUniform("edge2",t.edge2),i.setUniform("invert",t.invert)}})},10845(t,e,i){var n=i(83419),s=i(53663),r=i(18185);t.exports=new n({Extends:s,initialize:function(t){s.call(this,"FilterVignette",t,null,r)},setupUniforms:function(t,e){var i=this.programManager,n=t.color;i.setUniform("uRadius",t.radius),i.setUniform("uStrength",t.strength),i.setUniform("uPosition",[t.x,t.y]),i.setUniform("uColor",[n.redGL,n.greenGL,n.blueGL,n.alphaGL]),i.setUniform("uBlendMode",t.blendMode)}})},99184(t,e,i){var n=i(83419),s=i(53663),r=i(99174);t.exports=new n({Extends:s,initialize:function(t){s.call(this,"FilterWipe",t,null,r)},setupTextures:function(t,e,i){e[1]=t.wipeTexture.get().glTexture},setupUniforms:function(t,e){var i=this.programManager;i.setUniform("uMainSampler2",1),i.setUniform("uProgress_WipeWidth_Direction_Axis",[t.progress,t.wipeWidth,t.direction,t.axis]),i.setUniform("uReveal",t.reveal)}})},54521(t,e,i){t.exports={BaseFilter:i(47406),BaseFilterShader:i(53663),BatchHandler:i(13961),BatchHandlerPointLight:i(16971),BatchHandlerQuad:i(15214),BatchHandlerQuadSingle:i(72266),BatchHandlerStrip:i(62791),BatchHandlerTileSprite:i(21832),BatchHandlerTriFlat:i(62087),Camera:i(61842),Defaults:i(59212),DrawLine:i(76409),DynamicTextureHandler:i(95449),FillCamera:i(61199),FillPath:i(14255),FillRect:i(12682),FillTri:i(13119),FilterBarrel:i(22731),FilterBlend:i(57032),FilterBlur:i(13922),FilterBlurHigh:i(33466),FilterBlurLow:i(75798),FilterBlurMed:i(90830),FilterBokeh:i(52302),FilterColorMatrix:i(34989),FilterCombineColorMatrix:i(91614),FilterDisplacement:i(15600),FilterGlow:i(99786),FilterGradientMap:i(26825),FilterImageLight:i(54900),FilterKey:i(34652),FilterMask:i(26703),FilterNormalTools:i(56165),FilterPanoramaBlur:i(40305),FilterParallelFilters:i(55905),FilterPixelate:i(58167),FilterQuantize:i(40752),FilterSampler:i(13279),FilterShadow:i(27459),FilterThreshold:i(88856),FilterVignette:i(10845),FilterWipe:i(99184),ListCompositor:i(27996),RebindContext:i(56432),RenderNode:i(6141),StrokePath:i(17486),SubmitterQuad:i(31029),SubmitterSpriteGPULayer:i(53384),SubmitterTile:i(94494),SubmitterTilemapGPULayer:i(87469),SubmitterTileSprite:i(89723),TexturerImage:i(12913),TexturerTileSprite:i(22995),TransformerImage:i(86081),TransformerStamp:i(88383),TransformerTile:i(34454),TransformerTileSprite:i(46211),YieldContext:i(95433)}},31029(t,e,i){var n=i(83419),s=i(46975),r=i(70554),o=i(6141),a=r.getTintAppendFloatAlpha;t.exports=new n({Extends:o,initialize:function(t,e){e=s(e||{},this.defaultConfig),o.call(this,e.name,t),this.batchHandler=e.batchHandler,this._renderOptions={multiTexturing:!0,lighting:null,smoothPixelArt:null},this._lightingOptions={normalGLTexture:null,normalMapRotation:0,selfShadow:{enabled:!1,penumbra:0,diffuseFlatThreshold:0}}},defaultConfig:{name:"SubmitterQuad",role:"Submitter",batchHandler:"BatchHandler"},run:function(t,e,i,n,s,r,o,h,l){this.onRunBegin(t),s.run&&s.run(t,e,n),r.run&&r.run(t,e,s,i,n),o?(o.run&&o.run(t,e,n),u=o.tintEffect,d=o.tintTopLeft,c=o.tintBottomLeft,f=o.tintTopRight,p=o.tintBottomRight):(u=e.tintMode,d=a(e.tintTopLeft,e._alphaTL),c=a(e.tintBottomLeft,e._alphaBL),f=a(e.tintTopRight,e._alphaTR),p=a(e.tintBottomRight,e._alphaBR));var u,d,c,f,p,g=r.quad,m=s.uvSource,v=m.u0,x=m.v0,y=m.u1,T=m.v1;this.setRenderOptions(e,h,l),(e.customRenderNodes[this.batchHandler]||e.defaultRenderNodes[this.batchHandler]).batch(t,s.frame.source.glTexture,g[0],g[1],g[2],g[3],g[6],g[7],g[4],g[5],v,x,y-v,T-x,u,d,c,f,p,this._renderOptions),this.onRunEnd(t)}
1,setRenderOptions:function(t,e,i){var n,s,r=this._renderOptions;if(t.displayTexture?(n=t.displayTexture,s=t.displayFrame.sourceIndex):t.texture?(n=t.texture,s=t.frame.sourceIndex):t.tileset&&(n=Array.isArray(t.tileset)?t.tileset[0].image:t.tileset.image,s=0),t.lighting){!e&&n&&(e=n.dataSource[s]),e=e?e.glTexture:this.manager.renderer.normalTexture,isNaN(i)&&(i=t.rotation,t.parentContainer&&(i=t.getWorldTransformMatrix(this._tempMatrix,this._tempMatrix2).rotationNormalized));var o=t.selfShadow,a=o.enabled;null===a&&(a=t.scene.sys.game.config.selfShadow),this._lightingOptions.normalGLTexture=e,this._lightingOptions.normalMapRotation=i,this._lightingOptions.selfShadow.enabled=a,this._lightingOptions.selfShadow.penumbra=o.penumbra,this._lightingOptions.selfShadow.diffuseFlatThreshold=o.diffuseFlatThreshold,r.lighting=this._lightingOptions}else r.lighting=null;r.smoothPixelArt=n&&null!==n.smoothPixelArt?n.smoothPixelArt:t.scene.sys.game.config.smoothPixelArt}})},53384(t,e,i){var n=i(61340),s=i(26099),r=i(83419),o=i(46975),a=i(56436),h=i(81084),l=i(44349),u=i(6184),d=i(11653),c=i(40829),f=i(42792),p=i(96049),g=i(33997),m=i(79532),v=i(74505),x=i(70554),y=i(40952),T=i(6141),w=i(49119);t.exports=new r({Extends:T,initialize:function(t,e,i){var r=t.renderer,h=o(e||{},this.defaultConfig),l=h.name;this._completeLayout(h),T.call(this,l,t),this.config=h,this.gameObject=i,this.instanceBufferLayout=new y(r,h.instanceBufferLayout,null),this.vertexBufferLayout=new y(r,h.vertexBufferLayout,null);var u=this.vertexBufferLayout.buffer,d=u.viewU8;if(d[0]=0,d[1]=1,d[2]=2,d[3]=3,u.update(),this.programManager=new a(r,[this.vertexBufferLayout,this.instanceBufferLayout],this.indexBuffer),this.programManager.setBaseShader(h.shaderName,h.vertexSource,h.fragmentSource),h.shaderAdditions)for(var c=0;c<h.shaderAdditions.length;c++){var f=h.shaderAdditions[c];this.programManager.addAddition(f)}if(h.shaderFeatures)for(c=0;c<h.shaderFeatures.length;c++)this.programManager.addFeature(h.shaderFeatures[c]);this._calcMatrix=new n,this._lightVector=new s},defaultConfig:{name:"SubmitterSpriteGPULayer",count:0,shaderName:"SpriteGPULayer",vertexSource:i(3524),fragmentSource:w,shaderAdditions:[f(),p(),v(!0),d(1),g(),l(),u(!0),m(!0),c(!0),h(!0)],instanceBufferLayout:{usage:"STATIC_DRAW",instanceDivisor:1,layout:[{name:"inPositionX",size:4},{name:"inPositionY",size:4},{name:"inRotation",size:4},{name:"inScaleX",size:4},{name:"inScaleY",size:4},{name:"inAlpha",size:4},{name:"inFrame",size:4},{name:"inTintBlend",size:4},{name:"inTintBL",size:4,type:"UNSIGNED_BYTE",normalized:!0},{name:"inTintTL",size:4,type:"UNSIGNED_BYTE",normalized:!0},{name:"inTintBR",size:4,type:"UNSIGNED_BYTE",normalized:!0},{name:"inTintTR",size:4,type:"UNSIGNED_BYTE",normalized:!0},{name:"inOriginAndTintModeAndCreationTime",size:4},{name:"inScrollFactor",size:2}]},vertexBufferLayout:{usage:"STATIC_DRAW",count:4,layout:[{name:"inVertex",type:"UNSIGNED_BYTE"}]}},_completeLayout:function(t){var e=t.vertexBufferLayout;t.vertexBufferLayout={},t.vertexBufferLayout.usage=e.usage,t.vertexBufferLayout.count=e.count,t.vertexBufferLayout.layout=[];for(var i=t.vertexBufferLayoutRemove||[],n=0;n<e.layout.length;n++){var s=e.layout[n];-1===i.indexOf(s.name)&&(t.vertexBufferLayout.layout[n]={name:s.name,size:s.size||1,type:s.type||"FLOAT",normalized:s.normalized||!1})}if(t.vertexBufferLayoutAdd){var r=t.vertexBufferLayoutAdd||[];for(n=0;n<r.length;n++){var o=r[n];t.vertexBufferLayout.layout.push({name:o.name,size:o.size||1,type:o.type||"FLOAT",normalized:o.normalized||!1})}}for(n=0,e=t.instanceBufferLayout,t.instanceBufferLayout={},t.instanceBufferLayout.usage=e.usage,t.instanceBufferLayout.instanceDivisor=e.instanceDivisor,t.instanceBufferLayout.layout=[],i=t.instanceBufferLayoutRemove||[];n<e.layout.length;n++)s=e.layout[n],-1===i.indexOf(s.name)&&(t.instanceBufferLayout.layout[n]={name:s.name,size:s.size||1,type:s.type||"FLOAT",normalized:s.normalized||!1});if(t.instanceBufferLayoutAdd)for(n=0,r=t.instanceBufferLayoutAdd||[];n<r.length;n++)o=r[n],t.instanceBufferLayout.layout.push({name:o.name,size:o.size||1,type:o.type||"FLOAT",normalized:o.normalized||!1})},setupUniforms:function(t){var e=t.camera,i=this.programManager,n=this.gameObject;i.setUniform("uRoundPixels",e.roundPixels),i.setUniform("uResolution",[t.width,t.height]),t.renderer.setProjectionMatrixFromDrawingContext(t),i.setUniform("uProjectionMatrix",t.renderer.projectionMatrix.val);var s=e.matrixCombined;i.setUniform("uViewMatrix",[s.a,s.b,0,s.c,s.d,0,s.tx,s.ty,1]),i.setUniform("uCameraScrollAndAlpha",[e.scrollX,e.scrollY,n.alpha]),i.setUniform("uTime",n.timeElapsed),i.setUniform("uDiffuseResolution",[n.frame.source.width,n.frame.source.height]),i.setUniform("uFrameDataResolution",[n.frameDataTexture.width,n.frameDataTexture.height]),i.setUniform("uGravity",n.gravity),i.setUniform("uMainSampler[0]",0),i.setUniform("uFrameDataTexture",1);var r=n.texture.source[0].glTexture;
vendor: 5,858 bytes, line 1
1i.setUniform("uMainResolution[0]",[r.width,r.height]),x.updateLightingUniforms(n.lighting,t,i,2,this._lightVector,n.selfShadow.enabled,n.selfShadow.diffuseFlatThreshold,n.selfShadow.penumbra)},updateRenderOptions:function(){for(var t=this.programManager,e=this.gameObject.lighting,i=t.getAdditionsByTag("LIGHTING"),n=0;n<i.length;n++)i[n].disable=!e;if(e){var s=t.getAddition("DefineLights");s&&(s.additions.fragmentDefine="#define LIGHT_COUNT "+this.manager.renderer.config.maxLights)}var r=t.getAddition("SmoothPixelArt");if(r){var o=this.gameObject.texture.smoothPixelArt;null===o&&(o=this.gameObject.scene.game.config.smoothPixelArt),r.disable=!o}t.clearFeatures();var a=this.gameObject.getShaderFeatures();for(n=0;n<a.length;n++)t.addFeature(a[n]);this.gameObject.selfShadow.enabled&&t.addFeature("SELFSHADOW")},run:function(t){var e,i=this.gameObject;if(0!==i.memberCount){this.manager.startStandAloneRender(),this.onRunBegin(t);var n=i.bufferUpdateSegments;if(n>0){var s=this.instanceBufferLayout.buffer,r=i.memberCount,o=Math.floor(r/i.bufferUpdateSegmentSize),a=!0;for(e=0;e<=o;e++)if(!(1<<e&n)){a=!1;break}if(n===i.MAX_BUFFER_UPDATE_SEGMENTS_FULL||r<=i.bufferUpdateSegmentSize||a)s.update();else{var h=i.bufferUpdateSegmentSize,l=h*this.instanceBufferLayout.layout.stride;for(e=0;e<32&&e*h<r;e++)n&1<<e&&s.update(l,e*l)}i.clearAllSegmentsNeedUpdate()}var u=[i.frame.source.glTexture,i.frameDataTexture];if(i.lighting){var d=i.texture.dataSource[i.frame.sourceIndex];d=d?d.glTexture:this.manager.renderer.normalTexture,u[2]=d}this.updateRenderOptions();var c=this.programManager,f=c.getCurrentProgramSuite();if(f){var p=f.program,g=f.vao;this.setupUniforms(t),c.applyUniforms(p),this.manager.renderer.drawInstancedArrays(t,u,p,g,0,4,i.memberCount)}this.onRunEnd(t)}}})},94494(t,e,i){var n=i(83419),s=i(31029);t.exports=new n({Extends:s,initialize:function(t,e){s.call(this,t,e),this._renderOptions.clampFrame=!0},defaultConfig:{name:"SubmitterTile",role:"Submitter",batchHandler:"BatchHandler"},run:function(t,e,i,n,s,r,o,a,h){if(this.onRunBegin(t),s.run&&s.run(t,e,n),r.run&&r.run(t,e,s,i,n),o)o.run&&o.run(t,e,n),f=o.tintEffect,l=o.tintTopLeft,u=o.tintBottomLeft,d=o.tintTopRight,c=o.tintBottomRight;else{var l,u,d,c,f=e.tintMode;l=0xffffffff,u=0xffffffff,d=0xffffffff,c=0xffffffff}var p=s.frame,g=r.quad,m=s.uvSource,v=m.u0,x=m.v0,y=m.u1,T=m.v1;this.setRenderOptions(e,a,h),(e.customRenderNodes[this.batchHandler]||e.defaultRenderNodes[this.batchHandler]).batch(t,p.source.glTexture,g[0],g[1],g[2],g[3],g[6],g[7],g[4],g[5],v,x,y-v,T-x,f,l,u,d,c,this._renderOptions,v,T,v,x,y,T,y,x),this.onRunEnd(t)}})},89723(t,e,i){var n=i(83419),s=i(70554),r=i(31029),o=s.getTintAppendFloatAlpha;t.exports=new n({Extends:r,initialize:function(t,e){r.call(this,t,e),this._renderOptions.wrapFrame=!0},defaultConfig:{name:"SubmitterTileSprite",role:"Submitter",batchHandler:"BatchHandler"},run:function(t,e,i,n,s,r,a,h,l){this.onRunBegin(t),s.run&&s.run(t,e,n),r.run&&r.run(t,e,s,i,n),a?(a.run&&a.run(t,e,n),u=a.tintEffect,d=a.tintTopLeft,c=a.tintBottomLeft,f=a.tintTopRight,p=a.tintBottomRight):(u=e.tintMode,d=o(e.tintTopLeft,e._alphaTL),c=o(e.tintBottomLeft,e._alphaBL),f=o(e.tintTopRight,e._alphaTR),p=o(e.tintBottomRight,e._alphaBR));var u,d,c,f,p,g=s.frame,m=r.quad,v=g.u0,x=g.v0,y=g.u1,T=g.v1,w=s.uvMatrix.quad;this.setRenderOptions(e,h,l),this._lightingOptions.normalMapRotation+=e.tileRotation,(e.customRenderNodes[this.batchHandler]||e.defaultRenderNodes[this.batchHandler]).batch(t,g.source.glTexture,m[0],m[1],m[2],m[3],m[6],m[7],m[4],m[5],v,x,y-v,T-x,u,d,c,f,p,this._renderOptions,w[0],w[1],w[2],w[3],w[6],w[7],w[4],w[5]),this.onRunEnd(t)}})},87469(t,e,i){var n=i(61340),s=i(26099),r=i(83419),o=i(46975),a=i(56436),h=i(84639),l=i(81084),u=i(6184),d=i(747),c=i(74505),f=i(57532),p=i(23879),g=i(40952),m=i(6141),v=i(70554);t.exports=new r({Extends:m,initialize:function(t,e){var i=t.renderer,r=o(e||{},this.defaultConfig),h=r.name;if(this._completeLayout(r),m.call(this,h,t),this.config=r,this.indexBuffer=i.genericQuadIndexBuffer,this.vertexBufferLayout=new g(i,r.vertexBufferLayout,null),this.programManager=new a(i,[this.vertexBufferLayout],this.indexBuffer),this.programManager.setBaseShader(r.shaderName,r.vertexSource,r.fragmentSource),r.shaderAdditions)for(var l=0;l<r.shaderAdditions.length;l++){var u=r.shaderAdditions[l];this.programManager.addAddition(u)}if(r.shaderFeatures)for(l=0;l<r.shaderFeatures.length;l++)this.programManager.addFeature(r.shaderFeatures[l]);this._spriteMatrix=new n,this._calcMatrix=new n,this._lightVector=new s,this._quad=new Float32Array(8)},defaultConfig:{name:"SubmitterTilemapGPULayer",shaderName:"TilemapGPULayer",vertexSource:p,fragmentSource:f,shaderAdditions:[c(!0),d(!0),u(!0),l(!0)],vertexBufferLayout:{usage:"DYNAMIC_DRAW",count:4,layout:[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]}},_completeLayout:function(t){var e=t.vertexBufferLayout;t.vertexBufferLayout={},t.vertexBufferLayout.usage=e.usage,t.vertexBufferLayout.count=e.count||4,t.vertexBufferLayout.layout=[];for(var i=t.vertexBufferLayoutRemove||[],n=0;n<e.layout.length;n++){var s=e.layout[n];-1===i.indexOf(s.name)&&(t.vertexBufferLayout.layout[n]={name:s.name,size:s.size||1,type:s.type||"FLOAT",normalized:s.normalized||!1})}if(t.vertexBufferLayoutAdd){var r=t.vertexBufferLayoutAdd||[];for(n=0;n<r.length;n++){var o=r[n];t.vertexBufferLayout.layout.push({name:o.name,size:o.size||1,type:o.type||"FLOAT",normalized:o.normalized||!1})}}},setupUniforms:function(t,e){var i=this.programManager;i.setUniform("uResolution",[t.width,t.height]),t.renderer.setProjectionMatrixFromDrawingContext(t),i.setUniform("uProjectionMatrix",t.renderer.projectionMatrix.val);var n=e.tileset,s=n.glTexture,r=e.layerDataTexture,o=n.getAnimationDataTexture(t.renderer);i.setUniform("uMainSampler",0),i.setUniform("uLayerSampler",1),i.setUniform("uAnimS
1ampler",2),i.setUniform("uMainResolution",[s.width,s.height]),i.setUniform("uLayerResolution",[r.width,r.height]),i.setUniform("uAnimResolution",[o.width,o.height]),i.setUniform("uTileColumns",n.columns),i.setUniform("uTileWidthHeightMarginSpacing",[n.tileWidth,n.tileHeight,n.tileMargin,n.tileSpacing]),i.setUniform("uAlpha",e.alpha),i.setUniform("uTime",e.timeElapsed),v.updateLightingUniforms(e.lighting,t,i,3,this._lightVector,e.selfShadow.enabled,e.selfShadow.diffuseFlatThreshold,e.selfShadow.penumbra)},updateRenderOptions:function(t){var e=this.programManager,i=t.tileset.image,n=e.getAdditionsByTag("MAXANIMS")[0];n&&e.removeAddition(n.name),t.tileset.maxAnimationLength>0&&e.addAddition(h(t.tileset.maxAnimationLength));for(var s=t.lighting,r=e.getAdditionsByTag("LIGHTING"),o=0;o<r.length;o++)r[o].disable=!s;if(s){var a=e.getAddition("DefineLights");a&&(a.additions.fragmentDefine="#define LIGHT_COUNT "+this.manager.renderer.config.maxLights)}var l=t.selfShadow.enabled;null===l&&(l=t.scene.sys.game.config.selfShadow),l?e.addFeature("SELFSHADOW"):e.removeFeature("SELFSHADOW");var u=i.smoothPixelArt;null===u&&(u=t.scene.sys.game.config.smoothPixelArt);var d=e.getAddition("SmoothPixelArt");d&&(d.disable=!u),i.source[0].glTexture.magFilter===this.manager.renderer.gl.LINEAR?e.addFeature("BORDERFILTER"):e.removeFeature("BORDERFILTER")},run:function(t,e,i){var n=this.manager,s=n.renderer;n.startStandAloneRender(),this.onRunBegin(t);var r=t.camera,o=this._spriteMatrix,a=this._calcMatrix,h=this._quad,l=e.x,u=e.y,d=e.width,c=e.height;a.copyWithScrollFactorFrom(r.getViewMatrix(!t.useCanvas),r.scrollX,r.scrollY,e.scrollFactorX,e.scrollFactorY),i&&a.multiply(i),o.applyITRS(l,u,0,e.scaleX,e.scaleY),a.multiply(o),a.setQuad(l,u,l+d,u+c,h);var f=this.vertexBufferLayout.layout.stride,p=this.vertexBufferLayout.buffer,g=p.viewF32,m=0;g[m++]=h[2],g[m++]=h[3],g[m++]=0,g[m++]=0,g[m++]=h[0],g[m++]=h[1],g[m++]=0,g[m++]=1,g[m++]=h[4],g[m++]=h[5],g[m++]=1,g[m++]=0,g[m++]=h[6],g[m++]=h[7],g[m++]=1,g[m++]=1,p.update(4*f);var v=e.tileset,x=v.glTexture,y=v.getAnimationDataIndexMap(s).size>0,T=[x,e.layerDataTexture];if(y&&(T[2]=v.getAnimationDataTexture(s)),e.lighting){var w=v.image.dataSource[0];w=w?w.glTexture:this.manager.renderer.normalTexture,T[3]=w}this.updateRenderOptions(e);var b=this.programManager,S=b.getCurrentProgramSuite();if(S){var C=S.program,E=S.vao;this.setupUniforms(t,e),b.applyUniforms(C),s.drawElements(t,T,C,E,4,0)}this.onRunEnd(t)}})},12913(t,e,i){var n=i(83419),s=i(6141);t.exports=new n({Extends:s,initialize:function(t){s.call(this,"TexturerImage",t),this.frame=null,this.frameWidth=0,this.frameHeight=0,this.uvSource=null},run:function(t,e,i){this.onRunBegin(t);var n=e.frame;if(this.frame=n,this.frameWidth=n.cutWidth,this.frameHeight=n.cutHeight,this.uvSource=n,e.isCropped){var s=e._crop;this.uvSource=s,(s.flipX!==e.flipX||s.flipY!==e.flipY)&&e.frame.updateCropUVs(s,e.flipX,e.flipY),this.frameWidth=s.width,this.frameHeight=s.height}var r=n.source.resolution;this.frameWidth/=r,this.frameHeight/=r,this.onRunEnd(t)}})},22995(t,e,i){var n=i(61340),s=i(83419),r=i(6141);t.exports=new s({Extends:r,initialize:function(t){r.call(this,"TexturerTileSprite",t),this.frame=null,this.uvMatrix=new n},run:function(t,e,i){this.onRunBegin(t);var n=e.frame;if(this.frame=n,e.isCropped){var s=e._crop;(s.flipX!==e.flipX||s.flipY!==e.flipY)&&e.frame.updateCropUVs(s,e.flipX,e.flipY)}this.uvMatrix.loadIdentity(),this.uvMatrix.scale(1/n.width,1/n.height),this.uvMatrix.translate(e.tilePositionX,e.tilePositionY),this.uvMatrix.scale(1/e.tileScaleX,1/e.tileScaleY),this.uvMatrix.rotate(-e.tileRotation),this.uvMatrix.setQuad(0,0,e.width,e.height),this.onRunEnd(t)}})},86081(t,e,i){var n=i(61340),s=i(83419),r=i(46975),o=i(6141);t.exports=new s({Extends:o,initialize:function(t,e){e=r(e||{},this.defaultConfig),o.call(this,e.name,t),this.quad=new Float32Array(8),this._spriteMatrix=new n,this._calcMatrix=new n},defaultConfig:{name:"TransformerImage",role:"Transformer"},run:function(t,e,i,n,s){this.onRunBegin(t);var r=i.frame,o=i.uvSource,a=o.x,h=o.y,l=e.displayOriginX,u=e.displayOriginY,d=-l+a,c=-u+h,f=r.customPivot,p=1,g=1;e.flipX&&(f||(d+=-r.realWidth+2*l),p=-1),e.flipY&&(f||(c+=-r.realHeight+2*u),g=-1);var m=t.camera,v=this._spriteMatrix,x=this._calcMatrix.copyWithScrollFactorFrom(m.getViewMatrix(!t.useCanvas),m.scrollX,m.scrollY,e.scrollFactorX,e.scrollFactorY);n&&x.multiply(n),v.applyITRS(e.x,e.y,e.rotation,e.scaleX*p,e.scaleY*g),x.multiply(v),x.setQuad(d,c,d+i.frameWidth,c+i.frameHeight,this.quad);var y=x.matrix,T=1===y[0]&&0===y[1]&&0===y[2]&&1===y[3];if(e.willRoundVertices(m,T)){var w=this.quad;w[0]=Math.round(w[0]),w[1]=Math.round(w[1]),w[2]=Math.round(w[2]),w[3]=Math.round(w[3]),w[4]=Math.round(w[4]),w[5]=Math.round(w[5]),w[6]=Math.round(w[6]),w[7]=Math.round(w[7])}this.onRunEnd(t)}})},88383(t,e,i){var n=i(61340),s=i(83419),r=i(46975),o=i(6141);t.exports=new s({Extends:o,initialize:function(t,e){e=r(e||{},this.defaultConfig),o.call(this,e.name,t),this._spriteMatrix=new n,this.quad=this._spriteMatrix.quad},defaultConfig:{name:"TransformerStamp",role:"Transformer"}
vendor: 2,050 bytes, line 1
1,run:function(t,e,i,n,s){this.onRunBegin(t);var r=i.frame,o=i.uvSource,a=o.x,h=o.y,l=e.displayOriginX,u=e.displayOriginY,d=-l+a,c=-u+h,f=r.customPivot,p=1,g=1;e.flipX&&(f||(d+=-r.realWidth+2*l),p=-1),e.flipY&&(f||(c+=-r.realHeight+2*u),g=-1);var m=e.x,v=e.y,x=this._spriteMatrix;x.applyITRS(m,v,e.rotation,e.scaleX*p,e.scaleY*g);var y=x.matrix;this.onlyTranslate=1===y[0]&&0===y[1]&&0===y[2]&&1===y[3],x.setQuad(d,c,d+i.frameWidth,c+i.frameHeight);var T=x.matrix,w=1===T[0]&&0===T[1]&&0===T[2]&&1===T[3];if(e.willRoundVertices(t.camera,w)){var b=this.quad;b[0]=Math.round(b[0]),b[1]=Math.round(b[1]),b[2]=Math.round(b[2]),b[3]=Math.round(b[3]),b[4]=Math.round(b[4]),b[5]=Math.round(b[5]),b[6]=Math.round(b[6]),b[7]=Math.round(b[7])}this.onRunEnd(t)}})},34454(t,e,i){var n=i(83419),s=i(86081);t.exports=new n({Extends:s,initialize:function(t,e){s.call(this,t,e)},defaultConfig:{name:"TransformerTile",role:"Transformer"},run:function(t,e,i,n,s){this.onRunBegin(t);var r=t.camera,o=this._calcMatrix,a=this._spriteMatrix;o.copyWithScrollFactorFrom(r.getViewMatrix(!t.useCanvas),r.scrollX,r.scrollY,e.scrollFactorX,e.scrollFactorY),n&&o.multiply(n);var h=i.frameWidth,l=i.frameHeight,u=h,d=l,c=h/2,f=l/2,p=e.scaleX,g=e.scaleY,m=e.gidMap[s.index],v=m.tileOffset.x,x=m.tileOffset.y,y=e.x+s.pixelX*p+(c*p-v),T=e.y+s.pixelY*g+(f*g-x),w=-c,b=-f;s.flipX&&(u*=-1,w+=h),s.flipY&&(d*=-1,w+=l),a.applyITRS(y,T,s.rotation,p,g),o.multiply(a),o.setQuad(w,b,w+u,b+d,this.quad);var S=o.matrix,C=1===S[0]&&0===S[1]&&0===S[2]&&1===S[3];if(e.willRoundVertices(r,C)){var E=this.quad;E[0]=Math.round(E[0]),E[1]=Math.round(E[1]),E[2]=Math.round(E[2]),E[3]=Math.round(E[3]),E[4]=Math.round(E[4]),E[5]=Math.round(E[5]),E[6]=Math.round(E[6]),E[7]=Math.round(E[7])}this.onRunEnd(t)}})},46211(t,e,i){var n=i(83419),s=i(86081);t.exports=new n({Extends:s,initialize:function(t,e){s.call(this,t,e)},defaultConfig:{name:"TransformerTileSprite",role:"Transformer"},run:function(t,e,i,n,s){this.onRunBegin(t);var r=e.width,o=e.height,a=e.displayOriginX,h=e.displayOriginY,l=-a,u=-h,d=1,
1c=1;e.flipX&&(l+=-r+2*a,d=-1),e.flipY&&(u+=-o+2*h,c=-1);var f=e.x,p=e.y,g=t.camera,m=this._calcMatrix,v=this._spriteMatrix;m.copyWithScrollFactorFrom(g.getViewMatrix(!t.useCanvas),g.scrollX,g.scrollY,e.scrollFactorX,e.scrollFactorY),n&&m.multiply(n),v.applyITRS(f,p,e.rotation,e.scaleX*d,e.scaleY*c),m.multiply(v),m.setQuad(l,u,l+r,u+o,this.quad);var x=m.matrix,y=1===x[0]&&0===x[1]&&0===x[2]&&1===x[3];if(e.willRoundVertices(g,y)){var T=this.quad;T[0]=Math.round(T[0]),T[1]=Math.round(T[1]),T[2]=Math.round(T[2]),T[3]=Math.round(T[3]),T[4]=Math.round(T[4]),T[5]=Math.round(T[5]),T[6]=Math.round(T[6]),T[7]=Math.round(T[7])}this.onRunEnd(t)}})},84547(t){t.exports="vec4 applyLighting (vec4 fragColor, vec3 normal)\n{\n vec4 lighting = getLighting(fragColor, normal);\n return fragColor * vec4(lighting.rgb * lighting.a, lighting.a);\n}"},11104(t){t.exports="vec4 applyTint(vec4 texture)\n{\n vec3 unpremultTexture = texture.rgb / texture.a;\n float alpha = texture.a * outTint.a;\n vec3 color = vec3(unpremultTexture);\n if (outTintEffect == 0.0) {\n color *= outTint.bgr;\n }\n else if (outTintEffect == 1.0) {\n color = outTint.bgr;\n }\n else if (outTintEffect == 2.0) {\n color += outTint.bgr;\n }\n else if (outTintEffect == 4.0) {\n color = 1.0 - (1.0 - unpremultTexture) * (1.0 - outTint.bgr);\n }\n else if (outTintEffect == 5.0) {\n color = vec3(\n unpremultTexture.r < 0.5 ? 2.0 * outTint.b * unpremultTexture.r : 1.0 - 2.0 * (1.0 - outTint.b) * (1.0 - unpremultTexture.r),\n unpremultTexture.g < 0.5 ? 2.0 * outTint.g * unpremultTexture.g : 1.0 - 2.0 * (1.0 - outTint.g) * (1.0 - unpremultTexture.g),\n unpremultTexture.b < 0.5 ? 2.0 * outTint.r * unpremultTexture.b : 1.0 - 2.0 * (1.0 - outTint.r) * (1.0 - unpremultTexture.b)\n );\n }\n else if (outTintEffect == 6.0) {\n color = vec3(\n outTint.b < 0.5 ? 2.0 * outTint.b * unpremultTexture.r : 1.0 - 2.0 * (1.0 - outTint.b) * (1.0 - unpremultTexture.r),\n outTint.g < 0.5 ? 2.0 * outTint.g * unpremultTexture.g : 1.0 - 2.0 * (1.0 - outTint.g) * (1.0 - unpremultTexture.g),\n outTint.r < 0.5 ? 2.0 * outTint.r * unpremultTexture.b : 1.0 - 2.0 * (1.0 - outTint.r) * (1.0 - unpremultTexture.b)\n );\n }\n return vec4(color * alpha, alpha);\n}"},81556(t){t.exports="vec4 boundedSampler(sampler2D sampler, vec2 uv)\n{\n if (clamp(uv, 0.0, 1.0) != uv)\n {\n return vec4(0.0, 0.0, 0.0, 0.0);\n }\n return texture2D(sampler, uv);\n}"},96293(t){t.exports="#define SHADER_NAME PHASER_COLORMATRIX_FS\nprecision mediump float;\nuniform sampler2D uMainSampler;\nuniform float uColorMatrix[20];\nuniform float uAlpha;\nvarying vec2 outTexCoord;\nvoid main ()\n{\n vec4 c = texture2D(uMainSampler, outTexCoord);\n if (uAlpha == 0.0)\n {\n gl_FragColor = c;\n return;\n }\n if (c.a > 0.0)\n {\n c.rgb /= c.a;\n }\n vec4 result;\n result.r = (uColorMatrix[0] * c.r) + (uColorMatrix[1] * c.g) + (uColorMatrix[2] * c.b) + (uColorMatrix[3] * c.a) + uColorMatrix[4];\n result.g = (uColorMatrix[5] * c.r) + (uColorMatrix[6] * c.g) + (uColorMatrix[7] * c.b) + (uColorMatrix[8] * c.a) + uColorMatrix[9];\n result.b = (uColorMatrix[10] * c.r) + (uColorMatrix[11] * c.g) + (uColorMatrix[12] * c.b) + (uColorMatrix[13] * c.a) + uColorMatrix[14];\n result.a = (uColorMatrix[15] * c.r) + (uColorMatrix[16] * c.g) + (uColorMatrix[17] * c.b) + (uColorMatrix[18] * c.a) + uColorMatrix[19];\n c.rgb *= c.a;\n result.rgb *= result.a;\n gl_FragColor = mix(c, result, uAlpha);\n}"},78390(t){t.exports="vec2 v2len (vec2 a, vec2 b)\n{\n return sqrt(a*a+b*b);\n}\nvec2 getBlockyTexCoord (vec2 texCoord, vec2 texRes) {\n texCoord *= texRes;\n vec2 seam = floor(texCoord + 0.5);\n texCoord = (texCoord - seam) / v2len(dFdx(texCoord), dFdy(texCoord)) + seam;\n texCoord = clamp(texCoord, seam-.5, seam+.5);\n return texCoord / texRes;\n}"},11719(t){t.exports="struct Light\n{\n vec3 position;\n vec3 color;\n float intensity;\n float radius;\n};\nconst int kMaxLights = LIGHT_COUNT;\nuniform vec4 uCamera; /* x, y, rotation, zoom */\nuniform sampler2D uNormSampler;\nuniform vec3 uAmbientLightColor;\nuniform Light uLights[kMaxLights];\nuniform int uLightCount;\n#ifdef FEATURE_SELFSHADOW\nuniform float uDiffuseFlatThreshold;\nuniform float uPenumbra;\n#endif\nvec4 getLighting (vec4 fragColor, vec3 normal)\n{\n vec3 finalColor = vec3(0.0);\n vec2 res = vec2(min(uResolution.x, uResolution.y)) * uCamera.w;\n #ifdef FEATURE_SELFSHADOW\n vec3 unpremultipliedColor = fragColor.rgb / fragColor.a;\n float occlusionThreshold = 1.0 - ((unpremultipliedColor.r + unpremultipliedColor.g + unpremultipliedColor.b) / uDiffuseFlatThreshold);\n #endif\n for (int index = 0; index < kMaxLights; ++index)\n {\n if (index < uLightCount)\n {\n Light light = uLights[index];\n vec3 lightDir = vec3((light.position.xy / res) - (gl_FragCoord.xy / res), light.position.z / res.x);\n vec3 lightNormal = normalize(lightDir);\n float distToSurf = length(lightDir) * uCamera.w;\n float diffuseFactor = max(dot(normal, lightNormal), 0.0);\n float radius = (light.radius / res.x * uCamera.w) * uCamera.w;\n float attenuation = clamp(1.0 - distToSurf * distToSurf / (radius * radius), 0.0, 1.0);\n #ifdef FEATURE_SELFSHADOW\n float occluded = smoothstep(0.0, 1.0, (diffuseFactor - occlusionThreshold) / uPenumbra);\n vec3 diffuse = light.color * diffuseFactor * occluded;\n #else\n vec3 diffuse = light.color * diffuseFactor;
1\n #endif\n finalColor += (attenuation * diffuse) * light.intensity;\n }\n }\n vec4 colorOutput = vec4(uAmbientLightColor + finalColor, 1.0);\n return colorOutput;\n}"},14030(t){t.exports="vec2 clampTexCoordWithinFrame (vec2 texCoord)\n{\n vec2 texRes = getTexRes();\n vec4 frameTexel = outFrame * texRes.xyxy;\n vec2 frameMin = frameTexel.xy + vec2(0.5, 0.5);\n vec2 frameMax = frameTexel.xy + frameTexel.zw - vec2(0.5, 0.5);\n return clamp(texCoord, frameMin / texRes, frameMax / texRes);\n}"},10235(t){t.exports="#pragma phaserTemplate(shaderName)\nprecision mediump float;\nuniform sampler2D uMainSampler;\nuniform float amount;\nvarying vec2 outTexCoord;\n#pragma phaserTemplate(fragmentHeader)\nvec2 Distort(vec2 p)\n{\n float theta = atan(p.y, p.x);\n float radius = length(p);\n radius = pow(radius, amount);\n p.x = radius * cos(theta);\n p.y = radius * sin(theta);\n return 0.5 * (p + 1.0);\n}\nvoid main()\n{\n vec2 xy = 2.0 * outTexCoord - 1.0;\n vec2 texCoord = outTexCoord;\n if (length(xy) < 1.0)\n {\n texCoord = Distort(xy);\n }\n gl_FragColor = boundedSampler(uMainSampler, texCoord);\n}"},65980(t){t.exports="#pragma phaserTemplate(shaderName)\nprecision mediump float;\nuniform sampler2D uMainSampler;\nuniform sampler2D uMainSampler2;\nuniform float amount;
1\nuniform vec4 color;\nvarying vec2 outTexCoord;\nvec4 NORMAL (vec4 base, vec4 blend)\n{\n return blend + base * (1.0 - blend.a);\n}\nvec4 ADD (vec4 base, vec4 blend)\n{\n return base + blend;\n}\nvec4 MULTIPLY (vec4 base, vec4 blend)\n{\n return base * blend;\n}\nvec4 SCREEN (vec4 base, vec4 blend)\n{\n return 1.0 - (1.0 - base) * (1.0 - blend);\n}\nfloat overlayChannel (float base, float blend)\n{\n return base < 0.5 ? 2.0 * base * blend : 1.0 - 2.0 * (1.0 - base) * (1.0 - blend);\n}\nvec4 OVERLAY (vec4 base, vec4 blend)\n{\n return vec4(\n overlayChannel(base.r, blend.r),\n overlayChannel(base.g, blend.g),\n overlayChannel(base.b, blend.b),\n overlayChannel(base.a, blend.a)\n );\n}\nvec4 DARKEN (vec4 base, vec4 blend)\n{\n return min(base, blend);\n}\nvec4 LIGHTEN (vec4 base, vec4 blend)\n{\n return max(base, blend);\n}\nfloat dodgeChannel (float base, float blend)\n{\n return blend == 1.0 ? blend : min(1.0, base / (1.0 - blend));\n}\nvec4 COLOR_DODGE (vec4 base, vec4 blend)\n{\n return vec4(\n dodgeChannel(base.r, blend.r),\n dodgeChannel(base.g, blend.g),\n dodgeChannel(base.b, blend.b),\n dodgeChannel(base.a, blend.a)\n );\n}\nfloat burnChannel (float base, float blend)\n{\n return blend == 0.0 ? blend : 1.0 - min(1.0, (1.0 - base) / blend);\n}\nvec4 COLOR_BURN (vec4 base, vec4 blend)\n{\n return vec4(\n burnChannel(base.r, blend.r),\n burnChannel(base.g, blend.g),\n burnChannel(base.b, blend.b),\n burnChannel(base.a, blend.a)\n );\n}\nfloat hardLightChannel (float base, float blend)\n{\n return blend < 0.5 ? 2.0 * base * blend : 1.0 - 2.0 * (1.0 - base) * (1.0 - blend);\n}\nvec4 HARD_LIGHT (vec4 base, vec4 blend)\n{\n return vec4(\n hardLightChannel(base.r, blend.r),\n hardLightChannel(base.g, blend.g),\n hardLightChannel(base.b, blend.b),\n hardLightChannel(base.a, blend.a)\n );\n}\nfloat softLightChannel (float base, float blend)\n{\n return blend < 0.5 ? (2.0 * base * blend + base * base * (1.0 - 2.0 * blend)) : (sqrt(base) * (2.0 * blend - 1.0) + 2.0 * base * (1.0 - blend));\n}\nvec4 SOFT_LIGHT (vec4 base, vec4 blend)\n{\n return vec4(\n softLightChannel(base.r, blend.r),\n softLightChannel(base.g, blend.g),\n softLightChannel(base.b, blend.b),\n softLightChannel(base.a, blend.a)\n );\n}\nvec4 DIFFERENCE (vec4 base, vec4 blend)\n{\n return abs(base - blend);\n}\nvec4 EXCLUSION (vec4 base, vec4 blend)\n{\n return base + blend - 2.0 * base * blend;\n}\nvec3 rgbToHsl (vec3 color)\n{\n vec3 hsl = vec3(0.0);\n float fmin = min(min(color.r, color.g), color.b);\n float fmax = max(max(color.r, color.g), color.b);\n float delta = fmax - fmin;\n hsl.z = (fmax + fmin) / 2.0;\n if (delta == 0.0)\n {\n hsl.x = 0.0;\n hsl.y = 0.0;\n }\n else\n {\n if (hsl.z < 0.5)\n {\n hsl.y = delta / (fmax + fmin);\n }\n else\n {\n hsl.y = delta / (2.0 - fmax - fmin);\n }\n float deltaR = (((fmax - color.r) / 6.0) + (delta / 2.0)) / delta;\n float deltaG = (((fmax - color.g) / 6.0) + (delta / 2.0)) / delta;\n float deltaB = (((fmax - color.b) / 6.0) + (delta / 2.0)) / delta;\n if (color.r == fmax)\n {\n hsl.x = deltaB - deltaG;\n }\n else if (color.g == fmax)\n {\n hsl.x = (1.0 / 3.0) + deltaR - deltaB;\n }\n else if (color.b == fmax)\n {\n hsl.x = (2.0 / 3.0) + deltaG - deltaR;\n }\n if (hsl.x < 0.0)\n {\n hsl.x += 1.0;\n }\n else if (hsl.x > 1.0)\n {\n hsl.x -= 1.0;\n }\n }\n return hsl;\n}\nvec3 hslToRgb (vec3 hsl)\n{\n float p = hsl.z * (1.0 - hsl.y);\n float q = hsl.z * (1.0 - hsl.y * hsl.x);\n float t = hsl.z * (1.0 - hsl.y * (1.0 - hsl.x));\n if (hsl.x < 1.0 / 6.0)\n {\n return vec3(hsl.z, t, p);\n }\n else if (hsl.x < 0.5)\n {\n return vec3(q, hsl.z, p);\n }\n else if (hsl.x < 2.0 / 3.0)\n {\n return vec3(p, hsl.z, t);\n }\n return vec3(p, q, hsl.z);\n}\nvec4 HUE (vec4 base, vec4 blend)\n{\n vec3 baseHSL = rgbToHsl(base.rgb);\n vec3 blendHSL = rgbToHsl(blend.rgb);\n return vec4(hslToRgb(vec3(blendHSL.x, baseHSL.y, baseHSL.z)), base.a);\n}\nvec4 SATURATION (vec4 base, vec4 blend)\n{\n vec3 baseHSL = rgbToHsl(base.rgb);\n vec3 blendHSL = rgbToHsl(blend.rgb);\n return vec4(hslToRgb(vec3(baseHSL.x, blendHSL.y, baseHSL.z)), base.a);\n}\nvec4 COLOR (vec4 base, vec4 blend)\n{\n vec3 baseHSL = rgbToHsl(base.rgb);\n vec3 blendHSL = rgbToHsl(blend.rgb);\n return vec4(hslToRgb(vec3(blendHSL.x, blendHSL.y, baseHSL.z)), base.a);\n}\nvec4 LUMINOSITY (vec4 base, vec4 blend)\n{\n vec3 baseHSL = rgbToHsl(base.rgb);\n vec3 blendHSL = rgbToHsl(blend.rgb);\n return vec4(hslToRgb(vec3(baseHSL.x, baseHSL.y, blendHSL.z)), base.a);\n}\nvec4 ERASE (vec4 base, vec4 blend)\n{\n return base * (1.0 - blend.a);\n}\nvec4 SOURCE_IN (vec4 base, vec4 blend)\n{\n return blend * base.a;\n}\nvec4 SOURCE_OUT (vec4 base, vec4 blend)\n{\n return blend * (1.0 - base.a);\n}\nvec4 SOURCE_ATOP (vec4 base, vec4 blend)\n{\n return base * (1.0 - blend.a) + blend * base.a;\n}\nvec4 DESTINATION_OVER (vec4 base, vec4 blend)\n{\n return base + blend * (1.0 - base.a);\n}\nvec4 DESTINATION_IN (vec4 base, vec4 blend)\n{\n return base * blend.a;\n}\nvec4 DESTINATION_OUT (vec4 base, vec4 blend)\n{\n return base * (1.0 - blend.a);\n}\nvec4 DESTINATION_ATOP (vec4 base, vec4 blend)\n{\n return base * blend.a + blend * (1.0 - base.a);\n}\nvec4 LIGHTER (vec4 base, vec4 blend)\n{\n return ADD(base, blend);\n}\nvec4 COPY (vec4 base, vec4 blend)\n{\n return blend;\n}\nvec4 XOR (vec4 base, vec4 blend)\n{\n return base * (1.0 - blend.a) + blend * (1.0 - base.a);\n}\n#pragma phaserTemplate(fragmentHeader)\nvoid main ()\n{\n vec4 base = boundedSampler(uMainSampler, outTexCoord);\n vec4 blend = boundedSampler(uMainSampler2, outTexCoord) * color;\n vec4 blended = BLEND(base, blend);\n gl_FragColor = mix(base, blended, amount);\n}"},5899(t){t.exports="#pragma phaserTemplate(shaderName)\nprecision mediump float;\nuniform sampler2D uMainSampler;\nuniform vec2 resolution;\nuniform vec4 uSizeAndOffset;\nvarying vec2 outTexCoord;\nvoid main()\n{\n vec2 gridCell = floor((outTexCoord * resolution + uSizeAndOffset.zw) / uSizeAndOffset.xy) * uSizeAndOffset.xy - uSizeAndOffset.zw;\n vec2 texCoord = gridCell / resolution;\n gl_FragColor = texture2D(uMainSampler, texCoord);\n}"},20784(t){t.exports="#pragma phaserTemplate(shaderName)\nprecision mediump float;\nuniform sampler2D uMainSampler;\nuniform vec2 resolution;\nuniform vec2 offset;\nuniform float strength;\nuniform vec3 color;\nvarying vec2 outTexCoord;\n#pragma phaserTemplate(fragmentHeader)\nvoid main ()\n{\n vec2 uv = outTexCoord;\n vec4 col = vec4(0.0);
1\n vec2 off1 = vec2(1.411764705882353) * offset * strength;\n vec2 off2 = vec2(3.2941176470588234) * offset * strength;\n vec2 off3 = vec2(5.176470588235294) * offset * strength;\n col += boundedSampler(uMainSampler, uv) * 0.1964825501511404;\n col += boundedSampler(uMainSampler, uv + (off1 / resolution)) * 0.2969069646728344;\n col += boundedSampler(uMainSampler, uv - (off1 / resolution)) * 0.2969069646728344;\n col += boundedSampler(uMainSampler, uv + (off2 / resolution)) * 0.09447039785044732;\n col += boundedSampler(uMainSampler, uv - (off2 / resolution)) * 0.09447039785044732;\n col += boundedSampler(uMainSampler, uv + (off3 / resolution)) * 0.010381362401148057;\n col += boundedSampler(uMainSampler, uv - (off3 / resolution)) * 0.010381362401148057;\n gl_FragColor = col * vec4(color, 1.0);\n}"},65122(t){t.exports="#pragma phaserTemplate(shaderName)\nprecision mediump float;\nuniform sampler2D uMainSampler;\nuniform vec2 resolution;\nuniform vec2 offset;\nuniform float strength;\nuniform vec3 color;\nvarying vec2 outTexCoord;\n#pragma phaserTemplate(fragmentHeader)\nvoid main ()\n{\n vec2 uv = outTexCoord;\n vec4 col = vec4(0.0);\n vec2 offset = vec2(1.333) * offset * strength;\n col += boundedSampler(uMainSampler, uv) * 0.29411764705882354;\n col += boundedSampler(uMainSampler, uv + (offset / resolution)) * 0.35294117647058826;\n col += boundedSampler(uMainSampler, uv - (offset / resolution)) * 0.35294117647058826;\n gl_FragColor = col * vec4(color, 1.0);\n}"},60942(t){t.exports="#pragma phaserTemplate(shaderName)\nprecision mediump float;\nuniform sampler2D uMainSampler;\nuniform vec2 resolution;\nuniform vec2 offset;\nuniform float strength;\nuniform vec3 color;\nvarying vec2 outTexCoord;\n#pragma phaserTemplate(fragmentHeader)\nvoid main ()\n{\n vec2 uv = outTexCoord;\n vec4 col = vec4(0.0);\n vec2 off1 = vec2(1.3846153846) * offset * strength;\n vec2 off2 = vec2(3.2307692308) * offset * strength;\n col += boundedSampler(uMainSampler, uv) * 0.2270270270;\n col += boundedSampler(uMainSampler, uv + (off1 / resolution)) * 0.3162162162;\n col += boundedSampler(uMainSampler, uv - (off1 / resolution)) * 0.3162162162;\n col += boundedSampler(uMainSampler, uv + (off2 / resolution)) * 0.0702702703;\n col += boundedSampler(uMainSampler, uv - (off2 / resolution)) * 0.0702702703;\n gl_FragColor = col * vec4(color, 1.0);\n}"},43722(t){t.exports="#pragma phaserTemplate(shaderName)\nprecision mediump float;\n#define ITERATIONS 100.0\n#define ONEOVER_ITR 1.0 / ITERATIONS\n#define PI 3.141596\n#define GOLDEN_ANGLE 2.39996323\nuniform sampler2D uMainSampler;\nuniform vec2 resolution;\nuniform float radius;\nuniform float amount;
1\nuniform float contrast;\nuniform bool isTiltShift;\nuniform float strength;\nuniform vec2 blur;\nvarying vec2 outTexCoord;\nvec2 Sample (in float theta, inout float r)\n{\n r += 1.0 / r;\n return (r - 1.0) * vec2(cos(theta), sin(theta)) * 0.06;\n}\n#pragma phaserTemplate(fragmentHeader)\nvec3 Bokeh (sampler2D tex, vec2 uv, float radius)\n{\n vec3 acc = vec3(0.0);\n vec3 div = vec3(0.0);\n vec2 pixel = vec2(resolution.y / resolution.x, 1.0) * radius * .025;\n float r = 1.0;\n for (float j = 0.0; j < GOLDEN_ANGLE * ITERATIONS; j += GOLDEN_ANGLE)\n {\n vec3 col = boundedSampler(tex, uv + pixel * Sample(j, r)).xyz;\n col = contrast > 0.0 ? col * col * (1.0 + contrast) : col;\n vec3 bokeh = vec3(0.5) + pow(col, vec3(10.0)) * amount;\n acc += col * bokeh;\n div += bokeh;\n }\n return acc / div;\n}\nvoid main ()\n{\n float shift = 1.0;\n if (isTiltShift)\n {\n vec2 uv = vec2(gl_FragCoord.xy / resolution + vec2(-0.5, -0.5)) * 2.0;\n float centerStrength = 1.0;\n shift = length(uv * blur * strength) * centerStrength;\n }\n gl_FragColor = vec4(Bokeh(uMainSampler, outTexCoord * vec2(1.0, 1.0), radius * shift), 0.0);\n}"},19883(t){t.exports="#pragma phaserTemplate(shaderName)\nprecision mediump float;\nuniform sampler2D uMainSampler;\nuniform float uColorMatrix[20];\nuniform float uAlpha;\nvarying vec2 outTexCoord;\nvoid main ()\n{\n vec4 c = texture2D(uMainSampler, outTexCoord);\n if (uAlpha == 0.0)\n {\n gl_FragColor = c;\n return;\n }\n if (c.a > 0.0)\n {\n c.rgb /= c.a;\n }\n vec4 result;\n result.r = (uColorMatrix[0] * c.r) + (uColorMatrix[1] * c.g) + (uColorMatrix[2] * c.b) + (uColorMatrix[3] * c.a) + uColorMatrix[4];\n result.g = (uColorMatrix[5] * c.r) + (uColorMatrix[6] * c.g) + (uColorMatrix[7] * c.b) + (uColorMatrix[8] * c.a) + uColorMatrix[9];\n result.b = (uColorMatrix[10] * c.r) + (uColorMatrix[11] * c.g) + (uColorMatrix[12] * c.b) + (uColorMatrix[13] * c.a) + uColorMatrix[14];\n result.a = (uColorMatrix[15] * c.r) + (uColorMatrix[16] * c.g) + (uColorMatrix[17] * c.b) + (uColorMatrix[18] * c.a) + uColorMatrix[19];\n vec3 rgb = mix(c.rgb, result.rgb, uAlpha);\n rgb *= result.a;\n gl_FragColor = vec4(rgb, result.a);\n}"},32624(t){t.exports="#pragma phaserTemplate(shaderName)\nprecision mediump float;\nuniform sampler2D uMainSampler;\nuniform sampler2D uTransferSampler;\nuniform float uColorMatrixSelf[20];\nuniform float uColorMatrixTransfer[20];\nuniform float uAlphaSelf;\nuniform float uAlphaTransfer;\nuniform vec4 uAdditions;\nuniform vec4 uMultiplications;\nvarying vec2 outTexCoord;\n#define S uColorMatrixSelf\n#define T uColorMatrixTransfer\nvoid main ()\n{\n vec4 self = texture2D(uMainSampler, outTexCoord);\n if (uAlphaSelf == 0.0)\n {\n gl_FragColor = self;\n return;\n }\n if (self.a > 0.0)\n {\n self.rgb /= self.a;\n }\n vec4 resultSelf;\n resultSelf.r = (S[0] * self.r) + (S[1] * self.g) + (S[2] * self.b) + (S[3] * self.a) + S[4];\n resultSelf.g = (S[5] * self.r) + (S[6] * self.g) + (S[7] * self.b) + (S[8] * self.a) + S[9];\n resultSelf.b = (S[10] * self.r) + (S[11] * self.g) + (S[12] * self.b) + (S[13] * self.a) + S[14];\n resultSelf.a = (S[15] * self.r) + (S[16] * self.g) + (S[17] * self.b) + (S[18] * self.a) + S[19];\n if (uAlphaTransfer == 0.0)\n {\n self.rgb *= self.a;\n resultSelf.rgb *= resultSelf.a;\n gl_FragColor = mix(self, resultSelf, uAlphaSelf);\n return;\n }\n vec4 tex = texture2D(uTransferSampler, outTexCoord);\n if (tex.a > 0.0)\n {\n tex.rgb /= tex.a;\n }\n vec4 resultTransfer;\n resultTransfer.r = (T[0] * tex.r) + (T[1] * tex.g) + (T[2] * tex.b) + (T[3] * tex.a) + T[4];\n resultTransfer.g = (T[5] * tex.r) + (T[6] * tex.g) + (T[7] * tex.b) + (T[8] * tex.a) + T[9];\n resultTransfer.b = (T[10] * tex.r) + (T[11] * tex.g) + (T[12] * tex.b) + (T[13] * tex.a) + T[14];
1\n resultTransfer.a = (T[15] * tex.r) + (T[16] * tex.g) + (T[17] * tex.b) + (T[18] * tex.a) + T[19];\n vec4 combo = (resultSelf + resultTransfer) * uAdditions + (resultSelf * resultTransfer) * uMultiplications;\n self.rgb *= self.a;\n resultSelf.rgb *= resultSelf.a;\n combo.rgb *= combo.a;\n gl_FragColor = mix(self, mix(resultSelf, combo, uAlphaTransfer), uAlphaSelf);\n}"},12886(t){t.exports="#pragma phaserTemplate(shaderName)\nprecision mediump float;\nuniform sampler2D uMainSampler;\nuniform sampler2D uDisplacementSampler;\nuniform vec2 amount;\nvarying vec2 outTexCoord;\n#pragma phaserTemplate(fragmentHeader)\nvoid main ()\n{\n vec2 disp = (-vec2(0.5, 0.5) + texture2D(uDisplacementSampler, outTexCoord).rg) * amount;\n gl_FragColor = boundedSampler(uMainSampler, outTexCoord + disp).rgba;\n}"},33016(t){t.exports="#pragma phaserTemplate(shaderName)\n#define DISTANCE 10.0\n#define QUALITY 10.0\n#pragma phaserTemplate(fragmentDefine)\nprecision mediump float;\nuniform sampler2D uMainSampler;\nvarying vec2 outTexCoord;\nuniform float outerStrength;\nuniform float innerStrength;\nuniform float scale;\nuniform vec2 resolution;\nuniform vec4 glowColor;\nuniform bool knockout;\nconst float PI = 3.14159265358979323846264;\nconst float MAX_ALPHA = DISTANCE * (DISTANCE + 1.0) * QUALITY / 2.0;\n#pragma phaserTemplate(fragmentHeader)\nvoid main ()\n{\n vec2 px = vec2(1.0 / resolution.x, 1.0 / resolution.y) * scale;\n float totalAlpha = 0.0;\n float curAngle = 0.0;\n vec2 direction;\n vec2 displaced;\n vec4 color;\n for (float curDistance = 0.0; curDistance < DISTANCE; curDistance++)\n {\n curAngle += fract(sin(dot(vec2(curDistance, outTexCoord.x + outTexCoord.y), vec2(12.9898, 78.233))) * 43758.5453);\n for (float i = 0.0; i < QUALITY; i++)\n {\n curAngle += PI * 2.0 / (QUALITY);\n direction = vec2(cos(curAngle), sin(curAngle)) * px;\n displaced = outTexCoord + direction * (curDistance + 1.0);\n color = boundedSampler(uMainSampler, displaced);\n totalAlpha += (DISTANCE - curDistance) * color.a;\n }\n }\n color = boundedSampler(uMainSampler, outTexCoord);\n float alphaRatio = (totalAlpha / MAX_ALPHA);\n float innerGlowAlpha = (1.0 - alphaRatio) * innerStrength * color.a;\n float innerGlowStrength = min(1.0, innerGlowAlpha);\n vec4 innerColor = mix(color, glowColor, innerGlowStrength);\n float outerGlowAlpha = alphaRatio * outerStrength * (1.0 - color.a);\n float outerGlowStrength = min(1.0 - innerColor.a, outerGlowAlpha);\n if (knockout)\n {\n float resultAlpha = outerGlowStrength + innerGlowStrength;\n gl_FragColor = vec4(glowColor.rgb * resultAlpha, resultAlpha);\n }\n else\n {\n vec4 outerGlowColor = outerGlowStrength * glowColor.rgba;\n gl_FragColor = innerColor + outerGlowColor;\n }\n}"},33179(t){t.exports="#pragma phaserTemplate(shaderName)\nprecision highp float;\n#pragma phaserTemplate(fragmentHeader)\nuniform sampler2D uMainSampler;\nuniform vec4 uColor;\nuniform vec4 uColorFactor;\nuniform bool uUnpremultiply;\nuniform float uAlpha;\nvarying vec2 outTexCoord;\nvoid main ()\n{\n vec4 sample = texture2D(uMainSampler, outTexCoord);\n if (uUnpremultiply)\n {\n sample.rgb /= sample.a;\n }\n vec4 modulatedSample = sample * uColorFactor + uColor;\n float progress = modulatedSample.r + modulatedSample.g + modulatedSample.b + modulatedSample.a;\n vec4 rampColor = getRampAt(progress);\n rampColor.rgb *= rampColor.a;\n gl_FragColor = mix(sample, rampColor * sample.a, uAlpha);\n}"},94526(t){t.exports="#pragma phaserTemplate(shaderName)\nprecision mediump float;\nuniform sampler2D uMainSampler;\nuniform sampler2D uEnvSampler;\nuniform sampler2D uNormSampler;\nuniform mat4 uViewMatrix;\nuniform float uModelRotation;\nuniform float uBulge;\nuniform vec3 uColorFactor;\nvarying vec2 outTexCoord;\n#define PI 3.14159265358979323846\nvoid main()\n{\n vec4 color = texture2D(uMainSampler, outTexCoord);\n vec3 normal = texture2D(uNormSampler, outTexCoord).rgb;\n vec3 normalN = normal * 2.0 - 1.0;\n float normalXYLength = length(normalN.xy);\n float angle = atan(\n normalN.y,\n normalN.x\n ) - uModelRotation;\n normalN = vec3(\n normalXYLength * cos(angle),\n normalXYLength * sin(angle),\n normalN.z\n );\n normalN = reflect(vec3(0.0, 0.0, -1.0), normalN);\n normalN = (uViewMatrix * vec4(normalN, 1.0)).xyz;\n float envX = atan(normalN.x, normalN.z) / PI;\n float envY = sin(normalN.y * PI / 2.0);\n vec2 uv = vec2(envX, envY) * 0.5 + 0.5;\n vec2 rotatedTexCoord = vec2(\n cos(-uModelRotation) * outTexCoord.x - sin(-uModelRotation) * outTexCoord.y,\n sin(-uModelRotation) * outTexCoord.x + cos(- uModelRotation) * outTexCoord.y\n );\n uv += uBulge * (rotatedTexCoord - 0.5);\n if (uv.y < 0.0)\n {\n uv.y = abs(uv.y);\n uv.x += 0.5;\n }\n else if (uv.y > 1.0)\n {\n uv.y = 2.0 - uv.y;\n uv.x += 0.5;\n }\n vec3 environment = texture2D(uEnvSampler, uv).rgb;\n gl_FragColor = vec4(environment * color.rgb * uColorFactor, color.a);\n}"},4488(t){t.exports="#pragma phaserTemplate(shaderName)\nprecision mediump float;\nuniform sampler2D uMainSampler;\nuniform vec4 uColor;\nuniform vec4 uIsolateThresholdFeather;\nvarying vec2 outTexCoord;\nvoid main()\n{\n vec4 color = texture2D(uMainSampler, outTexCoord);\n vec3 unpremultipliedColor = color.rgb / color.a;\n float isolate = uIsolateThresholdFeather.x;\n float threshold = uIsolateThresholdFeather.y;\n float feather = uIsolateThresholdFeather.z;\n float match = distance(unpremultipliedColor, uColor.rgb);\n match = clamp(match - threshold, 0.0, 1.0);\n match = clamp(match / feather, 0.0, 1.0);\n if (isolate == 1.0)\n {\n match = 1.0 - match;\n }\n match = mix(1.0, match, uColor.a);\n gl_FragColor = color * match;\n}"},39603(t){t.exports="#pragma phaserTemplate(shaderName)\nprecision mediump float;\nuniform sampler2D uMainSampler;\nuniform sampler2D uMaskSampler;\nuniform bool invert;\nvarying vec2 outTexCoord;\nvoid main ()\n{\n vec4 color = texture2D(uMainSampler, outTexCoord);\n vec4 mask = texture2D(uMaskSampler, outTexCoord);\n float a = mask.a;\n color *= invert ? (1.0 - a) : a;\n gl_FragColor = color;\n}"}
1,60047(t){t.exports="#pragma phaserTemplate(shaderName)\nprecision mediump float;\n#pragma phaserTemplate(fragmentHeader)\nuniform sampler2D uMainSampler;\nuniform mat4 uViewMatrix;\n#ifdef FACING_POWER\nuniform float uFacingPower;\n#endif\n#ifdef OUTPUT_RATIO\nuniform vec3 uRatioVector;\nuniform float uRatioRadius;\n#endif\nvarying vec2 outTexCoord;\nvoid main()\n{\n vec3 normal = texture2D(uMainSampler, outTexCoord).rgb * 2.0 - 1.0;\n normal = (uViewMatrix * vec4(normal, 1.0)).xyz;\n #ifdef FACING_POWER\n normal = normalize(normal * vec3(1.0, 1.0, uFacingPower));\n #endif\n #ifdef OUTPUT_RATIO\n float ratio = dot(normal, normalize(uRatioVector));\n ratio = (ratio - 1.0 + uRatioRadius) / uRatioRadius;\n if (ratio <= 0.0)\n {\n ratio = 0.0;\n }\n normal = vec3(ratio * 2.0 - 1.0);\n #endif\n gl_FragColor = vec4((normal + 1.0) * 0.5, 1.0);\n}"},7529(t){t.exports="#pragma phaserTemplate(shaderName)\nprecision mediump float;\nuniform sampler2D uMainSampler;\nuniform float uRadius;\nuniform float uPower;\nvarying vec2 outTexCoord;\n#define PI 3.14159265358979323846\n#pragma phaserTemplate(fragmentHeader)\n#define STEP_X 1.0 / SAMPLES_X\n#define STEP_Y 1.0 / SAMPLES_Y\nvec3 uvPanoramaNormal(vec2 uv)\n{\n float y = uv.y * 2.0 - 1.0;\n float angle = (uv.x * 2.0 - 1.0) * PI;\n float x = sin(angle);\n float z = cos(angle);\n vec2 xz = vec2(x, z);\n xz *= sqrt(1.0 - y * y);\n return normalize(vec3(xz.x, y, xz.y));\n}\nvoid main()\n{\n vec3 acc = vec3(0.0);\n float div = 0.0;\n vec3 texelNormal = uvPanoramaNormal(outTexCoord);\n for (float y = STEP_Y / 2.0; y < 1.0; y += STEP_Y)\n {\n float yWeight = cos((y * 2.0 - 1.0) * PI / 2.0);\n for (float x = STEP_X / 2.0; x < 1.0; x += STEP_X)\n {\n vec2 uv = vec2(x, y);\n vec3 sampleNormal = uvPanoramaNormal(uv);\n float dotProduct = dot(sampleNormal, texelNormal);\n dotProduct = (dotProduct - 1.0 + uRadius) / uRadius;\n if (dotProduct <= 0.0)\n {\n continue;\n }\n vec3 color = texture2D(uMainSampler, uv).rgb;\n color *= pow(length(color), uPower);\n acc += color * dotProduct * yWeight;\n div += dotProduct * yWeight;\n }\n }\n gl_FragColor = vec4(acc / div, 1.0);\n}"},99191(t){t.exports="#pragma phaserTemplate(shaderName)\nprecision mediump float;\nuniform sampler2D uMainSampler;\nuniform vec2 resolution;\nuniform float amount;
1\nvarying vec2 outTexCoord;\nvoid main ()\n{\n float pixelSize = floor(2.0 + amount);\n vec2 center = pixelSize * floor(outTexCoord * resolution / pixelSize) + pixelSize * vec2(0.5, 0.5);\n vec2 corner1 = center + pixelSize * vec2(-0.5, -0.5);\n vec2 corner2 = center + pixelSize * vec2(+0.5, -0.5);\n vec2 corner3 = center + pixelSize * vec2(+0.5, +0.5);\n vec2 corner4 = center + pixelSize * vec2(-0.5, +0.5);\n vec4 pixel = 0.4 * texture2D(uMainSampler, center / resolution);\n pixel += 0.15 * texture2D(uMainSampler, corner1 / resolution);\n pixel += 0.15 * texture2D(uMainSampler, corner2 / resolution);\n pixel += 0.15 * texture2D(uMainSampler, corner3 / resolution);\n pixel += 0.15 * texture2D(uMainSampler, corner4 / resolution);\n gl_FragColor = pixel;\n}"},88430(t){t.exports="#pragma phaserTemplate(shaderName)\nprecision highp float;\nuniform sampler2D uMainSampler;\nuniform vec4 uSteps;\nuniform vec4 uGamma;\nuniform vec4 uOffset;\nuniform int uMode;\nuniform bool uDither;\nvarying vec2 outTexCoord;\nvec4 rgbaToHsva(vec4 rgba)\n{\n float r = rgba.r;\n float g = rgba.g;\n float b = rgba.b;\n float a = rgba.a;\n float min = min(min(r, g), b);\n float max = max(max(r, g), b);\n float d = max - min;\n float h = 0.0;\n float s = (max == 0.0) ? 0.0 : d / max;\n float v = max;\n if (max != min)\n {\n if (max == r)\n {\n h = (g - b) / d + ((g < b) ? 6.0 : 0.0);\n }\n else if (max == g)\n {\n h = (b - r) / d + 2.0;\n }\n else\n {\n h = (r - g) / d + 4.0;\n }\n h /= 6.0;\n }\n return vec4(h, s, v, a);\n}\nfloat hsvaToRgbaConvert(float n, vec4 hsva)\n{\n float k = mod(n + hsva.x * 6.0, 6.0);\n float min = min(min(k, 4.0 - k), 1.0);\n return hsva.z - hsva.z * hsva.y * max(0.0, min);\n}\nvec4 hsvaToRgba(vec4 hsva)\n{\n return vec4(\n hsvaToRgbaConvert(5.0, hsva),\n hsvaToRgbaConvert(3.0, hsva),\n hsvaToRgbaConvert(1.0, hsva),\n hsva.a\n );\n}\nvec4 ditherIGN(vec4 value)\n{\n value += fract(52.9829189 * fract(0.06711056 * gl_FragCoord.x + 0.00583715 * gl_FragCoord.y)) - 0.5;\n return value;\n}\nvoid main ()\n{\n vec4 sample = texture2D(uMainSampler, outTexCoord);\n if (uMode == 1)\n {\n sample = rgbaToHsva(sample);\n }\n sample = pow(sample, uGamma);\n sample -= uOffset;\n vec4 steps = max(uSteps - 1.0, 1.0);\n sample *= steps;\n if (uDither)\n {\n sample = ditherIGN(sample);\n }\n sample = ceil(sample - 0.5);\n sample /= steps;\n sample += uOffset;\n sample = pow(sample, 1.0 / uGamma);\n if (uMode == 1)\n {\n sample.x = mod(sample.x, 1.0);\n sample = hsvaToRgba(clamp(sample, 0.0, 1.0));\n }\n gl_FragColor = sample;\n}"}
1,69355(t){t.exports="#pragma phaserTemplate(shaderName)\nprecision mediump float;\nuniform sampler2D uMainSampler;\nvarying vec2 outTexCoord;\nuniform vec2 lightPosition;\nuniform vec4 color;\nuniform float decay;\nuniform float power;\nuniform float intensity;\nuniform int samples;\nconst int MAX = 12;\n#pragma phaserTemplate(fragmentHeader)\nvoid main ()\n{\n vec4 texture = boundedSampler(uMainSampler, outTexCoord);\n vec2 pc = (lightPosition - outTexCoord) * intensity;\n float shadow = 0.0;\n float limit = max(float(MAX), float(samples));\n for (int i = 0; i < MAX; ++i)\n {\n if (i >= samples)\n {\n break;\n }\n shadow += boundedSampler(uMainSampler, outTexCoord + float(i) * decay / limit * pc).a * power;\n }\n float mask = 1.0 - texture.a;\n gl_FragColor = mix(texture, color, clamp(shadow * mask, 0.0, 1.0));\n}"},92636(t){t.exports="#pragma phaserTemplate(shaderName)\nprecision mediump float;\nuniform sampler2D uMainSampler;\nuniform vec4 edge1;\nuniform vec4 edge2;\nuniform vec4 invert;\nvarying vec2 outTexCoord;\nvoid main ()\n{\n vec4 color = texture2D(uMainSampler, outTexCoord);\n color = clamp((color - edge1) / (edge2 - edge1), 0.0, 1.0);\n color = mix(color, 1.0 - color, invert);\n gl_FragColor = color;\n}"},18185(t){t.exports="#pragma phaserTemplate(shaderName)\nprecision mediump float;\nuniform sampler2D uMainSampler;\nuniform float uRadius;\nuniform float uStrength;\nuniform vec2 uPosition;\nuniform vec4 uColor;\nuniform int uBlendMode;\nvarying vec2 outTexCoord;\nvoid main ()\n{\n float vignette = 1.0;\n vec2 position = vec2(uPosition.x, 1.0 - uPosition.y);\n float d = length(outTexCoord - position);\n if (d <= uRadius)\n {\n float g = d / uRadius;\n vignette = sin(g * 3.14 * uStrength);\n }\n vec4 color = uColor;\n vec4 texture = texture2D(uMainSampler, outTexCoord);\n if (uBlendMode == 1)\n {\n color.rgb = texture.rgb + color.rgb;\n }\n else if (uBlendMode == 2)\n {\n color.rgb = texture.rgb * color.rgb;\n }\n else if (uBlendMode == 3)\n {\n color.rgb = 1.0 - ((1.0 - texture.rgb) * (1.0 - color.rgb));\n }\n gl_FragColor = mix(texture, color, vignette);\n}"},99174(t){t.exports="#pragma phaserTemplate(shaderName)\nprecision mediump float;\nuniform sampler2D uMainSampler;\nuniform sampler2D uMainSampler2;\nuniform vec4 uProgress_WipeWidth_Direction_Axis;\nuniform float uReveal;\nvarying vec2 outTexCoord;\nvoid main ()\n{\n vec4 color0;\n vec4 color1;\n if (uReveal == 0.0)\n {\n color0 = texture2D(uMainSampler, outTexCoord);\n color1 = texture2D(uMainSampler2, outTexCoord);\n }\n else\n {\n color0 = texture2D(uMainSampler2, outTexCoord);\n color1 = texture2D(uMainSampler, outTexCoord);\n }\n float distance = uProgress_WipeWidth_Direction_Axis.x;\n float width = uProgress_WipeWidth_Direction_Axis.y;\n float direction = uProgress_WipeWidth_Direction_Axis.z;\n float axis = outTexCoord.x;\n if (uProgress_WipeWidth_Direction_Axis.w == 1.0)\n {\n axis = outTexCoord.y;\n }\n float adjust = mix(width, -width, distance);\n float value = smoothstep(distance - width, distance + width, abs(direction - axis) + adjust);\n gl_FragColor = mix(color1, color0, value);\n}"},73416(t){t.exports="#pragma phaserTemplate(shaderName)\n#pragma phaserTemplate(extensions)\n#pragma phaserTemplate(features)\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\n#pragma phaserTemplate(fragmentDefine)\nuniform vec2 uResolution;\nvarying vec4 outTint;\n#pragma phaserTemplate(outVariables)\n#pragma phaserTemplate(fragmentHeader)\nvoid main ()\n{\n vec4 fragColor = outTint;\n #pragma phaserTemplate(fragmentProcess)\n gl_FragColor = fragColor;\n}"},91627(t){t.exports="#pragma phaserTemplate(shaderName)\n#pragma phaserTemplate(extensions)\n#pragma phaserTemplate(features)\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\n#pragma phaserTemplate(vertexDefine)\nuniform mat4 uProjectionMatrix;\nuniform vec2 uResolution;\nattribute vec2 inPosition;\nattribute vec4 inTint;\nvarying vec4 outTint;\n#pragma phaserTemplate(outVariables)\n#pragma phaserTemplate(vertexHeader)\nvoid main ()\n{\n gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);\n outTint = vec4(inTint.bgr * inTint.a, inTint.a);\n #pragma phaserTemplate(vertexProcess)\n}"},84220(t){t.exports="vec3 getNormalFromMap (vec2 texCoord)\n{\n vec3 normalMap = texture2D(uNormSampler, texCoord).rgb;\n return normalize(outInverseRotationMatrix * vec3(normalMap * 2.0 - 1.0));\n}"}
1,2860(t){t.exports="uniform vec2 uMainResolution[TEXTURE_COUNT];\nvec2 getTexRes ()\n{\n #if TEXTURE_COUNT == 1\n float texId = 0.0;\n #else\n float texId = outTexDatum;\n #endif\n #pragma phaserTemplate(texIdProcess)\n vec2 texRes = vec2(0.0);\n for (int i = 0; i < TEXTURE_COUNT; i++)\n {\n if (texId == float(i))\n {\n texRes = uMainResolution[i];\n break;\n }\n }\n return texRes;\n}"},46432(t){t.exports="uniform sampler2D uMainSampler[TEXTURE_COUNT];\nvec4 getTexture (vec2 texCoord)\n{\n #if TEXTURE_COUNT == 1\n return texture2D(uMainSampler[0], texCoord);\n #else\n if (outTexDatum == 0.0) return texture2D(uMainSampler[0], texCoord);\n #define ELSE_TEX_CASE(INDEX) else if (outTexDatum == float(INDEX)) return texture2D(uMainSampler[INDEX], texCoord);\n #pragma phaserTemplate(texIdProcess)\n else return vec4(0.0, 0.0, 0.0, 0.0);\n #endif\n}"},41509(t){t.exports="#pragma phaserTemplate(shaderName)\nprecision highp float;\n#pragma phaserTemplate(fragmentHeader)\n#define PI 3.14159265358979323846\nuniform int uRepeatMode;\nuniform float uOffset;\nuniform int uShapeMode;\nuniform vec2 uShape;\nuniform vec2 uStart;\nvarying vec2 outTexCoord;\nfloat linear()\n{\n float len = length(uShape);\n return dot(uShape, outTexCoord - uStart) / len / len;\n}\nfloat bilinear()\n{\n return abs(linear());\n}\nfloat radial()\n{\n return distance(uStart, outTexCoord) / length(uShape);\n}\nfloat conicSymmetric()\n{\n return dot(normalize(uShape), normalize(outTexCoord - uStart)) * 0.5 + 0.5;\n}\nfloat conicAsymmetric()\n{\n vec2 fromStart = outTexCoord - uStart;\n float angleFromStart = atan(fromStart.y, fromStart.x);\n float shapeAngle = atan(uShape.y, uShape.x);\n float angle = (angleFromStart - shapeAngle) / PI / 2.0;\n if (angle < 0.0) angle += 1.0;\n return angle;\n}\nfloat repeat(float value)\n{\n if (uRepeatMode == 1)\n {\n if (value < 0.0 || value > 1.0)\n {\n discard;\n }\n return value;\n }\n else if (uRepeatMode == 2)\n {\n return mod(value, 1.0);\n }\n else if (uRepeatMode == 3)\n {\n return 1.0 - abs(1.0 - mod(value, 2.0));\n }\n return clamp(value, 0.0, 1.0);\n}\nvoid main()\n{\n float progress = 0.0;\n if (uShapeMode == 0)\n {\n progress = linear();\n }\n else if (uShapeMode == 1)\n {\n progress = bilinear();\n }\n else if (uShapeMode == 2)\n {\n progress = radial();\n }\n else if (uShapeMode == 3)\n {\n progress = conicSymmetric();\n }\n else if (uShapeMode == 4)\n {\n progress = conicAsymmetric();\n }\n progress -= uOffset;\n progress = repeat(progress);\n vec4 bandCol = getRampAt(progress);\n bandCol.rgb *= bandCol.a;\n gl_FragColor = bandCol;\n}"},98840(t){t.exports="#pragma phaserTemplate(shaderName)\n#pragma phaserTemplate(extensions)\n#pragma phaserTemplate(features)\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\n#pragma phaserTemplate(fragmentDefine)\nuniform vec2 uResolution;\nvarying vec2 outTexCoord;\nvarying float outTexDatum;\nvarying float outTintEffect;\nvarying vec4 outTint;\n#pragma phaserTemplate(outVariables)\n#pragma phaserTemplate(fragmentHeader)\nvoid main ()\n{\n #pragma phaserTemplate(fragmentProcess)\n gl_FragColor = fragColor;\n}"},44667(t){t.exports="#pragma phaserTemplate(shaderName)\n#pragma phaserTemplate(extensions)\n#pragma phaserTemplate(features)\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\n#pragma phaserTemplate(vertexDefine)\nuniform mat4 uProjectionMatrix;\nuniform vec2 uResolution;\nattribute vec2 inPosition;\nattribute vec2 inTexCoord;\nattribute float inTexDatum;\nattribute float inTintEffect;\nattribute vec4 inTint;\nvarying vec2 outTexCoord;\nvarying float outTexDatum;\nvarying float outTintEffect;\nvarying vec4 outTint;\n#pragma phaserTemplate(outVariables)\n#pragma phaserTemplate(vertexHeader)\nvoid main ()\n{\n gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);\n outTexCoord = inTexCoord;\n outTexDatum = inTexDatum;\n outTint = inTint;
1\n outTintEffect = inTintEffect;\n #pragma phaserTemplate(vertexProcess)\n}"},16421(t){t.exports="#version 100\n#pragma phaserTemplate(shaderName)\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nuniform vec2 uOffset;\nuniform vec4 uColorStart;\nuniform vec4 uColorEnd;\nuniform float uPower;\nuniform int uMode;\nvarying vec2 outTexCoord;\nfloat trig(vec2 p)\n{\n return fract(43757.5453*sin(dot(p, vec2(12.9898,78.233))));\n}\nvoid main ()\n{\n float value = pow(trig(outTexCoord + uOffset), uPower);\n if (uMode == 0)\n {\n vec4 color = mix(uColorStart, uColorEnd, value);\n color.rgb *= color.a;\n gl_FragColor = color;\n }\n else if (uMode == 1)\n {\n float valueR = pow(trig(outTexCoord + uOffset + 32.1), uPower);\n float valueG = pow(trig(outTexCoord + uOffset + 11.1), uPower);\n float valueB = pow(trig(outTexCoord + uOffset + 23.4), uPower);\n vec4 color = vec4(valueR, valueG, valueB, 1.);\n color *= mix(uColorStart, uColorEnd, value);\n color.rgb *= color.a;\n gl_FragColor = color;\n }\n else if (uMode == 2)\n {\n float valueAngle = pow(trig(outTexCoord + uOffset), uPower) * 3.141592;\n float x = value * cos(valueAngle);\n float y = value * sin(valueAngle);\n vec4 color = vec4(\n x,\n y,\n sqrt(1. - x * x - y * y),\n 1.0\n );\n gl_FragColor = color * 0.5 + 0.5;\n }\n}"},83587(t){t.exports="#version 100\n#pragma phaserTemplate(shaderName)\n#pragma phaserTemplate(fragmentIterations)\n#pragma phaserTemplate(fragmentNormalMap)\n#ifndef ITERATION_COUNT\n#define ITERATION_COUNT 1.0\n#endif\n#ifndef WARP_ITERATION_COUNT\n#define WARP_ITERATION_COUNT 1.0\n#endif\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nuniform vec2 uCells;\nuniform vec2 uPeriod;\nuniform vec2 uOffset;\nuniform float uFlow;\nuniform float uDetailPower;\nuniform float uFlowPower;\nuniform float uContributionPower;\nuniform float uWarpDetailPower;\nuniform float uWarpFlowPower;\nuniform float uWarpContributionPower;\nuniform float uWarpAmount;\nuniform vec4 uColorStart;\nuniform vec4 uColorEnd;\nuniform float uNormalScale;\nuniform float uValueFactor;\nuniform float uValueAdd;\nuniform float uValuePower;\nuniform vec2 uSeed;\nvarying vec2 outTexCoord;\nfloat psrdnoise(vec2 x, vec2 period, float alpha)\n{\n vec2 uv = vec2(x.x+x.y*0.5, x.y);\n vec2 i0 = floor(uv), f0 = fract(uv);\n float cmp = step(f0.y, f0.x);\n vec2 o1 = vec2(cmp, 1.0-cmp);\n vec2 i1 = i0 + o1, i2 = i0 + 1.0;\n vec2 v0 = vec2(i0.x - i0.y*0.5, i0.y);\n vec2 v1 = vec2(v0.x + o1.x - o1.y*0.5, v0.y + o1.y);\n vec2 v2 = vec2(v0.x + 0.5, v0.y + 1.0);\n vec2 x0 = x - v0, x1 = x - v1, x2 = x - v2;\n vec3 iu, iv, xw, yw;\n if(any(greaterThan(period, vec2(0.0)))) {\n xw = vec3(v0.x, v1.x, v2.x); yw = vec3(v0.y, v1.y, v2.y);\n if(period.x > 0.0)\n xw = mod(vec3(v0.x, v1.x, v2.x), period.x);\n if(period.y > 0.0)\n yw = mod(vec3(v0.y, v1.y, v2.y), period.y);\n iu = floor(xw + 0.5*yw + 0.5); iv = floor(yw + 0.5);\n } else {\n iu = vec3(i0.x, i1.x, i2.x); iv = vec3(i0.y, i1.y, i2.y);\n }\n iu += uSeed.xxx; iv += uSeed.yyy;\n vec3 hash = mod(iu, 289.0);\n hash = mod((hash*51.0 + 2.0)*hash + iv, 289.0);\n hash = mod((hash*34.0 + 10.0)*hash, 289.0);\n vec3 psi = hash*0.07482 + alpha;\n vec3 gx = cos(psi); vec3 gy = sin(psi);\n vec2 g0 = vec2(gx.x, gy.x);
1\n vec2 g1 = vec2(gx.y, gy.y);\n vec2 g2 = vec2(gx.z, gy.z);\n vec3 w = 0.8 - vec3(dot(x0, x0), dot(x1, x1), dot(x2, x2));\n w = max(w, 0.0); vec3 w2 = w*w; vec3 w4 = w2*w2;\n vec3 gdotx = vec3(dot(g0, x0), dot(g1, x1), dot(g2, x2));\n float n = dot(w4, gdotx);\n return 10.9*n;\n}\nfloat iterate (vec2 coord, float detailPower, float flowPower, float contributionPower)\n{\n float value = 0.;\n float itValue = 0.;\n for (float iteration = 0.; iteration < ITERATION_COUNT; iteration++)\n {\n float detailScale = pow(detailPower, iteration);\n float flowScale = pow(flowPower, iteration);\n itValue = psrdnoise((coord + iteration) * detailScale, uPeriod * detailScale, uFlow * flowScale + iteration);\n value += itValue / pow(contributionPower, iteration);\n }\n return value;\n}\nfloat iterateWarp (vec2 coord, float detailPower, float flowPower, float contributionPower)\n{\n float value = 0.;\n float itValue = 0.;\n for (float iteration = 0.; iteration < WARP_ITERATION_COUNT; iteration++)\n {\n float detailScale = pow(detailPower, iteration);\n float flowScale = pow(flowPower, iteration);
1\n itValue = psrdnoise((coord + iteration) * detailScale, uPeriod * detailScale, uFlow * flowScale + iteration);\n value += itValue / pow(contributionPower, iteration);\n }\n return value;\n}\nvec2 warp (vec2 coord)\n{\n vec2 o2 = vec2(11.3, 23.7);\n float coord1 = iterateWarp(coord, uWarpDetailPower, uWarpFlowPower, uWarpContributionPower);\n float coord2 = iterateWarp(coord + o2, uWarpDetailPower, uWarpFlowPower, uWarpContributionPower);\n return vec2(coord1, coord2);\n}\nvoid main ()\n{\n vec2 coord = outTexCoord * uCells + uOffset;\n if (uWarpAmount > 0.)\n {\n coord += warp(coord) * uWarpAmount;\n }\n float value = iterate(coord, uDetailPower, uFlowPower, uContributionPower) * uValueFactor + uValueAdd;\n value = pow(clamp(value, 0., 1.), uValuePower);\n #ifndef NORMAL_MAP\n vec4 color = mix(uColorStart, uColorEnd, value);\n color.rgb *= color.a;\n gl_FragColor = color;\n #else\n float dx = dFdx(value) * uNormalScale;\n float dy = dFdy(value) * uNormalScale;\n vec3 normal = vec3(dx, dy, 1.0 - sqrt(dx * dx + dy * dy)) * 0.5 + 0.5;\n gl_FragColor = vec4(normal, 1.0);\n #endif\n}"},13460(t){t.exports="#version 100\n#pragma phaserTemplate(shaderName)\n#pragma phaserTemplate(fragmentIterations)\n#pragma phaserTemplate(fragmentNormalMap)\n#ifndef ITERATION_COUNT\n#define ITERATION_COUNT 1.0\n#endif\n#ifndef WARP_ITERATION_COUNT\n#define WARP_ITERATION_COUNT 1.0\n#endif\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nuniform vec3 uCells;\nuniform vec3 uPeriod;\nuniform vec3 uOffset;\nuniform float uFlow;\nuniform float uDetailPower;\nuniform float uFlowPower;\nuniform float uContributionPower;\nuniform float uWarpDetailPower;\nuniform float uWarpFlowPower;\nuniform float uWarpContributionPower;\nuniform float uWarpAmount;\nuniform vec4 uColorStart;\nuniform vec4 uColorEnd;\nuniform float uNormalScale;\nuniform float uValueFactor;\nuniform float uValueAdd;\nuniform float uValuePower;\nuniform vec3 uSeed;\nvarying vec2 outTexCoord;\nvec4 permute(vec4 i) {\n vec4 im = mod(i, 289.0);\n return mod(((im * 34.0) + 10.0) * im, 289.0);\n}\nfloat psrdnoise(vec3 x, vec3 period, float alpha) {\n const mat3 M = mat3(0.0, 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, 1.0, 0.0);\n const mat3 Mi = mat3(-0.5, 0.5, 0.5, 0.5, -0.5, 0.5, 0.5, 0.5, -0.5);\n vec3 uvw = M * x;\n vec3 i0 = floor(uvw);\n vec3 f0 = fract(uvw);\n vec3 g_ = step(f0.xyx, f0.yzz);\n vec3 l_ = 1.0 - g_;\n vec3 g = vec3(l_.z, g_.xy);\n vec3 l = vec3(l_.xy, g_.z);\n vec3 o1 = min(g, l);\n vec3 o2 = max(g, l);\n vec3 i1 = i0 + o1, i2 = i0 + o2, i3 = i0 + 1.0;\n vec3 v0 = Mi * i0, v1 = Mi * i1, v2 = Mi * i2, v3 = Mi * i3;\n vec3 x0 = x - v0, x1 = x - v1, x2 = x - v2, x3 = x - v3;\n if(any(greaterThan(period, vec3(0.0)))) {\n vec4 vx = vec4(v0.x, v1.x, v2.x, v3.x);\n vec4 vy = vec4(v0.y, v1.y, v2.y, v3.y);\n vec4 vz = vec4(v0.z, v1.z, v2.z, v3.z);\n if(period.x > 0.0)\n vx = mod(vx, period.x);\n if(period.y > 0.0)\n vy = mod(vy, period.y);\n if(period.z > 0.0)\n vz = mod(vz, period.z);\n i0 = floor(M * vec3(vx.x, vy.x, vz.x) + 0.5);\n i1 = floor(M * vec3(vx.y, vy.y, vz.y) + 0.5);\n i2 = floor(M * vec3(vx.z, vy.z, vz.z) + 0.5);\n i3 = floor(M * vec3(vx.w, vy.w, vz.w) + 0.5);\n }\n i0 += uSeed; i1 += uSeed; i2 += uSeed; i3 += uSeed;\n vec4 hash = permute(permute(permute(vec4(i0.z, i1.z, i2.z, i3.z)) + vec4(i0.y, i1.y, i2.y, i3.y)) + vec4(i0.x, i1.x, i2.x, i3.x));\n vec4 theta = hash * 3.883222077;\n vec4 sz = 0.996539792 - 0.006920415 * hash;\n vec4 psi = hash * 0.108705628;\n vec4 Ct = cos(theta);\n vec4 St = sin(theta);\n vec4 sz_prime = sqrt(1.0 - sz * sz);\n vec4 gx, gy, gz;\n if(alpha != 0.0) {\n vec4 px = Ct * sz_prime;\n vec4 py = St * sz_prime;\n vec4 pz = sz;\n vec4 Sp = sin(psi);\n vec4 Cp = cos(psi);\n vec4 Ctp = St * Sp - Ct * Cp;\n vec4 qx = mix(Ctp * St, Sp, sz);\n vec4 qy = mix(-Ctp * Ct, Cp, sz);\n vec4 qz = -(py * Cp + px * Sp);\n vec4 Sa = vec4(sin(alpha));\n vec4 Ca = vec4(cos(alpha));\n gx = Ca * px + Sa * qx;\n gy = Ca * py + Sa * qy;\n gz = Ca * pz + Sa * qz;\n } else {\n gx = Ct * sz_prime;\n gy = St * sz_prime;\n gz = sz;\n }
1\n vec3 g0 = vec3(gx.x, gy.x, gz.x), g1 = vec3(gx.y, gy.y, gz.y);\n vec3 g2 = vec3(gx.z, gy.z, gz.z), g3 = vec3(gx.w, gy.w, gz.w);\n vec4 w = 0.5 - vec4(dot(x0, x0), dot(x1, x1), dot(x2, x2), dot(x3, x3));\n w = max(w, 0.0);\n vec4 w2 = w * w;\n vec4 w3 = w2 * w;\n vec4 gdotx = vec4(dot(g0, x0), dot(g1, x1), dot(g2, x2), dot(g3, x3));\n float n = dot(w3, gdotx);\n return 39.5 * n;\n}\nfloat iterate (vec3 coord, float detailPower, float flowPower, float contributionPower)\n{\n float value = 0.;\n float itValue = 0.;\n for (float iteration = 0.; iteration < ITERATION_COUNT; iteration++)\n {\n float detailScale = pow(detailPower, iteration);\n float flowScale = pow(flowPower, iteration);\n itValue = psrdnoise((coord + iteration) * detailScale, uPeriod * detailScale, uFlow * flowScale + iteration);\n value += itValue / pow(contributionPower, iteration);\n }\n return value;\n}\nfloat iterateWarp (vec3 coord, float detailPower, float flowPower, float contributionPower)\n{\n float value = 0.;\n float itValue = 0.;\n for (float iteration = 0.; iteration < WARP_ITERATION_COUNT; iteration++)\n {\n float detailScale = pow(detailPower, iteration);\n float flowScale = pow(flowPower, iteration);
1\n itValue = psrdnoise((coord + iteration) * detailScale, uPeriod * detailScale, uFlow * flowScale + iteration);\n value += itValue / pow(contributionPower, iteration);\n }\n return value;\n}\nvec3 warp (vec3 coord)\n{\n vec3 o2 = vec3(11.3, 23.7, 13.1);\n vec3 o3 = vec3(29.9, 2.3, 31.7);\n float coord1 = iterateWarp(coord, uWarpDetailPower, uWarpFlowPower, uWarpContributionPower);\n float coord2 = iterateWarp(coord + o2, uWarpDetailPower, uWarpFlowPower, uWarpContributionPower);\n float coord3 = iterateWarp(coord + o3, uWarpDetailPower, uWarpFlowPower, uWarpContributionPower);\n return vec3(coord1, coord2, coord3);\n}\nvoid main ()\n{\n vec3 coord = (vec3(outTexCoord, 0.0) * uCells) + uOffset;\n if (uWarpAmount > 0.)\n {\n coord += warp(coord) * uWarpAmount;\n }\n float value = iterate(coord, uDetailPower, uFlowPower, uContributionPower) * uValueFactor + uValueAdd;\n value = pow(clamp(value, 0., 1.), uValuePower);\n #ifndef NORMAL_MAP\n vec4 color = mix(uColorStart, uColorEnd, value);\n color.rgb *= color.a;\n gl_FragColor = color;\n #else\n float dx = dFdx(value) * uNormalScale;\n float dy = dFdy(value) * uNormalScale;\n vec3 normal = vec3(dx, dy, 1.0 - sqrt(dx * dx + dy * dy)) * 0.5 + 0.5;\n gl_FragColor = vec4(normal, 1.0);\n #endif\n}"},17205(t){t.exports="#version 100\n#pragma phaserTemplate(shaderName)\n#pragma phaserTemplate(fragmentMode)\n#pragma phaserTemplate(fragmentIterations)\n#pragma phaserTemplate(fragmentNormalMap)\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nuniform vec2 uSeedX;\nuniform vec2 uSeedY;\nuniform vec2 uCells;\nuniform vec2 uCellOffset;\nuniform vec2 uVariation;\nuniform vec2 uWrap;\nuniform float uSmoothing;\nuniform float uNormalScale;\nuniform vec4 uColorStart;\nuniform vec4 uColorEnd;\nvarying vec2 outTexCoord;\nfloat trig(vec2 p)\n{\n return fract(43757.5453*sin(dot(p, vec2(12.9898,78.233))));\n}\nvec2 bigCoord (vec2 coord, float scale)\n{\n return (coord + uCellOffset) * scale * uCells;\n}\nvec2 hash2D (vec2 coord)\n{\n return vec2(\n trig(coord + uSeedX),\n trig(coord + uSeedY)\n ) * uVariation;\n}\nfloat worley2D (vec2 uv, float scale)\n{\n vec2 coord = bigCoord(uv, scale);\n vec2 point = floor(coord);\n vec2 frac = fract(coord);\n float dist = 12.0;\n for (float j = -1.0; j <= 1.0; j++)\n for (float i = -1.0; i <= 1.0; i++)\n {\n vec2 cellNeighbor = vec2(i, j);\n vec2 jitter = hash2D(mod(point + cellNeighbor, uWrap * scale));\n vec2 diff = cellNeighbor - frac + jitter;\n float d = dot(diff, diff); // Squared length of diff.\n if (d < dist)\n {\n dist = d;\n }\n }\n return sqrt(dist);\n}\nfloat worley2DIndex (vec2 uv, float scale)\n{\n vec2 coord = bigCoord(uv, scale);\n vec2 point = floor(coord);\n vec2 frac = fract(coord);\n float dist = 12.0;\n float random = 0.0;\n for (float j = -1.0; j <= 1.0; j++)\n for (float i = -1.0; i <= 1.0; i++)\n {\n vec2 cellNeighbor = vec2(i, j);\n vec2 jitter = hash2D(mod(point + cellNeighbor, uWrap * scale));\n vec2 diff = cellNeighbor - frac + jitter;\n float d = dot(diff, diff); // Squared length of diff.\n if (d < dist)\n {\n dist = d;\n random = jitter.x;\n }\n }\n return random;\n}\nfloat worley2DSmooth (vec2 uv, float scale)\n{\n vec2 coord = bigCoord(uv, scale);\n vec2 point = floor(coord);\n vec2 frac = fract(coord);\n float value = 0.0;\n for (float j = -1.0; j <= 1.0; j++)\n for (float i = -1.0; i <= 1.0; i++)\n {\n vec2 cellNeighbor = vec2(i, j);\n vec2 jitter = hash2D(mod(point + cellNeighbor, uWrap * scale));\n vec2 diff = cellNeighbor - frac + jitter;\n float d = length(diff);\n value += exp2(-32.0 / uSmoothing * d); // Accumulate fast-decaying exponential of length.\n }\n return -(1.0 / 32.0 * uSmoothing) * log2(value);\n}\nfloat iterateWorley2D (vec2 uv)\n{\n float value = 0.0;\n float itValue = 0.0;\n for (float iteration = 0.0; iteration < ITERATION_COUNT; iteration++)\n {\n float scale = exp2(iteration);
1\n #ifdef MODE_DISTANCE\n itValue = worley2D(uv + iteration, scale);\n #endif\n #ifdef MODE_INDEX\n itValue = worley2DIndex(uv + iteration, scale);\n #endif\n #ifdef MODE_DISTANCE_SMOOTH\n itValue = worley2DSmooth(uv + iteration, scale);\n #endif\n value += (itValue - 0.5) / scale;\n }\n return value + 0.5;\n}\nvoid main ()\n{\n float value = iterateWorley2D(outTexCoord);\n #ifndef NORMAL_MAP\n vec4 color = mix(uColorStart, uColorEnd, value);\n color.rgb *= color.a;\n gl_FragColor = color;\n #else\n float dx = dFdx(value) * uNormalScale;\n float dy = dFdy(value) * uNormalScale;\n vec3 normal = vec3(dx, dy, 1.0 - sqrt(dx * dx + dy * dy)) * 0.5 + 0.5;\n gl_FragColor = vec4(normal, 1.0);\n #endif\n}"},79814(t){t.exports="#version 100\n#pragma phaserTemplate(shaderName)\n#pragma phaserTemplate(fragmentMode)\n#pragma phaserTemplate(fragmentIterations)\n#pragma phaserTemplate(fragmentNormalMap)\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nuniform vec3 uSeedX;\nuniform vec3 uSeedY;\nuniform vec3 uSeedZ;\nuniform vec3 uCells;\nuniform vec3 uCellOffset;\nuniform vec3 uVariation;\nuniform vec3 uWrap;\nuniform float uSmoothing;\nuniform float uNormalScale;\nuniform vec4 uColorStart;\nuniform vec4 uColorEnd;\nvarying vec2 outTexCoord;\nfloat trig(vec3 p)\n{\n return fract(43757.5453*sin(dot(p, vec3(12.9898,78.233, 9441.8953))));\n}\nvec3 bigCoord (vec3 coord, float scale)\n{\n return (coord + uCellOffset) * scale * uCells;\n}\nvec3 hash3D (vec3 coord)\n{\n return vec3(\n trig(coord + uSeedX),\n trig(coord + uSeedY),\n trig(coord + uSeedZ)\n ) * uVariation;\n}\nfloat worley3D (vec3 uv, float scale)\n{\n vec3 coord = bigCoord(uv, scale);\n vec3 point = floor(coord);\n vec3 frac = fract(coord);\n float dist = 12.0;\n for (float k = -1.0; k <= 1.0; k++)\n for (float j = -1.0; j <= 1.0; j++)\n for (float i = -1.0; i <= 1.0; i++)\n {\n vec3 cellNeighbor = vec3(i, j, k);\n vec3 jitter = hash3D(mod(point + cellNeighbor, uWrap * scale));\n vec3 diff = cellNeighbor - frac + jitter;\n float d = dot(diff, diff); // Squared length of diff.\n if (d < dist)\n {\n dist = d;\n }\n }\n return sqrt(dist);\n}\nfloat worley3DIndex (vec3 uv, float scale)\n{\n vec3 coord = bigCoord(uv, scale);\n vec3 point = floor(coord);\n vec3 frac = fract(coord);\n float dist = 12.0;\n float random = 0.0;\n for (float k = -1.0; k <= 1.0; k++)\n for (float j = -1.0; j <= 1.0; j++)\n for (float i = -1.0; i <= 1.0; i++)\n {\n vec3 cellNeighbor = vec3(i, j, k);\n vec3 jitter = hash3D(mod(point + cellNeighbor, uWrap * scale));\n vec3 diff = cellNeighbor - frac + jitter;\n float d = dot(diff, diff); // Squared length of diff.\n if (d < dist)\n {\n dist = d;\n random = jitter.x;\n }\n }\n return random;\n}\nfloat worley3DSmooth (vec3 uv, float scale)\n{\n vec3 coord = bigCoord(uv, scale);\n vec3 point = floor(coord);\n vec3 frac = fract(coord);\n float value = 0.0;\n for (float k = -1.0; k <= 1.0; k++)\n for (float j = -1.0; j <= 1.0; j++)\n for (float i = -1.0; i <= 1.0; i++)\n {\n vec3 cellNeighbor = vec3(i, j, k);\n vec3 jitter = hash3D(mod(point + cellNeighbor, uWrap * scale));\n vec3 diff = cellNeighbor - frac + jitter;\n float d = length(diff);\n value += exp2(-32.0 / uSmoothing * d); // Accumulate fast-decaying exponential of length.\n }\n return -(1.0 / 32.0 * uSmoothing) * log2(value);\n}\nfloat iterateWorley3D (vec3 uv)\n{\n float value = 0.0;\n float itValue = 0.0;\n for (float iteration = 0.0; iteration < ITERATION_COUNT; iteration++)\n {\n float scale = exp2(iteration);\n #ifdef MODE_DISTANCE\n itValue = worley3D(uv + iteration, scale);
1\n #endif\n #ifdef MODE_INDEX\n itValue = worley3DIndex(uv + iteration, scale);\n #endif\n #ifdef MODE_DISTANCE_SMOOTH\n itValue = worley3DSmooth(uv + iteration, scale);\n #endif\n value += (itValue - 0.5) / scale;\n }\n return value + 0.5;\n}\nvoid main ()\n{\n vec3 uv = vec3(outTexCoord, 0.0);\n float value = iterateWorley3D(uv);\n #ifndef NORMAL_MAP\n vec4 color = mix(uColorStart, uColorEnd, value);\n color.rgb *= color.a;\n gl_FragColor = color;\n #else\n float dx = dFdx(value) * uNormalScale;\n float dy = dFdy(value) * uNormalScale;\n vec3 normal = vec3(dx, dy, 1.0 - sqrt(dx * dx + dy * dy)) * 0.5 + 0.5;\n gl_FragColor = vec4(normal, 1.0);\n #endif\n}"},99595(t){t.exports="#version 100\n#pragma phaserTemplate(shaderName)\n#pragma phaserTemplate(fragmentMode)\n#pragma phaserTemplate(fragmentIterations)\n#pragma phaserTemplate(fragmentNormalMap)\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nuniform vec4 uSeedX;\nuniform vec4 uSeedY;\nuniform vec4 uSeedZ;\nuniform vec4 uSeedW;\nuniform vec4 uCells;\nuniform vec4 uCellOffset;\nuniform vec4 uVariation;\nuniform vec4 uWrap;\nuniform float uSmoothing;\nuniform float uNormalScale;\nuniform vec4 uColorStart;\nuniform vec4 uColorEnd;\nvarying vec2 outTexCoord;\nfloat trig(vec4 p)\n{\n return fract(43757.5453*sin(dot(p, vec4(12.9898,78.233,9441.8953,61.99))));\n}\nvec4 bigCoord (vec4 coord, float scale)\n{\n return (coord + uCellOffset) * scale * uCells;\n}\nvec4 hash4D (vec4 coord)\n{\n return vec4(\n trig(coord + uSeedX),\n trig(coord + uSeedY),\n trig(coord + uSeedZ),\n trig(coord + uSeedW)\n ) * uVariation;\n}\nfloat worley4D (vec4 uv, float scale)\n{\n vec4 coord = bigCoord(uv, scale);\n vec4 point = floor(coord);\n vec4 frac = fract(coord);\n float dist = 16.0;\n for (float l = -1.0; l <= 1.0; l++)\n for (float k = -1.0; k <= 1.0; k++)\n for (float j = -1.0; j <= 1.0; j++)\n for (float i = -1.0; i <= 1.0; i++)\n {\n vec4 cellNeighbor = vec4(i, j, k, l);\n vec4 jitter = hash4D(mod(point + cellNeighbor, uWrap * scale));\n vec4 diff = cellNeighbor - frac + jitter;\n float d = dot(diff, diff); // Squared length of diff.\n if (d < dist)\n {\n dist = d;\n }\n }\n return sqrt(dist);\n}\nfloat worley4DIndex (vec4 uv, float scale)\n{\n vec4 coord = bigCoord(uv, scale);\n vec4 point = floor(coord);\n vec4 frac = fract(coord);\n float dist = 16.0;\n float random = 0.0;\n for (float l = -1.0; l <= 1.0; l++)\n for (float k = -1.0; k <= 1.0; k++)\n for (float j = -1.0; j <= 1.0; j++)\n for (float i = -1.0; i <= 1.0; i++)\n {\n vec4 cellNeighbor = vec4(i, j, k, l);\n vec4 jitter = hash4D(mod(point + cellNeighbor, uWrap * scale));\n vec4 diff = cellNeighbor - frac + jitter;\n float d = dot(diff, diff); // Squared length of diff.\n if (d < dist)\n {\n dist = d;\n random = jitter.x;\n }\n }\n return random;\n}\nfloat worley4DSmooth (vec4 uv, float scale)\n{\n vec4 coord = bigCoord(uv, scale);\n vec4 point = floor(coord);\n vec4 frac = fract(coord);\n float value = 0.0;\n for (float l = -1.0; l <= 1.0; l++)\n for (float k = -1.0; k <= 1.0; k++)\n for (float j = -1.0; j <= 1.0; j++)\n for (float i = -1.0; i <= 1.0; i++)\n {\n vec4 cellNeighbor = vec4(i, j, k, l);\n vec4 jitter = hash4D(mod(point + cellNeighbor, uWrap * scale));\n vec4 diff = cellNeighbor - frac + jitter;\n float d = length(diff);\n value += exp2(-32.0 / uSmoothing * d); // Accumulate fast-decaying exponential of length.\n }\n return -(1.0 / 32.0 * uSmoothing) * log2(value);\n}\nfloat iterateWorley4D (vec4 uv)\n{\n float value = 0.0;\n float itValue = 0.0;\n for (float iteration = 0.0; iteration < ITERATION_COUNT; iteration++)\n {\n float scale = exp2(iteration);
1\n #ifdef MODE_DISTANCE\n itValue = worley4D(uv + iteration, scale);\n #endif\n #ifdef MODE_INDEX\n itValue = worley4DIndex(uv + iteration, scale);\n #endif\n #ifdef MODE_DISTANCE_SMOOTH\n itValue = worley4DSmooth(uv + iteration, scale);\n #endif\n value += (itValue - 0.5) / scale;\n }\n return value + 0.5;\n}\nvoid main ()\n{\n vec4 uv = vec4(outTexCoord, 0.0, 0.0);\n float value = iterateWorley4D(uv);\n #ifndef NORMAL_MAP\n vec4 color = mix(uColorStart, uColorEnd, value);\n color.rgb *= color.a;\n gl_FragColor = color;\n #else\n float dx = dFdx(value) * uNormalScale;\n float dy = dFdy(value) * uNormalScale;\n vec3 normal = vec3(dx, dy, 1.0 - sqrt(dx * dx + dy * dy)) * 0.5 + 0.5;\n gl_FragColor = vec4(normal, 1.0);\n #endif\n}"},62807(t){t.exports="float inverseRotation = -rotation - uCamera.z;\nfloat irSine = sin(inverseRotation);\nfloat irCosine = cos(inverseRotation);\noutInverseRotationMatrix = mat3(\n irCosine, irSine, 0.0,\n -irSine, irCosine, 0.0,\n 0.0, 0.0, 1.0\n);"},4127(t){t.exports="#pragma phaserTemplate(shaderName)\n#pragma phaserTemplate(extensions)\n#pragma phaserTemplate(features)\nprecision mediump float;\n#pragma phaserTemplate(fragmentDefine)\nuniform vec2 uResolution;\nuniform float uCameraZoom;\nvarying vec4 lightPosition;\nvarying vec4 lightColor;\nvarying float lightRadius;\nvarying float lightAttenuation;\n#pragma phaserTemplate(outVariables)\n#pragma phaserTemplate(fragmentHeader)\nvoid main ()\n{\n vec2 center = (lightPosition.xy + 1.0) * (uResolution.xy * 0.5);\n float distToSurf = length(center - gl_FragCoord.xy);\n float radius = 1.0 - distToSurf / (lightRadius * uCameraZoom);\n float intensity = smoothstep(0.0, 1.0, radius * lightAttenuation);\n vec4 color = vec4(intensity, intensity, intensity, 0.0) * lightColor;\n #pragma phaserTemplate(fragmentProcess)\n gl_FragColor = vec4(color.rgb * lightColor.a, color.a);\n}"},89924(t){t.exports="#pragma phaserTemplate(shaderName)\n#pragma phaserTemplate(extensions)\n#pragma phaserTemplate(features)\nprecision mediump float;\n#pragma phaserTemplate(vertexDefine)\nuniform mat4 uProjectionMatrix;\nattribute vec2 inPosition;\nattribute vec2 inLightPosition;\nattribute vec4 inLightColor;\nattribute float inLightRadius;\nattribute float inLightAttenuation;\nvarying vec4 lightPosition;\nvarying vec4 lightColor;\nvarying float lightRadius;\nvarying float lightAttenuation;\n#pragma phaserTemplate(outVariables)\n#pragma phaserTemplate(vertexHeader)\nvoid main ()\n{\n lightColor = inLightColor;\n lightRadius = inLightRadius;\n lightAttenuation = inLightAttenuation;\n lightPosition = uProjectionMatrix * vec4(inLightPosition, 1.0, 1.0);\n gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);\n #pragma phaserTemplate(vertexProcess)\n}"},68589(t){t.exports="#extension GL_OES_standard_derivatives : enable\n#define BAND_TREE_DEPTH 0.0\nuniform sampler2D uRampTexture;\nuniform vec2 uRampResolution;\nuniform float uRampBandStart;\nuniform bool uDither;\nfloat decodeNumberSample(vec4 sample)\n{\n return (\n sample.r * 255.0 +\n sample.g * 255.0 * 256.0 +\n sample.b * 255.0 * 256.0 * 256.0 +\n sample.a * 255.0 * 256.0 * 256.0 * 256.0\n ) / 256.0 / 256.0;\n}\nstruct Band\n{\n vec4 colorStart;\n vec4 colorEnd;\n float start;\n float end;\n int colorSpace;\n int interpolation;\n float middle;\n};\nBand getBand(float progress)\n{\n vec2 rampStep = 1.0 / uRampResolution;\n vec2 c = rampStep / 2.0;\n float start = decodeNumberSample(texture2D(uRampTexture, c));\n float end = decodeNumberSample(texture2D(uRampTexture, vec2(1.0, 0.0) * rampStep + c));\n float TREE_OFFSET = 2.0; // Beginning of tree block.\n float index = 0.0;\n float x, y;\n for (float i = 0.0; i < BAND_TREE_DEPTH; i++)\n {\n x = mod(index + TREE_OFFSET, uRampResolution.x);\n y = floor(x / uRampResolution.x);\n float pivot = decodeNumberSample(texture2D(uRampTexture, vec2(x, y) * rampStep + c));\n if (progress > pivot)\n {\n start = pivot;\n index = index * 2.0 + 2.0;\n }\n else\n {\n end = pivot;\n index = index * 2.0 + 1.0;\n }\n }\n float bandNumber = index - uRampBandStart + TREE_OFFSET;\n float bandIndex = bandNumber * 3.0 + uRampBandStart;\n x = mod(bandIndex, uRampResolution.x);\n y = floor(bandIndex / uRampResolution.x);\n vec4 colorStart = texture2D(uRampTexture, vec2(x, y) * rampStep + c);\n x = mod(bandIndex + 1.0, uRampResolution.x);\n y = floor(bandIndex / uRampResolution.x);\n vec4 colorEnd = texture2D(uRampTexture, vec2(x, y) * rampStep + c);\n x = mod(bandIndex + 2.0, uRampResolution.x);\n y = floor(bandIndex / uRampResolution.x);\n float bandData = decodeNumberSample(texture2D(uRampTexture, vec2(x, y) * rampStep + c));\n int colorSpace = int(floor(bandData / 255.0));\n int interpolation = int(floor(bandData)) - colorSpace * 255;\n return Band(colorStart, colorEnd, start, end, colorSpace, interpolation, fract(bandData) * 2.0);\n}\nfloat interpolate(float progress, int mode)\n{\n if (mode == 1)\n {\n if ((progress *= 2.0) < 1.0)\n {\n return 0.5 * sqrt(1.0 - (--progress * progress));\n }\n progress = 1.0 - progress;\n return 1.0 - 0.5 * sqrt(1.0 - progress * progress);\n }\n if (mode == 2)\n {\n return sin((progress - 0.5) * 3.14159265358979323846) * 0.5 + 0.5;\n }\n if (mode == 3)\n {\n return sqrt(1.0 - (--progress * progress));\n }\n if (mode == 4)\n {\n return 1.0 - sqrt(1.0 - progress * progress);\n }\n return progress;\n}\nfloat ditherIGN(float value)\n{\n float dx = dFdx(value);\n float dy = dFdy(value);\n float rateOfChange = sqrt(dx * dx + dy * dy);\n value += (fract(52.9829189 * fract(0.06711056 * gl_FragCoord.x + 0.00583715 * gl_FragCoord.y)) - 0.5) * rateOfChange;\n return value;\n}\nvec4 rgbaToHsva(vec4 rgba)\n{\n float r = rgba.r;\n float g = rgba.g;\n float b = rgba.b;\n float a = rgba.a;\n float min = min(min(r, g), b);\n float max = max(max(r, g), b);\n float d = max - min;\n float h = 0.0;\n float s = (max == 0.0) ? 0.0 : d / max;\n float v = max;\n if (max != min)\n {\n if (max == r)\n {\n h = (g - b) / d + ((g < b) ? 6.0 : 0.0);\n }\n else if (max == g)\n {\n h = (b - r) / d + 2.0;\n }\n else\n {\n h = (r - g) / d + 4.0;\n }\n h /= 6.0;\n }\n return vec4(h, s, v, a);\n}\nfloat hsvaToRgbaConvert(float n, vec4 hsva)\n{\n float k = mod(n + hsva.x * 6.0, 6.0);\n float min = min(min(k, 4.0 - k), 1.0);\n return hsva.z - hsva.z * hsva.y * max(0.0, min);\n}\nvec4 hsvaToRgba(vec4 hsva)\n{\n return vec4(\n hsvaToRgbaConvert(5.0, hsva),\n hsvaToRgbaConvert(3.0, hsva),\n hsvaToRgbaConvert(1.0, hsva),\n hsva.a\n );\n}
1\nvec4 mixBandColor(float progress, Band band)\n{\n if (band.colorSpace == 0)\n {\n return mix(band.colorStart, band.colorEnd, progress);\n }\n vec4 hsvaStart = rgbaToHsva(band.colorStart);\n vec4 hsvaEnd = rgbaToHsva(band.colorEnd);\n if (band.colorSpace == 1)\n {\n float dH = hsvaStart.x - hsvaEnd.x;\n if (dH > 0.5)\n {\n hsvaStart.x -= 1.0;\n }\n else if (dH < -0.5)\n {\n hsvaStart.x += 1.0;\n }\n }\n else if (band.colorSpace == 2)\n {\n if (hsvaStart.x > hsvaEnd.x)\n {\n hsvaStart.x -= 1.0;\n }\n }\n else if (band.colorSpace == 3)\n {\n if (hsvaStart.x < hsvaEnd.x)\n {\n hsvaStart.x += 1.0;\n }\n }\n vec4 hsvaMix = mix(hsvaStart, hsvaEnd, progress);\n hsvaMix.x = mod(hsvaMix.x, 1.0);\n return hsvaToRgba(hsvaMix);\n}\nvec4 getRampAt(float progress)\n{\n Band band = getBand(progress);\n float bandProgress = (progress - band.start) / (band.end - band.start);\n float gamma = log(0.5) / log(band.middle);\n bandProgress = pow(bandProgress, gamma);\n bandProgress = interpolate(bandProgress, band.interpolation);\n if (uDither)\n {\n bandProgress = ditherIGN(bandProgress);\n }\n return mixBandColor(bandProgress, band);\n}"},72823(t){t.exports="#pragma phaserTemplate(shaderName)\n#pragma phaserTemplate(extensions)\n#pragma phaserTemplate(features)\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\n#pragma phaserTemplate(fragmentDefine)\nvarying vec2 outTexCoord;\n#pragma phaserTemplate(outVariables)\n#pragma phaserTemplate(fragmentHeader)\nvoid main ()\n{\n vec4 fragColor = vec4(outTexCoord.xyx, 1.0);\n #pragma phaserTemplate(fragmentProcess)\n gl_FragColor = fragColor;\n}"},65884(t){t.exports="#pragma phaserTemplate(shaderName)\n#pragma phaserTemplate(extensions)\n#pragma phaserTemplate(features)\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\n#pragma phaserTemplate(vertexDefine)\nuniform mat4 uProjectionMatrix;\nattribute vec2 inPosition;\nattribute vec2 inTexCoord;\nvarying vec2 outTexCoord;\n#pragma phaserTemplate(outVariables)\n#pragma phaserTemplate(vertexHeader)\nvoid main ()\n{\n gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);\n outTexCoord = inTexCoord;\n #pragma phaserTemplate(vertexProcess)\n}"},2807(t){t.exports="#pragma phaserTemplate(shaderName)\nprecision mediump float;\nattribute vec2 inPosition;\nattribute vec2 inTexCoord;\nvarying vec2 outFragCoord;\nvarying vec2 outTexCoord;\nvoid main ()\n{\n outFragCoord = inPosition.xy * 0.5 + 0.5;\n outTexCoord = inTexCoord;\n gl_Position = vec4(inPosition, 0, 1);\n}"},49119(t){t.exports="#pragma phaserTemplate(shaderName)\n#pragma phaserTemplate(extensions)\n#pragma phaserTemplate(features)\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\n#pragma phaserTemplate(fragmentDefine)\nuniform vec2 uResolution;\nvarying vec2 outTexCoord;\nvarying float outTintEffect;\nvarying vec4 outTint;\n#pragma phaserTemplate(outVariables)\n#pragma phaserTemplate(fragmentHeader)\nvoid main ()\n{\n #pragma phaserTemplate(fragmentProcess)\n gl_FragColor = fragColor;\n}"},3524(t){t.exports="#pragma phaserTemplate(shaderName)\n#pragma phaserTemplate(extensions)\n#pragma phaserTemplate(features)\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\n#define ROUND_BIAS 0.5001\n#pragma phaserTemplate(vertexDefine)\nuniform mat4 uProjectionMatrix;\nuniform mat3 uViewMatrix;\nuniform vec3 uCameraScrollAndAlpha;\nuniform int uRoundPixels;\nuniform vec2 uResolution;\nuniform float uTime;\nuniform vec2 uDiffuseResolution;\nuniform vec2 uFrameDataResolution;\nuniform sampler2D uFrameDataTexture;\nuniform float uGravity;\nattribute float inVertex;\nattribute vec4 inPositionX;\nattribute vec4 inPositionY;\nattribute vec4 inRotation;\nattribute vec4 inScaleX;\nattribute vec4 inScaleY;\nattribute vec4 inAlpha;\nattribute vec4 inFrame;\nattribute vec4 inTintBlend;\nattribute vec4 inTintTL;\nattribute vec4 inTintTR;\nattribute vec4 inTintBL;\nattribute vec4 inTintBR;\nattribute vec4 inOriginAndTintModeAndCreationTime;\nattribute vec2 inScrollFactor;
1\nvarying vec2 outTexCoord;\nvarying float outTintEffect;\nvarying vec4 outTint;\n#pragma phaserTemplate(outVariables)\n#pragma phaserTemplate(vertexHeader)\nconst float PI = 3.14159265359;\nconst float HALF_PI = PI / 2.0;\nconst float BOUNCE_OVERSHOOT = 1.70158;\nconst float BOUNCE_OVERSHOOT_PLUS = BOUNCE_OVERSHOOT + 1.0;\nconst float BOUNCE_OVERSHOOT_IN_OUT = BOUNCE_OVERSHOOT * 1.525;\nconst float BOUNCE_OVERSHOOT_IN_OUT_PLUS = BOUNCE_OVERSHOOT_IN_OUT + 1.0;\nfloat animate (vec4 anim)\n{\n float value = anim.x;\n float a = anim.y;\n float b = abs(anim.z);\n float c = abs(anim.w);\n bool yoyo = anim.z < 0.0;\n bool loop = anim.w > 0.0;\n int type = int(floor(c));\n if (type == 0|| b == 0.0)\n {\n return value;\n }\n float duration = b;\n float delay = mod(c, 1.0) * 2.0;\n float rawTime = ((uTime - inOriginAndTintModeAndCreationTime.w) / duration) - delay;\n float time = mod(rawTime, 1.0);\n if (yoyo && (mod(rawTime, 2.0) >= 1.0))\n {\n time = 1.0 - time;\n }\n float repeats = loop ? 0.0 : floor(a);\n float timeContinuous = loop ? time : rawTime;\n #ifdef FEATURE_LINEAR\n if (type == 1)\n {\n return value + a * timeContinuous;\n }\n #endif\n #ifdef FEATURE_GRAVITY\n if (type == 2)\n {\n float v = floor(a);\n float gravityFactor = (a - v) * 2.0 - 1.0;\n if (gravityFactor == 0.0)\n {\n gravityFactor = 1.0;\n }\n float seconds = timeContinuous * duration / 1000.0;\n float accel = uGravity * gravityFactor;\n return value + (v * seconds) + (0.5 * accel * seconds * seconds);\n }\n #endif\n #ifdef FEATURE_QUAD_EASEOUT\n if (type == 10)\n {\n return value + a * time * (2.0 - time)\n + repeats * a;\n }\n #endif\n #ifdef FEATURE_QUAD_EASEIN\n if (type == 11)\n {\n return value + a * time * time\n + repeats * a;\n }\n #endif\n #ifdef FEATURE_QUAD_EASEINOUT\n if (type == 12)\n {\n time *= 2.0;\n if (time < 1.0)\n {\n return value + a * time * time * 0.5\n + repeats * a;\n }\n time -= 1.0;\n return value + a * -0.5 * (time * (time - 2.0) - 1.0)\n + repeats * a;\n }\n #endif\n #ifdef FEATURE_CUBIC_EASEOUT\n if (type == 20)\n {\n time -= 1.0;\n return value + a * (time * time * time + 1.0)\n + repeats * a;\n }\n #endif\n #ifdef FEATURE_CUBIC_EASEIN\n if (type == 21)\n {\n return value + a * time * time * time\n + repeats * a;\n }\n #endif\n #ifdef FEATURE_CUBIC_EASEINOUT\n if (type == 22)\n {\n time *= 2.0;\n if (time < 1.0)\n {\n return value + a * time * time * time * 0.5\n + repeats * a;\n }\n time -= 2.0;\n return value + a * 0.5 * (time * time * time + 2.0)\n + repeats * a;\n }\n #endif\n #ifdef FEATURE_QUART_EASEOUT\n if (type == 30)\n {\n time -= 1.0;\n return value + a * (1.0 - time * time * time * time)\n + repeats * a;\n }\n #endif\n #ifdef FEATURE_QUART_EASEIN\n if (type == 31)\n {\n return value + a * time * time * time * time\n + repeats * a;\n }\n #endif\n #ifdef FEATURE_QUART_EASEINOUT\n if (type == 32)\n {\n time *= 2.0;\n if (time < 1.0)\n {\n return value + a * time * time * time * time * 0.5\n + repeats * a;\n }\n time -= 2.0;\n return value + a * -0.5 * (time * time * time * time - 2.0)\n + repeats * a;\n }\n #endif\n #ifdef FEATURE_QUINT_EASEOUT\n if (type == 40)\n {\n time -= 1.0;\n return value + a * (time * time * time * time * time + 1.0)\n + repeats * a;\n }\n #endif\n #ifdef FEATURE_QUINT_EASEIN\n if (type == 41)\n {\n return value + a * time * time * time * time * time\n + repeats * a;\n }\n #endif\n #ifdef FEATURE_QUINT_EASEINOUT\n if (type == 42)\n {\n time *= 2.0;\n if (time < 1.0)\n {\n return value + a * time * time * time * time * time * 0.5\n + repeats * a;\n }\n time -= 2.0;\n return value + a * 0.5 * (time * time * time * time * time + 2.0)\n + repeats * a;\n }\n #endif\n #ifdef FEATURE_SINE_EASEOUT\n if (type == 50)\n {\n return value + a * sin(time * HALF_PI)\n + repeats * a;\n }\n #endif\n #ifdef FEATURE_SINE_EASEIN\n if (type == 51)\n {\n return value + a * (1.0 - cos(time * HALF_PI))\n + repeats * a;\n }\n #endif\n #ifdef FEATURE_SINE_EASEINOUT\n if (type == 52)\n {\n return value + a * 0.5 * (1.0 - cos(PI * time))\n + repeats * a;\n }\n #endif\n #ifdef FEATURE_EXPO_EASEOUT\n if (type == 60)\n {\n return value + a * (1.0 - pow(2.0, -10.0 * time))\n + repeats * a;\n }\n #endif\n #ifdef FEATURE_EXPO_EASEIN\n if (type == 61)\n {\n return value + a * pow(2.0, 10.
10 * (time - 1.0) - 0.001)\n + repeats * a;\n }\n #endif\n #ifdef FEATURE_EXPO_EASEINOUT\n if (type == 62)\n {\n time *= 2.0;\n if (time < 1.0)\n {\n return value + a * 0.5 * pow(2.0, 10.0 * (time - 1.0))\n + repeats * a;\n }\n time -= 1.0;\n return value + a * 0.5 * (2.0 - pow(2.0, -10.0 * (time - 1.0)))\n + repeats * a;\n }\n #endif\n #ifdef FEATURE_CIRC_EASEOUT\n if (type == 70)\n {\n time -= 1.0;\n return value + a * sqrt(1.0 - time * time)\n + repeats * a;\n }\n #endif\n #ifdef FEATURE_CIRC_EASEIN\n if (type == 71)\n {\n return value + a * (1.0 - sqrt(1.0 - time * time))\n + repeats * a;\n }\n #endif\n #ifdef FEATURE_CIRC_EASEINOUT\n if (type == 72)\n {\n time *= 2.0;\n if (time < 1.0)\n {\n return value + a * -0.5 * (sqrt(1.0 - time * time) - 1.0)\n + repeats * a;\n }\n time -= 2.0;\n return value + a * 0.5 * (sqrt(1.0 - time * time) + 1.0)\n + repeats * a;\n }\n #endif\n #ifdef FEATURE_BACK_EASEOUT\n if (type == 90)\n {\n time -= 1.0;\n return value + a * (time * time * (BOUNCE_OVERSHOOT_PLUS * time + BOUNCE_OVERSHOOT) + 1.0)\n + repeats * a;\n }\n #endif\n #ifdef FEATURE_BACK_EASEIN\n if (type == 91)\n {\n return value + a * time * time * (BOUNCE_OVERSHOOT_PLUS * time - BOUNCE_OVERSHOOT)\n + repeats * a;\n }\n #endif\n #ifdef FEATURE_BACK_EASEINOUT\n if (type == 92)\n {\n time *= 2.0;\n if (time < 1.0)\n {\n return value + a * 0.5 * (time * time * (BOUNCE_OVERSHOOT_IN_OUT_PLUS * time - BOUNCE_OVERSHOOT_IN_OUT))\n + repeats * a;\n }\n time -= 2.0;\n return value + a * 0.5 * (time * time * (BOUNCE_OVERSHOOT_IN_OUT_PLUS * time + BOUNCE_OVERSHOOT_IN_OUT) + 2.0)\n + repeats * a;\n }\n #endif\n #ifdef FEATURE_BOUNCE_EASEOUT\n if (type == 100)\n {\n if (time < 1.0 / 2.75)\n {\n return value + a * (7.5625 * time * time)\n + repeats * a;\n }\n else if (time < 2.0 / 2.75)\n {\n time -= 1.5 / 2.75;\n return value + a * (7.5625 * time * time + 0.75)\n + repeats * a;\n }\n else if (time < 2.5 / 2.75)\n {\n time -= 2.25 / 2.75;\n return value + a * (7.5625 * time * time + 0.9375)\n + repeats * a;\n }\n else\n {\n time -= 2.625 / 2.75;\n return value + a * (7.5625 * time * time + 0.984375)\n + repeats * a;\n }\n }\n #endif\n #ifdef FEATURE_BOUNCE_EASEIN\n if (type == 101)\n {\n time = 1.0 - time;\n if (time < 1.0 / 2.75)\n {\n return value + a * (1.0 - 7.5625 * time * time)\n + repeats * a;\n }\n else if (time < 2.0 / 2.75)\n {\n time -= 1.5 / 2.75;\n return value + a * (1.0 - (7.5625 * time * time + 0.75))\n + repeats * a;\n }\n else if (time < 2.5 / 2.75)\n {\n time -= 2.25 / 2.75;\n return value + a * (1.0 - (7.5625 * time * time + 0.9375))\n + repeats * a;\n }\n else\n {\n time -= 2.625 / 2.75;\n return value + a * (1.0 - (7.5625 * time * time + 0.984375))\n + repeats * a;\n }\n }\n #endif\n #ifdef FEATURE_BOUNCE_EASEINOUT\n if (type == 102)\n {\n bool reverse = false;\n if (time < 0.5)\n {\n time = 1.0 - time * 2.0;\n reverse = true;\n }\n if (time < 1.0 / 2.75)\n {\n time = 7.5625 * time * time;\n }\n else if (time < 2.0 / 2.75)\n {\n time -= 1.5 / 2.75;\n time = 7.5625 * time * time + 0.75;\n }\n else if (time < 2.5 / 2.75)\n {\n time -= 2.25 / 2.75;\n time = 7.5625 * time * time + 0.9375;\n }\n else\n {\n time -= 2.625 / 2.75;\n time = 7.5625 * time * time + 0.984375;\n }\n if (reverse)\n {\n return value + a * (1.0 - time) * 0.5\n + repeats * a;\n }\n return value + a * time * 0.5 + 0.5\n + repeats * a;\n }\n #endif\n #ifdef FEATURE_STEPPED\n if (type == 110)\n {\n return value + a * floor(time + 0.5)\n + repeats * a;\n }\n #endif\n #ifdef FEATURE_SMOOTHSTEP_EASEOUT\n if (type == 120)\n {\n return value + a * (smoothstep(0.0, 1.0, time / 2.0 + 0.5) * 2.0 - 1.0)\n + repeats * a;\n }\n #endif\n #ifdef FEATURE_SMOOTHSTEP_EASEIN\n if (type == 121)\n {\n return value + a * smoothstep(0.0, 1.0, time / 2.0) * 2.0\n + repeats * a;\n }\n #endif\n #ifdef FEATURE_SMOOTHSTEP_EASEINOUT\n if (type == 122)\n {\n return value + a * smoothstep(0.0, 1.0, time)\n + repeats * a;\n }\n #endif\n return value;\n}\nstruct Frame {\n vec2 position;\n vec2 size;\n vec2 offset;\n};\nFrame getFrame (float frame)\n{\n float index1 = floor(frame) * 3.0;\n float index2 = index1 + 1.0;\n float index3 = index1 + 2.0;\n float width = uFrameDataResolution.x;\n float x = mod(index1, width);\n float y = floor(index1 / width);\n vec4 texelUV = texture2D(\n uFrameDataTexture,\n vec2(x + 0.5, y + 0.5) / uFrameDataResolution\n );\n x = mod(index2, width);\n y = floor(index2 / width);\n vec4 texelWH = texture2D(\n uFrameDataTexture,\n vec2(x + 0.5, y + 0.5) / uFrameDataResolution\n );\n x = mod(index3, width);\n y = floor(index3 / width);\n vec4 texelOrigin = texture2D(\n uFrameDataTexture,\n vec2(x + 0.5, y + 0.5) / uFrameDataResolution\n );\n return Frame(\n vec2(\n texelUV.r + texelUV.g * 256.0,\n texelUV.b + texelUV.a * 256.0\n ) * 255.0,\n vec2(\n texelWH.r + texelWH.g * 256.0,\n texelWH.b + texelWH.a * 256.0\n ) * 255.0,\n vec2(\n texelOrigin.r + texelOrigin.g * 256.0,\n texelOrigin.b + texelOrigin.a * 256.0\n ) * 255.0 - 32768.0\n );\n}\nvoid main ()\n{\n float positionX = animate(inPositionX);\n float positionY = animate(inPositionY);\n float rotation = animate(inRotation);\n float scaleX = animate(inScaleX);\n float scaleY = animate(inScaleY);\n float frame = animate(inFrame);\n float tintBlend = animate(inTintBlend);\n float alpha = animate(inAlpha);\n vec2 origin = inOriginAndTintModeAndCreationTime.xy;\n float tintMode = inOriginAndTintModeAndCreationTime.z;\n float scrollFactorX = inScrollFactor.x;\n float scrollFactorY = inScrollFactor.y;\n Frame frameData = getFrame(frame);\n vec2 uv = frameData.position / uDiffuseResolution;\n vec2 wh = frameData.size / uDiffuseResolution;\n float u = uv.s;\n float v = uv.t;\n float w = wh.s;\n float h = wh.t;\n float width = frameData.size.s;\n float height = frameData.size.t;\n vec4 tint = inTintTL;\n float x = -origin.x;\n float y = -origin.y;\n if (inVertex == 0.0)\n {\n y = 1.0 - origin.y;\n v += h;\n tint = inTintBL;\n }\n else if (inVertex == 2.0)\n {\n x = 1.0 - origin.x;\n y = 1.0 - origin.y;\n u += w;\n v += h;\n tint = inTintBR;\n }\n else if (inVertex == 3.0)\n {\n x = 1.0 - origin.x;\n u += w;\n tint = inTintTR;\n }\n vec3 position = vec3(\n (x * width - frameData.offset.x) * scaleX,\n (y * height - frameData.offset.y) * scaleY,\n 1.0\n );\n mat3 viewMatrix = uViewMatrix * mat3(\n 1.0, 0.0, 0.0,\n 0.0, 1.0, 0.0,\n uCameraScrollAndAlpha.x * (1.0 - scrollFactorX), uCameraScrollAndAlpha.y * (1.0 - scrollFactorY), 1.0\n );\n float sine = sin(rotation);\n float cosine = cos(rotation);\n mat3 transformMatrix = mat3(\n cosine, sine, 0.0,\n -sine, cosine, 0.0,\n positionX, positionY, 1.0\n );\n position = viewMatrix * transformMatrix * position;
1\n alpha *= uCameraScrollAndAlpha.z;\n tint.a *= alpha;\n if (uRoundPixels == 1 && rotation == 0.0 && scaleX == 1.0 && scaleY == 1.0)\n {\n position.xy = floor(position.xy + ROUND_BIAS);\n }\n gl_Position = uProjectionMatrix * vec4(position.xy, 1.0, 1.0);\n outTexCoord = vec2(u, 1.0 - v);\n outTint = mix(vec4(1.0, 1.0, 1.0, tint.a), tint, tintBlend);\n outTintEffect = tintMode;\n #pragma phaserTemplate(vertexProcess)\n}"},57532(t){t.exports="#version 100\n#pragma phaserTemplate(shaderName)\n#pragma phaserTemplate(extensions)\n#pragma phaserTemplate(features)\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\n/* Redefine MAX_ANIM_FRAMES to support animations with different frame numbers. */\n#define MAX_ANIM_FRAMES 0\n#pragma phaserTemplate(fragmentDefine)\nuniform vec2 uResolution;\nuniform sampler2D uMainSampler;\nuniform sampler2D uLayerSampler;\nuniform vec2 uMainResolution;\nuniform vec2 uLayerResolution;\nuniform float uTileColumns;\nuniform vec4 uTileWidthHeightMarginSpacing;\nuniform float uAlpha;\nuniform float uTime;\n#if MAX_ANIM_FRAMES > 0\nuniform sampler2D uAnimSampler;\nuniform vec2 uAnimResolution;\n#endif\nvarying vec2 outTexCoord;\nvarying vec2 outTileStride;\n#pragma phaserTemplate(outVariables)\nvec2 getTexRes ()\n{\n return uMainResolution;\n}\nfloat floatTexel (vec4 texel)\n{\n return texel.r * 255.0 + (texel.g * 255.0 * 256.0) + (texel.b * 255.0 * 256.0 * 256.0) + (texel.a * 255.0 * 256.0 * 256.0 * 256.0);\n}\nstruct Tile\n{\n float index;\n vec2 uv; // In texels.\n #if MAX_ANIM_FRAMES > 0\n bool animated;\n #endif\n bool empty;\n};\nTile getLayerData (vec2 coord)\n{\n vec2 texelCoord = coord * uLayerResolution;\n vec2 tile = floor(texelCoord);\n vec2 uv = fract(texelCoord);\n uv.y = 1.0 - uv.y;\n vec4 texel = texture2D(uLayerSampler, (tile + 0.5) / uLayerResolution) * 255.0;\n float flags = texel.a;\n /* Check for empty tile flag in bit 28. */\n if (flags == 16.0)\n {\n return Tile(\n 0.0,\n vec2(0.0),\n #if MAX_ANIM_FRAMES > 0\n false,\n #endif\n true\n );\n }\n /* Bit 31 is flipX. */\n bool flipX = flags > 127.0;\n /* Bit 30 is flipY. */\n bool flipY = mod(flags, 128.0) > 63.0;\n #if MAX_ANIM_FRAMES > 0\n /* Bit 29 is animation. */\n bool animated = mod(flags, 64.0) > 31.0;\n #endif\n if (flipX)\n {\n uv.x = 1.0 - uv.x;\n }\n if (flipY)\n {\n uv.y = 1.0 - uv.y;\n }\n float index = texel.r + (texel.g * 256.0) + (texel.b * 256.0 * 256.0);\n return Tile(\n index,\n uv * uTileWidthHeightMarginSpacing.xy,\n #if MAX_ANIM_FRAMES > 0\n animated,\n #endif\n false\n );\n}\nvec2 getFrameCorner (float index)\n{\n float x = mod(index, uTileColumns);\n float y = floor(index / uTileColumns);\n vec2 xy = vec2(x, y);\n return xy * outTileStride + uTileWidthHeightMarginSpacing.zz;\n}\n#if MAX_ANIM_FRAMES > 0\nfloat animationIndex (float index)\n{\n float animTextureWidth = uAnimResolution.x;\n vec2 index2D = vec2(mod(index, animTextureWidth), floor(index / animTextureWidth));\n vec4 animDurationTexel = texture2D(uAnimSampler, (index2D + 0.5) / uAnimResolution);\n index2D = vec2(mod(index + 1.0, animTextureWidth), floor((index + 1.0) / animTextureWidth));\n vec4 animIndexTexel = texture2D(uAnimSampler, (index2D + 0.5) / uAnimResolution);\n float animDuration = floatTexel(animDurationTexel);\n float animIndex = floatTexel(animIndexTexel);\n float animTime = mod(uTime, animDuration);\n float animTimeAccum = 0.0;\n for (int i = 0; i < MAX_ANIM_FRAMES; i++)\n {\n index2D = vec2(mod(animIndex, animTextureWidth), floor(animIndex / animTextureWidth));\n animDurationTexel = texture2D(uAnimSampler, (index2D + 0.5) / uAnimResolution);\n float frameDuration = floatTexel(animDurationTexel);\n animTimeAccum += frameDuration;\n if (animTime <= animTimeAccum)\n {\n break;\n }\n animIndex += 2.0;\n }\n animIndex += 1.0;\n index2D = vec2(mod(animIndex, animTextureWidth), floor(animIndex / animTextureWidth));\n animIndexTexel = texture2D(uAnimSampler, (index2D + 0.5) / uAnimResolution);\n float animFrameIndex = floatTexel(animIndexTexel);\n return animFrameIndex;\n}
1\n#endif\nvec2 getTileTexelCoord (Tile tile)\n{\n if (tile.empty)\n {\n return vec2(0.0);\n }\n float index = tile.index;\n #if MAX_ANIM_FRAMES > 0\n if (tile.animated)\n {\n index = animationIndex(index);\n }\n #endif\n vec2 frameCorner = getFrameCorner(index);\n return frameCorner + tile.uv;\n}\n#pragma phaserTemplate(fragmentHeader)\nstruct Samples {\n vec4 color;\n #pragma phaserTemplate(defineSamples)\n};\nSamples getColorSamples (vec2 texCoord)\n{\n Samples samples;\n samples.color = texture2D(\n uMainSampler,\n vec2(texCoord.x, 1.0 - texCoord.y)\n );\n #pragma phaserTemplate(getSamples)\n return samples;\n}\nSamples mixSamples (Samples samples1, Samples samples2, float alpha)\n{\n Samples samples;\n samples.color = mix(samples1.color, samples2.color, alpha);\n #pragma phaserTemplate(mixSamples)\n return samples;\n}\nSamples getFinalSamples (Tile tile, vec2 layerTexCoord)\n{\n vec2 texelCoord = getTileTexelCoord(tile);\n vec2 texCoord = texelCoord / uMainResolution;\n #pragma phaserTemplate(texCoord)\n #ifndef FEATURE_BORDERFILTER\n return getColorSamples(texCoord);\n #else\n #pragma phaserTemplate(finalSamples)\n vec2 wh = uTileWidthHeightMarginSpacing.xy;\n vec2 frameCorner = getFrameCorner(tile.index);\n vec2 frameCornerOpposite = frameCorner + wh;\n vec2 texCoordClamped = clamp(texCoord, (frameCorner + 0.5) / uMainResolution, (frameCornerOpposite - 0.5) / uMainResolution);\n vec2 dTexelCoord = (texCoord - texCoordClamped) * uMainResolution;\n dTexelCoord.y = -dTexelCoord.y;\n vec2 offsets = sign(dTexelCoord);\n Samples samples0 = getColorSamples(texCoordClamped);\n if (offsets.x == 0.0)\n {\n if (offsets.y == 0.0)\n {\n return samples0;\n }\n Tile tileY = getLayerData(layerTexCoord + (offsets - dTexelCoord) / wh / uLayerResolution);\n vec2 texelCoordY = getTileTexelCoord(tileY);\n vec2 texCoordY = texelCoordY / uMainResolution;\n Samples samplesY = getColorSamples(texCoordY);\n return mixSamples(samples0, samplesY, abs(dTexelCoord.y));\n }\n else\n {\n if (offsets.y == 0.0)\n {\n Tile tileX = getLayerData(layerTexCoord + (offsets - dTexelCoord) / wh / uLayerResolution);\n vec2 texelCoordX = getTileTexelCoord(tileX);\n vec2 texCoordX = texelCoordX / uMainResolution;\n Samples samplesX = getColorSamples(texCoordX);\n return mixSamples(samples0, samplesX, abs(dTexelCoord.x));\n }\n Tile tileX = getLayerData(layerTexCoord + (offsets * vec2(1.0, 0.0) - dTexelCoord) / wh / uLayerResolution);\n vec2 texelCoordX = getTileTexelCoord(tileX);\n vec2 texCoordX = texelCoordX / uMainResolution;\n Samples samplesX = getColorSamples(texCoordX);\n Tile tileY = getLayerData(layerTexCoord + (offsets * vec2(0.0, 1.0) - dTexelCoord) / wh / uLayerResolution);\n vec2 texelCoordY = getTileTexelCoord(tileY);\n vec2 texCoordY = texelCoordY / uMainResolution;\n Samples samplesY = getColorSamples(texCoordY);\n Tile tileXY = getLayerData(layerTexCoord + (offsets - dTexelCoord) / wh / uLayerResolution);\n vec2 texelCoordXY = getTileTexelCoord(tileXY);\n vec2 texCoordXY = texelCoordXY / uMainResolution;\n Samples samplesXY = getColorSamples(texCoordXY);\n Samples samples1 = mixSamples(samples0, samplesX, abs(dTexelCoord.x));\n Samples samples2 = mixSamples(samplesY, samplesXY, abs(dTexelCoord.x));\n return mixSamples(samples1, samples2, abs(dTexelCoord.y));\n }\n #endif\n}\nvoid main ()\n{\n vec2 layerTexCoord = outTexCoord;\n Tile tile = getLayerData(layerTexCoord);\n Samples samples = getFinalSamples(tile, layerTexCoord);\n vec4 fragColor = samples.color;\n #pragma phaserTemplate(declareSamples)\n #pragma phaserTemplate(fragmentProcess)\n fragColor *= uAlpha;\n gl_FragColor = fragColor;\n}"},23879(t){t.exports="#pragma phaserTemplate(shaderName)\n#pragma phaserTemplate(extensions)\n#pragma phaserTemplate(features)\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\n#pragma phaserTemplate(vertexDefine)\nuniform mat4 uProjectionMatrix;\nuniform vec2 uResolution;\nuniform vec4 uTileWidthHeightMarginSpacing;\nattribute vec2 inPosition;\nattribute vec2 inTexCoord;\nvarying vec2 outTexCoord;\nvarying vec2 outTileStride;\n#pragma phaserTemplate(outVariables)\n#pragma phaserTemplate(vertexHeader)\nvoid main ()\n{\n gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);\n outTexCoord = inTexCoord;\n outTileStride = uTileWidthHeightMarginSpacing.xy + uTileWidthHeightMarginSpacing.zz;\n #pragma phaserTemplate(vertexProcess)\n}"},84639(t){t.exports=function(t,e){return{name:t+"Anims",additions:{fragmentDefine:"#undef MAX_ANIM_FRAMES\n#define MAX_ANIM_FRAMES "+t},tags:["MAXANIMS"],disable:!!e}}},81084(t,e,i){var n=i(84547);t.exports=function(t){return{name:"ApplyLighting",additions:{fragmentHeader:n,fragmentProcess:"fragColor = applyLighting(fragColor, normal);"},tags:["LIGHTING"],disable:!!t}}},44349(t,e,i){var n=i(11104);t.exports=function(t){return{name:"Tint",additions:{fragmentHeader:n,fragmentProcess:"fragColor = applyTint(fragColor);"},tags:["TINT"],disable:!!t}}}
vendor: 22,026 bytes, line 1
1,99501(t,e,i){var n=i(81556);t.exports=function(t){return{name:"BoundedSampler",additions:{fragmentHeader:n},disable:!!t}}},6184(t,e,i){var n=i(11719);t.exports=function(t){return{name:"DefineLights",additions:{fragmentDefine:"#define LIGHT_COUNT 1",fragmentHeader:n},tags:["LIGHTING"],disable:!!t}}},11653(t){t.exports=function(t,e){return{name:t+"TexCount",additions:{fragmentDefine:"#define TEXTURE_COUNT "+t},tags:["TexCount"],disable:!!e}}},13198(t){t.exports=function(t){return{name:"FlatNormal",additions:{fragmentProcess:"vec3 normal = vec3(0.0, 0.0, 1.0);"},tags:["LIGHTING"],disable:!!t}}},40829(t,e,i){var n=i(84220);t.exports=function(t){return{name:"NormalMap",additions:{fragmentHeader:n,fragmentProcess:"vec3 normal = getNormalFromMap(texCoord);"},tags:["LIGHTING"],disable:!!t}}},42792(t){t.exports=function(t){return{name:"TexCoordOut",additions:{fragmentProcess:"vec2 texCoord = outTexCoord;\n#pragma phaserTemplate(texCoord)"},tags:["TEXCOORD"],disable:!!t}}},96049(t,e,i){var n=i(2860);t.exports=function(t){return{name:"GetTexRes",additions:{fragmentHeader:n},tags:["TEXRES"],disable:!!t}}},33997(t,e,i){var n=i(46432);t.exports=function(t,e){void 0===t&&(t=1);for(var i="",s=1;s<t;s++)i+="ELSE_TEX_CASE("+s+")\n";return{name:"GetTexture"+t,additions:{fragmentHeader:n.replace("#pragma phaserTemplate(texIdProcess)",i),fragmentProcess:"vec4 fragColor = getTexture(texCoord);"},tags:["TEXTURE"],disable:!!e}}},10455(t){t.exports=function(t){return{name:"OutFrame",additions:{vertexHeader:"attribute vec4 inFrame;",vertexProcess:"outFrame = inFrame;",outVariables:"varying vec4 outFrame;"},disable:!!t}}},79532(t,e,i){var n=i(62807);t.exports=function(t){return{name:"OutInverseRotation",additions:{vertexHeader:"uniform vec4 uCamera;",vertexProcess:n,outVariables:"varying mat3 outInverseRotationMatrix;"},tags:["LIGHTING"],disable:!!t}}},65217(t){t.exports=function(t){return{name:"RotDatum",additions:{vertexProcess:"float rotation = inTexDatum;"},tags:["LIGHTING"],disable:!!t}}},747(t){t.exports=function(t){return{name:"SampleNormal",additions:{defineSamples:"vec4 normal;",getSamples:"samples.normal = texture2D(uNormSampler, texCoord);",mixSamples:"samples.normal = mix(samples1.normal, samples2.normal, alpha);",declareSamples:"vec3 normal = normalize(samples.normal.rgb * 2.0 - 1.0);"},tags:["LIGHTING"],disable:!!t}}},74505(t,e,i){var n=i(78390);t.exports=function(t){return{name:"SmoothPixelArt",additions:{extensions:"#extension GL_OES_standard_derivatives : enable",fragmentHeader:n,texCoord:"texCoord = getBlockyTexCoord(texCoord, getTexRes());"},disable:!!t}}},44832(t,e,i){var n=i(14030);t.exports=function(t){return{name:"TexCoordFrameClamp",additions:{fragmentHeader:n,texCoord:"texCoord = clampTexCoordWithinFrame(texCoord);"},disable:!!t}}},23295(t){t.exports=function(t){return{name:"TexCoordFrameWrap",additions:{texCoord:"// Wrap texture coordinate into the UV space of the texture frame.\ntexCoord = mod(texCoord, 1.0) * outFrame.zw + outFrame.xy;"},disable:!!t}}},83786(t,e,i){t.exports={MakeAnimLength:i(84639),MakeApplyLighting:i(81084),MakeApplyTint:i(44349),MakeBoundedSampler:i(99501),MakeDefineLights:i(6184),MakeDefineTexCount:i(11653),MakeFlatNormal:i(13198),MakeGetNormalFromMap:i(40829),MakeGetTexCoordOut:i(42792),MakeGetTexRes:i(96049),MakeGetTexture:i(33997),MakeOutFrame:i(10455),MakeOutInverseRotation:i(79532),MakeRotationDatum:i(65217),MakeSampleNormal:i(747),MakeSmoothPixelArt:i(74505),MakeTexCoordFrameClamp:i(44832),MakeTexCoordFrameWrap:i(23295)}},89350(t,e,i){t.exports={ApplyLighting:i(84547),ApplyTint:i(11104),BoundedSampler:i(81556),ColorMatrixFrag:i(96293),DefineBlockyTexCoord:i(78390),DefineLights:i(11719),DefineTexCoordFrameClamp:i(14030),FilterBarrelFrag:i(10235),FilterBlendFrag:i(65980),FilterBlockyFrag:i(5899),FilterBlurHighFrag:i(20784),FilterBlurLowFrag:i(65122),FilterBlurMedFrag:i(60942),FilterBokehFrag:i(43722),FilterColorMatrixFrag:i(19883),FilterCombineColorMatrixFrag:i(32624),FilterDisplacementFrag:i(12886),FilterGlowFrag:i(33016),FilterGradientMapFrag:i(33179),FilterImageLightFrag:i(94526),FilterKeyFrag:i(4488),FilterMaskFrag:i(39603),FilterNormalToolsFrag:i(60047),FilterPanoramaBlurFrag:i(7529),FilterPixelateFrag:i(99191),FilterQuantizeFrag:i(88430),FilterShadowFrag:i(69355),FilterThresholdFrag:i(92636),FilterVignetteFrag:i(18185),FilterWipeFrag:i(99174),FlatFrag:i(73416),FlatVert:i(91627),GetNormalFromMap:i(84220),GetTexRes:i(2860),GetTexture:i(46432),GradientFrag:i(41509),MultiFrag:i(98840),MultiVert:i(44667),NoiseFrag:i(16421),NoiseSimplex2DFrag:i(83587),NoiseSimplex3DFrag:i(13460),NoiseWorley2DFrag:i(17205),NoiseWorley3DFrag:i(79814),NoiseWorley4DFrag:i(99595),OutInverseRotation:i(62807),PointLightFrag:i(4127),PointLightVert:i(89924),Ramp:i(68589),ShaderQuadFrag:i(72823),ShaderQuadVert:i(65884),SimpleTextureVert:i(2807),SpriteGPULayerFrag:i(49119),SpriteGPULayerVert:i(3524),TilemapGPULayerFrag:i(57532),TilemapGPULayerVert:i(23879)}},26128(t,e,i){t.exports=new(i(83419))({initialize:function(t,e,i,n){this.renderer=t,this.webGLBuffer=null,this.dataBuffer=e,this.viewF32=null,this.viewU8=new Uint8Array(e),this.viewU16=null,this.viewU32=null,this.bufferType=i,this.bufferUsage=n,this.createViews(),this.createResource()},createResource:function(){var t=this.renderer.gl,e=this.bufferType,i=t.createBuffer();this.webGLBuffer=i,this.bind(),t.bufferData(e,this.dataBuffer,this.bufferUsage),this.bind(!0)},bind:function(t){var e=this.renderer.gl,i=this.bufferType,n=t?null:this;i===e.ARRAY_BUFFER?this.renderer.glWrapper.updateBindingsArrayBuffer({bindings:{arrayBuffer:n}}):i===e.ELEMENT_ARRAY_BUFFER&&this.renderer.glWrapper.updateBindingsElementArrayBuffer({bindings:{elementArrayBuffer:n}})},update:function(t,e){var i=this.renderer.gl;this.bind(),void 0===e&&(e=0),void 0===t?i.bufferSubData(this.bufferType,e,this.dataBuffer):i.bufferSubData(this.bufferType,e,this.viewU8.subarray(e,e+t))},resize:function(t){var e=this.renderer.gl;this.dataBuffer=new ArrayBuffer(t),this.createViews(),this.bind(),e.bufferData(this.bufferType,this.dataBuffer,this.bufferUsage)},createViews:function(){var t=this.dataBuffer;this.viewF32=null,t.byteLength%Float32Array.BYTES_PER_ELEMENT==0&&(this.viewF32=new Float32Array(t)),this.viewU8=new Uint8Array(t),this.viewU16=null,t.byteLength%Uint16Array.BYTES_PER_ELEMENT==0&&(this.viewU16=new Uint16Array(t)),this.viewU32=null,t.byteLength%Uint32Array.BYTES_PER_ELEMENT==0&&(this.viewU32=new Uint32Array(t))},destroy:function(){this.renderer.gl.deleteBuffer(this.webGLBuffer),this.webGLBuffer=null,this.dataBuffer=null,this.viewF32=null,this.viewU8=null,this.viewU16=null,this.viewU32=null,this.renderer=null}})},84387(t,e,i){var n=i(83419),s={36054:"Incomplete Attachment",36055:"Missing Attachment",36057:"Incomplete Dimensions",36061:"Framebuffer Unsupported"};t.exports=new n({initialize:function(t,e,i,n){var s=t.gl;if(this.webGLFramebuffer=null,this.renderer=t,this.useCanvas=!e||0===e.length,this.width=0,this.height=0,this.attachments=[],!this.useCanvas){for(var r=0;r<e.length;r++)if(this.attachments.push({texture:e[r],attachmentPoint:s.COLOR_ATTACHMENT0+r}),0===r)this.width=e[r].width,this.height=e[r].height;else if(e[r].width!==this.width||e[r].height!==this.height)throw Error("Color attachments must have the same dimensions");n&&i?this.attachments.push({attachmentPoint:s.DEPTH_STENCIL_ATTACHMENT,internalFormat:s.DEPTH_STENCIL}):n?this.attachments.push({attachmentPoint:s.DEPTH_ATTACHMENT,internalFormat:s.DEPTH_COMPONENT16}):i&&this.attachments.push({attachmentPoint:s.STENCIL_ATTACHMENT,internalFormat:s.STENCIL_INDEX8})}this.renderTexture=null,this.attachments[0]&&(this.renderTexture=this.attachments[0].texture),this.createResource()},createResource:function(){if(!this.useCanvas){var t=this.renderer,e=t.glWrapper,i=t.gl;if(this.webGLFramebuffer){i.deleteFramebuffer(this.webGLFramebuffer);for(var n=0;n<this.attachments.length;n++){var r=this.attachments[n];r.texture||i.deleteRenderbuffer(r.renderbuffer)}}var o=i.createFramebuffer();for(this.webGLFramebuffer=o,e.updateBindingsFramebuffer({bindings:{framebuffer:this}},!0),n=0;n<this.attachments.length;n++){var a=(r=this.attachments[n]).attachmentPoint,h=r.texture;if(h)h.isRenderTexture=!0,i.framebufferTexture2D(i.FRAMEBUFFER,a,i.TEXTURE_2D,h.webGLTexture,0);else{var l=i.checkFramebufferStatus(i.FRAMEBUFFER);if(l!==i.FRAMEBUFFER_COMPLETE)throw Error("Framebuffer status: "+(s[l]||l));var u=i.createRenderbuffer();e.updateBindingsRenderbuffer({bindings:{renderbuffer:u}}),i.renderbufferStorage(i.RENDERBUFFER,r.internalFormat,this.width,this.height),i.framebufferRenderbuffer(i.FRAMEBUFFER,a,i.RENDERBUFFER,u),r.renderbuffer=u}}}},resize:function(t,e){this.useCanvas||(this.width=t,this.height=e,this.renderTexture.resize(t,e),this.createResource())},destroy:function(){if(null!==this.renderer){for(var t=this.renderer,e=t.gl,i=0;i<this.attachments.length;i++){var n=this.attachments[i];n.texture?(t.glWrapper.updateBindingsFramebuffer({bindings:{framebuffer:this}}),e.framebufferTexture2D(e.FRAMEBUFFER,n.attachmentPoint,e.TEXTURE_2D,null,0),t.deleteTexture(n.texture)):e.deleteRenderbuffer(n.renderbuffer)}e.deleteFramebuffer(this.webGLFramebuffer),t.glWrapper.updateBindingsFramebuffer({bindings:{framebuffer:null,renderbuffer:null}}),this.attachments.length=0,this.renderTexture=null,this.webGLFramebuffer=null,this.renderer=null}}})},37959(t,e,i){var n=i(83419),s=i(53314);t.exports=new n({initialize:function(t){this.renderer=t,this.state=s.getDefault(t)},update:function(t,e,i){if(void 0===t){if(!e)return;t=this.state}void 0===e&&(e=!1),void 0===i&&(i=!1),void 0===t.vao||i||this.updateVAO(t,e),void 0!==t.bindings&&this.updateBindings(t,e),void 0!==t.blend&&this.updateBlend(t,e),void 0!==t.colorClearValue&&this.updateColorClearValue(t,e),void 0!==t.colorWritemask&&this.updateColorWritemask(t,e),void 0!==t.cullFace&&this.updateCullFace(t,e),void 0!==t.depthTest&&this.updateDepthTest(t,e),void 0!==t.scissor&&this.updateScissor(t,e),void 0!==t.stencil&&this.updateStencil(t,e),void 0!==t.texturing&&this.updateTexturing(t,e),void 0!==t.viewport&&this.updateViewport(t,e),void 0!==t.vao&&i&&this.updateVAO(t,e)},updateBindings:function(t,e){var i=t.bindings;void 0!==i.activeTexture&&this.updateBindingsActiveTexture(t,e),void 0!==i.arrayBuffer&&this.updateBindingsArrayBuffer(t,e),void 0!==i.elementArrayBuffer&&this.updateBindingsElementArrayBuffer(t,e),void 0!==i.framebuffer&&this.updateBindingsFramebuffer(t,e),void 0!==i.program&&this.updateBindingsProgram(t,e),void 0!==i.renderbuffer&&this.updateBindingsRenderbuffer(t,e)},updateBindingsActiveTexture:function(t,e){var i=t.bindings.activeTexture,n=i!==this.state.bindings.activeTexture;if(n&&(this.state.bindings.activeTexture=i),n||e){var s=this.renderer.gl;s.activeTexture(s.TEXTURE0+i)}},updateBindingsArrayBuffer:function(t,e){var i=t.bindings.arrayBuffer,n=this.renderer.gl;if(null!==i&&i.bufferType!==n.ARRAY_BUFFER)throw Error("Invalid buffer type for ARRAY_BUFFER");var s=i!==this.state.bindings.arrayBuffer;if(s&&(this.state.bindings.arrayBuffer=i),s||e){var r=i?i.webGLBuffer:null;n.bindBuffer(n.ARRAY_BUFFER,r)}},updateBindingsElementArrayBuffer:function(t,e){var i=t.bindings.elementArrayBuffer,n=this.renderer.gl;if(null!==i&&i.bufferType!==n.ELEMENT_ARRAY_BUFFER)throw Error("Invalid buffer type for ELEMENT_ARRAY_BUFFER");var s=i!==this.state.bindings.elementArrayBuffer;if(s&&(this.state.bindings.elementArrayBuffer=i),s||e){var r=i?i.webGLBuffer:null;n.bindBuffer(n.ELEMENT_ARRAY_BUFFER,r)}},updateBindingsFramebuffer:function(t,e){var i=t.bindings.framebuffer,n=i!==this.state.bindings.framebuffer;if(n&&(this.state.bindings.framebuffer=i),n||e){var s=this.renderer.gl,r=i?i.webGLFramebuffer:null;s.bindFramebuffer(s.FRAMEBUFFER,r)}},updateBindingsProgram:function(t,e){var i=t.bindings.program,n=i!==this.state.bindings.program;if(n&&(this.state.bindings.program=i),n||e){var s=i?i.webGLProgram:null;this.renderer.gl.useProgram(s)}},updateBindingsRenderbuffer:function(t,e){var i=t.bindings.renderbuffer,n=i!==this.state.bindings.renderbuffer;if(n&&(this.state.bindings.renderbuffer=i),n||e){var s=this.renderer.gl;s.bindRenderbuffer(s.RENDERBUFFER,i||null)}},updateBlend:function(t,e){var i=t.blend;void 0!==i.enabled&&this.updateBlendEnabled(t,e),void 0!==i.color&&this.updateBlendColor(t,e),void 0!==i.equation&&this.updateBlendEquation(t,e),void 0!==i.func&&this.updateBlendFunc(t,e)},updateBlendColor:function(t,e){var i=t.blend.color,n=i[0],s=i[1],r=i[2],o=i[3],a=n!==this.state.blend.color[0]||s!==this.state.blend.color[1]||r!==this.state.blend.color[2]||o!==this.state.blend.color[3];a&&(this.state.blend.color=[n,s,r,o]),(a||e)&&this.renderer.gl.blendColor(n,s,r,o)},updateBlendEnabled:function(t,e){var i=t.blend.enabled,n=i!==this.state.blend.enabled;if(n&&(this.state.blend.enabled=i),n||e){var s=this.renderer.gl;i?s.enable(s.BLEND):s.disable(s.BLEND)}},updateBlendEquation:function(t,e){var i=t.blend.equation,n=i[0]!==this.state.blend.equation[0]||i[1]!==this.state.blend.equation[1];n&&(this.state.blend.equation=[i[0],i[1]]),(n||e)&&this.renderer.gl.blendEquationSeparate(i[0],i[1])},updateBlendFunc:function(t,e){var i=t.blend.func,n=i[0]!==this.state.blend.func[0]||i[1]!==this.state.blend.func[1]||i[2]!==this.state.blend.func[2]||i[3]!==this.state.blend.func[3];n&&(this.state.blend.func=[i[0],i[1],i[2],i[3]]),(n||e)&&this.renderer.gl.blendFuncSeparate(i[0],i[1],i[2],i[3])},updateColorClearValue:function(t,e){var i=t.colorClearValue,n=i[0],s=i[1],r=i[2],o=i[3],a=n!==this.state.colorClearValue[0]||s!==this.state.colorClearValue[1]||r!==this.state.colorClearValue[2]||o!==this.state.colorClearValue[3];a&&(this.state.colorClearValue=[n,s,r,o]),(a||e)&&this.renderer.gl.clearColor(n,s,r,o)},updateColorWritemask:function(t,e){var i=t.colorWritemask,n=i[0],s=i[1],r=i[2],o=i[3],a=n!==this.state.colorWritemask[0]||s!==this.state.colorWritemask[1]||r!==this.state.colorWritemask[2]||o!==this.state.colorWritemask[3];a&&(this.state.colorWritemask=[n,s,r,o]),(a||e)&&this.renderer.gl.colorMask(n,s,r,o)},updateCullFace:function(t,e){var i=!!t.cullFace,n=i!==this.state.cullFace;if(n&&(this.state.cullFace=i),n||e){var s=this.renderer.gl;i?s.enable(s.CULL_FACE):s.disable(s.CULL_FACE)}},updateDepthTest:function(t,e){var i=!!t.depthTest,n=i!==this.state.depthTest;if(n&&(this.state.depthTest=i),n||e){var s=this.renderer.gl;i?s.enable(s.DEPTH_TEST):s.disable(s.DEPTH_TEST)}},updateScissor:function(t,e){var i=t.scissor;void 0!==i.enable&&this.updateScissorEnabled(t,e),void 0!==i.box&&this.updateScissorBox(t,e)},updateScissorEnabled:function(t,e){var i=t.scissor.enable,n=i!==this.state.scissor.enable;if(n&&(this.state.scissor.enable=i),n||e){var s=this.renderer.gl;i?s.enable(s.SCISSOR_TEST):s.disable(s.SCISSOR_TEST)}},updateScissorBox:function(t,e){var i=t.scissor.box,n=i[0],s=i[1],r=i[2],o=i[3],a=n!==this.state.scissor.box[0]||s!==this.state.scissor.box[1]||r!==this.state.scissor.box[2]||o!==this.state.scissor.box[3];a&&(this.state.scissor.box=[n,s,r,o]),(a||e)&&this.renderer.gl.scissor(n,s,r,o)},updateStencil:function(t,e){var i=t.stencil;void 0!==i.clear&&this.updateStencilClear(t,e),void 0!==i.enabled&&this.updateStencilEnabled(t,e),void 0!==i.func&&this.updateStencilFunc(t,e),void 0!==i.op&&this.updateStencilOp(t,e)},updateStencilClear:function(t,e){var i=t.stencil.clear,n=i!==this.state.stencil.clear;n&&(this.state.stencil.clear=i),(n||e)&&this.renderer.gl.clearStencil(i)},updateStencilEnabled:function(t,e){var i=t.stencil.enabled,n=i!==this.state.stencil.enabled;if(n&&(this.state.stencil.enabled=i),n||e){var s=this.renderer.gl;i?s.enable(s.STENCIL_TEST):s.disable(s.STENCIL_TEST)}},updateStencilFunc:function(t,e){var i=t.stencil.func,n=i.func!==this.state.stencil.func.func||i.ref!==this.state.stencil.func.ref||i.mask!==this.state.stencil.func.mask;n&&(this.state.stencil.func={func:i.func,ref:i.ref,mask:i.mask}),(n||e)&&this.renderer.gl.stencilFunc(i.func,i.ref,i.mask)},updateStencilOp:function(t,e){var i=t.stencil.op,n=i.fail!==this.state.stencil.op.fail||i.zfail!==this.state.stencil.op.zfail||i.zpass!==this.state.stencil.op.zpass;n&&(this.state.stencil.op={fail:i.fail,zfail:i.zfail,zpass:i.zpass}),(n||e)&&this.renderer.gl.stencilOp(i.fail,i.zfail,i.zpass)},updateTexturing:function(t,e){var i=t.texturing;void 0!==i.flipY&&this.updateTexturingFlipY(t,e),void 0!==i.premultiplyAlpha&&this.updateTexturingPremultiplyAlpha(t,e)},updateTexturingFlipY:function(t,e){var i=t.texturing.flipY,n=i!==this.state.texturing.flipY;if(n&&(this.state.texturing.flipY=i),n||e){var s=this.renderer.gl;s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,i)}},updateTexturingPremultiplyAlpha:function(t,e){var i=t.texturing.premultiplyAlpha,n=i!==this.state.texturing.premultiplyAlpha;if(n&&(this.state.texturing.premultiplyAlpha=i),n||e){var s=this.renderer.gl;s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i)}},updateVAO:function(t,e){var i=t.vao,n=i!==this.state.vao;if(n&&(this.state.vao=i),n||e){var s=this.renderer.gl;i?s.bindVertexArray(i.vertexArrayObject):s.bindVertexArray(null)}},updateViewport:function(t,e){var i=t.viewport,n=i[0],s=i[1],r=i[2],o=i[3],a=n!==this.state.viewport[0]||s!==this.state.viewport[1]||r!==this.state.viewport[2]||o!==this.state.viewport[3];a&&(this.state.viewport=[n,s,r,o]),(a||e)&&this.renderer.gl.viewport(n,s,r,o)}})},1482(t,e,i){var n=i(90330);function s(t,e){return!(t===e||(Number.isNaN(t)||void 0===t)&&(Number.isNaN(e)||void 0===e))}t.exports=new(i(83419))({initialize:function(t,e,i){this.renderer=t,this.webGLProgram=null,this.compiling=!1,this._compileStartTime=0,this.compileTimeMs=0,this.glState={bindings:{program:this}},this.vertexSource=e,this.fragmentSource=i,this._vertexShader=null,this._fragmentShader=null,this.glAttributes=[],this.glAttributeNames=new n,this.glAttributeBuffer=null,this.glUniforms=new n,this.uniformRequests=new n,this.createResource()},createResource:function(){var t=this.renderer,e=t.gl;if(this.glAttributeBuffer=null,!e.isContextLost()){this.compiling=!0,this._compileStartTime=performance.now(),t.glWrapper.state.bindings.program===this&&t.glWrapper.updateBindingsProgram({bindings:{program:null}});var i=e.createProgram();this.webGLProgram=i;var n=e.createShader(e.VERTEX_SHADER),s=e.createShader(e.FRAGMENT_SHADER);this._vertexShader=n,this._fragmentShader=s,e.shaderSource(n,this.vertexSource),e.shaderSource(s,this.fragmentSource),e.compileShader(n),e.compileShader(s),e.attachShader(i,n),e.attachShader(i,s),e.linkProgram(i),t.game.config.skipUnreadyShaders||this._completeProgram()}},checkParallelCompile:function(){var t=this.renderer,e=t.gl,i=t.parallelShaderCompileExtension;i&&e.getProgramParameter(this.webGLProgram,i.COMPLETION_STATUS_KHR)&&this._completeProgram()},_completeProgram:function(){var t=this.webGLProgram,e=this.renderer.gl,i=this._vertexShader,n=this._fragmentShader,s="Shader failed:\n";if(!e.getProgramParameter(t,e.LINK_STATUS)){if(!e.getShaderParameter(i,e.COMPILE_STATUS))throw console.log(this.vertexSource),Error("Vertex "+s+e.getShaderInfoLog(i));if(!e.getShaderParameter(n,e.COMPILE_STATUS))throw console.log(this.fragmentSource),Error("Fragment "+s+e.getShaderInfoLog(n));throw console.log(this.vertexSource,this.fragmentSource),Error("Link Shader failed:"+e.getProgramInfoLog(t))}this._setupAttributesAndUniforms(),this.compileTimeMs=performance.now()-this._compileStartTime,this.compiling=!1},_setupAttributesAndUniforms:function(){var t=this.webGLProgram,e=this.renderer,i=e.gl,n=this;this.glAttributeNames.clear(),this.glAttributes.length=0;for(var s=i.getProgramParameter(t,i.ACTIVE_ATTRIBUTES),r=0;r<s;r++){var o=i.getActiveAttrib(t,r),a=i.getAttribLocation(t,o.name);this.glAttributeNames.set(o.name,r),this.glAttributes[r]={location:a,name:o.name,size:o.size,type:o.type}}this.glUniforms.each(function(t,e){n.uniformRequests.has(t)||n.uniformRequests.set(t,e.value)}),this.glUniforms.clear();var h=i.getProgramParameter(t,i.ACTIVE_UNIFORMS);for(r=0;r<h;r++){var l=i.getActiveUniform(t,r),u=e.shaderSetters.constants[l.type],d=0,c=l.size*u.size;c>1&&(d=u.baseType===i.FLOAT?new Float32Array(c):new Int32Array(c)),this.glUniforms.set(l.name,{location:i.getUniformLocation(t,l.name),size:l.size,type:l.type,value:d})}},setUniform:function(t,e){this.uniformRequests.set(t,e)},bind:function(){this.renderer.glWrapper.updateBindingsProgram(this.glState),this.uniformRequests.each(this._processUniformRequest.bind(this)),this.uniformRequests.clear()},_processUniformRequest:function(t,e){var i=this.renderer,n=i.gl,r=this.glUniforms.get(t);if(r){var o=r.value;if(o.length){for(var a=!1,h=0;h<o.length;h++)s(o[h],e[h])&&(a=!0,o[h]=e[h]);if(!a)return}else{if(!s(o,e))return;o=e,r.value=e}var l=r.location,u=r.type,d=r.size,c=i.shaderSetters.constants[u];if(c.isMatrix)c.set.call(n,l,!1,o);else if(d>1)c.setV.call(n,l,o);else switch(c.size){case 1:c.set.call(n,l,e);break;case 2:c.set.call(n,l,e[0],e[1]);break;case 3:c.set.call(n,l,e[0],e[1],e[2]);break;case 4:c.set.call(n,l,e[0],e[1],e[2],e[3])}}},destroy:function(){if(this.webGLProgram){var t=this.renderer.gl;if(!t.isContextLost()){this._vertexShader&&t.deleteShader(this._vertexShader),this._fragmentShader&&t.deleteShader(this._fragmentShader),t.deleteProgram(this.webGLProgram);for(var e=0;e<this.glAttributes.length;e++)t.disableVertexAttribArray(this.glAttributes[e].location);this.glAttributes.length=0,this.glUniforms.clear()}this.glAttributeBuffer=null,this.glAttributeNames.clear(),this.uniformRequests.clear(),this._vertexShader=null,this._fragmentShader=null,this.webGLProgram=null,this.renderer=null}}})},86272(t,e,i){t.exports=new(i(83419))({initialize:function(t){var e=t.gl;this.constants={5124:{constant:e.INT,baseType:e.INT,size:1,bytes:4,set:e.uniform1i,setV:e.uniform1iv,isMatrix:!1},35667:{constant:e.INT_VEC2,baseType:e.INT,size:2,bytes:4,set:e.uniform2i,setV:e.uniform2iv,isMatrix:!1},35668:{constant:e.INT_VEC3,baseType:e.INT,size:3,bytes:4,set:e.uniform3i,setV:e.uniform3iv,isMatrix:!1},35669:{constant:e.INT_VEC4,baseType:e.INT,size:4,bytes:4,set:e.uniform4i,setV:e.uniform4iv,isMatrix:!1}
1,5126:{constant:e.FLOAT,baseType:e.FLOAT,size:1,bytes:4,set:e.uniform1f,setV:e.uniform1fv,isMatrix:!1},35664:{constant:e.FLOAT_VEC2,baseType:e.FLOAT,size:2,bytes:4,set:e.uniform2f,setV:e.uniform2fv,isMatrix:!1},35665:{constant:e.FLOAT_VEC3,baseType:e.FLOAT,size:3,bytes:4,set:e.uniform3f,setV:e.uniform3fv,isMatrix:!1},35666:{constant:e.FLOAT_VEC4,baseType:e.FLOAT,size:4,bytes:4,set:e.uniform4f,setV:e.uniform4fv,isMatrix:!1},5125:{constant:e.UNSIGNED_INT,baseType:e.UNSIGNED_INT,size:1,bytes:4,set:e.uniform1i,setV:e.uniform1iv,isMatrix:!1},5120:{constant:e.BYTE,baseType:e.BYTE,size:1,bytes:1,set:e.uniform1i,setV:e.uniform1iv,isMatrix:!1},5121:{constant:e.UNSIGNED_BYTE,baseType:e.UNSIGNED_BYTE,size:1,bytes:1,set:e.uniform1i,setV:e.uniform1iv,isMatrix:!1},5122:{constant:e.SHORT,baseType:e.SHORT,size:1,bytes:2,set:e.uniform1i,setV:e.uniform1iv,isMatrix:!1},5123:{constant:e.UNSIGNED_SHORT,baseType:e.UNSIGNED_SHORT,size:1,bytes:2,set:e.uniform1i,setV:e.uniform1iv,isMatrix:!1},35670:{constant:e.BOOL,baseType:e.BOOL,size:1,bytes:4,set:e.uniform1i,setV:e.uniform1iv,isMatrix:!1},35671:{constant:e.BOOL_VEC2,baseType:e.BOOL,size:2,bytes:4,set:e.uniform2i,setV:e.uniform2iv,isMatrix:!1},35672:{constant:e.BOOL_VEC3,baseType:e.BOOL,size:3,bytes:4,set:e.uniform3i,setV:e.uniform3iv,isMatrix:!1},35673:{constant:e.BOOL_VEC4,baseType:e.BOOL,size:4,bytes:4,set:e.uniform4i,setV:e.uniform4iv,isMatrix:!1},35674:{constant:e.FLOAT_MAT2,baseType:e.FLOAT,size:4,bytes:4,set:e.uniformMatrix2fv,setV:e.uniformMatrix2fv,isMatrix:!0},35675:{constant:e.FLOAT_MAT3,baseType:e.FLOAT,size:9,bytes:4,set:e.uniformMatrix3fv,setV:e.uniformMatrix3fv,isMatrix:!0},35676:{constant:e.FLOAT_MAT4,baseType:e.FLOAT,size:16,bytes:4,set:e.uniformMatrix4fv,setV:e.uniformMatrix4fv,isMatrix:!0},35678:{constant:e.SAMPLER_2D,baseType:e.INT,size:1,bytes:4,set:e.uniform1i,setV:e.uniform1iv,isMatrix:!1},35680:{constant:e.SAMPLER_CUBE,baseType:e.INT,size:1,bytes:4,set:e.uniform1i,setV:e.uniform1iv,isMatrix:!1}}}})},13760(t,e,i){t.exports=new(i(83419))({initialize:function(t){this.renderer=t,this.units=[],this.unitIndices=[],this.init()},init:function(){var t=this.renderer.gl;this.units.length=0,this.unitIndices.length=0;for(var e=t.createTexture(),i=this.renderer.maxTextures-1;i>=0;i--)this.units[i]=void 0,this.renderer.glWrapper.updateBindingsActiveTexture({bindings:{activeTexture:i}}),t.bindTexture(t.TEXTURE_2D,e),this.unitIndices[i]=i;t.texImage2D(t.TEXTURE_2D,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,new Uint8Array([0,0,255,255]))},bind:function(t,e,i,n){var s=this.units[e]!==t;if((i||!1!==n||s)&&this.renderer.glWrapper.updateBindingsActiveTexture({bindings:{activeTexture:e}},i),s||i){this.units[e]=t;var r=t?t.webGLTexture:null,o=this.renderer.gl;o.bindTexture(o.TEXTURE_2D,r)}},bindUnits:function(t,e){for(var i=Math.min(t.length,this.renderer.maxTextures),n=i-1;n>=0;n--)void 0!==t[n]&&this.bind(t[n],n,e,!1)},unbindTexture:function(t){for(var e=this.units.length-1;e>=0;e--)this.units[e]===t&&this.bind(null,e,!0,!1)},unbindAllUnits:function(){for(var t=this.units.length-1;t>=0;t--)this.bind(null,t,!0,!1)}})},82751(t,e,i){var n=i(83419),s=i(50030),r=new n({initialize:function(t,e,i,n,s,r,o,a,h,l,u,d,c){void 0===c&&(c=!0),this.renderer=t,this.webGLTexture=null,this.isRenderTexture=!1,this.mipLevel=e,this.minFilter=i,this.magFilter=n,this.wrapT=s,this.wrapS=r,this.format=o,this.pixels=a,this.width=h,this.height=l,this.pma=null==u||u,this.forceSize=!!d,this.flipY=!!c,this.__SPECTOR_Metadata={},this.batchUnit=-1,this.createResource()},createResource:function(){var t=this.renderer.gl;if(!t.isContextLost()){if(this.pixels instanceof r){this.webGLTexture=this.pixels.webGLTexture;return}var e=t.createTexture();e.__SPECTOR_Metadata=this.__SPECTOR_Metadata,this.webGLTexture=e,this._processTexture()}},resize:function(t,e){if(this.width!==t||this.height!==e){this.width=t,this.height=e;var i=this.renderer.gl;s(t,e)?(this.wrapS=i.REPEAT,this.wrapT=i.REPEAT):(this.wrapS=i.CLAMP_TO_EDGE,this.wrapT=i.CLAMP_TO_EDGE),this._processTexture()}},update:function(t,e,i,n,s,r,o,a,h){0!==e&&0!==i&&(this.pixels=t,this.width=e,this.height=i,this.flipY=n,this.wrapS=s,this.wrapT=r,this.minFilter=o,this.magFilter=a,this.format=h,this._processTexture())},_processTexture:function(){var t=this.renderer.gl;this.renderer.glTextureUnits.bind(this,0),this.renderer.glWrapper.updateTexturing({texturing:{flipY:this.flipY,premultiplyAlpha:this.pma}}),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,this.minFilter),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,this.magFilter),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,this.wrapS),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,this.wrapT);var e=this.pixels,i=this.mipLevel,n=this.width,r=this.height,o=this.format,a=!1;if(null==e)t.texImage2D(t.TEXTURE_2D,i,o,n,r,0,o,t.UNSIGNED_BYTE,null),a=s(n,r);else if(e.compressed){n=e.width,r=e.height,a=e.generateMipmap;for(var h=0;h<e.mipmaps.length;h++)t.compressedTexImage2D(t.TEXTURE_2D,h,e.internalFormat,e.mipmaps[h].width,e.mipmaps[h].height,0,e.mipmaps[h].data)}else e instanceof Uint8Array?t.texImage2D(t.TEXTURE_2D,i,o,n,r,0,o,t.UNSIGNED_BYTE,e):(this.forceSize||(n=e.width,r=e.height),t.texImage2D(t.TEXTURE_2D,i,o,o,t.UNSIGNED_BYTE,e)),a=s(n,r);a&&t.generateMipmap(t.TEXTURE_2D)},spectorMetadata:{get:function(){return this.__SPECTOR_Metadata},set:function(t){this.__SPECTOR_Metadata=t,this.webGLTexture.__SPECTOR_Metadata=t}},destroy:function(){null!==this.webGLTexture&&(this.pixels instanceof r||this.renderer.gl.deleteTexture(this.webGLTexture),this.pixels=null,this.webGLTexture=null,this.renderer=null)}});t.exports=r}
vendor: 5,638 bytes, line 1
1,85788(t,e,i){t.exports=new(i(83419))({initialize:function(t,e,i,n){this.renderer=t,this.program=e,this.vertexArrayObject=null,this.indexBuffer=i,this.attributeBufferLayouts=n,this.glState={vao:this},this.createResource()},createResource:function(){var t=this.renderer.gl;this.vertexArrayObject=t.createVertexArray(),this.bind(),this.indexBuffer&&this.indexBuffer.bind();for(var e=this.program,i=e.glAttributes,n=e.glAttributeNames,s=0;s<this.attributeBufferLayouts.length;s++){var r=this.attributeBufferLayouts[s];r.buffer.bind();for(var o=r.layout.stride,a=r.layout.instanceDivisor,h=0;h<r.layout.layout.length;h++){var l=r.layout.layout[h],u=n.get(l.name);if(void 0!==u){l.location=i[u].location;for(var d=l.location,c=l.bytes||4,f=l.columns||1,p=l.normalized,g=l.offset,m=l.size,v=l.type,x=0;x<f;x++)t.enableVertexAttribArray(d+x),t.vertexAttribPointer(d+x,m,v,p,o,g+c*x*m),isNaN(a)||t.vertexAttribDivisor(d+x,a)}}}this.renderer.glWrapper.updateVAO({vao:null}),this.renderer.glWrapper.updateBindings({bindings:{arrayBuffer:null,elementArrayBuffer:null}})},bind:function(){this.renderer.glWrapper.updateVAO(this.glState)},destroy:function(){var t=this.renderer.gl;this.vertexArrayObject&&(t.deleteVertexArray(this.vertexArrayObject),this.vertexArrayObject=null),this.indexBuffer=null,this.attributeBufferLayouts=null,this.glState=null,this.renderer=null}})},40952(t,e,i){t.exports=new(i(83419))({initialize:function(t,e,i){this.renderer=t,this.layout=e,this.completeLayout(e);var n=e.stride*e.count;if(i&&i.byteLength<n)throw Error("Buffer too small for layout");this.buffer=i||t.createVertexBuffer(new ArrayBuffer(n),e.usage)},completeLayout:function(t){var e=this.renderer.gl,i=t.layout,n=this.renderer.shaderSetters.constants;"string"==typeof t.usage&&(t.usage=e[t.usage]);for(var s=0,r=0;r<i.length;r++){var o=i[r],a=o.size,h=o.columns||1;o.offset=s,"string"==typeof o.type&&(o.type=e[o.type]);var l=n[o.type],u=l.size,d=l.bytes;o.bytes=d,s+=a*h*d*u}t.stride=s}})},31884(t,e,i){t.exports={WebGLGlobalWrapper:i(37959),WebGLBufferWrapper:i(26128),WebGLProgramWrapper:i(1482),WebGLShaderSetterWrapper:i(86272),WebGLTextureWrapper:i(82751),WebGLTextureUnitsWrapper:i(13760),WebGLFramebufferWrapper:i(84387),WebGLVAOWrapper:i(85788),WebGLVertexBufferLayoutWrapper:i(40952)}},76531(t,e,i){var n=i(13560),s=i(83419),r=i(45319),o=i(50792),a=i(97480),h=i(8443),l=i(57811),u=i(74403),d=i(45818),c=i(29747),f=i(87841),p=i(86555),g=i(56583),m=i(26099),v=i(38058);t.exports=new s({Extends:o,initialize:function(t){o.call(this),this.game=t,this.canvas,this.canvasBounds=new f,this.parent=null,this.parentIsWindow=!1,this.parentSize=new p,this.gameSize=new p,this.baseSize=new p,this.displaySize=new p,this.scaleMode=n.SCALE_MODE.NONE,this.zoom=1,this._resetZoom=!1,this.displayScale=new m(1,1),this.autoRound=!1,this.autoCenter=n.CENTER.NO_CENTER,this.orientation=n.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:c,windowResize:c,fullScreenChange:c,fullScreenError:c}},preBoot:function(){this.parseConfig(this.game.config),this.game.events.once(h.BOOT,this.boot,this)},boot:function(){var t=this.game;this.canvas=t.canvas,this.fullscreen=t.device.fullscreen;var e=this.scaleMode;e!==n.SCALE_MODE.RESIZE&&e!==n.SCALE_MODE.EXPAND&&this.displaySize.setAspectMode(e),e===n.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()),t.events.on(h.PRE_STEP,this.step,this),t.events.once(h.READY,this.refresh,this),t.events.once(h.DESTROY,this.destroy,this),this.startListeners()},parseConfig:function(t){this.getParent(t),this.getParentBounds();var e=t.width,i=t.height,s=t.scaleMode,r=t.zoom,o=t.autoRound;if("string"==typeof e)if("%"!==e.substr(-1))e=parseInt(e,10);else{var a=this.parentSize.width;0===a&&(a=window.innerWidth),e=Math.floor(a*(parseInt(e,10)/100))}if("string"==typeof i)if("%"!==i.substr(-1))i=parseInt(i,10);else{var h=this.parentSize.height;0===h&&(h=window.innerHeight),i=Math.floor(h*(parseInt(i,10)/100))}this.scaleMode=s,this.autoRound=o,this.autoCenter=t.autoCenter,this.resizeInterval=t.resizeInterval,o&&(e=Math.floor(e),i=Math.floor(i)),this.gameSize.setSize(e,i),r===n.ZOOM.MAX_ZOOM&&(r=this.getMaxZoom()),this.zoom=r,1!==r&&(this._resetZoom=!0),this.baseSize.setSize(e,i),o&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),t.minWidth>0&&this.displaySize.setMin(t.minWidth*r,t.minHeight*r),t.maxWidth>0&&this.displaySize.setMax(t.maxWidth*r,t.maxHeight*r),this.displaySize.setSize(e,i),(t.snapWidth>0||t.snapHeight>0)&&this.displaySize.setSnap(t.snapWidth,t.snapHeight),this.orientation=d(e,i)},getParent:function(t){var e=t.parent;if(null!==e){if(this.parent=u(e),this.parentIsWindow=this.parent===document.body,t.expandParent&&t.scaleMode!==n.SCALE_MODE.NONE){var i=this.parent.getBoundingClientRect();(this.parentIsWindow||0===i.height)&&(document.documentElement.style.height="100%",document.body.style.height="100%",i=this.parent.getBoundingClientRect(),this.parentIsWindow||0!==i.height||(this.parent.style.overflow="hidden",this.parent.style.width="100%",this.parent.style.height="100%"))}t.fullscreenTarget&&!this.fullscreenTarget&&(this.fullscreenTarget=u(t.fullscreenTarget))}},getParentBounds:function(){if(!this.parent)return!1;var t=this.parentSize,e=this.parent.getBoundingClientRect();this.parentIsWindow&&this.game.device.os.iOS&&(e.height=l(!0));
1var i=e.width,n=e.height;if(t.width!==i||t.height!==n)return t.setSize(i,n),!0;if(this.canvas){var s=this.canvasBounds,r=this.canvas.getBoundingClientRect();if(r.x!==s.x||r.y!==s.y)return!0}return!1},lockOrientation:function(t){var e=screen.lockOrientation||screen.mozLockOrientation||screen.msLockOrientation;return!!e&&e.call(screen,t)},setParentSize:function(t,e){return this.parentSize.setSize(t,e),this.refresh()},setGameSize:function(t,e){var i=this.autoRound;i&&(t=Math.floor(t),e=Math.floor(e));var n=this.width,s=this.height;return this.gameSize.resize(t,e),this.baseSize.resize(t,e),i&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setAspectRatio(t/e),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height,this.refresh(n,s)},resize:function(t,e){var i=this.zoom,n=this.autoRound;n&&(t=Math.floor(t),e=Math.floor(e));var s=this.width,r=this.height;this.gameSize.resize(t,e),this.baseSize.resize(t,e),n&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setSize(t*i,e*i),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height;var o=this.canvas.style,a=t*i,h=e*i;return n&&(a=Math.floor(a),h=Math.floor(h)),(a!==t||h!==e)&&(o.width=a+"px",o.height=h+"px"),this.refresh(s,r)},setZoom:function(t){return this.zoom=t,this._resetZoom=!0,this.refresh()},setMaxZoom:function(){return this.zoom=this.getMaxZoom(),this._resetZoom=!0,this.refresh()},setSnap:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.displaySize.setSnap(t,e),this.refresh()},refresh:function(t,e){void 0===t&&(t=this.width),void 0===e&&(e=this.height),this.updateScale(),this.updateBounds(),this.updateOrientation(),this.displayScale.set(this.baseSize.width/this.canvasBounds.width,this.baseSize.height/this.canvasBounds.height);var i=this.game.domContainer;if(i){this.baseSize.setCSS(i);var n=this.canvas.style,s=i.style;s.transform="scale("+this.displaySize.width/this.baseSize.width+","+this.displaySize.height/this.baseSize.height+")",s.marginLeft=n.marginLeft,s.marginTop=n.marginTop}return this.emit(a.RESIZE,this.gameSize,this.baseSize,this.displaySize,t,e),this},updateOrientation:function(){if(this._checkOrientation){this._checkOrientation=!1;var t=d(this.width,this.height);t!==this.orientation&&(this.orientation=t,this.emit(a.ORIENTATION_CHANGE,t))}},updateScale:function(){var t=this.canvas.style,e=this.gameSize.width,i=this.gameSize.height,s=this.zoom,o=this.autoRound;if(this.scaleMode===n.SCALE_MODE.NONE)this.displaySize.setSize(e*s,i*s),a=this.displaySize.width,h=this.displaySize.height,o&&(a=Math.floor(a),h=Math.floor(h)),this._resetZoom&&(t.width=a+"px",t.height=h+"px",this._resetZoom=!1);else if(this.scaleMode===n.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),a=this.displaySize.width,h=this.displaySize.height,o&&(a=Math.floor(a),h=Math.floor(h)),this.canvas.width=a,this.canvas.height=h;else if(this.scaleMode===n.SCALE_MODE.EXPAND){var a,h,l,u,d=this.game.config.width,c=this.game.config.height,f=this.parentSize.width,p=this.parentSize.height,g=f/d,m=p/c;g<m?(l=d,u=0!==g?p/g:c):(l=0!==m?f/m:d,u=c);var v=r(l,this.displaySize.minWidth,this.displaySize.maxWidth),x=r(u,this.displaySize.minHeight,this.displaySize.maxHeight);this.baseSize.setSize(v,x),this.gameSize.setSize(v,x),o&&(v=Math.floor(v),x=Math.floor(x)),this.canvas.width=v,this.canvas.height=x;var y=v/l*f,T=x/u*p;this.displaySize.setSize(y,T),a=this.displaySize.width,h=this.displaySize.height,o&&(a=Math.floor(a),h=Math.floor(h)),t.width=a+"px",t.height=h+"px"}else this.displaySize.setSize(this.parentSize.width,this.parentSize.height),a=this.displaySize.width,h=this.displaySize.height,o&&(a=Math.floor(a),h=Math.floor(h)),t.width=a+"px",t.height=h+"px";this.getParentBounds(),this.updateCenter()},getMaxZoom:function(){return Math.max(Math.min(g(this.parentSize.width,this.gameSize.width,0,!0),g(this.parentSize.height,this.gameSize.height,0,!0)),1)},updateCenter:function(){var t=this.autoCenter;if(t!==n.CENTER.NO_CENTER){var e=this.canvas,i=e.style,s=e.getBoundingClientRect(),r=s.width,o=s.height,a=Math.floor((this.parentSize.width-r)/2),h=Math.floor((this.parentSize.height-o)/2);t===n.CENTER.CENTER_HORIZONTALLY?h=0:t===n.CENTER.CENTER_VERTICALLY&&(a=0),i.marginLeft=a+"px",i.marginTop=h+"px"}},updateBounds:function(){var t=this.canvasBounds,e=this.canvas.getBoundingClientRect();t.x=e.left+(window.pageXOffset||0)-(document.documentElement.clientLeft||0),t.y=e.top+(window.pageYOffset||0)-(document.documentElement.clientTop||0),t.width=e.width,t.height=e.height},transformX:function(t){return(t-this.canvasBounds.left)*this.displayScale.x},transformY:function(t){return(t-this.canvasBounds.top)*this.displayScale.y},startFullscreen:function(t){void 0===t&&(t={navigationUI:"hide"});var e=this.fullscreen;
1if(!e.available)return void this.emit(a.FULLSCREEN_UNSUPPORTED);if(!e.active){var i=this.getFullscreenTarget();e.keyboard?i[e.request](Element.ALLOW_KEYBOARD_INPUT):i[e.request](t)}},fullscreenSuccessHandler:function(){this.getParentBounds(),this.refresh(),this.emit(a.ENTER_FULLSCREEN)},fullscreenErrorHandler:function(t){this.removeFullscreenTarget(),this.emit(a.FULLSCREEN_FAILED,t)},getFullscreenTarget:function(){if(!this.fullscreenTarget){var t=document.createElement("div");t.style.margin="0",t.style.padding="0",t.style.width="100%",t.style.height="100%",this.fullscreenTarget=t,this._createdFullscreenTarget=!0}return this._createdFullscreenTarget&&(this.canvas.parentNode.insertBefore(this.fullscreenTarget,this.canvas),this.fullscreenTarget.appendChild(this.canvas)),this.fullscreenTarget},removeFullscreenTarget:function(){if(this._createdFullscreenTarget){var t=this.fullscreenTarget;if(t&&t.parentNode){var e=t.parentNode;e.insertBefore(this.canvas,t),e.removeChild(t)}}},stopFullscreen:function(){var t=this.fullscreen;if(!t.available)return this.emit(a.FULLSCREEN_UNSUPPORTED),!1;t.active&&document[t.cancel](),this.removeFullscreenTarget()},leaveFullScreenSuccessHandler:function(){this.getParentBounds(),this.emit(a.LEAVE_FULLSCREEN),this.refresh()},toggleFullscreen:function(t){this.fullscreen.active?this.stopFullscreen():this.startFullscreen(t)},startListeners:function(){var t=this,e=this.domlisteners;e.orientationChange=function(){t.updateBounds(),t._checkOrientation=!0,t.dirty=!0,t.refresh()},e.windowResize=function(){t.updateBounds(),t.dirty=!0},screen.orientation&&screen.orientation.addEventListener?screen.orientation.addEventListener("change",e.orientationChange,!1):window.addEventListener("orientationchange",e.orientationChange,!1),window.addEventListener("resize",e.windowResize,!1),this.fullscreen.available&&(e.fullScreenChange=function(e){return t.onFullScreenChange(e)},e.fullScreenError=function(e){return t.onFullScreenError(e)},["webkit","moz",""].forEach(function(t){document.addEventListener(t+"fullscreenchange",e.fullScreenChange,!1),document.addEventListener(t+"fullscreenerror",e.fullScreenError,!1)}),document.addEventListener("MSFullscreenChange",e.fullScreenChange,!1),document.addEventListener("MSFullscreenError",e.fullScreenError,!1))},onFullScreenChange:function(){document.fullscreenElement||document.webkitFullscreenElement||document.msFullscreenElement||document.mozFullScreenElement?this.fullscreenSuccessHandler():(this.stopFullscreen(),this.leaveFullScreenSuccessHandler())},onFullScreenError:function(){this.removeFullscreenTarget()},getViewPort:function(t,e){t instanceof v||(e=t,t=void 0),void 0===e&&(e=new f);var i,n,s=this.baseSize,r=this.parentSize,o=this.canvasBounds,a=this.displayScale,h=o.x>=0?0:-(o.x*a.x),l=o.y>=0?0:-(o.y*a.y);return i=r.width>=o.width?s.width:s.width-(o.width-r.width)*a.x,n=r.height>=o.height?s.height:s.height-(o.height-r.height)*a.y,e.setTo(h,l,i,n),t&&(e.width/=t.zoomX,e.height/=t.zoomY,e.centerX=t.centerX+t.scrollX,e.centerY=t.centerY+t.scrollY),e},step:function(t,e){this.parent&&(this._lastCheck+=e,(this.dirty||this._lastCheck>this.resizeInterval)&&(this.getParentBounds()&&this.refresh(),this.dirty=!1,this._lastCheck=0))},stopListeners:function(){var t=this.domlisteners;screen.orientation&&screen.orientation.addEventListener?screen.orientation.removeEventListener("change",t.orientationChange,!1):window.removeEventListener("orientationchange",t.orientationChange,!1),window.removeEventListener("resize",t.windowResize,!1),["webkit","moz",""].forEach(function(e){document.removeEventListener(e+"fullscreenchange",t.fullScreenChange,!1),document.removeEventListener(e+"fullscreenerror",t.fullScreenError,!1)}),document.removeEventListener("MSFullscreenChange",t.fullScreenChange,!1),document.removeEventListener("MSFullscreenError",t.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===n.ORIENTATION.PORTRAIT}},isLandscape:{get:function(){return this.orientation===n.ORIENTATION.LANDSCAPE}},isGamePortrait:{get:function(){return this.height>this.width}},isGameLandscape:{get:function(){return this.width>this.height}}})},64743(t){t.exports={NO_CENTER:0,CENTER_BOTH:1,CENTER_HORIZONTALLY:2,CENTER_VERTICALLY:3}},39218(t){t.exports={LANDSCAPE:"landscape-primary",LANDSCAPE_SECONDARY:"landscape-secondary",PORTRAIT:"portrait-primary",PORTRAIT_SECONDARY:"portrait-secondary"}},81050(t){t.exports={NONE:0,WIDTH_CONTROLS_HEIGHT:1,HEIGHT_CONTROLS_WIDTH:2,FIT:3,ENVELOP:4,RESIZE:5,EXPAND:6}},80805(t){t.exports={NO_ZOOM:1,ZOOM_2X:2,ZOOM_4X:4,MAX_ZOOM:-1}}
vendor: 2,648 bytes, line 1
1,13560(t,e,i){t.exports={CENTER:i(64743),ORIENTATION:i(39218),SCALE_MODE:i(81050),ZOOM:i(80805)}},56139(t){t.exports="enterfullscreen"},2336(t){t.exports="fullscreenfailed"},47412(t){t.exports="fullscreenunsupported"},51452(t){t.exports="leavefullscreen"},20666(t){t.exports="orientationchange"},47945(t){t.exports="resize"},97480(t,e,i){t.exports={ENTER_FULLSCREEN:i(56139),FULLSCREEN_FAILED:i(2336),FULLSCREEN_UNSUPPORTED:i(47412),LEAVE_FULLSCREEN:i(51452),ORIENTATION_CHANGE:i(20666),RESIZE:i(47945)}},93364(t,e,i){var n=i(79291),s=i(13560),r={Center:i(64743),Events:i(97480),Orientation:i(39218),ScaleManager:i(76531),ScaleModes:i(81050),Zoom:i(80805)};r=n(!1,r,s.CENTER),r=n(!1,r,s.ORIENTATION),r=n(!1,r,s.SCALE_MODE),t.exports=n(!1,r,s.ZOOM)},27397(t,e,i){var n=i(95540),s=i(35355);t.exports=function(t){var e=t.game.config.defaultPhysicsSystem,i=n(t.settings,"physics",!1);if(e||i){var r=[];if(e&&r.push(s(e+"Physics")),i)for(var o in i)o=s(o.concat("Physics")),-1===r.indexOf(o)&&r.push(o);return r}}},52106(t,e,i){var n=i(95540);t.exports=function(t){var e=t.plugins.getDefaultScenePlugins(),i=n(t.settings,"plugins",!1);return Array.isArray(i)?i:e||[]}},87033(t){t.exports={game:"game",renderer:"renderer",anims:"anims",cache:"cache",plugins:"plugins",registry:"registry",scale:"scale",sound:"sound",textures:"textures",events:"events",cameras:"cameras",add:"add",make:"make",scenePlugin:"scene",displayList:"children",lights:"lights",data:"data",input:"input",load:"load",time:"time",tweens:"tweens",arcadePhysics:"physics",matterPhysics:"matter"}},97482(t,e,i){var n=i(83419),s=i(2368);t.exports=new n({initialize:function(t){this.sys=new s(this,t),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(){}})},60903(t,e,i){var n=i(83419),s=i(89993),r=i(44594),o=i(8443),a=i(35154),h=i(54899),l=i(29747),u=i(97482),d=i(2368);t.exports=new n({initialize:function(t,e){if(this.game=t,this.keys={},this.scenes=[],this._pending=[],this._start=[],this._queue=[],this._data={},this.isProcessing=!1,this.isBooted=!1,this.customViewports=0,this.systemScene,e){Array.isArray(e)||(e=[e]);for(var i=0;i<e.length;i++)this._pending.push({key:"default",scene:e[i],autoStart:0===i,data:{}})}t.events.once(o.READY,this.bootQueue,this)},bootQueue:function(){var t,e,i,n,s;if(!this.isBooted){for(this.systemScene=this.createSceneFromInstance("__SYSTEM",new u),this.game.events.emit(o.SYSTEM_READY,this.systemScene,this),t=0;
1t<this._pending.length;t++)i=(e=this._pending[t]).key,(n=e.scene)instanceof u?s=this.createSceneFromInstance(i,n):"object"==typeof n?s=this.createSceneFromObject(i,n):"function"==typeof n&&(s=this.createSceneFromFunction(i,n)),i=s.sys.settings.key,this.keys[i]=s,this.scenes.push(s),this._data[i]&&(s.sys.settings.data=this._data[i].data,this._data[i].autoStart&&(e.autoStart=!0)),(e.autoStart||s.sys.settings.active)&&this._start.push(i);for(t=0,this._pending.length=0,this._data={},this.isBooted=!0;t<this._start.length;t++)e=this._start[t],this.start(e);this._start.length=0}},processQueue:function(){var t,e,i=this._pending.length,n=this._queue.length;if(0!==i||0!==n){if(i){for(t=0;t<i;t++)e=this._pending[t],this.add(e.key,e.scene,e.autoStart,e.data);for(t=0;t<this._start.length;t++)e=this._start[t],this.start(e);this._start.length=0,this._pending.length=0}for(t=0;t<this._queue.length;t++)this[(e=this._queue[t]).op](e.keyA,e.keyB,e.data);this._queue.length=0}},add:function(t,e,i,n){var s;return(void 0===i&&(i=!1),void 0===n&&(n={}),this.isProcessing||!this.isBooted)?(this._pending.push({key:t,scene:e,autoStart:i,data:n}),this.isBooted||(this._data[t]={data:n}),null):(t=this.getKey(t,e),e instanceof u?s=this.createSceneFromInstance(t,e):"object"==typeof e?(e.key=t,s=this.createSceneFromObject(t,e)):"function"==typeof e&&(s=this.createSceneFromFunction(t,e)),s.sys.settings.data=n,t=s.sys.settings.key,this.keys[t]=s,this.scenes.push(s),(i||s.sys.settings.active)&&(this._pending.length?this._start.push(t):this.start(t)),s)},remove:function(t){if(this.isProcessing)return this.queueOp("remove",t);var e=this.getScene(t);if(!e||e.sys.isTransitioning())return this;var i=this.scenes.indexOf(e),n=e.sys.settings.key;return i>-1&&(delete this.keys[n],this.scenes.splice(i,1),this._start.indexOf(n)>-1&&(i=this._start.indexOf(n),this._start.splice(i,1)),e.sys.destroy()),this},bootScene:function(t){var e,i=t.sys,n=i.settings;i.sceneUpdate=l,t.init&&(t.init.call(t,n.data),n.status=s.INIT,n.isTransition&&i.events.emit(r.TRANSITION_INIT,n.transitionFrom,n.transitionDuration)),i.load&&(e=i.load).reset(),e&&t.preload?(t.preload.call(t),n.status=s.LOADING,e.once(h.COMPLETE,this.loadComplete,this),e.start()):this.create(t)},loadComplete:function(t){this.create(t.scene)},payloadComplete:function(t){this.bootScene(t.scene)},update:function(t,e){this.processQueue(),this.isProcessing=!0;for(var i=this.scenes.length-1;i>=0;i--){var n=this.scenes[i].sys;n.settings.status>s.START&&n.settings.status<=s.RUNNING&&n.step(t,e),n.scenePlugin&&n.scenePlugin._target&&n.scenePlugin.step(t,e)}},render:function(t){for(var e=0;e<this.scenes.length;e++){var i=this.scenes[e].sys;i.settings.visible&&i.settings.status>=s.LOADING&&i.settings.status<s.SLEEPING&&i.render(t)}this.isProcessing=!1},create:function(t){var e=t.sys,i=e.settings;t.create&&(i.status=s.CREATING,t.create.call(t,i.data),i.status===s.DESTROYED)||(i.isTransition&&e.events.emit(r.TRANSITION_START,i.transitionFrom,i.transitionDuration),t.update&&(e.sceneUpdate=t.update),i.status=s.RUNNING,e.events.emit(r.CREATE,t))},createSceneFromFunction:function(t,e){var i=new e;if(!(i instanceof u))return i.sys=new d(i),i.sys.settings.key=t,i.sys.init(this.game),i;var n=i.sys.settings.key;if(""!==n&&(t=n),this.keys.hasOwnProperty(t))throw Error("Cannot add Scene with duplicate key: "+t);return this.createSceneFromInstance(t,i)},createSceneFromInstance:function(t,e){return""===e.sys.settings.key&&(e.sys.settings.key=t),e.sys.init(this.game),e},createSceneFromObject:function(t,e){var i=new u(e),n=i.sys.settings.key;""!==n?t=n:i.sys.settings.key=t,i.sys.init(this.game);for(var s=["init","preload","create","update","render"],r=0;r<s.length;r++){var o=a(e,s[r],null);o&&(i[s[r]]=o)}if(e.hasOwnProperty("extend")){for(var h in e.extend)if(e.extend.hasOwnProperty(h)){var l=e.extend[h];"data"===h&&i.hasOwnProperty("data")&&"object"==typeof l?i.data.merge(l):"sys"!==h&&(i[h]=l)}}return i},getKey:function(t,e){if(t||(t="default"),"function"==typeof e)return t;if(e instanceof u?t=e.sys.settings.key:"object"==typeof e&&e.hasOwnProperty("key")&&(t=e.key),!this.keys.hasOwnProperty(t))return t;throw Error("Cannot add Scene with duplicate key: "+t)},getScenes:function(t,e){void 0===t&&(t=!0),void 0===e&&(e=!1);for(var i=[],n=this.scenes,s=0;s<n.length;s++){var r=n[s];r&&(!t||t&&r.sys.isActive())&&i.push(r)}return e?i.reverse():i},getScene:function(t){if("string"==typeof t){if(this.keys[t])return this.keys[t]}else for(var e=0;e<this.scenes.length;e++)if(t===this.scenes[e])return t;return null},isActive:function(t){var e=this.getScene(t);return e?e.sys.isActive():null},isPaused:function(t){var e=this.getScene(t);return e?e.sys.isPaused():null},isVisible:function(t){var e=this.getScene(t);return e?e.sys.isVisible():null},isSleeping:function(t){var e=this.getScene(t);return e?e.sys.isSleeping():null},pause:function(t,e){var i=this.getScene(t);return i&&i.sys.pause(e),this},resume:function(t,e){var i=this.getScene(t);return i&&i.sys.resume(e),this},sleep:function(t,e){var i=this.getScene(t);return i&&!i.sys.isTransitioning()&&i.sys.sleep(e),this},wake:function(t,e){var i=this.getScene(t);return i&&i.sys.wake(e),this},run:function(t,e){var i=this.getScene(t);if(!i){for(var n=0;
vendor: 13,004 bytes, line 1
1n<this._pending.length;n++)if(this._pending[n].key===t){this.queueOp("start",t,e);break}return this}i.sys.isSleeping()?i.sys.wake(e):i.sys.isPaused()?i.sys.resume(e):this.start(t,e)},start:function(t,e){if(!this.isBooted)return this._data[t]={autoStart:!0,data:e},this;var i,n=this.getScene(t);if(!n)return console.warn("Scene key not found: "+t),this;var r=n.sys,o=r.settings.status;if(o>=s.START&&o<=s.CREATING)return this;if(o>=s.RUNNING&&o<=s.SLEEPING)r.shutdown(),r.sceneUpdate=l,r.start(e);else if(r.sceneUpdate=l,r.start(e),r.load&&(i=r.load),i&&r.settings.hasOwnProperty("pack")&&(i.reset(),i.addPack({payload:r.settings.pack})))return r.settings.status=s.LOADING,i.once(h.COMPLETE,this.payloadComplete,this),i.start(),this;return this.bootScene(n),this},stop:function(t,e){var i=this.getScene(t);if(i&&!i.sys.isTransitioning()&&i.sys.settings.status!==s.SHUTDOWN){var n=i.sys.load;n&&(n.off(h.COMPLETE,this.loadComplete,this),n.off(h.COMPLETE,this.payloadComplete,this)),i.sys.shutdown(e)}return this},switch:function(t,e,i){var n=this.getScene(t),s=this.getScene(e);return n&&s&&n!==s&&(this.sleep(t),this.isSleeping(e)?this.wake(e,i):this.start(e,i)),this},getAt:function(t){return this.scenes[t]},getIndex:function(t){var e=this.getScene(t);return this.scenes.indexOf(e)},bringToTop:function(t){if(this.isProcessing)return this.queueOp("bringToTop",t);var e=this.getIndex(t),i=this.scenes;if(-1!==e&&e<i.length){var n=this.getScene(t);i.splice(e,1),i.push(n)}return this},sendToBack:function(t){if(this.isProcessing)return this.queueOp("sendToBack",t);var e=this.getIndex(t);if(-1!==e&&e>0){var i=this.getScene(t);this.scenes.splice(e,1),this.scenes.unshift(i)}return this},moveDown:function(t){if(this.isProcessing)return this.queueOp("moveDown",t);var e=this.getIndex(t);if(e>0){var i=e-1,n=this.getScene(t),s=this.getAt(i);this.scenes[e]=s,this.scenes[i]=n}return this},moveUp:function(t){if(this.isProcessing)return this.queueOp("moveUp",t);var e=this.getIndex(t);if(e<this.scenes.length-1){var i=e+1,n=this.getScene(t),s=this.getAt(i);this.scenes[e]=s,this.scenes[i]=n}return this},moveAbove:function(t,e){if(t===e)return this;if(this.isProcessing)return this.queueOp("moveAbove",t,e);var i=this.getIndex(t),n=this.getIndex(e);if(-1!==i&&-1!==n&&n<i){var s=this.getAt(n);this.scenes.splice(n,1),this.scenes.splice(i+(n>i),0,s)}return this},moveBelow:function(t,e){if(t===e)return this;if(this.isProcessing)return this.queueOp("moveBelow",t,e);var i=this.getIndex(t),n=this.getIndex(e);if(-1!==i&&-1!==n&&n>i){var s=this.getAt(n);this.scenes.splice(n,1),0===i?this.scenes.unshift(s):this.scenes.splice(i-(n<i),0,s)}return this},queueOp:function(t,e,i,n){return this._queue.push({op:t,keyA:e,keyB:i,data:n}),this},swapPosition:function(t,e){if(t===e)return this;if(this.isProcessing)return this.queueOp("swapPosition",t,e);var i=this.getIndex(t),n=this.getIndex(e);if(i!==n&&-1!==i&&-1!==n){var s=this.getAt(i);this.scenes[i]=this.scenes[n],this.scenes[n]=s}return this},dump:function(){for(var t=[],e=["pending","init","start","loading","creating","running","paused","sleeping","shutdown","destroyed"],i=0;i<this.scenes.length;i++){var n=this.scenes[i].sys,r=n.settings.visible&&(n.settings.status===s.RUNNING||n.settings.status===s.PAUSED)?"[*] ":"[-] ";r+=n.settings.key+" ("+e[n.settings.status]+")",t.push(r)}console.log(t.join("\n"))},destroy:function(){for(var t=0;t<this.scenes.length;t++)this.scenes[t].sys.destroy();this.systemScene.sys.destroy(),this.update=l,this.scenes=[],this._pending=[],this._start=[],this._queue=[],this.game=null,this.systemScene=null}})},52209(t,e,i){var n=i(45319),s=i(83419),r=i(44594),o=i(95540),a=i(37277),h=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.settings=t.sys.settings,this.key=t.sys.settings.key,this.manager=t.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,t.sys.events.once(r.BOOT,this.boot,this),t.sys.events.on(r.START,this.pluginStart,this)},boot:function(){this.systems.events.once(r.DESTROY,this.destroy,this)},pluginStart:function(){this._target=null,this.systems.events.once(r.SHUTDOWN,this.shutdown,this)},start:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("stop",this.key),this.manager.queueOp("start",t,e),this},restart:function(t){var e=this.key;return this.manager.queueOp("stop",e),this.manager.queueOp("start",e,t),this},transition:function(t){void 0===t&&(t={});var e=o(t,"target",!1),i=this.manager.getScene(e);if(!e||!this.checkValidTransition(i))return!1;var n=o(t,"duration",1e3);this._elapsed=0,this._target=i,this._duration=n,this._willSleep=o(t,"sleep",!1),this._willRemove=o(t,"remove",!1);var s=o(t,"onUpdate",null);s&&(this._onUpdate=s,this._onUpdateScope=o(t,"onUpdateScope",this.scene));var a=o(t,"allowInput",!1);this.settings.transitionAllowInput=a;var h=i.sys.settings;h.isTransition=!0,h.transitionFrom=this.scene,h.transitionDuration=n,h.transitionAllowInput=a,o(t,"moveAbove",!1)?this.manager.moveAbove(this.key,e):o(t,"moveBelow",!1)&&this.manager.moveBelow(this.key,e),i.sys.isSleeping()?i.sys.wake(o(t,"data")):this.manager.start(e,o(t,"data"));var l=o(t,"onStart",null),u=o(t,"onStartScope",this.scene);return l&&l.call(u,this.scene,i,n),this.systems.events.emit(r.TRANSITION_OUT,i,n),!0},checkValidTransition:function(t){return!(!t||t.sys.isActive()||t.sys.isTransitioning()||t===this.scene||this.systems.isTransitioning())},step:function(t,e){this._elapsed+=e,this.transitionProgress=n(this._elapsed/this._duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.transitionProgress),this._elapsed>=this._duration&&this.transitionComplete()},transitionComplete:function(){var t=this._target.sys,e=this._target.sys.settings;t.events.emit(r.TRANSITION_COMPLETE,this.scene),e.isTransition=!1,e.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(t,e,i,n){return this.manager.add(t,e,i,n)},launch:function(t,e){return t&&t!==this.key&&this.manager.queueOp("start",t,e),this},run:function(t,e){return t&&t!==this.key&&this.manager.queueOp("run",t,e),this},pause:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("pause",t,e),this},resume:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("resume",t,e),this},sleep:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("sleep",t,e),this},wake:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("wake",t,e),this},switch:function(t,e){return t!==this.key&&this.manager.queueOp("switch",this.key,t,e),this},stop:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("stop",t,e),this},setActive:function(t,e,i){void 0===e&&(e=this.key);var n=this.manager.getScene(e);return n&&n.sys.setActive(t,i),this},setVisible:function(t,e){void 0===e&&(e=this.key);var i=this.manager.getScene(e);return i&&i.sys.setVisible(t),this},isSleeping:function(t){return void 0===t&&(t=this.key),this.manager.isSleeping(t)},isActive:function(t){return void 0===t&&(t=this.key),this.manager.isActive(t)},isPaused:function(t){return void 0===t&&(t=this.key),this.manager.isPaused(t)},isVisible:function(t){return void 0===t&&(t=this.key),this.manager.isVisible(t)},swapPosition:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.swapPosition(t,e),this},moveAbove:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.moveAbove(t,e),this},moveBelow:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.moveBelow(t,e),this},remove:function(t){return void 0===t&&(t=this.key),this.manager.remove(t),this},moveUp:function(t){return void 0===t&&(t=this.key),this.manager.moveUp(t),this},moveDown:function(t){return void 0===t&&(t=this.key),this.manager.moveDown(t),this},bringToTop:function(t){return void 0===t&&(t=this.key),this.manager.bringToTop(t),this},sendToBack:function(t){return void 0===t&&(t=this.key),this.manager.sendToBack(t),this},get:function(t){return this.manager.getScene(t)},getStatus:function(t){var e=this.manager.getScene(t);if(e)return e.sys.getStatus()},getIndex:function(t){return void 0===t&&(t=this.key),this.manager.getIndex(t)},shutdown:function(){var t=this.systems.events;t.off(r.SHUTDOWN,this.shutdown,this),t.off(r.TRANSITION_OUT)},destroy:function(){this.shutdown(),this.scene.sys.events.off(r.START,this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});a.register("ScenePlugin",h,"scenePlugin"),t.exports=h},55681(t,e,i){var n=i(89993),s=i(35154),r=i(46975),o=i(87033);t.exports={create:function(t){return"string"==typeof t?t={key:t}:void 0===t&&(t={}),{status:n.PENDING,key:s(t,"key",""),active:s(t,"active",!1),visible:s(t,"visible",!0),isBooted:!1,isTransition:!1,transitionFrom:null,transitionDuration:0,transitionAllowInput:!0,data:{},pack:s(t,"pack",!1),cameras:s(t,"cameras",null),map:s(t,"map",r(o,s(t,"mapAdd",{}))),physics:s(t,"physics",{}),loader:s(t,"loader",{}),plugins:s(t,"plugins",!1),input:s(t,"input",{})}}}},2368(t,e,i){var n=i(83419),s=i(89993),r=i(42363),o=i(44594),a=i(27397),h=i(52106),l=i(29747),u=i(55681);t.exports=new n({initialize:function(t,e){this.scene=t,this.game,this.renderer,this.config=e,this.settings=u.create(e),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=l},init:function(t){this.settings.status=s.INIT,this.sceneUpdate=l,this.game=t,this.renderer=t.renderer,this.canvas=t.canvas,this.context=t.context;var e=t.plugins;this.plugins=e,e.addToScene(this,r.Global,[r.CoreScene,h(this),a(this)]),this.events.emit(o.BOOT,this),this.settings.isBooted=!0},step:function(t,e){var i=this.events;i.emit(o.PRE_UPDATE,t,e),i.emit(o.UPDATE,t,e),this.sceneUpdate.call(this.scene,t,e),i.emit(o.POST_UPDATE,t,e)},render:function(t){var e=this.displayList;e.depthSort(),this.events.emit(o.PRE_RENDER,t),this.cameras.render(t,e),this.events.emit(o.RENDER,t)},queueDepthSort:function(){this.displayList.queueDepthSort()},depthSort:function(){this.displayList.depthSort()},pause:function(t){var e=this.settings,i=this.getStatus();return i!==s.CREATING&&i!==s.RUNNING?console.warn("Cannot pause non-running Scene",e.key):this.settings.active&&(e.status=s.PAUSED,e.active=!1,this.events.emit(o.PAUSE,this,t)),this},resume:function(t){var e=this.events,i=this.settings;return this.settings.active||(i.status=s.RUNNING,i.active=!0,e.emit(o.RESUME,this,t)),this},sleep:function(t){var e=this.settings,i=this.getStatus();return i!==s.CREATING&&i!==s.RUNNING?console.warn("Cannot sleep non-running Scene",e.key):(e.status=s.SLEEPING,e.active=!1,e.visible=!1,this.events.emit(o.SLEEP,this,t)),this},wake:function(t){var e=this.events,i=this.settings;return i.status=s.RUNNING,i.active=!0,i.visible=!0,e.emit(o.WAKE,this,t),i.isTransition&&e.emit(o.TRANSITION_WAKE,i.transitionFrom,i.transitionDuration),this},getData:function(){return this.settings.data},getStatus:function(){return this.settings.status},canInput:function(){var t=this.settings.status;return t>s.PENDING&&t<=s.RUNNING},isSleeping:function(){return this.settings.status===s.SLEEPING},isActive:function(){return this.settings.status===s.RUNNING},isPaused:function(){return this.settings.status===s.PAUSED},isTransitioning:function(){return this.settings.isTransition||null!==this.scenePlugin._target},isTransitionOut:function(){return null!==this.scenePlugin._target&&this.scenePlugin._duration>0},isTransitionIn:function(){return this.settings.isTransition},isVisible:function(){return this.settings.visible},setVisible:function(t){return this.settings.visible=t,this},setActive:function(t,e){return t?this.resume(e):this.pause(e)},start:function(t){var e=this.events,i=this.settings;t&&(i.data=t),i.status=s.START,i.active=!0,i.visible=!0,e.emit(o.START,this),e.emit(o.READY,this,t)},shutdown:function(t){var e=this.events,i=this.settings;e.off(o.TRANSITION_INIT),e.off(o.TRANSITION_START),e.off(o.TRANSITION_COMPLETE),e.off(o.TRANSITION_OUT),i.status=s.SHUTDOWN,i.active=!1,i.visible=!1,e.emit(o.SHUTDOWN,this,t)},destroy:function(){var t=this.events,e=this.settings;e.status=s.DESTROYED,e.active=!1,e.visible=!1,t.emit(o.DESTROY,this),t.removeAllListeners();for(var i=["scene","game","anims","cache","plugins","registry","sound","textures","add","cameras","displayList","events","make","scenePlugin","updateList"],n=0;n<i.length;n++)this[i[n]]=null}})},89993(t){t.exports={PENDING:0,INIT:1,START:2,LOADING:3,CREATING:4,RUNNING:5,PAUSED:6,SLEEPING:7,SHUTDOWN:8,DESTROYED:9}},69830(t){t.exports="addedtoscene"},7919(t){t.exports="boot"},46763(t){t.exports="create"},11763(t){t.exports="destroy"},71555(t){t.exports="pause"},36735(t){t.exports="postupdate"},3809(t){t.exports="prerender"}
1,90716(t){t.exports="preupdate"},58262(t){t.exports="ready"},91633(t){t.exports="removedfromscene"},10319(t){t.exports="render"},87132(t){t.exports="resume"},81961(t){t.exports="shutdown"},90194(t){t.exports="sleep"},6265(t){t.exports="start"},33178(t){t.exports="transitioncomplete"},43063(t){t.exports="transitioninit"},11259(t){t.exports="transitionout"},61611(t){t.exports="transitionstart"},45209(t){t.exports="transitionwake"},22966(t){t.exports="update"},21747(t){t.exports="wake"},44594(t,e,i){t.exports={ADDED_TO_SCENE:i(69830),BOOT:i(7919),CREATE:i(46763),DESTROY:i(11763),PAUSE:i(71555),POST_UPDATE:i(36735),PRE_RENDER:i(3809),PRE_UPDATE:i(90716),READY:i(58262),REMOVED_FROM_SCENE:i(91633),RENDER:i(10319),RESUME:i(87132),SHUTDOWN:i(81961),SLEEP:i(90194),START:i(6265),TRANSITION_COMPLETE:i(33178),TRANSITION_INIT:i(43063),TRANSITION_OUT:i(11259),TRANSITION_START:i(61611),TRANSITION_WAKE:i(45209),UPDATE:i(22966),WAKE:i(21747)}},62194(t,e,i){var n=i(89993);t.exports=i(79291)(!1,{Events:i(44594),GetPhysicsPlugins:i(27397),GetScenePlugins:i(52106),SceneManager:i(60903),ScenePlugin:i(52209),Settings:i(55681),Systems:i(2368)},n)},30341(t,e,i){var n=i(83419),s=i(50792),r=i(14463),o=i(79291);t.exports=new n({Extends:s,initialize:function(t,e,i){s.call(this),this.manager=t,this.key=e,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=o(this.config,i),this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(t){return!!t&&!!t.name&&"string"==typeof t.name&&(this.markers[t.name]?(console.error("addMarker "+t.name+" already exists in Sound"),!1):(t=o(!0,{name:"",start:0,duration:this.totalDuration-(t.start||0),config:{mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0}},t),this.markers[t.name]=t,!0))},updateMarker:function(t){return!!t&&!!t.name&&"string"==typeof t.name&&(this.markers[t.name]?(this.markers[t.name]=o(!0,this.markers[t.name],t),!0):(console.warn("Audio Marker: "+t.name+" missing in Sound: "+this.key),!1))},removeMarker:function(t){var e=this.markers[t];return e?(this.markers[t]=null,e):null},play:function(t,e){if(void 0===t&&(t=""),"object"==typeof t&&(e=t,t=""),"string"!=typeof t)return!1;if(t){if(!this.markers[t])return console.warn("Marker: "+t+" missing in Sound: "+this.key),!1;this.currentMarker=this.markers[t],this.currentConfig=this.currentMarker.config,this.duration=this.currentMarker.duration}else this.currentMarker=null,this.currentConfig=this.config,this.duration=this.totalDuration;return this.resetConfig(),this.currentConfig=o(this.currentConfig,e),this.isPlaying=!0,this.isPaused=!1,!0},pause:function(){return!this.isPaused&&!!this.isPlaying&&(this.isPlaying=!1,this.isPaused=!0,!0)},resume:function(){return!!this.isPaused&&!this.isPlaying&&(this.isPlaying=!0,this.isPaused=!1,!0)},stop:function(){return(!!this.isPaused||!!this.isPlaying)&&(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:i(29747),calculateRate:function(){var t=Math.pow(1.0005777895065548,this.currentConfig.detune+this.manager.detune);this.totalRate=this.currentConfig.rate*this.manager.rate*t},destroy:function(){this.pendingRemove||(this.stop(),this.emit(r.DESTROY,this),this.removeAllListeners(),this.pendingRemove=!0,this.manager=null,this.config=null,this.currentConfig=null,this.markers=null,this.currentMarker=null)}})},85034(t,e,i){var n=i(83419),s=i(41786),r=i(50792),o=i(14463),a=i(8443),h=i(46710),l=i(58731),u=i(29747),d=i(26099);t.exports=new n({Extends:r,initialize:function(t){r.call(this),this.game=t,this.jsonCache=t.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 d;var e=t.events;e.on(a.BLUR,this.onGameBlur,this),e.on(a.FOCUS,this.onGameFocus,this),e.on(a.PRE_STEP,this.update,this),e.once(a.DESTROY,this.destroy,this)},add:u,addAudioSprite:function(t,e){void 0===e&&(e={});var i=this.add(t,e);for(var n in i.spritemap=this.jsonCache.get(t).spritemap,i.spritemap)if(i.spritemap.hasOwnProperty(n)){var r=s(e),o=i.spritemap[n];r.loop=!!o.hasOwnProperty("loop")&&o.loop,i.addMarker({name:n,start:o.start,duration:o.end-o.start,config:r})}return i},get:function(t){return l(this.sounds,"key",t)},getAll:function(t){return t?h(this.sounds,"key",t):h(this.sounds)},getAllPlaying:function(){return h(this.sounds,"isPlaying",!0)},play:function(t,e){var i=this.add(t);return(i.once(o.COMPLETE,i.destroy,i),e)?e.name?(i.addMarker(e),i.play(e.name)):i.play(e):i.play()}
1,playAudioSprite:function(t,e,i){var n=this.addAudioSprite(t);return n.once(o.COMPLETE,n.destroy,n),n.play(e,i)},remove:function(t){var e=this.sounds.indexOf(t);return -1!==e&&(t.destroy(),this.sounds.splice(e,1),!0)},removeAll:function(){this.sounds.forEach(function(t){t.destroy()}),this.sounds.length=0},removeByKey:function(t){for(var e=0,i=this.sounds.length-1;i>=0;i--){var n=this.sounds[i];n.key===t&&(n.destroy(),this.sounds.splice(i,1),e++)}return e},pauseAll:function(){this.forEachActiveSound(function(t){t.pause()}),this.emit(o.PAUSE_ALL,this)},resumeAll:function(){this.forEachActiveSound(function(t){t.resume()}),this.emit(o.RESUME_ALL,this)},setListenerPosition:u,stopAll:function(){this.forEachActiveSound(function(t){t.stop()}),this.emit(o.STOP_ALL,this)},stopByKey:function(t){var e=0;return this.getAll(t).forEach(function(t){t.stop()&&e++}),e},isPlaying:function(t){var e,i=this.sounds.length-1;if(void 0===t){for(;i>=0;i--)if((e=this.sounds[i]).isPlaying)return!0}else for(;i>=0;i--)if((e=this.sounds[i]).key===t&&e.isPlaying)return!0;return!1},unlock:u,onBlur:u,onFocus:u,onGameBlur:function(){this.gameLostFocus=!0,this.pauseOnBlur&&this.onBlur()},onGameFocus:function(){this.gameLostFocus=!1,this.pauseOnBlur&&this.onFocus()},update:function(t,e){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit(o.UNLOCKED,this));for(var i=this.sounds.length-1;i>=0;i--)this.sounds[i].pendingRemove&&this.sounds.splice(i,1);this.sounds.forEach(function(i){i.update(t,e)})},destroy:function(){this.game.events.off(a.BLUR,this.onGameBlur,this),this.game.events.off(a.FOCUS,this.onGameFocus,this),this.game.events.off(a.PRE_STEP,this.update,this),this.removeAllListeners(),this.removeAll(),this.sounds.length=0,this.sounds=null,this.listenerPosition=null,this.game=null},forEachActiveSound:function(t,e){var i=this;this.sounds.forEach(function(n,s){n&&!n.pendingRemove&&t.call(e||i,n,s,i.sounds)})},setRate:function(t){return this.rate=t,this},rate:{get:function(){return this._rate},set:function(t){this._rate=t,this.forEachActiveSound(function(t){t.calculateRate()}),this.emit(o.GLOBAL_RATE,this,t)}},setDetune:function(t){return this.detune=t,this},detune:{get:function(){return this._detune},set:function(t){this._detune=t,this.forEachActiveSound(function(t){t.calculateRate()}),this.emit(o.GLOBAL_DETUNE,this,t)}}})},14747(t,e,i){var n=i(33684),s=i(25960),r=i(57490);t.exports={create:function(t){var e=t.config.audio,i=t.device.audio;return!e.noAudio&&(i.webAudio||i.audioData)?i.webAudio&&!e.disableWebAudio?new r(t):new n(t):new s(t)}}},19723(t){t.exports="complete"},98882(t){t.exports="decodedall"},57506(t){t.exports="decoded"},73146(t){t.exports="destroy"},11305(t){t.exports="detune"},40577(t){t.exports="detune"},30333(t){t.exports="mute"},20394(t){t.exports="rate"},21802(t){t.exports="volume"},1299(t){t.exports="looped"},99190(t){t.exports="loop"},97125(t){t.exports="mute"},89259(t){t.exports="pan"},79986(t){t.exports="pauseall"},17586(t){t.exports="pause"},19618(t){t.exports="play"},42306(t){t.exports="rate"},10387(t){t.exports="resumeall"},48959(t){t.exports="resume"},9960(t){t.exports="seek"}
1,19180(t){t.exports="stopall"},98328(t){t.exports="stop"},50401(t){t.exports="unlocked"},52498(t){t.exports="volume"},14463(t,e,i){t.exports={COMPLETE:i(19723),DECODED:i(57506),DECODED_ALL:i(98882),DESTROY:i(73146),DETUNE:i(11305),GLOBAL_DETUNE:i(40577),GLOBAL_MUTE:i(30333),GLOBAL_RATE:i(20394),GLOBAL_VOLUME:i(21802),LOOP:i(99190),LOOPED:i(1299),MUTE:i(97125),PAN:i(89259),PAUSE_ALL:i(79986),PAUSE:i(17586),PLAY:i(19618),RATE:i(42306),RESUME_ALL:i(10387),RESUME:i(48959),SEEK:i(9960),STOP_ALL:i(19180),STOP:i(98328),UNLOCKED:i(50401),VOLUME:i(52498)}},64895(t,e,i){var n=i(30341),s=i(83419),r=i(14463),o=i(45319);t.exports=new s({Extends:n,initialize:function(t,e,i){if(void 0===i&&(i={}),this.tags=t.game.cache.audio.get(e),!this.tags)throw Error('No cached audio asset with key "'+e);this.audio=null,this.startTime=0,this.previousTime=0,this.duration=this.tags[0].duration,this.totalDuration=this.tags[0].duration,n.call(this,t,e,i)},play:function(t,e){return!this.manager.isLocked(this,"play",[t,e])&&!!n.prototype.play.call(this,t,e)&&!!this.pickAndPlayAudioTag()&&(this.emit(r.PLAY,this),!0)},pause:function(){return!this.manager.isLocked(this,"pause")&&!(this.startTime>0)&&!!n.prototype.pause.call(this)&&(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit(r.PAUSE,this),!0)},resume:function(){return!this.manager.isLocked(this,"resume")&&!(this.startTime>0)&&!!n.prototype.resume.call(this)&&!!this.pickAndPlayAudioTag()&&(this.emit(r.RESUME,this),!0)},stop:function(){return!this.manager.isLocked(this,"stop")&&!!n.prototype.stop.call(this)&&(this.stopAndReleaseAudioTag(),this.emit(r.STOP,this),!0)},pickAndPlayAudioTag:function(){if(!this.pickAudioTag())return this.reset(),!1;var t=this.currentConfig.seek,e=this.currentConfig.delay,i=(this.currentMarker?this.currentMarker.start:0)+t;return this.previousTime=i,this.audio.currentTime=i,this.applyConfig(),0===e?(this.startTime=0,this.audio.paused&&this.playCatchPromise()):(this.startTime=window.performance.now()+1e3*e,this.audio.paused||this.audio.pause()),this.resetConfig(),!0},pickAudioTag:function(){if(this.audio)return!0;for(var t=0;t<this.tags.length;t++){var e=this.tags[t];if("false"===e.dataset.used)return e.dataset.used="true",this.audio=e,!0}if(!this.manager.override)return!1;var i=[];this.manager.forEachActiveSound(function(t){t.key===this.key&&t.audio&&i.push(t)},this),i.sort(function(t,e){return t.loop===e.loop?e.seek/e.duration-t.seek/t.duration:t.loop?1:-1});var n=i[0];return this.audio=n.audio,n.reset(),n.audio=null,n.startTime=0,n.previousTime=0,!0},playCatchPromise:function(){var t=this.audio.play();t&&t.catch(function(t){console.warn(t)})},stopAndReleaseAudioTag:function(){this.startTime=0,this.previousTime=0,this.audio&&(this.audio.pause(),this.audio.dataset.used="false",this.audio=null)},reset:function(){n.prototype.stop.call(this)},onBlur:function(){this.isPlaying=!1,this.isPaused=!0,this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.currentConfig.delay=Math.max(0,(this.startTime-window.performance.now())/1e3),this.stopAndReleaseAudioTag()},onFocus:function(){this.isPlaying=!0,this.isPaused=!1,this.pickAndPlayAudioTag()},update:function(t){if(this.isPlaying){if(this.startTime>0){this.startTime<t-this.manager.audioPlayDelay&&(this.audio.currentTime+=Math.max(0,t-this.startTime)/1e3,this.startTime=0,this.previousTime=this.audio.currentTime,this.playCatchPromise());return}var e=this.currentMarker?this.currentMarker.start:0,i=e+this.duration,n=this.audio.currentTime;if(this.currentConfig.loop)n>=i-this.manager.loopEndOffset?(this.audio.currentTime=e+Math.max(0,n-i),n=this.audio.currentTime):n<e&&(this.audio.currentTime+=e,n=this.audio.currentTime),n<this.previousTime&&this.emit(r.LOOPED,this);else if(n>=i){this.reset(),this.stopAndReleaseAudioTag(),this.emit(r.COMPLETE,this);return}this.previousTime=n}},destroy:function(){n.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=o(this.currentConfig.volume*this.manager.volume,0,1))},calculateRate:function(){n.prototype.calculateRate.call(this),this.audio&&(this.audio.playbackRate=this.totalRate)},mute:{get:function(){return this.currentConfig.mute},set:function(t){this.currentConfig.mute=t,this.manager.isLocked(this,"mute",t)||(this.updateMute(),this.emit
vendor: 14,983 bytes, line 1
1(r.MUTE,this,t))}},setMute:function(t){return this.mute=t,this},volume:{get:function(){return this.currentConfig.volume},set:function(t){this.currentConfig.volume=t,this.manager.isLocked(this,"volume",t)||(this.updateVolume(),this.emit(r.VOLUME,this,t))}},setVolume:function(t){return this.volume=t,this},rate:{get:function(){return this.currentConfig.rate},set:function(t){this.currentConfig.rate=t,this.manager.isLocked(this,r.RATE,t)||(this.calculateRate(),this.emit(r.RATE,this,t))}},setRate:function(t){return this.rate=t,this},detune:{get:function(){return this.currentConfig.detune},set:function(t){this.currentConfig.detune=t,this.manager.isLocked(this,r.DETUNE,t)||(this.calculateRate(),this.emit(r.DETUNE,this,t))}},setDetune:function(t){return this.detune=t,this},seek:{get:function(){return this.isPlaying?this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0):this.isPaused?this.currentConfig.seek:0},set:function(t){this.manager.isLocked(this,"seek",t)||!(this.startTime>0)&&(this.isPlaying||this.isPaused)&&(t=Math.min(Math.max(0,t),this.duration),this.isPlaying?(this.previousTime=t,this.audio.currentTime=t):this.isPaused&&(this.currentConfig.seek=t),this.emit(r.SEEK,this,t))}},setSeek:function(t){return this.seek=t,this},loop:{get:function(){return this.currentConfig.loop},set:function(t){this.currentConfig.loop=t,this.manager.isLocked(this,"loop",t)||(this.audio&&(this.audio.loop=t),this.emit(r.LOOP,this,t))}},setLoop:function(t){return this.loop=t,this},pan:{get:function(){return this.currentConfig.pan},set:function(t){this.currentConfig.pan=t,this.emit(r.PAN,this,t)}},setPan:function(t){return this.pan=t,this}})},33684(t,e,i){var n=i(85034),s=i(83419),r=i(14463),o=i(64895);t.exports=new s({Extends:n,initialize:function(t){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,n.call(this,t)},add:function(t,e){var i=new o(this,t,e);return this.sounds.push(i),i},unlock:function(){this.locked=!1;var t=this;if(this.game.cache.audio.entries.each(function(e,i){for(var n=0;n<i.length;n++)if("true"===i[n].dataset.locked)return t.locked=!0,!1;return!0}),this.locked){var e=!1,i=function(){e=!0},n=function(){if(e){e=!1;return}document.body.removeEventListener("touchmove",i),document.body.removeEventListener("touchend",n);var s=[];if(t.game.cache.audio.entries.each(function(t,e){for(var i=0;i<e.length;i++){var n=e[i];"true"===n.dataset.locked&&s.push(n)}return!0}),0!==s.length){var r=s[s.length-1];r.oncanplaythrough=function(){r.oncanplaythrough=null,s.forEach(function(t){t.dataset.locked="false"}),t.unlocked=!0},s.forEach(function(t){t.load()})}};this.once(r.UNLOCKED,function(){for(this.forEachActiveSound(function(t){null===t.currentMarker&&0===t.duration&&(t.duration=t.tags[0].duration),t.totalDuration=t.tags[0].duration});this.lockedActionsQueue.length;){var t=this.lockedActionsQueue.shift();t.sound[t.prop].apply?t.sound[t.prop].apply(t.sound,t.value||[]):t.sound[t.prop]=t.value}},this),document.body.addEventListener("touchmove",i,!1),document.body.addEventListener("touchend",n,!1)}},onBlur:function(){this.forEachActiveSound(function(t){t.isPlaying&&(this.onBlurPausedSounds.push(t),t.onBlur())})},onFocus:function(){this.onBlurPausedSounds.forEach(function(t){t.onFocus()}),this.onBlurPausedSounds.length=0},destroy:function(){n.prototype.destroy.call(this),this.onBlurPausedSounds.length=0,this.onBlurPausedSounds=null},isLocked:function(t,e,i){return"true"===t.tags[0].dataset.locked&&(this.lockedActionsQueue.push({sound:t,prop:e,value:i}),!0)},setMute:function(t){return this.mute=t,this},mute:{get:function(){return this._mute},set:function(t){this._mute=t,this.forEachActiveSound(function(t){t.updateMute()}),this.emit(r.GLOBAL_MUTE,this,t)}},setVolume:function(t){return this.volume=t,this},volume:{get:function(){return this._volume},set:function(t){this._volume=t,this.forEachActiveSound(function(t){t.updateVolume()}),this.emit(r.GLOBAL_VOLUME,this,t)}}})},23717(t,e,i){t.exports={SoundManagerCreator:i(14747),Events:i(14463),BaseSound:i(30341),BaseSoundManager:i(85034),WebAudioSound:i(71741),WebAudioSoundManager:i(57490),HTML5AudioSound:i(64895),HTML5AudioSoundManager:i(33684),NoAudioSound:i(4603),NoAudioSoundManager:i(25960)}},4603(t,e,i){var n=i(30341),s=i(83419),r=i(50792),o=i(79291),a=i(29747),h=function(){return!1},l=function(){return null},u=function(){return this};t.exports=new s({Extends:r,initialize:function(t,e,i){void 0===i&&(i={}),r.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=0,this.totalDuration=0,this.config=o({mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0},i),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:h,updateMarker:h,removeMarker:l,play:h,pause:h,resume:h,stop:h,setMute:u,setVolume:u,setRate:u,setDetune:u,setSeek:u,setLoop:u,setPan:u,applyConfig:l,resetConfig:l,update:a,calculateRate:l,destroy:function(){n.prototype.destroy.call(this)}})},25960(t,e,i){var n=i(85034),s=i(83419),r=i(50792),o=i(4603),a=i(29747);t.exports=new s({Extends:r,initialize:function(t){r.call(this),this.game=t,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,this.locked=!1},add:function(t,e){var i=new o(this,t,e);return this.sounds.push(i),i},addAudioSprite:function(t,e){var i=this.add(t,e);return i.spritemap={},i},get:function(t){return n.prototype.get.call(this,t)},getAll:function(t){return n.prototype.getAll.call(this,t)},play:function(t,e){return!1},playAudioSprite:function(t,e,i){return!1},remove:function(t){return n.prototype.remove.call(this,t)},removeAll:function(){return n.prototype.removeAll.call(this)},removeByKey:function(t){return n.prototype.removeByKey.call(this,t)},stopByKey:function(t){return n.prototype.stopByKey.call(this,t)},onBlur:a,onFocus:a,onGameBlur:a,onGameFocus:a,pauseAll:a,resumeAll:a,stopAll:a,update:a,setRate:a,setDetune:a,setMute:a,setVolume:a,unlock:a,forEachActiveSound:function(t,e){n.prototype.forEachActiveSound.call(this,t,e)},destroy:function(){n.prototype.destroy.call(this)}})},71741(t,e,i){var n=i(30341),s=i(83419),r=i(14463),o=i(95540);t.exports=new s({Extends:n,initialize:function(t,e,i){if(void 0===i&&(i={}),this.audioBuffer=t.game.cache.audio.get(e),!this.audioBuffer)throw Error('Audio key "'+e+'" not found in cache');this.source=null,this.loopSource=null,this.muteNode=t.context.createGain(),this.volumeNode=t.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),t.context.createPanner&&(this.spatialNode=t.context.createPanner(),this.volumeNode.connect(this.spatialNode)),t.context.createStereoPanner?(this.pannerNode=t.context.createStereoPanner(),t.context.createPanner?this.spatialNode.connect(this.pannerNode):this.volumeNode.connect(this.pannerNode),this.pannerNode.connect(t.destination)):t.context.createPanner?this.spatialNode.connect(t.destination):this.volumeNode.connect(t.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,n.call(this,t,e,i)},play:function(t,e){return!!n.prototype.play.call(this,t,e)&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit(r.PLAY,this),!0)},pause:function(){return!(this.manager.context.currentTime<this.startTime)&&!!n.prototype.pause.call(this)&&(this.currentConfig.seek=this.getCurrentTime(),this.stopAndRemoveBufferSource(),this.emit(r.PAUSE,this),!0)},resume:function(){return!(this.manager.context.currentTime<this.startTime)&&!!n.prototype.resume.call(this)&&(this.createAndStartBufferSource(),this.emit(r.RESUME,this),!0)},stop:function(){return!!n.prototype.stop.call(this)&&(this.stopAndRemoveBufferSource(),this.emit(r.STOP,this),!0)},createAndStartBufferSource:function(){var t=this.currentConfig.seek,e=this.currentConfig.delay,i=this.manager.context.currentTime+e,n=(this.currentMarker?this.currentMarker.start:0)+t,s=this.duration-t;this.playTime=i-t,this.startTime=i,this.source=this.createBufferSource(),this.applyConfig(),this.source.start(Math.max(0,i),Math.max(0,n),Math.max(0,s)),this.resetConfig()},createAndStartLoopBufferSource:function(){var t=this.getLoopTime(),e=this.currentMarker?this.currentMarker.start:0,i=this.duration;this.loopTime=t,this.loopSource=this.createBufferSource(),this.loopSource.playbackRate.setValueAtTime(this.totalRate,0),this.loopSource.start(Math.max(0,t),Math.max(0,e),Math.max(0,i))},createBufferSource:function(){var t=this,e=this.manager.context.createBufferSource();return e.buffer=this.audioBuffer,e.connect(this.muteNode),e.onended=function(e){var i=e.target;(i===t.source||i===t.loopSource)&&(t.currentConfig.loop?t.hasLooped=!0:t.hasEnded=!0)},e},stopAndRemoveBufferSource:function(){if(this.source){var t=this.source;this.source=null,t.stop(),t.disconnect()}this.playTime=0,this.startTime=0,this.hasEnded=!1,this.stopAndRemoveLoopBufferSource()},stopAndRemoveLoopBufferSource:function(){this.loopSource&&(this.loopSource.stop(),this.loopSource.disconnect(),this.loopSource=null),this.loopTime=0},applyConfig:function(){this.rateUpdates.length=0,this.rateUpdates.push({time:0,rate:1});var t=this.currentConfig.source;if(t&&this.manager.context.createPanner){var e=this.spatialNode;e.panningModel=o(t,"panningModel","equalpower"),e.distanceModel=o(t,"distanceModel","inverse"),e.orientationX.value=o(t,"orientationX",0),e.orientationY.value=o(t,"orientationY",0),e.orientationZ.value=o(t,"orientationZ",-1),e.refDistance=o(t,"refDistance",1),e.maxDistance=o(t,"maxDistance",1e4),e.rolloffFactor=o(t,"rolloffFactor",1),e.coneInnerAngle=o(t,"coneInnerAngle",360),e.coneOuterAngle=o(t,"coneOuterAngle",0),e.coneOuterGain=o(t,"coneOuterGain",0),this.spatialSource=o(t,"follow",null),this.spatialSource||(e.positionX.value=o(t,"x",0),e.positionY.value=o(t,"y",0),e.positionZ.value=o(t,"z",0))}n.prototype.applyConfig.call(this)},x:{get:function(){return this.spatialNode?this.spatialNode.positionX:0},set:function(t){this.spatialNode&&(this.spatialNode.positionX.value=t)}},y:{get:function(){return this.spatialNode?this.spatialNode.positionY:0},set:function(t){this.spatialNode&&(this.spatialNode.positionY.value=t)}},update:function(){if(this.isPlaying&&this.spatialSource){var t=o(this.spatialSource,"x",null),e=o(this.spatialSource,"y",null);t&&t!==this._spatialx&&(this._spatialx=this.spatialNode.positionX.value=t),e&&e!==this._spatialy&&(this._spatialy=this.spatialNode.positionY.value=e)}this.hasEnded?(n.prototype.stop.call(this),this.stopAndRemoveBufferSource(),this.emit(r.COMPLETE,this)):this.hasLooped&&(this.hasLooped=!1,this.source=this.loopSource,this.loopSource=null,this.playTime=this.startTime=this.loopTime,this.rateUpdates.length=0,this.rateUpdates.push({time:0,rate:this.totalRate}),this.createAndStartLoopBufferSource(),this.emit(r.LOOPED,this))},destroy:function(){this.pendingRemove||(n.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(){n.prototype.calculateRate.call(this);var t=this.manager.context.currentTime;this.source&&"number"==typeof this.totalRate&&this.source.playbackRate.setValueAtTime(this.totalRate,t),this.isPlaying&&(this.rateUpdates.push({time:Math.max(this.startTime,t)-this.playTime,rate:this.totalRate}),this.loopSource&&(this.stopAndRemoveLoopBufferSource(),this.createAndStartLoopBufferSource()))},getCurrentTime:function(){for(var t=0,e=0;e<this.rateUpdates.length;e++)t+=((e<this.rateUpdates.length-1?this.rateUpdates[e+1].time:this.manager.context.currentTime-this.playTime)-this.rateUpdates[e].time)*this.rateUpdates[e].rate;return t},getLoopTime:function(){for(var t=0,e=0;e<this.rateUpdates.length-1;e++)t+=(this.rateUpdates[e+1].time-this.rateUpdates[e].time)*this.rateUpdates[e].rate;var i=this.rateUpdates[this.rateUpdates.length-1];return this.playTime+i.time+(this.duration-t)/i.rate},rate:{get:function(){return this.currentConfig.rate},set:function(t){this.currentConfig.rate=t,this.calculateRate(),this.emit(r.RATE,this,t)}},setRate:function(t){return this.rate=t,this},detune:{get:function(){return this.currentConfig.detune},set:function(t){this.currentConfig.detune=t,this.calculateRate(),this.emit(r.DETUNE,this,t)}},setDetune:function(t){return this.detune=t,this},mute:{get:function(){return 0===this.muteNode.gain.value},set:function(t){this.currentConfig.mute=t,this.muteNode.gain.setValueAtTime(+!t,0),this.emit(r.MUTE,this,t)}},setMute:function(t){return this.mute=t,this},volume:{get:function(){return this.volumeNode.gain.value},set:function(t){this.currentConfig.volume=t,this.volumeNode.gain.setValueAtTime(t,0),this.emit(r.VOLUME,this,t)}},setVolume:function(t){return this.volume=t,this},seek:{get:function(){return this.isPlaying?this.manager.context.currentTime<this.startTime?this.startTime-this.playTime:this.getCurrentTime():this.isPaused?this.currentConfig.seek:0},set:function(t){!(this.manager.context.currentTime<this.startTime)&&(this.isPlaying||this.isPaused)&&(t=Math.min(Math.max(0,t),this.duration),this.currentConfig.seek=t,this.isPlaying&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource()),this.emit(r.SEEK,this,t))}},setSeek:function(t){return this.seek=t,this},loop:{get:function(){return this.currentConfig.loop},set:function(t){this.currentConfig.loop=t,this.isPlaying&&(this.stopAndRemoveLoopBufferSource(),t&&this.createAndStartLoopBufferSource()),this.emit(r.LOOP,this,t)}},setLoop:function(t){return this.loop=t,this},pan:{get:function(){return this.pannerNode?this.pannerNode.pan.value:0},set:function(t){this.currentConfig.pan=t,this.pannerNode&&this.pannerNode.pan.setValueAtTime(t,this.manager.context.currentTime),this.emit(r.PAN,this,t)}},setPan:function(t){return this.pan=t,this}})},57490(t,e,i){var n=i(53134),s=i(85034),r=i(83419),o=i(14463),a=i(8443),h=i(71741),l=i(95540);t.exports=new r({Extends:s,initialize:function(t){this.context=this.createAudioContext(t),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="suspended"===this.context.state,s.call(this,t),this.locked&&(t.isBooted?this.unlock():t.events.once(a.BOOT,this.unlock,this)),t.events.on(a.VISIBLE,this.onGame
1Visible,this)},onGameVisible:function(){var t=this.context;window.setTimeout(function(){t&&(t.suspend(),t.resume())},100)},createAudioContext:function(t){var e=t.config.audio;return e.context?(e.context.resume(),e.context):window.hasOwnProperty("AudioContext")?new AudioContext:window.hasOwnProperty("webkitAudioContext")?new window.webkitAudioContext:void 0},setAudioContext:function(t){return this.context&&this.context.close(),this.masterMuteNode&&this.masterMuteNode.disconnect(),this.masterVolumeNode&&this.masterVolumeNode.disconnect(),this.context=t,this.masterMuteNode=t.createGain(),this.masterVolumeNode=t.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(t.destination),this.destination=this.masterMuteNode,this},add:function(t,e){var i=new h(this,t,e);return this.sounds.push(i),i},decodeAudio:function(t,e){for(var i=Array.isArray(t)?t:[{key:t,data:e}],s=this.game.cache.audio,r=i.length,a=0;a<i.length;a++){var h=i[a],l=h.key,u=h.data;"string"==typeof u&&(u=n(u));var d=(function(t,e){s.add(t,e),this.emit(o.DECODED,t),0==--r&&this.emit(o.DECODED_ALL)}).bind(this,l),c=(function(t,e){console.error("Error decoding audio: "+t+" - ",e?e.message:""),0==--r&&this.emit(o.DECODED_ALL)}).bind(this,l);this.context.decodeAudioData(u,d,c)}},setListenerPosition:function(t,e){return void 0===t&&(t=this.game.scale.width/2),void 0===e&&(e=this.game.scale.height/2),this.listenerPosition.set(t,e),this},unlock:function(){var t=this,e=document.body,i=function i(){if(t.context&&e){var n=e.removeEventListener.bind(e);t.context.resume().then(function(){n("touchstart",i),n("touchend",i),n("mousedown",i),n("mouseup",i),n("keydown",i),t.unlocked=!0},function(){n("touchstart",i),n("touchend",i),n("mousedown",i),n("mouseup",i),n("keydown",i)})}};e&&(e.addEventListener("touchstart",i,!1),e.addEventListener("touchend",i,!1),e.addEventListener("mousedown",i,!1),e.addEventListener("mouseup",i,!1),e.addEventListener("keydown",i,!1))},onBlur:function(){this.locked||this.context.suspend()},onFocus:function(){var t=this.context;t&&!this.locked&&("suspended"===t.state||"interrupted"===t.state)&&t.resume()},update:function(t,e){var i=this.context.listener,n=l(this.listenerPosition,"x",null),r=l(this.listenerPosition,"y",null);if(i&&void 0!==i.positionX)n&&n!==this._spatialx&&(this._spatialx=i.positionX.value=n),r&&r!==this._spatialy&&(this._spatialy=i.positionY.value=r);else if(i){n&&n!==this._spatialx&&(this._spatialx=n),r&&r!==this._spatialy&&(this._spatialy=r);var o=l(i,"z",0);i.setPosition(this._spatialx||0,this._spatialy||0,o)}s.prototype.update.call(this,t,e),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 t=this;this.context.close().then(function(){t.context=null})}this.game.events.off(a.VISIBLE,this.onGameVisible,this),s.prototype.destroy.call(this)},setMute:function(t){return this.mute=t,this},mute:{get:function(){return 0===this.masterMuteNode.gain.value},set:function(t){this.masterMuteNode.gain.setValueAtTime(+!t,0),this.emit(o.GLOBAL_MUTE,this,t)}},setVolume:function(t){return this.volume=t,this},volume:{get:function(){return this.masterVolumeNode.gain.value},set:function(t){this.masterVolumeNode.gain.setValueAtTime(t,0),this.emit(o.GLOBAL_VOLUME,this,t)}}})},73162(t,e,i){var n=i(37105),s=i(83419),r=i(29747),o=i(19186);t.exports=new s({initialize:function(t){this.parent=t,this.list=[],this.position=0,this.addCallback=r,this.removeCallback=r,this._sortKey=""},add:function(t,e){return e?n.Add(this.list,t):n.Add(this.list,t,0,this.addCallback,this)},addAt:function(t,e,i){return i?n.AddAt(this.list,t,e):n.AddAt(this.list,t,e,0,this.addCallback,this)},getAt:function(t){return this.list[t]},getIndex:function(t){return this.list.indexOf(t)},sort:function(t,e){return t&&(void 0===e&&(e=function(e,i){return e[t]-i[t]}),o(this.list,e)),this},getByName:function(t){return n.GetFirst(this.list,"name",t)},getRandom:function(t,e){return n.GetRandom(this.list,t,e)}
vendor: 3,864 bytes, line 1
1,getFirst:function(t,e,i,s){return n.GetFirst(this.list,t,e,i,s)},getAll:function(t,e,i,s){return n.GetAll(this.list,t,e,i,s)},count:function(t,e){return n.CountAllMatching(this.list,t,e)},swap:function(t,e){n.Swap(this.list,t,e)},moveTo:function(t,e){return n.MoveTo(this.list,t,e)},moveAbove:function(t,e){return n.MoveAbove(this.list,t,e)},moveBelow:function(t,e){return n.MoveBelow(this.list,t,e)},remove:function(t,e){return e?n.Remove(this.list,t):n.Remove(this.list,t,this.removeCallback,this)},removeAt:function(t,e){return e?n.RemoveAt(this.list,t):n.RemoveAt(this.list,t,this.removeCallback,this)},removeBetween:function(t,e,i){return i?n.RemoveBetween(this.list,t,e):n.RemoveBetween(this.list,t,e,this.removeCallback,this)},removeAll:function(t){for(var e=this.list.length;e--;)this.remove(this.list[e],t);return this},bringToTop:function(t){return n.BringToTop(this.list,t)},sendToBack:function(t){return n.SendToBack(this.list,t)},moveUp:function(t){return n.MoveUp(this.list,t),t},moveDown:function(t){return n.MoveDown(this.list,t),t},reverse:function(){return this.list.reverse(),this},shuffle:function(){return n.Shuffle(this.list),this},replace:function(t,e){return n.Replace(this.list,t,e)},exists:function(t){return this.list.indexOf(t)>-1},setAll:function(t,e,i,s){return n.SetAll(this.list,t,e,i,s),this},each:function(t,e){for(var i=[null],n=2;n<arguments.length;n++)i.push(arguments[n]);for(n=0;n<this.list.length;n++)i[0]=this.list[n],t.apply(e,i)},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}}})},90330(t,e,i){t.exports=new(i(83419))({initialize:function(t){this.entries={},this.size=0,this.setAll(t)},setAll:function(t){if(Array.isArray(t))for(var e=0;e<t.length;e++)this.set(t[e][0],t[e][1]);return this},set:function(t,e){return!this.has(t)&&this.size++,this.entries[t]=e,this},get:function(t){if(this.has(t))return this.entries[t]},getArray:function(){var t=[],e=this.entries;for(var i in e)t.push(e[i]);return t},has:function(t){return this.entries.hasOwnProperty(t)},delete:function(t){return this.has(t)&&(delete this.entries[t],this.size--),this},clear:function(){return Object.keys(this.entries).forEach(function(t){delete this.entries[t]},this),this.size=0,this},keys:function(){return Object.keys(this.entries)},values:function(){var t=[],e=this.entries;for(var i in e)t.push(e[i]);return t},dump:function(){var t=this.entries;for(var e in console.group("Map"),t)console.log(e,t[e]);console.groupEnd()},each:function(t){var e=this.entries;for(var i in e)if(!1===t(i,e[i]))break;return this},contains:function(t){var e=this.entries;for(var i in e)if(e[i]===t)return!0;return!1},merge:function(t,e){void 0===e&&(e=!1);var i=this.entries,n=t.entries;for(var s in n)i.hasOwnProperty(s)&&e?i[s]=n[s]:this.set(s,n[s]);return this}})},25774(t,e,i){var n=i(83419),s=i(50792),r=i(82348);t.exports=new n({Extends:s,initialize:function(){s.call(this),this._pending=[],this._active=[],this._destroy=[],this._toProcess=0,this.checkQueue=!1},isActive:function(t){return this._active.indexOf(t)>-1},isPending:function(t){return this._toProcess>0&&this._pending.indexOf(t)>-1},isDestroying:function(t){return this._destroy.indexOf(t)>-1},add:function(t){return this.checkQueue&&this.isActive(t)&&!this.isDestroying(t)||this.isPending(t)||(this._pending.push(t),this._toProcess++),t}
1,remove:function(t){if(this.isPending(t)){var e=this._pending,i=e.indexOf(t);-1!==i&&e.splice(i,1)}else this.isActive(t)&&(this._destroy.push(t),this._toProcess++);return t},removeAll:function(){for(var t=this._active,e=this._destroy,i=t.length;i--;)e.push(t[i]),this._toProcess++;return this},update:function(){if(0===this._toProcess)return this._active;var t,e,i=this._destroy,n=this._active;for(t=0;t<i.length;t++){e=i[t];var s=n.indexOf(e);-1!==s&&(n.splice(s,1),this.emit(r.PROCESS_QUEUE_REMOVE,e))}for(t=0,i.length=0,i=this._pending;t<i.length;t++)e=i[t],(!this.checkQueue||this.checkQueue&&-1===n.indexOf(e))&&(n.push(e),this.emit(r.PROCESS_QUEUE_ADD,e));return i.length=0,this._toProcess=0,n},getActive:function(){return this._active},length:{get:function(){return this._active.length}},destroy:function(){this._toProcess=0,this._pending=[],this._active=[],this._destroy=[]}})},59542(t,e,i){var n=i(43886);function s(t){if(!(this instanceof s))return new s(t,[".left",".top",".right",".bottom"]);this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}function r(t,e){o(t,0,t.children.length,e,t)}function o(t,e,i,n,s){s||(s=p(null)),s.minX=1/0,s.minY=1/0,s.maxX=-1/0,s.maxY=-1/0;for(var r,o=e;o<i;o++)r=t.children[o],a(s,t.leaf?n(r):r);return s}function a(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function h(t,e){return t.minX-e.minX}function l(t,e){return t.minY-e.minY}function u(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function d(t){return t.maxX-t.minX+(t.maxY-t.minY)}function c(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function f(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function p(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function g(t,e,i,s,r){for(var o,a=[e,i];a.length;)(i=a.pop())-(e=a.pop())<=s||(n(t,o=e+Math.ceil((i-e)/s/2)*s,e,i,r),a.push(e,o,o,i))}s.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,i=[],n=this.toBBox;if(!f(t,e))return i;for(var s,r,o,a,h=[];e;){for(s=0,r=e.children.length;s<r;s++)o=e.children[s],f(t,a=e.leaf?n(o):o)&&(e.leaf?i.push(o):c(t,a)?this._all(o,i):h.push(o));e=h.pop()}return i},collides:function(t){var e=this.data,i=this.toBBox;if(!f(t,e))return!1;for(var n,s,r,o,a=[];e;){for(n=0,s=e.children.length;n<s;n++)if(r=e.children[n],f(t,o=e.leaf?i(r):r)){if(e.leaf||c(t,o))return!0;a.push(r)}e=a.pop()}return!1},load:function(t){if(!(t&&t.length))return this;if(t.length<this._minEntries){for(var e=0,i=t.length;e<i;e++)this.insert(t[e]);return this}var n=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var s=this.data;this.data=n,n=s}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},insert:function(t){return t&&this._insert(t,this.data.height-1),this},clear:function(){return this.data=p([]),this},remove:function(t,e){if(!t)return this;for(var i,n,s,r,o=this.data,a=this.toBBox(t),h=[],l=[];o||h.length;){if(o||(o=h.pop(),n=h[h.length-1],i=l.pop(),r=!0),o.leaf&&-1!==(s=function(t,e,i){if(!i)return e.indexOf(t);for(var n=0;n<e.length;n++)if(i(t,e[n]))return n;return -1}(t,o.children,e))){o.children.splice(s,1),h.push(o),this._condense(h);break}!r&&!o.leaf&&c(o,a)?(h.push(o),l.push(i),i=0,n=o,o=o.children[0]):n?(i++,o=n.children[i],r=!1):o=null}return this},toBBox:function(t){return t},compareMinX:h,compareMinY:l,toJSON:function(){return this.data},fromJSON:function(t){return this.data=t,this},_all:function(t,e){for(var i=[];t;)t.leaf?e.push.apply(e,t.children):i.push.apply(i,t.children),t=i.pop();return e},_build:function(t,e,i,n){var s,o=i-e+1,a=this._maxEntries;if(o<=a)return r(s=p(t.slice(e,i+1)),this.toBBox),s;n||(n=Math.ceil(Math.log(o)/Math.log(a)),a=Math.ceil(o/Math.pow(a,n-1))),(s=p([])).leaf=!1,s.height=n;var h,l,u,d,c=Math.ceil(o/a),f=c*Math.ceil(Math.sqrt(a));for(g(t,e,i,f,this.compareMinX),h=e;h<=i;h+=f)for(u=Math.min(h+f-1,i),g(t,h,u,c,this.compareMinY),l=h;l<=u;l+=c)d=Math.min(l+c-1,u),s.children.push(this._build(t,l,d,n-1));return r(s,this.toBBox),s}
1,_chooseSubtree:function(t,e,i,n){for(var s,r,o,a,h,l,d,c,f,p;n.push(e),!e.leaf&&n.length-1!==i;){for(s=0,d=c=1/0,r=e.children.length;s<r;s++){h=u(o=e.children[s]),(l=(f=t,(Math.max((p=o).maxX,f.maxX)-Math.min(p.minX,f.minX))*(Math.max(p.maxY,f.maxY)-Math.min(p.minY,f.minY))-h))<c?(c=l,d=h<d?h:d,a=o):l===c&&h<d&&(d=h,a=o)}e=a||e.children[0]}return e},_insert:function(t,e,i){var n=this.toBBox,s=i?t:n(t),r=[],o=this._chooseSubtree(s,this.data,e,r);for(o.children.push(t),a(o,s);e>=0;)if(r[e].children.length>this._maxEntries)this._split(r,e),e--;else break;this._adjustParentBBoxes(s,r,e)},_split:function(t,e){var i=t[e],n=i.children.length,s=this._minEntries;this._chooseSplitAxis(i,s,n);var o=this._chooseSplitIndex(i,s,n),a=p(i.children.splice(o,i.children.length-o));a.height=i.height,a.leaf=i.leaf,r(i,this.toBBox),r(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(i,a)},_splitRoot:function(t,e){this.data=p([t,e]),this.data.height=t.height+1,this.data.leaf=!1,r(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,i){var n,s,r,a,h,l,d,c;for(l=d=1/0,n=e;n<=i-e;n++)a=function(t,e){var i=Math.max(t.minX,e.minX),n=Math.max(t.minY,e.minY);return Math.max(0,Math.min(t.maxX,e.maxX)-i)*Math.max(0,Math.min(t.maxY,e.maxY)-n)}(s=o(t,0,n,this.toBBox),r=o(t,n,i,this.toBBox)),h=u(s)+u(r),a<l?(l=a,c=n,d=h<d?h:d):a===l&&h<d&&(d=h,c=n);return c},_chooseSplitAxis:function(t,e,i){var n=t.leaf?this.compareMinX:h,s=t.leaf?this.compareMinY:l;this._allDistMargin(t,e,i,n)<this._allDistMargin(t,e,i,s)&&t.children.sort(n)},_allDistMargin:function(t,e,i,n){t.children.sort(n);var s,r,h=this.toBBox,l=o(t,0,e,h),u=o(t,i-e,i,h),c=d(l)+d(u);for(s=e;s<i-e;s++)r=t.children[s],a(l,t.leaf?h(r):r),c+=d(l);for(s=i-e-1;s>=e;s--)r=t.children[s],a(u,t.leaf?h(r):r),c+=d(u);return c},_adjustParentBBoxes:function(t,e,i){for(var n=i;n>=0;n--)a(e[n],t)},_condense:function(t){for(var e,i=t.length-1;i>=0;i--)0===t[i].children.length?i>0?(e=t[i-1].children).splice(e.indexOf(t[i]),1):this.clear():r(t[i],this.toBBox)},compareMinX:function(t,e){return t.left-e.left},compareMinY:function(t,e){return t.top-e.top},toBBox:function(t){return{minX:t.left,minY:t.top,maxX:t.right,maxY:t.bottom}}},t.exports=s},86555(t,e,i){var n=i(45319),s=i(83419),r=i(56583),o=i(26099),a=new s({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===n&&(n=null),this._width=t,this._height=e,this._parent=n,this.aspectMode=i,this.aspectRatio=0===e?1:t/e,this.minWidth=0,this.minHeight=0,this.maxWidth=Number.MAX_VALUE,this.maxHeight=Number.MAX_VALUE,this.snapTo=new o},setAspectMode:function(t){return void 0===t&&(t=0),this.aspectMode=t,this.setSize(this._width,this._height)},setSnap:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.snapTo.set(t,e),this.setSize(this._width,this._height)},setParent:function(t){return this._parent=t,this.setSize(this._width,this._height)},setMin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.minWidth=n(t,0,this.maxWidth),this.minHeight=n(e,0,this.maxHeight),this.setSize(this._width,this._height)},setMax:function(t,e){return void 0===t&&(t=Number.MAX_VALUE),void 0===e&&(e=t),this.maxWidth=n(t,this.minWidth,Number.MAX_VALUE),this.maxHeight=n(e,this.minHeight,Number.MAX_VALUE),this.setSize(this._width,this._height)},setSize:function(t,e){switch(void 0===t&&(t=0),void 0===e&&(e=t),this.aspectMode){case a.NONE:this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(r(e,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height;break;case a.WIDTH_CONTROLS_HEIGHT:this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(this._width*(1/this.aspectRatio),!1);break;case a.HEIGHT_CONTROLS_WIDTH:this._height=this.getNewHeight(r(e,this.snapTo.y)),this._width=this.getNewWidth(this._height*this.aspectRatio,!1);break;case a.FIT:this.constrain(t,e,!0);break;case a.ENVELOP:this.constrain(t,e,!1)}return this},setAspectRatio:function(t){return this.aspectRatio=t,this.setSize(this._width,this._height)},resize:function(t,e){return this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(r(e,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height,this},getNewWidth:function(t,e){return void 0===e&&(e=!0),t=n(t,this.minWidth,this.maxWidth),e&&this._parent&&t>this._parent.width&&(t=Math.max(this.minWidth,this._parent.width)),t},getNewHeight:function(t,e){return void 0===e&&(e=!0),t=n(t,this.minHeight,this.maxHeight),e&&this._parent&&t>this._parent.height&&(t=Math.max(this.minHeight,this._parent.height)),t}
vendor: 4,538 bytes, line 1
1,constrain:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=!0),t=this.getNewWidth(t),e=this.getNewHeight(e);var n=this.snapTo,s=0===e?1:t/e;return i&&this.aspectRatio>s||!i&&this.aspectRatio<s?(e=(t=r(t,n.x))/this.aspectRatio,n.y>0&&(t=(e=r(e,n.y))*this.aspectRatio)):(i&&this.aspectRatio<s||!i&&this.aspectRatio>s)&&(t=(e=r(e,n.y))*this.aspectRatio,n.x>0&&(e=(t=r(t,n.x))*(1/this.aspectRatio))),this._width=t,this._height=e,this},fitTo:function(t,e){return this.constrain(t,e,!0)},envelop:function(t,e){return this.constrain(t,e,!1)},setWidth:function(t){return this.setSize(t,this._height)},setHeight:function(t){return this.setSize(this._width,t)},toString:function(){return"[{ Size (width="+this._width+" height="+this._height+" aspectRatio="+this.aspectRatio+" aspectMode="+this.aspectMode+") }]"},setCSS:function(t){t&&t.style&&(t.style.width=this._width+"px",t.style.height=this._height+"px")},copy:function(t){return t.setAspectMode(this.aspectMode),t.aspectRatio=this.aspectRatio,t.setSize(this.width,this.height)},destroy:function(){this._parent=null,this.snapTo=null},width:{get:function(){return this._width},set:function(t){this.setSize(t,this._height)}},height:{get:function(){return this._height},set:function(t){this.setSize(this._width,t)}}});a.NONE=0,a.WIDTH_CONTROLS_HEIGHT=1,a.HEIGHT_CONTROLS_WIDTH=2,a.FIT=3,a.ENVELOP=4,t.exports=a},15238(t){t.exports="add"},56187(t){t.exports="remove"},82348(t,e,i){t.exports={PROCESS_QUEUE_ADD:i(15238),PROCESS_QUEUE_REMOVE:i(56187)}},41392(t,e,i){t.exports={Events:i(82348),List:i(73162),Map:i(90330),ProcessQueue:i(25774),RTree:i(59542),Size:i(86555)}},57382(t,e,i){var n=i(83419),s=i(45319),r=i(40987),o=i(8054),a=i(50030),h=i(79237);t.exports=new n({Extends:h,initialize:function(t,e,i,n,s){h.call(this,t,e,i,n,s),this.add("__BASE",0,0,0,n,s),this._source=this.frames.__BASE.source,this.canvas=this._source.image,this.context=this.canvas.getContext("2d",{willReadFrequently:!0}),this.width=n,this.height=s,this.imageData=this.context.getImageData(0,0,n,s),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===o.WEBGL&&this.refresh(),this},draw:function(t,e,i,n){return void 0===n&&(n=!0),this.context.drawImage(i,t,e),n&&this.update(),this},drawFrame:function(t,e,i,n,s){void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=!0);var r=this.manager.getFrame(t,e);if(r){var o=r.canvasData,a=r.cutWidth,h=r.cutHeight,l=r.source.resolution;this.context.drawImage(r.source.image,o.x,o.y,a,h,i,n,a/l,h/l),s&&this.update()}return this},setPixel:function(t,e,i,n,s,r){if(void 0===r&&(r=255),t=Math.abs(Math.floor(t)),e=Math.abs(Math.floor(e)),this.getIndex(t,e)>-1){var o=this.context.getImageData(t,e,1,1);o.data[0]=i,o.data[1]=n,o.data[2]=s,o.data[3]=r,this.context.putImageData(o,t,e)}return this},putData:function(t,e,i,n,s,r,o){return void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=t.width),void 0===o&&(o=t.height),this.context.putImageData(t,e,i,n,s,r,o),this},getData:function(t,e,i,n){return t=s(Math.floor(t),0,this.width-1),e=s(Math.floor(e),0,this.height-1),i=s(i,1,this.width-t),n=s(n,1,this.height-e),this.context.getImageData(t,e,i,n)},getPixel:function(t,e,i){i||(i=new r);var n=this.getIndex(t,e);if(n>-1){var s=this.data,o=s[n+0],a=s[n+1],h=s[n+2],l=s[n+3];i.setTo(o,a,h,l)}return i},getPixels:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.width),void 0===n&&(n=i),t=Math.abs(Math.round(t)),e=Math.abs(Math.round(e));for(var o=s(t,0,this.width),a=s(t+i,0,this.width),h=s(e,0,this.height),l=s(e+n,0,this.height),u=new r,d=[],c=h;c<l;c++){for(var f=[],p=o;p<a;p++)u=this.getPixel(p,c,u),f.push({x:p,y:c,color:u.color,alpha:u.alphaGL});d.push(f)}return d},getIndex:function(t,e){return(t=Math.abs(Math.round(t)),e=Math.abs(Math.round(e)),t<this.width&&e<this.height)?(t+e*this.width)*4:-1}
1,refresh:function(){return this._source.update(),this},getCanvas:function(){return this.canvas},getContext:function(){return this.context},clear:function(t,e,i,n,s){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.width),void 0===n&&(n=this.height),void 0===s&&(s=!0),this.context.clearRect(t,e,i,n),s&&this.update(),this},setSize:function(t,e){return void 0===e&&(e=t),(t!==this.width||e!==this.height)&&(this.canvas.width=t,this.canvas.height=e,this._source.width=t,this._source.height=e,this._source.isPowerOf2=a(t,e),this.frames.__BASE.setSize(t,e,0,0),this.width=t,this.height=e,this.refresh()),this},destroy:function(){h.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}})},81320(t,e,i){var n=i(10312),s=i(38058),r=i(27919),o=i(83419),a=i(8054),h=i(87774),l=i(4327),u=i(95540),d=i(79237),c=i(70554),f=i(42538),p=i(61340);t.exports=new o({Extends:d,initialize:function(t,e,i,n,o){void 0===i&&(i=256),void 0===n&&(n=256),void 0===o&&(o=!0),this.type="DynamicTexture";var l=t.game.renderer,u=l&&l.type===a.CANVAS,c=u?r.create2D(this,i,n):[this];d.call(this,t,e,c,i,n),this.add("__BASE",0,0,0,i,n),this.renderer=l,this.width=-1,this.height=-1,this.commandBuffer=[],this.canvas=u?c:null,this.context=u?c.getContext("2d",{willReadFrequently:!0}):null,this.camera=new s(0,0,i,n).setScene(t.game.scene.systemScene,!1),this.drawingContext=u?null:new h(l,{width:i,height:n,camera:this.camera,autoClear:!1}),u||(this.get().source.glTexture=this.drawingContext.texture),this.setSize(i,n,o)},setSize:function(t,e,i){void 0===e&&(e=t),void 0===i&&(i=!0),i&&(t=Math.floor(t),e=Math.floor(e),t%2!=0&&t++,e%2!=0&&e++);var n=this.get(),s=n.source;if(t!==this.width||e!==this.height){this.canvas&&(this.canvas.width=t,this.canvas.height=e);var r=this.drawingContext;r&&(r.width!==t||r.height!==e)&&r.resize(t,e),this.camera.setSize(t,e),s.updateSize(t,e),n.setSize(t,e),this.width=t,this.height=e}else{var o=this.getSourceImage();n.cutX+t>o.width&&(t=o.width-n.cutX),n.cutY+e>o.height&&(e=o.height-n.cutY),n.setSize(t,e,n.cutX,n.cutY)}return this},render:function(){if(0!==this.commandBuffer.length)return this.camera.preRender(),this.renderer.type===a.WEBGL&&this._renderWebGL(),this.renderer.type===a.CANVAS&&this._renderCanvas(),this},_renderWebGL:function(){this.renderer.renderNodes.getNode("DynamicTextureHandler").run(this)},_renderCanvas:function(){var t,e,i,s,r,o,a,h,l,u,d,c,p,g,m,v=this.camera,x=this.context,y=this.renderer,T=this.manager;y.setContext(x);for(var w=this.commandBuffer,b=w.length,S=!1,C=!1,E=0;E<b;E++)switch(w[E]){case f.CLEAR:g=w[++E],m=w[++E],p=w[++E],r=w[++E],void 0!==g&&void 0!==m&&void 0!==p&&void 0!==r?x.clearRect(g,m,p,r):(x.save(),x.setTransform(1,0,0,1,0,0),x.clearRect(0,0,this.width,this.height),x.restore());break;case f.FILL:var A=w[++E];g=w[++E],m=w[++E],p=w[++E],r=w[++E],t=(A>>24&255)/255;var _=A>>16&255,M=A>>8&255,R=255&A;x.save(),x.globalCompositeOperation="source-over",x.fillStyle="rgba("+_+","+M+","+R+","+t+")",x.fillRect(g,m,p,r),x.restore();break;case f.STAMP:o=w[++E],s=w[++E],g=w[++E],m=w[++E],t=w[++E],c=w[++E],l=w[++E],u=w[++E],d=w[++E],a=w[++E],h=w[++E],e=w[++E],C&&(e=n.ERASE);var O=T.resetStamp(t,c);O.setPosition(g,m).setRotation(l).setScale(u,d).setTexture(o,s).setOrigin(a,h).setBlendMode(e),O.renderCanvas(y,O,v,null);break;case f.REPEAT:o=w[++E],s=w[++E],g=w[++E],m=w[++E],t=w[++E],c=w[++E],l=w[++E],u=w[++E],d=w[++E],a=w[++E],h=w[++E],e=w[++E],p=w[++E],r=w[++E];var P=w[++E],L=w[++E],D=w[++E],F=w[++E],I=w[++E];C&&(e=n.ERASE);var N=T.resetTileSprite(t,c);N.setPosition(g,m).setRotation(l).setScale(u,d).setTexture(o,s).setSize(p,r).setOrigin(a,h).setBlendMode(e).setTilePosition(P,L).setTileRotation(D).setTileScale(F,I),N.renderCanvas(y,N,v,null);break;case f.DRAW:var B=w[++E];if(g=w[++E],m=w[++E],void 0!==g){var k=B.x;B.x=g}if(void 0!==m){var U=B.y;B.y=m}C&&(i=B.blendMode,B.blendMode=n.ERASE),B.renderCanvas(y,B,v,null),void 0!==g&&(B.x=k),void 0!==m&&(B.y=U),C&&(B.blendMode=i);break;case f.SET_ERASE:C=!!w[++E];break;case f.PRESERVE:S=w[++E];break;case f.CALLBACK:(0,w[++E])();break;case f.CAPTURE:B=w[++E];var z=w[++E],Y=this.startCapture(B,z);B.renderCanvas(y,B,z.camera||v,Y.transform),this.finishCapture(B,Y)}S||(w.length=0),y.setContext()}
vendor: 4,588 bytes, line 1
1,fill:function(t,e,i,n,s,r){void 0===e&&(e=1),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=this.width),void 0===r&&(r=this.height);var o=c.getTintFromFloats((t>>16&255)/255,(t>>8&255)/255,(255&t)/255,e);return this.commandBuffer.push(f.FILL,o,i,n,s,r),this},clear:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.width),void 0===n&&(n=this.height),this.commandBuffer.push(f.CLEAR,t,e,i,n),this},stamp:function(t,e,i,n,s){void 0===i&&(i=0),void 0===n&&(n=0);var r=u(s,"alpha",1),o=u(s,"tint",0xffffff),a=u(s,"angle",0),h=u(s,"rotation",0),l=u(s,"scale",1),d=u(s,"scaleX",l),c=u(s,"scaleY",l),p=u(s,"originX",.5),g=u(s,"originY",.5),m=u(s,"blendMode",0);return 0!==a&&(h=a*Math.PI/180),this.commandBuffer.push(f.STAMP,t,e,i,n,r,o,h,d,c,p,g,m),this},erase:function(t,e,i,n,s){var r=this.commandBuffer,o=r.length;return r[o-2]!==f.SET_ERASE||r[o-1]?r.push(f.SET_ERASE,!0):r.length-=2,this.draw(t,e,i,n,s),r.push(f.SET_ERASE,!1),this},draw:function(t,e,i,n,s){Array.isArray(t)||(t=[t]);for(var r=t.length,o=0;o<r;o++){var a=t[o];if(a&&a!==this)if(a.renderWebGL||a.renderCanvas)this.commandBuffer.push(f.DRAW,a,e,i);else if(a.isParent||a.list)for(var h=a.getChildren(),u=0;u<h.length;u++){var d=h[u];d.willRender(this.camera)&&this.draw(d,e,i)}else"string"==typeof a?this.stamp(a,null,e,i,{alpha:n,tint:s}):a instanceof l?this.stamp(a.texture.key,a,e,i,{alpha:n,tint:s}):Array.isArray(a)&&this.draw(a,e,i,n,s)}return this},capture:function(t,e){return e||(e={}),this.commandBuffer.push(f.CAPTURE,t,e),this},startCapture:function(t,e){var i={},n=void 0;return e.transform instanceof p?n=e.transform:"world"===e.transform&&t.parentContainer&&(n=t.parentContainer.getWorldTransformMatrix()),n&&(i.transform=n),e.camera&&(n||(n=new p),e.camera.matrixExternal.multiply(n,n)),void 0!==e.x&&(i.x=t.x,t.x=e.x),void 0!==e.y&&(i.y=t.y,t.y=e.y),void 0!==e.rotation?(i.rotation=t.rotation,t.rotation=e.rotation):void 0!==e.angle&&(i.rotation=t.rotation,t.angle=e.angle),void 0!==e.scaleX&&(i.scaleX=t.scaleX,t.scaleX=e.scaleX),void 0!==e.scaleY&&(i.scaleY=t.scaleY,t.scaleY=e.scaleY),void 0!==e.originX&&(i.originX=t.originX,t.originX=e.originX),void 0!==e.originY&&(i.originY=t.originY,t.originY=e.originY),void 0!==e.alpha&&(i.alpha=t.alpha,t.alpha=e.alpha),void 0!==e.tint&&(i.tint=t.tint,t.tint=e.tint),void 0!==e.blendMode&&(i.blendMode=t.blendMode,t.blendMode=e.blendMode),i},finishCapture:function(t,e){void 0!==e.x&&(t.x=e.x),void 0!==e.y&&(t.y=e.y),void 0!==e.rotation&&(t.rotation=e.rotation),void 0!==e.scaleX&&(t.scaleX=e.scaleX),void 0!==e.scaleY&&(t.scaleY=e.scaleY),void 0!==e.originX&&(t.originX=e.originX),void 0!==e.originY&&(t.originY=e.originY),void 0!==e.alpha&&(t.alpha=e.alpha),void 0!==e.tint&&(t.tint=e.tint),void 0!==e.blendMode&&(t.blendMode=e.blendMode)},repeat:function(t,e,i,n,s,r,o){void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=this.width),void 0===r&&(r=this.height);var a=u(o,"alpha",1),h=u(o,"tint",0xffffff),l=u(o,"angle",0),d=u(o,"rotation",0),c=u(o,"scale",1),p=u(o,"scaleX",c),g=u(o,"scaleY",c),m=u(o,"originX",0),v=u(o,"originY",0),x=u(o,"blendMode",0);0!==l&&(d=l*Math.PI/180);var y=u(o,"tilePositionX",0),T=u(o,"tilePositionY",0),w=u(o,"tileRotation",0),b=u(o,"tileScaleX",1),S=u(o,"tileScaleY",1);return this.commandBuffer.push(f.REPEAT,t,e,i,n,a,h,d,p,g,m,v,x,s,r,y,T,w,b,S),this},preserve:function(t){return this.commandBuffer.push(f.PRESERVE,t),this},callback:function(t){return this.commandBuffer.push(f.CALLBACK,t),this},snapshotArea:function(t,e,i,n,s,r,o){return this.drawingContext?this.renderer.snapshotFramebuffer(this.drawingContext.framebuffer,this.width,this.height,s,!1,t,e,i,n,r,o):this.renderer.snapshotCanvas(this.canvas,s,!1,t,e,i,n,r,o),this},snapshot:function(t,e,i){return this.snapshotArea(0,0,this.width,this.height,t,e,i)},snapshotPixel:function(t,e,i){return this.snapshotArea(t,e,1,1,i,"pixel")},getWebGLTexture:function(){if(this.drawingContext)return this.drawingContext.texture},renderWebGL:function(t,e,i,n){var s=this.manager.resetStamp();s.setTexture(this),s.setOrigin(0),s.renderWebGLStep(t,s,i,n)},renderCanvas:function(){},destroy:function(){var t=this.manager.stamp;t&&t.texture===this&&this.manager.resetStamp(),d.prototype.destroy.call(this),r.remove(this.canvas),this.drawingContext&&this.drawingContext.destroy(),this.camera.destroy(),this.canvas=null,this.context=null,this.renderer=null}})},42538(t){t.exports={CLEAR:0,FILL:1,STAMP:2,REPEAT:3,DRAW:4,SET_ERASE:5,PRESERVE:6,CALLBACK:7,CAPTURE:8}},4327(t,e,i){var n=i(83419),s=i(45319),r=i(79291),o=new n({initialize:function(t,e,
1i,n,s,r,o){this.texture=t,this.name=e,this.source=t.source[i],this.sourceIndex=i,this.cutX,this.cutY,this.cutWidth,this.cutHeight,this.x=0,this.y=0,this.width,this.height,this.halfWidth,this.halfHeight,this.centerX,this.centerY,this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.u0=0,this.v0=0,this.u1=0,this.v1=0,this.data={cut:{x:0,y:0,w:0,h:0,r:0,b:0},trim:!1,sourceSize:{w:0,h:0},spriteSourceSize:{x:0,y:0,w:0,h:0,r:0,b:0},radius:0,drawImage:{x:0,y:0,width:0,height:0},is3Slice:!1,scale9:!1,scale9Borders:{x:0,y:0,w:0,h:0}},this.setSize(r,o,n,s)},setCutPosition:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=0),this.cutX=t,this.cutY=e,this.updateUVs()},setCutSize:function(t,e){return this.cutWidth=t,this.cutHeight=e,this.updateUVs()},setSize:function(t,e,i,n){void 0===i&&(i=0),void 0===n&&(n=0),this.setCutPosition(i,n),this.setCutSize(t,e),this.width=t,this.height=e,this.halfWidth=Math.floor(.5*t),this.halfHeight=Math.floor(.5*e),this.centerX=Math.floor(t/2),this.centerY=Math.floor(e/2);var s=this.data,r=s.cut;r.x=i,r.y=n,r.w=t,r.h=e,r.r=i+t,r.b=n+e,s.sourceSize.w=t,s.sourceSize.h=e,s.spriteSourceSize.w=t,s.spriteSourceSize.h=e,s.radius=.5*Math.sqrt(t*t+e*e);var o=s.drawImage;return o.x=i,o.y=n,o.width=t,o.height=e,this.updateUVs()},setTrim:function(t,e,i,n,s,r){var o=this.data,a=o.spriteSourceSize;return o.trim=!0,o.sourceSize.w=t,o.sourceSize.h=e,a.x=i,a.y=n,a.w=s,a.h=r,a.r=i+s,a.b=n+r,this.x=i,this.y=n,this.width=s,this.height=r,this.halfWidth=.5*s,this.halfHeight=.5*r,this.centerX=Math.floor(s/2),this.centerY=Math.floor(r/2),this.updateUVs()},setScale9:function(t,e,i,n){var s=this.data;return s.scale9=!0,s.is3Slice=0===e&&n===this.height,s.scale9Borders.x=t,s.scale9Borders.y=e,s.scale9Borders.w=i,s.scale9Borders.h=n,this},setCropUVs:function(t,e,i,n,r,o,a){var h=this.cutX,l=this.cutY,u=this.cutWidth,d=this.cutHeight,c=this.realWidth,f=this.realHeight;e=s(e,0,c),i=s(i,0,f),n=s(n,0,c-e),r=s(r,0,f-i);var p=h+e,g=l+i,m=n,v=r,x=this.data;if(x.trim){var y=x.spriteSourceSize;n=s(n,0,y.x+u-e),r=s(r,0,y.y+d-i);var T=e+n,w=i+r;if(y.r<e||y.b<i||y.x>T||y.y>w)p=0,g=0,m=0,v=0;else{var b=Math.max(y.x,e),S=Math.max(y.y,i),C=Math.min(y.r,T)-b,E=Math.min(y.b,w)-S;m=C,v=E,p=o?h+(u-(b-y.x)-C):h+(b-y.x),g=a?l+(d-(S-y.y)-E):l+(S-y.y),e=b,i=S,n=C,r=E}}else o&&(p=h+(u-e-n)),a&&(g=l+(d-i-r));var A=this.source.width,_=this.source.height;return t.u0=Math.max(0,p/A),t.v0=1-Math.max(0,g/_),t.u1=Math.min(1,(p+m)/A),t.v1=1-Math.min(1,(g+v)/_),t.x=e,t.y=i,t.cx=p,t.cy=g,t.cw=m,t.ch=v,t.width=n,t.height=r,t.flipX=o,t.flipY=a,t},updateCropUVs:function(t,e,i){return this.setCropUVs(t,t.x,t.y,t.width,t.height,e,i)},setUVs:function(t,e,i,n,s,r){var o=this.data.drawImage;return o.width=t,o.height=e,this.u0=i,this.v0=n,this.u1=s,this.v1=r,this},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,n=this.cutHeight,s=this.data.drawImage;s.width=i,s.height=n;var r=this.source.width,o=this.source.height;return this.u0=t/r,this.v0=1-e/o,this.u1=(t+i)/r,this.v1=1-(e+n)/o,this},updateUVsInverted:function(){var t=this.source.width,e=this.source.height;return this.u0=(this.cutX+this.cutHeight)/t,this.v0=1-this.cutY/e,this.u1=this.cutX/t,this.v1=1-(this.cutY+this.cutWidth)/e,this},clone:function(){var t=new o(this.texture,this.name,this.sourceIndex);return t.cutX=this.cutX,t.cutY=this.cutY,t.cutWidth=this.cutWidth,t.cutHeight=this.cutHeight,t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t.halfWidth=this.halfWidth,t.halfHeight=this.halfHeight,t.centerX=this.centerX,t.centerY=this.centerY,t.rotated=this.rotated,t.data=r(!0,t.data,this.data),t.updateUVs(),t},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}}});t.exports=o},79237(t,e,i){var n=i(83419),s=i(4327),r=i(11876),o='Texture "%s" has no frame "%s"';
vendor: 8,770 bytes, line 1
1t.exports=new n({initialize:function(t,e,i,n,s){Array.isArray(i)||(i=[i]),this.manager=t,this.key=e,this.source=[],this.dataSource=[],this.frames={},this.customData={},this.firstFrame="__BASE",this.frameTotal=0,this.smoothPixelArt=null;for(var o=0;o<i.length;o++)this.source.push(new r(this,i[o],n,s))},add:function(t,e,i,n,r,o){if(this.has(t))return null;var a=new s(this,t,e,i,n,r,o);return this.frames[t]=a,"__BASE"===this.firstFrame&&(this.firstFrame=t),this.frameTotal++,a},remove:function(t){return!!this.has(t)&&(this.get(t).destroy(),delete this.frames[t],!0)},has:function(t){return this.frames.hasOwnProperty(t)},get:function(t){t||(t=this.firstFrame);var e=this.frames[t];return e||(console.warn(o,this.key,t),e=this.frames[this.firstFrame]),e},getTextureSourceIndex:function(t){for(var e=0;e<this.source.length;e++)if(this.source[e]===t)return e;return -1},getFramesFromTextureSource:function(t,e){void 0===e&&(e=!1);var i=[];for(var n in this.frames)if("__BASE"!==n||e){var s=this.frames[n];s.sourceIndex===t&&i.push(s)}return i},getFrameBounds:function(t){void 0===t&&(t=0);for(var e=this.getFramesFromTextureSource(t,!0),i=e[0],n=i.cutX,s=i.cutY,r=i.cutX+i.cutWidth,o=i.cutY+i.cutHeight,a=1;a<e.length-1;a++){var h=e[a];h.cutX<n&&(n=h.cutX),h.cutY<s&&(s=h.cutY),h.cutX+h.cutWidth>r&&(r=h.cutX+h.cutWidth),h.cutY+h.cutHeight>o&&(o=h.cutY+h.cutHeight)}return{x:n,y:s,width:r-n,height:o-s}},getFrameNames:function(t){void 0===t&&(t=!1);var e=Object.keys(this.frames);if(!t){var i=e.indexOf("__BASE");-1!==i&&e.splice(i,1)}return e},getSourceImage:function(t){(null==t||1===this.frameTotal)&&(t="__BASE");var e=this.frames[t];return e?e.source.image:(console.warn(o,this.key,t),this.frames.__BASE.source.image)},getDataSourceImage:function(t){(null==t||1===this.frameTotal)&&(t="__BASE");var e,i=this.frames[t];return i?e=i.sourceIndex:(console.warn(o,this.key,t),e=this.frames.__BASE.sourceIndex),this.dataSource[e].image},setSource:function(t,e,i,n,s){void 0===e&&(e=0),void 0===i&&(i=!1),Array.isArray(t)||(t=[t]);for(var o=0;o<t.length;o++){var a=o+e,h=t[o];h instanceof r&&(h=h.source);var l=this.source[a],u=h.naturalWidth||h.videoWidth||h.width||l.width||n||0,d=h.naturalHeight||h.videoHeight||h.height||l.height||s||0;if(l){if(!i){l.updateSource(h);continue}l.destroy()}this.source[a]=new r(this,h,u,d)}},setDataSource:function(t,e,i,n,s){void 0===e&&(e=0),void 0===i&&(i=!1),Array.isArray(t)||(t=[t]);for(var o=0;o<t.length;o++){var a=o+e,h=t[o],l=this.dataSource[a],u=h.naturalWidth||h.videoWidth||h.width||l.width||n||0,d=h.naturalHeight||h.videoHeight||h.height||l.height||s||0;if(l){if(!i){l.updateSource(h);continue}l.destroy()}this.dataSource[a]=new r(this,h,u,d)}},setFilter:function(t){var e;for(e=0;e<this.source.length;e++)this.source[e].setFilter(t);for(e=0;e<this.dataSource.length;e++)this.dataSource[e].setFilter(t)},setSmoothPixelArt:function(t){this.smoothPixelArt=t,t&&this.setFilter(Phaser.Textures.FilterMode.LINEAR)},setWrap:function(t,e){void 0===e&&(e=t);for(var i=0;i<this.source.length;i++)this.source[i].setWrap(t,e);for(i=0;i<this.dataSource.length;i++)this.dataSource[i].setWrap(t,e)},destroy:function(){var t,e=this.source,i=this.dataSource;for(t=0;t<e.length;t++)e[t]&&e[t].destroy();for(t=0;t<i.length;t++)i[t]&&i[t].destroy();for(var n in this.frames){var s=this.frames[n];s&&s.destroy()}this.source=[],this.dataSource=[],this.frames={},this.manager.removeKey(this.key),this.manager=null}})},17130(t,e,i){var n=i(27919),s=i(57382),r=i(83419),o=i(40987),a=i(8054),h=i(81320),l=i(50792),u=i(69442),d=i(4327),c=i(8443),f=i(35154),p=i(88571),g=i(30100),m=i(41212),v=i(61309),x=i(87841),y=i(79237),T=i(20839);t.exports=new r({Extends:l,initialize:function(t){l.call(this),this.game=t,this.name="TextureManager",this.list={},this._tempCanvas=n.create2D(this),this._tempContext=this._tempCanvas.getContext("2d",{willReadFrequently:!0}),this._pending=0,this.stamp,this.stampCrop=new x,this.tileSprite,this.silentWarnings=!1,t.events.once(c.BOOT,this.boot,this)},boot:function(){this._pending=3,this.on(u.LOAD,this.updatePending,this),this.on(u.ERROR,this.updatePending,this);var t=this.game.config;null!==t.defaultImage&&this.addBase64("__DEFAULT",t.defaultImage),null!==t.missingImage&&this.addBase64("__MISSING",t.missingImage),null!==t.whiteImage&&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(c.DESTROY,this.destroy,this),this.game.events.once(c.SYSTEM_READY,function(t){this.stamp=new p(t).setOrigin(0),this.tileSprite=new T(t,0,0,256,256,"__WHITE").setOrigin(0)},this)},updatePending:function(){this._pending--,0===this._pending&&(this.off(u.LOAD),this.off(u.ERROR),this.emit(u.READY))},checkKey:function(t){return!(!t||"string"!=typeof t||this.exists(t))||(this.silentWarnings||console.error("Texture key already in use: "+t),!1)},remove:function(t){if("string"==typeof t)if(!this.exists(t))return this.silentWarnings||console.warn("No texture found matching key: "+t),this;else t=this.get(t);var e=t.key;return this.list.hasOwnProperty(e)&&(t.destroy(),this.emit(u.REMOVE,e),this.emit(u.REMOVE_KEY+e)),this},removeKey:function(t){return this.list.hasOwnProperty(t)&&delete this.list[t],this},addBase64:function(t,e){if(this.checkKey(t)){var i=this,n=new Image;n.onerror=function(){i.emit(u.ERROR,t)},n.onload=function(){var e=i.create(t,n);e&&(v.Image(e,0),i.emit(u.ADD,t,e),i.emit(u.ADD_KEY+t,e),i.emit(u.LOAD,t,e))},n.src=e}return this},getBase64:function(t,e,i,s){void 0===i&&(i="image/png"),void 0===s&&(s=.92);var r="",o=this.getFrame(t,e);if(o&&(o.source.isRenderTexture||o.source.isGLTexture))this.silentWarnings||console.warn("Cannot getBase64 from WebGL Texture");else if(o){var a=o.canvasData,h=n.create2D(this,a.width,a.height),l=h.getContext("2d",{willReadFrequently:!0});a.width>0&&a.height>0&&l.drawImage(o.source.image,a.x,a.y,a.width,a.height,0,0,a.width,a.height),r=h.toDataURL(i,s),n.remove(h)}return r},addImage:function(t,e,i){var n=null;return this.checkKey(t)&&(n=this.create(t,e),v.Image(n,0),i&&n.setDataSource(i),this.emit(u.ADD,t,n),this.emit(u.ADD_KEY+t,n)),n},addGLTexture:function(t,e){var i=null;if(this.checkKey(t)){var n=e.width,s=e.height;(i=this.create(t,e,n,s)).add("__BASE",0,0,0,n,s),this.emit(u.ADD,t,i),this.emit(u.ADD_KEY+t,i)}return i},addCompressedTexture:function(t,e,i){var n=null;if(this.checkKey(t)){if((n=this.create(t,e)).add("__BASE",0,0,0,e.width,e.height),i){var s=function(t,e,i){Array.isArray(i.textures)||Array.isArray(i.frames)?v.JSONArray(t,e,i):v.JSONHash(t,e,i)};if(Array.isArray(i))for(var r=0;r<i.length;r++)s(n,r,i[r]);else s(n,0,i)}this.emit(u.ADD,t,n),this.emit(u.ADD_KEY+t,n)}return n},addRenderTexture:function(t,e){var i=null;return this.checkKey(t)&&((i=this.create(t,e)).add("__BASE",0,0,0,e.width,e.height),this.emit(u.ADD,t,i),this.emit(u.ADD_KEY+t,i)),i},createCanvas:function(t,e,i){if(void 0===e&&(e=256),void 0===i&&(i=256),this.checkKey(t)){var s=n.create(this,e,i,a.CANVAS,!0);return this.addCanvas(t,s)}return null},addCanvas:function(t,e,i){void 0===i&&(i=!1);var n=null;return i?n=new s(this,t,e,e.width,e.height):this.checkKey(t)&&(n=new s(this,t,e,e.width,e.height),this.list[t]=n,this.emit(u.ADD,t,n),this.emit(u.ADD_KEY+t,n)),n},addDynamicTexture:function(t,e,i,n){var s=null;return"string"!=typeof t||this.exists(t)?t=(s=t).key:(void 0===n&&(n=!0),s=new h(this,t,e,i,n)),this.checkKey(t)?(this.list[t]=s,this.emit(u.ADD,t,s),this.emit(u.ADD_KEY+t,s)):s=null,s},addAtlas:function(t,e,i,n){return i&&!Array.isArray(i)&&Array.isArray(i.pages)&&i.frames&&!Array.isArray(i.frames)?this.addAtlasPCT(t,e,i,n):Array.isArray(i.textures)||Array.isArray(i.frames)?this.addAtlasJSONArray(t,e,i,n):this.addAtlasJSONHash(t,e,i,n)},addAtlasJSONArray:function(t,e,i,n){var s=null;if(e instanceof y?(t=e.key,s=e):this.checkKey(t)&&(s=this.create(t,e)),s){if(Array.isArray(i))for(var r=1===i.length,o=0;o<s.source.length;o++){var a=r?i[0]:i[o];v.JSONArray(s,o,a)}else v.JSONArray(s,0,i);n&&s.setDataSource(n),this.emit(u.ADD,t,s),this.emit(u.ADD_KEY+t,s)}return s},addAtlasJSONHash:function(t,e,i,n){var s=null;if(e instanceof y?(t=e.key,s=e):this.checkKey(t)&&(s=this.create(t,e)),s){if(Array.isArray(i))for(var r=0;r<i.length;r++)v.JSONHash(s,r,i[r]);else v.JSONHash(s,0,i);n&&s.setDataSource(n),this.emit(u.ADD,t,s),this.emit(u.ADD_KEY+t,s)}return s},addAtlasPCT:function(t,e,i,n){var s=null;return e instanceof y?(t=e.key,s=e):this.checkKey(t)&&(s=this.create(t,e)),s&&(v.PCT(s,i),n&&s.setDataSource(n),this.emit(u.ADD,t,s),this.emit(u.ADD_KEY+t,s)),s},addAtlasXML:function(t,e,i,n){var s=null;return e instanceof y?(t=e.key,s=e):this.checkKey(t)&&(s=this.create(t,e)),s&&(v.AtlasXML(s,0,i),n&&s.setDataSource(n),this.emit
1(u.ADD,t,s),this.emit(u.ADD_KEY+t,s)),s},addUnityAtlas:function(t,e,i,n){var s=null;return e instanceof y?(t=e.key,s=e):this.checkKey(t)&&(s=this.create(t,e)),s&&(v.UnityYAML(s,0,i),n&&s.setDataSource(n),this.emit(u.ADD,t,s),this.emit(u.ADD_KEY+t,s)),s},addSpriteSheet:function(t,e,i,n){var s=null;if(e instanceof y?(t=e.key,s=e):this.checkKey(t)&&(s=this.create(t,e)),s){var r=s.source[0].width,o=s.source[0].height;v.SpriteSheet(s,0,0,0,r,o,i),n&&s.setDataSource(n),this.emit(u.ADD,t,s),this.emit(u.ADD_KEY+t,s)}return s},addSpriteSheetFromAtlas:function(t,e){if(!this.checkKey(t))return null;var i=f(e,"atlas",null),n=f(e,"frame",null);if(i&&n){var s=this.get(i).get(n);if(s){var r=s.source.image;r||(r=s.source.glTexture);var o=this.create(t,r);return s.trimmed?v.SpriteSheetFromAtlas(o,s,e):v.SpriteSheet(o,0,s.cutX,s.cutY,s.cutWidth,s.cutHeight,e),this.emit(u.ADD,t,o),this.emit(u.ADD_KEY+t,o),o}}},addUint8Array:function(t,e,i,n){if(!this.checkKey(t)||e.length/4!=i*n)return null;var s=this.create(t,e,i,n);return s.add("__BASE",0,0,0,i,n),this.emit(u.ADD,t,s),this.emit(u.ADD_KEY+t,s),s},addFlatColor:function(t,e,i,n,s){if(!this.checkKey(t)||e<=0||i<=0)return null;void 0===n&&(n=0),void 0===s&&(s=0);for(var r=g(n),o=r.red,a=r.green,h=r.blue,l=new Uint8Array(e*i*4),u=0;u<e*i;u++)l[4*u]=o,l[4*u+1]=a,l[4*u+2]=h,l[4*u+3]=255*s;return this.addUint8Array(t,l,e,i)},create:function(t,e,i,n){var s=null;return this.checkKey(t)&&(s=new y(this,t,e,i,n),this.list[t]=s),s},exists:function(t){return this.list.hasOwnProperty(t)},get:function(t){return(void 0===t&&(t="__DEFAULT"),this.list[t])?this.list[t]:t instanceof y?t:t instanceof d?t.texture:this.list.__MISSING},cloneFrame:function(t,e){if(this.list[t])return this.list[t].get(e).clone()},getFrame:function(t,e){if(this.list[t])return this.list[t].get(e)},parseFrame:function(t){if(t){if("string"==typeof t)return this.getFrame(t);if(Array.isArray(t)&&2===t.length)return this.getFrame(t[0],t[1]);if(m(t))return this.getFrame(t.key,t.frame);else if(t instanceof y)return t.get();else if(t instanceof d)return t}},getTextureKeys:function(){var t=[];for(var e in this.list)"__DEFAULT"!==e&&"__MISSING"!==e&&"__WHITE"!==e&&"__NORMAL"!==e&&t.push(e);return t},getPixel:function(t,e,i,n){var s=this.getFrame(i,n);if(s){var r=s.source,a=r.image;if(!(r.isCanvas||r.isVideo||a instanceof HTMLImageElement))return console.warn("TextureManager.getPixelAlpha: The texture source must be Image, Canvas, or Video"),null;t-=s.x,e-=s.y;var h=s.data.cut;if(t+=h.x,e+=h.y,t>=h.x&&t<h.r&&e>=h.y&&e<h.b){var l=this._tempContext;l.clearRect(0,0,1,1),l.drawImage(a,t,e,1,1,0,0,1,1);var u=l.getImageData(0,0,1,1);return new o(u.data[0],u.data[1],u.data[2],u.data[3])}}return null},getPixelAlpha:function(t,e,i,n){var s=this.getFrame(i,n);if(s){var r=s.source,o=r.image;if(!(r.isCanvas||r.isVideo||o instanceof HTMLImageElement))return console.warn("TextureManager.getPixelAlpha: The texture source must be Image, Canvas, or Video"),null;t-=s.x,e-=s.y;var a=s.data.cut;if(t+=a.x,e+=a.y,t>=a.x&&t<a.r&&e>=a.y&&e<a.b){var h=this._tempContext;return h.clearRect(0,0,1,1),h.drawImage(o,t,e,1,1,0,0,1,1),h.getImageData(0,0,1,1).data[3]}}return null},setTexture:function(t,e,i){return this.list[e]&&(t.texture=this.list[e],t.frame=t.texture.get(i)),t},renameTexture:function(t,e){var i=this.get(t);return!!i&&t!==e&&(i.key=e,this.list[e]=i,delete this.list[t],!0)},each:function(t,e){for(var i=[null],n=1;n<arguments.length;n++)i.push(arguments[n]);for(var s in this.list)i[0]=this.list[s],t.apply(e,i)},resetStamp:function(t,e){void 0===t&&(t=1),void 0===e&&(e=0xffffff);var i=this.stamp;return i.setCrop(),i.setPosition(0),i.setAngle(0),i.setScale(1),i.setAlpha(t),i.setTint(e),i.setTexture("__WHITE"),i},resetTileSprite:function(t,e){void 0===t&&(t=1),void 0===e&&(e=0xffffff);var i=this.tileSprite;return i.setPosition(0),i.setAngle(0),i.setScale(1),i.setAlpha(t),i.setTint(e),i.setTexture("__WHITE"),i},destroy:function(){for(var t in this.list)this.list[t].destroy();this.list={},this.stamp.destroy(),this.game=null,this.stamp=null,n.remove(this._tempCanvas)}})}
vendor: 4,605 bytes, line 1
1,11876(t,e,i){var n=i(27919),s=i(83419),r=i(50030),o=i(29795),a=i(82751);t.exports=new s({initialize:function(t,e,i,n,s){void 0===s&&(s=!0);var h=t.manager.game;this.renderer=h.renderer,this.texture=t,this.source=e,this.image=e.compressed?null:e,this.compressionAlgorithm=e.compressed?e.format:null,this.resolution=1,this.width=i||e.naturalWidth||e.videoWidth||e.width||0,this.height=n||e.naturalHeight||e.videoHeight||e.height||0,this.scaleMode=o.DEFAULT,this.isCanvas=e instanceof HTMLCanvasElement,this.isVideo=window.hasOwnProperty("HTMLVideoElement")&&e instanceof HTMLVideoElement,this.isRenderTexture="RenderTexture"===e.type||"DynamicTexture"===e.type,this.isGLTexture=e instanceof a,this.isPowerOf2=r(this.width,this.height),this.glTexture=null,this.flipY=s,this.init(h)},init:function(t){var e=this.renderer;if(e){var i=this.source;if(e.gl){var n=this.image,s=this.flipY,r=this.width,o=this.height,a=this.scaleMode;this.isCanvas?this.glTexture=e.createCanvasTexture(n,!1,s):this.isVideo?this.glTexture=e.createVideoTexture(n,!1,s):this.isRenderTexture?this.glTexture=e.createTextureFromSource(null,r,o,a,void 0,s):this.isGLTexture?this.glTexture=i:this.compressionAlgorithm?this.glTexture=e.createTextureFromSource(i,void 0,void 0,a,void 0,s):i instanceof Uint8Array?this.glTexture=e.createUint8ArrayTexture(i,r,o,void 0,s):this.glTexture=e.createTextureFromSource(n,r,o,a,void 0,s)}else this.isRenderTexture&&(this.image=i.canvas)}t.config.antialias||this.setFilter(1)},setFilter:function(t){this.renderer&&this.renderer.gl&&this.renderer.setTextureFilter(this.glTexture,t),this.scaleMode=t},setFlipY:function(t){return void 0===t&&(t=!0),t===this.flipY||(this.flipY=t,this.update()),this},setWrap:function(t,e){return this.renderer&&this.renderer.gl&&this.renderer.setTextureWrap(this.glTexture,t,e),this},update:function(){var t=this.renderer,e=this.image,i=this.flipY;if(t.gl){var n=this.glTexture;this.isCanvas?t.updateCanvasTexture(e,n,i):this.isVideo?t.updateVideoTexture(e,n,i):n.update(this.source,this.width,this.height,i,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format)}},updateSize:function(t,e){(this.width!==t||this.height!==e)&&(this.width=t,this.height=e,this.isPowerOf2=r(t,e))},updateSource:function(t){!this.isCanvas||t===this.image||t instanceof HTMLCanvasElement||n.remove(this.image),this.source=t,this.image=t.compressed?null:t,this.compressionAlgorithm=t.compressed?t.format:null,this.width=t.naturalWidth||t.videoWidth||t.width||0,this.height=t.naturalHeight||t.videoHeight||t.height||0,this.isPowerOf2=r(this.width,this.height),this.isCanvas=t instanceof HTMLCanvasElement,this.isVideo=window.hasOwnProperty("HTMLVideoElement")&&t instanceof HTMLVideoElement,this.isRenderTexture="RenderTexture"===t.type||"DynamicTexture"===t.type,this.isGLTexture=t instanceof a,this.update()},destroy:function(){this.glTexture&&this.renderer.deleteTexture(this.glTexture),this.isCanvas&&n.remove(this.image),this.renderer=null,this.texture=null,this.source=null,this.image=null,this.glTexture=null}})},43378(t){t.exports={CLAMP_TO_EDGE:33071,REPEAT:10497,MIRRORED_REPEAT:33648}},19673(t){t.exports={LINEAR:0,NEAREST:1}},44538(t){t.exports="addtexture"},63486(t){t.exports="addtexture-"},94851(t){t.exports="onerror"},29099(t){t.exports="onload"},8678(t){t.exports="ready"},86415(t){t.exports="removetexture"},30879(t){t.exports="removetexture-"},69442(t,e,i){t.exports={ADD:i(44538),ADD_KEY:i(63486),ERROR:i(94851),LOAD:i(29099),READY:i(8678),REMOVE:i(86415),REMOVE_KEY:i(30879)}},27458(t,e,i){var n=i(79291),s=i(19673),r=i(43378),o={CanvasTexture:i(57382),DynamicTexture:i(81320),Events:i(69442),FilterMode:s,Frame:i(4327),Parsers:i(61309),Texture:i(79237),TextureManager:i(17130),TextureSource:i(11876),WrapMode:r};o=n(!1,o,s),t.exports=n(!1,o,r)},89905(t){t.exports=function(t,e,i){if(!i.getElementsByTagName("TextureAtlas"))return void console.warn("Invalid Texture Atlas XML given");var n,s=t.source[e];t.add("__BASE",e,0,0,s.width,s.height);for(var r=i.getElementsByTagName("SubTexture"),o=0;o<r.length;o++){var a=r[o].attributes,h=a.name.value,l=parseInt(a.x.value,10),u=parseInt(a.y.value,10),d=parseInt(a.width.value,10),c=parseInt(a.height.value,10);if(n=t.add(h,e,l,u,d,c),a.frameX){var f=Math.abs(parseInt(a.frameX.value,10)),p=Math.abs(parseInt(a.frameY.value,10)),g=parseInt(a.frameWidth.value,10),m=parseInt(a.frameHeight.value,10);n.setTrim(g,m,f,p,d,c)}}return t}},72893(t){t.exports=function(t,e){var i=t.source[e];return t.add("__BASE",e,0,0,i.width,i.height),t}},4832(t){t.exports=function(t,e){var i=t.source[e];return t.add("__BASE",e,0,0,i.width,i.height),t}}
1,78566(t,e,i){var n=i(41786);t.exports=function(t,e,i){if(!i.frames&&!i.textures)return void console.warn("Invalid Texture Atlas JSON Array");var s,r=t.source[e];t.add("__BASE",e,0,0,r.width,r.height);for(var o=Array.isArray(i.textures)?i.textures[e].frames:i.frames,a=0;a<o.length;a++){var h=o[a];if(!(s=t.add(h.filename,e,h.frame.x,h.frame.y,h.frame.w,h.frame.h))){console.warn("Invalid atlas json, frame already exists: "+h.filename);continue}h.trimmed&&s.setTrim(h.sourceSize.w,h.sourceSize.h,h.spriteSourceSize.x,h.spriteSourceSize.y,h.spriteSourceSize.w,h.spriteSourceSize.h),h.rotated&&(s.rotated=!0,s.updateUVsInverted());var l=h.anchor||h.pivot;l&&(s.customPivot=!0,s.pivotX=l.x,s.pivotY=l.y),h.scale9Borders&&s.setScale9(h.scale9Borders.x,h.scale9Borders.y,h.scale9Borders.w,h.scale9Borders.h),s.customData=n(h)}for(var u in i)"frames"!==u&&(Array.isArray(i[u])?t.customData[u]=i[u].slice(0):t.customData[u]=i[u]);return t}},39711(t,e,i){var n=i(41786);t.exports=function(t,e,i){if(!i.frames)return void console.warn("Invalid Texture Atlas JSON Hash given, missing 'frames' Object");var s,r=t.source[e];t.add("__BASE",e,0,0,r.width,r.height);var o=i.frames;for(var a in o)if(o.hasOwnProperty(a)){var h=o[a];if(!(s=t.add(a,e,h.frame.x,h.frame.y,h.frame.w,h.frame.h))){console.warn("Invalid atlas json, frame already exists: "+a);continue}h.trimmed&&s.setTrim(h.sourceSize.w,h.sourceSize.h,h.spriteSourceSize.x,h.spriteSourceSize.y,h.spriteSourceSize.w,h.spriteSourceSize.h),h.rotated&&(s.rotated=!0,s.updateUVsInverted());var l=h.anchor||h.pivot;l&&(s.customPivot=!0,s.pivotX=l.x,s.pivotY=l.y),h.scale9Borders&&s.setScale9(h.scale9Borders.x,h.scale9Borders.y,h.scale9Borders.w,h.scale9Borders.h),s.customData=n(h)}for(var u in i)"frames"!==u&&(Array.isArray(i[u])?t.customData[u]=i[u].slice(0):t.customData[u]=i[u]);return t}},31403(t){t.exports=function(t){var e,i=[171,75,84,88,32,49,49,187,13,10,26,10],n=new Uint8Array(t,0,12);for(e=0;e<n.length;e++)if(n[e]!==i[e])return void console.warn("KTXParser - Invalid file format");var s=Uint32Array.BYTES_PER_ELEMENT,r=new DataView(t,12,13*s),o=0x4030201===r.getUint32(0,!0);if(0!==r.getUint32(+s,o))return void console.warn("KTXParser - Only compressed formats supported");var a=r.getUint32(4*s,o),h=r.getUint32(6*s,o),l=r.getUint32(7*s,o),u=Math.max(1,r.getUint32(11*s,o)),d=r.getUint32(12*s,o),c=Array(u),f=64+d,p=h,g=l;for(e=0;e<u;e++){var m=new Int32Array(t,f,1)[0];f+=4,c[e]={data:new Uint8Array(t,f,m),width:p,height:g},p=Math.max(1,p>>1),g=Math.max(1,g>>1),f+=m}return{mipmaps:c,width:h,height:l,internalFormat:a,compressed:!0,generateMipmap:!1}}},41942(t){t.exports=function(t,e){if(!e||!e.frames||!e.pages)return void console.warn("Invalid PCT atlas data given");var i=t.source[0];t.add("__BASE",0,0,0,i.width,i.height);var n=e.frames;for(var s in n)if(n.hasOwnProperty(s)){var r=n[s],o=0|r.page;if(o>=t.source.length){console.warn('PCT atlas frame "'+s+'" references missing page '+o);continue}var a=t.add(r.key||s,o,r.x,r.y,r.w,r.h);if(!a){console.warn("Invalid PCT atlas, frame already exists: "+s);continue}r.trimmed&&a.setTrim(r.sourceW,r.sourceH,r.trimX,r.trimY,r.w,r.h),r.rotated&&(a.rotated=!0,a.updateUVsInverted())}return t.customData.pct={pages:e.pages,folders:e.folders},t}},39620(t){var e={1:".png",2:".webp",3:".jpg",4:".jpeg",5:".gif"},i=function(t){if(0===t.length)return!1;for(var e=0;e<t.length;e++){var i=t.charCodeAt(e);if(i<48||i>57)return!1}return!0},n=function(t,e){for(var i=String(t);i.length<e;)i="0"+i;return i},s=function(t,n,s){var r=t,o="",a=r.indexOf("/");a>0&&i(r.substring(0,a))&&(o=n[parseInt(r.substring(0,a),10)],r=r.substring(a+1));var h=/~([1-5])$/.exec(r);if(h){var l=e[parseInt(h[1],10)];r=r.substring(0,r.length-2)+l}else s&&(r+=s);return o?o+"/"+r:r},r=function(t,i){var r="",o=/~([1-5])$/.exec(t);o&&(r=e[parseInt(o[1],10)],t=t.substring(0,t.length-2));for(var a=[],h=t.split(","),l=0;l<h.length;l++){var u=h[l],d=u.indexOf("#");if(d>=0)for(var c=u.substring(0,d),f=u.substring(d+1),p=f.indexOf("-"),g=f.substring(0,p),m=f.substring(p+1),v=parseInt(g,10),x=parseInt(m,10),y=g.length>1&&"0"===g.charAt(0)?g.length:0,T=v;T<=x;T++){var w=y>0?n(T,y):String(T);a.push(s(c+w,i,r))}else a.push(s(u,i,r))}return a};t.exports=function(t){if("string"!=typeof t||0===t.length)return console.warn("Invalid PCT file: empty or not a string"),null;var e=t.split("\n"),i=e[0];if(13===i.charCodeAt(i.length-1)&&(i=i.substring(0,i.length-1)),!i||0!==i.indexOf("PCT:"))return console.warn("Not a PCT file: missing PCT: header"),null;var n=i.substring(4),o=parseInt(n.split(".")[0],10);if(isNaN(o)||o>1)return console.warn("Unsupported PCT version: "+n),null;for(var a=[],h=[],l={},u=0,d=null,c=1;c<e.length;c++){var f=e[c];if(f){if(13===f.charCodeAt(f.length-1)&&!(f=f.substring(0,f.length-1)))continue;if(null!==d){var p=d;d=null;for(var g=a[p.page].padding,m=p.frameW+2*g,v=p.frameH+2*g,x=r(f,h),y=0;y<x.length;y++){var T=y%p.cols,w=Math.floor(y/p.cols),b=x[y],S={key:b,page:p.page,x:p.x+T*m+g,y:p.y+w*v+g,w:p.frameW,h:p.frameH,trimmed:p.trimmed,rotated:!1};p.trimmed?(S.sourceW=p.sourceW,S.sourceH=p.sourceH,S.trimX=p.trimX,S.trimY=p.trimY):(S.sourceW=p.frameW,S.sourceH=p.frameH,S.trimX=0,S.trimY=0),l[b]=S}continue}var C=f.substring(0,2);if("P:"===C){var E=f.substring(2).split(",");
vendor: 4,355 bytes, line 1
1a.push({filename:E[0],format:E[1],width:parseInt(E[2],10),height:parseInt(E[3],10),padding:parseInt(E[4],10)})}else if("F:"===C)h.push(f.substring(2));else if("#"===f.charAt(0))u=parseInt(f.substring(1),10);else if("B:"===C){var A=f.substring(2).split("|"),_=A[0].split(","),M={page:u,x:parseInt(_[0],10),y:parseInt(_[1],10),cols:parseInt(_[2],10),frameW:parseInt(_[3],10),frameH:parseInt(_[4],10),trimmed:A.length>1};if(M.trimmed){var R=A[1].split(",");M.sourceW=parseInt(R[0],10),M.sourceH=parseInt(R[1],10),M.trimX=parseInt(R[2],10),M.trimY=parseInt(R[3],10)}d=M}else if("A:"===C){var O=f.indexOf("=",2);if(-1===O)continue;var P=s(f.substring(2,O),h,""),L=r(f.substring(O+1),h),D=l[P];if(D)for(var F=0;F<L.length;F++){var I=L[F],N={};for(var B in D)N[B]=D[B];N.key=I,l[I]=N}}else{var k=f.split("|");if(k.length<3)continue;var U=s(k[0],h,""),z=parseInt(k[1],10),Y=(2&z)!=0,X=k[2].split(","),W={key:U,page:u,x:parseInt(X[0],10),y:parseInt(X[1],10),w:parseInt(X[2],10),h:parseInt(X[3],10),trimmed:Y,rotated:(1&z)!=0};if(Y){var G=k[3].split(",");W.sourceW=parseInt(G[0],10),W.sourceH=parseInt(G[1],10),W.trimX=parseInt(G[2],10),W.trimY=parseInt(G[3],10)}else W.sourceW=W.w,W.sourceH=W.h,W.trimX=0,W.trimY=0;l[U]=W}}}return{pages:a,folders:h,frames:l}}},82038(t){function e(t,e,i,n,s,r,o){return void 0===o&&(o=16),Math.floor((t+i)/s)*Math.floor((e+n)/r)*o}function i(t,e){return(t=Math.max(t,16))*(e=Math.max(e,8))/4}function n(t,e){return(t=Math.max(t,8))*(e=Math.max(e,8))/2}function s(t,e){return Math.ceil(t/4)*Math.ceil(e/4)*16}function r(t,i){return e(t,i,3,3,4,4,8)}function o(t,i){return e(t,i,3,3,4,4)}var a={0:{sizeFunc:i,glFormat:[35841]},1:{sizeFunc:i,glFormat:[35843]},2:{sizeFunc:n,glFormat:[35840]},3:{sizeFunc:n,glFormat:[35842]},6:{sizeFunc:r,glFormat:[36196]},7:{sizeFunc:r,glFormat:[33776,35916]},8:{sizeFunc:o,glFormat:[33777,35917]},9:{sizeFunc:o,glFormat:[33778,35918]},11:{sizeFunc:o,glFormat:[33779,35919]},14:{sizeFunc:s,glFormat:[36494,36495]},15:{sizeFunc:s,glFormat:[36492,36493]},22:{sizeFunc:r,glFormat:[37492,37493]},23:{sizeFunc:o,glFormat:[37496,37497]},24:{sizeFunc:r,glFormat:[37494,37495]},25:{sizeFunc:r,glFormat:[37488]},26:{sizeFunc:o,glFormat:[37490]},27:{sizeFunc:o,glFormat:[37808,37840]},28:{sizeFunc:function(t,i){return e(t,i,4,3,5,4)},glFormat:[37809,37841]},29:{sizeFunc:function(t,i){return e(t,i,4,4,5,5)},glFormat:[37810,37842]},30:{sizeFunc:function(t,i){return e(t,i,5,4,6,5)},glFormat:[37811,37843]},31:{sizeFunc:function(t,i){return e(t,i,5,5,6,6)},glFormat:[37812,37844]},32:{sizeFunc:function(t,i){return e(t,i,7,4,8,5)},glFormat:[37813,37845]},33:{sizeFunc:function(t,i){return e(t,i,7,5,8,6)},glFormat:[37814,37846]},34:{sizeFunc:function(t,i){return e(t,i,7,7,8,8)},glFormat:[37815,37847]},35:{sizeFunc:function(t,i){return e(t,i,9,4,10,5)},glFormat:[37816,37848]},36:{sizeFunc:function(t,i){return e(t,i,9,5,10,6)},glFormat:[37817,37849]},37:{sizeFunc:function(t,i){return e(t,i,9,7,10,8)},glFormat:[37818,37850]},38:{sizeFunc:function(t,i){return e(t,i,9,9,10,10)},glFormat:[37819,37851]},39:{sizeFunc:function(t,i){return e(t,i,11,9,12,10)},glFormat:[37820,37852]},40:{sizeFunc:function(t,i){return e(t,i,11,11,12,12)},glFormat:[37821,37853]}};t.exports=function(t){for(var e=new Uint32Array(t,0,13),i=e[0],n=0x3525650===i?e[2]:e[3],s=e[4],r=a[n].glFormat[s],o=a[n].sizeFunc,h=e[11],l=e[7],u=e[6],d=new Uint8Array(t,52+e[12]),c=Array(h),f=0,p=l,g=u,m=0;m<h;m++){var v=o(p,g);c[m]={data:new Uint8Array(d.buffer,d.byteOffset+f,v),width:p,height:g},p=Math.max(1,p>>1),g=Math.max(1,g>>1),f+=v}return{mipmaps:c,width:l,height:u,internalFormat:r,compressed:!0,generateMipmap:!1}}},75549(t,e,i){var n=i(95540);t.exports=function(t,e,i,s,r,o,a){var h=n(a,"frameWidth",null),l=n(a,"frameHeight",h);if(null===h)throw Error("TextureManager.SpriteSheet: Invalid frameWidth given.");var u=t.source[e];t.add("__BASE",e,0,0,u.width,u.height);var d=n(a,"startFrame",0),c=n(a,"endFrame",-1),f=n(a,"margin",0),p=n(a,"spacing",0),g=Math.floor((r-f+p)/(h+p))*Math.floor((o-f+p)/(l+p));0===g&&console.warn("SpriteSheet frame dimensions will result in zero frames for texture:",t.key),(d>g||d<-g)&&(d=0),d<0&&(d=g+d),(-1===c||c>g||c<d)&&(c=g);for(var m=f,v=f,x=0,y=0,T=0,w=0;w<g;w++){x=0,y=0;var b=m+h,S=v+l;b>r&&(x=b-r),S>o&&(y=S-o),w>=d&&w<=c&&(t.add(T,e,i+m,s+v,h-x,l-y),T++),(m+=h+p)+h>r&&(m=f,v+=l+p)}return t}}
1,47534(t,e,i){var n=i(95540);t.exports=function(t,e,i){var s,r=n(i,"frameWidth",null),o=n(i,"frameHeight",r);if(!r)throw Error("TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.");var a=t.source[0];t.add("__BASE",0,0,0,a.width,a.height);var h=n(i,"startFrame",0),l=n(i,"endFrame",-1),u=n(i,"margin",0),d=n(i,"spacing",0),c=e.cutX,f=e.cutY,p=e.cutWidth,g=e.cutHeight,m=e.realWidth,v=e.realHeight,x=Math.floor((m-u+d)/(r+d)),y=Math.floor((v-u+d)/(o+d)),T=x*y,w=e.x,b=r-w,S=r-(m-p-w),C=e.y,E=o-C,A=o-(v-g-C);(h>T||h<-T)&&(h=0),h<0&&(h=T+h),-1!==l&&(T=h+(l+1));for(var _=u,M=u,R=0,O=0;O<y;O++){for(var P=0===O,L=O===y-1,D=0;D<x;D++){var F=0===D,I=D===x-1;if(s=t.add(R,0,c+_,f+M,r,o),F||P||I||L){var N=F?w:0,B=P?C:0,k=0,U=0;F&&(k+=r-b),I&&(k+=r-S),P&&(U+=o-E),L&&(U+=o-A);var z=r-k,Y=o-U;s.cutWidth=z,s.cutHeight=Y,s.setTrim(r,o,N,B,z,Y)}_+=d,F?_+=b:I?_+=S:_+=r,R++}_=u,M+=d,P?M+=E:L?M+=A:M+=o}return t}},86147(t){var e=0,i=function(t,i,n,s){var r=e-s.y-s.height;t.add(n,i,s.x,r,s.width,s.height)};t.exports=function(t,n,s){var r=t.source[n];t.add("__BASE",n,0,0,r.width,r.height),e=r.height;for(var o=s.split("\n"),a=/^[ ]*(- )*(\w+)+[: ]+(.*)/,h="",l="",u={x:0,y:0,width:0,height:0},d=0;d<o.length;d++){var c=o[d].match(a);if(c){var f="- "===c[1],p=c[2],g=c[3];if(f&&(l!==h&&(i(t,n,l,u),h=l),u={x:0,y:0,width:0,height:0}),"name"===p){l=g;continue}switch(p){case"x":case"y":case"width":case"height":u[p]=parseInt(g,10)}}}return l!==h&&i(t,n,l,u),t}},55222(t,e,i){var n=i(50030);function s(t){for(var e=t.mipmaps,i=0;i<e.length;i++){var n=e[i].width,s=e[i].height;if((n<<i)%4!=0||(s<<i)%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 "+i+" is "+n+"x"+s),!1}return!0}function r(){return!0}function o(t){var e=t.mipmaps[0];return!!n(e.width,e.height)||(console.warn("PVRTC base dimensions must be power of two. Base level is "+e.width+"x"+e.height),!1)}function a(t){var e=t.mipmaps[0];return e.width%4==0&&e.height%4==0||(console.warn("S3TC SRGB base dimensions must be a multiple of 4 pixels. Base level is "+e.width+"x"+e.height+" pixels"),!1)}var h={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:s,36493:s,36494:s,36495:s,36283:s,36284:s,36285:s,36286:s,35840:o,35841:o,35842:o,35843:o,33776:s,33777:s,33778:s,33779:s,35916:a,35917:a,35918:a,35919:a};t.exports=function(t){for(var e=t.mipmaps,i=1;i<e.length;i++){var s=e[i].width,r=e[i].height;if(!n(s,r))return console.warn("Mip level "+i+" is not a power-of-two size: "+s+"x"+r),!1}var o=h[t.internalFormat];return o?o(t):(console.warn("No format checker found for internal format "+t.internalFormat+". Assuming valid."),!0)}},61309(t,e,i){t.exports={AtlasXML:i(89905),Canvas:i(72893),Image:i(4832),JSONArray:i(78566),JSONHash:i(39711),KTXParser:i(31403),PCT:i(41942),PCTDecode:i(39620),PVRParser:i(82038),SpriteSheet:i(75549),SpriteSheetFromAtlas:i(47534),UnityYAML:i(86147)}},80341(t){t.exports={CSV:0,TILED_JSON:1,ARRAY_2D:2,WELTMEISTER:3}},16536(t,e,i){t.exports=new(i(83419))({initialize:function(t,e,i,n,s,r,o){(void 0===i||i<=0)&&(i=32),(void 0===n||n<=0)&&(n=32),void 0===s&&(s=0),void 0===r&&(r=0),this.name=t,this.firstgid=0|e,this.imageWidth=0|i,this.imageHeight=0|n,this.imageMargin=0|s,this.imageSpacing=0|r,this.properties=o||{},this.images=[],this.total=0},containsImageIndex:function(t){return t>=this.firstgid&&t<this.firstgid+this.total},addImage:function(t,e,i,n){return this.images.push({gid:t,image:e,width:i,height:n}),this.total++,this}})},27462(t,e,i){t.exports=new(i(83419))({initialize:function(t){if(this.gids=[],void 0!==t)for(var e=0;e<t.length;++e)for(var i=t[e],n=0;n<i.total;++n)this.gids[i.firstgid+n]=i;this._gids=this.gids}
vendor: 22,675 bytes, line 1
1,enabled:{get:function(){return!!this.gids},set:function(t){this.gids=t?this._gids:void 0}},getTypeIncludingTile:function(t){if(void 0!==t.type&&""!==t.type)return t.type;if(this.gids&&void 0!==t.gid){var e=this.gids[t.gid];if(e){var i=e.getTileData(t.gid);if(i)return i.type}}},setTextureAndFrame:function(t,e,i,n){if(null===e&&this.gids&&void 0!==n.gid){var s=this.gids[n.gid];s&&(null===e&&void 0!==s.image&&(e=s.image.key),null===i&&(i=n.gid-s.firstgid),t.scene.textures.getFrame(e,i)||(e=null,i=null))}t.setTexture(e,i)},setPropertiesFromTiledObject:function(t,e){if(void 0!==this.gids&&void 0!==e.gid){var i=this.gids[e.gid];void 0!==i&&this.setFromJSON(t,i.getTileProperties(e.gid))}this.setFromJSON(t,e.properties)},setFromJSON:function(t,e){if(e){if(Array.isArray(e)){for(var i=0;i<e.length;i++){var n=e[i];void 0!==t[n.name]?t[n.name]=n.value:t.setData(n.name,n.value)}return}for(var s in e)void 0!==t[s]?t[s]=e[s]:t.setData(s,e[s])}}})},31989(t,e,i){var n=i(80341),s=i(87010),r=i(46177),o=i(49075);t.exports=function(t,e,i,a,h,l,u,d){void 0===i&&(i=32),void 0===a&&(a=32),void 0===h&&(h=10),void 0===l&&(l=10),void 0===d&&(d=!1);var c=null;if(Array.isArray(u))c=r(void 0!==e?e:"map",n.ARRAY_2D,u,i,a,d);else if(void 0!==e){var f=t.cache.tilemap.get(e);f?c=r(e,f.format,f.data,i,a,d):console.warn("No map data found for key "+e)}return null===c&&(c=new s({tileWidth:i,tileHeight:a,width:h,height:l})),new o(t,c)}},23029(t,e,i){var n=i(83419),s=i(31401),r=i(91907),o=i(62644),a=i(93232),h=i(84322);t.exports=new n({Mixins:[s.AlphaSingle,s.Flip,s.Visible],initialize:function(t,e,i,n,s,r,o,a){this.layer=t,this.index=e,this.x=i,this.y=n,this.width=s,this.height=r,this.right,this.bottom,this.baseWidth=void 0!==o?o:s,this.baseHeight=void 0!==a?a:r,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=0xffffff,this.tintMode=h.MULTIPLY,this.physics={}},containsPoint:function(t,e){return!(t<this.pixelX||e<this.pixelY||t>this.right||e>this.bottom)},copy:function(t){return this.index=t.index,this.alpha=t.alpha,this.properties=o(t.properties),this.visible=t.visible,this.setFlip(t.flipX,t.flipY),this.tint=t.tint,this.rotation=t.rotation,this.collideUp=t.collideUp,this.collideDown=t.collideDown,this.collideLeft=t.collideLeft,this.collideRight=t.collideRight,this.collisionCallback=t.collisionCallback,this.collisionCallbackContext=t.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(t){var e=this.tilemapLayer;return e?e.tileToWorldXY(this.x,this.y,void 0,t).x:this.x*this.baseWidth},getRight:function(t){var e=this.tilemapLayer;return e?this.getLeft(t)+this.width*e.scaleX:this.getLeft(t)+this.width},getTop:function(t){var e=this.tilemapLayer;return e?e.tileToWorldXY(this.x,this.y,void 0,t).y:this.y*this.baseWidth-(this.height-this.baseHeight)},getBottom:function(t){var e=this.tilemapLayer;return e?this.getTop(t)+this.height*e.scaleY:this.getTop(t)+this.height},getBounds:function(t,e){return void 0===e&&(e=new a),e.x=this.getLeft(t),e.y=this.getTop(t),e.width=this.getRight(t)-e.x,e.height=this.getBottom(t)-e.y,e},getCenterX:function(t){return(this.getLeft(t)+this.getRight(t))/2},getCenterY:function(t){return(this.getTop(t)+this.getBottom(t))/2},intersects:function(t,e,i,n){return!(i<=this.pixelX||n<=this.pixelY||t>=this.right||e>=this.bottom)},isInteresting:function(t,e){return t&&e?this.canCollide||this.hasInterestingFace:t?this.collides:!!e&&this.hasInterestingFace},resetCollision:function(t){return void 0===t&&(t=!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,t&&this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y),this},resetFaces:function(){return this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this},setCollision:function(t,e,i,n,s){return void 0===e&&(e=t),void 0===i&&(i=t),void 0===n&&(n=t),void 0===s&&(s=!0),this.collideLeft=t,this.collideRight=e,this.collideUp=i,this.collideDown=n,this.faceLeft=t,this.faceRight=e,this.faceTop=i,this.faceBottom=n,s&&this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y),this},setCollisionCallback:function(t,e){return null===t?(this.collisionCallback=void 0,this.collisionCallbackContext=void 0):(this.collisionCallback=t,this.collisionCallbackContext=e),this},setSize:function(t,e,i,n){return void 0!==t&&(this.width=t),void 0!==e&&(this.height=e),void 0!==i&&(this.baseWidth=i),void 0!==n&&(this.baseHeight=n),this.updatePixelXY(),this},updatePixelXY:function(){var t=this.layer.orientation;if(t===r.ORTHOGONAL)this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight;else if(t===r.ISOMETRIC)this.pixelX=(this.x-this.y)*this.baseWidth*.5,this.pixelY=(this.x+this.y)*this.baseHeight*.5;else if(t===r.STAGGERED)this.pixelX=this.x*this.baseWidth+this.y%2*(this.baseWidth/2),this.pixelY=this.y*(this.baseHeight/2);else if(t===r.HEXAGONAL){var e,i,n=this.layer.staggerAxis,s=this.layer.staggerIndex,o=this.layer.hexSideLength;"y"===n?(i=(this.baseHeight-o)/2+o,"odd"===s?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*i):"x"===n&&(e=(this.baseWidth-o)/2+o,this.pixelX=this.x*e,"odd"===s?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||void 0!==this.collisionCallback}},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 t=this.layer.tilemapLayer;if(t){var e=t.gidMap[this.index];if(e)return e}return null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var t=this.tilemapLayer;return t?t.tilemap:null}}})},49075(t,e,i){var n=i(84101),s=i(83419),r=i(39506),o=i(80341),a=i(95540),h=i(14977),l=i(27462),u=i(91907),d=i(36305),c=i(19133),f=i(68287),p=i(23029),g=i(81086),m=i(44731),v=i(53180),x=i(20442),y=i(33629);t.exports=new s({initialize:function(t,e){this.scene=t,this.tileWidth=e.tileWidth,this.tileHeight=e.tileHeight,this.width=e.width,this.height=e.height,this.orientation=e.orientation,this.renderOrder=e.renderOrder,this.format=e.format,this.version=e.version,this.properties=e.properties,this.widthInPixels=e.widthInPixels,this.heightInPixels=e.heightInPixels,this.imageCollections=e.imageCollections,this.images=e.images,this.layers=e.layers,this.tiles=e.tiles,this.tilesets=e.tilesets,this.objects=e.objects,this.currentLayerIndex=0,this.hexSideLength=e.hexSideLength;var i=this.orientation;this._convert={WorldToTileXY:g.GetWorldToTileXYFunction(i),WorldToTileX:g.GetWorldToTileXFunction(i),WorldToTileY:g.GetWorldToTileYFunction(i),TileToWorldXY:g.GetTileToWorldXYFunction(i),TileToWorldX:g.GetTileToWorldXFunction(i),TileToWorldY:g.GetTileToWorldYFunction(i),GetTileCorners:g.GetTileCornersFunction(i)}},setRenderOrder:function(t){var e=["right-down","left-down","right-up","left-up"];return"number"==typeof t&&(t=e[t]),e.indexOf(t)>-1&&(this.renderOrder=t),this},addTilesetImage:function(t,e,i,s,r,a,h,l){if(void 0===t)return null;null==e&&(e=t);var u=this.scene.sys.textures;if(!u.exists(e))return console.warn('Texture key "%s" not found',e),null;var d=u.get(e),c=this.getTilesetIndex(t);if(null===c&&this.format===o.TILED_JSON)return console.warn('Tilemap has no tileset "%s". Its tilesets are %o',t,this.tilesets),null;var f=this.tilesets[c];return f?((i||s)&&f.setTileSize(i,s),(r||a)&&f.setSpacing(r,a),f.setImage(d)):(void 0===i&&(i=this.tileWidth),void 0===s&&(s=this.tileHeight),void 0===r&&(r=0),void 0===a&&(a=0),void 0===h&&(h=0),void 0===l&&(l={x:0,y:0}),(f=new y(t,h,i,s,r,a,void 0,void 0,l)).setImage(d),this.tilesets.push(f),this.tiles=n(this)),f},copy:function(t,e,i,n,s,r,o,a){return null!==(a=this.getLayer(a))?(g.Copy(t,e,i,n,s,r,o,a),this):null},createBlankLayer:function(t,e,i,n,s,r,o,a){if(void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=this.width),void 0===r&&(r=this.height),void 0===o&&(o=this.tileWidth),void 0===a&&(a=this.tileHeight),null!==this.getLayerIndex(t))return console.warn("Invalid Tilemap Layer ID: "+t),null;for(var l,u=new h({name:t,tileWidth:o,tileHeight:a,width:s,height:r,orientation:this.orientation,hexSideLength:this.hexSideLength}),d=0;d<r;d++){l=[];for(var c=0;c<s;c++)l.push(new p(u,-1,c,d,o,a,this.tileWidth,this.tileHeight));u.data.push(l)}this.layers.push(u),this.currentLayerIndex=this.layers.length-1;var f=new x(this.scene,this,this.currentLayerIndex,e,i,n);return f.setRenderOrder(this.renderOrder),this.scene.sys.displayList.add(f),f},createLayer:function(t,e,i,n,s){var r,o=this.getLayerIndex(t);if(null===o)return console.warn("Invalid Tilemap Layer ID: "+t),"string"==typeof t&&console.warn("Valid tilelayer names: %o",this.getTileLayerNames()),null;var a=this.layers[o];return a.tilemapLayer?(console.warn("Tilemap Layer ID already exists:"+t),null):(this.currentLayerIndex=o,void 0===i&&(i=a.x),void 0===n&&(n=a.y),s?(Array.isArray(e)&&(e.length>1&&console.warn("TilemapGPULayer can only use one tileset. Using the first item given."),e=e[0]),r=new v(this.scene,this,o,e,i,n)):(r=new x(this.scene,this,o,e,i,n)).setRenderOrder(this.renderOrder),this.scene.sys.displayList.add(r),r)},createFromObjects:function(t,e,i){void 0===i&&(i=!0);var n=[],s=this.getObjectLayer(t);if(!s)return console.warn("createFromObjects: Invalid objectLayerName given: "+t),n;var o=new l(i?this.tilesets:void 0);Array.isArray(e)||(e=[e]);var h=s.objects;e.sortByY&&h.sort(function(t,e){return t.y>e.y?1:-1});for(var c=0;c<e.length;c++){var p,g=e[c],m=a(g,"id",null),v=a(g,"gid",null),x=a(g,"name",null),y=a(g,"type",null);o.enabled=!a(g,"ignoreTileset",null);for(var T=[],w=0;w<h.length;w++)p=h[w],(null===m&&null===v&&null===x&&null===y||null!==m&&p.id===m||null!==v&&p.gid===v||null!==x&&p.name===x||null!==y&&o.getTypeIncludingTile(p)===y)&&T.push(p);for(var b=a(g,"classType",f),S=a(g,"scene",this.scene),C=a(g,"container",null),E=a(g,"key",null),A=a(g,"frame",null),_=0;_<T.length;_++){p=T[_];var M=new b(S);if(M.setName(p.name),M.setPosition(p.x,p.y),o.setTextureAndFrame(M,E,A,p),p.width&&(M.displayWidth=p.width),p.height&&(M.displayHeight=p.height),this.orientation===u.ISOMETRIC){var R=this.tileWidth/this.tileHeight,O={x:M.x-M.y,y:(M.x+M.y)/R};M.x=O.x,M.y=O.y}var P={x:M.originX*p.width,y:(M.originY-!!p.gid)*p.height};if(p.rotation){var L=r(p.rotation);d(P,L),M.rotation=L}M.x+=P.x,M.y+=P.y,(void 0!==p.flippedHorizontal||void 0!==p.flippedVertical)&&M.setFlip(p.flippedHorizontal,p.flippedVertical),p.visible||(M.visible=!1),o.setPropertiesFromTiledObject(M,p),C?C.add(M):S.add.existing(M),n.push(M)}}return n},createFromTiles:function(t,e,i,n,s,r){return null===(r=this.getLayer(r))?null:g.CreateFromTiles(t,e,i,n,s,r)},fill:function(t,e,i,n,s,r,o){return(void 0===r&&(r=!0),null===(o=this.getLayer(o)))?null:(g.Fill(t,e,i,n,s,r,o),this)},filterObjects:function(t,e,i){if("string"==typeof t){var n=t;if(!(t=this.getObjectLayer(t)))return console.warn("No object layer found with the name: "+n),null}return t.objects.filter(e,i)},filterTiles:function(t,e,i,n,s,r,o,a){return null===(a=this.getLayer(a))?null:g.FilterTiles(t,e,i,n,s,r,o,a)},findByIndex:function(t,e,i,n){return null===(n=this.getLayer(n))?null:g.FindByIndex(t,e,i,n)},findObject:function(t,e,i){if("string"==typeof t){var n=t;if(!(t=this.getObjectLayer(t)))return console.warn("No object layer found with the name: "+n),null}return t.objects.find(e,i)||null},findTile:function(t,e,i,n,s,r,o,a){return null===(a=this.getLayer(a))?null:g.FindTile(t,e,i,n,s,r,o,a)},forEachTile:function(t,e,i,n,s,r,o,a){return null===(a=this.getLayer(a))?null:(g.ForEachTile(t,e,i,n,s,r,o,a),this)},getImageIndex:function(t){return this.getIndex(this.images,t)},getImageLayerNames:function(){return this.images&&Array.isArray(this.images)?this.images.map(function(t){return t.name}):[]},getIndex:function(t,e){for(var i=0;i<t.length;i++)if(t[i].name===e)return i;return null},getLayer:function(t){var e=this.getLayerIndex(t);return null!==e?this.layers[e]:null},getObjectLayer:function(t){var e=this.getIndex(this.objects,t);return null!==e?this.objects[e]:null},getObjectLayerNames:function(){return this.objects&&Array.isArray(this.objects)?this.objects.map(function(t){return t.name}):[]},getLayerIndex:function(t){return void 0===t?this.currentLayerIndex:"string"==typeof t?this.getLayerIndexByName(t):"number"==typeof t&&t<this.layers.length?t:t instanceof m&&t.tilemap===this?t.layerIndex:null},getLayerIndexByName:function(t){return this.getIndex(this.layers,t)},getTileAt:function(t,e,i,n){return null===(n=this.getLayer(n))?null:g.GetTileAt(t,e,i,n)},getTileAtWorldXY:function(t,e,i,n,s){return null===(s=this.getLayer(s))?null:g.GetTileAtWorldXY(t,e,i,n,s)},getTileLayerNames:function(){return this.layers&&Array.isArray(this.layers)?this.layers.map(function(t){return t.name}):[]},getTilesWithin:function(t,e,i,n,s,r){return null===(r=this.getLayer(r))?null:g.GetTilesWithin(t,e,i,n,s,r)},getTilesWithinShape:function(t,e,i,n){return null===(n=this.getLayer(n))?null:g.GetTilesWithinShape(t,e,i,n)},getTilesWithinWorldXY:function(t,e,i,n,s,r,o){return null===(o=this.getLayer(o))?null:g.GetTilesWithinWorldXY(t,e,i,n,s,r,o)},getTileset:function(t){var e=this.getIndex(this.tilesets,t);return null!==e?this.tilesets[e]:null},getTilesetIndex:function(t){return this.getIndex(this.tilesets,t)},hasTileAt:function(t,e,i){return null===(i=this.getLayer(i))?null:g.HasTileAt(t,e,i)},hasTileAtWorldXY:function(t,e,i,n){return null===(n=this.getLayer(n))?null:g.HasTileAtWorldXY(t,e,i,n)},layer:{get:function(){return this.layers[this.currentLayerIndex]},set:function(t){this.setLayer(t)}},putTileAt:function(t,e,i,n,s){return(void 0===n&&(n=!0),null===(s=this.getLayer(s)))?null:g.PutTileAt(t,e,i,n,s)},putTileAtWorldXY:function(t,e,i,n,s,r){return(void 0===n&&(n=!0),null===(r=this.getLayer(r)))?null:g.PutTileAtWorldXY(t,e,i,n,s,r)},putTilesAt:function(t,e,i,n,s){return(void 0===n&&(n=!0),null===(s=this.getLayer(s)))?null:(g.PutTilesAt(t,e,i,n,s),this)},randomize:function(t,e,i,n,s,r){return null===(r=this.getLayer(r))?null:(g.Randomize(t,e,i,n,s,r),this)},calculateFacesAt:function(t,e,i){return null===(i=this.getLayer(i))?null:(g.CalculateFacesAt(t,e,i),this)},calculateFacesWithin:function(t,e,i,n,s){return null===(s=this.getLayer(s))?null:(g.CalculateFacesWithin(t,e,i,n,s),this)},removeLayer:function(t){var e=this.getLayerIndex(t);if(null===e)return null;c(this.layers,e);for(var i=e;i<this.layers.length;i++)this.layers[i].tilemapLayer&&this.layers[i].tilemapLayer.layerIndex--;return this.currentLayerIndex===e&&(this.currentLayerIndex=0),this},destroyLayer:function(t){var e=this.getLayerIndex(t);return null!==e?((t=this.layers[e]).tilemapLayer.destroy(),c(this.layers,e),this.currentLayerIndex===e&&(this.currentLayerIndex=0),this):null},removeAllLayers:function(){for(var t=this.layers,e=0;e<t.length;e++)t[e].tilemapLayer&&t[e].tilemapLayer.destroy(!1);return t.length=0,this.currentLayerIndex=0,this},removeTile:function(t,e,i){void 0===e&&(e=-1),void 0===i&&(i=!0);var n=[];Array.isArray(t)||(t=[t]);for(var s=0;s<t.length;s++){var r=t[s];n.push(this.removeTileAt(r.x,r.y,!0,i,r.tilemapLayer)),e>-1&&this.putTileAt(e,r.x,r.y,i,r.tilemapLayer)}return n},removeTileAt:function(t,e,i,n,s){return(void 0===i&&(i=!0),void 0===n&&(n=!0),null===(s=this.getLayer(s)))?null:g.RemoveTileAt(t,e,i,n,s)},removeTileAtWorldXY:function(t,e,i,n,s,r){return(void 0===i&&(i=!0),void 0===n&&(n=!0),null===(r=this.getLayer(r)))?null:g.RemoveTileAtWorldXY(t,e,i,n,s,r)},renderDebug:function(t,e,i){return null===(i=this.getLayer(i))?null:(this.orientation===u.ORTHOGONAL&&g.RenderDebug(t,e,i),this)},renderDebugFull:function(t,e){for(var i=this.layers,n=0;n<i.length;n++)g.RenderDebug(t,e,i[n]);return this},replaceByIndex:function(t,e,i,n,s,r,o){return null===(o=this.getLayer(o))?null:(g.ReplaceByIndex(t,e,i,n,s,r,o),this)},setCollision:function(t,e,i,n,s){return(void 0===e&&(e=!0),void 0===i&&(i=!0),void 0===s&&(s=!0),null===(n=this.getLayer(n)))?null:(g.SetCollision(t,e,i,n,s),this)},setCollisionBetween:function(t,e,i,n,s){return(void 0===i&&(i=!0),void 0===n&&(n=!0),null===(s=this.getLayer(s)))?null:(g.SetCollisionBetween(t,e,i,n,s),this)},setCollisionByProperty:function(t,e,i,n){return(void 0===e&&(e=!0),void 0===i&&(i=!0),null===(n=this.getLayer(n)))?null:(g.SetCollisionByProperty(t,e,i,n),this)},setCollisionByExclusion:function(t,e,i,n){return(void 0===e&&(e=!0),void 0===i&&(i=!0),null===(n=this.getLayer(n)))?null:(g.SetCollisionByExclusion(t,e,i,n),this)},setCollisionFromCollisionGroup:function(t,e,i){return(void 0===t&&(t=!0),void 0===e&&(e=!0),null===(i=this.getLayer(i)))?null:(g.SetCollisionFromCollisionGroup(t,e,i),this)},setTileIndexCallback:function(t,e,i,n){return null===(n=this.getLayer(n))?null:(g.SetTileIndexCallback(t,e,i,n),this)},setTileLocationCallback:function(t,e,i,n,s,r,o){return null===(o=this.getLayer(o))?null:(g.SetTileLocationCallback(t,e,i,n,s,r,o),this)},setLayer:function(t){var e=this.getLayerIndex(t);return null!==e&&(this.currentLayerIndex=e),this},setBaseTileSize:function(t,e){this.tileWidth=t,this.tileHeight=e,this.widthInPixels=this.width*t,this.heightInPixels=this.height*e;for(var i=0;i<this.layers.length;i++){this.layers[i].baseTileWidth=t,this.layers[i].baseTileHeight=e;for(var n=this.layers[i].data,s=this.layers[i].width,r=this.layers[i].height,o=0;o<r;o++)for(var a=0;a<s;a++){var h=n[o][a];null!==h&&h.setSize(void 0,void 0,t,e)}}return this},setLayerTileSize:function(t,e,i){if(null===(i=this.getLayer(i)))return this;i.tileWidth=t,i.tileHeight=e;for(var n=i.data,s=i.width,r=i.height,o=0;o<r;o++)for(var a=0;a<s;a++){var h=n[o][a];null!==h&&h.setSize(t,e)}return this},shuffle:function(t,e,i,n,s){return null===(s=this.getLayer(s))?null:(g.Shuffle(t,e,i,n,s),this)},swapByIndex:function(t,e,i,n,s,r,o){return null===(o=this.getLayer(o))?null:(g.SwapByIndex(t,e,i,n,s,r,o),this)},tileToWorldX:function(t,e,i){return null===(i=this.getLayer(i))?null:this._convert.TileToWorldX(t,e,i)},tileToWorldY:function(t,e,i){return null===(i=this.getLayer(i))?null:this._convert.TileToWorldY(t,e,i)},tileToWorldXY:function(t,e,i,n,s){return null===(s=this.getLayer(s))?null:this._convert.TileToWorldXY(t,e,i,n,s)},getTileCorners:function(t,e,i,n){return null===(n=this.getLayer(n))?null:this._convert.GetTileCorners(t,e,i,n)},weightedRandomize:function(t,e,i,n,s,r){return null===(r=this.getLayer(r))?null:(g.WeightedRandomize(e,i,n,s,t,r),this)},worldToTileX:function(t,e,i,n){return null===(n=this.getLayer(n))?null:this._convert.WorldToTileX(t,e,i,n)},worldToTileY:function(t,e,i,n){return null===(n=this.getLayer(n))?null:this._convert.WorldToTileY(t,e,i,n)},worldToTileXY:function(t,e,i,n,s,r){return null===(r=this.getLayer(r))?null:this._convert.WorldToTileXY(t,e,i,n,s,r)},destroy:function(){this.removeAllLayers(),this.tiles.length=0,this.tilesets.length=0,this.objects.length=0,this.scene=null}})},45939(t,e,i){var n=i(44603),s=i(31989);n.register("tilemap",function(t){var e=void 0!==t?t:{};return s(this.scene,e.key,e.tileWidth,e.tileHeight,e.width,e.height,e.data,e.insertNull)})},46029(t,e,i){var n=i(39429),s=i(31989);n.register("tilemap",function(t,e,i,n,r,o,a){return null===t&&(t=void 0),null===e&&(e=void 0),null===i&&(i=void 0),null===n&&(n=void 0),null===r&&(r=void 0),s(this.scene,t,e,i,n,r,o,a)})},53180(t,e,i){var n=i(67743),s=i(83419),r=i(44731);t.exports=new s({Extends:r,Mixins:[i(57912)],initialize:function(t,e,i,n,s,o){r.call(this,"TilemapGPULayer",t,e,i,s,o),this.tileset=null,this.layerDataTexture=null,this.setTileset(n),this.initRenderNodes(this._defaultRenderNodesMap)},_defaultRenderNodesMap:{get:function(){return n}},setTileset:function(t){"string"==typeof t&&(t=this.tilemap.getTileset(t)),this.tileset=t,this.generateLayerDataTexture()},generateLayerDataTexture:function(){for(var t=this.layer,e=this.tileset,i=e.firstgid,n=this.scene.renderer,s=e.getAnimationDataIndexMap(n),r=new Uint32Array(t.width*t.height),o=0;o<t.height;o++)for(var a=0;a<t.width;a++){var h=t.data[o][a],l=h.index-i,u=h.flipX,d=h.flipY,c=!1;s.has(l)&&(l=s.get(l),c=!0),u&&(l|=0x80000000),d&&(l|=0x40000000),c&&(l|=0x20000000),-1===h.index&&(l=0x10000000),r[o*t.width+a]=l}this.layerDataTexture&&this.layerDataTexture.destroy();var f=new Uint8Array(r.buffer);this.layerDataTexture=n.createUint8ArrayTexture(f,t.width,t.height,!1,!0)}})},57912(t,e,i){var n=i(29747),s=n;t.exports={renderWebGL:s=i(6736),renderCanvas:n}},6736(t){t.exports=function(t,e,i,n){(e.customRenderNodes.Submitter||e.defaultRenderNodes.Submitter).run(i,e,n)}},20442(t,e,i){var n=i(79317),s=i(83419),r=i(81086),o=i(19218),a=i(44731),h=i(84322);t.exports=new s({Extends:a,Mixins:[o],initialize:function(t,e,i,n,s,o){a.call(this,"TilemapLayer",t,e,i,s,o),this.tileset=[],this.tilesDrawn=0,this.tilesTotal=this.layer.width*this.layer.height,this.culledTiles=[],this.skipCull=!1,this.cullPaddingX=1,this.cullPaddingY=1,this.cullCallback=r.GetCullTilesFunction(this.layer.orientation),this._renderOrder=0,this.setTilesets(n),this.initRenderNodes(this._defaultRenderNodesMap)},_defaultRenderNodesMap:{get:function(){return n}},setTilesets:function(t){var e=[],i=[],n=this.tilemap;Array.isArray(t)||(t=[t]);for(var s=0;s<t.length;s++){var r=t[s];if("string"==typeof r&&(r=n.getTileset(r)),r){i.push(r);for(var o=r.firstgid,a=0;a<r.total;a++)e[o+a]=r}}this.gidMap=e,this.tileset=i},setRenderOrder:function(t){return"string"==typeof t&&(t=["right-down","left-down","right-up","left-up"].indexOf(t)),t>=0&&t<4&&(this._renderOrder=t),this},cull:function(t){return this.cullCallback(this.layer,t,this.culledTiles,this._renderOrder)},setSkipCull:function(t){return void 0===t&&(t=!0),this.skipCull=t,this},setCullPadding:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=1),this.cullPaddingX=t,this.cullPaddingY=e,this}
1,setTint:function(t,e,i,n,s,r){return void 0===t&&(t=0xffffff),this.forEachTile(function(e){e.tint=t},this,e,i,n,s,r)},setTintMode:function(t,e,i,n,s,r){return void 0===t&&(t=h.MULTIPLY),this.forEachTile(function(e){e.tintMode=t},this,e,i,n,s,r)},destroy:function(t){this.culledTiles.length=0,this.cullCallback=null,a.prototype.destroy.call(this,t)}})},44731(t,e,i){var n=i(83419),s=i(78389),r=i(31401),o=i(95643),a=i(81086),h=i(26099);t.exports=new n({Extends:o,Mixins:[r.Alpha,r.BlendMode,r.ComputedSize,r.Depth,r.ElapseTimer,r.Flip,r.GetBounds,r.Lighting,r.Mask,r.Origin,r.RenderNodes,r.Transform,r.Visible,r.ScrollFactor,s],initialize:function(t,e,i,n,s,r){o.call(this,e,t),this.isTilemap=!0,this.tilemap=i,this.layerIndex=n,this.layer=i.layers[n],this.layer.tilemapLayer=this,this.gidMap=[],this.tempVec=new h,this.collisionCategory=1,this.collisionMask=1,this.setAlpha(this.layer.alpha),this.setPosition(s,r),this.setOrigin(0,0),this.setSize(i.tileWidth*this.layer.width,i.tileHeight*this.layer.height)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(t,e){this.updateTimer(t,e)},calculateFacesAt:function(t,e){return a.CalculateFacesAt(t,e,this.layer),this},calculateFacesWithin:function(t,e,i,n){return a.CalculateFacesWithin(t,e,i,n,this.layer),this},createFromTiles:function(t,e,i,n,s){return a.CreateFromTiles(t,e,i,n,s,this.layer)},copy:function(t,e,i,n,s,r,o){return a.Copy(t,e,i,n,s,r,o,this.layer),this},fill:function(t,e,i,n,s,r){return a.Fill(t,e,i,n,s,r,this.layer),this},filterTiles:function(t,e,i,n,s,r,o){return a.FilterTiles(t,e,i,n,s,r,o,this.layer)},findByIndex:function(t,e,i){return a.FindByIndex(t,e,i,this.layer)},findTile:function(t,e,i,n,s,r,o){return a.FindTile(t,e,i,n,s,r,o,this.layer)},forEachTile:function(t,e,i,n,s,r,o){return a.ForEachTile(t,e,i,n,s,r,o,this.layer),this},getTileAt:function(t,e,i){return a.GetTileAt(t,e,i,this.layer)},getTileAtWorldXY:function(t,e,i,n){return a.GetTileAtWorldXY(t,e,i,n,this.layer)},getIsoTileAtWorldXY:function(t,e,i,n,s){void 0===i&&(i=!0);var r=this.tempVec;return a.IsometricWorldToTileXY(t,e,!0,r,s,this.layer,i),this.getTileAt(r.x,r.y,n)},getTilesWithin:function(t,e,i,n,s){return a.GetTilesWithin(t,e,i,n,s,this.layer)},getTilesWithinShape:function(t,e,i){return a.GetTilesWithinShape(t,e,i,this.layer)},getTilesWithinWorldXY:function(t,e,i,n,s,r){return a.GetTilesWithinWorldXY(t,e,i,n,s,r,this.layer)},hasTileAt:function(t,e){return a.HasTileAt(t,e,this.layer)},hasTileAtWorldXY:function(t,e,i){return a.HasTileAtWorldXY(t,e,i,this.layer)},putTileAt:function(t,e,i,n){return a.PutTileAt(t,e,i,n,this.layer)},putTileAtWorldXY:function(t,e,i,n,s){return a.PutTileAtWorldXY(t,e,i,n,s,this.layer)},putTilesAt:function(t,e,i,n){return a.PutTilesAt(t,e,i,n,this.layer),this},randomize:function(t,e,i,n,s){return a.Randomize(t,e,i,n,s,this.layer),this},removeTileAt:function(t,e,i,n){return a.RemoveTileAt(t,e,i,n,this.layer)},removeTileAtWorldXY:function(t,e,i,n,s){return a.RemoveTileAtWorldXY(t,e,i,n,s,this.layer)},renderDebug:function(t,e){return a.RenderDebug(t,e,this.layer),this},replaceByIndex:function(t,e,i,n,s,r){return a.ReplaceByIndex(t,e,i,n,s,r,this.layer),this},setCollision:function(t,e,i,n){return a.SetCollision(t,e,i,this.layer,n),this},setCollisionBetween:function(t,e,i,n){return a.SetCollisionBetween(t,e,i,n,this.layer),this},setCollisionByProperty:function(t,e,i){return a.SetCollisionByProperty(t,e,i,this.layer),this},setCollisionByExclusion:function(t,e,i){return a.SetCollisionByExclusion(t,e,i,this.layer),this},setCollisionFromCollisionGroup:function(t,e){return a.SetCollisionFromCollisionGroup(t,e,this.layer),this},setTileIndexCallback:function(t,e,i){return a.SetTileIndexCallback(t,e,i,this.layer),this},setTileLocationCallback:function(t,e,i,n,s,r){return a.SetTileLocationCallback(t,e,i,n,s,r,this.layer),this},shuffle:function(t,e,i,n){return a.Shuffle(t,e,i,n,this.layer),this},swapByIndex:function(t,e,i,n,s,r){return a.SwapByIndex(t,e,i,n,s,r,this.layer),this},tileToWorldX:function(t,e){return this.tilemap.tileToWorldX(t,e,this)},tileToWorldY:function(t,e){return this.tilemap.tileToWorldY(t,e,this)}
vendor: 8,821 bytes, line 1
1,tileToWorldXY:function(t,e,i,n){return this.tilemap.tileToWorldXY(t,e,i,n,this)},getTileCorners:function(t,e,i){return this.tilemap.getTileCorners(t,e,i,this)},weightedRandomize:function(t,e,i,n,s){return a.WeightedRandomize(e,i,n,s,t,this.layer),this},worldToTileX:function(t,e,i){return this.tilemap.worldToTileX(t,e,i,this)},worldToTileY:function(t,e,i){return this.tilemap.worldToTileY(t,e,i,this)},worldToTileXY:function(t,e,i,n,s){return this.tilemap.worldToTileXY(t,e,i,n,s,this)},destroy:function(t){void 0===t&&(t=!0),this.tilemap&&(this.layer.tilemapLayer===this&&(this.layer.tilemapLayer=void 0),t&&this.tilemap.removeLayer(this),this.tilemap=void 0,this.layer=void 0,this.gidMap=[],this.tileset=[],o.prototype.destroy.call(this))}})},16153(t,e,i){var n=i(61340),s=new n,r=new n,o=new n;t.exports=function(t,e,i,n){var a=e.cull(i),h=a.length,l=i.alpha*e.alpha;if(0!==h&&!(l<=0)){r.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var u=t.currentContext,d=e.gidMap;u.save(),s.copyWithScrollFactorFrom(i.matrixCombined,i.scrollX,i.scrollY,e.scrollFactorX,e.scrollFactorY),n&&s.multiply(n),s.multiply(r,o),o.setToContext(u),(!t.antialias||e.scaleX>1||e.scaleY>1)&&(u.imageSmoothingEnabled=!1);for(var c=0;c<h;c++){var f=a[c],p=d[f.index];if(p){var g=p.image.getSourceImage(),m=p.getTileTextureCoordinates(f.index),v=p.tileWidth,x=p.tileHeight;if(null!==m&&0!==v&&0!==x){var y=.5*v,T=.5*x;m.x+=p.tileOffset.x,m.y+=p.tileOffset.y,u.save(),u.translate(f.pixelX+y,f.pixelY+T),0!==f.rotation&&u.rotate(f.rotation),(f.flipX||f.flipY)&&u.scale(f.flipX?-1:1,f.flipY?-1:1),u.globalAlpha=l*f.alpha,u.drawImage(g,m.x,m.y,v,x,-y,-T,v,x),u.restore()}}}u.restore()}}},19218(t,e,i){var n=i(29747),s=n,r=n;s=i(99558),t.exports={renderWebGL:s,renderCanvas:r=i(16153)}},99558(t,e,i){var n=i(84322),s=i(70554).getTintAppendFloatAlpha,r={frame:{source:{glTexture:null}},uvSource:{u0:0,v0:0,u1:1,v1:1},frameWidth:0,frameHeight:0},o={tintEffect:n.MULTIPLY,tintTopLeft:0,tintTopRight:0,tintBottomLeft:0,tintBottomRight:0};t.exports=function(t,e,i,n){var a=i.camera,h=e.cull(a),l=h.length,u=e.alpha;if(0!==l&&!(u<=0))for(var d=e.gidMap,c=e.customRenderNodes.Submitter||e.defaultRenderNodes.Submitter,f=e.customRenderNodes.Transformer||e.defaultRenderNodes.Transformer,p=e.timeElapsed,g=0;g<l;g++){var m=h[g],v=d[m.index];if(v){var x=v.getAnimatedTileId(m.index,p);if(null!==x){var y=v.getTileTextureCoordinates(x),T=v.tileWidth,w=v.tileHeight;if(y&&0!==T&&0!==w){var b=v.glTexture,S=y.x,C=y.y,E=s(m.tint,u*m.alpha);r.frame.source.glTexture=v.glTexture,r.frameWidth=T,r.frameHeight=w,r.uvSource.u0=S/b.width,r.uvSource.v0=1-(C+w)/b.height,r.uvSource.u1=(S+T)/b.width,r.uvSource.v1=1-C/b.height,o.tintEffect=m.tintMode,o.tintTopLeft=E,o.tintTopRight=E,o.tintBottomLeft=E,o.tintBottomRight=E,c.run(i,e,n,m,r,f,o)}}}}}},33629(t,e,i){var n=i(83419),s=i(26099);t.exports=new n({initialize:function(t,e,i,n,r,o,a,h,l){(void 0===i||i<=0)&&(i=32),(void 0===n||n<=0)&&(n=32),void 0===r&&(r=0),void 0===o&&(o=0),void 0===a&&(a={}),void 0===h&&(h={}),this.name=t,this.firstgid=e,this.tileWidth=i,this.tileHeight=n,this.tileMargin=r,this.tileSpacing=o,this.tileProperties=a,this.tileData=h,this.tileOffset=new s,void 0!==l&&this.tileOffset.set(l.x,l.y),this.image=null,this.glTexture=null,this.rows=0,this.columns=0,this.total=0,this.texCoordinates=[],this.animationSearchThreshold=64,this.maxAnimationLength=0,this._animationDataTexture=null,this._animationDataIndexMap=null},getTileProperties:function(t){return this.containsTileIndex(t)?this.tileProperties[t-this.firstgid]:null},getTileData:function(t){return this.containsTileIndex(t)?this.tileData[t-this.firstgid]:null},getTileCollisionGroup:function(t){var e=this.getTileData(t);return e&&e.objectgroup?e.objectgroup:null},containsTileIndex:function(t){return t>=this.firstgid&&t<this.firstgid+this.total},getAnimatedTileId:function(t,e){if(!this.containsTileIndex(t))return null;var i=this.getTileData(t);if(!(i&&i.animation))return t;e%=i.animationDuration;for(var n=i.animation,s=null,r=0,o=n.length-1,a=0,h=0;r<=o;){if((h=(s=n[a=r+o>>>1]).startTime)<=e&&h+s.duration>e)return s.tileid+this.firstgid;h<e?r=a+1:o=a-1}return null},getTileTextureCoordinates:function(t){return this.containsTileIndex(t)?this.texCoordinates[t-this.firstgid]:null},setImage:function(t){this.image=t;var e=t.get(),i=t.getFrameBounds();return this.glTexture=e.source.glTexture,e.width>i.width||e.height>i.height?this.updateTileData(e.width,e.height):this.updateTileData(i.width,i.height,i.x,i.y),this},setTileSize:function(t,e){return void 0!==t&&(this.tileWidth=t),void 0!==e&&(this.tileHeight=e),this.image&&this.updateTileData(this.image.source[0].width,this.image.source[0].height),this},setSpacing:function(t,e){return void 0!==t&&(this.tileMargin=t),void 0!==e&&(this.tileSpacing=e),this.image&&this.updateTileData(this.image.source[0].width,this.image.source[0].height),this},updateTileData:function(t,e,i,n){void 0===i&&(i=0),void 0===n&&(n=0);var s=(e-2*this.tileMargin+this.tileSpacing)/(this.tileHeight+this.tileSpacing),r=(t-2*this.tileMargin+this.tileSpacing)/(this.tileWidth+this.tileSpacing);(s%1!=0||r%1!=0)&&console.warn("Image tile area not tile size multiple in: "+this.name),s=Math.floor(s),r=Math.floor(r),this.rows=s,this.columns=r,this.total=s*r,this.texCoordinates.length=0;for(var o=this.tileMargin+i,a=this.tileMargin+n,h=0;h<this.rows;h++){for(var l=0;l<this.columns;l++)this.texCoordinates.push({x:o,y:a}),o+=this.tileWidth+this.tileSpacing;o=this.tileMargin+i,a+=this.tileHeight+this.tileSpacing}return this._animationDataTexture&&this.createAnimationDataTexture(),this},getAnimationDataTexture:function(t){return this._animationDataTexture||this.createAnimationDataTexture(t),this._animationDataTexture},getAnimationDataIndexMap:function(t){return this._animationDataIndexMap||this.createAnimationDataTexture(t),this._animationDataIndexMap},createAnimationDataTexture:function(t){for(var e=this.tileData,i=this.total,n=[],s=[],r=new Map,o=0,a=0;a<i;a++){var h=e[a];if(h&&h.animation){var l=h.animation,u=h.animationDuration;r.set(a,n.length),n.push([u,s.length]);for(var d=0;d<l.length;d++){var c=l[d];s.push([c.duration,c.tileid])}o=Math.max(o,l.length)}}var f=n.length+s.length;if(f>8388608)throw Error("Tileset._animationDataTexture: too many animations - total number of animations plus animation frames is max 8388608, got "+f);var p=2*f,g=Math.min(p,4096),m=Math.ceil(p/4096),v=new Uint32Array(g*m),x=0,y=n.length;for(a=0;a<y;a++){var T=(l=n[a])[0],w=l[1];v[x++]=T,v[x++]=(w+y)*2}for(a=0;a<s.length;a++){var b=(c=s[a])[0],S=c[1];v[x++]=b,v[x++]=S}this._animationDataTexture&&this._animationDataTexture.destroy();var C=new Uint8Array(v.buffer);this._animationDataTexture=t.createUint8ArrayTexture(C,g,m,!1,!0),this._animationDataIndexMap=r,this.maxAnimationLength=o}})},72023(t,e,i){var n=i(7423);t.exports=function(t,e,i){var s=n(t,e,!0,i),r=n(t,e-1,!0,i),o=n(t,e+1,!0,i),a=n(t-1,e,!0,i),h=n(t+1,e,!0,i),l=s&&s.collides;return l&&(s.faceTop=!0,s.faceBottom=!0,s.faceLeft=!0,s.faceRight=!0),r&&r.collides&&(l&&(s.faceTop=!1),r.faceBottom=!l),o&&o.collides&&(l&&(s.faceBottom=!1),o.faceTop=!l),a&&a.collides&&(l&&(s.faceLeft=!1),a.faceRight=!l),h&&h.collides&&(l&&(s.faceRight=!1),h.faceLeft=!l),s&&!s.collides&&s.resetFaces(),s}},42573(t,e,i){var n=i(7423),s=i(7386);t.exports=function(t,e,i,r,o){for(var a=null,h=null,l=null,u=null,d=s(t,e,i,r,null,o),c=0;c<d.length;c++){var f=d[c];f&&(f.collides?(a=n(f.x,f.y-1,!0,o),h=n(f.x,f.y+1,!0,o),l=n(f.x-1,f.y,!0,o),u=n(f.x+1,f.y,!0,o),f.faceTop=!a||!a.collides,f.faceBottom=!h||!h.collides,f.faceLeft=!l||!l.collides,f.faceRight=!u||!u.collides):f.resetFaces())}}},33528(t,e,i){var n=new(i(26099));t.exports=function(t,e,i,s){var r=i.tilemapLayer,o=r.cullPaddingX,a=r.cullPaddingY,h=r.tilemap.tileToWorldXY(t,e,n,s,r);return h.x>s.worldView.x+r.scaleX*i.tileWidth*(-o-.5)&&h.x<s.worldView.right+r.scaleX*i.tileWidth*(o-.5)&&h.y>s.worldView.y+r.scaleY*i.tileHeight*(-a-1)&&h.y<s.worldView.bottom+r.scaleY*i.tileHeight*(a-.5)}},1785(t,e,i){var n=i(42573),s=i(7386),r=i(62991),o=i(23029);t.exports=function(t,e,i,a,h,l,u,d){void 0===u&&(u=!0);var c=s(t,e,i,a,null,d),f=[];c.forEach(function(t){var e=new o(t.layer,t.index,t.x,t.y,t.width,t.height,t.baseWidth,t.baseHeight);e.copy(t),f.push(e)});for(var p=h-t,g=l-e,m=0;m<f.length;m++){var v=f[m],x=v.x+p,y=v.y+g;r(x,y,d)&&d.data[y][x]&&(v.x=x,v.y=y,v.updatePixelXY(),d.data[y][x]=v)}u&&n(h-1,l-1,i+2,a+2,d),c.length=0,f.length=0}},78419(t,e,i){var n=i(62644),s=i(7386),r=i(27987);t.exports=function(t,e,i,o,a,h){i||(i={}),Array.isArray(t)||(t=[t]);var l,u=h.tilemapLayer;o||(o=u.scene),a||(a=o.cameras.main);var d=h.width,c=h.height,f=s(0,0,d,c,null,h),p=[];for(l=0;l<f.length;l++){var g=f[l],m=n(i);if(-1!==t.indexOf(g.index)){var v=u.tileToWorldXY(g.x,g.y,void 0,a,h);m.x=v.x,m.y=v.y;
1for(var x=["rotation","flipX","flipY","alpha","visible","tint"],y=0;y<x.length;y++){var T=x[y];m.hasOwnProperty(T)||(m[T]=g[T])}m.hasOwnProperty("origin")||(m.x+=.5*g.width,m.y+=.5*g.height),m.hasOwnProperty("useSpriteSheet")&&(m.key=g.tileset.image,m.frame=g.index-g.tileset.firstgid),p.push(o.make.sprite(m))}}if(Array.isArray(e))for(l=0;l<t.length;l++)r(t[l],e[l],0,0,d,c,h);else if(null!==e)for(l=0;l<t.length;l++)r(t[l],e,0,0,d,c,h);return p}},19545(t,e,i){var n=i(87841),s=i(63448),r=i(56583),o=new n;t.exports=function(t,e){var i=t.tilemapLayer.tilemap,n=t.tilemapLayer,a=Math.floor(i.tileWidth*n.scaleX),h=Math.floor(i.tileHeight*n.scaleY),l=r(e.worldView.x-n.x,a,0,!0)-n.cullPaddingX,u=s(e.worldView.right-n.x,a,0,!0)+n.cullPaddingX,d=r(e.worldView.y-n.y,h,0,!0)-n.cullPaddingY,c=s(e.worldView.bottom-n.y,h,0,!0)+n.cullPaddingY;return o.setTo(l,d,u-l,c-d)}},30003(t,e,i){var n=i(19545),s=i(32483);t.exports=function(t,e,i,r){void 0===i&&(i=[]),void 0===r&&(r=0),i.length=0;var o=t.tilemapLayer,a=n(t,e);return(o.skipCull||1!==o.scrollFactorX||1!==o.scrollFactorY)&&(a.left=0,a.right=t.width,a.top=0,a.bottom=t.height),s(t,a,r,i),i}},35137(t,e,i){var n=i(7386),s=i(42573),r=i(20576);t.exports=function(t,e,i,o,a,h,l){for(var u=-1!==l.collideIndexes.indexOf(t),d=n(e,i,o,a,null,l),c=0;c<d.length;c++)d[c].index=t,r(d[c],u);h&&s(e-1,i-1,o+2,a+2,l)}},40253(t,e,i){var n=i(7386);t.exports=function(t,e,i,s,r,o,a,h){return n(i,s,r,o,a,h).filter(t,e)}},52692(t){t.exports=function(t,e,i,n){void 0===e&&(e=0),void 0===i&&(i=!1);var s,r,o,a=0;if(i){for(r=n.height-1;r>=0;r--)for(s=n.width-1;s>=0;s--)if((o=n.data[r][s])&&o.index===t)if(a===e)return o;else a+=1}else for(r=0;r<n.height;r++)for(s=0;s<n.width;s++)if((o=n.data[r][s])&&o.index===t)if(a===e)return o;else a+=1;return null}},66151(t,e,i){var n=i(7386);t.exports=function(t,e,i,s,r,o,a,h){return n(i,s,r,o,a,h).find(t,e)||null}},97560(t,e,i){var n=i(7386);
vendor: 4,591 bytes, line 1
1t.exports=function(t,e,i,s,r,o,a,h){n(i,s,r,o,a,h).forEach(t,e)}},43305(t,e,i){var n=i(91907),s=i(30003),r=i(9474),o=i(14018),a=i(29747),h=i(54503);t.exports=function(t){return t===n.ORTHOGONAL?s:t===n.HEXAGONAL?r:t===n.STAGGERED?h:t===n.ISOMETRIC?o:a}},7423(t,e,i){var n=i(62991);t.exports=function(t,e,i,s){if(!n(t,e,s))return null;var r=s.data[e][t]||null;return r?-1===r.index?i?r:null:r:null}},60540(t,e,i){var n=i(7423),s=new(i(26099));t.exports=function(t,e,i,r,o){return o.tilemapLayer.worldToTileXY(t,e,!0,s,r),n(s.x,s.y,i,o)}},55826(t,e,i){var n=i(26099);t.exports=function(t,e,i,s){var r=s.baseTileWidth,o=s.baseTileHeight,a=s.tilemapLayer,h=0,l=0;a&&(i||(i=a.scene.cameras.main),h=a.x+i.scrollX*(1-a.scrollFactorX),l=a.y+i.scrollY*(1-a.scrollFactorY),r*=a.scaleX,o*=a.scaleY);var u=h+t*r,d=l+e*o;return[new n(u,d),new n(u+r,d),new n(u+r,d+o),new n(u,d+o)]}},11758(t,e,i){var n=i(91907),s=i(27229),r=i(29747),o=i(55826);t.exports=function(t){return t===n.ORTHOGONAL?o:t===n.ISOMETRIC?r:t===n.HEXAGONAL?s:t===n.STAGGERED?r:r}},39167(t,e,i){var n=i(91907),s=i(29747),r=i(97281);t.exports=function(t){return t===n.ORTHOGONAL?r:s}},62e3(t,e,i){var n=i(91907),s=i(19951),r=i(14127),o=i(29747),a=i(97202),h=i(70326);t.exports=function(t){return t===n.ORTHOGONAL?h:t===n.ISOMETRIC?r:t===n.HEXAGONAL?s:t===n.STAGGERED?a:o}},5984(t,e,i){var n=i(91907),s=i(29747),r=i(28054),o=i(29650);t.exports=function(t){return t===n.ORTHOGONAL?o:t===n.STAGGERED?r:s}},7386(t,e,i){var n=i(95540);t.exports=function(t,e,i,s,r,o){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=o.width),void 0===s&&(s=o.height),r||(r={});var a=n(r,"isNotEmpty",!1),h=n(r,"isColliding",!1),l=n(r,"hasInterestingFace",!1);t<0&&(i+=t,t=0),e<0&&(s+=e,e=0),t+i>o.width&&(i=Math.max(o.width-t,0)),e+s>o.height&&(s=Math.max(o.height-e,0));for(var u=[],d=e;d<e+s;d++)for(var c=t;c<t+i;c++){var f=o.data[d][c];if(null!==f){if(a&&-1===f.index||h&&!f.collides||l&&!f.hasInterestingFace)continue;u.push(f)}}return u}},91141(t,e,i){var n=i(55738),s=i(7386),r=i(91865),o=i(29747),a=i(26099),h=i(91907),l=function(t,e){return r.RectangleToTriangle(e,t)},u=new a,d=new a,c=new a;t.exports=function(t,e,i,a){if(a.orientation!==h.ORTHOGONAL)return console.warn("GetTilesWithinShape only works with orthogonal tilemaps"),[];if(void 0===t)return[];var f=o;t instanceof n.Circle?f=r.CircleToRectangle:t instanceof n.Rectangle?f=r.RectangleToRectangle:t instanceof n.Triangle?f=l:t instanceof n.Line&&(f=r.LineToRectangle),a.tilemapLayer.worldToTileXY(t.left,t.top,!0,d,i);var p=d.x,g=d.y;a.tilemapLayer.worldToTileXY(t.right,t.bottom,!1,c,i);var m=Math.ceil(c.x),v=Math.ceil(c.y),x=Math.max(m-p,1),y=Math.max(v-g,1),T=s(p,g,x,y,e,a),w=a.tileWidth,b=a.tileHeight;a.tilemapLayer&&(w*=a.tilemapLayer.scaleX,b*=a.tilemapLayer.scaleY);for(var S=[],C=new n.Rectangle(0,0,w,b),E=0;E<T.length;E++){var A=T[E];a.tilemapLayer.tileToWorldXY(A.x,A.y,u,i),C.x=u.x,C.y=u.y,f(t,C)&&S.push(A)}return S}},96523(t,e,i){var n=i(7386),s=i(26099),r=new s,o=new s;t.exports=function(t,e,i,s,a,h,l){var u=l.tilemapLayer.tilemap._convert.WorldToTileXY;u(t,e,!0,r,h,l);var d=r.x,c=r.y;return u(t+i,e+s,!1,o,h,l),n(d,c,Math.ceil(o.x)-d,Math.ceil(o.y)-c,a,l)}},96113(t,e,i){var n=i(91907),s=i(20242),r=i(10095);t.exports=function(t){return t===n.ORTHOGONAL?r:s}},16926(t,e,i){var n=i(91907),s=i(86625),r=i(96897),o=i(29747),a=i(15108),h=i(85896);t.exports=function(t){return t===n.ORTHOGONAL?h:t===n.ISOMETRIC?r:t===n.HEXAGONAL?s:t===n.STAGGERED?a:o}},55762(t,e,i){var n=i(91907),s=i(20242),r=i(51900),o=i(63288);t.exports=function(t){return t===n.ORTHOGONAL?o:t===n.STAGGERED?r:s}},45091(t,e,i){var n=i(62991);t.exports=function(t,e,i){if(!n(t,e,i))return!1;var s=i.data[e][t];return null!==s&&s.index>-1}},24152(t,e,i){var n=i(45091),s=new(i(26099));t.exports=function(t,e,i,r){return r.tilemapLayer.worldToTileXY(t,e,!0,s,i),n(s.x,s.y,r)}},90454(t,e,i){var n=i(63448),s=i(56583);t.exports=function(t,e){var i,r,o,a,h=t.tilemapLayer.tilemap,l=t.tilemapLayer,u=Math.floor(h.tileWidth*l.scaleX),d=Math.floor(h.tileHeight*l.scaleY),c=t.hexSideLength;if("y"===t.staggerAxis){var f=(d-c)/2+c;i=s(e.worldView.x-l.x,u,0,!0)-l.cullPaddingX,r=n(e.worldView.right-l.x,u,0,!0)+l.cullPaddingX,o=s(e.worldView.y-l.y,f,0,!0)-l.cullPaddingY,a=n(e.worldView.bottom-l.y,f,0,!0)+l.cullPaddingY}else{var p=(u-c)/2+c;i=s(e.worldView.x-l.x,p,0,!0)-l.cullPaddingX,r=n(e.worldView.right-l.x,p,0,!0)+l.cullPaddingX,o=s(e.worldView.y-l.y,d,0,!0)-l.cullPaddingY,a=n(e.worldView.bottom-l.y,d,0,!0)+l.cullPaddingY}return{left:i,right:r,top:o,bottom:a}}},9474(t,e,i){var n=i(90454),s=i(32483);
1t.exports=function(t,e,i,r){void 0===i&&(i=[]),void 0===r&&(r=0),i.length=0;var o=t.tilemapLayer,a=n(t,e);return o.skipCull&&1===o.scrollFactorX&&1===o.scrollFactorY&&(a.left=0,a.right=t.width,a.top=0,a.bottom=t.height),s(t,a,r,i),i}},27229(t,e,i){var n=i(19951),s=i(26099),r=new s;t.exports=function(t,e,i,o){var a,h,l=o.baseTileWidth,u=o.baseTileHeight,d=o.tilemapLayer;d&&(l*=d.scaleX,u*=d.scaleY);var c=n(t,e,r,i,o),f=[];"y"===o.staggerAxis?(a=.5773502691896257*l,h=u/2):(a=l/2,h=.5773502691896257*u);for(var p=0;p<6;p++){var g=2*Math.PI*(.5-p)/6;f.push(new s(c.x+a*Math.cos(g),c.y+h*Math.sin(g)))}return f}},19951(t,e,i){var n=i(26099);t.exports=function(t,e,i,s,r){i||(i=new n);var o,a,h=r.baseTileWidth,l=r.baseTileHeight,u=r.tilemapLayer,d=0,c=0;u&&(s||(s=u.scene.cameras.main),d=u.x+s.scrollX*(1-u.scrollFactorX),c=u.y+s.scrollY*(1-u.scrollFactorY),h*=u.scaleX,l*=u.scaleY);var f=h/2,p=l/2,g=r.staggerAxis,m=r.staggerIndex;return"y"===g?(o=d+h*t+h,a=c+1.5*e*p+p,e%2==0&&("odd"===m?o-=f:o+=f)):"x"===g&&"odd"===m&&(o=d+1.5*t*f+f,a=c+l*t+l,t%2==0&&("odd"===m?a-=p:a+=p)),i.set(o,a)}},86625(t,e,i){var n=i(26099);t.exports=function(t,e,i,s,r,o){s||(s=new n);var a,h,l,u,d,c,f=o.baseTileWidth,p=o.baseTileHeight,g=o.tilemapLayer;g&&(r||(r=g.scene.cameras.main),t-=g.x+r.scrollX*(1-g.scrollFactorX),e-=g.y+r.scrollY*(1-g.scrollFactorY),f*=g.scaleX,p*=g.scaleY);var m=f/2,v=p/2;"y"===o.staggerAxis?(l=.5773502691896257*(a=(t-m)/(.5773502691896257*f))+-.3333333333333333*(h=(e-v)/v),u=0*a+.6666666666666666*h):(l=-.3333333333333333*(a=(t-m)/m)+.5773502691896257*(h=(e-v)/(.5773502691896257*p)),u=.6666666666666666*a+0*h),d=-l-u;var x=Math.round(l),y=Math.round(u),T=Math.round(d),w=Math.abs(x-l),b=Math.abs(y-u),S=Math.abs(T-d);w>b&&w>S?x=-y-T:b>S&&(y=-x-T);var C=y;return c="odd"===o.staggerIndex?C%2==0?y/2+x:y/2+x-.5:C%2==0?y/2+x:y/2+x+.5,s.set(c,C)}},62991(t){t.exports=function(t,e,i){return t>=0&&t<i.width&&e>=0&&e<i.height}},14018(t,e,i){var n=i(33528);t.exports=function(t,e,i,s){void 0===i&&(i=[]),void 0===s&&(s=0),i.length=0;var r,o,a,h=t.tilemapLayer,l=t.data,u=t.width,d=t.height,c=h.skipCull;if(0===s)for(o=0;o<d;o++)for(r=0;r<u;r++)(a=l[o][r])&&-1!==a.index&&a.visible&&0!==a.alpha&&(c||n(r,o,t,e))&&i.push(a);else if(1===s)for(o=0;o<d;o++)for(r=u;r>=0;r--)(a=l[o][r])&&-1!==a.index&&a.visible&&0!==a.alpha&&(c||n(r,o,t,e))&&i.push(a);else if(2===s)for(o=d;o>=0;o--)for(r=0;r<u;r++)(a=l[o][r])&&-1!==a.index&&a.visible&&0!==a.alpha&&(c||n(r,o,t,e))&&i.push(a);else if(3===s)for(o=d;o>=0;o--)for(r=u;r>=0;r--)(a=l[o][r])&&-1!==a.index&&a.visible&&0!==a.alpha&&(c||n(r,o,t,e))&&i.push(a);return h.tilesDrawn=i.length,h.tilesTotal=u*d,i}},14127(t,e,i){var n=i(26099);t.exports=function(t,e,i,s,r){i||(i=new n);var o=r.baseTileWidth,a=r.baseTileHeight,h=r.tilemapLayer,l=0,u=0;h&&(s||(s=h.scene.cameras.main),l=h.x+s.scrollX*(1-h.scrollFactorX),o*=h.scaleX,u=h.y+s.scrollY*(1-h.scrollFactorY),a*=h.scaleY);var d=l+o/2*(t-e),c=u+a/2*(t+e);return i.set(d,c)}},96897(t,e,i){var n=i(26099);t.exports=function(t,e,i,s,r,o,a){s||(s=new n);var h=o.baseTileWidth,l=o.baseTileHeight,u=o.tilemapLayer;u&&(r||(r=u.scene.cameras.main),e-=u.y+r.scrollY*(1-u.scrollFactorY),l*=u.scaleY,t-=u.x+r.scrollX*(1-u.scrollFactorX),h*=u.scaleX);var d=h/2,c=l/2;t-=d,a||(e-=l);var f=.5*(t/d+e/c),p=.5*(-t/d+e/c);return i&&(f=Math.floor(f),p=Math.floor(p)),s.set(f,p)}},71558(t,e,i){var n=i(23029),s=i(62991),r=i(72023),o=i(20576);t.exports=function(t,e,i,a,h){if(void 0===a&&(a=!0),!s(e,i,h))return null;var l,u=h.data[i][e],d=u&&u.collides;t instanceof n?(null===h.data[i][e]&&(h.data[i][e]=new n(h,t.index,e,i,h.tileWidth,h.tileHeight)),h.data[i][e].copy(t)):(l=t,null===h.data[i][e]?h.data[i][e]=new n(h,l,e,i,h.tileWidth,h.tileHeight):h.data[i][e].index=l);var c=h.data[i][e],f=-1!==h.collideIndexes.indexOf(c.index);if(-1===(l=t instanceof n?t.index:t))c.width=h.tileWidth,c.height=h.tileHeight;else{var p=h.tilemapLayer.tilemap,g=p.tiles[l][2],m=p.tilesets[g];c.width=m.tileWidth,c.height=m.tileHeight}return o(c,f),a&&d!==c.collides&&r(e,i,h),c}},26303(t,e,i){var n=i(71558),s=new(i(26099));
vendor: 8,392 bytes, line 1
1t.exports=function(t,e,i,r,o,a){return a.tilemapLayer.worldToTileXY(e,i,!0,s,o,a),n(t,s.x,s.y,r,a)}},14051(t,e,i){var n=i(42573),s=i(71558);t.exports=function(t,e,i,r,o){if(void 0===r&&(r=!0),!Array.isArray(t))return null;Array.isArray(t[0])||(t=[t]);for(var a=t.length,h=t[0].length,l=0;l<a;l++)for(var u=0;u<h;u++)s(t[l][u],e+u,i+l,!1,o);r&&n(e-1,i-1,h+2,a+2,o)}},77389(t,e,i){var n=i(7386),s=i(26546);t.exports=function(t,e,i,r,o,a){var h,l=n(t,e,i,r,{},a);if(!o)for(h=0,o=[];h<l.length;h++)-1===o.indexOf(l[h].index)&&o.push(l[h].index);for(h=0;h<l.length;h++)l[h].index=s(o)}},63557(t,e,i){var n=i(23029),s=i(62991),r=i(72023);t.exports=function(t,e,i,o,a){if(void 0===i&&(i=!0),void 0===o&&(o=!0),!s(t,e,a))return null;var h=a.data[e][t];return h?(a.data[e][t]=i?null:new n(a,-1,t,e,a.tileWidth,a.tileHeight),o&&h&&h.collides&&r(t,e,a),h):null}},94178(t,e,i){var n=i(63557),s=new(i(26099));t.exports=function(t,e,i,r,o,a){return a.tilemapLayer.worldToTileXY(t,e,!0,s,o,a),n(s.x,s.y,i,r,a)}},15533(t,e,i){var n=i(7386),s=i(3956),r=new s(105,210,231,150),o=new s(243,134,48,200),a=new s(40,39,37,150);t.exports=function(t,e,i){void 0===e&&(e={});var s=void 0!==e.tileColor?e.tileColor:r,h=void 0!==e.collidingTileColor?e.collidingTileColor:o,l=void 0!==e.faceColor?e.faceColor:a,u=n(0,0,i.width,i.height,null,i);t.translateCanvas(i.tilemapLayer.x,i.tilemapLayer.y),t.scaleCanvas(i.tilemapLayer.scaleX,i.tilemapLayer.scaleY);for(var d=0;d<u.length;d++){var c=u[d],f=c.tileset?c.tileset.tileOffset:{x:0,y:0},p=c.width,g=c.height,m=c.pixelX-f.x,v=c.pixelY-f.y,x=c.collides?h:s;null!==x&&(t.fillStyle(x.color,x.alpha/255),t.fillRect(m,v,p,g)),m+=1,v+=1,p-=2,g-=2,null!==l&&(t.lineStyle(1,l.color,l.alpha/255),c.faceTop&&t.lineBetween(m,v,m+p,v),c.faceRight&&t.lineBetween(m+p,v,m+p,v+g),c.faceBottom&&t.lineBetween(m,v+g,m+p,v+g),c.faceLeft&&t.lineBetween(m,v,m,v+g))}}},27987(t,e,i){var n=i(7386);t.exports=function(t,e,i,s,r,o,a){for(var h=n(i,s,r,o,null,a),l=0;l<h.length;l++)h[l]&&h[l].index===t&&(h[l].index=e)}},32483(t){t.exports=function(t,e,i,n){var s,r,o,a=t.data,h=t.width,l=t.height,u=t.tilemapLayer,d=Math.max(0,e.left),c=Math.min(h,e.right),f=Math.max(0,e.top),p=Math.min(l,e.bottom);if(0===i)for(r=f;r<p;r++)for(s=d;a[r]&&s<c;s++)(o=a[r][s])&&-1!==o.index&&o.visible&&0!==o.alpha&&n.push(o);else if(1===i)for(r=f;r<p;r++)for(s=c;a[r]&&s>=d;s--)(o=a[r][s])&&-1!==o.index&&o.visible&&0!==o.alpha&&n.push(o);else if(2===i)for(r=p;r>=f;r--)for(s=d;a[r]&&s<c;s++)(o=a[r][s])&&-1!==o.index&&o.visible&&0!==o.alpha&&n.push(o);else if(3===i)for(r=p;r>=f;r--)for(s=c;a[r]&&s>=d;s--)(o=a[r][s])&&-1!==o.index&&o.visible&&0!==o.alpha&&n.push(o);return u.tilesDrawn=n.length,u.tilesTotal=h*l,n}},57068(t,e,i){var n=i(20576),s=i(42573),r=i(9589);t.exports=function(t,e,i,o,a){void 0===e&&(e=!0),void 0===i&&(i=!0),void 0===a&&(a=!0),Array.isArray(t)||(t=[t]);for(var h=0;h<t.length;h++)r(t[h],e,o);if(a)for(var l=0;l<o.height;l++)for(var u=0;u<o.width;u++){var d=o.data[l][u];d&&-1!==t.indexOf(d.index)&&n(d,e)}i&&s(0,0,o.width,o.height,o)}},37266(t,e,i){var n=i(20576),s=i(42573),r=i(9589);t.exports=function(t,e,i,o,a,h){if(void 0===i&&(i=!0),void 0===o&&(o=!0),void 0===h&&(h=!0),!(t>e)){for(var l=t;l<=e;l++)r(l,i,a);if(h)for(var u=0;u<a.height;u++)for(var d=0;d<a.width;d++){var c=a.data[u][d];c&&c.index>=t&&c.index<=e&&n(c,i)}o&&s(0,0,a.width,a.height,a)}}},75661(t,e,i){var n=i(20576),s=i(42573),r=i(9589);t.exports=function(t,e,i,o){void 0===e&&(e=!0),void 0===i&&(i=!0),Array.isArray(t)||(t=[t]);for(var a=0;a<o.height;a++)for(var h=0;h<o.width;h++){var l=o.data[a][h];l&&-1===t.indexOf(l.index)&&(n(l,e),r(l.index,e,o))}i&&s(0,0,o.width,o.height,o)}},64740(t,e,i){var n=i(20576),s=i(42573),r=i(97022);t.exports=function(t,e,i,o){void 0===e&&(e=!0),void 0===i&&(i=!0);for(var a=0;a<o.height;a++)for(var h=0;h<o.width;h++){var l=o.data[a][h];if(l){for(var u in t)if(r(l.properties,u)){var d=t[u];Array.isArray(d)||(d=[d]);for(var c=0;c<d.length;c++)l.properties[u]===d[c]&&n(l,e)}}}i&&s(0,0,o.width,o.height,o)}},63307(t,e,i){var n=i(20576),s=i(42573);t.exports=function(t,e,i){void 0===t&&(t=!0),void 0===e&&(e=!0);for(var r=0;r<i.height;r++)for(var o=0;o<i.width;o++){var a=i.data[r][o];if(a){var h=a.getCollisionGroup();h&&h.objects&&h.objects.length>0&&n(a,t)}}e&&s(0,0,i.width,i.height,i)}},9589(t){t.exports=function(t,e,i){var n=i.collideIndexes.indexOf(t);e&&-1===n?i.collideIndexes.push(t):e||-1===n||i.collideIndexes.splice(n,1)}},20576(t){t.exports=function(t,e){e?t.setCollision(!0,!0,!0,!0,!1):t.resetCollision(!1)}},79583(t){t.exports=function(t,e,i,n){if("number"==typeof t)n.callbacks[t]=null!==e?{callback:e,callbackContext:i}:void 0;else for(var s=0,r=t.length;s<r;s++)n.callbacks[t[s]]=null!==e?{callback:e,callbackContext:i}:void 0}},93254(t,e,i){var n=i(7386);t.exports=function(t,e,i,s,r,o,a){for(var h=n(t,e,i,s,null,a),l=0;l<h.length;l++)h[l].setCollisionCallback(r,o)}},32903(t,e,i){var n=i(7386),s=i(33680);t.exports=function(t,e,i,r,o){var a=n(t,e,i,r,null,o),h=a.map(function(t){return t.index});s(h);for(var l=0;l<a.length;l++)a[l].index=h[l]}},61325(t,e,i){var n=i(63448),s=i(56583);t.exports=function(t,e){var i=t.tilemapLayer.tilemap,r=t.tilemapLayer,o=Math.floor(i.tileWidth*r.scaleX),a=Math.floor(i.tileHeight*r.scaleY);return{left:s(e.worldView.x-r.x,o,0,!0)-r.cullPaddingX,right:n(e.worldView.right-r.x,o,0,!0)+r.cullPaddingX,top:s(e.worldView.y-r.y,a/2,0,!0)-r.cullPaddingY,bottom:n(e.worldView.bottom-r.y,a/2,0,!0)+r.cullPaddingY}}},54503(t,e,i){var n=i(61325),s=i(32483);t.exports=function(t,e,i,r){void 0===i&&(i=[]),void 0===r&&(r=0),i.length=0;var o=t.tilemapLayer,a=n(t,e);return o.skipCull&&1===o.scrollFactorX&&1===o.scrollFactorY&&(a.left=0,a.right=t.width,a.top=0,a.bottom=t.height),s(t,a,r,i),i}},97202(t,e,i){var n=i(26099);t.exports=function(t,e,i,s,r){i||(i=new n);var o=r.baseTileWidth,a=r.baseTileHeight,h=r.tilemapLayer,l=0,u=0;h&&(s||(s=h.scene.cameras.main),l=h.x+s.scrollX*(1-h.scrollFactorX),o*=h.scaleX,u=h.y+s.scrollY*(1-h.scrollFactorY),a*=h.scaleY);var d=l+t*o+e%2*(o/2),c=u+a/2*e;return i.set(d,c)}},28054(t){t.exports=function(t,e,i){var n=i.baseTileHeight,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.y+e.scrollY*(1-s.scrollFactorY),n*=s.scaleY),r+n/2*t+n}},15108(t,e,i){var n=i(26099);t.exports=function(t,e,i,s,r,o){s||(s=new n);var a=o.baseTileWidth,h=o.baseTileHeight,l=o.tilemapLayer;l&&(r||(r=l.scene.cameras.main),e-=l.y+r.scrollY*(1-l.scrollFactorY),h*=l.scaleY,t-=l.x+r.scrollX*(1-l.scrollFactorX),a*=l.scaleX);var u=i?Math.floor(e/(h/2)):e/(h/2),d=i?Math.floor((t+u%2*.5*a)/a):(t+u%2*.5*a)/a;return s.set(d,u)}},51900(t){t.exports=function(t,e,i,n){var s=n.baseTileHeight,r=n.tilemapLayer;return r&&(i||(i=r.scene.cameras.main),t-=r.y+i.scrollY*(1-r.scrollFactorY),s*=r.scaleY),e?Math.floor(t/(s/2)):t/(s/2)}},86560(t,e,i){var n=i(7386);t.exports=function(t,e,i,s,r,o,a){for(var h=n(i,s,r,o,null,a),l=0;l<h.length;l++)h[l]&&(h[l].index===t?h[l].index=e:h[l].index===e&&(h[l].index=t))}},97281(t){t.exports=function(t,e,i){var n=i.baseTileWidth,s=i.tilemapLayer,r=0;return s&&(e||(e=s.scene.cameras.main),r=s.x+e.scrollX*(1-s.scrollFactorX),n*=s.scaleX),r+t*n}},70326(t,e,i){var n=i(97281),s=i(29650),r=i(26099);t.exports=function(t,e,i,o,a){return i||(i=new r(0,0)),i.x=n(t,o,a),i.y=s(e,o,a),i}},29650(t){t.exports=function(t,e,i){var n=i.baseTileHeight,s=i.tilemapLayer,r=0;return s&&(e||(e=s.scene.cameras.main),r=s.y+e.scrollY*(1-s.scrollFactorY),n*=s.scaleY),r+t*n}},77366(t,e,i){var n=i(7386),s=i(75508);t.exports=function(t,e,i,r,o,a){if(o){var h,l=n(t,e,i,r,null,a),u=0;for(h=0;h<o.length;h++)u+=o[h].weight;if(!(u<=0))for(h=0;h<l.length;h++){for(var d=s.RND.frac()*u,c=0,f=-1,p=0;p<o.length;p++)if(d<=(c+=o[p].weight)){var g=o[p].index;f=Array.isArray(g)?g[Math.floor(s.RND.frac()*g.length)]:g;break}l[h].index=f}}}},10095(t,e,i){var n=i(85896),s=new(i(26099));t.exports=function(t,e,i,r){return n(t,0,e,s,i,r),s.x}},85896(t,e,i){var n=i(26099);t.exports=function(t,e,i,s,r,o){void 0===i&&(i=!0),s||(s=new n);var a=o.baseTileWidth,h=o.baseTileHeight,l=o.tilemapLayer;l&&(r||(r=l.scene.cameras.main),t-=l.x+r.scrollX*(1-l.scrollFactorX),e-=l.y+r.scrollY*(1-l.scrollFactorY),a*=l.scaleX,h*=l.scaleY);var u=t/a,d=e/h;return i&&(u=Math.floor(u),d=Math.floor(d)),s.set(u,d)}},63288(t,e,i){var n=i(85896),s=new(i(26099));t.exports=function(t,e,i,r){return n(0,t,e,s,i,r),s.y}}
1,81086(t,e,i){t.exports={CalculateFacesAt:i(72023),CalculateFacesWithin:i(42573),CheckIsoBounds:i(33528),Copy:i(1785),CreateFromTiles:i(78419),CullBounds:i(19545),CullTiles:i(30003),Fill:i(35137),FilterTiles:i(40253),FindByIndex:i(52692),FindTile:i(66151),ForEachTile:i(97560),GetCullTilesFunction:i(43305),GetTileAt:i(7423),GetTileAtWorldXY:i(60540),GetTileCorners:i(55826),GetTileCornersFunction:i(11758),GetTilesWithin:i(7386),GetTilesWithinShape:i(91141),GetTilesWithinWorldXY:i(96523),GetTileToWorldXFunction:i(39167),GetTileToWorldXYFunction:i(62e3),GetTileToWorldYFunction:i(5984),GetWorldToTileXFunction:i(96113),GetWorldToTileXYFunction:i(16926),GetWorldToTileYFunction:i(55762),HasTileAt:i(45091),HasTileAtWorldXY:i(24152),HexagonalCullBounds:i(90454),HexagonalCullTiles:i(9474),HexagonalGetTileCorners:i(27229),HexagonalTileToWorldXY:i(19951),HexagonalWorldToTileXY:i(86625),IsInLayerBounds:i(62991),IsometricCullTiles:i(14018),IsometricTileToWorldXY:i(14127),IsometricWorldToTileXY:i(96897),PutTileAt:i(71558),PutTileAtWorldXY:i(26303),PutTilesAt:i(14051),Randomize:i(77389),RemoveTileAt:i(63557),RemoveTileAtWorldXY:i(94178),RenderDebug:i(15533),ReplaceByIndex:i(27987),RunCull:i(32483),SetCollision:i(57068),SetCollisionBetween:i(37266),SetCollisionByExclusion:i(75661),SetCollisionByProperty:i(64740),SetCollisionFromCollisionGroup:i(63307),SetLayerCollisionIndex:i(9589),SetTileCollision:i(20576),SetTileIndexCallback:i(79583),SetTileLocationCallback:i(93254),Shuffle:i(32903),StaggeredCullBounds:i(61325),StaggeredCullTiles:i(54503),StaggeredTileToWorldXY:i(97202),StaggeredTileToWorldY:i(28054),StaggeredWorldToTileXY:i(15108),StaggeredWorldToTileY:i(51900),SwapByIndex:i(86560),TileToWorldX:i(97281),TileToWorldXY:i(70326),TileToWorldY:i(29650),WeightedRandomize:i(77366),WorldToTileX:i(10095),WorldToTileXY:i(85896),WorldToTileY:i(63288)}},91907(t){t.exports={ORTHOGONAL:0,ISOMETRIC:1,STAGGERED:2,HEXAGONAL:3}},21829(t,e,i){t.exports={ORIENTATION:i(91907)}},62501(t,e,i){var n=i(79291),s=i(21829);t.exports=n(!1,{Components:i(81086),Parsers:i(57442),Formats:i(80341),ImageCollection:i(16536),ParseToTilemap:i(31989),Tile:i(23029),Tilemap:i(49075),TilemapCreator:i(45939),TilemapFactory:i(46029),Tileset:i(33629),TilemapLayerBase:i(44731),TilemapLayer:i(20442),TilemapGPULayer:i(53180),Orientation:i(91907),LayerData:i(14977),MapData:i(87010),ObjectLayer:i(48700)},s.ORIENTATION)},14977(t,e,i){var n=i(83419),s=i(91907),r=i(95540);t.exports=new n({initialize:function(t){void 0===t&&(t={}),this.name=r(t,"name","layer"),this.id=r(t,"id",0),this.x=r(t,"x",0),this.y=r(t,"y",0),this.width=r(t,"width",0),this.height=r(t,"height",0),this.tileWidth=r(t,"tileWidth",0),this.tileHeight=r(t,"tileHeight",0),this.baseTileWidth=r(t,"baseTileWidth",this.tileWidth),this.baseTileHeight=r(t,"baseTileHeight",this.tileHeight),this.orientation=r(t,"orientation",s.ORTHOGONAL),this.widthInPixels=r(t,"widthInPixels",this.width*this.baseTileWidth),this.heightInPixels=r(t,"heightInPixels",this.height*this.baseTileHeight),this.alpha=r(t,"alpha",1),this.visible=r(t,"visible",!0),this.properties=r(t,"properties",[]),this.indexes=r(t,"indexes",[]),this.collideIndexes=r(t,"collideIndexes",[]),this.callbacks=r(t,"callbacks",[]),this.bodies=r(t,"bodies",[]),this.data=r(t,"data",[]),this.tilemapLayer=r(t,"tilemapLayer",null),this.hexSideLength=r(t,"hexSideLength",0),this.staggerAxis=r(t,"staggerAxis","y"),this.staggerIndex=r(t,"staggerIndex","odd")}})},87010(t,e,i){var n=i(83419),s=i(91907),r=i(95540);t.exports=new n({initialize:function(t){void 0===t&&(t={}),this.name=r(t,"name","map"),this.width=r(t,"width",0),this.height=r(t,"height",0),this.infinite=r(t,"infinite",!1),this.tileWidth=r(t,"tileWidth",0),this.tileHeight=r(t,"tileHeight",0),this.widthInPixels=r(t,"widthInPixels",this.width*this.tileWidth),this.heightInPixels=r(t,"heightInPixels",this.height*this.tileHeight),this.format=r(t,"format",null),this.orientation=r(t,"orientation",s.ORTHOGONAL),this.renderOrder=r(t,"renderOrder","right-down"),this.version=r(t,"version","1"),this.properties=r(t,"properties",{}),this.layers=r(t,"layers",[]),this.images=r(t,"images",[]),this.objects=r(t,"objects",[]),Array.isArray(this.objects)||(this.objects=[]),this.collision=r(t,"collision",{}),this.tilesets=r(t,"tilesets",[]),this.imageCollections=r(t,"imageCollections",[]),this.tiles=r(t,"tiles",[]),this.hexSideLength=r(t,"hexSideLength",0),this.staggerAxis=r(t,"staggerAxis","y"),this.staggerIndex=r(t,"staggerIndex","odd")}})}
vendor: 40,349 bytes, line 1
1,48700(t,e,i){var n=i(83419),s=i(95540);t.exports=new n({initialize:function(t){void 0===t&&(t={}),this.name=s(t,"name","object layer"),this.id=s(t,"id",0),this.opacity=s(t,"opacity",1),this.properties=s(t,"properties",{}),this.propertyTypes=s(t,"propertytypes",{}),this.type=s(t,"type","objectgroup"),this.visible=s(t,"visible",!0),this.objects=s(t,"objects",[]),Array.isArray(this.objects)||(this.objects=[])}})},6641(t,e,i){var n=i(91907);t.exports=function(t){return"isometric"===(t=t.toLowerCase())?n.ISOMETRIC:"staggered"===t?n.STAGGERED:"hexagonal"===t?n.HEXAGONAL:n.ORTHOGONAL}},46177(t,e,i){var n=i(80341),s=i(2342),r=i(82593),o=i(46594),a=i(87021);t.exports=function(t,e,i,h,l,u){var d;switch(e){case n.ARRAY_2D:d=s(t,i,h,l,u);break;case n.CSV:d=r(t,i,h,l,u);break;case n.TILED_JSON:d=o(t,i,u);break;case n.WELTMEISTER:d=a(t,i,u);break;default:console.warn("Unrecognized tilemap data format: "+e),d=null}return d}},2342(t,e,i){var n=i(80341),s=i(14977),r=i(87010),o=i(23029);t.exports=function(t,e,i,a,h){for(var l=new s({tileWidth:i,tileHeight:a}),u=new r({name:t,tileWidth:i,tileHeight:a,format:n.ARRAY_2D,layers:[l]}),d=[],c=e.length,f=0,p=0;p<e.length;p++){d[p]=[];for(var g=e[p],m=0;m<g.length;m++){var v=parseInt(g[m],10);isNaN(v)||-1===v?d[p][m]=h?null:new o(l,-1,m,p,i,a):d[p][m]=new o(l,v,m,p,i,a)}0===f&&(f=g.length)}return u.width=l.width=f,u.height=l.height=c,u.widthInPixels=l.widthInPixels=f*i,u.heightInPixels=l.heightInPixels=c*a,l.data=d,u}},82593(t,e,i){var n=i(80341),s=i(2342);t.exports=function(t,e,i,r,o){var a=s(t,e.trim().split("\n").map(function(t){return t.split(",")}),i,r,o);return a.format=n.CSV,a}},6656(t,e,i){var n=i(14977),s=i(23029);t.exports=function(t,e){for(var i=[],r=0;r<t.layer.length;r++){for(var o=t.layer[r],a=new n({name:o.name,width:o.width,height:o.height,tileWidth:o.tilesize,tileHeight:o.tilesize,visible:1===o.visible}),h=[],l=[],u=0;u<o.data.length;u++){for(var d=0;d<o.data[u].length;d++){var c,f=o.data[u][d]-1;c=f>-1?new s(a,f,d,u,o.tilesize,o.tilesize):e?null:new s(a,-1,d,u,o.tilesize,o.tilesize),h.push(c)}l.push(h),h=[]}a.data=l,i.push(a)}return i}},96483(t,e,i){var n=i(33629);t.exports=function(t){for(var e=[],i=[],s=0;s<t.layer.length;s++){var r=t.layer[s],o=r.tilesetName;""!==o&&-1===i.indexOf(o)&&(i.push(o),e.push(new n(o,0,r.tilesize,r.tilesize,0,0)))}return e}},87021(t,e,i){var n=i(80341),s=i(87010),r=i(6656),o=i(96483);t.exports=function(t,e,i){if(0===e.layer.length)return console.warn("No layers found in the Weltmeister map: "+t),null;for(var a=0,h=0,l=0;l<e.layer.length;l++)e.layer[l].width>a&&(a=e.layer[l].width),e.layer[l].height>h&&(h=e.layer[l].height);var u=new s({width:a,height:h,name:t,tileWidth:e.layer[0].tilesize,tileHeight:e.layer[0].tilesize,format:n.WELTMEISTER});return u.layers=r(e,i),u.tilesets=o(e),u}},52833(t,e,i){t.exports={ParseTileLayers:i(6656),ParseTilesets:i(96483),ParseWeltmeister:i(87021)}},57442(t,e,i){t.exports={FromOrientationString:i(6641),Parse:i(46177),Parse2DArray:i(2342),ParseCSV:i(82593),Impact:i(52833),Tiled:i(96761)}},51233(t,e,i){var n=i(79291);t.exports=function(t){for(var e,i,s,r,o,a=0;a<t.layers.length;a++){e=t.layers[a],r=null;for(var h=0;h<e.data.length;h++){o=e.data[h];for(var l=0;l<o.length;l++)null!==(i=o[l])&&!(i.index<0)&&(s=t.tiles[i.index][2],i.width=(r=t.tilesets[s]).tileWidth,i.height=r.tileHeight,r.tileProperties&&r.tileProperties[i.index-r.firstgid]&&(i.properties=n(i.properties,r.tileProperties[i.index-r.firstgid])))}}}},41868(t){t.exports=function(t){for(var e=window.atob(t),i=e.length,n=Array(i/4),s=0;s<i;s+=4)n[s/4]=(e.charCodeAt(s)|e.charCodeAt(s+1)<<8|e.charCodeAt(s+2)<<16|e.charCodeAt(s+3)<<24)>>>0;return n}},84101(t,e,i){var n=i(33629);t.exports=function(t){var e,i,s=[];for(e=0;e<t.imageCollections.length;e++)for(var r=t.imageCollections[e].images,o=0;o<r.length;o++){var a=r[o],h={x:0,y:a.height-t.tileHeight};(i=new n(a.image,a.gid,a.width,a.height,0,0,void 0,void 0,h)).updateTileData(a.width,a.height),t.tilesets.push(i)}for(e=0;e<t.tilesets.length;e++)for(var l=(i=t.tilesets[e]).tileMargin,u=i.tileMargin,d=0,c=0,f=0,p=i.firstgid;p<i.firstgid+i.total&&(s[p]=[l,u,e],l+=i.tileWidth+i.tileSpacing,++d!==i.total)&&(++c!==i.columns||(l=i.tileMargin,u+=i.tileHeight+i.tileSpacing,c=0,++f!==i.rows));p++);return s}},79677(t,e,i){var n=i(95540);t.exports=function(t,e,i){if(!e)return{i:0,layers:t.layers,name:"",opacity:1,visible:!0,x:0,y:0};var s=e.x+n(e,"startx",0)*t.tilewidth+n(e,"offsetx",0),r=e.y+n(e,"starty",0)*t.tileheight+n(e,"offsety",0);return{i:0,layers:e.layers,name:i.name+e.name+"/",opacity:i.opacity*e.opacity,visible:i.visible&&e.visible,x:i.x+s,y:i.y+r}}},29920(t){t.exports=function(t){var e=!!(0x80000000&t),i=!!(0x40000000&t),n=!!(0x20000000&t);t&=0x1fffffff;var s=0,r=!1;return e&&i&&n?(s=Math.PI/2,r=!0):e&&i&&!n?(s=Math.PI,r=!1):e&&!i&&n?(s=Math.PI/2,r=!1):!e||i||n?!e&&i&&n?(s=3*Math.PI/2,r=!1):e||!i||n?e||i||!n?e||i||n||(s=0,r=!1):(s=3*Math.PI/2,r=!0):(s=Math.PI,r=!0):(s=0,r=!0),{gid:t,flippedHorizontal:e,flippedVertical:i,flippedAntiDiagonal:n,rotation:s,flipped:r}}},12635(t,e,i){var n=i(95540),s=i(79677);t.exports=function(t){for(var e=[],i=[],r=s(t);r.i<r.layers.length||i.length>0;){if(r.i>=r.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}r=i.pop();continue}var o=r.layers[r.i];if(r.i++,"imagelayer"!==o.type){if("group"===o.type){var a=s(t,o,r);i.push(r),r=a}continue}var h=n(o,"offsetx",0)+n(o,"startx",0),l=n(o,"offsety",0)+n(o,"starty",0);e.push({name:r.name+o.name,image:o.image,x:r.x+h+o.x,y:r.y+l+o.y,alpha:r.opacity*o.opacity,visible:r.visible&&o.visible,properties:n(o,"properties",{})})}return e}},46594(t,e,i){var n=i(51233),s=i(84101),r=i(91907),o=i(62644),a=i(80341),h=i(6641),l=i(87010),u=i(12635),d=i(22611),c=i(28200),f=i(24619);t.exports=function(t,e,i){var p=o(e),g=new l({width:p.width,height:p.height,name:t,tileWidth:p.tilewidth,tileHeight:p.tileheight,orientation:h(p.orientation),format:a.TILED_JSON,version:p.version,properties:p.properties,renderOrder:p.renderorder,infinite:p.infinite});if(g.orientation===r.HEXAGONAL)if(g.hexSideLength=p.hexsidelength,g.staggerAxis=p.staggeraxis,g.staggerIndex=p.staggerindex,"y"===g.staggerAxis){var m=(g.tileHeight-g.hexSideLength)/2;g.widthInPixels=g.tileWidth*(g.width+.5),g.heightInPixels=g.height*(g.hexSideLength+m)+m}else{var v=(g.tileWidth-g.hexSideLength)/2;g.widthInPixels=g.width*(g.hexSideLength+v)+v,g.heightInPixels=g.tileHeight*(g.height+.5)}g.layers=c(p,i),g.images=u(p);var x=f(p);return g.tilesets=x.tilesets,g.imageCollections=x.imageCollections,g.objects=d(p),g.tiles=s(g),n(g),g}},52205(t,e,i){var n=i(18254),s=i(29920),r=function(t){return{x:t.x,y:t.y}},o=["id","name","type","rotation","properties","visible","x","y","width","height"];t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=0);var a=n(t,o);if(a.x+=e,a.y+=i,t.gid){var h=s(t.gid);a.gid=h.gid,a.flippedHorizontal=h.flippedHorizontal,a.flippedVertical=h.flippedVertical,a.flippedAntiDiagonal=h.flippedAntiDiagonal}else t.polyline?a.polyline=t.polyline.map(r):t.polygon?a.polygon=t.polygon.map(r):t.ellipse?a.ellipse=t.ellipse:t.text?a.text=t.text:t.point?a.point=!0:a.rectangle=!0;return a}},22611(t,e,i){var n=i(95540),s=i(52205),r=i(48700),o=i(79677);t.exports=function(t){for(var e=[],i=[],a=o(t);a.i<a.layers.length||i.length>0;){if(a.i>=a.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}a=i.pop();continue}var h=a.layers[a.i];if(a.i++,h.opacity*=a.opacity,h.visible=a.visible&&h.visible,"objectgroup"!==h.type){if("group"===h.type){var l=o(t,h,a);i.push(a),a=l}continue}h.name=a.name+h.name;for(var u=a.x+n(h,"startx",0)+n(h,"offsetx",0),d=a.y+n(h,"starty",0)+n(h,"offsety",0),c=[],f=0;f<h.objects.length;f++){var p=s(h.objects[f],u,d);c.push(p)}var g=new r(h);g.objects=c,e.push(g)}return e}},28200(t,e,i){var n=i(41868),s=i(91907),r=i(79677),o=i(6641),a=i(95540),h=i(14977),l=i(29920),u=i(23029);t.exports=function(t,e){for(var i=a(t,"infinite",!1),d=[],c=[],f=r(t);f.i<f.layers.length||c.length>0;){if(f.i>=f.layers.length){if(c.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}f=c.pop();continue}var p,g,m,v,x,y,T=f.layers[f.i];if(f.i++,"tilelayer"!==T.type){if("group"===T.type){var w=r(t,T,f);c.push(f),f=w}continue}if(T.compression){console.warn("TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer '"+T.name+"'");continue}if(T.encoding&&"base64"===T.encoding){if(T.chunks)for(var b=0;b<T.chunks.length;b++)T.chunks[b].data=n(T.chunks[b].data);T.data&&(T.data=n(T.data)),delete T.encoding}var S=[],C=0;if(i){var E=a(T,"startx",0)+T.x,A=a(T,"starty",0)+T.y;(p=new h({name:f.name+T.name,id:T.id,x:f.x+a(T,"offsetx",0)+E*t.tilewidth,y:f.y+a(T,"offsety",0)+A*t.tileheight,width:T.width,height:T.height,tileWidth:t.tilewidth,tileHeight:t.tileheight,alpha:f.opacity*T.opacity,visible:f.visible&&T.visible,properties:a(T,"properties",[]),orientation:o(t.orientation)})).orientation===s.HEXAGONAL&&(p.hexSideLength=t.hexsidelength,p.staggerAxis=t.staggeraxis,p.staggerIndex=t.staggerindex,"y"===p.staggerAxis?(x=(p.tileHeight-p.hexSideLength)/2,p.widthInPixels=p.tileWidth*(p.width+.5),p.heightInPixels=p.height*(p.hexSideLength+x)+x):(y=(p.tileWidth-p.hexSideLength)/2,p.widthInPixels=p.width*(p.hexSideLength+y)+y,p.heightInPixels=p.tileHeight*(p.height+.5)));for(var _=0;_<T.height;_++){S[_]=[null];for(var M=0;M<T.width;M++)S[_][M]=null}for(_=0,U=T.chunks.length;_<U;_++)for(var R=T.chunks[_],O=R.x-E,P=R.y-A,L=0,D=0,F=R.data.length;D<F;D++){var I=C+O,N=L+P;(g=l(R.data[D])).gid>0?((m=new u(p,g.gid,I,N,t.tilewidth,t.tileheight)).rotation=g.rotation,m.flipX=g.flipped,S[N][I]=m):(v=e?null:new u(p,-1,I,N,t.tilewidth,t.tileheight),S[N][I]=v),++C===R.width&&(L++,C=0)}}else{(p=new h({name:f.name+T.name,id:T.id,x:f.x+a(T,"offsetx",0)+T.x,y:f.y+a(T,"offsety",0)+T.y,width:T.width,height:T.height,tileWidth:t.tilewidth,tileHeight:t.tileheight,alpha:f.opacity*T.opacity,visible:f.visible&&T.visible,properties:a(T,"properties",[]),orientation:o(t.orientation)})).orientation===s.HEXAGONAL&&(p.hexSideLength=t.hexsidelength,p.staggerAxis=t.staggeraxis,p.staggerIndex=t.staggerindex,"y"===p.staggerAxis?(x=(p.tileHeight-p.hexSideLength)/2,p.widthInPixels=p.tileWidth*(p.width+.5),p.heightInPixels=p.height*(p.hexSideLength+x)+x):(y=(p.tileWidth-p.hexSideLength)/2,p.widthInPixels=p.width*(p.hexSideLength+y)+y,p.heightInPixels=p.tileHeight*(p.height+.5)));for(var B=[],k=0,U=T.data.length;k<U;k++)(g=l(T.data[k])).gid>0?((m=new u(p,g.gid,C,S.length,t.tilewidth,t.tileheight)).rotation=g.rotation,m.flipX=g.flipped,B.push(m)):(v=e?null:new u(p,-1,C,S.length,t.tilewidth,t.tileheight),B.push(v)),++C===T.width&&(S.push(B),C=0,B=[])}p.data=S,d.push(p)}return d}},24619(t,e,i){var n=i(33629),s=i(16536),r=i(52205),o=i(57880);t.exports=function(t){for(var e,i=[],a=[],h=null,l=0;l<t.tilesets.length;l++){var u=t.tilesets[l];if(u.source)console.warn("External tilesets unsupported. Use Embed Tileset and re-export");else if(u.image){var d=new n(u.name,u.firstgid,u.tilewidth,u.tileheight,u.margin,u.spacing,void 0,void 0,u.tileoffset);if(t.version>1){var c=void 0,f=void 0;if(Array.isArray(u.tiles)){c=c||{},f=f||{};for(var p=0;p<u.tiles.length;p++){var g=u.tiles[p];if(g.properties){var m={};g.properties.forEach(function(t){m[t.name]=t.value}),f[g.id]=m}if(g.objectgroup&&((c[g.id]||(c[g.id]={})).objectgroup=g.objectgroup,g.objectgroup.objects)){var v=g.objectgroup.objects.map(function(t){return r(t)});c[g.id].objectgroup.objects=v}g.animation&&((c[g.id]||(c[g.id]={})).animation=g.animation),g.type&&((c[g.id]||(c[g.id]={})).type=g.type)}for(var x in c){var y=c[x].animation;if(y){for(var T=0,w=0;w<y.length;w++)y[w].startTime=T,T+=y[w].duration;c[x].animationDuration=T}}}Array.isArray(u.wangsets)&&(c=c||{},f=f||{},o(u.wangsets,c)),c&&(d.tileData=c,d.tileProperties=f)}else if(u.tileproperties&&(d.tileProperties=u.tileproperties),u.tiles)for(e in d.tileData=u.tiles,d.tileData){var b=d.tileData[e].objectgroup;if(b&&b.objects){var S=b.objects.map(function(t){return r(t)});d.tileData[e].objectgroup.objects=S}}d.updateTileData(u.imagewidth,u.imageheight),i.push(d)}else{var C=new s(u.name,u.firstgid,u.tilewidth,u.tileheight,u.margin,u.spacing,u.properties),E=0;for(p=0;p<u.tiles.length;p++){var A=(g=u.tiles[p]).image,_=parseInt(g.id,10),M=u.firstgid+_,R=g.imagewidth,O=g.imageheight;C.addImage(M,A,R,O),E=Math.max(_,E)}C.maxId=E,a.push(C)}h&&(h.lastgid=u.firstgid-1),h=u}return{tilesets:i,imageCollections:a}}},57880(t){t.exports=function(t,e){for(var i=0;i<t.length;i++){var n=t[i],s=i;if(n.name&&""!==n.name&&(s=n.name),Array.isArray(n.wangtiles)&&n.wangtiles.length>0){var r,o,a,h={},l={};if(Array.isArray(n.edgecolors))for(r=0;r<n.edgecolors.length;r++)a=1+r,""!==(o=n.edgecolors[r]).name&&(h[a]=o.name);if(Array.isArray(n.cornercolors))for(r=0;r<n.cornercolors.length;r++)a=1+r,""!==(o=n.cornercolors[r]).name&&(l[a]=o.name);if(Array.isArray(n.colors))for(r=0;r<n.colors.length;r++)o=n.colors[r],a=1+r,""!==o.name&&(h[a]=l[a]=o.name);for(var u=[h,l,h,l,h,l,h,l],d=0;d<n.wangtiles.length;d++){var c=n.wangtiles[d],f=e[c.tileid]||(e[c.tileid]={});f=f.wangid||(f.wangid={});for(var p=[],g=0;g<Math.min(u.length,c.wangid.length);g++){if(0===(o=c.wangid[g])){p.push(void 0);continue}var m=u[g][o];if(void 0!==m){p.push(m);continue}p.push(o)}f[s]=p}}}}},96761(t,e,i){t.exports={AssignTileProperties:i(51233),Base64Decode:i(41868),BuildTilesetIndex:i(84101),CreateGroupLayer:i(79677),ParseGID:i(29920),ParseImageLayers:i(12635),ParseJSONTiled:i(46594),ParseObject:i(52205),ParseObjectLayers:i(22611),ParseTileLayers:i(28200),ParseTilesets:i(24619)}},33385(t,e,i){var n=i(83419),s=i(37277),r=i(44594),o=i(94880),a=i(72905),h=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.now=0,this.startTime=0,this.timeScale=1,this.paused=!1,this._active=[],this._pendingInsertion=[],this._pendingRemoval=[],t.sys.events.once(r.BOOT,this.boot,this),t.sys.events.on(r.START,this.start,this)},boot:function(){this.now=this.systems.game.loop.time,this.systems.events.once(r.DESTROY,this.destroy,this)},start:function(){this.startTime=this.systems.game.loop.time;var t=this.systems.events;t.on(r.PRE_UPDATE,this.preUpdate,this),t.on(r.UPDATE,this.update,this),t.once(r.SHUTDOWN,this.shutdown,this)},addEvent:function(t){var e;if(t instanceof o){if(e=t,this.removeEvent(e),e.elapsed=e.startAt,e.hasDispatched=!1,e.repeatCount=-1===e.repeat||e.loop?0xe8d4a50fff:e.repeat,e.delay<=0&&e.repeatCount>0)throw Error("TimerEvent infinite loop created via zero delay")}else e=new o(t);return this._pendingInsertion.push(e),e},delayedCall:function(t,e,i,n){return this.addEvent({delay:t,callback:e,args:i,callbackScope:n})},clearPendingEvents:function(){return this._pendingInsertion=[],this},removeEvent:function(t){Array.isArray(t)||(t=[t]);for(var e=0;e<t.length;e++){var i=t[e];a(this._pendingRemoval,i),a(this._pendingInsertion,i),a(this._active,i)}return this},removeAllEvents:function(){return this._pendingRemoval=this._pendingRemoval.concat(this._active),this},preUpdate:function(){var t,e,i=this._pendingRemoval.length,n=this._pendingInsertion.length;if(0!==i||0!==n){for(t=0;t<i;t++){e=this._pendingRemoval[t];var s=this._active.indexOf(e);s>-1&&this._active.splice(s,1),e.destroy()}for(t=0;t<n;t++)e=this._pendingInsertion[t],this._active.push(e);this._pendingRemoval.length=0,this._pendingInsertion.length=0}},update:function(t,e){if(this.now=t,!this.paused){e*=this.timeScale;for(var i=0;i<this._active.length;i++){var n=this._active[i];if(!n.paused&&(n.elapsed+=e*n.timeScale,n.elapsed>=n.delay)){var s=n.elapsed-n.delay;if(n.elapsed=n.delay,!n.hasDispatched&&n.callback&&(n.hasDispatched=!0,n.callback.apply(n.callbackScope,n.args)),n.repeatCount>0){if(n.repeatCount--,s>=n.delay)for(;s>=n.delay&&n.repeatCount>0;)n.callback&&n.callback.apply(n.callbackScope,n.args),s-=n.delay,n.repeatCount--;n.elapsed=s,n.hasDispatched=!1}else n.hasDispatched&&this._pendingRemoval.push(n)}}}},shutdown:function(){for(t=0;t<this._pendingInsertion.length;t++)this._pendingInsertion[t].destroy();for(t=0;t<this._active.length;t++)this._active[t].destroy();for(t=0;t<this._pendingRemoval.length;t++)this._pendingRemoval[t].destroy();this._active.length=0,this._pendingRemoval.length=0,this._pendingInsertion.length=0;var t,e=this.systems.events;e.off(r.PRE_UPDATE,this.preUpdate,this),e.off(r.UPDATE,this.update,this),e.off(r.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.scene.sys.events.off(r.START,this.start,this),this.scene=null,this.systems=null}});s.register("Clock",h,"time"),t.exports=h},96120(t,e,i){var n=i(83419),s=i(50792),r=i(39429),o=i(95540),a=i(44594),h=i(89809),l=new n({Extends:s,initialize:function(t,e){s.call(this),this.scene=t,this.systems=t.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 i=this.systems.events;i.on(a.PRE_UPDATE,this.preUpdate,this),i.on(a.UPDATE,this.update,this),i.once(a.SHUTDOWN,this.destroy,this),e&&this.add(e)},preUpdate:function(t,e){this.paused||(this.elapsed+=e*this.timeScale)},update:function(){if(!this.paused&&!this.complete){var t,e,i=this.events,n=!1,s=this.systems;for(t=0;t<i.length;t++){var r=i[t];if(!r.complete&&r.time<=this.elapsed){if(r.complete=!0,this.totalComplete++,e=r.target?r.target:this,r.if&&!r.if.call(e,r))continue;if(r.once&&(n=!0),r.set&&r.target)for(var o in r.set)r.target[o]=r.set[o];this.iteration&&r.repeat++,r.loop&&r.repeat&&r.loop.call(e),r.tween&&(r.tweenInstance=s.tweens.add(r.tween)),r.sound&&("string"==typeof r.sound?s.sound.play(r.sound):s.sound.play(r.sound.key,r.sound.config)),r.event&&this.emit(r.event,e),r.run&&r.run.call(e),r.stop&&this.stop()}}if(n)for(t=0;t<i.length;t++)i[t].complete&&i[t].once&&(i.splice(t,1),t--);var a=0;for(t=0;t<i.length;t++)!i[t].complete&&a++;0===a&&(i.length>0||this.totalComplete>0)&&(0!==this.loop&&(-1===this.loop||this.loop>this.iteration)?(this.iteration++,this.reset(!0)):this.complete=!0),this.complete&&this.emit(h.COMPLETE,this)}},play:function(t){return void 0===t&&(t=!0),this.paused=!1,this.complete=!1,this.totalComplete=0,t&&this.reset(),this},pause:function(){this.paused=!0;for(var t=this.events,e=0;e<t.length;e++){var i=t[e];i.tweenInstance&&(i.tweenInstance.paused=!0)}return this},repeat:function(t){return(void 0===t||!0===t)&&(t=-1),!1===t&&(t=0),this.loop=t,this},resume:function(){this.paused=!1;for(var t=this.events,e=0;e<t.length;e++){var i=t[e];i.tweenInstance&&(i.tweenInstance.paused=!1)}return this},stop:function(){return this.paused=!0,this.complete=!0,this},reset:function(t){void 0===t&&(t=!1),this.elapsed=0,t||(this.iteration=0);for(var e=this.events,i=0;i<e.length;i++){var n=e[i];n.complete=!1,t||(n.repeat=0),n.tweenInstance&&n.tweenInstance.stop()}return this.play(!1)},add:function(t){Array.isArray(t)||(t=[t]);var e=this.events,i=0;e.length>0&&(i=e[e.length-1].time);for(var n=0;n<t.length;n++){var s=t[n],r=o(s,"at",0),a=o(s,"in",null);null!==a&&(r=this.elapsed+a);var h=o(s,"from",null);null!==h&&(r=i+h),e.push({complete:!1,time:r,repeat:0,if:o(s,"if",null),run:o(s,"run",null),loop:o(s,"loop",null),event:o(s,"event",null),target:o(s,"target",null),set:o(s,"set",null),tween:o(s,"tween",null),sound:o(s,"sound",null),once:o(s,"once",!1),stop:o(s,"stop",!1)}),i=r}return this.complete=!1,this},clear:function(){for(var t=this.events,e=0;e<t.length;e++){var i=t[e];i.tweenInstance&&i.tweenInstance.stop()}return t.length=0,this.elapsed=0,this.paused=!0,this},isPlaying:function(){return!this.paused&&!this.complete},getProgress:function(){return Math.min(this.totalComplete,this.events.length)/this.events.length},destroy:function(){var t=this.systems.events;t.off(a.PRE_UPDATE,this.preUpdate,this),t.off(a.UPDATE,this.update,this),t.off(a.SHUTDOWN,this.destroy,this),this.clear(),this.scene=null,this.systems=null}});r.register("timeline",function(t){return new l(this.scene,t)}),t.exports=l},94880(t,e,i){var n=i(83419),s=i(95540);t.exports=new n({initialize:function(t){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(t)},reset:function(t){if(this.delay=s(t,"delay",0),this.repeat=s(t,"repeat",0),this.loop=s(t,"loop",!1),this.callback=s(t,"callback",void 0),this.callbackScope=s(t,"callbackScope",this),this.args=s(t,"args",[]),this.timeScale=s(t,"timeScale",1),this.startAt=s(t,"startAt",0),this.paused=s(t,"paused",!1),this.elapsed=this.startAt,this.hasDispatched=!1,this.repeatCount=-1===this.repeat||this.loop?0xe8d4a50fff:this.repeat,this.delay<=0&&this.repeatCount>0)throw Error("TimerEvent infinite loop created via zero delay");return this},getProgress:function(){return this.elapsed/this.delay},getOverallProgress:function(){if(!(this.repeat>0))return this.getProgress();var t=this.delay+this.delay*this.repeat;return(this.elapsed+this.delay*(this.repeat-this.repeatCount))/t},getRepeatCount:function(){return this.repeatCount},getElapsed:function(){return this.elapsed},getElapsedSeconds:function(){return .001*this.elapsed},getRemaining:function(){return this.delay-this.elapsed},getRemainingSeconds:function(){return .001*this.getRemaining()},getOverallRemaining:function(){return this.delay*(1+this.repeatCount)-this.elapsed},getOverallRemainingSeconds:function(){return .001*this.getOverallRemaining()},remove:function(t){void 0===t&&(t=!1),this.elapsed=this.delay,this.hasDispatched=!t,this.repeatCount=0},destroy:function(){this.callback=void 0,this.callbackScope=void 0,this.args=[]}})},35945(t){t.exports="complete"},89809(t,e,i){t.exports={COMPLETE:i(35945)}},90291(t,e,i){t.exports={Clock:i(33385),Events:i(89809),Timeline:i(96120),TimerEvent:i(94880)}},40382(t,e,i){var n=i(72905),s=i(83419),r=i(43491),o=i(88032),a=i(37277),h=i(44594),l=i(93109),u=i(8462),d=i(8357),c=i(43960),f=i(26012),p=new s({initialize:function(t){this.scene=t,this.events=t.sys.events,this.timeScale=1,this.paused=!1,this.processing=!1,this.tweens=[],this.time=0,this.startTime=0,this.nextTime=0,this.prevTime=0,this.maxLag=500,this.lagSkip=33,this.gap=1e3/240,this.events.once(h.BOOT,this.boot,this),this.events.on(h.START,this.start,this)},boot:function(){this.events.once(h.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(h.UPDATE,this.update,this),this.events.once(h.SHUTDOWN,this.shutdown,this)},create:function(t){Array.isArray(t)||(t=[t]);for(var e=[],i=0;i<t.length;i++){var n=t[i];n instanceof u||n instanceof c?e.push(n):Array.isArray(n.tweens)?e.push(f(this,n)):e.push(d(this,n))}return 1===e.length?e[0]:e},add:function(t){var e=t,i=this.tweens;return e instanceof u||e instanceof c||(e=Array.isArray(e.tweens)?f(this,e):d(this,e)),i.push(e.reset()),e},addMultiple:function(t){for(var e,i=[],n=this.tweens,s=0;s<t.length;s++)(e=t[s])instanceof u||e instanceof c||(e=Array.isArray(e.tweens)?f(this,e):d(this,e)),n.push(e.reset()),i.push(e);return i},chain:function(t){var e=f(this,t);return this.tweens.push(e.init()),e},getChainedTweens:function(t){return t.getChainedTweens()},has:function(t){return this.tweens.indexOf(t)>-1},existing:function(t){return this.has(t)||this.tweens.push(t.reset()),this},addCounter:function(t){var e=o(this,t);return this.tweens.push(e.reset()),e},stagger:function(t,e){return l(t,e)},setLagSmooth:function(t,e){return void 0===t&&(t=1/1e-8),void 0===e&&(e=0),this.maxLag=t,this.lagSkip=Math.min(e,this.maxLag),this},setFps:function(t){return void 0===t&&(t=240),this.gap=1e3/t,this.nextTime=1e3*this.time+this.gap,this},getDelta:function(t){var e=Date.now()-this.prevTime;e>this.maxLag&&(this.startTime+=e-this.lagSkip),this.prevTime+=e;var i=this.prevTime-this.startTime,n=i-this.nextTime,s=i-1e3*this.time;return n>0||t?(i/=1e3,this.time=i,this.nextTime+=n+(n>=this.gap?4:this.gap-n)):s=0,s},tick:function(){return this.step(!0),this},update:function(){this.paused||this.step(!1)},step:function(t){void 0===t&&(t=!1);var e,i,n=this.getDelta(t);if(!(n<=0)){this.processing=!0;var s=[],r=this.tweens;for(e=0;e<r.length;e++)(i=r[e]).update(n)&&s.push(i);var o=s.length;if(o&&r.length>0){for(e=0;e<o;e++){i=s[e];var a=r.indexOf(i);a>-1&&(i.isPendingRemove()||i.isDestroyed())&&(r.splice(a,1),i.destroy())}s.length=0}this.processing=!1}},remove:function(t){return this.processing?t.setPendingRemoveState():(n(this.tweens,t),t.setRemovedState()),this},reset:function(t){return this.existing(t),t.seek(),t.setActiveState(),this},makeActive:function(t){return this.existing(t),t.setActiveState(),this},each:function(t,e){var i,n=[null];for(i=1;i<arguments.length;i++)n.push(arguments[i]);return this.tweens.forEach(function(i){n[0]=i,t.apply(e,n)}),this},getTweens:function(){return this.tweens.slice()},getTweensOf:function(t){for(var e=[],i=this.tweens,n=(t=Array.isArray(t)?r(t):[t]).length,s=0;s<i.length;s++)for(var o=i[s],a=0;a<n;a++)!o.isDestroyed()&&o.hasTarget(t[a])&&e.push(o);return e},getGlobalTimeScale:function(){return this.timeScale},setGlobalTimeScale:function(t){return this.timeScale=t,this},isTweening:function(t){for(var e,i=this.tweens,n=0;n<i.length;n++)if((e=i[n]).isPlaying()&&e.hasTarget(t))return!0;return!1},killAll:function(){for(var t=this.processing?this.getTweens():this.tweens,e=0;e<t.length;e++)t[e].destroy();return this.processing||(t.length=0),this},killTweensOf:function(t){for(var e=this.getTweensOf(t),i=0;i<e.length;i++)e[i].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(h.UPDATE,this.update,this),this.events.off(h.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(h.START,this.start,this),this.scene=null,this.events=null}});a.register("TweenManager",p,"tweens"),t.exports=p},57355(t){t.exports=function(t,e,i){return t&&t.hasOwnProperty(e)?t[e]:i}},6113(t,e,i){var n=i(62640),s=i(35355);t.exports=function(t,e){var i=n.Power0;if("string"==typeof t)if(n.hasOwnProperty(t))i=n[t];else{var r="";if(t.indexOf(".")){var o=(r=t.substring(t.indexOf(".")+1)).toLowerCase();"in"===o?r="easeIn":"out"===o?r="easeOut":"inout"===o&&(r="easeInOut")}t=s(t.substring(0,t.indexOf(".")+1)+r),n.hasOwnProperty(t)&&(i=n[t])}else"function"==typeof t&&(i=t);if(!e)return i;var a=e.slice(0);return a.unshift(0),function(t){return a[0]=t,i.apply(this,a)}}},91389(t,e,i){var n=i(89318),s=i(77259),r={bezier:n,catmull:s,catmullrom:s,linear:i(28392)};t.exports=function(t){if(null===t)return null;var e=r.linear;return"string"==typeof t?r.hasOwnProperty(t)&&(e=r[t]):"function"==typeof t&&(e=t),e}},55292(t){t.exports=function(t,e,i){return t.hasOwnProperty(e)?"function"==typeof t[e]?function(i,n,s,r,o,a){return t[e](i,n,s,r,o,a)}:function(){return t[e]}:"function"==typeof i?i:function(){return i}}},82985(t,e,i){var n=i(81076);t.exports=function(t){var e,i=[];if(t.hasOwnProperty("props"))for(e in t.props)"_"!==e.substring(0,1)&&i.push({key:e,value:t.props[e]});else for(e in t)-1===n.indexOf(e)&&"_"!==e.substring(0,1)&&i.push({key:e,value:t[e]});return i}},62329(t,e,i){var n=i(35154);t.exports=function(t){var e=n(t,"targets",null);return null===e||("function"==typeof e&&(e=e.call()),Array.isArray(e)||(e=[e])),e}},17777(t,e,i){var n=i(30976),s=i(99472);function r(t){return!!t.getActive&&"function"==typeof t.getActive}function o(t){return!!t.getStart&&"function"==typeof t.getStart}function a(t){return!!t.getEnd&&"function"==typeof t.getEnd}var h=function(t,e){var i,l=function(t,e,i){return i},u=function(t,e,i){return i},d=null,c=typeof e;if("number"===c)l=function(){return e};else if(Array.isArray(e))u=function(){return e[0]},l=function(){return e[e.length-1]};else if("string"===c){var f=e.toLowerCase(),p="random"===f.substring(0,6),g="int"===f.substring(0,3);if(p||g){var m=f.indexOf("("),v=f.indexOf(")"),x=f.indexOf(",");if(m&&v&&x){var y=parseFloat(f.substring(m+1,x)),T=parseFloat(f.substring(x+1,v));l=p?function(){return s(y,T)}:function(){return n(y,T)}}else throw Error("invalid random() format")}else{f=f[0];var w=parseFloat(e.substr(2));switch(f){case"+":l=function(t,e,i){return i+w};break;case"-":l=function(t,e,i){return i-w};break;case"*":l=function(t,e,i){return i*w};break;case"/":l=function(t,e,i){return i/w};break;default:l=function(){return parseFloat(e)}}}}else if("function"===c)l=e;else if("object"===c)if(o(e)||a(e)||r(e))r(e)&&(d=e.getActive),a(e)&&(l=e.getEnd),o(e)&&(u=e.getStart);else if(e.hasOwnProperty("value"))i=h(t,e.value);else{var b=e.hasOwnProperty("to"),S=e.hasOwnProperty("from"),C=e.hasOwnProperty("start");if(b&&(S||C)){if(i=h(t,e.to),C){var E=h(t,e.start);i.getActive=E.getEnd}if(S){var A=h(t,e.from);i.getStart=A.getEnd}}}return i||(i={getActive:d,getEnd:l,getStart:u}),i};t.exports=h},88032(t,e,i){var n=i(70402),s=i(69902),r=i(23568),o=i(57355),a=i(6113),h=i(95540),l=i(55292),u=i(35154),d=i(17777),c=i(269),f=i(8462);t.exports=function(t,e,i){if(e instanceof f)return e.parent=t,e;i=void 0===i?s:c(s,i);var p=h(e,"from",0),g=h(e,"to",1),m=h(e,"delay",i.delay),v=h(e,"easeParams",i.easeParams),x=h(e,"ease",i.ease),y=d("value",g),T=new f(t,[{value:p}]),w=T.add(0,"value",y.getEnd,y.getStart,y.getActive,a(h(e,"ease",x),h(e,"easeParams",v)),l(e,"delay",m),h(e,"duration",i.duration),o(e,"yoyo",i.yoyo),h(e,"hold",i.hold),h(e,"repeat",i.repeat),h(e,"repeatDelay",i.repeatDelay),!1,!1);w.start=p,w.current=p,T.completeDelay=r(e,"completeDelay",0),T.loop=Math.round(r(e,"loop",0)),T.loopDelay=Math.round(r(e,"loopDelay",0)),T.paused=o(e,"paused",!1),T.persist=o(e,"persist",!1),T.isNumberTween=!0,T.callbackScope=u(e,"callbackScope",T);for(var b=n.TYPES,S=0;S<b.length;S++){var C=b[S],E=u(e,C,!1);if(E){var A=u(e,C+"Params",[]);T.setCallback(C,E,A)}}return T}},93109(t,e,i){var n=i(6113),s=i(35154),r=i(36383);t.exports=function(t,e){void 0===e&&(e={});var i=s(e,"start",0),o=s(e,"ease",null),a=s(e,"grid",null),h=s(e,"from",0),l="first"===h,u="center"===h,d="last"===h,c="number"==typeof h,f=Array.isArray(t),p=f?parseFloat(t[0]):parseFloat(t),g=f?parseFloat(t[1]):0,m=Math.max(p,g);if(f&&(i+=p),a){var v=a[0],x=a[1],y=0,T=0,w=0,b=0,S=[];d?(y=v-1,T=x-1):c?(y=h%v,T=Math.floor(h/v)):u&&(y=(v-1)/2,T=(x-1)/2);for(var C=r.MIN_SAFE_INTEGER,E=0;E<x;E++){S[E]=[];for(var A=0;A<v;A++){var _=Math.sqrt((w=y-A)*w+(b=T-E)*b);_>C&&(C=_),S[E][A]=_}}}var M=o?n(o):null;return a?function(t,e,n,s){var r,o=0,a=s%v,h=Math.floor(s/v);if(a>=0&&a<v&&h>=0&&h<x&&(o=S[h][a]),f){var l=g-p;r=M?o/C*l*M(o/C):o/C*l}else r=M?o*p*M(o/C):o*p;return r+i}:function(t,e,n,s,r){var o,a,v;return r--,l?o=s:u?o=Math.abs(r/2-s):d?o=r-s:c&&(o=Math.abs(h-s)),f?(v=u?(g-p)/r*(2*o):(g-p)/r*o,a=M?v*M(o/r):v):a=M?r*m*M(o/r):o*p,a+i}}},8357(t,e,i){var n=i(70402),s=i(69902),r=i(23568),o=i(57355),a=i(6113),h=i(95540),l=i(91389),u=i(55292),d=i(82985),c=i(62329),f=i(35154),p=i(17777),g=i(269),m=i(8462);t.exports=function(t,e,i){if(e instanceof m)return e.parent=t,e;i=void 0===i?s:g(s,i);var v=c(e);!v&&i.targets&&(v=i.targets);for(var x=d(e),y=h(e,"delay",i.delay),T=h(e,"duration",i.duration),w=h(e,"easeParams",i.easeParams),b=h(e,"ease",i.ease),S=h(e,"hold",i.hold),C=h(e,"repeat",i.repeat),E=h(e,"repeatDelay",i.repeatDelay),A=o(e,"yoyo",i.yoyo),_=o(e,"flipX",i.flipX),M=o(e,"flipY",i.flipY),R=h(e,"interpolation",i.interpolation),O=function(t,e,i,n){if("texture"===i){var s=n,r=void 0;Array.isArray(n)?(s=n[0],r=n[1]):n.hasOwnProperty("value")?(s=n.value,Array.isArray(n.value)?(s=n.value[0],r=n.value[1]):"string"==typeof n.value&&(s=n.value)):"string"==typeof n&&(s=n),t.addFrame(e,s,r,u(n,"delay",y),h(n,"duration",T),h(n,"hold",S),h(n,"repeat",C),h(n,"repeatDelay",E),o(n,"flipX",_),o(n,"flipY",M))}else{var d=p(i,n),c=l(h(n,"interpolation",R));t.add(e,i,d.getEnd,d.getStart,d.getActive,a(h(n,"ease",b),h(n,"easeParams",w)),u(n,"delay",y),h(n,"duration",T),o(n,"yoyo",A),h(n,"hold",S),h(n,"repeat",C),h(n,"repeatDelay",E),o(n,"flipX",_),o(n,"flipY",M),c,c?n:null)}},P=new m(t,v),L=0;L<x.length;L++)for(var D=x[L].key,F=x[L].value,I=0;I<v.length;I++)v[I]&&("scale"!==D||v[I].hasOwnProperty("scale")?O(P,I,D,F):(O(P,I,"scaleX",F),O(P,I,"scaleY",F)));P.completeDelay=r(e,"completeDelay",0),P.loop=Math.round(r(e,"loop",0)),P.loopDelay=Math.round(r(e,"loopDelay",0)),P.paused=o(e,"paused",!1),P.persist=o(e,"persist",!1),P.callbackScope=h(e,"callbackScope",P);for(var N=n.TYPES,B=0;B<N.length;B++){var k=N[B],U=f(e,k,!1);if(U){var z=f(e,k+"Params",[]);P.setCallback(k,U,z)}}return P}},26012(t,e,i){var n=i(70402),s=i(23568),r=i(57355),o=i(62329),a=i(35154),h=i(8357),l=i(43960);t.exports=function(t,e){if(e instanceof l)return e.parent=t,e;var i,u=new l(t);u.startDelay=a(e,"delay",0),u.completeDelay=s(e,"completeDelay",0),u.loop=Math.round(s(e,"loop",a(e,"repeat",0))),u.loopDelay=Math.round(s(e,"loopDelay",a(e,"repeatDelay",0))),u.paused=r(e,"paused",!1),u.persist=r(e,"persist",!1),u.callbackScope=a(e,"callbackScope",u);var d=n.TYPES;for(i=0;i<d.length;i++){var c=d[i],f=a(e,c,!1);if(f){var p=a(e,c+"Params",[]);u.setCallback(c,f,p)}}var g=a(e,"tweens",null);if(Array.isArray(g)){var m=[],v=o(e),x=void 0;for(v&&(x={targets:v}),i=0;i<g.length;i++)m.push(h(u,g[i],x));u.add(m)}return u}},30231(t,e,i){t.exports={GetBoolean:i(57355),GetEaseFunction:i(6113),GetInterpolationFunction:i(91389),GetNewValue:i(55292),GetProps:i(82985),GetTargets:i(62329),GetValueOp:i(17777),NumberTweenBuilder:i(88032),StaggerBuilder:i(93109),TweenBuilder:i(8357)}},73685(t){t.exports="active"},98540(t){t.exports="complete"},67233(t){t.exports="loop"},2859(t){t.exports="pause"},98336(t){t.exports="repeat"},25764(t){t.exports="resume"},32193(t){t.exports="start"},84371(t){t.exports="stop"},70766(t){t.exports="update"},55659(t){t.exports="yoyo"},842(t,e,i){t.exports={TWEEN_ACTIVE:i(73685),TWEEN_COMPLETE:i(98540),TWEEN_LOOP:i(67233),TWEEN_PAUSE:i(2859),TWEEN_RESUME:i(25764),TWEEN_REPEAT:i(98336),TWEEN_START:i(32193),TWEEN_STOP:i(84371),TWEEN_UPDATE:i(70766),TWEEN_YOYO:i(55659)}},43066(t,e,i){t.exports={States:i(86353),Builders:i(30231),Events:i(842),TweenManager:i(40382),Tween:i(8462),TweenData:i(48177),TweenFrameData:i(42220),BaseTween:i(70402),TweenChain:i(43960)}},70402(t,e,i){var n=i(83419),s=i(50792),r=i(842),o=i(86353),a=new n({Extends:s,initialize:function(t){s.call(this),this.parent=t,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=o.PENDING,this.paused=!1,this.callbacks={onActive:null,onComplete:null,onLoop:null,onPause:null,onRepeat:null,onResume:null,onStart:null,onStop:null,onUpdate:null,onYoyo:null},this.callbackScope,this.persist=!1},setTimeScale:function(t){return this.timeScale=t,this},getTimeScale:function(){return this.timeScale},isPlaying:function(){return!this.paused&&this.isActive()},isPaused:function(){return this.paused},pause:function(){return this.paused||(this.paused=!0,this.dispatchEvent(r.TWEEN_PAUSE,"onPause")),this},resume:function(){return this.paused&&(this.paused=!1,this.dispatchEvent(r.TWEEN_RESUME,"onResume")),this},makeActive:function(){this.parent.makeActive(this),this.dispatchEvent(r.TWEEN_ACTIVE,"onActive")},onCompleteHandler:function(){this.setPendingRemoveState(),this.dispatchEvent(r.TWEEN_COMPLETE,"onComplete")},complete:function(t){return void 0===t&&(t=0),t?(this.setCompleteDelayState(),this.countdown=t):this.onCompleteHandler(),this},completeAfterLoop:function(t){return void 0===t&&(t=0),this.loopCounter>t&&(this.loopCounter=t),this},remove:function(){return this.parent&&this.parent.remove(this),this},stop:function(){return!this.parent||this.isRemoved()||this.isPendingRemove()||this.isDestroyed()||(this.dispatchEvent(r.TWEEN_STOP,"onStop"),this.setPendingRemoveState()),this},updateLoopCountdown:function(t){this.countdown-=t,this.countdown<=0&&(this.setActiveState(),this.dispatchEvent(r.TWEEN_LOOP,"onLoop"))},updateStartCountdown:function(t){return this.countdown-=t,this.countdown<=0&&(this.hasStarted=!0,this.setActiveState(),this.dispatchEvent(r.TWEEN_START,"onStart"),t=0),t},updateCompleteDelay:function(t){this.countdown-=t,this.countdown<=0&&this.onCompleteHandler()},setCallback:function(t,e,i){return void 0===i&&(i=[]),this.callbacks.hasOwnProperty(t)&&(this.callbacks[t]={func:e,params:i}),this},setPendingState:function(){this.state=o.PENDING},setActiveState:function(){this.state=o.ACTIVE,this.hasStarted=!1},setLoopDelayState:function(){this.state=o.LOOP_DELAY},setCompleteDelayState:function(){this.state=o.COMPLETE_DELAY},setStartDelayState:function(){this.state=o.START_DELAY,this.countdown=this.startDelay,this.hasStarted=!1},setPendingRemoveState:function(){this.state=o.PENDING_REMOVE},setRemovedState:function(){this.state=o.REMOVED},setFinishedState:function(){this.state=o.FINISHED},setDestroyedState:function(){this.state=o.DESTROYED},isPending:function(){return this.state===o.PENDING},isActive:function(){return this.state===o.ACTIVE},isLoopDelayed:function(){return this.state===o.LOOP_DELAY},isCompleteDelayed:function(){return this.state===o.COMPLETE_DELAY},isStartDelayed:function(){return this.state===o.START_DELAY},isPendingRemove:function(){return this.state===o.PENDING_REMOVE},isRemoved:function(){return this.state===o.REMOVED},isFinished:function(){return this.state===o.FINISHED},isDestroyed:function(){return this.state===o.DESTROYED},destroy:function(){this.data&&this.data.forEach(function(t){t.destroy()}),this.removeAllListeners(),this.callbacks=null,this.data=null,this.parent=null,this.setDestroyedState()}});a.TYPES=["onActive","onComplete","onLoop","onPause","onRepeat","onResume","onStart","onStop","onUpdate","onYoyo"],t.exports=a},95042(t,e,i){var n=i(83419),s=i(842),r=i(86353);t.exports=new n({initialize:function(t,e,i,n,s,r,o,a,h,l){this.tween=t,this.targetIndex=e,this.duration=n<=0?.01:n,this.totalDuration=0,this.delay=0,this.getDelay=i,this.yoyo=s,this.hold=r,this.repeat=o,this.repeatDelay=a,this.repeatCounter=0,this.flipX=h,this.flipY=l,this.progress=0,this.elapsed=0,this.state=0,this.isCountdown=!1},getTarget:function(){return this.tween.targets[this.targetIndex]},setTargetValue:function(t){void 0===t&&(t=this.current),this.tween.targets[this.targetIndex][this.key]=t},setCreatedState:function(){this.state=r.CREATED,this.isCountdown=!1},setDelayState:function(){this.state=r.DELAY,this.isCountdown=!0},setPendingRenderState:function(){this.state=r.PENDING_RENDER,this.isCountdown=!1},setPlayingForwardState:function(){this.state=r.PLAYING_FORWARD,this.isCountdown=!1},setPlayingBackwardState:function(){this.state=r.PLAYING_BACKWARD,this.isCountdown=!1},setHoldState:function(){this.state=r.HOLD_DELAY,this.isCountdown=!0},setRepeatState:function(){this.state=r.REPEAT_DELAY,this.isCountdown=!0},setCompleteState:function(){this.state=r.COMPLETE,this.isCountdown=!1},isCreated:function(){return this.state===r.CREATED},isDelayed:function(){return this.state===r.DELAY},isPendingRender:function(){return this.state===r.PENDING_RENDER},isPlayingForward:function(){return this.state===r.PLAYING_FORWARD},isPlayingBackward:function(){return this.state===r.PLAYING_BACKWARD},isHolding:function(){return this.state===r.HOLD_DELAY},isRepeating:function(){return this.state===r.REPEAT_DELAY},isComplete:function(){return this.state===r.COMPLETE},setStateFromEnd:function(t){this.yoyo?this.onRepeat(t,!0,!0):this.repeatCounter>0?this.onRepeat(t,!0,!1):this.setCompleteState()},setStateFromStart:function(t){this.repeatCounter>0?this.onRepeat(t,!1):this.setCompleteState()},reset:function(){var t=this.tween,e=t.totalTargets,i=this.targetIndex,n=t.targets[i],s=this.key;this.progress=0,this.elapsed=0,this.delay=this.getDelay(n,s,0,i,e,t),this.repeatCounter=-1===this.repeat?r.MAX:this.repeat,this.setPendingRenderState();var o=this.duration+this.hold;this.yoyo&&(o+=this.duration);var a=o+this.repeatDelay;this.totalDuration=this.delay+o,-1===this.repeat?(this.totalDuration+=a*r.MAX,t.isInfinite=!0):this.repeat>0&&(this.totalDuration+=a*this.repeat),this.totalDuration>t.duration&&(t.duration=this.totalDuration),this.delay<t.startDelay&&(t.startDelay=this.delay),this.delay>0&&(this.elapsed=this.delay,this.setDelayState())}
1,onRepeat:function(t,e,i){var n=this.tween,r=n.totalTargets,o=this.targetIndex,a=n.targets[o],h=this.key,l="texture"!==h;if(this.elapsed=t,this.progress=t/this.duration,this.flipX&&a.toggleFlipX(),this.flipY&&a.toggleFlipY(),l&&(e||i)&&(this.start=this.getStartValue(a,h,this.start,o,r,n)),i){this.setPlayingBackwardState(),this.dispatchEvent(s.TWEEN_YOYO,"onYoyo");return}this.repeatCounter--,l&&(this.end=this.getEndValue(a,h,this.start,o,r,n)),this.repeatDelay>0?(this.elapsed=this.repeatDelay-t,l&&(this.current=this.start,a[h]=this.current),this.setRepeatState()):(this.setPlayingForwardState(),this.dispatchEvent(s.TWEEN_REPEAT,"onRepeat"))},destroy:function(){this.tween=null,this.getDelay=null,this.setCompleteState()}})},69902(t){t.exports={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}},81076(t){t.exports=["callbackScope","completeDelay","delay","duration","ease","easeParams","flipX","flipY","hold","interpolation","loop","loopDelay","onActive","onActiveParams","onComplete","onCompleteParams","onLoop","onLoopParams","onPause","onPauseParams","onRepeat","onRepeatParams","onResume","onResumeParams","onStart","onStartParams","onStop","onStopParams","onUpdate","onUpdateParams","onYoyo","onYoyoParams","paused","persist","props","repeat","repeatDelay","targets","yoyo"]},8462(t,e,i){var n=i(70402),s=i(83419),r=i(842),o=i(44603),a=i(39429),h=i(36383),l=i(86353),u=i(48177),d=i(42220),c=new s({Extends:n,initialize:function(t,e){n.call(this,t),this.targets=e,this.totalTargets=e.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(t,e,i,n,s,r,o,a,h,l,d,c,f,p,g,m){var v=new u(this,t,e,i,n,s,r,o,a,h,l,d,c,f,p,g,m);return this.totalData=this.data.push(v),v},addFrame:function(t,e,i,n,s,r,o,a,h,l){var u=new d(this,t,e,i,n,s,r,o,a,h,l);return this.totalData=this.data.push(u),u},getValue:function(t){void 0===t&&(t=0);var e=null;return this.data&&(e=this.data[t].current),e},hasTarget:function(t){return this.targets&&-1!==this.targets.indexOf(t)},updateTo:function(t,e,i){if(void 0===i&&(i=!1),"texture"!==t)for(var n=0;n<this.totalData;n++){var s=this.data[n];s.key===t&&(s.isPlayingForward()||s.isPlayingBackward())&&(s.end=e,i&&(s.start=s.current))}return this},restart:function(){switch(this.state){case l.REMOVED:case l.FINISHED:this.seek(),this.parent.makeActive(this);break;case l.PENDING:case l.PENDING_REMOVE:this.parent.reset(this);break;case l.DESTROYED:console.warn("Cannot restart destroyed Tween",this);break;default:this.seek()}return this.paused=!1,this.hasStarted=!1,this},nextState:function(){if(this.loopCounter>0)this.elapsed=0,this.progress=0,this.loopCounter--,this.initTweenData(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.setLoopDelayState()):(this.setActiveState(),this.dispatchEvent(r.TWEEN_LOOP,"onLoop"));else{if(!(this.completeDelay>0))return this.onCompleteHandler(),!0;this.countdown=this.completeDelay,this.setCompleteDelayState()}return!1},onCompleteHandler:function(){this.progress=1,this.totalProgress=1,n.prototype.onCompleteHandler.call(this)},play:function(){return this.isDestroyed()?console.warn("Cannot play destroyed Tween",this):((this.isPendingRemove()||this.isFinished())&&this.seek(),this.paused=!1,this.setActiveState()),this},seek:function(t,e,i){if(void 0===t&&(t=0),void 0===e&&(e=16.6),void 0===i&&(i=!1),this.isDestroyed())return console.warn("Cannot seek destroyed Tween",this),this;i||(this.isSeeking=!0),this.reset(!0),this.initTweenData(!0),this.setActiveState(),this.dispatchEvent(r.TWEEN_ACTIVE,"onActive");var n=this.paused;if(this.paused=!1,t>0){for(var s=Math.floor(t/e),o=t-s*e,a=0;a<s;a++)this.update(e);o>0&&this.update(o)}return this.paused=n,this.isSeeking=!1,this},initTweenData:function(t){void 0===t&&(t=!1),this.duration=0,this.startDelay=h.MAX_SAFE_INTEGER;for(var e=this.data,i=0;i<this.totalData;i++)e[i].reset(t);this.duration=Math.max(this.duration,.01);var n=this.duration,s=this.completeDelay,r=this.loopCounter,o=this.loopDelay;r>0?this.totalDuration=n+s+(n+o)*r:this.totalDuration=n+s},reset:function(t){return void 0===t&&(t=!1),this.elapsed=0,this.totalElapsed=0,this.progress=0,this.totalProgress=0,this.loopCounter=this.loop,-1===this.loop&&(this.isInfinite=!0,this.loopCounter=l.MAX),t||(this.initTweenData(),this.setActiveState(),this.dispatchEvent(r.TWEEN_ACTIVE,"onActive")),this},update:function(t){if(this.isPendingRemove()||this.isDestroyed())return!this.persist||(this.setFinishedState(),!1);if(this.paused||this.isFinished())return!1;if(t*=this.timeScale*this.parent.timeScale,this.isLoopDelayed())return this.updateLoopCountdown(t),!1;if(this.isCompleteDelayed())return this.updateCompleteDelay(t),!1;!this.hasStarted&&(this.startDelay-=t,this.startDelay<=0&&(this.hasStarted=!0,this.dispatchEvent(r.TWEEN_START,"onStart"),t=0));var e=!1;if(this.isActive())for(var i=this.data,n=0;n<this.totalData;n++)i[n].update(t)&&(e=!0);this.elapsed+=t,this.progress=Math.min(this.elapsed/this.duration,1),this.totalElapsed+=t,this.totalProgress=Math.min(this.totalElapsed/this.totalDuration,1),e||this.nextState();var s=this.isPendingRemove();return s&&this.persist&&(this.setFinishedState(),s=!1),s},forward:function(t){return this.update(t),this},rewind:function(t){return this.update(-t),this}
vendor: 5,827 bytes, line 1
1,dispatchEvent:function(t,e){if(!this.isSeeking&&(this.emit(t,this,this.targets),this.callbacks)){var i=this.callbacks[e];i&&i.func.apply(this.callbackScope,[this,this.targets].concat(i.params))}},destroy:function(){n.prototype.destroy.call(this),this.targets=null}});a.register("tween",function(t){return this.scene.sys.tweens.add(t)}),o.register("tween",function(t){return this.scene.sys.tweens.create(t)}),t.exports=c},43960(t,e,i){var n=i(72905),s=i(70402),r=i(83419),o=i(842),a=i(44603),h=i(39429),l=i(86353),u=new r({Extends:s,initialize:function(t){s.call(this,t),this.currentTween=null,this.currentIndex=0},init:function(){return this.loopCounter=-1===this.loop?l.MAX:this.loop,this.setCurrentTween(0),this.startDelay>0&&!this.isStartDelayed()?this.setStartDelayState():this.setActiveState(),this},add:function(t){var e=this.parent.create(t);Array.isArray(e)||(e=[e]);for(var i=this.data,n=0;n<e.length;n++){var s=e[n];s.parent=this,i.push(s.reset())}return this.totalData=i.length,this},remove:function(t){return n(this.data,t),t.setRemovedState(),t===this.currentTween&&this.nextTween(),this.totalData=this.data.length,this},hasTarget:function(t){for(var e=this.data,i=0;i<this.totalData;i++)if(e[i].hasTarget(t))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(t){return t.seek(),t.setActiveState(),this},makeActive:function(t){return t.reset(),t.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(o.TWEEN_LOOP,"onLoop"));else{if(!(this.completeDelay>0))return this.onCompleteHandler(),!0;this.countdown=this.completeDelay,this.setCompleteDelayState()}return!1},play:function(){return this.isDestroyed()?console.warn("Cannot play destroyed TweenChain",this):((this.isPendingRemove()||this.isPending())&&this.resetTweens(),this.paused=!1,this.startDelay>0&&!this.isStartDelayed()?this.setStartDelayState():this.setActiveState()),this},resetTweens:function(){for(var t=this.data,e=this.totalData,i=0;i<e;i++)t[i].reset(!1);this.setCurrentTween(0)},update:function(t){if(this.isPendingRemove()||this.isDestroyed())return!this.persist||(this.setFinishedState(),!1);if(this.isFinished()||this.paused)return!1;if(t*=this.parent.timeScale,this.isLoopDelayed())return this.updateLoopCountdown(t),!1;if(this.isCompleteDelayed())return this.updateCompleteDelay(t),!1;!this.hasStarted&&(this.startDelay-=t,this.startDelay<=0&&(this.hasStarted=!0,this.dispatchEvent(o.TWEEN_START,"onStart"),t=0));var e=!1;return this.isActive()&&this.currentTween&&(this.currentTween.update(t)&&this.nextTween()&&this.nextState(),(e=this.isPendingRemove())&&this.persist&&(this.setFinishedState(),e=!1)),e},nextTween:function(){return this.currentIndex++,this.currentIndex===this.totalData||(this.setCurrentTween(this.currentIndex),!1)},setCurrentTween:function(t){this.currentIndex=t,this.currentTween=this.data[t],this.currentTween.setActiveState()},dispatchEvent:function(t,e){this.emit(t,this);var i=this.callbacks[e];i&&i.func.apply(this.callbackScope,[this].concat(i.params))},destroy:function(){s.prototype.destroy.call(this),this.currentTween=null}});h.register("tweenchain",function(t){return this.scene.sys.tweens.chain(t)}),a.register("tweenchain",function(t){return this.scene.sys.tweens.create(t)}),t.exports=u},48177(t,e,i){var n=i(95042),s=i(45319),r=i(83419),o=i(842);t.exports=new r({Extends:n,initialize:function(t,e,i,s,r,o,a,h,l,u,d,c,f,p,g,m,v){n.call(this,t,e,h,l,u,d,c,f,p,g),this.key=i,this.getActiveValue=o,this.getEndValue=s,this.getStartValue=r,this.ease=a,this.start=0,this.previous=0,this.current=0,this.end=0,this.interpolation=m,this.interpolationData=v},reset:function(t){n.prototype.reset.call(this);var e=this.tween.targets[this.targetIndex],i=this.key;t&&(e[i]=this.start),this.start=0,this.previous=0,this.current=0,this.end=0,this.getActiveValue&&(e[i]=this.getActiveValue(e,i,0))},update:function(t){var e=this.tween,i=e.totalTargets,n=this.targetIndex,r=e.targets[n],a=this.key;if(!r||r.isDestroyed)return this.setCompleteState(),!1;if(this.isCountdown&&(this.elapsed-=t,this.elapsed<=0&&(this.elapsed=0,t=0,this.isDelayed()?this.setPendingRenderState():this.isRepeating()?(this.setPlayingForwardState(),this.dispatchEvent(o.TWEEN_REPEAT,"onRepeat")):this.isHolding()&&this.setStateFromEnd(0))),this.isPendingRender())return this.start=this.getStartValue(r,a,r[a],n,i,e),this.end=this.getEndValue(r,a,this.start,n,i,e),this.current=this.start,r[a]=this.start,this.setPlayingForwardState(),!0;var h=this.isPlayingForward(),l=this.isPlayingBackward();if(h||l){var u=this.elapsed,d=this.duration,c=0,f=!1;(u+=t)>=d?(c=u-d,u=d,f=!0):u<0&&(u=0);var p=s(u/d,0,1);this.elapsed=u,this.progress=p,this.previous=this.current,h||(p=1-p);var g=this.ease(p);this.interpolation?this.current=this.interpolation(this.interpolationData,g):this.current=this.start+(this.end-this.start)*g,r[a]=this.current,f&&(h?(e.isNumberTween&&(this.current=this.end,r[a]=this.current),this.hold>0?(this.elapsed=this.hold,this.setHoldState()):this.setStateFromEnd(c)):(e.isNumberTween&&(this.current=this.start,r[a]=this.current),this.setStateFromStart(c))),this.dispatchEvent(o.TWEEN_UPDATE,"onUpdate")}return!this.isComplete()},dispatchEvent:function(t,e){var i=this.tween;if(!i.isSeeking){var n=i.targets[this.targetIndex],s=this.key,r=this.current,o=this.previous;i.emit(t,i,s,n,r,o);var a=i.callbacks[e];a&&a.func.apply(i.callbackScope,[i,n,s,r,o].concat(a.params))}},destroy:function(){n.prototype.destroy.call(this),this.getActiveValue=null,this.getEndValue=null,this.get
1StartValue=null,this.ease=null}})},42220(t,e,i){var n=i(95042),s=i(45319),r=i(83419),o=i(842);t.exports=new r({Extends:n,initialize:function(t,e,i,s,r,o,a,h,l,u,d){n.call(this,t,e,r,o,!1,a,h,l,u,d),this.key="texture",this.startTexture=null,this.endTexture=i,this.startFrame=null,this.endFrame=s,this.yoyo=0!==h},reset:function(t){n.prototype.reset.call(this);var e=this.tween.targets[this.targetIndex];this.startTexture||(this.startTexture=e.texture.key,this.startFrame=e.frame.name),t&&e.setTexture(this.startTexture,this.startFrame)},update:function(t){var e=this.tween,i=this.targetIndex,n=e.targets[i];if(!n)return this.setCompleteState(),!1;if(this.isCountdown&&(this.elapsed-=t,this.elapsed<=0&&(this.elapsed=0,t=0,this.isDelayed()?this.setPendingRenderState():this.isRepeating()?(this.setPlayingForwardState(),this.dispatchEvent(o.TWEEN_REPEAT,"onRepeat")):this.isHolding()&&this.setStateFromEnd(0))),this.isPendingRender())return this.startTexture&&n.setTexture(this.startTexture,this.startFrame),this.setPlayingForwardState(),!0;var r=this.isPlayingForward(),a=this.isPlayingBackward();if(r||a){var h=this.elapsed,l=this.duration,u=0,d=!1;(h+=t)>=l?(u=h-l,h=l,d=!0):h<0&&(h=0);var c=s(h/l,0,1);this.elapsed=h,this.progress=c,d&&(r?(n.setTexture(this.endTexture,this.endFrame),this.hold>0?(this.elapsed=this.hold,this.setHoldState()):this.setStateFromEnd(u)):(n.setTexture(this.startTexture,this.startFrame),this.setStateFromStart(u))),this.dispatchEvent(o.TWEEN_UPDATE,"onUpdate")}return!this.isComplete()},dispatchEvent:function(t,e){var i=this.tween;if(!i.isSeeking){var n=i.targets[this.targetIndex],s=this.key;i.emit(t,i,s,n);var r=i.callbacks[e];r&&r.func.apply(i.callbackScope,[i,n,s].concat(r.params))}},destroy:function(){n.prototype.destroy.call(this),this.startTexture=null,this.endTexture=null,this.startFrame=null,this.endFrame=null}})},86353(t){t.exports={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:0xe8d4a50fff}},83419(t){function e(t,e,i,s){for(var r in e)if(e.hasOwnProperty(r)){var o=function(t,e,i){var n,s=i?t[e]:Object.getOwnPropertyDescriptor(t,e);return!i&&s.value&&"object"==typeof s.value&&(s=s.value),!!s&&(!!(n=s).get&&"function"==typeof n.get||!!n.set&&"function"==typeof n.set)&&(void 0===s.enumerable&&(s.enumerable=!0),void 0===s.configurable&&(s.configurable=!0),s)}(e,r,i);if(!1!==o){if(function(t,e){var i=Object.getOwnPropertyDescriptor(t,e);return!!i&&(i.value&&"object"==typeof i.value&&(i=i.value),!1===i.configurable)}((s||t).prototype,r)){if(n.ignoreFinals)continue;throw Error("cannot override final property '"+r+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(t.prototype,r,o)}else t.prototype[r]=e[r]}}function i(t,i){if(i){Array.isArray(i)||(i=[i]);for(var n=0;n<i.length;n++)e(t,i[n].prototype||i[n])}}function n(t){if(t||(t={}),t.initialize){if("function"!=typeof t.initialize)throw Error("initialize must be a function");n=t.initialize,delete t.initialize}else if(t.Extends){var n,s,r=t.Extends;n=function(){r.apply(this,arguments)}}else n=function(){};t.Extends?(n.prototype=Object.create(t.Extends.prototype),n.prototype.constructor=n,s=t.Extends,delete t.Extends):n.prototype.constructor=n;var o=null;return t.Mixins&&(o=t.Mixins,delete t.Mixins),i(n,o),e(n,t,!0,s),n}n.extend=e,n.mixin=i,n.ignoreFinals=!1,t.exports=n},29747(t){t.exports=function(){}},20242(t){t.exports=function(){return null}},71146(t){t.exports=function(t,e,i,n,s){if(void 0===s&&(s=t),i>0){var r=i-t.length;if(r<=0)return null}if(!Array.isArray(e))if(-1===t.indexOf(e))return t.push(e),n&&n.call(s,e),e;else return null;for(var o=e.length-1;o>=0;)-1!==t.indexOf(e[o])&&e.splice(o,1),o--;if(0===(o=e.length))return null;i>0&&o>r&&(e.splice(r),o=r);for(var a=0;a<o;a++){var h=e[a];t.push(h),n&&n.call(s,h)}return e}},51067(t){t.exports=function(t,e,i,n,s,r){if(void 0===i&&(i=0),void 0===r&&(r=t),n>0){var o=n-t.length;if(o<=0)return null}if(!Array.isArray(e))if(-1===t.indexOf(e))return t.splice(i,0,e),s&&s.call(r,e),e;else return null;for(var a=e.length-1;a>=0;)-1!==t.indexOf(e[a])&&e.pop(),a--;
1if(0===(a=e.length))return null;n>0&&a>o&&(e.splice(o),a=o);for(var h=a-1;h>=0;h--){var l=e[h];t.splice(i,0,l),s&&s.call(r,l)}return e}},66905(t){t.exports=function(t,e){var i=t.indexOf(e);return -1!==i&&i<t.length&&(t.splice(i,1),t.push(e)),e}},21612(t,e,i){var n=i(82011);t.exports=function(t,e,i,s,r){void 0===s&&(s=0),void 0===r&&(r=t.length);var o=0;if(n(t,s,r))for(var a=s;a<r;a++)t[a][e]===i&&o++;return o}},95428(t){t.exports=function(t,e,i){var n,s=[null];for(n=3;n<arguments.length;n++)s.push(arguments[n]);for(n=0;n<t.length;n++)s[0]=t[n],e.apply(i,s);return t}},36914(t,e,i){var n=i(82011);t.exports=function(t,e,i,s,r){if(void 0===s&&(s=0),void 0===r&&(r=t.length),n(t,s,r)){var o,a=[null];for(o=5;o<arguments.length;o++)a.push(arguments[o]);for(o=s;o<r;o++)a[0]=t[o],e.apply(i,a)}return t}},81957(t){t.exports=function(t,e,i){if(!e.length)return NaN;if(1===e.length)return e[0];var n,s,r=1;if(i){if(t<e[0][i])return e[0];for(;e[r][i]<t;)r++}else for(;e[r]<t;)r++;return(r>e.length&&(r=e.length),i)?(n=e[r-1][i],(s=e[r][i])-t<=t-n?e[r]:e[r-1]):(n=e[r-1],(s=e[r])-t<=t-n?s:n)}},43491(t){var e=function(t,i){void 0===i&&(i=[]);for(var n=0;n<t.length;n++)Array.isArray(t[n])?e(t[n],i):i.push(t[n]);return i};t.exports=e},46710(t,e,i){var n=i(82011);t.exports=function(t,e,i,s,r){void 0===s&&(s=0),void 0===r&&(r=t.length);var o=[];if(n(t,s,r))for(var a=s;a<r;a++){var h=t[a];(!e||e&&void 0===i&&h.hasOwnProperty(e)||e&&void 0!==i&&h[e]===i)&&o.push(h)}return o}},58731(t,e,i){var n=i(82011);t.exports=function(t,e,i,s,r){var o,a;if(void 0===s&&(s=0),void 0===r&&(r=t.length),-1!==s){if(n(t,s,r)){for(o=s;o<r;o++)if(a=t[o],!e||e&&void 0===i&&a.hasOwnProperty(e)||e&&void 0!==i&&a[e]===i)return a}}else if(n(t,0,r)){for(o=r;o>=0;o--)if(a=t[o],!e||e&&void 0===i&&a.hasOwnProperty(e)||e&&void 0!==i&&a[e]===i)return a}return null}},26546(t){t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=t.length);var n=e+Math.floor(Math.random()*i);return void 0===t[n]?null:t[n]}},85835(t){t.exports=function(t,e,i){if(e===i)return t;var n=t.indexOf(e),s=t.indexOf(i);if(n<0||s<0)throw Error("Supplied items must be elements of the same array");return n>s||(t.splice(n,1),s=t.indexOf(i),t.splice(s+1,0,e)),t}},83371(t){t.exports=function(t,e,i){if(e===i)return t;var n=t.indexOf(e),s=t.indexOf(i);if(n<0||s<0)throw Error("Supplied items must be elements of the same array");return n<s||(t.splice(n,1),0===s?t.unshift(e):t.splice(s,0,e)),t}},70864(t){t.exports=function(t,e){var i=t.indexOf(e);if(i>0){var n=t[i-1],s=t.indexOf(n);t[i]=n,t[s]=e}return t}},69693(t){t.exports=function(t,e,i){var n=t.indexOf(e);if(-1===n||i<0||i>=t.length)throw Error("Supplied index out of bounds");return n!==i&&(t.splice(n,1),t.splice(i,0,e)),e}},40853(t){t.exports=function(t,e){var i=t.indexOf(e);if(-1!==i&&i<t.length-1){var n=t[i+1],s=t.indexOf(n);t[i]=n,t[s]=e}return t}},20283(t){t.exports=function(t,e,i,n){var s,r=[],o=!1;if((i||n)&&(o=!0,i||(i=""),n||(n="")),e<t)for(s=t;s>=e;s--)o?r.push(i+s.toString()+n):r.push(s);else for(s=t;s<=e;s++)o?r.push(i+s.toString()+n):r.push(s);return r}},593(t,e,i){var n=i(2284);t.exports=function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=null),void 0===i&&(i=1),null===e&&(e=t,t=0);for(var s=[],r=Math.max(n((e-t)/(i||1)),0),o=0;o<r;o++)s.push(t),t+=i;return s}},43886(t){function e(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function i(t,e){return t<e?-1:+(t>e)}var n=function(t,s,r,o,a){for(void 0===r&&(r=0),void 0===o&&(o=t.length-1),void 0===a&&(a=i);o>r;){if(o-r>600){var h=o-r+1,l=s-r+1,u=Math.log(h),d=.5*Math.exp(2*u/3),c=.5*Math.sqrt(u*d*(h-d)/h)*(l-h/2<0?-1:1),f=Math.max(r,Math.floor(s-l*d/h+c)),p=Math.min(o,Math.floor(s+(h-l)*d/h+c));n(t,s,f,p,a)}var g=t[s],m=r,v=o;for(e(t,r,s),a(t[o],g)>0&&e(t,r,o);m<v;){for(e(t,m,v),m++,v--;0>a(t[m],g);)m++;for(;a(t[v],g)>0;)v--}0===a(t[r],g)?e(t,r,v):e(t,++v,o),v<=s&&(r=v+1),s<=v&&(o=v-1)}};t.exports=n},88492(t,e,i){var n=i(35154),s=i(33680),r=function(t,e,i){for(var n=[],s=0;s<t.length;s++)for(var r=0;r<e.length;r++)for(var o=0;o<i;o++)n.push({a:t[s],b:e[r]});return n};t.exports=function(t,e,i){var o=n(i,"max",0),a=n(i,"qty",1),h=n(i,"random",!1),l=n(i,"randomB",!1),u=n(i,"repeat",0),d=n(i,"yoyo",!1),c=[];if(l&&s(e),-1===u)if(0===o)u=0;else{var f=t.length*e.length*a;d&&(f*=2),u=Math.ceil(o/f)}for(var p=0;p<=u;p++){var g=r(t,e,a);h&&s(g),c=c.concat(g),d&&(g.reverse(),c=c.concat(g))}return o&&c.splice(o),c}},72905(t,e,i){var n=i(19133);
1t.exports=function(t,e,i,s){if(void 0===s&&(s=t),!Array.isArray(e))return -1!==(r=t.indexOf(e))?(n(t,r),i&&i.call(s,e),e):null;for(var r,o=e.length-1,a=[];o>=0;){var h=e[o];-1!==(r=t.indexOf(h))&&(n(t,r),a.push(h),i&&i.call(s,h)),o--}return a}},60248(t,e,i){var n=i(19133);t.exports=function(t,e,i,s){if(void 0===s&&(s=t),e<0||e>t.length-1)throw Error("Index out of bounds");var r=n(t,e);return i&&i.call(s,r),r}},81409(t,e,i){var n=i(82011);t.exports=function(t,e,i,s,r){if(void 0===e&&(e=0),void 0===i&&(i=t.length),void 0===r&&(r=t),!n(t,e,i))return[];var o=i-e,a=t.splice(e,o);if(s)for(var h=0;h<a.length;h++){var l=a[h];s.call(r,l)}return a}},31856(t,e,i){var n=i(19133);t.exports=function(t,e,i){return void 0===e&&(e=0),void 0===i&&(i=t.length),n(t,e+Math.floor(Math.random()*i))}},42169(t){t.exports=function(t,e,i){var n=t.indexOf(e),s=t.indexOf(i);return -1!==n&&-1===s&&(t[n]=i,!0)}},86003(t){t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,n=0;n<e;n++)i=t.shift(),t.push(i);return i}},49498(t){t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,n=0;n<e;n++)i=t.pop(),t.unshift(i);return i}},82011(t){t.exports=function(t,e,i,n){var s=t.length;if(!(e<0)&&!(e>=s)&&!(e>=i)&&!(i>s))return!0;if(n)throw Error("Range Error: Values outside acceptable range");return!1}},89545(t){t.exports=function(t,e){var i=t.indexOf(e);return -1!==i&&i>0&&(t.splice(i,1),t.unshift(e)),e}},17810(t,e,i){var n=i(82011);t.exports=function(t,e,i,s,r){if(void 0===s&&(s=0),void 0===r&&(r=t.length),n(t,s,r))for(var o=s;o<r;o++){var a=t[o];a.hasOwnProperty(e)&&(a[e]=i)}return t}},33680(t){t.exports=function(t){for(var e=t.length-1;e>0;e--){var i=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[i],t[i]=n}return t}},90126(t){t.exports=function(t){var e=/\D/g;return t.sort(function(t,i){return parseInt(t.replace(e,""),10)-parseInt(i.replace(e,""),10)}),t}},19133(t){t.exports=function(t,e){if(!(e>=t.length)){for(var i=t.length-1,n=t[e],s=e;s<i;s++)t[s]=t[s+1];return t.length=i,n}}},19186(t,e,i){var n=i(82264);function s(t,e){return String(t).localeCompare(e)}function r(t,e,i,n){var s,r,o,a,h,l=t.length,u=0,d=2*i;for(s=0;s<l;s+=d)for(o=(r=s+i)+i,r>l&&(r=l),o>l&&(o=l),a=s,h=r;;)if(a<r&&h<o)0>=e(t[a],t[h])?n[u++]=t[a++]:n[u++]=t[h++];else if(a<r)n[u++]=t[a++];else if(h<o)n[u++]=t[h++];else break}t.exports=function(t,e){if(void 0===e&&(e=s),!t||t.length<2)return t;if(n.features.stableSort)return t.sort(e);var i=function(t,e){var i=t.length;if(i<=1)return t;for(var n=Array(i),s=1;s<i;s*=2){r(t,e,s,n);var o=t;t=n,n=o}return t}(t,e);return i!==t&&r(i,null,t.length,t),t}},25630(t){t.exports=function(t,e,i){if(e===i)return t;var n=t.indexOf(e),s=t.indexOf(i);if(n<0||s<0)throw Error("Supplied items must be elements of the same array");return t[n]=i,t[s]=e,t}},37105(t,e,i){t.exports={Matrix:i(54915),Add:i(71146),AddAt:i(51067),BringToTop:i(66905),CountAllMatching:i(21612),Each:i(95428),EachInRange:i(36914),FindClosestInSorted:i(81957),Flatten:i(43491),GetAll:i(46710),GetFirst:i(58731),GetRandom:i(26546),MoveDown:i(70864),MoveTo:i(69693),MoveUp:i(40853),MoveAbove:i(85835),MoveBelow:i(83371),NumberArray:i(20283),NumberArrayStep:i(593),QuickSelect:i(43886),Range:i(88492),Remove:i(72905),RemoveAt:i(60248),RemoveBetween:i(81409),RemoveRandomElement:i(31856),Replace:i(42169),RotateLeft:i(86003),RotateRight:i(49498),SafeRange:i(82011),SendToBack:i(89545),SetAll:i(17810),Shuffle:i(33680),SortByDigits:i(90126),SpliceOne:i(19133),StableSort:i(19186),Swap:i(25630)}},86922(t){t.exports=function(t){if(!Array.isArray(t)||!Array.isArray(t[0]))return!1;for(var e=t[0].length,i=1;i<t.length;i++)if(t[i].length!==e)return!1;return!0}},63362(t,e,i){var n=i(41836),s=i(86922);t.exports=function(t){var e="";if(!s(t))return e;for(var i=0;i<t.length;i++){for(var r=0;r<t[i].length;r++){var o=t[i][r].toString();"undefined"!==o?e+=n(o,2):e+="?",r<t[i].length-1&&(e+=" |")}if(i<t.length-1){e+="\n";for(var a=0;a<t[i].length;a++)e+="---",a<t[i].length-1&&(e+="+");e+="\n"}}return e}},92598(t){t.exports=function(t){return t.reverse()}},21224(t){t.exports=function(t){for(var e=0;e<t.length;e++)t[e].reverse();return t}},98717(t,e,i){var n=i(37829);t.exports=function(t){return n(t,180)}},44657(t,e,i){var n=i(37829);t.exports=function(t,e){void 0===e&&(e=1);for(var i=0;i<e;i++)t=n(t,90);return t}},37829(t,e,i){var n=i(86922),s=i(2429);t.exports=function(t,e){if(void 0===e&&(e=90),!n(t))return null;if("string"!=typeof e&&(e=(e%360+360)%360),90===e||-270===e||"rotateLeft"===e)(t=s(t)).reverse();else if(-90===e||270===e||"rotateRight"===e)t.reverse(),t=s(t);else if(180===Math.abs(e)||"rotate180"===e){for(var i=0;i<t.length;i++)t[i].reverse();t.reverse()}return t}},92632(t,e,i){var n=i(37829);t.exports=function(t,e){void 0===e&&(e=1);for(var i=0;i<e;i++)t=n(t,-90);return t}},69512(t,e,i){var n=i(86003),s=i(49498);
vendor: 4,185 bytes, line 1
1t.exports=function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),0!==i&&(i<0?n(t,Math.abs(i)):s(t,i)),0!==e)for(var r=0;r<t.length;r++){var o=t[r];e<0?n(o,Math.abs(e)):s(o,e)}return t}},2429(t){t.exports=function(t){for(var e=t.length,i=t[0].length,n=Array(i),s=0;s<i;s++){n[s]=Array(e);for(var r=e-1;r>-1;r--)n[s][r]=t[r][s]}return n}},54915(t,e,i){t.exports={CheckMatrix:i(86922),MatrixToString:i(63362),ReverseColumns:i(92598),ReverseRows:i(21224),Rotate180:i(98717),RotateLeft:i(44657),RotateMatrix:i(37829),RotateRight:i(92632),Translate:i(69512),TransposeMatrix:i(2429)}},71334(t){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";t.exports=function(t,i){for(var n=new Uint8Array(t),s=n.length,r=i?"data:"+i+";base64,":"",o=0;o<s;o+=3)r+=e[n[o]>>2],r+=e[(3&n[o])<<4|n[o+1]>>4],r+=e[(15&n[o+1])<<2|n[o+2]>>6],r+=e[63&n[o+2]];return s%3==2?r=r.substring(0,r.length-1)+"=":s%3==1&&(r=r.substring(0,r.length-2)+"=="),r}},53134(t){for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=new Uint8Array(256),n=0;n<e.length;n++)i[e.charCodeAt(n)]=n;t.exports=function(t){var e,n,s,r,o=(t=t.substr(t.indexOf(",")+1)).length,a=.75*o,h=0;"="===t[o-1]&&(a--,"="===t[o-2]&&a--);for(var l=new ArrayBuffer(a),u=new Uint8Array(l),d=0;d<o;d+=4)e=i[t.charCodeAt(d)],n=i[t.charCodeAt(d+1)],s=i[t.charCodeAt(d+2)],r=i[t.charCodeAt(d+3)],u[h++]=e<<2|n>>4,u[h++]=(15&n)<<4|s>>2,u[h++]=(3&s)<<6|63&r;return l}},65839(t,e,i){t.exports={ArrayBufferToBase64:i(71334),Base64ToArrayBuffer:i(53134)}},91799(t,e,i){t.exports={Array:i(37105),Base64:i(65839),Objects:i(1183),String:i(31749),NOOP:i(29747),NULL:i(20242)}},41786(t){t.exports=function(t){var e={};for(var i in t)Array.isArray(t[i])?e[i]=t[i].slice(0):e[i]=t[i];return e}},62644(t){var e=function(t){var i,n,s;if("object"!=typeof t||null===t)return t;for(s in i=Array.isArray(t)?[]:{},t)n=t[s],i[s]=e(n);return i};t.exports=e},79291(t,e,i){var n=i(41212),s=function(){var t,e,i,r,o,a,h=arguments[0]||{},l=1,u=arguments.length,d=!1;for("boolean"==typeof h&&(d=h,h=arguments[1]||{},l=2),u===l&&(h=this,--l);l<u;l++)if(null!=(t=arguments[l]))for(e in t)i=h[e],h!==(r=t[e])&&(d&&r&&(n(r)||(o=Array.isArray(r)))?(o?(o=!1,a=i&&Array.isArray(i)?i:[]):a=i&&n(i)?i:{},h[e]=s(d,a,r)):void 0!==r&&(h[e]=r));return h};t.exports=s},23568(t,e,i){var n=i(75508),s=i(35154);t.exports=function(t,e,i){var r=s(t,e,null);if(null===r)return i;if(Array.isArray(r))return n.RND.pick(r);if("object"==typeof r){if(r.hasOwnProperty("randInt"))return n.RND.integerInRange(r.randInt[0],r.randInt[1]);else if(r.hasOwnProperty("randFloat"))return n.RND.realInRange(r.randFloat[0],r.randFloat[1])}else if("function"==typeof r)return r(e);return r}},95540(t){t.exports=function(t,e,i){var n=typeof t;return t&&"number"!==n&&"string"!==n&&t.hasOwnProperty(e)&&void 0!==t[e]?t[e]:i}},82840(t,e,i){var n=i(35154),s=i(45319);t.exports=function(t,e,i,r,o){return void 0===o&&(o=i),s(n(t,e,o),i,r)}},35154(t){t.exports=function(t,e,i,n){if(!t&&!n||"number"==typeof t)return i;if(t&&t.hasOwnProperty(e))return t[e];if(n&&n.hasOwnProperty(e))return n[e];if(-1===e.indexOf("."))return i;for(var s=e.split("."),r=t,o=n,a=i,h=i,l=!0,u=!0,d=0;d<s.length;d++)r&&r.hasOwnProperty(s[d])?(a=r[s[d]],r=r[s[d]]):l=!1,o&&o.hasOwnProperty(s[d])?(h=o[s[d]],o=o[s[d]]):u=!1;return l?a:u?h:i}},69036(t){t.exports=function(t,e){for(var i=0;i<e.length;i++)if(!t.hasOwnProperty(e[i]))return!1;return!0}},1985(t){t.exports=function(t,e){for(var i=0;i<e.length;i++)if(t.hasOwnProperty(e[i]))return!0;return!1}},97022(t){t.exports=function(t,e){return t.hasOwnProperty(e)}},41212(t){t.exports=function(t){if(!t||"object"!=typeof t||t.nodeType||t===t.window)return!1;try{if(t.constructor&&!({}).hasOwnProperty.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0}},46975(t,e,i){var n=i(41786);t.exports=function(t,e){var i=n(t);for(var s in e)i.hasOwnProperty(s)||(i[s]=e[s]);return i}},269(t,e,i){var n=i(41786);t.exports=function(t,e){var i=n(t);for(var s in e)i.hasOwnProperty(s)&&(i[s]=e[s]);return i}},18254(t,e,i){var n=i(97022);t.exports=function(t,e){for(var i={},s=0;s<e.length;s++){var r=e[s];n(t,r)&&(i[r]=t[r])}return i}}
1,61622(t){t.exports=function(t,e,i){if(t&&"number"!=typeof t){if(t.hasOwnProperty(e))return t[e]=i,!0;else if(-1!==e.indexOf(".")){for(var n=e.split("."),s=t,r=t,o=0;o<n.length;o++)if(!s.hasOwnProperty(n[o]))return!1;else r=s,s=s[n[o]];return r[n[n.length-1]]=i,!0}}return!1}},1183(t,e,i){t.exports={Clone:i(41786),DeepCopy:i(62644),Extend:i(79291),GetAdvancedValue:i(23568),GetFastValue:i(95540),GetMinMaxValue:i(82840),GetValue:i(35154),HasAll:i(69036),HasAny:i(1985),HasValue:i(97022),IsPlainObject:i(41212),Merge:i(46975),MergeRight:i(269),Pick:i(18254),SetValue:i(61622)}},27902(t){t.exports=function(t,e){return t.replace(/%([0-9]+)/g,function(t,i){return e[Number(i)-1]})}},41836(t){t.exports=function(t,e,i,n){void 0===e&&(e=0),void 0===i&&(i=" "),void 0===n&&(n=3);var s=0;if(e+1>=(t=t.toString()).length)switch(n){case 1:t=Array(e+1-t.length).join(i)+t;break;case 3:var r=Math.ceil((s=e-t.length)/2);t=Array(s-r+1).join(i)+t+Array(r+1).join(i);break;default:t+=Array(e+1-t.length).join(i)}return t}},33628(t){t.exports=function(t,e){return 0===e?t.slice(1):t.slice(0,e)+t.slice(e+1)}},27671(t){t.exports=function(t){return t.split("").reverse().join("")}},45650(t){t.exports=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)})}},35355(t){t.exports=function(t){return t&&t[0].toUpperCase()+t.slice(1)}},31749(t,e,i){t.exports={Format:i(27902),Pad:i(41836),RemoveAt:i(33628),Reverse:i(27671),UppercaseFirst:i(35355),UUID:i(45650)}}},r={};function o(t){var e=r[t];if(void 0!==e)return e.exports;var i=r[t]={exports:{}};return s[t](i,i.exports,o),i.exports}o.d=(t,e)=>{for(var i in e)o.o(e,i)&&!o.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(t){if("object"==typeof window)return window}}(),o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var a={};o.d(a,{A4:()=>R,AB:()=>I,AQ:()=>_,Aq:()=>Y,B_:()=>m,CB:()=>V,Cu:()=>T,D7:()=>N,Dh:()=>S,En:()=>l,FE:()=>O,Fu:()=>z,M3:()=>K,NS:()=>Z,O1:()=>B,PX:()=>J,Q8:()=>W,Qw:()=>u,SY:()=>j,Tm:()=>f,UP:()=>Q,XT:()=>g,Z5:()=>L,Zt:()=>w,_k:()=>D,aH:()=>E,dv:()=>x,gX:()=>k,gd:()=>d,ho:()=>F,iJ:()=>p,j$:()=>G,l2:()=>c,nl:()=>v,pd:()=>C,qt:()=>H,ry:()=>M,sV:()=>y,sx:()=>U,x3:()=>q,xS:()=>b,xv:()=>X,zA:()=>P,zU:()=>A}),o(63595);var h=o(8054);let l=o(61061),u=o(60421),d=o(10312),c=o(83388),f=o(26638),p=o(42857),g=o(25410),m=o(44965),v=o(27460),x=o(84902),y=o(93055),T=o(11889),w=o(50127),b=o(77856),S=o(55738),C=o(14350),E=o(57777),A=o(75508),_=o(44563),M=o(18922),R=o(36909),O=o(93364),P=o(29795),L=o(97482),D=o(62194),F=o(41392),I=o(23717),N=o(27458),B=o(62501),k=o(90291),U=o(84322),z=o(43066),Y=o(91799),X=h.VERSION,W=h.AUTO,G=h.CANVAS,V=h.WEBGL,H=h.HEADLESS,j=h.FOREVER,q=h.NONE,K=h.LEFT,Z=h.RIGHT,Q=h.UP,J=h.DOWN,$=a.Q8,tt=a.En,te=a.Qw,ti=a.gd,tn=a.j$,ts=a.l2,tr=a.Tm,to=a.iJ,ta=a.XT,th=a.dv,tl=a.PX,tu=a.B_,td=a.nl,tc=a.sV,tf=a.SY,tp=a.Cu,tg=a.Zt,tm=a.xS,tv=a.Dh,tx=a.qt,ty=a.pd,tT=a.M3,tw=a.aH,tb=a.zU,tS=a.x3,tC=a.AQ,tE=a.ry,tA=a.NS,t_=a.A4,tM=a.FE,tR=a.zA,tO=a.Z5,tP=a._k,tL=a.AB,tD=a.ho,tF=a.D7,tI=a.O1,tN=a.gX,tB=a.sx,tk=a.Fu,tU=a.UP,tz=a.Aq,tY=a.xv,tX=a.CB}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.