1
0
forked from sent/waves
waves/public/assets/g/vex7/vex7.min.js
2025-04-09 17:11:14 -05:00

1 line
3.3 MiB
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

function x(){function h(t,e){this.x=t||0,this.y=e||0}function t(t,e){this.pos=t||new h,this.r=e||0}function n(t,e){this.pos=t||new h,this.angle=0,this.offset=new h,this.u(e||[])}function l(t,e,i){this.pos=t||new h,this.w=e||0,this.h=i||0}function e(){this.b=this.a=null,this.overlapN=new h,this.overlapV=new h,this.clear()}function c(t,e,i){for(var n=Number.MAX_VALUE,r=-Number.MAX_VALUE,s=t.length,o=0;o<s;o++){var a=t[o].f(e);a<n&&(n=a),r<a&&(r=a)}i[0]=n,i[1]=r}function u(t,e,i,n,r,s){var o=d.pop(),a=d.pop();return e=(t=y.pop().c(e).sub(t)).f(r),c(i,r,o),c(n,r,a),a[0]+=e,a[1]+=e,o[0]>a[1]||a[0]>o[1]?(y.push(t),d.push(o),d.push(a),!0):(s&&(o[0]<a[0]?(s.aInB=!1,o[1]<a[1]?(i=o[1]-a[0],s.bInA=!1):i=(i=o[1]-a[0])<(n=a[1]-o[0])?i:-n):(s.bInA=!1,o[1]>a[1]?(i=o[0]-a[1],s.aInB=!1):i=(i=o[1]-a[0])<(n=a[1]-o[0])?i:-n),(n=Math.abs(i))<s.overlap&&(s.overlap=n,s.overlapN.c(r),i<0&&s.overlapN.reverse())),y.push(t),d.push(o),d.push(a),!1)}function m(t,e){var i=t.g(),e=e.f(t);return e<0?-1:i<e?1:0}function r(t,e,i){for(var n=y.pop().c(e.pos).sub(t.pos),r=e.r,s=r*r,o=t.calcPoints,a=o.length,h=y.pop(),l=y.pop(),c=0;c<a;c++){var u=c===a-1?0:c+1,d=0===c?a-1:c-1,p=0,f=null,g=(h.c(t.edges[c]),l.c(n).sub(o[c]),i&&l.g()>s&&(i.aInB=!1),m(h,l));if(-1===g){if(h.c(t.edges[d]),1===(g=m(h,u=y.pop().c(n).sub(o[d])))){if(r<(g=l.j()))return y.push(n),y.push(h),y.push(l),y.push(u),!1;i&&(i.bInA=!1,f=l.normalize(),p=r-g)}y.push(u)}else if(1===g){if(h.c(t.edges[u]),l.c(n).sub(o[u]),-1===(g=m(h,l))){if(r<(g=l.j()))return y.push(n),y.push(h),y.push(l),!1;i&&(i.bInA=!1,f=l.normalize(),p=r-g)}}else{if(u=h.m().normalize(),g=l.f(u),d=Math.abs(g),0<g&&r<d)return y.push(n),y.push(u),y.push(l),!1;i&&(f=u,p=r-g,0<=g||p<2*r)&&(i.bInA=!1)}f&&i&&Math.abs(p)<Math.abs(i.overlap)&&(i.overlap=p,i.overlapN.c(f))}return i&&(i.a=t,i.b=e,i.overlapV.c(i.overlapN).scale(i.overlap)),y.push(n),y.push(h),y.push(l),!0}function i(t,e,i){for(var n=t.calcPoints,r=n.length,s=e.calcPoints,o=s.length,a=0;a<r;a++)if(u(t.pos,e.pos,n,s,t.normals[a],i))return!1;for(a=0;a<o;a++)if(u(t.pos,e.pos,n,s,e.normals[a],i))return!1;return i&&(i.a=t,i.b=e,i.overlapV.c(i.overlapN).scale(i.overlap)),!0}var s={};s.Vector=h,(s.V=h).prototype.copy=h.prototype.c=function(t){return this.x=t.x,this.y=t.y,this},h.prototype.clone=h.prototype.clone=function(){return new h(this.x,this.y)},h.prototype.perp=h.prototype.m=function(){var t=this.x;return this.x=this.y,this.y=-t,this},h.prototype.rotate=h.prototype.rotate=function(t){var e=this.x,i=this.y;return this.x=e*Math.cos(t)-i*Math.sin(t),this.y=e*Math.sin(t)+i*Math.cos(t),this},h.prototype.reverse=h.prototype.reverse=function(){return this.x=-this.x,this.y=-this.y,this},h.prototype.normalize=h.prototype.normalize=function(){var t=this.j();return 0<t&&(this.x/=t,this.y/=t),this},h.prototype.add=h.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},h.prototype.sub=h.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},h.prototype.scale=h.prototype.scale=function(t,e){return this.x*=t,this.y*=e||t,this},h.prototype.project=h.prototype.o=function(t){var e=this.f(t)/t.g();return this.x=e*t.x,this.y=e*t.y,this},h.prototype.projectN=h.prototype.s=function(t){var e=this.f(t);return this.x=e*t.x,this.y=e*t.y,this},h.prototype.reflect=function(t){var e=this.x,i=this.y;return this.o(t).scale(2),this.x-=e,this.y-=i,this},h.prototype.reflectN=function(t){var e=this.x,i=this.y;return this.s(t).scale(2),this.x-=e,this.y-=i,this},h.prototype.dot=h.prototype.f=function(t){return this.x*t.x+this.y*t.y},h.prototype.len2=h.prototype.g=function(){return this.f(this)},h.prototype.len=h.prototype.j=function(){return Math.sqrt(this.g())},(s.Circle=t).prototype.getAABB=function(){var t=this.r;return new l(this.pos.clone().sub(new h(t,t)),2*t,2*t).l()},(s.Polygon=n).prototype.setPoints=n.prototype.u=function(t){if(!this.points||this.points.length!==t.length)for(var e=this.calcPoints=[],i=this.edges=[],n=this.normals=[],r=0;r<t.length;r++)e.push(new h),i.push(new h),n.push(new h);return this.points=t,this.i(),this},n.prototype.setAngle=function(t){return this.angle=t,this.i(),this},n.prototype.setOffset=function(t){return this.offset=t,this.i(),this},n.prototype.rotate=n.prototype.rotate=function(t){for(var e=this.points,i=e.length,n=0;n<i;n++)e[n].rotate(t);return this.i(),this},n.prototype.translate=n.prototype.translate=function(t,e){for(var i=this.points,n=i.length,r=0;r<n;r++)i[r].x+=t,i[r].y+=e;return this.i(),this},n.prototype.i=function(){for(var t=this.calcPoints,e=this.edges,i=this.normals,n=this.points,r=this.offset,s=this.angle,o=n.length,a=0;a<o;a++){var h=t[a].c(n[a]);h.x+=r.x,h.y+=r.y,0!==s&&h.rotate(s)}for(a=0;a<o;a++)n=t[a],n=e[a].c(a<o-1?t[a+1]:t[0]).sub(n),i[a].c(n).m().normalize()},n.prototype.getAABB=function(){for(var t=this.calcPoints,e=t.length,i=t[0].x,n=t[0].y,r=t[0].x,s=t[0].y,o=1;o<e;o++){var a=t[o];a.x<i?i=a.x:a.x>r&&(r=a.x),a.y<n?n=a.y:a.y>s&&(s=a.y)}return new l(this.pos.clone().add(new h(i,n)),r-i,s-n).l()},(s.Box=l).prototype.toPolygon=l.prototype.l=function(){var t=this.pos,e=this.w,i=this.h;return new n(new h(t.x,t.y),[new h,new h(e,0),new h(e,i),new h(0,i)])},(s.Response=e).prototype.clear=e.prototype.clear=function(){return this.bInA=this.aInB=!0,this.overlap=Number.MAX_VALUE,this};for(var y=[],o=0;o<10;o++)y.push(new h);for(var d=[],o=0;o<5;o++)d.push([]);var a=new e,p=new l(new h,1e-6,1e-6).l();return s.isSeparatingAxis=u,s.pointInCircle=function(t,e){var t=y.pop().c(t).sub(e.pos),e=e.r*e.r,i=t.g();return y.push(t),i<=e},s.pointInPolygon=function(t,e){return p.pos.c(t),a.clear(),i(p,e,a)&&a.aInB},s.testCircleCircle=function(t,e,i){var n=y.pop().c(e.pos).sub(t.pos),r=t.r+e.r,s=n.g();return r*r<s?(y.push(n),!1):(i&&(s=Math.sqrt(s),i.a=t,i.b=e,i.overlap=r-s,i.overlapN.c(n.normalize()),i.overlapV.c(n).scale(i.overlap),i.aInB=t.r<=e.r&&s<=e.r-t.r,i.bInA=e.r<=t.r&&s<=t.r-e.r),y.push(n),!0)},s.testPolygonCircle=r,s.testCirclePolygon=function(t,e,i){var n;return(t=r(e,t,i))&&i&&(e=i.a,n=i.aInB,i.overlapN.reverse(),i.overlapV.reverse(),i.a=i.b,i.b=e,i.aInB=i.bInA,i.bInA=n),t},s.testPolygonPolygon=i,s}!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("Phaser",[],e):"object"==typeof exports?exports.Phaser=e():t.Phaser=e()}(this,function(){return n={},r.m=i=[function(t,e){function s(t,e,i,n){for(var r in e)if(e.hasOwnProperty(r)){a=r,h=void 0,h=(o=i)?e[a]:Object.getOwnPropertyDescriptor(e,a);o=!(!(h=!o&&h.value&&"object"==typeof h.value?h.value:h)||!((a=h).get&&"function"==typeof a.get||a.set&&"function"==typeof a.set))&&(void 0===h.enumerable&&(h.enumerable=!0),void 0===h.configurable&&(h.configurable=!0),h);if(!1!==o){if(a=(n||t).prototype,h=r,s=void 0,(s=Object.getOwnPropertyDescriptor(a,h))&&!1===(s=s.value&&"object"==typeof s.value?s.value:s).configurable){if(l.ignoreFinals)continue;throw new Error("cannot override final property '"+r+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(t.prototype,r,o)}else t.prototype[r]=e[r]}var s,o,a,h}function o(t,e){if(e){Array.isArray(e)||(e=[e]);for(var i=0;i<e.length;i++)s(t,e[i].prototype||e[i])}}function l(t){var e,i,n;if((t=t||{}).initialize){if("function"!=typeof t.initialize)throw new Error("initialize must be a function");n=t.initialize,delete t.initialize}else n=t.Extends?(i=t.Extends,function(){i.apply(this,arguments)}):function(){};t.Extends?(n.prototype=Object.create(t.Extends.prototype),n.prototype.constructor=n,e=t.Extends,delete t.Extends):n.prototype.constructor=n;var r=null;return t.Mixins&&(r=t.Mixins,delete t.Mixins),o(n,r),s(n,t,!0,e),n}l.extend=s,l.mixin=o,l.ignoreFinals=!1,t.exports=l},function(t,e){t.exports=function(){}},function(t,e){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}},function(t,e,i){var n=i(0),r=i(124),s=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 s(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)},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 r(this.x,t.x,e)&&r(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,t=t.y-this.y;return Math.sqrt(e*e+t*t)},distanceSq:function(t){var e=t.x-this.x,t=t.y-this.y;return e*e+t*t},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 0<i&&(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){var i=this.x,n=this.y;return this.x=i+(e=void 0===e?0:e)*(t.x-i),this.y=n+e*(t.y-n),this},transformMat3:function(t){var e=this.x,i=this.y,t=t.val;return this.x=t[0]*e+t[3]*i+t[6],this.y=t[1]*e+t[4]*i+t[7],this},transformMat4:function(t){var e=this.x,i=this.y,t=t.val;return this.x=t[0]*e+t[4]*i+t[12],this.y=t[1]*e+t[5]*i+t[13],this},reset:function(){return this.x=0,this.y=0,this},limit:function(t){var e=this.length();return e&&t<e&&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),t=Math.sin(t);return this.set(e*this.x-t*this.y,t*this.x+e*this.y)}});s.ZERO=new s,s.RIGHT=new s(1,0),s.LEFT=new s(-1,0),s.UP=new s(0,-1),s.DOWN=new s(0,1),s.ONE=new s(1,1),t.exports=s},function(t,e,i){var n=i(0),r=i(56),i=new n({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=t),this.type=r.POINT,this.x=t,this.y=e},setTo:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.x=t,this.y=e,this}});t.exports=i},function(t,e,i){var n=i(0),r=i(24),s=i(20),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(s.BOOT,this.boot,this),this.events.on(s.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(s.DESTROY,this.destroy,this)},start:function(){this.events.once(s.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(s.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(s.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]},r.register("GameObjectFactory",o,"add"),t.exports=o},function(t,e){t.exports=function(t,e,i){if(t&&"number"!=typeof t){if(t.hasOwnProperty(e))return t[e];if(-1===e.indexOf("."))return i;for(var n=e.split("."),r=t,s=i,o=0;o<n.length;o++){if(!r.hasOwnProperty(n[o])){s=i;break}s=r[n[o]],r=r[n[o]]}return s}return i}},function(t,e){t.exports=function(t){if("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}},function(t,e){var i={};t.exports={install:function(t){for(var e in i)t[e]=i[e]},register:function(t,e){i[t]=e},destroy:function(){i={}}}},function(t,e,i){"use strict";var n=Object.prototype.hasOwnProperty,p="~";function r(){}function s(t,e,i){this.fn=t,this.context=e,this.once=i||!1}function o(t,e,i,n,r){if("function"!=typeof i)throw new TypeError("The listener must be a function");i=new s(i,n||t,r),n=p?p+e:e;return t._events[n]?t._events[n].fn?t._events[n]=[t._events[n],i]:t._events[n].push(i):(t._events[n]=i,t._eventsCount++),t}function h(t,e){0==--t._eventsCount?t._events=new r:delete t._events[e]}function a(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(p=!1)),a.prototype.eventNames=function(){var t,e,i=[];if(0===this._eventsCount)return i;for(e in t=this._events)n.call(t,e)&&i.push(p?e.slice(1):e);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i},a.prototype.listeners=function(t){var t=p?p+t:t,e=this._events[t];if(!e)return[];if(e.fn)return[e.fn];for(var i=0,n=e.length,r=new Array(n);i<n;i++)r[i]=e[i].fn;return r},a.prototype.listenerCount=function(t){t=p?p+t:t,t=this._events[t];return t?t.fn?1:t.length:0},a.prototype.emit=function(t,e,i,n,r,s){var o=p?p+t:t;if(!this._events[o])return!1;var a,h=this._events[o],l=arguments.length;if(h.fn){switch(h.once&&this.removeListener(t,h.fn,void 0,!0),l){case 1:return h.fn.call(h.context),!0;case 2:return h.fn.call(h.context,e),!0;case 3:return h.fn.call(h.context,e,i),!0;case 4:return h.fn.call(h.context,e,i,n),!0;case 5:return h.fn.call(h.context,e,i,n,r),!0;case 6:return h.fn.call(h.context,e,i,n,r,s),!0}for(d=1,a=new Array(l-1);d<l;d++)a[d-1]=arguments[d];h.fn.apply(h.context,a)}else for(var c,u=h.length,d=0;d<u;d++)switch(h[d].once&&this.removeListener(t,h[d].fn,void 0,!0),l){case 1:h[d].fn.call(h[d].context);break;case 2:h[d].fn.call(h[d].context,e);break;case 3:h[d].fn.call(h[d].context,e,i);break;case 4:h[d].fn.call(h[d].context,e,i,n);break;default:if(!a)for(c=1,a=new Array(l-1);c<l;c++)a[c-1]=arguments[c];h[d].fn.apply(h[d].context,a)}return!0},a.prototype.on=function(t,e,i){return o(this,t,e,i,!1)},a.prototype.once=function(t,e,i){return o(this,t,e,i,!0)},a.prototype.removeListener=function(t,e,i,n){t=p?p+t:t;if(this._events[t])if(e){var r=this._events[t];if(r.fn)r.fn!==e||n&&!r.once||i&&r.context!==i||h(this,t);else{for(var s=0,o=[],a=r.length;s<a;s++)(r[s].fn!==e||n&&!r[s].once||i&&r[s].context!==i)&&o.push(r[s]);o.length?this._events[t]=1===o.length?o[0]:o:h(this,t)}}else h(this,t);return this},a.prototype.removeAllListeners=function(t){return t?(t=p?p+t:t,this._events[t]&&h(this,t)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=p,t.exports=a.EventEmitter=a},function(t,e,i){var n=i(0),r=i(57),s=i(171),o=i(306),a=i(56),h=i(47),l=i(174),i=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 r(this,t,e)},getPoint:function(t,e){return s(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(t=void 0===t?new h:t).setTo(this.x,this.y,this.right,this.y),t},getLineB:function(t){return(t=void 0===t?new h:t).setTo(this.right,this.y,this.right,this.bottom),t},getLineC:function(t){return(t=void 0===t?new h:t).setTo(this.right,this.bottom,this.x,this.bottom),t},getLineD:function(t){return(t=void 0===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}}});t.exports=i},function(t,e,i){t.exports={Alpha:i(607),AlphaSingle:i(303),BlendMode:i(304),ComputedSize:i(608),Crop:i(609),Depth:i(305),Flip:i(610),GetBounds:i(611),Mask:i(309),Origin:i(632),PathFollower:i(633),Pipeline:i(167),ScrollFactor:i(312),Size:i(634),Texture:i(635),TextureCrop:i(636),Tint:i(637),ToJSON:i(176),Transform:i(313),TransformMatrix:i(25),Visible:i(314)}},function(t,e){t.exports={getTintFromFloats:function(t,e,i,n){return((255&(255*n|0))<<24|(255&(255*t|0))<<16|(255&(255*e|0))<<8|255&(255*i|0))>>>0},getTintAppendFloatAlpha:function(t,e){return((255&(255*e|0))<<24|t)>>>0},getTintAppendFloatAlphaAndSwap:function(t,e){return((255&(255*e|0))<<24|(255&(0|t))<<16|(255&(t>>8|0))<<8|255&(t>>16|0))>>>0},getFloatsFromUintRGB:function(t){return[(255&(t>>16|0))/255,(255&(t>>8|0))/255,(255&(0|t))/255]},checkShaderMax:function(t,e){e&&-1!==e||(e=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS));for(var i=t.createShader(t.FRAGMENT_SHADER),n=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join("\n");;){var r=n.replace(/%forloop%/gi,function(t){for(var e="",i=0;i<t;++i)0<i&&(e+="\nelse "),i<t-1&&(e+="if(test == "+i+".0){}");return e}(e));if(t.shaderSource(i,r),t.compileShader(i),t.getShaderParameter(i,t.COMPILE_STATUS))break;e=e/2|0}return e},parseFragmentShaderMaxTextures:function(t,e){if(!t)return"";for(var i="",n=0;n<e;n++)0<n&&(i+="\n\telse "),n<e-1&&(i+="if (outTexId < "+n+".5)"),i=(i+="\n\t{")+("\n\t\ttexture = texture2D(uMainSampler["+n+"], outTexCoord);")+"\n\t}";return(t=t.replace(/%count%/gi,e.toString())).replace(/%forloop%/gi,i)}}},function(t,e,i){var n=i(193),r=i(6);t.exports=function(t,e,i){t=r(t,e,null);if(null===t)return i;if(Array.isArray(t))return n.RND.pick(t);if("object"==typeof t){if(t.hasOwnProperty("randInt"))return n.RND.integerInRange(t.randInt[0],t.randInt[1]);if(t.hasOwnProperty("randFloat"))return n.RND.realInRange(t.randFloat[0],t.randFloat[1])}else if("function"==typeof t)return t(e);return t}},function(t,e){var i={PI2:2*Math.PI,TAU:.5*Math.PI,EPSILON:1e-6,DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,RND:null,MIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER||-9007199254740991,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991};t.exports=i},function(t,e,i){var n=i(0),r=i(176),s=i(101),o=i(9),a=i(75),h=i(20),l=new n({Extends:o,initialize:function(t,e){o.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.input=null,this.body=null,this.ignoreDestroy=!1,this.on(a.ADDED_TO_SCENE,this.addedToScene,this),this.on(a.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 s(this)),this},setData:function(t,e){return this.data||(this.data=new s(this)),this.data.set(t,e),this},incData:function(t,e){return this.data||(this.data=new s(this)),this.data.inc(t,e),this},toggleData:function(t){return this.data||(this.data=new s(this)),this.data.toggle(t),this},getData:function(t){return this.data||(this.data=new s(this)),this.data.get(t)},setInteractive:function(t,e,i){return this.scene.sys.input.enable(this,t,e,i),this},disableInteractive:function(){return this.input&&(this.input.enabled=!1),this},removeInteractive:function(){return this.scene.sys.input.clear(this),this.input=void 0,this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return r(this)},willRender:function(t){return!(l.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},getIndexList:function(){for(var t=this,e=this.parentContainer,i=[];e&&(i.unshift(e.getIndex(t)),(t=e).parentContainer);)e=e.parentContainer;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).add(this,!0),t.queueDepthSort(),this.emit(a.ADDED_TO_SCENE,this,this.scene),t.events.emit(h.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.exists(this)&&(t.remove(this,!0),t.queueDepthSort(),this.displayList=null,this.emit(a.REMOVED_FROM_SCENE,this,this.scene),t.events.emit(h.REMOVED_FROM_SCENE,this,this.scene)),this},removeFromUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.remove(this),this},destroy:function(t){this.scene&&!this.ignoreDestroy&&(void 0===t&&(t=!1),this.preDestroy&&this.preDestroy.call(this),this.emit(a.DESTROY,this,t),this.removeAllListeners(),this.postPipelines&&this.resetPostPipeline(!0),this.removeFromDisplayList(),this.removeFromUpdateList(),this.input&&(this.scene.sys.input.clear(this),this.input=void 0),this.data&&(this.data.destroy(),this.data=void 0),this.body&&(this.body.destroy(),this.body=void 0),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0)}});l.RENDER_MASK=15,t.exports=l},function(t,e,i){var n=i(0),r=i(24),s=i(20),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(s.BOOT,this.boot,this),this.events.on(s.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(s.DESTROY,this.destroy,this)},start:function(){this.events.once(s.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.events.off(s.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(s.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]},r.register("GameObjectCreator",o,"make"),t.exports=o},function(t,e,i){function l(){var t,e,i,n,r,s=arguments[0]||{},o=1,a=arguments.length,h=!1;for("boolean"==typeof s&&(h=s,s=arguments[1]||{},o=2),a===o&&(s=this,--o);o<a;o++)if(null!=(t=arguments[o]))for(e in t)r=s[e],s!==(i=t[e])&&(h&&i&&(c(i)||(n=Array.isArray(i)))?(r=n?(n=!1,r&&Array.isArray(r)?r:[]):r&&c(r)?r:{},s[e]=l(h,r,i)):void 0!==i&&(s[e]=i));return s}var c=i(7);t.exports=l},function(t,e){t.exports=function(t,e,i){return Math.max(e,Math.min(i,t))}},function(t,e,i){var i=i(25),o=new i,a=new i,h=new i,l={camera:o,sprite:a,calc:h};t.exports=function(t,e,i){var n=o,r=a,s=h;return r.applyITRS(t.x,t.y,t.rotation,t.scaleX,t.scaleY),n.copyFrom(e.matrix),i?(n.multiplyWithOffset(i,-e.scrollX*t.scrollFactorX,-e.scrollY*t.scrollFactorY),r.e=t.x,r.f=t.y):(r.e-=e.scrollX*t.scrollFactorX,r.f-=e.scrollY*t.scrollFactorY),n.multiply(r,s),l}},function(t,e,i){t.exports={ADDED_TO_SCENE:i(656),BOOT:i(657),CREATE:i(658),DESTROY:i(659),PAUSE:i(660),POST_UPDATE:i(661),PRE_RENDER:i(662),PRE_UPDATE:i(663),READY:i(664),REMOVED_FROM_SCENE:i(665),RENDER:i(666),RESUME:i(667),SHUTDOWN:i(668),SLEEP:i(669),START:i(670),TRANSITION_COMPLETE:i(671),TRANSITION_INIT:i(672),TRANSITION_OUT:i(673),TRANSITION_START:i(674),TRANSITION_WAKE:i(675),UPDATE:i(676),WAKE:i(677)}},function(t,e){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}},function(t,e,i){t.exports={BLUR:i(612),BOOT:i(613),CONTEXT_LOST:i(614),CONTEXT_RESTORED:i(615),DESTROY:i(616),FOCUS:i(617),HIDDEN:i(618),PAUSE:i(619),POST_RENDER:i(620),POST_STEP:i(621),PRE_RENDER:i(622),PRE_STEP:i(623),READY:i(624),RESUME:i(625),STEP:i(626),VISIBLE:i(627)}},function(t,e,i){var n=i(0),r=i(21),s=i(95),o=i(2),a=i(155),h=i(240),l=i(517),c=i(156),i=new n({initialize:function(t,e){this.loader=t,this.cache=o(e,"cache",!1),this.type=o(e,"type",!1),this.key=o(e,"key",!1);var i=this.key;if(t.prefix&&""!==t.prefix&&(this.key=t.prefix+i),!this.type||!this.key)throw new Error("Invalid Loader."+this.type+" key");var n=o(e,"url");void 0===n?n=t.path+i+"."+o(e,"extension",""):"string"!=typeof n||n.match(/^(?:blob:|data:|http:\/\/|https:\/\/|\/\/)/)||(n=t.path+n),this.url=n,this.src="",this.xhrSettings=c(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?r.FILE_POPULATED:r.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},setLink:function(t){(this.linkFile=t).linkFile=this},resetXHR:function(){this.xhrLoader&&(this.xhrLoader.onload=void 0,this.xhrLoader.onerror=void 0,this.xhrLoader.onprogress=void 0)},load:function(){this.state===r.FILE_POPULATED?this.loader.nextFile(this,!0):(this.state=r.FILE_LOADING,this.src=a(this,this.loader.baseURL),0!==this.src.indexOf("data:")&&(this.xhrLoader=l(this,this.loader.xhr)))},onLoad:function(t,e){var i=t.responseURL&&(0===t.responseURL.indexOf("file://")||0===t.responseURL.indexOf("capacitor://"))&&0===e.target.status,e=!(e.target&&200!==e.target.status)||i;4===t.readyState&&400<=t.status&&t.status<=599&&(e=!1),this.state=r.FILE_LOADED,this.resetXHR(),this.loader.nextFile(this,e)},onError:function(){this.resetXHR(),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(s.FILE_PROGRESS,this,this.percentComplete))},onProcess:function(){this.state=r.FILE_PROCESSING,this.onProcessComplete()},onProcessComplete:function(){this.state=r.FILE_COMPLETE,this.multiFile&&this.multiFile.onFileComplete(this),this.loader.fileProcessComplete(this)},onProcessError:function(){this.state=r.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.cache.add(this.key,this.data),this.pendingDestroy()},pendingDestroy:function(t){void 0===t&&(t=this.data);var e=this.key,i=this.type;this.loader.emit(s.FILE_COMPLETE,e,i,t),this.loader.emit(s.FILE_KEY_COMPLETE+i+"-"+e,e,i,t),this.loader.flagForRemoval(this)},destroy:function(){this.loader=null,this.cache=null,this.xhrSettings=null,this.multiFile=null,this.linkFile=null,this.data=null}});i.createObjectURL=function(t,e,i){var n;"function"==typeof URL?t.src=URL.createObjectURL(e):((n=new FileReader).onload=function(){t.removeAttribute("crossOrigin"),t.src="data:"+(e.type||i)+";base64,"+n.result.split(",")[1]},n.onerror=t.onerror,n.readAsDataURL(e))},i.revokeObjectURL=function(t){"function"==typeof URL&&URL.revokeObjectURL(t.src)},t.exports=i},function(t,e){var r={},s={};t.exports={register:function(t,e,i,n){r[t]={plugin:e,mapping:i,custom:n=void 0===n?!1:n}},registerCustom:function(t,e,i,n){s[t]={plugin:e,mapping:i,data:n}},hasCore:function(t){return r.hasOwnProperty(t)},hasCustom:function(t){return s.hasOwnProperty(t)},getCore:function(t){return r[t]},getCustom:function(t){return s[t]},getCustomClass:function(t){return s.hasOwnProperty(t)?s[t].plugin:null},remove:function(t){r.hasOwnProperty(t)&&delete r[t]},removeCustom:function(t){s.hasOwnProperty(t)&&delete s[t]},destroyCorePlugins:function(){for(var t in r)r.hasOwnProperty(t)&&delete r[t]},destroyCustomPlugins:function(){for(var t in s)s.hasOwnProperty(t)&&delete s[t]}}},function(t,e,i){var n=i(0),r=i(14),c=i(3),i=new n({initialize:function(t,e,i,n,r,s){void 0===t&&(t=1),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=1),void 0===r&&(r=0),void 0===s&&(s=0),this.matrix=new Float32Array([t,e,i,n,r,s,0,0,1]),this.decomposedMatrix={translateX:0,translateY:0,scaleX:1,scaleY:1,rotation:0}},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)*(Math.atan(-this.c/this.a)<0?-1:1)}},rotationNormalized:{get:function(){var t=this.matrix,e=t[0],i=t[1],n=t[2],t=t[3];return e||i?0<i?Math.acos(e/this.scaleX):-Math.acos(e/this.scaleX):n||t?r.TAU-(0<t?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),t=Math.cos(t),i=this.matrix,n=i[0],r=i[1],s=i[2],o=i[3];return i[0]=n*t+s*e,i[1]=r*t+o*e,i[2]=n*-e+s*t,i[3]=r*-e+o*t,this},multiply:function(t,e){var i=this.matrix,t=t.matrix,n=i[0],r=i[1],s=i[2],o=i[3],a=i[4],i=i[5],h=t[0],l=t[1],c=t[2],u=t[3],d=t[4],t=t[5],e=void 0===e?this:e;return e.a=h*n+l*s,e.b=h*r+l*o,e.c=c*n+u*s,e.d=c*r+u*o,e.e=d*n+t*s+a,e.f=d*r+t*o+i,e},multiplyWithOffset:function(t,e,i){var n=this.matrix,t=t.matrix,r=n[0],s=n[1],o=n[2],a=n[3],h=e*r+i*o+n[4],e=e*s+i*a+n[5],i=t[0],l=t[1],c=t[2],u=t[3],d=t[4],t=t[5];return n[0]=i*r+l*o,n[1]=i*s+l*a,n[2]=c*r+u*o,n[3]=c*s+u*a,n[4]=d*r+t*o+h,n[5]=d*s+t*a+e,this},transform:function(t,e,i,n,r,s){var o=this.matrix,a=o[0],h=o[1],l=o[2],c=o[3],u=o[4],d=o[5];return o[0]=t*a+e*l,o[1]=t*h+e*c,o[2]=i*a+n*l,o[3]=i*h+n*c,o[4]=r*a+s*l+u,o[5]=r*h+s*c+d,this},transformPoint:function(t,e,i){var n=this.matrix,r=n[0],s=n[1],o=n[2],a=n[3],h=n[4],n=n[5];return(i=void 0===i?{x:0,y:0}:i).x=t*r+e*o+h,i.y=t*s+e*a+n,i},invert:function(){var t=this.matrix,e=t[0],i=t[1],n=t[2],r=t[3],s=t[4],o=t[5],a=e*r-i*n;return t[0]=r/a,t[1]=-i/a,t[2]=-n/a,t[3]=e/a,t[4]=(n*o-r*s)/a,t[5]=-(e*o-i*s)/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},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){var e=this.matrix;return t.setTransform(e[0],e[1],e[2],e[3],e[4],e[5]),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,r,s){var o=this.matrix;return o[0]=t,o[1]=e,o[2]=i,o[3]=n,o[4]=r,o[5]=s,this},decomposeMatrix:function(){var t=this.decomposedMatrix,e=this.matrix,i=e[0],n=e[1],r=e[2],s=e[3],o=i*s-n*r;return t.translateX=e[4],t.translateY=e[5],i||n?(e=Math.sqrt(i*i+n*n),t.rotation=0<n?Math.acos(i/e):-Math.acos(i/e),t.scaleX=e,t.scaleY=o/e):r||s?(n=Math.sqrt(r*r+s*s),t.rotation=.5*Math.PI-(0<s?Math.acos(-r/n):-Math.acos(r/n)),t.scaleX=o/n,t.scaleY=n):(t.rotation=0,t.scaleX=0,t.scaleY=0),t},applyITRS:function(t,e,i,n,r){var s=this.matrix,o=Math.sin(i),i=Math.cos(i);return s[4]=t,s[5]=e,s[0]=i*n,s[1]=o*n,s[2]=-o*r,s[3]=i*r,this},applyInverse:function(t,e,i){void 0===i&&(i=new c);var n=this.matrix,r=n[0],s=n[1],o=n[2],a=n[3],h=n[4],n=n[5],l=1/(r*a+o*-s);return i.x=a*l*t+-o*l*e+(n*o-h*a)*l,i.y=r*l*e+-s*l*t+(-n*r+h*s)*l,i},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){t=this.getX(t,e);return t=i?Math.round(t):t},getYRound:function(t,e,i){t=this.getY(t,e);return t=i?Math.round(t):t},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.decomposedMatrix=null}});t.exports=i},function(t,e,i){var p=i(2);t.exports=function(t,e,i,n,r,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=s.width),void 0===n&&(n=s.height);var o=p(r=r||{},"isNotEmpty",!1),a=p(r,"isColliding",!1),h=p(r,"hasInterestingFace",!1);t<0&&(i+=t,t=0),e<0&&(n+=e,e=0),t+i>s.width&&(i=Math.max(s.width-t,0)),e+n>s.height&&(n=Math.max(s.height-e,0));for(var l=[],c=e;c<e+n;c++)for(var u=t;u<t+i;u++){var d=s.data[c][u];null===d||o&&-1===d.index||a&&!d.collides||h&&!d.hasInterestingFace||l.push(d)}return l}},function(t,e){t.exports=function(t,e,i,n,r,s){void 0===n&&(n=0),void 0===r&&(r=0);var o,a=0,h=t.length;if(1===(s=void 0===s?1:s))for(o=r;o<h;o++)t[o][e]=i+a*n,a++;else for(o=r;0<=o;o--)t[o][e]=i+a*n,a++;return t}},function(t,e,i){var s=i(35),o=i(13);t.exports=function(t,e,i){e.x=o(i,"x",0),e.y=o(i,"y",0),e.depth=o(i,"depth",0),e.flipX=o(i,"flipX",!1),e.flipY=o(i,"flipY",!1);var n=o(i,"scale",null),n=("number"==typeof n?e.setScale(n):null!==n&&(e.scaleX=o(n,"x",1),e.scaleY=o(n,"y",1)),o(i,"scrollFactor",null)),n=("number"==typeof n?e.setScrollFactor(n):null!==n&&(e.scrollFactorX=o(n,"x",1),e.scrollFactorY=o(n,"y",1)),e.rotation=o(i,"rotation",0),o(i,"angle",null));null!==n&&(e.angle=n),e.alpha=o(i,"alpha",1);var r,n=o(i,"origin",null);return"number"==typeof n?e.setOrigin(n):null!==n&&(r=o(n,"x",.5),n=o(n,"y",.5),e.setOrigin(r,n)),e.blendMode=o(i,"blendMode",s.NORMAL),e.visible=o(i,"visible",!0),o(i,"add",!0)&&t.sys.displayList.add(e),e.preUpdate&&t.sys.updateList.add(e),e}},function(t,e){t.exports={ORTHOGONAL:0,ISOMETRIC:1,STAGGERED:2,HEXAGONAL:3}},function(t,e,i){var o=i(19);t.exports=function(t,e,i,n,r){var s=n.alpha*i.alpha;return!(s<=0)&&(n=o(i,n,r).calc,e.globalCompositeOperation=t.blendModes[i.blendMode],e.globalAlpha=s,e.save(),n.setToContext(e),e.imageSmoothingEnabled=!(!t.antialias||i.frame&&i.frame.source.scaleMode),!0)}},function(t,e,i){var o,a=i(33),h=i(192),l=[],c=!1;function n(t,e,i,n,r){void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=a.CANVAS),void 0===r&&(r=!1);var s=o(n),t=(null===s?(s={parent:t,canvas:document.createElement("canvas"),type:n},n===a.CANVAS&&l.push(s)):s.parent=t,s.canvas);return r&&(s.parent=t),t.width=e,t.height=i,c&&n===a.CANVAS&&h.disable(t.getContext("2d")),t}function r(){var e=0;return l.forEach(function(t){t.parent&&e++}),e}t.exports={create2D:function(t,e,i){return n(t,e,i,a.CANVAS)},create:n,createWebGL:function(t,e,i){return n(t,e,i,a.WEBGL)},disableSmoothing:function(){c=!0},enableSmoothing:function(){c=!1},first:o=function(t){if((t=void 0===t?a.CANVAS:t)!==a.WEBGL)for(var e=0;e<l.length;e++){var i=l[e];if(!i.parent&&i.type===t)return i}return null},free:function(){return l.length-r()},pool:l,remove:function(e){var i=e instanceof HTMLCanvasElement;l.forEach(function(t){(i&&t.canvas===e||!i&&t.parent===e)&&(t.parent=null,t.canvas.width=1,t.canvas.height=1)})},total:r}},function(t,e){var i,h={};(t.exports=h)._nextId=0,h._seed=0,h._nowStartTime=+new Date,h.extend=function(t,e){for(var i,n="boolean"==typeof e?(i=2,e):(i=1,!0),r=i;r<arguments.length;r++){var s=arguments[r];if(s)for(var o in s)!n||!s[o]||s[o].constructor!==Object||t[o]&&t[o].constructor!==Object?t[o]=s[o]:(t[o]=t[o]||{},h.extend(t[o],n,s[o]))}return t},h.clone=function(t,e){return h.extend({},e,t)},h.keys=function(t){if(Object.keys)return Object.keys(t);var e,i=[];for(e in t)i.push(e);return i},h.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]]);else for(var r in t)e.push(t[r]);return e},h.get=function(t,e,i,n){e=e.split(".").slice(i,n);for(var r=0;r<e.length;r+=1)t=t[e[r]];return t},h.set=function(t,e,i,n,r){n=e.split(".").slice(n,r);return h.get(t,e,0,-1)[n[n.length-1]]=i},h.shuffle=function(t){for(var e=t.length-1;0<e;e--){var i=Math.floor(h.random()*(e+1)),n=t[e];t[e]=t[i],t[i]=n}return t},h.choose=function(t){return t[Math.floor(h.random()*t.length)]},h.isElement=function(t){return"undefined"!=typeof HTMLElement?t instanceof HTMLElement:!!(t&&t.nodeType&&t.nodeName)},h.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)},h.isFunction=function(t){return"function"==typeof t},h.isPlainObject=function(t){return"object"==typeof t&&t.constructor===Object},h.isString=function(t){return"[object String]"===Object.prototype.toString.call(t)},h.clamp=function(t,e,i){return t<e?e:i<t?i:t},h.sign=function(t){return t<0?-1:1},h.now=function(){if("undefined"!=typeof window&&window.performance){if(window.performance.now)return window.performance.now();if(window.performance.webkitNow)return window.performance.webkitNow()}return new Date-h._nowStartTime},h.random=function(t,e){return e=void 0!==e?e:1,(t=void 0!==t?t:0)+i()*(e-t)},i=function(){return h._seed=(9301*h._seed+49297)%233280,h._seed/233280},h.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)},h.logLevel=1,h.log=function(){console&&0<h.logLevel&&h.logLevel},h.info=function(){console&&0<h.logLevel&&h.logLevel},h.warn=function(){console&&0<h.logLevel&&h.logLevel},h.nextId=function(){return h._nextId++},h.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},h.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},h.topologicalSort=function(t){var e,i=[],n=[],r=[];for(e in t)n[e]||r[e]||h._topologicalSort(e,n,r,t,i);return i},h._topologicalSort=function(t,e,i,n,r){var s=n[t]||[];i[t]=!0;for(var o=0;o<s.length;o+=1){var a=s[o];i[a]||e[a]||h._topologicalSort(a,e,i,n,r)}i[t]=!1,e[t]=!0,r.push(t)},h.chain=function(){for(var s=[],t=0;t<arguments.length;t+=1){var e=arguments[t];e._chained?s.push.apply(s,e._chained):s.push(e)}function i(){for(var t,e=new Array(arguments.length),i=0,n=arguments.length;i<n;i++)e[i]=arguments[i];for(i=0;i<s.length;i+=1){var r=s[i].apply(t,e);void 0!==r&&(t=r)}return t}return i._chained=s,i},h.chainPathBefore=function(t,e,i){return h.set(t,e,h.chain(i,h.get(t,e)))},h.chainPathAfter=function(t,e,i){return h.set(t,e,h.chain(h.get(t,e),i))}},function(t,e,i){i={VERSION:"3.55.2",BlendModes:i(35),ScaleModes:i(168),AUTO:0,CANVAS:1,WEBGL:2,HEADLESS:3,FOREVER:-1,NONE:4,UP:5,DOWN:6,LEFT:7,RIGHT:8};t.exports=i},function(t,e,i){var n=i(0),r=i(11),s=i(15),o=i(47),i=new n({Extends:s,Mixins:[r.AlphaSingle,r.BlendMode,r.Depth,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Transform,r.Visible],initialize:function(t,e,i){s.call(this,t,e=void 0===e?"Shape":e),this.geom=i,this.pathData=[],this.pathIndexes=[],this.fillColor=16777215,this.fillAlpha=1,this.strokeColor=16777215,this.strokeAlpha=1,this.lineWidth=1,this.isFilled=!1,this.isStroked=!1,this.closePath=!0,this._tempLine=new o,this.width=0,this.height=0,this.initPipeline()},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}}});t.exports=i},function(t,e){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}},function(t,e,i){var n=i(14);t.exports=function(t){return t*n.DEG_TO_RAD}},function(t,e,i){t.exports={DESTROY:i(743),FADE_IN_COMPLETE:i(744),FADE_IN_START:i(745),FADE_OUT_COMPLETE:i(746),FADE_OUT_START:i(747),FLASH_COMPLETE:i(748),FLASH_START:i(749),FOLLOW_UPDATE:i(750),PAN_COMPLETE:i(751),PAN_START:i(752),POST_RENDER:i(753),PRE_RENDER:i(754),ROTATE_COMPLETE:i(755),ROTATE_START:i(756),SHAKE_COMPLETE:i(757),SHAKE_START:i(758),ZOOM_COMPLETE:i(759),ZOOM_START:i(760)}},function(t,e,i){var n=i(0),s=i(103),o=i(328),r=i(188),a=i(329),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,r){return void 0===n&&(n=255),void 0===r&&(r=!0),this._locked=!0,this.red=t,this.green=e,this.blue=i,this.alpha=n,this._locked=!1,this.update(r)},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 r(t,e,i,this)},update:function(t){var e,i,n,r;return void 0===t&&(t=!1),this._locked||(e=this.r,i=this.g,n=this.b,r=this.a,this._color=s(e,i,n),this._color32=o(e,i,n,r),this._rgba="rgba("+e+","+i+","+n+","+r/255+")",t&&a(e,i,n,this)),this},updateHSV:function(){var t=this.r,e=this.g,i=this.b;return a(t,e,i,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)),e=Math.floor(t+Math.random()*(e-t));return this.setTo(i,n,e)},randomGray:function(t,e){void 0===t&&(t=0),void 0===e&&(e=255);e=Math.floor(t+Math.random()*(e-t));return this.setTo(e,e,e)},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,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)));return 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,r(t,this._s,this._v,this)}},s:{get:function(){return this._s},set:function(t){this._s=t,r(this._h,t,this._v,this)}},v:{get:function(){return this._v},set:function(t){this._v=t,r(this._h,this._s,t,this)}}});t.exports=h},function(t,e,i){var n=new(i(0))({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},crossVectors:function(t,e){var i=t.x,n=t.y,t=t.z,r=e.x,s=e.y,e=e.z;return this.x=n*e-t*s,this.y=t*r-i*e,this.z=i*s-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 this.x=t[e=void 0===e?0: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,t=t.z-this.z||0;return Math.sqrt(e*e+i*i+t*t)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,t=t.z-this.z||0;return e*e+i*i+t*t},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 0<n&&(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,r=t.x,s=t.y,t=t.z;return this.x=i*t-n*s,this.y=n*r-e*t,this.z=e*s-i*r,this},lerp:function(t,e){var i=this.x,n=this.y,r=this.z;return this.x=i+(e=void 0===e?0:e)*(t.x-i),this.y=n+e*(t.y-n),this.z=r+e*(t.z-r),this},applyMatrix3:function(t){var e=this.x,i=this.y,n=this.z,t=t.val;return this.x=t[0]*e+t[3]*i+t[6]*n,this.y=t[1]*e+t[4]*i+t[7]*n,this.z=t[2]*e+t[5]*i+t[8]*n,this},applyMatrix4:function(t){var e=this.x,i=this.y,n=this.z,t=t.val,r=1/(t[3]*e+t[7]*i+t[11]*n+t[15]);return this.x=(t[0]*e+t[4]*i+t[8]*n+t[12])*r,this.y=(t[1]*e+t[5]*i+t[9]*n+t[13])*r,this.z=(t[2]*e+t[6]*i+t[10]*n+t[14])*r,this},transformMat3:function(t){var e=this.x,i=this.y,n=this.z,t=t.val;return this.x=e*t[0]+i*t[3]+n*t[6],this.y=e*t[1]+i*t[4]+n*t[7],this.z=e*t[2]+i*t[5]+n*t[8],this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,t=t.val;return this.x=t[0]*e+t[4]*i+t[8]*n+t[12],this.y=t[1]*e+t[5]*i+t[9]*n+t[13],this.z=t[2]*e+t[6]*i+t[10]*n+t[14],this},transformCoordinates:function(t){var e=this.x,i=this.y,n=this.z,t=t.val,r=e*t[0]+i*t[4]+n*t[8]+t[12],s=e*t[1]+i*t[5]+n*t[9]+t[13],o=e*t[2]+i*t[6]+n*t[10]+t[14],e=e*t[3]+i*t[7]+n*t[11]+t[15];return this.x=r/e,this.y=s/e,this.z=o/e,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,r=t.x,s=t.y,o=t.z,t=t.w,a=t*e+s*n-o*i,h=t*i+o*e-r*n,l=t*n+r*i-s*e,e=-r*e-s*i-o*n;return this.x=a*t+e*-r+h*-o-l*-s,this.y=h*t+e*-s+l*-r-a*-o,this.z=l*t+e*-o+a*-s-h*-r,this},project:function(t){var e=this.x,i=this.y,n=this.z,t=t.val,r=t[0],s=t[1],o=t[2],a=t[3],h=t[4],l=t[5],c=t[6],u=t[7],d=t[8],p=t[9],f=t[10],g=t[11],m=t[12],y=t[13],v=t[14],a=1/(e*a+i*u+n*g+t[15]);return this.x=(e*r+i*h+n*d+m)*a,this.y=(e*s+i*l+n*p+y)*a,this.z=(e*o+i*c+n*f+v)*a,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,r=t.z,t=t.w,i=this.x-i,n=t-this.y-1-n,s=this.z;return this.x=2*i/r-1,this.y=2*n/t-1,this.z=2*s-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},function(t,e){t.exports={CSV:0,TILED_JSON:1,ARRAY_2D:2,WELTMEISTER:3}},function(t,e,i){var n,u={},d=(t.exports=u,i(64)),h=i(83),r=i(165),s=i(32),p=i(84),l=i(271);u._inertiaScale=4,u._nextCollidingGroupId=1,u._nextNonCollidingGroupId=-1,u._nextCategory=1,u.create=function(t){var e={id:s.nextId(),type:"body",label:"Body",parts:[],plugin:{},angle:0,vertices:null,position:{x:0,y:0},force:{x:0,y:0},torque:0,positionImpulse:{x:0,y:0},previousPositionImpulse:{x:0,y:0},constraintImpulse:{x:0,y:0,angle:0},totalContacts:0,speed:0,angularSpeed:0,velocity:{x:0,y:0},angularVelocity:0,isSensor:!1,isStatic:!1,isSleeping:!1,motion:0,sleepThreshold:60,density:.001,restitution:0,friction:.1,frictionStatic:.5,frictionAir:.01,collisionFilter:{category:1,mask:4294967295,group:0},slop:.05,timeScale:1,events:null,bounds:null,chamfer:null,circleRadius:0,positionPrev:null,anglePrev:0,parent:null,axes:null,area:0,mass:0,inverseMass:0,inertia:0,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:{}},e=(!t.hasOwnProperty("position")&&t.hasOwnProperty("vertices")?t.position=d.centre(t.vertices):t.hasOwnProperty("vertices")||(e.vertices=d.fromPath("L 0 0 L 40 0 L 40 40 L 0 40")),s.extend(e,t));return n(e,t),e.setOnCollideWith=function(t,e){return e?this.onCollideWith[t.id]=e:delete this.onCollideWith[t.id],this},e},u.nextGroup=function(t){return t?u._nextNonCollidingGroupId--:u._nextCollidingGroupId++},u.nextCategory=function(){return u._nextCategory=u._nextCategory<<1,u._nextCategory},n=function(t,e){e=e||{},u.set(t,{bounds:t.bounds||p.create(t.vertices),positionPrev:t.positionPrev||h.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});var i,n,r,s=t.bounds;d.rotate(t.vertices,t.angle,t.position),l.rotate(t.axes,t.angle),p.update(s,t.vertices,t.velocity),u.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&&(e=t.centerOfMass,i=t.centerOffset,n=s.max.x-s.min.x,r=s.max.y-s.min.y,e.x=-(s.min.x-t.position.x)/n,e.y=-(s.min.y-t.position.y)/r,i.x=n*e.x,i.y=r*e.y)},u.set=function(t,e,i){for(var 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":u.setStatic(t,i);break;case"isSleeping":r.set(t,i);break;case"mass":u.setMass(t,i);break;case"density":u.setDensity(t,i);break;case"inertia":u.setInertia(t,i);break;case"vertices":u.setVertices(t,i);break;case"position":u.setPosition(t,i);break;case"angle":u.setAngle(t,i);break;case"velocity":u.setVelocity(t,i);break;case"angularVelocity":u.setAngularVelocity(t,i);break;case"parts":u.setParts(t,i);break;case"centre":u.setCentre(t,i);break;default:t[n]=i}},u.setStatic=function(t,e){for(var i=0;i<t.parts.length;i++){var n=t.parts[i];(n.isStatic=e)?(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)}},u.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},u.setDensity=function(t,e){u.setMass(t,e*t.area),t.density=e},u.setInertia=function(t,e){t.inertia=e,t.inverseInertia=1/t.inertia},u.setVertices=function(t,e){e[0].body===t?t.vertices=e:t.vertices=d.create(e,t),t.axes=l.fromVertices(t.vertices),t.area=d.area(t.vertices),u.setMass(t,t.density*t.area);e=d.centre(t.vertices);d.translate(t.vertices,e,-1),u.setInertia(t,u._inertiaScale*d.inertia(t.vertices,t.mass)),d.translate(t.vertices,t.position),p.update(t.bounds,t.vertices,t.velocity)},u.setParts=function(t,e,i){for(e=e.slice(0),t.parts.length=0,t.parts.push(t),t.parent=t,s=0;s<e.length;s++){var n=e[s];n!==t&&(n.parent=t).parts.push(n)}if(1!==t.parts.length){if(i=void 0===i||i){for(var r=[],s=0;s<e.length;s++)r=r.concat(e[s].vertices);d.clockwiseSort(r);var i=d.hull(r),o=d.centre(i);u.setVertices(t,i),d.translate(t.vertices,o)}var i=u._totalProperties(t),o=i.centre.x,a=i.centre.y,h=t.bounds,l=t.centerOfMass,c=t.centerOffset;p.update(h,t.vertices,t.velocity),l.x=-(h.min.x-o)/(h.max.x-h.min.x),l.y=-(h.min.y-a)/(h.max.y-h.min.y),c.x=o,c.y=a,t.area=i.area,(t.parent=t).position.x=o,t.position.y=a,t.positionPrev.x=o,t.positionPrev.y=a,u.setMass(t,i.mass),u.setInertia(t,i.inertia),u.setPosition(t,i.centre)}},u.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)},u.setPosition=function(t,e){var i=h.sub(e,t.position);t.positionPrev.x+=i.x,t.positionPrev.y+=i.y;for(var n=0;n<t.parts.length;n++){var r=t.parts[n];r.position.x+=i.x,r.position.y+=i.y,d.translate(r.vertices,i),p.update(r.bounds,r.vertices,t.velocity)}},u.setAngle=function(t,e){var i=e-t.angle;t.anglePrev+=i;for(var n=0;n<t.parts.length;n++){var r=t.parts[n];r.angle+=i,d.rotate(r.vertices,i,t.position),l.rotate(r.axes,i),p.update(r.bounds,r.vertices,t.velocity),0<n&&h.rotateAbout(r.position,i,t.position,r.position)}},u.setVelocity=function(t,e){t.positionPrev.x=t.position.x-e.x,t.positionPrev.y=t.position.y-e.y,t.velocity.x=e.x,t.velocity.y=e.y,t.speed=h.magnitude(t.velocity)},u.setAngularVelocity=function(t,e){t.anglePrev=t.angle-e,t.angularVelocity=e,t.angularSpeed=Math.abs(t.angularVelocity)},u.translate=function(t,e){u.setPosition(t,h.add(t.position,e))},u.rotate=function(t,e,i){var n,r,s,o;i&&(n=Math.cos(e),r=Math.sin(e),s=t.position.x-i.x,o=t.position.y-i.y,u.setPosition(t,{x:i.x+(s*n-o*r),y:i.y+(s*r+o*n)})),u.setAngle(t,t.angle+e)},u.scale=function(t,e,i,n){var r=0,s=0;n=n||t.position;for(var o=0;o<t.parts.length;o++){var a=t.parts[o];a.scale.x=e,a.scale.y=i,d.scale(a.vertices,e,i,n),a.axes=l.fromVertices(a.vertices),a.area=d.area(a.vertices),u.setMass(a,t.density*a.area),d.translate(a.vertices,{x:-a.position.x,y:-a.position.y}),u.setInertia(a,u._inertiaScale*d.inertia(a.vertices,a.mass)),d.translate(a.vertices,{x:a.position.x,y:a.position.y}),0<o&&(r+=a.area,s+=a.inertia),a.position.x=n.x+(a.position.x-n.x)*e,a.position.y=n.y+(a.position.y-n.y)*i,p.update(a.bounds,a.vertices,t.velocity)}1<t.parts.length&&(t.area=r,t.isStatic||(u.setMass(t,t.density*r),u.setInertia(t,s))),t.circleRadius&&(e===i?t.circleRadius*=e:t.circleRadius=null)},u.update=function(t,e,i,n){var e=Math.pow(e*i*t.timeScale,2),i=1-t.frictionAir*i*t.timeScale,r=t.position.x-t.positionPrev.x,s=t.position.y-t.positionPrev.y;t.velocity.x=r*i*n+t.force.x/t.mass*e,t.velocity.y=s*i*n+t.force.y/t.mass*e,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.angularVelocity=(t.angle-t.anglePrev)*i*n+t.torque/t.inertia*e,t.anglePrev=t.angle,t.angle+=t.angularVelocity,t.speed=h.magnitude(t.velocity),t.angularSpeed=Math.abs(t.angularVelocity);for(var o=0;o<t.parts.length;o++){var a=t.parts[o];d.translate(a.vertices,t.velocity),0<o&&(a.position.x+=t.velocity.x,a.position.y+=t.velocity.y),0!==t.angularVelocity&&(d.rotate(a.vertices,t.angularVelocity,t.position),l.rotate(a.axes,t.angularVelocity),0<o&&h.rotateAbout(a.position,t.angularVelocity,t.position,a.position)),p.update(a.bounds,a.vertices,t.velocity)}},u.applyForce=function(t,e,i){t.force.x+=i.x,t.force.y+=i.y;var n=e.x-t.position.x,e=e.y-t.position.y;t.torque+=n*i.y-e*i.x},u._totalProperties=function(t){for(var e={mass:0,area:0,inertia:0,centre:{x:0,y:0}},i=1===t.parts.length?0:1;i<t.parts.length;i++){var n=t.parts[i],r=n.mass!==1/0?n.mass:1;e.mass+=r,e.area+=n.area,e.inertia+=n.inertia,e.centre=h.add(e.centre,h.mult(n.position,r))}return e.centre=h.div(e.centre,e.mass),e}},function(t,e){t.exports=function(t){return t.y+t.height-t.height*t.originY}},function(t,e){t.exports=function(t){return t.x-t.width*t.originX}},function(t,e){t.exports=function(t){return t.x+t.width-t.width*t.originX}},function(t,e){t.exports=function(t){return t.y-t.height*t.originY}},function(t,e){t.exports=function(t,e,i,n,r,s){void 0===n&&(n=0),void 0===r&&(r=0);var o,a=0,h=t.length;if(1===(s=void 0===s?1:s))for(o=r;o<h;o++)t[o][e]+=i+a*n,a++;else for(o=r;0<=o;o--)t[o][e]+=i+a*n,a++;return t}},function(t,e,i){var n=i(0),r=i(307),s=i(172),o=i(56),a=i(173),h=i(3),i=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 r(this,t,e)},getPoints:function(t,e,i){return s(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i,n){return void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x1=t=void 0===t?0:t,this.y1=e,this.x2=i,this.y2=n,this},getPointA:function(t){return(t=void 0===t?new h:t).set(this.x1,this.y1),t},getPointB:function(t){return(t=void 0===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}}});t.exports=i},function(t,e){t.exports=function(t,e,i,n){i=i||e.fillColor,n=n||e.fillAlpha;t.fillStyle="rgba("+((16711680&i)>>>16)+","+((65280&i)>>>8)+","+(255&i)+","+n+")"}},function(t,e,i){i=new(i(0))({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,this.multiKeyIndex=t.multiKeyIndex++,this.files=r,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 s=0;s<r.length;s++)r[s].multiFile=this},isReadyToProcess:function(){return 0===this.pending&&0===this.failed&&!this.complete},addToMultiFile:function(t){return this.files.push(t),(t.multiFile=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++}});t.exports=i},function(t,e){t.exports=function(t,e,i,n){t-=i,i=e-n;return Math.sqrt(t*t+i*i)}},function(t,e,i){t.exports={BOOT:i(922),DESTROY:i(923),DRAG_END:i(924),DRAG_ENTER:i(925),DRAG:i(926),DRAG_LEAVE:i(927),DRAG_OVER:i(928),DRAG_START:i(929),DROP:i(930),GAME_OUT:i(931),GAME_OVER:i(932),GAMEOBJECT_DOWN:i(933),GAMEOBJECT_DRAG_END:i(934),GAMEOBJECT_DRAG_ENTER:i(935),GAMEOBJECT_DRAG:i(936),GAMEOBJECT_DRAG_LEAVE:i(937),GAMEOBJECT_DRAG_OVER:i(938),GAMEOBJECT_DRAG_START:i(939),GAMEOBJECT_DROP:i(940),GAMEOBJECT_MOVE:i(941),GAMEOBJECT_OUT:i(942),GAMEOBJECT_OVER:i(943),GAMEOBJECT_POINTER_DOWN:i(944),GAMEOBJECT_POINTER_MOVE:i(945),GAMEOBJECT_POINTER_OUT:i(946),GAMEOBJECT_POINTER_OVER:i(947),GAMEOBJECT_POINTER_UP:i(948),GAMEOBJECT_POINTER_WHEEL:i(949),GAMEOBJECT_UP:i(950),GAMEOBJECT_WHEEL:i(951),MANAGER_BOOT:i(952),MANAGER_PROCESS:i(953),MANAGER_UPDATE:i(954),POINTER_DOWN:i(955),POINTER_DOWN_OUTSIDE:i(956),POINTER_MOVE:i(957),POINTER_OUT:i(958),POINTER_OVER:i(959),POINTER_UP:i(960),POINTER_UP_OUTSIDE:i(961),POINTER_WHEEL:i(962),POINTERLOCK_CHANGE:i(963),PRE_UPDATE:i(964),SHUTDOWN:i(965),START:i(966),UPDATE:i(967)}},function(t,e){t.exports=function(t,e){return t.y=e+t.height*t.originY,t}},function(t,e){t.exports=function(t,e){return t.x=e+t.width*t.originX,t}},function(t,e){t.exports=function(t,e){return t.x=e-t.width+t.width*t.originX,t}},function(t,e){t.exports=function(t,e){return t.y=e-t.height+t.height*t.originY,t}},function(t,e){t.exports={CIRCLE:0,ELLIPSE:1,LINE:2,POINT:3,POLYGON:4,RECTANGLE:5,TRIANGLE:6}},function(t,e){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}},function(t,e,i){var n=i(0),y=i(175),r=i(9),f=i(374),v=i(2),g=i(69),m=i(91),x=i(141),b=i(12),w=i(375),i=new n({Extends:r,initialize:function(t){r.call(this);var e=t.game,i=e.renderer,n=i.gl;this.name=v(t,"name","WebGLPipeline"),this.game=e,this.renderer=i,this.manager,this.gl=n,this.view=e.canvas,this.width=0,this.height=0,this.vertexCount=0,this.vertexCapacity=0,this.vertexData,this.vertexBuffer,this.topology=v(t,"topology",n.TRIANGLES),this.bytes,this.vertexViewF32,this.vertexViewU32,this.active=!0,this.currentUnit=0,this.forceZero=v(t,"forceZero",!1),this.hasBooted=!1,this.isPostFX=!1,this.renderTargets=[],this.currentRenderTarget,this.shaders=[],this.currentShader,this.projectionMatrix,this.projectionWidth=0,this.projectionHeight=0,this.config=t,this.glReset=!1},boot:function(){var t=this.gl,e=this.config,i=this.renderer,n=(this.isPostFX||(this.projectionMatrix=(new g).identity()),this.renderTargets),r=v(e,"renderTarget",!1),s=i.width,o=i.height;if("number"==typeof(r="boolean"==typeof r&&r?1:r))for(d=0;d<r;d++)n.push(new x(i,s,o,1,0,!0));else if(Array.isArray(r))for(d=0;d<r.length;d++){var a=v(r[d],"scale",1),h=v(r[d],"minFilter",0),l=v(r[d],"autoClear",1);n.push(new x(i,s,o,a,h,l))}n.length&&(this.currentRenderTarget=n[0]),this.setShadersFromConfig(e);for(var c=this.shaders,u=0,d=0;d<c.length;d++)c[d].vertexSize>u&&(u=c[d].vertexSize);var p=v(e,"batchSize",i.config.batchSize),p=(this.vertexCapacity=6*p,new ArrayBuffer(this.vertexCapacity*u)),e=(this.vertexData=p,this.bytes=new Uint8Array(p),this.vertexViewF32=new Float32Array(p),this.vertexViewU32=new Uint32Array(p),v(e,"vertices",null));for(e?(this.vertexViewF32.set(e),this.vertexBuffer=i.createVertexBuffer(p,t.STATIC_DRAW)):this.vertexBuffer=i.createVertexBuffer(p.byteLength,t.DYNAMIC_DRAW),this.setVertexBuffer(),d=c.length-1;0<=d;d--)c[d].rebind();this.hasBooted=!0,i.on(m.RESIZE,this.resize,this),i.on(m.PRE_RENDER,this.onPreRender,this),i.on(m.RENDER,this.onRender,this),i.on(m.POST_RENDER,this.onPostRender,this),this.emit(f.BOOT,this),this.onBoot()},onBoot:function(){},onResize:function(){},setShader:function(t,e){var i=this.renderer;return t===this.currentShader&&i.currentProgram===this.currentShader.program||(this.flush(),i.resetTextures(),this.setVertexBuffer()&&!e&&(e=!0),t.bind(e,!1),this.currentShader=t),this},getShaderByName:function(t){for(var e=this.shaders,i=0;i<e.length;i++)if(e[i].name===t)return e[i]},setShadersFromConfig:function(t){for(var e=this.shaders,i=this.renderer,n=0;n<e.length;n++)e[n].destroy();var r="vertShader",s="fragShader",o="attributes",a=v(t,r,null),h=b.parseFragmentShaderMaxTextures(v(t,s,null),i.maxTextures),l=v(t,o,null),c=v(t,"shaders",[]),u=c.length;if(0===u)a&&h&&(this.shaders=[new w(this,"default",a,h,y(l))]);else{for(var d=[],n=0;n<u;n++){var p=c[n],f=v(p,"name","default"),g=v(p,r,a),m=b.parseFragmentShaderMaxTextures(v(p,s,h),i.maxTextures),p=v(p,o,l);g&&m&&d.push(new w(this,f,g,m,y(p)))}this.shaders=d}return 0!==this.shaders.length&&(this.currentShader=this.shaders[0]),this},setGameObject:function(t,e){return void 0===e&&(e=t.frame),this.currentUnit=this.renderer.setTextureSource(e.source),this.currentUnit},shouldFlush:function(t){return this.vertexCount+(t=void 0===t?0:t)>this.vertexCapacity},resize:function(t,e){t===this.width&&e===this.height||this.flush(),this.width=t,this.height=e;for(var i=this.renderTargets,n=0;n<i.length;n++)i[n].resize(t,e);return this.setProjectionMatrix(t,e),this.emit(f.RESIZE,t,e,this),this.onResize(t,e),this},setProjectionMatrix:function(t,e){var i=this.projectionMatrix;if(i){this.projectionWidth=t,this.projectionHeight=e,i.ortho(0,t,e,0,-1e3,1e3);for(var n=this.shaders,r="uProjectionMatrix",s=0;s<n.length;s++){var o=n[s];o.hasUniform(r)&&(o.resetUniform(r),o.setMatrix4fv(r,!1,i.val,o))}}return this},updateProjectionMatrix:function(){var t,e;this.projectionMatrix&&(t=this.renderer.projectionWidth,e=this.renderer.projectionHeight,this.projectionWidth===t&&this.projectionHeight===e||this.setProjectionMatrix(t,e))},bind:function(t){var e;return void 0===t&&(t=this.currentShader),this.glReset?this.rebind(t):(e=this.setVertexBuffer(),t.bind(e),this.currentShader=t,this.emit(f.BIND,this,t),this.onActive(t),this)},rebind:function(t){this.setVertexBuffer();for(var e=this.shaders,i=e.length-1;0<=i;i--){var n=e[i].rebind();t&&n!==t||(this.currentShader=n)}return this.emit(f.REBIND,this.currentShader),this.onActive(this.currentShader),this.onRebind(),this.glReset=!1,this},setVertexBuffer:function(){var t=this.gl,e=this.vertexBuffer;return t.getParameter(t.ARRAY_BUFFER_BINDING)!==e&&(t.bindBuffer(t.ARRAY_BUFFER,e),!0)},preBatch:function(t){return this.currentRenderTarget&&this.currentRenderTarget.bind(),this.onPreBatch(t),this},postBatch:function(t){return this.onDraw(this.currentRenderTarget),this.onPostBatch(t),this},onDraw:function(){},unbind:function(){this.currentRenderTarget&&this.currentRenderTarget.unbind()},flush:function(t){var e,i,n;return void 0===t&&(t=!1),0<this.vertexCount&&(this.emit(f.BEFORE_FLUSH,this,t),this.onBeforeFlush(t),e=this.gl,i=this.vertexCount,n=this.currentShader.vertexSize,this.active&&(this.setVertexBuffer(),i===this.vertexCapacity?e.bufferData(e.ARRAY_BUFFER,this.vertexData,e.DYNAMIC_DRAW):e.bufferSubData(e.ARRAY_BUFFER,0,this.bytes.subarray(0,i*n)),e.drawArrays(this.topology,0,i)),this.vertexCount=0,this.emit(f.AFTER_FLUSH,this,t),this.onAfterFlush(t)),this},onActive:function(){},onBind:function(){},onRebind:function(){},onBatch:function(){},onPreBatch:function(){},onPostBatch:function(){},onPreRender:function(){},onRender:function(){},onPostRender:function(){},onBeforeFlush:function(){},onAfterFlush:function(){},batchVert:function(t,e,i,n,r,s,o){var a=this.vertexViewF32,h=this.vertexViewU32,l=this.vertexCount*this.currentShader.vertexComponentCount-1;a[++l]=t,a[++l]=e,a[++l]=i,a[++l]=n,a[++l]=r,a[++l]=s,h[++l]=o,this.vertexCount++},batchQuad:function(t,e,i,n,r,s,o,a,h,l,c,u,d,p,f,g,m,y,v,x){void 0===x&&(x=this.currentUnit);var b=!1;return this.shouldFlush(6)&&(this.flush(),b=!0,x=this.setTexture2D(v)),this.batchVert(e,i,l,c,x,y,p),this.batchVert(n,r,l,d,x,y,g),this.batchVert(s,o,u,d,x,y,m),this.batchVert(e,i,l,c,x,y,p),this.batchVert(s,o,u,d,x,y,m),this.batchVert(a,h,u,c,x,y,f),this.onBatch(t),b},batchTri:function(t,e,i,n,r,s,o,a,h,l,c,u,d,p,f,g,m){void 0===m&&(m=this.currentUnit);var y=!1;return this.shouldFlush(3)&&(this.flush(),y=!0,m=this.setTexture2D(g)),this.batchVert(e,i,a,h,m,f,u),this.batchVert(n,r,a,c,m,f,d),this.batchVert(s,o,l,c,m,f,p),this.onBatch(t),y},drawFillRect:function(t,e,i,n,r,s,o,a){void 0===o&&(o=this.renderer.whiteTexture.glTexture),void 0===a&&(a=!0),t=Math.floor(t),e=Math.floor(e);var i=Math.floor(t+i),n=Math.floor(e+n),h=this.setTexture2D(o),r=b.getTintAppendFloatAlphaAndSwap(r,s),s=0,l=1;a&&(s=1,l=0),this.batchQuad(null,t,e,t,n,i,n,i,e,0,s,1,l,r,r,r,r,0,o,h)},setTexture2D:function(t){return void 0===t&&(t=this.renderer.whiteTexture.glTexture),this.currentUnit=this.renderer.setTexture2D(t),this.currentUnit},bindTexture:function(t,e){var i=this.gl;return i.activeTexture(i.TEXTURE0+(e=void 0===e?0:e)),i.bindTexture(i.TEXTURE_2D,t),this},bindRenderTarget:function(t,e){return this.bindTexture(t.texture,e)},setTime:function(t){return this.set1f(t,this.game.loop.getDuration()),this},set1f:function(t,e,i){return(i=void 0===i?this.currentShader:i).set1f(t,e),this},set2f:function(t,e,i,n){return(n=void 0===n?this.currentShader:n).set2f(t,e,i),this},set3f:function(t,e,i,n,r){return(r=void 0===r?this.currentShader:r).set3f(t,e,i,n),this},set4f:function(t,e,i,n,r,s){return(s=void 0===s?this.currentShader:s).set4f(t,e,i,n,r),this},set1fv:function(t,e,i){return(i=void 0===i?this.currentShader:i).set1fv(t,e),this},set2fv:function(t,e,i){return(i=void 0===i?this.currentShader:i).set2fv(t,e),this},set3fv:function(t,e,i){return(i=void 0===i?this.currentShader:i).set3fv(t,e),this},set4fv:function(t,e,i){return(i=void 0===i?this.currentShader:i).set4fv(t,e),this},set1iv:function(t,e,i){return(i=void 0===i?this.currentShader:i).set1iv(t,e),this},set2iv:function(t,e,i){return(i=void 0===i?this.currentShader:i).set2iv(t,e),this},set3iv:function(t,e,i){return(i=void 0===i?this.currentShader:i).set3iv(t,e),this},set4iv:function(t,e,i){return(i=void 0===i?this.currentShader:i).set4iv(t,e),this},set1i:function(t,e,i){return(i=void 0===i?this.currentShader:i).set1i(t,e),this},set2i:function(t,e,i,n){return(n=void 0===n?this.currentShader:n).set2i(t,e,i),this},set3i:function(t,e,i,n,r){return(r=void 0===r?this.currentShader:r).set3i(t,e,i,n),this},set4i:function(t,e,i,n,r,s){return(s=void 0===s?this.currentShader:s).set4i(t,e,i,n,r),this},setMatrix2fv:function(t,e,i,n){return(n=void 0===n?this.currentShader:n).setMatrix2fv(t,e,i),this},setMatrix3fv:function(t,e,i,n){return(n=void 0===n?this.currentShader:n).setMatrix3fv(t,e,i),this},setMatrix4fv:function(t,e,i,n){return(n=void 0===n?this.currentShader:n).setMatrix4fv(t,e,i),this},destroy:function(){this.emit(f.DESTROY,this);for(var t=this.shaders,e=0;e<t.length;e++)t[e].destroy();for(var i=this.renderTargets,e=0;e<i.length;e++)i[e].destroy();this.gl.deleteBuffer(this.vertexBuffer);var n=this.renderer;return n.off(m.RESIZE,this.resize,this),n.off(m.PRE_RENDER,this.onPreRender,this),n.off(m.RENDER,this.onRender,this),n.off(m.POST_RENDER,this.onPostRender,this),this.removeAllListeners(),this.game=null,this.renderer=null,this.manager=null,this.gl=null,this.view=null,this.shaders=null,this.renderTargets=null,this.bytes=null,this.vertexViewF32=null,this.vertexViewU32=null,this.vertexData=null,this.vertexBuffer=null,this.currentShader=null,this.currentRenderTarget=null,this}});t.exports=i},function(t,e,i){"use strict";function n(t,e,i){i=i||2;var n,r,s,o,a,h=e&&e.length,l=h?e[0]*i:t.length,c=g(t,0,l,i,!0),u=[];if(c&&c.next!==c.prev){if(h&&(c=function(t,e,i,n){for(var r,s,o,a=[],h=0,l=e.length;h<l;h++)(r=g(t,e[h]*n,h<l-1?e[h+1]*n:t.length,n,!1))===r.next&&(r.steiner=!0),a.push(function(t){for(var e=t,i=t;(e.x<i.x||e.x===i.x&&e.y<i.y)&&(i=e),(e=e.next)!==t;);return i}(r));for(a.sort(y),h=0;h<a.length;h++)s=a[h],(o=function(t,e){var i,n=e,r=t.x,s=t.y,o=-1/0;do{if(s<=n.y&&s>=n.next.y&&n.next.y!==n.y){var a=n.x+(s-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(a<=r&&o<a){if((o=a)===r){if(s===n.y)return n;if(s===n.next.y)return n.next}i=n.x<n.next.x?n:n.next}}}while((n=n.next)!==e);if(!i)return null;if(r!==o)for(var h,l,c,u=i,d=i.x,p=i.y,f=1/0,n=i;r>=n.x&&n.x>=d&&r!==n.x&&x(s<p?r:o,s,d,p,s<p?o:r,s,n.x,n.y)&&(h=Math.abs(s-n.y)/(r-n.x),S(n,t)&&(h<f||h===f&&(n.x>i.x||n.x===i.x&&(c=n,b((l=i).prev,l,c.prev)<0&&b(c.next,l,l.next)<0)))&&(i=n,f=h)),(n=n.next)!==u;);return i}(s,i))&&(s=P(o,s),m(o,o.next),m(s,s.next)),i=m(i,i.next);return i}(t,e,c,i)),t.length>80*i){for(var d=n=t[0],p=r=t[1],f=i;f<l;f+=i)(s=t[f])<d&&(d=s),(o=t[f+1])<p&&(p=o),n<s&&(n=s),r<o&&(r=o);a=0!==(a=Math.max(n-d,r-p))?1/a:0}(function l(t,e,i,n,r,s,o){if(t){!o&&s&&function(t,e,i,n){for(var r=t;null===r.z&&(r.z=v(r.x,r.y,e,i,n)),r.prevZ=r.prev,r.nextZ=r.next,(r=r.next)!==t;);r.prevZ.nextZ=null,r.prevZ=null;var s,o,a,h,l,c,u,d,p=r,f=1;do{for(o=p,l=p=null,c=0;o;){for(c++,a=o,s=u=0;s<f&&(u++,a=a.nextZ);s++);for(d=f;0<u||0<d&&a;)0!==u&&(0===d||!a||o.z<=a.z)?(o=(h=o).nextZ,u--):(a=(h=a).nextZ,d--),l?l.nextZ=h:p=h,h.prevZ=l,l=h;o=a}}while(l.nextZ=null,f*=2,1<c)}(t,n,r,s);for(var a,h,c=t;t.prev!==t.next;)if(a=t.prev,h=t.next,s?function(t,e,i,n){var r=t.prev,s=t,o=t.next;if(!(0<=b(r,s,o))){for(var a=(r.x<s.x?r.x<o.x?r:o:s.x<o.x?s:o).x,h=(r.y<s.y?r.y<o.y?r:o:s.y<o.y?s:o).y,l=(r.x>s.x?r.x>o.x?r:o:s.x>o.x?s:o).x,c=(r.y>s.y?r.y>o.y?r:o:s.y>o.y?s:o).y,u=v(a,h,e,i,n),d=v(l,c,e,i,n),p=t.prevZ,f=t.nextZ;p&&p.z>=u&&f&&f.z<=d;){if(p!==t.prev&&p!==t.next&&x(r.x,r.y,s.x,s.y,o.x,o.y,p.x,p.y)&&0<=b(p.prev,p,p.next))return;if(p=p.prevZ,f!==t.prev&&f!==t.next&&x(r.x,r.y,s.x,s.y,o.x,o.y,f.x,f.y)&&0<=b(f.prev,f,f.next))return;f=f.nextZ}for(;p&&p.z>=u;){if(p!==t.prev&&p!==t.next&&x(r.x,r.y,s.x,s.y,o.x,o.y,p.x,p.y)&&0<=b(p.prev,p,p.next))return;p=p.prevZ}for(;f&&f.z<=d;){if(f!==t.prev&&f!==t.next&&x(r.x,r.y,s.x,s.y,o.x,o.y,f.x,f.y)&&0<=b(f.prev,f,f.next))return;f=f.nextZ}return 1}}(t,n,r,s):function(t){var e=t.prev,i=t,n=t.next;if(!(0<=b(e,i,n))){for(var r=t.next.next;r!==t.prev;){if(x(e.x,e.y,i.x,i.y,n.x,n.y,r.x,r.y)&&0<=b(r.prev,r,r.next))return;r=r.next}return 1}}(t))e.push(a.i/i),e.push(t.i/i),e.push(h.i/i),_(t),t=h.next,c=h.next;else if((t=h)===c){o?1===o?l(t=function(t,e,i){var n=t;do{var r=n.prev,s=n.next.next}while(!w(r,s)&&T(r,n,n.next,s)&&S(r,s)&&S(s,r)&&(e.push(r.i/i),e.push(n.i/i),e.push(s.i/i),_(n),_(n.next),n=t=s),(n=n.next)!==t);return m(n)}(m(t),e,i),e,i,n,r,s,2):2===o&&function(t,e,i,n,r,s){var o=t;do{for(var a,h=o.next.next;h!==o.prev;){if(o.i!==h.i&&function(t,e){return t.next.i!==e.i&&t.prev.i!==e.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&&T(i,i.next,t,e))return 1}while((i=i.next)!==t)}(t,e)&&(S(t,e)&&S(e,t)&&function(t,e){for(var i=t,n=!1,r=(t.x+e.x)/2,s=(t.y+e.y)/2;i.y>s!=i.next.y>s&&i.next.y!==i.y&&r<(i.next.x-i.x)*(s-i.y)/(i.next.y-i.y)+i.x&&(n=!n),(i=i.next)!==t;);return n}(t,e)&&(b(t.prev,t,e.prev)||b(t,e.prev,e))||w(t,e)&&0<b(t.prev,t,t.next)&&0<b(e.prev,e,e.next))}(o,h))return a=P(o,h),o=m(o,o.next),a=m(a,a.next),l(o,e,i,n,r,s),l(a,e,i,n,r,s);h=h.next}}while((o=o.next)!==t)}(t,e,i,n,r,s):l(m(t),e,i,n,r,s,1);break}}})(c,u,i,d,p,a)}return u}function g(t,e,i,n,r){var s,o;if(r===0<E(t,e,i,n))for(s=e;s<i;s+=n)o=a(s,t[s],t[s+1],o);else for(s=i-n;e<=s;s-=n)o=a(s,t[s],t[s+1],o);return o&&w(o,o.next)&&(_(o),o=o.next),o}function m(t,e){if(!t)return t;e=e||t;var i,n=t;do{if(i=!1,n.steiner||!w(n,n.next)&&0!==b(n.prev,n,n.next))n=n.next;else{if(_(n),(n=e=n.prev)===n.next)break;i=!0}}while(i||n!==e);return e}function y(t,e){return t.x-e.x}function v(t,e,i,n,r){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-i)*r)|t<<8))|t<<4))|t<<2))|t<<1))|(1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*r)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function x(t,e,i,n,r,s,o,a){return 0<=(r-o)*(e-a)-(t-o)*(s-a)&&0<=(t-o)*(n-a)-(i-o)*(e-a)&&0<=(i-o)*(s-a)-(r-o)*(n-a)}function b(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function w(t,e){return t.x===e.x&&t.y===e.y}function T(t,e,i,n){var r=l(b(t,e,i)),s=l(b(t,e,n)),o=l(b(i,n,t)),a=l(b(i,n,e));return r!==s&&o!==a||0===r&&h(t,i,e)||0===s&&h(t,n,e)||0===o&&h(i,t,n)||!(0!==a||!h(i,e,n))}function h(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 l(t){return 0<t?1:t<0?-1:0}function S(t,e){return b(t.prev,t,t.next)<0?0<=b(t,e,t.next)&&0<=b(t,t.prev,e):b(t,e,t.prev)<0||b(t,t.next,e)<0}function P(t,e){var i=new o(t.i,t.x,t.y),n=new o(e.i,e.x,e.y),r=t.next,s=e.prev;return(t.next=e).prev=t,(i.next=r).prev=i,(n.next=i).prev=n,(s.next=n).prev=s,n}function a(t,e,i,n){t=new o(t,e,i);return n?(t.next=n.next,(t.prev=n).next.prev=t,n.next=t):(t.prev=t).next=t,t}function _(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 o(t,e,i){this.i=t,this.x=e,this.y=i,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function E(t,e,i,n){for(var r=0,s=e,o=i-n;s<i;s+=n)r+=(t[o]-t[s])*(t[s+1]+t[o+1]),o=s;return r}n.deviation=function(t,e,i,n){var r=e&&e.length,s=r?e[0]*i:t.length,o=Math.abs(E(t,0,s,i));if(r)for(var a=0,h=e.length;a<h;a++){var l=e[a]*i,c=a<h-1?e[a+1]*i:t.length;o-=Math.abs(E(t,l,c,i))}for(var u=0,a=0;a<n.length;a+=3){var d=n[a]*i,p=n[a+1]*i,f=n[a+2]*i;u+=Math.abs((t[d]-t[f])*(t[1+p]-t[1+d])-(t[d]-t[p])*(t[1+f]-t[1+d]))}return 0===o&&0===u?0:Math.abs((u-o)/o)},n.flatten=function(t){for(var e=t[0][0].length,i={vertices:[],holes:[],dimensions:e},n=0,r=0;r<t.length;r++){for(var s=0;s<t[r].length;s++)for(var o=0;o<e;o++)i.vertices.push(t[r][s][o]);0<r&&(n+=t[r-1].length,i.holes.push(n))}return i},t.exports=n},function(t,e){t.exports=function(t,e,i,n){i=i||e.strokeColor,n=n||e.strokeAlpha;t.strokeStyle="rgba("+((16711680&i)>>>16)+","+((65280&i)>>>8)+","+(255&i)+","+n+")",t.lineWidth=e.lineWidth}},function(t,e,i){var n=i(0),a=i(21),h=i(23),r=i(8),l=i(2),c=i(6),u=i(7),s=new n({Extends:h,initialize:function(t,e,i,n,r){var s="json",o=(u(e)&&(e=l(o=e,"key"),i=l(o,"url"),n=l(o,"xhrSettings"),s=l(o,"extension",s),r=l(o,"dataKey",r)),{type:"json",cache:t.cacheManager.json,extension:s,responseType:"text",key:e,url:i,xhrSettings:n,config:r});h.call(this,t,o),u(i)&&(this.data=r?c(i,r):i,this.state=a.FILE_POPULATED)},onProcess:function(){if(this.state!==a.FILE_POPULATED){this.state=a.FILE_PROCESSING;try{var t=JSON.parse(this.xhrLoader.responseText)}catch(t){throw this.onProcessError(),t}var e=this.config;this.data="string"==typeof e?c(t,e,t):t}this.onProcessComplete()}});r.register("json",function(t,e,i,n){if(Array.isArray(t))for(var r=0;r<t.length;r++)this.addFile(new s(this,t[r]));else this.addFile(new s(this,t,e,n,i));return this}),t.exports=s},function(t,e){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}},function(t,e,i){var d=i(158),p=i(26);t.exports=function(t,e,i,n,r){for(var s,o,a,h,l=p(t,e,i,n,null,r),c=0;c<l.length;c++){var u=l[c];u&&(u.collides?(s=d(u.x,u.y-1,!0,r),o=d(u.x,u.y+1,!0,r),a=d(u.x-1,u.y,!0,r),h=d(u.x+1,u.y,!0,r),u.faceTop=!s||!s.collides,u.faceBottom=!o||!o.collides,u.faceLeft=!a||!a.collides,u.faceRight=!h||!h.collides):u.resetFaces())}}},function(t,e,i){var o={},v=(t.exports=o,i(83)),x=i(32);o.create=function(t,e){for(var i=[],n=0;n<t.length;n++){var r=t[n],r={x:r.x,y:r.y,index:n,body:e,isInternal:!1,contact:null,offset:null};r.contact={vertex:r,normalImpulse:0,tangentImpulse:0},i.push(r)}return i},o.fromPath=function(t,e){var n=[];return t.replace(/L?\s*([-\d.e]+)[\s,]*([-\d.e]+)*/gi,function(t,e,i){n.push({x:parseFloat(e),y:parseFloat(i)})}),o.create(n,e)},o.centre=function(t){for(var e,i,n=o.area(t,!0),r={x:0,y:0},s=0;s<t.length;s++)i=(s+1)%t.length,e=v.cross(t[s],t[i]),i=v.mult(v.add(t[s],t[i]),e),r=v.add(r,i);return v.div(r,6*n)},o.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 v.div(e,t.length)},o.area=function(t,e){for(var i=0,n=t.length-1,r=0;r<t.length;r++)i+=(t[n].x-t[r].x)*(t[n].y+t[r].y),n=r;return e?i/2:Math.abs(i)/2},o.inertia=function(t,e){for(var i,n,r=0,s=0,o=t,a=0;a<o.length;a++)n=(a+1)%o.length,r+=(i=Math.abs(v.cross(o[n],o[a])))*(v.dot(o[n],o[n])+v.dot(o[n],o[a])+v.dot(o[a],o[a])),s+=i;return e/6*(r/s)},o.translate=function(t,e,i){var n;if(i)for(n=0;n<t.length;n++)t[n].x+=e.x*i,t[n].y+=e.y*i;else for(n=0;n<t.length;n++)t[n].x+=e.x,t[n].y+=e.y;return t},o.rotate=function(t,e,i){if(0!==e){for(var n=Math.cos(e),r=Math.sin(e),s=0;s<t.length;s++){var o=t[s],a=o.x-i.x,h=o.y-i.y;o.x=i.x+(a*n-h*r),o.y=i.y+(a*r+h*n)}return t}},o.contains=function(t,e){for(var i=0;i<t.length;i++){var n=t[i],r=t[(i+1)%t.length];if(0<(e.x-n.x)*(r.y-n.y)+(e.y-n.y)*(n.x-r.x))return!1}return!0},o.scale=function(t,e,i,n){if(1!==e||1!==i){var r;n=n||o.centre(t);for(var s=0;s<t.length;s++)r=t[s],r=v.sub(r,n),t[s].x=n.x+r.x*e,t[s].y=n.y+r.y*i}return t},o.chamfer=function(t,e,i,n,r){e="number"==typeof e?[e]:e||[8],i=void 0!==i?i:-1,n=n||2,r=r||14;for(var s=[],o=0;o<t.length;o++){var a=t[0<=o-1?o-1:t.length-1],h=t[o],l=t[(o+1)%t.length],c=e[o<e.length?o:e.length-1];if(0!==c){var a=v.normalise({x:h.y-a.y,y:a.x-h.x}),l=v.normalise({x:l.y-h.y,y:h.x-l.x}),u=Math.sqrt(2*Math.pow(c,2)),d=v.mult(x.clone(a),c),p=v.normalise(v.mult(v.add(a,l),.5)),f=v.sub(h,v.mult(p,u)),g=i;-1===i&&(g=1.75*Math.pow(c,.32)),(g=x.clamp(g,n,r))%2==1&&(g+=1);for(var m=Math.acos(v.dot(a,l))/g,y=0;y<g;y++)s.push(v.add(v.rotate(d,m*y),f))}else s.push(h)}return s},o.clockwiseSort=function(t){var i=o.mean(t);return t.sort(function(t,e){return v.angle(i,t)-v.angle(i,e)}),t},o.isConvex=function(t){var e,i,n,r,s=0,o=t.length;if(o<3)return null;for(e=0;e<o;e++)if(r=(t[i=(e+1)%o].x-t[e].x)*(t[n=(e+2)%o].y-t[i].y),(r-=(t[i].y-t[e].y)*(t[n].x-t[i].x))<0?s|=1:0<r&&(s|=2),3===s)return!1;return 0!==s||null},o.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];2<=r.length&&v.cross3(r[r.length-2],r[r.length-1],e)<=0;)r.pop();r.push(e)}for(i=t.length-1;0<=i;--i){for(e=t[i];2<=n.length&&v.cross3(n[n.length-2],n[n.length-1],e)<=0;)n.pop();n.push(e)}return n.pop(),r.pop(),n.concat(r)}},function(t,e,i){var n=i(0),r=i(66),s=i(300),o=i(301),a=i(56),h=i(170),i=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 r(this,t,e)},getPoint:function(t,e){return s(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}}});t.exports=i},function(t,e){t.exports=function(t,e,i){return 0<t.radius&&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}},function(t,e){t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},function(t,e){t.exports=function(t,e,i){i-=e;return e+((t-e)%i+i)%i}},function(t,e,i){var n=i(0),i=i(39),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,r,s,o,a,h,l,c,u,d,p,f,g){var m=this.val;return m[0]=t,m[1]=e,m[2]=i,m[3]=n,m[4]=r,m[5]=s,m[6]=o,m[7]=a,m[8]=h,m[9]=l,m[10]=c,m[11]=u,m[12]=d,m[13]=p,m[14]=f,m[15]=g,this},copy:function(t){t=t.val;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])},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 i=a.fromQuat(i).val,n=e.x,r=e.y,e=e.z;return this.setValues(i[0]*n,i[1]*n,i[2]*n,0,i[4]*r,i[5]*r,i[6]*r,0,i[8]*e,i[9]*e,i[10]*e,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],r=t[6],s=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]=r,t[11]=t[14],t[12]=n,t[13]=s,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],r=t[3],s=t[4],o=t[5],a=t[6],h=t[7],l=t[8],c=t[9],u=t[10],d=t[11],p=t[12],f=t[13],g=t[14],t=t[15],m=e*o-i*s,y=e*a-n*s,v=e*h-r*s,x=i*a-n*o,b=i*h-r*o,w=n*h-r*a,T=l*f-c*p,S=l*g-u*p,P=l*t-d*p,_=c*g-u*f,E=c*t-d*f,A=u*t-d*g,M=m*A-y*E+v*_+x*P-b*S+w*T;return M?this.setValues((o*A-a*E+h*_)*(M=1/M),(n*E-i*A-r*_)*M,(f*w-g*b+t*x)*M,(u*b-c*w-d*x)*M,(a*P-s*A-h*S)*M,(e*A-n*P+r*S)*M,(g*v-p*w-t*y)*M,(l*w-u*v+d*y)*M,(s*E-o*P+h*T)*M,(i*P-e*E-r*T)*M,(p*b-f*v+t*m)*M,(c*v-l*b-d*m)*M,(o*S-s*_-a*T)*M,(e*_-i*S+n*T)*M,(f*y-p*x-g*m)*M,(l*x-c*y+u*m)*M):this},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=t[2],r=t[3],s=t[4],o=t[5],a=t[6],h=t[7],l=t[8],c=t[9],u=t[10],d=t[11],p=t[12],f=t[13],g=t[14],t=t[15];return this.setValues(o*(u*t-d*g)-c*(a*t-h*g)+f*(a*d-h*u),-(i*(u*t-d*g)-c*(n*t-r*g)+f*(n*d-r*u)),i*(a*t-h*g)-o*(n*t-r*g)+f*(n*h-r*a),-(i*(a*d-h*u)-o*(n*d-r*u)+c*(n*h-r*a)),-(s*(u*t-d*g)-l*(a*t-h*g)+p*(a*d-h*u)),e*(u*t-d*g)-l*(n*t-r*g)+p*(n*d-r*u),-(e*(a*t-h*g)-s*(n*t-r*g)+p*(n*h-r*a)),e*(a*d-h*u)-s*(n*d-r*u)+l*(n*h-r*a),s*(c*t-d*f)-l*(o*t-h*f)+p*(o*d-h*c),-(e*(c*t-d*f)-l*(i*t-r*f)+p*(i*d-r*c)),e*(o*t-h*f)-s*(i*t-r*f)+p*(i*h-r*o),-(e*(o*d-h*c)-s*(i*d-r*c)+l*(i*h-r*o)),-(s*(c*g-u*f)-l*(o*g-a*f)+p*(o*u-a*c)),e*(c*g-u*f)-l*(i*g-n*f)+p*(i*u-n*c),-(e*(o*g-a*f)-s*(i*g-n*f)+p*(i*a-n*o)),e*(o*u-a*c)-s*(i*u-n*c)+l*(i*a-n*o))},determinant:function(){var t=this.val,e=t[0],i=t[1],n=t[2],r=t[3],s=t[4],o=t[5],a=t[6],h=t[7],l=t[8],c=t[9],u=t[10],d=t[11],p=t[12],f=t[13],g=t[14],t=t[15];return(e*o-i*s)*(u*t-d*g)-(e*a-n*s)*(c*t-d*f)+(e*h-r*s)*(c*g-u*f)+(i*a-n*o)*(l*t-d*p)-(i*h-r*o)*(l*g-u*p)+(n*h-r*a)*(l*f-c*p)},multiply:function(t){var e=this.val,i=e[0],n=e[1],r=e[2],s=e[3],o=e[4],a=e[5],h=e[6],l=e[7],c=e[8],u=e[9],d=e[10],p=e[11],f=e[12],g=e[13],m=e[14],y=e[15],t=t.val,v=t[0],x=t[1],b=t[2],w=t[3];return e[0]=v*i+x*o+b*c+w*f,e[1]=v*n+x*a+b*u+w*g,e[2]=v*r+x*h+b*d+w*m,e[3]=v*s+x*l+b*p+w*y,v=t[4],x=t[5],b=t[6],w=t[7],e[4]=v*i+x*o+b*c+w*f,e[5]=v*n+x*a+b*u+w*g,e[6]=v*r+x*h+b*d+w*m,e[7]=v*s+x*l+b*p+w*y,v=t[8],x=t[9],b=t[10],w=t[11],e[8]=v*i+x*o+b*c+w*f,e[9]=v*n+x*a+b*u+w*g,e[10]=v*r+x*h+b*d+w*m,e[11]=v*s+x*l+b*p+w*y,v=t[12],x=t[13],b=t[14],w=t[15],e[12]=v*i+x*o+b*c+w*f,e[13]=v*n+x*a+b*u+w*g,e[14]=v*r+x*h+b*d+w*m,e[15]=v*s+x*l+b*p+w*y,this},multiplyLocal:function(t){var e=this.val,t=t.val;return this.setValues(e[0]*t[0]+e[1]*t[4]+e[2]*t[8]+e[3]*t[12],e[0]*t[1]+e[1]*t[5]+e[2]*t[9]+e[3]*t[13],e[0]*t[2]+e[1]*t[6]+e[2]*t[10]+e[3]*t[14],e[0]*t[3]+e[1]*t[7]+e[2]*t[11]+e[3]*t[15],e[4]*t[0]+e[5]*t[4]+e[6]*t[8]+e[7]*t[12],e[4]*t[1]+e[5]*t[5]+e[6]*t[9]+e[7]*t[13],e[4]*t[2]+e[5]*t[6]+e[6]*t[10]+e[7]*t[14],e[4]*t[3]+e[5]*t[7]+e[6]*t[11]+e[7]*t[15],e[8]*t[0]+e[9]*t[4]+e[10]*t[8]+e[11]*t[12],e[8]*t[1]+e[9]*t[5]+e[10]*t[9]+e[11]*t[13],e[8]*t[2]+e[9]*t[6]+e[10]*t[10]+e[11]*t[14],e[8]*t[3]+e[9]*t[7]+e[10]*t[11]+e[11]*t[15],e[12]*t[0]+e[13]*t[4]+e[14]*t[8]+e[15]*t[12],e[12]*t[1]+e[13]*t[5]+e[14]*t[9]+e[15]*t[13],e[12]*t[2]+e[13]*t[6]+e[14]*t[10]+e[15]*t[14],e[12]*t[3]+e[13]*t[7]+e[14]*t[11]+e[15]*t[15])},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var t=t.val,e=e.val,i=t[0],n=t[4],r=t[8],s=t[12],o=t[1],a=t[5],h=t[9],l=t[13],c=t[2],u=t[6],d=t[10],p=t[14],f=t[3],g=t[7],m=t[11],t=t[15],y=e[0],v=e[4],x=e[8],b=e[12],w=e[1],T=e[5],S=e[9],P=e[13],_=e[2],E=e[6],A=e[10],M=e[14],k=e[3],C=e[7],O=e[11],e=e[15];return this.setValues(i*y+n*w+r*_+s*k,o*y+a*w+h*_+l*k,c*y+u*w+d*_+p*k,f*y+g*w+m*_+t*k,i*v+n*T+r*E+s*C,o*v+a*T+h*E+l*C,c*v+u*T+d*E+p*C,f*v+g*T+m*E+t*C,i*x+n*S+r*A+s*O,o*x+a*S+h*A+l*O,c*x+u*S+d*A+p*O,f*x+g*S+m*A+t*O,i*b+n*P+r*M+s*e,o*b+a*P+h*M+l*e,c*b+u*P+d*M+p*e,f*b+g*P+m*M+t*e)},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),e=Math.sin(e),n=1-i,r=t.x,s=t.y,t=t.z,o=n*r,a=n*s;return this.setValues(o*r+i,o*s-e*t,o*t+e*s,0,o*s+e*t,a*s+i,a*t-e*r,0,o*t-e*s,a*t+e*r,n*t*t+i,0,0,0,0,1)},rotate:function(t,e){var i=this.val,n=e.x,r=e.y,e=e.z,s=Math.sqrt(n*n+r*r+e*e);if(Math.abs(s)<1e-6)return this;n*=s=1/s,r*=s,e*=s;var s=Math.sin(t),t=Math.cos(t),o=1-t,a=i[0],h=i[1],l=i[2],c=i[3],u=i[4],d=i[5],p=i[6],f=i[7],g=i[8],m=i[9],y=i[10],v=i[11],x=i[12],b=i[13],w=i[14],i=i[15],T=n*n*o+t,S=r*n*o+e*s,P=e*n*o-r*s,_=n*r*o-e*s,E=r*r*o+t,A=e*r*o+n*s,M=n*e*o+r*s,r=r*e*o-n*s,n=e*e*o+t;return this.setValues(a*T+u*S+g*P,h*T+d*S+m*P,l*T+p*S+y*P,c*T+f*S+v*P,a*_+u*E+g*A,h*_+d*E+m*A,l*_+p*E+y*A,c*_+f*E+v*A,a*M+u*r+g*n,h*M+d*r+m*n,l*M+p*r+y*n,c*M+f*r+v*n,x,b,w,i)},rotateX:function(t){var e=this.val,i=Math.sin(t),t=Math.cos(t),n=e[4],r=e[5],s=e[6],o=e[7],a=e[8],h=e[9],l=e[10],c=e[11];return e[4]=n*t+a*i,e[5]=r*t+h*i,e[6]=s*t+l*i,e[7]=o*t+c*i,e[8]=a*t-n*i,e[9]=h*t-r*i,e[10]=l*t-s*i,e[11]=c*t-o*i,this},rotateY:function(t){var e=this.val,i=Math.sin(t),t=Math.cos(t),n=e[0],r=e[1],s=e[2],o=e[3],a=e[8],h=e[9],l=e[10],c=e[11];return e[0]=n*t-a*i,e[1]=r*t-h*i,e[2]=s*t-l*i,e[3]=o*t-c*i,e[8]=n*i+a*t,e[9]=r*i+h*t,e[10]=s*i+l*t,e[11]=o*i+c*t,this},rotateZ:function(t){var e=this.val,i=Math.sin(t),t=Math.cos(t),n=e[0],r=e[1],s=e[2],o=e[3],a=e[4],h=e[5],l=e[6],c=e[7];return e[0]=n*t+a*i,e[1]=r*t+h*i,e[2]=s*t+l*i,e[3]=o*t+c*i,e[4]=a*t-n*i,e[5]=h*t-r*i,e[6]=l*t-s*i,e[7]=c*t-o*i,this},fromRotationTranslation:function(t,e){var i=t.x,n=t.y,r=t.z,t=t.w,s=i+i,o=n+n,a=r+r,h=i*s,l=i*o,i=i*a,c=n*o,n=n*a,r=r*a,s=t*s,o=t*o,t=t*a;return this.setValues(1-(c+r),l+t,i-o,0,l-t,1-(h+r),n+s,0,i+o,n-s,1-(h+c),0,e.x,e.y,e.z,1)},fromQuat:function(t){var e=t.x,i=t.y,n=t.z,t=t.w,r=e+e,s=i+i,o=n+n,a=e*r,h=e*s,e=e*o,l=i*s,i=i*o,n=n*o,r=t*r,s=t*s,t=t*o;return this.setValues(1-(l+n),h+t,e-s,0,h-t,1-(a+n),i+r,0,e+s,i-r,1-(a+l),0,0,0,0,1)},frustum:function(t,e,i,n,r,s){var o=1/(e-t),a=1/(n-i),h=1/(r-s);return this.setValues(2*r*o,0,0,0,0,2*r*a,0,0,(e+t)*o,(n+i)*a,(s+r)*h,-1,0,0,s*r*2*h,0)},perspective:function(t,e,i,n){var t=1/Math.tan(t/2),r=1/(i-n);return this.setValues(t/e,0,0,0,0,t,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,r,s){var o=0==(o=t-e)?o:1/o,a=0==(a=i-n)?a:1/a,h=0==(h=r-s)?h:1/h;return this.setValues(-2*o,0,0,0,0,-2*a,0,0,0,0,2*h,0,(t+e)*o,(n+i)*a,(s+r)*h,1)},lookAtRH:function(t,e,i){var n=this.val;return l.subVectors(t,e),0===l.getLengthSquared()&&(l.z=1),l.normalize(),s.crossVectors(i,l),0===s.getLengthSquared()&&(1===Math.abs(i.z)?l.x+=1e-4:l.z+=1e-4,l.normalize(),s.crossVectors(i,l)),s.normalize(),o.crossVectors(l,s),n[0]=s.x,n[1]=s.y,n[2]=s.z,n[4]=o.x,n[5]=o.y,n[6]=o.z,n[8]=l.x,n[9]=l.y,n[10]=l.z,this},lookAt:function(t,e,i){var n,r,s,o,a=t.x,h=t.y,t=t.z,l=i.x,c=i.y,i=i.z,u=e.x,d=e.y,e=e.z;return Math.abs(a-u)<1e-6&&Math.abs(h-d)<1e-6&&Math.abs(t-e)<1e-6?this.identity():(u=a-u,d=h-d,e=t-e,r=c*(e*=n=1/Math.sqrt(u*u+d*d+e*e))-i*(d*=n),i=i*(u*=n)-l*e,l=l*d-c*u,(n=Math.sqrt(r*r+i*i+l*l))?(r*=n=1/n,i*=n,l*=n):l=i=r=0,c=d*l-e*i,s=e*r-u*l,o=u*i-d*r,(n=Math.sqrt(c*c+s*s+o*o))?(c*=n=1/n,s*=n,o*=n):o=s=c=0,this.setValues(r,c,u,0,i,s,d,0,l,o,e,0,-(r*a+i*h+l*t),-(c*a+s*h+o*t),-(u*a+d*h+e*t),1))},yawPitchRoll:function(t,e,i){this.zero(),a.zero(),h.zero();var n=this.val,r=a.val,s=h.val,o=Math.sin(i),i=Math.cos(i);return n[10]=1,n[15]=1,n[0]=i,n[1]=o,n[4]=-o,n[5]=i,o=Math.sin(e),i=Math.cos(e),r[0]=1,r[15]=1,r[5]=i,r[10]=i,r[9]=-o,r[6]=o,o=Math.sin(t),i=Math.cos(t),s[5]=1,s[15]=1,s[0]=i,s[2]=-o,s[8]=o,s[10]=i,this.multiplyLocal(a),this.multiplyLocal(h),this},setWorldMatrix:function(t,e,i,n,r){return this.yawPitchRoll(t.y,t.x,t.z),a.scaling(i.x,i.y,i.z),h.xyz(e.x,e.y,e.z),this.multiplyLocal(a),this.multiplyLocal(h),n&&this.multiplyLocal(n),r&&this.multiplyLocal(r),this},multiplyToMat4:function(t,e){var i=this.val,t=t.val,n=i[0],r=i[1],s=i[2],o=i[3],a=i[4],h=i[5],l=i[6],c=i[7],u=i[8],d=i[9],p=i[10],f=i[11],g=i[12],m=i[13],y=i[14],i=i[15],v=t[0],x=t[1],b=t[2],w=t[3],T=t[4],S=t[5],P=t[6],_=t[7],E=t[8],A=t[9],M=t[10],k=t[11],C=t[12],O=t[13],R=t[14],t=t[15];return e.setValues(v*n+x*a+b*u+w*g,x*r+x*h+b*d+w*m,b*s+x*l+b*p+w*y,w*o+x*c+b*f+w*i,T*n+S*a+P*u+_*g,T*r+S*h+P*d+_*m,T*s+S*l+P*p+_*y,T*o+S*c+P*f+_*i,E*n+A*a+M*u+k*g,E*r+A*h+M*d+k*m,E*s+A*l+M*p+k*y,E*o+A*c+M*f+k*i,C*n+O*a+R*u+t*g,C*r+O*h+R*d+t*m,C*s+O*l+R*p+t*y,C*o+O*c+R*f+t*i)},fromRotationXYTranslation:function(t,e,i){var n=e.x,r=e.y,e=e.z,s=Math.sin(t.x),o=Math.cos(t.x),a=Math.sin(t.y),t=Math.cos(t.y),h=n,l=r,c=e,u=-s,d=0-u*a,p=0-o*a,u=u*t,f=o*t;return i||(h=t*n+a*e,l=d*n+o*r+u*e,c=p*n+s*r+f*e),this.setValues(t,d,p,0,0,o,s,0,a,u,f,0,h,l,c,1)},getMaxScaleOnAxis:function(){var t=this.val,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],i=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],t=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,i,t))}}),a=new r,h=new r,s=new i,o=new i,l=new i;t.exports=r},function(t,e,i){t.exports={COMPLETE:i(987),DECODED:i(988),DECODED_ALL:i(989),DESTROY:i(990),DETUNE:i(991),GLOBAL_DETUNE:i(992),GLOBAL_MUTE:i(993),GLOBAL_RATE:i(994),GLOBAL_VOLUME:i(995),LOOP:i(996),LOOPED:i(997),MUTE:i(998),PAN:i(999),PAUSE_ALL:i(1e3),PAUSE:i(1001),PLAY:i(1002),RATE:i(1003),RESUME_ALL:i(1004),RESUME:i(1005),SEEK:i(1006),STOP_ALL:i(1007),STOP:i(1008),UNLOCKED:i(1009),VOLUME:i(1010)}},function(t,e,i){var n=i(0),r=i(21),l=i(23),s=i(8),c=i(2),u=i(7),o=new n({Extends:l,initialize:function t(e,i,n,r,s){var o,a="png";u(i)&&(i=c(h=i,"key"),n=c(h,"url"),o=c(h,"normalMap"),r=c(h,"xhrSettings"),a=c(h,"extension",a),s=c(h,"frameConfig")),Array.isArray(n)&&(o=n[1],n=n[0]);var h={type:"image",cache:e.textureManager,extension:a,responseType:"blob",key:i,url:n,xhrSettings:r,config:s};l.call(this,e,h),o&&((a=new t(e,this.key,o,r,s)).type="normalMap",this.setLink(a),e.addFile(a))},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){l.revokeObjectURL(t.data),t.onProcessComplete()},this.data.onerror=function(){l.revokeObjectURL(t.data),t.onProcessError()},l.createObjectURL(this.data,this.xhrLoader.response,"image/png")},addToCache:function(){var t,e=this.linkFile;e&&e.state===r.FILE_COMPLETE?(t="image"===this.type?this.cache.addImage(this.key,this.data,e.data):this.cache.addImage(e.key,e.data,this.data),this.pendingDestroy(t),e.pendingDestroy(t)):e||(t=this.cache.addImage(this.key,this.data),this.pendingDestroy(t))}});s.register("image",function(t,e,i){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new o(this,t[n]));else this.addFile(new o(this,t,e,i));return this}),t.exports=o},function(t,e){t.exports=function(t,e){e?t.setCollision(!0,!0,!0,!0,!1):t.resetCollision(!1)}},function(t,e,i){var s=i(164),n=i(0),r=i(11),o=i(15),i=i(1065),n=new n({Extends:o,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Flip,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Size,r.TextureCrop,r.Tint,r.Transform,r.Visible,i],initialize:function(t,e,i,n,r){o.call(this,t,"Sprite"),this._crop=this.resetCropObject(),this.anims=new s(this),this.setTexture(n,r),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline()},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 r.ToJSON(this)},preDestroy:function(){this.anims.destroy(),this.anims=void 0}});t.exports=n},function(t,e){t.exports=function(t,e){if(!(e>=t.length)){for(var i=t.length-1,n=t[e],r=e;r<i;r++)t[r]=t[r+1];return t.length=i,n}}},function(t,e,i){t.exports={ADDED_TO_SCENE:i(643),DESTROY:i(644),REMOVED_FROM_SCENE:i(645),VIDEO_COMPLETE:i(646),VIDEO_CREATED:i(647),VIDEO_ERROR:i(648),VIDEO_LOOP:i(649),VIDEO_PLAY:i(650),VIDEO_SEEKED:i(651),VIDEO_SEEKING:i(652),VIDEO_STOP:i(653),VIDEO_TIMEOUT:i(654),VIDEO_UNLOCKED:i(655)}},function(t,e){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)}},function(t,e){t.exports=function(t){var e,i={};for(e in t)Array.isArray(t[e])?i[e]=t[e].slice(0):i[e]=t[e];return i}},function(t,e){t.exports=function(t,e,i,n){t=t.length;if(e<0||t<e||i<=e||t<i||t<e+i){if(n)throw new Error("Range Error: Values outside acceptable range");return!1}return!0}},function(t,e){function i(t,e){return String(t).localeCompare(e)}function o(t,e,i,n){for(var r,s,o,a,h=t.length,l=0,c=2*i,u=0;u<h;u+=c)for(h<(s=(r=u+i)+i)&&(s=h),o=u,a=r=h<r?h:r;;)if(o<r&&a<s)e(t[o],t[a])<=0?n[l++]=t[o++]:n[l++]=t[a++];else if(o<r)n[l++]=t[o++];else{if(!(a<s))break;n[l++]=t[a++]}}t.exports=function(t,e){e=function(t,e){var i=t.length;if(!(i<=1))for(var n=new Array(i),r=1;r<i;r*=2){o(t,e,r,n);var s=t;t=n,n=s}return t}(t,e=void 0===e?i:e);return e!==t&&o(e,null,t.length,t),t}},function(t,e,i){var s=i(134),o=i(205);t.exports=function(t,e){var i,n,r=s.Power0;return"string"==typeof t?(s.hasOwnProperty(t)||(i="",t.indexOf(".")&&("in"===(i=t.substr(t.indexOf(".")+1)).toLowerCase()?i="easeIn":"out"===i.toLowerCase()?i="easeOut":"inout"===i.toLowerCase()&&(i="easeInOut")),t=o(t.substr(0,t.indexOf(".")+1)+i),s.hasOwnProperty(t)))&&(r=s[t]):"function"==typeof t?r=t:Array.isArray(t)&&t.length,e?((n=e.slice(0)).unshift(0),function(t){return n[0]=t,r.apply(this,n)}):r}},function(t,e,i){var g=i(12);t.exports=function(t,e,i,n,r){var s=t.strokeTint,i=g.getTintAppendFloatAlpha(e.strokeColor,e.strokeAlpha*i),o=(s.TL=i,s.TR=i,s.BL=i,s.BR=i,e.pathData),a=o.length-1,h=e.lineWidth,l=h/2,c=o[0]-n,u=o[1]-r;e.closePath||(a-=2);for(var d=2;d<a;d+=2){var p=o[d]-n,f=o[d+1]-r;t.batchLine(c,u,p,f,l,l,h,d-2,!!e.closePath&&d===a-1),c=p,u=f}}},function(t,e,i){var n=i(0),r=i(115),s=i(476),o=i(477),a=i(56),h=i(47),l=i(181),i=new n({initialize:function(t,e,i,n,r,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===r&&(r=0),void 0===s&&(s=0),this.type=a.TRIANGLE,this.x1=t,this.y1=e,this.x2=i,this.y2=n,this.x3=r,this.y3=s},contains:function(t,e){return r(this,t,e)},getPoint:function(t,e){return s(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,r,s){return void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===r&&(r=0),void 0===s&&(s=0),this.x1=t=void 0===t?0:t,this.y1=e,this.x2=i,this.y2=n,this.x3=r,this.y3=s,this},getLineA:function(t){return(t=void 0===t?new h:t).setTo(this.x1,this.y1,this.x2,this.y2),t},getLineB:function(t){return(t=void 0===t?new h:t).setTo(this.x2,this.y2,this.x3,this.y3),t},getLineC:function(t){return(t=void 0===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){t=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-=t,this.x2-=t,this.x3-=t}},right:{get:function(){return Math.max(this.x1,this.x2,this.x3)},set:function(t){t=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-=t,this.x2-=t,this.x3-=t}},top:{get:function(){return Math.min(this.y1,this.y2,this.y3)},set:function(t){t=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-=t,this.y2-=t,this.y3-=t}},bottom:{get:function(){return Math.max(this.y1,this.y2,this.y3)},set:function(t){t=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-=t,this.y2-=t,this.y3-=t}}});t.exports=i},function(t,e){var i={};(t.exports=i).create=function(t,e){return{x:t||0,y:e||0}},i.clone=function(t){return{x:t.x,y:t.y}},i.magnitude=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},i.magnitudeSquared=function(t){return t.x*t.x+t.y*t.y},i.rotate=function(t,e,i){var n=Math.cos(e),e=Math.sin(e),r=t.x*n-t.y*e;return(i=i||{}).y=t.x*e+t.y*n,i.x=r,i},i.rotateAbout=function(t,e,i,n){var r=Math.cos(e),e=Math.sin(e),s=i.x+((t.x-i.x)*r-(t.y-i.y)*e);return(n=n||{}).y=i.y+((t.x-i.x)*e+(t.y-i.y)*r),n.x=s,n},i.normalise=function(t){var e=i.magnitude(t);return 0===e?{x:0,y:0}:{x:t.x/e,y:t.y/e}},i.dot=function(t,e){return t.x*e.x+t.y*e.y},i.cross=function(t,e){return t.x*e.y-t.y*e.x},i.cross3=function(t,e,i){return(e.x-t.x)*(i.y-t.y)-(e.y-t.y)*(i.x-t.x)},i.add=function(t,e,i){return(i=i||{}).x=t.x+e.x,i.y=t.y+e.y,i},i.sub=function(t,e,i){return(i=i||{}).x=t.x-e.x,i.y=t.y-e.y,i},i.mult=function(t,e){return{x:t.x*e,y:t.y*e}},i.div=function(t,e){return{x:t.x/e,y:t.y/e}},i.perp=function(t,e){return{x:(e=!0===e?-1:1)*-t.y,y:e*t.x}},i.neg=function(t){return{x:-t.x,y:-t.y}},i.angle=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)},i._temp=[i.create(),i.create(),i.create(),i.create(),i.create(),i.create()]},function(t,e){var i={};(t.exports=i).create=function(t){var e={min:{x:0,y:0},max:{x:0,y:0}};return t&&i.update(e,t),e},i.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 r=e[n];r.x>t.max.x&&(t.max.x=r.x),r.x<t.min.x&&(t.min.x=r.x),r.y>t.max.y&&(t.max.y=r.y),r.y<t.min.y&&(t.min.y=r.y)}i&&(0<i.x?t.max.x+=i.x:t.min.x+=i.x,0<i.y?t.max.y+=i.y:t.min.y+=i.y)},i.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},i.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},i.translate=function(t,e){t.min.x+=e.x,t.max.x+=e.x,t.min.y+=e.y,t.max.y+=e.y},i.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}},function(t,e,i){var n=i(29),r=i(0),s=i(11),o=i(502),i=new r({Mixins:[s.Alpha,s.Flip,s.Visible],initialize:function(t,e,i,n,r,s,o,a){this.layer=t,this.index=e,this.x=i,this.y=n,this.width=r,this.height=s,this.right,this.bottom,this.baseWidth=void 0!==o?o:r,this.baseHeight=void 0!==a?a:s,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).tint=16777215,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=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.tileToWorldX(this.x,t):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.tileToWorldY(this.y,t)-(this.height-this.baseHeight)*e.scaleY:this.y*this.baseHeight-(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(e=void 0===e?new o:e).x=this.getLeft(),e.y=this.getTop(),e.width=this.getRight()-e.x,e.height=this.getBottom()-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,r){return void 0===e&&(e=t),void 0===i&&(i=t),void 0===n&&(n=t),void 0===r&&(r=!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,r&&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;return t===n.ORTHOGONAL?(this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight):t===n.ISOMETRIC?(this.pixelX=(this.x-this.y)*this.baseWidth*.5,this.pixelY=(this.x+this.y)*this.baseHeight*.5):t===n.STAGGERED?(this.pixelX=this.x*this.baseWidth+this.y%2*(this.baseWidth/2),this.pixelY=this.y*(this.baseHeight/2)):t===n.HEXAGONAL&&(t=this.layer.hexSideLength,t=(this.baseHeight-t)/2+t,this.pixelX=this.x*this.baseWidth+this.y%2*(this.baseWidth/2),this.pixelY=this.y*t),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){t=t.gidMap[this.index];if(t)return t}return null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var t=this.tilemapLayer;return t?t.tilemap:null}}});t.exports=i},function(t,e,i){var f={},g=(t.exports=f,i(64)),m=i(32),y=i(41),d=i(84),p=i(83),v=i(1393);f.rectangle=function(t,e,i,n,r){r=r||{};t={label:"Rectangle Body",position:{x:t,y:e},vertices:g.fromPath("L 0 0 L "+i+" 0 L "+i+" "+n+" L 0 "+n)};return r.chamfer&&(e=r.chamfer,t.vertices=g.chamfer(t.vertices,e.radius,e.quality,e.qualityMin,e.qualityMax),delete r.chamfer),y.create(m.extend({},t,r))},f.trapezoid=function(t,e,i,n,r,s){s=s||{};var o=i*(r*=.5),i=o+(1-2*r)*i,a=i+o,t={label:"Trapezoid Body",position:{x:t,y:e},vertices:g.fromPath(r<.5?"L 0 0 L "+o+" "+-n+" L "+i+" "+-n+" L "+a+" 0":"L 0 0 L "+i+" "+-n+" L "+a+" 0")};return s.chamfer&&(e=s.chamfer,t.vertices=g.chamfer(t.vertices,e.radius,e.quality,e.qualityMin,e.qualityMax),delete s.chamfer),y.create(m.extend({},t,s))},f.circle=function(t,e,i,n,r){n=n||{};var s={label:"Circle Body",circleRadius:i},r=(r=r||25,Math.ceil(Math.max(10,Math.min(r,i))));return r%2==1&&(r+=1),f.polygon(t,e,r,i,m.extend({},s,n))},f.polygon=function(t,e,i,n,r){if(r=r||{},i<3)return f.circle(t,e,n,r);for(var s=2*Math.PI/i,o="",a=.5*s,h=0;h<i;h+=1){var l=a+h*s,c=Math.cos(l)*n,l=Math.sin(l)*n;o+="L "+c.toFixed(3)+" "+l.toFixed(3)+" "}t={label:"Polygon Body",position:{x:t,y:e},vertices:g.fromPath(o)};return r.chamfer&&(e=r.chamfer,t.vertices=g.chamfer(t.vertices,e.radius,e.quality,e.qualityMin,e.qualityMax),delete r.chamfer),y.create(m.extend({},t,r))},f.fromVertices=function(t,e,i,n,r,s,o){var a,h,l;for(n=n||{},a=[],r=void 0!==r&&r,s=void 0!==s?s:.01,o=void 0!==o?o:10,v||m.warn("Bodies.fromVertices: poly-decomp.js required. Could not decompose vertices. Fallback to convex hull."),m.isArray(i[0])||(i=[i]),l=0;l<i.length;l+=1)if(h=i[l],(c=g.isConvex(h))||!v)h=c?g.clockwiseSort(h):g.hull(h),a.push({position:{x:t,y:e},vertices:h});else{var c=h.map(function(t){return[t.x,t.y]});v.makeCCW(c),!1!==s&&v.removeCollinearPoints(c,s);for(var u=v.quickDecomp(c),d=0;d<u.length;d++){var p=u[d].map(function(t){return{x:t[0],y:t[1]}});0<o&&g.area(p)<o||a.push({position:g.centre(p),vertices:p})}}for(d=0;d<a.length;d++)a[d]=y.create(m.extend(a[d],n));return r&&f.flagCoincidentParts(a,5),1<a.length?(r=y.create(m.extend({parts:a.slice(0)},n)),y.setPosition(r,{x:t,y:e}),r):a[0]},f.flagCoincidentParts=function(t,e){void 0===e&&(e=5);for(var i=0;i<t.length;i++)for(var n=t[i],r=i+1;r<t.length;r++){var s=t[r];if(d.overlaps(n.bounds,s.bounds))for(var o=n.vertices,a=s.vertices,h=0;h<n.vertices.length;h++)for(var l=0;l<s.vertices.length;l++){var c=p.magnitudeSquared(p.sub(o[(h+1)%o.length],a[l])),u=p.magnitudeSquared(p.sub(o[h],a[(l+1)%a.length]));c<e&&u<e&&(o[h].isInternal=!0,a[l].isInternal=!0)}}return t}},function(t,e){t.exports=function(t){return t.x-t.width*t.originX+.5*t.width}},function(t,e){t.exports=function(t,e){var i=t.width*t.originX;return t.x=e+i-.5*t.width,t}},function(t,e){t.exports=function(t){return t.y-t.height*t.originY+.5*t.height}},function(t,e){t.exports=function(t,e){var i=t.height*t.originY;return t.y=e+i-.5*t.height,t}},function(t,e,i){t.exports={POST_RENDER:i(628),PRE_RENDER:i(629),RENDER:i(630),RESIZE:i(631)}},function(t,e){t.exports={BITMAPMASK_PIPELINE:"BitmapMaskPipeline",LIGHT_PIPELINE:"Light2D",POINTLIGHT_PIPELINE:"PointLightPipeline",SINGLE_PIPELINE:"SinglePipeline",MULTI_PIPELINE:"MultiPipeline",ROPE_PIPELINE:"RopePipeline",GRAPHICS_PIPELINE:"GraphicsPipeline",POSTFX_PIPELINE:"PostFXPipeline",UTILITY_PIPELINE:"UtilityPipeline"}},function(t,e,i){var h=i(74);t.exports=function(t,e,i,n){if(void 0===n&&(n=t),!Array.isArray(e))return-1!==(o=t.indexOf(e))?(h(t,o),i&&i.call(n,e),e):null;for(var r=e.length-1,s=[];0<=r;){var o,a=e[r];-1!==(o=t.indexOf(a))&&(h(t,o),s.push(a),i&&i.call(n,a)),r--}return s}},function(t,e,i){var n=i(0),r=i(199),s=i(10),o=i(3),i=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 t.strokePoints(this.getPoints(e=void 0===e?32:e))},getBounds:function(t,e){t=t||new s,void 0===e&&(e=16);var i=this.getLength(),i=(i<e&&(e=i/2),Math.max(1,Math.round(i/e)));return r(this.getSpacedPoints(i),t)},getDistancePoints:function(t){var e=this.getLength(),e=Math.max(1,e/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),r=0;i.push(0);for(var s=1;s<=t;s++)r+=(e=this.getPoint(s/t,this._tmpVec2B)).distance(n),i.push(r),n.copy(e);return this.cacheArcLengths=i},getPointAt:function(t,e){t=this.getUtoTmapping(t);return this.getPoint(t,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 r=this.getUtoTmapping(n/t,null,t);i.push(this.getPoint(r))}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,t=t+1e-4;return 1<t&&(t=1),this.getPoint(i=i<0?0:i,this._tmpVec2A),this.getPoint(t,e),e.subtract(this._tmpVec2A).normalize()},getTangentAt:function(t,e){t=this.getUtoTmapping(t);return this.getTangent(t,e)},getTFromDistance:function(t,e){return t<=0?0:this.getUtoTmapping(0,t,e)},getUtoTmapping:function(t,e,i){for(var n,r=this.getLengths(i),s=0,i=r.length,o=e?Math.min(e,r[i-1]):t*r[i-1],a=0,h=i-1;a<=h;)if((n=r[s=Math.floor(a+(h-a)/2)]-o)<0)a=s+1;else{if(!(0<n)){h=s;break}h=s-1}return r[s=h]===o?s/(i-1):(s+(o-(e=r[s]))/(r[s+1]-e))/(i-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});t.exports=i},function(t,e,i){t.exports={ADD:i(968),COMPLETE:i(969),FILE_COMPLETE:i(970),FILE_KEY_COMPLETE:i(971),FILE_LOAD_ERROR:i(972),FILE_LOAD:i(973),FILE_PROGRESS:i(974),POST_PROCESS:i(975),PROGRESS:i(976),START:i(977)}},function(t,e,i){var u=i(4);t.exports=function(t,e,i){void 0===i&&(i=new u);var n,r=t.x1,s=t.y1,o=t.x2,t=t.y2,a=e.x1,h=e.y1,l=e.x2,e=e.y2,c=(e-h)*(o-r)-(l-a)*(t-s);return 0!=c&&(n=((o-r)*(s-h)-(t-s)*(r-a))/c,0<=(l=((l-a)*(s-h)-(e-h)*(r-a))/c)&&l<=1&&0<=n&&n<=1&&(i.x=r+l*(o-r),i.y=s+l*(t-s),!0))}},function(t,e){t.exports=function(t){return Math.atan2(t.y2-t.y1,t.x2-t.x1)}},function(t,e,i){var n=i(18);t.exports=function(t,e,i){return(i-e)*(t=n(t,0,1))+e}},function(t,e){t.exports=function(t,e,i){return t&&t.hasOwnProperty(e)?t[e]:i}},function(t,e){t.exports={CREATED:0,INIT:1,DELAY:2,OFFSET_DELAY:3,PENDING_RENDER:4,PLAYING_FORWARD:5,PLAYING_BACKWARD:6,HOLD_DELAY:7,REPEAT_DELAY:8,COMPLETE:9,PENDING_ADD:20,PAUSED:21,LOOP_DELAY:22,ACTIVE:23,COMPLETE_DELAY:24,PENDING_REMOVE:25,REMOVED:26}},function(t,e,i){var n=i(0),a=i(315),i=new n({initialize:function(t,e){this.parent=t,(this.events=e)||(this.events=t.events||t),this.list={},this.values={},this._frozen=!1,!t.hasOwnProperty("sys")&&this.events&&this.events.once(a.DESTROY,this.destroy,this)},get:function(t){var e=this.list;if(Array.isArray(t)){for(var i=[],n=0;n<t.length;n++)i.push(e[t[n]]);return i}return e[t]},getAll:function(){var t,e={};for(t in this.list)this.list.hasOwnProperty(t)&&(e[t]=this.list[t]);return e},query:function(t){var e,i={};for(e in this.list)this.list.hasOwnProperty(e)&&e.match(t)&&(i[e]=this.list[e]);return i},set:function(t,e){if(!this._frozen){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){var i;return this._frozen||(void 0===e&&(e=1),i=this.get(t),this.set(t,(i=void 0===i?0:i)+e)),this},toggle:function(t){return this._frozen||this.set(t,!this.get(t)),this},setValue:function(i,t){return this._frozen||(this.has(i)?this.values[i]=t:(r=(n=this).list,s=this.events,o=this.parent,Object.defineProperty(this.values,i,{enumerable:!0,configurable:!0,get:function(){return r[i]},set:function(t){var e;n._frozen||(e=r[i],r[i]=t,s.emit(a.CHANGE_DATA,o,i,t,e),s.emit(a.CHANGE_DATA_KEY+i,o,t,e))}}),r[i]=t,s.emit(a.SET_DATA,o,i,t))),this;var n,r,s,o},each:function(t,e){for(var i,n=[this.parent,null,void 0],r=1;r<arguments.length;r++)n.push(arguments[r]);for(i in this.list)n[1]=i,n[2]=this.list[i],t.apply(e,n);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){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){var e;return this.has(t)&&(e=this.list[t],delete this.list[t],delete this.values[t],this.events.emit(a.REMOVE_DATA,this.parent,t,e)),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(a.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(a.CHANGE_DATA),this.events.off(a.SET_DATA),this.events.off(a.REMOVE_DATA),this.parent=null},freeze:{get:function(){return this._frozen},set:function(t){this._frozen=!!t}},count:{get:function(){var t,e=0;for(t in this.list)void 0!==this.list[t]&&e++;return e}}});t.exports=i},function(t,e,i){i=new(i(0))({initialize:function(t){if(this.entries={},this.size=0,Array.isArray(t))for(var e=0;e<t.length;e++)this.set(t[e][0],t[e][1])},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=[],i=this.entries;for(t in i)e.push(i[t]);return e},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=[],i=this.entries;for(t in i)e.push(i[t]);return e},dump:function(){var t=this.entries},each:function(t){var e,i=this.entries;for(e in i)if(!1===t(e,i[e]))break;return this},contains:function(t){var e,i=this.entries;for(e in i)if(i[e]===t)return!0;return!1},merge:function(t,e){void 0===e&&(e=!1);var i,n=this.entries,r=t.entries;for(i in r)n.hasOwnProperty(i)&&e?n[i]=r[i]:this.set(i,r[i]);return this}});t.exports=i},function(t,e){t.exports=function(t,e,i){return t<<16|e<<8|i}},function(t,e,i){t.exports={ENTER_FULLSCREEN:i(800),FULLSCREEN_FAILED:i(801),FULLSCREEN_UNSUPPORTED:i(802),LEAVE_FULLSCREEN:i(803),ORIENTATION_CHANGE:i(804),RESIZE:i(805)}},function(r,t,e){!function(t){var e,i,n={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};r.exports=("function"!=typeof importScripts&&(e=navigator.userAgent,/Windows/.test(e)?n.windows=!0:/Mac OS/.test(e)&&!/like Mac OS/.test(e)?navigator.maxTouchPoints&&2<navigator.maxTouchPoints?(n.iOS=!0,n.iPad=!0,navigator.appVersion.match(/Version\/(\d+)/),n.iOSVersion=parseInt(RegExp.$1,10)):n.macOS=!0:/Android/.test(e)?n.android=!0:/Linux/.test(e)?n.linux=!0:/iP[ao]d|iPhone/i.test(e)?(n.iOS=!0,navigator.appVersion.match(/OS (\d+)/),n.iOSVersion=parseInt(RegExp.$1,10),n.iPhone=-1!==e.toLowerCase().indexOf("iphone"),n.iPad=-1!==e.toLowerCase().indexOf("ipad")):/Kindle/.test(e)||/\bKF[A-Z][A-Z]+/.test(e)||/Silk.*Mobile Safari/.test(e)?n.kindle=!0:/CrOS/.test(e)&&(n.chromeOS=!0),(/Windows Phone/i.test(e)||/IEMobile/i.test(e))&&(n.android=!1,n.iOS=!1,n.macOS=!1,n.windows=!0,n.windowsPhone=!0),i=/Silk/.test(e),(n.windows||n.macOS||n.linux&&!i||n.chromeOS)&&(n.desktop=!0),(n.windowsPhone||/Windows NT/i.test(e)&&/Touch/i.test(e))&&(n.desktop=!1),navigator.standalone&&(n.webApp=!0),"function"!=typeof importScripts&&(void 0!==window.cordova&&(n.cordova=!0),void 0!==window.ejecta&&(n.ejecta=!0)),void 0!==t&&t.versions&&t.versions.node&&(n.node=!0),n.node&&"object"==typeof t.versions&&(n.nodeWebkit=!!t.versions["node-webkit"],n.electron=!!t.versions.electron),/Crosswalk/.test(e)&&(n.crosswalk=!0),n.pixelRatio=window.devicePixelRatio||1),n)}.call(this,e(807))},function(t,e,i){t.exports={ADD:i(861),ERROR:i(862),LOAD:i(863),READY:i(864),REMOVE:i(865)}},function(t,e){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}}},function(t,e,i){var n=i(0),b=i(59),r=i(2),s=i(878),o=i(879),a=i(25),w=i(12),h=i(107),l=i(58),i=new n({Extends:l,initialize:function(t){var e=t.game.renderer,i=r(t,"fragShader",s);t.fragShader=w.parseFragmentShaderMaxTextures(i,e.maxTextures),t.vertShader=r(t,"vertShader",o),t.attributes=r(t,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:h.UNSIGNED_BYTE,normalized:!0}]),l.call(this,t),this._tempMatrix1=new a,this._tempMatrix2=new a,this._tempMatrix3=new a,this.calcMatrix=new a,this.tempTriangle=[{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0}],this.strokeTint={TL:0,TR:0,BL:0,BR:0},this.fillTint={TL:0,TR:0,BL:0,BR:0},this.currentFrame={u0:0,v0:0,u1:1,v1:1},this.firstQuad=[0,0,0,0,0],this.prevQuad=[0,0,0,0,0],this.polygonCache=[]},boot:function(){l.prototype.boot.call(this),this.currentShader.set1iv("uMainSampler",this.renderer.textureIndexes)},batchSprite:function(t,e,i){this.manager.set(this,t);var n=this._tempMatrix1,r=this._tempMatrix2,s=this._tempMatrix3,o=t.frame,a=o.glTexture,h=o.u0,l=o.v0,c=o.u1,u=o.v1,d=o.x,p=o.y,f=o.cutWidth,g=o.cutHeight,m=o.customPivot,y=t.displayOriginX,v=t.displayOriginY,d=-y+d,p=-v+p,x=(t.isCropped&&((x=t._crop).flipX===t.flipX&&x.flipY===t.flipY||o.updateCropUVs(x,t.flipX,t.flipY),h=x.u0,l=x.v0,c=x.u1,u=x.v1,f=x.width,g=x.height,d=-y+x.x,p=-v+x.y),1),b=1,y=(t.flipX&&(m||(d+=-o.realWidth+2*y),x=-1),(t.flipY||o.source.isGLTexture&&!a.flipY)&&(m||(p+=-o.realHeight+2*v),b=-1),r.applyITRS(t.x,t.y,t.rotation,t.scaleX*x,t.scaleY*b),n.copyFrom(e.matrix),i?(n.multiplyWithOffset(i,-e.scrollX*t.scrollFactorX,-e.scrollY*t.scrollFactorY),r.e=t.x,r.f=t.y):(r.e-=e.scrollX*t.scrollFactorX,r.f-=e.scrollY*t.scrollFactorY),n.multiply(r,s),d+f),m=p+g,v=e.roundPixels,x=s.getXRound(d,p,v),b=s.getYRound(d,p,v),i=s.getXRound(d,m,v),n=s.getYRound(d,m,v),r=s.getXRound(y,m,v),f=s.getYRound(y,m,v),g=s.getXRound(y,p,v),d=s.getYRound(y,p,v),m=w.getTintAppendFloatAlpha,s=e.alpha,y=m(t.tintTopLeft,s*t._alphaTL),p=m(t.tintTopRight,s*t._alphaTR),v=m(t.tintBottomLeft,s*t._alphaBL),e=m(t.tintBottomRight,s*t._alphaBR),m=(this.shouldFlush(6)&&this.flush(),this.setGameObject(t,o));this.manager.preBatch(t),this.batchQuad(t,x,b,i,n,r,f,g,d,h,l,c,u,y,p,v,e,t.tintFill,a,m),this.manager.postBatch(t)},batchTexture:function(t,e,i,n,r,s,o,a,B,F,N,h,l,c,u,d,p,f,g,m,y,z,Y,X,U,V,v,x,b,w,G,T){this.manager.set(this,t);var S=this._tempMatrix1,P=this._tempMatrix2,_=this._tempMatrix3,E=f/i+v,j=g/n+x,W=(f+m)/i+v,H=(g+y)/n+x,A=o,M=a,k=-d,C=-p,m=(t.isCropped&&(o=A=L=(O=t._crop).width,a=M=I=O.height,R=f=O.x,D=g=O.y,E=(R=h?m-O.x-L:R)/i+v,j=(D=l?y-O.y-I:D)/n+x,W=(R+L)/i+v,H=(D+I)/n+x,k=-d+f,C=-p+g),h&&(A*=-1,k+=o),(l^=!G&&e.isRenderTexture?1:0)&&(M*=-1,C+=a),k+A),y=C+M,O=(P.applyITRS(r,s,N,B,F),S.copyFrom(b.matrix),w?(S.multiplyWithOffset(w,-b.scrollX*c,-b.scrollY*u),P.e=r,P.f=s):(P.e-=b.scrollX*c,P.f-=b.scrollY*u),S.multiply(P,_),b.roundPixels),R=_.getXRound(k,C,O),L=_.getYRound(k,C,O),i=_.getXRound(k,y,O),v=_.getYRound(k,y,O),D=_.getXRound(m,y,O),I=_.getYRound(m,y,O),n=_.getXRound(m,C,O),x=_.getYRound(m,C,O);void 0===T&&(T=this.renderer.setTexture2D(e)),t&&this.manager.preBatch(t),this.batchQuad(t,R,L,i,v,D,I,n,x,E,j,W,H,z,Y,X,U,V,e,T),t&&this.manager.postBatch(t)},batchTextureFrame:function(t,e,i,n,r,s,o){this.manager.set(this);var s=this._tempMatrix1.copyFrom(s),a=this._tempMatrix2,h=e+t.width,l=i+t.height,o=(o?s.multiply(o,a):a=s,a.getX(e,i)),s=a.getY(e,i),c=a.getX(e,l),e=a.getY(e,l),u=a.getX(h,l),l=a.getY(h,l),d=a.getX(h,i),a=a.getY(h,i),h=this.renderer.setTextureSource(t.source);n=w.getTintAppendFloatAlpha(n,r),this.batchQuad(null,o,s,c,e,u,l,d,a,t.u0,t.v0,t.u1,t.v1,n,n,n,n,0,t.glTexture,h)},batchFillRect:function(t,e,i,n,r,s){this.renderer.pipelines.set(this);var o=this.calcMatrix,s=(s&&s.multiply(r,o),t+i),r=e+n,i=o.getX(t,e),n=o.getY(t,e),a=o.getX(t,r),t=o.getY(t,r),h=o.getX(s,r),r=o.getY(s,r),l=o.getX(s,e),o=o.getY(s,e),s=this.fillTint;this.batchQuad(null,i,n,a,t,h,r,l,o,0,0,1,1,s.TL,s.TR,s.BL,s.BR,2)},batchFillTriangle:function(t,e,i,n,r,s,o,a){this.renderer.pipelines.set(this);var h=this.calcMatrix,a=(a&&a.multiply(o,h),h.getX(t,e)),o=h.getY(t,e),t=h.getX(i,n),e=h.getY(i,n),i=h.getX(r,s),n=h.getY(r,s),h=this.fillTint;this.batchTri(null,a,o,t,e,i,n,0,0,1,1,h.TL,h.TR,h.BL,2)},batchStrokeTriangle:function(t,e,i,n,r,s,o,a,h){var l=this.tempTriangle;l[0].x=t,l[0].y=e,l[0].width=o,l[1].x=i,l[1].y=n,l[1].width=o,l[2].x=r,l[2].y=s,l[2].width=o,l[3].x=t,l[3].y=e,l[3].width=o,this.batchStrokePath(l,o,!1,a,h)},batchFillPath:function(t,e,i){this.renderer.pipelines.set(this);var n=this.calcMatrix;i&&i.multiply(e,n);for(var r,s,o=t.length,a=this.polygonCache,h=this.fillTint.TL,l=this.fillTint.TR,c=this.fillTint.BL,u=0;u<o;++u)s=t[u],a.push(s.x,s.y);for(var o=(r=b(a)).length,d=0;d<o;d+=3){var p=2*r[d+0],f=2*r[d+1],g=2*r[d+2],m=a[0+p],p=a[1+p],y=a[0+f],f=a[1+f],v=a[0+g],g=a[1+g],x=n.getX(m,p),m=n.getY(m,p),p=n.getX(y,f),y=n.getY(y,f),f=n.getX(v,g),v=n.getY(v,g);this.batchTri(null,x,m,p,y,f,v,0,0,1,1,h,l,c,2)}a.length=0},batchStrokePath:function(t,e,i,n,r){this.renderer.pipelines.set(this),this.prevQuad[4]=0,this.firstQuad[4]=0;for(var s=t.length-1,o=0;o<s;o++){var a=t[o],h=t[o+1];this.batchLine(a.x,a.y,h.x,h.y,a.width/2,h.width/2,e,o,!i&&o===s-1,n,r)}},batchLine:function(t,e,i,n,r,s,o,a,h,l,c){this.renderer.pipelines.set(this);var u=this.calcMatrix;c&&c.multiply(l,u);var c=i-t,l=n-e,c=Math.sqrt(c*c+l*l),l=r*(n-e)/c,r=r*(t-i)/c,d=s*(n-e)/c,s=s*(t-i)/c,c=i-d,p=n-s,f=t-l,g=e-r,i=i+d,d=n+s,n=t+l,s=e+r,t=u.getX(c,p),l=u.getY(c,p),e=u.getX(f,g),r=u.getY(f,g),c=u.getX(i,d),p=u.getY(i,d),f=u.getX(n,s),g=u.getY(n,s),i=this.strokeTint,d=i.TL,u=i.TR,n=i.BL,s=i.BR;this.batchQuad(null,f,g,e,r,t,l,c,p,0,0,1,1,d,u,n,s,2),o<=2||(i=this.prevQuad,o=this.firstQuad,0<a&&i[4]?this.batchQuad(null,f,g,e,r,i[0],i[1],i[2],i[3],0,0,1,1,d,u,n,s,2):(o[0]=f,o[1]=g,o[2]=e,o[3]=r,o[4]=1),h&&o[4]?this.batchQuad(null,t,l,c,p,o[0],o[1],o[2],o[3],0,0,1,1,d,u,n,s,2):(i[0]=t,i[1]=l,i[2]=c,i[3]=p,i[4]=1))}});t.exports=i},function(t,e,i){var n=i(0),b=i(18),r=i(17),s=new n({initialize:function(t,e,i,n,r,s,o){this.texture=t,this.name=e,this.source=t.source[i],this.sourceIndex=i,this.glTexture=this.source.glTexture,this.cutX,this.cutY,this.cutWidth,this.cutHeight,this.x=0,this.y=0,this.width,this.height,this.halfWidth,this.halfHeight,this.centerX,this.centerY,this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.u0=0,this.v0=0,this.u1=0,this.v1=0,this.data={cut:{x:0,y:0,w:0,h:0,r:0,b:0},trim:!1,sourceSize:{w:0,h:0},spriteSourceSize:{x:0,y:0,w:0,h:0,r:0,b:0},radius:0,drawImage:{x:0,y:0,width:0,height:0}},this.setSize(s,o,n,r)},setSize:function(t,e,i,n){void 0===n&&(n=0),this.cutX=i=void 0===i?0:i,this.cutY=n,this.cutWidth=t,this.cutHeight=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 r=this.data,s=r.cut,s=(s.x=i,s.y=n,s.w=t,s.h=e,s.r=i+t,s.b=n+e,r.sourceSize.w=t,r.sourceSize.h=e,r.spriteSourceSize.w=t,r.spriteSourceSize.h=e,r.radius=.5*Math.sqrt(t*t+e*e),r.drawImage);return s.x=i,s.y=n,s.width=t,s.height=e,this.updateUVs()},setTrim:function(t,e,i,n,r,s){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=r,a.h=s,a.r=i+r,a.b=n+s,this.x=i,this.y=n,this.width=r,this.height=s,this.halfWidth=.5*r,this.halfHeight=.5*s,this.centerX=Math.floor(r/2),this.centerY=Math.floor(s/2),this.updateUVs()},setCropUVs:function(t,e,i,n,r,s,o){var a,h,l,c=this.cutX,u=this.cutY,d=this.cutWidth,p=this.cutHeight,f=this.realWidth,g=this.realHeight,m=c+(e=b(e,0,f)),y=u+(i=b(i,0,g)),f=n=b(n,0,f-e),g=r=b(r,0,g-i),v=this.data,v=(v.trim?(v=v.spriteSourceSize,h=e+(n=b(n,0,d-e)),l=i+(r=b(r,0,p-i)),v.r<e||v.b<i||v.x>h||v.y>l?g=f=y=m=0:(x=Math.max(v.x,e),a=Math.max(v.y,i),f=h=Math.min(v.r,h)-x,g=l=Math.min(v.b,l)-a,m=s?c+(d-(x-v.x)-h):c+(x-v.x),y=o?u+(p-(a-v.y)-l):u+(a-v.y),e=x,i=a,n=h,r=l)):(s&&(m=c+(d-e-n)),o&&(y=u+(p-i-r))),this.source.width),x=this.source.height;return t.u0=Math.max(0,m/v),t.v0=Math.max(0,y/x),t.u1=Math.min(1,(m+f)/v),t.v1=Math.min(1,(y+g)/x),t.x=e,t.y=i,t.cx=m,t.cy=y,t.cw=f,t.ch=g,t.width=n,t.height=r,t.flipX=s,t.flipY=o,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,r,s){var o=this.data.drawImage;return o.width=t,o.height=e,this.u0=i,this.v0=n,this.u1=r,this.v1=s,this},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,n=this.cutHeight,r=this.data.drawImage,r=(r.width=i,r.height=n,this.source.width),s=this.source.height;return this.u0=t/r,this.v0=e/s,this.u1=(t+i)/r,this.v1=(e+n)/s,this},updateUVsInverted:function(){var t=this.source.width,e=this.source.height;return this.u0=(this.cutX+this.cutHeight)/t,this.v0=this.cutY/e,this.u1=this.cutX/t,this.v1=(this.cutY+this.cutWidth)/e,this},clone:function(){var t=new s(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.source=null,this.texture=null,this.glTexture=null,this.customData=null,this.data=null},realWidth:{get:function(){return this.data.sourceSize.w}},realHeight:{get:function(){return this.data.sourceSize.h}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},canvasData:{get:function(){return this.data.drawImage}}});t.exports=s},function(t,e,i){var r=i(208),n=i(0),s=i(1),o=i(79),i=new n({initialize:function(t){this.parent=t,this.list=[],this.position=0,this.addCallback=s,this.removeCallback=s,this._sortKey=""},add:function(t,e){return e?r.Add(this.list,t):r.Add(this.list,t,0,this.addCallback,this)},addAt:function(t,e,i){return i?r.AddAt(this.list,t,e):r.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(i,t){return i&&o(this.list,t=void 0===t?function(t,e){return t[i]-e[i]}:t),this},getByName:function(t){return r.GetFirst(this.list,"name",t)},getRandom:function(t,e){return r.GetRandom(this.list,t,e)},getFirst:function(t,e,i,n){return r.GetFirst(this.list,t,e,i,n)},getAll:function(t,e,i,n){return r.GetAll(this.list,t,e,i,n)},count:function(t,e){return r.CountAllMatching(this.list,t,e)},swap:function(t,e){r.Swap(this.list,t,e)},moveTo:function(t,e){return r.MoveTo(this.list,t,e)},moveAbove:function(t,e){return r.MoveAbove(this.list,t,e)},moveBelow:function(t,e){return r.MoveBelow(this.list,t,e)},remove:function(t,e){return e?r.Remove(this.list,t):r.Remove(this.list,t,this.removeCallback,this)},removeAt:function(t,e){return e?r.RemoveAt(this.list,t):r.RemoveAt(this.list,t,this.removeCallback,this)},removeBetween:function(t,e,i){return i?r.RemoveBetween(this.list,t,e):r.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 r.BringToTop(this.list,t)},sendToBack:function(t){return r.SendToBack(this.list,t)},moveUp:function(t){return r.MoveUp(this.list,t),t},moveDown:function(t){return r.MoveDown(this.list,t),t},reverse:function(){return this.list.reverse(),this},shuffle:function(){return r.Shuffle(this.list),this},replace:function(t,e){return r.Replace(this.list,t,e)},exists:function(t){return-1<this.list.indexOf(t)},setAll:function(t,e,i,n){return r.SetAll(this.list,t,e,i,n),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?this.list[0]:null}},last:{get:function(){return 0<this.list.length?(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 0<this.position?(this.position--,this.list[this.position]):null}}});t.exports=i},function(t,e,i){var n=i(0),r=i(112),s=i(445),o=i(446),a=i(56),h=i(180),i=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 r(this,t,e)},getPoint:function(t,e){return s(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}}});t.exports=i},function(t,e){t.exports=function(t,e,i){return!(t.width<=0||t.height<=0)&&(e=(e-t.x)/t.width,(e*=e)+(e=(i-t.y)/t.height)*e<.25)}},function(t,e,i){var m=i(275),n=i(0),s=i(75),r=i(9),o=i(207),y=i(2),v=i(6),a=i(7),x=i(437),h=i(149),l=i(73),i=new n({Extends:r,initialize:function(t,e,i){r.call(this),i?e&&!Array.isArray(e)&&(e=[e]):Array.isArray(e)?a(e[0])&&(i=e,e=null):a(e)&&(i=e,e=null),this.scene=t,this.children=new h,this.isParent=!0,this.type="Group",this.classType=y(i,"classType",l),this.name=y(i,"name",""),this.active=y(i,"active",!0),this.maxSize=y(i,"maxSize",-1),this.defaultKey=y(i,"defaultKey",null),this.defaultFrame=y(i,"defaultFrame",null),this.runChildUpdate=y(i,"runChildUpdate",!1),this.createCallback=y(i,"createCallback",null),this.removeCallback=y(i,"removeCallback",null),this.createMultipleCallback=y(i,"createMultipleCallback",null),this.internalCreateCallback=y(i,"internalCreateCallback",null),this.internalRemoveCallback=y(i,"internalRemoveCallback",null),e&&this.addMultiple(e),i&&this.createMultiple(i),this.on(s.ADDED_TO_SCENE,this.addedToScene,this),this.on(s.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,r,s){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.defaultKey),void 0===n&&(n=this.defaultFrame),void 0===r&&(r=!0),void 0===s&&(s=!0),this.isFull()?null:((t=new this.classType(this.scene,t,e,i,n)).addToDisplayList(this.scene.sys.displayList),t.addToUpdateList(),t.visible=r,t.setActive(s),this.add(t),t)},createMultiple:function(t){if(this.isFull())return[];var e=[];if((t=Array.isArray(t)?t:[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=y(t,"classType",this.classType);var e=y(t,"key",void 0),i=y(t,"frame",null),n=y(t,"visible",!0),r=y(t,"active",!0),s=[];if(void 0!==e){Array.isArray(e)||(e=[e]),Array.isArray(i)||(i=[i]);var o=y(t,"repeat",0),a=y(t,"randomKey",!1),h=y(t,"randomFrame",!1),l=y(t,"yoyo",!1),c=y(t,"quantity",!1),u=y(t,"frameQuantity",1),d=y(t,"max",0),p=x(e,i,{max:d,qty:c||u,random:a,randomB:h,repeat:o,yoyo:l});t.createCallback&&(this.createCallback=t.createCallback),t.removeCallback&&(this.removeCallback=t.removeCallback);for(var f=0;f<p.length;f++){var g=this.create(0,0,p[f].a,p[f].b,n,r);if(!g)break;s.push(g)}e=v(t,"setXY.x",0),i=v(t,"setXY.y",0),d=v(t,"setXY.stepX",0),c=v(t,"setXY.stepY",0),u=(m.SetXY(s,e,i,d,c),v(t,"setRotation.value",0)),a=v(t,"setRotation.step",0),h=(m.SetRotation(s,u,a),v(t,"setScale.x",1)),o=v(t,"setScale.y",h),l=v(t,"setScale.stepX",0),e=v(t,"setScale.stepY",0),i=(m.SetScale(s,h,o,l,e),v(t,"setOrigin.x",.5)),d=v(t,"setOrigin.y",i),c=v(t,"setOrigin.stepX",0),u=v(t,"setOrigin.stepY",0),a=(m.SetOrigin(s,i,d,c,u),v(t,"setAlpha.value",1)),h=v(t,"setAlpha.step",0),o=(m.SetAlpha(s,a,h),v(t,"setDepth.value",0)),l=v(t,"setDepth.step",0),e=(m.SetDepth(s,o,l),v(t,"setScrollFactor.x",1)),i=v(t,"setScrollFactor.y",e),d=v(t,"setScrollFactor.stepX",0),c=v(t,"setScrollFactor.stepY",0),u=(m.SetScrollFactor(s,e,i,d,c),y(t,"hitArea",null)),a=y(t,"hitAreaCallback",null),h=(u&&m.SetHitArea(s,u,a),y(t,"gridAlign",!1));h&&m.GridAlign(s,h),this.createMultipleCallback&&this.createMultipleCallback.call(this,s)}return s},preUpdate:function(t,e){if(this.runChildUpdate&&0!==this.children.size)for(var i=this.children.entries.slice(),n=0;n<i.length;n++){var r=i[n];r.active&&r.update(t,e)}},add:function(t,e){return void 0===e&&(e=!1),this.isFull()||(this.children.set(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(s.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.contains(t)&&(this.children.delete(t),this.internalRemoveCallback&&this.internalRemoveCallback.call(this,t),this.removeCallback&&this.removeCallback.call(this,t),t.off(s.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);for(var i=this.children,n=0;n<i.size;n++){var r=i.entries[n];r.off(s.DESTROY,this.remove,this),e?r.destroy():t&&(r.removeFromDisplayList(),r.removeFromUpdateList())}return this.children.clear(),this},contains:function(t){return this.children.contains(t)},getChildren:function(){return this.children.entries},getLength:function(){return this.children.size},getMatching:function(t,e,i,n){return o(this.children.entries,t,e,i,n)},getFirst:function(t,e,i,n,r,s,o){return this.getHandler(!0,1,t,e,i,n,r,s,o)},getFirstNth:function(t,e,i,n,r,s,o,a){return this.getHandler(!0,t,e,i,n,r,s,o,a)},getLast:function(t,e,i,n,r,s,o){return this.getHandler(!1,1,t,e,i,n,r,s,o)},getLastNth:function(t,e,i,n,r,s,o,a){return this.getHandler(!1,t,e,i,n,r,s,o,a)},getHandler:function(t,e,i,n,r,s,o,a,h){void 0===i&&(i=!1),void 0===n&&(n=!1);var l,c,u=0,d=this.children.entries;if(t)for(c=0;c<d.length;c++)if((l=d[c]).active===i){if(++u===e)break}else l=null;else for(c=d.length-1;0<=c;c--)if((l=d[c]).active===i){if(++u===e)break}else l=null;return l?("number"==typeof r&&(l.x=r),"number"==typeof s&&(l.y=s),l):n?this.create(r,s,o,a,h):null},get:function(t,e,i,n,r){return this.getFirst(!1,!0,t,e,i,n,r)},getFirstAlive:function(t,e,i,n,r,s){return this.getFirst(!0,t,e,i,n,r,s)},getFirstDead:function(t,e,i,n,r,s){return this.getFirst(!1,t,e,i,n,r,s)},playAnimation:function(t,e){return m.PlayAnimation(this.children.entries,t,e),this},isFull:function(){return-1!==this.maxSize&&this.children.size>=this.maxSize},countActive:function(t){void 0===t&&(t=!0);for(var e=0,i=0;i<this.children.size;i++)this.children.entries[i].active===t&&e++;return e},getTotalUsed:function(){return this.countActive()},getTotalFree:function(){var t=this.getTotalUsed();return(-1===this.maxSize?999999999999:this.maxSize)-t},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=t,this},propertyValueSet:function(t,e,i,n,r){return m.PropertyValueSet(this.children.entries,t,e,i,n,r),this},propertyValueInc:function(t,e,i,n,r){return m.PropertyValueInc(this.children.entries,t,e,i,n,r),this},setX:function(t,e){return m.SetX(this.children.entries,t,e),this},setY:function(t,e){return m.SetY(this.children.entries,t,e),this},setXY:function(t,e,i,n){return m.SetXY(this.children.entries,t,e,i,n),this},incX:function(t,e){return m.IncX(this.children.entries,t,e),this},incY:function(t,e){return m.IncY(this.children.entries,t,e),this},incXY:function(t,e,i,n){return m.IncXY(this.children.entries,t,e,i,n),this},shiftPosition:function(t,e,i){return m.ShiftPosition(this.children.entries,t,e,i),this},angle:function(t,e){return m.Angle(this.children.entries,t,e),this},rotate:function(t,e){return m.Rotate(this.children.entries,t,e),this},rotateAround:function(t,e){return m.RotateAround(this.children.entries,t,e),this},rotateAroundDistance:function(t,e,i){return m.RotateAroundDistance(this.children.entries,t,e,i),this},setAlpha:function(t,e){return m.SetAlpha(this.children.entries,t,e),this},setTint:function(t,e,i,n){return m.SetTint(this.children.entries,t,e,i,n),this},setOrigin:function(t,e,i,n){return m.SetOrigin(this.children.entries,t,e,i,n),this},scaleX:function(t,e){return m.ScaleX(this.children.entries,t,e),this},scaleY:function(t,e){return m.ScaleY(this.children.entries,t,e),this},scaleXY:function(t,e,i,n){return m.ScaleXY(this.children.entries,t,e,i,n),this},setDepth:function(t,e){return m.SetDepth(this.children.entries,t,e),this},setBlendMode:function(t){return m.SetBlendMode(this.children.entries,t),this},setHitArea:function(t,e){return m.SetHitArea(this.children.entries,t,e),this},shuffle:function(){return m.Shuffle(this.children.entries),this},kill:function(t){this.children.contains(t)&&t.setActive(!1)},killAndHide:function(t){this.children.contains(t)&&(t.setActive(!1),t.setVisible(!1))},setVisible:function(t,e,i){return m.SetVisible(this.children.entries,t,e,i),this},toggleVisible:function(){return m.ToggleVisible(this.children.entries),this},destroy:function(t,e){void 0===t&&(t=!1),void 0===e&&(e=!1),this.scene&&!this.ignoreDestroy&&(this.emit(s.DESTROY,this),this.removeAllListeners(),this.scene.sys.updateList.remove(this),this.clear(e,t),this.scene=void 0,this.children=void 0)}});t.exports=i},function(t,e,i){var y=i(12);t.exports=function(t,e,i,n,r,s){for(var o=y.getTintAppendFloatAlpha(i.fillColor,i.fillAlpha*n),a=i.pathData,h=i.pathIndexes,l=0;l<h.length;l+=3){var c=2*h[l],u=2*h[l+1],d=2*h[l+2],p=a[0+c]-r,c=a[1+c]-s,f=a[0+u]-r,u=a[1+u]-s,g=a[0+d]-r,d=a[1+d]-s,m=e.getX(p,c),p=e.getY(p,c),c=e.getX(f,u),f=e.getY(f,u),u=e.getX(g,d),g=e.getY(g,d);t.batchTri(i,m,p,c,f,u,g,0,0,1,1,o,o,o,2)}}},function(t,e){t.exports=function(t,e,i){var n=t.x3-t.x1,r=t.y3-t.y1,s=t.x2-t.x1,o=t.y2-t.y1,e=e-t.x1,i=i-t.y1,t=n*n+r*r,a=n*s+r*o,n=n*e+r*i,r=s*s+o*o,s=s*e+o*i,e=t*r-a*a,o=0==e?0:1/e,i=(r*n-a*s)*o,e=(t*s-a*n)*o;return 0<=i&&0<=e&&i+e<1}},function(t,e,i){var n=i(0),r=i(10),s=i(3);function c(t,e,i,n){t-=i,i=e-n;return Math.sqrt(t*t+i*i)}i=new n({initialize:function(t,e,i){this.vertex1=t,this.vertex2=e,this.vertex3=i,this.bounds=new r,this._inCenter=new s},getInCenter:function(t){var e,i,n,r,s,o=this.vertex1,a=this.vertex2,h=this.vertex3,t=(t=void 0===t?!0:t)?(e=o.x,i=o.y,n=a.x,r=a.y,s=h.x,h.y):(e=o.vx,i=o.vy,n=a.vx,r=a.vy,s=h.vx,h.vy),o=c(s,t,n,r),a=c(e,i,s,t),h=c(n,r,e,i),l=o+a+h;return this._inCenter.set((e*o+n*a+s*h)/l,(i*o+r*a+t*h)/l)},contains:function(t,e,i){var n=this.vertex1,r=this.vertex2,s=this.vertex3,o=n.vx,a=n.vy,h=r.vx,l=r.vy,c=s.vx,u=s.vy,n=(i&&(d=i.a,g=i.b,p=i.c,m=i.d,f=i.e,i=i.f,o=n.vx*d+n.vy*p+f,a=n.vx*g+n.vy*m+i,h=r.vx*d+r.vy*p+f,l=r.vx*g+r.vy*m+i,c=s.vx*d+s.vy*p+f,u=s.vx*g+s.vy*m+i),c-o),r=u-a,d=h-o,p=l-a,f=t-o,g=e-a,s=n*n+r*r,m=n*d+r*p,i=n*f+r*g,c=d*d+p*p,u=d*f+p*g,h=s*c-m*m,l=0==h?0:1/h,t=(c*i-m*u)*l,o=(s*u-m*i)*l;return 0<=t&&0<=o&&t+o<1},isCounterClockwise:function(t){var e=this.vertex1,i=this.vertex2,n=this.vertex3,i=(i.vx-e.vx)*(n.vy-e.vy)-(i.vy-e.vy)*(n.vx-e.vx);return t<=0?0<=i:i<0},load:function(t,e,i,n,r){return i=this.vertex1.load(t,e,i,n,r),i=this.vertex2.load(t,e,i,n,r),this.vertex3.load(t,e,i,n,r)},transformCoordinatesLocal:function(t,e,i,n){return this.vertex1.transformCoordinatesLocal(t,e,i,n),this.vertex2.transformCoordinatesLocal(t,e,i,n),this.vertex3.transformCoordinatesLocal(t,e,i,n),this},updateBounds:function(){var t=this.vertex1,e=this.vertex2,i=this.vertex3,n=this.bounds;return n.x=Math.min(t.vx,e.vx,i.vx),n.y=Math.min(t.vy,e.vy,i.vy),n.width=Math.max(t.vx,e.vx,i.vx)-n.x,n.height=Math.max(t.vy,e.vy,i.vy)-n.y,this},isInView:function(t,e,i,n,r,s,o,a,h,l,c){var u=this.vertex1.update(r,s,o,a,h,l,c,n),d=this.vertex2.update(r,s,o,a,h,l,c,n),r=this.vertex3.update(r,s,o,a,h,l,c,n);return!(u.ta<=0&&d.ta<=0&&r.ta<=0)&&(!(e&&!this.isCounterClockwise(i))&&((s=this.bounds).x=Math.min(u.tx,d.tx,r.tx),s.y=Math.min(u.ty,d.ty,r.ty),s.width=Math.max(u.tx,d.tx,r.tx)-s.x,s.height=Math.max(u.ty,d.ty,r.ty)-s.y,o=t.x+t.width,a=t.y+t.height,!(s.width<=0||s.height<=0||t.width<=0||t.height<=0||s.right<t.x||s.bottom<t.y||s.x>o||s.y>a)))},translate:function(t,e){void 0===e&&(e=0);var i=this.vertex1,n=this.vertex2,r=this.vertex3;return i.x+=t,i.y+=e,n.x+=t,n.y+=e,r.x+=t,r.y+=e,this},x:{get:function(){return this.getInCenter().x},set:function(t){var e=this.getInCenter();this.translate(t-e.x,0)}},y:{get:function(){return this.getInCenter().y},set:function(t){var e=this.getInCenter();this.translate(0,t-e.y)}},alpha:{get:function(){var t=this.vertex1,e=this.vertex2,i=this.vertex3;return(t.alpha+e.alpha+i.alpha)/3},set:function(t){this.vertex1.alpha=t,this.vertex2.alpha=t,this.vertex3.alpha=t}},depth:{get:function(){var t=this.vertex1,e=this.vertex2,i=this.vertex3;return(t.vz+e.vz+i.vz)/3}},destroy:function(){this.vertex1=null,this.vertex2=null,this.vertex3=null}});t.exports=i},function(t,e,i){var n=i(0),s=i(12),c=i(39),i=new n({Extends:c,initialize:function(t,e,i,n,r,s,o,a,h,l){void 0===s&&(s=16777215),void 0===o&&(o=1),void 0===a&&(a=0),void 0===h&&(h=0),void 0===l&&(l=0),c.call(this,t,e,i),this.vx=0,this.vy=0,this.vz=0,this.nx=a,this.ny=h,this.nz=l,this.u=n,this.v=r,this.color=s,this.alpha=o,this.tx=0,this.ty=0,this.ta=0},setUVs:function(t,e){return this.u=t,this.v=e,this},transformCoordinatesLocal:function(t,e,i,n){var r=this.x,s=this.y,o=this.z,t=t.val,a=r*t[0]+s*t[4]+o*t[8]+t[12],h=r*t[1]+s*t[5]+o*t[9]+t[13],l=r*t[2]+s*t[6]+o*t[10]+t[14],r=r*t[3]+s*t[7]+o*t[11]+t[15];this.vx=a/r*e,this.vy=-h/r*i,this.vz=n<=0?l/r:-l/r},update:function(t,e,i,n,r,s,o,a){t=this.vx*t+this.vy*i+r,i=this.vx*e+this.vy*n+s;return o&&(t=Math.round(t),i=Math.round(i)),this.tx=t,this.ty=i,this.ta=this.alpha*a,this},load:function(t,e,i,n,r){return t[++i]=this.tx,t[++i]=this.ty,t[++i]=this.u,t[++i]=this.v,t[++i]=n,t[++i]=r,e[++i]=s.getTintAppendFloatAlpha(this.color,this.ta),i}});t.exports=i},function(t,e,i){var u={},o=(t.exports=u,i(166)),s=i(32),a=i(84),d=i(41);u.create=function(t){return s.extend({id:s.nextId(),type:"composite",parent:null,isModified:!1,bodies:[],constraints:[],composites:[],label:"Composite",plugin:{}},t)},u.setModified=function(t,e,i,n){if(o.trigger(t,"compositeModified",t),t.isModified=e,i&&t.parent&&u.setModified(t.parent,e,i,n),n)for(var r=0;r<t.composites.length;r++){var s=t.composites[r];u.setModified(s,e,i,n)}},u.add=function(t,e){var i=[].concat(e);o.trigger(t,"beforeAdd",{object:e});for(var n=0;n<i.length;n++){var r=i[n];switch(r.type){case"body":r.parent!==r?s.warn("Composite.add: skipped adding a compound body part (you must add its parent instead)"):u.addBody(t,r);break;case"constraint":u.addConstraint(t,r);break;case"composite":u.addComposite(t,r);break;case"mouseConstraint":u.addConstraint(t,r.constraint)}}return o.trigger(t,"afterAdd",{object:e}),t},u.remove=function(t,e,i){var n=[].concat(e);o.trigger(t,"beforeRemove",{object:e});for(var r=0;r<n.length;r++){var s=n[r];switch(s.type){case"body":u.removeBody(t,s,i);break;case"constraint":u.removeConstraint(t,s,i);break;case"composite":u.removeComposite(t,s,i);break;case"mouseConstraint":u.removeConstraint(t,s.constraint)}}return o.trigger(t,"afterRemove",{object:e}),t},u.addComposite=function(t,e){return t.composites.push(e),e.parent=t,u.setModified(t,!0,!0,!1),t},u.removeComposite=function(t,e,i){var n=t.composites.indexOf(e);if(-1!==n&&(u.removeCompositeAt(t,n),u.setModified(t,!0,!0,!1)),i)for(var r=0;r<t.composites.length;r++)u.removeComposite(t.composites[r],e,!0);return t},u.removeCompositeAt=function(t,e){return t.composites.splice(e,1),u.setModified(t,!0,!0,!1),t},u.addBody=function(t,e){return t.bodies.push(e),u.setModified(t,!0,!0,!1),t},u.removeBody=function(t,e,i){var n=t.bodies.indexOf(e);if(-1!==n&&(u.removeBodyAt(t,n),u.setModified(t,!0,!0,!1)),i)for(var r=0;r<t.composites.length;r++)u.removeBody(t.composites[r],e,!0);return t},u.removeBodyAt=function(t,e){return t.bodies.splice(e,1),u.setModified(t,!0,!0,!1),t},u.addConstraint=function(t,e){return t.constraints.push(e),u.setModified(t,!0,!0,!1),t},u.removeConstraint=function(t,e,i){var n=t.constraints.indexOf(e);if(-1!==n&&u.removeConstraintAt(t,n),i)for(var r=0;r<t.composites.length;r++)u.removeConstraint(t.composites[r],e,!0);return t},u.removeConstraintAt=function(t,e){return t.constraints.splice(e,1),u.setModified(t,!0,!0,!1),t},u.clear=function(t,e,i){if(i)for(var n=0;n<t.composites.length;n++)u.clear(t.composites[n],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,u.setModified(t,!0,!0,!1),t},u.allBodies=function(t){for(var e=[].concat(t.bodies),i=0;i<t.composites.length;i++)e=e.concat(u.allBodies(t.composites[i]));return e},u.allConstraints=function(t){for(var e=[].concat(t.constraints),i=0;i<t.composites.length;i++)e=e.concat(u.allConstraints(t.composites[i]));return e},u.allComposites=function(t){for(var e=[].concat(t.composites),i=0;i<t.composites.length;i++)e=e.concat(u.allComposites(t.composites[i]));return e},u.get=function(t,e,i){var n;switch(i){case"body":n=u.allBodies(t);break;case"constraint":n=u.allConstraints(t);break;case"composite":n=u.allComposites(t).concat(t)}return n&&0!==(i=n.filter(function(t){return t.id.toString()===e.toString()})).length?i[0]:null},u.move=function(t,e,i){return u.remove(t,e),u.add(i,e),t},u.rebase=function(t){for(var e=u.allBodies(t).concat(u.allConstraints(t)).concat(u.allComposites(t)),i=0;i<e.length;i++)e[i].id=s.nextId();return u.setModified(t,!0,!0,!1),t},u.translate=function(t,e,i){for(var n=i?u.allBodies(t):t.bodies,r=0;r<n.length;r++)d.translate(n[r],e);return u.setModified(t,!0,!0,!1),t},u.rotate=function(t,e,i,n){for(var r=Math.cos(e),s=Math.sin(e),o=n?u.allBodies(t):t.bodies,a=0;a<o.length;a++){var h=o[a],l=h.position.x-i.x,c=h.position.y-i.y;d.setPosition(h,{x:i.x+(l*r-c*s),y:i.y+(l*s+c*r)}),d.rotate(h,e)}return u.setModified(t,!0,!0,!1),t},u.scale=function(t,e,i,n,r){for(var s=r?u.allBodies(t):t.bodies,o=0;o<s.length;o++){var a=s[o],h=a.position.x-n.x,l=a.position.y-n.y;d.setPosition(a,{x:n.x+h*e,y:n.y+l*i}),d.scale(a,e,i)}return u.setModified(t,!0,!0,!1),t},u.bounds=function(t){for(var e=u.allBodies(t),i=[],n=0;n<e.length;n+=1){var r=e[n];i.push(r.bounds.min,r.bounds.max)}return a.create(i)}},function(t,e){t.exports=function(t,e,i){return 0<=t&&t<i.width&&0<=e&&e<i.height}},function(t,e,i){var n=i(0),r=i(29),s=i(2),i=new n({initialize:function(t){this.name=s(t=void 0===t?{}:t,"name","layer"),this.x=s(t,"x",0),this.y=s(t,"y",0),this.width=s(t,"width",0),this.height=s(t,"height",0),this.tileWidth=s(t,"tileWidth",0),this.tileHeight=s(t,"tileHeight",0),this.baseTileWidth=s(t,"baseTileWidth",this.tileWidth),this.baseTileHeight=s(t,"baseTileHeight",this.tileHeight),this.orientation=s(t,"orientation",r.ORTHOGONAL),this.widthInPixels=s(t,"widthInPixels",this.width*this.baseTileWidth),this.heightInPixels=s(t,"heightInPixels",this.height*this.baseTileHeight),this.alpha=s(t,"alpha",1),this.visible=s(t,"visible",!0),this.properties=s(t,"properties",[]),this.indexes=s(t,"indexes",[]),this.collideIndexes=s(t,"collideIndexes",[]),this.callbacks=s(t,"callbacks",[]),this.bodies=s(t,"bodies",[]),this.data=s(t,"data",[]),this.tilemapLayer=s(t,"tilemapLayer",null),this.hexSideLength=s(t,"hexSideLength",0)}});t.exports=i},function(t,e,i){var n=i(0),r=i(29),s=i(2),i=new n({initialize:function(t){this.name=s(t=void 0===t?{}:t,"name","map"),this.width=s(t,"width",0),this.height=s(t,"height",0),this.infinite=s(t,"infinite",!1),this.tileWidth=s(t,"tileWidth",0),this.tileHeight=s(t,"tileHeight",0),this.widthInPixels=s(t,"widthInPixels",this.width*this.tileWidth),this.heightInPixels=s(t,"heightInPixels",this.height*this.tileHeight),this.format=s(t,"format",null),this.orientation=s(t,"orientation",r.ORTHOGONAL),this.renderOrder=s(t,"renderOrder","right-down"),this.version=s(t,"version","1"),this.properties=s(t,"properties",{}),this.layers=s(t,"layers",[]),this.images=s(t,"images",[]),this.objects=s(t,"objects",{}),this.collision=s(t,"collision",{}),this.tilesets=s(t,"tilesets",[]),this.imageCollections=s(t,"imageCollections",[]),this.tiles=s(t,"tiles",[]),this.hexSideLength=s(t,"hexSideLength",0)}});t.exports=i},function(t,e,i){i=new(i(0))({initialize:function(t,e,i,n,r,s,o,a){(void 0===i||i<=0)&&(i=32),(void 0===n||n<=0)&&(n=32),void 0===r&&(r=0),void 0===s&&(s=0),void 0===o&&(o={}),void 0===a&&(a={}),this.name=t,this.firstgid=e,this.tileWidth=i,this.tileHeight=n,this.tileMargin=r,this.tileSpacing=s,this.tileProperties=o,this.tileData=a,this.image=null,this.glTexture=null,this.rows=0,this.columns=0,this.total=0,this.texCoordinates=[]},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){t=this.getTileData(t);return t&&t.objectgroup?t.objectgroup:null},containsTileIndex:function(t){return t>=this.firstgid&&t<this.firstgid+this.total},getTileTextureCoordinates:function(t){return this.containsTileIndex(t)?this.texCoordinates[t-this.firstgid]:null},setImage:function(t){return this.image=t,this.glTexture=t.get().source.glTexture,this.updateTileData(this.image.source[0].width,this.image.source[0].height),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){e=(e-2*this.tileMargin+this.tileSpacing)/(this.tileHeight+this.tileSpacing),t=(t-2*this.tileMargin+this.tileSpacing)/(this.tileWidth+this.tileSpacing),e=Math.floor(e),t=Math.floor(t);this.rows=e,this.columns=t,this.total=e*t,this.texCoordinates.length=0;for(var i=this.tileMargin,n=this.tileMargin,r=0;r<this.rows;r++){for(var s=0;s<this.columns;s++)this.texCoordinates.push({x:i,y:n}),i+=this.tileWidth+this.tileSpacing;i=this.tileMargin,n+=this.tileHeight+this.tileSpacing}return this}});t.exports=i},function(t,e){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}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),Math.abs(t-e)<i}},function(t,e,i){var n=i(0),r=i(11),s=i(15),i=i(1068),n=new n({Extends:s,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Flip,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Size,r.TextureCrop,r.Tint,r.Transform,r.Visible,i],initialize:function(t,e,i,n,r){s.call(this,t,"Image"),this._crop=this.resetCropObject(),this.setTexture(n,r),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline()}});t.exports=n},function(t,e){t.exports=function(t,e){return t.hasOwnProperty(e)}},function(t,e,i){var r=i(77);t.exports=function(t,e){var i,n=r(t);for(i in e)n.hasOwnProperty(i)||(n[i]=e[i]);return n}},function(t,e,i){var f={},o=(t.exports=f,i(64)),g=i(83),a=i(165),h=i(84),l=i(271),n=i(32);f._warming=.4,f._torqueDampen=1,f._minLength=1e-6,f.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?g.add(t.bodyA.position,t.pointA):t.pointA,i=t.bodyB?g.add(t.bodyB.position,t.pointB):t.pointB,e=g.magnitude(g.sub(e,i)),i=(t.length=void 0!==t.length?t.length:e,t.id=t.id||n.nextId(),t.label=t.label||"Constraint",t.type="constraint",t.stiffness=t.stiffness||(0<t.length?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={},{visible:!0,type:"line",anchors:!0,lineColor:null,lineOpacity:null,lineThickness:null,pinSize:null,anchorColor:null,anchorSize:null});return 0===t.length&&.1<t.stiffness?(i.type="pin",i.anchors=!1):t.stiffness<.9&&(i.type="spring"),t.render=n.extend(i,t.render),t},f.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)}},f.solveAll=function(t,e){for(var i=0;i<t.length;i+=1){var n=t[i],r=!n.bodyA||n.bodyA&&n.bodyA.isStatic,s=!n.bodyB||n.bodyB&&n.bodyB.isStatic;(r||s)&&f.solve(t[i],e)}for(i=0;i<t.length;i+=1)r=!(n=t[i]).bodyA||n.bodyA&&n.bodyA.isStatic,s=!n.bodyB||n.bodyB&&n.bodyB.isStatic,r||s||f.solve(t[i],e)},f.solve=function(t,e){var i,n,r,s,o,a,h,l,c=t.bodyA,u=t.bodyB,d=t.pointA,p=t.pointB;(c||u)&&(c&&!c.isStatic&&(g.rotate(d,c.angle-t.angleA,d),t.angleA=c.angle),u&&!u.isStatic&&(g.rotate(p,u.angle-t.angleB,p),t.angleB=u.angle),h=d,i=p,c&&(h=g.add(c.position,d)),u&&(i=g.add(u.position,p)),h&&i&&(h=g.sub(h,i),n=((i=(i=g.magnitude(h))<f._minLength?f._minLength:i)-t.length)/i,e=t.stiffness<1?t.stiffness*e:t.stiffness,n=g.mult(h,n*e),r=(e=(c?c.inverseMass:0)+(u?u.inverseMass:0))+((c?c.inverseInertia:0)+(u?u.inverseInertia:0)),t.damping&&(l=g.create(),a=g.div(h,i),h=g.sub(u&&g.sub(u.position,u.positionPrev)||l,c&&g.sub(c.position,c.positionPrev)||l),l=g.dot(a,h)),c&&!c.isStatic&&(o=c.inverseMass/e,c.constraintImpulse.x-=n.x*o,c.constraintImpulse.y-=n.y*o,c.position.x-=n.x*o,c.position.y-=n.y*o,t.damping&&(c.positionPrev.x-=t.damping*a.x*l*o,c.positionPrev.y-=t.damping*a.y*l*o),s=g.cross(d,n)/r*f._torqueDampen*c.inverseInertia*(1-t.angularStiffness),c.constraintImpulse.angle-=s,c.angle-=s),u&&!u.isStatic&&(o=u.inverseMass/e,u.constraintImpulse.x+=n.x*o,u.constraintImpulse.y+=n.y*o,u.position.x+=n.x*o,u.position.y+=n.y*o,t.damping&&(u.positionPrev.x+=t.damping*a.x*l*o,u.positionPrev.y+=t.damping*a.y*l*o),s=g.cross(p,n)/r*f._torqueDampen*u.inverseInertia*(1-t.angularStiffness),u.constraintImpulse.angle+=s,u.angle+=s)))},f.postSolveAll=function(t){for(var e=0;e<t.length;e++){var i=t[e],n=i.constraintImpulse;if(!(i.isStatic||0===n.x&&0===n.y&&0===n.angle)){a.set(i,!1);for(var r=0;r<i.parts.length;r++){var s=i.parts[r];o.translate(s.vertices,n),0<r&&(s.position.x+=n.x,s.position.y+=n.y),0!==n.angle&&(o.rotate(s.vertices,n.angle,i.position),l.rotate(s.axes,n.angle),0<r&&g.rotateAbout(s.position,n.angle,i.position,s.position)),h.update(s.bounds,s.vertices,i.velocity)}n.angle*=f._warming,n.x*=f._warming,n.y*=f._warming}}},f.pointAWorld=function(t){return{x:(t.bodyA?t.bodyA.position.x:0)+t.pointA.x,y:(t.bodyA?t.bodyA.position.y:0)+t.pointA.y}},f.pointBWorld=function(t){return{x:(t.bodyB?t.bodyB.position.x:0)+t.pointB.x,y:(t.bodyB?t.bodyB.position.y:0)+t.pointB.y}}},function(t,e,i){var s=i(35),n=i(65),r=i(66),o=i(0),a=i(11),h=i(15),l=i(10),c=i(57),i=new o({Extends:h,Mixins:[a.Depth,a.GetBounds,a.Origin,a.Transform,a.ScrollFactor,a.Visible],initialize:function(t,e,i,n,r){void 0===n&&(n=1),void 0===r&&(r=n),h.call(this,t,"Zone"),this.setPosition(e,i),this.width=n,this.height=r,this.blendMode=s.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 n(0,0,t),r)},setRectangleDropZone:function(t,e){return this.setDropZone(new l(0,0,t,e),c)},setDropZone:function(t,e){return void 0===t?this.setRectangleDropZone(this.width,this.height):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.addToRenderList(e)}});t.exports=i},function(t,e){t.exports=function(t){return 2*(t.width+t.height)}},function(t,e){t.exports=function(t){for(var e=t.length-1;0<e;e--){var i=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[i],t[i]=n}return t}},function(t,e,i){t.exports={ADD_ANIMATION:i(724),ANIMATION_COMPLETE:i(725),ANIMATION_COMPLETE_KEY:i(726),ANIMATION_REPEAT:i(727),ANIMATION_RESTART:i(728),ANIMATION_START:i(729),ANIMATION_STOP:i(730),ANIMATION_UPDATE:i(731),PAUSE_ALL:i(732),REMOVE_ANIMATION:i(733),RESUME_ALL:i(734)}},function(t,e,i){var n=i(0),r=i(11),s=i(36),o=i(9),a=i(37),h=i(10),l=i(25),c=i(187),g=i(3),i=new n({Extends:o,Mixins:[r.Alpha,r.Visible],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),o.call(this),this.scene,this.sceneManager,this.scaleManager,this.cameraManager,this.id=0,this.name="",this.roundPixels=!1,this.useBounds=!1,this.worldView=new h,this.dirty=!0,this._x=t,this._y=e,this._width=i,this._height=n,this._bounds=new h,this._scrollX=0,this._scrollY=0,this._zoomX=1,this._zoomY=1,this._rotation=0,this.matrix=new l,this.transparent=!0,this.backgroundColor=c("rgba(0,0,0,0)"),this.disableCull=!1,this.culledObjects=[],this.midPoint=new g(i/2,n/2),this.originX=.5,this.originY=.5,this._customViewport=!1,this.mask=null,this._maskCamera=null,this.renderList=[]},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 g);var n=.5*this.width,r=.5*this.height;return i.x=t-n,i.y=e-r,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(){var t,e,i;return this.useBounds&&(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),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],r=e[2],s=e[3];if(!(i*s-n*r))return t;for(var o=e[4],a=e[5],h=this.scrollX,l=this.scrollY,e=this.width,c=this.height,u=this.y,d=u+c,p=this.x,f=p+e,g=this.culledObjects,m=t.length,y=g.length=0;y<m;++y){var v,x,b,w,T=t[y];(!T.hasOwnProperty("width")||T.parentContainer||(v=T.width,x=T.height,p<((b=T.x-h*T.scrollFactorX-v*T.originX)+v)*i+((w=T.y-l*T.scrollFactorY-x*T.originY)+x)*r+o&&b*i+w*r+o<f&&u<(b+v)*n+(w+x)*s+a&&b*n+w*s+a<d))&&g.push(T)}return g},getWorldPoint:function(t,e,i){void 0===i&&(i=new g);var n,r,s,o,a,h=this.matrix.matrix,l=h[0],c=h[1],u=h[2],d=h[3],p=h[4],h=h[5],f=l*d-c*u;return f?(a=d*(f=1/f),n=-c*f,r=-u*f,s=l*f,u=(u*h-d*p)*f,d=(c*p-l*h)*f,c=Math.cos(this.rotation),p=Math.sin(this.rotation),l=this.zoomX,h=this.zoomY,f=this.scrollX,o=this.scrollY,i.x=(l=t+(f*c-o*p)*l)*a+(a=e+(f*p+o*c)*h)*r+u,i.y=l*n+a*s+d):(i.x=t,i.y=e),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},preRender:function(){this.renderList.length=0;var t=this.width,e=this.height,i=.5*t,n=.5*e,r=this.zoomX,s=this.zoomY,o=this.matrix,a=t*this.originX,h=e*this.originY,l=this.scrollX,c=this.scrollY,l=(this.useBounds&&(l=this.clampX(l),c=this.clampY(c)),this.roundPixels&&(a=Math.round(a),h=Math.round(h)),(this.scrollX=l)+i),i=(this.scrollY=c)+n,c=(this.midPoint.set(l,i),t/r),n=e/s;this.worldView.setTo(l-c/2,i-n/2,c,n),o.applyITRS(this.x+a,this.y+h,this.rotation,r,s),o.translate(-a,-h)},clampX:function(t){var e=this._bounds,i=this.displayWidth,n=e.x+(i-this.width)/2,e=Math.max(n,n+e.width-i);return t<n?t=n:e<t&&(t=e),t},clampY:function(t){var e=this._bounds,i=this.displayHeight,n=e.y+(i-this.height)/2,e=Math.max(n,n+e.height-i);return t<n?t=n:e<t&&(t=e),t},removeBounds:function(){return this.useBounds=!1,this.dirty=!0,this._bounds.setEmpty(),this},setAngle:function(t){return this.rotation=s(t=void 0===t?0:t),this},setBackgroundColor:function(t){return this.backgroundColor=c(t=void 0===t?"rgba(0,0,0,0)":t),this.transparent=0===this.backgroundColor.alpha,this},setBounds:function(t,e,i,n,r){return void 0===r&&(r=!1),this._bounds.setTo(t,e,i,n),this.dirty=!0,this.useBounds=!0,r?this.centerToBounds():(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},getBounds:function(t){void 0===t&&(t=new h);var e=this._bounds;return t.setTo(e.x,e.y,e.width,e.height),t},setName:function(t){return this.name=t=void 0===t?"":t,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setRotation:function(t){return this.rotation=t=void 0===t?0:t,this},setRoundPixels:function(t){return this.roundPixels=t,this},setScene:function(t){this.scene&&this._customViewport&&this.sceneManager.customViewports--;t=(this.scene=t).sys;return this.sceneManager=t.game.scene,this.scaleManager=t.scale,this.cameraManager=t.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),0===(e=void 0===e?t:e)&&(e=.001),this.zoomX=t=0===t?.001: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(t=void 0===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(){},updateSystem:function(){var t,e;this.scaleManager&&(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(a.DESTROY,this),this.removeAllListeners(),this.matrix.destroy(),this.culledObjects=[],this._customViewport&&this.sceneManager.customViewports--,this.renderList=[],this._bounds=null,this.scene=null,this.scaleManager=null,this.sceneManager=null,this.cameraManager=null},x:{get:function(){return this._x},set:function(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){this._scrollX=t,this.dirty=!0}},scrollY:{get:function(){return this._scrollY},set:function(t){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}}});t.exports=i},function(t,e,i){var n=i(334),r=i(335),s=i(336),o=i(337),a=i(338),h=i(339),l=i(340),c=i(341),u=i(342),d=i(343),p=i(344),i=i(345);t.exports={Power0:l,Power1:c.Out,Power2:o.Out,Power3:u.Out,Power4:d.Out,Linear:l,Quad:c.Out,Cubic:o.Out,Quart:u.Out,Quint:d.Out,Sine:p.Out,Expo:h.Out,Circ:s.Out,Elastic:a.Out,Back:n.Out,Bounce:r.Out,Stepped:i,"Quad.easeIn":c.In,"Cubic.easeIn":o.In,"Quart.easeIn":u.In,"Quint.easeIn":d.In,"Sine.easeIn":p.In,"Expo.easeIn":h.In,"Circ.easeIn":s.In,"Elastic.easeIn":a.In,"Back.easeIn":n.In,"Bounce.easeIn":r.In,"Quad.easeOut":c.Out,"Cubic.easeOut":o.Out,"Quart.easeOut":u.Out,"Quint.easeOut":d.Out,"Sine.easeOut":p.Out,"Expo.easeOut":h.Out,"Circ.easeOut":s.Out,"Elastic.easeOut":a.Out,"Back.easeOut":n.Out,"Bounce.easeOut":r.Out,"Quad.easeInOut":c.InOut,"Cubic.easeInOut":o.InOut,"Quart.easeInOut":u.InOut,"Quint.easeInOut":d.InOut,"Sine.easeInOut":p.InOut,"Expo.easeInOut":h.InOut,"Circ.easeInOut":s.InOut,"Elastic.easeInOut":a.InOut,"Back.easeInOut":n.InOut,"Bounce.easeInOut":r.InOut}},function(t,e){t.exports=function(t,e,i){return(e-t)*i+t}},function(t,e,i){var i=i(105),n={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};t.exports=(t=navigator.userAgent,/Edge\/\d+/.test(t)?n.edge=!0:/Chrome\/(\d+)/.test(t)&&!i.windowsPhone?(n.chrome=!0,n.chromeVersion=parseInt(RegExp.$1,10)):/Firefox\D+(\d+)/.test(t)?(n.firefox=!0,n.firefoxVersion=parseInt(RegExp.$1,10)):/AppleWebKit/.test(t)&&i.iOS?n.mobileSafari=!0:/MSIE (\d+\.\d+);/.test(t)?(n.ie=!0,n.ieVersion=parseInt(RegExp.$1,10)):/Opera/.test(t)?n.opera=!0:/Safari/.test(t)&&!i.windowsPhone?n.safari=!0:/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(t)&&(n.ie=!0,n.trident=!0,n.tridentVersion=parseInt(RegExp.$1,10),n.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(t)&&(n.silk=!0),n)},function(t,e){t.exports=function(t,e){return Math.random()*(e-t)+t}},function(t,e){t.exports=function(t,e){return 0<t&&0==(t&t-1)&&0<e&&0==(e&e-1)}},function(t,e){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)}},function(t,e,i){var n=new(i(0))({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,r=t*t+e*e+i*i+n*n;return 0<r&&(r=1/Math.sqrt(r),this.x=t*r,this.y=e*r,this.z=i*r,this.w=n*r),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){var i=this.x,n=this.y,r=this.z,s=this.w;return this.x=i+(e=void 0===e?0:e)*(t.x-i),this.y=n+e*(t.y-n),this.z=r+e*(t.z-r),this.w=s+e*(t.w-s),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,t=t.w-this.w||0;return Math.sqrt(e*e+i*i+n*n+t*t)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,t=t.w-this.w||0;return e*e+i*i+n*n+t*t},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,r=this.w,t=t.val;return this.x=t[0]*e+t[4]*i+t[8]*n+t[12]*r,this.y=t[1]*e+t[5]*i+t[9]*n+t[13]*r,this.z=t[2]*e+t[6]*i+t[10]*n+t[14]*r,this.w=t[3]*e+t[7]*i+t[11]*n+t[15]*r,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,r=t.x,s=t.y,o=t.z,t=t.w,a=t*e+s*n-o*i,h=t*i+o*e-r*n,l=t*n+r*i-s*e,e=-r*e-s*i-o*n;return this.x=a*t+e*-r+h*-o-l*-s,this.y=h*t+e*-s+l*-r-a*-o,this.z=l*t+e*-o+a*-s-h*-r,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},function(t,e,i){var n=i(0),r=i(91),i=new n({initialize:function(t,e,i,n,r,s,o){void 0===n&&(n=1),void 0===r&&(r=0),void 0===s&&(s=!0),void 0===o&&(o=!1),this.renderer=t,this.framebuffer=null,this.texture=null,this.width=0,this.height=0,this.scale=n,this.minFilter=r,this.autoClear=s,this.autoResize=!1,this.resize(e,i),o&&this.setAutoResize(!0)},setAutoResize:function(t){return t&&!this.autoResize?(this.renderer.on(r.RESIZE,this.resize,this),this.autoResize=!0):!t&&this.autoResize&&(this.renderer.off(r.RESIZE,this.resize,this),this.autoResize=!1),this},resize:function(t,e){var i=t*this.scale,n=e*this.scale;return i===this.width&&n===this.height||((i=this.renderer).deleteFramebuffer(this.framebuffer),i.deleteTexture(this.texture),t*=this.scale,e*=this.scale,(t=Math.round(t))<=0&&(t=1),(e=Math.round(e))<=0&&(e=1),this.texture=i.createTextureFromSource(null,t,e,this.minFilter),this.framebuffer=i.createFramebuffer(t,e,this.texture,!1),this.width=t,this.height=e),this},bind:function(t,e,i){(t=void 0===t?!1:t)&&this.renderer.flush(),e&&i&&this.resize(e,i),this.renderer.pushFramebuffer(this.framebuffer,!1,!1,!1),t&&this.adjustViewport(),this.autoClear&&((e=this.renderer.gl).clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT))},adjustViewport:function(){var t=this.renderer.gl;t.viewport(0,0,this.width,this.height),t.disable(t.SCISSOR_TEST)},clear:function(){var t=this.renderer,e=t.gl;t.pushFramebuffer(this.framebuffer),e.disable(e.SCISSOR_TEST),e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),t.popFramebuffer(),t.resetScissor()},unbind:function(t){var e=this.renderer;return(t=void 0===t?!1:t)&&e.flush(),e.popFramebuffer()},destroy:function(){var t=this.renderer;t.deleteFramebuffer(this.framebuffer),t.deleteTexture(this.texture),t.off(r.RESIZE,this.resize,this),this.renderer=null,this.framebuffer=null,this.texture=null}});t.exports=i},function(t,e){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).appendChild(t),t}},function(t,e){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}},function(t,e){t.exports={PENDING:0,INIT:1,START:2,LOADING:3,CREATING:4,RUNNING:5,PAUSED:6,SLEEPING:7,SHUTDOWN:8,DESTROYED:9}},function(t,e,i){var n=i(0),o=i(77),r=i(9),s=i(70),a=i(22),h=i(1),l=i(207),c=i(428),i=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,t.events.on(a.BLUR,this.onGameBlur,this),t.events.on(a.FOCUS,this.onGameFocus,this),t.events.on(a.PRE_STEP,this.update,this),t.events.once(a.DESTROY,this.destroy,this)},add:h,addAudioSprite:function(t,e){var i,n,r,s=this.add(t,e=void 0===e?{}:e);for(r in s.spritemap=this.jsonCache.get(t).spritemap,s.spritemap)s.spritemap.hasOwnProperty(r)&&(i=o(e),n=s.spritemap[r],i.loop=!!n.hasOwnProperty("loop")&&n.loop,s.addMarker({name:r,start:n.start,duration:n.end-n.start,config:i}));return s},get:function(t){return c(this.sounds,"key",t)},getAll:function(t){return l(this.sounds,"key",t)},play:function(t,e){t=this.add(t);return t.once(s.COMPLETE,t.destroy,t),e?e.name?(t.addMarker(e),t.play(e.name)):t.play(e):t.play()},playAudioSprite:function(t,e,i){t=this.addAudioSprite(t);return t.once(s.COMPLETE,t.destroy,t),t.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;0<=i;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(s.PAUSE_ALL,this)},resumeAll:function(){this.forEachActiveSound(function(t){t.resume()}),this.emit(s.RESUME_ALL,this)},stopAll:function(){this.forEachActiveSound(function(t){t.stop()}),this.emit(s.STOP_ALL,this)},stopByKey:function(t){var e=0;return this.getAll(t).forEach(function(t){t.stop()&&e++}),e},unlock:h,onBlur:h,onFocus:h,onGameBlur:function(){this.pauseOnBlur&&this.onBlur()},onGameFocus:function(){this.pauseOnBlur&&this.onFocus()},update:function(e,i){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit(s.UNLOCKED,this));for(var t=this.sounds.length-1;0<=t;t--)this.sounds[t].pendingRemove&&this.sounds.splice(t,1);this.sounds.forEach(function(t){t.update(e,i)})},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.game=null},forEachActiveSound:function(i,n){var r=this;this.sounds.forEach(function(t,e){t&&!t.pendingRemove&&i.call(n||r,t,e,r.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(s.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(s.GLOBAL_DETUNE,this,t)}}});t.exports=i},function(t,e,i){var n=i(0),r=i(9),s=i(70),o=i(17),i=i(1),n=new n({Extends:r,initialize:function(t,e,i){r.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]||(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))},removeMarker:function(t){var e=this.markers[t];return e?(this.markers[t]=null,e):null},play:function(t,e){if("object"==typeof(t=void 0===t?"":t)&&(e=t,t=""),"string"!=typeof t)return!1;if(t){if(!this.markers[t])return!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)},pause:function(){return!(this.isPaused||!this.isPlaying)&&(this.isPlaying=!1,this.isPaused=!0)},resume:function(){return!(!this.isPaused||this.isPlaying||(this.isPlaying=!0,this.isPaused=!1))},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,calculateRate:function(){var t=this.currentConfig.detune+this.manager.detune,t=Math.pow(1.0005777895065548,t);this.totalRate=this.currentConfig.rate*this.manager.rate*t},destroy:function(){this.pendingRemove||(this.emit(s.DESTROY,this),this.pendingRemove=!0,this.manager=null,this.key="",this.removeAllListeners(),this.isPlaying=!1,this.isPaused=!1,this.config=null,this.currentConfig=null,this.markers=null,this.currentMarker=null)}});t.exports=n},function(t,e,i){var n=i(209),r=i(435);t.exports=function(t,e){if(void 0===e&&(e=90),!n(t))return null;if(90===(e="string"!=typeof e?(e%360+360)%360:e)||-270===e||"rotateLeft"===e)(t=r(t)).reverse();else if(-90===e||270===e||"rotateRight"===e)t.reverse(),t=r(t);else if(180===Math.abs(e)||"rotate180"===e){for(var i=0;i<t.length;i++)t[i].reverse();t.reverse()}return t}},function(t,e,i){var n=i(0),p=i(18),r=i(11),a=i(15),h=i(1043),s=i(1044),o=i(212),l=i(10),i=i(1045),c=new n({Extends:a,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Texture,r.Tint,r.Transform,r.Visible,i],initialize:function(t,e,i,n,r,s,o){void 0===r&&(r=""),void 0===o&&(o=0),a.call(this,t,"BitmapText"),this.font=n;t=this.scene.sys.cache.bitmapFont.get(n);this.fontData=t.data,this._text="",this._fontSize=s||this.fontData.size,this._letterSpacing=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=t.fromAtlas,this.setTexture(t.texture,t.frame),this.setPosition(e,i),this.setOrigin(0,0),this.initPipeline(),this.setText(r)},setLeftAlign:function(){return this._align=c.ALIGN_LEFT,this._dirty=!0,this},setCenterAlign:function(){return this._align=c.ALIGN_CENTER,this._dirty=!0,this},setRightAlign:function(){return this._align=c.ALIGN_RIGHT,this._dirty=!0,this},setFontSize:function(t){return this._fontSize=t,this._dirty=!0,this},setLetterSpacing:function(t){return this._letterSpacing=t=void 0===t?0:t,this._dirty=!0,this},setText:function(t){return t||0===t||(t=""),(t=Array.isArray(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===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=.5),this.dropShadowX=t=void 0===t?0:t,this.dropShadowY=e,this.dropShadowColor=i,this.dropShadowAlpha=n,this},setCharacterTint:function(t,e,i,n,r,s,o){void 0===i&&(i=!1),void 0===n&&(n=-1),void 0===r&&(o=s=r=n);var a=this.text.length;-1===(e=void 0===e?1:e)&&(e=a),t=p(t=(t=void 0===t?0:t)<0?a+t:t,0,a-1);for(var h=p(t+e,t,a),l=this.charColors,c=t;c<h;c++){var u,d=l[c];-1===n?l[c]=null:(u=i?1:0,d?(d.tintEffect=u,d.tintTL=n,d.tintTR=r,d.tintBL=s,d.tintBR=o):l[c]={tintEffect:u,tintTL:n,tintTR:r,tintBL:s,tintBR:o})}return this},setWordTint:function(t,e,i,n,r,s,o){void 0===e&&(e=1);for(var a=this.getTextBounds().words,h="number"==typeof t,l=0,c=0;c<a.length;c++){var u=a[c];if((h&&c===t||!h&&u.word===t)&&(this.setCharacterTint(u.i,u.word.length,i,n,r,s,o),++l===e))return this}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),r=this.getTextBounds().characters,s=new l,o=0;o<r.length;o++){var a=r[o];if(s.setTo(a.x,a.t,a.r-a.x,a.b),s.contains(n.x,n.y))return a}return null},updateDisplayOrigin:function(){return this._dirty=!0,this.getTextBounds(!1),this},setFont:function(t,e,i){var n;return void 0===e&&(e=this._fontSize),void 0===i&&(i=this._align),t!==this.font&&(n=this.scene.sys.cache.bitmapFont.get(t))&&(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},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}},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.height}},toJSON:function(){var t=r.ToJSON(this),e={font:this.font,text:this.text,fontSize:this.fontSize,letterSpacing:this.letterSpacing,align:this.align};return t.data=e,t},preDestroy:function(){this.charColors.length=0,this._bounds=null,this.fontData=null}});c.ALIGN_LEFT=0,c.ALIGN_CENTER=1,c.ALIGN_RIGHT=2,c.ParseFromAtlas=s,c.ParseXMLBitmapFont=o,t.exports=c},function(t,e,i){var n=new(i(0))({initialize:function(t){if(this.entries=[],Array.isArray(t))for(var e=0;e<t.length;e++)this.set(t[e])},set:function(t){return-1===this.entries.indexOf(t)&&this.entries.push(t),this},get:function(t,e){for(var i=0;i<this.entries.length;i++){var n=this.entries[i];if(n[t]===e)return n}},getArray:function(){return this.entries.slice(0)},delete:function(t){t=this.entries.indexOf(t);return-1<t&&this.entries.splice(t,1),this},dump:function(){for(var t=0;t<this.entries.length;t++)this.entries[t]},each:function(t,e){var i,n=this.entries.slice(),r=n.length;if(e)for(i=0;i<r&&!1!==t.call(e,n[i],i);i++);else for(i=0;i<r&&!1!==t(n[i],i);i++);return this},iterate:function(t,e){var i,n=this.entries.length;if(e)for(i=0;i<n&&!1!==t.call(e,this.entries[i],i);i++);else for(i=0;i<n&&!1!==t(this.entries[i],i);i++);return this},iterateLocal:function(t){for(var e=[],i=1;i<arguments.length;i++)e.push(arguments[i]);for(var n=this.entries.length,i=0;i<n;i++){var r=this.entries[i];r[t].apply(r,e)}return this},clear:function(){return this.entries.length=0,this},contains:function(t){return-1<this.entries.indexOf(t)},union:function(t){var e=new n;return t.entries.forEach(function(t){e.set(t)}),this.entries.forEach(function(t){e.set(t)}),e},intersect:function(e){var i=new n;return this.entries.forEach(function(t){e.contains(t)&&i.set(t)}),i},difference:function(e){var i=new n;return this.entries.forEach(function(t){e.contains(t)||i.set(t)}),i},size:{get:function(){return this.entries.length},set:function(t){return t<this.entries.length?this.entries.length=t:this.entries.length}}});t.exports=n},function(t,e,i){var n=i(0),r=i(11),a=i(15),h=i(189),l=i(92),i=i(1182),n=new n({Extends:a,Mixins:[r.AlphaSingle,r.BlendMode,r.Depth,r.GetBounds,r.Mask,r.Pipeline,r.ScrollFactor,r.Transform,r.Visible,i],initialize:function(t,e,i,n,r,s,o){void 0===n&&(n=16777215),void 0===r&&(r=128),void 0===s&&(s=1),void 0===o&&(o=.1),a.call(this,t,"PointLight"),this.initPipeline(l.POINTLIGHT_PIPELINE),this.setPosition(e,i),this.color=h(n),this.intensity=s,this.attenuation=o,this.width=2*r,this.height=2*r,this._radius=r},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}}});t.exports=n},function(t,e){t.exports=function(t,e){var i=e.width/2,n=e.height/2,r=Math.abs(t.x-e.x-i),e=Math.abs(t.y-e.y-n),s=i+t.radius,o=n+t.radius;return!(s<r||o<e)&&(r<=i||e<=n||(s=r-i)*s+(o=e-n)*o<=t.radius*t.radius)}},function(t,e){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)}},function(t,e,i){var l=i(6),c={};t.exports={register:function(t,e,i,n,r){c[t]={plugin:e,mapping:i,settingsKey:n,configKey:r}},getPlugin:function(t){return c[t]},install:function(t){var e,i=t.scene.sys,n=i.settings.input,r=i.game.config;for(e in c){var s=c[e].plugin,o=c[e].mapping,a=c[e].settingsKey,h=c[e].configKey;l(n,a,r[h])&&(t[o]=new s(t))}},remove:function(t){c.hasOwnProperty(t)&&delete c[t]}}},function(t,e,i){t.exports={ANY_KEY_DOWN:i(1323),ANY_KEY_UP:i(1324),COMBO_MATCH:i(1325),DOWN:i(1326),KEY_DOWN:i(1327),KEY_UP:i(1328),UP:i(1329)}},function(t,e){t.exports=function(t,e){return!!t.url&&(t.url.match(/^(?:blob:|data:|http:\/\/|https:\/\/|\/\/)/)?t.url:e+t.url)}},function(t,e){t.exports=function(t,e,i,n,r,s){return{responseType:t=void 0===t?"":t,async:e=void 0===e?!0:e,user:i=void 0===i?"":i,password:n=void 0===n?"":n,timeout:r=void 0===r?0:r,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:s=void 0===s?!1:s}}},function(t,e,i){var n=i(0),r=i(243),s=i(73),i=new n({Extends:s,Mixins:[r.Acceleration,r.Angular,r.Bounce,r.Debug,r.Drag,r.Enable,r.Friction,r.Gravity,r.Immovable,r.Mass,r.Pushable,r.Size,r.Velocity],initialize:function(t,e,i,n,r){s.call(this,t,e,i,n,r),this.body=null}});t.exports=i},function(t,e,i){var r=i(119);t.exports=function(t,e,i,n){return void 0===i&&(i=!1),r(t,e,n)&&(n=n.data[e][t]||null)&&(-1!==n.index||i)?n:null}},function(t,e){t.exports=function(t,e,i,n){var r,s,o,a=t.data,h=t.width,l=t.height,t=t.tilemapLayer,c=Math.max(0,e.left),u=Math.min(h,e.right),d=Math.max(0,e.top),p=Math.min(l,e.bottom);if(0===i)for(s=d;s<p;s++)for(r=c;a[s]&&r<u;r++)(o=a[s][r])&&-1!==o.index&&o.visible&&0!==o.alpha&&n.push(o);else if(1===i)for(s=d;s<p;s++)for(r=u;a[s]&&c<=r;r--)(o=a[s][r])&&-1!==o.index&&o.visible&&0!==o.alpha&&n.push(o);else if(2===i)for(s=p;d<=s;s--)for(r=c;a[s]&&r<u;r++)(o=a[s][r])&&-1!==o.index&&o.visible&&0!==o.alpha&&n.push(o);else if(3===i)for(s=p;d<=s;s--)for(r=u;a[s]&&c<=r;r--)(o=a[s][r])&&-1!==o.index&&o.visible&&0!==o.alpha&&n.push(o);return t.tilesDrawn=n.length,t.tilesTotal=h*l,n}},function(t,e){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)}},function(t,e,i){var s=i(2);t.exports=function(t,e,i){var n,r;return e?(n=e.x+s(e,"startx",0)*t.tilewidth+s(e,"offsetx",0),r=e.y+s(e,"starty",0)*t.tileheight+s(e,"offsety",0),{i:0,layers:e.layers,name:i.name+e.name+"/",opacity:i.opacity*e.opacity,visible:i.visible&&e.visible,x:i.x+n,y:i.y+r}):{i:0,layers:t.layers,name:"",opacity:1,visible:!0,x:0,y:0}}},function(t,e){t.exports=function(o,a,t){return o.hasOwnProperty(a)?"function"==typeof o[a]?function(t,e,i,n,r,s){return o[a](t,e,i,n,r,s)}:function(){return o[a]}:"function"==typeof t?t:function(){return t}}},function(t,e,i){var C=i(265),O=i(13),R=i(99),L=i(80),D=i(162),I=i(583),B=i(263),F=i(6),N=i(264),z=i(266),Y=i(268);t.exports=function(t,e,i){for(var n=(i=void 0===i?C:i).targets||B(e),r=I(e),s=D(e,"delay",i.delay),o=D(e,"duration",i.duration),a=F(e,"easeParams",i.easeParams),h=L(F(e,"ease",i.ease),a),l=D(e,"hold",i.hold),c=D(e,"repeat",i.repeat),u=D(e,"repeatDelay",i.repeatDelay),d=R(e,"yoyo",i.yoyo),p=R(e,"flipX",i.flipX),f=R(e,"flipY",i.flipY),g=[],m=0;m<r.length;m++)for(var y=r[m].key,v=r[m].value,x=0;x<n.length;x++){var b=N(y,v),b=Y(n[x],x,y,b.getEnd,b.getStart,b.getActive,L(F(v,"ease",h),F(v,"easeParams",a)),D(v,"delay",s),D(v,"duration",o),R(v,"yoyo",d),D(v,"hold",l),D(v,"repeat",c),D(v,"repeatDelay",u),R(v,"flipX",p),R(v,"flipY",f));g.push(b)}var w=new z(t,g,n);w.offset=O(e,"offset",null),w.completeDelay=O(e,"completeDelay",0),w.loop=Math.round(O(e,"loop",0)),w.loopDelay=Math.round(O(e,"loopDelay",0)),w.paused=R(e,"paused",!1),w.useFrames=R(e,"useFrames",!1);for(var T=F(e,"callbackScope",w),S=[w,null],P=z.TYPES,_=0;_<P.length;_++){var E,A,M=P[_],k=F(e,M,!1);k&&(E=F(e,M+"Scope",T),A=F(e,M+"Params",[]),w.setCallback(M,k,S.concat(A),E))}return w}},function(t,e,i){var n=i(0),r=i(102),s=i(2),o=i(132),a=i(185),i=new n({initialize:function(t){this.parent=t,this.animationManager=t.scene.sys.anims,this.animationManager.on(o.REMOVE_ANIMATION,this.globalRemove,this),this.textureManager=this.animationManager.textureManager,this.anims=null,this.isPlaying=!1,this.hasStarted=!1,this.currentAnim=null,this.currentFrame=null,this.nextAnim=null,this.nextAnimsQueue=[],this.timeScale=1,this.frameRate=0,this.duration=0,this.msPerFrame=0,this.skipMissedFrames=!0,this.delay=0,this.repeat=0,this.repeatDelay=0,this.yoyo=!1,this.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];null===this.nextAnim?this.nextAnim=n:this.nextAnimsQueue.push(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,i,n=this.animationManager,r="string"==typeof t?t:s(t,"key",null),n=(this.exists(r)?this:n).get(r);return n&&(r=(this.currentAnim=n).getTotalFrames(),e=s(t,"frameRate",n.frameRate),i=s(t,"duration",n.duration),n.calculateDuration(this,r,i,e),this.delay=s(t,"delay",n.delay),this.repeat=s(t,"repeat",n.repeat),this.repeatDelay=s(t,"repeatDelay",n.repeatDelay),this.yoyo=s(t,"yoyo",n.yoyo),this.showOnStart=s(t,"showOnStart",n.showOnStart),this.hideOnComplete=s(t,"hideOnComplete",n.hideOnComplete),this.skipMissedFrames=s(t,"skipMissedFrames",n.skipMissedFrames),this.timeScale=s(t,"timeScale",this.timeScale),(r=s(t,"startFrame",0))>n.getTotalFrames()&&(r=0),i=n.frames[r],0!==r||this.forward||(i=n.getLastFrame()),this.currentFrame=i),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){var i,n;return this.isPlaying?(i=this.nextAnim,n=this.nextAnimsQueue,i&&n.unshift(i),this.nextAnim=t,this._pendingStop=1,this._pendingStopValue=e):(this.delayCounter=e,this.play(t,!0)),this.parent},playAfterRepeat:function(t,e){var i,n;return void 0===e&&(e=1),this.isPlaying?(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):this.play(t),this.parent},play:function(t,e){var i=this.currentAnim,n=this.parent,r="string"==typeof t?t:t.key;if((e=void 0===e?!1:e)&&this.isPlaying&&i.key===r)return n;if(i&&this.isPlaying){e=this.animationManager.getMix(i.key,t);if(0<e)return this.playAfterDelay(t,e)}return this.forward=!0,this.inReverse=!1,this._paused=!1,this._wasPlaying=!0,this.startAnimation(t)},playReverse:function(t,e){var i="string"==typeof t?t:t.key;return(e=void 0===e?!1: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 t=this.currentAnim,e=this.parent;return t&&(this.repeatCounter=-1===this.repeat?Number.MAX_VALUE:this.repeat,t.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()),e},handleStart:function(){this.showOnStart&&this.parent.setVisible(!0),this.setCurrentFrame(this.currentFrame),this.hasStarted=!0,this.emitEvents(o.ANIMATION_START)},handleRepeat:function(){this.pendingRepeat=!1,this.emitEvents(o.ANIMATION_REPEAT)},handleStop:function(){this._pendingStop=0,this.isPlaying=!1,this.emitEvents(o.ANIMATION_STOP)},handleComplete:function(){this._pendingStop=0,this.isPlaying=!1,this.hideOnComplete&&this.parent.setVisible(!1),this.emitEvents(o.ANIMATION_COMPLETE,o.ANIMATION_COMPLETE_KEY)},emitEvents:function(t,e){var i=this.currentAnim,n=this.currentFrame,r=this.parent,s=n.textureFrame;r.emit(t,i,n,r,s),e&&r.emit(e+i.key,i,n,r,s)},reverse:function(){return this.isPlaying&&(this.inReverse=!this.inReverse,this.forward=!this.forward),this.parent},getProgress:function(){var t=this.currentFrame;return t?(t=t.progress,this.inReverse&&(t*=-1),t):0},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(o.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(){var t;return this._pendingStop=0,this.isPlaying=!1,this.currentAnim&&this.handleComplete(),this.nextAnim&&(t=this.nextAnim,this.nextAnim=0<this.nextAnimsQueue.length?this.nextAnimsQueue.shift():null,this.play(t)),this.parent},stop:function(){var t;return this._pendingStop=0,this.isPlaying=!1,this.currentAnim&&this.handleStop(),this.nextAnim&&(t=this.nextAnim,this.nextAnim=this.nextAnimsQueue.shift(),this.play(t)),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,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))for(var n=0;this.forward?i.nextFrame(this):i.previousFrame(this),n++,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(o.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))||(i=new a(this,e,t),this.anims||(this.anims=new r),this.anims.set(e,i)),i},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(o.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}}});t.exports=i},function(t,e,i){var a={},n=(t.exports=a,i(166));a._motionWakeThreshold=.18,a._motionSleepThreshold=.08,a._minBias=.9,a.update=function(t,e){for(var i=e*e*e,n=0;n<t.length;n++){var r,s=t[n],o=s.speed*s.speed+s.angularSpeed*s.angularSpeed;0===s.force.x&&0===s.force.y?(r=Math.min(s.motion,o),o=Math.max(s.motion,o),s.motion=a._minBias*r+(1-a._minBias)*o,0<s.sleepThreshold&&s.motion<a._motionSleepThreshold*i?(s.sleepCounter+=1,s.sleepCounter>=s.sleepThreshold&&a.set(s,!0)):0<s.sleepCounter&&--s.sleepCounter):a.set(s,!1)}},a.afterCollisions=function(t,e){for(var i=e*e*e,n=0;n<t.length;n++){var r,s,o=t[n];o.isActive&&(r=(o=o.collision).bodyA.parent,o=o.bodyB.parent,r.isSleeping&&o.isSleeping||r.isStatic||o.isStatic||(r.isSleeping||o.isSleeping)&&(o=(s=r.isSleeping&&!r.isStatic?r:o)===r?o:r,!s.isStatic&&o.motion>a._motionWakeThreshold*i&&a.set(s,!1)))}},a.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||n.trigger(t,"sleepStart")):(t.isSleeping=!1,t.sleepCounter=0,i&&n.trigger(t,"sleepEnd"))}},function(t,e,i){var n={},c=(t.exports=n,i(32));n.on=function(t,e,i){for(var n,r=e.split(" "),s=0;s<r.length;s++)n=r[s],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){"function"==typeof e&&(i=e,e=c.keys(t.events).join(" "));for(var n=e.split(" "),r=0;r<n.length;r++){var s=t.events[n[r]],o=[];if(i&&s)for(var a=0;a<s.length;a++)s[a]!==i&&o.push(s[a]);t.events[n[r]]=o}}else t.events={}},n.trigger=function(t,e,i){var n,r,s,o=t.events;if(o&&0<c.keys(o).length){i=i||{};for(var a=e.split(" "),h=0;h<a.length;h++)if(r=o[n=a[h]]){(s=c.clone(i,!1)).name=n,s.source=t;for(var l=0;l<r.length;l++)r[l].apply(t,[s])}}}},function(t,e,i){var a=i(175),n=i(92),r=i(74);t.exports={defaultPipeline:null,pipeline:null,hasPostPipeline:!1,postPipelines:null,pipelineData:null,initPipeline:function(t){void 0===t&&(t=n.MULTI_PIPELINE);var e=this.scene.sys.renderer;if(e){e=e.pipelines;if(this.postPipelines=[],this.pipelineData={},e){e=e.get(t);if(e)return this.defaultPipeline=e,this.pipeline=e,!0}}return!1},setPipeline:function(t,e,i){var n=this.scene.sys.renderer;return!n||(n=n.pipelines)&&((n=n.get(t))&&(this.pipeline=n),e&&(this.pipelineData=i?a(e):e)),this},setPostPipeline:function(t,e,i){var n=this.scene.sys.renderer;if(n){var r=n.pipelines;if(r){Array.isArray(t)||(t=[t]);for(var s=0;s<t.length;s++){var o=r.getPostPipeline(t[s],this);o&&this.postPipelines.push(o)}e&&(this.pipelineData=i?a(e):e)}this.hasPostPipeline=0<this.postPipelines.length}return this},setPipelineData:function(t,e){var i=this.pipelineData;return void 0===e?delete i[t]:i[t]=e,this},getPostPipeline:function(t){for(var e=this.postPipelines,i=[],n=0;n<e.length;n++){var r=e[n];("string"==typeof t&&r.name===t||r instanceof t)&&i.push(r)}return 1===i.length?i[0]:i},resetPipeline:function(t,e){return void 0===t&&(t=!1),void 0===e&&(e=!1),this.pipeline=this.defaultPipeline,t&&(this.postPipelines=[],this.hasPostPipeline=!1),e&&(this.pipelineData={}),null!==this.pipeline},resetPostPipeline:function(t){void 0===t&&(t=!1);for(var e=this.postPipelines,i=0;i<e.length;i++)e[i].destroy();this.postPipelines=[],this.hasPostPipeline=!1,t&&(this.pipelineData={})},removePostPipeline:function(t){for(var e=this.postPipelines,i=e.length-1;0<=i;i--){var n=e[i];("string"==typeof t&&n.name===t||"string"!=typeof t&&n instanceof t)&&(n.destroy(),r(e,i))}return this.hasPostPipeline=0<this.postPipelines.length,this},getPipelineName:function(){return this.pipeline.name}}},function(t,e){t.exports={DEFAULT:0,LINEAR:0,NEAREST:1}},function(t,e,i){var n=i(4);t.exports=function(t,e,i){return(i=void 0===i?new n:i).x=t.x+t.radius*Math.cos(e),i.y=t.y+t.radius*Math.sin(e),i}},function(t,e,i){var s=i(4);t.exports=function(t,e){void 0===e&&(e=new s);var i=2*Math.PI*Math.random(),n=Math.random()+Math.random(),n=1<n?2-n:n,r=n*Math.cos(i),n=n*Math.sin(i);return e.x=t.x+r*t.radius,e.y=t.y+n*t.radius,e}},function(t,e,i){var r=i(130),s=i(4);t.exports=function(t,e,i){var n;return(void 0===i&&(i=new s),e<=0||1<=e)?(i.x=t.x,i.y=t.y):(n=r(t)*e,.5<e?(n-=t.width+t.height)<=t.width?(i.x=t.right-n,i.y=t.bottom):(i.x=t.x,i.y=t.bottom-(n-t.width)):n<=t.width?(i.x=t.x+n,i.y=t.y):(i.x=t.right,i.y=t.y+(n-t.width))),i}},function(t,e,i){var c=i(67),u=i(4);t.exports=function(t,e,i,n){void 0===n&&(n=[]),!e&&0<i&&(e=c(t)/i);for(var r=t.x1,s=t.y1,o=t.x2,a=t.y2,h=0;h<e;h++){var l=h/e;n.push(new u(r+(o-r)*l,s+(a-s)*l))}return n}},function(t,e,i){var n=i(4);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}},function(t,e,i){var n=i(4);t.exports=function(t,e){return(e=void 0===e?new n:e).x=t.x+Math.random()*t.width,e.y=t.y+Math.random()*t.height,e}},function(t,e){function r(t){var e,i,n;if("object"!=typeof t||null===t)return t;for(n in e=Array.isArray(t)?[]:{},t)i=t[n],e[n]=r(i);return e}t.exports=r},function(t,e){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}},function(t,e,i){var c=i(3);t.exports=function(t,e,i,n,r,s,o,a){void 0===a&&(a=new c);var h=Math.sin(r),r=Math.cos(r),l=r*s,s=h*s,h=-h*o,r=r*o,o=1/(l*r+h*-s);return a.x=r*o*t+-h*o*e+(n*h-i*r)*o,a.y=l*o*e+-s*o*t+(-n*l+i*s)*o,a}},function(t,e){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}},function(t,e){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}},function(t,e,i){var r=i(4);t.exports=function(t,e){void 0===e&&(e=new r);var i=Math.random()*Math.PI*2,n=Math.sqrt(Math.random());return e.x=t.x+n*Math.cos(i)*t.width/2,e.y=t.y+n*Math.sin(i)*t.height/2,e}},function(t,e,i){var h=i(4);t.exports=function(t,e){void 0===e&&(e=new h);var i=t.x2-t.x1,n=t.y2-t.y1,r=t.x3-t.x1,s=t.y3-t.y1,o=Math.random(),a=Math.random();return 1<=o+a&&(o=1-o,a=1-a),e.x=t.x1+(i*o+r*a),e.y=t.y1+(n*o+s*a),e}},function(t,e){t.exports=function(t,e,i,n,r){n+=Math.atan2(t.y-i,t.x-e);return t.x=e+r*Math.cos(n),t.y=i+r*Math.sin(n),t}},function(t,e){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)}},function(t,e){t.exports=function(t,e,i){return t<=e?0:i<=t?1:(t=(t-e)/(i-e))*t*(3-2*t)}},function(t,e,i){var n=i(18),r=i(0),s=i(132),o=i(318),m=i(319),y=i(6),v=i(320),i=new r({initialize:function(t,e,i){this.manager=t,this.key=e,this.type="frame",this.frames=this.getFrames(t.textureManager,y(i,"frames",[]),y(i,"defaultTextureKey",null),y(i,"sortFrames",!0)),this.frameRate=y(i,"frameRate",null),this.duration=y(i,"duration",null),this.msPerFrame,this.skipMissedFrames=y(i,"skipMissedFrames",!0),this.delay=y(i,"delay",0),this.repeat=y(i,"repeat",0),this.repeatDelay=y(i,"repeatDelay",0),this.yoyo=y(i,"yoyo",!1),this.showOnStart=y(i,"showOnStart",!1),this.hideOnComplete=y(i,"hideOnComplete",!1),this.paused=!1,this.calculateDuration(this,this.getTotalFrames(),this.duration,this.frameRate),this.manager.on&&(this.manager.on(s.PAUSE_ALL,this.pause,this),this.manager.on(s.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,e=this.getFrames(this.manager.textureManager,e);return 0<e.length&&(0===t?this.frames=e.concat(this.frames):t===this.frames.length?this.frames=this.frames.concat(e):(i=this.frames.slice(0,t),t=this.frames.slice(t),this.frames=i.concat(e,t)),this.updateFrameSequence()),this},checkFrame:function(t){return 0<=t&&t<this.frames.length},getFirstTick:function(t){t.accumulator=0,t.nextTick=t.msPerFrame+t.currentFrame.duration},getFrameAt:function(t){return this.frames[t]},getFrames:function(t,e,i,n){void 0===n&&(n=!0);var r,s,o,a=[],h=1;if("string"==typeof e&&(s=e,o=t.get(s).getFrameNames(),n&&v(o),e=[],o.forEach(function(t){e.push({key:s,frame:t})})),Array.isArray(e)&&0!==e.length){for(g=0;g<e.length;g++){var l,c,u,d=e[g],p=y(d,"key",i);p&&(l=y(d,"frame",0),c=t.getFrame(p,l),(u=new m(p,l,h,c)).duration=y(d,"duration",0),u.isFirst=!r,r&&((r.nextFrame=u).prevFrame=r),a.push(u),r=u,h++)}if(0<a.length){u.isLast=!0,u.nextFrame=a[0],a[0].prevFrame=u;for(var f=1/(a.length-1),g=0;g<a.length;g++)a[g].progress=g*f}}return a},getNextTick:function(t){t.accumulator-=t.nextTick,t.nextTick=t.msPerFrame+t.currentFrame.duration},getFrameByProgress:function(t){return t=n(t,0,1),o(t,this.frames,"progress")},nextFrame:function(t){var e=t.currentFrame;e.isLast?t.yoyo?this.handleYoyoFrame(t,!1):0<t.repeatCounter?t.inReverse&&t.forward?t.forward=!1:this.repeatAnimation(t):t.complete():this.updateAndGetNextTick(t,e.nextFrame)},handleYoyoFrame:function(t,e){t.inReverse===!(e=e||!1)&&0<t.repeatCounter?(0!==t.repeatDelay&&!t.pendingRepeat||(t.forward=e),this.repeatAnimation(t)):t.inReverse===e||0!==t.repeatCounter?(e=(t.forward=e)?t.currentFrame.nextFrame:t.currentFrame.prevFrame,this.updateAndGetNextTick(t,e)):t.complete()},getLastFrame:function(){return this.frames[this.frames.length-1]},previousFrame:function(t){var e=t.currentFrame;e.isFirst?t.yoyo?this.handleYoyoFrame(t,!0):0<t.repeatCounter?(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){t=this.frames.indexOf(t);return-1!==t&&this.removeFrameAt(t),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();t._pendingStopValue--}0<t.repeatDelay&&!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()))},toJSON:function(){var e={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,showOnStart:this.showOnStart,hideOnComplete:this.hideOnComplete};return this.frames.forEach(function(t){e.frames.push(t.toJSON())}),e},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).prevFrame=t):(t.isLast=!1,t.prevFrame=this.frames[e-1],t.nextFrame=this.frames[n+1])):n===e-1&&1<e?(t.isLast=!0,t.prevFrame=this.frames[e-2],t.nextFrame=this.frames[0]):1<e&&(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(s.PAUSE_ALL,this.pause,this),this.manager.off(s.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}});t.exports=i},function(t,e){t.exports=function(t,e,i,n){var r;if(void 0===i&&(i=" "),void 0===n&&(n=3),(e=void 0===e?0:e)+1>=(t=t.toString()).length)switch(n){case 1:t=new Array(e+1-t.length).join(i)+t;break;case 3:var s=Math.ceil((r=e-t.length)/2);t=new Array(r-s+1).join(i)+t+new Array(s+1).join(i);break;default:t+=new Array(e+1-t.length).join(i)}return t}},function(t,e,i){var n=i(327),r=i(189),s=i(331),o=i(332);t.exports=function(t){switch(typeof t){case"string":return("rgb"===t.substr(0,3).toLowerCase()?o:n)(t);case"number":return r(t);case"object":return s(t)}}},function(t,e,i){var o=i(103);function a(t,e,i,n){t=(t+6*e)%6,e=Math.min(t,4-t,1);return Math.round(255*(n-n*i*Math.max(0,e)))}t.exports=function(t,e,i,n){var r=a(5,t,e=void 0===e?1:e,i=void 0===i?1:i),s=a(3,t,e,i),t=a(1,t,e,i);return n?n.setTo?n.setTo(r,s,t,n.alpha,!1):(n.r=r,n.g=s,n.b=t,n.color=o(r,s,t),n):{r:r,g:s,b:t,color:o(r,s,t)}}},function(t,e,i){var n=i(38),r=i(330);t.exports=function(t){t=r(t);return new n(t.r,t.g,t.b,t.a)}},function(t,e){t.exports=function(t,e,i){return t.x=e-t.width/2,t.y=i-t.height/2,t}},function(t,e,i){var n=i(105),s=i(136),o=i(31),a={canvas:!1,canvasBitBltShift:null,file:!1,fileSystem:!1,getUserMedia:!0,littleEndian:!1,localStorage:!1,pointerLock:!1,support32bit:!1,vibration:!1,webGL:!1,worker:!1};t.exports=function(){if("function"!=typeof importScripts){a.canvas=!!window.CanvasRenderingContext2D;try{a.localStorage=!!localStorage.getItem}catch(t){a.localStorage=!1}a.file=!!(window.File&&window.FileReader&&window.FileList&&window.Blob),a.fileSystem=!!window.requestFileSystem;var t,e,i,r=!1;a.webGL=function(){if(window.WebGLRenderingContext)try{var t=o.createWebGL(this),e=t.getContext("webgl")||t.getContext("experimental-webgl"),i=o.create2D(this),n=i.getContext("2d").createImageData(1,1);return r=n.data instanceof Uint8ClampedArray,o.remove(t),o.remove(i),!!e}catch(t){}return!1}(),a.worker=!!window.Worker,a.pointerLock="pointerLockElement"in document||"mozPointerLockElement"in document||"webkitPointerLockElement"in document,navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia||navigator.oGetUserMedia,window.URL=window.URL||window.webkitURL||window.mozURL||window.msURL,a.getUserMedia=a.getUserMedia&&!!navigator.getUserMedia&&!!window.URL,s.firefox&&s.firefoxVersion<21&&(a.getUserMedia=!1),!n.iOS&&(s.ie||s.firefox||s.chrome)&&(a.canvasBitBltShift=!0),(s.safari||s.mobileSafari)&&(a.canvasBitBltShift=!1),navigator.vibrate=navigator.vibrate||navigator.webkitVibrate||navigator.mozVibrate||navigator.msVibrate,navigator.vibrate&&(a.vibration=!0),"undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint32Array&&(a.littleEndian=(t=new ArrayBuffer(4),e=new Uint8Array(t),i=new Uint32Array(t),e[0]=161,e[1]=178,e[2]=195,e[3]=212,3569595041===i[0]||2712847316!==i[0]&&null)),a.support32bit="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof Int32Array&&null!==a.littleEndian&&r}return a}()},function(t,e){var i="";function n(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}t.exports={disable:function(t){return(i=""===i?n(t):i)&&(t[i]=!1),t},enable:function(t){return(i=""===i?n(t):i)&&(t[i]=!0),t},getPrefix:n,isEnabled:function(t){return null!==i?t[i]:null}}},function(t,e,i){var n=i(14),i=i(17)(!1,{Angle:i(812),Distance:i(821),Easing:i(826),Fuzzy:i(827),Interpolation:i(830),Pow2:i(835),Snap:i(837),RandomDataGenerator:i(839),Average:i(840),Bernstein:i(356),Between:i(195),CatmullRom:i(194),CeilTo:i(841),Clamp:i(18),DegToRad:i(36),Difference:i(842),Euler:i(843),Factorial:i(357),FloatBetween:i(137),FloorTo:i(844),FromPercent:i(98),GetSpeed:i(845),IsEven:i(846),IsEvenStrict:i(847),Linear:i(135),MaxAdd:i(848),Median:i(849),MinSub:i(850),Percent:i(851),RadToDeg:i(196),RandomXY:i(852),RandomXYZ:i(853),RandomXYZW:i(854),Rotate:i(362),RotateAround:i(308),RotateAroundDistance:i(182),RotateTo:i(855),RoundAwayFromZero:i(363),RoundTo:i(856),SinCosTableGenerator:i(857),SmootherStep:i(183),SmoothStep:i(184),ToXY:i(858),TransformXY:i(177),Within:i(859),Wrap:i(68),Vector2:i(3),Vector3:i(39),Vector4:i(140),Matrix3:i(364),Matrix4:i(69),Quaternion:i(365),RotateVec3:i(860)},n);t.exports=i},function(t,e){t.exports=function(t,e,i,n,r){var e=.5*(n-e),r=.5*(r-i),s=t*t;return t*s*(2*i-2*n+e+r)+(-3*i+3*n-2*e-r)*s+e*t+i}},function(t,e){t.exports=function(t,e){return Math.floor(Math.random()*(e-t+1)+t)}},function(t,e,i){var n=i(14);t.exports=function(t){return t*n.RAD_TO_DEG}},function(t,e,i){t.exports={Global:["game","anims","cache","plugins","registry","scale","sound","textures","renderer"],CoreScene:["EventEmitter","CameraManager","GameObjectCreator","GameObjectFactory","ScenePlugin","DisplayList","UpdateList"],DefaultScene:["Clock","DataManagerPlugin","InputPlugin","Loader","TweenManager","LightsPlugin"]}},function(t,e,i){i=new(i(0))({initialize:function(){this._matrix=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],this.alpha=1,this._dirty=!0,this._data},set:function(t){return this._matrix=t,this._dirty=!0,this},reset:function(){var t=this._matrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=0,t[6]=1,t[7]=0,t[8]=0,t[9]=0,t[10]=0,t[11]=0,t[12]=1,t[13]=0,t[14]=0,t[15]=0,t[16]=0,t[17]=0,t[18]=1,t[19]=0,this._dirty=!0,this},getData:function(){var t;return this._dirty&&((t=new Float32Array(this._matrix))[4]/=255,t[9]/=255,t[14]/=255,t[19]/=255,this._data=t,this._dirty=!1),this._data},brightness:function(t,e){return this.multiply([t=void 0===t?0:t,0,0,0,0,0,t,0,0,0,0,0,t,0,0,0,0,0,1,0],e=void 0===e?!1:e)},saturate:function(t,e){var t=2*(t=void 0===t?0:t)/3+1,i=-.5*(t-1);return this.multiply([t,i,i,0,0,i,t,i,0,0,i,i,t,0,0,0,0,0,1,0],e=void 0===e?!1:e)},desaturate:function(t){return this.saturate(-1,t=void 0===t?!1:t)},hue:function(t,e){void 0===e&&(e=!1),t=(t=void 0===t?0:t)/180*Math.PI;var i=Math.cos(t),t=Math.sin(t);return this.multiply([.213+.787*i+-.213*t,.715+-.715*i+-.715*t,.072+-.072*i+.928*t,0,0,.213+-.213*i+.143*t,.715+i*(1-.715)+.14*t,.072+-.072*i+-.283*t,0,0,.213+-.213*i+-.787*t,.715+-.715*i+.715*t,.072+.928*i+.072*t,0,0,0,0,0,1,0],e)},grayscale:function(t,e){return this.saturate(-(t=void 0===t?1:t),e=void 0===e?!1:e)},blackWhite:function(t){return this.multiply([.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0],t=void 0===t?!1:t)},contrast:function(t,e){var t=(t=void 0===t?0:t)+1,i=-.5*(t-1);return this.multiply([t,0,0,0,i,0,t,0,0,i,0,0,t,0,i,0,0,0,1,0],e=void 0===e?!1:e)},negative:function(t){return this.multiply([-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0],t=void 0===t?!1:t)},desaturateLuminance:function(t){return this.multiply([.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,0,0,0,1,0],t=void 0===t?!1:t)},sepia:function(t){return this.multiply([.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0],t=void 0===t?!1:t)},night:function(t,e){return this.multiply([-2*(t=void 0===t?.1:t),-t,0,0,0,-t,0,t,0,0,0,t,2*t,0,0,0,0,0,1,0],e=void 0===e?!1:e)},lsd:function(t){return this.multiply([2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],t=void 0===t?!1:t)},brown:function(t){return this.multiply([.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0],t=void 0===t?!1:t)},vintagePinhole:function(t){return this.multiply([.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0],t=void 0===t?!1:t)},kodachrome:function(t){return this.multiply([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],t=void 0===t?!1:t)},technicolor:function(t){return this.multiply([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],t=void 0===t?!1:t)},polaroid:function(t){return this.multiply([1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],t=void 0===t?!1:t)},shiftToBGR:function(t){return this.multiply([0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0],t=void 0===t?!1:t)},multiply:function(t,e){e||this.reset();for(var i=this._matrix,n=[],r=0;r<20;r++)n[r]=i[r];return i[0]=n[0]*t[0]+n[1]*t[5]+n[2]*t[10]+n[3]*t[15],i[1]=n[0]*t[1]+n[1]*t[6]+n[2]*t[11]+n[3]*t[16],i[2]=n[0]*t[2]+n[1]*t[7]+n[2]*t[12]+n[3]*t[17],i[3]=n[0]*t[3]+n[1]*t[8]+n[2]*t[13]+n[3]*t[18],i[4]=n[0]*t[4]+n[1]*t[9]+n[2]*t[14]+n[3]*t[19]+n[4],i[5]=n[5]*t[0]+n[6]*t[5]+n[7]*t[10]+n[8]*t[15],i[6]=n[5]*t[1]+n[6]*t[6]+n[7]*t[11]+n[8]*t[16],i[7]=n[5]*t[2]+n[6]*t[7]+n[7]*t[12]+n[8]*t[17],i[8]=n[5]*t[3]+n[6]*t[8]+n[7]*t[13]+n[8]*t[18],i[9]=n[5]*t[4]+n[6]*t[9]+n[7]*t[14]+n[8]*t[19]+n[9],i[10]=n[10]*t[0]+n[11]*t[5]+n[12]*t[10]+n[13]*t[15],i[11]=n[10]*t[1]+n[11]*t[6]+n[12]*t[11]+n[13]*t[16],i[12]=n[10]*t[2]+n[11]*t[7]+n[12]*t[12]+n[13]*t[17],i[13]=n[10]*t[3]+n[11]*t[8]+n[12]*t[13]+n[13]*t[18],i[14]=n[10]*t[4]+n[11]*t[9]+n[12]*t[14]+n[13]*t[19]+n[14],i[15]=n[15]*t[0]+n[16]*t[5]+n[17]*t[10]+n[18]*t[15],i[16]=n[15]*t[1]+n[16]*t[6]+n[17]*t[11]+n[18]*t[16],i[17]=n[15]*t[2]+n[16]*t[7]+n[17]*t[12]+n[18]*t[17],i[18]=n[15]*t[3]+n[16]*t[8]+n[17]*t[13]+n[18]*t[18],i[19]=n[15]*t[4]+n[16]*t[9]+n[17]*t[14]+n[18]*t[19]+n[19],this._dirty=!0,this}});t.exports=i},function(t,e,i){var l=i(10),c=i(14);t.exports=function(t,e){if(void 0===e&&(e=new l),0!==t.length){for(var i,n,r=Number.MAX_VALUE,s=Number.MAX_VALUE,o=c.MIN_SAFE_INTEGER,a=c.MIN_SAFE_INTEGER,h=0;h<t.length;h++)n=t[h],n=Array.isArray(n)?(i=n[0],n[1]):(i=n.x,n.y),r=Math.min(r,i),s=Math.min(s,n),o=Math.max(o,i),a=Math.max(a,n);e.x=r,e.y=s,e.width=o-r,e.height=a-s}return e}},function(t,e,i){var n=i(0),r=i(1),i=new n({initialize:function(t,e,i){this._rgb=[0,0,0],this.onChangeCallback=r,this.dirty=!1,this.set(t,e,i)},set:function(t,e,i){return this._rgb=[t=void 0===t?0:t,e=void 0===e?0:e,i=void 0===i?0:i],this.onChange(),this},equals:function(t,e,i){var n=this._rgb;return n.r===t&&n.g===e&&n.b===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}});t.exports=i},function(t,e,i){i={CENTER:i(403),ORIENTATION:i(404),SCALE_MODE:i(405),ZOOM:i(406)};t.exports=i},function(t,e){t.exports=function(t){t.parentNode&&t.parentNode.removeChild(t)}},function(t,e){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}},function(t,e,i){var n=i(0),r=i(144),s=i(197),o=i(20),a=i(419),h=i(420),l=i(33),c=i(1),u=i(421),i=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=c},init:function(t){this.settings.status=r.INIT,this.sceneUpdate=c,this.game=t,this.renderer=t.renderer,this.canvas=t.canvas,this.context=t.context;t=t.plugins;(this.plugins=t).addToScene(this,s.Global,[s.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.events,i=this.settings;return this.settings.active&&(i.status=r.PAUSED,i.active=!1,e.emit(o.PAUSE,this,t)),this},resume:function(t){var e=this.events,i=this.settings;return this.settings.active||(i.status=r.RUNNING,i.active=!0,e.emit(o.RESUME,this,t)),this},sleep:function(t){var e=this.events,i=this.settings;return i.status=r.SLEEPING,i.active=!1,i.visible=!1,e.emit(o.SLEEP,this,t),this},wake:function(t){var e=this.events,i=this.settings;return i.status=r.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},isSleeping:function(){return this.settings.status===r.SLEEPING},isActive:function(){return this.settings.status===r.RUNNING},isPaused:function(){return this.settings.status===r.PAUSED},isTransitioning:function(){return this.settings.isTransition||null!==this.scenePlugin._target},isTransitionOut:function(){return null!==this.scenePlugin._target&&0<this.scenePlugin._duration},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=r.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=r.SHUTDOWN,i.active=!1,i.visible=!1,this.renderer===l.WEBGL&&this.renderer.resetTextures(!0),e.emit(o.SHUTDOWN,this,t)},destroy:function(){var t=this.events,e=this.settings;e.status=r.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","camera","displayList","events","make","scenePlugin","updateList"],n=0;n<i.length;n++)this[i[n]]=null}});t.exports=i},function(t,e){t.exports=function(t){return t&&t[0].toUpperCase()+t.slice(1)}},function(t,e,i){var n=i(33),r=i(0),o=i(109),a=i(424),i=new r({initialize:function(t,e,i,n,r){Array.isArray(i)||(i=[i]),this.manager=t,this.key=e,this.source=[],this.dataSource=[],this.frames={},this.customData={},this.firstFrame="__BASE";for(var s=this.frameTotal=0;s<i.length;s++)this.source.push(new a(this,i[s],n,r))},add:function(t,e,i,n,r,s){return this.has(t)?null:(e=new o(this,t,e,i,n,r,s),this.frames[t]=e,"__BASE"===this.firstFrame&&(this.firstFrame=t),this.frameTotal++,e)},remove:function(t){return!!this.has(t)&&(this.get(t).destroy(),delete this.frames[t],!0)},has:function(t){return this.frames[t]},get:function(t){return t=t||this.firstFrame,this.frames[t]||this.frames[this.firstFrame]},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,n,r=[];for(n in this.frames)"__BASE"===n&&!e||(i=this.frames[n]).sourceIndex===t&&r.push(i);return r},getFrameNames:function(t){void 0===t&&(t=!1);var e=Object.keys(this.frames);return t||-1!==(t=e.indexOf("__BASE"))&&e.splice(t,1),e},getSourceImage:function(t){null!=t&&1!==this.frameTotal||(t="__BASE");t=this.frames[t];return(t||this.frames.__BASE).source.image},getDataSourceImage:function(t){null!=t&&1!==this.frameTotal||(t="__BASE");t=this.frames[t],t=(t||this.frames.__BASE).sourceIndex;return this.dataSource[t].image},setDataSource:function(t){Array.isArray(t)||(t=[t]);for(var e=0;e<t.length;e++){var i=this.source[e];this.dataSource.push(new a(this,t[e],i.width,i.height))}},setFilter:function(t){for(var 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)},destroy:function(){for(var t,e=0;e<this.source.length;e++)this.source[e].destroy();for(e=0;e<this.dataSource.length;e++)this.dataSource[e].destroy();for(t in this.frames)this.frames[t].destroy();this.source=[],this.dataSource=[],this.frames={},this.manager.removeKey(this.key);var i=this.manager.game.renderer;i&&i.type===n.WEBGL&&i.resetTextures(!0),this.manager=null}});t.exports=i},function(t,e,i){var h=i(78);t.exports=function(t,e,i,n,r){void 0===r&&(r=t.length);var s=[];if(h(t,n=void 0===n?0:n,r))for(var o=n;o<r;o++){var a=t[o];(!e||void 0===i&&a.hasOwnProperty(e)||e&&void 0!==i&&a[e]===i)&&s.push(a)}return s}},function(t,e,i){t.exports={Matrix:i(1013),Add:i(1021),AddAt:i(1022),BringToTop:i(1023),CountAllMatching:i(1024),Each:i(1025),EachInRange:i(1026),FindClosestInSorted:i(318),GetAll:i(207),GetFirst:i(428),GetRandom:i(210),MoveDown:i(1027),MoveTo:i(1028),MoveUp:i(1029),MoveAbove:i(1030),MoveBelow:i(1031),NumberArray:i(322),NumberArrayStep:i(1032),QuickSelect:i(436),Range:i(437),Remove:i(93),RemoveAt:i(1033),RemoveBetween:i(1034),RemoveRandomElement:i(1035),Replace:i(1036),RotateLeft:i(178),RotateRight:i(179),SafeRange:i(78),SendToBack:i(1037),SetAll:i(1038),Shuffle:i(131),SortByDigits:i(320),SpliceOne:i(74),StableSort:i(79),Swap:i(1039)}},function(t,e){t.exports=function(t){if(!Array.isArray(t)||t.length<2||!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}},function(t,e){t.exports=function(t,e,i){void 0===i&&(i=t.length);e=(e=void 0===e?0:e)+Math.floor(Math.random()*i);return void 0===t[e]?null:t[e]}},function(t,e,i){var n=i(0),r=i(9),s=i(438),i=new n({Extends:r,initialize:function(){r.call(this),this._pending=[],this._active=[],this._destroy=[],this._toProcess=0,this.checkQueue=!1},add:function(t){return this._pending.push(t),this._toProcess++,t},remove:function(t){return this._destroy.push(t),this._toProcess++,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;for(var t=this._destroy,e=this._active,i=0;i<t.length;i++){var n=t[i],r=e.indexOf(n);-1!==r&&(e.splice(r,1),this.emit(s.PROCESS_QUEUE_REMOVE,n))}for(t.length=0,t=this._pending,i=0;i<t.length;i++)n=t[i],(!this.checkQueue||this.checkQueue&&-1===e.indexOf(n))&&(e.push(n),this.emit(s.PROCESS_QUEUE_ADD,n));return t.length=0,this._toProcess=0,e},getActive:function(){return this._active},length:{get:function(){return this._active.length}},destroy:function(){this._toProcess=0,this._pending=[],this._active=[],this._destroy=[]}});t.exports=i},function(t,e){function L(t,e){return parseInt(t.getAttribute(e),10)}t.exports=function(t,e,i,n,r){void 0===i&&(i=0),void 0===n&&(n=0);var s=e.cutX,o=e.cutY,a=e.source.width,h=e.source.height,l=e.sourceIndex,c={},u=t.getElementsByTagName("info")[0],d=t.getElementsByTagName("common")[0];c.font=u.getAttribute("face"),c.size=L(u,"size"),c.lineHeight=L(d,"lineHeight")+n,c.chars={};var p,f,g=t.getElementsByTagName("char"),m=void 0!==e&&e.trimmed;m&&(p=e.height,f=e.width);for(var y=0;y<g.length;y++){var v=g[y],x=L(v,"id"),b=String.fromCharCode(x),w=L(v,"x"),T=L(v,"y"),S=L(v,"width"),P=L(v,"height");m&&(w<f&&(f=w),T<p&&(p=T)),m&&0!==p&&0!==f&&(w-=e.x,T-=e.y);var _=(s+w)/a,E=(o+T)/h,A=(s+w+S)/a,M=(o+T+P)/h;c.chars[x]={x:w,y:T,width:S,height:P,centerX:Math.floor(S/2),centerY:Math.floor(P/2),xOffset:L(v,"xoffset"),yOffset:L(v,"yoffset"),xAdvance:L(v,"xadvance")+i,data:{},kerning:{},u0:_,v0:E,u1:A,v1:M},r&&0!==S&&0!==P&&(x=r.add(b,l,w,T,S,P))&&x.setUVs(S,P,_,E,A,M)}for(var k=t.getElementsByTagName("kerning"),y=0;y<k.length;y++){var C=k[y],O=L(C,"first"),R=L(C,"second"),C=L(C,"amount");c.chars[R].kerning[O]=C}return c}},function(t,e,i){var n=i(1049),s=i(440),r=i(0),o=i(11),a=i(109),h=i(15),l=i(110),i=new r({Extends:h,Mixins:[o.Alpha,o.BlendMode,o.Depth,o.Mask,o.Pipeline,o.ScrollFactor,o.Size,o.Texture,o.Transform,o.Visible,n],initialize:function(t,e,i,n,r){h.call(this,t,"Blitter"),this.setTexture(n,r),this.setPosition(e,i),this.initPipeline(),this.children=new l,this.renderList=[],this.dirty=!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 a||(i=this.texture.get(i));t=new s(this,t,e,i,n);return this.children.addAt(t,r,!1),this.dirty=!0,t},createFromCallback:function(t,e,i,n){for(var r=this.createMultiple(e,i,n),s=0;s<r.length;s++){var o=r[s];t.call(this,o,s)}return r},createMultiple:function(i,t,n){void 0===t&&(t=this.frame.name),void 0===n&&(n=!0),Array.isArray(t)||(t=[t]);var r=[],s=this;return t.forEach(function(t){for(var e=0;e<i;e++)r.push(s.create(0,0,t,n))}),r},childCanRender:function(t){return t.visible&&0<t.alpha},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=[]}});t.exports=i},function(t,e,i){var s=i(208),r=i(35),n=i(0),o=i(11),a=i(75),h=i(15),l=i(10),c=i(1052),u=i(441),d=i(3),i=new n({Extends:h,Mixins:[o.AlphaSingle,o.BlendMode,o.ComputedSize,o.Depth,o.Mask,o.Pipeline,o.Transform,o.Visible,c],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.tempTransformMatrix=new o.TransformMatrix,this._sortKey="",this._sysEvents=t.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.initPipeline(),this.setPosition(e,i),this.clearAlpha(),this.setBlendMode(r.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 this.exclusive=t=void 0===t?!0:t,this},getBounds:function(t){var e;if((t=void 0===t?new l:t).setTo(this.x,this.y,0,0),this.parentContainer&&(e=this.parentContainer.getBoundsTransformMatrix().transformPoint(this.x,this.y),t.setTo(e.x,e.y,0,0)),0<this.list.length){var i=this.list,n=new l,r=!1;t.setEmpty();for(var s=0;s<i.length;s++){var o=i[s];o.getBounds&&(o.getBounds(n),r?u(n,t,t):(t.setTo(n.x,n.y,n.width,n.height),r=!0))}}return t},addHandler:function(t){t.once(a.DESTROY,this.remove,this),this.exclusive&&(t.parentContainer&&t.parentContainer.remove(t),t.removeFromDisplayList(),t.parentContainer=this)},removeHandler:function(t){t.off(a.DESTROY,this.remove),this.exclusive&&(t.parentContainer=null,t.addToDisplayList())},pointToContainer:function(t,e){void 0===e&&(e=new d),this.parentContainer?this.parentContainer.pointToContainer(t,e):e=new d(t.x,t.y);var i=this.tempTransformMatrix;return i.applyITRS(this.x,this.y,this.rotation,this.scaleX,this.scaleY),i.invert(),i.transformPoint(t.x,t.y,e),e},getBoundsTransformMatrix:function(){return this.getWorldTransformMatrix(this.tempTransformMatrix,this.localTransform)},add:function(t){return s.Add(this.list,t,this.maxSize,this.addHandler,this),this},addAt:function(t,e){return s.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(i,t){return i&&s.StableSort(this.list,t=void 0===t?function(t,e){return t[i]-e[i]}:t),this},getByName:function(t){return s.GetFirst(this.list,"name",t)},getRandom:function(t,e){return s.GetRandom(this.list,t,e)},getFirst:function(t,e,i,n){return s.GetFirst(this.list,t,e,i,n)},getAll:function(t,e,i,n){return s.GetAll(this.list,t,e,i,n)},count:function(t,e,i,n){return s.CountAllMatching(this.list,t,e,i,n)},swap:function(t,e){return s.Swap(this.list,t,e),this},moveTo:function(t,e){return s.MoveTo(this.list,t,e),this},moveAbove:function(t,e){return s.MoveAbove(this.list,t,e),this},moveBelow:function(t,e){return s.MoveBelow(this.list,t,e),this},remove:function(t,e){var i=s.Remove(this.list,t,this.removeHandler,this);if(e&&i){Array.isArray(i)||(i=[i]);for(var n=0;n<i.length;n++)i[n].destroy()}return this},removeAt:function(t,e){t=s.RemoveAt(this.list,t,this.removeHandler,this);return e&&t&&t.destroy(),this},removeBetween:function(t,e,i){var n=s.RemoveBetween(this.list,t,e,this.removeHandler,this);if(i)for(var r=0;r<n.length;r++)n[r].destroy();return this},removeAll:function(t){var e=s.RemoveBetween(this.list,0,this.list.length,this.removeHandler,this);if(t)for(var i=0;i<e.length;i++)e[i].destroy();return this},bringToTop:function(t){return s.BringToTop(this.list,t),this},sendToBack:function(t){return s.SendToBack(this.list,t),this},moveUp:function(t){return s.MoveUp(this.list,t),this},moveDown:function(t){return s.MoveDown(this.list,t),this},reverse:function(){return this.list.reverse(),this},shuffle:function(){return s.Shuffle(this.list),this},replace:function(t,e,i){return s.Replace(this.list,t,e)&&(this.addHandler(e),this.removeHandler(t),i&&t.destroy()),this},exists:function(t){return-1<this.list.indexOf(t)},setAll:function(t,e,i,n){return s.SetAll(this.list,t,e,i,n),this},each:function(t,e){for(var i=[null],n=this.list.slice(),r=n.length,s=2;s<arguments.length;s++)i.push(arguments[s]);for(s=0;s<r;s++)i[0]=n[s],t.apply(e,i);return this},iterate: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);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&&(s.SetAll(this.list,"scrollFactorX",t),s.SetAll(this.list,"scrollFactorY",e)),this},length:{get:function(){return this.list.length}},first:{get:function(){return(this.position=0)<this.list.length?this.list[0]:null}},last:{get:function(){return 0<this.list.length?(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 0<this.position?(this.position--,this.list[this.position]):null}},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[]}});t.exports=i},function(t,e,i){var a=i(148),n=i(0),i=i(1057),n=new n({Extends:a,Mixins:[i],initialize:function(t,e,i,n,r,s,o){a.call(this,t,e,i,n,r,s,o),this.type="DynamicBitmapText",this.scrollX=0,this.scrollY=0,this.cropWidth=0,this.cropHeight=0,this.displayCallback,this.callbackData={parent:this,color:0,tint:{topLeft:0,topRight:0,bottomLeft:0,bottomRight:0},index:0,charCode:0,x:0,y:0,scale:0,rotation:0,data:0}},setSize:function(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}});t.exports=n},function(t,e,i){var n=i(133),r=i(0),h=i(217),s=i(303),o=i(304),a=i(305),l=i(309),c=i(167),u=i(312),d=i(313),p=i(314),f=i(111),g=i(15),m=i(2),y=i(6),v=i(14),i=i(1063),x=new r({Extends:g,Mixins:[s,o,a,l,c,d,p,u,i],initialize:function(t,e){var i=y(e,"x",0),n=y(e,"y",0);g.call(this,t,"Graphics"),this.setPosition(i,n),this.initPipeline(),this.displayOriginX=0,this.displayOriginY=0,this.commandBuffer=[],this.defaultFillColor=-1,this.defaultFillAlpha=1,this.defaultStrokeWidth=1,this.defaultStrokeColor=-1,this.defaultStrokeAlpha=1,this._lineWidth=1,this.setDefaultStyles(e)},setDefaultStyles:function(t){return y(t,"lineStyle",null)&&(this.defaultStrokeWidth=y(t,"lineStyle.width",1),this.defaultStrokeColor=y(t,"lineStyle.color",16777215),this.defaultStrokeAlpha=y(t,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),y(t,"fillStyle",null)&&(this.defaultFillColor=y(t,"fillStyle.color",16777215),this.defaultFillAlpha=y(t,"fillStyle.alpha",1),this.fillStyle(this.defaultFillColor,this.defaultFillAlpha)),this},lineStyle:function(t,e,i){return this.commandBuffer.push(h.LINE_STYLE,t,e,i=void 0===i?1:i),this._lineWidth=t,this},fillStyle:function(t,e){return this.commandBuffer.push(h.FILL_STYLE,t,e=void 0===e?1:e),this},fillGradientStyle:function(t,e,i,n,r,s,o,a){return void 0===r&&(r=1),void 0===s&&(s=r),void 0===o&&(o=r),void 0===a&&(a=r),this.commandBuffer.push(h.GRADIENT_FILL_STYLE,r,s,o,a,t,e,i,n),this},lineGradientStyle:function(t,e,i,n,r,s){return this.commandBuffer.push(h.GRADIENT_LINE_STYLE,t,s=void 0===s?1:s,e,i,n,r),this},beginPath:function(){return this.commandBuffer.push(h.BEGIN_PATH),this},closePath:function(){return this.commandBuffer.push(h.CLOSE_PATH),this},fillPath:function(){return this.commandBuffer.push(h.FILL_PATH),this},fill:function(){return this.commandBuffer.push(h.FILL_PATH),this},strokePath:function(){return this.commandBuffer.push(h.STROKE_PATH),this},stroke:function(){return this.commandBuffer.push(h.STROKE_PATH),this},fillCircleShape:function(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,v.PI2),this.fillPath(),this},strokeCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,v.PI2),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(h.FILL_RECT,t,e,i,n),this},strokeRect:function(t,e,i,n){var r=this._lineWidth/2,s=t-r,r=t+r;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(s,e),this.lineTo(r+i,e),this.strokePath(),this.beginPath(),this.moveTo(s,e+n),this.lineTo(r+i,e+n),this.strokePath(),this},fillRoundedRect:function(t,e,i,n,r){var s=r=void 0===r?20:r,o=r,a=r,h=r;return"number"!=typeof r&&(s=m(r,"tl",20),o=m(r,"tr",20),a=m(r,"bl",20),h=m(r,"br",20)),this.beginPath(),this.moveTo(t+s,e),this.lineTo(t+i-o,e),this.arc(t+i-o,e+o,o,-v.TAU,0),this.lineTo(t+i,e+n-h),this.arc(t+i-h,e+n-h,h,0,v.TAU),this.lineTo(t+a,e+n),this.arc(t+a,e+n-a,a,v.TAU,Math.PI),this.lineTo(t,e+s),this.arc(t+s,e+s,s,-Math.PI,-v.TAU),this.fillPath(),this},strokeRoundedRect:function(t,e,i,n,r){var s=r=void 0===r?20:r,o=r,a=r,h=r;return"number"!=typeof r&&(s=m(r,"tl",20),o=m(r,"tr",20),a=m(r,"bl",20),h=m(r,"br",20)),this.beginPath(),this.moveTo(t+s,e),this.lineTo(t+i-o,e),this.moveTo(t+i-o,e),this.arc(t+i-o,e+o,o,-v.TAU,0),this.lineTo(t+i,e+n-h),this.moveTo(t+i,e+n-h),this.arc(t+i-h,e+n-h,h,0,v.TAU),this.lineTo(t+a,e+n),this.moveTo(t+a,e+n),this.arc(t+a,e+n-a,a,v.TAU,Math.PI),this.lineTo(t,e+s),this.moveTo(t,e+s),this.arc(t+s,e+s,s,-Math.PI,-v.TAU),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(h.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,r,s){return this.commandBuffer.push(h.FILL_TRIANGLE,t,e,i,n,r,s),this},strokeTriangle:function(t,e,i,n,r,s){return this.commandBuffer.push(h.STROKE_TRIANGLE,t,e,i,n,r,s),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(h.LINE_TO,t,e),this},moveTo:function(t,e){return this.commandBuffer.push(h.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 r=1;r<n;r++)this.lineTo(t[r].x,t[r].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 r=1;r<n;r++)this.lineTo(t[r].x,t[r].y);return e&&this.lineTo(t[0].x,t[0].y),i&&this.closePath(),this.fillPath(),this},strokeEllipseShape:function(t,e){t=t.getPoints(e=void 0===e?32:e);return this.strokePoints(t,!0)},strokeEllipse:function(t,e,i,n,r){void 0===r&&(r=32);t=new f(t,e,i,n).getPoints(r);return this.strokePoints(t,!0)},fillEllipseShape:function(t,e){t=t.getPoints(e=void 0===e?32:e);return this.fillPoints(t,!0)},fillEllipse:function(t,e,i,n,r){void 0===r&&(r=32);t=new f(t,e,i,n).getPoints(r);return this.fillPoints(t,!0)},arc:function(t,e,i,n,r,s,o){return this.commandBuffer.push(h.ARC,t,e,i,n,r,s=void 0===s?!1:s,o=void 0===o?0:o),this},slice:function(t,e,i,n,r,s,o){return void 0===s&&(s=!1),void 0===o&&(o=0),this.commandBuffer.push(h.BEGIN_PATH),this.commandBuffer.push(h.MOVE_TO,t,e),this.commandBuffer.push(h.ARC,t,e,i,n,r,s,o),this.commandBuffer.push(h.CLOSE_PATH),this},save:function(){return this.commandBuffer.push(h.SAVE),this},restore:function(){return this.commandBuffer.push(h.RESTORE),this},translateCanvas:function(t,e){return this.commandBuffer.push(h.TRANSLATE,t,e),this},scaleCanvas:function(t,e){return this.commandBuffer.push(h.SCALE,t,e),this},rotateCanvas:function(t){return this.commandBuffer.push(h.ROTATE,t),this},clear:function(){return this.commandBuffer.length=0,-1<this.defaultFillColor&&this.fillStyle(this.defaultFillColor,this.defaultFillAlpha),-1<this.defaultStrokeColor&&this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha),this},generateTexture:function(t,e,i){var n,r,s,o=this.scene.sys,a=o.game.renderer;return void 0===e&&(e=o.scale.width),void 0===i&&(i=o.scale.height),x.TargetCamera.setScene(this.scene),x.TargetCamera.setViewport(0,0,e,i),x.TargetCamera.scrollX=this.x,x.TargetCamera.scrollY=this.y,"string"==typeof t?o.textures.exists(t)?(s=(n=o.textures.get(t)).getSourceImage())instanceof HTMLCanvasElement&&(r=s.getContext("2d")):r=(n=o.textures.createCanvas(t,e,i)).getSourceImage().getContext("2d"):t instanceof HTMLCanvasElement&&(r=t.getContext("2d")),r&&(this.renderCanvas(a,this,x.TargetCamera,null,r,!1),n&&n.refresh()),this},preDestroy:function(){this.commandBuffer=[]}});x.TargetCamera=new n,t.exports=x},function(t,e){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}},function(t,e,i){var s=i(4);t.exports=function(t,e,i){void 0===i&&(i=new s);var n=t.width/2,r=t.height/2;return i.x=t.x+n*Math.cos(e),i.y=t.y+r*Math.sin(e),i}},function(t,e,i){var n=i(35),r=i(0),s=i(11),o=i(176),a=i(101),h=i(9),l=i(75),c=i(110),u=i(1071),d=i(20),p=i(79),i=new r({Extends:c,Mixins:[s.AlphaSingle,s.BlendMode,s.Depth,s.Mask,s.Pipeline,s.Visible,h,u],initialize:function(t,e){c.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.initPipeline(),this.clearAlpha(),this.setBlendMode(n.SKIP_CHECK),e&&this.add(e),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&&(i.unshift(e.getIndex(t)),(t=e).parentContainer);)e=e.parentContainer;return i.unshift(this.displayList.getIndex(t)),i},addChildCallback:function(t){t.displayList&&t.displayList!==this&&t.removeFromDisplayList(),t.displayList||(this.queueDepthSort(),t.displayList=this,t.emit(l.ADDED_TO_SCENE,t,this.scene),this.events.emit(d.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(d.REMOVED_FROM_SCENE,t,this.scene)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(p(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(t,e){return t._depth-e._depth},getChildren:function(){return this.list},destroy:function(){if(this.scene&&!this.ignoreDestroy){this.emit(l.DESTROY,this);for(var t=this.list.length;t--;)this.list[t].destroy();this.removeAllListeners(),this.resetPostPipeline(!0),this.displayList&&(this.displayList.remove(this,!0),this.displayList.queueDepthSort()),this.data&&(this.data.destroy(),this.data=void 0),this.active=!1,this.visible=!1,this.list=void 0,this.scene=void 0,this.displayList=void 0,this.systems=void 0,this.events=void 0}}});t.exports=i},function(t,e,i){var n=i(0),r=i(11),s=i(15),o=i(450),a=i(110),h=i(452),i=i(1075),n=new n({Extends:s,Mixins:[r.Depth,r.Mask,r.Pipeline,r.Transform,r.Visible,i],initialize:function(t,e,i,n){if(s.call(this,t,"ParticleEmitterManager"),this.blendMode=-1,this.timeScale=1,this.texture=null,this.frame=null,this.frameNames=[],null===i||"object"!=typeof i&&!Array.isArray(i)||(n=i,i=null),this.setTexture(e,i),this.initPipeline(),this.emitters=new a(this),this.wells=new a(this),n){Array.isArray(n)||(n=[n]);for(var r=0;r<n.length;r++)this.createEmitter(n[r])}},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t){this.frame=this.texture.get(t);var t=this.texture.getFramesFromTextureSource(this.frame.sourceIndex),e=[];return t.forEach(function(t){e.push(t.name)}),this.frameNames=e,this.defaultFrame=this.frame,this},setEmitterFrames:function(t,e){Array.isArray(t)||(t=[t]);for(var i=e.frames,n=i.length=0;n<t.length;n++){var r=t[n];-1!==this.frameNames.indexOf(r)&&i.push(this.texture.get(r))}return 0<i.length?e.defaultFrame=i[0]:e.defaultFrame=this.defaultFrame,this},addEmitter:function(t){return this.emitters.add(t)},createEmitter:function(t){return this.addEmitter(new h(this,t))},removeEmitter:function(t){return this.emitters.remove(t,!0)},addGravityWell:function(t){return this.wells.add(t)},createGravityWell:function(t){return this.addGravityWell(new o(t))},emitParticle:function(t,e,i){for(var n=this.emitters.list,r=0;r<n.length;r++){var s=n[r];s.active&&s.emitParticle(t,e,i)}return this},emitParticleAt:function(t,e,i){return this.emitParticle(i,t,e)},pause:function(){return this.active=!1,this},resume:function(){return this.active=!0,this},getProcessors:function(){return this.wells.getAll("active",!0)},preUpdate:function(t,e){e*=this.timeScale;for(var i=this.emitters.list,n=0;n<i.length;n++){var r=i[n];r.active&&r.preUpdate(t,e)}},setAlpha:function(){},setScrollFactor:function(){},setBlendMode:function(){}});t.exports=n},function(t,e,i){var o=i(35),a=i(133),h=i(31),n=i(0),r=i(11),l=i(33),c=i(109),u=i(15),d=i(1),p=i(92),s=i(1079),f=i(141),g=i(12),m=i(222),i=new n({Extends:u,Mixins:[r.Alpha,r.BlendMode,r.ComputedSize,r.Crop,r.Depth,r.Flip,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Tint,r.Transform,r.Visible,s],initialize:function(t,e,i,n,r,s,o){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=32),void 0===r&&(r=32),u.call(this,t,"RenderTexture"),this.renderer=t.sys.renderer,this.textureManager=t.sys.textures,this.globalTint=16777215,this.globalAlpha=1,this.canvas=null,this.dirty=!1,this._crop=this.resetCropObject(),this.texture=null,this.frame=null,this._saved=!1,void 0===s?(this.canvas=h.create2D(this,n,r),this.texture=t.sys.textures.addCanvas(m(),this.canvas),this.frame=this.texture.get()):(this.texture=t.sys.textures.get(s),this.frame=this.texture.get(o),this.canvas=this.frame.source.image,this._saved=!0,this.dirty=!0,this.width=this.frame.cutWidth,this.height=this.frame.cutHeight),this.context=this.canvas.getContext("2d"),this._eraseMode=!1,this.camera=new a(0,0,n,r),this.renderTarget=null;o=this.renderer;o?o.type===l.WEBGL?(this.drawGameObject=this.batchGameObjectWebGL,this.renderTarget=new f(o,n,r,1,0,!1)):o.type===l.CANVAS&&(this.drawGameObject=this.batchGameObjectCanvas):this.drawGameObject=d,this.camera.setScene(t),this.setPosition(e,i),void 0===s&&this.setSize(n,r),this.setOrigin(0,0),this.initPipeline(p.SINGLE_PIPELINE)},setSize:function(t,e){return this.resize(t,e)},resize:function(t,e){void 0===e&&(e=t);var i=this.frame,n=(t!==this.width||e!==this.height?"__BASE"===i.name&&(this.canvas.width=t,this.canvas.height=e,this.texture.width=t,this.texture.height=e,(n=this.renderTarget)&&(n.resize(t,e),i.glTexture=n.texture,i.source.isRenderTexture=!0,i.source.isGLTexture=!0,i.source.glTexture=n.texture),this.camera.setSize(t,e),i.source.width=t,i.source.height=e,i.setSize(t,e),this.width=t,this.height=e):(n=this.texture.getSourceImage(),i.cutX+t>n.width&&(t=n.width-i.cutX),i.cutY+e>n.height&&(e=n.height-i.cutY),i.setSize(t,e,i.cutX,i.cutY)),this.updateDisplayOrigin(),this.input);return n&&!n.customHitArea&&(n.hitArea.width=t,n.hitArea.height=e),this},setGlobalTint:function(t){return this.globalTint=t,this},setGlobalAlpha:function(t){return this.globalAlpha=t,this},saveTexture:function(t){return this.textureManager.renameTexture(this.texture.key,t),this._saved=!0,this.texture},fill:function(t,e,i,n,r,s){var o=this.frame,a=this.camera,h=this.renderer;void 0===e&&(e=1),void 0===i&&(i=0),void 0===n&&(n=0),void 0===r&&(r=o.cutWidth),void 0===s&&(s=o.cutHeight);var l,c,u=(t>>16&255)/255,d=(t>>8&255)/255,t=(255&t)/255,p=this.renderTarget;return a.preRender(),p?(p.bind(!0),(a=this.pipeline).manager.set(a),l=p.width,c=p.height,l=h.width/l,c=h.height/c,a.drawFillRect(i*l,n*c,r*l,s*c,g.getTintFromFloats(t,d,u,1),e),p.unbind(!0)):(a=this.context,h.setContext(a),a.fillStyle="rgba("+u+","+d+","+t+","+e+")",a.fillRect(i+o.cutX,n+o.cutY,r,s),h.setContext()),this.dirty=!0,this},clear:function(){var t;return this.dirty&&((t=this.renderTarget)?t.clear():((t=this.context).save(),t.setTransform(1,0,0,1,0,0),t.clearRect(this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight),t.restore()),this.dirty=!1),this},erase:function(t,e,i){return this._eraseMode=!0,this.draw(t,e,i,1,16777215),this._eraseMode=!1,this},draw:function(t,e,i,n,r){return this.beginDraw(),this.batchDraw(t,e,i,n,r),this.endDraw(),this},drawFrame:function(t,e,i,n,r,s){return this.beginDraw(),this.batchDrawFrame(t,e,i,n,r,s),this.endDraw(),this},beginDraw:function(){var t=this.camera,e=this.renderer,i=this.renderTarget;return t.preRender(),i?e.beginCapture(i.width,i.height):e.setContext(this.context),this},batchDraw:function(t,e,i,n,r){return void 0===n&&(n=this.globalAlpha),r=void 0===r?(this.globalTint>>16)+(65280&this.globalTint)+((255&this.globalTint)<<16):(r>>16)+(65280&r)+((255&r)<<16),Array.isArray(t)||(t=[t]),this.batchList(t,e,i,n,r),this},batchDrawFrame:function(t,e,i,n,r,s){void 0===i&&(i=0),void 0===n&&(n=0),void 0===r&&(r=this.globalAlpha),s=void 0===s?(this.globalTint>>16)+(65280&this.globalTint)+((255&this.globalTint)<<16):(s>>16)+(65280&s)+((255&s)<<16);t=this.textureManager.getFrame(t,e);return t&&(this.renderTarget?this.pipeline.batchTextureFrame(t,i,n,s,r,this.camera.matrix,null):this.batchTextureFrame(t,i+this.frame.cutX,n+this.frame.cutY,r,s)),this},endDraw:function(t){void 0===t&&(t=this._eraseMode);var e,i=this.renderer,n=this.renderTarget;return n?(e=i.endCapture(),i.pipelines.setUtility().blitFrame(e,n,1,!1,!1,t),i.resetScissor(),i.resetViewport()):i.setContext(),this.dirty=!0,this},batchList:function(t,e,i,n,r){for(var s=0;s<t.length;s++){var o=t[s];o&&o!==this&&(o.renderWebGL||o.renderCanvas?this.drawGameObject(o,e,i):o.isParent||o.list?this.batchGroup(o.getChildren(),e,i):"string"==typeof o?this.batchTextureFrameKey(o,null,e,i,n,r):o instanceof c?this.batchTextureFrame(o,e,i,n,r):Array.isArray(o)&&this.batchList(o,e,i,n,r))}},batchGroup:function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=0),e+=this.frame.cutX,i+=this.frame.cutY;for(var n=0;n<t.length;n++){var r,s,o=t[n];o.willRender(this.camera)&&(r=o.x+e,s=o.y+i,this.drawGameObject(o,r,s))}},batchGameObjectWebGL:function(t,e,i){void 0===e&&(e=t.x),void 0===i&&(i=t.y);var n=t.x,r=t.y;t.setPosition(e+this.frame.cutX,i+this.frame.cutY),t.renderDirect?t.renderDirect(this.renderer,t,this.camera):t.renderWebGL(this.renderer,t,this.camera),t.setPosition(n,r)},batchGameObjectCanvas:function(t,e,i){void 0===e&&(e=t.x),void 0===i&&(i=t.y);var n,r=t.x,s=t.y;this._eraseMode&&(n=t.blendMode,t.blendMode=o.ERASE),t.setPosition(e+this.frame.cutX,i+this.frame.cutY),t.renderCanvas(this.renderer,t,this.camera,null),t.setPosition(r,s),this._eraseMode&&(t.blendMode=n)},batchTextureFrameKey:function(t,e,i,n,r,s){t=this.textureManager.getFrame(t,e);t&&this.batchTextureFrame(t,i,n,r,s)},batchTextureFrame:function(t,e,i,n,r){var s,o;void 0===e&&(e=0),void 0===i&&(i=0),e+=this.frame.cutX,i+=this.frame.cutY,this.renderTarget?this.pipeline.batchTextureFrame(t,e,i,r,n,this.camera.matrix,null):(r=this.context,s=t.canvasData,t=t.source.image,o=this.camera.matrix,r.save(),r.globalCompositeOperation=this._eraseMode?"destination-out":"source-over",r.globalAlpha=n,o.setToContext(r),r.drawImage(t,s.x,s.y,s.width,s.height,e,i,s.width,s.height),r.restore())},snapshotArea:function(t,e,i,n,r,s,o){return this.renderTarget?this.renderer.snapshotFramebuffer(this.renderTarget.framebuffer,this.width,this.height,r,!1,t,e,i,n,s,o):this.renderer.snapshotCanvas(this.canvas,r,!1,t,e,i,n,s,o),this},snapshot:function(t,e,i){return this.renderTarget?this.renderer.snapshotFramebuffer(this.renderTarget.framebuffer,this.width,this.height,t,!1,0,0,this.width,this.height,e,i):this.renderer.snapshotCanvas(this.canvas,t,!1,0,0,this.width,this.height,e,i),this},snapshotPixel:function(t,e,i){return this.renderTarget?this.renderer.snapshotFramebuffer(this.renderTarget.framebuffer,this.width,this.height,i,!0,t,e):this.renderer.snapshotCanvas(this.canvas,i,!0,t,e),this},preDestroy:function(){this._saved||(h.remove(this.canvas),this.renderTarget&&this.renderTarget.destroy(),this.texture.destroy(),this.camera.destroy(),this.canvas=null,this.context=null,this.texture=null)}});t.exports=i},function(t,e){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)})}},function(t,e,i){var l=i(164),n=i(0),r=i(11),c=i(15),u=i(92),s=i(1085),d=i(3),i=new n({Extends:c,Mixins:[r.AlphaSingle,r.BlendMode,r.Depth,r.Flip,r.Mask,r.Pipeline,r.Size,r.Texture,r.Transform,r.Visible,r.ScrollFactor,s],initialize:function(t,e,i,n,r,s,o,a,h){void 0===n&&(n="__DEFAULT"),void 0===s&&(s=2),void 0===o&&(o=!0),c.call(this,t,"Rope"),this.anims=new l(this),this.points=s,this.vertices,this.uv,this.colors,this.alphas,this.tintFill="__DEFAULT"===n,this.dirty=!1,this.horizontal=o,this._flipX=!1,this._flipY=!1,this._perp=new d,this.debugCallback=null,this.debugGraphic=null,this.setTexture(n,r),this.setPosition(e,i),this.setSizeToFrame(),this.initPipeline(u.ROPE_PIPELINE),Array.isArray(s)&&this.resizeArrays(s.length),this.setPoints(s,a,h),this.updateVertices()},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},setTintFill:function(t){return this.tintFill=t=void 0===t?!1:t,this},setAlphas:function(t,e){var i=this.points.length;if(!(i<1)){var n=this.alphas,r=(void 0===t?t=[1]:Array.isArray(t)||void 0!==e||(t=[t]),0);if(void 0!==e)for(o=0;o<i;o++)n[r=2*o]=t,n[r+1]=e;else if(t.length===i)for(o=0;o<i;o++)n[r=2*o]=t[o],n[r+1]=t[o];else for(var s=t[0],o=0;o<i;o++)t.length>(r=2*o)&&(s=t[r]),n[r]=s,t.length>r+1&&(s=t[r+1]),n[r+1]=s}return this},setColors:function(t){var e=this.points.length;if(!(e<1)){var i=this.colors,n=(void 0===t?t=[16777215]:Array.isArray(t)||(t=[t]),0);if(t.length===e)for(s=0;s<e;s++)i[n=2*s]=t[s],i[n+1]=t[s];else for(var r=t[0],s=0;s<e;s++)t.length>(n=2*s)&&(r=t[n]),i[n]=r,t.length>n+1&&(r=t[n+1]),i[n+1]=r}return this},setPoints:function(t,e,i){if("number"==typeof(t=void 0===t?2:t)){var n,r,s,o=t;if(o<2&&(o=2),t=[],this.horizontal)for(s=-this.frame.halfWidth,r=this.frame.width/(o-1),n=0;n<o;n++)t.push({x:s+n*r,y:0});else for(s=-this.frame.halfHeight,r=this.frame.height/(o-1),n=0;n<o;n++)t.push({x:0,y:s+n*r})}var a=t.length,h=this.points.length;return a<1||(1===a&&(t.unshift({x:0,y:0}),a++),h!==a&&this.resizeArrays(a),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,r=this.frame.u1,s=this.frame.v1,o=(r-i)/(e-1),a=(s-n)/(e-1),h=0;h<e;h++){var l,c,u,d=4*h,p=this.horizontal?(u=l=this._flipX?r-h*o:i+h*o,this._flipY?(c=s,n):(c=n,s)):(u=this._flipX?(l=i,r):(l=r,i),c=this._flipY?s-h*a:n+h*a);t[0+d]=l,t[1+d]=c,t[2+d]=u,t[3+d]=p}return this},resizeArrays:function(t){var e=this.colors,i=this.alphas;this.vertices=new Float32Array(4*t),this.uv=new Float32Array(4*t);for(var e=new Uint32Array(2*t),i=new Float32Array(2*t),n=0;n<2*t;n++)e[n]=16777215,i[n]=1;return this.colors=e,this.alphas=i,this.dirty=!0,this},updateVertices:function(){var t=this._perp,e=this.points,i=this.vertices,n=e.length;if(this.dirty=!1,!(n<1)){for(var r=e[0],s=this.horizontal?this.frame.halfHeight:this.frame.halfWidth,o=0;o<n;o++){var a=e[o],h=4*o,l=o<n-1?e[o+1]:a,l=(t.x=l.y-r.y,t.y=-(l.x-r.x),t.length());t.x/=l,t.y/=l,t.x*=s,t.y*=s,i[h]=a.x+t.x,i[1+h]=a.y+t.y,i[2+h]=a.x-t.x,i[3+h]=a.y-t.y,r=a}return this}},setDebug:function(t,e){return this.debugGraphic=t,this.debugCallback=t||e?e||this.renderDebugVerts:null,this},renderDebugVerts:function(t,e,i){var n=t.debugGraphic,r=i[0],s=i[1],o=i[2],a=i[3];n.lineBetween(r,s,o,a);for(var h=4;h<e;h+=4){var l=i[h+0],c=i[h+1],u=i[h+2],d=i[h+3];n.lineBetween(r,s,l,c),n.lineBetween(o,a,u,d),n.lineBetween(o,a,l,c),n.lineBetween(l,c,u,d),r=l,s=c,o=u,a=d}},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()}}});t.exports=i},function(t,e,i){var n=i(142),s=i(31),r=i(0),o=i(11),a=i(22),h=i(15),b=i(458),l=i(6),c=i(202),u=i(1088),d=i(459),i=new r({Extends:h,Mixins:[o.Alpha,o.BlendMode,o.ComputedSize,o.Crop,o.Depth,o.Flip,o.GetBounds,o.Mask,o.Origin,o.Pipeline,o.ScrollFactor,o.Tint,o.Transform,o.Visible,u],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.initPipeline(),this.canvas=s.create(this),this.context=this.canvas.getContext("2d"),this.style=new d(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.dirty=!1,0===this.style.resolution&&(this.style.resolution=1),this._crop=this.resetCropObject(),this.texture=t.sys.textures.addCanvas(null,this.canvas,!0),this.frame=this.texture.get(),this.frame.source.resolution=this.style.resolution,this.renderer&&this.renderer.gl&&(this.renderer.deleteTexture(this.frame.source.glTexture),this.frame.source.glTexture=null),this.initRTL(),this.setText(n),r&&r.padding&&this.setPadding(r.padding),r&&r.lineSpacing&&this.setLineSpacing(r.lineSpacing),t.sys.game.events.on(a.CONTEXT_RESTORED,function(){this.dirty=!0},this)},initRTL:function(){this.style.rtl&&(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,i=this.style;return i.wordWrapCallback?(e=i.wordWrapCallback.call(i.wordWrapCallbackScope,t,this),Array.isArray(e)?e.join("\n"):e):i.wordWrapWidth?i.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="",r=t.replace(/ +/gi," ").split(this.splitRegExp),s=r.length,o=0;o<s;o++){var a="",h=(h=r[o]).replace(/^ *|\s*$/gi,"");if(e.measureText(h).width<i)n+=h+"\n";else{for(var l=i,c=h.split(" "),u=0;u<c.length;u++){var d=c[u],p=d+" ",f=e.measureText(p).width;if(l<f){if(0===u){for(var g=p;g.length&&(g=g.slice(0,-1),!((f=e.measureText(g).width)<=l)););if(!g.length)throw new Error("This text's wordWrapWidth setting is less than a single character!");d=d.substr(g.length);c[u]=d,a+=g}d=c[u].length?u:u+1,d=c.slice(d).join(" ").replace(/[ \n]*$/gi,"");r[o+1]=d+" "+(r[o+1]||""),s=r.length;break}a+=p,l-=f}n+=a.replace(/[ \n]*$/gi,"")+"\n"}}return n.replace(/[\s|\n]*$/gi,"")},basicWordWrap:function(t,e,i){for(var n="",r=t.split(this.splitRegExp),s=r.length-1,o=e.measureText(" ").width,a=0;a<=s;a++){for(var h=i,l=r[a].split(" "),c=l.length-1,u=0;u<=c;u++){var d=l[u],p=e.measureText(d).width,f=p;u<c&&(f+=o),h<f&&0<u&&(n+="\n",h=i),n+=d,u<c?(n+=" ",h-=f):h-=p}a<s&&(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=""),(t=Array.isArray(t)?t.join("\n"):t)!==this._text&&(this._text=t.toString(),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,r,s){return this.style.setShadow(t,e,i,n,r,s)},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()},setPadding:function(t,e,i,n){var r,s;return"object"==typeof t?(i=null!==(s=l(r=t,"x",null))?t=s:(t=l(r,"left",0),l(r,"right",t)),n=null!==(s=l(r,"y",null))?e=s:(e=l(r,"top",0),l(r,"bottom",e))):(void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=t),void 0===n&&(n=e)),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)},updateText:function(){var t,e=this.canvas,i=this.context,n=this.style,r=n.resolution,s=n.metrics,o=(n.syncFont(e,i),this._text),a=(o=n.wordWrapWidth||n.wordWrapCallback?this.runWordWrap(this._text):o).split(this.splitRegExp),h=b(this,s,a),o=this.padding;0===n.fixedWidth?(this.width=h.width+o.left+o.right,t=h.width):(this.width=n.fixedWidth,(t=this.width-o.left-o.right)<h.width&&(t=h.width)),0===n.fixedHeight?this.height=h.height+o.top+o.bottom:this.height=n.fixedHeight;var l,c,u=this.width,d=this.height;this.updateDisplayOrigin(),u*=r,d*=r,u=Math.max(u,1),d=Math.max(d,1),e.width!==u||e.height!==d?(e.width=u,e.height=d,this.frame.setSize(u,d),n.syncFont(e,i)):i.clearRect(0,0,u,d),i.save(),i.scale(r,r),n.backgroundColor&&(i.fillStyle=n.backgroundColor,i.fillRect(0,0,u,d)),n.syncStyle(e,i),i.textBaseline="alphabetic",i.translate(o.left,o.top);for(var p=0;p<h.lines;p++){if(l=n.strokeThickness/2,c=n.strokeThickness/2+p*h.lineHeight+s.ascent,0<p&&(c+=h.lineSpacing*p),n.rtl)l=u-l;else if("right"===n.align)l+=t-h.lineWidths[p];else if("center"===n.align)l+=(t-h.lineWidths[p])/2;else if("justify"===n.align&&.85<=h.lineWidths[p]/h.width){var f=h.width-h.lineWidths[p],g=i.measureText(" ").width,m=a[p].trim(),y=m.split(" ");f+=(a[p].length-m.length)*g;for(var v=Math.floor(f/g),x=0;0<v;)y[x]+=" ",x=(x+1)%(y.length-1||1),--v;a[p]=y.join(" ")}this.autoRound&&(l=Math.round(l),c=Math.round(c)),n.strokeThickness&&(this.style.syncShadow(i,n.shadowStroke),i.strokeText(a[p],l,c)),n.color&&(this.style.syncShadow(i,n.shadowFill),i.fillText(a[p],l,c))}i.restore(),this.renderer&&this.renderer.gl&&(this.frame.source.glTexture=this.renderer.canvasToTexture(e,this.frame.source.glTexture,!0),this.frame.glTexture=this.frame.source.glTexture),this.dirty=!0;r=this.input;return r&&!r.customHitArea&&(r.hitArea.width=this.width,r.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=o.ToJSON(this),e={autoRound:this.autoRound,text:this._text,style:this.style.toJSON(),padding:{left:this.padding.left,right:this.padding.right,top:this.padding.top,bottom:this.padding.bottom}};return t.data=e,t},preDestroy:function(){this.style.rtl&&c(this.canvas),s.remove(this.canvas),this.texture.destroy()}});t.exports=i},function(t,e,i){var l=i(31),n=i(0),r=i(11),c=i(22),u=i(15),d=i(361),s=i(192),o=i(1091),p=i(3),i=new n({Extends:u,Mixins:[r.Alpha,r.BlendMode,r.ComputedSize,r.Crop,r.Depth,r.Flip,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Tint,r.Transform,r.Visible,o],initialize:function(t,e,i,n,r,s,o){var a=t.sys.renderer,s=(u.call(this,t,"TileSprite"),t.sys.textures.get(s)),h=s.get(o);r=n&&r?(n=Math.floor(n),Math.floor(r)):(n=h.width,h.height),this._tilePosition=new p,this._tileScale=new p(1,1),this.dirty=!1,this.renderer=a,this.canvas=l.create(this,n,r),this.context=this.canvas.getContext("2d"),this.displayTexture=s,this.displayFrame=h,this._crop=this.resetCropObject(),this.texture=t.sys.textures.addCanvas(null,this.canvas,!0),this.frame=this.texture.get(),this.potWidth=d(h.width),this.potHeight=d(h.height),this.fillCanvas=l.create2D(this,this.potWidth,this.potHeight),this.fillContext=this.fillCanvas.getContext("2d"),this.fillPattern=null,this.setPosition(e,i),this.setSize(n,r),this.setFrame(o),this.setOriginFromFrame(),this.initPipeline(),t.sys.game.events.on(c.CONTEXT_RESTORED,function(t){var e;t&&(e=t.gl,this.dirty=!0,this.fillPattern=null,this.fillPattern=t.createTexture2D(0,e.LINEAR,e.LINEAR,e.REPEAT,e.REPEAT,e.RGBA,this.fillCanvas,this.potWidth,this.potHeight))},this)},setTexture:function(t,e){return this.displayTexture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t){t=this.displayTexture.get(t);return this.potWidth=d(t.width),this.potHeight=d(t.height),this.canvas.width=0,t.cutWidth&&t.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this.displayFrame=t,this.dirty=!0,this.updateTileTexture(),this},setTilePosition:function(t,e){return void 0!==t&&(this.tilePositionX=t),void 0!==e&&(this.tilePositionY=e),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(){var t,e,i,n,r;this.dirty&&this.renderer&&((t=this.displayFrame).source.isRenderTexture||t.source.isGLTexture||(e=this.fillContext,i=this.fillCanvas,n=this.potWidth,r=this.potHeight,this.renderer&&this.renderer.gl||(n=t.cutWidth,r=t.cutHeight),e.clearRect(0,0,n,r),i.width=n,i.height=r,e.drawImage(t.source.image,t.cutX,t.cutY,t.cutWidth,t.cutHeight,0,0,n,r),this.renderer&&this.renderer.gl?this.fillPattern=this.renderer.canvasToTexture(i,this.fillPattern):this.fillPattern=e.createPattern(i,"repeat"),this.updateCanvas()),this.dirty=!1)},updateCanvas:function(){var t,e,i,n,r=this.canvas;r.width===this.width&&r.height===this.height||(r.width=this.width,r.height=this.height,this.frame.setSize(this.width,this.height),this.updateDisplayOrigin(),this.dirty=!0),!this.dirty||this.renderer&&this.renderer.gl||(r=this.context,this.scene.sys.game.config.antialias||s.disable(r),t=this._tileScale.x,e=this._tileScale.y,i=this._tilePosition.x,n=this._tilePosition.y,r.clearRect(0,0,this.width,this.height),r.save(),r.scale(t,e),r.translate(-i,-n),r.fillStyle=this.fillPattern,r.fillRect(i,n,this.width/t,this.height/e),r.restore()),this.dirty=!1},preDestroy:function(){this.renderer&&this.renderer.gl&&this.renderer.deleteTexture(this.fillPattern),l.remove(this.canvas),l.remove(this.fillCanvas),this.fillPattern=null,this.fillContext=null,this.fillCanvas=null,this.displayTexture=null,this.displayFrame=null,this.texture.destroy(),this.renderer=null},tilePositionX:{get:function(){return this._tilePosition.x},set:function(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}},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}}});t.exports=i},function(t,e,i){var n=i(0),r=i(18),s=i(11),o=i(75),a=i(22),h=i(51),l=i(15),c=i(70),u=i(222),d=i(1094),p=i(14),i=new n({Extends:l,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Mask,s.Origin,s.Pipeline,s.ScrollFactor,s.Size,s.TextureCrop,s.Tint,s.Transform,s.Visible,d],initialize:function(t,e,i,n){l.call(this,t,"Video"),this.video=null,this.videoTexture=null,this.videoTextureSource=null,this.snapshotTexture=null,this.flipY=!1,this._key=u(),this.touchLocked=!0,this.playWhenUnlocked=!1,this.retryLimit=20,this.retry=0,this.retryInterval=500,this._retryID=null,this._systemMuted=!1,this._codeMuted=!1,this._systemPaused=!1,this._codePaused=!1,this._callbacks={play:this.playHandler.bind(this),error:this.loadErrorHandler.bind(this),end:this.completeHandler.bind(this),time:this.timeUpdateHandler.bind(this),seeking:this.seekingHandler.bind(this),seeked:this.seekedHandler.bind(this)},this._crop=this.resetCropObject(),this.markers={},this._markerIn=-1,this._markerOut=p.MAX_SAFE_INTEGER,this._lastUpdate=0,this._cacheKey="",this._isSeeking=!1,this.removeVideoElementOnDestroy=!1,this.setPosition(e,i),this.initPipeline(),n&&this.changeSource(n,!1);e=t.sys.game.events,e.on(a.PAUSE,this.globalPause,this),e.on(a.RESUME,this.globalResume,this),i=t.sys.sound;i&&i.on(c.GLOBAL_MUTE,this.globalMute,this)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},play:function(t,e,i){var n,r;return this.touchLocked&&this.playWhenUnlocked||this.isPlaying()||(n=this.video)&&(void 0===t&&(t=n.loop),(r=this.scene.sys.sound)&&r.mute&&this.setMute(!0),isNaN(e)||(this._markerIn=e),!isNaN(i)&&e<i&&(this._markerOut=i),n.loop=t,r=this._callbacks,void 0!==(e=n.play())?e.then(this.playPromiseSuccessHandler.bind(this)).catch(this.playPromiseErrorHandler.bind(this)):(n.addEventListener("playing",r.play,!0),n.readyState<2&&(this.retry=this.retryLimit,this._retryID=window.setTimeout(this.checkVideoProgress.bind(this),this.retryInterval))),n.addEventListener("ended",r.end,!0),n.addEventListener("timeupdate",r.time,!0),n.addEventListener("seeking",r.seeking,!0),n.addEventListener("seeked",r.seeked,!0)),this},changeSource:function(t,e,i,n,r){void 0===e&&(e=!0),this.video&&this.stop();var s=this.scene.sys.cache.video.get(t);return s?(this.video=s,this._cacheKey=t,this._codePaused=s.paused,this._codeMuted=s.muted,this.videoTexture?(this.scene.sys.textures.remove(this._key),this.videoTexture=this.scene.sys.textures.create(this._key,s,s.videoWidth,s.videoHeight),this.videoTextureSource=this.videoTexture.source[0],this.videoTexture.add("__BASE",0,0,0,s.videoWidth,s.videoHeight),this.setTexture(this.videoTexture),this.setSizeToFrame(),this.updateDisplayOrigin(),this.emit(o.VIDEO_CREATED,this,s.videoWidth,s.videoHeight)):this.updateTexture(),s.currentTime=0,this._lastUpdate=0,e&&this.play(i,n,r)):this.video=null,this},addMarker:function(t,e,i){return!isNaN(e)&&0<=e&&!isNaN(i)&&(this.markers[t]=[e,i]),this},playMarker:function(t,e){t=this.markers[t];return t&&this.play(e,t[0],t[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)},snapshotArea:function(t,e,i,n,r,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.width),void 0===n&&(n=this.height),void 0===r&&(r=i),void 0===s&&(s=n);var o=this.video,a=this.snapshotTexture;return a?a.setSize(r,s):(a=this.scene.sys.textures.createCanvas(u(),r,s),this.snapshotTexture=a),o&&a.context.drawImage(o,t,e,i,n,0,0,r,s),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},loadURL:function(t,e,i){void 0===e&&(e="loadeddata"),void 0===i&&(i=!1),this.video&&this.stop(),this.videoTexture&&this.scene.sys.textures.remove(this._key);e=document.createElement("video");return e.controls=!1,i&&(e.muted=!0,e.defaultMuted=!0,e.setAttribute("autoplay","autoplay")),e.setAttribute("playsinline","playsinline"),e.setAttribute("preload","auto"),e.addEventListener("error",this._callbacks.error,!0),e.src=t,e.load(),this.video=e,this},loadMediaStream:function(t,e,i){void 0===e&&(e="loadeddata"),void 0===i&&(i=!1),this.video&&this.stop(),this.videoTexture&&this.scene.sys.textures.remove(this._key);var n=document.createElement("video");n.controls=!1,i&&(n.muted=!0,n.defaultMuted=!0,n.setAttribute("autoplay","autoplay")),n.setAttribute("playsinline","playsinline"),n.setAttribute("preload","auto"),n.addEventListener("error",this._callbacks.error,!0);try{n.srcObject=t}catch(e){n.src=window.URL.createObjectURL(t)}return n.load(),this.video=n,this},playPromiseSuccessHandler:function(){this._codePaused=!1,this.touchLocked=!1,this.emit(o.VIDEO_PLAY,this),-1<this._markerIn&&(this.video.currentTime=this._markerIn)},playPromiseErrorHandler:function(t){this.scene.sys.input.once(h.POINTER_DOWN,this.unlockHandler,this),this.touchLocked=!0,this.playWhenUnlocked=!0,this.emit(o.VIDEO_ERROR,this,t)},playHandler:function(){this._codePaused=!1,this.touchLocked=!1,this.emit(o.VIDEO_PLAY,this),this.video.removeEventListener("playing",this._callbacks.play,!0)},loadErrorHandler:function(t){this.stop(),this.emit(o.VIDEO_ERROR,this,t)},unlockHandler:function(){this.touchLocked=!1,this.playWhenUnlocked=!1,this.emit(o.VIDEO_UNLOCKED,this),-1<this._markerIn&&(this.video.currentTime=this._markerIn),this.video.play(),this.emit(o.VIDEO_PLAY,this)},completeHandler:function(){this.emit(o.VIDEO_COMPLETE,this)},timeUpdateHandler:function(){this.video&&this.video.currentTime<this._lastUpdate&&(this.emit(o.VIDEO_LOOP,this),this._lastUpdate=0)},preUpdate:function(){var t,e=this.video;e&&(t=e.currentTime)!==this._lastUpdate&&(this._lastUpdate=t,this.updateTexture(),t>=this._markerOut&&(e.loop?(e.currentTime=this._markerIn,this.updateTexture(),this._lastUpdate=t,this.emit(o.VIDEO_LOOP,this)):(this.emit(o.VIDEO_COMPLETE,this),this.stop())))},checkVideoProgress:function(){2<=this.video.readyState?this.updateTexture():(this.retry--,0<this.retry?this._retryID=window.setTimeout(this.checkVideoProgress.bind(this),this.retryInterval):this.emit(o.VIDEO_TIMEOUT,this))},updateTexture:function(){var t,e=this.video,i=e.videoWidth,n=e.videoHeight;this.videoTexture?((t=this.videoTextureSource).source!==e&&(t.source=e,t.width=i,t.height=n),t.update()):(this.videoTexture=this.scene.sys.textures.create(this._key,e,i,n),this.videoTextureSource=this.videoTexture.source[0],this.videoTexture.add("__BASE",0,0,0,i,n),this.setTexture(this.videoTexture),this.setSizeToFrame(),this.updateDisplayOrigin(),this.emit(o.VIDEO_CREATED,this,i,n))},getVideoKey:function(){return this._cacheKey},seekTo:function(t){var e=this.video;return!e||(e=e.duration)===1/0||isNaN(e)||this.setCurrentTime(e*t),this},getCurrentTime:function(){return this.video?this.video.currentTime:0},setCurrentTime:function(t){var e,i,n=this.video;return n&&("string"==typeof t&&(e=t[0],i=parseFloat(t.substr(1)),"+"===e?t=n.currentTime+i:"-"===e&&(t=n.currentTime-i)),n.currentTime=t,this._lastUpdate=t),this},isSeeking:function(){return this._isSeeking},seekingHandler:function(){this._isSeeking=!0,this.emit(o.VIDEO_SEEKING,this)},seekedHandler:function(){this._isSeeking=!1,this.emit(o.VIDEO_SEEKED,this),this.video&&this.updateTexture()},getProgress:function(){var t=this.video;if(t){var e=t.currentTime,t=t.duration;if(t!==1/0&&!isNaN(t))return e/t}return 0},getDuration:function(){return this.video?this.video.duration:0},setMute:function(t){this._codeMuted=t=void 0===t?!0: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;i&&(i.muted=!!this._codeMuted||e)},globalPause:function(){this._systemPaused=!0,this.video&&this.video.pause()},globalResume:function(){this._systemPaused=!1,this.video&&!this._codePaused&&this.video.play()},setPaused:function(t){var e=this.video;return this._codePaused=t=void 0===t?!0:t,e&&(t?e.paused||e.pause():e.paused&&!this._systemPaused&&e.play()),this},getVolume:function(){return this.video?this.video.volume:1},setVolume:function(t){return void 0===t&&(t=1),this.video&&(this.video.volume=r(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.video.paused||this._codePaused||this._systemPaused},saveTexture:function(t,e){return void 0===e&&(e=!1),this.videoTexture&&this.scene.sys.textures.renameTexture(this._key,t),this._key=t,this.flipY=e,this.videoTextureSource&&this.videoTextureSource.setFlipY(e),this.videoTexture},stop:function(){var t=this.video;if(t){var e,i=this._callbacks;for(e in i)t.removeEventListener(e,i[e],!0);t.pause()}return this._retryID&&window.clearTimeout(this._retryID),this.emit(o.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(),this.removeVideoElementOnDestroy&&this.removeVideoElement();var t=this.scene.sys.game.events,t=(t.off(a.PAUSE,this.globalPause,this),t.off(a.RESUME,this.globalResume,this),this.scene.sys.sound);t&&t.off(c.GLOBAL_MUTE,this.globalMute,this),this._retryID&&window.clearTimeout(this._retryID)}});t.exports=i},function(t,e,i){var n=i(0),r=i(228),s=i(470),o=i(56),i=new n({initialize:function(t){this.type=o.POLYGON,this.area=0,this.points=[],t&&this.setTo(t)},contains:function(t,e){return r(this,t,e)},setTo:function(t){if(this.area=0,this.points=[],"string"==typeof t&&(t=t.split(" ")),Array.isArray(t)){for(var e,i=Number.MAX_VALUE,n=0;n<t.length;n++)e={x:0,y:0},"number"==typeof t[n]||"string"==typeof t[n]?(e.x=parseFloat(t[n]),e.y=parseFloat(t[n+1]),n++):Array.isArray(t[n])?(e.x=t[n][0],e.y=t[n][1]):(e.x=t[n].x,e.y=t[n].y),this.points.push(e),e.y<i&&(i=e.y);this.calculateArea(i)}return this},calculateArea:function(){if(this.points.length<3)this.area=0;else{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);t=this.points[0],e=this.points[this.points.length-1],i+=(t.x-e.x)*(e.y+t.y),this.area=.5*-i}return this.area},getPoints:function(t,e,i){return s(this,t,e,i)}});t.exports=i},function(t,e){t.exports=function(t,e,i){for(var n=!1,r=-1,s=t.points.length-1;++r<t.points.length;s=r){var o=t.points[r].x,a=t.points[r].y,h=t.points[s].x,l=t.points[s].y;(a<=i&&i<l||l<=i&&i<a)&&e<(h-o)*(i-a)/(l-a)+o&&(n=!n)}return n}},function(t,e,i){var n=i(0),r=i(11),h=i(15),c=i(2),s=i(17),o=i(478),a=i(1176),l=i(25),i=new n({Extends:h,Mixins:[r.ComputedSize,r.Depth,r.GetBounds,r.Mask,r.Origin,r.ScrollFactor,r.Transform,r.Visible,a],initialize:function(t,e,i,n,r,s,o,a){void 0===i&&(i=0),void 0===n&&(n=0),void 0===r&&(r=128),void 0===s&&(s=128),h.call(this,t,"Shader"),this.blendMode=-1,this.shader;t=t.sys.renderer;this.renderer=t,this.gl=t.gl,this.vertexData=new ArrayBuffer(2*Float32Array.BYTES_PER_ELEMENT*6),this.vertexBuffer=t.createVertexBuffer(this.vertexData.byteLength,this.gl.STREAM_DRAW),this.program=null,this.bytes=new Uint8Array(this.vertexData),this.vertexViewF32=new Float32Array(this.vertexData),this._tempMatrix1=new l,this._tempMatrix2=new l,this._tempMatrix3=new l,this.viewMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.projectionMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.uniforms={},this.pointer=null,this._rendererWidth=t.width,this._rendererHeight=t.height,this._textureCount=0,this.framebuffer=null,this.glTexture=null,this.renderToTexture=!1,this.texture=null,this.setPosition(i,n),this.setSize(r,s),this.setOrigin(.5,.5),this.setShader(e,o,a)},willRender:function(t){return!!this.renderToTexture||!(h.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},setRenderToTexture:function(t,e){var i,n,r;return void 0===e&&(e=!1),this.renderToTexture||(i=this.width,n=this.height,r=this.renderer,this.glTexture=r.createTextureFromSource(null,i,n,0),this.glTexture.flipY=e,this.framebuffer=r.createFramebuffer(i,n,this.glTexture,!1),this._rendererWidth=i,this._rendererHeight=n,this.renderToTexture=!0,this.projOrtho(0,this.width,this.height,0),t&&(this.texture=this.scene.sys.textures.addGLTexture(t,this.glTexture,i,n))),this.shader&&(r.pipelines.clear(),this.load(),this.flush(),r.pipelines.rebind()),this},setShader:function(t,e,i){if(void 0===e&&(e=[]),"string"==typeof t){var n=this.scene.sys.cache.shader;if(!n.has(t))return this;this.shader=n.get(t)}else this.shader=t;n=this.gl,t=this.renderer,this.program&&n.deleteProgram(this.program),t=t.createProgram(this.shader.vertexSrc,this.shader.fragmentSrc),n.uniformMatrix4fv(n.getUniformLocation(t,"uViewMatrix"),!1,this.viewMatrix),n.uniformMatrix4fv(n.getUniformLocation(t,"uProjectionMatrix"),!1,this.projectionMatrix),n.uniform2f(n.getUniformLocation(t,"uResolution"),this.width,this.height),this.program=t,n=new Date,t={resolution:{type:"2f",value:{x:this.width,y:this.height}},time:{type:"1f",value:0},mouse:{type:"2f",value:{x:this.width/2,y:this.height/2}},date:{type:"4fv",value:[n.getFullYear(),n.getMonth(),n.getDate(),60*n.getHours()*60+60*n.getMinutes()+n.getSeconds()]},sampleRate:{type:"1f",value:44100},iChannel0:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel1:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel2:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel3:{type:"sampler2D",value:null,textureData:{repeat:!0}}};this.shader.uniforms?this.uniforms=s(!0,{},this.shader.uniforms,t):this.uniforms=t;for(var r=0;r<4;r++)e[r]&&this.setSampler2D("iChannel"+r,e[r],r,i);return this.initUniforms(),this.projOrtho(0,this._rendererWidth,this._rendererHeight,0),this},setPointer:function(t){return this.pointer=t,this},projOrtho:function(t,e,i,n){var r=1/(t-e),s=1/(i-n),o=this.projectionMatrix,t=(o[0]=-2*r,o[5]=-2*s,o[10]=-.001,o[12]=(t+e)*r,o[13]=(n+i)*s,o[14]=-0,this.program),r=this.gl;this.renderer.setProgram(t),r.uniformMatrix4fv(r.getUniformLocation(t,"uProjectionMatrix"),!1,this.projectionMatrix),this._rendererWidth=e,this._rendererHeight=i},initUniforms:function(){var t,e=this.gl,i=this.renderer.glFuncMap,n=this.program;for(t in this._textureCount=0,this.uniforms){var r=this.uniforms[t],s=r.type,o=i[s];r.uniformLocation=e.getUniformLocation(n,t),"sampler2D"!==s&&(r.glMatrix=o.matrix,r.glValueLength=o.length,r.glFunc=o.func)}},setSampler2DBuffer:function(t,e,i,n,r,s){void 0===r&&(r=0),void 0===s&&(s={});t=this.uniforms[t];return t.value=e,s.width=i,s.height=n,t.textureData=s,this._textureCount=r,this.initSampler2D(t),this},setSampler2D:function(t,e,i,n){void 0===i&&(i=0);var r=this.scene.sys.textures;if(r.exists(e)){r=r.getFrame(e);if(r.glTexture&&r.glTexture.isRenderTexture)return this.setSampler2DBuffer(t,r.glTexture,r.width,r.height,i,n);var t=this.uniforms[t],s=r.source;t.textureKey=e,t.source=s.image,t.value=r.glTexture,s.isGLTexture&&((n=n||{}).width=s.width,n.height=s.height),n&&(t.textureData=n),this._textureCount=i,this.initSampler2D(t)}return this},setUniform:function(t,e){return o(this.uniforms,t,e),this},getUniform:function(t){return c(this.uniforms,t,null)},setChannel0:function(t,e){return this.setSampler2D("iChannel0",t,0,e)},setChannel1:function(t,e){return this.setSampler2D("iChannel1",t,1,e)},setChannel2:function(t,e){return this.setSampler2D("iChannel2",t,2,e)},setChannel3:function(t,e){return this.setSampler2D("iChannel3",t,3,e)},initSampler2D:function(t){var e,i,n,r,s,o,a,h,l;t.value&&((e=this.gl).activeTexture(e.TEXTURE0+this._textureCount),e.bindTexture(e.TEXTURE_2D,t.value),(l=t.textureData)&&!t.value.isRenderTexture&&(i=e[c(l,"magFilter","linear").toUpperCase()],n=e[c(l,"minFilter","linear").toUpperCase()],r=e[c(l,"wrapS","repeat").toUpperCase()],s=e[c(l,"wrapT","repeat").toUpperCase()],o=e[c(l,"format","rgba").toUpperCase()],l.repeat&&(r=e.REPEAT,s=e.REPEAT),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,!!l.flipY),l.width?(a=c(l,"width",512),h=c(l,"height",2),l=c(l,"border",0),e.texImage2D(e.TEXTURE_2D,0,o,a,h,l,o,e.UNSIGNED_BYTE,null)):e.texImage2D(e.TEXTURE_2D,0,o,e.RGBA,e.UNSIGNED_BYTE,t.source),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,i),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,n),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,r),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,s)),this.renderer.setProgram(this.program),e.uniform1i(t.uniformLocation,this._textureCount),this._textureCount++)},syncUniforms:function(){var t,e,i,n,r,s,o=this.gl,a=this.uniforms,h=0;for(s in a)i=(t=a[s]).glFunc,e=t.glValueLength,n=t.uniformLocation,null!==(r=t.value)&&(1===e?t.glMatrix?i.call(o,n,t.transpose,r):i.call(o,n,r):2===e?i.call(o,n,r.x,r.y):3===e?i.call(o,n,r.x,r.y,r.z):4===e?i.call(o,n,r.x,r.y,r.z,r.w):"sampler2D"===t.type&&(o.activeTexture(o.TEXTURE0+h),o.bindTexture(o.TEXTURE_2D,r),o.uniform1i(n,h),h++))},load:function(t){var e=this.gl,i=this.width,n=this.height,r=this.renderer,s=this.program,o=this.viewMatrix,t=(this.renderToTexture||(a=-this._displayOriginX,h=-this._displayOriginY,o[0]=t[0],o[1]=t[1],o[4]=t[2],o[5]=t[3],o[8]=t[4],o[9]=t[5],o[12]=o[0]*a+o[4]*h,o[13]=o[1]*a+o[5]*h),e.useProgram(s),e.uniformMatrix4fv(e.getUniformLocation(s,"uViewMatrix"),!1,o),e.uniform2f(e.getUniformLocation(s,"uResolution"),this.width,this.height),this.uniforms),a=t.resolution;a.value.x=i,a.value.y=n,t.time.value=r.game.loop.getDuration();var h=this.pointer;h&&(o=t.mouse,e=h.x/i,s=1-h.y/n,o.value.x=e.toFixed(2),o.value.y=s.toFixed(2)),this.syncUniforms()},flush:function(){var t=this.width,e=this.height,i=this.program,n=this.gl,r=this.vertexBuffer,s=this.renderer,o=2*Float32Array.BYTES_PER_ELEMENT,r=(this.renderToTexture&&(s.setFramebuffer(this.framebuffer),n.clearColor(0,0,0,0),n.clear(n.COLOR_BUFFER_BIT)),n.bindBuffer(n.ARRAY_BUFFER,r),n.getAttribLocation(i,"inPosition")),i=(-1!==r&&(n.enableVertexAttribArray(r),n.vertexAttribPointer(r,2,n.FLOAT,!1,o,0)),this.vertexViewF32);i[3]=e,i[4]=t,i[5]=e,i[8]=t,i[9]=e,i[10]=t,n.bufferSubData(n.ARRAY_BUFFER,0,this.bytes.subarray(0,6*o)),n.drawArrays(n.TRIANGLES,0,6),this.renderToTexture&&s.setFramebuffer(null,!1)},setAlpha:function(){},setBlendMode:function(){},preDestroy:function(){var t=this.gl;t.deleteProgram(this.program),t.deleteBuffer(this.vertexBuffer),this.renderToTexture&&(this.renderer.deleteFramebuffer(this.framebuffer),this.texture.destroy(),this.framebuffer=null,this.glTexture=null,this.texture=null)}});t.exports=i},function(t,e,i){var n=i(0),r=i(11),s=i(36),o=i(116),d=i(15),a=i(479),l=i(480),h=i(19),p=i(69),c=i(1179),u=i(79),f=i(39),g=i(117),i=new n({Extends:d,Mixins:[r.AlphaSingle,r.BlendMode,r.Depth,r.Mask,r.Pipeline,r.Size,r.Texture,r.Transform,r.Visible,r.ScrollFactor,c],initialize:function(t,e,i,n,r,s,o,a,h,l,c,u){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n="__WHITE"),d.call(this,t,"Mesh"),this.faces=[],this.vertices=[],this.tintFill=!1,this.debugCallback=null,this.debugGraphic=null,this.hideCCW=!0,this.modelPosition=new f,this.modelScale=new f(1,1,1),this.modelRotation=new f,this.dirtyCache=[0,0,0,0,0,0,0,0,0,0,0,0],this.transformMatrix=new p,this.viewPosition=new f,this.viewMatrix=new p,this.projectionMatrix=new p,this.totalRendered=0,this.totalFrame=0,this.ignoreDirtyCache=!1;t=t.sys.renderer;this.setPosition(e,i),this.setTexture(n,r),this.setSize(t.width,t.height),this.initPipeline(),this.setPerspective(t.width,t.height),s&&this.addVertices(s,o,a,h,l,c,u)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},panX:function(t){return this.viewPosition.addScale(f.LEFT,t),this.dirtyCache[10]=1,this},panY:function(t){return this.viewPosition.y+=f.DOWN.y*t,this.dirtyCache[10]=1,this},panZ:function(t){return this.viewPosition.z+=t,this.dirtyCache[10]=1,this},setPerspective:function(t,e,i,n,r){return void 0===n&&(n=.01),void 0===r&&(r=1e3),this.projectionMatrix.perspective(s(i=void 0===i?45:i),t/e,n,r),this.dirtyCache[10]=1,this.dirtyCache[11]=0,this},setOrtho:function(t,e,i,n){return void 0===t&&(t=this.scene.sys.renderer.getAspectRatio()),this.projectionMatrix.ortho(-t,t,-(e=void 0===e?1:e),e,i=void 0===i?-1e3:i,n=void 0===n?1e3:n),this.dirtyCache[10]=1,this.dirtyCache[11]=1,this},clear:function(){return this.faces.forEach(function(t){t.destroy()}),this.faces=[],this.vertices=[],this},addVerticesFromObj:function(t,e,i,n,r,s,o,a,h){t=this.scene.sys.cache.obj.get(t);return t&&l(t,this,e,i,n,r,s,o,a,h),this},sortByDepth:function(t,e){return t.depth-e.depth},depthSort:function(){return u(this.faces,this.sortByDepth),this},addVertex:function(t,e,i,n,r,s,o){t=new g(t,e,i,n,r,s,o);return this.vertices.push(t),t},addFace:function(t,e,i){t=new o(t,e,i);return this.faces.push(t),this.dirtyCache[9]=-1,t},addVertices:function(t,e,i,n,r,s,o){t=a(t,e,i,n,r,s,o);return t&&(this.faces=this.faces.concat(t.faces),this.vertices=this.vertices.concat(t.vertices)),this.dirtyCache[9]=-1,this},getFaceCount:function(){return this.faces.length},getVertexCount:function(){return this.vertices.length},getFace:function(t){return this.faces[t]},getFaceAt:function(t,e,i){void 0===i&&(i=this.scene.sys.cameras.main);for(var n=h(this,i).calc,r=this.faces,s=[],o=0;o<r.length;o++){var a=r[o];a.contains(t,e,n)&&s.push(a)}return u(s,this.sortByDepth)},setDebug:function(t,e){return this.debugGraphic=t,this.debugCallback=t||e?e||this.renderDebug:null,this},isDirty:function(){var t=this.modelPosition,e=this.modelRotation,i=this.modelScale,n=this.dirtyCache,r=t.x,s=t.y,t=t.z,o=e.x,a=e.y,e=e.z,h=i.x,l=i.y,i=i.z,c=this.getFaceCount(),u=n[0],d=n[1],p=n[2],f=n[3],g=n[4],m=n[5],y=n[6],v=n[7],x=n[8],b=n[9];return n[0]=r,n[1]=s,n[2]=t,n[3]=o,n[4]=a,n[5]=e,n[6]=h,n[7]=l,n[8]=i,n[9]=c,u!==r||d!==s||p!==t||f!==o||g!==a||m!==e||y!==h||v!==l||x!==i||b!==c},preUpdate:function(){this.totalRendered=this.totalFrame,this.totalFrame=0;var t=this.dirtyCache;if(this.ignoreDirtyCache||t[10]||this.isDirty()){var e=this.width,i=this.height,n=this.viewMatrix,r=this.viewPosition,s=(t[10]&&(n.identity(),n.translate(r),n.invert(),t[10]=0),this.transformMatrix);s.setWorldMatrix(this.modelRotation,this.modelPosition,this.modelScale,this.viewMatrix,this.projectionMatrix);for(var o=r.z,a=this.faces,h=0;h<a.length;h++)a[h].transformCoordinatesLocal(s,e,i,o);this.depthSort()}},renderDebug:function(t,e){for(var i=t.debugGraphic,n=0;n<e.length;n++){var r=e[n],s=r.vertex1.tx,o=r.vertex1.ty,a=r.vertex2.tx,h=r.vertex2.ty,l=r.vertex3.tx,r=r.vertex3.ty;i.strokeTriangle(s,o,a,h,l,r)}},preDestroy:function(){this.clear(),this.debugCallback=null,this.debugGraphic=null}});t.exports=i},function(t,e,i){var n=i(50);t.exports=function(t,e){return n(t.x,t.y,e.x,e.y)<=t.radius+e.radius}},function(t,e,i){var d=i(4),p=i(233);t.exports=function(t,e,i){var n,r,s,o,a,h,l,c,u;return void 0===i&&(i=[]),p(t,e)&&(n=t.x1,r=t.y1,s=t.x2,t=t.y2,0==(h=(a=2*((s=s-n)*(u=n-e.x)+(t=t-r)*(h=r-e.y)))*a-4*(o=s*s+t*t)*(u*u+h*h-(u=e.radius)*u))?(l=n+(e=-a/(2*o))*s,c=r+e*t,0<=e&&e<=1&&i.push(new d(l,c))):0<h&&(l=n+(u=(-a-Math.sqrt(h))/(2*o))*s,c=r+u*t,0<=u&&u<=1&&i.push(new d(l,c)),l=n+(e=(-a+Math.sqrt(h))/(2*o))*s,c=r+e*t,0<=e&&e<=1&&i.push(new d(l,c)))),i}},function(t,e,i){var c=i(66),u=new(i(4));t.exports=function(t,e,i){var n,r,s,o,a,h,l;return void 0===i&&(i=u),c(e,t.x1,t.y1)?(i.x=t.x1,i.y=t.y1,!0):c(e,t.x2,t.y2)?(i.x=t.x2,i.y=t.y2,!0):(n=t.x2-t.x1,r=t.y2-t.y1,s=e.x-t.x1,o=e.y-t.y1,0<(a=(h=n)*n+(l=r)*r)&&(h*=s=(s*n+o*r)/a,l*=s),i.x=t.x1+h,i.y=t.y1+l,h*h+l*l<=a&&0<=h*n+l*r&&c(e,i.x,i.y))}},function(t,e,i){var l=i(4),c=i(96),u=i(488);t.exports=function(t,e,i){if(void 0===i&&(i=[]),u(t,e))for(var n=e.getLineA(),r=e.getLineB(),s=e.getLineC(),e=e.getLineD(),o=[new l,new l,new l,new l],a=[c(n,t,o[0]),c(r,t,o[1]),c(s,t,o[2]),c(e,t,o[3])],h=0;h<4;h++)a[h]&&i.push(o[h]);return i}},function(t,e){t.exports=function(t,e,i,n){void 0===i&&(i=!1),void 0===n&&(n=[]);for(var r,s,o,a=t.x3-t.x1,h=t.y3-t.y1,l=t.x2-t.x1,c=t.y2-t.y1,u=a*a+h*h,d=a*l+h*c,p=l*l+c*c,f=u*p-d*d,g=0==f?0:1/f,m=t.x1,y=t.y1,v=0;v<e.length&&(r=(u*(o=l*(s=e[v].x-m)+c*(r=e[v].y-y))-d*(s=a*s+h*r))*g,!(0<=(s=(p*s-d*o)*g)&&0<=r&&s+r<1&&(n.push({x:e[v].x,y:e[v].y}),i)));v++);return n}},function(t,e){t.exports=function(t,e,i,n){var r=Math.cos(n),n=Math.sin(n),s=t.x1-e,o=t.y1-i;return t.x1=s*r-o*n+e,t.y1=s*n+o*r+i,s=t.x2-e,o=t.y2-i,t.x2=s*r-o*n+e,t.y2=s*n+o*r+i,t}},function(t,e){t.exports=function(t){return 0===t.height?NaN:t.width/t.height}},function(t,e){t.exports=function(t,e,i,n){var r=Math.cos(n),n=Math.sin(n),s=t.x1-e,o=t.y1-i;return t.x1=s*r-o*n+e,t.y1=s*n+o*r+i,s=t.x2-e,o=t.y2-i,t.x2=s*r-o*n+e,t.y2=s*n+o*r+i,s=t.x3-e,o=t.y3-i,t.x3=s*r-o*n+e,t.y3=s*n+o*r+i,t}},function(t,e,i){t.exports={BUTTON_DOWN:i(1310),BUTTON_UP:i(1311),CONNECTED:i(1312),DISCONNECTED:i(1313),GAMEPAD_BUTTON_DOWN:i(1314),GAMEPAD_BUTTON_UP:i(1315)}},function(t,e,i){var r=i(17),s=i(156);t.exports=function(t,e){var i=void 0===t?s():r({},t);if(e)for(var n in e)void 0!==e[n]&&(i[n]=e[n]);return i}},function(t,e,i){var n=i(0),r=i(21),o=i(23),s=i(8),a=i(2),h=i(7),l=i(408),c=new n({Extends:o,initialize:function(t,e,i,n){var r="xml",s=(h(e)&&(e=a(s=e,"key"),i=a(s,"url"),n=a(s,"xhrSettings"),r=a(s,"extension",r)),{type:"xml",cache:t.cacheManager.xml,extension:r,responseType:"text",key:e,url:i,xhrSettings:n});o.call(this,t,s)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=l(this.xhrLoader.responseText),this.data?this.onProcessComplete():this.onProcessError()}});s.register("xml",function(t,e,i){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new c(this,t[n]));else this.addFile(new c(this,t,e,i));return this}),t.exports=c},function(t,e,i){var n=i(0),r=i(21),h=i(23),s=i(8),l=i(2),c=i(7),o=new n({Extends:h,initialize:function(t,e,i,n){var r="text",s="txt",o=t.cacheManager.text,a=(c(e)&&(e=l(a=e,"key"),i=l(a,"url"),n=l(a,"xhrSettings"),s=l(a,"extension",s),r=l(a,"type",r),o=l(a,"cache",o)),{type:r,cache:o,extension:s,responseType:"text",key:e,url:i,xhrSettings:n});h.call(this,t,a)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});s.register("text",function(t,e,i){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new o(this,t[n]));else this.addFile(new o(this,t,e,i));return this}),t.exports=o},function(t,e,i){t.exports={Acceleration:i(1368),Angular:i(1369),Bounce:i(1370),Debug:i(1371),Drag:i(1372),Enable:i(1373),Friction:i(1374),Gravity:i(1375),Immovable:i(1376),Mass:i(1377),OverlapCirc:i(523),OverlapRect:i(244),Pushable:i(1378),Size:i(1379),Velocity:i(1380)}},function(t,e){t.exports=function(t,e,i,n,r,s,o){void 0===s&&(s=!0),void 0===o&&(o=!1);var a,h,l=[],c=[],u=t.treeMinMax;return u.minX=e,u.minY=i,u.maxX=e+n,u.maxY=i+r,o&&(c=t.staticTree.search(u)),s&&t.useTree?l=t.tree.search(u):s&&(o=t.bodies,a={position:{x:e,y:i},left:e,top:i,right:e+n,bottom:i+r,isCircle:!1},h=t.intersects,o.iterate(function(t){h(t,a)&&l.push(t)})),c.concat(l)}},function(t,e,i){t.exports={COLLIDE:i(1381),OVERLAP:i(1382),PAUSE:i(1383),RESUME:i(1384),TILE_COLLIDE:i(1385),TILE_OVERLAP:i(1386),WORLD_BOUNDS:i(1387),WORLD_STEP:i(1388)}},function(t,e,i){var s=i(62);t.exports=function(t,e,i,n){var r=0,n=t.deltaAbsX()+e.deltaAbsX()+n;return 0===t._dx&&0===e._dx?(t.embedded=!0,e.embedded=!0):t._dx>e._dx?n<(r=t.right-e.x)&&!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!==s.STATIC_BODY||i||(t.blocked.none=!1,t.blocked.right=!0),t.physicsType!==s.STATIC_BODY||i||(e.blocked.none=!1,e.blocked.left=!0)):t._dx<e._dx&&(n<-(r=t.x-e.width-e.x)&&!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!==s.STATIC_BODY||i||(t.blocked.none=!1,t.blocked.left=!0),t.physicsType!==s.STATIC_BODY||i||(e.blocked.none=!1,e.blocked.right=!0))),t.overlapX=r,e.overlapX=r}},function(t,e,i){var s=i(62);t.exports=function(t,e,i,n){var r=0,n=t.deltaAbsY()+e.deltaAbsY()+n;return 0===t._dy&&0===e._dy?(t.embedded=!0,e.embedded=!0):t._dy>e._dy?n<(r=t.bottom-e.y)&&!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!==s.STATIC_BODY||i||(t.blocked.none=!1,t.blocked.down=!0),t.physicsType!==s.STATIC_BODY||i||(e.blocked.none=!1,e.blocked.up=!0)):t._dy<e._dy&&(n<-(r=t.y-e.bottom)&&!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!==s.STATIC_BODY||i||(t.blocked.none=!1,t.blocked.up=!0),t.physicsType!==s.STATIC_BODY||i||(e.blocked.none=!1,e.blocked.down=!0))),t.overlapY=r,e.overlapY=r}},function(t,e){t.exports=function(t,e){return!(e.right<=t.left||e.bottom<=t.top||e.position.x>=t.right||e.position.y>=t.bottom)}},function(t,e,i){t.exports={Bounce:i(1495),Collision:i(1496),Force:i(1497),Friction:i(1498),Gravity:i(1499),Mass:i(1500),Sensor:i(1501),SetBody:i(1502),Sleep:i(1503),Static:i(1520),Transform:i(1521),Velocity:i(1522)}},function(t,e){var h={};(t.exports=h).create=function(t,e){var i=t.bodyA,n=t.bodyB,i={id:h.id(i,n),bodyA:i,bodyB:n,activeContacts:[],separation:0,isActive:!0,confirmedActive:!0,isSensor:i.isSensor||n.isSensor,timeCreated:e,timeUpdated:e,collision:null,inverseMass:0,friction:0,frictionStatic:0,restitution:0,slop:0};return h.update(i,t,e),i},h.update=function(t,e,i){if((t.collision=e).collided){var n=e.supports,r=t.activeContacts,s=e.parentA,o=e.parentB;t.inverseMass=s.inverseMass+o.inverseMass,t.friction=Math.min(s.friction,o.friction),t.frictionStatic=Math.max(s.frictionStatic,o.frictionStatic),t.restitution=Math.max(s.restitution,o.restitution),t.slop=Math.max(s.slop,o.slop);for(var a=0;a<n.length;a++)r[a]=n[a].contact;s=n.length;s<r.length&&(r.length=s),t.separation=e.depth,h.setActive(t,!0,i)}else!0===t.isActive&&h.setActive(t,!1,i)},h.setActive=function(t,e,i){e?(t.isActive=!0,t.timeUpdated=i):(t.isActive=!1,t.activeContacts.length=0)},h.id=function(t,e){return t.id<e.id?"A"+t.id+"B"+e.id:"A"+e.id+"B"+t.id}},function(t,e,i){t.exports={CalculateFacesAt:i(252),CalculateFacesWithin:i(63),CheckIsoBounds:i(541),Copy:i(1420),CreateFromTiles:i(1421),CullBounds:i(543),CullTiles:i(544),Fill:i(1422),FilterTiles:i(1423),FindByIndex:i(1424),FindTile:i(1425),ForEachTile:i(1426),GetCullTilesFunction:i(1427),GetTileAt:i(158),GetTileAtWorldXY:i(1428),GetTilesWithin:i(26),GetTilesWithinShape:i(1429),GetTilesWithinWorldXY:i(529),GetTileToWorldXFunction:i(1430),GetTileToWorldXYFunction:i(1431),GetTileToWorldYFunction:i(1432),GetWorldToTileXFunction:i(1433),GetWorldToTileXYFunction:i(1434),GetWorldToTileYFunction:i(1435),HasTileAt:i(562),HasTileAtWorldXY:i(1436),HexagonalCullBounds:i(546),HexagonalCullTiles:i(545),HexagonalTileToWorldXY:i(550),HexagonalTileToWorldY:i(554),HexagonalWorldToTileXY:i(556),HexagonalWorldToTileY:i(560),IsInLayerBounds:i(119),IsometricCullTiles:i(547),IsometricTileToWorldXY:i(551),IsometricWorldToTileXY:i(557),PutTileAt:i(257),PutTileAtWorldXY:i(1437),PutTilesAt:i(1438),Randomize:i(1439),RemoveTileAt:i(563),RemoveTileAtWorldXY:i(1440),RenderDebug:i(1441),ReplaceByIndex:i(542),RunCull:i(159),SetCollision:i(1442),SetCollisionBetween:i(1443),SetCollisionByExclusion:i(1444),SetCollisionByProperty:i(1445),SetCollisionFromCollisionGroup:i(1446),SetLayerCollisionIndex:i(160),SetTileCollision:i(72),SetTileIndexCallback:i(1447),SetTileLocationCallback:i(1448),Shuffle:i(1449),StaggeredCullBounds:i(549),StaggeredCullTiles:i(548),StaggeredTileToWorldXY:i(552),StaggeredTileToWorldY:i(555),StaggeredWorldToTileXY:i(558),StaggeredWorldToTileY:i(561),SwapByIndex:i(1450),TileToWorldX:i(253),TileToWorldXY:i(553),TileToWorldY:i(254),WeightedRandomize:i(1451),WorldToTileX:i(255),WorldToTileXY:i(559),WorldToTileY:i(256)}},function(t,e,i){var a=i(158);t.exports=function(t,e,i){var n=a(t,e,!0,i),r=a(t,e-1,!0,i),s=a(t,e+1,!0,i),o=a(t-1,e,!0,i),t=a(t+1,e,!0,i),e=n&&n.collides;return e&&(n.faceTop=!0,n.faceBottom=!0,n.faceLeft=!0,n.faceRight=!0),r&&r.collides&&(e&&(n.faceTop=!1),r.faceBottom=!e),s&&s.collides&&(e&&(n.faceBottom=!1),s.faceTop=!e),o&&o.collides&&(e&&(n.faceLeft=!1),o.faceRight=!e),t&&t.collides&&(e&&(n.faceRight=!1),t.faceLeft=!e),n&&!n.collides&&n.resetFaces(),n}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileWidth,i=i.tilemapLayer,r=0;return i&&(e=e||i.scene.cameras.main,r=i.x+e.scrollX*(1-i.scrollFactorX),n*=i.scaleX),r+t*n}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileHeight,i=i.tilemapLayer,r=0;return i&&(e=e||i.scene.cameras.main,r=i.y+e.scrollY*(1-i.scrollFactorY),n*=i.scaleY),r+t*n}},function(t,e){t.exports=function(t,e,i,n){var r=n.baseTileWidth,n=n.tilemapLayer;return n&&(i=i||n.scene.cameras.main,t-=n.x+i.scrollX*(1-n.scrollFactorX),r*=n.scaleX),(e=void 0===e?!0:e)?Math.floor(t/r):t/r}},function(t,e){t.exports=function(t,e,i,n){var r=n.baseTileHeight,n=n.tilemapLayer;return n&&(i=i||n.scene.cameras.main,t-=n.y+i.scrollY*(1-n.scrollFactorY),r*=n.scaleY),(e=void 0===e?!0:e)?Math.floor(t/r):t/r}},function(t,e,i){var a=i(85),h=i(119),l=i(252),c=i(72);t.exports=function(t,e,i,n,r){var s,o;return void 0===n&&(n=!0),h(e,i,r)?(s=(s=r.data[i][e])&&s.collides,t instanceof a?(null===r.data[i][e]&&(r.data[i][e]=new a(r,t.index,e,i,r.tileWidth,r.tileHeight)),r.data[i][e].copy(t)):(t=t,null===r.data[i][e]?r.data[i][e]=new a(r,t,e,i,r.tileWidth,r.tileHeight):r.data[i][e].index=t),t=r.data[i][e],o=-1!==r.collideIndexes.indexOf(t.index),c(t,o),n&&s!==t.collides&&l(e,i,r),t):null}},function(t,e,i){var n=i(29);t.exports=function(t){return"isometric"===(t=t.toLowerCase())?n.ISOMETRIC:"staggered"===t?n.STAGGERED:"hexagonal"===t?n.HEXAGONAL:n.ORTHOGONAL}},function(t,e,i){var p=i(40),f=i(120),g=i(121),m=i(85);t.exports=function(t,e,i,n,r){for(var s=new f({tileWidth:i,tileHeight:n}),t=new g({name:t,tileWidth:i,tileHeight:n,format:p.ARRAY_2D,layers:[s]}),o=[],a=e.length,h=0,l=0;l<e.length;l++){o[l]=[];for(var c=e[l],u=0;u<c.length;u++){var d=parseInt(c[u],10);isNaN(d)||-1===d?o[l][u]=r?null:new m(s,-1,u,l,i,n):o[l][u]=new m(s,d,u,l,i,n)}0===h&&(h=c.length)}return t.width=s.width=h,t.height=s.height=a,t.widthInPixels=s.widthInPixels=h*i,t.heightInPixels=s.heightInPixels=a*n,s.data=o,t}},function(t,e,i){function r(t){return{x:t.x,y:t.y}}var s=i(571),o=i(261),a=["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 n=s(t,a);return n.x+=e,n.y+=i,t.gid?(e=o(t.gid),n.gid=e.gid,n.flippedHorizontal=e.flippedHorizontal,n.flippedVertical=e.flippedVertical,n.flippedAntiDiagonal=e.flippedAntiDiagonal):t.polyline?n.polyline=t.polyline.map(r):t.polygon?n.polygon=t.polygon.map(r):t.ellipse?n.ellipse=t.ellipse:t.text?n.text=t.text:t.point?n.point=!0:n.rectangle=!0,n}},function(t,e){t.exports=function(t){var e=Boolean(2147483648&t),i=Boolean(1073741824&t),n=Boolean(536870912&t),r=(t&=536870911,0),s=!1;return e&&i&&n?(r=Math.PI/2,s=!0):e&&i&&!n?(r=Math.PI,s=!1):e&&!i&&n?(r=Math.PI/2,s=!1):!e||i||n?!e&&i&&n?(r=3*Math.PI/2,s=!1):e||!i||n?e||i||!n?e||i||n||(r=0,s=!1):(r=3*Math.PI/2,s=!0):(r=Math.PI,s=!0):s=!(r=0),{gid:t,flippedHorizontal:e,flippedVertical:i,flippedAntiDiagonal:n,rotation:r,flipped:s}}},function(t,e,i){var l=i(40),c=i(121),u=i(564),d=i(580);t.exports=function(t,e,i,n,r,s,o,a){void 0===i&&(i=32),void 0===n&&(n=32),void 0===r&&(r=10),void 0===s&&(s=10),void 0===a&&(a=!1);var h=null;return Array.isArray(o)?h=u(void 0!==e?e:"map",l.ARRAY_2D,o,i,n,a):void 0!==e&&(o=t.cache.tilemap.get(e))&&(h=u(e,o.format,o.data,i,n,a)),null===h&&(h=new c({tileWidth:i,tileHeight:n,width:r,height:s})),new d(t,h)}},function(t,e,i){var n=i(6);t.exports=function(t){t=n(t,"targets",null);return null!==t&&("function"==typeof t&&(t=t.call()),Array.isArray(t)||(t=[t])),t}},function(t,e){function c(t){return t.getActive&&"function"==typeof t.getActive}function u(t){return t.getStart&&"function"==typeof t.getStart}function d(t){return t.getEnd&&"function"==typeof t.getEnd}function p(t,e){var i,n,r=function(t,e,i){return i},s=function(t,e,i){return i},o=null,a=typeof e;if("number"==a)r=function(){return e};else if("string"==a){var h=e[0],l=parseFloat(e.substr(2));switch(h){case"+":r=function(t,e,i){return i+l};break;case"-":r=function(t,e,i){return i-l};break;case"*":r=function(t,e,i){return i*l};break;case"/":r=function(t,e,i){return i/l};break;default:r=function(){return parseFloat(e)}}}else"function"==a?r=e:"object"==a&&(u(h=e)||d(h)||c(h)?(c(e)&&(o=e.getActive),d(e)&&(r=e.getEnd),u(e)&&(s=e.getStart)):e.hasOwnProperty("value")?n=p(t,e.value):(a=e.hasOwnProperty("to"),h=e.hasOwnProperty("from"),i=e.hasOwnProperty("start"),a&&(h||i)&&(n=p(t,e.to),i&&(a=p(t,e.start),n.getActive=a.getEnd),h&&(i=p(t,e.from),n.getStart=i.getEnd))));return n||{getActive:o,getEnd:r,getStart:s}}t.exports=p},function(t,e){t.exports={targets:null,delay:0,duration:1e3,ease:"Power0",easeParams:null,hold:0,repeat:0,repeatDelay:0,yoyo:!1,flipX:!1,flipY:!1}},function(t,e,i){var n=i(0),r=i(9),h=i(267),s=i(16),o=i(5),u=i(100),a=i(14),i=new n({Extends:r,initialize:function(t,e,i){r.call(this),this.parent=t,this.parentIsTimeline=t.hasOwnProperty("isTimeline"),this.data=e,this.totalData=e.length,this.targets=i,this.totalTargets=i.length,this.useFrames=!1,this.timeScale=1,this.loop=0,this.loopDelay=0,this.loopCounter=0,this.startDelay=0,this.hasStarted=!1,this.isSeeking=!1,this.completeDelay=0,this.countdown=0,this.offset=0,this.calculatedOffset=0,this.state=u.PENDING_ADD,this._pausedState=u.INIT,this.paused=!1,this.elapsed=0,this.totalElapsed=0,this.duration=0,this.progress=0,this.totalDuration=0,this.totalProgress=0,this.callbacks={onActive:null,onComplete:null,onLoop:null,onRepeat:null,onStart:null,onStop:null,onUpdate:null,onYoyo:null},this.callbackScope},getValue:function(t){return this.data[t=void 0===t?0:t].current},setTimeScale:function(t){return this.timeScale=t,this},getTimeScale:function(){return this.timeScale},isPlaying:function(){return this.state===u.ACTIVE},isPaused:function(){return this.state===u.PAUSED},hasTarget:function(t){return-1!==this.targets.indexOf(t)},updateTo:function(t,e,i){void 0===i&&(i=!1);for(var n=0;n<this.totalData;n++){var r=this.data[n];r.key===t&&(r.end=e,i&&(r.start=r.current))}return this},restart:function(){return this.elapsed=0,this.progress=0,this.totalElapsed=0,this.totalProgress=0,this.state===u.ACTIVE?this.seek(0):this.state===u.REMOVED?(this.seek(0),this.parent.makeActive(this),this):this.state===u.PENDING_ADD?this:this.play()},calcDuration:function(){for(var t=0,e=a.MAX_SAFE_INTEGER,i=this.data,n=0;n<this.totalData;n++){var r=i[n];r.t1=r.duration+r.hold,r.yoyo&&(r.t1+=r.duration),r.t2=r.t1+r.repeatDelay,r.totalDuration=r.delay+r.t1,-1===r.repeat?r.totalDuration+=999999999999*r.t2:0<r.repeat&&(r.totalDuration+=r.t2*r.repeat),r.totalDuration>t&&(t=r.totalDuration),r.delay<e&&(e=r.delay)}this.duration=Math.max(t,.001),this.loopCounter=-1===this.loop?999999999999:this.loop,0<this.loopCounter?this.totalDuration=this.duration+this.completeDelay+(this.duration+this.loopDelay)*this.loopCounter:this.totalDuration=this.duration+this.completeDelay,this.startDelay=e},init:function(){if(this.paused&&!this.parentIsTimeline)return this.state=u.PENDING_ADD,this._pausedState=u.INIT,!1;for(var t=this.data,e=this.totalTargets,i=0;i<this.totalData;i++){var n=t[i],r=n.target,s=n.gen,o=n.key,a=n.index;n.delay=s.delay(r,o,0,a,e,this),n.duration=Math.max(s.duration(r,o,0,a,e,this),.001),n.hold=s.hold(r,o,0,a,e,this),n.repeat=s.repeat(r,o,0,a,e,this),n.repeatDelay=s.repeatDelay(r,o,0,a,e,this)}return this.calcDuration(),this.progress=0,this.totalProgress=0,this.elapsed=0,this.totalElapsed=0,this.state=u.INIT,!0},makeActive:function(){this.parent.makeActive(this),this.dispatchTweenEvent(h.TWEEN_ACTIVE,this.callbacks.onActive)},nextState:function(){0<this.loopCounter?(this.elapsed=0,this.progress=0,this.loopCounter--,this.resetTweenData(!0),0<this.loopDelay?(this.countdown=this.loopDelay,this.state=u.LOOP_DELAY):(this.state=u.ACTIVE,this.dispatchTweenEvent(h.TWEEN_LOOP,this.callbacks.onLoop))):0<this.completeDelay?(this.state=u.COMPLETE_DELAY,this.countdown=this.completeDelay):(this.state=u.PENDING_REMOVE,this.dispatchTweenEvent(h.TWEEN_COMPLETE,this.callbacks.onComplete))},pause:function(){return this.state!==u.PAUSED&&(this.paused=!0,this._pausedState=this.state,this.state=u.PAUSED),this},play:function(t){void 0===t&&(t=!1);var e=this.state;return e!==u.INIT||this.parentIsTimeline?e===u.ACTIVE||e===u.PENDING_ADD&&this._pausedState===u.PENDING_ADD||(this.parentIsTimeline||e!==u.PENDING_REMOVE&&e!==u.REMOVED?this.parentIsTimeline?(this.resetTweenData(t),0===this.calculatedOffset?this.state=u.ACTIVE:(this.countdown=this.calculatedOffset,this.state=u.OFFSET_DELAY)):(this.paused?this.paused=!1:(this.resetTweenData(t),this.state=u.ACTIVE),this.makeActive()):(this.seek(0),this.parent.makeActive(this))):(this.resetTweenData(!1),this.state=u.ACTIVE),this},resetTweenData:function(t){for(var e=this.data,i=this.totalData,n=this.totalTargets,r=0;r<i;r++){var s=e[r],o=s.target,a=s.key,h=s.index;s.progress=0,s.elapsed=0,s.repeatCounter=-1===s.repeat?999999999999:s.repeat,t?(s.start=s.getStartValue(o,a,s.start,h,n,this),s.end=s.getEndValue(o,a,s.end,h,n,this),s.current=s.start,s.state=u.PLAYING_FORWARD):s.state=u.PENDING_RENDER,0<s.delay&&(s.elapsed=s.delay,s.state=u.DELAY),s.getActiveValue&&(o[a]=s.getActiveValue(s.target,s.key,s.start))}},resume:function(){return this.state===u.PAUSED?(this.paused=!1,this.state=this._pausedState):this.play(),this},seek:function(t,e){void 0===e&&(e=16.6),this.state===u.REMOVED&&this.makeActive(),this.elapsed=0,this.progress=0,this.totalElapsed=0,this.totalProgress=0;for(var i=this.data,n=this.totalTargets,r=0;r<this.totalData;r++){var s=i[r],o=s.target,a=s.gen,h=s.key,l=s.index;s.progress=0,s.elapsed=0,s.repeatCounter=-1===s.repeat?999999999999:s.repeat,s.delay=a.delay(o,h,0,l,n,this),s.duration=Math.max(a.duration(o,h,0,l,n,this),.001),s.hold=a.hold(o,h,0,l,n,this),s.repeat=a.repeat(o,h,0,l,n,this),s.repeatDelay=a.repeatDelay(o,h,0,l,n,this),s.current=s.start,s.state=u.PLAYING_FORWARD,this.updateTweenData(this,s,0,l,n),0<s.delay&&(s.elapsed=s.delay,s.state=u.DELAY)}this.calcDuration();var c=!1;for(this.state===u.PAUSED&&(c=!0,this.state=u.ACTIVE),this.isSeeking=!0;this.update(0,e),this.totalProgress<t;);return this.isSeeking=!1,c&&(this.state=u.PAUSED),this},setCallback:function(t,e,i,n){return this.callbacks[t]={func:e,scope:n,params:i},this},complete:function(t){return(t=void 0===t?0:t)?(this.state=u.COMPLETE_DELAY,this.countdown=t):(this.state=u.PENDING_REMOVE,this.dispatchTweenEvent(h.TWEEN_COMPLETE,this.callbacks.onComplete)),this},remove:function(){return this.parent.remove(this),this},stop:function(t){return this.state===u.ACTIVE&&void 0!==t&&this.seek(t),this.state!==u.REMOVED&&(this.state!==u.PAUSED&&this.state!==u.PENDING_ADD||(this.parentIsTimeline?(this.parent.manager._destroy.push(this),this.parent.manager._toProcess++):(this.parent._destroy.push(this),this.parent._toProcess++)),this.dispatchTweenEvent(h.TWEEN_STOP,this.callbacks.onStop),this.removeAllListeners(),this.state=u.PENDING_REMOVE),this},update:function(t,e){if(this.state===u.PAUSED)return!1;switch(this.useFrames&&(e=+this.parent.timeScale),e*=this.timeScale,this.elapsed+=e,this.progress=Math.min(this.elapsed/this.duration,1),this.totalElapsed+=e,this.totalProgress=Math.min(this.totalElapsed/this.totalDuration,1),this.state){case u.ACTIVE:this.hasStarted||this.isSeeking||(this.startDelay-=e,this.startDelay<=0&&(this.hasStarted=!0,this.dispatchTweenEvent(h.TWEEN_START,this.callbacks.onStart)));for(var i=!1,n=0;n<this.totalData;n++){var r=this.data[n];this.updateTweenData(this,r,e)&&(i=!0)}i||this.nextState();break;case u.LOOP_DELAY:this.countdown-=e,this.countdown<=0&&(this.state=u.ACTIVE,this.dispatchTweenEvent(h.TWEEN_LOOP,this.callbacks.onLoop));break;case u.OFFSET_DELAY:this.countdown-=e,this.countdown<=0&&(this.state=u.ACTIVE);break;case u.COMPLETE_DELAY:this.countdown-=e,this.countdown<=0&&(this.state=u.PENDING_REMOVE,this.dispatchTweenEvent(h.TWEEN_COMPLETE,this.callbacks.onComplete))}return this.state===u.PENDING_REMOVE},dispatchTweenDataEvent:function(t,e,i){this.isSeeking||(this.emit(t,this,i.key,i.target,i.current,i.previous),e&&(e.params[1]=i.target,e.func.apply(e.scope,e.params)))},dispatchTweenEvent:function(t,e){this.isSeeking||(this.emit(t,this,this.targets),e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)))},setStateFromEnd:function(t,e,i){return e.yoyo?(e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY(),this.dispatchTweenDataEvent(h.TWEEN_YOYO,t.callbacks.onYoyo,e),e.start=e.getStartValue(e.target,e.key,e.start,e.index,t.totalTargets,t),u.PLAYING_BACKWARD):0<e.repeatCounter?(e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY(),e.start=e.getStartValue(e.target,e.key,e.start,e.index,t.totalTargets,t),e.end=e.getEndValue(e.target,e.key,e.start,e.index,t.totalTargets,t),0<e.repeatDelay?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,u.REPEAT_DELAY):(this.dispatchTweenDataEvent(h.TWEEN_REPEAT,t.callbacks.onRepeat,e),u.PLAYING_FORWARD)):u.COMPLETE},setStateFromStart:function(t,e,i){return 0<e.repeatCounter?(e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY(),e.end=e.getEndValue(e.target,e.key,e.start,e.index,t.totalTargets,t),0<e.repeatDelay?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,u.REPEAT_DELAY):(this.dispatchTweenDataEvent(h.TWEEN_REPEAT,t.callbacks.onRepeat,e),u.PLAYING_FORWARD)):u.COMPLETE},updateTweenData:function(t,e,i){var n,r,s,o,a=e.target;switch(e.state){case u.PLAYING_FORWARD:case u.PLAYING_BACKWARD:a?(r=e.elapsed,n=0,(o=e.duration)<(r+=i)&&(n=r-o,r=o),s=e.state===u.PLAYING_FORWARD,o=r/o,e.elapsed=r,e.progress=o,e.previous=e.current,1==o?s?(e.current=e.end,a[e.key]=e.end,0<e.hold?(e.elapsed=e.hold-n,e.state=u.HOLD_DELAY):e.state=this.setStateFromEnd(t,e,n)):(e.current=e.start,a[e.key]=e.start,e.state=this.setStateFromStart(t,e,n)):(r=s?e.ease(o):e.ease(1-o),e.current=e.start+(e.end-e.start)*r,a[e.key]=e.current),this.dispatchTweenDataEvent(h.TWEEN_UPDATE,t.callbacks.onUpdate,e)):e.state=u.COMPLETE;break;case u.DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=u.PENDING_RENDER);break;case u.REPEAT_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=u.PLAYING_FORWARD,this.dispatchTweenDataEvent(h.TWEEN_REPEAT,t.callbacks.onRepeat,e));break;case u.HOLD_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.state=this.setStateFromEnd(t,e,Math.abs(e.elapsed)));break;case u.PENDING_RENDER:a?(e.start=e.getStartValue(a,e.key,a[e.key],e.index,t.totalTargets,t),e.end=e.getEndValue(a,e.key,e.start,e.index,t.totalTargets,t),e.current=e.start,a[e.key]=e.start,e.state=u.PLAYING_FORWARD):e.state=u.COMPLETE}return e.state!==u.COMPLETE}});i.TYPES=["onActive","onComplete","onLoop","onRepeat","onStart","onStop","onUpdate","onYoyo"],o.register("tween",function(t){return this.scene.sys.tweens.add(t)}),s.register("tween",function(t){return this.scene.sys.tweens.create(t)}),t.exports=i},function(t,e,i){t.exports={TIMELINE_COMPLETE:i(1466),TIMELINE_LOOP:i(1467),TIMELINE_PAUSE:i(1468),TIMELINE_RESUME:i(1469),TIMELINE_START:i(1470),TIMELINE_UPDATE:i(1471),TWEEN_ACTIVE:i(1472),TWEEN_COMPLETE:i(1473),TWEEN_LOOP:i(1474),TWEEN_REPEAT:i(1475),TWEEN_START:i(1476),TWEEN_STOP:i(1477),TWEEN_UPDATE:i(1478),TWEEN_YOYO:i(1479)}},function(t,e){t.exports=function(t,e,i,n,r,s,o,a,h,l,c,u,d,p,f){return{target:t,index:e,key:i,getActiveValue:s,getEndValue:n,getStartValue:r,ease:o,duration:0,totalDuration:0,delay:0,yoyo:l,hold:0,repeat:0,repeatDelay:0,flipX:p,flipY:f,progress:0,elapsed:0,repeatCounter:0,start:0,previous:0,current:0,end:0,t1:0,t2:0,gen:{delay:a,duration:h,hold:c,repeat:u,repeatDelay:d},state:0}}},function(t,e,i){var n=i(68);t.exports=function(t){return n(t,-Math.PI,Math.PI)}},function(t,e,i){var n=i(68);t.exports=function(t){return n(t,-180,180)}},function(t,e,i){var n={},r=(t.exports=n,i(83)),s=i(32);n.fromVertices=function(t){for(var e={},i=0;i<t.length;i++){var n=(i+1)%t.length,n=r.normalise({x:t[n].y-t[i].y,y:t[i].x-t[n].x});e[(0===n.y?1/0:n.x/n.y).toFixed(3).toString()]=n}return s.values(e)},n.rotate=function(t,e){if(0!==e)for(var i=Math.cos(e),n=Math.sin(e),r=0;r<t.length;r++){var s=t[r],o=s.x*i-s.y*n;s.y=s.x*n+s.y*i,s.x=o}}},function(t,e,i){t.exports={AFTER_ADD:i(1504),AFTER_REMOVE:i(1505),AFTER_UPDATE:i(1506),BEFORE_ADD:i(1507),BEFORE_REMOVE:i(1508),BEFORE_UPDATE:i(1509),COLLISION_ACTIVE:i(1510),COLLISION_END:i(1511),COLLISION_START:i(1512),DRAG_END:i(1513),DRAG:i(1514),DRAG_START:i(1515),PAUSE:i(1516),RESUME:i(1517),SLEEP_END:i(1518),SLEEP_START:i(1519)}},function(t,e,i){var p={},f=(t.exports=p,i(274)),g=i(250),m=i(84);p.collisions=function(t,e){for(var i=[],n=e.pairs.table,r=e.metrics,s=0;s<t.length;s++){var o=t[s][0],a=t[s][1];if((!o.isStatic&&!o.isSleeping||!a.isStatic&&!a.isSleeping)&&p.canCollide(o.collisionFilter,a.collisionFilter)&&(r.midphaseTests+=1,m.overlaps(o.bounds,a.bounds)))for(var h=1<o.parts.length?1:0;h<o.parts.length;h++)for(var l=o.parts[h],c=1<a.parts.length?1:0;c<a.parts.length;c++){var u,d=a.parts[c];(l===o&&d===a||m.overlaps(l.bounds,d.bounds))&&(u=(u=n[g.id(l,d)])&&u.isActive?u.collision:null,d=f.collides(l,d,u),r.narrowphaseTests+=1,d.reused&&(r.narrowReuseCount+=1),d.collided&&(i.push(d),r.narrowDetections+=1))}}return i},p.canCollide=function(t,e){return t.group===e.group&&0!==t.group?0<t.group:0!=(t.mask&e.category)&&0!=(e.mask&t.category)}},function(t,e,i){var l={},a=(t.exports=l,i(64)),u=i(83);l.collides=function(t,e,i){var n=!1,r=i?(s=t.parent,r=e.parent,s=s.speed*s.speed+s.angularSpeed*s.angularSpeed+r.speed*r.speed+r.angularSpeed*r.angularSpeed,n=i&&i.collided&&s<.2,i):{collided:!1,bodyA:t,bodyB:e};if(i&&n){var s=r.axisBody,n=[s.axes[i.axisNumber]],o=l._overlapAxes(s.vertices,(s===t?e:t).vertices,n);if(r.reused=!0,o.overlap<=0)return r.collided=!1,r}else{if((i=l._overlapAxes(t.vertices,e.vertices,t.axes)).overlap<=0)return r.collided=!1,r;if((s=l._overlapAxes(e.vertices,t.vertices,e.axes)).overlap<=0)return r.collided=!1,r;i.overlap<s.overlap?(o=i,r.axisBody=t):(o=s,r.axisBody=e),r.axisNumber=o.axisNumber}r.bodyA=t.id<e.id?t:e,r.bodyB=t.id<e.id?e:t,r.collided=!0,r.depth=o.overlap,r.parentA=r.bodyA.parent,r.parentB=r.bodyB.parent,t=r.bodyA,e=r.bodyB,u.dot(o.axis,u.sub(e.position,t.position))<0?r.normal={x:o.axis.x,y:o.axis.y}:r.normal={x:-o.axis.x,y:-o.axis.y},r.tangent=u.perp(r.normal),r.penetration=r.penetration||{},r.penetration.x=r.normal.x*r.depth,r.penetration.y=r.normal.y*r.depth;n=l._findSupports(t,e,r.normal),i=[];return a.contains(t.vertices,n[0])&&i.push(n[0]),a.contains(t.vertices,n[1])&&i.push(n[1]),i.length<2&&(s=l._findSupports(e,t,u.neg(r.normal)),a.contains(e.vertices,s[0])&&i.push(s[0]),i.length<2&&a.contains(e.vertices,s[1])&&i.push(s[1])),i.length<1&&(i=[n[0]]),r.supports=i,r},l._overlapAxes=function(t,e,i){for(var n,r,s=u._temp[0],o=u._temp[1],a={overlap:Number.MAX_VALUE},h=0;h<i.length;h++){if(r=i[h],l._projectToAxis(s,t,r),l._projectToAxis(o,e,r),(n=Math.min(s.max-o.min,o.max-s.min))<=0)return a.overlap=n,a;n<a.overlap&&(a.overlap=n,a.axis=r,a.axisNumber=h)}return a},l._projectToAxis=function(t,e,i){for(var n=u.dot(e[0],i),r=n,s=1;s<e.length;s+=1){var o=u.dot(e[s],i);r<o?r=o:o<n&&(n=o)}t.min=n,t.max=r},l._findSupports=function(t,e,i){for(var n,r,s=Number.MAX_VALUE,o=u._temp[0],a=e.vertices,h=t.position,l=0;l<a.length;l++)c=a[l],o.x=c.x-h.x,o.y=c.y-h.y,(n=-u.dot(i,o))<s&&(s=n,r=c);var c=a[0<=r.index-1?r.index-1:a.length-1];return o.x=c.x-h.x,o.y=c.y-h.y,s=-u.dot(i,o),e=c,c=a[(r.index+1)%a.length],o.x=c.x-h.x,o.y=c.y-h.y,[r,e=(n=-u.dot(i,o))<s?c:e]}},function(t,e,i){t.exports={AlignTo:i(601),Angle:i(602),Call:i(603),GetFirst:i(604),GetLast:i(605),GridAlign:i(606),IncAlpha:i(678),IncX:i(679),IncXY:i(680),IncY:i(681),PlaceOnCircle:i(682),PlaceOnEllipse:i(683),PlaceOnLine:i(684),PlaceOnRectangle:i(685),PlaceOnTriangle:i(686),PlayAnimation:i(687),PropertyValueInc:i(46),PropertyValueSet:i(27),RandomCircle:i(688),RandomEllipse:i(689),RandomLine:i(690),RandomRectangle:i(691),RandomTriangle:i(692),Rotate:i(693),RotateAround:i(694),RotateAroundDistance:i(695),ScaleX:i(696),ScaleXY:i(697),ScaleY:i(698),SetAlpha:i(699),SetBlendMode:i(700),SetDepth:i(701),SetHitArea:i(702),SetOrigin:i(703),SetRotation:i(704),SetScale:i(705),SetScaleX:i(706),SetScaleY:i(707),SetScrollFactor:i(708),SetScrollFactorX:i(709),SetScrollFactorY:i(710),SetTint:i(711),SetVisible:i(712),SetX:i(713),SetXY:i(714),SetY:i(715),ShiftPosition:i(716),Shuffle:i(717),SmootherStep:i(718),SmoothStep:i(719),Spread:i(720),ToggleVisible:i(721),WrapInRectangle:i(722)}},function(t,e,i){var n=i(123),s=[];s[n.BOTTOM_CENTER]=i(277),s[n.BOTTOM_LEFT]=i(278),s[n.BOTTOM_RIGHT]=i(279),s[n.LEFT_BOTTOM]=i(280),s[n.LEFT_CENTER]=i(281),s[n.LEFT_TOP]=i(282),s[n.RIGHT_BOTTOM]=i(283),s[n.RIGHT_CENTER]=i(284),s[n.RIGHT_TOP]=i(285),s[n.TOP_CENTER]=i(286),s[n.TOP_LEFT]=i(287),s[n.TOP_RIGHT]=i(288),t.exports=function(t,e,i,n,r){return s[i](t,e,n,r)}},function(t,e,i){var r=i(42),s=i(87),o=i(88),a=i(52);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),o(t,s(e)+i),a(t,r(e)+n),t}},function(t,e,i){var r=i(42),s=i(43),o=i(53),a=i(52);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),o(t,s(e)-i),a(t,r(e)+n),t}},function(t,e,i){var r=i(42),s=i(44),o=i(54),a=i(52);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),o(t,s(e)+i),a(t,r(e)+n),t}},function(t,e,i){var r=i(42),s=i(43),o=i(55),a=i(54);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),a(t,s(e)-i),o(t,r(e)+n),t}},function(t,e,i){var r=i(89),s=i(43),o=i(90),a=i(54);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),a(t,s(e)-i),o(t,r(e)+n),t}},function(t,e,i){var r=i(43),s=i(45),o=i(54),a=i(52);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),o(t,r(e)-i),a(t,s(e)-n),t}},function(t,e,i){var r=i(42),s=i(44),o=i(55),a=i(53);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),a(t,s(e)+i),o(t,r(e)+n),t}},function(t,e,i){var r=i(89),s=i(44),o=i(90),a=i(53);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),a(t,s(e)+i),o(t,r(e)+n),t}},function(t,e,i){var r=i(44),s=i(45),o=i(53),a=i(52);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),o(t,r(e)+i),a(t,s(e)-n),t}},function(t,e,i){var r=i(87),s=i(45),o=i(55),a=i(88);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),a(t,r(e)+i),o(t,s(e)-n),t}},function(t,e,i){var r=i(43),s=i(45),o=i(55),a=i(53);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),a(t,r(e)-i),o(t,s(e)-n),t}},function(t,e,i){var r=i(44),s=i(45),o=i(55),a=i(54);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),a(t,r(e)+i),o(t,s(e)-n),t}},function(t,e,i){var n=i(123),s=[];s[n.BOTTOM_CENTER]=i(290),s[n.BOTTOM_LEFT]=i(291),s[n.BOTTOM_RIGHT]=i(292),s[n.CENTER]=i(293),s[n.LEFT_CENTER]=i(295),s[n.RIGHT_CENTER]=i(296),s[n.TOP_CENTER]=i(297),s[n.TOP_LEFT]=i(298),s[n.TOP_RIGHT]=i(299),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)}},function(t,e,i){var r=i(42),s=i(87),o=i(55),a=i(88);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),a(t,s(e)+i),o(t,r(e)+n),t}},function(t,e,i){var r=i(42),s=i(43),o=i(55),a=i(53);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),a(t,s(e)-i),o(t,r(e)+n),t}},function(t,e,i){var r=i(42),s=i(44),o=i(55),a=i(54);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),a(t,s(e)+i),o(t,r(e)+n),t}},function(t,e,i){var r=i(294),s=i(87),o=i(89);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),r(t,s(e)+i,o(e)+n),t}},function(t,e,i){var n=i(88),r=i(90);t.exports=function(t,e,i){return n(t,e),r(t,i)}},function(t,e,i){var r=i(89),s=i(43),o=i(90),a=i(53);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),a(t,s(e)-i),o(t,r(e)+n),t}},function(t,e,i){var r=i(89),s=i(44),o=i(90),a=i(54);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),a(t,s(e)+i),o(t,r(e)+n),t}},function(t,e,i){var r=i(87),s=i(45),o=i(88),a=i(52);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),o(t,r(e)+i),a(t,s(e)-n),t}},function(t,e,i){var r=i(43),s=i(45),o=i(53),a=i(52);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),o(t,r(e)-i),a(t,s(e)-n),t}},function(t,e,i){var r=i(44),s=i(45),o=i(54),a=i(52);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),o(t,r(e)+i),a(t,s(e)-n),t}},function(t,e,i){var n=i(169),r=i(98),s=i(14),o=i(4);t.exports=function(t,e,i){void 0===i&&(i=new o);e=r(e,0,s.PI2);return n(t,e,i)}},function(t,e,i){var o=i(302),a=i(169),h=i(98),l=i(14);t.exports=function(t,e,i,n){void 0===n&&(n=[]),!e&&0<i&&(e=o(t)/i);for(var r=0;r<e;r++){var s=h(r/e,0,l.PI2);n.push(a(t,s))}return n}},function(t,e){t.exports=function(t){return Math.PI*t.radius*2}},function(t,e,i){var n=i(18);t.exports={_alpha:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t){return this.alpha=t=void 0===t?1:t,this},alpha:{get:function(){return this._alpha},set:function(t){t=n(t,0,1);0===(this._alpha=t)?this.renderFlags&=-3:this.renderFlags|=2}}}},function(t,e,i){var n=i(35),i={_blendMode:n.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(t){"string"==typeof t&&(t=n[t]),-1<=(t|=0)&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=i},function(t,e){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 this.depth=t=void 0===t?0:t,this}}},function(t,e,i){var s=i(171),o=i(130);t.exports=function(t,e,i,n){void 0===n&&(n=[]),!e&&0<i&&(e=o(t)/i);for(var r=0;r<e;r++)n.push(s(t,r/e));return n}},function(t,e,i){var n=i(4);t.exports=function(t,e,i){return(i=void 0===i?new n:i).x=t.x1+(t.x2-t.x1)*e,i.y=t.y1+(t.y2-t.y1)*e,i}},function(t,e){t.exports=function(t,e,i,n){var r=Math.cos(n),n=Math.sin(n),s=t.x-e,o=t.y-i;return t.x=s*r-o*n+e,t.y=s*n+o*r+i,t}},function(t,e,i){var n=i(310),r=i(311);t.exports={mask:null,setMask:function(t){return this.mask=t,this},clearMask:function(t){return(t=void 0===t?!1:t)&&this.mask&&this.mask.destroy(),this.mask=null,this},createBitmapMask:function(t){return void 0===t&&(this.texture||this.shader)&&(t=this),new n(this.scene,t)},createGeometryMask:function(t){return void 0===t&&"Graphics"===this.type&&(t=this),new r(this.scene,t)}}},function(t,e,i){var n=i(0),r=i(22),s=i(91),i=new n({initialize:function(t,e){var i=t.sys.renderer;this.renderer=i,this.bitmapMask=e,this.maskTexture=null,this.mainTexture=null,this.dirty=!0,this.mainFramebuffer=null,this.maskFramebuffer=null,this.invertAlpha=!1,this.isStencil=!1,this.createMask(),t.sys.game.events.on(r.CONTEXT_RESTORED,this.createMask,this),i&&i.on(s.RESIZE,this.createMask,this)},createMask:function(){var t,e,i,n,r,s=this.renderer;s&&s.gl&&(this.mainTexture&&this.clearMask(),t=s.width,e=s.height,i=s.gl,n=0==(t&t-1)&&0==(e&e-1)?i.REPEAT:i.CLAMP_TO_EDGE,r=i.LINEAR,this.mainTexture=s.createTexture2D(0,r,r,n,n,i.RGBA,null,t,e),this.maskTexture=s.createTexture2D(0,r,r,n,n,i.RGBA,null,t,e),this.mainFramebuffer=s.createFramebuffer(t,e,this.mainTexture,!0),this.maskFramebuffer=s.createFramebuffer(t,e,this.maskTexture,!0))},clearMask:function(){var t=this.renderer;t&&t.gl&&this.mainTexture&&(t.deleteTexture(this.mainTexture),t.deleteTexture(this.maskTexture),t.deleteFramebuffer(this.mainFramebuffer),t.deleteFramebuffer(this.maskFramebuffer),this.mainTexture=null,this.maskTexture=null,this.mainFramebuffer=null,this.maskFramebuffer=null)},setBitmap:function(t){this.bitmapMask=t},preRenderWebGL:function(t,e,i){t.pipelines.BITMAPMASK_PIPELINE.beginMask(this,e,i)},postRenderWebGL:function(t,e){t.pipelines.BITMAPMASK_PIPELINE.endMask(this,e)},preRenderCanvas:function(){},postRenderCanvas:function(){},destroy:function(){this.clearMask(),this.renderer&&this.renderer.off(s.RESIZE,this.createMask,this),this.bitmapMask=null,this.prevFramebuffer=null,this.renderer=null}});t.exports=i},function(t,e,i){i=new(i(0))({initialize:function(t,e){this.geometryMask=e,this.invertAlpha=!1,this.isStencil=!0,this.level=0},setShape:function(t){return this.geometryMask=t,this},setInvertAlpha:function(t){return this.invertAlpha=t=void 0===t?!0:t,this},preRenderWebGL:function(t,e,i){var n=t.gl;t.flush(),0===t.maskStack.length&&(n.enable(n.STENCIL_TEST),n.clear(n.STENCIL_BUFFER_BIT),t.maskCount=0),t.currentCameraMask.mask!==this&&(t.currentMask.mask=this),t.maskStack.push({mask:this,camera:i}),this.applyStencil(t,i,!0),t.maskCount++},applyStencil:function(t,e,i){var n=t.gl,r=this.geometryMask,s=t.maskCount;n.colorMask(!1,!1,!1,!1),i?(n.stencilFunc(n.EQUAL,s,255),n.stencilOp(n.KEEP,n.KEEP,n.INCR)):(n.stencilFunc(n.EQUAL,s+1,255),n.stencilOp(n.KEEP,n.KEEP,n.DECR)),r.renderWebGL(t,r,e),t.flush(),n.colorMask(!0,!0,!0,!0),n.stencilOp(n.KEEP,n.KEEP,n.KEEP),i?this.invertAlpha?n.stencilFunc(n.NOTEQUAL,s+1,255):n.stencilFunc(n.EQUAL,s+1,255):this.invertAlpha?n.stencilFunc(n.NOTEQUAL,s,255):n.stencilFunc(n.EQUAL,s,255)},postRenderWebGL:function(t){var e=t.gl;t.maskStack.pop(),t.maskCount--,t.flush();var i=t.currentMask;0===t.maskStack.length?(i.mask=null,e.disable(e.STENCIL_TEST)):((e=t.maskStack[t.maskStack.length-1]).mask.applyStencil(t,e.camera,!1),t.currentCameraMask.mask!==e.mask?(i.mask=e.mask,i.camera=e.camera):i.mask=null)},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}});t.exports=i},function(t,e){t.exports={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,e){return void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this}}},function(t,e,i){var n=i(14),r=i(25),s=i(177),o=i(269),a=i(270),h=i(3);t.exports={_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,0===(this._scaleY=t)?this.renderFlags&=-5:this.renderFlags|=4}},scaleX:{get:function(){return this._scaleX},set:function(t){0===(this._scaleX=t)?this.renderFlags&=-5:this.renderFlags|=4}},scaleY:{get:function(){return this._scaleY},set:function(t){0===(this._scaleY=t)?this.renderFlags&=-5: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===e&&(e=0),void 0===i&&(i=this.scene.sys.scale.width),void 0===n&&(n=this.scene.sys.scale.height),this.x=(t=void 0===t?0:t)+Math.random()*i,this.y=e+Math.random()*n,this},setRotation:function(t){return this.rotation=t=void 0===t?0:t,this},setAngle:function(t){return this.angle=t=void 0===t?0: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 this.x=t=void 0===t?0:t,this},setY:function(t){return this.y=t=void 0===t?0:t,this},setZ:function(t){return this.z=t=void 0===t?0:t,this},setW:function(t){return this.w=t=void 0===t?0:t,this},getLocalTransformMatrix:function(t){return(t=void 0===t?new r:t).applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY)},getWorldTransformMatrix:function(t,e){void 0===t&&(t=new r),void 0===e&&(e=new r);var i=this.parentContainer;if(!i)return this.getLocalTransformMatrix(t);for(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 t},getLocalPoint:function(t,e,i,n){i=i||new h;var r=(n=n||this.scene.sys.cameras.main).scrollX,n=n.scrollY,t=t+r*this.scrollFactorX-r,r=e+n*this.scrollFactorY-n;return this.parentContainer?this.getWorldTransformMatrix().applyInverse(t,r,i):s(t,r,this.x,this.y,this.rotation,this.scaleX,this.scaleY,i),this._originComponent&&(i.x+=this._displayOriginX,i.y+=this._displayOriginY),i},getParentRotation:function(){for(var t=0,e=this.parentContainer;e;)t+=e.rotation,e=e.parentContainer;return t}}},function(t,e){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}}},function(t,e,i){t.exports={CHANGE_DATA:i(638),CHANGE_DATA_KEY:i(639),DESTROY:i(640),REMOVE_DATA:i(641),SET_DATA:i(642)}},function(t,e,i){var h=i(130),l=i(4);t.exports=function(t,e,i,n){if(void 0===n&&(n=[]),e||i){e?i=Math.round(h(t)/e):e=h(t)/i;for(var r=t.x,s=t.y,o=0,a=0;a<i;a++)switch(n.push(new l(r,s)),o){case 0:(r+=e)>=t.right&&(o=1,s+=r-t.right,r=t.right);break;case 1:(s+=e)>=t.bottom&&(o=2,r-=s-t.bottom,s=t.bottom);break;case 2:(r-=e)<=t.left&&(o=3,s-=t.left-r,r=t.left);break;case 3:(s-=e)<=t.top&&(o=0,s=t.top)}}return n}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=1),void 0===i&&(i=[]);var n=Math.round(t.x1),r=Math.round(t.y1),s=Math.round(t.x2),o=Math.round(t.y2),a=Math.abs(s-n),h=Math.abs(o-r),l=n<s?1:-1,c=r<o?1:-1,u=a-h;i.push({x:n,y:r});for(var d=1;n!==s||r!==o;){var p=u<<1;-h<p&&(u-=h,n+=l),p<a&&(u+=a,r+=c),d%e==0&&i.push({x:n,y:r}),d++}return i}},function(t,e){t.exports=function(t,e,i){if(!e.length)return NaN;if(1===e.length)return e[0];var n,r,s=1;if(i){if(t<e[0][i])return e[0];for(;e[s][i]<t;)s++}else for(;e[s]<t;)s++;return s>e.length&&(s=e.length),i?(n=e[s-1][i],(r=e[s][i])-t<=t-n?e[s]:e[s-1]):(n=e[s-1],(r=e[s])-t<=t-n?r:n)}},function(t,e,i){i=new(i(0))({initialize:function(t,e,i,n,r){void 0===r&&(r=!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=r},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration,keyframe:this.isKeyFrame}},destroy:function(){this.frame=void 0}});t.exports=i},function(t,e){t.exports=function(t){var i=/\D/g;return t.sort(function(t,e){return parseInt(t.replace(i,""),10)-parseInt(e.replace(i,""),10)}),t}},function(t,e,i){var n=i(185),r=i(0),s=i(102),o=i(9),a=i(132),h=i(22),g=i(2),m=i(6),d=i(186),p=i(322),i=new r({Extends:o,initialize:function(t){o.call(this),this.game=t,this.textureManager=null,this.globalTimeScale=1,this.anims=new s,this.mixes=new s,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,r=this.mixes,t="string"==typeof t?t:t.key,e="string"==typeof e?e:e.key;return n.has(t)&&n.has(e)&&((n=r.get(t)||{})[e]=i,r.set(t,n)),this},removeMix:function(t,e){var i=this.mixes,t="string"==typeof t?t:t.key,n=i.get(t);return n&&(e?(e="string"==typeof e?e:e.key,n.hasOwnProperty(e)&&delete n[e]):i.delete(t)),this},getMix:function(t,e){var i=this.mixes,t="string"==typeof t?t:t.key,e="string"==typeof e?e:e.key,i=i.get(t);return i&&i.hasOwnProperty(e)?i[e]:0},add:function(t,e){return this.anims.has(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(c,u){var d,t,p,f=[],e=this.game.cache.json.get(c);return e&&(d=this,t=m(e,"meta",null),p=m(e,"frames",null),t&&p&&m(t,"frameTags",[]).forEach(function(t){var e=[],i=g(t,"name",null),n=g(t,"from",0),r=g(t,"to",0),t=g(t,"direction","forward");if(i&&(!u||-1<u.indexOf(i))){for(var s=[],o=Number.MAX_SAFE_INTEGER,a=n;a<=r;a++){var h=a.toString(),l=p[h];l&&((l=g(l,"duration",Number.MAX_SAFE_INTEGER))<o&&(o=l),s.push({frame:h,duration:l}))}s.forEach(function(t){e.push({key:c,frame:t.frame,duration:o-t.duration})});n=o*e.length,i={key:i,frames:e="reverse"===t?e.reverse():e,duration:n,yoyo:"pingpong"===t},n=d.create(i);n&&f.push(n)}})),f},create:function(t){var e=t.key,i=!1;return!e||(i=this.get(e))||(i=new n(this,e,t),this.anims.set(e,i),this.emit(a.ADD_ANIMATION,e,i)),i},fromJSON:function(t,e){(e=void 0===e?!1:e)&&this.anims.clear();var i=[];if((t="string"==typeof t?JSON.parse(t):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=m(e,"prefix",""),r=m(e,"start",0),s=m(e,"end",0),o=m(e,"suffix",""),a=m(e,"zeroPad",0),h=m(e,"outputArray",[]),l=m(e,"frames",!1),c=this.textureManager.get(t);if(c)if(e)for(l=l||p(r,s),i=0;i<l.length;i++){var u=n+d(l[i],a,"0",1)+o;c.has(u)&&h.push({key:t,frame:u})}else for(l=c.getFrameNames(),i=0;i<l.length;i++)h.push({key:t,frame:l[i]});return h},generateFrameNumbers:function(t,e){var i=m(e,"start",0),n=m(e,"end",-1),r=m(e,"first",!1),s=m(e,"outputArray",[]),o=m(e,"frames",!1),a=this.textureManager.get(t);if(a){r&&a.has(r)&&s.push({key:t,frame:r}),o||(-1===n&&(n=a.frameTotal-2),o=p(i,n));for(var h=0;h<o.length;h++)a.has(o[h])&&s.push({key:t,frame:o[h]})}return s},get:function(t){return this.anims.get(t)},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);var r=(e=Array.isArray(e)?e:[e]).length;n||r--;for(var s=0;s<e.length;s++){var o=i<0?Math.abs(i)*(r-s):i*s;e[s].anims.playAfterDelay(t,o)}return this},remove:function(t){var e=this.get(t);return 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 i={anims:[],globalTimeScale:this.globalTimeScale};return void 0!==t&&""!==t?i.anims.push(this.anims.get(t).toJSON()):this.anims.each(function(t,e){i.anims.push(e.toJSON())}),i},destroy:function(){this.anims.clear(),this.mixes.clear(),this.textureManager=null,this.game=null}});t.exports=i},function(t,e){t.exports=function(t,e,i,n){var r,s=[],o=!1;if((i||n)&&(o=!0,i=i||"",n=n||""),e<t)for(r=t;e<=r;r--)o?s.push(i+r.toString()+n):s.push(r);else for(r=t;r<=e;r++)o?s.push(i+r.toString()+n):s.push(r);return s}},function(t,e,i){var n=i(0),r=i(102),s=i(9),o=i(324),i=new n({initialize:function(){this.entries=new r,this.events=new s},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}});t.exports=i},function(t,e,i){t.exports={ADD:i(736),REMOVE:i(737)}},function(t,e,i){var n=i(323),r=i(0),s=i(22),i=new r({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.obj=new n,this.tilemap=new n,this.xml=new n,this.custom={},this.game.events.once(s.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,e=["binary","bitmapFont","json","physics","shader","audio","video","text","html","obj","tilemap","xml"],i=0;i<e.length;i++)this[e[i]].destroy(),this[e[i]]=null;for(t in this.custom)this.custom[t].destroy();this.custom=null,this.game=null}});t.exports=i},function(t,e,i){var r=i(133),g=i(190),o=i(18),n=i(0),s=i(11),a=i(333),m=i(37),y=i(135),h=i(10),l=i(3),i=new n({Extends:r,Mixins:[s.Flip,s.Tint,s.Pipeline],initialize:function(t,e,i,n){r.call(this,t,e,i,n),this.postPipelines=[],this.pipelineData={},this.inputEnabled=!0,this.fadeEffect=new a.Fade(this),this.flashEffect=new a.Flash(this),this.shakeEffect=new a.Shake(this),this.panEffect=new a.Pan(this),this.rotateToEffect=new a.RotateTo(this),this.zoomEffect=new a.Zoom(this),this.lerp=new l(1,1),this.followOffset=new l,this.deadzone=null,this._follow=null},setDeadzone:function(t,e){var i,n;return void 0===t?this.deadzone=null:(this.deadzone?(this.deadzone.width=t,this.deadzone.height=e):this.deadzone=new h(0,0,t,e),this._follow&&(t=this.width/2,e=this.height/2,i=this._follow.x-this.followOffset.x,n=this._follow.y-this.followOffset.y,this.midPoint.set(i,n),this.scrollX=i-t,this.scrollY=n-e),g(this.deadzone,this.midPoint.x,this.midPoint.y)),this},fadeIn:function(t,e,i,n,r,s){return this.fadeEffect.start(!1,t,e,i,n,!0,r,s)},fadeOut:function(t,e,i,n,r,s){return this.fadeEffect.start(!0,t,e,i,n,!0,r,s)},fadeFrom:function(t,e,i,n,r,s,o){return this.fadeEffect.start(!1,t,e,i,n,r,s,o)},fade:function(t,e,i,n,r,s,o){return this.fadeEffect.start(!0,t,e,i,n,r,s,o)},flash:function(t,e,i,n,r,s,o){return this.flashEffect.start(t,e,i,n,r,s,o)},shake:function(t,e,i,n,r){return this.shakeEffect.start(t,e,i,n,r)},pan:function(t,e,i,n,r,s,o){return this.panEffect.start(t,e,i,n,r,s,o)},rotateTo:function(t,e,i,n,r,s,o){return this.rotateToEffect.start(t,e,i,n,r,s,o)},zoomTo:function(t,e,i,n,r,s){return this.zoomEffect.start(t,e,i,n,r,s)},preRender:function(){this.renderList.length=0;var t=this.width,e=this.height,i=.5*t,n=.5*e,r=this.zoom,s=this.matrix,o=t*this.originX,a=e*this.originY,h=this._follow,l=this.deadzone,c=this.scrollX,u=this.scrollY;l&&g(l,this.midPoint.x,this.midPoint.y);var d=!1,l=(h&&!this.panEffect.isRunning&&(p=h.x-this.followOffset.x,f=h.y-this.followOffset.y,l?(p<l.x?c=y(c,c-(l.x-p),this.lerp.x):p>l.right&&(c=y(c,c+(p-l.right),this.lerp.x)),f<l.y?u=y(u,u-(l.y-f),this.lerp.y):f>l.bottom&&(u=y(u,u+(f-l.bottom),this.lerp.y))):(c=y(c,p-o,this.lerp.x),u=y(u,f-a,this.lerp.y)),d=!0),this.useBounds&&(c=this.clampX(c),u=this.clampY(u)),this.roundPixels&&(o=Math.round(o),a=Math.round(a),c=Math.round(c),u=Math.round(u)),(this.scrollX=c)+i),p=(this.scrollY=u)+n,f=(this.midPoint.set(l,p),t/r),c=e/r,i=l-f/2,u=p-c/2;this.roundPixels&&(i=Math.round(i),u=Math.round(u)),this.worldView.setTo(i,u,f,c),s.applyITRS(this.x+o,this.y+a,this.rotation,r,r),s.translate(-o,-a),this.shakeEffect.preRender(),d&&this.emit(m.FOLLOW_UPDATE,this,h)},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 this.followOffset.set(t=void 0===t?0:t,e=void 0===e?0:e),this},startFollow:function(t,e,i,n,r,s){void 0===e&&(e=!1),void 0===i&&(i=1),void 0===n&&(n=i),void 0===r&&(r=0),void 0===s&&(s=r),this._follow=t,this.roundPixels=e,i=o(i,0,1),n=o(n,0,1),this.lerp.set(i,n),this.followOffset.set(r,s);e=this.width/2,i=this.height/2,n=t.x-r,r=t.y-s;return this.midPoint.set(n,r),this.scrollX=n-e,this.scrollY=r-i,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(),r.prototype.destroy.call(this),this._follow=null,this.deadzone=null}});t.exports=i},function(t,e,i){var r=i(38);t.exports=function(t){var e=new r;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,n,t=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return t&&(i=parseInt(t[1],16),n=parseInt(t[2],16),t=parseInt(t[3],16),e.setTo(i,n,t)),e}},function(t,e){t.exports=function(t,e,i,n){return n<<24|t<<16|e<<8|i}},function(t,e){t.exports=function(t,e,i,n){void 0===n&&(n={h:0,s:0,v:0}),t/=255,e/=255,i/=255;var r=Math.min(t,e,i),s=Math.max(t,e,i),o=s-r,a=0,h=0===s?0:o/s,l=s;return s!==r&&(s===t?a=(e-i)/o+(e<i?6:0):s===e?a=(i-t)/o+2:s===i&&(a=(t-e)/o+4),a/=6),n.hasOwnProperty("_h")?(n._h=a,n._s=h,n._v=l):(n.h=a,n.s=h,n.v=l),n}},function(t,e){t.exports=function(t){return 16777215<t?{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}}},function(t,e,i){var n=i(38);t.exports=function(t){return new n(t.r,t.g,t.b,t.a)}},function(t,e,i){var s=i(38);t.exports=function(t){var e,i,n,r=new s,t=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(t.toLowerCase());return t&&(e=parseInt(t[1],10),i=parseInt(t[2],10),n=parseInt(t[3],10),t=void 0!==t[4]?parseFloat(t[4]):1,r.setTo(e,i,n,255*t)),r}},function(t,e,i){t.exports={Fade:i(761),Flash:i(762),Pan:i(763),Shake:i(796),RotateTo:i(797),Zoom:i(798)}},function(t,e,i){t.exports={In:i(764),Out:i(765),InOut:i(766)}},function(t,e,i){t.exports={In:i(767),Out:i(768),InOut:i(769)}},function(t,e,i){t.exports={In:i(770),Out:i(771),InOut:i(772)}},function(t,e,i){t.exports={In:i(773),Out:i(774),InOut:i(775)}},function(t,e,i){t.exports={In:i(776),Out:i(777),InOut:i(778)}},function(t,e,i){t.exports={In:i(779),Out:i(780),InOut:i(781)}},function(t,e,i){t.exports=i(782)},function(t,e,i){t.exports={In:i(783),Out:i(784),InOut:i(785)}},function(t,e,i){t.exports={In:i(786),Out:i(787),InOut:i(788)}},function(t,e,i){t.exports={In:i(789),Out:i(790),InOut:i(791)}},function(t,e,i){t.exports={In:i(792),Out:i(793),InOut:i(794)}},function(t,e,i){t.exports=i(795)},function(t,e,i){var n=i(0),r=i(33),s=i(347),o=i(2),a=i(6),h=i(7),l=i(193),c=i(1),u=i(197),d=i(187),i=new n({initialize:function(t){this.width=a(t=void 0===t?{}:t,"width",1024),this.height=a(t,"height",768),this.zoom=a(t,"zoom",1),this.parent=a(t,"parent",void 0),this.scaleMode=a(t,"scaleMode",0),this.expandParent=a(t,"expandParent",!0),this.autoRound=a(t,"autoRound",!1),this.autoCenter=a(t,"autoCenter",0),this.resizeInterval=a(t,"resizeInterval",500),this.fullscreenTarget=a(t,"fullscreenTarget",null),this.minWidth=a(t,"minWidth",0),this.maxWidth=a(t,"maxWidth",0),this.minHeight=a(t,"minHeight",0),this.maxHeight=a(t,"maxHeight",0);var e=a(t,"scale",null),e=(e&&(this.width=a(e,"width",this.width),this.height=a(e,"height",this.height),this.zoom=a(e,"zoom",this.zoom),this.parent=a(e,"parent",this.parent),this.scaleMode=a(e,"mode",this.scaleMode),this.expandParent=a(e,"expandParent",this.expandParent),this.autoRound=a(e,"autoRound",this.autoRound),this.autoCenter=a(e,"autoCenter",this.autoCenter),this.resizeInterval=a(e,"resizeInterval",this.resizeInterval),this.fullscreenTarget=a(e,"fullscreenTarget",this.fullscreenTarget),this.minWidth=a(e,"min.width",this.minWidth),this.maxWidth=a(e,"max.width",this.maxWidth),this.minHeight=a(e,"min.height",this.minHeight),this.maxHeight=a(e,"max.height",this.maxHeight)),this.renderType=a(t,"type",r.AUTO),this.canvas=a(t,"canvas",null),this.context=a(t,"context",null),this.canvasStyle=a(t,"canvasStyle",null),this.customEnvironment=a(t,"customEnvironment",!1),this.sceneConfig=a(t,"scene",null),this.seed=a(t,"seed",[(Date.now()*Math.random()).toString()]),l.RND=new l.RandomDataGenerator(this.seed),this.gameTitle=a(t,"title",""),this.gameURL=a(t,"url","https://phaser.io"),this.gameVersion=a(t,"version",""),this.autoFocus=a(t,"autoFocus",!0),this.domCreateContainer=a(t,"dom.createContainer",!1),this.domBehindCanvas=a(t,"dom.behindCanvas",!1),this.domPointerEvents=a(t,"dom.pointerEvents","none"),this.inputKeyboard=a(t,"input.keyboard",!0),this.inputKeyboardEventTarget=a(t,"input.keyboard.target",window),this.inputKeyboardCapture=a(t,"input.keyboard.capture",[]),this.inputMouse=a(t,"input.mouse",!0),this.inputMouseEventTarget=a(t,"input.mouse.target",null),this.inputMousePreventDefaultDown=a(t,"input.mouse.preventDefaultDown",!0),this.inputMousePreventDefaultUp=a(t,"input.mouse.preventDefaultUp",!0),this.inputMousePreventDefaultMove=a(t,"input.mouse.preventDefaultMove",!0),this.inputMousePreventDefaultWheel=a(t,"input.mouse.preventDefaultWheel",!0),this.inputTouch=a(t,"input.touch",s.input.touch),this.inputTouchEventTarget=a(t,"input.touch.target",null),this.inputTouchCapture=a(t,"input.touch.capture",!0),this.inputActivePointers=a(t,"input.activePointers",1),this.inputSmoothFactor=a(t,"input.smoothFactor",0),this.inputWindowEvents=a(t,"input.windowEvents",!0),this.inputGamepad=a(t,"input.gamepad",!1),this.inputGamepadEventTarget=a(t,"input.gamepad.target",window),this.disableContextMenu=a(t,"disableContextMenu",!1),this.audio=a(t,"audio",{}),this.hideBanner=!1===a(t,"banner",null),this.hidePhaser=a(t,"banner.hidePhaser",!1),this.bannerTextColor=a(t,"banner.text","#ffffff"),this.bannerBackgroundColor=a(t,"banner.background",["#ff0000","#ffff00","#00ff00","#00ffff","#000000"]),""===this.gameTitle&&this.hidePhaser&&(this.hideBanner=!0),this.fps=a(t,"fps",null),a(t,"render",t)),e=(this.pipeline=a(e,"pipeline",null),this.antialias=a(e,"antialias",!0),this.antialiasGL=a(e,"antialiasGL",!0),this.mipmapFilter=a(e,"mipmapFilter","LINEAR"),this.desynchronized=a(e,"desynchronized",!1),this.roundPixels=a(e,"roundPixels",!1),this.pixelArt=a(e,"pixelArt",1!==this.zoom),this.pixelArt&&(this.antialias=!1,this.antialiasGL=!1,this.roundPixels=!0),this.transparent=a(e,"transparent",!1),this.clearBeforeRender=a(e,"clearBeforeRender",!0),this.preserveDrawingBuffer=a(e,"preserveDrawingBuffer",!1),this.premultipliedAlpha=a(e,"premultipliedAlpha",!0),this.failIfMajorPerformanceCaveat=a(e,"failIfMajorPerformanceCaveat",!1),this.powerPreference=a(e,"powerPreference","default"),this.batchSize=a(e,"batchSize",4096),this.maxTextures=a(e,"maxTextures",-1),this.maxLights=a(e,"maxLights",10),a(t,"backgroundColor",0)),e=(this.backgroundColor=d(e),this.transparent&&(this.backgroundColor=d(0),this.backgroundColor.alpha=0),this.preBoot=a(t,"callbacks.preBoot",c),this.postBoot=a(t,"callbacks.postBoot",c),this.physics=a(t,"physics",{}),this.defaultPhysicsSystem=a(this.physics,"default",!1),this.loaderBaseURL=a(t,"loader.baseURL",""),this.loaderPath=a(t,"loader.path",""),s.os.android?6:32),e=(this.loaderMaxParallelDownloads=a(t,"loader.maxParallelDownloads",e),this.loaderCrossOrigin=a(t,"loader.crossOrigin",void 0),this.loaderResponseType=a(t,"loader.responseType",""),this.loaderAsync=a(t,"loader.async",!0),this.loaderUser=a(t,"loader.user",""),this.loaderPassword=a(t,"loader.password",""),this.loaderTimeout=a(t,"loader.timeout",0),this.loaderWithCredentials=a(t,"loader.withCredentials",!1),this.installGlobalPlugins=[],this.installScenePlugins=[],a(t,"plugins",null)),i=u.DefaultScene,e=(e&&(Array.isArray(e)?this.defaultPlugins=e:h(e)&&(this.installGlobalPlugins=o(e,"global",[]),this.installScenePlugins=o(e,"scene",[]),Array.isArray(e.default)?i=e.default:Array.isArray(e.defaultMerge)&&(i=i.concat(e.defaultMerge)))),this.defaultPlugins=i,"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg");this.defaultImage=a(t,"images.default",e+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=a(t,"images.missing",e+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="),this.whiteImage=a(t,"images.white","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABdJREFUeNpi/P//PwMMMDEgAdwcgAADAJZuAwXJYZOzAAAAAElFTkSuQmCC"),window&&(window.FORCE_WEBGL?this.renderType=r.WEBGL:window.FORCE_CANVAS&&(this.renderType=r.CANVAS))}});t.exports=i},function(t,e,i){t.exports={os:i(105),browser:i(136),features:i(191),input:i(808),audio:i(809),video:i(810),fullscreen:i(811),canvasFeatures:i(348)}},function(t,e,i){var n,r,s,o=i(31),a={supportInverseAlpha:!1,supportNewBlendModes:!1};t.exports=("function"!=typeof importScripts&&void 0!==document&&(a.supportNewBlendModes=(n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",r="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",(s=new Image).onload=function(){var e=new Image;e.onload=function(){var t=o.create(e,6,1).getContext("2d");if(t.globalCompositeOperation="multiply",t.drawImage(s,0,0),t.drawImage(e,2,0),!t.getImageData(2,0,1,1))return!1;t=t.getImageData(2,0,1,1).data;o.remove(e),a.supportNewBlendModes=255===t[0]&&0===t[1]&&0===t[2]},e.src=n+"/wCKxvRF"+r},s.src=n+"AP804Oa6"+r,!1),a.supportInverseAlpha=function(){var t=o.create(this,2,1).getContext("2d"),e=(t.fillStyle="rgba(10, 20, 30, 0.5)",t.fillRect(0,0,1,1),t.getImageData(0,0,1,1));if(null===e)return!1;t.putImageData(e,1,0);t=t.getImageData(1,0,1,1);return t.data[0]===e.data[0]&&t.data[1]===e.data[1]&&t.data[2]===e.data[2]&&t.data[3]===e.data[3]}()),a)},function(t,e){t.exports=function(t,e,i,n){return Math.atan2(n-e,i-t)}},function(t,e){t.exports=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)}},function(t,e){t.exports=function(t){return 0<=(t%=2*Math.PI)?t:t+2*Math.PI}},function(t,e){t.exports=function(t,e){var i=t.x-e.x,t=t.y-e.y;return Math.sqrt(i*i+t*t)}},function(t,e){t.exports=function(t,e,i,n){t-=i,i=e-n;return t*t+i*i}},function(t,e){t.exports=function(t,e,i){return e-(i=void 0===i?1e-4:i)<t}},function(t,e){t.exports=function(t,e,i){return t<e+(i=void 0===i?1e-4:i)}},function(t,e,i){var n=i(357);t.exports=function(t,e){return n(t)/n(e)/n(t-e)}},function(t,e){t.exports=function(t){if(0===t)return 1;for(var e=t;--t;)e*=t;return e}},function(t,e){t.exports=function(t,e,i,n,r){return(s=1-t)*s*s*e+3*(s=1-t)*s*t*i+3*(1-t)*t*t*n+t*t*t*r;var s}},function(t,e){t.exports=function(t,e,i,n){return(r=1-t)*r*e+2*(1-t)*t*i+t*t*n;var r}},function(t,e,i){var n=i(184);t.exports=function(t,e,i){return e+(i-e)*n(t,0,1)}},function(t,e){t.exports=function(t){t=Math.log(t)/.6931471805599453;return 1<<Math.ceil(t)}},function(t,e){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}},function(t,e){t.exports=function(t){return 0<t?Math.ceil(t):Math.floor(t)}},function(t,e,i){var n=new(i(0))({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,t=t.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},fromMat4:function(t){var t=t.val,e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[4],e[4]=t[5],e[5]=t[6],e[6]=t[8],e[7]=t[9],e[8]=t[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],r=t[3],s=t[4],o=t[5],a=t[6],h=t[7],l=t[8],c=l*s-o*h,u=-l*r+o*a,d=h*r-s*a,p=e*c+i*u+n*d;return p?(t[0]=c*(p=1/p),t[1]=(-l*i+n*h)*p,t[2]=(o*i-n*s)*p,t[3]=u*p,t[4]=(l*e-n*a)*p,t[5]=(-o*e+n*r)*p,t[6]=d*p,t[7]=(-h*e+i*a)*p,t[8]=(s*e-i*r)*p,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=t[2],r=t[3],s=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return t[0]=s*l-o*h,t[1]=n*h-i*l,t[2]=i*o-n*s,t[3]=o*a-r*l,t[4]=e*l-n*a,t[5]=n*r-e*o,t[6]=r*h-s*a,t[7]=i*a-e*h,t[8]=e*s-i*r,this},determinant:function(){var t=this.val,e=t[0],i=t[1],n=t[2],r=t[3],s=t[4],o=t[5],a=t[6],h=t[7],t=t[8];return e*(t*s-o*h)+i*(-t*r+o*a)+n*(h*r-s*a)},multiply:function(t){var e=this.val,i=e[0],n=e[1],r=e[2],s=e[3],o=e[4],a=e[5],h=e[6],l=e[7],c=e[8],t=t.val,u=t[0],d=t[1],p=t[2],f=t[3],g=t[4],m=t[5],y=t[6],v=t[7],t=t[8];return e[0]=u*i+d*s+p*h,e[1]=u*n+d*o+p*l,e[2]=u*r+d*a+p*c,e[3]=f*i+g*s+m*h,e[4]=f*n+g*o+m*l,e[5]=f*r+g*a+m*c,e[6]=y*i+v*s+t*h,e[7]=y*n+v*o+t*l,e[8]=y*r+v*a+t*c,this},translate:function(t){var e=this.val,i=t.x,t=t.y;return e[6]=i*e[0]+t*e[3]+e[6],e[7]=i*e[1]+t*e[4]+e[7],e[8]=i*e[2]+t*e[5]+e[8],this},rotate:function(t){var e=this.val,i=e[0],n=e[1],r=e[2],s=e[3],o=e[4],a=e[5],h=Math.sin(t),t=Math.cos(t);return e[0]=t*i+h*s,e[1]=t*n+h*o,e[2]=t*r+h*a,e[3]=t*s-h*i,e[4]=t*o-h*n,e[5]=t*a-h*r,this},scale:function(t){var e=this.val,i=t.x,t=t.y;return e[0]=i*e[0],e[1]=i*e[1],e[2]=i*e[2],e[3]=t*e[3],e[4]=t*e[4],e[5]=t*e[5],this},fromQuat:function(t){var e=t.x,i=t.y,n=t.z,t=t.w,r=e+e,s=i+i,o=n+n,a=e*r,h=e*s,e=e*o,l=i*s,i=i*o,n=n*o,r=t*r,s=t*s,t=t*o,o=this.val;return o[0]=1-(l+n),o[3]=h+t,o[6]=e-s,o[1]=h-t,o[4]=1-(a+n),o[7]=i+r,o[2]=e+s,o[5]=i-r,o[8]=1-(a+l),this},normalFromMat4:function(t){var t=t.val,e=this.val,i=t[0],n=t[1],r=t[2],s=t[3],o=t[4],a=t[5],h=t[6],l=t[7],c=t[8],u=t[9],d=t[10],p=t[11],f=t[12],g=t[13],m=t[14],t=t[15],y=i*a-n*o,v=i*h-r*o,x=i*l-s*o,b=n*h-r*a,w=n*l-s*a,T=r*l-s*h,S=c*g-u*f,P=c*m-d*f,c=c*t-p*f,_=u*m-d*g,u=u*t-p*g,d=d*t-p*m,p=y*d-v*u+x*_+b*c-w*P+T*S;return p?(e[0]=(a*d-h*u+l*_)*(p=1/p),e[1]=(h*c-o*d-l*P)*p,e[2]=(o*u-a*c+l*S)*p,e[3]=(r*u-n*d-s*_)*p,e[4]=(i*d-r*c+s*P)*p,e[5]=(n*c-i*u-s*S)*p,e[6]=(g*T-m*w+t*b)*p,e[7]=(m*x-f*T-t*v)*p,e[8]=(f*w-g*x+t*y)*p,this):null}});t.exports=n},function(t,e,i){var n=i(0),r=i(364),s=i(1),i=i(39),o=new Int8Array([1,2,0]),a=new Float32Array([0,0,0]),h=new i(1,0,0),l=new i(0,1,0),c=new i,u=new r,i=new n({initialize:function(t,e,i,n){this.onChangeCallback=s,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,r){return void 0===r&&(r=!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),r&&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,r=t*t+e*e+i*i+n*n;return 0<r&&(r=1/Math.sqrt(r),this._x=t*r,this._y=e*r,this._z=i*r,this._w=n*r),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){var i=this.x,n=this.y,r=this.z,s=this.w;return this.set(i+(e=void 0===e?0:e)*(t.x-i),n+e*(t.y-n),r+e*(t.z-r),s+e*(t.w-s))},rotationTo:function(t,e){var i=t.x*e.x+t.y*e.y+t.z*e.z;return i<-.999999?(c.copy(h).cross(t).length()<1e-6&&c.copy(l).cross(t),c.normalize(),this.setAxisAngle(c,Math.PI)):.999999<i?this.set(0,0,0,1):(c.copy(t).cross(e),this._x=c.x,this._y=c.y,this._z=c.z,this._w=1+i,this.normalize())},setAxes:function(t,e,i){var n=u.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(u).normalize()},identity:function(){return this.set(0,0,0,1)},setAxisAngle:function(t,e){e*=.5;var i=Math.sin(e);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,r=this.w,s=t.x,o=t.y,a=t.z,t=t.w;return this.set(e*t+r*s+i*a-n*o,i*t+r*o+n*s-e*a,n*t+r*a+e*o-i*s,r*t-e*s-i*o-n*a)},slerp:function(t,e){var i=this.x,n=this.y,r=this.z,s=this.w,o=t.x,a=t.y,h=t.z,t=t.w,l=i*o+n*a+r*h+s*t;l<0&&(l=-l,o=-o,a=-a,h=-h,t=-t);var c,u=1-e,d=e;return 1e-6<1-l&&(l=Math.acos(l),c=Math.sin(l),u=Math.sin((1-e)*l)/c,d=Math.sin(e*l)/c),this.set(u*i+d*o,u*n+d*a,u*r+d*h,u*s+d*t)},invert:function(){var t=this.x,e=this.y,i=this.z,n=this.w,r=t*t+e*e+i*i+n*n,r=r?1/r: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,r=this.w,s=Math.sin(t),t=Math.cos(t);return this.set(e*t+r*s,i*t+n*s,n*t-i*s,r*t-e*s)},rotateY:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,r=this.w,s=Math.sin(t),t=Math.cos(t);return this.set(e*t-n*s,i*t+r*s,n*t+e*s,r*t-i*s)},rotateZ:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,r=this.w,s=Math.sin(t),t=Math.cos(t);return this.set(e*t+i*s,i*t-e*s,n*t+r*s,r*t-n*s)},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,r=t.z/2,s=Math.cos(i),o=Math.cos(n),a=Math.cos(r),h=Math.sin(i),l=Math.sin(n),c=Math.sin(r);switch(t.order){case"XYZ":this.set(h*o*a+s*l*c,s*l*a-h*o*c,s*o*c+h*l*a,s*o*a-h*l*c,e);break;case"YXZ":this.set(h*o*a+s*l*c,s*l*a-h*o*c,s*o*c-h*l*a,s*o*a+h*l*c,e);break;case"ZXY":this.set(h*o*a-s*l*c,s*l*a+h*o*c,s*o*c+h*l*a,s*o*a-h*l*c,e);break;case"ZYX":this.set(h*o*a-s*l*c,s*l*a+h*o*c,s*o*c-h*l*a,s*o*a+h*l*c,e);break;case"YZX":this.set(h*o*a+s*l*c,s*l*a+h*o*c,s*o*c-h*l*a,s*o*a-h*l*c,e);break;case"XZY":this.set(h*o*a-s*l*c,s*l*a-h*o*c,s*o*c+h*l*a,s*o*a+h*l*c,e)}return this},setFromRotationMatrix:function(t){var e,t=t.val,i=t[0],n=t[4],r=t[8],s=t[1],o=t[5],a=t[9],h=t[2],l=t[6],t=t[10],c=i+o+t;return 0<c?(e=.5/Math.sqrt(c+1),this.set((l-a)*e,(r-h)*e,(s-n)*e,.25/e)):o<i&&t<i?(e=2*Math.sqrt(1+i-o-t),this.set(.25*e,(n+s)/e,(r+h)/e,(l-a)/e)):t<o?(e=2*Math.sqrt(1+o-i-t),this.set((n+s)/e,.25*e,(a+l)/e,(r-h)/e)):(e=2*Math.sqrt(1+t-i-o),this.set((r+h)/e,(a+l)/e,.25*e,(s-n)/e)),this},fromMat3:function(t){var e,i,n,t=t.val,r=t[0]+t[4]+t[8];return 0<r?(n=Math.sqrt(r+1),this.w=.5*n,this._x=(t[7]-t[5])*(n=.5/n),this._y=(t[2]-t[6])*n,this._z=(t[3]-t[1])*n):(t[4]>t[r=0]&&(r=1),t[8]>t[3*r+r]&&(r=2),e=o[r],i=o[e],n=Math.sqrt(t[3*r+r]-t[3*e+e]-t[3*i+i]+1),a[r]=.5*n,a[e]=(t[3*e+r]+t[3*r+e])*(n=.5/n),a[i]=(t[3*i+r]+t[3*r+i])*n,this._x=a[0],this._y=a[1],this._z=a[2],this._w=(t[3*i+e]-t[3*e+i])*n),this.onChangeCallback(this),this}});t.exports=i},function(t,e,r){var s=r(367),o=r(31),a=r(33),h=r(191);t.exports=function(t){var e=t.config;if((e.customEnvironment||e.canvas)&&e.renderType===a.AUTO)throw new Error("Must set explicit renderType in custom environment");if(!e.customEnvironment&&!e.canvas&&e.renderType!==a.HEADLESS)if(e.renderType===a.CANVAS||e.renderType!==a.CANVAS&&!h.webGL){if(!h.canvas)throw new Error("Cannot create Canvas or WebGL context, aborting.");e.renderType=a.CANVAS}else e.renderType=a.WEBGL;e.antialias||o.disableSmoothing();var i=t.scale.baseSize,n=i.width,i=i.height;e.canvas?(t.canvas=e.canvas,t.canvas.width=n,t.canvas.height=i):t.canvas=o.create(t,n,i,e.renderType),e.canvasStyle&&(t.canvas.style=e.canvasStyle),e.antialias||s.setCrisp(t.canvas),e.renderType!==a.HEADLESS&&(n=r(368),i=r(371),e.renderType===a.WEBGL?t.renderer=new i(t):(t.renderer=new n(t),t.context=t.renderer.gameContext))}},function(t,e){t.exports={setCrisp:function(e){return["optimizeSpeed","-moz-crisp-edges","-o-crisp-edges","-webkit-optimize-contrast","optimize-contrast","crisp-edges","pixelated"].forEach(function(t){e.style["image-rendering"]=t}),e.style.msInterpolationMode="nearest-neighbor",e},setBicubic:function(t){return t.style["image-rendering"]="auto",t.style.msInterpolationMode="bicubic",t}}},function(t,e,i){var d=i(37),l=i(369),n=i(0),r=i(33),s=i(9),p=i(91),o=i(370),a=i(104),h=i(106),c=i(25),i=new n({Extends:s,initialize:function(t){s.call(this);var e=t.config,i=(this.config={clearBeforeRender:e.clearBeforeRender,backgroundColor:e.backgroundColor,antialias:e.antialias,roundPixels:e.roundPixels},this.game=t,this.type=r.CANVAS,this.drawCount=0,this.width=0,this.height=0,this.gameCanvas=t.canvas,{alpha:t.config.transparent,desynchronized:t.config.desynchronized});this.gameContext=e.context||this.gameCanvas.getContext("2d",i),this.currentContext=this.gameContext,this.antialias=t.config.antialias,this.blendModes=o(),this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92},this._tempMatrix1=new c,this._tempMatrix2=new c,this._tempMatrix3=new c,this.isBooted=!1,this.init()},init:function(){this.game.textures.once(h.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(a.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)},resize:function(t,e){this.width=t,this.height=e,this.emit(p.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),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(p.PRE_RENDER)},render:function(t,e,i){var n=e.length,r=(this.emit(p.RENDER,t,i),i.x),s=i.y,o=i.width,a=i.height,h=(i.renderToTexture?i:t.sys).context,l=(h.save(),this.game.scene.customViewports&&(h.beginPath(),h.rect(r,s,o,a),h.clip()),this.currentContext=h,i.mask);l&&l.preRenderCanvas(this,null,i._maskCamera),i.transparent||(h.fillStyle=i.backgroundColor.rgba,h.fillRect(r,s,o,a)),h.globalAlpha=i.alpha,h.globalCompositeOperation="source-over",this.drawCount+=n,i.renderToTexture&&i.emit(d.PRE_RENDER,i),i.matrix.copyToContext(h);for(var c=0;c<n;c++){var u=e[c];u.mask&&u.mask.preRenderCanvas(this,u,i),u.renderCanvas(this,u,i),u.mask&&u.mask.postRenderCanvas(this,u,i)}h.setTransform(1,0,0,1,0,0),h.globalCompositeOperation="source-over",h.globalAlpha=1,i.flashEffect.postRenderCanvas(h),i.fadeEffect.postRenderCanvas(h),i.dirty=!1,l&&l.postRenderCanvas(this),h.restore(),i.renderToTexture&&(i.emit(d.POST_RENDER,i),i.renderToGame&&t.sys.context.drawImage(i.canvas,r,s))},postRender:function(){this.gameContext.restore(),this.emit(p.POST_RENDER);var t=this.snapshotState;t.callback&&(l(this.gameCanvas,t),t.callback=null)},snapshotCanvas:function(t,e,i,n,r,s,o,a,h){void 0===i&&(i=!1),this.snapshotArea(n,r,s,o,e,a,h);n=this.snapshotState;return n.getPixel=i,l(this.canvas,n),n.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,r,s,o){var a=this.snapshotState;return a.callback=r,a.type=s,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 r,s,o,a,h,l,c,u,d,p,f,g,m,y,v,x=i.alpha*t.alpha;0!=x&&(r=this.currentContext,s=this._tempMatrix1,o=this._tempMatrix2,a=(h=e.canvasData).x,h=h.y,l=e.cutWidth,c=e.cutHeight,u=e.customPivot,d=e.source.resolution,p=t.displayOriginX,f=t.displayOriginY,g=-p+e.x,m=-f+e.y,t.isCropped&&((y=t._crop).flipX===t.flipX&&y.flipY===t.flipY||e.updateCropUVs(y,t.flipX,t.flipY),l=y.cw,c=y.ch,a=y.cx,h=y.cy,g=-p+y.x,m=-f+y.y,t.flipX&&(0<=g?g=-(g+l):g<0&&(g=Math.abs(g)-l)),t.flipY&&(0<=m?m=-(m+c):m<0&&(m=Math.abs(m)-c))),v=y=1,t.flipX&&(u||(g+=-e.realWidth+2*p),y=-1),t.flipY&&(u||(m+=-e.realHeight+2*f),v=-1),o.applyITRS(t.x,t.y,t.rotation,t.scaleX*y,t.scaleY*v),s.copyFrom(i.matrix),n?(s.multiplyWithOffset(n,-i.scrollX*t.scrollFactorX,-i.scrollY*t.scrollFactorY),o.e=t.x,o.f=t.y):(o.e-=i.scrollX*t.scrollFactorX,o.f-=i.scrollY*t.scrollFactorY),s.multiply(o),r.save(),s.setToContext(r),r.globalCompositeOperation=this.blendModes[t.blendMode],r.globalAlpha=x,r.imageSmoothingEnabled=!(!this.antialias||e.source.scaleMode),t.mask&&t.mask.preRenderCanvas(this,t,i),r.drawImage(e.source.image,a,h,l,c,g,m,l/d,c/d),t.mask&&t.mask.postRenderCanvas(this,t,i),r.restore())},destroy:function(){this.removeAllListeners(),this.game=null,this.gameCanvas=null,this.gameContext=null}});t.exports=i},function(t,e,i){var d=i(31),p=i(38),f=i(2);t.exports=function(t,e){var i,n,r,s=f(e,"callback"),o=f(e,"type","image/png"),a=f(e,"encoder",.92),h=Math.abs(Math.round(f(e,"x",0))),l=Math.abs(Math.round(f(e,"y",0))),c=f(e,"width",t.width),u=f(e,"height",t.height);f(e,"getPixel",!1)?(e=t.getContext("2d").getImageData(h,l,1,1).data,s.call(null,new p(e[0],e[1],e[2],e[3]/255))):0!==h||0!==l||c!==t.width||u!==t.height?((i=d.createWebGL(this,c,u)).getContext("2d").drawImage(t,h,l,c,u,0,0,c,u),(n=new Image).onerror=function(){s.call(null),d.remove(i)},n.onload=function(){s.call(null,n),d.remove(i)},n.src=i.toDataURL(o,a)):((r=new Image).onerror=function(){s.call(null)},r.onload=function(){s.call(null,r)},r.src=t.toDataURL(o,a))}},function(t,e,i){var n=i(35),r=i(348);t.exports=function(){var t=[],e=r.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}},function(t,e,i){var n=i(93),o=i(37),r=i(0),p=i(33),s=i(9),h=i(91),f=i(22),g=i(138),m=i(69),a=i(1),y=i(372),l=i(141),c=i(104),v=i(106),x=i(12),d=i(383),i=new r({Extends:s,initialize:function(t){s.call(this);var e=t.config,i={alpha:e.transparent,desynchronized:e.desynchronized,depth:!1,antialias:e.antialiasGL,premultipliedAlpha:e.premultipliedAlpha,stencil:!0,failIfMajorPerformanceCaveat:e.failIfMajorPerformanceCaveat,powerPreference:e.powerPreference,preserveDrawingBuffer:e.preserveDrawingBuffer};this.config={clearBeforeRender:e.clearBeforeRender,antialias:e.antialias,backgroundColor:e.backgroundColor,contextCreation:i,roundPixels:e.roundPixels,maxTextures:e.maxTextures,maxTextureSize:e.maxTextureSize,batchSize:e.batchSize,maxLights:e.maxLights,mipmapFilter:e.mipmapFilter},this.game=t,this.type=p.WEBGL,this.pipelines=null,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},this.currentActiveTexture=0,this.startActiveTexture=0,this.maxTextures=0,this.textureIndexes,this.tempTextures,this.textureZero,this.normalTexture,this.currentFramebuffer=null,this.fboStack=[],this.currentProgram=null,this.currentBlendMode=1/0,this.currentScissorEnabled=!1,this.currentScissor=null,this.scissorStack=[],this.contextLostHandler=a,this.contextRestoredHandler=a,this.gl=null,this.supportedExtensions=null,this.instancedArraysExtension=null,this.vaoExtension=null,this.extensions={},this.glFormats=[],this.compression={ETC1:!1,PVRTC:!1,S3TC:!1},this.drawingBufferHeight=0,this.blankTexture=null,this.whiteTexture=null,this.maskCount=0,this.maskStack=[],this.currentMask={mask:null,camera:null},this.currentCameraMask={mask:null,camera:null},this.glFuncMap=null,this.currentType="",this.newType=!1,this.nextTypeMatch=!1,this.finalType=!1,this.mipmapFilter=null,this.textureFlush=0,this.isTextureClean=!1,this.defaultScissor=[0,0,0,0],this.isBooted=!1,this.renderTarget=null,this.projectionMatrix,this.projectionWidth=0,this.projectionHeight=0,this.init(this.config)},init:function(t){var e=this.game,i=this.canvas,n=t.backgroundColor,r=e.config.context||i.getContext("webgl",t.contextCreation)||i.getContext("experimental-webgl",t.contextCreation);if(!r||r.isContextLost())throw this.contextLost=!0,new Error("WebGL unsupported");this.gl=r;var s=this;this.contextLostHandler=function(t){s.contextLost=!0,s.game.events.emit(f.CONTEXT_LOST,s),t.preventDefault()},this.contextRestoredHandler=function(){s.contextLost=!1,s.init(s.config),s.game.events.emit(f.CONTEXT_RESTORED,s)},i.addEventListener("webglcontextlost",this.contextLostHandler,!1),i.addEventListener("webglcontextrestored",this.contextRestoredHandler,!1),e.context=r;for(var o=0;o<=27;o++)this.blendModes.push({func:[r.ONE,r.ONE_MINUS_SRC_ALPHA],equation:r.FUNC_ADD});this.blendModes[1].func=[r.ONE,r.DST_ALPHA],this.blendModes[2].func=[r.DST_COLOR,r.ONE_MINUS_SRC_ALPHA],this.blendModes[3].func=[r.ONE,r.ONE_MINUS_SRC_COLOR],this.blendModes[17]={func:[r.ZERO,r.ONE_MINUS_SRC_ALPHA],equation:r.FUNC_REVERSE_SUBTRACT},this.glFormats[0]=r.BYTE,this.glFormats[1]=r.SHORT,this.glFormats[2]=r.UNSIGNED_BYTE,this.glFormats[3]=r.UNSIGNED_SHORT,this.glFormats[4]=r.FLOAT,this.glFuncMap={mat2:{func:r.uniformMatrix2fv,length:1,matrix:!0},mat3:{func:r.uniformMatrix3fv,length:1,matrix:!0},mat4:{func:r.uniformMatrix4fv,length:1,matrix:!0},"1f":{func:r.uniform1f,length:1},"1fv":{func:r.uniform1fv,length:1},"1i":{func:r.uniform1i,length:1},"1iv":{func:r.uniform1iv,length:1},"2f":{func:r.uniform2f,length:2},"2fv":{func:r.uniform2fv,length:1},"2i":{func:r.uniform2i,length:2},"2iv":{func:r.uniform2iv,length:1},"3f":{func:r.uniform3f,length:3},"3fv":{func:r.uniform3fv,length:1},"3i":{func:r.uniform3i,length:3},"3iv":{func:r.uniform3iv,length:1},"4f":{func:r.uniform4f,length:4},"4fv":{func:r.uniform4fv,length:1},"4i":{func:r.uniform4i,length:4},"4iv":{func:r.uniform4iv,length:1}};var i=r.getSupportedExtensions(),a=(t.maxTextures&&-1!==t.maxTextures||(t.maxTextures=r.getParameter(r.MAX_TEXTURE_IMAGE_UNITS)),t.maxTextureSize||(t.maxTextureSize=r.getParameter(r.MAX_TEXTURE_SIZE)),"WEBGL_compressed_texture_"),h="WEBKIT_"+a,a=(this.compression.ETC1=r.getExtension(a+"etc1")||r.getExtension(h+"etc1"),this.compression.PVRTC=r.getExtension(a+"pvrtc")||r.getExtension(h+"pvrtc"),this.compression.S3TC=r.getExtension(a+"s3tc")||r.getExtension(h+"s3tc"),this.supportedExtensions=i,"ANGLE_instanced_arrays"),h=(this.instancedArraysExtension=-1<i.indexOf(a)?r.getExtension(a):null,"OES_vertex_array_object"),l=(this.vaoExtension=-1<i.indexOf(h)?r.getExtension(h):null,r.disable(r.DEPTH_TEST),r.disable(r.CULL_FACE),r.enable(r.BLEND),r.clearColor(n.redGL,n.greenGL,n.blueGL,n.alphaGL),this.mipmapFilter=r[t.mipmapFilter],this.maxTextures=x.checkShaderMax(r,t.maxTextures),this.textureIndexes=[],this.tempTextures);if(Array.isArray(l))for(var c=0;o<this.maxTextures;c++)r.deleteTexture(l[c]);else l=new Array(this.maxTextures);for(var u=0;u<this.maxTextures;u++){var d=r.createTexture();r.activeTexture(r.TEXTURE0+u),r.bindTexture(r.TEXTURE_2D,d),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,1,1,0,r.RGBA,r.UNSIGNED_BYTE,new Uint8Array([0,0,255,255])),l[u]=d,this.textureIndexes.push(u)}return this.tempTextures=l,this.currentActiveTexture=1,this.startActiveTexture++,r.activeTexture(r.TEXTURE1),this.pipelines=new y(this),this.setBlendMode(p.BlendModes.NORMAL),this.projectionMatrix=(new m).identity(),e.textures.once(v.READY,this.boot,this),this},boot:function(){var t=this.game,e=this.pipelines,i=t.scale.baseSize,e=(this.width=i.width,this.height=i.height,this.isBooted=!0,this.renderTarget=new l(this,this.width,this.height,1,0,!0,!0),e.boot(t.config.pipeline),this.blankTexture=t.textures.getFrame("__DEFAULT"),this.whiteTexture=t.textures.getFrame("__WHITE"),this.gl);e.bindFramebuffer(e.FRAMEBUFFER,null),e.enable(e.SCISSOR_TEST),t.scale.on(c.RESIZE,this.onResize,this),this.resize(i.width,i.height)},onResize:function(t,e){e.width===this.width&&e.height===this.height||this.resize(e.width,e.height)},beginCapture:function(t,e){void 0===t&&(t=this.width),void 0===e&&(e=this.height),this.renderTarget.bind(!0,t,e),this.setProjectionMatrix(t,e),this.resetTextures()},endCapture:function(){return this.renderTarget.unbind(!0),this.resetProjectionMatrix(),this.renderTarget},resize:function(t,e){var i=this.gl;return this.width=t,this.height=e,this.setProjectionMatrix(t,e),i.viewport(0,0,t,e),this.drawingBufferHeight=i.drawingBufferHeight,i.scissor(0,i.drawingBufferHeight-e,t,e),this.defaultScissor[2]=t,this.defaultScissor[3]=e,this.emit(h.RESIZE,t,e),this},getAspectRatio:function(){return this.width/this.height},setProjectionMatrix:function(t,e){return t===this.projectionWidth&&e===this.projectionHeight||(this.projectionWidth=t,this.projectionHeight=e,this.projectionMatrix.ortho(0,t,e,0,-1e3,1e3)),this},resetProjectionMatrix:function(){this.projectionWidth=this.width,this.projectionHeight=this.height,this.projectionMatrix.ortho(0,this.width,this.height,0,-1e3,1e3)},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},flush:function(){this.pipelines.flush()},pushScissor:function(t,e,i,n,r){void 0===r&&(r=this.drawingBufferHeight);var s=[t,e,i,n];return this.scissorStack.push(s),this.setScissor(t,e,i,n,r),this.currentScissor=s},setScissor:function(t,e,i,n,r){void 0===r&&(r=this.drawingBufferHeight);var s,o,a,h=this.gl,l=this.currentScissor,c=0<i&&0<n;l&&c&&(s=l[0],o=l[1],a=l[2],l=l[3],c=s!==t||o!==e||a!==i||l!==n),c&&(this.flush(),h.scissor(t,r-e-n,i,n))},resetScissor:function(){var t=this.gl;t.enable(t.SCISSOR_TEST);var e,i,n,r=this.currentScissor;r&&(e=r[0],i=r[1],n=r[2],r=r[3],0<n&&0<r&&t.scissor(e,this.drawingBufferHeight-i-r,n,r))},popScissor:function(){var t=this.scissorStack,t=(t.pop(),t[t.length-1]);t&&this.setScissor(t[0],t[1],t[2],t[3]),this.currentScissor=t},hasActiveStencilMask:function(){var t=this.currentMask.mask,e=this.currentCameraMask.mask;return t&&t.isStencil||e&&e.isStencil},resetViewport:function(){var t=this.gl;t.viewport(0,0,this.width,this.height),this.drawingBufferHeight=t.drawingBufferHeight},setBlendMode:function(t,e){var i=this.gl,n=this.blendModes[t];return!!((e=void 0===e?!1:e)||t!==p.BlendModes.SKIP_CHECK&&this.currentBlendMode!==t)&&(this.flush(),i.enable(i.BLEND),i.blendEquation(n.equation),2<n.func.length?i.blendFuncSeparate(n.func[0],n.func[1],n.func[2],n.func[3]):i.blendFunc(n.func[0],n.func[1]),this.currentBlendMode=t,!0)},addBlendMode:function(t,e){return this.blendModes.push({func:t,equation:e})-1},updateBlendMode:function(t,e,i){return this.blendModes[t]&&(this.blendModes[t].func=e,i&&(this.blendModes[t].equation=i)),this},removeBlendMode:function(t){return 17<t&&this.blendModes[t]&&this.blendModes.splice(t,1),this},setBlankTexture:function(){this.setTexture2D(this.blankTexture.glTexture)},setTextureSource:function(t){var e,i;return this.pipelines.forceZero()?(this.setTextureZero(t.glTexture,!0),0):(e=this.gl,i=this.currentActiveTexture,t.glIndexCounter<this.startActiveTexture&&(t.glIndexCounter=this.startActiveTexture,i<this.maxTextures?(t.glIndex=i,e.activeTexture(e.TEXTURE0+i),e.bindTexture(e.TEXTURE_2D,t.glTexture),this.currentActiveTexture++):(this.flush(),this.startActiveTexture++,this.textureFlush++,t.glIndexCounter=this.startActiveTexture,t.glIndex=1,e.activeTexture(e.TEXTURE1),e.bindTexture(e.TEXTURE_2D,t.glTexture),this.currentActiveTexture=2)),this.isTextureClean=!1,t.glIndex)},isNewNormalMap:function(t,e){return this.textureZero!==t||this.normalTexture!==e},setTextureZero:function(t,e){this.textureZero!==t&&(e&&this.flush(),(e=this.gl).activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,t),this.textureZero=t)},clearTextureZero:function(){this.textureZero=null},setNormalMap:function(t){var e;this.normalTexture!==t&&((e=this.gl).activeTexture(e.TEXTURE1),e.bindTexture(e.TEXTURE_2D,t),this.normalTexture=t,1===this.currentActiveTexture&&(this.currentActiveTexture=2))},clearNormalMap:function(){this.normalTexture=null,this.startActiveTexture++,this.currentActiveTexture=1,this.textureFlush++},unbindTextures:function(){for(var t=this.gl,e=this.tempTextures,i=0;i<e.length;i++)t.activeTexture(t.TEXTURE0+i),t.bindTexture(t.TEXTURE_2D,null);this.normalTexture=null,this.textureZero=null,this.currentActiveTexture=1,this.startActiveTexture++,this.textureFlush++},resetTextures:function(t){if(void 0===t&&(t=!1),!this.isTextureClean){this.flush();var e=this.gl,i=this.tempTextures;if(t){for(var n=0;n<i.length;n++)e.activeTexture(e.TEXTURE0+n),e.bindTexture(e.TEXTURE_2D,i[n]);e.activeTexture(e.TEXTURE1),e.bindTexture(e.TEXTURE_2D,i[1]),this.isTextureClean=!0}else e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,i[0]),e.activeTexture(e.TEXTURE1),e.bindTexture(e.TEXTURE_2D,i[1]);this.normalTexture=null,this.textureZero=null,this.currentActiveTexture=1,this.startActiveTexture++,this.textureFlush++}},setTexture2D:function(t){var e,i;return this.pipelines.forceZero()?(this.setTextureZero(t,!0),0):(e=this.gl,i=this.currentActiveTexture,t.glIndexCounter<this.startActiveTexture&&(t.glIndexCounter=this.startActiveTexture,i<this.maxTextures?(t.glIndex=i,e.activeTexture(e.TEXTURE0+i),e.bindTexture(e.TEXTURE_2D,t),this.currentActiveTexture++):(this.flush(),this.startActiveTexture++,this.textureFlush++,t.glIndexCounter=this.startActiveTexture,t.glIndex=1,e.activeTexture(e.TEXTURE1),e.bindTexture(e.TEXTURE_2D,t),this.currentActiveTexture=2)),this.isTextureClean=!1,t.glIndex)},pushFramebuffer:function(t,e,i,n){return t===this.currentFramebuffer?this:(this.fboStack.push(t),this.setFramebuffer(t,e,i,n))},setFramebuffer:function(t,e,i,n){var r,s,o;return void 0===e&&(e=!1),void 0===i&&(i=!1),void 0===n&&(n=!0),t!==this.currentFramebuffer&&(r=this.gl,s=this.width,o=this.height,t&&t.renderTexture&&n?(s=t.renderTexture.width,o=t.renderTexture.height):this.flush(),r.bindFramebuffer(r.FRAMEBUFFER,t),n&&r.viewport(0,0,s,o),e&&(t?(this.drawingBufferHeight=o,this.pushScissor(0,0,s,o)):(this.drawingBufferHeight=this.height,this.popScissor())),this.currentFramebuffer=t,i&&this.resetTextures()),this},popFramebuffer:function(t,e,i){void 0===t&&(t=!1),void 0===e&&(e=!1),void 0===i&&(i=!0);var n=this.fboStack,n=(n.pop(),n[n.length-1]||null);return this.setFramebuffer(n,t,e,i),n},setProgram:function(t){return t!==this.currentProgram&&(this.flush(),this.gl.useProgram(t),this.currentProgram=t,!0)},resetProgram:function(){return this.gl.useProgram(this.currentProgram),this},createTextureFromSource:function(t,e,i,n){var r=this.gl,s=r.NEAREST,o=r.NEAREST,a=r.CLAMP_TO_EDGE,h=(e=t?t.width:e,i=t?t.height:i,g(e,i));return h&&(a=r.REPEAT),n===p.ScaleModes.LINEAR&&this.config.antialias&&(s=h?this.mipmapFilter:r.LINEAR,o=r.LINEAR),t||"number"!=typeof e||"number"!=typeof i?this.createTexture2D(0,s,o,a,a,r.RGBA,t):this.createTexture2D(0,s,o,a,a,r.RGBA,null,e,i)},createTexture2D:function(t,e,i,n,r,s,o,a,h,l,c,u){l=null==l||l,void 0===c&&(c=!1),void 0===u&&(u=!1);var d=this.gl,p=d.createTexture(),f=(d.activeTexture(d.TEXTURE0),d.getParameter(d.TEXTURE_BINDING_2D));return d.bindTexture(d.TEXTURE_2D,p),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MIN_FILTER,e),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MAG_FILTER,i),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_S,r),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_T,n),d.pixelStorei(d.UNPACK_PREMULTIPLY_ALPHA_WEBGL,l),d.pixelStorei(d.UNPACK_FLIP_Y_WEBGL,u),null==o?d.texImage2D(d.TEXTURE_2D,t,s,a,h,0,s,d.UNSIGNED_BYTE,null):(c||(a=o.width,h=o.height),d.texImage2D(d.TEXTURE_2D,t,s,s,d.UNSIGNED_BYTE,o)),g(a,h)&&d.generateMipmap(d.TEXTURE_2D),f&&d.bindTexture(d.TEXTURE_2D,f),p.isAlphaPremultiplied=l,p.isRenderTexture=!1,p.width=a,p.height=h,p.glIndex=0,p.glIndexCounter=-1,p},createFramebuffer:function(t,e,i,n){var r=this.gl,s=r.createFramebuffer();if(this.setFramebuffer(s),n&&(n=r.createRenderbuffer(),r.bindRenderbuffer(r.RENDERBUFFER,n),r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,t,e),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,n)),i.isRenderTexture=!0,i.isAlphaPremultiplied=!1,r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,i,0),(t=r.checkFramebufferStatus(r.FRAMEBUFFER))===r.FRAMEBUFFER_COMPLETE)return s.renderTexture=i,this.setFramebuffer(null),this.resetTextures(),s;throw new Error("Framebuffer status: "+{36054:"Incomplete Attachment",36055:"Missing Attachment",36057:"Incomplete Dimensions",36061:"Framebuffer Unsupported"}[t])},createProgram:function(t,e){var i=this.gl,n=i.createProgram(),r=i.createShader(i.VERTEX_SHADER),s=i.createShader(i.FRAGMENT_SHADER);if(i.shaderSource(r,t),i.shaderSource(s,e),i.compileShader(r),i.compileShader(s),!i.getShaderParameter(r,i.COMPILE_STATUS))throw new Error("Vertex Shader failed:\n"+i.getShaderInfoLog(r));if(!i.getShaderParameter(s,i.COMPILE_STATUS))throw new Error("Fragment Shader failed:\n"+i.getShaderInfoLog(s));if(i.attachShader(n,r),i.attachShader(n,s),i.linkProgram(n),i.getProgramParameter(n,i.LINK_STATUS))return i.useProgram(n),n;throw new Error("Link Program failed:\n"+i.getProgramInfoLog(n))},createVertexBuffer:function(t,e){var i=this.gl,n=i.createBuffer();return i.bindBuffer(i.ARRAY_BUFFER,n),i.bufferData(i.ARRAY_BUFFER,t,e),i.bindBuffer(i.ARRAY_BUFFER,null),n},createIndexBuffer:function(t,e){var i=this.gl,n=i.createBuffer();return i.bindBuffer(i.ELEMENT_ARRAY_BUFFER,n),i.bufferData(i.ELEMENT_ARRAY_BUFFER,t,e),i.bindBuffer(i.ELEMENT_ARRAY_BUFFER,null),n},deleteTexture:function(t,e){return e&&this.resetTextures(!0),t&&this.gl.deleteTexture(t),this},deleteFramebuffer:function(t){return t&&(this.gl.deleteFramebuffer(t),n(this.fboStack,t),this.currentFramebuffer===t&&(this.currentFramebuffer=null)),this},deleteProgram:function(t){return t&&this.gl.deleteProgram(t),this},deleteBuffer:function(t){return this.gl.deleteBuffer(t),this},preRenderCamera:function(t){var e=t.x,i=t.y,n=t.width,r=t.height,s=t.backgroundColor;t.emit(o.PRE_RENDER,t),this.pipelines.preBatchCamera(t),this.pushScissor(e,i,n,r),t.mask&&(this.currentCameraMask.mask=t.mask,this.currentCameraMask.camera=t._maskCamera,t.mask.preRenderWebGL(this,t,t._maskCamera)),0<s.alphaGL&&this.pipelines.setMulti().drawFillRect(e,i,n,r,x.getTintFromFloats(s.blueGL,s.greenGL,s.redGL,1),s.alphaGL)},getCurrentStencilMask:function(){var t=null,e=this.maskStack,i=this.currentCameraMask;return 0<e.length?t=e[e.length-1]:i.mask&&i.mask.isStencil&&(t=i),t},postRenderCamera:function(t){var e,i=t.flashEffect,n=t.fadeEffect;(i.isRunning||n.isRunning||n.isComplete)&&(e=this.pipelines.setMulti(),i.postRenderWebGL(e,x.getTintFromFloats),n.postRenderWebGL(e,x.getTintFromFloats)),t.dirty=!1,this.popScissor(),t.mask&&(this.currentCameraMask.mask=null,t.mask.postRenderWebGL(this,t._maskCamera)),this.pipelines.postBatchCamera(t),t.emit(o.POST_RENDER,t)},preRender:function(){var t,e;this.contextLost||((t=this.gl).bindFramebuffer(t.FRAMEBUFFER,null),this.config.clearBeforeRender&&(e=this.config.backgroundColor,t.clearColor(e.redGL,e.greenGL,e.blueGL,e.alphaGL),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT|t.STENCIL_BUFFER_BIT)),t.enable(t.SCISSOR_TEST),this.currentScissor=this.defaultScissor,this.scissorStack.length=0,this.scissorStack.push(this.currentScissor),this.game.scene.customViewports&&t.scissor(0,this.drawingBufferHeight-this.height,this.width,this.height),this.currentMask.mask=null,this.currentCameraMask.mask=null,this.maskStack.length=0,this.textureFlush=0,this.emit(h.PRE_RENDER))},render:function(t,e,i){if(!this.contextLost){var n=e.length;if(this.emit(h.RENDER,t,i),this.preRenderCamera(i),0===n);else{this.currentType="";for(var r=this.currentMask,s=0;s<n;s++){this.finalType=s===n-1;var o=e[s],a=o.mask,a=((r=this.currentMask).mask&&r.mask!==a&&r.mask.postRenderWebGL(this,r.camera),a&&r.mask!==a&&a.preRenderWebGL(this,o,i),o.blendMode!==this.currentBlendMode&&this.setBlendMode(o.blendMode),o.type);a!==this.currentType&&(this.newType=!0,this.currentType=a),this.finalType?this.nextTypeMatch=!1:this.nextTypeMatch=e[s+1].type===this.currentType,o.renderWebGL(this,o,i),this.newType=!1}(r=this.currentMask).mask&&r.mask.postRenderWebGL(this,r.camera)}this.setBlendMode(p.BlendModes.NORMAL),this.postRenderCamera(i)}},postRender:function(){var t;this.contextLost||(this.flush(),this.emit(h.POST_RENDER),(t=this.snapshotState).callback&&(d(this.canvas,t),t.callback=null),0<this.textureFlush&&(this.startActiveTexture++,this.currentActiveTexture=1))},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,r,s,o){var a=this.snapshotState;return a.callback=r,a.type=s,a.encoder=o,a.getPixel=!1,a.x=t,a.y=e,a.width=Math.min(i,this.gl.drawingBufferWidth),a.height=Math.min(n,this.gl.drawingBufferHeight),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,r,s,o,a,h,l,c){void 0===r&&(r=!1);var u=this.currentFramebuffer,s=(this.snapshotArea(s=void 0===s?0:s,o=void 0===o?0:o,a=void 0===a?e:a,h=void 0===h?i:h,n,l,c),this.snapshotState);return s.getPixel=r,s.isFramebuffer=!0,s.bufferWidth=e,s.bufferHeight=i,this.setFramebuffer(t),d(this.canvas,s),this.setFramebuffer(u),s.callback=null,s.isFramebuffer=!1,this},canvasToTexture:function(t,e,i,n){return void 0===i&&(i=!1),void 0===n&&(n=!1),e?this.updateCanvasTexture(t,e,n):this.createCanvasTexture(t,i,n)},createCanvasTexture:function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var n=this.gl,r=n.NEAREST,s=n.NEAREST,o=t.width,a=t.height,h=n.CLAMP_TO_EDGE,l=g(o,a);return!e&&l&&(h=n.REPEAT),this.config.antialias&&(r=l?this.mipmapFilter:n.LINEAR,s=n.LINEAR),this.createTexture2D(0,r,s,h,h,n.RGBA,t,o,a,!0,!1,i)},updateCanvasTexture:function(t,e,i){void 0===i&&(i=!1);var n,r=this.gl,s=t.width,o=t.height;return 0<s&&0<o&&(r.activeTexture(r.TEXTURE0),n=r.getParameter(r.TEXTURE_BINDING_2D),r.bindTexture(r.TEXTURE_2D,e),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,i),r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,t),e.width=s,e.height=o,n&&r.bindTexture(r.TEXTURE_2D,n)),e},createVideoTexture:function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var n=this.gl,r=n.NEAREST,s=n.NEAREST,o=t.videoWidth,a=t.videoHeight,h=n.CLAMP_TO_EDGE,l=g(o,a);return!e&&l&&(h=n.REPEAT),this.config.antialias&&(r=l?this.mipmapFilter:n.LINEAR,s=n.LINEAR),this.createTexture2D(0,r,s,h,h,n.RGBA,t,o,a,!0,!0,i)},updateVideoTexture:function(t,e,i){void 0===i&&(i=!1);var n,r=this.gl,s=t.videoWidth,o=t.videoHeight;return 0<s&&0<o&&(r.activeTexture(r.TEXTURE0),n=r.getParameter(r.TEXTURE_BINDING_2D),r.bindTexture(r.TEXTURE_2D,e),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,i),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,t),e.width=s,e.height=o,n&&r.bindTexture(r.TEXTURE_2D,n)),e},setTextureFilter:function(t,e){var i=this.gl,e=[i.LINEAR,i.NEAREST][e],n=(i.activeTexture(i.TEXTURE0),i.getParameter(i.TEXTURE_BINDING_2D));return i.bindTexture(i.TEXTURE_2D,t),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,e),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,e),n&&i.bindTexture(i.TEXTURE_2D,n),this},getMaxTextureSize:function(){return this.config.maxTextureSize},destroy:function(){this.canvas.removeEventListener("webglcontextlost",this.contextLostHandler,!1),this.canvas.removeEventListener("webglcontextrestored",this.contextRestoredHandler,!1);for(var t=this.gl,e=this.tempTextures,i=0;i<e.length;i++)t.deleteTexture(e[i]);this.pipelines.destroy(),this.removeAllListeners(),this.fboStack=[],this.maskStack=[],this.extensions={},this.textureIndexes=[],this.gl=null,this.game=null,this.canvas=null,this.contextLost=!0,this.currentMask=null,this.currentCameraMask=null}});t.exports=i},function(t,e,i){var n=i(0),o=i(92),r=i(102),s=i(373),a=i(376),h=i(377),l=i(108),c=i(378),u=i(379),d=i(380),p=i(381),i=new n({initialize:function(t){this.game=t.game,this.renderer=t,this.classes=new r([[o.UTILITY_PIPELINE,p],[o.MULTI_PIPELINE,l],[o.BITMAPMASK_PIPELINE,s],[o.SINGLE_PIPELINE,d],[o.ROPE_PIPELINE,u],[o.LIGHT_PIPELINE,h],[o.POINTLIGHT_PIPELINE,c],[o.GRAPHICS_PIPELINE,a]]),this.postPipelineClasses=new r,this.pipelines=new r,this.current=null,this.previous=null,this.MULTI_PIPELINE=null,this.BITMAPMASK_PIPELINE=null,this.UTILITY_PIPELINE=null,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2},boot:function(t){var e,i=this,n=this.game;if(this.classes.each(function(t,e){r=i.add(t,new e({game:n})),t===o.UTILITY_PIPELINE&&(i.UTILITY_PIPELINE=r,i.fullFrame1=r.fullFrame1,i.fullFrame2=r.fullFrame2,i.halfFrame1=r.halfFrame1,i.halfFrame2=r.halfFrame2)}),this.MULTI_PIPELINE=this.get(o.MULTI_PIPELINE),this.BITMAPMASK_PIPELINE=this.get(o.BITMAPMASK_PIPELINE),t)for(e in t){var r,s=t[e];(r=new s(n)).isPostFX?this.postPipelineClasses.set(e,s):this.has(e)||(this.classes.set(e,s),this.add(e,r))}},add:function(t,e){var i,n;if(!e.isPostFX)return i=this.pipelines,n=this.renderer,i.has(t)||(e.name=t,e.manager=this,i.set(t,e)),e.hasBooted||e.boot(),0!==n.width&&0!==n.height&&e.resize(n.width,n.height),e},addPostPipeline:function(t,e){this.postPipelineClasses.has(t)||this.postPipelineClasses.set(t,e)},flush:function(){this.current&&this.current.flush()},has:function(t){var e=this.pipelines;return"string"==typeof t?e.has(t):!!e.contains(t)},get:function(t){var e=this.pipelines;return"string"==typeof t?e.get(t):e.contains(t)?t:void 0},getPostPipeline:function(t,e){var i,n=this.postPipelineClasses;if("string"==typeof t?i=n.get(t):"function"==typeof t?n.contains(t)&&(i=t):"object"==typeof t&&(i=n.get(t.name)),i)return n=new i(this.game),e&&(n.gameObject=e),n},remove:function(t,e,i){void 0===e&&(e=!0),void 0===i&&(i=!0),this.pipelines.delete(t),e&&this.classes.delete(t),i&&this.postPipelineClasses.delete(t)},set:function(t,e,i){if(!t.isPostFX)return this.isCurrent(t,i)||(this.flush(),this.current&&this.current.unbind(),(this.current=t).bind(i)),t.updateProjectionMatrix(),t.onBind(e),t},preBatch:function(t){if(t.hasPostPipeline){this.flush();for(var e=t.postPipelines,i=e.length-1;0<=i;i--){var n=e[i];n.active&&n.preBatch(t)}}},postBatch:function(t){if(t.hasPostPipeline){this.flush();for(var e=t.postPipelines,i=0;i<e.length;i++){var n=e[i];n.active&&n.postBatch(t)}}},preBatchCamera:function(t){if(t.hasPostPipeline){this.flush();for(var e=t.postPipelines,i=e.length-1;0<=i;i--){var n=e[i];n.active&&n.preBatch(t)}}},postBatchCamera:function(t){if(t.hasPostPipeline){this.flush();for(var e=t.postPipelines,i=0;i<e.length;i++){var n=e[i];n.active&&n.postBatch(t)}}},isCurrent:function(t,e){var i=this.renderer,n=this.current;return n&&!e&&(e=n.currentShader),!(n!==t||e.program!==i.currentProgram)},copyFrame:function(t,e,i,n,r){return this.setUtility(this.UTILITY_PIPELINE.copyShader).copyFrame(t,e,i,n,r),this},copyToGame:function(t){return this.setUtility(this.UTILITY_PIPELINE.copyShader).copyToGame(t),this},drawFrame:function(t,e,i,n){return this.setUtility(this.UTILITY_PIPELINE.colorMatrixShader).drawFrame(t,e,i,n),this},blendFrames:function(t,e,i,n,r){return this.setUtility(this.UTILITY_PIPELINE.linearShader).blendFrames(t,e,i,n,r),this},blendFramesAdditive:function(t,e,i,n,r){return this.setUtility(this.UTILITY_PIPELINE.addShader).blendFramesAdditive(t,e,i,n,r),this},clearFrame:function(t,e){return this.UTILITY_PIPELINE.clearFrame(t,e),this},blitFrame:function(t,e,i,n,r,s){return this.setUtility(this.UTILITY_PIPELINE.copyShader).blitFrame(t,e,i,n,r,s),this},copyFrameRect:function(t,e,i,n,r,s,o,a){return this.UTILITY_PIPELINE.copyFrameRect(t,e,i,n,r,s,o,a),this},forceZero:function(){return this.current&&this.current.forceZero},setMulti:function(){return this.set(this.MULTI_PIPELINE)},setUtility:function(t){return this.UTILITY_PIPELINE.bind(t)},rebind:function(t){void 0===t&&this.previous&&(t=this.previous);var e,i=this.renderer,n=i.gl,r=(n.disable(n.DEPTH_TEST),n.disable(n.CULL_FACE),i.hasActiveStencilMask()?n.clear(n.DEPTH_BUFFER_BIT):(n.disable(n.STENCIL_TEST),n.clear(n.DEPTH_BUFFER_BIT|n.STENCIL_BUFFER_BIT)),n.viewport(0,0,i.width,i.height),i.currentProgram=null,i.setBlendMode(0,!0),this.pipelines.entries);for(e in r)r[e].glReset=!0;t&&(this.current=t).rebind(),i.resetTextures()},clear:function(){var t=this.renderer;this.flush(),this.current?(this.current.unbind(),this.previous=this.current,this.current=null):this.previous=null,t.currentProgram=null,t.setBlendMode(0,!0)},destroy:function(){this.flush(),this.classes.clear(),this.postPipelineClasses.clear(),this.pipelines.clear(),this.renderer=null,this.game=null,this.classes=null,this.postPipelineClasses=null,this.pipelines=null,this.current=null,this.previous=null}});t.exports=i},function(t,e,i){var n=i(0),r=i(2),s=i(866),o=i(867),a=i(107),h=i(58),i=new n({Extends:h,initialize:function(t){t.fragShader=r(t,"fragShader",s),t.vertShader=r(t,"vertShader",o),t.batchSize=r(t,"batchSize",1),t.vertices=r(t,"vertices",[-1,1,-1,-7,7,1]),t.attributes=r(t,"attributes",[{name:"inPosition",size:2,type:a.FLOAT}]),h.call(this,t)},boot:function(){h.prototype.boot.call(this),this.set1i("uMainSampler",0),this.set1i("uMaskSampler",1)},resize:function(t,e){h.prototype.resize.call(this,t,e),this.set2f("uResolution",t,e)},beginMask:function(t,e,i){var n,r=this.gl;t.bitmapMask&&r&&((n=this.renderer).flush(),n.pushFramebuffer(t.mainFramebuffer),r.disable(r.STENCIL_TEST),r.clearColor(0,0,0,0),r.clear(r.COLOR_BUFFER_BIT),n.currentCameraMask.mask!==t&&(n.currentMask.mask=t,n.currentMask.camera=i))},endMask:function(t,e){var i=this.gl,n=this.renderer,r=t.bitmapMask;r&&i&&(n.flush(),n.pushFramebuffer(t.maskFramebuffer),i.clearColor(0,0,0,0),i.clear(i.COLOR_BUFFER_BIT),n.setBlendMode(0,!0),r.renderWebGL(n,r,e),n.flush(),n.popFramebuffer(),n.popFramebuffer(),(r=n.getCurrentStencilMask())?(i.enable(i.STENCIL_TEST),r.mask.applyStencil(n,r.camera,!0)):n.currentMask.mask=null,n.pipelines.set(this),i.activeTexture(i.TEXTURE1),i.bindTexture(i.TEXTURE_2D,t.maskTexture),i.activeTexture(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,t.mainTexture),this.set1i("uInvertMaskAlpha",t.invertAlpha),i.drawArrays(this.topology,0,3),n.resetTextures())}});t.exports=i},function(t,e,i){t.exports={AFTER_FLUSH:i(868),BEFORE_FLUSH:i(869),BIND:i(870),BOOT:i(871),DESTROY:i(872),REBIND:i(873),RESIZE:i(874)}},function(t,e,i){var n=i(0),c=i(2),u=i(107),i=new n({initialize:function(t,e,i,n,r){this.pipeline=t,this.name=e,this.renderer=t.renderer,this.gl=this.renderer.gl,this.program=this.renderer.createProgram(i,n),this.attributes,this.vertexComponentCount=0,this.vertexSize=0,this.uniforms={},this.createAttributes(r),this.createUniforms()},createAttributes:function(t){for(var e=0,i=0,n=[],r=this.vertexComponentCount=0;r<t.length;r++){var s=t[r],o=s.name,a=c(s,"size",1),h=c(s,"type",u.FLOAT),l=h.enum,h=h.size,s=!!s.normalized;n.push({name:o,size:a,type:l,normalized:s,offset:i,enabled:!1,location:-1}),4===h?e+=a:e++,i+=a*h}this.vertexSize=i,this.vertexComponentCount=e,this.attributes=n},bind:function(t,e){return void 0===t&&(t=!1),(e=void 0===e?!1:e)&&this.pipeline.flush(),this.renderer.setProgram(this.program),t&&this.setAttribPointers(),this},rebind:function(){return this.renderer.setProgram(this.program),this.setAttribPointers(!0),this},setAttribPointers:function(t){void 0===t&&(t=!1);for(var e=this.gl,i=this.vertexSize,n=this.attributes,r=this.program,s=0;s<n.length;s++){var o,a=n[s],h=a.size,l=a.type,c=a.offset,u=a.enabled,d=a.location,p=!!a.normalized;t?0<=(o=e.getAttribLocation(r,a.name))?(e.enableVertexAttribArray(o),e.vertexAttribPointer(o,h,l,p,i,c),a.enabled=!0,a.location=o):-1!==o&&e.disableVertexAttribArray(o):u?e.vertexAttribPointer(d,h,l,p,i,c):!u&&-1<d&&(e.disableVertexAttribArray(d),a.location=-1)}return this},createUniforms:function(){for(var t,e=this.gl,i=this.program,n=this.uniforms,r=e.getProgramParameter(i,e.ACTIVE_UNIFORMS),s=0;s<r;s++){var o,a=e.getActiveUniform(i,s);a&&(a=a.name,null!==(t=e.getUniformLocation(i,a))&&(n[a]={name:a,location:t,value1:null,value2:null,value3:null,value4:null}),0<(o=a.indexOf("["))&&(a=a.substr(0,o),n.hasOwnProperty(a)||null!==(t=e.getUniformLocation(i,a))&&(n[a]={name:a,location:t,value1:null,value2:null,value3:null,value4:null})))}return this},hasUniform:function(t){return this.uniforms.hasOwnProperty(t)},resetUniform:function(t){t=this.uniforms[t];return t&&(t.value1=null,t.value2=null,t.value3=null,t.value4=null),this},setUniform1:function(t,e,i,n){e=this.uniforms[e];return!e||!n&&e.value1===i||(e.value1=i,this.renderer.setProgram(this.program),t.call(this.gl,e.location,i),this.pipeline.currentShader=this),this},setUniform2:function(t,e,i,n,r){e=this.uniforms[e];return!e||!r&&e.value1===i&&e.value2===n||(e.value1=i,e.value2=n,this.renderer.setProgram(this.program),t.call(this.gl,e.location,i,n),this.pipeline.currentShader=this),this},setUniform3:function(t,e,i,n,r,s){e=this.uniforms[e];return!e||!s&&e.value1===i&&e.value2===n&&e.value3===r||(e.value1=i,e.value2=n,e.value3=r,this.renderer.setProgram(this.program),t.call(this.gl,e.location,i,n,r),this.pipeline.currentShader=this),this},setUniform4:function(t,e,i,n,r,s,o){e=this.uniforms[e];return!e||!o&&e.value1===i&&e.value2===n&&e.value3===r&&e.value4===s||(e.value1=i,e.value2=n,e.value3=r,e.value4=s,this.renderer.setProgram(this.program),t.call(this.gl,e.location,i,n,r,s),this.pipeline.currentShader=this),this},set1f:function(t,e){return this.setUniform1(this.gl.uniform1f,t,e)},set2f:function(t,e,i){return this.setUniform2(this.gl.uniform2f,t,e,i)},set3f:function(t,e,i,n){return this.setUniform3(this.gl.uniform3f,t,e,i,n)},set4f:function(t,e,i,n,r){return this.setUniform4(this.gl.uniform4f,t,e,i,n,r)},set1fv:function(t,e){return this.setUniform1(this.gl.uniform1fv,t,e,!0)},set2fv:function(t,e){return this.setUniform1(this.gl.uniform2fv,t,e,!0)},set3fv:function(t,e){return this.setUniform1(this.gl.uniform3fv,t,e,!0)},set4fv:function(t,e){return this.setUniform1(this.gl.uniform4fv,t,e,!0)},set1iv:function(t,e){return this.setUniform1(this.gl.uniform1iv,t,e,!0)},set2iv:function(t,e){return this.setUniform1(this.gl.uniform2iv,t,e,!0)},set3iv:function(t,e){return this.setUniform1(this.gl.uniform3iv,t,e,!0)},set4iv:function(t,e){return this.setUniform1(this.gl.uniform4iv,t,e,!0)},set1i:function(t,e){return this.setUniform1(this.gl.uniform1i,t,e)},set2i:function(t,e,i){return this.setUniform2(this.gl.uniform2i,t,e,i)},set3i:function(t,e,i,n){return this.setUniform3(this.gl.uniform3i,t,e,i,n)},set4i:function(t,e,i,n,r){return this.setUniform4(this.gl.uniform4i,t,e,i,n,r)},setMatrix2fv:function(t,e,i){return this.setUniform2(this.gl.uniformMatrix2fv,t,e,i,!0)},setMatrix3fv:function(t,e,i){return this.setUniform2(this.gl.uniformMatrix3fv,t,e,i,!0)},setMatrix4fv:function(t,e,i){return this.setUniform2(this.gl.uniformMatrix4fv,t,e,i,!0)},destroy:function(){this.gl.deleteProgram(this.program),this.pipeline=null,this.renderer=null,this.gl=null,this.program=null,this.attributes=null,this.uniforms=null}});t.exports=i},function(t,e,i){var n=i(0),b=i(59),r=i(2),s=i(875),o=i(876),a=i(25),h=i(107),l=i(58),i=new n({Extends:l,initialize:function(t){t.fragShader=r(t,"fragShader",s),t.vertShader=r(t,"vertShader",o),t.attributes=r(t,"attributes",[{name:"inPosition",size:2},{name:"inColor",size:4,type:h.UNSIGNED_BYTE,normalized:!0}]),l.call(this,t),this.calcMatrix=new a,this.tempTriangle=[{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0}],this.strokeTint={TL:0,TR:0,BL:0,BR:0},this.fillTint={TL:0,TR:0,BL:0,BR:0},this.currentFrame={u0:0,v0:0,u1:1,v1:1},this.firstQuad=[0,0,0,0,0],this.prevQuad=[0,0,0,0,0],this.polygonCache=[]},batchFillRect:function(t,e,i,n,r,s){this.renderer.pipelines.set(this);var o=this.calcMatrix,s=(s&&s.multiply(r,o),t+i),r=e+n,i=o.getX(t,e),n=o.getY(t,e),a=o.getX(t,r),t=o.getY(t,r),h=o.getX(s,r),r=o.getY(s,r),l=o.getX(s,e),o=o.getY(s,e),s=this.fillTint;this.batchQuad(i,n,a,t,h,r,l,o,s.TL,s.TR,s.BL,s.BR)},batchFillTriangle:function(t,e,i,n,r,s,o,a){this.renderer.pipelines.set(this);var h=this.calcMatrix,a=(a&&a.multiply(o,h),h.getX(t,e)),o=h.getY(t,e),t=h.getX(i,n),e=h.getY(i,n),i=h.getX(r,s),n=h.getY(r,s),h=this.fillTint;this.batchTri(a,o,t,e,i,n,h.TL,h.TR,h.BL)},batchStrokeTriangle:function(t,e,i,n,r,s,o,a,h){var l=this.tempTriangle;l[0].x=t,l[0].y=e,l[0].width=o,l[1].x=i,l[1].y=n,l[1].width=o,l[2].x=r,l[2].y=s,l[2].width=o,l[3].x=t,l[3].y=e,l[3].width=o,this.batchStrokePath(l,o,!1,a,h)},batchFillPath:function(t,e,i){this.renderer.pipelines.set(this);var n=this.calcMatrix;i&&i.multiply(e,n);for(var r,s,o=t.length,a=this.polygonCache,h=this.fillTint.TL,l=this.fillTint.TR,c=this.fillTint.BL,u=0;u<o;++u)s=t[u],a.push(s.x,s.y);for(var o=(r=b(a)).length,d=0;d<o;d+=3){var p=2*r[d+0],f=2*r[d+1],g=2*r[d+2],m=a[0+p],p=a[1+p],y=a[0+f],f=a[1+f],v=a[0+g],g=a[1+g],x=n.getX(m,p),m=n.getY(m,p),p=n.getX(y,f),y=n.getY(y,f),f=n.getX(v,g),v=n.getY(v,g);this.batchTri(x,m,p,y,f,v,h,l,c)}a.length=0},batchStrokePath:function(t,e,i,n,r){this.renderer.pipelines.set(this),this.prevQuad[4]=0,this.firstQuad[4]=0;for(var s=t.length-1,o=0;o<s;o++){var a=t[o],h=t[o+1];this.batchLine(a.x,a.y,h.x,h.y,a.width/2,h.width/2,e,o,!i&&o===s-1,n,r)}},batchLine:function(t,e,i,n,r,s,o,a,h,l,c){this.renderer.pipelines.set(this);var u=this.calcMatrix;c&&c.multiply(l,u);var c=i-t,l=n-e,c=Math.sqrt(c*c+l*l),l=r*(n-e)/c,r=r*(t-i)/c,d=s*(n-e)/c,s=s*(t-i)/c,c=i-d,p=n-s,f=t-l,g=e-r,i=i+d,d=n+s,n=t+l,s=e+r,t=u.getX(c,p),l=u.getY(c,p),e=u.getX(f,g),r=u.getY(f,g),c=u.getX(i,d),p=u.getY(i,d),f=u.getX(n,s),g=u.getY(n,s),i=this.strokeTint,d=i.TL,u=i.TR,n=i.BL,s=i.BR;this.batchQuad(f,g,e,r,t,l,c,p,d,u,n,s),o<=2||(i=this.prevQuad,o=this.firstQuad,0<a&&i[4]?this.batchQuad(f,g,e,r,i[0],i[1],i[2],i[3],d,u,n,s):(o[0]=f,o[1]=g,o[2]=e,o[3]=r,o[4]=1),h&&o[4]?this.batchQuad(t,l,c,p,o[0],o[1],o[2],o[3],d,u,n,s):(i[0]=t,i[1]=l,i[2]=c,i[3]=p,i[4]=1))},batchVert:function(t,e,i){var n=this.vertexViewF32,r=this.vertexViewU32,s=this.vertexCount*this.currentShader.vertexComponentCount-1;n[++s]=t,n[++s]=e,r[++s]=i,this.vertexCount++},batchQuad:function(t,e,i,n,r,s,o,a,h,l,c,u){var d=!1;return this.shouldFlush(6)&&(this.flush(),d=!0),this.batchVert(t,e,h),this.batchVert(i,n,c),this.batchVert(r,s,u),this.batchVert(t,e,h),this.batchVert(r,s,u),this.batchVert(o,a,l),d},batchTri:function(t,e,i,n,r,s,o,a,h){var l=!1;return this.shouldFlush(3)&&(this.flush(),l=!0),this.batchVert(t,e,o),this.batchVert(i,n,a),this.batchVert(r,s,h),l},destroy:function(){return l.prototype.destroy.call(this),this.polygonCache=null,this}});t.exports=i},function(t,e,i){var n=i(0),r=i(2),s=i(877),R=i(108),o=i(3),a=i(58),h=10,c=new o,i=new n({Extends:R,initialize:function(t){h=t.game.renderer.config.maxLights;for(var e=r(t,"fragShader",s),i=[],n=1;n<=h;n++)i.push({name:"lights"+n,fragShader:e.replace("%LIGHT_COUNT%",n.toString())});t.shaders=i,R.call(this,t),this.inverseRotationMatrix=new Float32Array([1,0,0,0,1,0,0,0,1]),this.defaultNormalMap,this.lightsActive=!0},boot:function(){a.prototype.boot.call(this);var t=this.gl,e=t.createTexture();t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,e),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,new Uint8Array([127,127,255,255])),this.defaultNormalMap={glTexture:e};for(var i=0;i<this.shaders.length;i++)this["lightShader"+(i+1)]=this.shaders[i]},onRender:function(t,e){t=t.sys.lights;if(this.lightsActive=!1,t&&t.active){var i,n=t.getLights(e),r=n.length;if(0!==r){this.lightsActive=!0,this.setShader(this["lightShader"+r],!0);var s=this.renderer.height,o=e.matrix;for(this.set1i("uMainSampler",0),this.set1i("uNormSampler",1),this.set2f("uResolution",this.width/2,this.height/2),this.set4f("uCamera",e.x,e.y,e.rotation,e.zoom),this.set3f("uAmbientLightColor",t.ambientColor.r,t.ambientColor.g,t.ambientColor.b),i=0;i<r;i++){var a=n[i].light,h=a.color,l="uLights["+i+"].";o.transformPoint(a.x,a.y,c),this.set2f(l+"position",c.x-e.scrollX*a.scrollFactorX*e.zoom,s-(c.y-e.scrollY*a.scrollFactorY*e.zoom)),this.set3f(l+"color",h.r,h.g,h.b),this.set1f(l+"intensity",a.intensity),this.set1f(l+"radius",a.radius)}this.currentNormalMapRotation=null}}},setNormalMapRotation:function(t){var e,i,n;t===this.currentNormalMapRotation&&0!==this.vertexCount||(0<this.vertexCount&&this.flush(),e=this.inverseRotationMatrix,t?(n=-t,i=Math.cos(n),n=Math.sin(n),e[1]=n,e[3]=-n,e[0]=e[4]=i):(e[0]=e[4]=1,e[1]=e[3]=0),this.setMatrix3fv("uInverseRotationMatrix",!1,e),this.currentNormalMapRotation=t)},setTexture2D:function(t,e){var i=this.renderer,n=(void 0===t&&(t=i.tempTextures[0]),this.getNormalMap(e)),t=(i.isNewNormalMap(t,n)&&(this.flush(),i.setTextureZero(t),i.setNormalMap(n)),e?e.rotation:0);return this.setNormalMapRotation(t),this.currentUnit=0},setGameObject:function(t,e){void 0===e&&(e=t.frame);var i=this.renderer,e=e.glTexture,n=this.getNormalMap(t);return i.isNewNormalMap()&&(this.flush(),i.setTextureZero(e),i.setNormalMap(n)),this.setNormalMapRotation(t.rotation),this.currentUnit=0},getNormalMap:function(t){var e;return t?t.displayTexture?e=t.displayTexture.dataSource[t.displayFrame.sourceIndex]:t.texture?e=t.texture.dataSource[t.frame.sourceIndex]:t.tileset&&(e=(Array.isArray(t.tileset)?t.tileset[0]:t.tileset).image.dataSource[0]):e=this.defaultNormalMap,(e=e||this.defaultNormalMap).glTexture},batchSprite:function(t,e,i){this.lightsActive&&R.prototype.batchSprite.call(this,t,e,i)},batchTexture:function(t,e,i,n,r,s,o,a,h,l,c,u,d,p,f,g,m,y,v,x,b,w,T,S,P,_,E,A,M,k,C,O){this.lightsActive&&R.prototype.batchTexture.call(this,t,e,i,n,r,s,o,a,h,l,c,u,d,p,f,g,m,y,v,x,b,w,T,S,P,_,E,A,M,k,C,O)},batchTextureFrame:function(t,e,i,n,r,s,o){this.lightsActive&&R.prototype.batchTextureFrame.call(this,t,e,i,n,r,s,o)}});i.LIGHT_COUNT=h,t.exports=i},function(t,e,i){var n=i(0),r=i(2),s=i(880),o=i(881),a=i(58),i=new n({Extends:a,initialize:function(t){t.vertShader=r(t,"vertShader",o),t.fragShader=r(t,"fragShader",s),t.attributes=r(t,"attributes",[{name:"inPosition",size:2},{name:"inLightPosition",size:2},{name:"inLightRadius"},{name:"inLightAttenuation"},{name:"inLightColor",size:4}]),a.call(this,t)},onRender:function(t,e){this.set2f("uResolution",this.width,this.height),this.set1f("uCameraZoom",e.zoom)},batchPointLight:function(t,e,i,n,r,s,o,a,h,l,c,u){var d=t.color,p=t.intensity,f=t.radius,g=t.attenuation,m=d.r*p,y=d.g*p,d=d.b*p,p=e.alpha*t.alpha;this.shouldFlush(6)&&this.flush(),this.batchLightVert(i,n,c,u,f,g,m,y,d,p),this.batchLightVert(r,s,c,u,f,g,m,y,d,p),this.batchLightVert(o,a,c,u,f,g,m,y,d,p),this.batchLightVert(i,n,c,u,f,g,m,y,d,p),this.batchLightVert(o,a,c,u,f,g,m,y,d,p),this.batchLightVert(h,l,c,u,f,g,m,y,d,p)},batchLightVert:function(t,e,i,n,r,s,o,a,h,l){var c=this.vertexViewF32,u=this.vertexCount*this.currentShader.vertexComponentCount-1;c[++u]=t,c[++u]=e,c[++u]=i,c[++u]=n,c[++u]=r,c[++u]=s,c[++u]=o,c[++u]=a,c[++u]=h,c[++u]=l,this.vertexCount++}});t.exports=i},function(t,e,i){var n=i(0),r=i(2),s=i(108),i=new n({Extends:s,initialize:function(t){t.topology=5,t.batchSize=r(t,"batchSize",256),s.call(this,t)}});t.exports=i},function(t,e,i){var n=i(0),r=i(2),s=i(108),o=i(882),a=i(883),h=i(58),i=new n({Extends:s,initialize:function(t){t.fragShader=r(t,"fragShader",o),t.vertShader=r(t,"vertShader",a),t.forceZero=!0,s.call(this,t)},boot:function(){h.prototype.boot.call(this),this.set1i("uMainSampler",0)}});t.exports=i},function(t,e,i){var n=i(884),h=i(35),r=i(0),s=i(198),o=i(885),a=i(886),l=i(2),c=i(887),u=i(382),d=i(58),i=new r({Extends:d,initialize:function(t){t.renderTarget=l(t,"renderTarget",[{scale:1},{scale:1},{scale:.5},{scale:.5}]),t.vertShader=l(t,"vertShader",u),t.shaders=l(t,"shaders",[{name:"Copy",fragShader:a},{name:"AddBlend",fragShader:n},{name:"LinearBlend",fragShader:c},{name:"ColorMatrix",fragShader:o}]),t.attributes=l(t,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),t.vertices=[-1,-1,0,0,-1,1,0,1,1,1,1,1,-1,-1,0,0,1,1,1,1,1,-1,1,0],t.batchSize=1,d.call(this,t),this.colorMatrix=new s,this.copyShader,this.addShader,this.linearShader,this.colorMatrixShader,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2},boot:function(){d.prototype.boot.call(this);var t=this.shaders,e=this.renderTargets;this.copyShader=t[0],this.addShader=t[1],this.linearShader=t[2],this.colorMatrixShader=t[3],this.fullFrame1=e[0],this.fullFrame2=e[1],this.halfFrame1=e[2],this.halfFrame2=e[3]},copyFrame:function(t,e,i,n,r){void 0===i&&(i=1),void 0===n&&(n=!0),void 0===r&&(r=!0);var s=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",i),s.activeTexture(s.TEXTURE0),s.bindTexture(s.TEXTURE_2D,t.texture),e?(s.viewport(0,0,e.width,e.height),s.bindFramebuffer(s.FRAMEBUFFER,e.framebuffer),s.framebufferTexture2D(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,e.texture,0)):s.viewport(0,0,t.width,t.height),n&&(r?s.clearColor(0,0,0,0):s.clearColor(0,0,0,1),s.clear(s.COLOR_BUFFER_BIT)),s.bufferData(s.ARRAY_BUFFER,this.vertexData,s.STATIC_DRAW),s.drawArrays(s.TRIANGLES,0,6),s.bindFramebuffer(s.FRAMEBUFFER,null),s.bindTexture(s.TEXTURE_2D,null)},blitFrame:function(t,e,i,n,r,s){void 0===i&&(i=1),void 0===n&&(n=!0),void 0===r&&(r=!0),void 0===s&&(s=!1);var o,a=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",i),a.activeTexture(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,t.texture),t.height>e.height?(a.viewport(0,0,t.width,t.height),this.setTargetUVs(t,e)):(i=e.height-t.height,a.viewport(0,i,t.width,t.height)),a.bindFramebuffer(a.FRAMEBUFFER,e.framebuffer),a.framebufferTexture2D(a.FRAMEBUFFER,a.COLOR_ATTACHMENT0,a.TEXTURE_2D,e.texture,0),n&&(r?a.clearColor(0,0,0,0):a.clearColor(0,0,0,1),a.clear(a.COLOR_BUFFER_BIT)),s&&(o=this.renderer.currentBlendMode,this.renderer.setBlendMode(h.ERASE)),a.bufferData(a.ARRAY_BUFFER,this.vertexData,a.STATIC_DRAW),a.drawArrays(a.TRIANGLES,0,6),s&&this.renderer.setBlendMode(o),a.bindFramebuffer(a.FRAMEBUFFER,null),a.bindTexture(a.TEXTURE_2D,null),this.resetUVs()},copyFrameRect:function(t,e,i,n,r,s,o,a){void 0===o&&(o=!0),void 0===a&&(a=!0);var h=this.gl;h.bindFramebuffer(h.FRAMEBUFFER,t.framebuffer),h.framebufferTexture2D(h.FRAMEBUFFER,h.COLOR_ATTACHMENT0,h.TEXTURE_2D,t.texture,0),o&&(a?h.clearColor(0,0,0,0):h.clearColor(0,0,0,1),h.clear(h.COLOR_BUFFER_BIT)),h.activeTexture(h.TEXTURE0),h.bindTexture(h.TEXTURE_2D,e.texture),h.copyTexSubImage2D(h.TEXTURE_2D,0,0,0,i,n,r,s),h.bindFramebuffer(h.FRAMEBUFFER,null),h.bindTexture(h.TEXTURE_2D,null)},copyToGame:function(t){var e=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",1),this.renderer.popFramebuffer(),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,t.texture),e.bufferData(e.ARRAY_BUFFER,this.vertexData,e.STATIC_DRAW),e.drawArrays(e.TRIANGLES,0,6),this.renderer.resetTextures()},drawFrame:function(t,e,i,n){void 0===i&&(i=!0),void 0===n&&(n=this.colorMatrix);var r=this.gl;this.setShader(this.colorMatrixShader),this.set1i("uMainSampler",0),this.set1fv("uColorMatrix",n.getData()),this.set1f("uAlpha",n.alpha),r.activeTexture(r.TEXTURE0),r.bindTexture(r.TEXTURE_2D,t.texture),e?(r.viewport(0,0,e.width,e.height),r.bindFramebuffer(r.FRAMEBUFFER,e.framebuffer),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,e.texture,0)):r.viewport(0,0,t.width,t.height),i?r.clearColor(0,0,0,0):r.clearColor(0,0,0,1),r.clear(r.COLOR_BUFFER_BIT),r.bufferData(r.ARRAY_BUFFER,this.vertexData,r.STATIC_DRAW),r.drawArrays(r.TRIANGLES,0,6),r.bindFramebuffer(r.FRAMEBUFFER,null),r.bindTexture(r.TEXTURE_2D,null)},blendFrames:function(t,e,i,n,r,s){void 0===n&&(n=1),void 0===r&&(r=!0),void 0===s&&(s=this.linearShader);var o=this.gl;this.setShader(s),this.set1i("uMainSampler1",0),this.set1i("uMainSampler2",1),this.set1f("uStrength",n),o.activeTexture(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,t.texture),o.activeTexture(o.TEXTURE1),o.bindTexture(o.TEXTURE_2D,e.texture),i?(o.bindFramebuffer(o.FRAMEBUFFER,i.framebuffer),o.framebufferTexture2D(o.FRAMEBUFFER,o.COLOR_ATTACHMENT0,o.TEXTURE_2D,i.texture,0),o.viewport(0,0,i.width,i.height)):o.viewport(0,0,t.width,t.height),r?o.clearColor(0,0,0,0):o.clearColor(0,0,0,1),o.clear(o.COLOR_BUFFER_BIT),o.bufferData(o.ARRAY_BUFFER,this.vertexData,o.STATIC_DRAW),o.drawArrays(o.TRIANGLES,0,6),o.bindFramebuffer(o.FRAMEBUFFER,null),o.bindTexture(o.TEXTURE_2D,null)},blendFramesAdditive:function(t,e,i,n,r){this.blendFrames(t,e,i,n,r,this.addShader)},clearFrame:function(t,e){void 0===e&&(e=!0);var i=this.gl,t=(i.viewport(0,0,t.width,t.height),i.bindFramebuffer(i.FRAMEBUFFER,t.framebuffer),e?i.clearColor(0,0,0,0):i.clearColor(0,0,0,1),i.clear(i.COLOR_BUFFER_BIT),this.renderer.currentFramebuffer);i.bindFramebuffer(i.FRAMEBUFFER,t)},setUVs:function(t,e,i,n,r,s,o,a){var h=this.vertexViewF32;h[2]=t,h[3]=e,h[6]=i,h[7]=n,h[10]=r,h[11]=s,h[14]=t,h[15]=e,h[18]=r,h[19]=s,h[22]=o,h[23]=a},setTargetUVs:function(t,e){e=.5<(e=e.height/t.height)?.5-(e-.5):.5-e+.5;this.setUVs(0,e,0,1+e,1,1+e,1,e)},flipX:function(){this.setUVs(1,0,1,1,0,1,0,0)},flipY:function(){this.setUVs(0,1,0,0,1,0,1,1)},resetUVs:function(){this.setUVs(0,0,0,1,1,1,1,0)}});t.exports=i},function(t,e){t.exports=["#define SHADER_NAME PHASER_QUAD_VS","","precision mediump float;","","attribute vec2 inPosition;","attribute vec2 inTexCoord;","","varying vec2 outFragCoord;","varying vec2 outTexCoord;","","void main ()","{"," outFragCoord = inPosition.xy * 0.5 + 0.5;"," outTexCoord = inTexCoord;",""," gl_Position = vec4(inPosition, 0, 1);","}",""].join("\n")},function(t,e,i){var w=i(31),T=i(38),S=i(2);t.exports=function(t,e){var t=t.getContext("experimental-webgl"),i=S(e,"callback"),n=S(e,"type","image/png"),r=S(e,"encoder",.92),s=S(e,"x",0),o=S(e,"y",0),a=S(e,"getPixel",!1),h=S(e,"isFramebuffer",!1),l=h?S(e,"bufferWidth",1):t.drawingBufferWidth,c=h?S(e,"bufferHeight",1):t.drawingBufferHeight;if(a){a=new Uint8Array(4);t.readPixels(s,h?o:c-o,1,1,t.RGBA,t.UNSIGNED_BYTE,a),i.call(null,new T(a[0],a[1],a[2],a[3]/255))}else{var u=S(e,"width",l),d=S(e,"height",c),p=new Uint8Array(u*d*4);t.readPixels(s,c-o-d,u,d,t.RGBA,t.UNSIGNED_BYTE,p);for(var f=w.createWebGL(this,u,d),h=f.getContext("2d"),a=h.getImageData(0,0,u,d),g=a.data,m=0;m<d;m++)for(var y=0;y<u;y++){var v=4*((d-m-1)*u+y),x=4*(m*u+y);g[0+x]=p[0+v],g[1+x]=p[1+v],g[2+x]=p[2+v],g[3+x]=p[3+v]}h.putImageData(a,0,0);var b=new Image;b.onerror=function(){i.call(null),w.remove(f)},b.onload=function(){i.call(null,b),w.remove(f)},b.src=f.toDataURL(n,r)}}},function(t,e,i){var h=i(33);t.exports=function(t){var e,i,n,r,s,o,a=t.config;a.hideBanner||(e="WebGL",a.renderType===h.CANVAS?e="Canvas":a.renderType===h.HEADLESS&&(e="Headless"),o=a.audio,o=(i=t.device.audio).webAudio&&!o.disableWebAudio?"Web Audio":o.noAudio||!i.webAudio&&!i.audioData?"No Audio":"HTML5 Audio",t.device.browser.ie?window.console:(r=[n=""],Array.isArray(a.bannerBackgroundColor)?(a.bannerBackgroundColor.forEach(function(t){n=n.concat("%c "),r.push("background: "+t),s=t}),r[r.length-1]="color: "+a.bannerTextColor+"; background: "+s):(n=n.concat("%c "),r.push("color: "+a.bannerTextColor+"; background: "+a.bannerBackgroundColor)),r.push("background: transparent"),a.gameTitle&&(n=n.concat(a.gameTitle),a.gameVersion&&(n=n.concat(" v"+a.gameVersion)),a.hidePhaser||(n=n.concat(" / "))),n=(n=a.hidePhaser?n:n.concat("Phaser v"+h.VERSION+" ("+e+" | "+o+")")).concat(" %c "+a.gameURL),r[0]=n))}},function(t,e,i){var n=i(0),r=i(6),s=i(1),o=i(386),i=new n({initialize:function(t,e){this.game=t,this.raf=new o,this.started=!1,this.running=!1,this.minFps=r(e,"min",5),this.targetFps=r(e,"target",60),this._min=1e3/this.minFps,this._target=1e3/this.targetFps,this.actualFps=this.targetFps,this.nextFpsUpdate=0,this.framesThisSecond=0,this.callback=s,this.forceSetTimeOut=r(e,"forceSetTimeOut",!1),this.time=0,this.startTime=0,this.lastTime=0,this.frame=0,this.inFocus=!0,this._pauseTime=0,this._coolDown=0,this.delta=0,this.deltaIndex=0,this.deltaHistory=[],this.deltaSmoothingMax=r(e,"deltaHistory",10),this.panicMax=r(e,"panicMax",120),this.rawDelta=0,this.now=0,this.smoothStep=r(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.startTime+=this.time-this._pauseTime},resetDelta:function(){var t=window.performance.now();this.time=t,this.lastTime=t,this.nextFpsUpdate=t+1e3;for(var e=this.framesThisSecond=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,this.raf.start(this.step.bind(this),this.forceSetTimeOut,this._target)},step:function(){var t=window.performance.now(),e=(this.now=t)-this.lastTime,i=(this.rawDelta=e=e<0?0:e,this.deltaIndex),n=this.deltaHistory,r=this.deltaSmoothingMax,s=e,o=e;if(this.smoothStep){(0<this._coolDown||!this.inFocus)&&(this._coolDown--,s=Math.min(s,this._target)),s>this._min&&(s=n[i],s=Math.min(s,this._min)),n[i]=s,this.deltaIndex++,this.deltaIndex>r&&(this.deltaIndex=0);for(var a=o=0;a<r;a++)o+=n[a];o/=r}this.delta=o,this.time+=this.rawDelta,t>this.nextFpsUpdate&&(this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0),this.framesThisSecond++;e=o/this._target;this.callback(t,o,e),this.lastTime=t,this.frame++},tick:function(){this.step()},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(t){this.running||(t&&(this.startTime+=-this.lastTime+(this.lastTime+window.performance.now())),this.raf.start(this.step.bind(this),this.useRAF),this.running=!0,this.step())},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.callback=s,this.raf=null,this.game=null}});t.exports=i},function(t,e,i){var n=i(0),r=i(1),i=new n({initialize:function(){this.isRunning=!1,this.callback=r,this.tick=0,this.isSetTimeOut=!1,this.timeOutID=null,this.lastTime=0,this.target=0;var n=this;this.step=function t(){var e=window.performance.now();n.lastTime=n.tick,n.tick=e,n.callback(e),n.timeOutID=window.requestAnimationFrame(t)},this.stepTimeout=function t(){var e=Date.now(),i=Math.min(Math.max(2*n.target+n.tick-e,0),n.target);n.lastTime=n.tick,n.tick=e,n.callback(e),n.timeOutID=window.setTimeout(t,i)}},start:function(t,e,i){this.isRunning||(this.callback=t,this.isSetTimeOut=e,this.target=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=r}});t.exports=i},function(t,e,i){var n=i(22);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),window.onblur=function(){i.emit(n.BLUR)},window.onfocus=function(){i.emit(n.FOCUS)},window.focus&&t.config.autoFocus&&window.focus()}},function(t,e,i){var m=i(389),y=i(31),v=i(6);t.exports=function(t){var e=v(t,"data",[]),i=v(t,"canvas",null),n=v(t,"palette",m),r=v(t,"pixelWidth",1),s=v(t,"pixelHeight",r),o=v(t,"resizeCanvas",!0),a=v(t,"clearCanvas",!0),h=v(t,"preRender",null),t=v(t,"postRender",null),l=Math.floor(Math.abs(e[0].length*r)),c=Math.floor(Math.abs(e.length*s)),u=(i||(i=y.create2D(this,l,c),a=o=!1),o&&(i.width=l,i.height=c),i.getContext("2d"));a&&u.clearRect(0,0,l,c),h&&h(i,u);for(var d=0;d<e.length;d++)for(var p=e[d],f=0;f<p.length;f++){var g=p[f];"."!==g&&" "!==g&&(u.fillStyle=n[g],u.fillRect(f*r,d*s,r,s))}return t&&t(i,u),i}},function(t,e){t.exports={0:"#000",1:"#9D9D9D",2:"#FFF",3:"#BE2633",4:"#E06F8B",5:"#493C2B",6:"#A46422",7:"#EB8931",8:"#F7E26B",9:"#2F484E",A:"#44891A",B:"#A3CE27",C:"#1B2632",D:"#005784",E:"#31A2F2",F:"#B2DCEF"}},function(t,e,i){var n=i(0),o=i(358),r=i(94),a=i(3),s=new n({Extends:r,initialize:function(t,e,i,n){r.call(this,"CubicBezierCurve"),Array.isArray(t)&&(n=new a(t[6],t[7]),i=new a(t[4],t[5]),e=new a(t[2],t[3]),t=new a(t[0],t[1])),this.p0=t,this.p1=e,this.p2=i,this.p3=n},getStartPoint:function(t){return(t=void 0===t?new a:t).copy(this.p0)},getResolution:function(t){return t},getPoint:function(t,e){void 0===e&&(e=new a);var i=this.p0,n=this.p1,r=this.p2,s=this.p3;return e.set(o(t,i.x,n.x,r.x,s.x),o(t,i.y,n.y,r.y,s.y))},draw:function(t,e){var i=this.getPoints(e=void 0===e?32: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]}}});s.fromJSON=function(t){var t=t.points,e=new a(t[0],t[1]),i=new a(t[2],t[3]),n=new a(t[4],t[5]),t=new a(t[6],t[7]);return new s(e,i,n,t)},t.exports=s},function(t,e,i){var n=i(0),l=i(94),c=i(36),u=i(6),r=i(196),d=i(3),s=new n({Extends:l,initialize:function(t,e,i,n,r,s,o,a){var h;"object"==typeof t?(t=u(h=t,"x",0),e=u(h,"y",0),i=u(h,"xRadius",0),n=u(h,"yRadius",i),r=u(h,"startAngle",0),s=u(h,"endAngle",360),o=u(h,"clockwise",!1),a=u(h,"rotation",0)):(void 0===n&&(n=i),void 0===r&&(r=0),void 0===s&&(s=360),void 0===o&&(o=!1),void 0===a&&(a=0)),l.call(this,"EllipseCurve"),this.p0=new d(t,e),this._xRadius=i,this._yRadius=n,this._startAngle=c(r),this._endAngle=c(s),this._clockwise=o,this._rotation=c(a)},getStartPoint:function(t){return void 0===t&&(t=new d),this.getPoint(0,t)},getResolution:function(t){return 2*t},getPoint:function(t,e){void 0===e&&(e=new d);for(var i=2*Math.PI,n=this._endAngle-this._startAngle,r=Math.abs(n)<Number.EPSILON;n<0;)n+=i;for(;i<n;)n-=i;n<Number.EPSILON&&(n=r?0:i),this._clockwise&&!r&&(n===i?n=-i:n-=i);var s,o,a,h,r=this._startAngle+t*n,t=this.p0.x+this._xRadius*Math.cos(r),r=this.p0.y+this._yRadius*Math.sin(r);return 0!==this._rotation&&(s=Math.cos(this._rotation),o=Math.sin(this._rotation),t=(a=t-this.p0.x)*s-(h=r-this.p0.y)*o+this.p0.x,r=a*o+h*s+this.p0.y),e.set(t,r)},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 r(this._startAngle)},set:function(t){this._startAngle=c(t)}},endAngle:{get:function(){return r(this._endAngle)},set:function(t){this._endAngle=c(t)}},clockwise:{get:function(){return this._clockwise},set:function(t){this._clockwise=t}},angle:{get:function(){return r(this._rotation)},set:function(t){this._rotation=c(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:r(this._startAngle),endAngle:r(this._endAngle),clockwise:this._clockwise,rotation:r(this._rotation)}}});s.fromJSON=function(t){return new s(t)},t.exports=s},function(t,e,i){var n=i(0),r=i(94),s=i(199),o=i(10),a=i(3),h=new n({Extends:r,initialize:function(t,e){r.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),s([this.p0,this.p1],t)},getStartPoint:function(t){return(t=void 0===t?new a:t).copy(this.p0)},getResolution:function(t){return t=void 0===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(e=void 0===e?new a:e).copy(this.p1).subtract(this.p0).normalize(),e},getUtoTmapping:function(t,e,i){return e?(i=(i=this.getLengths(i))[i.length-1],Math.min(e,i)/i):t},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 t=t.points,e=new a(t[0],t[1]),t=new a(t[2],t[3]);return new h(e,t)},t.exports=h},function(t,e,i){var n=i(0),r=i(3),i=new n({initialize:function(t,e){this.active=!1,this.p0=new r(t,e)},getPoint:function(t,e){return(e=void 0===e?new r: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]}}});t.exports=i},function(t,e,i){var n=i(0),r=i(94),s=i(359),o=i(3),a=new n({Extends:r,initialize:function(t,e,i){r.call(this,"QuadraticBezier"),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(t=void 0===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;return e.set(s(t,i.x,n.x,r.x),s(t,i.y,n.y,r.y))},draw:function(t,e){var i=this.getPoints(e=void 0===e?32: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 t=t.points,e=new o(t[0],t[1]),i=new o(t[2],t[3]),t=new o(t[4],t[5]);return new a(e,i,t)},t.exports=a},function(t,e,i){var a=i(194),n=i(0),r=i(94),h=i(3),s=new n({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 h;"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){t=new h(t,e);return this.points.push(t),t},getStartPoint:function(t){return(t=void 0===t?new h:t).copy(this.points[0])},getResolution:function(t){return t*this.points.length},getPoint:function(t,e){void 0===e&&(e=new h);var i=this.points,t=(i.length-1)*t,n=Math.floor(t),t=t-n,r=i[0===n?n:n-1],s=i[n],o=i[n>i.length-2?i.length-1:n+1],i=i[n>i.length-3?i.length-1:n+2];return e.set(a(t,r.x,s.x,o.x,i.x),a(t,r.y,s.y,o.y,i.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}}});s.fromJSON=function(t){return new s(t.points)},t.exports=s},function(t,e,i){i=new(i(0))({initialize:function(t,e,i,n){e&&""!==e||(e=["precision mediump float;","uniform vec2 resolution;","varying vec2 fragCoord;","void main () {"," vec2 uv = fragCoord / resolution.xy;"," gl_FragColor = vec4(uv.xyx, 1.0);","}"].join("\n")),i&&""!==i||(i=["precision mediump float;","uniform mat4 uProjectionMatrix;","uniform mat4 uViewMatrix;","uniform vec2 uResolution;","attribute vec2 inPosition;","varying vec2 fragCoord;","varying vec2 outTexCoord;","void main () {"," gl_Position = uProjectionMatrix * uViewMatrix * vec4(inPosition, 1.0, 1.0);"," fragCoord = vec2(inPosition.x, uResolution.y - inPosition.y);"," outTexCoord = vec2(inPosition.x / uResolution.x, fragCoord.y / uResolution.y);","}"].join("\n")),void 0===n&&(n=null),this.key=t,this.fragmentSrc=e,this.vertexSrc=i,this.uniforms=n}});t.exports=i},function(t,e,i){var n=i(38);n.ColorSpectrum=i(909),n.ColorToRGBA=i(910),n.ComponentToHex=i(398),n.GetColor=i(103),n.GetColor32=i(328),n.HexStringToColor=i(327),n.HSLToColor=i(911),n.HSVColorWheel=i(912),n.HSVToRGB=i(188),n.HueToComponent=i(399),n.IntegerToColor=i(189),n.IntegerToRGB=i(330),n.Interpolate=i(913),n.ObjectToColor=i(331),n.RandomRGB=i(914),n.RGBStringToColor=i(332),n.RGBToHSV=i(329),n.RGBToString=i(915),n.ValueToColor=i(187),t.exports=n},function(t,e){t.exports=function(t){t=t.toString(16);return 1===t.length?"0"+t:t}},function(t,e){t.exports=function(t,e,i){return i<0&&(i+=1),1<i&&--i,i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}},function(t,e,i){var n=i(105);t.exports=function(t){var e;"complete"!==document.readyState&&"interactive"!==document.readyState?(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)):t()}},function(t,e){t.exports=function(t){var e,i;return t?(t=Math.abs(window.orientation),e={w:0,h:0},(i=document.createElement("div")).setAttribute("style","position: fixed; height: 100vh; width: 0; top: 0"),document.documentElement.appendChild(i),e.w=90===t?i.offsetHeight:window.innerWidth,e.h=90===t?window.innerWidth:i.offsetHeight,document.documentElement.removeChild(i),i=null,90!==Math.abs(window.orientation)?e.h:e.w):window.innerHeight}},function(t,e,i){var n=i(201);t.exports=function(t,e){var i=window.screen,i=!!i&&(i.orientation||i.mozOrientation||i.msOrientation);return i&&"string"==typeof i.type?i.type:"string"==typeof i?i:"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:t<e?n.ORIENTATION.PORTRAIT:n.ORIENTATION.LANDSCAPE}},function(t,e){t.exports={NO_CENTER:0,CENTER_BOTH:1,CENTER_HORIZONTALLY:2,CENTER_VERTICALLY:3}},function(t,e){t.exports={LANDSCAPE:"landscape-primary",PORTRAIT:"portrait-primary"}},function(t,e){t.exports={NONE:0,WIDTH_CONTROLS_HEIGHT:1,HEIGHT_CONTROLS_WIDTH:2,FIT:3,ENVELOP:4,RESIZE:5}},function(t,e){t.exports={NO_ZOOM:1,ZOOM_2X:2,ZOOM_4X:4,MAX_ZOOM:-1}},function(t,e){t.exports=function(t){var e;return""!==t&&("string"==typeof t?e=document.getElementById(t):t&&1===t.nodeType&&(e=t)),e||document.body}},function(t,e){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}},function(t,e,i){var n=i(0),a=i(203),r=i(9),s=i(51),o=i(22),h=i(410),l=i(411),c=i(412),u=i(413),d=i(25),m=i(177),i=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 u(this):null,this.pointers=[],this.pointersTotal=e.inputActivePointers,e.inputTouch&&1===this.pointersTotal&&(this.pointersTotal=2);for(var i=0;i<=this.pointersTotal;i++){var n=new c(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 d,this._tempMatrix2=new d,this._tempSkip=!1,this.mousePointerContainer=[this.mousePointer],t.events.once(o.BOOT,this.boot,this)},boot:function(){this.canvas=this.game.canvas,this.scaleManager=this.game.scale,this.events.emit(s.MANAGER_BOOT),this.game.events.on(o.PRE_RENDER,this.preRender,this),this.game.events.once(o.DESTROY,this.destroy,this)},setCanvasOver:function(t){this.isOver=!0,this.events.emit(s.GAME_OVER,t)},setCanvasOut:function(t){this.isOver=!1,this.events.emit(s.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(s.MANAGER_UPDATE);for(var n=0;n<i.length;n++){var r=i[n];if(r.sys.input&&r.sys.input.updatePoll(t,e)&&this.globalTopOnly)return}},setDefaultCursor:function(t){this.defaultCursor=t,this.canvas.style.cursor!==t&&(this.canvas.style.cursor=t)},setCursor:function(t){t.cursor&&(this.canvas.style.cursor=t.cursor)},resetCursor:function(t){t.cursor&&this.canvas&&(this.canvas.style.cursor=this.defaultCursor)},addPointer:function(t){var e=[];10<this.pointersTotal+(t=void 0===t?1:t)&&(t=10-this.pointersTotal);for(var i=0;i<t;i++){var n=this.pointers.length,n=new c(this,n);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(!0,!0);this._tempSkip=!1;for(var n=0;n<i.length;n++){var r=i[n];if(r.sys.input&&(r.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],s=1;s<this.pointersTotal;s++){var o=e[s];if(!o.active){o.touchstart(r,t),this.activePointer=o,i.push(o);break}}this.updateInputPlugins(a.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],s=1;s<this.pointersTotal;s++){var o=e[s];if(o.active&&o.identifier===r.identifier){o.touchmove(r,t),this.activePointer=o,i.push(o);break}}this.updateInputPlugins(a.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],s=1;s<this.pointersTotal;s++){var o=e[s];if(o.active&&o.identifier===r.identifier){o.touchend(r,t),i.push(o);break}}this.updateInputPlugins(a.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],s=1;s<this.pointersTotal;s++){var o=e[s];if(o.active&&o.identifier===r.identifier){o.touchcancel(r,t),i.push(o);break}}this.updateInputPlugins(a.TOUCH_CANCEL,i)},onMouseDown:function(t){var e=this.mousePointer;e.down(t),e.updateMotion(),this.activePointer=e,this.updateInputPlugins(a.MOUSE_DOWN,this.mousePointerContainer)},onMouseMove:function(t){var e=this.mousePointer;e.move(t),e.updateMotion(),this.activePointer=e,this.updateInputPlugins(a.MOUSE_MOVE,this.mousePointerContainer)},onMouseUp:function(t){var e=this.mousePointer;e.up(t),e.updateMotion(),this.activePointer=e,this.updateInputPlugins(a.MOUSE_UP,this.mousePointerContainer)},onMouseWheel:function(t){var e=this.mousePointer;e.wheel(t),this.activePointer=e,this.updateInputPlugins(a.MOUSE_WHEEL,this.mousePointerContainer)},onPointerLockChange:function(t){var e=this.mouse.locked;this.mousePointer.locked=e,this.events.emit(s.POINTERLOCK_CHANGE,t,e)},inputCandidate:function(t,e){var i=t.input;if(!i||!i.enabled||!i.alwaysEnabled&&!t.willRender(e))return!1;var n=!0,r=t.parentContainer;if(r)do{if(!r.willRender(e)){n=!1;break}}while(r=r.parentContainer);return n},hitTest:function(t,e,i,n){void 0===n&&(n=this._tempHitTest);var r=this._tempPoint,s=i.scrollX,o=i.scrollY,a=(n.length=0,t.x),h=t.y;i.getWorldPoint(a,h,r),t.worldX=r.x,t.worldY=r.y;for(var l={x:0,y:0},c=this._tempMatrix,u=this._tempMatrix2,d=0;d<e.length;d++){var p,f,g=e[d];this.inputCandidate(g,i)&&(p=r.x+s*g.scrollFactorX-s,f=r.y+o*g.scrollFactorY-o,g.parentContainer?(g.getWorldTransformMatrix(c,u),c.applyInverse(p,f,l)):m(p,f,g.x,g.y,g.rotation,g.scaleX,g.scaleY,l),this.pointWithinHitArea(g,l.x,l.y)&&n.push(g))}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 r=t.position,s=t.prevPosition,e=(s.x=r.x,s.y=r.y,this.scaleManager.transformX(e)),i=this.scaleManager.transformY(i),t=t.smoothFactor;n&&0!==t?(r.x=e*t+s.x*(1-t),r.y=i*t+s.y*(1-t)):(r.x=e,r.y=i)},destroy:function(){this.events.removeAllListeners(),this.game.events.off(o.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}});t.exports=i},function(t,e,i){var r=i(93),n=i(0),s=i(22),o=i(51),a=i(143),h=i(1),i=new n({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(s.POST_STEP,this.postUpdate,this)},startListeners:function(){var i=this,t=(this.onKeyDown=function(t){var e;!t.defaultPrevented&&i.enabled&&i.manager&&(i.queue.push(t),i.manager.events.emit(o.MANAGER_PROCESS),e=t.altKey||t.ctrlKey||t.shiftKey||t.metaKey,i.preventDefault&&!e&&-1<i.captures.indexOf(t.keyCode)&&t.preventDefault())},this.onKeyUp=function(t){var e;!t.defaultPrevented&&i.enabled&&i.manager&&(i.queue.push(t),i.manager.events.emit(o.MANAGER_PROCESS),e=t.altKey||t.ctrlKey||t.shiftKey||t.metaKey,i.preventDefault&&!e&&-1<i.captures.indexOf(t.keyCode)&&t.preventDefault())},this.target);t&&(t.addEventListener("keydown",this.onKeyDown,!1),t.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=0<e.length},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 n=t[i];"string"==typeof n&&(n=a[n.toUpperCase()]),r(e,n)}this.preventDefault=0<e.length},clearCaptures:function(){this.captures=[],this.preventDefault=!1},destroy:function(){this.stopListeners(),this.clearCaptures(),this.queue=[],this.manager.game.events.off(s.POST_RENDER,this.postUpdate,this),this.target=null,this.enabled=!1,this.manager=null}});t.exports=i},function(t,e,i){var n=i(0),o=i(191),r=i(51),s=i(1),i=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=s,this.onMouseDown=s,this.onMouseUp=s,this.onMouseDownWindow=s,this.onMouseUpWindow=s,this.onMouseOver=s,this.onMouseOut=s,this.onMouseWheel=s,this.pointerLockChange=s,this.isTop=!0,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 document.body.addEventListener("contextmenu",function(t){return t.preventDefault(),!1}),this},requestPointerLock:function(){var t;o.pointerLock&&((t=this.target).requestPointerLock=t.requestPointerLock||t.mozRequestPointerLock||t.webkitRequestPointerLock,t.requestPointerLock())},releasePointerLock:function(){o.pointerLock&&(document.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock,document.exitPointerLock())},startListeners:function(){var t=this.target;if(t){var i=this,n=this.manager,e=n.canvas,r=window&&window.focus&&n.game.config.autoFocus,s=(this.onMouseMove=function(t){!t.defaultPrevented&&i.enabled&&n&&n.enabled&&(n.onMouseMove(t),i.preventDefaultMove&&t.preventDefault())},this.onMouseDown=function(t){r&&window.focus(),!t.defaultPrevented&&i.enabled&&n&&n.enabled&&(n.onMouseDown(t),i.preventDefaultDown&&t.target===e&&t.preventDefault())},this.onMouseDownWindow=function(t){!t.defaultPrevented&&i.enabled&&n&&n.enabled&&t.target!==e&&n.onMouseDown(t)},this.onMouseUp=function(t){!t.defaultPrevented&&i.enabled&&n&&n.enabled&&(n.onMouseUp(t),i.preventDefaultUp&&t.target===e&&t.preventDefault())},this.onMouseUpWindow=function(t){!t.defaultPrevented&&i.enabled&&n&&n.enabled&&t.target!==e&&n.onMouseUp(t)},this.onMouseOver=function(t){!t.defaultPrevented&&i.enabled&&n&&n.enabled&&n.setCanvasOver(t)},this.onMouseOut=function(t){!t.defaultPrevented&&i.enabled&&n&&n.enabled&&n.setCanvasOut(t)},this.onMouseWheel=function(t){!t.defaultPrevented&&i.enabled&&n&&n.enabled&&n.onMouseWheel(t),i.preventDefaultWheel&&t.target===e&&t.preventDefault()},{passive:!0});if(t.addEventListener("mousemove",this.onMouseMove),t.addEventListener("mousedown",this.onMouseDown),t.addEventListener("mouseup",this.onMouseUp),t.addEventListener("mouseover",this.onMouseOver,s),t.addEventListener("mouseout",this.onMouseOut,s),this.preventDefaultWheel?t.addEventListener("wheel",this.onMouseWheel,{passive:!1}):t.addEventListener("wheel",this.onMouseWheel,s),window&&n.game.config.inputWindowEvents)try{window.top.addEventListener("mousedown",this.onMouseDownWindow,s),window.top.addEventListener("mouseup",this.onMouseUpWindow,s)}catch(t){window.addEventListener("mousedown",this.onMouseDownWindow,s),window.addEventListener("mouseup",this.onMouseUpWindow,s),this.isTop=!1}o.pointerLock&&(this.pointerLockChange=function(t){var e=i.target;i.locked=document.pointerLockElement===e||document.mozPointerLockElement===e||document.webkitPointerLockElement===e,n.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)),o.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}});t.exports=i},function(t,e,i){var o=i(349),n=i(0),r=i(50),a=i(124),h=i(360),s=i(3),l=i(105),i=new n({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 s,this.prevPosition=new s,this.midPoint=new s(-1,-1),this.velocity=new s,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){t=t.getWorldPoint(this.x,this.y);return this.worldX=t.x,this.worldY=t.y,this},positionToCamera:function(t,e){return t.getWorldPoint(this.x,this.y,e)},updateMotion:function(){var t,e,i=this.position.x,n=this.position.y,r=this.midPoint.x,s=this.midPoint.y;i===r&&n===s||(r=h(this.motionFactor,r,i),s=h(this.motionFactor,s,n),a(r,i,.1)&&(r=i),a(s,n,.1)&&(s=n),this.midPoint.set(r,s),this.velocity.set(t=i-r,e=n-s),this.angle=o(r,s,i,n),this.distance=Math.sqrt(t*t+e*e))},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.button&&!this.isDown},rightButtonReleased:function(){return 2===this.button&&!this.isDown},middleButtonReleased:function(){return 1===this.button&&!this.isDown},backButtonReleased:function(){return 3===this.button&&!this.isDown},forwardButtonReleased:function(){return 4===this.button&&!this.isDown},getDistance:function(){return this.isDown?r(this.downX,this.downY,this.x,this.y):r(this.downX,this.downY,this.upX,this.upY)},getDistanceX:function(){return this.isDown?Math.abs(this.downX-this.x):Math.abs(this.downX-this.upX)},getDistanceY:function(){return this.isDown?Math.abs(this.downY-this.y):Math.abs(this.downY-this.upY)},getDuration:function(){return this.isDown?this.manager.time-this.downTime:this.upTime-this.downTime},getAngle:function(){return this.isDown?o(this.downX,this.downY,this.x,this.y):o(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,r=this.position.x,s=this.position.y,o=0;o<t;o++){var a=1/t*o;e[o]={x:h(a,i,r),y:h(a,n,s)}}return e},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}}});t.exports=i},function(t,e,i){var n=i(0),r=i(51),s=i(1),i=new n({initialize:function(t){this.manager=t,this.capture=!0,this.enabled=!1,this.target,this.onTouchStart=s,this.onTouchStartWindow=s,this.onTouchMove=s,this.onTouchEnd=s,this.onTouchEndWindow=s,this.onTouchCancel=s,this.onTouchCancelWindow=s,this.onTouchOver=s,this.onTouchOut=s,t.events.once(r.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||(this.target=this.manager.game.canvas),t.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return document.body.addEventListener("contextmenu",function(t){return t.preventDefault(),!1}),this},startListeners:function(){var e=this,i=this.manager.canvas,n=window&&window.focus&&this.manager.game.config.autoFocus;this.onTouchStart=function(t){n&&window.focus(),!t.defaultPrevented&&e.enabled&&e.manager&&e.manager.enabled&&(e.manager.onTouchStart(t),e.capture&&t.cancelable&&t.target===i&&t.preventDefault())},this.onTouchStartWindow=function(t){!t.defaultPrevented&&e.enabled&&e.manager&&e.manager.enabled&&t.target!==i&&e.manager.onTouchStart(t)},this.onTouchMove=function(t){!t.defaultPrevented&&e.enabled&&e.manager&&e.manager.enabled&&(e.manager.onTouchMove(t),e.capture&&t.cancelable&&t.preventDefault())},this.onTouchEnd=function(t){!t.defaultPrevented&&e.enabled&&e.manager&&e.manager.enabled&&(e.manager.onTouchEnd(t),e.capture&&t.cancelable&&t.target===i&&t.preventDefault())},this.onTouchEndWindow=function(t){!t.defaultPrevented&&e.enabled&&e.manager&&e.manager.enabled&&t.target!==i&&e.manager.onTouchEnd(t)},this.onTouchCancel=function(t){!t.defaultPrevented&&e.enabled&&e.manager&&e.manager.enabled&&(e.manager.onTouchCancel(t),e.capture&&t.preventDefault())},this.onTouchCancelWindow=function(t){!t.defaultPrevented&&e.enabled&&e.manager&&e.manager.enabled&&e.manager.onTouchCancel(t)},this.onTouchOver=function(t){!t.defaultPrevented&&e.enabled&&e.manager&&e.manager.enabled&&e.manager.setCanvasOver(t)},this.onTouchOut=function(t){!t.defaultPrevented&&e.enabled&&e.manager&&e.manager.enabled&&e.manager.setCanvasOut(t)};var t,r,s=this.target;s&&(r={passive:!(t={passive:!0})},s.addEventListener("touchstart",this.onTouchStart,this.capture?r:t),s.addEventListener("touchmove",this.onTouchMove,this.capture?r:t),s.addEventListener("touchend",this.onTouchEnd,this.capture?r:t),s.addEventListener("touchcancel",this.onTouchCancel,this.capture?r:t),s.addEventListener("touchover",this.onTouchOver,this.capture?r:t),s.addEventListener("touchout",this.onTouchOut,this.capture?r:t),window&&this.manager.game.config.inputWindowEvents&&(window.addEventListener("touchstart",this.onTouchStartWindow,r),window.addEventListener("touchend",this.onTouchEndWindow,r),window.addEventListener("touchcancel",this.onTouchCancelWindow,r)),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),t.removeEventListener("touchover",this.onTouchOver),t.removeEventListener("touchout",this.onTouchOut),window&&(window.removeEventListener("touchstart",this.onTouchStartWindow),window.removeEventListener("touchend",this.onTouchEndWindow))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});t.exports=i},function(t,e,i){var n=i(0),l=i(22),r=i(9),s=i(8),o=i(16),a=i(5),c=i(2),g=i(24),h=i(93),i=new n({Extends:r,initialize:function(t){r.call(this),this.game=t,this.plugins=[],this.scenePlugins=[],this._pendingGlobal=[],this._pendingScene=[],t.isBooted?this.boot():t.events.once(l.BOOT,this.boot,this)},boot:function(){for(var t,e,i,n,r,s,o=this.game.config,a=(a=o.installGlobalPlugins).concat(this._pendingGlobal),h=0;h<a.length;h++)t=a[h],e=c(t,"key",null),i=c(t,"plugin",null),n=c(t,"start",!1),r=c(t,"mapping",null),s=c(t,"data",null),e&&i&&this.install(e,i,n,r,s);for(a=(a=o.installScenePlugins).concat(this._pendingScene),h=0;h<a.length;h++)t=a[h],e=c(t,"key",null),i=c(t,"plugin",null),r=c(t,"mapping",null),e&&i&&this.installScenePlugin(e,i,r);this._pendingGlobal=[],this._pendingScene=[],this.game.events.once(l.DESTROY,this.destroy,this)},addToScene:function(t,e,i){for(var n,r=this.game,s=t.scene,o=t.settings.map,a=t.settings.isBooted,h=0;h<e.length;h++)r[p=e[h]]?(t[p]=r[p],o.hasOwnProperty(p)&&(s[o[p]]=t[p])):"game"===p&&o.hasOwnProperty(p)&&(s[o[p]]=r);for(var l=0;l<i.length;l++)for(n=i[l],h=0;h<n.length;h++){var c,u,d,p=n[h];g.hasCore(p)&&(u=(c=g.getCore(p)).mapping,d=new c.plugin(s,this,u),t[u]=d,c.custom?s[u]=d:o.hasOwnProperty(u)&&(s[o[u]]=d),a&&d.boot())}for(n=this.plugins,h=0;h<n.length;h++){var f=n[h];f.mapping&&(s[f.mapping]=f.plugin)}},getDefaultScenePlugins:function(){return this.game.config.defaultPlugins.concat(this.scenePlugins)},installScenePlugin:function(t,e,i,n,r){if(void 0===r&&(r=!1),"function"==typeof e){if(g.hasCore(t)){if(!r&&g.hasCore(t))return}else g.register(t,e,i,!0),this.scenePlugins.push(t);n&&(r=new e(n,this,t),n.sys[t]=r,i&&""!==i&&(n[i]=r),r.boot())}},install:function(t,e,i,n,r){if(void 0===i&&(i=!1),void 0===n&&(n=null),void 0===r&&(r=null),"function"==typeof e&&!g.hasCustom(t))if(null!==n&&(i=!0),this.game.isBooted){if(g.registerCustom(t,e,n,r),i)return this.start(t)}else this._pendingGlobal.push({key:t,plugin:e,start:i,mapping:n,data:r});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){t=this.getIndex(t);if(-1!==t)return this.plugins[t]},isActive:function(t){t=this.getEntry(t);return t&&t.active},start:function(t,e){var i=this.getEntry(e=void 0===e?t: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){t=g.getCustom(t);return t&&(t={key:e,plugin:e=new t.plugin(this),active:!0,mapping:t.mapping,data:t.data},this.plugins.push(t),e.init(t.data),e.start()),t},stop:function(t){t=this.getEntry(t);return t&&t.active&&(t.active=!1,t.plugin.stop()),this},get:function(t,e){void 0===e&&(e=!0);var i,n=this.getEntry(t);return n?n.plugin:(i=this.getClass(t))&&e?(n=this.createEntry(t,t))?n.plugin:null:i||null},getClass:function(t){return g.getCustomClass(t)},removeGlobalPlugin:function(t){var e=this.getEntry(t);e&&h(this.plugins,e),g.removeCustom(t)},removeScenePlugin:function(t){h(this.scenePlugins,t),g.remove(t)},registerGameObject:function(t,e,i){return e&&a.register(t,e),i&&o.register(t,i),this},removeGameObject:function(t,e,i){return void 0===i&&(i=!0),(e=void 0===e?!0:e)&&a.remove(t),i&&o.remove(t),this},registerFileType:function(t,e,i){s.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();g.destroyCustomPlugins(),this.game.noReturn&&g.destroyCorePlugins(),this.game=null,this.plugins=[],this.scenePlugins=[]}});t.exports=i},function(t,e,i){var h=i(201),n=i(0),r=i(9),s=i(104),o=i(22),a=i(401),l=i(407),c=i(402),u=i(1),d=i(10),p=i(416),f=i(76),g=i(3),i=new n({Extends:r,initialize:function(t){r.call(this),this.game=t,this.canvas,this.canvasBounds=new d,this.parent=null,this.parentIsWindow=!1,this.parentSize=new p,this.gameSize=new p,this.baseSize=new p,this.displaySize=new p,this.scaleMode=h.SCALE_MODE.NONE,this.zoom=1,this._resetZoom=!1,this.displayScale=new g(1,1),this.autoRound=!1,this.autoCenter=h.CENTER.NO_CENTER,this.orientation=h.ORIENTATION.LANDSCAPE,this.fullscreen,this.fullscreenTarget=null,this._createdFullscreenTarget=!1,this.dirty=!1,this.resizeInterval=500,this._lastCheck=0,this._checkOrientation=!1,this.listeners={orientationChange:u,windowResize:u,fullScreenChange:u,fullScreenError:u}},preBoot:function(){this.parseConfig(this.game.config),this.game.events.once(o.BOOT,this.boot,this)},boot:function(){var t=this.game;this.canvas=t.canvas,this.fullscreen=t.device.fullscreen,this.scaleMode!==h.SCALE_MODE.RESIZE&&this.displaySize.setAspectMode(this.scaleMode),this.scaleMode===h.SCALE_MODE.NONE?this.resize(this.width,this.height):(this.getParentBounds(),0<this.parentSize.width&&0<this.parentSize.height&&this.displaySize.setParent(this.parentSize),this.refresh()),t.events.on(o.PRE_STEP,this.step,this),t.events.once(o.READY,this.refresh,this),t.events.once(o.DESTROY,this.destroy,this),this.startListeners()},parseConfig:function(t){this.getParent(t),this.getParentBounds();var e,i,n=t.width,r=t.height,s=t.scaleMode,o=t.zoom,a=t.autoRound;"string"==typeof n&&(0===(e=this.parentSize.width)&&(e=window.innerWidth),i=parseInt(n,10)/100,n=Math.floor(e*i)),"string"==typeof r&&(0===(e=this.parentSize.height)&&(e=window.innerHeight),i=parseInt(r,10)/100,r=Math.floor(e*i)),this.scaleMode=s,this.autoRound=a,this.autoCenter=t.autoCenter,this.resizeInterval=t.resizeInterval,a&&(n=Math.floor(n),r=Math.floor(r)),this.gameSize.setSize(n,r),o===h.ZOOM.MAX_ZOOM&&(o=this.getMaxZoom()),1!==(this.zoom=o)&&(this._resetZoom=!0),this.baseSize.setSize(n,r),a&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),0<t.minWidth&&this.displaySize.setMin(t.minWidth*o,t.minHeight*o),0<t.maxWidth&&this.displaySize.setMax(t.maxWidth*o,t.maxHeight*o),this.displaySize.setSize(n,r),this.orientation=c(n,r)},getParent:function(t){var e=t.parent;null!==e&&(this.parent=l(e),this.parentIsWindow=this.parent===document.body,t.expandParent&&t.scaleMode!==h.SCALE_MODE.NONE&&(e=this.parent.getBoundingClientRect(),!this.parentIsWindow&&0!==e.height||(document.documentElement.style.height="100%",document.body.style.height="100%",e=this.parent.getBoundingClientRect(),this.parentIsWindow||0!==e.height||(this.parent.style.overflow="hidden",this.parent.style.width="100%",this.parent.style.height="100%"))),t.fullscreenTarget&&!this.fullscreenTarget&&(this.fullscreenTarget=l(t.fullscreenTarget)))},getParentBounds:function(){var t,e,i;return!!this.parent&&(t=this.parentSize,i=this.parent.getBoundingClientRect(),this.parentIsWindow&&this.game.device.os.iOS&&(i.height=a(!0)),e=i.width,i=i.height,(t.width!==e||t.height!==i)&&(t.setSize(e,i),!0))},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,n=(i&&(t=Math.floor(t),e=Math.floor(e)),this.width),r=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,r)},resize:function(t,e){var i=this.zoom,n=this.autoRound,r=(n&&(t=Math.floor(t),e=Math.floor(e)),this.width),s=this.height,o=(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,this.canvas.style),a=t*i,i=e*i;return n&&(a=Math.floor(a),i=Math.floor(i)),a===t&&i===e||(o.width=a+"px",o.height=i+"px"),this.refresh(r,s)},setZoom:function(t){return this.zoom=t,this._resetZoom=!0,this.refresh()},setMaxZoom:function(){return this.zoom=this.getMaxZoom(),this._resetZoom=!0,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,n=this.game.domContainer;return n&&(this.baseSize.setCSS(n),i=this.canvas.style,(n=n.style).transform="scale("+this.displaySize.width/this.baseSize.width+","+this.displaySize.height/this.baseSize.height+")",n.marginLeft=i.marginLeft,n.marginTop=i.marginTop),this.emit(s.RESIZE,this.gameSize,this.baseSize,this.displaySize,t,e),this},updateOrientation:function(){var t;this._checkOrientation&&(this._checkOrientation=!1,(t=c(this.width,this.height))!==this.orientation&&(this.orientation=t,this.emit(s.ORIENTATION_CHANGE,t)))},updateScale:function(){var t,e,i=this.canvas.style,n=this.gameSize.width,r=this.gameSize.height,s=this.zoom,o=this.autoRound;this.scaleMode===h.SCALE_MODE.NONE?(this.displaySize.setSize(n*s,r*s),t=this.displaySize.width,e=this.displaySize.height,o&&(t=Math.floor(t),e=Math.floor(e)),this._resetZoom&&(i.width=t+"px",i.height=e+"px",this._resetZoom=!1)):this.scaleMode===h.SCALE_MODE.RESIZE?(this.displaySize.setSize(this.parentSize.width,this.parentSize.height),this.gameSize.setSize(this.displaySize.width,this.displaySize.height),this.baseSize.setSize(this.displaySize.width,this.displaySize.height),t=this.displaySize.width,e=this.displaySize.height,o&&(t=Math.floor(t),e=Math.floor(e)),this.canvas.width=t,this.canvas.height=e):(this.displaySize.setSize(this.parentSize.width,this.parentSize.height),t=this.displaySize.width,e=this.displaySize.height,o&&(t=Math.floor(t),e=Math.floor(e)),i.width=t+"px",i.height=e+"px"),this.getParentBounds(),this.updateCenter()},getMaxZoom:function(){var t=f(this.parentSize.width,this.gameSize.width,0,!0),e=f(this.parentSize.height,this.gameSize.height,0,!0);return Math.max(Math.min(t,e),1)},updateCenter:function(){var t,e,i,n=this.autoCenter;n!==h.CENTER.NO_CENTER&&(t=(i=this.canvas).style,e=(i=i.getBoundingClientRect()).width,i=i.height,e=Math.floor((this.parentSize.width-e)/2),i=Math.floor((this.parentSize.height-i)/2),n===h.CENTER.CENTER_HORIZONTALLY?i=0:n===h.CENTER.CENTER_VERTICALLY&&(e=0),t.marginLeft=e+"px",t.marginTop=i+"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,i=this.fullscreen;i.available?i.active||(e=this.getFullscreenTarget(),i.keyboard?e[i.request](Element.ALLOW_KEYBOARD_INPUT):e[i.request](t)):this.emit(s.FULLSCREEN_UNSUPPORTED)},fullscreenSuccessHandler:function(){this.getParentBounds(),this.refresh(),this.emit(s.ENTER_FULLSCREEN)},fullscreenErrorHandler:function(t){this.removeFullscreenTarget(),this.emit(s.FULLSCREEN_FAILED,t)},getFullscreenTarget:function(){var t;return this.fullscreenTarget||((t=document.createElement("div")).style.margin="0",t.style.padding="0",t.style.width="100%",t.style.height="100%",this.fullscreenTarget=t,this._createdFullscreenTarget=!0),this._createdFullscreenTarget&&(this.canvas.parentNode.insertBefore(this.fullscreenTarget,this.canvas),this.fullscreenTarget.appendChild(this.canvas)),this.fullscreenTarget},removeFullscreenTarget:function(){var t,e;this._createdFullscreenTarget&&(t=this.fullscreenTarget)&&t.parentNode&&((e=t.parentNode).insertBefore(this.canvas,t),e.removeChild(t))},stopFullscreen:function(){var t=this.fullscreen;if(!t.available)return this.emit(s.FULLSCREEN_UNSUPPORTED),!1;t.active&&document[t.cancel](),this.removeFullscreenTarget(),this.getParentBounds(),this.emit(s.LEAVE_FULLSCREEN),this.refresh()},toggleFullscreen:function(t){this.fullscreen.active?this.stopFullscreen():this.startFullscreen(t)},startListeners:function(){var e=this,i=this.listeners;i.orientationChange=function(){e.updateBounds(),e._checkOrientation=!0,e.dirty=!0},i.windowResize=function(){e.updateBounds(),e.dirty=!0},window.addEventListener("orientationchange",i.orientationChange,!1),window.addEventListener("resize",i.windowResize,!1),this.fullscreen.available&&(i.fullScreenChange=function(t){return e.onFullScreenChange(t)},i.fullScreenError=function(t){return e.onFullScreenError(t)},["webkit","moz",""].forEach(function(t){document.addEventListener(t+"fullscreenchange",i.fullScreenChange,!1),document.addEventListener(t+"fullscreenerror",i.fullScreenError,!1)}),document.addEventListener("MSFullscreenChange",i.fullScreenChange,!1),document.addEventListener("MSFullscreenError",i.fullScreenError,!1))},onFullScreenChange:function(){document.fullscreenElement||document.webkitFullscreenElement||document.msFullscreenElement||document.mozFullScreenElement?this.fullscreenSuccessHandler():this.stopFullscreen()},onFullScreenError:function(){this.removeFullscreenTarget()},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 e=this.listeners;window.removeEventListener("orientationchange",e.orientationChange,!1),window.removeEventListener("resize",e.windowResize,!1),["webkit","moz",""].forEach(function(t){document.removeEventListener(t+"fullscreenchange",e.fullScreenChange,!1),document.removeEventListener(t+"fullscreenerror",e.fullScreenError,!1)}),document.removeEventListener("MSFullscreenChange",e.fullScreenChange,!1),document.removeEventListener("MSFullscreenError",e.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===h.ORIENTATION.PORTRAIT}},isLandscape:{get:function(){return this.orientation===h.ORIENTATION.LANDSCAPE}},isGamePortrait:{get:function(){return this.height>this.width}},isGameLandscape:{get:function(){return this.width>this.height}}});t.exports=i},function(t,e,i){var n=i(18),r=i(0),s=i(76),o=i(3),a=new r({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 this.aspectMode=t=void 0===t?0: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(s(t,this.snapTo.x)),this._height=this.getNewHeight(s(e,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height;break;case a.WIDTH_CONTROLS_HEIGHT:this._width=this.getNewWidth(s(t,this.snapTo.x)),this._height=this.getNewHeight(this._width*(1/this.aspectRatio),!1);break;case a.HEIGHT_CONTROLS_WIDTH:this._height=this.getNewHeight(s(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(s(t,this.snapTo.x)),this._height=this.getNewHeight(s(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),t=e&&this._parent&&t>this._parent.width?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),t=e&&this._parent&&t>this._parent.height?Math.max(this.minHeight,this._parent.height):t},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,r=0===e?1:t/e;return i&&this.aspectRatio>r||!i&&this.aspectRatio<r?(e=(t=s(t,n.x))/this.aspectRatio,0<n.y&&(t=(e=s(e,n.y))*this.aspectRatio)):(i&&this.aspectRatio<r||!i&&this.aspectRatio>r)&&(t=(e=s(e,n.y))*this.aspectRatio,0<n.x&&(e=(t=s(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},function(t,e,i){var n=i(0),s=i(144),r=i(20),o=i(22),l=i(6),a=i(95),h=i(1),c=i(418),u=i(204),i=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,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(){if(!this.isBooted){for(var t=0;t<this._pending.length;t++){var e,i,n,r=(i=this._pending[t]).key;(n=i.scene)instanceof c?e=this.createSceneFromInstance(r,n):"object"==typeof n?e=this.createSceneFromObject(r,n):"function"==typeof n&&(e=this.createSceneFromFunction(r,n)),r=e.sys.settings.key,this.keys[r]=e,this.scenes.push(e),this._data[r]&&(e.sys.settings.data=this._data[r].data,this._data[r].autoStart&&(i.autoStart=!0)),(i.autoStart||e.sys.settings.active)&&this._start.push(r)}for(this._pending.length=0,this._data={},this.isBooted=!0,t=0;t<this._start.length;t++)i=this._start[t],this.start(i);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}else{for(t=0;t<this._queue.length;t++)this[(e=this._queue[t]).op](e.keyA,e.keyB);this._queue.length=0}},add:function(t,e,i,n){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 c?r=this.createSceneFromInstance(t,e):"object"==typeof e?(e.key=t,r=this.createSceneFromObject(t,e)):"function"==typeof e&&(r=this.createSceneFromFunction(t,e)),r.sys.settings.data=n,t=r.sys.settings.key,this.keys[t]=r,this.scenes.push(r),(i||r.sys.settings.active)&&(this._pending.length?this._start.push(t):this.start(t)),r);var r},remove:function(t){if(this.isProcessing)this._queue.push({op:"remove",keyA:t,keyB:null});else{t=this.getScene(t);if(!t||t.sys.isTransitioning())return this;var e=this.scenes.indexOf(t),i=t.sys.settings.key;-1<e&&(delete this.keys[i],this.scenes.splice(e,1),-1<this._start.indexOf(i)&&(e=this._start.indexOf(i),this._start.splice(e,1)),t.sys.destroy())}return this},bootScene:function(t){var e,i=t.sys,n=i.settings;i.sceneUpdate=h,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),0===e.list.size)?this.create(t):(n.status=s.LOADING,e.once(a.COMPLETE,this.loadComplete,this),e.start())},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;0<=i;i--){var n=this.scenes[i].sys;n.settings.status>s.START&&n.settings.status<=s.RUNNING&&n.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){e=new e;if(e instanceof c){var i=e.sys.settings.key;if(this.keys.hasOwnProperty(t=""!==i?i:t))throw new Error("Cannot add a Scene with duplicate key: "+t);return this.createSceneFromInstance(t,e)}return e.sys=new u(e),e.sys.settings.key=t,e.sys.init(this.game),e},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 c(e),n=i.sys.settings.key;""!==n?t=n:i.sys.settings.key=t,i.sys.init(this.game);for(var r,s=["init","preload","create","update","render"],o=0;o<s.length;o++){var a=l(e,s[o],null);a&&(i[s[o]]=a)}if(e.hasOwnProperty("extend"))for(var h in e.extend)e.extend.hasOwnProperty(h)&&(r=e.extend[h],"data"===h&&i.hasOwnProperty("data")&&"object"==typeof r?i.data.merge(r):"sys"!==h&&(i[h]=r));return i},getKey:function(t,e){if(t=t||"default","function"!=typeof e&&(e instanceof c?t=e.sys.settings.key:"object"==typeof e&&e.hasOwnProperty("key")&&(t=e.key),this.keys.hasOwnProperty(t)))throw new Error("Cannot add a Scene with duplicate key: "+t);return t},getScenes:function(t,e){void 0===t&&(t=!0),void 0===e&&(e=!1);for(var i=[],n=this.scenes,r=0;r<n.length;r++){var s=n[r];!s||t&&!s.sys.isActive()||i.push(s)}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){t=this.getScene(t);return t?t.sys.isActive():null},isPaused:function(t){t=this.getScene(t);return t?t.sys.isPaused():null},isVisible:function(t){t=this.getScene(t);return t?t.sys.isVisible():null},isSleeping:function(t){t=this.getScene(t);return t?t.sys.isSleeping():null},pause:function(t,e){t=this.getScene(t);return t&&t.sys.pause(e),this},resume:function(t,e){t=this.getScene(t);return t&&t.sys.resume(e),this},sleep:function(t,e){t=this.getScene(t);return t&&!t.sys.isTransitioning()&&t.sys.sleep(e),this},wake:function(t,e){t=this.getScene(t);return t&&t.sys.wake(e),this},run:function(t,e){var i=this.getScene(t);if(!i){for(var n=0;n<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){var i=this.getScene(t);if(i){var n,r=i.sys;if(r.isActive()||r.isPaused())r.shutdown(),r.sceneUpdate=h,r.start(e);else if(r.sceneUpdate=h,r.start(e),(n=r.load?r.load:n)&&r.settings.hasOwnProperty("pack")&&(n.reset(),n.addPack({payload:r.settings.pack})))return r.settings.status=s.LOADING,n.once(a.COMPLETE,this.payloadComplete,this),n.start(),this;this.bootScene(i)}}else this._data[t]={autoStart:!0,data:e};return this},stop:function(t,e){t=this.getScene(t);return t&&!t.sys.isTransitioning()&&t.sys.shutdown(e),this},switch:function(t,e){var i=this.getScene(t),n=this.getScene(e);return i&&n&&i!==n&&(this.sleep(t),this.isSleeping(e)?this.wake(e):this.start(e)),this},getAt:function(t){return this.scenes[t]},getIndex:function(t){t=this.getScene(t);return this.scenes.indexOf(t)},bringToTop:function(t){var e;return this.isProcessing?this._queue.push({op:"bringToTop",keyA:t,keyB:null}):-1!==(e=this.getIndex(t))&&e<this.scenes.length&&(t=this.getScene(t),this.scenes.splice(e,1),this.scenes.push(t)),this},sendToBack:function(t){var e;return this.isProcessing?this._queue.push({op:"sendToBack",keyA:t,keyB:null}):-1!==(e=this.getIndex(t))&&0<e&&(t=this.getScene(t),this.scenes.splice(e,1),this.scenes.unshift(t)),this},moveDown:function(t){var e,i,n;return this.isProcessing?this._queue.push({op:"moveDown",keyA:t,keyB:null}):0<(e=this.getIndex(t))&&(i=e-1,t=this.getScene(t),n=this.getAt(i),this.scenes[e]=n,this.scenes[i]=t),this},moveUp:function(t){var e,i,n;return this.isProcessing?this._queue.push({op:"moveUp",keyA:t,keyB:null}):(e=this.getIndex(t))<this.scenes.length-1&&(i=e+1,t=this.getScene(t),n=this.getAt(i),this.scenes[e]=n,this.scenes[i]=t),this},moveAbove:function(t,e){return t!==e&&(this.isProcessing?this._queue.push({op:"moveAbove",keyA:t,keyB:e}):(t=this.getIndex(t),e=this.getIndex(e),-1!==t&&-1!==e&&(i=this.getAt(e),this.scenes.splice(e,1),this.scenes.splice(t+1,0,i)))),this;var i},moveBelow:function(t,e){return t!==e&&(this.isProcessing?this._queue.push({op:"moveBelow",keyA:t,keyB:e}):(t=this.getIndex(t),e=this.getIndex(e),-1!==t&&-1!==e&&(i=this.getAt(e),this.scenes.splice(e,1),0===t?this.scenes.unshift(i):this.scenes.splice(t,0,i)))),this;var i},queueOp:function(t,e,i){return this._queue.push({op:t,keyA:e,keyB:i}),this},swapPosition:function(t,e){return t!==e&&(this.isProcessing?this._queue.push({op:"swapPosition",keyA:t,keyB:e}):(t=this.getIndex(t))!==(e=this.getIndex(e))&&-1!==t&&-1!==e&&(i=this.getAt(t),this.scenes[t]=this.scenes[e],this.scenes[e]=i)),this;var i},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)}},destroy:function(){for(var t=0;t<this.scenes.length;t++)this.scenes[t].sys.destroy();this.update=h,this.scenes=[],this._pending=[],this._start=[],this._queue=[],this.game=null}});t.exports=i},function(t,e,i){var n=i(0),r=i(204),i=new n({initialize:function(t){this.sys=new r(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(){}});t.exports=i},function(t,e,i){var r=i(2),s=i(205);t.exports=function(t){var e=t.game.config.defaultPhysicsSystem,t=r(t.settings,"physics",!1);if(e||t){var i=[];if(e&&i.push(s(e+"Physics")),t)for(var n in t)n=s(n.concat("Physics")),-1===i.indexOf(n)&&i.push(n);return i}}},function(t,e,i){var n=i(2);t.exports=function(t){var e=t.plugins.getDefaultScenePlugins(),t=n(t.settings,"plugins",!1);return Array.isArray(t)?t:e||[]}},function(t,e,i){var n=i(144),r=i(6),s=i(127),o=i(978);t.exports={create:function(t){return"string"==typeof t?t={key:t}:void 0===t&&(t={}),{status:n.PENDING,key:r(t,"key",""),active:r(t,"active",!1),visible:r(t,"visible",!0),isBooted:!1,isTransition:!1,transitionFrom:null,transitionDuration:0,transitionAllowInput:!0,data:{},pack:r(t,"pack",!1),cameras:r(t,"cameras",null),map:r(t,"map",s(o,r(t,"mapAdd",{}))),physics:r(t,"physics",{}),loader:r(t,"loader",{}),plugins:r(t,"plugins",!1),input:r(t,"input",{})}}}},function(t,e,i){var o=i(31),r=i(423),n=i(0),s=i(38),a=i(33),h=i(9),l=i(106),c=i(22),u=i(388),d=i(6),p=i(425),f=i(206),i=new n({Extends:h,initialize:function(t){h.call(this),this.game=t,this.name="TextureManager",this.list={},this._tempCanvas=o.create2D(this,1,1),this._tempContext=this._tempCanvas.getContext("2d"),this._pending=0,t.events.once(c.BOOT,this.boot,this)},boot:function(){this._pending=3,this.on(l.LOAD,this.updatePending,this),this.on(l.ERROR,this.updatePending,this);var t=this.game.config;this.addBase64("__DEFAULT",t.defaultImage),this.addBase64("__MISSING",t.missingImage),this.addBase64("__WHITE",t.whiteImage),this.game.events.once(c.DESTROY,this.destroy,this)},updatePending:function(){this._pending--,0===this._pending&&(this.off(l.LOAD),this.off(l.ERROR),this.emit(l.READY))},checkKey:function(t){return!this.exists(t)||!1},remove:function(t){if("string"==typeof t){if(!this.exists(t))return this;t=this.get(t)}return this.list.hasOwnProperty(t.key)&&(t.destroy(),this.emit(l.REMOVE,t.key)),this},removeKey:function(t){return this.list.hasOwnProperty(t)&&delete this.list[t],this},addBase64:function(e,t){var i,n;return this.checkKey(e)&&(i=this,(n=new Image).onerror=function(){i.emit(l.ERROR,e)},n.onload=function(){var t=i.create(e,n);p.Image(t,0),i.emit(l.ADD,e,t),i.emit(l.LOAD,e,t)},n.src=t),this},getBase64:function(t,e,i,n){void 0===i&&(i="image/png"),void 0===n&&(n=.92);var r,s="",t=this.getFrame(t,e);return t&&(t.source.isRenderTexture||t.source.isGLTexture)||t&&(e=t.canvasData,(r=o.create2D(this,e.width,e.height)).getContext("2d").drawImage(t.source.image,e.x,e.y,e.width,e.height,0,0,e.width,e.height),s=r.toDataURL(i,n),o.remove(r)),s},addImage:function(t,e,i){var n=null;return this.checkKey(t)&&(n=this.create(t,e),p.Image(n,0),i&&n.setDataSource(i),this.emit(l.ADD,t,n)),n},addGLTexture:function(t,e,i,n){var r=null;return this.checkKey(t)&&(void 0===i&&(i=e.width),void 0===n&&(n=e.height),(r=this.create(t,e,i,n)).add("__BASE",0,0,0,i,n),this.emit(l.ADD,t,r)),r},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(l.ADD,t,i)),i},generate:function(t,e){var i;return this.checkKey(t)?(i=o.create(this,1,1),e.canvas=i,u(e),this.addCanvas(t,i)):null},createCanvas:function(t,e,i){return void 0===e&&(e=256),void 0===i&&(i=256),this.checkKey(t)?(e=o.create(this,e,i,a.CANVAS,!0),this.addCanvas(t,e)):null},addCanvas:function(t,e,i){var n=null;return(i=void 0===i?!1:i)?n=new r(this,t,e,e.width,e.height):this.checkKey(t)&&(n=new r(this,t,e,e.width,e.height),this.list[t]=n,this.emit(l.ADD,t,n)),n},addAtlas:function(t,e,i,n){return 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 r=null;if(this.checkKey(t)){if(r=this.create(t,e),Array.isArray(i))for(var s=1===i.length,o=0;o<r.source.length;o++){var a=s?i[0]:i[o];p.JSONArray(r,o,a)}else p.JSONArray(r,0,i);n&&r.setDataSource(n),this.emit(l.ADD,t,r)}return r},addAtlasJSONHash:function(t,e,i,n){var r=null;if(this.checkKey(t)){if(r=this.create(t,e),Array.isArray(i))for(var s=0;s<i.length;s++)p.JSONHash(r,s,i[s]);else p.JSONHash(r,0,i);n&&r.setDataSource(n),this.emit(l.ADD,t,r)}return r},addAtlasXML:function(t,e,i,n){var r=null;return this.checkKey(t)&&(r=this.create(t,e),p.AtlasXML(r,0,i),n&&r.setDataSource(n),this.emit(l.ADD,t,r)),r},addUnityAtlas:function(t,e,i,n){var r=null;return this.checkKey(t)&&(r=this.create(t,e),p.UnityYAML(r,0,i),n&&r.setDataSource(n),this.emit(l.ADD,t,r)),r},addSpriteSheet:function(t,e,i){var n,r=null;return this.checkKey(t)&&(e=(r=this.create(t,e)).source[0].width,n=r.source[0].height,p.SpriteSheet(r,0,0,0,e,n,i),this.emit(l.ADD,t,r)),r},addSpriteSheetFromAtlas:function(t,e){if(!this.checkKey(t))return null;var i=d(e,"atlas",null),n=d(e,"frame",null);if(i&&n){i=this.get(i).get(n);if(i)return n=this.create(t,i.source.image),i.trimmed?p.SpriteSheetFromAtlas(n,i,e):p.SpriteSheet(n,0,i.cutX,i.cutY,i.cutWidth,i.cutHeight,e),this.emit(l.ADD,t,n),n}},create:function(t,e,i,n){var r=null;return this.checkKey(t)&&(r=new f(this,t,e,i,n),this.list[t]=r),r},exists:function(t){return this.list.hasOwnProperty(t)},get:function(t){return this.list[t=void 0===t?"__DEFAULT":t]||(t instanceof f?t: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)},getTextureKeys:function(){var t,e=[];for(t in this.list)"__DEFAULT"!==t&&"__MISSING"!==t&&e.push(t);return e},getPixel:function(t,e,i,n){i=this.getFrame(i,n);if(i){t-=i.x,e-=i.y;var n=i.data.cut;if(t+=n.x,e+=n.y,t>=n.x&&t<n.r&&e>=n.y&&e<n.b)return(n=this._tempContext).clearRect(0,0,1,1),n.drawImage(i.source.image,t,e,1,1,0,0,1,1),i=n.getImageData(0,0,1,1),new s(i.data[0],i.data[1],i.data[2],i.data[3])}return null},getPixelAlpha:function(t,e,i,n){i=this.getFrame(i,n);if(i){t-=i.x,e-=i.y;var n=i.data.cut;if(t+=n.x,e+=n.y,t>=n.x&&t<n.r&&e>=n.y&&e<n.b)return(n=this._tempContext).clearRect(0,0,1,1),n.drawImage(i.source.image,t,e,1,1,0,0,1,1),n.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,n=[null],r=1;r<arguments.length;r++)n.push(arguments[r]);for(i in this.list)n[0]=this.list[i],t.apply(e,n)},destroy:function(){for(var t in this.list)this.list[t].destroy();this.list={},this.game=null,o.remove(this._tempCanvas)}});t.exports=i},function(t,e,i){var n=i(0),d=i(18),p=i(38),r=i(33),s=i(138),o=i(206),i=new n({Extends:o,initialize:function(t,e,i,n,r){o.call(this,t,e,i,n,r),this.add("__BASE",0,0,0,n,r),this._source=this.frames.__BASE.source,this.canvas=this._source.image,this.context=this.canvas.getContext("2d"),this.width=n,this.height=r,this.imageData=this.context.getImageData(0,0,n,r),this.data=null,this.imageData&&(this.data=this.imageData.data),this.pixels=null,this.buffer,this.data&&(this.imageData.data.buffer?(this.buffer=this.imageData.data.buffer,this.pixels=new Uint32Array(this.buffer)):window.ArrayBuffer?(this.buffer=new ArrayBuffer(this.imageData.data.length),this.pixels=new Uint32Array(this.buffer)):this.pixels=this.imageData.data)},update:function(){return this.imageData=this.context.getImageData(0,0,this.width,this.height),this.data=this.imageData.data,this.imageData.data.buffer?(this.buffer=this.imageData.data.buffer,this.pixels=new Uint32Array(this.buffer)):window.ArrayBuffer?(this.buffer=new ArrayBuffer(this.imageData.data.length),this.pixels=new Uint32Array(this.buffer)):this.pixels=this.imageData.data,this.manager.game.config.renderType===r.WEBGL&&this.refresh(),this},draw:function(t,e,i){return this.context.drawImage(i,t,e),this.update()},drawFrame:function(t,e,i,n){void 0===i&&(i=0),void 0===n&&(n=0);var r,s,o,t=this.manager.getFrame(t,e);return t?(e=t.canvasData,r=t.cutWidth,s=t.cutHeight,o=t.source.resolution,this.context.drawImage(t.source.image,e.x,e.y,r,s,i,n,r/o,s/o),this.update()):this},setPixel:function(t,e,i,n,r,s){var o;return void 0===s&&(s=255),t=Math.abs(Math.floor(t)),e=Math.abs(Math.floor(e)),-1<this.getIndex(t,e)&&((o=this.context.getImageData(t,e,1,1)).data[0]=i,o.data[1]=n,o.data[2]=r,o.data[3]=s,this.context.putImageData(o,t,e)),this},putData:function(t,e,i,n,r,s,o){return void 0===s&&(s=t.width),void 0===o&&(o=t.height),this.context.putImageData(t,e,i,n=void 0===n?0:n,r=void 0===r?0:r,s,o),this},getData:function(t,e,i,n){return t=d(Math.floor(t),0,this.width-1),e=d(Math.floor(e),0,this.height-1),i=d(i,1,this.width-t),n=d(n,1,this.height-e),this.context.getImageData(t,e,i,n)},getPixel:function(t,e,i){i=i||new p;var n,r,s,t=this.getIndex(t,e);return-1<t&&(n=(e=this.data)[t+0],r=e[t+1],s=e[t+2],e=e[t+3],i.setTo(n,r,s,e)),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 r=d(t,0,this.width),s=d(t+i,0,this.width),t=d(e,0,this.height),o=d(e+n,0,this.height),a=new p,h=[],l=t;l<o;l++){for(var c=[],u=r;u<s;u++)a=this.getPixel(u,l,a),c.push({x:u,y:l,color:a.color,alpha:a.alphaGL});h.push(c)}return h},getIndex:function(t,e){return t=Math.abs(Math.round(t)),e=Math.abs(Math.round(e)),t<this.width&&e<this.height?4*(t+e*this.width):-1},refresh:function(){return this._source.update(),this},getCanvas:function(){return this.canvas},getContext:function(){return this.context},clear:function(t,e,i,n){return void 0===i&&(i=this.width),void 0===n&&(n=this.height),this.context.clearRect(t=void 0===t?0:t,e=void 0===e?0:e,i,n),this.update()},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=s(t,e),this.frames.__BASE.setSize(t,e,0,0),this.width=t,this.height=e,this.refresh()),this},destroy:function(){o.prototype.destroy.call(this),this._source=null,this.canvas=null,this.context=null,this.imageData=null,this.data=null,this.pixels=null,this.buffer=null}});t.exports=i},function(t,e,i){var n=i(31),r=i(0),o=i(138),a=i(168),i=new r({initialize:function(t,e,i,n,r){void 0===r&&(r=!1);var s=t.manager.game;this.renderer=s.renderer,this.texture=t,this.source=e,this.image=e,this.compressionAlgorithm=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=a.DEFAULT,this.isCanvas=e instanceof HTMLCanvasElement,this.isVideo=window.hasOwnProperty("HTMLVideoElement")&&e instanceof HTMLVideoElement,this.isRenderTexture="RenderTexture"===e.type,this.isGLTexture=window.hasOwnProperty("WebGLTexture")&&e instanceof WebGLTexture,this.isPowerOf2=o(this.width,this.height),this.glTexture=null,this.glIndex=0,this.glIndexCounter=-1,this.flipY=r,this.init(s)},init:function(t){var e=this.renderer;e&&(e.gl?this.isCanvas?this.glTexture=e.createCanvasTexture(this.image,!1,this.flipY):this.isVideo?this.glTexture=e.createVideoTexture(this.image,!1,this.flipY):this.isRenderTexture?(this.image=this.source.canvas,this.glTexture=e.createTextureFromSource(null,this.width,this.height,this.scaleMode)):this.isGLTexture?this.glTexture=this.source:this.glTexture=e.createTextureFromSource(this.image,this.width,this.height,this.scaleMode):this.isRenderTexture&&(this.image=this.source.canvas)),t.config.antialias||this.setFilter(1)},setFilter:function(t){this.renderer.gl&&this.renderer.setTextureFilter(this.glTexture,t),this.scaleMode=t},setFlipY:function(t){return this.flipY=t=void 0===t?!0:t,this},update:function(){var t=this.renderer.gl;t&&this.isCanvas?this.glTexture=this.renderer.updateCanvasTexture(this.image,this.glTexture,this.flipY):t&&this.isVideo&&(this.glTexture=this.renderer.updateVideoTexture(this.image,this.glTexture,this.flipY))},destroy:function(){this.glTexture&&this.renderer.deleteTexture(this.glTexture,!0),this.isCanvas&&n.remove(this.image),this.renderer=null,this.texture=null,this.source=null,this.image=null,this.glTexture=null}});t.exports=i},function(t,e,i){t.exports={AtlasXML:i(979),Canvas:i(980),Image:i(981),JSONArray:i(982),JSONHash:i(983),SpriteSheet:i(984),SpriteSheetFromAtlas:i(985),UnityYAML:i(986)}},function(t,e,i){var n=i(427),r=i(430),s=i(432);t.exports={create:function(t){var e=t.config.audio,i=t.device.audio;return new(e.noAudio||!i.webAudio&&!i.audioData?r:i.webAudio&&!e.disableWebAudio?s:n)(t)}}},function(t,e,i){var n=i(145),r=i(0),o=i(70),s=i(429),i=new r({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){t=new s(this,t,e);return this.sounds.push(t),t},unlock:function(){this.locked=!1;var e,i,n,s=this;this.game.cache.audio.entries.each(function(t,e){for(var i=0;i<e.length;i++)if("true"===e[i].dataset.locked)return!(s.locked=!0);return!0}),this.locked&&(e=!1,i=function(){e=!0},n=function(){var r,t;e?e=!1:(document.body.removeEventListener("touchmove",i),document.body.removeEventListener("touchend",n),r=[],s.game.cache.audio.entries.each(function(t,e){for(var i=0;i<e.length;i++){var n=e[i];"true"===n.dataset.locked&&r.push(n)}return!0}),0!==r.length&&((t=r[r.length-1]).oncanplaythrough=function(){t.oncanplaythrough=null,r.forEach(function(t){t.dataset.locked="false"}),s.unlocked=!0},r.forEach(function(t){t.load()})))},this.once(o.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(o.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(o.GLOBAL_VOLUME,this,t)}}});t.exports=i},function(t,e,i){var a=i(78);t.exports=function(t,e,i,n,r){if(void 0===r&&(r=t.length),a(t,n=void 0===n?0:n,r))for(var s=n;s<r;s++){var o=t[s];if(!e||void 0===i&&o.hasOwnProperty(e)||e&&void 0!==i&&o[e]===i)return o}return null}},function(t,e,i){var n=i(146),r=i(0),s=i(70),o=i(18),i=new r({Extends:n,initialize:function(t,e,i){if(void 0===i&&(i={}),this.tags=t.game.cache.audio.get(e),!this.tags)throw new Error('There is no audio asset with key "'+e+'" in the audio cache');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(s.PLAY,this),0))},pause:function(){return!(this.manager.isLocked(this,"pause")||0<this.startTime||!n.prototype.pause.call(this)||(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit(s.PAUSE,this),0))},resume:function(){return!(this.manager.isLocked(this,"resume")||0<this.startTime||!n.prototype.resume.call(this)||!this.pickAndPlayAudioTag()||(this.emit(s.RESUME,this),0))},stop:function(){return!this.manager.isLocked(this,"stop")&&!!n.prototype.stop.call(this)&&(this.stopAndReleaseAudioTag(),this.emit(s.STOP,this),!0)},pickAndPlayAudioTag:function(){var t,e;return this.pickAudioTag()?(e=this.currentConfig.seek,t=this.currentConfig.delay,e=(this.currentMarker?this.currentMarker.start:0)+e,this.previousTime=e,this.audio.currentTime=e,this.applyConfig(),0===t?(this.startTime=0,this.audio.paused&&this.playCatchPromise()):(this.startTime=window.performance.now()+1e3*t,this.audio.paused||this.audio.pause()),this.resetConfig(),!0):(this.reset(),!1)},pickAudioTag:function(){if(this.audio)return!0;for(var e,t,i=0;i<this.tags.length;i++){var n=this.tags[i];if("false"===n.dataset.used)return n.dataset.used="true",this.audio=n,!0}return!!this.manager.override&&(e=[],this.manager.forEachActiveSound(function(t){t.key===this.key&&t.audio&&e.push(t)},this),e.sort(function(t,e){return t.loop===e.loop?e.seek/e.duration-t.seek/t.duration:t.loop?1:-1}),t=e[0],this.audio=t.audio,t.reset(),t.audio=null,t.startTime=0,!(t.previousTime=0))},playCatchPromise:function(){var t=this.audio.play();t&&t.catch(function(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(0<this.startTime)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());else{var t=this.currentMarker?this.currentMarker.start:0,e=t+this.duration,i=this.audio.currentTime;if(this.currentConfig.loop)i>=e-this.manager.loopEndOffset?(this.audio.currentTime=t+Math.max(0,i-e),i=this.audio.currentTime):i<t&&(this.audio.currentTime+=t,i=this.audio.currentTime),i<this.previousTime&&this.emit(s.LOOPED,this);else if(e<=i)return this.reset(),this.stopAndReleaseAudioTag(),void this.emit(s.COMPLETE,this);this.previousTime=i}},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(s.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(s.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,s.RATE,t)||(this.calculateRate(),this.emit(s.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,s.DETUNE,t)||(this.calculateRate(),this.emit(s.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)||0<this.startTime||(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(s.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(s.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(s.PAN,this,t)}},setPan:function(t){return this.pan=t,this}});t.exports=i},function(t,e,i){var n=i(145),r=i(0),s=i(9),o=i(431),i=i(1),r=new r({Extends:s,initialize:function(t){s.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){t=new o(this,t,e);return this.sounds.push(t),t},addAudioSprite:function(t,e){t=this.add(t,e);return t.spritemap={},t},play:function(t,e){return!1},playAudioSprite:function(t,e,i){return!1},remove:function(t){return n.prototype.remove.call(this,t)},removeByKey:function(t){return n.prototype.removeByKey.call(this,t)},pauseAll:i,resumeAll:i,stopAll:i,update:i,setRate:i,setDetune:i,setMute:i,setVolume:i,forEachActiveSound:function(t,e){n.prototype.forEachActiveSound.call(this,t,e)},destroy:function(){n.prototype.destroy.call(this)}});t.exports=r},function(t,e,i){function n(){return!1}function r(){return this}var s=i(146),o=i(0),a=i(9),h=i(17),i=new o({Extends:a,initialize:function(t,e,i){void 0===i&&(i={}),a.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=h({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:n,updateMarker:n,removeMarker:function(){return null},play:n,pause:n,resume:n,stop:n,destroy:function(){s.prototype.destroy.call(this)},setMute:r,setVolume:r,setRate:r,setDetune:r,setSeek:r,setLoop:r,setPan:r});t.exports=i},function(t,e,i){var l=i(433),n=i(145),r=i(0),c=i(70),s=i(22),o=i(434),i=new r({Extends:n,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&&("ontouchstart"in window||"onclick"in window),n.call(this,t),this.locked&&t.isBooted?this.unlock():t.events.once(s.BOOT,this.unlock,this)},createAudioContext:function(t){t=t.config.audio;return t.context?(t.context.resume(),t.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){t=new o(this,t,e);return this.sounds.push(t),t},decodeAudio:function(t,e){for(var i=Array.isArray(t)?t:[{key:t,data:e}],n=this.game.cache.audio,r=i.length,s=0;s<i.length;s++){var o=i[s],a=o.key,o=o.data,h=("string"==typeof o&&(o=l(o)),function(t,e){n.add(t,e),this.emit(c.DECODED,t),0==--r&&this.emit(c.DECODED_ALL)}.bind(this,a)),a=function(t,e){0==--r&&this.emit(c.DECODED_ALL)}.bind(this,a);this.context.decodeAudioData(o,h,a)}},unlock:function(){function e(){var t;i.context&&n&&(t=n.removeEventListener,i.context.resume().then(function(){t("touchstart",e),t("touchend",e),t("click",e),t("keydown",e),i.unlocked=!0},function(){t("touchstart",e),t("touchend",e),t("click",e),t("keydown",e)}))}var i=this,n=document.body;n&&(n.addEventListener("touchstart",e,!1),n.addEventListener("touchend",e,!1),n.addEventListener("click",e,!1),n.addEventListener("keydown",e,!1))},onBlur:function(){this.locked||this.context.suspend()},onFocus:function(){var t=this.context;"suspended"!==t.state&&"interrupted"!==t.state||this.locked||t.resume()},update:function(t,e){n.prototype.update.call(this,t,e);t=this.context;t&&"interrupted"===t.state&&t.resume()},destroy:function(){var t;this.destination=null,this.masterVolumeNode.disconnect(),this.masterVolumeNode=null,this.masterMuteNode.disconnect(),this.masterMuteNode=null,this.game.config.audio.context?this.context.suspend():(t=this).context.close().then(function(){t.context=null}),n.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:1,0),this.emit(c.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(c.GLOBAL_VOLUME,this,t)}}});t.exports=i},function(t,e){for(var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=new Uint8Array(256),n=0;n<i.length;n++)c[i.charCodeAt(n)]=n;t.exports=function(t){var e,i,n,r,s=(t=t.substr(t.indexOf(",")+1)).length,o=.75*s,a=0;"="===t[s-1]&&(o--,"="===t[s-2]&&o--);for(var o=new ArrayBuffer(o),h=new Uint8Array(o),l=0;l<s;l+=4)e=c[t.charCodeAt(l)],i=c[t.charCodeAt(l+1)],n=c[t.charCodeAt(l+2)],r=c[t.charCodeAt(l+3)],h[a++]=e<<2|i>>4,h[a++]=(15&i)<<4|n>>2,h[a++]=(3&n)<<6|63&r;return o}},function(t,e,i){var n=i(146),r=i(0),s=i(70),i=new r({Extends:n,initialize:function(t,e,i){if(void 0===i&&(i={}),this.audioBuffer=t.game.cache.audio.get(e),!this.audioBuffer)throw new Error('Audio key "'+e+'" missing from cache');this.source=null,this.loopSource=null,this.muteNode=t.context.createGain(),this.volumeNode=t.context.createGain(),this.pannerNode=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.createStereoPanner?(this.pannerNode=t.context.createStereoPanner(),this.volumeNode.connect(this.pannerNode),this.pannerNode):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(s.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(s.PAUSE,this),0))},resume:function(){return!(this.manager.context.currentTime<this.startTime||!n.prototype.resume.call(this)||(this.createAndStartBufferSource(),this.emit(s.RESUME,this),0))},stop:function(){return!!n.prototype.stop.call(this)&&(this.stopAndRemoveBufferSource(),this.emit(s.STOP,this),!0)},createAndStartBufferSource:function(){var t=this.currentConfig.seek,e=this.currentConfig.delay,e=this.manager.context.currentTime+e,i=(this.currentMarker?this.currentMarker.start:0)+t,n=this.duration-t;this.playTime=e-t,this.startTime=e,this.source=this.createBufferSource(),this.applyConfig(),this.source.start(Math.max(0,e),Math.max(0,i),Math.max(0,n)),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 e=this,t=this.manager.context.createBufferSource();return t.buffer=this.audioBuffer,t.connect(this.muteNode),t.onended=function(t){t.target===e.source&&(e.currentConfig.loop?e.hasLooped=!0:e.hasEnded=!0)},t},stopAndRemoveBufferSource:function(){this.source&&(this.source.stop(),this.source.disconnect(),this.source=null),this.playTime=0,this.startTime=0,this.stopAndRemoveLoopBufferSource()},stopAndRemoveLoopBufferSource:function(){this.loopSource&&(this.loopSource.stop(),this.loopSource.disconnect(),this.loopSource=null),this.loopTime=0},applyConfig:function(){this.rateUpdates.length=0,this.rateUpdates.push({time:0,rate:1}),n.prototype.applyConfig.call(this)},update:function(){this.hasEnded?(this.hasEnded=!1,n.prototype.stop.call(this),this.stopAndRemoveBufferSource(),this.emit(s.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(s.LOOPED,this))},destroy:function(){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.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(s.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(s.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:1,0),this.emit(s.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(s.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(s.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(s.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(s.PAN,this,t)}},setPan:function(t){return this.pan=t,this}});t.exports=i},function(t,e){t.exports=function(t){for(var e=t.length,i=t[0].length,n=new Array(i),r=0;r<i;r++){n[r]=new Array(e);for(var s=e-1;-1<s;s--)n[r][s]=t[s][r]}return n}},function(t,e){function p(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function f(t,e){return t<e?-1:e<t?1:0}function g(t,e,i,n,r){for(void 0===i&&(i=0),void 0===n&&(n=t.length-1),void 0===r&&(r=f);i<n;){600<n-i&&(s=n-i+1,l=e-i+1,a=Math.log(s),o=.5*Math.exp(2*a/3),a=.5*Math.sqrt(a*o*(s-o)/s)*(l-s/2<0?-1:1),h=Math.max(i,Math.floor(e-l*o/s+a)),l=Math.min(n,Math.floor(e+(s-l)*o/s+a)),g(t,e,h,l,r));var s,o,a,h,l,c=t[e],u=i,d=n;for(p(t,i,e),0<r(t[n],c)&&p(t,i,n);u<d;){for(p(t,u,d),u++,d--;r(t[u],c)<0;)u++;for(;0<r(t[d],c);)d--}0===r(t[i],c)?p(t,i,d):p(t,++d,n),d<=e&&(i=d+1),e<=d&&(n=d-1)}}t.exports=g},function(t,e,i){var d=i(6),p=i(131);t.exports=function(t,e,i){var n=d(i,"max",0),r=d(i,"qty",1),s=d(i,"random",!1),o=d(i,"randomB",!1),a=d(i,"repeat",0),h=d(i,"yoyo",!1),l=[];o&&p(e),-1===a&&(a=0===n?0:(i=t.length*e.length*r,h&&(i*=2),Math.ceil(n/i)));for(var c=0;c<=a;c++){var u=function(t,e,i){for(var n=[],r=0;r<t.length;r++)for(var s=0;s<e.length;s++)for(var o=0;o<i;o++)n.push({a:t[r],b:e[s]});return n}(t,e,r);s&&p(u),l=l.concat(u),h&&(u.reverse(),l=l.concat(u))}return n&&l.splice(n),l}},function(t,e,i){t.exports={PROCESS_QUEUE_ADD:i(1041),PROCESS_QUEUE_REMOVE:i(1042)}},function(t,e,i){var c=i(13);t.exports=function(t,e){var i,n,r,s,o,a,h,l,e=c(e,"anims",null);return null!==e&&("string"==typeof e?t.anims.play(e):"object"==typeof e&&(i=t.anims,(l=c(e,"key",void 0))&&(n=c(e,"startFrame",void 0),r=c(e,"delay",0),s=c(e,"repeat",0),o=c(e,"repeatDelay",0),a=c(e,"yoyo",!1),h=c(e,"play",!1),e=c(e,"delayedPlay",0),l={key:l,delay:r,repeat:s,repeatDelay:o,yoyo:a,startFrame:n},h?i.play(l):0<e?i.playAfterDelay(l,e):i.load(l)))),t}},function(t,e,i){var n=i(0),r=i(109),i=new n({initialize:function(t,e,i,n,r){this.parent=t,this.x=e,this.y=i,this.frame=n,this.data={},this.tint=16777215,this._visible=r,this._alpha=1,this.flipX=!1,this.flipY=!1},setFrame:function(t){return void 0===t?this.frame=this.parent.frame:t instanceof r&&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|=0<this._alpha!=0<t,this._alpha=t}}});t.exports=i},function(t,e,i){var o=i(10);t.exports=function(t,e,i){void 0===i&&(i=new o);var n=Math.min(t.x,e.x),r=Math.min(t.y,e.y),s=Math.max(t.right,e.right)-n,t=Math.max(t.bottom,e.bottom)-r;return i.setTo(n,r,s,t)}},function(t,e,i){var n=i(0),r=i(11),s=i(1055),o=i(15),a=i(7),h=i(202),l=i(20),c=i(140),i=new n({Extends:o,Mixins:[r.AlphaSingle,r.BlendMode,r.Depth,r.Origin,r.ScrollFactor,r.Transform,r.Visible,s],initialize:function(t,e,i,n,r,s){o.call(this,t,"DOMElement"),this.parent=t.sys.game.domContainer,this.cache=t.sys.cache.html,this.node,this.transformOnly=!1,this.skewX=0,this.skewY=0,this.rotate3d=new c,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),r,s):this.createElement(n,r,s):n&&this.setElement(n,r,s),t.sys.events.on(l.SLEEP,this.handleSceneEvent,this),t.sys.events.on(l.WAKE,this.handleSceneEvent,this)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(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 r in e)n.style[r]=e[r];else"string"==typeof e&&(n.style=e);return n.style.zIndex="0",n.style.display="inline",n.style.position="absolute",(n.phaser=this).parent&&this.parent.appendChild(n),i&&(n.innerText=i),this.updateSize()},createFromCache:function(t,e){t=this.cache.get(t);return t&&this.createFromHTML(t,e),this},createFromHTML:function(t,e){void 0===e&&(e="div"),this.removeElement();e=document.createElement(e);return(this.node=e).style.zIndex="0",e.style.display="inline",e.style.position="absolute",(e.phaser=this).parent&&this.parent.appendChild(e),e.innerHTML=t,this.updateSize()},removeElement:function(){return this.node&&(h(this.node),this.node=null),this},updateSize:function(){var t=this.node,e=t.getBoundingClientRect();return this.width=t.clientWidth,this.height=t.clientHeight,this.displayWidth=e.width||0,this.displayHeight=e.height||0,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},preUpdate: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)}});t.exports=i},function(t,e,i){var p=i(1056),f=i(15),i=i(25),g=new i,m=new i,y=new i;t.exports=function(t,e,i,n){var r,s,o,a,h,l,c,u,d;e.node&&(r=e.node.style,o=e.scene.sys.settings,!r||!o.visible||f.RENDER_MASK!==e.renderFlags||0!==e.cameraFilter&&e.cameraFilter&i.id||e.parentContainer&&!e.parentContainer.willRender()?r.display="none":(o=e.parentContainer,s=i.alpha*e.alpha,o&&(s*=o.alpha),o=g,a=m,h=y,c=l=0,d=u="0%",n?(l=e.width*e.scaleX*e.originX,c=e.height*e.scaleY*e.originY,a.applyITRS(e.x-l,e.y-c,e.rotation,e.scaleX,e.scaleY),o.copyFrom(i.matrix),o.multiplyWithOffset(n,-i.scrollX*e.scrollFactorX,-i.scrollY*e.scrollFactorY),a.e=e.x-l,a.f=e.y-c):(l=e.width*e.originX,c=e.height*e.originY,a.applyITRS(e.x-l,e.y-c,e.rotation,e.scaleX,e.scaleY),o.copyFrom(i.matrix),u=100*e.originX+"%",d=100*e.originY+"%",a.e-=i.scrollX*e.scrollFactorX,a.f-=i.scrollY*e.scrollFactorY),o.multiply(a,h),e.transformOnly||(r.display="block",r.opacity=s,r.zIndex=e._depth,r.pointerEvents=e.pointerEvents,r.mixBlendMode=p[e._blendMode]),r.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+")",r.transformOrigin=u+" "+d))}},function(t,e,i){var n=i(0),r=i(11),s=i(15),i=i(1060),n=new n({Extends:s,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Flip,r.Origin,r.ScrollFactor,r.Size,r.Texture,r.Tint,r.Transform,r.Visible,i],initialize:function(t){s.call(this,t,"Extern")},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(){},render:function(){}});t.exports=n},function(t,e,i){var n=i(218),r=i(98),s=i(14),o=i(4);t.exports=function(t,e,i){void 0===i&&(i=new o);e=r(e,0,s.PI2);return n(t,e,i)}},function(t,e,i){var o=i(447),a=i(218),h=i(98),l=i(14);t.exports=function(t,e,i,n){void 0===n&&(n=[]),!e&&0<i&&(e=o(t)/i);for(var r=0;r<e;r++){var s=h(r/e,0,l.PI2);n.push(a(t,s))}return n}},function(t,e){t.exports=function(t){var e=t.width/2,t=t.height/2,i=Math.pow(e-t,2)/Math.pow(e+t,2);return Math.PI*(e+t)*(1+3*i/(10+Math.sqrt(4-3*i)))}},function(t,e,i){var p=i(217),f=i(30);t.exports=function(t,e,i,n,r,s){var o=e.commandBuffer,a=o.length,h=r||t.currentContext;if(0!==a&&f(t,h,e,i,n)){i.addToRenderList(e);var l,c,u;h.beginPath();for(var d=0;d<a;++d)switch(o[d]){case p.ARC:h.arc(o[d+1],o[d+2],o[d+3],o[d+4],o[d+5],o[d+6]),d+=7;break;case p.LINE_STYLE:u=o[d+1],c=o[d+2],l=o[d+3],h.strokeStyle="rgba("+((16711680&c)>>>16)+","+((65280&c)>>>8)+","+(255&c)+","+l+")",h.lineWidth=u,d+=3;break;case p.FILL_STYLE:c=o[d+1],l=o[d+2],h.fillStyle="rgba("+((16711680&c)>>>16)+","+((65280&c)>>>8)+","+(255&c)+","+l+")",d+=2;break;case p.BEGIN_PATH:h.beginPath();break;case p.CLOSE_PATH:h.closePath();break;case p.FILL_PATH:s||h.fill();break;case p.STROKE_PATH:s||h.stroke();break;case p.FILL_RECT:s?h.rect(o[d+1],o[d+2],o[d+3],o[d+4]):h.fillRect(o[d+1],o[d+2],o[d+3],o[d+4]),d+=4;break;case p.FILL_TRIANGLE:h.beginPath(),h.moveTo(o[d+1],o[d+2]),h.lineTo(o[d+3],o[d+4]),h.lineTo(o[d+5],o[d+6]),h.closePath(),s||h.fill(),d+=6;break;case p.STROKE_TRIANGLE:h.beginPath(),h.moveTo(o[d+1],o[d+2]),h.lineTo(o[d+3],o[d+4]),h.lineTo(o[d+5],o[d+6]),h.closePath(),s||h.stroke(),d+=6;break;case p.LINE_TO:h.lineTo(o[d+1],o[d+2]),d+=2;break;case p.MOVE_TO:h.moveTo(o[d+1],o[d+2]),d+=2;break;case p.LINE_FX_TO:h.lineTo(o[d+1],o[d+2]),d+=5;break;case p.MOVE_FX_TO:h.moveTo(o[d+1],o[d+2]),d+=5;break;case p.SAVE:h.save();break;case p.RESTORE:h.restore();break;case p.TRANSLATE:h.translate(o[d+1],o[d+2]),d+=2;break;case p.SCALE:h.scale(o[d+1],o[d+2]),d+=2;break;case p.ROTATE:h.rotate(o[d+1]),d+=1;break;case p.GRADIENT_FILL_STYLE:d+=5;break;case p.GRADIENT_LINE_STYLE:d+=6}h.restore()}}},function(t,e,i){var n=i(0),r=i(137),s=i(80),o=i(2),a=i(68),i=new n({initialize:function(t,e,i,n){void 0===n&&(n=!1),this.propertyKey=e,this.propertyValue=i,this.defaultValue=i,this.steps=0,this.counter=0,this.start=0,this.end=0,this.ease,this.emitOnly=n,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.loadConfig(t)},loadConfig:function(t,e){void 0===t&&(t={}),e&&(this.propertyKey=e),this.propertyValue=o(t,this.propertyKey,this.defaultValue),this.setMethods(),this.emitOnly&&(this.onUpdate=this.defaultUpdate)},toJSON:function(){return this.propertyValue},onChange:function(t){return this.propertyValue=t,this.setMethods()},setMethods:function(){var t,e,i=this.propertyValue,n=typeof i;return this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,"number"==n?(this.onEmit=this.staticValueEmit,this.onUpdate=this.staticValueUpdate):Array.isArray(i)?this.onEmit=this.randomStaticValueEmit:"function"==n?this.emitOnly?this.onEmit=i:this.onUpdate=i:"object"==n&&this.hasBoth(i,"start","end")?(this.start=i.start,this.end=i.end,(t=this.has(i,"random"))&&(this.onEmit=this.randomRangedValueEmit),this.has(i,"steps")?(this.steps=i.steps,this.counter=this.start,this.onEmit=this.steppedEmit):(e=this.has(i,"ease")?i.ease:"Linear",this.ease=s(e,i.easeParams),t||(this.onEmit=this.easedValueEmit),this.onUpdate=this.easeValueUpdate)):"object"==n&&this.hasBoth(i,"min","max")?(this.start=i.min,this.end=i.max,this.onEmit=this.randomRangedValueEmit):"object"==n&&this.has(i,"random")?(e=i.random,Array.isArray(e)&&(this.start=e[0],this.end=e[1]),this.onEmit=this.randomRangedValueEmit):"object"==n&&this.hasEither(i,"onEmit","onUpdate")&&(this.has(i,"onEmit")&&(this.onEmit=i.onEmit),this.has(i,"onUpdate")&&(this.onUpdate=i.onUpdate)),this},has:function(t,e){return t.hasOwnProperty(e)},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(t,e,i){return i},defaultUpdate:function(t,e,i,n){return n},staticValueEmit:function(){return this.propertyValue},staticValueUpdate:function(){return this.propertyValue},randomStaticValueEmit:function(){var t=Math.floor(Math.random()*this.propertyValue.length);return this.propertyValue[t]},randomRangedValueEmit:function(t,e){var i=r(this.start,this.end);return t&&t.data[e]&&(t.data[e].min=i),i},steppedEmit:function(){var t=this.counter,e=this.counter+(this.end-this.start)/this.steps;return this.counter=a(e,this.start,this.end),t},easedValueEmit:function(t,e){return t&&t.data[e]&&((t=t.data[e]).min=this.start,t.max=this.end),this.start},easeValueUpdate:function(t,e,i){t=t.data[e];return(t.max-t.min)*this.ease(i)+t.min}});t.exports=i},function(t,e,i){var n=i(0),o=i(2),i=new n({initialize:function(t,e,i,n,r){var s;"object"==typeof t?(t=o(s=t,"x",0),e=o(s,"y",0),i=o(s,"power",0),n=o(s,"epsilon",100),r=o(s,"gravity",50)):(void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=100),void 0===r&&(r=50)),this.x=t,this.y=e,this.active=!0,this._gravity=r,this._power=0,this._epsilon=0,this.power=i,this.epsilon=n},update:function(t,e){var i,n=this.x-t.x,r=this.y-t.y,s=n*n+r*r;0!==s&&(i=Math.sqrt(s),s<this._epsilon&&(s=this._epsilon),e=this._power*e/(s*i)*100,t.velocityX+=n*e,t.velocityY+=r*e)},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}}});t.exports=i},function(t,e,i){var n=i(0),o=i(36),a=i(50),i=new n({initialize:function(t){this.emitter=t,this.frame=null,this.x=0,this.y=0,this.velocityX=0,this.velocityY=0,this.accelerationX=0,this.accelerationY=0,this.maxVelocityX=1e4,this.maxVelocityY=1e4,this.bounce=0,this.scaleX=1,this.scaleY=1,this.alpha=1,this.angle=0,this.rotation=0,this.tint=16777215,this.life=1e3,this.lifeCurrent=1e3,this.delayCurrent=0,this.lifeT=0,this.data={tint:{min:16777215,max:16777215,current:16777215},alpha:{min:1,max:1},rotate:{min:0,max:0},scaleX:{min:1,max:1},scaleY:{min:1,max:1}}},isAlive:function(){return 0<this.lifeCurrent},resetPosition:function(){this.x=0,this.y=0},fire:function(t,e){var i=this.emitter;this.frame=i.getFrame(),i.emitZone&&i.emitZone.getPoint(this),this.x+=void 0===t?i.x.onEmit(this,"x"):t,this.y+=void 0===e?i.y.onEmit(this,"y"):e,this.life=i.lifespan.onEmit(this,"lifespan"),this.lifeCurrent=this.life,this.lifeT=0;var n,r,s,t=i.speedX.onEmit(this,"speedX"),e=i.speedY?i.speedY.onEmit(this,"speedY"):t;i.radial?(s=o(i.angle.onEmit(this,"angle")),this.velocityX=Math.cos(s)*Math.abs(t),this.velocityY=Math.sin(s)*Math.abs(e)):i.moveTo?(s=i.moveToX.onEmit(this,"moveToX"),n=i.moveToY?i.moveToY.onEmit(this,"moveToY"):s,r=Math.atan2(n-this.y,s-this.x),s=a(this.x,this.y,s,n)/(this.life/1e3),this.velocityX=Math.cos(r)*s,this.velocityY=Math.sin(r)*s):(this.velocityX=t,this.velocityY=e),i.acceleration&&(this.accelerationX=i.accelerationX.onEmit(this,"accelerationX"),this.accelerationY=i.accelerationY.onEmit(this,"accelerationY")),this.maxVelocityX=i.maxVelocityX.onEmit(this,"maxVelocityX"),this.maxVelocityY=i.maxVelocityY.onEmit(this,"maxVelocityY"),this.delayCurrent=i.delay.onEmit(this,"delay"),this.scaleX=i.scaleX.onEmit(this,"scaleX"),this.scaleY=i.scaleY?i.scaleY.onEmit(this,"scaleY"):this.scaleX,this.angle=i.rotate.onEmit(this,"rotate"),this.rotation=o(this.angle),this.bounce=i.bounce.onEmit(this,"bounce"),this.alpha=i.alpha.onEmit(this,"alpha"),this.tint=i.tint.onEmit(this,"tint")},computeVelocity:function(t,e,i,n){var r=this.velocityX,s=this.velocityY,o=this.accelerationX,a=this.accelerationY,h=this.maxVelocityX,l=this.maxVelocityY;r+=t.gravityX*i,s+=t.gravityY*i,o&&(r+=o*i),a&&(s+=a*i),h<r?r=h:r<-h&&(r=-h),l<s?s=l:s<-l&&(s=-l),this.velocityX=r,this.velocityY=s;for(var c=0;c<n.length;c++)n[c].update(this,e,i)},checkBounds:function(t){var e=t.bounds,i=-this.bounce;this.x<e.x&&t.collideLeft?(this.x=e.x,this.velocityX*=i):this.x>e.right&&t.collideRight&&(this.x=e.right,this.velocityX*=i),this.y<e.y&&t.collideTop?(this.y=e.y,this.velocityY*=i):this.y>e.bottom&&t.collideBottom&&(this.y=e.bottom,this.velocityY*=i)},update:function(t,e,i){var n,r;return 0<this.delayCurrent?(this.delayCurrent-=t,!1):(n=this.emitter,r=1-this.lifeCurrent/this.life,this.lifeT=r,this.computeVelocity(n,t,e,i),this.x+=this.velocityX*e,this.y+=this.velocityY*e,n.bounds&&this.checkBounds(n),n.deathZone&&n.deathZone.willKill(this)?!(this.lifeCurrent=0):(this.scaleX=n.scaleX.onUpdate(this,"scaleX",r,this.scaleX),n.scaleY?this.scaleY=n.scaleY.onUpdate(this,"scaleY",r,this.scaleY):this.scaleY=this.scaleX,this.angle=n.rotate.onUpdate(this,"rotate",r,this.angle),this.rotation=o(this.angle),this.alpha=n.alpha.onUpdate(this,"alpha",r,this.alpha),this.tint=n.tint.onUpdate(this,"tint",r,this.tint),this.lifeCurrent-=t,this.lifeCurrent<=0))}});t.exports=i},function(t,e,i){var n=i(35),r=i(0),s=i(11),o=i(453),a=i(454),h=i(449),l=i(2),c=i(210),u=i(455),d=i(126),p=i(451),f=i(456),g=i(10),m=i(79),y=i(3),v=i(68),i=new r({Mixins:[s.BlendMode,s.Mask,s.ScrollFactor,s.Visible],initialize:function(t,e){this.manager=t,this.texture=t.texture,this.frames=[t.defaultFrame],this.defaultFrame=t.defaultFrame,this.configFastMap=["active","blendMode","collideBottom","collideLeft","collideRight","collideTop","deathCallback","deathCallbackScope","emitCallback","emitCallbackScope","follow","frequency","gravityX","gravityY","maxParticles","name","on","particleBringToTop","particleClass","radial","timeScale","trackVisible","visible"],this.configOpMap=["accelerationX","accelerationY","angle","alpha","bounce","delay","lifespan","maxVelocityX","maxVelocityY","moveToX","moveToY","quantity","rotate","scaleX","scaleY","speedX","speedY","tint","x","y"],this.name="",this.particleClass=p,this.x=new h(e,"x",0,!0),this.y=new h(e,"y",0,!0),this.radial=!0,this.gravityX=0,this.gravityY=0,this.acceleration=!1,this.accelerationX=new h(e,"accelerationX",0,!0),this.accelerationY=new h(e,"accelerationY",0,!0),this.maxVelocityX=new h(e,"maxVelocityX",1e4,!0),this.maxVelocityY=new h(e,"maxVelocityY",1e4,!0),this.speedX=new h(e,"speedX",0,!0),this.speedY=new h(e,"speedY",0,!0),this.moveTo=!1,this.moveToX=new h(e,"moveToX",0,!0),this.moveToY=new h(e,"moveToY",0,!0),this.bounce=new h(e,"bounce",0,!0),this.scaleX=new h(e,"scaleX",1),this.scaleY=new h(e,"scaleY",1),this.tint=new h(e,"tint",16777215),this.alpha=new h(e,"alpha",1),this.lifespan=new h(e,"lifespan",1e3,!0),this.angle=new h(e,"angle",{min:0,max:360},!0),this.rotate=new h(e,"rotate",0),this.emitCallback=null,this.emitCallbackScope=null,this.deathCallback=null,this.deathCallbackScope=null,this.maxParticles=0,this.quantity=new h(e,"quantity",1,!0),this.delay=new h(e,"delay",0,!0),this.frequency=0,this.on=!0,this.particleBringToTop=!0,this.timeScale=1,this.emitZone=null,this.deathZone=null,this.bounds=null,this.collideLeft=!0,this.collideRight=!0,this.collideTop=!0,this.collideBottom=!0,this.active=!0,this.visible=!0,this.blendMode=n.NORMAL,this.follow=null,this.followOffset=new y,this.trackVisible=!1,this.currentFrame=0,this.randomFrame=!0,this.frameQuantity=1,this.dead=[],this.alive=[],this._counter=0,this._frameCounter=0,e&&this.fromJSON(e)},fromJSON:function(t){if(t){for(var e,i=0,n="",i=0;i<this.configFastMap.length;i++)n=this.configFastMap[i],d(t,n)&&(this[n]=l(t,n));for(i=0;i<this.configOpMap.length;i++)n=this.configOpMap[i],d(t,n)&&this[n].loadConfig(t);this.acceleration=0!==this.accelerationX.propertyValue||0!==this.accelerationY.propertyValue,this.moveTo=0!==this.moveToX.propertyValue||0!==this.moveToY.propertyValue,d(t,"speed")&&(this.speedX.loadConfig(t,"speed"),this.speedY=null),(u(t,["speedX","speedY"])||this.moveTo)&&(this.radial=!1),d(t,"scale")&&(this.scaleX.loadConfig(t,"scale"),this.scaleY=null),d(t,"callbackScope")&&(e=l(t,"callbackScope",null),this.emitCallbackScope=e,this.deathCallbackScope=e),d(t,"emitZone")&&this.setEmitZone(t.emitZone),d(t,"deathZone")&&this.setDeathZone(t.deathZone),d(t,"bounds")&&this.setBounds(t.bounds),d(t,"followOffset")&&this.followOffset.setFromObject(l(t,"followOffset",0)),d(t,"frame")&&this.setFrame(t.frame),d(t,"reserve")&&this.reserve(t.reserve)}return this},toJSON:function(t){void 0===t&&(t={});for(var e=0,i="",e=0;e<this.configFastMap.length;e++)t[i=this.configFastMap[e]]=this[i];for(e=0;e<this.configOpMap.length;e++)this[i=this.configOpMap[e]]&&(t[i]=this[i].toJSON());return this.speedY||(delete t.speedX,t.speed=this.speedX.toJSON()),this.scaleY||(delete t.scaleX,t.scale=this.scaleX.toJSON()),t},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;return 1===this.frames.length?this.defaultFrame:this.randomFrame?c(this.frames):(t=this.frames[this.currentFrame],this._frameCounter++,this._frameCounter===this.frameQuantity&&(this._frameCounter=0,this.currentFrame=v(this.currentFrame+1,0,this._frameLength)),t)},setFrame:function(t,e,i){void 0===i&&(i=1),this.randomFrame=e=void 0===e?!0:e,this.frameQuantity=i,this.currentFrame=0,this._frameCounter=0;var e=typeof t;return Array.isArray(t)||"string"==e||"number"==e?this.manager.setEmitterFrames(t,this):"object"==e&&((t=l(e=t,"frames",null))&&this.manager.setEmitterFrames(t,this),t=l(e,"cycle",!1),this.randomFrame=!t,this.frameQuantity=l(e,"quantity",i)),this._frameLength=this.frames.length,1===this._frameLength&&(this.frameQuantity=1,this.randomFrame=!1),this},setRadial:function(t){return this.radial=t=void 0===t?!0:t,this},setPosition:function(t,e){return this.x.onChange(t),this.y.onChange(e),this},setBounds:function(t,e,i,n){var r;return"object"==typeof t&&(t=(r=t).x,e=r.y,i=d(r,"w")?r.w:r.width,n=d(r,"h")?r.h:r.height),this.bounds?this.bounds.setTo(t,e,i,n):this.bounds=new g(t,e,i,n),this},setSpeedX:function(t){return this.speedX.onChange(t),this.radial=!1,this},setSpeedY:function(t){return this.speedY&&(this.speedY.onChange(t),this.radial=!1),this},setSpeed:function(t){return this.speedX.onChange(t),this.speedY=null,this.radial=!0,this},setScaleX:function(t){return this.scaleX.onChange(t),this},setScaleY:function(t){return this.scaleY.onChange(t),this},setScale:function(t){return this.scaleX.onChange(t),this.scaleY=null,this},setGravityX:function(t){return this.gravityX=t,this},setGravityY:function(t){return this.gravityY=t,this},setGravity:function(t,e){return this.gravityX=t,this.gravityY=e,this},setAlpha:function(t){return this.alpha.onChange(t),this},setTint:function(t){return this.tint.onChange(t),this},setEmitterAngle:function(t){return this.angle.onChange(t),this},setAngle:function(t){return this.angle.onChange(t),this},setLifespan:function(t){return this.lifespan.onChange(t),this},setQuantity:function(t){return this.quantity.onChange(t),this},setFrequency:function(t,e){return this.frequency=t,this._counter=0,e&&this.quantity.onChange(e),this},setEmitZone:function(t){if(void 0===t)this.emitZone=null;else{var e=l(t,"type","random"),i=l(t,"source",null);switch(e){case"random":this.emitZone=new f(i);break;case"edge":var n=l(t,"quantity",1),r=l(t,"stepRate",0),s=l(t,"yoyo",!1),o=l(t,"seamless",!0);this.emitZone=new a(i,n,r,s,o)}}return this},setDeathZone:function(t){var e;return void 0===t?this.deathZone=null:(e=l(t,"type","onEnter"),(t=l(t,"source",null))&&"function"==typeof t.contains&&(this.deathZone=new o(t,"onEnter"===e))),this},reserve:function(t){for(var e=this.dead,i=0;i<t;i++)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 0<this.maxParticles&&this.getParticleCount()===this.maxParticles},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;0<e.length;)t.push(e.pop());return this},forEachAlive:function(t,e){for(var i=this.alive,n=i.length,r=0;r<n;++r)t.call(e,i[r],this);return this},forEachDead:function(t,e){for(var i=this.dead,n=i.length,r=0;r<n;++r)t.call(e,i[r],this);return this},start:function(){return this.on=!0,this._counter=0,this},stop:function(){return this.on=!1,this},pause:function(){return this.active=!1,this},resume:function(){return this.active=!0,this},remove:function(){return this.manager.removeEmitter(this),this},depthSort:function(){return m(this.alive,this.depthSortCallback),this},flow:function(t,e){return void 0===e&&(e=1),this.frequency=t,this.quantity.onChange(e),this.start()},explode:function(t,e,i){return this.frequency=-1,this.emitParticle(t,e,i)},emitParticleAt:function(t,e,i){return this.emitParticle(i,t,e)},emitParticle:function(t,e,i){if(!this.atLimit()){void 0===t&&(t=this.quantity.onEmit());for(var n=this.dead,r=this.follow?this.follow.x+this.followOffset.x:e,s=this.follow?this.follow.y+this.followOffset.y:i,o=0;o<t;o++){var a=n.pop();if((a=a||new this.particleClass(this)).fire(r,s),this.particleBringToTop?this.alive.push(a):this.alive.unshift(a),this.emitCallback&&this.emitCallback.call(this.emitCallbackScope,a,this),this.atLimit())break}return a}},preUpdate:function(t,e){var i=(e*=this.timeScale)/1e3,n=(this.trackVisible&&(this.visible=this.follow.visible),this.manager.getProcessors()),r=this.alive,s=this.dead,o=0,a=[],h=r.length;for(o=0;o<h;o++){var l=r[o];l.update(e,i,n)&&a.push({index:o,particle:l})}if(0<(h=a.length))for(var c=this.deathCallback,u=this.deathCallbackScope,o=h-1;0<=o;o--){var d=a[o];r.splice(d.index,1),s.push(d.particle),c&&c.call(u,d.particle),d.particle.resetPosition()}this.on&&(0===this.frequency?this.emitParticle():0<this.frequency&&(this._counter-=e,this._counter<=0&&(this.emitParticle(),this._counter=this.frequency-Math.abs(this._counter))))},depthSortCallback:function(t,e){return t.y-e.y}});t.exports=i},function(t,e,i){i=new(i(0))({initialize:function(t,e){this.source=t,this.killOnEnter=e},willKill:function(t){t=this.source.contains(t.x,t.y);return t&&this.killOnEnter||!t&&!this.killOnEnter}});t.exports=i},function(t,e,i){i=new(i(0))({initialize:function(t,e,i,n,r){void 0===n&&(n=!1),void 0===r&&(r=!0),this.source=t,this.points=[],this.quantity=e,this.stepRate=i,this.yoyo=n,this.counter=-1,this.seamless=r,this._length=0,this._direction=0,this.updateSource()},updateSource:function(){this.points=this.source.getPoints(this.quantity,this.stepRate),this.seamless&&(e=this.points[0],t=this.points[this.points.length-1],e.x===t.x&&e.y===t.y&&this.points.pop());var t,e=this._length;return this._length=this.points.length,this._length<e&&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)}});t.exports=i},function(t,e){t.exports=function(t,e){for(var i=0;i<e.length;i++)if(t.hasOwnProperty(e[i]))return!0;return!1}},function(t,e,i){var n=i(0),r=i(3),i=new n({initialize:function(t){this.source=t,this._tempVec=new r},getPoint:function(t){var e=this._tempVec;this.source.getRandomPoint(e),t.x=e.x,t.y=e.y}});t.exports=i},function(t,e,i){var n=i(0),r=i(11),o=i(73),i=new n({Extends:o,Mixins:[r.PathFollower],initialize:function(t,e,i,n,r,s){o.call(this,t,i,n,r,s),this.path=e},preUpdate:function(t,e){this.anims.update(t,e),this.pathUpdate(t)}});t.exports=i},function(t,e){t.exports=function(t,e,i){var n=t.canvas,r=t.context,s=t.style,o=[],a=0,h=i.length;0<s.maxLines&&s.maxLines<i.length&&(h=s.maxLines),s.syncFont(n,r);for(var l=0;l<h;l++){var c=s.strokeThickness;c+=r.measureText(i[l]).width,s.wordWrap&&(c-=r.measureText(" ").width),o[l]=Math.ceil(c),a=Math.max(a,o[l])}n=e.fontSize+s.strokeThickness,e=n*h,t=t.lineSpacing;return 1<h&&(e+=t*(h-1)),{width:a,height:e,lines:h,lineWidths:o,lineSpacing:t,lineHeight:n}}},function(t,e,i){var n=i(0),o=i(13),a=i(6),r=i(460),h={fontFamily:["fontFamily","Courier"],fontSize:["fontSize","16px"],fontStyle:["fontStyle",""],backgroundColor:["backgroundColor",null],color:["color","#fff"],stroke:["stroke","#fff"],strokeThickness:["strokeThickness",0],shadowOffsetX:["shadow.offsetX",0],shadowOffsetY:["shadow.offsetY",0],shadowColor:["shadow.color","#000"],shadowBlur:["shadow.blur",0],shadowStroke:["shadow.stroke",!1],shadowFill:["shadow.fill",!1],align:["align","left"],maxLines:["maxLines",0],fixedWidth:["fixedWidth",0],fixedHeight:["fixedHeight",0],resolution:["resolution",0],rtl:["rtl",!1],testString:["testString","|MÉqgy"],baselineX:["baselineX",1.2],baselineY:["baselineY",1.4],wordWrapWidth:["wordWrap.width",null],wordWrapCallback:["wordWrap.callback",null],wordWrapCallbackScope:["wordWrap.callbackScope",null],wordWrapUseAdvanced:["wordWrap.useAdvancedWrap",!1]},i=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);t=a(e,"metrics",!1);this.metrics=t?{ascent:a(t,"ascent",0),descent:a(t,"descent",0),fontSize:a(t,"fontSize",0)}:r(this)},setStyle:function(t,e,i){for(var n in void 0===e&&(e=!0),void 0===i&&(i=!1),t&&t.hasOwnProperty("fontSize")&&"number"==typeof t.fontSize&&(t.fontSize=t.fontSize.toString()+"px"),h){var r=i?h[n][1]:this[n];this[n]=("wordWrapCallback"===n||"wordWrapCallbackScope"===n?a:o)(t,h[n][0],r)}var s=a(t,"font",null),s=(null!==s&&this.setFont(s,!1),this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim(),a(t,"fill",null));return null!==s&&(this.color=s),e?this.update(!0):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=r(this)),this.parent.updateText()},setFont:function(t,e){void 0===e&&(e=!0);var i,n=t,r="",s="";return"string"!=typeof t?(n=a(t,"fontFamily","Courier"),r=a(t,"fontSize","16px"),s=a(t,"fontStyle","")):(i=0,s=2<(t=t.split(" ")).length?t[i++]:"",r=t[i++]||"16px",n=t[i++]||"Courier"),n===this.fontFamily&&r===this.fontSize&&s===this.fontStyle||(this.fontFamily=n,this.fontSize=r,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)},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,r,s){return void 0===e&&(e=0),void 0===i&&(i="#000"),void 0===n&&(n=0),void 0===r&&(r=!1),void 0===s&&(s=!0),this.shadowOffsetX=t=void 0===t?0:t,this.shadowOffsetY=e,this.shadowColor=i,this.shadowBlur=n,this.shadowStroke=r,this.shadowFill=s,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 this.shadowColor=t=void 0===t?"#000":t,this.update(!1)},setShadowBlur:function(t){return this.shadowBlur=t=void 0===t?0: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 this.align=t=void 0===t?"left":t,this.update(!1)},setMaxLines:function(t){return this.maxLines=t=void 0===t?0:t,this.update(!1)},getTextMetrics:function(){var t=this.metrics;return{ascent:t.ascent,descent:t.descent,fontSize:t.fontSize}},toJSON:function(){var t,e={};for(t in h)e[t]=this[t];return e.metrics=this.getTextMetrics(),e},destroy:function(){this.parent=void 0}});t.exports=i},function(t,e,i){var p=i(31);t.exports=function(t){var e=p.create(this),i=e.getContext("2d"),n=(t.syncFont(e,i),i.measureText(t.testString));if("actualBoundingBoxAscent"in n)return r=n.actualBoundingBoxAscent,s=n.actualBoundingBoxDescent,p.remove(e),{ascent:r,descent:s,fontSize:r+s};var r=Math.ceil(n.width*t.baselineX),s=2*r,o=r*t.baselineY|0,n=(e.width=r,e.height=s,i.fillStyle="#f00",i.fillRect(0,0,r,s),i.font=t._font,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(t.testString,0,o),{ascent:0,descent:0,fontSize:0}),t=i.getImageData(0,0,r,s);if(t){for(var a,h=t.data,i=h.length,l=4*r,c=0,u=!1,d=0;d<o;d++){for(a=0;a<l;a+=4)if(255!==h[c+a]){u=!0;break}if(u)break;c+=l}for(n.ascent=o-d,c=i-l,u=!1,d=s;o<d;d--){for(a=0;a<l;a+=4)if(255!==h[c+a]){u=!0;break}if(u)break;c-=l}n.descent=d-o}else n.ascent=o,n.descent=6+o;return n.fontSize=n.ascent+n.descent,p.remove(e),n}},function(t,e,i){var n=i(1097),r=i(0),l=i(36),c=i(59),u=i(65),d=i(14),p=i(34),i=new r({Extends:p,Mixins:[n],initialize:function(t,e,i,n,r,s,o,a,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===r&&(r=0),void 0===s&&(s=360),void 0===o&&(o=!1),p.call(this,t,"Arc",new u(0,0,n=void 0===n?128:n)),this._startAngle=r,this._endAngle=s,this._anticlockwise=o,this._iterations=.01,this.setPosition(e,i);t=2*this.geom.radius;this.setSize(t,t),void 0!==a&&this.setFillStyle(a,h),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){t=2*(this.geom.radius=t);this.setSize(t,t),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 this.iterations=t=void 0===t?.01: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=this._iterations,e=t,i=this.geom.radius,n=l(this._startAngle),r=l(this._endAngle),s=i,o=i;r-=n,this._anticlockwise?r<-d.PI2?r=-d.PI2:0<r&&(r=-d.PI2+r%d.PI2):r>d.PI2?r=d.PI2:r<0&&(r=d.PI2+r%d.PI2);for(var a,h=[s+Math.cos(n)*i,o+Math.sin(n)*i];e<1;)a=r*e+n,h.push(s+Math.cos(a)*i,o+Math.sin(a)*i),e+=t;return a=r+n,h.push(s+Math.cos(a)*i,o+Math.sin(a)*i),h.push(s+Math.cos(n)*i,o+Math.sin(n)*i),this.pathIndexes=c(h),this.pathData=h,this}});t.exports=i},function(t,e,i){var n=i(0),r=i(1100),s=i(59),o=i(10),a=i(34),i=new n({Extends:a,Mixins:[r],initialize:function(t,e,i,n,r,s){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!==r&&this.setFillStyle(r,s),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),r=0;r<n.length;r++)i.push(n[r].x,n[r].y);return i.push(n[0].x,n[0].y),this.pathIndexes=s(i),this.pathData=i,this}});t.exports=i},function(t,e,i){var n=i(0),r=i(59),s=i(1103),a=i(111),h=i(34),i=new n({Extends:h,Mixins:[s],initialize:function(t,e,i,n,r,s,o){void 0===e&&(e=0),void 0===i&&(i=0),h.call(this,t,"Ellipse",new a((n=void 0===n?128:n)/2,(r=void 0===r?128:r)/2,n,r)),this._smoothness=64,this.setPosition(e,i),this.width=n,this.height=r,void 0!==s&&this.setFillStyle(s,o),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.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=r(t),this.pathData=t,this}});t.exports=i},function(t,e,i){var n=i(0),u=i(34),i=i(1106),n=new n({Extends:u,Mixins:[i],initialize:function(t,e,i,n,r,s,o,a,h,l,c){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=128),void 0===r&&(r=128),void 0===s&&(s=32),void 0===o&&(o=32),u.call(this,t,"Grid",null),this.cellWidth=s,this.cellHeight=o,this.showCells=!0,this.outlineFillColor=0,this.outlineFillAlpha=0,this.showOutline=!0,this.showAltCells=!1,this.altFillColor,this.altFillAlpha,this.setPosition(e,i),this.setSize(n,r),this.setFillStyle(a,h),void 0!==l&&this.setOutlineStyle(l,c),this.updateDisplayOrigin()},setFillStyle:function(t,e){return void 0===e&&(e=1),void 0===t?this.showCells=!1:(this.fillColor=t,this.fillAlpha=e,this.showCells=!0),this},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},setOutlineStyle:function(t,e){return void 0===e&&(e=1),void 0===t?this.showOutline=!1:(this.outlineFillColor=t,this.outlineFillAlpha=e,this.showOutline=!0),this}});t.exports=n},function(t,e,i){var n=i(1109),r=i(0),h=i(34),i=new r({Extends:h,Mixins:[n],initialize:function(t,e,i,n,r,s,o,a){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=48),void 0===r&&(r=32),void 0===s&&(s=15658734),void 0===o&&(o=10066329),void 0===a&&(a=13421772),h.call(this,t,"IsoBox",null),this.projection=4,this.fillTop=s,this.fillLeft=o,this.fillRight=a,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isFilled=!0,this.setPosition(e,i),this.setSize(n,r),this.updateDisplayOrigin()},setProjection:function(t){return this.projection=t,this},setFaces:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),this.showTop=t=void 0===t?!0: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}});t.exports=i},function(t,e,i){var n=i(0),r=i(1112),l=i(34),i=new n({Extends:l,Mixins:[r],initialize:function(t,e,i,n,r,s,o,a,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=48),void 0===r&&(r=32),void 0===s&&(s=!1),void 0===o&&(o=15658734),void 0===a&&(a=10066329),void 0===h&&(h=13421772),l.call(this,t,"IsoTriangle",null),this.projection=4,this.fillTop=o,this.fillLeft=a,this.fillRight=h,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isReversed=s,this.isFilled=!0,this.setPosition(e,i),this.setSize(n,r),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===e&&(e=!0),void 0===i&&(i=!0),this.showTop=t=void 0===t?!0: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}});t.exports=i},function(t,e,i){var n=i(0),l=i(34),c=i(47),i=i(1115),n=new n({Extends:l,Mixins:[i],initialize:function(t,e,i,n,r,s,o,a,h){void 0===e&&(e=0),void 0===i&&(i=0),l.call(this,t,"Line",new c(n=void 0===n?0:n,r=void 0===r?0:r,s=void 0===s?128:s,o=void 0===o?0:o));t=Math.max(1,this.geom.right-this.geom.left),n=Math.max(1,this.geom.bottom-this.geom.top);this.lineWidth=1,this._startWidth=1,this._endWidth=1,this.setPosition(e,i),this.setSize(t,n),void 0!==a&&this.setStrokeStyle(1,a,h),this.updateDisplayOrigin()},setLineWidth:function(t,e){return void 0===e&&(e=t),this._startWidth=t,this._endWidth=e,this.lineWidth=t,this},setTo:function(t,e,i,n){return this.geom.setTo(t,e,i,n),this}});t.exports=n},function(t,e,i){var n=i(1118),r=i(0),s=i(59),o=i(469),a=i(227),h=i(34),l=i(472),i=new r({Extends:h,Mixins:[n],initialize:function(t,e,i,n,r,s){void 0===e&&(e=0),void 0===i&&(i=0),h.call(this,t,"Polygon",new a(n));t=o(this.geom);this.setPosition(e,i),this.setSize(t.width,t.height),void 0!==r&&this.setFillStyle(r,s),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()},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=s(t),this.pathData=t,this}});t.exports=i},function(t,e,i){var h=i(10);t.exports=function(t,e){void 0===e&&(e=new h);for(var i,n=1/0,r=1/0,s=-n,o=-r,a=0;a<t.points.length;a++)i=t.points[a],n=Math.min(n,i.x),r=Math.min(r,i.y),s=Math.max(s,i.x),o=Math.max(o,i.y);return e.x=n,e.y=r,e.width=s-n,e.height=o-r,e}},function(t,e,i){var d=i(67),p=i(47),f=i(471);t.exports=function(t,e,i,n){void 0===n&&(n=[]);var r=t.points,s=f(t);!e&&0<i&&(e=s/i);for(var o=0;o<e;o++)for(var a=s*(o/e),h=0,l=0;l<r.length;l++){var c=r[l],u=r[(l+1)%r.length],c=new p(c.x,c.y,u.x,u.y),u=d(c);if(!(a<h||h+u<a)){c=c.getPoint((a-h)/u);n.push(c);break}h+=u}return n}},function(t,e,i){var o=i(67),a=i(47);t.exports=function(t){for(var e=t.points,i=0,n=0;n<e.length;n++){var r=e[n],s=e[(n+1)%e.length],r=new a(r.x,r.y,s.x,s.y);i+=o(r)}return i}},function(t,e){function l(t,e){return t[0]=e[0],t[1]=e[1],t}t.exports=function(t){for(var e=[],i=t.points,n=0;n<i.length;n++)e.push([i[n].x,i[n].y]);var r=[];for(0<e.length&&r.push(l([0,0],e[0])),n=0;n<e.length-1;n++){var s=e[n],o=e[n+1],a=s[0],s=s[1],h=o[0],o=o[1];r.push([.85*a+.15*h,.85*s+.15*o]),r.push([.15*a+.85*h,.15*s+.85*o])}return 1<e.length&&r.push(l([0,0],e[e.length-1])),t.setTo(r)}},function(t,e,i){var n=i(0),a=i(10),h=i(34),i=i(1121),n=new n({Extends:h,Mixins:[i],initialize:function(t,e,i,n,r,s,o){void 0===e&&(e=0),void 0===i&&(i=0),h.call(this,t,"Rectangle",new a(0,0,n=void 0===n?128:n,r=void 0===r?128:r)),this.setPosition(e,i),this.setSize(n,r),void 0!==s&&this.setFillStyle(s,o),this.updateDisplayOrigin(),this.updateData()},setSize:function(t,e){return this.width=t,this.height=e,this.geom.setSize(t,e),this.updateData(),this},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),e.getLineD(i),t.push(i.x2,i.y2),this.pathData=t,this}});t.exports=n},function(t,e,i){var n=i(1124),r=i(0),l=i(59),h=i(34),i=new r({Extends:h,Mixins:[n],initialize:function(t,e,i,n,r,s,o,a){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=5),void 0===r&&(r=32),void 0===s&&(s=64),h.call(this,t,"Star",null),this._points=n,this._innerRadius=r,this._outerRadius=s,this.setPosition(e,i),this.setSize(2*s,2*s),void 0!==o&&this.setFillStyle(o,a),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,r=Math.PI/2*3,s=Math.PI/e,o=n,a=n;t.push(o,a+-n);for(var h=0;h<e;h++)t.push(o+Math.cos(r)*n,a+Math.sin(r)*n),r+=s,t.push(o+Math.cos(r)*i,a+Math.sin(r)*i),r+=s;return t.push(o,a+-n),this.pathIndexes=l(t),this.pathData=t,this}});t.exports=i},function(t,e,i){var n=i(0),u=i(34),d=i(82),i=i(1127),n=new n({Extends:u,Mixins:[i],initialize:function(t,e,i,n,r,s,o,a,h,l,c){void 0===e&&(e=0),void 0===i&&(i=0),u.call(this,t,"Triangle",new d(n=void 0===n?0:n,r=void 0===r?128:r,s=void 0===s?64:s,o=void 0===o?0:o,a=void 0===a?128:a,h=void 0===h?128:h));t=this.geom.right-this.geom.left,n=this.geom.bottom-this.geom.top;this.setPosition(e,i),this.setSize(t,n),void 0!==l&&this.setFillStyle(l,c),this.updateDisplayOrigin(),this.updateData()},setTo:function(t,e,i,n,r,s){return this.geom.setTo(t,e,i,n,r,s),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}});t.exports=n},function(t,e,i){var l=i(4),c=i(67);t.exports=function(t,e,i){void 0===i&&(i=new l);var n,r,s,o,a=t.getLineA(),h=t.getLineB(),t=t.getLineC();return e<=0||1<=e?(i.x=a.x1,i.y=a.y1):(o=0,(e=((n=c(a))+(r=c(h))+(s=c(t)))*e)<n?(i.x=a.x1+(a.x2-a.x1)*(o=e/n),i.y=a.y1+(a.y2-a.y1)*o):n+r<e?(o=(e-=n+r)/s,i.x=t.x1+(t.x2-t.x1)*o,i.y=t.y1+(t.y2-t.y1)*o):(o=(e-=n)/r,i.x=h.x1+(h.x2-h.x1)*o,i.y=h.y1+(h.y2-h.y1)*o)),i}},function(t,e,i){var g=i(67),m=i(4);t.exports=function(t,e,i,n){void 0===n&&(n=[]);var r=t.getLineA(),s=t.getLineB(),o=t.getLineC(),a=g(r),h=g(s),l=g(o),c=a+h+l;!e&&0<i&&(e=c/i);for(var u=0;u<e;u++){var d=c*(u/e),p=0,f=new m;d<a?(f.x=r.x1+(r.x2-r.x1)*(p=d/a),f.y=r.y1+(r.y2-r.y1)*p):a+h<d?(p=(d-=a+h)/l,f.x=o.x1+(o.x2-o.x1)*p,f.y=o.y1+(o.y2-o.y1)*p):(p=(d-=a)/h,f.x=s.x1+(s.x2-s.x1)*p,f.y=s.y1+(s.y2-s.y1)*p),n.push(f)}return n}},function(t,e){t.exports=function(t,e,i){if(!t||"number"==typeof t)return!1;if(t.hasOwnProperty(e))t[e]=i;else{if(-1===e.indexOf("."))return!1;for(var n=e.split("."),r=t,s=t,o=0;o<n.length;o++){if(!r.hasOwnProperty(n[o]))return!1;r=(s=r)[n[o]]}s[n[n.length-1]]=i}return!0}},function(t,e,i){var C=i(116),O=i(117);t.exports=function(t,e,i,n,r,s,o){if(void 0===n&&(n=!1),void 0===s&&(s=16777215),void 0===o&&(o=1),t.length===e.length){var a={faces:[],vertices:[]},h=n?3:2,l=Array.isArray(s),c=Array.isArray(o);if(Array.isArray(i)&&0<i.length)for(E=0;E<i.length;E++){var u=i[E],d=2*i[E],p=i[E]*h,f=t[p],g=t[1+p],m=n?t[2+p]:0,y=e[d],v=e[1+d],x=l?s[u]:s,b=c?o[u]:o,w=0,T=0,S=0;r&&(w=r[p],T=r[1+p],S=n?r[2+p]:0),a.vertices.push(new O(f,g,m,y,v,x,b,w,T,S))}else for(var P=0,_=0,E=0;E<t.length;E+=h)f=t[E],g=t[E+1],m=n?t[E+2]:0,y=e[P],v=e[P+1],x=l?s[_]:s,b=c?o[_]:o,S=T=w=0,r&&(w=r[E],T=r[E+1],S=n?r[E+2]:0),a.vertices.push(new O(f,g,m,y,v,x,b,w,T,S)),P+=2,_++;for(E=0;E<a.vertices.length;E+=3){var A=a.vertices[E],M=a.vertices[E+1],k=a.vertices[E+2];a.faces.push(new C(A,M,k))}return a}}},function(t,e,i){var E=i(116),n=i(69),r=i(39),A=i(117),M=new r,k=new r,C=new n;t.exports=function(t,e,i,n,r,s,o,a,h,l){void 0===i&&(i=1),void 0===o&&(o=0),void 0===a&&(a=0),void 0===h&&(h=0),void 0===l&&(l=!0);var c={faces:[],verts:[]},u=t.materials;M.set(n=void 0===n?0:n,r=void 0===r?0:r,s=void 0===s?0:s),k.set(o,a,h),C.fromRotationXYTranslation(k,M,l);for(var d=0;d<t.models.length;d++)for(var p=t.models[d],f=p.vertices,g=p.textureCoords,m=p.faces,y=0;y<m.length;y++){var v=m[y],x=v.vertices[0],b=v.vertices[1],w=v.vertices[2],T=f[x.vertexIndex],S=f[b.vertexIndex],P=f[w.vertexIndex],x=x.textureCoordsIndex,b=b.textureCoordsIndex,w=w.textureCoordsIndex,x=-1===x?{u:0,v:1}:g[x],b=-1===b?{u:0,v:0}:g[b],w=-1===w?{u:1,v:1}:g[w],_=16777215,v=(""!==v.material&&u[v.material]&&(_=u[v.material]),new A(T.x*i,T.y*i,T.z*i,x.u,x.v,_).transformMat4(C)),T=new A(S.x*i,S.y*i,S.z*i,b.u,b.v,_).transformMat4(C),x=new A(P.x*i,P.y*i,P.z*i,w.u,w.v,_).transformMat4(C);c.verts.push(v,T,x),c.faces.push(new E(v,T,x))}return e&&(e.faces=e.faces.concat(c.faces),e.vertices=e.vertices.concat(c.verts)),c}},function(t,e,i){var a=i(65),n=i(0),r=i(11),h=i(200),s=i(12),o=new n({Extends:a,Mixins:[r.ScrollFactor,r.Visible],initialize:function(t,e,i,n,r,s,o){a.call(this,t,e,i),this.color=new h(n,r,s),this.intensity=o,this.renderFlags=15,this.cameraFilter=0,this.setScrollFactor(1,1)},willRender:function(t){return!(o.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},setColor:function(t){t=s.getFloatsFromUintRGB(t);return this.color.set(t[0],t[1],t[2]),this},setIntensity:function(t){return this.intensity=t,this},setRadius:function(t){return this.radius=t,this}});o.RENDER_MASK=15,t.exports=o},function(t,e,i){var o=i(151),n=i(0),a=i(50),s=i(481),h=i(150),r=i(200),l=i(74),c=i(79),u=i(12),i=new n({initialize:function(){this.lights=[],this.ambientColor=new r(.1,.1,.1),this.active=!1,this.maxLights=-1,this.visibleLights=0},addPointLight:function(t,e,i,n,r,s){return this.systems.displayList.add(new h(this.scene,t,e,i,n,r,s))},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,n=[],r=0;r<e.length;r++){var s=e[r];s.willRender(t)&&o(s,i)&&n.push({light:s,distance:a(s.x,s.y,i.centerX,i.centerY)})}return n.length>this.maxLights&&(c(n,this.sortByDistance),n=n.slice(0,this.maxLights)),this.visibleLights=n.length,n},sortByDistance:function(t,e){return t.distance>=e.distance},setAmbientColor:function(t){t=u.getFloatsFromUintRGB(t);return this.ambientColor.set(t[0],t[1],t[2]),this},getMaxVisibleLights:function(){return this.maxLights},getLightCount:function(){return this.lights.length},addLight:function(t,e,i,n,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=128),void 0===r&&(r=1);n=u.getFloatsFromUintRGB(n=void 0===n?16777215:n),t=new s(t,e,i,n[0],n[1],n[2],r);return this.lights.push(t),t},removeLight:function(t){t=this.lights.indexOf(t);return 0<=t&&l(this.lights,t),this},shutdown:function(){this.lights.length=0},destroy:function(){this.shutdown()}});t.exports=i},function(t,e,i){var n=i(56),i=i(17)(!1,{Circle:i(1191),Ellipse:i(1201),Intersects:i(484),Line:i(1221),Mesh:i(1243),Point:i(1246),Polygon:i(1260),Rectangle:i(502),Triangle:i(1293)},n);t.exports=i},function(t,e,i){t.exports={CircleToCircle:i(231),CircleToRectangle:i(151),GetCircleToCircle:i(1211),GetCircleToRectangle:i(1212),GetLineToCircle:i(232),GetLineToLine:i(485),GetLineToPoints:i(486),GetLineToPolygon:i(487),GetLineToRectangle:i(234),GetRaysFromPointToPolygon:i(1213),GetRectangleIntersection:i(1214),GetRectangleToRectangle:i(1215),GetRectangleToTriangle:i(1216),GetTriangleToCircle:i(1217),GetTriangleToLine:i(492),GetTriangleToTriangle:i(1218),LineToCircle:i(233),LineToLine:i(96),LineToRectangle:i(488),PointToLine:i(496),PointToLineSegment:i(1219),RectangleToRectangle:i(152),RectangleToTriangle:i(489),RectangleToValues:i(1220),TriangleToCircle:i(491),TriangleToLine:i(493),TriangleToTriangle:i(494)}},function(t,e,i){var l=i(39);t.exports=function(t,e,i){var n=t.x1,r=t.y1,s=t.x2,t=t.y2,o=e.x1,a=e.y1,s=s-n,t=t-r,h=e.x2-o,e=e.y2-a;return 0!=s&&0!=e*s-h*t&&((o=(o+h*(a=(s*(a-r)+t*(n-o))/(h*t-e*s))-n)/s)<0||a<0||1<a?null:(i=void 0===i?new l:i).set(n+s*o,r+t*o,o))}},function(t,e,i){var a=i(39),h=i(485),l=new(i(47)),c=new a;t.exports=function(t,e,i){var n=!1;(i=void 0===i?new a:i).set(),c.set();for(var r=e[0],s=1;s<e.length;s++){var o=e[s];l.setTo(r.x,r.y,o.x,o.y),r=o,h(t,l,c)&&(!n||c.z<i.z)&&(i.copy(c),n=!0)}return n?i:null}},function(t,e,i){var n=i(39),s=i(140),o=i(486),a=new n;t.exports=function(t,e,i){void 0===i&&(i=new s),Array.isArray(e)||(e=[e]);var n=!1;i.set(),a.set();for(var r=0;r<e.length;r++)o(t,e[r].points,a)&&(!n||a.z<i.z)&&(i.set(a.x,a.y,a.z,r),n=!0);return n?i:null}},function(t,e){t.exports=function(t,e){var i=t.x1,n=t.y1,r=t.x2,t=t.y2,s=e.x,o=e.y,a=e.right,e=e.bottom,h=0;if(s<=i&&i<=a&&o<=n&&n<=e||s<=r&&r<=a&&o<=t&&t<=e)return!0;if(i<s&&s<=r){if(o<(h=n+(t-n)*(s-i)/(r-i))&&h<=e)return!0}else if(a<i&&r<=a&&o<=(h=n+(t-n)*(a-i)/(r-i))&&h<=e)return!0;if(n<o&&o<=t){if(s<=(h=i+(r-i)*(o-n)/(t-n))&&h<=a)return!0}else if(e<n&&t<=e&&s<=(h=i+(r-i)*(e-n)/(t-n))&&h<=a)return!0;return!1}},function(t,e,i){var l=i(96),c=i(57),u=i(235),d=i(490);t.exports=function(t,e){var i,n,r,s,o,a,h;return!(e.left>t.right||e.right<t.left||e.top>t.bottom||e.bottom<t.top)&&(h=e.getLineA(),i=e.getLineB(),n=e.getLineC(),!(!c(t,h.x1,h.y1)&&!c(t,h.x2,h.y2))||(!(!c(t,i.x1,i.y1)&&!c(t,i.x2,i.y2))||(!(!c(t,n.x1,n.y1)&&!c(t,n.x2,n.y2))||(r=t.getLineA(),s=t.getLineB(),o=t.getLineC(),a=t.getLineD(),!!(l(h,r)||l(h,s)||l(h,o)||l(h,a))||(!!(l(i,r)||l(i,s)||l(i,o)||l(i,a))||(!!(l(n,r)||l(n,s)||l(n,o)||l(n,a))||(h=d(t),0<u(e,h,!0).length)))))))}},function(t,e){t.exports=function(t,e){return(e=void 0===e?[]:e).push({x:t.x,y:t.y}),e.push({x:t.right,y:t.y}),e.push({x:t.right,y:t.bottom}),e.push({x:t.x,y:t.bottom}),e}},function(t,e,i){var n=i(233),r=i(115);t.exports=function(t,e){return!(t.left>e.right||t.right<e.left||t.top>e.bottom||t.bottom<e.top||!r(t,e.x,e.y)&&!n(t.getLineA(),e)&&!n(t.getLineB(),e)&&!n(t.getLineC(),e))}},function(t,e,i){var h=i(4),l=i(493),c=i(96);t.exports=function(t,e,i){if(void 0===i&&(i=[]),l(t,e))for(var n=t.getLineA(),r=t.getLineB(),t=t.getLineC(),s=[new h,new h,new h],o=[c(n,e,s[0]),c(r,e,s[1]),c(t,e,s[2])],a=0;a<3;a++)o[a]&&i.push(s[a]);return i}},function(t,e,i){var n=i(96);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))}},function(t,e,i){var h=i(235),l=i(495),c=i(96);t.exports=function(t,e){var i,n,r,s,o,a;return!(t.left>e.right||t.right<e.left||t.top>e.bottom||t.bottom<e.top)&&(a=t.getLineA(),i=t.getLineB(),n=t.getLineC(),r=e.getLineA(),s=e.getLineB(),o=e.getLineC(),!!(c(a,r)||c(a,s)||c(a,o))||(!!(c(i,r)||c(i,s)||c(i,o))||(!!(c(n,r)||c(n,s)||c(n,o))||(a=l(t),0<h(e,a,!0).length||(a=l(e),0<h(t,a,!0).length)))))}},function(t,e){t.exports=function(t,e){return(e=void 0===e?[]:e).push({x:t.x1,y:t.y1}),e.push({x:t.x2,y:t.y2}),e.push({x:t.x3,y:t.y3}),e}},function(t,e){t.exports=function(t,e,i){void 0===i&&(i=1);var n,r=e.x1,s=e.y1,o=e.x2,e=e.y2,a=t.x,t=t.y,h=(o-r)*(o-r)+(e-s)*(e-s);return 0!=h&&((n=((a-r)*(o-r)+(t-s)*(e-s))/h)<0?Math.sqrt((r-a)*(r-a)+(s-t)*(s-t))<=i:0<=n&&n<=1?Math.abs(((s-t)*(o-r)-(r-a)*(e-s))/h)*Math.sqrt(h)<=i:Math.sqrt((o-a)*(o-a)+(e-t)*(e-t))<=i)}},function(t,e,i){var n=i(14),r=i(68),s=i(97);t.exports=function(t){t=s(t)-n.TAU;return r(t,-Math.PI,Math.PI)}},function(t,e){var M,k="",C="";function O(t){return 0===t.models.length&&t.models.push({faces:[],name:"untitled",textureCoords:[],vertexNormals:[],vertices:[]}),k="",t.models[t.models.length-1]}t.exports=function(t,e){M=e=void 0===e?!0:e;var i={materials:{},materialLibraries:[],models:[]};C=k="";for(var n,r,s,o,a,h,l,c,u,d,p,f,g=t.split("\n"),m=0;m<g.length;m++){var y=(-1<(f=(p=g[m]).indexOf("#"))?p.substring(0,f):p).replace(/\s\s+/g," ").trim().split(" ");switch(y[0].toLowerCase()){case"o":d=2<=y.length?y[1]:"untitled",i.models.push({faces:[],name:d,textureCoords:[],vertexNormals:[],vertices:[]}),k="";break;case"g":2===y.length&&(k=y[1]);break;case"v":d=i,0,l=2<=(u=(h=y).length)?parseFloat(h[1]):0,c=3<=u?parseFloat(h[2]):0,u=4<=u?parseFloat(h[3]):0,O(d).vertices.push({x:l,y:c,z:u});break;case"vt":h=i,u=c=l=void 0,l=2<=(a=(o=y).length)?parseFloat(o[1]):0,c=3<=a?parseFloat(o[2]):0,u=4<=a?parseFloat(o[3]):0,isNaN(l)&&(l=0),isNaN(c)&&(c=0),isNaN(u)&&(u=0),M&&(c=1-c),O(h).textureCoords.push({u:l,v:c,w:u});break;case"vn":a=i,0,n=2<=(s=(o=y).length)?parseFloat(o[1]):0,r=3<=s?parseFloat(o[2]):0,s=4<=s?parseFloat(o[3]):0,O(a).vertexNormals.push({x:n,y:r,z:s});break;case"f":A=E=_=P=S=T=w=b=void 0;var v=y,x=i,b=v.length-1;if(!(b<3)){for(var w={group:k,material:C,vertices:[]},T=0;T<b;T++){var S,P,_,E=v[T+1].split("/"),A=E.length;A<1||3<A||(P=S=_=0,_=parseInt(E[0],10),1<A&&""!==E[1]&&(S=parseInt(E[1],10)),2<A&&(P=parseInt(E[2],10)),0!==_&&(_<0&&(_=O(x).vertices.length+1+_),--S,--_,--P,w.vertices.push({textureCoordsIndex:S,vertexIndex:_,vertexNormalIndex:P})))}O(x).faces.push(w)}break;case"mtllib":2<=y.length&&i.materialLibraries.push(y[1]);break;case"usemtl":2<=y.length&&(C=y[1])}}return i}},function(t,e,i){var c=i(103);t.exports=function(t){for(var e={},i=t.split("\n"),n="",r=0;r<i.length;r++){var s=i[r].trim();if(0!==s.indexOf("#")&&""!==s){var o=s.replace(/\s\s+/g," ").trim().split(" ");switch(o[0].toLowerCase()){case"newmtl":n=o[1];break;case"kd":var a=Math.floor(255*o[1]),h=2<=o.length?Math.floor(255*o[2]):a,l=3<=o.length?Math.floor(255*o[3]):a;e[n]=c(a,h,l)}}}return e}},function(t,e){t.exports=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)}},function(t,e){t.exports=function(t){return t.x*t.x+t.y*t.y}},function(t,e,i){var n=i(10);n.Area=i(1267),n.Ceil=i(1268),n.CeilAll=i(1269),n.CenterOn=i(190),n.Clone=i(1270),n.Contains=i(57),n.ContainsPoint=i(1271),n.ContainsRect=i(503),n.CopyFrom=i(1272),n.Decompose=i(490),n.Equals=i(1273),n.FitInside=i(1274),n.FitOutside=i(1275),n.Floor=i(1276),n.FloorAll=i(1277),n.FromPoints=i(199),n.FromXY=i(1278),n.GetAspectRatio=i(237),n.GetCenter=i(1279),n.GetPoint=i(171),n.GetPoints=i(306),n.GetSize=i(1280),n.Inflate=i(1281),n.Intersection=i(1282),n.MarchingAnts=i(316),n.MergePoints=i(1283),n.MergeRect=i(1284),n.MergeXY=i(1285),n.Offset=i(1286),n.OffsetPoint=i(1287),n.Overlaps=i(1288),n.Perimeter=i(130),n.PerimeterPoint=i(1289),n.Random=i(174),n.RandomOutside=i(1290),n.SameDimensions=i(1291),n.Scale=i(1292),n.Union=i(441),t.exports=n},function(t,e){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}},function(t,e,i){var n=i(4);t.exports=function(t,e){return(e=void 0===e?new n:e).x=(t.x1+t.x2+t.x3)/3,e.y=(t.y1+t.y2+t.y3)/3,e}},function(t,e){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}},function(t,e,i){var u=i(4);function d(t,e,i,n){t-=i,i=e-n;return Math.sqrt(t*t+i*i)}t.exports=function(t,e){void 0===e&&(e=new u);var i=t.x1,n=t.y1,r=t.x2,s=t.y2,o=t.x3,t=t.y3,a=d(o,t,r,s),h=d(i,n,o,t),l=d(r,s,i,n),c=a+h+l;return e.x=(i*a+r*h+o*l)/c,e.y=(n*a+s*h+t*l)/c,e}},function(t,e){t.exports=function(r,s){return function(t,e,i,n){e=r.getPixelAlpha(e,i,n.texture.key,n.frame.name);return e&&s<=e}}},function(t,e){t.exports=function(t,e,i){return{gameObject:t,enabled:!0,alwaysEnabled:!1,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,dragX:0,dragY:0}}},function(t,e,i){i=new(i(0))({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}});t.exports=i},function(t,e,i){var n=i(0),r=i(239),i=new n({initialize:function(t,e){this.pad=t,this.events=t.manager,this.index=e,this.value=0,this.threshold=1,this.pressed=!1},update:function(t){this.value=t;var e=this.pad,i=this.index;t>=this.threshold?this.pressed||(this.pressed=!0,this.events.emit(r.BUTTON_DOWN,e,this,t),this.pad.emit(r.GAMEPAD_BUTTON_DOWN,i,t,this)):this.pressed&&(this.pressed=!1,this.events.emit(r.BUTTON_UP,e,this,t),this.pad.emit(r.GAMEPAD_BUTTON_UP,i,t,this))},destroy:function(){this.pad=null,this.events=null}});t.exports=i},function(t,e,i){var s=i(509),o=i(510),n=i(0),a=i(9),h=i(3),i=new n({Extends:a,initialize:function(t,e){a.call(this),this.manager=t,this.pad=e,this.id=e.id,this.index=e.index;for(var i=[],n=0;n<e.buttons.length;n++)i.push(new o(this,n));this.buttons=i;for(var r=[],n=0;n<e.axes.length;n++)r.push(new s(this,n));this.axes=r,this.vibration=e.vibrationActuator;t={value:0,pressed:!1},this._LCLeft=i[14]||t,this._LCRight=i[15]||t,this._LCTop=i[12]||t,this._LCBottom=i[13]||t,this._RCLeft=i[2]||t,this._RCRight=i[1]||t,this._RCTop=i[3]||t,this._RCBottom=i[0]||t,this._FBLeftTop=i[4]||t,this._FBLeftBottom=i[6]||t,this._FBRightTop=i[5]||t,this._FBRightBottom=i[7]||t,t={value:0};this._HAxisLeft=r[0]||t,this._VAxisLeft=r[1]||t,this._HAxisRight=r[2]||t,this._VAxisRight=r[3]||t,this.leftStick=new h,this.rightStick=new h,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)){for(var e=this.buttons,i=t.buttons,n=e.length,r=0;r<n;r++)e[r].update(i[r].value);for(var s=this.axes,o=t.axes,n=s.length,r=0;r<n;r++)s[r].update(o[r]);2<=n&&(this.leftStick.set(s[0].getValue(),s[1].getValue()),4<=n&&this.rightStick.set(s[2].getValue(),s[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}}});t.exports=i},function(t,e,i){var n=i(0),r=i(9),s=i(154),i=new n({Extends:r,initialize:function(t,e){r.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(s.DOWN,this,t):(this.isDown=!0,this.isUp=!1,this.timeDown=t.timeStamp,this.duration=0,this._justDown=!0,this._justUp=!1,this.emit(s.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(s.UP,this,t))},reset:function(){return this.preventDefault=!0,this.enabled=!0,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}});t.exports=i},function(t,e,i){var n=i(0),o=i(154),a=i(2),h=i(514),l=i(516),i=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 r=e[n];"string"==typeof r?this.keyCodes.push(r.toUpperCase().charCodeAt(0)):"number"==typeof r?this.keyCodes.push(r):r.hasOwnProperty("keyCode")&&this.keyCodes.push(r.keyCode)}this.current=this.keyCodes[0],this.index=0,this.size=this.keyCodes.length,this.timeLastMatched=0,this.matched=!1,this.timeMatched=0,this.resetOnWrongKey=a(i,"resetOnWrongKey",!0),this.maxKeyDelay=a(i,"maxKeyDelay",0),this.resetOnMatch=a(i,"resetOnMatch",!1),this.deleteOnMatch=a(i,"deleteOnMatch",!1);var s=this;this.onKeyDown=function(t){!s.matched&&s.enabled&&h(t,s)&&(s.manager.emit(o.COMBO_MATCH,s,t),s.resetOnMatch?l(s):s.deleteOnMatch&&s.destroy())},this.manager.on(o.ANY_KEY_DOWN,this.onKeyDown)},progress:{get:function(){return this.index/this.size}},destroy:function(){this.enabled=!1,this.keyCodes=[],this.manager.off(o.ANY_KEY_DOWN,this.onKeyDown),this.manager=null}});t.exports=i},function(t,e,i){var s=i(515);t.exports=function(t,e){var i,n,r;return!!e.matched||(r=n=!1,t.keyCode!==e.current||0<e.index&&0<e.maxKeyDelay&&(i=e.timeLastMatched+e.maxKeyDelay,!(t.timeStamp<=i))||(r=!0,n=s(t,e)),!r&&e.resetOnWrongKey&&(e.index=0,e.current=e.keyCodes[0]),n&&(e.timeLastMatched=t.timeStamp,e.matched=!0,e.timeMatched=t.timeStamp),n)}},function(t,e){t.exports=function(t,e){return e.timeLastMatched=t.timeStamp,e.index++,e.index===e.size||(e.current=e.keyCodes[e.index],!1)}},function(t,e){t.exports=function(t){return t.current=t.keyCodes[0],t.index=0,t.timeLastMatched=0,t.matched=!1,t.timeMatched=0,t}},function(t,e,i){var s=i(240);t.exports=function(t,e){var i=s(e,t.xhrSettings),n=new XMLHttpRequest;if(n.open("GET",t.src,i.async,i.user,i.password),n.responseType=t.xhrSettings.responseType,n.timeout=i.timeout,i.headers)for(var r in i.headers)n.setRequestHeader(r,i.headers[r]);return i.header&&i.headerValue&&n.setRequestHeader(i.header,i.headerValue),i.requestedWith&&n.setRequestHeader("X-Requested-With",i.requestedWith),i.overrideMimeType&&n.overrideMimeType(i.overrideMimeType),i.withCredentials&&(n.withCredentials=!0),n.onload=t.onLoad.bind(t,n),n.onerror=t.onError.bind(t,n),n.onprogress=t.onProgress.bind(t),n.send(),n}},function(t,e,i){var n=i(0),r=i(21),o=i(23),s=i(8),h=i(2),l=i(519),c=i(7),u=new n({Extends:o,initialize:function(t,e,i,n,r){c(e)&&(e=h(s=e,"key"),n=h(s,"xhrSettings"),r=h(s,"context",r));var s={type:"audio",cache:t.cacheManager.audio,extension:i.type,responseType:"arraybuffer",key:e,url:i.url,xhrSettings:n,config:{context:r}};o.call(this,t,s)},onProcess:function(){this.state=r.FILE_PROCESSING;var e=this;this.config.context.decodeAudioData(this.xhrLoader.response,function(t){e.data=t,e.onProcessComplete()},function(t){e.onProcessError()}),this.config.context=null}});u.create=function(t,e,i,n,r){var s=t.systems.game,o=s.config.audio,a=s.device.audio,i=(c(e)&&(i=h(e,"url",[]),n=h(e,"config",{})),u.getAudioURL(s,i));return i?a.webAudio&&!o.disableWebAudio?new u(t,e,i,r,s.sound.context):new l(t,e,i,n):null},u.getAudioURL=function(t,e){Array.isArray(e)||(e=[e]);for(var i=0;i<e.length;i++){var n=h(e[i],"url",e[i]);if(0===n.indexOf("blob:")||0===n.indexOf("data:"))return{url:n,type:""};var r=n.match(/\.([a-zA-Z0-9]+)($|\?)/),r=h(e[i],"type",r?r[1]:"").toLowerCase();if(t.device.audio[r])return{url:n,type:r}}return null},s.register("audio",function(t,e,i,n){var r,s=this.systems.game,o=s.config.audio,s=s.device.audio;if(!o.noAudio&&(s.webAudio||s.audioData))if(Array.isArray(t))for(var a=0;a<t.length;a++)(r=u.create(this,t[a]))&&this.addFile(r);else(r=u.create(this,t,e,i,n))&&this.addFile(r);return this}),t.exports=u},function(t,e,i){var n=i(0),r=i(95),s=i(23),o=i(2),a=i(155),h=i(7),i=new n({Extends:s,initialize:function(t,e,i,n){h(e)&&(e=o(r=e,"key"),n=o(r,"config",n));var r={type:"audio",cache:t.cacheManager.audio,extension:i.type,key:e,url:i.url,config:n};s.call(this,t,r),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){t=t.target;t.oncanplaythrough=null,t.onerror=null,this.filesLoaded++,this.percentComplete=Math.min(this.filesLoaded/this.filesTotal,1),this.loader.emit(r.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;for(var e=this.percentComplete=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))}});t.exports=i},function(t,e,i){var n=i(0),r=i(21),o=i(23),s=i(8),a=i(2),h=i(7),l=new n({Extends:o,initialize:function(t,e,i,n){var r="js",s=(h(e)&&(e=a(s=e,"key"),i=a(s,"url"),n=a(s,"xhrSettings"),r=a(s,"extension",r)),{type:"script",cache:!1,extension:r,responseType:"text",key:e,url:i,xhrSettings:n});o.call(this,t,s)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data),this.onProcessComplete()}});s.register("script",function(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},function(t,e,i){var r=i(522),s=i(157),n=i(0),o=i(62),a=i(524),h=i(525),i=new n({initialize:function(t){this.world=t,this.scene=t.scene,this.sys=t.scene.sys},collider:function(t,e,i,n,r){return this.world.addCollider(t,e,i,n,r)},overlap:function(t,e,i,n,r){return this.world.addOverlap(t,e,i,n,r)},existing:function(t,e){e=e?o.STATIC_BODY:o.DYNAMIC_BODY;return this.world.enableBody(t,e),t},staticImage:function(t,e,i,n){t=new r(this.scene,t,e,i,n);return this.sys.displayList.add(t),this.world.enableBody(t,o.STATIC_BODY),t},image:function(t,e,i,n){t=new r(this.scene,t,e,i,n);return this.sys.displayList.add(t),this.world.enableBody(t,o.DYNAMIC_BODY),t},staticSprite:function(t,e,i,n){t=new s(this.scene,t,e,i,n);return this.sys.displayList.add(t),this.sys.updateList.add(t),this.world.enableBody(t,o.STATIC_BODY),t},sprite:function(t,e,i,n){t=new s(this.scene,t,e,i,n);return this.sys.displayList.add(t),this.sys.updateList.add(t),this.world.enableBody(t,o.DYNAMIC_BODY),t},staticGroup:function(t,e){return this.sys.updateList.add(new h(this.world,this.world.scene,t,e))},group:function(t,e){return this.sys.updateList.add(new a(this.world,this.world.scene,t,e))},destroy:function(){this.world=null,this.scene=null,this.sys=null}});t.exports=i},function(t,e,i){var n=i(0),r=i(243),s=i(125),i=new n({Extends:s,Mixins:[r.Acceleration,r.Angular,r.Bounce,r.Debug,r.Drag,r.Enable,r.Friction,r.Gravity,r.Immovable,r.Mass,r.Pushable,r.Size,r.Velocity],initialize:function(t,e,i,n,r){s.call(this,t,e,i,n,r),this.body=null}});t.exports=i},function(t,e,i){var d=i(244),p=i(65),f=i(231),g=i(151);t.exports=function(t,e,i,n,r,s){var o=d(t,e-n,i-n,2*n,2*n,r,s);if(0===o.length)return o;for(var a=new p(e,i,n),h=new p,l=[],c=0;c<o.length;c++){var u=o[c];u.isCircle?(h.setTo(u.center.x,u.center.y,u.halfWidth),f(a,h)&&l.push(u)):g(a,u)&&l.push(u)}return l}},function(t,e,i){var s=i(157),n=i(0),o=i(62),a=i(2),h=i(113),l=i(7),i=new n({Extends:h,initialize:function(t,e,i,n){var r;i||n?l(i)?(n=i,i=null,n.internalCreateCallback=this.createCallbackHandler,n.internalRemoveCallback=this.removeCallbackHandler):Array.isArray(i)&&l(i[0])?(n=i[0],r=this,i.forEach(function(t){t.internalCreateCallback=r.createCallbackHandler,t.internalRemoveCallback=r.removeCallbackHandler}),i=null):n={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler}:n={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler},this.world=t,n.classType=a(n,"classType",s),this.physicsType=o.DYNAMIC_BODY,this.defaults={setCollideWorldBounds:a(n,"collideWorldBounds",!1),setBoundsRectangle:a(n,"customBoundsRectangle",null),setAccelerationX:a(n,"accelerationX",0),setAccelerationY:a(n,"accelerationY",0),setAllowDrag:a(n,"allowDrag",!0),setAllowGravity:a(n,"allowGravity",!0),setAllowRotation:a(n,"allowRotation",!0),setBounceX:a(n,"bounceX",0),setBounceY:a(n,"bounceY",0),setDragX:a(n,"dragX",0),setDragY:a(n,"dragY",0),setEnable:a(n,"enable",!0),setGravityX:a(n,"gravityX",0),setGravityY:a(n,"gravityY",0),setFrictionX:a(n,"frictionX",0),setFrictionY:a(n,"frictionY",0),setMaxVelocityX:a(n,"maxVelocityX",1e4),setMaxVelocityY:a(n,"maxVelocityY",1e4),setVelocityX:a(n,"velocityX",0),setVelocityY:a(n,"velocityY",0),setAngularVelocity:a(n,"angularVelocity",0),setAngularAcceleration:a(n,"angularAcceleration",0),setAngularDrag:a(n,"angularDrag",0),setMass:a(n,"mass",1),setImmovable:a(n,"immovable",!1)},h.call(this,e,i,n),this.type="PhysicsGroup"},createCallbackHandler:function(t){t.body||this.world.enableBody(t,o.DYNAMIC_BODY);var e,i=t.body;for(e in this.defaults)i[e](this.defaults[e])},removeCallbackHandler:function(t){t.body&&this.world.disableBody(t)},setVelocity:function(t,e,i){void 0===i&&(i=0);for(var n=this.getChildren(),r=0;r<n.length;r++)n[r].body.velocity.set(t+r*i,e+r*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}});t.exports=i},function(t,e,i){var r=i(157),n=i(0),s=i(62),o=i(2),a=i(113),h=i(7),i=new n({Extends:a,initialize:function(t,e,i,n){i||n?h(i)?(n=i,i=null,n.internalCreateCallback=this.createCallbackHandler,n.internalRemoveCallback=this.removeCallbackHandler,n.createMultipleCallback=this.createMultipleCallbackHandler,n.classType=o(n,"classType",r)):Array.isArray(i)&&h(i[0])?(n=i,i=null,n.forEach(function(t){t.internalCreateCallback=this.createCallbackHandler,t.internalRemoveCallback=this.removeCallbackHandler,t.createMultipleCallback=this.createMultipleCallbackHandler,t.classType=o(t,"classType",r)})):n={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler}:n={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler,createMultipleCallback:this.createMultipleCallbackHandler,classType:r},this.world=t,this.physicsType=s.STATIC_BODY,a.call(this,e,i,n),this.type="StaticPhysicsGroup"},createCallbackHandler:function(t){t.body||this.world.enableBody(t,s.STATIC_BODY)},removeCallbackHandler:function(t){t.body&&this.world.disableBody(t)},createMultipleCallbackHandler:function(){this.refresh()},refresh:function(){for(var t=this.children.entries,e=0;e<t.length;e++)t[e].body.reset();return this}});t.exports=i},function(t,e,i){var o=i(350),n=i(527),f=i(18),r=i(0),s=i(528),g=i(62),a=i(50),h=i(9),m=i(245),y=i(124),v=i(354),x=i(355),l=i(246),c=i(247),d=i(529),u=i(6),p=i(14),b=i(211),w=i(530),T=i(10),S=i(531),P=i(532),_=i(537),E=i(538),A=i(149),M=i(539),k=i(248),C=i(25),O=i(3),R=i(68),i=new r({Extends:h,initialize:function(t,e){h.call(this),this.scene=t,this.bodies=new A,this.staticBodies=new A,this.pendingDestroy=new A,this.colliders=new b,this.gravity=new O(u(e,"gravity.x",0),u(e,"gravity.y",0)),this.bounds=new T(u(e,"x",0),u(e,"y",0),u(e,"width",t.sys.scale.width),u(e,"height",t.sys.scale.height)),this.checkCollision={up:u(e,"checkCollision.up",!0),down:u(e,"checkCollision.down",!0),left:u(e,"checkCollision.left",!0),right:u(e,"checkCollision.right",!0)},this.fps=u(e,"fps",60),this.fixedStep=u(e,"fixedStep",!0),this._elapsed=0,this._frameTime=1/this.fps,this._frameTimeMS=1e3*this._frameTime,this.stepsLastFrame=0,this.timeScale=u(e,"timeScale",1),this.OVERLAP_BIAS=u(e,"overlapBias",4),this.TILE_BIAS=u(e,"tileBias",16),this.forceX=u(e,"forceX",!1),this.isPaused=u(e,"isPaused",!1),this._total=0,this.drawDebug=u(e,"debug",!1),this.debugGraphic,this.defaults={debugShowBody:u(e,"debugShowBody",!0),debugShowStaticBody:u(e,"debugShowStaticBody",!0),debugShowVelocity:u(e,"debugShowVelocity",!0),bodyDebugColor:u(e,"debugBodyColor",16711935),staticBodyDebugColor:u(e,"debugStaticBodyColor",255),velocityDebugColor:u(e,"debugVelocityColor",65280)},this.maxEntries=u(e,"maxEntries",16),this.useTree=u(e,"useTree",!0),this.tree=new S(this.maxEntries),this.staticTree=new S(this.maxEntries),this.treeMinMax={minX:0,minY:0,maxX:0,maxY:0},this._tempMatrix=new C,this._tempMatrix2=new C,this.drawDebug&&this.createDebugGraphic()},enable:function(t,e){void 0===e&&(e=g.DYNAMIC_BODY),Array.isArray(t)||(t=[t]);for(var i=0;i<t.length;i++){var n=t[i];if(n.isParent)for(var r=n.getChildren(),s=0;s<r.length;s++){var o=r[s];o.isParent?this.enable(o,e):this.enableBody(o,e)}else this.enableBody(n,e)}},enableBody:function(t,e){return void 0===e&&(e=g.DYNAMIC_BODY),t.body||(e===g.DYNAMIC_BODY?t.body=new n(this,t):e===g.STATIC_BODY&&(t.body=new M(this,t))),this.add(t.body),t},add:function(t){return t.physicsType===g.DYNAMIC_BODY?this.bodies.set(t):t.physicsType===g.STATIC_BODY&&(this.staticBodies.set(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(),r=0;r<n.length;r++){var s=n[r];s.isParent?this.disable(s):this.disableBody(s.body)}else this.disableBody(i.body)}},disableBody:function(t){this.remove(t),t.enable=!1},remove:function(t){t.physicsType===g.DYNAMIC_BODY?(this.tree.remove(t),this.bodies.delete(t)):t.physicsType===g.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,r,s,o,a){return this.bounds.setTo(t,e,i,n),void 0!==r&&this.setBoundsCollision(r,s,o,a),this},setBoundsCollision:function(t,e,i,n){return void 0===e&&(e=!0),void 0===i&&(i=!0),void 0===n&&(n=!0),this.checkCollision.left=t=void 0===t?!0:t,this.checkCollision.right=e,this.checkCollision.up=i,this.checkCollision.down=n,this},pause:function(){return this.isPaused=!0,this.emit(m.PAUSE),this},resume:function(){return this.isPaused=!1,this.emit(m.RESUME),this},addCollider:function(t,e,i,n,r){t=new s(this,!1,t,e,i=void 0===i?null:i,n=void 0===n?null:n,r=void 0===r?i:r);return this.colliders.add(t),t},addOverlap:function(t,e,i,n,r){t=new s(this,!0,t,e,i=void 0===i?null:i,n=void 0===n?null:n,r=void 0===r?i:r);return this.colliders.add(t),t},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,n=this._frameTime,r=this._frameTimeMS*this.timeScale,s=(this._elapsed+=e,this.bodies.entries),o=this._elapsed>=r;for(this.fixedStep||(n=.001*e,o=!0,this._elapsed=0),h=0;h<s.length;h++)(i=s[h]).enable&&i.preUpdate(o,n);if(o){this._elapsed-=r,this.stepsLastFrame=1,this.useTree&&(this.tree.clear(),this.tree.load(s));for(var a=this.colliders.update(),h=0;h<a.length;h++){var l=a[h];l.active&&l.update()}this.emit(m.WORLD_STEP,n)}for(;this._elapsed>=r;)this._elapsed-=r,this.step(n)}},step:function(t){for(var e,i=this.bodies.entries,n=i.length,r=0;r<n;r++)(e=i[r]).enable&&e.update(t);this.useTree&&(this.tree.clear(),this.tree.load(i));for(var s=this.colliders.update(),r=0;r<s.length;r++){var o=s[r];o.active&&o.update()}this.emit(m.WORLD_STEP,t),this.stepsLastFrame++},postUpdate:function(){var t,e=(o=this.bodies.entries).length,i=this.bodies,n=this.staticBodies;if(this.stepsLastFrame)for(l=this.stepsLastFrame=0;l<e;l++)(t=o[l]).enable&&t.postUpdate();if(this.drawDebug){var r=this.debugGraphic;for(r.clear(),l=0;l<e;l++)(t=o[l]).willDrawDebug()&&t.drawDebug(r);for(e=(o=n.entries).length,l=0;l<e;l++)(t=o[l]).willDrawDebug()&&t.drawDebug(r)}var s=this.pendingDestroy;if(0<s.size){for(var o,a=this.tree,h=this.staticTree,e=(o=s.entries).length,l=0;l<e;l++)(t=o[l]).physicsType===g.DYNAMIC_BODY?(a.remove(t),i.delete(t)):t.physicsType===g.STATIC_BODY&&(h.remove(t),n.delete(t)),t.world=void 0,t.gameObject=void 0;s.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,r=t.angularDrag,s=t.maxAngular,n=(n?i+=n*e:t.allowDrag&&r&&(v(i-(r*=e),0,.1)?i-=r:x(i+r,0,.1)?i+=r:i=0),(i=f(i,-s,s))-t.angularVelocity);t.angularVelocity+=n,t.rotation+=t.angularVelocity*e},computeVelocity:function(t,e){var i=t.velocity.x,n=t.acceleration.x,r=t.drag.x,s=t.maxVelocity.x,o=t.velocity.y,a=t.acceleration.y,h=t.drag.y,l=t.maxVelocity.y,c=t.speed,u=t.maxSpeed,d=t.allowDrag,p=t.useDamping;t.allowGravity&&(i+=(this.gravity.x+t.gravity.x)*e,o+=(this.gravity.y+t.gravity.y)*e),n?i+=n*e:d&&r&&(p?(i*=r=Math.pow(r,e),c=Math.sqrt(i*i+o*o),y(c,0,.001)&&(i=0)):v(i-(r*=e),0,.01)?i-=r:x(i+r,0,.01)?i+=r:i=0),a?o+=a*e:d&&h&&(p?(o*=h=Math.pow(h,e),c=Math.sqrt(i*i+o*o),y(c,0,.001)&&(o=0)):v(o-(h*=e),0,.01)?o-=h:x(o+h,0,.01)?o+=h:o=0),i=f(i,-s,s),o=f(o,-l,l),t.velocity.set(i,o),-1<u&&u<c&&(t.velocity.normalize().scale(u),c=u),t.speed=c},separate:function(t,e,i,n,r,s){if(!s&&!t.enable||!e.enable||t.checkCollision.none||e.checkCollision.none||!this.intersects(t,e))return!1;if(i&&!1===i.call(n,t.gameObject,e.gameObject))return!1;if(t.isCircle&&e.isCircle)return this.separateCircle(t,e,r);if(t.isCircle!==e.isCircle){var s=t.isCircle?e:t,i=t.isCircle?t:e,n=s.x,o=s.y,a=s.right,s=s.bottom,i=i.center;if((i.y<o||i.y>s)&&(i.x<n||i.x>a))return this.separateCircle(t,e,r)}o=!1,s=!1,r?(o=_(t,e,r,this.OVERLAP_BIAS),s=E(t,e,r,this.OVERLAP_BIAS)):this.forceX||Math.abs(this.gravity.y+t.gravity.y)<Math.abs(this.gravity.x+t.gravity.x)?(o=_(t,e,r,this.OVERLAP_BIAS),this.intersects(t,e)&&(s=E(t,e,r,this.OVERLAP_BIAS))):(s=E(t,e,r,this.OVERLAP_BIAS),this.intersects(t,e)&&(o=_(t,e,r,this.OVERLAP_BIAS))),n=o||s;return n&&(r?(t.onOverlap||e.onOverlap)&&this.emit(m.OVERLAP,t.gameObject,e.gameObject,t,e):(t.onCollide||e.onCollide)&&this.emit(m.COLLIDE,t.gameObject,e.gameObject,t,e)),n},separateCircle:function(t,e,i,n){l(t,e,!1,n),c(t,e,!1,n);var r,s,n=0;return t.isCircle!==e.isCircle?(r={x:(e.isCircle?t:e).position.x,y:(e.isCircle?t:e).position.y,right:(e.isCircle?t:e).right,bottom:(e.isCircle?t:e).bottom},(s={x:(t.isCircle?t:e).center.x,y:(t.isCircle?t:e).center.y,radius:(t.isCircle?t:e).halfWidth}).y<r.y?s.x<r.x?n=a(s.x,s.y,r.x,r.y)-s.radius:r.right<s.x&&(n=a(s.x,s.y,r.right,r.y)-s.radius):r.bottom<s.y&&(s.x<r.x?n=a(s.x,s.y,r.x,r.bottom)-s.radius:r.right<s.x&&(n=a(s.x,s.y,r.right,r.bottom)-s.radius)),n*=-1):n=t.halfWidth+e.halfWidth-a(t.center.x,t.center.y,e.center.x,e.center.y),t.overlapR=n,e.overlapR=n,i||0===n||t.immovable&&e.immovable||t.customSeparateX||e.customSeparateX?(0!==n&&(t.onOverlap||e.onOverlap)&&this.emit(m.OVERLAP,t.gameObject,e.gameObject,t,e),0!==n):(r=t.center.x-e.center.x,s=t.center.y-e.center.y,i=Math.sqrt(Math.pow(r,2)+Math.pow(s,2)),r=(e.center.x-t.center.x)/i||0,s=(e.center.y-t.center.y)/i||0,i=2*(t.velocity.x*r+t.velocity.y*s-e.velocity.x*r-e.velocity.y*s)/(t.mass+e.mass),(t.immovable||e.immovable)&&(i*=2),t.immovable||(t.velocity.x=t.velocity.x-i/t.mass*r,t.velocity.y=t.velocity.y-i/t.mass*s),e.immovable||(e.velocity.x=e.velocity.x+i/e.mass*r,e.velocity.y=e.velocity.y+i/e.mass*s),t.immovable||e.immovable||(n/=2),r=o(t.center,e.center),i=(n+p.EPSILON)*Math.cos(r),s=(n+p.EPSILON)*Math.sin(r),t.immovable||(t.x-=i,t.y-=s,t.updateCenter()),e.immovable||(e.x+=i,e.y+=s,e.updateCenter()),t.velocity.x*=t.bounce.x,t.velocity.y*=t.bounce.y,e.velocity.x*=e.bounce.x,e.velocity.y*=e.bounce.y,(t.onCollide||e.onCollide)&&this.emit(m.COLLIDE,t.gameObject,e.gameObject,t,e),!0)},intersects:function(t,e){return t!==e&&(t.isCircle||e.isCircle?t.isCircle?e.isCircle?a(t.center.x,t.center.y,e.center.x,e.center.y)<=t.halfWidth+e.halfWidth:this.circleBodyIntersects(t,e):this.circleBodyIntersects(e,t):!(t.right<=e.position.x||t.bottom<=e.position.y||t.position.x>=e.right||t.position.y>=e.bottom))},circleBodyIntersects:function(t,e){var i=f(t.center.x,e.left,e.right),e=f(t.center.y,e.top,e.bottom);return(t.center.x-i)*(t.center.x-i)+(t.center.y-e)*(t.center.y-e)<=t.halfWidth*t.halfWidth},overlap:function(t,e,i,n,r){return void 0===i&&(i=null),void 0===r&&(r=i),this.collideObjects(t,e,i,n=void 0===n?null:n,r,!0)},collide:function(t,e,i,n,r){return void 0===i&&(i=null),void 0===r&&(r=i),this.collideObjects(t,e,i,n=void 0===n?null:n,r,!1)},collideObjects:function(t,e,i,n,r,s){t.isParent&&void 0===t.physicsType&&(t=t.children.entries),e&&e.isParent&&void 0===e.physicsType&&(e=e.children.entries);var o,a=Array.isArray(t),h=Array.isArray(e);if(this._total=0,a||h)if(!a&&h)for(o=0;o<e.length;o++)this.collideHandler(t,e[o],i,n,r,s);else if(a&&!h)if(e)for(o=0;o<t.length;o++)this.collideHandler(t[o],e,i,n,r,s);else for(o=0;o<t.length;o++)for(var l=t[o],c=o+1;c<t.length;c++)o!==c&&this.collideHandler(l,t[c],i,n,r,s);else for(o=0;o<t.length;o++)for(c=0;c<e.length;c++)this.collideHandler(t[o],e[c],i,n,r,s);else this.collideHandler(t,e,i,n,r,s);return 0<this._total},collideHandler:function(t,e,i,n,r,s){return void 0===e&&t.isParent?this.collideGroupVsGroup(t,t,i,n,r,s):!(!t||!e)&&(t.body?e.body?this.collideSpriteVsSprite(t,e,i,n,r,s):e.isParent?this.collideSpriteVsGroup(t,e,i,n,r,s):e.isTilemap?this.collideSpriteVsTilemapLayer(t,e,i,n,r,s):void 0:t.isParent?e.body?this.collideSpriteVsGroup(e,t,i,n,r,s):e.isParent?this.collideGroupVsGroup(t,e,i,n,r,s):e.isTilemap?this.collideGroupVsTilemapLayer(t,e,i,n,r,s):void 0:t.isTilemap?e.body?this.collideSpriteVsTilemapLayer(e,t,i,n,r,s):e.isParent?this.collideGroupVsTilemapLayer(e,t,i,n,r,s):void 0:void 0)},collideSpriteVsSprite:function(t,e,i,n,r,s){return!(!t.body||!e.body||(this.separate(t.body,e.body,n,r,s)&&(i&&i.call(r,t,e),this._total++),0))},collideSpriteVsGroup:function(t,e,i,n,r,s){var o,a=t.body;if(0!==e.length&&a&&a.enable&&!a.checkCollision.none)if(this.useTree||e.physicsType===g.STATIC_BODY){var h=this.treeMinMax;h.minX=a.left,h.minY=a.top,h.maxX=a.right,h.maxY=a.bottom;for(var l=(e.physicsType===g.DYNAMIC_BODY?this.tree:this.staticTree).search(h),c=l.length,u=0;u<c;u++)a!==(o=l[u])&&o.enable&&!o.checkCollision.none&&e.contains(o.gameObject)&&this.separate(a,o,n,r,s,!0)&&(i&&i.call(r,a.gameObject,o.gameObject),this._total++)}else for(var d=e.getChildren(),p=e.children.entries.indexOf(t),c=d.length,u=0;u<c;u++)(o=d[u].body)&&u!==p&&o.enable&&this.separate(a,o,n,r,s)&&(i&&i.call(r,a.gameObject,o.gameObject),this._total++)},collideGroupVsTilemapLayer:function(t,e,i,n,r,s){var o=t.getChildren();if(0===o.length)return!1;for(var a=!1,h=0;h<o.length;h++)o[h].body&&this.collideSpriteVsTilemapLayer(o[h],e,i,n,r,s)&&(a=!0);return a},collideTiles:function(t,e,i,n,r){return!(!t.body.enable||0===e.length)&&this.collideSpriteVsTilesHandler(t,e,i,n,r,!1,!1)},overlapTiles:function(t,e,i,n,r){return!(!t.body.enable||0===e.length)&&this.collideSpriteVsTilesHandler(t,e,i,n,r,!0,!1)},collideSpriteVsTilemapLayer:function(t,e,i,n,r,s){var o,a,h,l,c,u=t.body;return!(!u.enable||u.checkCollision.none)&&(o=u.position.x,a=u.position.y,h=u.width,u=u.height,(l=e.layer).tileWidth>l.baseTileWidth&&(o-=c=(l.tileWidth-l.baseTileWidth)*e.scaleX,h+=c),l.tileHeight>l.baseTileHeight&&(u+=(l.tileHeight-l.baseTileHeight)*e.scaleY),0!==(c=d(o,a,h,u,null,e.scene.cameras.main,e.layer)).length&&this.collideSpriteVsTilesHandler(t,c,i,n,r,s,!0))},collideSpriteVsTilesHandler:function(t,e,i,n,r,s,o){for(var a,h,l=t.body,c={left:0,right:0,top:0,bottom:0},u=!1,d=0;d<e.length;d++){var p=(h=(a=e[d]).tilemapLayer).tileToWorldXY(a.x,a.y);c.left=p.x,c.top=p.y,a.baseHeight!==a.height&&(c.top-=(a.height-a.baseHeight)*h.scaleY),c.right=c.left+a.width*h.scaleX,c.bottom=c.top+a.height*h.scaleY,k(c,l)&&(!n||n.call(r,t,a))&&w(a,t)&&(s||P(d,l,a,c,h,this.TILE_BIAS,o))&&(this._total++,u=!0,i&&i.call(r,t,a),s&&l.onOverlap?this.emit(m.TILE_OVERLAP,t,a,l):l.onCollide&&this.emit(m.TILE_COLLIDE,t,a,l))}return u},collideGroupVsGroup:function(t,e,i,n,r,s){if(0!==t.length&&0!==e.length)for(var o=t.getChildren(),a=0;a<o.length;a++)this.collideSpriteVsGroup(o[a],e,i,n,r,s)},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){t.x=R(t.x,this.bounds.left-(e=void 0===e?0:e),this.bounds.right+e),t.y=R(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}});t.exports=i},function(t,e,i){var n=i(0),r=i(62),s=i(245),o=i(196),a=i(10),h=i(57),l=i(3),i=new n({initialize:function(t,e){var i=e.displayWidth||64,n=e.displayHeight||64;this.world=t,this.gameObject=e,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 l,this.position=new l(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 l(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=new l,this.newVelocity=new l,this.deltaMax=new l,this.acceleration=new l,this.allowDrag=!0,this.drag=new l,this.allowGravity=!0,this.gravity=new l,this.bounce=new l,this.worldBounce=null,this.customBoundsRectangle=t.bounds,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.maxVelocity=new l(1e4,1e4),this.maxSpeed=-1,this.friction=new l(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.moves=!0,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision={none:!1,up:!0,down:!0,left:!0,right:!0},this.touching={none:!0,up:!1,down:!1,left:!1,right:!1},this.wasTouching={none:!0,up:!1,down:!1,left:!1,right:!1},this.blocked={none:!0,up:!1,down:!1,left:!1,right:!1},this.syncBounds=!1,this.physicsType=r.DYNAMIC_BODY,this._sx=e.scaleX,this._sy=e.scaleY,this._dx=0,this._dy=0,this._tx=0,this._ty=0,this._bounds=new a},updateBounds:function(){var t=this.gameObject,e=this.transform;t.parentContainer?(i=t.getWorldTransformMatrix(this.world._tempMatrix,this.world._tempMatrix2),e.x=i.tx,e.y=i.ty,e.rotation=o(i.rotation),e.scaleX=i.scaleX,e.scaleY=i.scaleY):(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 i=!1;this.syncBounds?(t=t.getBounds(this._bounds),this.width=t.width,this.height=t.height,i=!0):(t=Math.abs(e.scaleX),e=Math.abs(e.scaleY),this._sx===t&&this._sy===e||(this.width=this.sourceWidth*t,this.height=this.sourceHeight*e,this._sx=t,this._sy=e,i=!0)),i&&(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){var e=this.wasTouching,i=this.touching,n=this.blocked;(t=void 0===t?!1:t)?(e.none=!0,e.up=!1,e.down=!1,e.left=!1,e.right=!1):(e.none=i.none,e.up=i.up,e.down=i.down,e.left=i.left,e.right=i.right),i.none=!0,i.up=!1,i.down=!1,i.left=!1,i.right=!1,n.none=!0,n.up=!1,n.down=!1,n.left=!1,n.right=!1,this.overlapR=0,this.overlapX=0,this.overlapY=0,this.embedded=!1},preUpdate:function(t,e){t&&this.resetFlags(),this.updateFromGameObject(),this.rotation=this.transform.rotation,this.preRotation=this.rotation,this.moves&&(this.prev.x=this.position.x,this.prev.y=this.position.y,this.prevFrame.x=this.position.x,this.prevFrame.y=this.position.y),t&&this.update(e)},update:function(t){var e,i;this.prev.x=this.position.x,this.prev.y=this.position.y,this.moves&&(this.world.updateMotion(this,t),e=this.velocity.x,i=this.velocity.y,this.newVelocity.set(e*t,i*t),this.position.add(this.newVelocity),this.updateCenter(),this.angle=Math.atan2(i,e),this.speed=Math.sqrt(e*e+i*i),this.collideWorldBounds&&this.checkWorldBounds()&&this.onWorldBounds&&this.world.emit(s.WORLD_BOUNDS,this,this.blocked.up,this.blocked.down,this.blocked.left,this.blocked.right)),this._dx=this.position.x-this.prev.x,this._dy=this.position.y-this.prev.y},postUpdate:function(){var t,e=this.position.x-this.prevFrame.x,i=this.position.y-this.prevFrame.y;this.moves&&(0!==(t=this.deltaMax.x)&&0!==e&&(e<0&&e<-t?e=-t:0<e&&t<e&&(e=t)),0!==(t=this.deltaMax.y)&&0!==i&&(i<0&&i<-t?i=-t:0<i&&t<i&&(i=t)),this.gameObject.x+=e,this.gameObject.y+=i),e<0?this.facing=r.FACING_LEFT:0<e&&(this.facing=r.FACING_RIGHT),i<0?this.facing=r.FACING_UP:0<i&&(this.facing=r.FACING_DOWN),this.allowRotation&&(this.gameObject.angle+=this.deltaZ()),this._tx=e,this._ty=i},setBoundsRectangle:function(t){return this.customBoundsRectangle=t||this.world.bounds,this},checkWorldBounds:function(){var t=this.position,e=this.customBoundsRectangle,i=this.world.checkCollision,n=this.worldBounce?-this.worldBounce.x:-this.bounce.x,r=this.worldBounce?-this.worldBounce.y:-this.bounce.y,s=!1;return t.x<e.x&&i.left?(t.x=e.x,this.velocity.x*=n,s=this.blocked.left=!0):this.right>e.right&&i.right&&(t.x=e.right-this.width,this.velocity.x*=n,s=this.blocked.right=!0),t.y<e.y&&i.up?(t.y=e.y,this.velocity.y*=r,s=this.blocked.up=!0):this.bottom>e.bottom&&i.down&&(t.y=e.bottom-this.height,this.velocity.y*=r,s=this.blocked.down=!0),s&&(this.blocked.none=!1,this.updateCenter()),s},setOffset:function(t,e){return this.offset.set(t,e=void 0===e?t:e),this},setSize:function(t,e,i){void 0===i&&(i=!0);var n=this.gameObject;return!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.getCenter&&(i=(n.width-t)/2,t=(n.height-e)/2,this.offset.set(i,t)),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),0<t?(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.setPosition(t,e),i.getTopLeft?i.getTopLeft(this.position):this.position.set(t,e),this.prev.copy(this.position),this.prevFrame.copy(this.position),this.rotation=i.angle,this.preRotation=i.angle,this.updateBounds(),this.updateCenter(),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?0<this.radius&&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:h(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 0<this._dx?this._dx:-this._dx},deltaAbsY:function(){return 0<this._dy?this._dy:-this._dy},deltaX:function(){return this._dx},deltaY:function(){return this._dy},deltaXFinal:function(){return this._tx},deltaYFinal:function(){return this._ty},deltaZ:function(){return this.rotation-this.preRotation},destroy:function(){this.enable=!1,this.world&&this.world.pendingDestroy.set(this)},drawDebug:function(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},setCollideWorldBounds:function(t,e,i,n){this.collideWorldBounds=t=void 0===t?!0:t;var t=void 0!==e,r=void 0!==i;return(t||r)&&(this.worldBounce||(this.worldBounce=new l),t&&(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){this.velocity.x=t;var e=this.velocity.y;return this.speed=Math.sqrt(t*t+e*e),this},setVelocityY:function(t){this.velocity.y=t;var e=this.velocity.x;return this.speed=Math.sqrt(e*e+t*t),this},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},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 this.allowDrag=t=void 0===t?!0:t,this},setAllowGravity:function(t){return this.allowGravity=t=void 0===t?!0:t,this},setAllowRotation:function(t){return this.allowRotation=t=void 0===t?!0: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 this.immovable=t=void 0===t?!0:t,this},setEnable:function(t){return this.enable=t=void 0===t?!0:t,this},processX:function(t,e,i,n){this.x+=t,this.updateCenter(),null!==e&&(this.velocity.x=e);t=this.blocked;i&&(t.left=!0),n&&(t.right=!0)},processY:function(t,e,i,n){this.y+=t,this.updateCenter(),null!==e&&(this.velocity.y=e);t=this.blocked;i&&(t.up=!0),n&&(t.down=!0)},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}}});t.exports=i},function(t,e,i){i=new(i(0))({initialize:function(t,e,i,n,r,s,o){this.world=t,this.name="",this.active=!0,this.overlapOnly=e,this.object1=i,this.object2=n,this.collideCallback=r,this.processCallback=s,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}});t.exports=i},function(t,e,i){var c=i(26),i=i(3),u=new i,d=new i;t.exports=function(t,e,i,n,r,s,o){var a=o.tilemapLayer.tilemap._convert.WorldToTileXY,h=(a(t,e,!0,u,s,o),u.x),l=u.y,a=(a(t+i,e+n,!1,d,s,o),Math.ceil(d.x)),t=Math.ceil(d.y);return c(h,l,a-h,t-l,r,o)}},function(t,e){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)}},function(t,e,i){var a=i(436);function n(t){if(!(this instanceof n))return new n(t);this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}function p(t,e){f(t,0,t.children.length,e,t)}function f(t,e,i,n,r){(r=r||m(null)).minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(var s,o=e;o<i;o++)s=t.children[o],c(r,t.leaf?n(s):s);return r}function c(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 s(t,e){return t.minX-e.minX}function o(t,e){return t.minY-e.minY}function g(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function u(t){return t.maxX-t.minX+(t.maxY-t.minY)}function d(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function l(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function m(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function y(t,e,i,n,r){for(var s,o=[e,i];o.length;)(i=o.pop())-(e=o.pop())<=n||(s=e+Math.ceil((i-e)/n/2)*n,a(t,s,e,i,r),o.push(e,s,s,i))}n.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,i=[],n=this.toBBox;if(l(t,e))for(var r,s,o,a,h=[];e;){for(r=0,s=e.children.length;r<s;r++)o=e.children[r],l(t,a=e.leaf?n(o):o)&&(e.leaf?i.push(o):d(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(l(t,e))for(var n,r,s,o,a=[];e;){for(n=0,r=e.children.length;n<r;n++)if(s=e.children[n],l(t,o=e.leaf?i(s):s)){if(e.leaf||d(t,o))return!0;a.push(s)}e=a.pop()}return!1},load:function(t){if(t&&t.length)if(t.length<this._minEntries)for(var e=0,i=t.length;e<i;e++)this.insert(t[e]);else{var n,r=this._build(t.slice(),0,t.length-1,0);this.data.children.length?this.data.height===r.height?this._splitRoot(this.data,r):(this.data.height<r.height&&(n=this.data,this.data=r,r=n),this._insert(r,this.data.height-r.height-1,!0)):this.data=r}return this},insert:function(t){return t&&this._insert(t,this.data.height-1),this},clear:function(){return this.data=m([]),this},remove:function(t,e){if(t)for(var i,n,r,s,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(),s=!0),o.leaf&&-1!==(r=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)))return o.children.splice(r,1),h.push(o),this._condense(h),this;s||o.leaf||!d(o,a)?n?(i++,o=n.children[i],s=!1):o=null:(h.push(o),l.push(i),o=(n=o).children[i=0])}return this},toBBox:function(t){return{minX:t.left,minY:t.top,maxX:t.right,maxY:t.bottom}},compareMinX:function(t,e){return t.left-e.left},compareMinY:function(t,e){return t.top-e.top},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 r,s=i-e+1,o=this._maxEntries;if(s<=o)p(r=m(t.slice(e,i+1)),this.toBBox);else{n||(n=Math.ceil(Math.log(s)/Math.log(o)),o=Math.ceil(s/Math.pow(o,n-1))),(r=m([])).leaf=!1,r.height=n;var a,h,l,c,u=Math.ceil(s/o),d=u*Math.ceil(Math.sqrt(o));for(y(t,e,i,d,this.compareMinX),a=e;a<=i;a+=d)for(y(t,a,l=Math.min(a+d-1,i),u,this.compareMinY),h=a;h<=l;h+=u)c=Math.min(h+u-1,l),r.children.push(this._build(t,h,c,n-1));p(r,this.toBBox)}return r},_chooseSubtree:function(t,e,i,n){for(var r,s,o,a,h,l,c,u,d;n.push(e),!e.leaf&&n.length-1!==i;){for(l=c=1/0,r=0,s=e.children.length;r<s;r++)h=g(o=e.children[r]),u=t,d=o,(d=(Math.max(d.maxX,u.maxX)-Math.min(d.minX,u.minX))*(Math.max(d.maxY,u.maxY)-Math.min(d.minY,u.minY))-h)<c?(c=d,l=h<l?h:l,a=o):d===c&&h<l&&(l=h,a=o);e=a||e.children[0]}return e},_insert:function(t,e,i){var n=this.toBBox,i=i?t:n(t),r=[],n=this._chooseSubtree(i,this.data,e,r);for(n.children.push(t),c(n,i);0<=e&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(i,r,e)},_split:function(t,e){var i=t[e],n=i.children.length,r=this._minEntries,r=(this._chooseSplitAxis(i,r,n),this._chooseSplitIndex(i,r,n)),n=m(i.children.splice(r,i.children.length-r));n.height=i.height,n.leaf=i.leaf,p(i,this.toBBox),p(n,this.toBBox),e?t[e-1].children.push(n):this._splitRoot(i,n)},_splitRoot:function(t,e){this.data=m([t,e]),this.data.height=t.height+1,this.data.leaf=!1,p(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,i){for(var n,r,s,o,a,h,l,c,u,d=s=1/0,p=e;p<=i-e;p++)u=n=f(t,0,p,this.toBBox),a=r=f(t,p,i,this.toBBox),0,h=Math.max(u.minX,a.minX),l=Math.max(u.minY,a.minY),c=Math.min(u.maxX,a.maxX),u=Math.min(u.maxY,a.maxY),a=Math.max(0,c-h)*Math.max(0,u-l),c=g(n)+g(r),a<d?(d=a,o=p,s=c<s?c:s):a===d&&c<s&&(s=c,o=p);return o},_chooseSplitAxis:function(t,e,i){var n=t.leaf?this.compareMinX:s,r=t.leaf?this.compareMinY:o;this._allDistMargin(t,e,i,n)<this._allDistMargin(t,e,i,r)&&t.children.sort(n)},_allDistMargin:function(t,e,i,n){t.children.sort(n);for(var r,s=this.toBBox,o=f(t,0,e,s),a=f(t,i-e,i,s),h=u(o)+u(a),l=e;l<i-e;l++)r=t.children[l],c(o,t.leaf?s(r):r),h+=u(o);for(l=i-e-1;e<=l;l--)r=t.children[l],c(a,t.leaf?s(r):r),h+=u(a);return h},_adjustParentBBoxes:function(t,e,i){for(var n=i;0<=n;n--)c(e[n],t)},_condense:function(t){for(var e,i=t.length-1;0<=i;i--)0===t[i].children.length?0<i?(e=t[i-1].children).splice(e.indexOf(t[i]),1):this.clear():p(t[i],this.toBBox)}},t.exports=n},function(t,e,i){var y=i(533),v=i(535),x=i(248);t.exports=function(t,e,i,n,r,s,o){var a=n.left,h=n.top,l=n.right,c=n.bottom,u=i.faceLeft||i.faceRight,d=i.faceTop||i.faceBottom;if(o||(d=u=!0),!u&&!d)return!1;var p=0,f=0,g=0,m=1;if(e.deltaAbsX()>e.deltaAbsY()?g=-1:e.deltaAbsX()<e.deltaAbsY()&&(m=-1),0!==e.deltaX()&&0!==e.deltaY()&&u&&d&&(g=Math.min(Math.abs(e.position.x-l),Math.abs(e.right-a)),m=Math.min(Math.abs(e.position.y-c),Math.abs(e.bottom-h))),g<m){if(u&&0!==(p=y(e,i,a,l,s,o))&&!x(n,e))return!0;d&&(f=v(e,i,h,c,s,o))}else{if(d&&0!==(f=v(e,i,h,c,s,o))&&!x(n,e))return!0;u&&(p=y(e,i,a,l,s,o))}return 0!==p||0!==f}},function(t,e,i){var c=i(534);t.exports=function(t,e,i,n,r,s){var o=0,a=e.faceLeft,h=e.faceRight,l=e.collideLeft,e=e.collideRight;return s||(e=l=h=a=!0),t.deltaX()<0&&e&&t.checkCollision.left?h&&t.x<n&&(o=t.x-n)<-r&&(o=0):0<t.deltaX()&&l&&t.checkCollision.right&&a&&t.right>i&&r<(o=t.right-i)&&(o=0),0!==o&&(t.customSeparateX?t.overlapX=o:c(t,o)),o}},function(t,e){t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.left=!0):0<e&&(t.blocked.none=!1,t.blocked.right=!0),t.position.x-=e,0===t.bounce.x?t.velocity.x=0:t.velocity.x=-t.velocity.x*t.bounce.x}},function(t,e,i){var c=i(536);t.exports=function(t,e,i,n,r,s){var o=0,a=e.faceTop,h=e.faceBottom,l=e.collideUp,e=e.collideDown;return s||(e=l=h=a=!0),t.deltaY()<0&&e&&t.checkCollision.up?h&&t.y<n&&(o=t.y-n)<-r&&(o=0):0<t.deltaY()&&l&&t.checkCollision.down&&a&&t.bottom>i&&r<(o=t.bottom-i)&&(o=0),0!==o&&(t.customSeparateY?t.overlapY=o:c(t,o)),o}},function(t,e){t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.up=!0):0<e&&(t.blocked.none=!1,t.blocked.down=!0),t.position.y-=e,0===t.bounce.y?t.velocity.y=0:t.velocity.y=-t.velocity.y*t.bounce.y}},function(t,e,i){var o=i(246),a=i(1389);t.exports=function(t,e,i,n){var n=o(t,e,i,n),r=t.immovable,s=e.immovable;return i||0===n||r&&s||t.customSeparateX||e.customSeparateX?0!==n||t.embedded&&e.embedded:(i=a.Set(t,e,n),r||s?(r?a.RunImmovableBody1(i):s&&a.RunImmovableBody2(i),!0):0<i||a.Check())}},function(t,e,i){var o=i(247),a=i(1390);t.exports=function(t,e,i,n){var n=o(t,e,i,n),r=t.immovable,s=e.immovable;return i||0===n||r&&s||t.customSeparateY||e.customSeparateY?0!==n||t.embedded&&e.embedded:(i=a.Set(t,e,n),r||s?(r?a.RunImmovableBody1(i):s&&a.RunImmovableBody2(i),!0):0<i||a.Check())}},function(t,e,i){var n=i(66),r=i(0),s=i(62),o=i(57),a=i(3),i=new r({initialize:function(t,e){var i=e.displayWidth||64,n=e.displayHeight||64;this.world=t,this.gameObject=e,this.debugShowBody=t.defaults.debugShowStaticBody,this.debugBodyColor=t.defaults.staticBodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new a,this.position=new a(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 a(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=a.ZERO,this.allowGravity=!1,this.gravity=a.ZERO,this.bounce=a.ZERO,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.mass=1,this.immovable=!0,this.pushable=!1,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision={none:!1,up:!0,down:!0,left:!0,right:!0},this.touching={none:!0,up:!1,down:!1,left:!1,right:!1},this.wasTouching={none:!0,up:!1,down:!1,left:!1,right:!1},this.blocked={none:!0,up:!1,down:!1,left:!1,right:!1},this.physicsType=s.STATIC_BODY,this._dx=0,this._dy=0},setGameObject:function(t,e){return t&&t!==this.gameObject&&(this.gameObject.body=null,(t.body=this).gameObject=t),e&&this.updateFromGameObject(),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;return!t&&n.frame&&(t=n.frame.realWidth),!e&&n.frame&&(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.getCenter&&(t=n.displayWidth/2,e=n.displayHeight/2,this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(t-this.halfWidth,e-this.halfHeight),this.position.x+=this.offset.x,this.position.y+=this.offset.y),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),0<t?(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.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:o)(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.set(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 this.mass=t=t<=0?.1: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}}});t.exports=i},function(t,e,i){i=new(i(0))({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}});t.exports=i},function(t,e,i){var a=new(i(3));t.exports=function(t,e,i,n){var r=i.tilemapLayer,s=r.cullPaddingX,o=r.cullPaddingY,t=r.tilemap.tileToWorldXY(t,e,a,n,r);return t.x>n.worldView.x+r.scaleX*i.tileWidth*(-s-.5)&&t.x<n.worldView.right+r.scaleX*i.tileWidth*(s-.5)&&t.y>n.worldView.y+r.scaleY*i.tileHeight*(-o-1)&&t.y<n.worldView.bottom+r.scaleY*i.tileHeight*(o-.5)}},function(t,e,i){var l=i(26);t.exports=function(t,e,i,n,r,s,o){for(var a=l(i,n,r,s,null,o),h=0;h<a.length;h++)a[h]&&a[h].index===t&&(a[h].index=e)}},function(t,e,i){var n=i(10),o=i(139),a=i(76),h=new n;t.exports=function(t,e){var i=t.tilemapLayer.tilemap,t=t.tilemapLayer,n=Math.floor(i.tileWidth*t.scaleX),i=Math.floor(i.tileHeight*t.scaleY),r=a(e.worldView.x-t.x,n,0,!0)-t.cullPaddingX,n=o(e.worldView.right-t.x,n,0,!0)+t.cullPaddingX,s=a(e.worldView.y-t.y,i,0,!0)-t.cullPaddingY,e=o(e.worldView.bottom-t.y,i,0,!0)+t.cullPaddingY;return h.setTo(r,s,n-r,e-s)}},function(t,e,i){var s=i(543),o=i(159);t.exports=function(t,e,i,n){void 0===n&&(n=0),(i=void 0===i?[]:i).length=0;var r=t.tilemapLayer,e=s(t,e);return!r.skipCull&&1===r.scrollFactorX&&1===r.scrollFactorY||(e.left=0,e.right=t.width,e.top=0,e.bottom=t.height),o(t,e,n,i),i}},function(t,e,i){var s=i(546),o=i(159);t.exports=function(t,e,i,n){void 0===n&&(n=0),(i=void 0===i?[]:i).length=0;var r=t.tilemapLayer;return r.skipCull||1!==r.scrollFactorX||1!==r.scrollFactorY||(r=s(t,e),o(t,r,n,i)),i}},function(t,e,i){var s=i(139),o=i(76);t.exports=function(t,e){var i=t.tilemapLayer.tilemap,n=t.tilemapLayer,r=Math.floor(i.tileWidth*n.scaleX),i=Math.floor(i.tileHeight*n.scaleY),t=t.hexSideLength,i=(i-t)/2+t;return{left:o(e.worldView.x-n.x,r,0,!0)-n.cullPaddingX,right:s(e.worldView.right-n.x,r,0,!0)+n.cullPaddingX,top:o(e.worldView.y-n.y,i,0,!0)-n.cullPaddingY,bottom:s(e.worldView.bottom-n.y,i,0,!0)+n.cullPaddingY}}},function(t,e,i){var p=i(541);t.exports=function(t,e,i,n){void 0===n&&(n=0),(i=void 0===i?[]:i).length=0;var r,s,o,a=t.tilemapLayer,h=t.data,l=t.width,c=t.height,u=l,d=c;if(!a.skipCull)if(0===n){for(s=0;s<d;s++)for(r=0;h[s]&&r<u;r++)if(p(r,s,t,e)){if(!(o=h[s][r])||-1===o.index||!o.visible||0===o.alpha)continue;i.push(o)}}else if(1===n){for(s=0;s<d;s++)for(r=u;h[s]&&0<=r;r--)if(p(r,s,t,e)){if(!(o=h[s][r])||-1===o.index||!o.visible||0===o.alpha)continue;i.push(o)}}else if(2===n){for(s=d;0<=s;s--)for(r=0;h[s]&&r<u;r++)if(p(r,s,t,e)){if(!(o=h[s][r])||-1===o.index||!o.visible||0===o.alpha)continue;i.push(o)}}else if(3===n)for(s=d;0<=s;s--)for(r=u;h[s]&&0<=r;r--)if(p(r,s,t,e)){if(!(o=h[s][r])||-1===o.index||!o.visible||0===o.alpha)continue;i.push(o)}return a.tilesDrawn=i.length,a.tilesTotal=l*c,i}},function(t,e,i){var s=i(549),o=i(159);t.exports=function(t,e,i,n){void 0===n&&(n=0),(i=void 0===i?[]:i).length=0;var r=t.tilemapLayer;return r.skipCull||1!==r.scrollFactorX||1!==r.scrollFactorY||(r=s(t,e),o(t,r,n,i)),i}},function(t,e,i){var r=i(139),s=i(76);t.exports=function(t,e){var i=t.tilemapLayer.tilemap,t=t.tilemapLayer,n=Math.floor(i.tileWidth*t.scaleX),i=Math.floor(i.tileHeight*t.scaleY);return{left:s(e.worldView.x-t.x,n,0,!0)-t.cullPaddingX,right:r(e.worldView.right-t.x,n,0,!0)+t.cullPaddingX,top:s(e.worldView.y-t.y,i/2,0,!0)-t.cullPaddingY,bottom:r(e.worldView.bottom-t.y,i/2,0,!0)+t.cullPaddingY}}},function(t,e,i){var c=i(3);t.exports=function(t,e,i,n,r){i=i||new c;var s=r.baseTileWidth,o=r.baseTileHeight,a=r.tilemapLayer,h=0,l=0,n=(a&&(n=n||a.scene.cameras.main,h=a.x+n.scrollX*(1-a.scrollFactorX),s*=a.scaleX,l=a.y+n.scrollY*(1-a.scrollFactorY),o*=a.scaleY),r.hexSideLength);return i.set(h+t*s+e%2*(s/2),l+e*((o-n)/2+n))}},function(t,e,i){var l=i(3);t.exports=function(t,e,i,n,r){i=i||new l;var s=r.baseTileWidth,o=r.baseTileHeight,r=r.tilemapLayer,a=0,h=0;return r&&(n=n||r.scene.cameras.main,a=r.x+n.scrollX*(1-r.scrollFactorX),s*=r.scaleX,h=r.y+n.scrollY*(1-r.scrollFactorY),o*=r.scaleY),i.set(a+s/2*(t-e),h+(t+e)*(o/2))}},function(t,e,i){var l=i(3);t.exports=function(t,e,i,n,r){i=i||new l;var s=r.baseTileWidth,o=r.baseTileHeight,r=r.tilemapLayer,a=0,h=0;return r&&(n=n||r.scene.cameras.main,a=r.x+n.scrollX*(1-r.scrollFactorX),s*=r.scaleX,h=r.y+n.scrollY*(1-r.scrollFactorY),o*=r.scaleY),i.set(a+t*s+e%2*(s/2),h+e*(o/2))}},function(t,e,i){var s=i(253),o=i(254),a=i(3);t.exports=function(t,e,i,n,r){return(i=i||new a(0,0)).x=s(t,n,r),i.y=o(e,n,r),i}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileHeight,i=i.tilemapLayer,r=0,e=(i&&(void 0===e&&(e=i.scene.cameras.main),r=i.y+e.scrollY*(1-i.scrollFactorY),n*=i.scaleY),i.tilemap.hexSideLength);return r+t*((n-e)/2+e)}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileHeight,i=i.tilemapLayer,r=0;return i&&(void 0===e&&(e=i.scene.cameras.main),r=i.y+e.scrollY*(1-i.scrollFactorY),n*=i.scaleY),r+t*(n/2)}},function(t,e,i){var l=i(3);t.exports=function(t,e,i,n,r,s){n=n||new l;var o=s.baseTileWidth,a=s.baseTileHeight,h=s.tilemapLayer,r=(h&&(r=r||h.scene.cameras.main,e-=h.y+r.scrollY*(1-h.scrollFactorY),a*=h.scaleY,t-=h.x+r.scrollX*(1-h.scrollFactorX),o*=h.scaleX),s.hexSideLength),h=(a-r)/2+r,s=i?Math.floor(e/h):e/h,a=i?Math.floor((t-s%2*.5*o)/o):(t-s%2*.5*o)/o;return n.set(a,s)}},function(t,e,i){var h=i(3);t.exports=function(t,e,i,n,r,s){n=n||new h;var o=s.baseTileWidth,a=s.baseTileHeight,s=s.tilemapLayer,r=(s&&(r=r||s.scene.cameras.main,e-=s.y+r.scrollY*(1-s.scrollFactorY),a*=s.scaleY,t-=s.x+r.scrollX*(1-s.scrollFactorX),o*=s.scaleX),i?Math.floor((t/(o/2)+e/(a/2))/2):(t/(o/2)+e/(a/2))/2),s=i?Math.floor((e/(a/2)-t/(o/2))/2):(e/(a/2)-t/(o/2))/2;return n.set(r,s)}},function(t,e,i){var h=i(3);t.exports=function(t,e,i,n,r,s){n=n||new h;var o=s.baseTileWidth,a=s.baseTileHeight,s=s.tilemapLayer,r=(s&&(r=r||s.scene.cameras.main,e-=s.y+r.scrollY*(1-s.scrollFactorY),a*=s.scaleY,t-=s.x+r.scrollX*(1-s.scrollFactorX),o*=s.scaleX),i?Math.floor(e/(a/2)):e/(a/2)),s=i?Math.floor((t+r%2*.5*o)/o):(t+r%2*.5*o)/o;return n.set(s,r)}},function(t,e,i){var o=i(255),a=i(256),h=i(3);t.exports=function(t,e,i,n,r,s){return void 0===i&&(i=!0),(n=n||new h(0,0)).x=o(t,i,r,s),n.y=a(e,i,r,s),n}},function(t,e){t.exports=function(t,e,i,n){var r=n.baseTileHeight,s=n.tilemapLayer,i=(s&&(i=i||s.scene.cameras.main,t-=s.y+i.scrollY*(1-s.scrollFactorY),r*=s.scaleY),n.hexSideLength),s=(r-i)/2+i;return e?Math.floor(t/s):t/s}},function(t,e){t.exports=function(t,e,i,n){var r=n.baseTileHeight,n=n.tilemapLayer;return n&&(i=i||n.scene.cameras.main,t-=n.y+i.scrollY*(1-n.scrollFactorY),r*=n.scaleY),e?Math.floor(t/(r/2)):t/(r/2)}},function(t,e,i){var n=i(119);t.exports=function(t,e,i){return!!n(t,e,i)&&(null!==(i=i.data[e][t])&&-1<i.index)}},function(t,e,i){var o=i(85),a=i(119),h=i(252);t.exports=function(t,e,i,n,r){var s;return void 0===i&&(i=!0),void 0===n&&(n=!0),a(t,e,r)&&(s=r.data[e][t])?(r.data[e][t]=i?null:new o(r,-1,t,e,r.tileWidth,r.tileHeight),n&&s&&s.collides&&h(t,e,r),s):null}},function(t,e,i){var a=i(40),h=i(259),l=i(565),c=i(566),u=i(577);t.exports=function(t,e,i,n,r,s){var o;switch(e){case a.ARRAY_2D:o=h(t,i,n,r,s);break;case a.CSV:o=l(t,i,n,r,s);break;case a.TILED_JSON:o=c(t,i,s);break;case a.WELTMEISTER:o=u(t,i,s);break;default:o=null}return o}},function(t,e,i){var s=i(40),o=i(259);t.exports=function(t,e,i,n,r){e=e.trim().split("\n").map(function(t){return t.split(",")}),t=o(t,e,i,n,r);return t.format=s.CSV,t}},function(t,e,i){var n=i(567),r=i(568),s=i(29),o=i(40),a=i(258),h=i(121),l=i(569),c=i(570),u=i(573),d=i(575);t.exports=function(t,e,i){t=new h({width:e.width,height:e.height,name:t,tileWidth:e.tilewidth,tileHeight:e.tileheight,orientation:a(e.orientation),format:o.TILED_JSON,version:e.version,properties:e.properties,renderOrder:e.renderorder,infinite:e.infinite}),t.orientation===s.HEXAGONAL&&(t.hexSideLength=e.hexsidelength),t.layers=u(e,i),t.images=l(e),i=d(e);return t.tilesets=i.tilesets,t.imageCollections=i.imageCollections,t.objects=c(e),t.tiles=r(t),n(t),t}},function(t,e,i){var h=i(17);t.exports=function(t){for(var e,i,n=0;n<t.layers.length;n++)for(var r=t.layers[n],s=0;s<r.data.length;s++)for(var o=r.data[s],a=0;a<o.length;a++)null===(e=o[a])||e.index<0||(i=t.tiles[e.index][2],i=t.tilesets[i],e.width=i.tileWidth,e.height=i.tileHeight,i.tileProperties&&i.tileProperties[e.index-i.firstgid]&&(e.properties=h(e.properties,i.tileProperties[e.index-i.firstgid])))}},function(t,e,i){var f=i(122);t.exports=function(t){for(var e=[],i=0;i<t.imageCollections.length;i++)for(var n=t.imageCollections[i],r=n.images,s=0;s<r.length;s++){var o,a=r[s];(o=new f(a.image,a.gid,n.imageWidth,n.imageHeight,0,0)).updateTileData(n.imageWidth,n.imageHeight),t.tilesets.push(o)}for(i=0;i<t.tilesets.length;i++)for(var h=(o=t.tilesets[i]).tileMargin,l=o.tileMargin,c=0,u=0,d=0,p=o.firstgid;p<o.firstgid+o.total&&(e[p]=[h,l,i],h+=o.tileWidth+o.tileSpacing,++c!==o.total)&&(++u!==o.columns||(h=o.tileMargin,l+=o.tileHeight+o.tileSpacing,u=0,++d!==o.rows));p++);return e}},function(t,e,i){var a=i(2),h=i(161);t.exports=function(t){for(var e=[],i=[],n=h(t);n.i<n.layers.length||0<i.length;)if(n.i>=n.layers.length){if(i.length<1)break;n=i.pop()}else{var r,s,o=n.layers[n.i];n.i++,"imagelayer"===o.type?(s=a(o,"offsetx",0)+a(o,"startx",0),r=a(o,"offsety",0)+a(o,"starty",0),e.push({name:n.name+o.name,image:o.image,x:n.x+s+o.x,y:n.y+r+o.y,alpha:n.opacity*o.opacity,visible:n.visible&&o.visible,properties:a(o,"properties",{})})):"group"===o.type&&(s=h(t,o,n),i.push(n),n=s)}return e}},function(t,e,i){var u=i(2),d=i(260),p=i(572),f=i(161);t.exports=function(t){for(var e=[],i=[],n=f(t);n.i<n.layers.length||0<i.length;)if(n.i>=n.layers.length){if(i.length<1)break;n=i.pop()}else{var r=n.layers[n.i];if(n.i++,r.opacity*=n.opacity,r.visible=n.visible&&r.visible,"objectgroup"===r.type){r.name=n.name+r.name;for(var s=n.x+u(r,"startx",0)+u(r,"offsetx",0),o=n.y+u(r,"starty",0)+u(r,"offsety",0),a=[],h=0;h<r.objects.length;h++){var l=d(r.objects[h],s,o);a.push(l)}var c=new p(r);c.objects=a,e.push(c)}else"group"===r.type&&(c=f(t,r,n),i.push(n),n=c)}return e}},function(t,e,i){var s=i(126);t.exports=function(t,e){for(var i={},n=0;n<e.length;n++){var r=e[n];s(t,r)&&(i[r]=t[r])}return i}},function(t,e,i){var n=i(0),r=i(2),i=new n({initialize:function(t){this.name=r(t=void 0===t?{}:t,"name","object layer"),this.opacity=r(t,"opacity",1),this.properties=r(t,"properties",{}),this.propertyTypes=r(t,"propertytypes",{}),this.type=r(t,"type","objectgroup"),this.visible=r(t,"visible",!0),this.objects=r(t,"objects",[])}});t.exports=i},function(t,e,i){var C=i(574),O=i(29),R=i(161),L=i(258),D=i(2),I=i(120),B=i(261),F=i(85);t.exports=function(t,e){for(var i=D(t,"infinite",!1),n=[],r=[],s=R(t);s.i<s.layers.length||0<r.length;)if(s.i>=s.layers.length){if(r.length<1)break;s=r.pop()}else{var o,a=s.layers[s.i];if(s.i++,"tilelayer"===a.type){if(!a.compression){if(a.encoding&&"base64"===a.encoding){if(a.chunks)for(var h=0;h<a.chunks.length;h++)a.chunks[h].data=C(a.chunks[h].data);a.data&&(a.data=C(a.data)),delete a.encoding}var l,c,u=[],d=0;if(i){var p,f=D(a,"startx",0)+a.x,g=D(a,"starty",0)+a.y;(p=new I({name:s.name+a.name,x:s.x+D(a,"offsetx",0)+f*t.tilewidth,y:s.y+D(a,"offsety",0)+g*t.tileheight,width:a.width,height:a.height,tileWidth:t.tilewidth,tileHeight:t.tileheight,alpha:s.opacity*a.opacity,visible:s.visible&&a.visible,properties:D(a,"properties",[]),orientation:L(t.orientation)})).orientation===O.HEXAGONAL&&(p.hexSideLength=t.hexsidelength);for(var m=0;m<a.height;m++){u.push([null]);for(var y=0;y<a.width;y++)u[m][y]=null}for(m=0,k=a.chunks.length;m<k;m++)for(var v=a.chunks[m],x=v.x-f,b=v.y-g,w=0,T=0,S=v.data.length;T<S;T++){var P,_=d+x,E=w+b;0<(P=B(v.data[T])).gid?((l=new F(p,P.gid,_,E,t.tilewidth,t.tileheight)).rotation=P.rotation,l.flipX=P.flipped,u[E][_]=l):(c=e?null:new F(p,-1,_,E,t.tilewidth,t.tileheight),u[E][_]=c),++d===v.width&&(w++,d=0)}}else{(p=new I({name:s.name+a.name,x:s.x+D(a,"offsetx",0)+a.x,y:s.y+D(a,"offsety",0)+a.y,width:a.width,height:a.height,tileWidth:t.tilewidth,tileHeight:t.tileheight,alpha:s.opacity*a.opacity,visible:s.visible&&a.visible,properties:D(a,"properties",[]),orientation:L(t.orientation)})).orientation===O.HEXAGONAL&&(p.hexSideLength=t.hexsidelength);for(var A=[],M=0,k=a.data.length;M<k;M++)0<(P=B(a.data[M])).gid?((l=new F(p,P.gid,d,u.length,t.tilewidth,t.tileheight)).rotation=P.rotation,l.flipX=P.flipped,A.push(l)):(c=e?null:new F(p,-1,d,u.length,t.tilewidth,t.tileheight),A.push(c)),++d===a.width&&(u.push(A),d=0,A=[])}p.data=u,n.push(p)}}else"group"===a.type&&(o=R(t,a,s),r.push(s),s=o)}return n}},function(t,e){t.exports=function(t){for(var e=window.atob(t),i=e.length,n=new Array(i/4),r=0;r<i;r+=4)n[r/4]=(e.charCodeAt(r)|e.charCodeAt(r+1)<<8|e.charCodeAt(r+2)<<16|e.charCodeAt(r+3)<<24)>>>0;return n}},function(t,e,i){var b=i(122),w=i(576),T=i(260),S=i(1453);t.exports=function(t){for(var e,i=[],n=[],r=null,s=0;s<t.tilesets.length;s++){var o=t.tilesets[s];if(!o.source)if(o.image){var a=new b(o.name,o.firstgid,o.tilewidth,o.tileheight,o.margin,o.spacing);if(1<t.version){var h=void 0,l=void 0;if(Array.isArray(o.tiles))for(var h=h||{},l=l||{},c=0;c<o.tiles.length;c++){var u,d,p=o.tiles[c];p.properties&&(u={},p.properties.forEach(function(t){u[t.name]=t.value}),l[p.id]=u),p.objectgroup&&((h[p.id]||(h[p.id]={})).objectgroup=p.objectgroup,p.objectgroup.objects&&(d=p.objectgroup.objects.map(function(t){return T(t)}),h[p.id].objectgroup.objects=d)),p.animation&&((h[p.id]||(h[p.id]={})).animation=p.animation),p.type&&((h[p.id]||(h[p.id]={})).type=p.type)}Array.isArray(o.wangsets)&&(l=l||{},S(o.wangsets,h=h||{})),h&&(a.tileData=h,a.tileProperties=l)}else if(o.tileproperties&&(a.tileProperties=o.tileproperties),o.tiles)for(e in a.tileData=o.tiles,a.tileData){var f=a.tileData[e].objectgroup;f&&f.objects&&(f=f.objects.map(function(t){return T(t)}),a.tileData[e].objectgroup.objects=f)}a.updateTileData(o.imagewidth,o.imageheight),i.push(a)}else{for(var g=new w(o.name,o.firstgid,o.tilewidth,o.tileheight,o.margin,o.spacing,o.properties),m=0,c=0;c<o.tiles.length;c++){var y=(p=o.tiles[c]).image,v=parseInt(p.id,10),x=o.firstgid+v;g.addImage(x,y),m=Math.max(v,m)}g.maxId=m,n.push(g)}r&&(r.lastgid=o.firstgid-1),r=o}return{tilesets:i,imageCollections:n}}},function(t,e,i){i=new(i(0))({initialize:function(t,e,i,n,r,s,o){(void 0===i||i<=0)&&(i=32),(void 0===n||n<=0)&&(n=32),void 0===r&&(r=0),void 0===s&&(s=0),this.name=t,this.firstgid=0|e,this.imageWidth=0|i,this.imageHeight=0|n,this.imageMargin=0|r,this.imageSpacing=0|s,this.properties=o||{},this.images=[],this.total=0},containsImageIndex:function(t){return t>=this.firstgid&&t<this.firstgid+this.total},addImage:function(t,e){return this.images.push({gid:t,image:e}),this.total++,this}});t.exports=i},function(t,e,i){var o=i(40),a=i(121),h=i(578),l=i(579);t.exports=function(t,e,i){if(0===e.layer.length)return null;for(var n=0,r=0,s=0;s<e.layer.length;s++)e.layer[s].width>n&&(n=e.layer[s].width),e.layer[s].height>r&&(r=e.layer[s].height);t=new a({width:n,height:r,name:t,tileWidth:e.layer[0].tilesize,tileHeight:e.layer[0].tilesize,format:o.WELTMEISTER});return t.layers=h(e,i),t.tilesets=l(e),t}},function(t,e,i){var u=i(120),d=i(85);t.exports=function(t,e){for(var i=[],n=0;n<t.layer.length;n++){for(var r=t.layer[n],s=new u({name:r.name,width:r.width,height:r.height,tileWidth:r.tilesize,tileHeight:r.tilesize,visible:1===r.visible}),o=[],a=[],h=0;h<r.data.length;h++){for(var l=0;l<r.data[h].length;l++){var c=r.data[h][l]-1,c=-1<c?new d(s,c,l,h,r.tilesize,r.tilesize):e?null:new d(s,-1,l,h,r.tilesize,r.tilesize);o.push(c)}a.push(o),o=[]}s.data=a,i.push(s)}return i}},function(t,e,i){var o=i(122);t.exports=function(t){for(var e=[],i=[],n=0;n<t.layer.length;n++){var r=t.layer[n],s=r.tilesetName;""!==s&&-1===i.indexOf(s)&&(i.push(s),e.push(new o(s,0,r.tilesize,r.tilesize,0,0)))}return e}},function(t,e,i){var n=i(0),T=i(36),h=i(40),S=i(2),d=i(120),r=i(29),P=i(362),s=i(74),_=i(73),p=i(85),l=i(251),f=i(581),c=i(122),i=new n({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.tilesets=e.tilesets,this.objects=e.objects,this.currentLayerIndex=0,this.hexSideLength=e.hexSideLength;t=this.orientation;this._convert={WorldToTileXY:l.GetWorldToTileXYFunction(t),WorldToTileX:l.GetWorldToTileXFunction(t),WorldToTileY:l.GetWorldToTileYFunction(t),TileToWorldXY:l.GetTileToWorldXYFunction(t),TileToWorldX:l.GetTileToWorldXFunction(t),TileToWorldY:l.GetTileToWorldYFunction(t)}},createBlankDynamicLayer:function(t,e,i,n,r,s,o,a){return this.createBlankLayer(t,e,i,n,r,s,o,a)},createDynamicLayer:function(t,e,i,n){return this.createLayer(t,e,i,n)},createStaticLayer:function(t,e,i,n){return this.createLayer(t,e,i,n)},setRenderOrder:function(t){var e=["right-down","left-down","right-up","left-up"];return"number"==typeof t&&(t=e[t]),-1<e.indexOf(t)&&(this.renderOrder=t),this},addTilesetImage:function(t,e,i,n,r,s,o){var a;return void 0===t||!this.scene.sys.textures.exists(e=null==e?t:e)||(e=this.scene.sys.textures.get(e),null===(a=this.getTilesetIndex(t))&&this.format===h.TILED_JSON)?null:((a=this.tilesets[a])?(a.setTileSize(i,n),a.setSpacing(r,s),a.setImage(e)):(void 0===i&&(i=this.tileWidth),void 0===n&&(n=this.tileHeight),(a=new c(t,o=void 0===o?0:o,i,n,r=void 0===r?0:r,s=void 0===s?0:s)).setImage(e),this.tilesets.push(a)),a)},copy:function(t,e,i,n,r,s,o,a){return null!==(a=this.getLayer(a))?(l.Copy(t,e,i,n,r,s,o,a),this):null},createBlankLayer:function(t,e,i,n,r,s,o,a){if(void 0===i&&(i=0),void 0===n&&(n=0),void 0===r&&(r=this.width),void 0===s&&(s=this.height),void 0===o&&(o=this.tileWidth),void 0===a&&(a=this.tileHeight),null!==this.getLayerIndex(t))return null;for(var h=new d({name:t,tileWidth:o,tileHeight:a,width:r,height:s,orientation:this.orientation}),l=0;l<s;l++){for(var c=[],u=0;u<r;u++)c.push(new p(h,-1,u,l,o,a,this.tileWidth,this.tileHeight));h.data.push(c)}this.layers.push(h),this.currentLayerIndex=this.layers.length-1;t=new f(this.scene,this,this.currentLayerIndex,e,i,n);return t.setRenderOrder(this.renderOrder),this.scene.sys.displayList.add(t),t},createLayer:function(t,e,i,n){t=this.getLayerIndex(t);if(null===t)return null;var r=this.layers[t];if(r.tilemapLayer)return null;this.currentLayerIndex=t,void 0===i&&(i=r.x),void 0===n&&(n=r.y);r=new f(this.scene,this,t,e,i,n);return r.setRenderOrder(this.renderOrder),this.scene.sys.displayList.add(r),r},createFromObjects:function(t,e){var i=[],t=this.getObjectLayer(t);if(t){Array.isArray(e)||(e=[e]);for(var n=t.objects,r=0;r<e.length;r++){for(var s=e[r],o=S(s,"id",null),a=S(s,"gid",null),h=S(s,"name",null),l=[],c=0;c<n.length;c++)y=n[c],(null===o&&null===a&&null===h||null!==o&&y.id===o||null!==a&&y.gid===a||null!==h&&y.name===h)&&l.push(y);for(var u=S(s,"classType",_),d=S(s,"scene",this.scene),p=S(s,"container",null),f=S(s,"key",null),g=S(s,"frame",null),m=0;m<l.length;m++){var y=l[m],v=new u(d);v.setName(y.name),v.setPosition(y.x,y.y),v.setTexture(f,g),y.width&&(v.displayWidth=y.width),y.height&&(v.displayHeight=y.height);var x,b={x:v.originX*y.width,y:(v.originY-1)*y.height};if(y.rotation&&(x=T(y.rotation),P(b,x),v.rotation=x),v.x+=b.x,v.y+=b.y,void 0===y.flippedHorizontal&&void 0===y.flippedVertical||v.setFlip(y.flippedHorizontal,y.flippedVertical),y.visible||(v.visible=!1),Array.isArray(y.properties))y.properties.forEach(function(t){var e=t.name;void 0!==v[e]?v[e]=t.value:v.setData(e,t.value)});else for(var w in y.properties)void 0!==v[w]?v[w]=y.properties[w]:v.setData(w,y.properties[w]);p?p.add(v):d.add.existing(v),i.push(v)}}}return i},createFromTiles:function(t,e,i,n,r,s){return null===(s=this.getLayer(s))?null:l.CreateFromTiles(t,e,i,n,r,s)},fill:function(t,e,i,n,r,s,o){return void 0===s&&(s=!0),null===(o=this.getLayer(o))?null:(l.Fill(t,e,i,n,r,s,o),this)},filterObjects:function(t,e,i){if("string"==typeof t)if(!(t=this.getObjectLayer(t)))return null;return t.objects.filter(e,i)},filterTiles:function(t,e,i,n,r,s,o,a){return null===(a=this.getLayer(a))?null:l.FilterTiles(t,e,i,n,r,s,o,a)},findByIndex:function(t,e,i,n){return null===(n=this.getLayer(n))?null:l.FindByIndex(t,e,i,n)},findObject:function(t,e,i){if("string"==typeof t)if(!(t=this.getObjectLayer(t)))return null;return t.objects.find(e,i)||null},findTile:function(t,e,i,n,r,s,o,a){return null===(a=this.getLayer(a))?null:l.FindTile(t,e,i,n,r,s,o,a)},forEachTile:function(t,e,i,n,r,s,o,a){return null===(a=this.getLayer(a))?null:(l.ForEachTile(t,e,i,n,r,s,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){t=this.getLayerIndex(t);return null!==t?this.layers[t]:null},getObjectLayer:function(t){t=this.getIndex(this.objects,t);return null!==t?this.objects[t]: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 f?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:l.GetTileAt(t,e,i,n)},getTileAtWorldXY:function(t,e,i,n,r){return null===(r=this.getLayer(r))?null:l.GetTileAtWorldXY(t,e,i,n,r)},getTileLayerNames:function(){return this.layers&&Array.isArray(this.layers)?this.layers.map(function(t){return t.name}):[]},getTilesWithin:function(t,e,i,n,r,s){return null===(s=this.getLayer(s))?null:l.GetTilesWithin(t,e,i,n,r,s)},getTilesWithinShape:function(t,e,i,n){return null===(n=this.getLayer(n))?null:l.GetTilesWithinShape(t,e,i,n)},getTilesWithinWorldXY:function(t,e,i,n,r,s,o){return null===(o=this.getLayer(o))?null:l.GetTilesWithinWorldXY(t,e,i,n,r,s,o)},getTileset:function(t){t=this.getIndex(this.tilesets,t);return null!==t?this.tilesets[t]:null},getTilesetIndex:function(t){return this.getIndex(this.tilesets,t)},hasTileAt:function(t,e,i){return null===(i=this.getLayer(i))?null:l.HasTileAt(t,e,i)},hasTileAtWorldXY:function(t,e,i,n){return null===(n=this.getLayer(n))?null:l.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,r){return void 0===n&&(n=!0),null===(r=this.getLayer(r))?null:l.PutTileAt(t,e,i,n,r)},putTileAtWorldXY:function(t,e,i,n,r,s){return void 0===n&&(n=!0),null===(s=this.getLayer(s))?null:l.PutTileAtWorldXY(t,e,i,n,r,s)},putTilesAt:function(t,e,i,n,r){return void 0===n&&(n=!0),null===(r=this.getLayer(r))?null:(l.PutTilesAt(t,e,i,n,r),this)},randomize:function(t,e,i,n,r,s){return null===(s=this.getLayer(s))?null:(l.Randomize(t,e,i,n,r,s),this)},calculateFacesAt:function(t,e,i){return null===(i=this.getLayer(i))?null:(l.CalculateFacesAt(t,e,i),this)},calculateFacesWithin:function(t,e,i,n,r){return null===(r=this.getLayer(r))?null:(l.CalculateFacesWithin(t,e,i,n,r),this)},removeLayer:function(t){t=this.getLayerIndex(t);if(null===t)return null;s(this.layers,t);for(var e=t;e<this.layers.length;e++)this.layers[e].tilemapLayer&&this.layers[e].tilemapLayer.layerIndex--;return this.currentLayerIndex===t&&(this.currentLayerIndex=0),this},destroyLayer:function(t){var e=this.getLayerIndex(t);return null!==e?((t=this.layers[e]).destroy(),s(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 r=0;r<t.length;r++){var s=t[r];n.push(this.removeTileAt(s.x,s.y,!0,i,s.tilemapLayer)),-1<e&&this.putTileAt(e,s.x,s.y,i,s.tilemapLayer)}return n},removeTileAt:function(t,e,i,n,r){return void 0===i&&(i=!0),void 0===n&&(n=!0),null===(r=this.getLayer(r))?null:l.RemoveTileAt(t,e,i,n,r)},removeTileAtWorldXY:function(t,e,i,n,r,s){return void 0===i&&(i=!0),void 0===n&&(n=!0),null===(s=this.getLayer(s))?null:l.RemoveTileAtWorldXY(t,e,i,n,r,s)},renderDebug:function(t,e,i){return null===(i=this.getLayer(i))?null:(this.orientation===r.ORTHOGONAL&&l.RenderDebug(t,e,i),this)},renderDebugFull:function(t,e){for(var i=this.layers,n=0;n<i.length;n++)l.RenderDebug(t,e,i[n]);return this},replaceByIndex:function(t,e,i,n,r,s,o){return null===(o=this.getLayer(o))?null:(l.ReplaceByIndex(t,e,i,n,r,s,o),this)},setCollision:function(t,e,i,n,r){return void 0===e&&(e=!0),void 0===i&&(i=!0),void 0===r&&(r=!0),null===(n=this.getLayer(n))?null:(l.SetCollision(t,e,i,n,r),this)},setCollisionBetween:function(t,e,i,n,r){return void 0===i&&(i=!0),void 0===n&&(n=!0),null===(r=this.getLayer(r))?null:(l.SetCollisionBetween(t,e,i,n,r),this)},setCollisionByProperty:function(t,e,i,n){return void 0===e&&(e=!0),void 0===i&&(i=!0),null===(n=this.getLayer(n))?null:(l.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:(l.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:(l.SetCollisionFromCollisionGroup(t,e,i),this)},setTileIndexCallback:function(t,e,i,n){return null===(n=this.getLayer(n))?null:(l.SetTileIndexCallback(t,e,i,n),this)},setTileLocationCallback:function(t,e,i,n,r,s,o){return null===(o=this.getLayer(o))?null:(l.SetTileLocationCallback(t,e,i,n,r,s,o),this)},setLayer:function(t){t=this.getLayerIndex(t);return null!==t&&(this.currentLayerIndex=t),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,r=this.layers[i].width,s=this.layers[i].height,o=0;o<s;o++)for(var a=0;a<r;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))){i.tileWidth=t,i.tileHeight=e;for(var n=i.data,r=i.width,s=i.height,o=0;o<s;o++)for(var a=0;a<r;a++){var h=n[o][a];null!==h&&h.setSize(t,e)}}return this},shuffle:function(t,e,i,n,r){return null===(r=this.getLayer(r))?null:(l.Shuffle(t,e,i,n,r),this)},swapByIndex:function(t,e,i,n,r,s,o){return null===(o=this.getLayer(o))?null:(l.SwapByIndex(t,e,i,n,r,s,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,r){return null===(r=this.getLayer(r))?null:this._convert.TileToWorldXY(t,e,i,n,r)},weightedRandomize:function(t,e,i,n,r,s){return null===(s=this.getLayer(s))?null:(l.WeightedRandomize(e,i,n,r,t,s),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,r,s){return null===(s=this.getLayer(s))?null:this._convert.WorldToTileXY(t,e,i,n,r,s)},destroy:function(){this.removeAllLayers(),this.tilesets.length=0,this.objects.length=0,this.scene=null}});t.exports=i},function(t,e,i){var n=i(0),r=i(11),o=i(15),a=i(251),i=i(1456),n=new n({Extends:o,Mixins:[r.Alpha,r.BlendMode,r.ComputedSize,r.Depth,r.Flip,r.GetBounds,r.Origin,r.Pipeline,r.Transform,r.Visible,r.ScrollFactor,i],initialize:function(t,e,i,n,r,s){o.call(this,t,"TilemapLayer"),this.isTilemap=!0,this.tilemap=e,this.layerIndex=i,this.layer=e.layers[i],(this.layer.tilemapLayer=this).tileset=[],this.tilesDrawn=0,this.tilesTotal=this.layer.width*this.layer.height,this.culledTiles=[],this.skipCull=!1,this.cullPaddingX=1,this.cullPaddingY=1,this.cullCallback=a.GetCullTilesFunction(this.layer.orientation),this._renderOrder=0,this.gidMap=[],this.setTilesets(n),this.setAlpha(this.layer.alpha),this.setPosition(r,s),this.setOrigin(),this.setSize(e.tileWidth*this.layer.width,e.tileHeight*this.layer.height),this.initPipeline()},setTilesets:function(t){var e=[],i=[],n=this.tilemap;Array.isArray(t)||(t=[t]);for(var r=0;r<t.length;r++){var s=t[r];if(s="string"==typeof s?n.getTileset(s):s){i.push(s);for(var o=s.firstgid,a=0;a<s.total;a++)e[o+a]=s}}this.gidMap=e,this.tileset=i},setRenderOrder:function(t){return 0<=(t="string"==typeof t?["right-down","left-down","right-up","left-up"].indexOf(t):t)&&t<4&&(this._renderOrder=t),this},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,r){return a.CreateFromTiles(t,e,i,n,r,this.layer)},cull:function(t){return this.cullCallback(this.layer,t,this.culledTiles,this._renderOrder)},copy:function(t,e,i,n,r,s,o){return a.Copy(t,e,i,n,r,s,o,this.layer),this},fill:function(t,e,i,n,r,s){return a.Fill(t,e,i,n,r,s,this.layer),this},filterTiles:function(t,e,i,n,r,s,o){return a.FilterTiles(t,e,i,n,r,s,o,this.layer)},findByIndex:function(t,e,i){return a.FindByIndex(t,e,i,this.layer)},findTile:function(t,e,i,n,r,s,o){return a.FindTile(t,e,i,n,r,s,o,this.layer)},forEachTile:function(t,e,i,n,r,s,o){return a.ForEachTile(t,e,i,n,r,s,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)},getTilesWithin:function(t,e,i,n,r){return a.GetTilesWithin(t,e,i,n,r,this.layer)},getTilesWithinShape:function(t,e,i){return a.GetTilesWithinShape(t,e,i,this.layer)},getTilesWithinWorldXY:function(t,e,i,n,r,s){return a.GetTilesWithinWorldXY(t,e,i,n,r,s,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,r){return a.PutTileAtWorldXY(t,e,i,n,r,this.layer)},putTilesAt:function(t,e,i,n){return a.PutTilesAt(t,e,i,n,this.layer),this},randomize:function(t,e,i,n,r){return a.Randomize(t,e,i,n,r,this.layer),this},removeTileAt:function(t,e,i,n){return a.RemoveTileAt(t,e,i,n,this.layer)},removeTileAtWorldXY:function(t,e,i,n,r){return a.RemoveTileAtWorldXY(t,e,i,n,r,this.layer)},renderDebug:function(t,e){return a.RenderDebug(t,e,this.layer),this},replaceByIndex:function(t,e,i,n,r,s){return a.ReplaceByIndex(t,e,i,n,r,s,this.layer),this},setSkipCull:function(t){return this.skipCull=t=void 0===t?!0:t,this},setCullPadding:function(t,e){return void 0===e&&(e=1),this.cullPaddingX=t=void 0===t?1:t,this.cullPaddingY=e,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,r,s){return a.SetTileLocationCallback(t,e,i,n,r,s,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,r,s){return a.SwapByIndex(t,e,i,n,r,s,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)},tileToWorldXY:function(t,e,i,n){return this.tilemap.tileToWorldXY(t,e,i,n,this)},weightedRandomize:function(t,e,i,n,r){return a.WeightedRandomize(e,i,n,r,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,r){return this.tilemap.worldToTileXY(t,e,i,n,r,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.culledTiles.length=0,this.cullCallback=null,this.gidMap=[],this.tileset=[],o.prototype.destroy.call(this))}});t.exports=n},function(t,e,i){var n=i(0),r=i(2),i=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){return this.delay=r(t,"delay",0),this.repeat=r(t,"repeat",0),this.loop=r(t,"loop",!1),this.callback=r(t,"callback",void 0),this.callbackScope=r(t,"callbackScope",this.callback),this.args=r(t,"args",[]),this.timeScale=r(t,"timeScale",1),this.startAt=r(t,"startAt",0),this.paused=r(t,"paused",!1),this.elapsed=this.startAt,this.hasDispatched=!1,this.repeatCount=-1===this.repeat||this.loop?999999999999:this.repeat,this},getProgress:function(){return this.elapsed/this.delay},getOverallProgress:function(){var t;return 0<this.repeat?(t=this.delay+this.delay*this.repeat,(this.elapsed+this.delay*(this.repeat-this.repeatCount))/t):this.getProgress()},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=[]}});t.exports=i},function(t,e,i){var n=i(1465);t.exports=function(t){var e,i=[];if(t.hasOwnProperty("props"))for(e in t.props)"_"!==e.substr(0,1)&&i.push({key:e,value:t.props[e]});else for(e in t)-1===n.indexOf(e)&&"_"!==e.substr(0,1)&&i.push({key:e,value:t[e]});return i}},function(t,e,i){var n=i(6);t.exports=function(t){t=n(t,"tweens",null);return null===t?[]:("function"==typeof t&&(t=t.call()),t=Array.isArray(t)?t:[t])}},function(t,e,i){var S=i(265),P=i(13),_=i(99),E=i(80),A=i(162),M=i(6),k=i(264),C=i(266),O=i(268);t.exports=function(t,e,i){void 0===i&&(i=S);var n=M(e,"from",0),r=M(e,"to",1),s=[{value:n}],o=A(e,"delay",i.delay),a=A(e,"duration",i.duration),h=M(e,"easeParams",i.easeParams),h=E(M(e,"ease",i.ease),h),l=A(e,"hold",i.hold),c=A(e,"repeat",i.repeat),u=A(e,"repeatDelay",i.repeatDelay),i=_(e,"yoyo",i.yoyo),d=[],p=k("value",r),p=O(s[0],0,"value",p.getEnd,p.getStart,p.getActive,h,o,a,i,l,c,u,!1,!1),f=(p.start=n,p.current=n,p.to=r,d.push(p),new C(t,d,s));f.offset=P(e,"offset",null),f.completeDelay=P(e,"completeDelay",0),f.loop=Math.round(P(e,"loop",0)),f.loopDelay=Math.round(P(e,"loopDelay",0)),f.paused=_(e,"paused",!1),f.useFrames=_(e,"useFrames",!1);for(var g=M(e,"callbackScope",f),m=[f,null],y=C.TYPES,v=0;v<y.length;v++){var x,b,w=y[v],T=M(e,w,!1);T&&(x=M(e,w+"Scope",g),b=M(e,w+"Params",[]),f.setCallback(w,T,m.concat(b),x))}return f}},function(t,e,i){var _=i(80),E=i(6),A=i(14);t.exports=function(t,e){var o=E(e=void 0===e?{}:e,"start",0),i=E(e,"ease",null),n=E(e,"grid",null),a=E(e,"from",0),h="first"===a,l="center"===a,c="last"===a,u="number"==typeof a,d=Array.isArray(t),p=d?parseFloat(t[0]):parseFloat(t),f=d?parseFloat(t[1]):0,g=Math.max(p,f);if(d&&(o+=p),n){var m=n[0],y=n[1],r=0,s=0,v=[];c?(r=m-1,s=y-1):u?(r=a%m,s=Math.floor(a/m)):l&&(r=(m-1)/2,s=(y-1)/2);for(var x=A.MIN_SAFE_INTEGER,b=0;b<y;b++){v[b]=[];for(var w=0;w<m;w++){var T=r-w,S=s-b,T=Math.sqrt(T*T+S*S);x<T&&(x=T),v[b][w]=T}}}var P=i?_(i):null;return n?function(t,e,i,n){var r=0,s=n%m,n=Math.floor(n/m);return 0<=s&&s<m&&0<=n&&n<y&&(r=v[n][s]),(d?(n=f-p,P?r/x*n*P(r/x):r/x*n):P?r*p*P(r/x):r*p)+o}:function(t,e,i,n,r){var s;return r--,h?s=n:l?s=Math.abs(r/2-n):c?s=r-n:u&&(s=Math.abs(a-n)),(d?(n=l?(f-p)/r*(2*s):(f-p)/r*s,P?n*P(s/r):n):P?r*g*P(s/r):s*p)+o}}},function(t,e,i){var c=i(77),u=i(265),d=i(13),p=i(99),f=i(80),g=i(162),m=i(263),y=i(584),v=i(6),x=i(588),b=i(163);t.exports=function(t,e){var i=new x(t);i.completeDelay=d(e,"completeDelay",0),i.loop=Math.round(d(e,"loop",0)),i.loopDelay=Math.round(d(e,"loopDelay",0)),i.paused=p(e,"paused",!1),i.useFrames=p(e,"useFrames",!1);var t=v(e,"callbackScope",i),n=[i],r=v(e,"onStart",!1);r&&(s=v(e,"onStartScope",t),o=v(e,"onStartParams",[]),i.setCallback("onStart",r,n.concat(o),s));r=v(e,"onUpdate",!1);r&&(o=v(e,"onUpdateScope",t),s=v(e,"onUpdateParams",[]),i.setCallback("onUpdate",r,n.concat(s),o));r=v(e,"onLoop",!1);r&&(s=v(e,"onLoopScope",t),o=v(e,"onLoopParams",[]),i.setCallback("onLoop",r,n.concat(o),s));r=v(e,"onYoyo",!1);r&&(o=v(e,"onYoyoScope",t),s=v(e,"onYoyoParams",[]),i.setCallback("onYoyo",r,n.concat(null,s),o));var s,o,r=v(e,"onComplete",!1),a=(r&&(s=v(e,"onCompleteScope",t),o=v(e,"onCompleteParams",[]),i.setCallback("onComplete",r,n.concat(o),s)),y(e));if(0===a.length)i.paused=!0;else{var h=c(u),t=(h.targets=m(e),d(e,"totalDuration",0));h.duration=0<t?Math.floor(t/a.length):g(e,"duration",h.duration),h.delay=g(e,"delay",h.delay),h.easeParams=v(e,"easeParams",h.easeParams),h.ease=f(v(e,"ease",h.ease),h.easeParams),h.hold=g(e,"hold",h.hold),h.repeat=g(e,"repeat",h.repeat),h.repeatDelay=g(e,"repeatDelay",h.repeatDelay),h.yoyo=p(e,"yoyo",h.yoyo),h.flipX=p(e,"flipX",h.flipX),h.flipY=p(e,"flipY",h.flipY);for(var l=0;l<a.length;l++)i.queue(b(i,a[l],h))}return i}},function(t,e,i){var n=i(0),r=i(9),s=i(267),o=i(163),a=i(100),h=new n({Extends:r,initialize:function(t){r.call(this),this.manager=t,this.isTimeline=!0,this.data=[],this.totalData=0,this.useFrames=!1,this.timeScale=1,this.loop=0,this.loopDelay=0,this.loopCounter=0,this.completeDelay=0,this.countdown=0,this.state=a.PENDING_ADD,this._pausedState=a.PENDING_ADD,this.paused=!1,this.elapsed=0,this.totalElapsed=0,this.duration=0,this.progress=0,this.totalDuration=0,this.totalProgress=0,this.callbacks={onComplete:null,onLoop:null,onStart:null,onUpdate:null,onYoyo:null},this.callbackScope},dispatchTimelineEvent:function(t,e){this.emit(t,this),e&&e.func.apply(e.scope,e.params)},setTimeScale:function(t){return this.timeScale=t,this},getTimeScale:function(){return this.timeScale},isPlaying:function(){return this.state===a.ACTIVE},add:function(t){return this.queue(o(this,t))},queue:function(t){return this.isPlaying()||(t.parent=this,t.parentIsTimeline=!0,this.data.push(t),this.totalData=this.data.length),this},hasOffset:function(t){return null!==t.offset},isOffsetAbsolute:function(t){return"number"==typeof t},isOffsetRelative:function(t){if("string"==typeof t){t=t[0];if("-"===t||"+"===t)return!0}return!1},getRelativeOffset:function(t,e){var i=t[0],n=parseFloat(t.substr(2)),r=e;switch(i){case"+":r+=n;break;case"-":r-=n}return Math.max(0,r)},calcDuration:function(){for(var t=0,e=0,i=0,n=0;n<this.totalData;n++){var r=this.data[n];r.init(),this.hasOffset(r)?this.isOffsetAbsolute(r.offset)?(r.calculatedOffset=r.offset,0===r.offset&&(i=0)):this.isOffsetRelative(r.offset)&&(r.calculatedOffset=this.getRelativeOffset(r.offset,t)):r.calculatedOffset=i,t=r.totalDuration+r.calculatedOffset,e+=r.totalDuration,i+=r.totalDuration}this.duration=e,this.loopCounter=-1===this.loop?999999999999:this.loop,0<this.loopCounter?this.totalDuration=this.duration+this.completeDelay+(this.duration+this.loopDelay)*this.loopCounter:this.totalDuration=this.duration+this.completeDelay},init:function(){return this.calcDuration(),this.progress=0,this.totalProgress=0,!this.paused||(this.state=a.PAUSED,!1)},resetTweens:function(t){for(var e=0;e<this.totalData;e++)this.data[e].play(t)},setCallback:function(t,e,i,n){return-1!==h.TYPES.indexOf(t)&&(this.callbacks[t]={func:e,scope:n,params:i}),this},makeActive:function(t){return this.manager.makeActive(t)},play:function(){this.state!==a.ACTIVE&&(this.paused?(this.paused=!1,this.manager.makeActive(this)):(this.resetTweens(!1),this.state=a.ACTIVE,this.dispatchTimelineEvent(s.TIMELINE_START,this.callbacks.onStart)))},nextState:function(){0<this.loopCounter?(this.elapsed=0,this.progress=0,this.loopCounter--,this.resetTweens(!0),0<this.loopDelay?(this.countdown=this.loopDelay,this.state=a.LOOP_DELAY):(this.state=a.ACTIVE,this.dispatchTimelineEvent(s.TIMELINE_LOOP,this.callbacks.onLoop))):0<this.completeDelay?(this.state=a.COMPLETE_DELAY,this.countdown=this.completeDelay):(this.state=a.PENDING_REMOVE,this.dispatchTimelineEvent(s.TIMELINE_COMPLETE,this.callbacks.onComplete))},update:function(t,e){if(this.state!==a.PAUSED){switch(this.useFrames&&(e=+this.manager.timeScale),e*=this.timeScale,this.elapsed+=e,this.progress=Math.min(this.elapsed/this.duration,1),this.totalElapsed+=e,this.totalProgress=Math.min(this.totalElapsed/this.totalDuration,1),this.state){case a.ACTIVE:for(var i=this.totalData,n=0;n<this.totalData;n++)this.data[n].update(t,e)&&i--;this.dispatchTimelineEvent(s.TIMELINE_UPDATE,this.callbacks.onUpdate),0===i&&this.nextState();break;case a.LOOP_DELAY:this.countdown-=e,this.countdown<=0&&(this.state=a.ACTIVE,this.dispatchTimelineEvent(s.TIMELINE_LOOP,this.callbacks.onLoop));break;case a.COMPLETE_DELAY:this.countdown-=e,this.countdown<=0&&(this.state=a.PENDING_REMOVE,this.dispatchTimelineEvent(s.TIMELINE_COMPLETE,this.callbacks.onComplete))}return this.state===a.PENDING_REMOVE}},stop:function(){this.state=a.PENDING_REMOVE},pause:function(){if(this.state!==a.PAUSED)return this.paused=!0,this._pausedState=this.state,this.state=a.PAUSED,this.emit(s.TIMELINE_PAUSE,this),this},resume:function(){return this.state===a.PAUSED&&(this.paused=!1,this.state=this._pausedState,this.emit(s.TIMELINE_RESUME,this)),this},hasTarget:function(t){for(var e=0;e<this.data.length;e++)if(this.data[e].hasTarget(t))return!0;return!1},destroy:function(){for(var t=0;t<this.data.length;t++)this.data[t].stop()}});h.TYPES=["onStart","onUpdate","onLoop","onComplete","onYoyo"],t.exports=h},function(t,e,i){var s=i(86),l=i(41),c=i(32),u=i(2),r=i(64);t.exports={parseBody:function(t,e,i,n){void 0===n&&(n={});for(var r=u(i,"fixtures",[]),s=[],o=0;o<r.length;o++)for(var a=this.parseFixture(r[o]),h=0;h<a.length;h++)s.push(a[h]);i=c.clone(i,!0),c.extend(i,n,!0),delete i.fixtures,delete i.type,n=l.create(i);return l.setParts(n,s),l.setPosition(n,{x:t,y:e}),n},parseFixture:function(t){var e,i,n,r=c.extend({},!1,t);return delete r.circle,delete r.vertices,t.circle?(n=u(t.circle,"x"),e=u(t.circle,"y"),i=u(t.circle,"radius"),n=[s.circle(n,e,i,r)]):t.vertices&&(n=this.parseVertices(t.vertices,r)),n},parseVertices:function(t,e){void 0===e&&(e={});for(var i=[],n=0;n<t.length;n++)r.clockwiseSort(t[n]),i.push(l.create(c.extend({position:r.centre(t[n]),vertices:t[n]},e)));return s.flagCoincidentParts(i)}}},function(t,e,i){var l=i(86),c=i(41);t.exports={parseBody:function(t,e,i,n){void 0===n&&(n={});var r,s=i.vertices;if(1===s.length)n.vertices=s[0],r=c.create(n),l.flagCoincidentParts(r.parts);else{for(var o=[],a=0;a<s.length;a++){var h=c.create({vertices:s[a]});o.push(h)}l.flagCoincidentParts(o),n.parts=o,r=c.create(n)}return r.label=i.label,c.setPosition(r,{x:t,y:e}),r}}},function(t,e,i){var p={},v=(t.exports=p,i(118)),f=i(128),g=i(32),x=i(41),c=i(86);p.stack=function(t,e,i,n,r,s,o){for(var a,h=v.create({label:"Stack"}),l=t,c=e,u=0,d=0;d<n;d++){for(var p=0,f=0;f<i;f++){var g,m,y=o(l,c,f,d,a,u);y?(g=y.bounds.max.y-y.bounds.min.y,m=y.bounds.max.x-y.bounds.min.x,p<g&&(p=g),x.translate(y,{x:.5*m,y:.5*g}),l=y.bounds.max.x+r,v.addBody(h,y),a=y,u+=1):l+=r}c+=p+s,l=t}return h},p.chain=function(t,e,i,n,r,s){for(var o=t.bodies,a=1;a<o.length;a++){var h=o[a-1],l=o[a],c=h.bounds.max.y-h.bounds.min.y,u=h.bounds.max.x-h.bounds.min.x,d=l.bounds.max.y-l.bounds.min.y,h={bodyA:h,pointA:{x:u*e,y:c*i},bodyB:l,pointB:{x:(l.bounds.max.x-l.bounds.min.x)*n,y:d*r}},u=g.extend(h,s);v.addConstraint(t,f.create(u))}return t.label+=" Chain",t},p.mesh=function(t,e,i,n,r){for(var s,o,a,h,l=t.bodies,c=0;c<i;c++){for(s=1;s<e;s++)o=l[s-1+c*e],a=l[s+c*e],v.addConstraint(t,f.create(g.extend({bodyA:o,bodyB:a},r)));if(0<c)for(s=0;s<e;s++)o=l[s+(c-1)*e],a=l[s+c*e],v.addConstraint(t,f.create(g.extend({bodyA:o,bodyB:a},r))),n&&0<s&&(h=l[s-1+(c-1)*e],v.addConstraint(t,f.create(g.extend({bodyA:h,bodyB:a},r)))),n&&s<e-1&&(h=l[s+1+(c-1)*e],v.addConstraint(t,f.create(g.extend({bodyA:h,bodyB:a},r))))}return t.label+=" Mesh",t},p.pyramid=function(h,t,l,c,u,e,d){return p.stack(h,t,l,c,u,e,function(t,e,i,n,r,s){var o=Math.min(c,Math.ceil(l/2)),a=r?r.bounds.max.x-r.bounds.min.x:0;if(!(o<n||i<(n=o-n)||l-1-n<i))return 1===s&&x.translate(r,{x:(i+(l%2==1?1:-1))*a,y:0}),d(h+(r?i*a:0)+i*u,e,i,n,r,s)})},p.newtonsCradle=function(t,e,i,n,r){for(var s=v.create({label:"Newtons Cradle"}),o=0;o<i;o++){var a=c.circle(t+o*(1.9*n),e+r,n,{inertia:1/0,restitution:1,friction:0,frictionAir:1e-4,slop:1}),h=f.create({pointA:{x:t+o*(1.9*n),y:e},bodyB:a});v.addBody(s,a),v.addConstraint(s,h)}return s},p.car=function(t,e,i,n,r){var s=x.nextGroup(!0),o=.5*-i+20,a=.5*i-20,h=v.create({label:"Car"}),i=c.rectangle(t,e,i,n,{collisionFilter:{group:s},chamfer:{radius:.5*n},density:2e-4}),n=c.circle(t+o,e+0,r,{collisionFilter:{group:s},friction:.8}),t=c.circle(t+a,e+0,r,{collisionFilter:{group:s},friction:.8}),e=f.create({bodyB:i,pointB:{x:o,y:0},bodyA:n,stiffness:1,length:0}),r=f.create({bodyB:i,pointB:{x:a,y:0},bodyA:t,stiffness:1,length:0});return v.addBody(h,i),v.addBody(h,n),v.addBody(h,t),v.addConstraint(h,e),v.addConstraint(h,r),h},p.softBody=function(t,e,i,n,r,s,o,a,h,l){h=g.extend({inertia:1/0},h),l=g.extend({stiffness:.2,render:{type:"line",anchors:!1}},l);t=p.stack(t,e,i,n,r,s,function(t,e){return c.circle(t,e,a,h)});return p.mesh(t,i,n,o,l),t.label="Soft Body",t}},function(t,e,i){var x={},b=(t.exports=x,i(84),i(32));x.pathToVertices=function(t,e){"undefined"==typeof window||"SVGPathSeg"in window||b.warn("Svg.pathToVertices: SVGPathSeg not defined, a polyfill is required.");var i,n,r,s,o,a,h,l,c,u,d,p=[],f=0,g=0,m=0;function y(t,e,i){var n,i=i%2==1&&1<i;c&&t==c.x&&e==c.y||(d=c&&i?(u=c.x,c.y):u=0,n={x:u+t,y:d+e},!i&&c||(c=n),p.push(n),g=u+t,m=d+e)}function v(t){var e=t.pathSegTypeAsLetter.toUpperCase();if("Z"!==e){switch(e){case"M":case"L":case"T":case"C":case"S":case"Q":g=t.x,m=t.y;break;case"H":g=t.x;break;case"V":m=t.y}y(g,m,t.pathSegType)}}for(e=e||15,x._svgPathToAbsolute(t),r=t.getTotalLength(),a=[],i=0;i<t.pathSegList.numberOfItems;i+=1)a.push(t.pathSegList.getItem(i));for(h=a.concat();f<r;){if((o=a[t.getPathSegAtLength(f)])!=l){for(;h.length&&h[0]!=o;)v(h.shift());l=o}switch(o.pathSegTypeAsLetter.toUpperCase()){case"C":case"T":case"S":case"Q":case"A":y((s=t.getPointAtLength(f)).x,s.y,0)}f+=e}for(i=0,n=h.length;i<n;++i)v(h[i]);return p},x._svgPathToAbsolute=function(t){for(var e,i,n,r,s,o,a=t.pathSegList,h=0,l=0,c=a.numberOfItems,u=0;u<c;++u){var d=a.getItem(u),p=d.pathSegTypeAsLetter;if(/[MLHVCSQTA]/.test(p))"x"in d&&(h=d.x),"y"in d&&(l=d.y);else switch("x1"in d&&(n=h+d.x1),"x2"in d&&(s=h+d.x2),"y1"in d&&(r=l+d.y1),"y2"in d&&(o=l+d.y2),"x"in d&&(h+=d.x),"y"in d&&(l+=d.y),p){case"m":a.replaceItem(t.createSVGPathSegMovetoAbs(h,l),u);break;case"l":a.replaceItem(t.createSVGPathSegLinetoAbs(h,l),u);break;case"h":a.replaceItem(t.createSVGPathSegLinetoHorizontalAbs(h),u);break;case"v":a.replaceItem(t.createSVGPathSegLinetoVerticalAbs(l),u);break;case"c":a.replaceItem(t.createSVGPathSegCurvetoCubicAbs(h,l,n,r,s,o),u);break;case"s":a.replaceItem(t.createSVGPathSegCurvetoCubicSmoothAbs(h,l,s,o),u);break;case"q":a.replaceItem(t.createSVGPathSegCurvetoQuadraticAbs(h,l,n,r),u);break;case"t":a.replaceItem(t.createSVGPathSegCurvetoQuadraticSmoothAbs(h,l),u);break;case"a":a.replaceItem(t.createSVGPathSegArcAbs(h,l,d.r1,d.r2,d.angle,d.largeArcFlag,d.sweepFlag),u);break;case"z":case"Z":h=e,l=i}"M"!=p&&"m"!=p||(e=h,i=l)}}},function(t,e,i){var g=i(86),m=i(41),n=i(0),r=i(249),s=i(9),y=i(2),v=i(126),x=i(64),i=new n({Extends:s,Mixins:[r.Bounce,r.Collision,r.Friction,r.Gravity,r.Mass,r.Sensor,r.Sleep,r.Static],initialize:function(t,e,i){s.call(this),this.tile=e,this.world=t,e.physics.matterBody&&e.physics.matterBody.destroy(),e.physics.matterBody=this;var t=y(i,"body",null),n=y(i,"addToWorld",!0);t?this.setBody(t,n):(t=e.getCollisionGroup(),0<y(t,"objects",[]).length?this.setFromTileCollision(i):this.setFromTileRectangle(i))},setFromTileRectangle:function(t){v(t=void 0===t?{}:t,"isStatic")||(t.isStatic=!0),v(t,"addToWorld")||(t.addToWorld=!0);var e=this.tile.getBounds(),i=e.x+e.width/2,n=e.y+e.height/2,i=g.rectangle(i,n,e.width,e.height,t);return this.setBody(i,t.addToWorld),this},setFromTileCollision:function(t){v(t=void 0===t?{}:t,"isStatic")||(t.isStatic=!0),v(t,"addToWorld")||(t.addToWorld=!0);for(var e=this.tile.tilemapLayer.scaleX,i=this.tile.tilemapLayer.scaleY,n=this.tile.getLeft(),r=this.tile.getTop(),s=this.tile.getCollisionGroup(),o=y(s,"objects",[]),a=[],h=0;h<o.length;h++){var l=o[h],c=n+l.x*e,u=r+l.y*i,d=l.width*e,p=l.height*i,f=null;l.rectangle?f=g.rectangle(c+d/2,u+p/2,d,p,t):l.ellipse?f=g.circle(c+d/2,u+p/2,d/2,t):(l.polygon||l.polyline)&&(p=(l.polygon||l.polyline).map(function(t){return{x:t.x*e,y:t.y*i}}),d=x.create(p),c+=(l=x.centre(d)).x,u+=l.y,f=g.fromVertices(c,u,d,t)),f&&a.push(f)}return 1===a.length?this.setBody(a[0],t.addToWorld):1<a.length&&(t.parts=a,this.setBody(m.create(t),t.addToWorld)),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()}});t.exports=i},function(t,e,i){var n=i(1399);n.Body=i(41),n.Composite=i(118),n.World=i(596),n.Detector=i(273),n.Grid=i(597),n.Pairs=i(598),n.Pair=i(250),n.Query=i(1400),n.Resolver=i(599),n.SAT=i(274),n.Constraint=i(128),n.Common=i(32),n.Engine=i(1401),n.Events=i(166),n.Sleeping=i(165),n.Plugin=i(595),n.Bodies=i(86),n.Composites=i(591),n.Axes=i(271),n.Bounds=i(84),n.Svg=i(592),n.Vector=i(83),n.Vertices=i(64),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},function(t,e,i){var o={},a=(t.exports=o,i(32));o._registry={},o.register=function(t){var e,i,n;return o.isPlugin(t)||a.warn("Plugin.register:",o.toString(t),"does not implement all required fields."),t.name in o._registry?(e=o._registry[t.name],i=o.versionParse(t.version).number,(n=o.versionParse(e.version).number)<i?(a.warn("Plugin.register:",o.toString(e),"was upgraded to",o.toString(t)),o._registry[t.name]=t):i<n?a.warn("Plugin.register:",o.toString(e),"can not be downgraded to",o.toString(t)):t!==e&&a.warn("Plugin.register:",o.toString(t),"is already registered to different plugin object")):o._registry[t.name]=t,t},o.resolve=function(t){return o._registry[o.dependencyParse(t).name]},o.toString=function(t){return"string"==typeof t?t:(t.name||"anonymous")+"@"+(t.version||t.range||"0.0.0")},o.isPlugin=function(t){return t&&t.name&&t.version&&t.install},o.isUsed=function(t,e){return-1<t.used.indexOf(e)},o.isFor=function(t,e){var i=t.for&&o.dependencyParse(t.for);return!t.for||e.name===i.name&&o.versionSatisfies(e.version,i.range)},o.use=function(t,e){if(t.uses=(t.uses||[]).concat(e||[]),0!==t.uses.length){for(var i,e=o.dependencies(t),n=a.topologicalSort(e),r=[],s=0;s<n.length;s+=1)n[s]!==t.name&&((i=o.resolve(n[s]))?o.isUsed(t,i.name)||(o.isFor(i,t)||(a.warn("Plugin.use:",o.toString(i),"is for",i.for,"but installed on",o.toString(t)+"."),i._warned=!0),i.install?i.install(t):(a.warn("Plugin.use:",o.toString(i),"does not specify an install function."),i._warned=!0),i._warned?(r.push("🔶 "+o.toString(i)),delete i._warned):r.push("✅ "+o.toString(i)),t.used.push(i.name)):r.push("❌ "+n[s]));0<r.length&&!i.silent&&a.info(r.join(" "))}else a.warn("Plugin.use:",o.toString(t),"does not specify any dependencies to install.")},o.dependencies=function(n,t){var r=o.dependencyParse(n),e=r.name;if(!(e in(t=t||{}))){n=o.resolve(n)||n,t[e]=a.map(n.uses||[],function(t){o.isPlugin(t)&&o.register(t);var e=o.dependencyParse(t),i=o.resolve(t);return i&&!o.versionSatisfies(i.version,e.range)?(a.warn("Plugin.dependencies:",o.toString(i),"does not satisfy",o.toString(e),"used by",o.toString(r)+"."),i._warned=!0,n._warned=!0):i||(a.warn("Plugin.dependencies:",o.toString(t),"used by",o.toString(r),"could not be resolved."),n._warned=!0),e.name});for(var i=0;i<t[e].length;i+=1)o.dependencies(t[e][i],t);return t}},o.dependencyParse=function(t){return a.isString(t)?(/^[\w-]+(@(\*|[\^~]?\d+\.\d+\.\d+(-[0-9A-Za-z-]+)?))?$/.test(t)||a.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}},o.versionParse=function(t){/^\*|[\^~]?\d+\.\d+\.\d+(-[0-9A-Za-z-]+)?$/.test(t)||a.warn("Plugin.versionParse:",t,"is not a valid version or range.");var e=t.split("-"),i=(t=e[0],isNaN(Number(t[0]))),n=i?t.substr(1):t,r=a.map(n.split("."),function(t){return Number(t)});return{isRange:i,version:n,range:t,operator:i?t[0]:"",parts:r,prerelease:e[1],number:1e8*r[0]+1e4*r[1]+r[2]}},o.versionSatisfies=function(t,e){var i=o.versionParse(e=e||"*"),n=i.parts,r=o.versionParse(t),s=r.parts;if(i.isRange){if("*"===i.operator||"*"===t)return!0;if("~"===i.operator)return s[0]===n[0]&&s[1]===n[1]&&s[2]>=n[2];if("^"===i.operator)return 0<n[0]?s[0]===n[0]&&r.number>=i.number:0<n[1]?s[1]===n[1]&&s[2]>=n[2]:s[2]===n[2]}return t===e||"*"===t}},function(t,e,i){var n={},r=(t.exports=n,i(118)),s=(i(128),i(32));n.create=function(t){var e=r.create();return s.extend(e,{label:"World",gravity:{x:0,y:1,scale:.001},bounds:{min:{x:-1/0,y:-1/0},max:{x:1/0,y:1/0}}},t)}},function(t,e,i){var v={},a=(t.exports=v,i(250)),n=i(273),s=i(32);v.create=function(t){var e={controller:v,detector:n.collisions,buckets:{},pairs:{},pairsList:[],bucketWidth:48,bucketHeight:48};return s.extend(e,t)},v.update=function(t,e,i,n){for(var r,s,o=i.world,a=t.buckets,h=!1,l=i.metrics,c=l.broadphaseTests=0;c<e.length;c++){var u=e[c];if((!u.isSleeping||n)&&!(u.bounds.max.x<o.bounds.min.x||u.bounds.min.x>o.bounds.max.x||u.bounds.max.y<o.bounds.min.y||u.bounds.min.y>o.bounds.max.y)){var d=v._getRegion(t,u);if(!u.region||d.id!==u.region.id||n){l.broadphaseTests+=1,u.region&&!n||(u.region=d);for(var p=v._regionUnion(d,u.region),f=p.startCol;f<=p.endCol;f++)for(r=p.startRow;r<=p.endRow;r++){var g=a[s=v._getBucketId(f,r)],m=f>=d.startCol&&f<=d.endCol&&r>=d.startRow&&r<=d.endRow,y=f>=u.region.startCol&&f<=u.region.endCol&&r>=u.region.startRow&&r<=u.region.endRow;!m&&y&&y&&g&&v._bucketRemoveBody(t,g,u),(u.region===d||m&&!y||n)&&(g=g||v._createBucket(a,s),v._bucketAddBody(t,g,u))}u.region=d,h=!0}}}h&&(t.pairsList=v._createActivePairsList(t))},v.clear=function(t){t.buckets={},t.pairs={},t.pairsList=[]},v._regionUnion=function(t,e){var i=Math.min(t.startCol,e.startCol),n=Math.max(t.endCol,e.endCol),r=Math.min(t.startRow,e.startRow),t=Math.max(t.endRow,e.endRow);return v._createRegion(i,n,r,t)},v._getRegion=function(t,e){var e=e.bounds,i=Math.floor(e.min.x/t.bucketWidth),n=Math.floor(e.max.x/t.bucketWidth),r=Math.floor(e.min.y/t.bucketHeight),e=Math.floor(e.max.y/t.bucketHeight);return v._createRegion(i,n,r,e)},v._createRegion=function(t,e,i,n){return{id:t+","+e+","+i+","+n,startCol:t,endCol:e,startRow:i,endRow:n}},v._getBucketId=function(t,e){return"C"+t+"R"+e},v._createBucket=function(t,e){return t[e]=[]},v._bucketAddBody=function(t,e,i){for(var n=0;n<e.length;n++){var r,s,o=e[n];i.id===o.id||i.isStatic&&o.isStatic||(r=a.id(i,o),(s=t.pairs[r])?s[2]+=1:t.pairs[r]=[i,o,1])}e.push(i)},v._bucketRemoveBody=function(t,e,i){e.splice(e.indexOf(i),1);for(var n=0;n<e.length;n++){var r=e[n],r=a.id(i,r),r=t.pairs[r];r&&--r[2]}},v._createActivePairsList=function(t){for(var e,i=[],n=s.keys(t.pairs),r=0;r<n.length;r++)0<(e=t.pairs[n[r]])[2]?i.push(e):delete t.pairs[n[r]];return i}},function(t,e,i){var l={},d=(t.exports=l,i(250)),n=i(32);l._pairMaxIdleLife=1e3,l.create=function(t){return n.extend({table:{},list:[],collisionStart:[],collisionActive:[],collisionEnd:[]},t)},l.update=function(t,e,i){var n,r,s,o,a=t.list,h=t.table,l=t.collisionStart,c=t.collisionEnd,u=t.collisionActive;for(l.length=0,c.length=0,o=u.length=0;o<a.length;o++)a[o].confirmedActive=!1;for(o=0;o<e.length;o++)(n=e[o]).collided&&((s=h[r=d.id(n.bodyA,n.bodyB)])?((s.isActive?u:l).push(s),d.update(s,n,i),s.confirmedActive=!0):(s=d.create(n,i),h[r]=s,l.push(s),a.push(s)));for(o=0;o<a.length;o++)(s=a[o]).isActive&&!s.confirmedActive&&(d.setActive(s,!1,i),c.push(s))},l.removeOld=function(t,e){for(var i,n,r,s=t.list,o=t.table,a=[],h=0;h<s.length;h++)(n=(i=s[h]).collision).bodyA.isSleeping||n.bodyB.isSleeping?i.timeUpdated=e:e-i.timeUpdated>l._pairMaxIdleLife&&a.push(h);for(h=0;h<a.length;h++)delete o[(i=s[r=a[h]-h]).id],s.splice(r,1)},l.clear=function(t){return t.table={},t.list.length=0,t.collisionStart.length=0,t.collisionActive.length=0,t.collisionEnd.length=0,t}},function(t,e,i){var C={},s=(t.exports=C,i(64)),O=i(83),R=i(32),o=i(84);C._restingThresh=4,C._restingThreshTangent=6,C._positionDampen=.9,C._positionWarming=.8,C._frictionNormalMultiplier=5,C.preSolvePosition=function(t){for(var e,i,n=0;n<t.length;n++)(e=t[n]).isActive&&(i=e.activeContacts.length,e.collision.parentA.totalContacts+=i,e.collision.parentB.totalContacts+=i)},C.solvePosition=function(t,e,i){for(var n,r,s,o,a,h,l,c,u,d=i*C._positionDampen,p=0;p<e.length;p++){var f=e[p];f.previousPositionImpulse.x=f.positionImpulse.x,f.previousPositionImpulse.y=f.positionImpulse.y}for(p=0;p<t.length;p++)(n=t[p]).isActive&&!n.isSensor&&(r=(o=n.collision).parentA,s=o.parentB,u=o.normal,a=r.previousPositionImpulse,c=s.previousPositionImpulse,o=o.penetration,l=c.x-a.x+o.x,c=c.y-a.y+o.y,l=(a=u.x)*l+(o=u.y)*c,u=((n.separation=l)-n.slop)*d,(r.isStatic||s.isStatic)&&(u*=2),r.isStatic||r.isSleeping||(h=u/r.totalContacts,r.positionImpulse.x+=a*h,r.positionImpulse.y+=o*h),s.isStatic||s.isSleeping||(h=u/s.totalContacts,s.positionImpulse.x-=a*h,s.positionImpulse.y-=o*h))},C.postSolvePosition=function(t){for(var e=0;e<t.length;e++){var i=t[e];if((i.totalContacts=0)!==i.positionImpulse.x||0!==i.positionImpulse.y){for(var n=0;n<i.parts.length;n++){var r=i.parts[n];s.translate(r.vertices,i.positionImpulse),o.update(r.bounds,r.vertices,i.velocity),r.position.x+=i.positionImpulse.x,r.position.y+=i.positionImpulse.y}i.positionPrev.x+=i.positionImpulse.x,i.positionPrev.y+=i.positionImpulse.y,O.dot(i.positionImpulse,i.velocity)<0?(i.positionImpulse.x=0,i.positionImpulse.y=0):(i.positionImpulse.x*=C._positionWarming,i.positionImpulse.y*=C._positionWarming)}}},C.preSolveVelocity=function(t){for(var e,i,n,r,s,o,a,h,l,c,u,d=O._temp[0],p=O._temp[1],f=0;f<t.length;f++)if((n=t[f]).isActive&&!n.isSensor)for(i=n.activeContacts,r=(n=n.collision).parentA,s=n.parentB,o=n.normal,a=n.tangent,e=0;e<i.length;e++)h=(c=i[e]).vertex,l=c.normalImpulse,c=c.tangentImpulse,0===l&&0===c||(d.x=o.x*l+a.x*c,d.y=o.y*l+a.y*c,r.isStatic||r.isSleeping||(u=O.sub(h,r.position,p),r.positionPrev.x+=d.x*r.inverseMass,r.positionPrev.y+=d.y*r.inverseMass,r.anglePrev+=O.cross(u,d)*r.inverseInertia),s.isStatic||s.isSleeping||(u=O.sub(h,s.position,p),s.positionPrev.x-=d.x*s.inverseMass,s.positionPrev.y-=d.y*s.inverseMass,s.anglePrev-=O.cross(u,d)*s.inverseInertia))},C.solveVelocity=function(t,e){for(var i=e*e,n=O._temp[0],r=O._temp[1],s=O._temp[2],o=O._temp[3],a=O._temp[4],h=O._temp[5],l=0;l<t.length;l++){var c=t[l];if(c.isActive&&!c.isSensor){var u=c.collision,d=u.parentA,p=u.parentB,f=u.normal,g=u.tangent,m=c.activeContacts,y=1/m.length;d.velocity.x=d.position.x-d.positionPrev.x,d.velocity.y=d.position.y-d.positionPrev.y,p.velocity.x=p.position.x-p.positionPrev.x,p.velocity.y=p.position.y-p.positionPrev.y,d.angularVelocity=d.angle-d.anglePrev,p.angularVelocity=p.angle-p.anglePrev;for(var v=0;v<m.length;v++){var x=m[v],b=x.vertex,w=O.sub(b,d.position,r),b=O.sub(b,p.position,s),T=O.add(d.velocity,O.mult(O.perp(w),d.angularVelocity),o),S=O.add(p.velocity,O.mult(O.perp(b),p.angularVelocity),a),T=O.sub(T,S,h),S=O.dot(f,T),T=O.dot(g,T),P=Math.abs(T),_=R.sign(T),E=(1+c.restitution)*S,A=R.clamp(c.separation+S,0,1)*C._frictionNormalMultiplier,M=T,k=1/0;P>c.friction*c.frictionStatic*A*i&&(M=R.clamp(c.friction*_*i,-(k=P),k));var A=O.cross(w,f),_=O.cross(b,f),P=y/(d.inverseMass+p.inverseMass+d.inverseInertia*A*A+p.inverseInertia*_*_);E*=P,M*=P,S<0&&S*S>C._restingThresh*i?x.normalImpulse=0:(A=x.normalImpulse,x.normalImpulse=Math.min(x.normalImpulse+E,0),E=x.normalImpulse-A),T*T>C._restingThreshTangent*i?x.tangentImpulse=0:(_=x.tangentImpulse,x.tangentImpulse=R.clamp(x.tangentImpulse+M,-k,k),M=x.tangentImpulse-_),n.x=f.x*E+g.x*M,n.y=f.y*E+g.y*M,d.isStatic||d.isSleeping||(d.positionPrev.x+=n.x*d.inverseMass,d.positionPrev.y+=n.y*d.inverseMass,d.anglePrev+=O.cross(w,n)*d.inverseInertia),p.isStatic||p.isSleeping||(p.positionPrev.x-=n.x*p.inverseMass,p.positionPrev.y-=n.y*p.inverseMass,p.anglePrev-=O.cross(b,n)*p.inverseInertia)}}}}},function(t,e){var i=function(){return this}();try{i=i||new Function("return this")()}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e,i){var a=i(276);t.exports=function(t,e,i,n){for(var r=t[0],s=1;s<t.length;s++){var o=t[s];a(o,r,e,i,n),r=o}return t}},function(t,e,i){var s=i(46);t.exports=function(t,e,i,n,r){return s(t,"angle",e,i,n,r)}},function(t,e){t.exports=function(t,e,i){for(var n=0;n<t.length;n++){var r=t[n];e.call(i,r)}return t}},function(t,e){t.exports=function(t,e,i){for(var n=i=void 0===i?0:i;n<t.length;n++){var r,s=t[n],o=!0;for(r in e)s[r]!==e[r]&&(o=!1);if(o)return s}return null}},function(t,e){t.exports=function(t,e,i){for(var n=i=void 0===i?0:i;n<t.length;n++){var r,s=t[n],o=!0;for(r in e)s[r]!==e[r]&&(o=!1);if(o)return s}return null}},function(t,e,i){var m=i(289),y=i(123),v=i(2),n=i(1),x=new(i(129))({sys:{queueDepthSort:n,events:{once:n}}},0,0,1,1);t.exports=function(t,e){var i=(e=void 0===e?{}:e).hasOwnProperty("width"),n=e.hasOwnProperty("height"),r=v(e,"width",-1),s=v(e,"height",-1),o=v(e,"cellWidth",1),a=v(e,"cellHeight",o),h=v(e,"position",y.TOP_LEFT),l=v(e,"x",0),c=v(e,"y",0),u=0,d=0,p=r*o,f=s*a;x.setPosition(l,c),x.setSize(o,a);for(var g=0;g<t.length;g++)if(m(t[g],x,h),i&&-1===r)x.x+=o;else if(n&&-1===s)x.y+=a;else if(n&&!i){if(d+=a,x.y+=a,d===f&&(d=0,u+=o,x.y=c,x.x+=o,u===p))break}else if(u+=o,x.x+=o,u===p&&(u=0,d+=a,x.x=l,x.y+=a,d===f))break;return t}},function(t,e,i){var r=i(18);t.exports={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t,e,i,n){return void 0===t&&(t=1),void 0===e?this.alpha=t:(this._alphaTL=r(t,0,1),this._alphaTR=r(e,0,1),this._alphaBL=r(i,0,1),this._alphaBR=r(n,0,1)),this},alpha:{get:function(){return this._alpha},set:function(t){t=r(t,0,1);this._alpha=t,this._alphaTL=t,this._alphaTR=t,this._alphaBL=t,0===(this._alphaBR=t)?this.renderFlags&=-3:this.renderFlags|=2}},alphaTopLeft:{get:function(){return this._alphaTL},set:function(t){t=r(t,0,1);0!==(this._alphaTL=t)&&(this.renderFlags|=2)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(t){t=r(t,0,1);0!==(this._alphaTR=t)&&(this.renderFlags|=2)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(t){t=r(t,0,1);0!==(this._alphaBL=t)&&(this.renderFlags|=2)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(t){t=r(t,0,1);0!==(this._alphaBR=t)&&(this.renderFlags|=2)}}}},function(t,e){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}}},function(t,e){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},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}}}},function(t,e){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}}},function(t,e,i){var l=i(10),n=i(308),r=i(3);t.exports={prepareBoundsOutput:function(t,e){return void 0===e&&(e=!1),0!==this.rotation&&n(t,this.x,this.y,this.rotation),e&&this.parentContainer&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t),t},getCenter:function(t){return(t=void 0===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,t},getTopLeft:function(t,e){return(t=t||new r).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).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).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).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).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).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).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).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){var e,i,n,r,s,o,a,h;return void 0===t&&(t=new l),this.parentContainer?(h=this.parentContainer.getBoundsTransformMatrix(),this.getTopLeft(t),h.transformPoint(t.x,t.y,t),e=t.x,i=t.y,this.getTopRight(t),h.transformPoint(t.x,t.y,t),n=t.x,r=t.y,this.getBottomLeft(t),h.transformPoint(t.x,t.y,t),s=t.x,o=t.y,this.getBottomRight(t),h.transformPoint(t.x,t.y,t)):(this.getTopLeft(t),e=t.x,i=t.y,this.getTopRight(t),n=t.x,r=t.y,this.getBottomLeft(t),s=t.x,o=t.y,this.getBottomRight(t)),h=t.x,a=t.y,t.x=Math.min(e,n,s,h),t.y=Math.min(i,r,o,a),t.width=Math.max(e,n,s,h)-t.x,t.height=Math.max(i,r,o,a)-t.y,t}}},function(t,e){t.exports="blur"},function(t,e){t.exports="boot"},function(t,e){t.exports="contextlost"},function(t,e){t.exports="contextrestored"},function(t,e){t.exports="destroy"},function(t,e){t.exports="focus"},function(t,e){t.exports="hidden"},function(t,e){t.exports="pause"},function(t,e){t.exports="postrender"},function(t,e){t.exports="poststep"},function(t,e){t.exports="prerender"},function(t,e){t.exports="prestep"},function(t,e){t.exports="ready"},function(t,e){t.exports="resume"},function(t,e){t.exports="step"},function(t,e){t.exports="visible"},function(t,e){t.exports="postrender"},function(t,e){t.exports="prerender"},function(t,e){t.exports="render"},function(t,e){t.exports="resize"},function(t,e){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}}},function(t,e,i){var r=i(36),s=i(99),o=i(6),a=i(100),h=i(3),i={path:null,rotateToPath:!1,pathRotationOffset:0,pathOffset:null,pathVector:null,pathDelta:null,pathTween:null,pathConfig:null,_prevDirection:a.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&&i.isPlaying()&&i.stop(),(t="number"==typeof t?{duration:t}:t).from=o(t,"from",0),t.to=o(t,"to",1),s(t,"positionOnPath",!1));this.rotateToPath=s(t,"rotateToPath",!1),this.pathRotationOffset=o(t,"rotationOffset",0);var n=o(t,"startAt",e);return n&&(t.onStart=function(t){var t=t.data[0],e=(t.progress=n,t.elapsed=t.duration*n,t.ease(t.progress));t.current=t.start+(t.end-t.start)*e,t.target[t.key]=t.current}),this.pathOffset||(this.pathOffset=new h(this.x,this.y)),this.pathVector||(this.pathVector=new h),this.pathDelta||(this.pathDelta=new h),this.pathDelta.reset(),this.pathTween=this.scene.sys.tweens.addCounter(t),this.path.getStartPoint(this.pathOffset),i&&(this.x=this.pathOffset.x,this.y=this.pathOffset.y),this.pathOffset.x=this.x-this.pathOffset.x,this.pathOffset.y=this.y-this.pathOffset.y,this._prevDirection=a.PLAYING_FORWARD,this.rotateToPath&&(e=this.path.getPoint(.1),this.rotation=Math.atan2(e.y-this.y,e.x-this.x)+r(this.pathRotationOffset)),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,e,i,n=this.pathTween;n&&(t=n.data[0],e=this.pathDelta,i=this.pathVector,e.copy(i).negate(),t.state===a.COMPLETE?(this.path.getPoint(1,i),e.add(i),i.add(this.pathOffset),this.setPosition(i.x,i.y)):t.state!==a.PLAYING_FORWARD&&t.state!==a.PLAYING_BACKWARD||(this.path.getPoint(n.getValue(),i),e.add(i),i.add(this.pathOffset),n=this.x,e=this.y,this.setPosition(i.x,i.y),i=this.x-n,n=this.y-e,0==i&&0==n||(t.state!==this._prevDirection?this._prevDirection=t.state:this.rotateToPath&&(this.rotation=Math.atan2(n,i)+r(this.pathRotationOffset)))))}};t.exports=i},function(t,e){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){return void 0===t&&(t=this.frame),this.width=t.realWidth,this.height=t.realHeight,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}}},function(t,e){t.exports={texture:null,frame:null,isCropped:!1,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),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}}},function(t,e){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),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,ch:0}}}},function(t,e){t.exports={tintTopLeft:16777215,tintTopRight:16777215,tintBottomLeft:16777215,tintBottomRight:16777215,tintFill:!1,clearTint:function(){return this.setTint(16777215),this},setTint:function(t,e,i,n){return void 0===t&&(t=16777215),void 0===e&&(n=i=e=t),this.tintTopLeft=t,this.tintTopRight=e,this.tintBottomLeft=i,this.tintBottomRight=n,this.tintFill=!1,this},setTintFill:function(t,e,i,n){return this.setTint(t,e,i,n),this.tintFill=!0,this},tint:{set:function(t){this.setTint(t,t,t,t)}},isTinted:{get:function(){var t=16777215;return this.tintFill||this.tintTopLeft!==t||this.tintTopRight!==t||this.tintBottomLeft!==t||this.tintBottomRight!==t}}}},function(t,e){t.exports="changedata"},function(t,e){t.exports="changedata-"},function(t,e){t.exports="destroy"},function(t,e){t.exports="removedata"},function(t,e){t.exports="setdata"},function(t,e){t.exports="addedtoscene"},function(t,e){t.exports="destroy"},function(t,e){t.exports="removedfromscene"},function(t,e){t.exports="complete"},function(t,e){t.exports="created"},function(t,e){t.exports="error"},function(t,e){t.exports="loop"},function(t,e){t.exports="play"},function(t,e){t.exports="seeked"},function(t,e){t.exports="seeking"},function(t,e){t.exports="stop"},function(t,e){t.exports="timeout"},function(t,e){t.exports="unlocked"},function(t,e){t.exports="addedtoscene"},function(t,e){t.exports="boot"},function(t,e){t.exports="create"},function(t,e){t.exports="destroy"},function(t,e){t.exports="pause"},function(t,e){t.exports="postupdate"},function(t,e){t.exports="prerender"},function(t,e){t.exports="preupdate"},function(t,e){t.exports="ready"},function(t,e){t.exports="removedfromscene"},function(t,e){t.exports="render"},function(t,e){t.exports="resume"},function(t,e){t.exports="shutdown"},function(t,e){t.exports="sleep"},function(t,e){t.exports="start"},function(t,e){t.exports="transitioncomplete"},function(t,e){t.exports="transitioninit"},function(t,e){t.exports="transitionout"},function(t,e){t.exports="transitionstart"},function(t,e){t.exports="transitionwake"},function(t,e){t.exports="update"},function(t,e){t.exports="wake"},function(t,e,i){var s=i(46);t.exports=function(t,e,i,n,r){return s(t,"alpha",e,i,n,r)}},function(t,e,i){var s=i(46);t.exports=function(t,e,i,n,r){return s(t,"x",e,i,n,r)}},function(t,e,i){var a=i(46);t.exports=function(t,e,i,n,r,s,o){return null==i&&(i=e),a(t,"x",e,n,s,o),a(t,"y",i,r,s,o)}},function(t,e,i){var s=i(46);t.exports=function(t,e,i,n,r){return s(t,"y",e,i,n,r)}},function(t,e){t.exports=function(t,e,i,n){for(var r=i=void 0===i?0:i,s=((n=void 0===n?6.28:n)-i)/t.length,o=0;o<t.length;o++)t[o].x=e.x+e.radius*Math.cos(r),t[o].y=e.y+e.radius*Math.sin(r),r+=s;return t}},function(t,e){t.exports=function(t,e,i,n){for(var r=i=void 0===i?0:i,s=((n=void 0===n?6.28: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(r),t[h].y=e.y+a*Math.sin(r),r+=s;return t}},function(t,e,i){var o=i(172);t.exports=function(t,e){for(var i=o(e,t.length),n=0;n<t.length;n++){var r=t[n],s=i[n];r.x=s.x,r.y=s.y}return t}},function(t,e,i){var s=i(316),o=i(178),a=i(179);t.exports=function(t,e,i){void 0===i&&(i=0);var n=s(e,!1,t.length);0<i?o(n,i):i<0&&a(n,Math.abs(i));for(var r=0;r<t.length;r++)t[r].x=n[r].x,t[r].y=n[r].y;return t}},function(t,e,i){var c=i(317);t.exports=function(t,e,i){var n=c({x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},i),r=c({x1:e.x2,y1:e.y2,x2:e.x3,y2:e.y3},i),e=c({x1:e.x3,y1:e.y3,x2:e.x1,y2:e.y1},i);n.pop(),r.pop(),e.pop();for(var s=(n=n.concat(r,e)).length/t.length,o=0,a=0;a<t.length;a++){var h=t[a],l=n[Math.floor(o)];h.x=l.x,h.y=l.y,o+=s}return t}},function(t,e){t.exports=function(t,e,i){for(var n=0;n<t.length;n++){var r=t[n];r.anims&&r.anims.play(e,i)}return t}},function(t,e,i){var n=i(170);t.exports=function(t,e){for(var i=0;i<t.length;i++)n(e,t[i]);return t}},function(t,e,i){var n=i(180);t.exports=function(t,e){for(var i=0;i<t.length;i++)n(e,t[i]);return t}},function(t,e,i){var n=i(173);t.exports=function(t,e){for(var i=0;i<t.length;i++)n(e,t[i]);return t}},function(t,e,i){var n=i(174);t.exports=function(t,e){for(var i=0;i<t.length;i++)n(e,t[i]);return t}},function(t,e,i){var n=i(181);t.exports=function(t,e){for(var i=0;i<t.length;i++)n(e,t[i]);return t}},function(t,e,i){var s=i(46);t.exports=function(t,e,i,n,r){return s(t,"rotation",e,i,n,r)}},function(t,e,i){var a=i(182),h=i(50);t.exports=function(t,e,i){for(var n=e.x,r=e.y,s=0;s<t.length;s++){var o=t[s];a(o,n,r,i,Math.max(1,h(o.x,o.y,n,r)))}return t}},function(t,e,i){var a=i(182);t.exports=function(t,e,i,n){var r=e.x,s=e.y;if(0!==n)for(var o=0;o<t.length;o++)a(t[o],r,s,i,n);return t}},function(t,e,i){var s=i(46);t.exports=function(t,e,i,n,r){return s(t,"scaleX",e,i,n,r)}},function(t,e,i){var a=i(46);t.exports=function(t,e,i,n,r,s,o){return null==i&&(i=e),a(t,"scaleX",e,n,s,o),a(t,"scaleY",i,r,s,o)}},function(t,e,i){var s=i(46);t.exports=function(t,e,i,n,r){return s(t,"scaleY",e,i,n,r)}},function(t,e,i){var s=i(27);t.exports=function(t,e,i,n,r){return s(t,"alpha",e,i,n,r)}},function(t,e,i){var r=i(27);t.exports=function(t,e,i,n){return r(t,"blendMode",e,0,i,n)}},function(t,e,i){var s=i(27);t.exports=function(t,e,i,n,r){return s(t,"depth",e,i,n,r)}},function(t,e){t.exports=function(t,e,i){for(var n=0;n<t.length;n++)t[n].setInteractive(e,i);return t}},function(t,e,i){var a=i(27);t.exports=function(t,e,i,n,r,s,o){return null==i&&(i=e),a(t,"originX",e,n,s,o),a(t,"originY",i,r,s,o),t.forEach(function(t){t.updateDisplayOrigin()}),t}},function(t,e,i){var s=i(27);t.exports=function(t,e,i,n,r){return s(t,"rotation",e,i,n,r)}},function(t,e,i){var a=i(27);t.exports=function(t,e,i,n,r,s,o){return null==i&&(i=e),a(t,"scaleX",e,n,s,o),a(t,"scaleY",i,r,s,o)}},function(t,e,i){var s=i(27);t.exports=function(t,e,i,n,r){return s(t,"scaleX",e,i,n,r)}},function(t,e,i){var s=i(27);t.exports=function(t,e,i,n,r){return s(t,"scaleY",e,i,n,r)}},function(t,e,i){var a=i(27);t.exports=function(t,e,i,n,r,s,o){return null==i&&(i=e),a(t,"scrollFactorX",e,n,s,o),a(t,"scrollFactorY",i,r,s,o)}},function(t,e,i){var s=i(27);t.exports=function(t,e,i,n,r){return s(t,"scrollFactorX",e,i,n,r)}},function(t,e,i){var s=i(27);t.exports=function(t,e,i,n,r){return s(t,"scrollFactorY",e,i,n,r)}},function(t,e){t.exports=function(t,e,i,n,r){for(var s=0;s<t.length;s++)t[s].setTint(e,i,n,r);return t}},function(t,e,i){var r=i(27);t.exports=function(t,e,i,n){return r(t,"visible",e,0,i,n)}},function(t,e,i){var s=i(27);t.exports=function(t,e,i,n,r){return s(t,"x",e,i,n,r)}},function(t,e,i){var a=i(27);t.exports=function(t,e,i,n,r,s,o){return null==i&&(i=e),a(t,"x",e,n,s,o),a(t,"y",i,r,s,o)}},function(t,e,i){var s=i(27);t.exports=function(t,e,i,n,r){return s(t,"y",e,i,n,r)}},function(t,e,i){var u=i(3);t.exports=function(t,e,i,n,r){var s,o,a;if(void 0===n&&(n=0),void 0===r&&(r=new u),1<t.length)if(0===n){for(var n=t.length-1,h=t[n].x,l=t[n].y,c=n-1;0<=c;c--)s=(a=t[c]).x,o=a.y,a.x=h,a.y=l,h=s,l=o;t[n].x=e,t[n].y=i}else{for(h=t[0].x,l=t[0].y,c=1;c<t.length;c++)s=(a=t[c]).x,o=a.y,a.x=h,a.y=l,h=s,l=o;t[0].x=e,t[0].y=i}else h=t[0].x,l=t[0].y,t[0].x=e,t[0].y=i;return r.x=h,r.y=l,r}},function(t,e,i){var n=i(131);t.exports=function(t){return n(t)}},function(t,e,i){var a=i(183);t.exports=function(t,e,i,n,r){void 0===r&&(r=!1);var s,o=Math.abs(n-i)/t.length;if(r)for(s=0;s<t.length;s++)t[s][e]+=a(s*o,i,n);else for(s=0;s<t.length;s++)t[s][e]=a(s*o,i,n);return t}},function(t,e,i){var a=i(184);t.exports=function(t,e,i,n,r){void 0===r&&(r=!1);var s,o=Math.abs(n-i)/t.length;if(r)for(s=0;s<t.length;s++)t[s][e]+=a(s*o,i,n);else for(s=0;s<t.length;s++)t[s][e]=a(s*o,i,n);return t}},function(t,e){t.exports=function(t,e,i,n,r){void 0===r&&(r=!1);var s,o=Math.abs(n-i)/t.length;if(r)for(s=0;s<t.length;s++)t[s][e]+=s*o+i;else for(s=0;s<t.length;s++)t[s][e]=s*o+i;return t}},function(t,e){t.exports=function(t){for(var e=0;e<t.length;e++)t[e].visible=!t[e].visible;return t}},function(t,e,i){var s=i(68);t.exports=function(t,e,i){void 0===i&&(i=0);for(var n=0;n<t.length;n++){var r=t[n];r.x=s(r.x,e.left-i,e.right+i),r.y=s(r.y,e.top-i,e.bottom+i)}return t}},function(t,e,i){t.exports={Animation:i(185),AnimationFrame:i(319),AnimationManager:i(321),AnimationState:i(164),Events:i(132)}},function(t,e){t.exports="add"},function(t,e){t.exports="animationcomplete"},function(t,e){t.exports="animationcomplete-"},function(t,e){t.exports="animationrepeat"},function(t,e){t.exports="animationrestart"},function(t,e){t.exports="animationstart"},function(t,e){t.exports="animationstop"},function(t,e){t.exports="animationupdate"},function(t,e){t.exports="pauseall"},function(t,e){t.exports="remove"},function(t,e){t.exports="resumeall"},function(t,e,i){t.exports={BaseCache:i(323),CacheManager:i(325),Events:i(324)}},function(t,e){t.exports="add"},function(t,e){t.exports="remove"},function(t,e,i){t.exports={Controls:i(739),Scene2D:i(742)}},function(t,e,i){t.exports={FixedKeyControl:i(740),SmoothedKeyControl:i(741)}},function(t,e,i){var n=i(0),r=i(6),i=new n({initialize:function(t){this.camera=r(t,"camera",null),this.left=r(t,"left",null),this.right=r(t,"right",null),this.up=r(t,"up",null),this.down=r(t,"down",null),this.zoomIn=r(t,"zoomIn",null),this.zoomOut=r(t,"zoomOut",null),this.zoomSpeed=r(t,"zoomSpeed",.01),this.minZoom=r(t,"minZoom",.001),this.maxZoom=r(t,"maxZoom",1e3),this.speedX=0,this.speedY=0;var e=r(t,"speed",null);"number"==typeof e?(this.speedX=e,this.speedY=e):(this.speedX=r(t,"speed.x",0),this.speedY=r(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){var e;this.active&&(void 0===t&&(t=1),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}});t.exports=i},function(t,e,i){var n=i(0),r=i(6),i=new n({initialize:function(t){this.camera=r(t,"camera",null),this.left=r(t,"left",null),this.right=r(t,"right",null),this.up=r(t,"up",null),this.down=r(t,"down",null),this.zoomIn=r(t,"zoomIn",null),this.zoomOut=r(t,"zoomOut",null),this.zoomSpeed=r(t,"zoomSpeed",.01),this.minZoom=r(t,"minZoom",.001),this.maxZoom=r(t,"maxZoom",1e3),this.accelX=0,this.accelY=0;var e=r(t,"acceleration",null),e=("number"==typeof e?(this.accelX=e,this.accelY=e):(this.accelX=r(t,"acceleration.x",0),this.accelY=r(t,"acceleration.y",0)),this.dragX=0,this.dragY=0,r(t,"drag",null)),e=("number"==typeof e?(this.dragX=e,this.dragY=e):(this.dragX=r(t,"drag.x",0),this.dragY=r(t,"drag.y",0)),this.maxSpeedX=0,this.maxSpeedY=0,r(t,"maxSpeed",null));"number"==typeof e?(this.maxSpeedX=e,this.maxSpeedY=e):(this.maxSpeedX=r(t,"maxSpeed.x",0),this.maxSpeedY=r(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){var e;this.active&&(void 0===t&&(t=1),e=this.camera,0<this._speedX?(this._speedX-=this.dragX*t,this._speedX<0&&(this._speedX=0)):this._speedX<0&&(this._speedX+=this.dragX*t,0<this._speedX&&(this._speedX=0)),0<this._speedY?(this._speedY-=this.dragY*t,this._speedY<0&&(this._speedY=0)):this._speedY<0&&(this._speedY+=this.dragY*t,0<this._speedY&&(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}});t.exports=i},function(t,e,i){t.exports={Camera:i(326),BaseCamera:i(133),CameraManager:i(799),Effects:i(333),Events:i(37)}},function(t,e){t.exports="cameradestroy"},function(t,e){t.exports="camerafadeincomplete"},function(t,e){t.exports="camerafadeinstart"},function(t,e){t.exports="camerafadeoutcomplete"},function(t,e){t.exports="camerafadeoutstart"},function(t,e){t.exports="cameraflashcomplete"},function(t,e){t.exports="cameraflashstart"},function(t,e){t.exports="followupdate"},function(t,e){t.exports="camerapancomplete"},function(t,e){t.exports="camerapanstart"},function(t,e){t.exports="postrender"},function(t,e){t.exports="prerender"},function(t,e){t.exports="camerarotatecomplete"},function(t,e){t.exports="camerarotatestart"},function(t,e){t.exports="camerashakecomplete"},function(t,e){t.exports="camerashakestart"},function(t,e){t.exports="camerazoomcomplete"},function(t,e){t.exports="camerazoomstart"},function(t,e,i){var n=i(18),r=i(0),h=i(37),i=new r({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,r,s,o,a){return void 0===t&&(t=!0),void 0===e&&(e=1e3),void 0===i&&(i=0),void 0===n&&(n=0),void 0===r&&(r=0),void 0===o&&(o=null),void 0===a&&(a=this.camera.scene),!(s=void 0===s?!1:s)&&this.isRunning||(this.isRunning=!0,this.isComplete=!1,this.duration=e,this.direction=t,this.progress=0,this.red=i,this.green=n,this.blue=r,this.alpha=t?Number.MIN_VALUE:1,this._elapsed=0,this._onUpdate=o,this._onUpdateScope=a,s=t?h.FADE_OUT_START:h.FADE_IN_START,this.camera.emit(s,this.camera,this,e,i,n,r)),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?1:0,this.effectComplete()))},postRenderCanvas:function(t){var e;return!(!this.isRunning&&!this.isComplete)&&(e=this.camera,t.fillStyle="rgba("+this.red+","+this.green+","+this.blue+","+this.alpha+")",t.fillRect(e.x,e.y,e.width,e.height),!0)},postRenderWebGL:function(t,e){var i,n,r,s;return!(!this.isRunning&&!this.isComplete)&&(i=this.camera,n=this.red/255,r=this.green/255,s=this.blue/255,t.drawFillRect(i.x,i.y,i.width,i.height,e(s,r,n,1),this.alpha),!0)},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.isComplete=!0;var t=this.direction?h.FADE_OUT_COMPLETE:h.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}});t.exports=i},function(t,e,i){var n=i(18),r=i(0),a=i(37),i=new r({initialize:function(t){this.camera=t,this.isRunning=!1,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,r,s,o){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=null),void 0===o&&(o=this.camera.scene),!(r=void 0===r?!1:r)&&this.isRunning||(this.isRunning=!0,this.duration=t,this.progress=0,this.red=e,this.green=i,this.blue=n,this.alpha=1,this._elapsed=0,this._onUpdate=s,this._onUpdateScope=o,this.camera.emit(a.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=1-this.progress:this.effectComplete())},postRenderCanvas:function(t){var e;return!!this.isRunning&&(e=this.camera,t.fillStyle="rgba("+this.red+","+this.green+","+this.blue+","+this.alpha+")",t.fillRect(e.x,e.y,e.width,e.height),!0)},postRenderWebGL:function(t,e){var i,n,r,s;return!!this.isRunning&&(i=this.camera,n=this.red/255,r=this.green/255,s=this.blue/255,t.drawFillRect(i.x,i.y,i.width,i.height,e(s,r,n,1),this.alpha),!0)},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(a.FLASH_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null}});t.exports=i},function(t,e,i){var s=i(18),n=i(0),h=i(134),l=i(37),r=i(3),i=new n({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.source=new r,this.current=new r,this.destination=new r,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,n,r,s,o){void 0===i&&(i=1e3),void 0===n&&(n=h.Linear),void 0===s&&(s=null),void 0===o&&(o=this.camera.scene);var a=this.camera;return!(r=void 0===r?!1:r)&&this.isRunning||(this.isRunning=!0,this.duration=i,this.progress=0,this.source.set(a.scrollX,a.scrollY),this.destination.set(t,e),a.getScroll(t,e,this.current),"string"==typeof n&&h.hasOwnProperty(n)?this.ease=h[n]:"function"==typeof n&&(this.ease=n),this._elapsed=0,this._onUpdate=s,this._onUpdateScope=o,this.camera.emit(l.PAN_START,this.camera,this,i,t,e)),a},update:function(t,e){var i,n,r;this.isRunning&&(this._elapsed+=e,e=s(this._elapsed/this.duration,0,1),this.progress=e,i=this.camera,this._elapsed<this.duration?(r=this.ease(e),i.getScroll(this.destination.x,this.destination.y,this.current),n=this.source.x+(this.current.x-this.source.x)*r,r=this.source.y+(this.current.y-this.source.y)*r,i.setScroll(n,r),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,i,e,n,r)):(i.centerOn(this.destination.x,this.destination.y),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,i,e,i.scrollX,i.scrollY),this.effectComplete()))},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(l.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}});t.exports=i},function(t,e){t.exports=function(t,e){return t*t*(((e=void 0===e?1.70158:e)+1)*t-e)}},function(t,e){t.exports=function(t,e){return--t*t*(((e=void 0===e?1.70158:e)+1)*t+e)+1}},function(t,e){t.exports=function(t,e){e=1.525*(e=void 0===e?1.70158:e);return(t*=2)<1?t*t*((1+e)*t-e)*.5:.5*((t-=2)*t*((1+e)*t+e)+2)}},function(t,e){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)}},function(t,e){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}},function(t,e){t.exports=function(t){var e=!1;return t<.5?(t=1-2*t,e=!0):t=2*t-1,t<1/2.75?t*=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?.5*(1-t):.5*t+.5}},function(t,e){t.exports=function(t){return 1-Math.sqrt(1-t*t)}},function(t,e){t.exports=function(t){return Math.sqrt(1- --t*t)}},function(t,e){t.exports=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},function(t,e){t.exports=function(t){return t*t*t}},function(t,e){t.exports=function(t){return--t*t*t+1}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},function(t,e){t.exports=function(t,e,i){var n;return void 0===e&&(e=.1),void 0===i&&(i=.1),0===t?0:1===t?1:(n=i/4,e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),-(e*Math.pow(2,10*--t)*Math.sin((t-n)*(2*Math.PI)/i)))}},function(t,e){t.exports=function(t,e,i){var n;return void 0===e&&(e=.1),void 0===i&&(i=.1),0===t?0:1===t?1:(n=i/4,e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*t)*Math.sin((t-n)*(2*Math.PI)/i)+1)}},function(t,e){t.exports=function(t,e,i){var n;return void 0===e&&(e=.1),void 0===i&&(i=.1),0===t?0:1===t?1:(n=i/4,e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),(t*=2)<1?e*Math.pow(2,10*--t)*Math.sin((t-n)*(2*Math.PI)/i)*-.5:e*Math.pow(2,-10*--t)*Math.sin((t-n)*(2*Math.PI)/i)*.5+1)}},function(t,e){t.exports=function(t){return Math.pow(2,10*(t-1))-.001}},function(t,e){t.exports=function(t){return 1-Math.pow(2,-10*t)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))}},function(t,e){t.exports=function(t){return t}},function(t,e){t.exports=function(t){return t*t}},function(t,e){t.exports=function(t){return t*(2-t)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},function(t,e){t.exports=function(t){return t*t*t*t}},function(t,e){t.exports=function(t){return 1- --t*t*t*t}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},function(t,e){t.exports=function(t){return t*t*t*t*t}},function(t,e){t.exports=function(t){return--t*t*t*t*t+1}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:1-Math.cos(t*Math.PI/2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:Math.sin(t*Math.PI/2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:.5*(1-Math.cos(Math.PI*t))}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1),t<=0?0:1<=t?1:1/e*(1+(e*t|0))}},function(t,e,i){var s=i(18),n=i(0),o=i(37),r=i(3),i=new n({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.intensity=new r,this.progress=0,this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,n,r){return void 0===t&&(t=100),void 0===e&&(e=.05),void 0===n&&(n=null),void 0===r&&(r=this.camera.scene),!(i=void 0===i?!1: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=r,this.camera.emit(o.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){var i,n,r;this.isRunning&&(this._elapsed+=e,this.progress=s(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed<this.duration?(e=this.intensity,i=this.camera.width,n=this.camera.height,r=this.camera.zoom,this._offsetX=(Math.random()*e.x*i*2-e.x*i)*r,this._offsetY=(Math.random()*e.y*n*2-e.y*n)*r,this.camera.roundPixels&&(this._offsetX=Math.round(this._offsetX),this._offsetY=Math.round(this._offsetY))):this.effectComplete())},effectComplete:function(){this._offsetX=0,this._offsetY=0,this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(o.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}});t.exports=i},function(t,e,i){var a=i(18),n=i(0),h=i(37),l=i(134),i=new n({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,r,s,o){void 0===i&&(i=1e3),void 0===n&&(n=l.Linear),void 0===r&&(r=!1),void 0===s&&(s=null),void 0===o&&(o=this.camera.scene),this.shortestPath=e=void 0===e?!1:e;e=t,t<0?(e=-1*t,this.clockwise=!1):this.clockwise=!0,t=360*Math.PI/180;e-=Math.floor(e/t)*t;var a=this.camera;return!r&&this.isRunning||(this.isRunning=!0,this.duration=i,this.progress=0,this.source=a.rotation,this.destination=e,"string"==typeof n&&l.hasOwnProperty(n)?this.ease=l[n]:"function"==typeof n&&(this.ease=n),this._elapsed=0,this._onUpdate=s,this._onUpdateScope=o,this.shortestPath&&(0,(r=this.destination>this.source?Math.abs(this.destination-this.source):Math.abs(this.destination+t)-this.source)<(n=this.source>this.destination?Math.abs(this.source-this.destination):Math.abs(this.source+t)-this.destination)?this.clockwise=!0:n<r&&(this.clockwise=!1)),this.camera.emit(h.ROTATE_START,this.camera,this,i,e)),a},update:function(t,e){var i,n,r,s,o;this.isRunning&&(this._elapsed+=e,e=a(this._elapsed/this.duration,0,1),this.progress=e,i=this.camera,this._elapsed<this.duration?(n=this.ease(e),this.current=i.rotation,o=360*Math.PI/180,r=this.destination,s=this.current,!1===this.clockwise&&(r=this.current,s=this.destination),r=s<=r?Math.abs(r-s):Math.abs(r+o)-s,o=this.clockwise?i.rotation+r*n:i.rotation-r*n,i.rotation=o,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,i,e,o)):(i.rotation=this.destination,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,i,e,this.destination),this.effectComplete()))},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(h.ROTATE_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null,this.source=null,this.destination=null}});t.exports=i},function(t,e,i){var n=i(18),r=i(0),a=i(134),h=i(37),i=new r({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,r,s){void 0===e&&(e=1e3),void 0===i&&(i=a.Linear),void 0===r&&(r=null),void 0===s&&(s=this.camera.scene);var o=this.camera;return!(n=void 0===n?!1:n)&&this.isRunning||(this.isRunning=!0,this.duration=e,this.progress=0,this.source=o.zoom,this.destination=t,"string"==typeof i&&a.hasOwnProperty(i)?this.ease=a[i]:"function"==typeof i&&(this.ease=i),this._elapsed=0,this._onUpdate=r,this._onUpdateScope=s,this.camera.emit(h.ZOOM_START,this.camera,this,e,t)),o},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(h.ZOOM_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null}});t.exports=i},function(t,e,i){var o=i(326),n=i(0),l=i(2),r=i(24),a=i(57),s=i(104),h=i(20),i=new n({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(h.BOOT,this.boot,this),t.sys.events.on(h.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 o(0,0,t.scale.width,t.scale.height).setScene(this.scene),t.game.scale.on(s.RESIZE,this.onResize,this),this.systems.events.once(h.DESTROY,this.destroy,this)},start:function(){this.main||((t=this.systems).settings.cameras?this.fromJSON(t.settings.cameras):this.add(),this.main=this.cameras[0]);var t=this.systems.events;t.on(h.UPDATE,this.update,this),t.once(h.SHUTDOWN,this.shutdown,this)},add:function(t,e,i,n,r,s){void 0===i&&(i=this.scene.sys.scale.width),void 0===n&&(n=this.scene.sys.scale.height),void 0===r&&(r=!1),void 0===s&&(s="");t=new o(t=void 0===t?0:t,e=void 0===e?0:e,i,n);return t.setName(s),t.setScene(this.scene),t.setRoundPixels(this.roundPixels),t.id=this.getNextID(),this.cameras.push(t),r&&(this.main=t),t},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,r=0;r<t.length;r++){var s=t[r];s&&s.id===e&&(n=!0)}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 r=i[n];t&&!r.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 r=t[n],s=l(r,"x",0),o=l(r,"y",0),a=l(r,"width",e),h=l(r,"height",i),s=this.add(s,o,a,h),o=(s.name=l(r,"name",""),s.zoom=l(r,"zoom",1),s.rotation=l(r,"rotation",0),s.scrollX=l(r,"scrollX",0),s.scrollY=l(r,"scrollY",0),s.roundPixels=l(r,"roundPixels",!1),s.visible=l(r,"visible",!0),l(r,"backgroundColor",!1));o&&s.setBackgroundColor(o);var a=l(r,"bounds",null);a&&(h=l(a,"x",0),o=l(a,"y",0),r=l(a,"width",e),a=l(a,"height",i),s.setBounds(h,o,r,a))}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,r=[],s=0;s<e.length;s++){var o=e[s];o.visible&&o.inputEnabled&&a(o,i,n)&&r.unshift(o)}return r},remove:function(t,e){void 0===e&&(e=!0),Array.isArray(t)||(t=[t]);for(var i=0,n=this.cameras,r=0;r<t.length;r++){var s=n.indexOf(t[r]);-1!==s&&(e?n[s].destroy():n[s].renderList=[],n.splice(s,1),i++)}return!this.main&&n[0]&&(this.main=n[0]),i},render:function(t,e){for(var i=this.scene,n=this.cameras,r=0;r<this.cameras.length;r++){var s,o=n[r];o.visible&&0<o.alpha&&(o.preRender(),s=this.getVisibleChildren(e.getChildren(),o),t.render(i,s,o))}},getVisibleChildren:function(t,e){for(var i=[],n=0;n<t.length;n++){var r=t[n];r.willRender(e)&&i.push(r)}return i},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)},onResize:function(t,e,i,n,r){for(var s=0;s<this.cameras.length;s++){var o=this.cameras[s];0===o._x&&0===o._y&&o._width===n&&o._height===r&&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(h.UPDATE,this.update,this),e.off(h.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.default.destroy(),this.scene.sys.events.off(h.START,this.start,this),this.scene=null,this.systems=null}});r.register("CameraManager",i,"cameras"),t.exports=i},function(t,e){t.exports="enterfullscreen"},function(t,e){t.exports="fullscreenfailed"},function(t,e){t.exports="fullscreenunsupported"},function(t,e){t.exports="leavefullscreen"},function(t,e){t.exports="orientationchange"},function(t,e){t.exports="resize"},function(t,e,i){t.exports={Config:i(346),CreateRenderer:i(366),DebugHeader:i(384),Events:i(22),TimeStep:i(385),VisibilityHandler:i(387)}},function(t,e){var i,n,t=t.exports={};function r(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function o(e){if(i===setTimeout)return setTimeout(e,0);if((i===r||!i)&&setTimeout)return(i=setTimeout)(e,0);try{return i(e,0)}catch(t){try{return i.call(null,e,0)}catch(t){return i.call(this,e,0)}}}try{i="function"==typeof setTimeout?setTimeout:r}catch(t){i=r}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(t){n=s}var a,h=[],l=!1,c=-1;function u(){l&&a&&(l=!1,a.length?h=a.concat(h):c=-1,h.length&&d())}function d(){if(!l){var t=o(u);l=!0;for(var e=h.length;e;){for(a=h,h=[];++c<e;)a&&a[c].run();c=-1,e=h.length}a=null,l=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===s||!n)&&clearTimeout)return(n=clearTimeout)(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function f(){}t.nextTick=function(t){var e=new Array(arguments.length-1);if(1<arguments.length)for(var i=1;i<arguments.length;i++)e[i-1]=arguments[i];h.push(new p(t,e)),1!==h.length||l||o(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},t.title="browser",t.browser=!0,t.env={},t.argv=[],t.version="",t.versions={},t.on=f,t.addListener=f,t.once=f,t.off=f,t.removeListener=f,t.removeAllListeners=f,t.emit=f,t.prependListener=f,t.prependOnceListener=f,t.listeners=function(t){return[]},t.binding=function(t){throw new Error("process.binding is not supported")},t.cwd=function(){return"/"},t.chdir=function(t){throw new Error("process.chdir is not supported")},t.umask=function(){return 0}},function(t,e,i){var i=i(136),n={gamepads:!1,mspointer:!1,touch:!1,wheelEvent:null};t.exports=("function"!=typeof importScripts&&(("ontouchstart"in document.documentElement||navigator.maxTouchPoints&&1<=navigator.maxTouchPoints)&&(n.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(n.mspointer=!0),navigator.getGamepads&&(n.gamepads=!0),"onwheel"in window||i.ie&&"WheelEvent"in window?n.wheelEvent="wheel":"onmousewheel"in window?n.wheelEvent="mousewheel":i.firefox&&"MouseScrollEvent"in window&&(n.wheelEvent="DOMMouseScroll")),n)},function(t,e,i){var r=i(136),s={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){s.audioData=!!window.Audio,s.webAudio=!(!window.AudioContext&&!window.webkitAudioContext);var t,e,i=document.createElement("audio"),n=!!i.canPlayType;try{n&&(i.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,"")&&(s.ogg=!0),(i.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,"")||i.canPlayType("audio/opus;").replace(/^no$/,""))&&(s.opus=!0),i.canPlayType("audio/mpeg;").replace(/^no$/,"")&&(s.mp3=!0),i.canPlayType("audio/wav").replace(/^no$/,"")&&(s.wav=!0),(i.canPlayType("audio/x-m4a;")||i.canPlayType("audio/aac;").replace(/^no$/,""))&&(s.m4a=!0),i.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")&&(s.webm=!0),""!==i.canPlayType('audio/mp4;codecs="ec-3"')&&(r.edge?s.dolby=!0:r.safari&&9<=r.safariVersion&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)&&(t=parseInt(RegExp.$1,10),e=parseInt(RegExp.$2,10),(10===t&&11<=e||10<t)&&(s.dolby=!0))))}catch(t){}}return s}()},function(t,e){var i={h264:!1,hls:!1,mp4:!1,ogg:!1,vp9:!1,webm:!1};t.exports=function(){if("function"!=typeof importScripts){var t=document.createElement("video"),e=!!t.canPlayType;try{e&&(t.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,"")&&(i.ogg=!0),t.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,"")&&(i.h264=!0,i.mp4=!0),t.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")&&(i.webm=!0),t.canPlayType('video/webm; codecs="vp9"').replace(/^no$/,"")&&(i.vp9=!0),t.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(/^no$/,"")&&(i.hls=!0))}catch(t){}}return i}()},function(t,e){var s={available:!1,cancel:"",keyboard:!1,request:""};t.exports=function(){if("function"!=typeof importScripts){for(var t="Fullscreen",e="FullScreen",i=["request"+t,"request"+e,"webkitRequest"+t,"webkitRequest"+e,"msRequest"+t,"msRequest"+e,"mozRequest"+e,"mozRequest"+t],n=0;n<i.length;n++)if(document.documentElement[i[n]]){s.available=!0,s.request=i[n];break}var r=["cancel"+e,"exit"+t,"webkitCancel"+e,"webkitExit"+t,"msCancel"+e,"msExit"+t,"mozCancel"+e,"mozExit"+t];if(s.available)for(n=0;n<r.length;n++)if(document[r[n]]){s.cancel=r[n];break}window.Element&&Element.ALLOW_KEYBOARD_INPUT&&!/ Version\/5\.1(?:\.\d+)? Safari\//.test(navigator.userAgent)&&(s.keyboard=!0),Object.defineProperty(s,"active",{get:function(){return!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)}})}return s}()},function(t,e,i){t.exports={Between:i(349),BetweenPoints:i(350),BetweenPointsY:i(813),BetweenY:i(814),CounterClockwise:i(815),Normalize:i(351),Random:i(816),RandomDegrees:i(817),Reverse:i(818),RotateTo:i(819),ShortestBetween:i(820),Wrap:i(269),WrapDegrees:i(270)}},function(t,e){t.exports=function(t,e){return Math.atan2(e.x-t.x,e.y-t.y)}},function(t,e){t.exports=function(t,e,i,n){return Math.atan2(i-t,n-e)}},function(t,e,i){var n=i(14);t.exports=function(t){return t>Math.PI&&(t-=n.PI2),Math.abs(((t+n.TAU)%n.PI2-n.PI2)%n.PI2)}},function(t,e,i){var n=i(137);t.exports=function(){return n(-Math.PI,Math.PI)}},function(t,e,i){var n=i(137);t.exports=function(){return n(-180,180)}},function(t,e,i){var n=i(351);t.exports=function(t){return n(t+Math.PI)}},function(t,e,i){var n=i(14);t.exports=function(t,e,i){return void 0===i&&(i=.05),t!==e&&(Math.abs(e-t)<=i||Math.abs(e-t)>=n.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(e<t?e+=n.PI2:e-=n.PI2),t<e?t+=i:e<t&&(t-=i))),t}},function(t,e){t.exports=function(t,e){e-=t;return 0==e?0:e-360*Math.floor((180+e)/360)}},function(t,e,i){t.exports={Between:i(50),BetweenPoints:i(352),BetweenPointsSquared:i(822),Chebyshev:i(823),Power:i(824),Snake:i(825),Squared:i(353)}},function(t,e){t.exports=function(t,e){var i=t.x-e.x,t=t.y-e.y;return i*i+t*t}},function(t,e){t.exports=function(t,e,i,n){return Math.max(Math.abs(t-i),Math.abs(e-n))}},function(t,e){t.exports=function(t,e,i,n,r){return void 0===r&&(r=2),Math.sqrt(Math.pow(i-t,r)+Math.pow(n-e,r))}},function(t,e){t.exports=function(t,e,i,n){return Math.abs(t-i)+Math.abs(e-n)}},function(t,e,i){t.exports={Back:i(334),Bounce:i(335),Circular:i(336),Cubic:i(337),Elastic:i(338),Expo:i(339),Linear:i(340),Quadratic:i(341),Quartic:i(342),Quintic:i(343),Sine:i(344),Stepped:i(345)}},function(t,e,i){t.exports={Ceil:i(828),Equal:i(124),Floor:i(829),GreaterThan:i(354),LessThan:i(355)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.ceil(t-e)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.floor(t+e)}},function(t,e,i){t.exports={Bezier:i(831),CatmullRom:i(832),CubicBezier:i(358),Linear:i(833),QuadraticBezier:i(359),SmoothStep:i(360),SmootherStep:i(834)}},function(t,e,i){var s=i(356);t.exports=function(t,e){for(var i=0,n=t.length-1,r=0;r<=n;r++)i+=Math.pow(1-e,n-r)*Math.pow(e,r)*t[r]*s(n,r);return i}},function(t,e,i){var s=i(194);t.exports=function(t,e){var i=t.length-1,n=i*e,r=Math.floor(n);return t[0]===t[i]?(e<0&&(r=Math.floor(n=i*(1+e))),s(n-r,t[(r-1+i)%i],t[r],t[(r+1)%i],t[(r+2)%i])):e<0?t[0]-(s(-n,t[0],t[0],t[1],t[1])-t[0]):1<e?t[i]-(s(n-i,t[i],t[i],t[i-1],t[i-1])-t[i]):s(n-r,t[r?r-1:0],t[r],t[i<r+1?i:r+1],t[i<r+2?i:r+2])}},function(t,e,i){var s=i(135);t.exports=function(t,e){var i=t.length-1,n=i*e,r=Math.floor(n);return e<0?s(t[0],t[1],n):1<e?s(t[i],t[i-1],i-n):s(t[r],t[i<r+1?i:r+1],n-r)}},function(t,e,i){var n=i(183);t.exports=function(t,e,i){return e+(i-e)*n(t,0,1)}},function(t,e,i){t.exports={GetNext:i(361),IsSize:i(138),IsValue:i(836)}},function(t,e){t.exports=function(t){return 0<t&&0==(t&t-1)}},function(t,e,i){t.exports={Ceil:i(139),Floor:i(76),To:i(838)}},function(t,e){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)}},function(t,e,i){i=new(i(0))({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+2.3283064365386963e-10*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=(e=((e=.02519603282416938*(i+=t.charCodeAt(n)))-(i=e>>>0))*i)>>>0,i+=4294967296*(e-=i);return 2.3283064365386963e-10*((this.n=i)>>>0)},init:function(t){"string"==typeof t?this.state(t):this.sow(t)},sow:function(t){if(this.n=4022871197,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 4294967296*this.rnd()},frac:function(){return this.rnd()+11102230246251565e-32*(2097152*this.rnd()|0)},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(){for(var t="",e="",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-1)+.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;0<e;e--){var i=Math.floor(this.frac()*(e+1)),n=t[i];t[i]=t[e],t[e]=n}return t}});t.exports=i},function(t,e){t.exports=function(t){for(var e=0,i=0;i<t.length;i++)e+=+t[i];return e/t.length}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);i=Math.pow(i,-e);return Math.ceil(t*i)/i}},function(t,e){t.exports=function(t,e){return Math.abs(t-e)}},function(t,e,i){var m=i(18),n=i(0),r=i(69),s=i(1),o=new r,i=new n({initialize:function t(e,i,n,r){void 0===i&&(i=0),void 0===n&&(n=0),void 0===r&&(r=t.DefaultOrder),this._x=e=void 0===e?0:e,this._y=i,this._z=n,this._order=r,this.onChangeCallback=s},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)}},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),o.fromQuat(t),this.setFromRotationMatrix(o,e,i)},setFromRotationMatrix:function(t,e,i){void 0===e&&(e=this._order),void 0===i&&(i=!1);var t=t.val,n=t[0],r=t[4],s=t[8],o=t[1],a=t[5],h=t[9],l=t[2],c=t[6],u=t[10],d=0,p=0,f=0,g=.99999;switch(e){case"XYZ":p=Math.asin(m(s,-1,1)),Math.abs(s)<g?(d=Math.atan2(-h,u),f=Math.atan2(-r,n)):d=Math.atan2(c,a);break;case"YXZ":d=Math.asin(-m(h,-1,1)),Math.abs(h)<g?(p=Math.atan2(s,u),f=Math.atan2(o,a)):p=Math.atan2(-l,n);break;case"ZXY":d=Math.asin(m(c,-1,1)),f=Math.abs(c)<g?(p=Math.atan2(-l,u),Math.atan2(-r,a)):Math.atan2(o,n);break;case"ZYX":p=Math.asin(-m(l,-1,1)),f=Math.abs(l)<g?(d=Math.atan2(c,u),Math.atan2(o,n)):Math.atan2(-r,a);break;case"YZX":f=Math.asin(m(o,-1,1)),p=Math.abs(o)<g?(d=Math.atan2(-h,a),Math.atan2(-l,n)):Math.atan2(s,u);break;case"XZY":f=Math.asin(-m(r,-1,1)),Math.abs(r)<g?(d=Math.atan2(c,a),p=Math.atan2(s,n)):d=Math.atan2(-h,u)}return this._x=d,this._y=p,this._z=f,this._order=e,i&&this.onChangeCallback(this),this}});i.RotationOrders=["XYZ","YXZ","ZXY","ZYX","YZX","XZY"],i.DefaultOrder="XYZ",t.exports=i},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);i=Math.pow(i,-e);return Math.floor(t*i)/i}},function(t,e){t.exports=function(t,e){return t/e/1e3}},function(t,e){t.exports=function(t){return t==parseFloat(t)?!(t%2):void 0}},function(t,e){t.exports=function(t){return t===parseFloat(t)?!(t%2):void 0}},function(t,e){t.exports=function(t,e,i){return Math.min(t+e,i)}},function(t,e){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]}},function(t,e){t.exports=function(t,e,i){return Math.max(t-e,i)}},function(t,e){t.exports=function(t,e,i,n){e=(t-e)/((i=void 0===i?e+1:i)-e);return 1<e?void 0!==n?(e=(n-t)/(n-i))<0&&(e=0):e=1:e<0&&(e=0),e}},function(t,e){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}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI,n=2*Math.random()-1,r=Math.sqrt(1-n*n)*e;return t.x=Math.cos(i)*r,t.y=Math.sin(i)*r,t.z=n*e,t}},function(t,e){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}},function(t,e){t.exports=function(t,e,i,n,r){return t.x=e+r*Math.cos(n),t.y=i+r*Math.sin(n),t}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);i=Math.pow(i,-e);return Math.round(t*i)/i}},function(t,e){t.exports=function(t,e,i,n){void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=1),n*=Math.PI/t;for(var r=[],s=[],o=0;o<t;o++)e+=(i-=e*n)*n,r[o]=i,s[o]=e;return{sin:s,cos:r,length:t}}},function(t,e,i){var o=i(3);t.exports=function(t,e,i,n){void 0===n&&(n=new o);var r=0,s=0;return 0<t&&t<=e*i&&(r=e-1<t?t-(s=Math.floor(t/e))*e:t),n.set(r,s)}},function(t,e){t.exports=function(t,e,i){return Math.abs(t-e)<=i}},function(t,e,i){var n=i(39),r=i(69),i=i(365),s=new r,o=new i,a=new n;t.exports=function(t,e,i){return o.setAxisAngle(e,i),s.fromRotationTranslation(o,a.set(0,0,0)),t.transformMat4(s)}},function(t,e){t.exports="addtexture"},function(t,e){t.exports="onerror"},function(t,e){t.exports="onload"},function(t,e){t.exports="ready"},function(t,e){t.exports="removetexture"},function(t,e){t.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_FS","","precision mediump float;","","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uMaskSampler;","uniform bool uInvertMaskAlpha;","","void main ()","{"," vec2 uv = gl_FragCoord.xy / uResolution;"," vec4 mainColor = texture2D(uMainSampler, uv);"," vec4 maskColor = texture2D(uMaskSampler, uv);"," float alpha = mainColor.a;",""," if (!uInvertMaskAlpha)"," {"," alpha *= (maskColor.a);"," }"," else"," {"," alpha *= (1.0 - maskColor.a);"," }",""," gl_FragColor = vec4(mainColor.rgb * alpha, alpha);","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_VS","","precision mediump float;","","attribute vec2 inPosition;","","void main ()","{"," gl_Position = vec4(inPosition, 0.0, 1.0);","}",""].join("\n")},function(t,e){t.exports="pipelineafterflush"},function(t,e){t.exports="pipelinebeforeflush"},function(t,e){t.exports="pipelinebind"},function(t,e){t.exports="pipelineboot"},function(t,e){t.exports="pipelinedestroy"},function(t,e){t.exports="pipelinerebind"},function(t,e){t.exports="pipelineresize"},function(t,e){t.exports=["#define SHADER_NAME PHASER_GRAPHICS_FS","","precision mediump float;","","varying vec4 outColor;","","void main ()","{"," gl_FragColor = vec4(outColor.bgr * outColor.a, outColor.a);","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_GRAPHICS_VS","","precision mediump float;","","uniform mat4 uProjectionMatrix;","","attribute vec2 inPosition;","attribute vec4 inColor;","","varying vec4 outColor;","","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);",""," outColor = inColor;","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_LIGHT_FS","","precision mediump float;","","struct Light","{"," vec2 position;"," vec3 color;"," float intensity;"," float radius;","};","","const int kMaxLights = %LIGHT_COUNT%;","","uniform vec4 uCamera; /* x, y, rotation, zoom */","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uNormSampler;","uniform vec3 uAmbientLightColor;","uniform Light uLights[kMaxLights];","uniform mat3 uInverseRotationMatrix;","","varying vec2 outTexCoord;","varying vec4 outTint;","","void main()","{"," vec3 finalColor = vec3(0.0, 0.0, 0.0);"," vec4 color = texture2D(uMainSampler, outTexCoord) * vec4(outTint.bgr * outTint.a, outTint.a);"," vec3 normalMap = texture2D(uNormSampler, outTexCoord).rgb;"," vec3 normal = normalize(uInverseRotationMatrix * vec3(normalMap * 2.0 - 1.0));"," vec2 res = vec2(min(uResolution.x, uResolution.y)) * uCamera.w;",""," for (int index = 0; index < kMaxLights; ++index)"," {"," Light light = uLights[index];"," vec3 lightDir = vec3((light.position.xy / res) - (gl_FragCoord.xy / res), 0.1);"," vec3 lightNormal = normalize(lightDir);"," float distToSurf = length(lightDir) * uCamera.w;"," float diffuseFactor = max(dot(normal, lightNormal), 0.0);"," float radius = (light.radius / res.x * uCamera.w) * uCamera.w;"," float attenuation = clamp(1.0 - distToSurf * distToSurf / (radius * radius), 0.0, 1.0);"," vec3 diffuse = light.color * diffuseFactor;"," finalColor += (attenuation * diffuse) * light.intensity;"," }",""," vec4 colorOutput = vec4(uAmbientLightColor + finalColor, 1.0);",""," gl_FragColor = color * vec4(colorOutput.rgb * colorOutput.a, colorOutput.a);","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_MULTI_FS","","precision mediump float;","","uniform sampler2D uMainSampler[%count%];","","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{"," vec4 texture;",""," %forloop%",""," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);",""," // Multiply texture tint"," vec4 color = texture * texel;",""," if (outTintEffect == 1.0)"," {"," // Solid color + texture alpha"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," // Solid color, no texture"," color = texel;"," }",""," gl_FragColor = color;","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_MULTI_VS","","precision mediump float;","","uniform mat4 uProjectionMatrix;","","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTexId;","attribute float inTintEffect;","attribute vec4 inTint;","","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);",""," outTexCoord = inTexCoord;"," outTexId = inTexId;"," outTint = inTint;"," outTintEffect = inTintEffect;","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_POINTLIGHT_FS","","precision mediump float;","","uniform vec2 uResolution;","uniform float uCameraZoom;","","varying vec4 lightPosition;","varying vec4 lightColor;","varying float lightRadius;","varying float lightAttenuation;","","void main ()","{"," vec2 center = (lightPosition.xy + 1.0) * (uResolution.xy * 0.5);",""," float distToSurf = length(center - gl_FragCoord.xy);",""," float radius = 1.0 - distToSurf / (lightRadius * uCameraZoom);",""," float intensity = smoothstep(0.0, 1.0, radius * lightAttenuation);",""," vec4 color = vec4(intensity, intensity, intensity, 0.0) * lightColor;",""," gl_FragColor = vec4(color.rgb * lightColor.a, color.a);","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_POINTLIGHT_VS","","precision mediump float;","","uniform mat4 uProjectionMatrix;","","attribute vec2 inPosition;","attribute vec2 inLightPosition;","attribute vec4 inLightColor;","attribute float inLightRadius;","attribute float inLightAttenuation;","","varying vec4 lightPosition;","varying vec4 lightColor;","varying float lightRadius;","varying float lightAttenuation;","","void main ()","{"," lightColor = inLightColor;"," lightRadius = inLightRadius;"," lightAttenuation = inLightAttenuation;"," lightPosition = uProjectionMatrix * vec4(inLightPosition, 1.0, 1.0);",""," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_SINGLE_FS","","precision mediump float;","","uniform sampler2D uMainSampler;","","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);",""," // Multiply texture tint"," vec4 color = texture * texel;",""," if (outTintEffect == 1.0)"," {"," // Solid color + texture alpha"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," // Solid color, no texture"," color = texel;"," }",""," gl_FragColor = color;","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_SINGLE_VS","","precision mediump float;","","uniform mat4 uProjectionMatrix;","","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTexId;","attribute float inTintEffect;","attribute vec4 inTint;","","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);",""," outTexCoord = inTexCoord;"," outTint = inTint;"," outTintEffect = inTintEffect;","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_ADD_BLEND_FS","","precision mediump float;","","uniform sampler2D uMainSampler1;","uniform sampler2D uMainSampler2;","uniform float uStrength;","","varying vec2 outTexCoord;","","void main ()","{"," vec4 frame1 = texture2D(uMainSampler1, outTexCoord);"," vec4 frame2 = texture2D(uMainSampler2, outTexCoord);",""," gl_FragColor = frame1 + frame2 * uStrength;","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_COLORMATRIX_FS","","precision mediump float;","","uniform sampler2D uMainSampler;","uniform float uColorMatrix[20];","uniform float uAlpha;","","varying vec2 outTexCoord;","","void main ()","{"," vec4 c = texture2D(uMainSampler, outTexCoord);",""," if (uAlpha == 0.0)"," {"," gl_FragColor = c;",""," return;"," }",""," if (c.a > 0.0)"," {"," c.rgb /= c.a;"," }",""," vec4 result;",""," result.r = (uColorMatrix[0] * c.r) + (uColorMatrix[1] * c.g) + (uColorMatrix[2] * c.b) + (uColorMatrix[3] * c.a) + uColorMatrix[4];"," result.g = (uColorMatrix[5] * c.r) + (uColorMatrix[6] * c.g) + (uColorMatrix[7] * c.b) + (uColorMatrix[8] * c.a) + uColorMatrix[9];"," result.b = (uColorMatrix[10] * c.r) + (uColorMatrix[11] * c.g) + (uColorMatrix[12] * c.b) + (uColorMatrix[13] * c.a) + uColorMatrix[14];"," result.a = (uColorMatrix[15] * c.r) + (uColorMatrix[16] * c.g) + (uColorMatrix[17] * c.b) + (uColorMatrix[18] * c.a) + uColorMatrix[19];",""," vec3 rgb = mix(c.rgb, result.rgb, uAlpha);",""," rgb *= result.a;",""," gl_FragColor = vec4(rgb, result.a);","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_COPY_FS","","precision mediump float;","","uniform sampler2D uMainSampler;","uniform float uBrightness;","","varying vec2 outTexCoord;","","void main ()","{"," gl_FragColor = texture2D(uMainSampler, outTexCoord) * uBrightness;","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_LINEAR_BLEND_FS","","precision mediump float;","","uniform sampler2D uMainSampler1;","uniform sampler2D uMainSampler2;","uniform float uStrength;","","varying vec2 outTexCoord;","","void main ()","{"," vec4 frame1 = texture2D(uMainSampler1, outTexCoord);"," vec4 frame2 = texture2D(uMainSampler2, outTexCoord);",""," gl_FragColor = mix(frame1, frame2 * uStrength, 0.5);","}",""].join("\n")},function(t,e,i){t.exports={GenerateTexture:i(388),Palettes:i(889)}},function(t,e,i){t.exports={ARNE16:i(389),C64:i(890),CGA:i(891),JMP:i(892),MSX:i(893)}},function(t,e){t.exports={0:"#000",1:"#fff",2:"#8b4131",3:"#7bbdc5",4:"#8b41ac",5:"#6aac41",6:"#3931a4",7:"#d5de73",8:"#945a20",9:"#5a4100",A:"#bd736a",B:"#525252",C:"#838383",D:"#acee8b",E:"#7b73de",F:"#acacac"}},function(t,e){t.exports={0:"#000",1:"#2234d1",2:"#0c7e45",3:"#44aacc",4:"#8a3622",5:"#5c2e78",6:"#aa5c3d",7:"#b5b5b5",8:"#5e606e",9:"#4c81fb",A:"#6cd947",B:"#7be2f9",C:"#eb8a60",D:"#e23d69",E:"#ffd93f",F:"#fff"}},function(t,e){t.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#f5f4eb"}},function(t,e){t.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#fff"}},function(t,e,i){t.exports={Path:i(895),MoveTo:i(393),CubicBezier:i(390),Curve:i(94),Ellipse:i(391),Line:i(392),QuadraticBezier:i(394),Spline:i(395)}},function(t,e,i){var n=i(0),l=i(390),o=i(391),r=i(5),s=i(392),a=i(393),h=i(394),c=i(10),u=i(395),d=i(3),p=i(14),f=new n({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.name="",this.curves=[],this.cacheLengths=[],this.autoClose=!1,this.startPoint=new d,this._tmpVec2A=new d,this._tmpVec2B=new d,"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 this.ellipseTo(t,t,0,360,e=void 0===e?!1: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 s(e,t)),this},cubicBezierTo:function(t,e,i,n,r,s){var o,a,h=this.getEndPoint(),i=t instanceof d?(o=t,a=e,i):(o=new d(i,n),a=new d(r,s),new d(t,e));return this.add(new l(h,o,a,i))},quadraticBezierTo:function(t,e,i,n){var r,s=this.getEndPoint(),i=t instanceof d?(r=t,e):(r=new d(i,n),new d(t,e));return this.add(new h(s,r,i))},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,r,s){t=new o(0,0,t,e,i,n,r,s),e=this.getEndPoint(this._tmpVec2A),i=t.getStartPoint(this._tmpVec2B);return e.subtract(i),t.x=e.x,t.y=e.y,this.add(t)},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(s.fromJSON(i));break;case"EllipseCurve":this.add(o.fromJSON(i));break;case"SplineCurve":this.add(u.fromJSON(i));break;case"CubicBezierCurve":this.add(l.fromJSON(i));break;case"QuadraticBezierCurve":this.add(h.fromJSON(i))}}return this},getBounds:function(t,e){void 0===e&&(e=16),(t=void 0===t?new c:t).x=Number.MAX_VALUE,t.y=Number.MAX_VALUE;for(var i=new c,n=p.MIN_SAFE_INTEGER,r=p.MIN_SAFE_INTEGER,s=0;s<this.curves.length;s++){var o=this.curves[s];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),r=Math.max(r,i.bottom))}return t.right=n,t.bottom=r,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++)e+=this.curves[i].getLength(),t.push(e);return this.cacheLengths=t},getEndPoint:function(t){return void 0===t&&(t=new d),0<this.curves.length?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 d);for(var i,n,r,s=t*this.getLength(),o=this.getCurveLengths(),a=0;a<o.length;){if(o[a]>=s)return i=o[a]-s,r=(n=this.curves[a]).getLength(),n.getPointAt(0===r?0:1-i/r,e);a++}return null},getPoints:function(t){void 0===t&&(t=12);for(var e,i=[],n=0;n<this.curves.length;n++){var r=this.curves[n];if(r.active)for(var s=r.getResolution(t),o=r.getPoints(s),a=0;a<o.length;a++){var h=o[a];e&&e.equals(h)||(i.push(h),e=h)}}return this.autoClose&&1<i.length&&!i[i.length-1].equals(i[0])&&i.push(i[0]),i},getRandomPoint:function(t){return void 0===t&&(t=new d),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(t=void 0===t?new d:t).copy(this.startPoint)},getTangent:function(t,e){void 0===e&&(e=new d);for(var i,n,r,s=t*this.getLength(),o=this.getCurveLengths(),a=0;a<o.length;){if(o[a]>=s)return i=o[a]-s,r=(n=this.curves[a]).getLength(),n.getTangentAt(0===r?0:1-i/r,e);a++}return null},lineTo:function(t,e){t instanceof d?this._tmpVec2B.copy(t):this._tmpVec2B.set(t,e);t=this.getEndPoint(this._tmpVec2A);return this.add(new s([t.x,t.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(t){return t.unshift(this.getEndPoint()),this.add(new u(t))},moveTo:function(t,e){return t instanceof d?this.add(new a(t.x,t.y)):this.add(new a(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}});r.register("path",function(t,e){return new f(t,e)}),t.exports=f},function(t,e,i){t.exports={DataManager:i(101),DataManagerPlugin:i(897),Events:i(315)}},function(t,e,i){var n=i(0),r=i(101),s=i(24),o=i(20),i=new n({Extends:r,initialize:function(t){r.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(){r.prototype.destroy.call(this),this.events.off(o.START,this.start,this),this.scene=null,this.systems=null}});s.register("DataManagerPlugin",i,"data"),t.exports=i},function(t,e,i){t.exports={Align:i(899),BaseShader:i(396),Bounds:i(902),Canvas:i(906),Color:i(397),ColorMatrix:i(198),Masks:i(916),RGB:i(200)}},function(t,e,i){var n=i(123),i=i(17)(!1,{In:i(900),To:i(901)},n);t.exports=i},function(t,e,i){t.exports={BottomCenter:i(290),BottomLeft:i(291),BottomRight:i(292),Center:i(293),LeftCenter:i(295),QuickSet:i(289),RightCenter:i(296),TopCenter:i(297),TopLeft:i(298),TopRight:i(299)}},function(t,e,i){t.exports={BottomCenter:i(277),BottomLeft:i(278),BottomRight:i(279),LeftBottom:i(280),LeftCenter:i(281),LeftTop:i(282),QuickSet:i(276),RightBottom:i(283),RightCenter:i(284),RightTop:i(285),TopCenter:i(286),TopLeft:i(287),TopRight:i(288)}},function(t,e,i){t.exports={CenterOn:i(294),GetBottom:i(42),GetBounds:i(903),GetCenterX:i(87),GetCenterY:i(89),GetLeft:i(43),GetOffsetX:i(904),GetOffsetY:i(905),GetRight:i(44),GetTop:i(45),SetBottom:i(55),SetCenterX:i(88),SetCenterY:i(90),SetLeft:i(53),SetRight:i(54),SetTop:i(52)}},function(t,e,i){var r=i(42),s=i(43),o=i(44),a=i(45);t.exports=function(t,e){void 0===e&&(e={});var i=s(t),n=a(t);return e.x=i,e.y=n,e.width=o(t)-i,e.height=r(t)-n,e}},function(t,e){t.exports=function(t){return t.width*t.originX}},function(t,e){t.exports=function(t){return t.height*t.originY}},function(t,e,i){t.exports={CanvasInterpolation:i(367),CanvasPool:i(31),Smoothing:i(192),TouchAction:i(907),UserSelect:i(908)}},function(t,e){t.exports=function(t,e){return t.style.msTouchAction=e=void 0===e?"none":e,t.style["ms-touch-action"]=e,t.style["touch-action"]=e,t}},function(t,e){t.exports=function(e,i){return void 0===i&&(i="none"),["-webkit-","-khtml-","-moz-","-ms-",""].forEach(function(t){e.style[t+"user-select"]=i}),e.style["-webkit-touch-callout"]=i,e.style["-webkit-tap-highlight-color"]="rgba(0, 0, 0, 0)",e}},function(t,e,i){var l=i(103);t.exports=function(t){void 0===t&&(t=1024);for(var e=[],i=255,n=0,r=0,s=0;s<=255;s++)e.push({r:i,g:s,b:r,color:l(i,s,r)});for(s=n=255;0<=s;s--)e.push({r:s,g:n,b:r,color:l(s,n,r)});for(s=i=0;s<=255;s++,n--)e.push({r:i,g:n,b:s,color:l(i,n,s)});for(r=255,s=n=0;s<=255;s++,r--,i++)e.push({r:i,g:n,b:r,color:l(i,n,r)});if(1024===t)return e;for(var o=[],a=0,h=1024/t,s=0;s<t;s++)o.push(e[Math.floor(a)]),a+=h;return o}},function(t,e){t.exports=function(t){var e={r:t>>16&255,g:t>>8&255,b:255&t,a:255};return 16777215<t&&(e.a=t>>>24),e}},function(t,e,i){var o=i(38),a=i(399);t.exports=function(t,e,i){var n=i,r=i,s=i;return 0!==e&&(n=a(e=2*i-(i=i<.5?i*(1+e):i+e-i*e),i,t+1/3),r=a(e,i,t),s=a(e,i,t-1/3)),(new o).setGLTo(n,r,s,1)}},function(t,e,i){var r=i(188);t.exports=function(t,e){void 0===t&&(t=1),void 0===e&&(e=1);for(var i=[],n=0;n<=359;n++)i.push(r(n/359,t,e));return i}},function(t,e,i){function o(t,e,i,n,r,s,o,a){a=(a=void 0===a?0:a)/(o=void 0===o?100:o);return{r:h(t,n,a),g:h(e,r,a),b:h(i,s,a)}}var h=i(135);t.exports={RGBWithRGB:o,ColorWithRGB:function(t,e,i,n,r,s){return o(t.r,t.g,t.b,e,i,n,r=void 0===r?100:r,s=void 0===s?0:s)},ColorWithColor:function(t,e,i,n){return o(t.r,t.g,t.b,e.r,e.g,e.b,i=void 0===i?100:i,n=void 0===n?0:n)}}},function(t,e,i){var n=i(195),r=i(38);t.exports=function(t,e){return new r(n(t=void 0===t?0:t,e=void 0===e?255:e),n(t,e),n(t,e))}},function(t,e,i){var s=i(398);t.exports=function(t,e,i,n,r){return void 0===n&&(n=255),"#"===(r=void 0===r?"#":r)?"#"+((1<<24)+(t<<16)+(e<<8)+i).toString(16).slice(1,7):"0x"+s(n)+s(t)+s(e)+s(i)}},function(t,e,i){t.exports={BitmapMask:i(310),GeometryMask:i(311)}},function(t,e,i){i={AddToDOM:i(142),DOMContentLoaded:i(400),GetInnerHeight:i(401),GetScreenOrientation:i(402),GetTarget:i(407),ParseXML:i(408),RemoveFromDOM:i(202),RequestAnimationFrame:i(386)};t.exports=i},function(t,e,i){t.exports={EventEmitter:i(919)}},function(t,e,i){var n=i(0),r=i(9),i=i(24),n=new n({Extends:r,initialize:function(){r.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});i.register("EventEmitter",n,"events"),t.exports=n},function(t,e,i){var n=i(142),r=i(321),s=i(325),o=i(31),a=i(0),h=i(346),l=i(921),c=i(366),u=i(101),d=i(384),p=i(347),f=i(400),g=i(9),m=i(22),y=i(409),v=i(24),x=i(414),b=i(415),w=i(417),T=i(106),S=i(422),P=i(385),_=i(387),E=i(426),i=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 r(this),this.textures=new S(this),this.cache=new s(this),this.registry=new u(this),this.input=new y(this,this.config),this.scene=new w(this,this.config.sceneConfig),this.device=p,this.scale=new b(this,this.config),this.sound=null,this.sound=E.create(this),this.loop=new P(this,this.config.fps),this.plugins=new x(this,this.config),this.pendingDestroy=!1,this.removeCanvas=!1,this.noReturn=!1,this.hasFocus=!1,f(this.boot.bind(this))},boot:function(){v.hasCore("EventEmitter")&&(this.isBooted=!0,this.config.preBoot(this),this.scale.preBoot(),c(this),l(this),d(this),n(this.canvas,this.config.parent),this.textures.once(T.READY,this.texturesReady,this),this.events.emit(m.BOOT))},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)),_(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();var i=this.events,n=(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.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();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),i.emit(m.PRE_RENDER),i.emit(m.POST_RENDER)},onHidden:function(){this.loop.pause(),this.events.emit(m.PAUSE)},onVisible:function(){this.loop.resume(),this.events.emit(m.RESUME)},onBlur:function(){this.hasFocus=!1,this.loop.blur()},onFocus:function(){this.hasFocus=!0,this.loop.focus()},getFrame:function(){return this.loop.frame},getTime:function(){return this.loop.now},destroy:function(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.removeChild(this.domContainer),this.loop.destroy(),this.pendingDestroy=!1}});t.exports=i},function(t,e,i){var n=i(142);t.exports=function(t){var e,i=t.config;i.parent&&i.domCreateContainer&&((e=document.createElement("div")).style.cssText=["display: block;","width: "+t.scale.width+"px;","height: "+t.scale.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: "+i.domPointerEvents+";","transform: scale(1);","transform-origin: left top;"].join(" "),t.domContainer=e,n(e,i.parent))}},function(t,e){t.exports="boot"},function(t,e){t.exports="destroy"},function(t,e){t.exports="dragend"},function(t,e){t.exports="dragenter"},function(t,e){t.exports="drag"},function(t,e){t.exports="dragleave"},function(t,e){t.exports="dragover"},function(t,e){t.exports="dragstart"},function(t,e){t.exports="drop"},function(t,e){t.exports="gameout"},function(t,e){t.exports="gameover"},function(t,e){t.exports="gameobjectdown"},function(t,e){t.exports="dragend"},function(t,e){t.exports="dragenter"},function(t,e){t.exports="drag"},function(t,e){t.exports="dragleave"},function(t,e){t.exports="dragover"},function(t,e){t.exports="dragstart"},function(t,e){t.exports="drop"},function(t,e){t.exports="gameobjectmove"},function(t,e){t.exports="gameobjectout"},function(t,e){t.exports="gameobjectover"},function(t,e){t.exports="pointerdown"},function(t,e){t.exports="pointermove"},function(t,e){t.exports="pointerout"},function(t,e){t.exports="pointerover"},function(t,e){t.exports="pointerup"},function(t,e){t.exports="wheel"},function(t,e){t.exports="gameobjectup"},function(t,e){t.exports="gameobjectwheel"},function(t,e){t.exports="boot"},function(t,e){t.exports="process"},function(t,e){t.exports="update"},function(t,e){t.exports="pointerdown"},function(t,e){t.exports="pointerdownoutside"},function(t,e){t.exports="pointermove"},function(t,e){t.exports="pointerout"},function(t,e){t.exports="pointerover"},function(t,e){t.exports="pointerup"},function(t,e){t.exports="pointerupoutside"},function(t,e){t.exports="wheel"},function(t,e){t.exports="pointerlockchange"},function(t,e){t.exports="preupdate"},function(t,e){t.exports="shutdown"},function(t,e){t.exports="start"},function(t,e){t.exports="update"},function(t,e){t.exports="addfile"},function(t,e){t.exports="complete"},function(t,e){t.exports="filecomplete"},function(t,e){t.exports="filecomplete-"},function(t,e){t.exports="loaderror"},function(t,e){t.exports="load"},function(t,e){t.exports="fileprogress"},function(t,e){t.exports="postprocess"},function(t,e){t.exports="progress"},function(t,e){t.exports="start"},function(t,e,i){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",impactPhysics:"impact",matterPhysics:"matter"}},function(t,e){t.exports=function(t,e,i){if(i.getElementsByTagName("TextureAtlas")){var n=t.source[e];t.add("__BASE",e,0,0,n.width,n.height);for(var r=i.getElementsByTagName("SubTexture"),s=0;s<r.length;s++){var o,a=r[s].attributes,h=a.name.value,l=parseInt(a.x.value,10),c=parseInt(a.y.value,10),u=parseInt(a.width.value,10),d=parseInt(a.height.value,10),h=t.add(h,e,l,c,u,d);a.frameX&&(l=Math.abs(parseInt(a.frameX.value,10)),c=Math.abs(parseInt(a.frameY.value,10)),o=parseInt(a.frameWidth.value,10),a=parseInt(a.frameHeight.value,10),h.setTrim(u,d,l,c,o,a))}return t}}},function(t,e){t.exports=function(t,e){var i=t.source[e];return t.add("__BASE",e,0,0,i.width,i.height),t}},function(t,e){t.exports=function(t,e){var i=t.source[e];return t.add("__BASE",e,0,0,i.width,i.height),t}},function(t,e,i){var c=i(77);t.exports=function(t,e,i){if(i.frames||i.textures){var n=t.source[e];t.add("__BASE",e,0,0,n.width,n.height);for(var r,s=(Array.isArray(i.textures)?i.textures[e]:i).frames,o=0;o<s.length;o++){var a=s[o],h=t.add(a.filename,e,a.frame.x,a.frame.y,a.frame.w,a.frame.h),l=(a.trimmed&&h.setTrim(a.sourceSize.w,a.sourceSize.h,a.spriteSourceSize.x,a.spriteSourceSize.y,a.spriteSourceSize.w,a.spriteSourceSize.h),a.rotated&&(h.rotated=!0,h.updateUVsInverted()),a.anchor||a.pivot);l&&(h.customPivot=!0,h.pivotX=l.x,h.pivotY=l.y),h.customData=c(a)}for(r in i)"frames"!==r&&(Array.isArray(i[r])?t.customData[r]=i[r].slice(0):t.customData[r]=i[r]);return t}}},function(t,e,i){var c=i(77);t.exports=function(t,e,i){if(i.frames){var n=t.source[e];t.add("__BASE",e,0,0,n.width,n.height);var r,s,o,a,h,l=i.frames;for(a in l)l.hasOwnProperty(a)&&(r=l[a],s=t.add(a,e,r.frame.x,r.frame.y,r.frame.w,r.frame.h),r.trimmed&&s.setTrim(r.sourceSize.w,r.sourceSize.h,r.spriteSourceSize.x,r.spriteSourceSize.y,r.spriteSourceSize.w,r.spriteSourceSize.h),r.rotated&&(s.rotated=!0,s.updateUVsInverted()),(o=r.anchor||r.pivot)&&(s.customPivot=!0,s.pivotX=o.x,s.pivotY=o.y),s.customData=c(r));for(h in i)"frames"!==h&&(Array.isArray(i[h])?t.customData[h]=i[h].slice(0):t.customData[h]=i[h]);return t}}},function(t,e,i){var w=i(2);t.exports=function(t,e,i,n,r,s,o){var a=w(o,"frameWidth",null),h=w(o,"frameHeight",a);if(null===a)throw new Error("TextureManager.SpriteSheet: Invalid frameWidth given.");var l=t.source[e],l=(t.add("__BASE",e,0,0,l.width,l.height),w(o,"startFrame",0)),c=w(o,"endFrame",-1),u=w(o,"margin",0),d=w(o,"spacing",0),p=Math.floor((r-u+d)/(a+d))*Math.floor((s-u+d)/(h+d));(l=p<l||l<-p?0:l)<0&&(l=p+l),-1!==c&&(p=l+(c+1));for(var f=u,g=u,m=0,y=0,v=0;v<p;v++){var y=m=0,x=f+a,b=g+h;t.add(v,e,i+f,n+g,a-(m=r<x?x-r:m),h-(y=s<b?b-s:y)),r<(f+=a+d)+a&&(f=u,g+=h+d)}return t}},function(t,e,i){var N=i(2);t.exports=function(t,e,i){var n=N(i,"frameWidth",null),r=N(i,"frameHeight",n);if(!n)throw new Error("TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.");var s=t.source[0],s=(t.add("__BASE",0,0,0,s.width,s.height),N(i,"startFrame",0)),o=N(i,"endFrame",-1),a=N(i,"margin",0),h=N(i,"spacing",0),l=e.cutX,c=e.cutY,i=e.cutWidth,B=e.cutHeight,u=e.realWidth,d=e.realHeight,p=Math.floor((u-a+h)/(n+h)),f=Math.floor((d-a+h)/(r+h)),g=p*f,m=e.x,y=n-m,v=n-(u-i-m),x=e.y,b=r-x,w=r-(d-B-x);(s=g<s||s<-g?0:s)<0&&(s=g+s),-1!==o&&(g=s+(o+1));for(var T=a,S=a,P=0,F=e.sourceIndex,_=0;_<f;_++){for(var E=0===_,A=_===f-1,M=0;M<p;M++){var k,C,O,R,L=0===M,D=M===p-1,I=t.add(P,F,l+T,c+S,n,r);(L||E||D||A)&&(k=L?m:0,C=E?x:0,R=O=0,L&&(O+=n-y),D&&(O+=n-v),E&&(R+=r-b),A&&(R+=r-w),R=r-R,I.cutWidth=O=n-O,I.cutHeight=R,I.setTrim(n,r,k,C,O,R)),T=T+h+(L?y:D?v:n),P++}T=a,S=S+h+(E?b:A?w:r)}return t}},function(t,e){function f(t,e,i,n){var r=g-n.y-n.height;t.add(i,e,n.x,r,n.width,n.height)}var g;t.exports=function(t,e,i){var n=t.source[e];t.add("__BASE",e,0,0,n.width,n.height),g=n.height;for(var r=i.split("\n"),s=/^[ ]*(- )*(\w+)+[: ]+(.*)/,o="",a="",h={x:0,y:0,width:0,height:0},l=0;l<r.length;l++){var c=r[l].match(s);if(c){var u="- "===c[1],d=c[2],p=c[3];if(u&&(a!==o&&(f(t,e,a,h),o=a),h={x:0,y:0,width:0,height:0}),"name"!==d)switch(d){case"x":case"y":case"width":case"height":h[d]=parseInt(p,10)}else a=p}}return a!==o&&f(t,e,a,h),t}},function(t,e){t.exports="complete"},function(t,e){t.exports="decoded"},function(t,e){t.exports="decodedall"},function(t,e){t.exports="destroy"},function(t,e){t.exports="detune"},function(t,e){t.exports="detune"},function(t,e){t.exports="mute"},function(t,e){t.exports="rate"},function(t,e){t.exports="volume"},function(t,e){t.exports="loop"},function(t,e){t.exports="looped"},function(t,e){t.exports="mute"},function(t,e){t.exports="pan"},function(t,e){t.exports="pauseall"},function(t,e){t.exports="pause"},function(t,e){t.exports="play"},function(t,e){t.exports="rate"},function(t,e){t.exports="resumeall"},function(t,e){t.exports="resume"},function(t,e){t.exports="seek"},function(t,e){t.exports="stopall"},function(t,e){t.exports="stop"},function(t,e){t.exports="unlocked"},function(t,e){t.exports="volume"},function(t,e,i){var n={Events:i(75),DisplayList:i(1012),GameObjectCreator:i(16),GameObjectFactory:i(5),UpdateList:i(1040),Components:i(11),GetCalcMatrix:i(19),BuildGameObject:i(28),BuildGameObjectAnimation:i(439),GameObject:i(15),BitmapText:i(148),Blitter:i(213),Bob:i(440),Container:i(214),DOMElement:i(442),DynamicBitmapText:i(215),Extern:i(444),Graphics:i(216),Group:i(113),Image:i(125),Layer:i(219),Particles:i(1074),PathFollower:i(457),RenderTexture:i(221),RetroFont:i(1082),Rope:i(223),Sprite:i(73),Text:i(224),GetTextSize:i(458),MeasureText:i(460),TextStyle:i(459),TileSprite:i(225),Zone:i(129),Video:i(226),Shape:i(34),Arc:i(461),Curve:i(462),Ellipse:i(463),Grid:i(464),IsoBox:i(465),IsoTriangle:i(466),Line:i(467),Polygon:i(468),Rectangle:i(473),Star:i(474),Triangle:i(475),Factories:{Blitter:i(1130),Container:i(1131),DOMElement:i(1132),DynamicBitmapText:i(1133),Extern:i(1134),Graphics:i(1135),Group:i(1136),Image:i(1137),Layer:i(1138),Particles:i(1139),PathFollower:i(1140),RenderTexture:i(1141),Rope:i(1142),Sprite:i(1143),StaticBitmapText:i(1144),Text:i(1145),TileSprite:i(1146),Zone:i(1147),Video:i(1148),Arc:i(1149),Curve:i(1150),Ellipse:i(1151),Grid:i(1152),IsoBox:i(1153),IsoTriangle:i(1154),Line:i(1155),Polygon:i(1156),Rectangle:i(1157),Star:i(1158),Triangle:i(1159)},Creators:{Blitter:i(1160),Container:i(1161),DynamicBitmapText:i(1162),Graphics:i(1163),Group:i(1164),Image:i(1165),Layer:i(1166),Particles:i(1167),RenderTexture:i(1168),Rope:i(1169),Sprite:i(1170),StaticBitmapText:i(1171),Text:i(1172),TileSprite:i(1173),Zone:i(1174),Video:i(1175)}};n.Shader=i(229),n.Mesh=i(230),n.PointLight=i(150),n.Factories.Shader=i(1184),n.Factories.Mesh=i(1185),n.Factories.PointLight=i(1186),n.Creators.Shader=i(1187),n.Creators.Mesh=i(1188),n.Creators.PointLight=i(1189),n.Light=i(481),n.LightsManager=i(482),n.LightsPlugin=i(1190),t.exports=n},function(t,e,i){var n=i(0),r=i(110),s=i(24),o=i(75),a=i(20),h=i(79),i=new n({Extends:r,initialize:function(t){r.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.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].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}});s.register("DisplayList",i,"displayList"),t.exports=i},function(t,e,i){t.exports={CheckMatrix:i(209),MatrixToString:i(1014),ReverseColumns:i(1015),ReverseRows:i(1016),Rotate180:i(1017),RotateLeft:i(1018),RotateMatrix:i(147),RotateRight:i(1019),Translate:i(1020),TransposeMatrix:i(435)}},function(t,e,i){var o=i(186),a=i(209);t.exports=function(t){var e="";if(a(t))for(var i=0;i<t.length;i++){for(var n=0;n<t[i].length;n++){var r=t[i][n].toString();e+="undefined"!==r?o(r,2):"?",n<t[i].length-1&&(e+=" |")}if(i<t.length-1){e+="\n";for(var s=0;s<t[i].length;s++)e+="---",s<t[i].length-1&&(e+="+");e+="\n"}}return e}},function(t,e){t.exports=function(t){return t.reverse()}},function(t,e){t.exports=function(t){for(var e=0;e<t.length;e++)t[e].reverse();return t}},function(t,e,i){var n=i(147);t.exports=function(t){return n(t,180)}},function(t,e,i){var n=i(147);t.exports=function(t){return n(t,90)}},function(t,e,i){var n=i(147);t.exports=function(t){return n(t,-90)}},function(t,e,i){var s=i(178),o=i(179);t.exports=function(t,e,i){if(void 0===e&&(e=0),0!==(i=void 0===i?0:i)&&(i<0?s(t,Math.abs(i)):o(t,i)),0!==e)for(var n=0;n<t.length;n++){var r=t[n];e<0?s(r,Math.abs(e)):o(r,e)}return t}},function(t,e){t.exports=function(t,e,i,n,r){if(void 0===r&&(r=t),0<i){var s=i-t.length;if(s<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.push(e),n&&n.call(r,e),e):null;for(var o=e.length-1;0<=o;)-1!==t.indexOf(e[o])&&e.splice(o,1),o--;if(0===(o=e.length))return null;0<i&&s<o&&(e.splice(s),o=s);for(var a=0;a<o;a++){var h=e[a];t.push(h),n&&n.call(r,h)}return e}},function(t,e){t.exports=function(t,e,i,n,r,s){if(void 0===i&&(i=0),void 0===s&&(s=t),0<n){var o=n-t.length;if(o<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.splice(i,0,e),r&&r.call(s,e),e):null;for(var a=e.length-1;0<=a;)-1!==t.indexOf(e[a])&&e.pop(),a--;if(0===(a=e.length))return null;0<n&&o<a&&(e.splice(o),a=o);for(var h=a-1;0<=h;h--){var l=e[h];t.splice(i,0,l),r&&r.call(s,l)}return e}},function(t,e){t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i<t.length&&(t.splice(i,1),t.push(e)),e}},function(t,e,i){var a=i(78);t.exports=function(t,e,i,n,r){void 0===r&&(r=t.length);var s=0;if(a(t,n=void 0===n?0:n,r))for(var o=n;o<r;o++)t[o][e]===i&&s++;return s}},function(t,e){t.exports=function(t,e,i){for(var n=[null],r=3;r<arguments.length;r++)n.push(arguments[r]);for(r=0;r<t.length;r++)n[0]=t[r],e.apply(i,n);return t}},function(t,e,i){var a=i(78);t.exports=function(t,e,i,n,r){if(void 0===r&&(r=t.length),a(t,n=void 0===n?0:n,r)){for(var s=[null],o=5;o<arguments.length;o++)s.push(arguments[o]);for(o=n;o<r;o++)s[0]=t[o],e.apply(i,s)}return t}},function(t,e){t.exports=function(t,e){var i,n,r=t.indexOf(e);return 0<r&&(i=t[r-1],n=t.indexOf(i),t[r]=i,t[n]=e),t}},function(t,e){t.exports=function(t,e,i){var n=t.indexOf(e);if(-1===n||i<0||i>=t.length)throw new Error("Supplied index out of bounds");return n!==i&&(t.splice(n,1),t.splice(i,0,e)),e}},function(t,e){t.exports=function(t,e){var i,n,r=t.indexOf(e);return-1!==r&&r<t.length-1&&(i=t[r+1],n=t.indexOf(i),t[r]=i,t[n]=e),t}},function(t,e){t.exports=function(t,e,i){if(e!==i){var n=t.indexOf(e),i=t.indexOf(i);if(n<0||i<0)throw new Error("Supplied items must be elements of the same array");i<n||(t.splice(n,1),i===t.length-1?t.push(e):t.splice(i,0,e))}return t}},function(t,e){t.exports=function(t,e,i){if(e!==i){var n=t.indexOf(e),i=t.indexOf(i);if(n<0||i<0)throw new Error("Supplied items must be elements of the same array");n<i||(t.splice(n,1),0===i?t.unshift(e):t.splice(i,0,e))}return t}},function(t,e,i){var o=i(363);t.exports=function(t,e,i){void 0===t&&(t=0),void 0===i&&(i=1),null===(e=void 0===e?null:e)&&(e=t,t=0);for(var n=[],r=Math.max(o((e-t)/(i||1)),0),s=0;s<r;s++)n.push(t),t+=i;return n}},function(t,e,i){var r=i(74);t.exports=function(t,e,i,n){if(void 0===n&&(n=t),e<0||e>t.length-1)throw new Error("Index out of bounds");t=r(t,e);return i&&i.call(n,t),t}},function(t,e,i){var h=i(78);t.exports=function(t,e,i,n,r){if(void 0===i&&(i=t.length),void 0===r&&(r=t),h(t,e=void 0===e?0:e,i)){var s=t.splice(e,i-e);if(n)for(var o=0;o<s.length;o++){var a=s[o];n.call(r,a)}return s}return[]}},function(t,e,i){var n=i(74);t.exports=function(t,e,i){void 0===i&&(i=t.length);e=(e=void 0===e?0:e)+Math.floor(Math.random()*i);return n(t,e)}},function(t,e){t.exports=function(t,e,i){var e=t.indexOf(e),n=t.indexOf(i);return-1!==e&&-1===n&&(t[e]=i,!0)}},function(t,e){t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&0<i&&(t.splice(i,1),t.unshift(e)),e}},function(t,e,i){var a=i(78);t.exports=function(t,e,i,n,r){if(void 0===r&&(r=t.length),a(t,n=void 0===n?0:n,r))for(var s=n;s<r;s++){var o=t[s];o.hasOwnProperty(e)&&(o[e]=i)}return t}},function(t,e){t.exports=function(t,e,i){if(e!==i){var n=t.indexOf(e),r=t.indexOf(i);if(n<0||r<0)throw new Error("Supplied items must be elements of the same array");t[n]=i,t[r]=e}return t}},function(t,e,i){var n=i(0),r=i(211),s=i(24),o=i(20),i=new n({Extends:r,initialize:function(t){r.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,r=0;r<n;r++){var s=i[r];s.active&&s.preUpdate.call(s,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}});s.register("UpdateList",i,"updateList"),t.exports=i},function(t,e){t.exports="add"},function(t,e){t.exports="remove"},function(t,e){t.exports=function(t,B,F,e){if(void 0===F&&(F=!1),void 0===e)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 N,z,Y,i=t.text,X=i.length,U=t.maxWidth,V=t.wordWrapCharCode,n=Number.MAX_VALUE,r=Number.MAX_VALUE,s=0,o=0,G=t.fontData.chars,a=t.fontData.lineHeight,j=t.letterSpacing,h=0,l=0,c=0,u=null,W=t._align,d=0,p=t.fontSize/t.fontData.size,f=p*t.scaleX,g=p*t.scaleY,m=null,y=0,v=[],x=Number.MAX_VALUE,b=0,w=0,T=0,S=[],P=[],_=null;if(0<U){for(M=0;M<X;M++)10!==(c=i.charCodeAt(M))?(u=G[c])&&(null!==m&&(N=u.kerning[y]),c===V?null!==_&&(S.push({word:_.word,i:_.i,x:_.x*f,y:_.y*g,w:_.w*f,h:_.h*g,cr:!1}),_=null):((_=null===_?{word:"",i:M,x:h,y:l,w:0,h:a,cr:!1}:_).word=_.word.concat(i[M]),_.w+=u.xOffset+u.xAdvance+(void 0!==N?N:0)),h+=u.xAdvance+j,m=u,y=c):(null!==_&&(S.push({word:_.word,i:_.i,x:_.x*f,y:_.y*g,w:_.w*f,h:_.h*g,cr:!0}),_=null),h=0,l+=a,m=null);null!==_&&S.push({word:_.word,i:_.i,x:_.x*f,y:_.y*g,w:_.w*f,h:_.h*g,cr:!1});for(var m=null,E=y=l=h=0,A=[],M=0;M<S.length;M++){var k,C=S[M],H=C.x,K=C.x+C.w;k&&(E=H-(H-(k.x+k.w)+k.w),k=null),U<H-E||U<K-E?(A.push(C.i-1),k=C.cr?(A.push(C.i+C.word.length),E=0,null):C):C.cr&&(A.push(C.i+C.word.length),E=0,k=null)}for(M=A.length-1;0<=M;M--)z=i,Y=A[M],i=z.substr(0,Y)+"\n"+z.substr(Y+1);X=(e.wrappedText=i).length,S=[],_=null}for(var q,J,Z,Q=0,M=0;M<X;M++)10!==(c=i.charCodeAt(M))?(u=G[c])&&(d=h,null!==m&&(d+=void 0!==(q=u.kerning[y])?q:0),d<n&&(n=d),l<r&&(r=l),s<(J=d+u.xAdvance)&&(s=J),o<(Z=l+a)&&(o=Z),Z=u.xOffset+u.xAdvance+(void 0!==q?q:0),c===V?null!==_&&(S.push({word:_.word,i:_.i,x:_.x*f,y:_.y*g,w:_.w*f,h:_.h*g}),_=null):((_=null===_?{word:"",i:Q,x:h,y:l,w:0,h:a}:_).word=_.word.concat(i[M]),_.w+=Z),P.push({i:Q,char:i[M],code:c,x:(u.xOffset+h)*p,y:(u.yOffset+l)*p,w:u.width*p,h:u.height*p,t:l*p,r:J*p,b:a*p,line:w,glyph:u}),h+=u.xAdvance+j,m=u,y=c,T=J*p,Q++):(null!==_&&(S.push({word:_.word,i:_.i,x:_.x*f,y:_.y*g,w:_.w*f,h:_.h*g}),_=null),h=0,l+=a,m=null,b<(v[w]=T)&&(b=T),T<x&&(x=T),w++,T=0);if(null!==_&&S.push({word:_.word,i:_.i,x:_.x*f,y:_.y*g,w:_.w*f,h:_.h*g}),b<(v[w]=T)&&(b=T),T<x&&(x=T),0<W)for(var $=0;$<P.length;$++){var O,R=P[$];1===W?(O=(b-v[R.line])/2,R.x+=O,R.r+=O):2===W&&(O=b-v[R.line],R.x+=O,R.r+=O)}var L=e.local,D=e.global,I=e.lines;return L.x=n*p,L.y=r*p,L.width=s*p,L.height=o*p,D.x=t.x-t._displayOriginX+n*f,D.y=t.y-t._displayOriginY+r*g,D.width=s*f,D.height=o*g,I.shortest=x,I.longest=b,I.lengths=v,B&&(L.x=Math.ceil(L.x),L.y=Math.ceil(L.y),L.width=Math.ceil(L.width),L.height=Math.ceil(L.height),D.x=Math.ceil(D.x),D.y=Math.ceil(D.y),D.width=Math.ceil(D.width),D.height=Math.ceil(D.height),I.shortest=Math.ceil(x),I.longest=Math.ceil(b)),F&&(t._displayOriginX=t.originX*L.width,t._displayOriginY=t.originY*L.height,D.x=t.x-t._displayOriginX*t.scaleX,D.y=t.y-t._displayOriginY*t.scaleY,B&&(D.x=Math.ceil(D.x),D.y=Math.ceil(D.y))),e.words=S,e.characters=P,e.lines.height=a,e.scale=p,e.scaleX=t.scaleX,e.scaleY=t.scaleY,e}},function(t,e,i){var l=i(212);t.exports=function(t,e,i,n,r,s,o){var a=t.sys.textures.get(i),h=a.get(n),r=t.sys.cache.xml.get(r);return!(!h||!r)&&(r=l(r,h,s,o,a),t.sys.cache.bitmapFont.add(e,{data:r,texture:i,frame:n,fromAtlas:!0}),!0)}},function(t,e,i){i(1),i(1);var n=i(1046),i=i(1048);t.exports={renderWebGL:n,renderCanvas:i}},function(t,e,i){var R=i(1047),L=i(19),D=i(12);t.exports=function(t,e,i,n){if(0!==e._text.length){i.addToRenderList(e);var r,s=t.pipelines.set(e.pipeline,e),o=L(e,i,n).calc,a=i.roundPixels,h=i.alpha,l=e.charColors,c=e.tintFill,u=D.getTintAppendFloatAlpha,d=u(e.tintTopLeft,h*e._alphaTL),p=u(e.tintTopRight,h*e._alphaTR),f=u(e.tintBottomLeft,h*e._alphaBL),g=u(e.tintBottomRight,h*e._alphaBR),m=e.frame.glTexture,y=s.setGameObject(e),v=e.getTextBounds(!1).characters,x=e.dropShadowX,b=e.dropShadowY,n=0!==x||0!==b;if(t.pipelines.preBatch(e),n)for(var i=e.dropShadowColor,n=e.dropShadowAlpha,w=u(i,h*n*e._alphaTL),T=u(i,h*n*e._alphaTR),S=u(i,h*n*e._alphaBL),P=u(i,h*n*e._alphaBR),_=0;_<v.length;_++)O=(r=v[_]).glyph,32!==r.code&&0!==O.width&&0!==O.height&&R(s,e,r,O,x,b,o,a,w,T,S,P,1,m,y);for(_=0;_<v.length;_++){var E,A,M,k,C,O=(r=v[_]).glyph;32!==r.code&&0!==O.width&&0!==O.height&&(l[r.i]?(E=(C=l[r.i]).tintEffect,A=u(C.tintTL,h*e._alphaTL),M=u(C.tintTR,h*e._alphaTR),k=u(C.tintBL,h*e._alphaBL),C=u(C.tintBR,h*e._alphaBR),R(s,e,r,O,0,0,o,a,A,M,k,C,E,m,y)):R(s,e,r,O,0,0,o,a,d,p,f,g,c,m,y))}t.pipelines.postBatch(e)}}},function(t,e){t.exports=function(t,e,i,n,r,s,o,a,h,l,c,u,d,p,f){var r=i.x-e.displayOriginX+r,s=i.y-e.displayOriginY+s,g=r+i.w,i=s+i.h,m=o.getXRound(r,s,a),y=o.getYRound(r,s,a),v=o.getXRound(r,i,a),r=o.getYRound(r,i,a),x=o.getXRound(g,i,a),i=o.getYRound(g,i,a),b=o.getXRound(g,s,a),o=o.getYRound(g,s,a);t.batchQuad(e,m,y,v,r,x,i,b,o,n.u0,n.v0,n.u1,n.v1,h,l,c,u,d,p,f)}},function(t,e,i){var L=i(30);t.exports=function(t,e,i,n){var r=e._text,s=r.length,o=t.currentContext;if(0!==s&&L(t,o,e,i,n)){i.addToRenderList(e);var a,h,l,c,u,d,t=e.fromAtlas?e.frame:e.texture.frames.__BASE,p=e.fontData.chars,f=e.fontData.lineHeight,g=e._letterSpacing,m=0,y=0,v=0,x=0,b=null,w=0,T=t.source.image,S=t.cutX,P=t.cutY,_=e._fontSize/e.fontData.size,E=e._align,A=0,M=0,n=e.getTextBounds(!1),k=(0<e.maxWidth&&(s=(r=n.wrappedText).length),e._bounds.lines);1===E?M=(k.longest-k.lengths[0])/2:2===E&&(M=k.longest-k.lengths[0]),o.translate(-e.displayOriginX,-e.displayOriginY);for(var C,O=i.roundPixels,R=0;R<s;R++)10!==(a=r.charCodeAt(R))?(h=p[a])&&(l=S+h.x,c=P+h.y,u=h.width,d=h.height,v=h.xOffset+m,x=h.yOffset+y,null!==b&&(v+=void 0!==(C=h.kerning[w])?C:0),x*=_,v=v*_+M,m+=h.xAdvance+g,b=h,w=a,0!==u&&0!==d&&32!==a&&(O&&(v=Math.round(v),x=Math.round(x)),o.save(),o.translate(v,x),o.scale(_,_),o.drawImage(T,l,c,u,d,0,0,u,d),o.restore())):(A++,1===E?M=(k.longest-k.lengths[A])/2:2===E&&(M=k.longest-k.lengths[A]),m=0,y+=f,b=null);o.restore()}}},function(t,e,i){i(1),i(1);var n=i(1050),i=i(1051);t.exports={renderWebGL:n,renderCanvas:i}},function(t,e,i){var n=i(25),P=i(12),_=new n;t.exports=function(t,e,i,n){var r=e.getRenderList();if(0!==r.length){var s=i.alpha*e.alpha;if(0!=s){i.addToRenderList(e);var o=t.pipelines.set(this.pipeline,e),a=i.scrollX*e.scrollFactorX,h=i.scrollY*e.scrollFactorY,l=_.copyFrom(i.matrix),c=(n&&(l.multiplyWithOffset(n,-a,-h),h=a=0),e.x-a),u=e.y-h,d=-1,p=i.roundPixels;t.pipelines.preBatch(e);for(var f=0;f<r.length;f++){var g,m,y,v,x,b,w=r[f],T=w.frame,S=w.alpha*s;0!=S&&(v=T.width,x=T.height,m=c+w.x+T.x,y=u+w.y+T.y,w.flipX&&(v*=-1,m+=T.width),w.flipY&&(x*=-1,y+=T.height),v=m+v,x=y+x,g=l.getX(m,y),m=l.getY(m,y),y=l.getX(v,x),v=l.getY(v,x),x=P.getTintAppendFloatAlpha(w.tint,S),T.sourceIndex!==d&&(b=o.setGameObject(e,T),d=T.sourceIndex),p&&(g=Math.round(g),m=Math.round(m),y=Math.round(y),v=Math.round(v)),o.batchQuad(e,g,m,g,v,y,v,y,m,T.u0,T.v0,T.u1,T.v1,x,x,x,x,!1,T.glTexture,b)&&(d=-1))}t.pipelines.postBatch(e)}}}},function(t,e){t.exports=function(t,e,i,n){var r=e.getRenderList();if(0!==r.length){var s=t.currentContext,o=i.alpha*e.alpha;if(0!=o){i.addToRenderList(e),s.globalCompositeOperation=t.blendModes[e.blendMode],s.imageSmoothingEnabled=!(!t.antialias||e.frame.source.scaleMode);var a=e.x-i.scrollX*e.scrollFactorX,h=e.y-i.scrollY*e.scrollFactorY;s.save(),n&&n.copyToContext(s);for(var l=i.roundPixels,c=0;c<r.length;c++){var u=r[c],d=u.flipX||u.flipY,p=u.frame,f=p.canvasData,g=p.x,m=p.y,y=1,v=1,x=u.alpha*o;0!=x&&(s.globalAlpha=x,d?(u.flipX&&(y=-1,g-=f.width),u.flipY&&(v=-1,m-=f.height),s.save(),s.translate(u.x+a,u.y+h),s.scale(y,v),s.drawImage(p.source.image,f.x,f.y,f.width,f.height,g,m,f.width,f.height),s.restore()):(l&&(g=Math.round(g),m=Math.round(m)),s.drawImage(p.source.image,f.x,f.y,f.width,f.height,g+u.x+a,m+u.y+h,f.width,f.height)))}s.restore()}}}},function(t,e,i){i(1),i(1);var n=i(1053),i=i(1054);t.exports={renderWebGL:n,renderCanvas:i}},function(t,e){t.exports=function(t,e,i,n){i.addToRenderList(e);var r=e.list,s=r.length;if(0!==s){var o=e.localTransform,a=(n?(o.loadIdentity(),o.multiply(n),o.translate(e.x,e.y),o.rotate(e.rotation),o.scale(e.scaleX,e.scaleY)):o.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),t.pipelines.preBatch(e),-1!==e.blendMode);a||t.setBlendMode(0);for(var h=e.alpha,l=e.scrollFactorX,c=e.scrollFactorY,u=0;u<s;u++){var d,p,f,g,m,y,v,x,b=r[u];b.willRender(i)&&(g=void 0!==b.alphaTopLeft?(d=b.alphaTopLeft,p=b.alphaTopRight,f=b.alphaBottomLeft,b.alphaBottomRight):f=p=d=b.alpha,m=b.scrollFactorX,y=b.scrollFactorY,a||b.blendMode===t.currentBlendMode||t.setBlendMode(b.blendMode),(v=b.mask)&&v.preRenderWebGL(t,b,i),(x=b.type)!==t.currentType&&(t.newType=!0,t.currentType=x),t.nextTypeMatch=u<s-1&&r[u+1].type===t.currentType,b.setScrollFactor(m*l,y*c),b.setAlpha(d*h,p*h,f*h,g*h),b.renderWebGL(t,b,i,o),b.setAlpha(d,p,f,g),b.setScrollFactor(m,y),v&&v.postRenderWebGL(t,i),t.newType=!1)}t.pipelines.postBatch(e)}}},function(t,e){t.exports=function(t,e,i,n){i.addToRenderList(e);var r=e.list;if(0!==r.length){var s=e.localTransform,o=(n?(s.loadIdentity(),s.multiply(n),s.translate(e.x,e.y),s.rotate(e.rotation),s.scale(e.scaleX,e.scaleY)):s.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),-1!==e.blendMode),a=(o||t.setBlendMode(0),e._alpha),h=e.scrollFactorX,l=e.scrollFactorY;e.mask&&e.mask.preRenderCanvas(t,null,i);for(var c=0;c<r.length;c++){var u,d,p,f=r[c];f.willRender(i)&&(u=f.alpha,d=f.scrollFactorX,p=f.scrollFactorY,o||f.blendMode===t.currentBlendMode||t.setBlendMode(f.blendMode),f.setScrollFactor(d*h,p*l),f.setAlpha(u*a),f.renderCanvas(t,f,i,s),f.setAlpha(u),f.setScrollFactor(d,p))}e.mask&&e.mask.postRenderCanvas(t)}}},function(t,e,i){i(1),i(1);var n=i(443),i=i(443);t.exports={renderWebGL:n,renderCanvas:i}},function(t,e){t.exports=["normal","multiply","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]},function(t,e,i){i(1),i(1);var n=i(1058),i=i(1059);t.exports={renderWebGL:n,renderCanvas:i}},function(t,e,i){var J=i(19),n=i(25),Z=i(12),Q=new n;t.exports=function(t,e,i,n){var r=e.text,s=r.length;if(0!==s){i.addToRenderList(e);var o=t.pipelines.set(e.pipeline,e),n=J(e,i,n),a=n.sprite,h=n.calc,B=Q,n=0<e.cropWidth||0<e.cropHeight;n&&(o.flush(),t.pushScissor(h.tx,h.ty,e.cropWidth*h.scaleX,e.cropHeight*h.scaleY));var l,F=e.frame.glTexture,N=e.tintFill,c=Z.getTintAppendFloatAlpha(e.tintTopLeft,i.alpha*e._alphaTL),u=Z.getTintAppendFloatAlpha(e.tintTopRight,i.alpha*e._alphaTR),d=Z.getTintAppendFloatAlpha(e.tintBottomLeft,i.alpha*e._alphaBL),p=Z.getTintAppendFloatAlpha(e.tintBottomRight,i.alpha*e._alphaBR),z=o.setGameObject(e),f=0,Y=0,X=0,U=e.letterSpacing,V=e.scrollX,G=e.scrollY,g=e.fontData,j=g.chars,W=g.lineHeight,m=e.fontSize/g.size,y=0,v=e._align,H=0,x=0,g=e.getTextBounds(!1),b=(0<e.maxWidth&&(s=(r=g.wrappedText).length),e._bounds.lines),K=(1===v?x=(b.longest-b.lengths[0])/2:2===v&&(x=b.longest-b.lengths[0]),i.roundPixels),q=e.displayCallback,w=e.callbackData;t.pipelines.preBatch(e);for(var T,S,P,_,E,A,M,k,C,O,R,L,D,I=0;I<s;I++)10!==(S=r.charCodeAt(I))?(D=j[S])&&(L=D.width,O=D.height,P=D.xOffset+f-V,_=D.yOffset+Y-G,null!==l&&(P+=void 0!==(T=D.kerning[X])?T:0),f+=D.xAdvance+U,l=D,X=S,0!==L&&0!==O&&32!==S&&(m=e.fontSize/e.fontData.size,y=0,q&&(w.color=0,w.tint.topLeft=c,w.tint.topRight=u,w.tint.bottomLeft=d,w.tint.bottomRight=p,w.index=I,w.charCode=S,w.x=P,w.y=_,w.scale=m,w.rotation=y,w.data=D.data,P=(T=q(w)).x,_=T.y,m=T.scale,y=T.rotation,p=T.color?(c=T.color,u=T.color,d=T.color,T.color):(c=T.tint.topLeft,u=T.tint.topRight,d=T.tint.bottomLeft,T.tint.bottomRight),c=Z.getTintAppendFloatAlpha(c,i.alpha*e._alphaTL),u=Z.getTintAppendFloatAlpha(u,i.alpha*e._alphaTR),d=Z.getTintAppendFloatAlpha(d,i.alpha*e._alphaBL),p=Z.getTintAppendFloatAlpha(p,i.alpha*e._alphaBR)),P=(P*=m)-e.displayOriginX,_=_*m-e.displayOriginY,B.applyITRS(P+=x,_,y,m,m),h.multiply(B,a),S=D.u0,P=D.v0,_=D.u1,D=D.v1,E=a.e,A=a.f,M=O*a.c+a.e,k=O*a.d+a.f,C=L*a.a+O*a.c+a.e,O=L*a.b+O*a.d+a.f,R=L*a.a+a.e,L=L*a.b+a.f,K&&(E=Math.round(E),A=Math.round(A),M=Math.round(M),k=Math.round(k),C=Math.round(C),O=Math.round(O),R=Math.round(R),L=Math.round(L)),o.batchQuad(e,E,A,M,k,C,O,R,L,S,P,_,D,c,u,d,p,N,F,z))):(H++,1===v?x=(b.longest-b.lengths[H])/2:2===v&&(x=b.longest-b.lengths[H]),f=0,Y+=W,l=null);n&&(o.flush(),t.popScissor()),t.pipelines.postBatch(e)}}},function(t,e,i){var F=i(30);t.exports=function(t,e,i,n){var r=e._text,s=r.length,o=t.currentContext;if(0!==s&&F(t,o,e,i,n)){i.addToRenderList(e);var a,h,l,c,u,d,t=e.fromAtlas?e.frame:e.texture.frames.__BASE,p=e.displayCallback,f=e.callbackData,g=e.fontData.chars,m=e.fontData.lineHeight,y=e._letterSpacing,v=0,x=0,b=0,w=0,T=null,S=0,P=e.frame.source.image,_=t.cutX,E=t.cutY,A=0,M=0,k=e._fontSize/e.fontData.size,C=e._align,O=0,R=0,L=(e.getTextBounds(!1),e._bounds.lines),B=(1===C?R=(L.longest-L.lengths[0])/2:2===C&&(R=L.longest-L.lengths[0]),o.translate(-e.displayOriginX,-e.displayOriginY),i.roundPixels);0<e.cropWidth&&0<e.cropHeight&&(o.beginPath(),o.rect(0,0,e.cropWidth,e.cropHeight),o.clip());for(var D,I=0;I<s;I++)M=k,A=0,10!==(a=r.charCodeAt(I))?(h=g[a])&&(l=_+h.x,c=E+h.y,u=h.width,d=h.height,b=h.xOffset+v-e.scrollX,w=h.yOffset+x-e.scrollY,null!==T&&(b+=void 0!==(D=h.kerning[S])?D:0),p&&(f.index=I,f.charCode=a,f.x=b,f.y=w,f.scale=M,f.rotation=A,f.data=h.data,b=(D=p(f)).x,w=D.y,M=D.scale,A=D.rotation),w*=M,b=b*M+R,v+=h.xAdvance+y,T=h,S=a,0!==u&&0!==d&&32!==a&&(B&&(b=Math.round(b),w=Math.round(w)),o.save(),o.translate(b,w),o.rotate(A),o.scale(M,M),o.drawImage(P,l,c,u,d,0,0,u,d),o.restore())):(O++,1===C?R=(L.longest-L.lengths[O])/2:2===C&&(R=L.longest-L.lengths[O]),v=0,x+=m,T=null);o.restore()}}},function(t,e,i){i(1),i(1);var n=i(1061),i=i(1062);t.exports={renderWebGL:n,renderCanvas:i}},function(t,e,i){var r=i(19);t.exports=function(t,e,i,n){t.pipelines.clear();n=r(e,i,n).calc;e.render.call(e,t,i,n),t.pipelines.rebind()}},function(t,e){},function(t,e,i){i(1),i(1);var n=i(1064);i(448);i=i(448),t.exports={renderWebGL:n,renderCanvas:i}},function(t,e,i){function D(t,e,i){this.x=t,this.y=e,this.width=i}function I(t,e,i){this.points=[],this.pointsLength=1,this.points[0]=new D(t,e,i)}var B=i(217),F=i(19),n=i(25),N=i(12),z=[],Y=new n;t.exports=function(t,e,i,n){if(0!==e.commandBuffer.length){i.addToRenderList(e);var r=t.pipelines.set(e.pipeline,e);t.pipelines.preBatch(e);for(var s=F(e,i,n).calc,o=Y.loadIdentity(),a=e.commandBuffer,h=i.alpha*e.alpha,l=1,c=r.fillTint,u=r.strokeTint,d=0,p=0,f=0,g=2*Math.PI,m=[],y=0,v=!0,x=null,b=N.getTintAppendFloatAlpha,w=0;w<a.length;w++)switch(a[w]){case B.BEGIN_PATH:m.length=0,v=!(x=null);break;case B.CLOSE_PATH:v=!1,x&&x.points.length&&x.points.push(x.points[0]);break;case B.FILL_PATH:for(y=0;y<m.length;y++)r.batchFillPath(m[y].points,o,s);break;case B.STROKE_PATH:for(y=0;y<m.length;y++)r.batchStrokePath(m[y].points,l,v,o,s);break;case B.LINE_STYLE:var l=a[++w],T=b(a[++w],a[++w]*h);u.TL=T,u.TR=T,u.BL=T,u.BR=T;break;case B.FILL_STYLE:T=b(a[++w],a[++w]*h);c.TL=T,c.TR=T,c.BL=T,c.BR=T;break;case B.GRADIENT_FILL_STYLE:var S=a[++w]*h,P=a[++w]*h,_=a[++w]*h,E=a[++w]*h;c.TL=b(a[++w],S),c.TR=b(a[++w],P),c.BL=b(a[++w],_),c.BR=b(a[++w],E);break;case B.GRADIENT_LINE_STYLE:l=a[++w];S=a[++w]*h;u.TL=b(a[++w],S),u.TR=b(a[++w],S),u.BL=b(a[++w],S),u.BR=b(a[++w],S);break;case B.ARC:var A=0,M=a[++w],k=a[++w],C=a[++w],O=a[++w],R=a[++w],P=a[++w],L=a[++w];for(R-=O,P?R<-g?R=-g:0<R&&(R=R%g-g):g<R?R=g:R<0&&(R=g+R%g),null===x&&(x=new I(M+Math.cos(O)*C,k+Math.sin(O)*C,l),m.push(x),A+=.01);A<1+L;)f=R*A+O,d=M+Math.cos(f)*C,p=k+Math.sin(f)*C,x.points.push(new D(d,p,l)),A+=.01;f=R+O,d=M+Math.cos(f)*C,p=k+Math.sin(f)*C,x.points.push(new D(d,p,l));break;case B.FILL_RECT:r.batchFillRect(a[++w],a[++w],a[++w],a[++w],o,s);break;case B.FILL_TRIANGLE:r.batchFillTriangle(a[++w],a[++w],a[++w],a[++w],a[++w],a[++w],o,s);break;case B.STROKE_TRIANGLE:r.batchStrokeTriangle(a[++w],a[++w],a[++w],a[++w],a[++w],a[++w],l,o,s);break;case B.LINE_TO:null!==x?x.points.push(new D(a[++w],a[++w],l)):(x=new I(a[++w],a[++w],l),m.push(x));break;case B.MOVE_TO:x=new I(a[++w],a[++w],l),m.push(x);break;case B.SAVE:z.push(o.copyToArray());break;case B.RESTORE:o.copyFromArray(z.pop());break;case B.TRANSLATE:M=a[++w],k=a[++w],o.translate(M,k);break;case B.SCALE:M=a[++w],k=a[++w],o.scale(M,k);break;case B.ROTATE:o.rotate(a[++w])}t.pipelines.postBatch(e)}}},function(t,e,i){i(1),i(1);var n=i(1066),i=i(1067);t.exports={renderWebGL:n,renderCanvas:i}},function(t,e){t.exports=function(t,e,i,n){i.addToRenderList(e),e.pipeline.batchSprite(e,i,n)}},function(t,e){t.exports=function(t,e,i,n){i.addToRenderList(e),t.batchSprite(e,e.frame,i,n)}},function(t,e,i){i(1),i(1);var n=i(1069),i=i(1070);t.exports={renderWebGL:n,renderCanvas:i}},function(t,e){t.exports=function(t,e,i,n){i.addToRenderList(e),this.pipeline.batchSprite(e,i,n)}},function(t,e){t.exports=function(t,e,i,n){i.addToRenderList(e),t.batchSprite(e,e.frame,i,n)}},function(t,e,i){i(1),i(1);var n=i(1072),i=i(1073);t.exports={renderWebGL:n,renderCanvas:i}},function(t,e){t.exports=function(t,e,i){var n=e.list,r=n.length;if(0!==r){e.depthSort(),t.pipelines.preBatch(e);var s=-1!==e.blendMode;s||t.setBlendMode(0);for(var o=e.alpha,a=0;a<r;a++){var h,l,c,u,d,p,f=n[a];f.willRender(i)&&(u=void 0!==f.alphaTopLeft?(h=f.alphaTopLeft,l=f.alphaTopRight,c=f.alphaBottomLeft,f.alphaBottomRight):c=l=h=f.alpha,s||f.blendMode===t.currentBlendMode||t.setBlendMode(f.blendMode),(d=f.mask)&&d.preRenderWebGL(t,f,i),(p=f.type)!==t.currentType&&(t.newType=!0,t.currentType=p),t.nextTypeMatch=a<r-1&&n[a+1].type===t.currentType,f.setAlpha(h*o,l*o,c*o,u*o),f.renderWebGL(t,f,i),f.setAlpha(h,l,c,u),d&&d.postRenderWebGL(t,i),t.newType=!1)}t.pipelines.postBatch(e)}}},function(t,e){t.exports=function(t,e,i){var n=e.list;if(0!==n.length){e.depthSort();var r=-1!==e.blendMode,s=(r||t.setBlendMode(0),e._alpha);e.mask&&e.mask.preRenderCanvas(t,null,i);for(var o=0;o<n.length;o++){var a,h=n[o];h.willRender(i)&&(a=h.alpha,r||h.blendMode===t.currentBlendMode||t.setBlendMode(h.blendMode),h.setAlpha(a*s),h.renderCanvas(t,h,i),h.setAlpha(a))}e.mask&&e.mask.postRenderCanvas(t)}}},function(t,e,i){t.exports={EmitterOp:i(449),GravityWell:i(450),Particle:i(451),ParticleEmitter:i(452),ParticleEmitterManager:i(220),Zones:i(1078)}},function(t,e,i){i(1),i(1);var n=i(1076),i=i(1077);t.exports={renderWebGL:n,renderCanvas:i}},function(t,e,i){var n=i(25),D=i(12),I=new n,B=new n,F=new n,N=new n;t.exports=function(t,e,i,n){var r=e.emitters.list,s=r.length;if(0!==s){var o=t.pipelines.set(e.pipeline),a=I,h=B,l=F,c=N,u=(n?(c.loadIdentity(),c.multiply(n),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),i.roundPixels),d=e.defaultFrame.glTexture,p=D.getTintAppendFloatAlpha,f=o.setGameObject(e,e.defaultFrame);t.pipelines.preBatch(e);for(var g=0;g<s;g++){var m=r[g],y=m.alive,v=y.length;if(m.visible&&0!==v){i.addToRenderList(m);var x=m.scrollFactorX,b=m.scrollFactorY;t.setBlendMode(m.blendMode),m.mask&&(m.mask.preRenderWebGL(t,m,i),t.pipelines.set(e.pipeline));for(var w=0;w<v;w++){var T,S,P,_,E,A,M,k,C,O,R=y[w],L=R.alpha*i.alpha;L<=0||(l.applyITRS(R.x,R.y,R.rotation,R.scaleX,R.scaleY),a.copyFrom(i.matrix),a.multiplyWithOffset(c,-i.scrollX*x,-i.scrollY*b),l.e=R.x,l.f=R.y,a.multiply(l,h),E=-(T=R.frame).halfWidth,O=-T.halfHeight,C=E+T.width,M=O+T.height,S=h.getXRound(E,O,u),P=h.getYRound(E,O,u),_=h.getXRound(E,M,u),E=h.getYRound(E,M,u),A=h.getXRound(C,M,u),M=h.getYRound(C,M,u),k=h.getXRound(C,O,u),C=h.getYRound(C,O,u),O=p(R.tint,L),o.batchQuad(m,S,P,_,E,A,M,k,C,T.u0,T.v0,T.u1,T.v1,O,O,O,O,0,d,f))}m.mask&&m.mask.postRenderWebGL(t,i)}}t.pipelines.postBatch(e)}}},function(t,e,i){var i=i(25),P=new i,_=new i,E=new i,A=new i;t.exports=function(t,e,i,n){var r=e.emitters.list,s=r.length;if(0!==s){var o=P.copyFrom(i.matrix),a=_,h=E,l=A;n?(l.loadIdentity(),l.multiply(n),l.translate(e.x,e.y),l.rotate(e.rotation),l.scale(e.scaleX,e.scaleY)):l.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);for(var c=t.currentContext,u=i.roundPixels,d=0;d<s;d++){var p=r[d],f=p.alive,g=f.length;if(p.visible&&0!==g){i.addToRenderList(p);var m=p.scrollFactorX,y=p.scrollFactorY;c.save(),c.globalCompositeOperation=t.blendModes[p.blendMode];for(var v=0;v<g;v++){var x,b,w,T=f[v],S=T.alpha*i.alpha;S<=0||(h.applyITRS(T.x,T.y,T.rotation,T.scaleX,T.scaleY),o.copyFrom(i.matrix),o.multiplyWithOffset(l,-i.scrollX*m,-i.scrollY*y),h.e=T.x,h.f=T.y,o.multiply(h,a),x=(T=T.frame).canvasData,b=-T.halfWidth,w=-T.halfHeight,c.globalAlpha=S,c.save(),a.setToContext(c),u&&(b=Math.round(b),w=Math.round(w)),c.imageSmoothingEnabled=!(!t.antialias||T.source.scaleMode),c.drawImage(T.source.image,x.x,x.y,x.width,x.height,b,w,x.width,x.height),c.restore())}c.restore()}}}}},function(t,e,i){t.exports={DeathZone:i(453),EdgeZone:i(454),RandomZone:i(456)}},function(t,e,i){i(1),i(1);var n=i(1080),i=i(1081);t.exports={renderWebGL:n,renderCanvas:i}},function(t,e,i){var u=i(12);t.exports=function(t,e,i,n){i.addToRenderList(e);var r=i.alpha,s=e.renderTarget,o=s.width,a=s.height,h=u.getTintAppendFloatAlpha,l=t.pipelines.set(e.pipeline),c=l.setTexture2D(s.texture);t.pipelines.preBatch(e),l.batchTexture(e,s.texture,o,a,e.x,e.y,o,a,e.scaleX,e.scaleY,e.rotation,e.flipX,!e.flipY,e.scrollFactorX,e.scrollFactorY,e.displayOriginX,e.displayOriginY,0,0,o,a,h(e.tintTopLeft,r*e._alphaTL),h(e.tintTopRight,r*e._alphaTR),h(e.tintBottomLeft,r*e._alphaBL),h(e.tintBottomRight,r*e._alphaBR),e.tintFill,0,0,i,n,!0,c),t.resetTextures(),t.pipelines.postBatch(e)}},function(t,e){t.exports=function(t,e,i,n){i.addToRenderList(e),t.batchSprite(e,e.frame,i,n)}},function(t,e,i){var n=i(1083),i=i(17)(!1,{Parse:i(1084)},n);t.exports=i},function(t,e){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"}},function(t,e,i){var S=i(6);t.exports=function(t,e){var i=e.width,n=e.height,r=Math.floor(i/2),s=Math.floor(n/2),o=S(e,"chars","");if(""!==o){var a=S(e,"image",""),t=t.sys.textures.getFrame(a),h=t.cutX,l=t.cutY,c=t.source.width,u=t.source.height,d=S(e,"offset.x",0),t=S(e,"offset.y",0),p=S(e,"spacing.x",0),f=S(e,"spacing.y",0),g=S(e,"lineSpacing",0),m=S(e,"charsPerRow",null);null===m&&(m=c/i)>o.length&&(m=o.length);for(var y=d,v=t,x={retroFont:!0,font:a,size:i,lineHeight:n+g,chars:{}},b=0,w=0;w<o.length;w++){var T=o.charCodeAt(w);x.chars[T]={x:y,y:v,width:i,height:n,centerX:r,centerY:s,xOffset:0,yOffset:0,xAdvance:i,data:{},kerning:{},u0:(h+y)/c,v0:(l+v)/u,u1:(h+y+i)/c,v1:(l+v+n)/u},++b===m?(b=0,y=d,v+=n+f):y+=i+p}return{data:x,frame:null,texture:a}}}},function(t,e,i){i(1),i(1);var n=i(1086),i=i(1087);t.exports={renderWebGL:n,renderCanvas:i}},function(t,e,i){var E=i(19),A=i(12);t.exports=function(t,e,i,n){i.addToRenderList(e);var r=t.pipelines.set(e.pipeline,e),s=E(e,i,n).calc,o=e.vertices,a=e.uv,h=e.colors,l=e.alphas,c=e.alpha,u=A.getTintAppendFloatAlpha,d=i.roundPixels,p=o.length,n=Math.floor(.5*p),f=(r.flush(),t.pipelines.preBatch(e),r.setGameObject(e)),g=r.vertexViewF32,m=r.vertexViewU32,y=r.vertexCount*r.currentShader.vertexComponentCount-1,v=0,x=e.tintFill;e.dirty&&e.updateVertices();for(var b=e.debugCallback,w=[],T=0;T<p;T+=2){var S=o[T+0],P=o[T+1],_=S*s.a+P*s.c+s.e,S=S*s.b+P*s.d+s.f;d&&(_=Math.round(_),S=Math.round(S)),g[++y]=_,g[++y]=S,g[++y]=a[T+0],g[++y]=a[T+1],g[++y]=f,g[++y]=x,m[++y]=u(h[v],i.alpha*(l[v]*c)),v++,b&&(w[T+0]=_,w[T+1]=S)}b&&b.call(e,e,p,w),r.vertexCount+=n,t.pipelines.postBatch(e)}},function(t,e){t.exports=function(){}},function(t,e,i){i(1),i(1);var n=i(1089),i=i(1090);t.exports={renderWebGL:n,renderCanvas:i}},function(t,e,i){var c=i(12);t.exports=function(t,e,i,n){var r,s,o,a,h,l;0!==e.width&&0!==e.height&&(i.addToRenderList(e),s=(r=e.frame).width,o=r.height,a=c.getTintAppendFloatAlpha,l=(h=t.pipelines.set(e.pipeline,e)).setTexture2D(r.glTexture,e),t.pipelines.preBatch(e),h.batchTexture(e,r.glTexture,s,o,e.x,e.y,s/e.style.resolution,o/e.style.resolution,e.scaleX,e.scaleY,e.rotation,e.flipX,e.flipY,e.scrollFactorX,e.scrollFactorY,e.displayOriginX,e.displayOriginY,0,0,s,o,a(e.tintTopLeft,i.alpha*e._alphaTL),a(e.tintTopRight,i.alpha*e._alphaTR),a(e.tintBottomLeft,i.alpha*e._alphaBL),a(e.tintBottomRight,i.alpha*e._alphaBR),e.tintFill,0,0,i,n,!1,l),t.pipelines.postBatch(e))}},function(t,e){t.exports=function(t,e,i,n){0!==e.width&&0!==e.height&&(i.addToRenderList(e),t.batchSprite(e,e.frame,i,n))}},function(t,e,i){i(1),i(1);var n=i(1092),i=i(1093);t.exports={renderWebGL:n,renderCanvas:i}},function(t,e,i){var l=i(12);t.exports=function(t,e,i,n){e.updateCanvas();var r,s,o,a=e.width,h=e.height;0!==a&&0!==h&&(i.addToRenderList(e),t.pipelines.preBatch(e),r=l.getTintAppendFloatAlpha,o=(s=t.pipelines.set(e.pipeline,e)).setTexture2D(e.fillPattern,e),s.batchTexture(e,e.fillPattern,e.displayFrame.width*e.tileScaleX,e.displayFrame.height*e.tileScaleY,e.x,e.y,a,h,e.scaleX,e.scaleY,e.rotation,e.flipX,e.flipY,e.scrollFactorX,e.scrollFactorY,e.originX*a,e.originY*h,0,0,a,h,r(e.tintTopLeft,i.alpha*e._alphaTL),r(e.tintTopRight,i.alpha*e._alphaTR),r(e.tintBottomLeft,i.alpha*e._alphaBL),r(e.tintBottomRight,i.alpha*e._alphaBR),e.tintFill,e.tilePositionX%e.displayFrame.width/e.displayFrame.width,e.tilePositionY%e.displayFrame.height/e.displayFrame.height,i,n,!1,o),t.pipelines.postBatch(e))}},function(t,e){t.exports=function(t,e,i,n){e.updateCanvas(),i.addToRenderList(e),t.batchSprite(e,e.frame,i,n)}},function(t,e,i){i(1),i(1);var n=i(1095),i=i(1096);t.exports={renderWebGL:n,renderCanvas:i}},function(t,e){t.exports=function(t,e,i,n){e.videoTexture&&(i.addToRenderList(e),e.pipeline.batchSprite(e,i,n))}},function(t,e){t.exports=function(t,e,i,n){e.videoTexture&&(i.addToRenderList(e),t.batchSprite(e,e.frame,i,n))}},function(t,e,i){i(1),i(1);var n=i(1098),i=i(1099);t.exports={renderWebGL:n,renderCanvas:i}},function(t,e,i){var a=i(19),h=i(114),l=i(81);t.exports=function(t,e,i,n){i.addToRenderList(e);var r=t.pipelines.set(e.pipeline),n=a(e,i,n),n=r.calcMatrix.copyFrom(n.calc),s=e._displayOriginX,o=e._displayOriginY,i=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&h(r,n,e,i,s,o),e.isStroked&&l(r,e,i,s,o),t.pipelines.postBatch(e)}},function(t,e,i){var s=i(36),o=i(48),a=i(60),h=i(30);t.exports=function(t,e,i,n){i.addToRenderList(e);var r=t.currentContext;h(t,r,e,i,n)&&(t=e.radius,r.beginPath(),r.arc(t-e.originX*(2*t),t-e.originY*(2*t),t,s(e._startAngle),s(e._endAngle),e.anticlockwise),e.closePath&&r.closePath(),e.isFilled&&(o(r,e),r.fill()),e.isStroked&&(a(r,e),r.stroke()),r.restore())}},function(t,e,i){i(1),i(1);var n=i(1101),i=i(1102);t.exports={renderWebGL:n,renderCanvas:i}},function(t,e,i){var a=i(114),h=i(19),l=i(81);t.exports=function(t,e,i,n){i.addToRenderList(e);var r=t.pipelines.set(e.pipeline),n=h(e,i,n),n=r.calcMatrix.copyFrom(n.calc),s=e._displayOriginX+e._curveBounds.x,o=e._displayOriginY+e._curveBounds.y,i=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&a(r,n,e,i,s,o),e.isStroked&&l(r,e,i,s,o),t.pipelines.postBatch(e)}},function(t,e,i){var d=i(48),p=i(60),f=i(30);t.exports=function(t,e,i,n){i.addToRenderList(e);var r=t.currentContext;if(f(t,r,e,i,n)){var s=e._displayOriginX+e._curveBounds.x,o=e._displayOriginY+e._curveBounds.y,a=e.pathData,h=a.length-1,t=a[0]-s,i=a[1]-o;r.beginPath(),r.moveTo(t,i),e.closePath||(h-=2);for(var l=2;l<h;l+=2){var c=a[l]-s,u=a[l+1]-o;r.lineTo(c,u)}e.closePath&&r.closePath(),e.isFilled&&(d(r,e),r.fill()),e.isStroked&&(p(r,e),r.stroke()),r.restore()}}},function(t,e,i){i(1),i(1);var n=i(1104),i=i(1105);t.exports={renderWebGL:n,renderCanvas:i}},function(t,e,i){var a=i(114),h=i(19),l=i(81);t.exports=function(t,e,i,n){i.addToRenderList(e);var r=t.pipelines.set(e.pipeline),n=h(e,i,n),n=r.calcMatrix.copyFrom(n.calc),s=e._displayOriginX,o=e._displayOriginY,i=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&a(r,n,e,i,s,o),e.isStroked&&l(r,e,i,s,o),t.pipelines.postBatch(e)}},function(t,e,i){var d=i(48),p=i(60),f=i(30);t.exports=function(t,e,i,n){i.addToRenderList(e);var r=t.currentContext;if(f(t,r,e,i,n)){var s=e._displayOriginX,o=e._displayOriginY,a=e.pathData,h=a.length-1,t=a[0]-s,i=a[1]-o;r.beginPath(),r.moveTo(t,i),e.closePath||(h-=2);for(var l=2;l<h;l+=2){var c=a[l]-s,u=a[l+1]-o;r.lineTo(c,u)}r.closePath(),e.isFilled&&(d(r,e),r.fill()),e.isStroked&&(p(r,e),r.stroke()),r.restore()}}},function(t,e,i){i(1),i(1);var n=i(1107),i=i(1108);t.exports={renderWebGL:n,renderCanvas:i}},function(t,e,i){var P=i(19),_=i(12);t.exports=function(t,e,i,n){i.addToRenderList(e);var r=t.pipelines.set(e.pipeline),n=P(e,i,n);r.calcMatrix.copyFrom(n.calc).translate(-e._displayOriginX,-e._displayOriginY);var s,n=i.alpha*e.alpha,o=e.width,a=e.height,h=e.cellWidth,l=e.cellHeight,c=Math.ceil(o/h),u=Math.ceil(a/l),d=h,p=l,f=h-(c*h-o),g=l-(u*l-a),i=e.showCells,m=e.showAltCells,y=e.showOutline,v=0,x=0,b=0;if(y&&(d--,p--,f===h&&f--,g===l&&g--),t.pipelines.preBatch(e),i&&0<e.fillAlpha)for(w=r.fillTint,s=_.getTintAppendFloatAlpha(e.fillColor,e.fillAlpha*n),w.TL=s,w.TR=s,w.BL=s,w.BR=s,x=0;x<u;x++)for(m&&(b=x%2),v=0;v<c;v++)m&&b?b=0:(b++,r.batchFillRect(v*h,x*l,v<c-1?d:f,x<u-1?p:g));if(m&&0<e.altFillAlpha)for(w=r.fillTint,s=_.getTintAppendFloatAlpha(e.altFillColor,e.altFillAlpha*n),w.TL=s,w.TR=s,w.BL=s,w.BR=s,x=0;x<u;x++)for(m&&(b=x%2),v=0;v<c;v++)!m||b?(b=0,r.batchFillRect(v*h,x*l,v<c-1?d:f,x<u-1?p:g)):b=1;if(y&&0<e.outlineFillAlpha){var i=r.strokeTint,w=_.getTintAppendFloatAlpha(e.outlineFillColor,e.outlineFillAlpha*n);for(i.TL=w,i.TR=w,i.BL=w,i.BR=w,v=1;v<c;v++){var T=v*h;r.batchLine(T,0,T,a,1,1,1,0,!1)}for(x=1;x<u;x++){var S=x*l;r.batchLine(0,S,o,S,1,1,1,0,!1)}}t.pipelines.postBatch(e)}},function(t,e,i){var S=i(48),P=i(60),_=i(30);t.exports=function(t,e,i,n){i.addToRenderList(e);var r=t.currentContext;if(_(t,r,e,i,n)){var s=-e._displayOriginX,o=-e._displayOriginY,t=i.alpha*e.alpha,a=e.width,h=e.height,l=e.cellWidth,c=e.cellHeight,u=Math.ceil(a/l),d=Math.ceil(h/c),p=l,f=c,g=l-(u*l-a),m=c-(d*c-h),n=e.showCells,y=e.showAltCells,i=e.showOutline,v=0,x=0,b=0;if(i&&(p--,f--,g===l&&g--,m===c&&m--),n&&0<e.fillAlpha)for(S(r,e),x=0;x<d;x++)for(y&&(b=x%2),v=0;v<u;v++)y&&b?b=0:(b++,r.fillRect(s+v*l,o+x*c,v<u-1?p:g,x<d-1?f:m));if(y&&0<e.altFillAlpha)for(S(r,e,e.altFillColor,e.altFillAlpha*t),x=0;x<d;x++)for(y&&(b=x%2),v=0;v<u;v++)!y||b?(b=0,r.fillRect(s+v*l,o+x*c,v<u-1?p:g,x<d-1?f:m)):b=1;if(i&&0<e.outlineFillAlpha){for(P(r,e,e.outlineFillColor,e.outlineFillAlpha*t),v=1;v<u;v++){var w=v*l;r.beginPath(),r.moveTo(w+s,o),r.lineTo(w+s,h+o),r.stroke()}for(x=1;x<d;x++){var T=x*c;r.beginPath(),r.moveTo(s,T+o),r.lineTo(s+a,T+o),r.stroke()}}r.restore()}}},function(t,e,i){i(1),i(1);var n=i(1110),i=i(1111);t.exports={renderWebGL:n,renderCanvas:i}},function(t,e,i){var y=i(19),v=i(12);t.exports=function(t,e,i,n){i.addToRenderList(e);var r,s,o,a,h,l,c,u,d,p=t.pipelines.set(e.pipeline),n=y(e,i,n),n=p.calcMatrix.copyFrom(n.calc),f=e.width,g=e.height,m=f/2,f=f/e.projection,i=i.alpha*e.alpha;e.isFilled&&(t.pipelines.preBatch(e),e.showTop&&(r=v.getTintAppendFloatAlpha(e.fillTop,i),s=n.getX(-m,-g),o=n.getY(-m,-g),a=n.getX(0,-f-g),h=n.getY(0,-f-g),l=n.getX(m,-g),c=n.getY(m,-g),u=n.getX(0,f-g),d=n.getY(0,f-g),p.batchQuad(e,s,o,a,h,l,c,u,d,0,0,1,1,r,r,r,r,2)),e.showLeft&&(r=v.getTintAppendFloatAlpha(e.fillLeft,i),s=n.getX(-m,0),o=n.getY(-m,0),a=n.getX(0,f),h=n.getY(0,f),l=n.getX(0,f-g),c=n.getY(0,f-g),u=n.getX(-m,-g),d=n.getY(-m,-g),p.batchQuad(e,s,o,a,h,l,c,u,d,0,0,1,1,r,r,r,r,2)),e.showRight&&(r=v.getTintAppendFloatAlpha(e.fillRight,i),s=n.getX(m,0),o=n.getY(m,0),a=n.getX(0,f),h=n.getY(0,f),l=n.getX(0,f-g),c=n.getY(0,f-g),u=n.getX(m,-g),d=n.getY(m,-g),p.batchQuad(e,s,o,a,h,l,c,u,d,0,0,1,1,r,r,r,r,2)),t.pipelines.postBatch(e))}},function(t,e,i){var s=i(48),o=i(30);t.exports=function(t,e,i,n){i.addToRenderList(e);var r=t.currentContext;o(t,r,e,i,n)&&e.isFilled&&(t=e.width,i=e.height,n=t/2,t=t/e.projection,e.showTop&&(s(r,e,e.fillTop),r.beginPath(),r.moveTo(-n,-i),r.lineTo(0,-t-i),r.lineTo(n,-i),r.lineTo(n,-1),r.lineTo(0,t-1),r.lineTo(-n,-1),r.lineTo(-n,-i),r.fill()),e.showLeft&&(s(r,e,e.fillLeft),r.beginPath(),r.moveTo(-n,0),r.lineTo(0,t),r.lineTo(0,t-i),r.lineTo(-n,-i),r.lineTo(-n,0),r.fill()),e.showRight&&(s(r,e,e.fillRight),r.beginPath(),r.moveTo(n,0),r.lineTo(0,t),r.lineTo(0,t-i),r.lineTo(n,-i),r.lineTo(n,0),r.fill()),r.restore())}},function(t,e,i){i(1),i(1);var n=i(1113),i=i(1114);t.exports={renderWebGL:n,renderCanvas:i}},function(t,e,i){var v=i(19),x=i(12);t.exports=function(t,e,i,n){i.addToRenderList(e);var r,s,o,a,h,l,c,u,d,p=t.pipelines.set(e.pipeline),n=v(e,i,n),n=p.calcMatrix.copyFrom(n.calc),f=e.width,g=e.height,m=f/2,f=f/e.projection,y=e.isReversed,i=i.alpha*e.alpha;e.isFilled&&(t.pipelines.preBatch(e),e.showTop&&y&&(r=x.getTintAppendFloatAlpha(e.fillTop,i),s=n.getX(-m,-g),o=n.getY(-m,-g),a=n.getX(0,-f-g),h=n.getY(0,-f-g),l=n.getX(m,-g),c=n.getY(m,-g),u=n.getX(0,f-g),d=n.getY(0,f-g),p.batchQuad(e,s,o,a,h,l,c,u,d,0,0,1,1,r,r,r,r,2)),e.showLeft&&(r=x.getTintAppendFloatAlpha(e.fillLeft,i),o=y?(s=n.getX(-m,-g),n.getY(-m,-g)):(s=n.getX(-m,0),n.getY(-m,0)),a=n.getX(0,f),h=n.getY(0,f),l=n.getX(0,f-g),c=n.getY(0,f-g),p.batchTri(e,s,o,a,h,l,c,0,0,1,1,r,r,r,2)),e.showRight&&(r=x.getTintAppendFloatAlpha(e.fillRight,i),o=y?(s=n.getX(m,-g),n.getY(m,-g)):(s=n.getX(m,0),n.getY(m,0)),a=n.getX(0,f),h=n.getY(0,f),l=n.getX(0,f-g),c=n.getY(0,f-g),p.batchTri(e,s,o,a,h,l,c,0,0,1,1,r,r,r,2)),t.pipelines.postBatch(e))}},function(t,e,i){var o=i(48),a=i(30);t.exports=function(t,e,i,n){i.addToRenderList(e);var r,s=t.currentContext;a(t,s,e,i,n)&&e.isFilled&&(t=e.width,i=e.height,n=t/2,t=t/e.projection,r=e.isReversed,e.showTop&&r&&(o(s,e,e.fillTop),s.beginPath(),s.moveTo(-n,-i),s.lineTo(0,-t-i),s.lineTo(n,-i),s.lineTo(0,t-i),s.fill()),e.showLeft&&(o(s,e,e.fillLeft),s.beginPath(),r?s.moveTo(-n,-i):s.moveTo(-n,0),s.lineTo(0,t),s.lineTo(0,t-i),s.fill()),e.showRight&&(o(s,e,e.fillRight),s.beginPath(),r?s.moveTo(n,-i):s.moveTo(n,0),s.lineTo(0,t),s.lineTo(0,t-i),s.fill()),s.restore())}},function(t,e,i){i(1),i(1);var n=i(1116),i=i(1117);t.exports={renderWebGL:n,renderCanvas:i}},function(t,e,i){var h=i(19),l=i(12);t.exports=function(t,e,i,n){i.addToRenderList(e);var r=t.pipelines.set(e.pipeline),n=h(e,i,n);r.calcMatrix.copyFrom(n.calc);var s,o=e._displayOriginX,a=e._displayOriginY,i=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isStroked&&(s=r.strokeTint,i=l.getTintAppendFloatAlpha(e.strokeColor,e.strokeAlpha*i),s.TL=i,s.TR=i,s.BL=i,s.BR=i,s=e._startWidth,i=e._endWidth,r.batchLine(e.geom.x1-o,e.geom.y1-a,e.geom.x2-o,e.geom.y2-a,s,i,1,0,!1,n.sprite,n.camera)),t.pipelines.postBatch(e)}},function(t,e,i){var s=i(60),o=i(30);t.exports=function(t,e,i,n){i.addToRenderList(e);var r=t.currentContext;o(t,r,e,i,n)&&(t=e._displayOriginX,i=e._displayOriginY,e.isStroked&&(s(r,e),r.beginPath(),r.moveTo(e.geom.x1-t,e.geom.y1-i),r.lineTo(e.geom.x2-t,e.geom.y2-i),r.stroke()),r.restore())}},function(t,e,i){i(1),i(1);var n=i(1119),i=i(1120);t.exports={renderWebGL:n,renderCanvas:i}},function(t,e,i){var a=i(114),h=i(19),l=i(81);t.exports=function(t,e,i,n){i.addToRenderList(e);var r=t.pipelines.set(e.pipeline),n=h(e,i,n),n=r.calcMatrix.copyFrom(n.calc),s=e._displayOriginX,o=e._displayOriginY,i=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&a(r,n,e,i,s,o),e.isStroked&&l(r,e,i,s,o),t.pipelines.postBatch(e)}},function(t,e,i){var d=i(48),p=i(60),f=i(30);t.exports=function(t,e,i,n){i.addToRenderList(e);var r=t.currentContext;if(f(t,r,e,i,n)){var s=e._displayOriginX,o=e._displayOriginY,a=e.pathData,h=a.length-1,t=a[0]-s,i=a[1]-o;r.beginPath(),r.moveTo(t,i),e.closePath||(h-=2);for(var l=2;l<h;l+=2){var c=a[l]-s,u=a[l+1]-o;r.lineTo(c,u)}r.closePath(),e.isFilled&&(d(r,e),r.fill()),e.isStroked&&(p(r,e),r.stroke()),r.restore()}}},function(t,e,i){i(1),i(1);var n=i(1122),i=i(1123);t.exports={renderWebGL:n,renderCanvas:i}},function(t,e,i){var h=i(19),l=i(81),c=i(12);t.exports=function(t,e,i,n){i.addToRenderList(e);var r=t.pipelines.set(e.pipeline),n=h(e,i,n);r.calcMatrix.copyFrom(n.calc);var s,o,n=e._displayOriginX,a=e._displayOriginY,i=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&(s=r.fillTint,o=c.getTintAppendFloatAlpha(e.fillColor,e.fillAlpha*i),s.TL=o,s.TR=o,s.BL=o,s.BR=o,r.batchFillRect(-n,-a,e.width,e.height)),e.isStroked&&l(r,e,i,n,a),t.pipelines.postBatch(e)}},function(t,e,i){var s=i(48),o=i(60),a=i(30);t.exports=function(t,e,i,n){i.addToRenderList(e);var r=t.currentContext;a(t,r,e,i,n)&&(t=e._displayOriginX,i=e._displayOriginY,e.isFilled&&(s(r,e),r.fillRect(-t,-i,e.width,e.height)),e.isStroked&&(o(r,e),r.beginPath(),r.rect(-t,-i,e.width,e.height),r.stroke()),r.restore())}},function(t,e,i){i(1),i(1);var n=i(1125),i=i(1126);t.exports={renderWebGL:n,renderCanvas:i}},function(t,e,i){var a=i(114),h=i(19),l=i(81);t.exports=function(t,e,i,n){i.addToRenderList(e);var r=t.pipelines.set(e.pipeline),n=h(e,i,n),n=r.calcMatrix.copyFrom(n.calc),s=e._displayOriginX,o=e._displayOriginY,i=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&a(r,n,e,i,s,o),e.isStroked&&l(r,e,i,s,o),t.pipelines.postBatch(e)}},function(t,e,i){var d=i(48),p=i(60),f=i(30);t.exports=function(t,e,i,n){i.addToRenderList(e);var r=t.currentContext;if(f(t,r,e,i,n)){var s=e._displayOriginX,o=e._displayOriginY,a=e.pathData,h=a.length-1,t=a[0]-s,i=a[1]-o;r.beginPath(),r.moveTo(t,i),e.closePath||(h-=2);for(var l=2;l<h;l+=2){var c=a[l]-s,u=a[l+1]-o;r.lineTo(c,u)}r.closePath(),e.isFilled&&(d(r,e),r.fill()),e.isStroked&&(p(r,e),r.stroke()),r.restore()}}},function(t,e,i){i(1),i(1);var n=i(1128),i=i(1129);t.exports={renderWebGL:n,renderCanvas:i}},function(t,e,i){var p=i(19),f=i(81),g=i(12);t.exports=function(t,e,i,n){i.addToRenderList(e);var r=t.pipelines.set(e.pipeline),n=p(e,i,n);r.calcMatrix.copyFrom(n.calc);var s,o,a,h,l,c,u=e._displayOriginX,d=e._displayOriginY,i=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&(s=r.fillTint,o=g.getTintAppendFloatAlpha(e.fillColor,e.fillAlpha*i),s.TL=o,s.TR=o,s.BL=o,s.BR=o,s=e.geom.x1-u,o=e.geom.y1-d,a=e.geom.x2-u,h=e.geom.y2-d,l=e.geom.x3-u,c=e.geom.y3-d,r.batchFillTriangle(s,o,a,h,l,c,n.sprite,n.camera)),e.isStroked&&f(r,e,i,u,d),t.pipelines.postBatch(e)}},function(t,e,i){var h=i(48),l=i(60),c=i(30);t.exports=function(t,e,i,n){i.addToRenderList(e);var r,s,o,a=t.currentContext;c(t,a,e,i,n)&&(t=e._displayOriginX,i=e._displayOriginY,n=e.geom.x1-t,r=e.geom.y1-i,s=e.geom.x2-t,o=e.geom.y2-i,t=e.geom.x3-t,i=e.geom.y3-i,a.beginPath(),a.moveTo(n,r),a.lineTo(s,o),a.lineTo(t,i),a.closePath(),e.isFilled&&(h(a,e),a.fill()),e.isStroked&&(l(a,e),a.stroke()),a.restore())}},function(t,e,i){var r=i(213);i(5).register("blitter",function(t,e,i,n){return this.displayList.add(new r(this.scene,t,e,i,n))})},function(t,e,i){var n=i(214);i(5).register("container",function(t,e,i){return this.displayList.add(new n(this.scene,t,e,i))})},function(t,e,i){var s=i(442);i(5).register("dom",function(t,e,i,n,r){t=new s(this.scene,t,e,i,n,r);return this.displayList.add(t),t})},function(t,e,i){var s=i(215);i(5).register("dynamicBitmapText",function(t,e,i,n,r){return this.displayList.add(new s(this.scene,t,e,i,n,r))})},function(t,e,i){var n=i(444);i(5).register("extern",function(){var t=new n(this.scene);return this.displayList.add(t),t})},function(t,e,i){var n=i(216);i(5).register("graphics",function(t){return this.displayList.add(new n(this.scene,t))})},function(t,e,i){var n=i(113);i(5).register("group",function(t,e){return this.updateList.add(new n(this.scene,t,e))})},function(t,e,i){var r=i(125);i(5).register("image",function(t,e,i,n){return this.displayList.add(new r(this.scene,t,e,i,n))})},function(t,e,i){var n=i(219);i(5).register("layer",function(t){return this.displayList.add(new n(this.scene,t))})},function(t,e,i){var n=i(5),r=i(220);n.register("particles",function(t,e,i){return this.displayList.add(new r(this.scene,t,e,i))})},function(t,e,i){var n=i(5),s=i(457);n.register("follower",function(t,e,i,n,r){t=new s(this.scene,t,e,i,n,r);return this.displayList.add(t),this.updateList.add(t),t})},function(t,e,i){var n=i(5),o=i(221);n.register("renderTexture",function(t,e,i,n,r,s){return this.displayList.add(new o(this.scene,t,e,i,n,r,s))})},function(t,e,i){var h=i(223);i(5).register("rope",function(t,e,i,n,r,s,o,a){return this.displayList.add(new h(this.scene,t,e,i,n,r,s,o,a))})},function(t,e,i){var n=i(5),r=i(73);n.register("sprite",function(t,e,i,n){t=new r(this.scene,t,e,i,n);return this.displayList.add(t),t})},function(t,e,i){var o=i(148);i(5).register("bitmapText",function(t,e,i,n,r,s){return this.displayList.add(new o(this.scene,t,e,i,n,r,s))})},function(t,e,i){var r=i(224);i(5).register("text",function(t,e,i,n){return this.displayList.add(new r(this.scene,t,e,i,n))})},function(t,e,i){var o=i(225);i(5).register("tileSprite",function(t,e,i,n,r,s){return this.displayList.add(new o(this.scene,t,e,i,n,r,s))})},function(t,e,i){var r=i(129);i(5).register("zone",function(t,e,i,n){return this.displayList.add(new r(this.scene,t,e,i,n))})},function(t,e,i){var n=i(226);i(5).register("video",function(t,e,i){return this.displayList.add(new n(this.scene,t,e,i))})},function(t,e,i){var h=i(461),i=i(5);i.register("arc",function(t,e,i,n,r,s,o,a){return this.displayList.add(new h(this.scene,t,e,i,n,r,s,o,a))}),i.register("circle",function(t,e,i,n,r){return this.displayList.add(new h(this.scene,t,e,i,0,360,!1,n,r))})},function(t,e,i){var n=i(5),s=i(462);n.register("curve",function(t,e,i,n,r){return this.displayList.add(new s(this.scene,t,e,i,n,r))})},function(t,e,i){var o=i(463);i(5).register("ellipse",function(t,e,i,n,r,s){return this.displayList.add(new o(this.scene,t,e,i,n,r,s))})},function(t,e,i){var n=i(5),c=i(464);n.register("grid",function(t,e,i,n,r,s,o,a,h,l){return this.displayList.add(new c(this.scene,t,e,i,n,r,s,o,a,h,l))})},function(t,e,i){var n=i(5),a=i(465);n.register("isobox",function(t,e,i,n,r,s,o){return this.displayList.add(new a(this.scene,t,e,i,n,r,s,o))})},function(t,e,i){var n=i(5),h=i(466);n.register("isotriangle",function(t,e,i,n,r,s,o,a){return this.displayList.add(new h(this.scene,t,e,i,n,r,s,o,a))})},function(t,e,i){var n=i(5),h=i(467);n.register("line",function(t,e,i,n,r,s,o,a){return this.displayList.add(new h(this.scene,t,e,i,n,r,s,o,a))})},function(t,e,i){var n=i(5),s=i(468);n.register("polygon",function(t,e,i,n,r){return this.displayList.add(new s(this.scene,t,e,i,n,r))})},function(t,e,i){var n=i(5),o=i(473);n.register("rectangle",function(t,e,i,n,r,s){return this.displayList.add(new o(this.scene,t,e,i,n,r,s))})},function(t,e,i){var a=i(474);i(5).register("star",function(t,e,i,n,r,s,o){return this.displayList.add(new a(this.scene,t,e,i,n,r,s,o))})},function(t,e,i){var n=i(5),c=i(475);n.register("triangle",function(t,e,i,n,r,s,o,a,h,l){return this.displayList.add(new c(this.scene,t,e,i,n,r,s,o,a,h,l))})},function(t,e,i){var r=i(213),s=i(28),n=i(16),o=i(13);n.register("blitter",function(t,e){var i=o(t=void 0===t?{}:t,"key",null),n=o(t,"frame",null),i=new r(this.scene,0,0,i,n);return void 0!==e&&(t.add=e),s(this.scene,i,t),i})},function(t,e,i){var s=i(28),o=i(214),n=i(16),a=i(13);n.register("container",function(t,e){var i=a(t=void 0===t?{}:t,"x",0),n=a(t,"y",0),r=a(t,"children",null),i=new o(this.scene,i,n,r);return void 0!==e&&(t.add=e),s(this.scene,i,t),i})},function(t,e,i){var s=i(215),o=i(28),n=i(16),a=i(13);n.register("dynamicBitmapText",function(t,e){var i=a(t=void 0===t?{}:t,"font",""),n=a(t,"text",""),r=a(t,"size",!1),i=new s(this.scene,0,0,i,n,r);return void 0!==e&&(t.add=e),o(this.scene,i,t),i})},function(t,e,i){var n=i(16),r=i(216);n.register("graphics",function(t,e){void 0===t&&(t={}),void 0!==e&&(t.add=e);e=new r(this.scene,t);return t.add&&this.scene.sys.displayList.add(e),e})},function(t,e,i){var n=i(16),r=i(113);n.register("group",function(t){return new r(this.scene,null,t)})},function(t,e,i){var r=i(28),n=i(16),s=i(13),o=i(125);n.register("image",function(t,e){var i=s(t=void 0===t?{}:t,"key",null),n=s(t,"frame",null),i=new o(this.scene,0,0,i,n);return void 0!==e&&(t.add=e),r(this.scene,i,t),i})},function(t,e,i){var n=i(28),r=i(219),s=i(16),o=i(13);s.register("layer",function(t,e){var i=o(t=void 0===t?{}:t,"children",null),i=new r(this.scene,i);return void 0!==e&&(t.add=e),n(this.scene,i,t),i})},function(t,e,i){var n=i(16),s=i(13),o=i(2),a=i(220);n.register("particles",function(t,e){var i=s(t=void 0===t?{}:t,"key",null),n=s(t,"frame",null),r=o(t,"emitters",null),i=new a(this.scene,i,n,r);return void 0!==e&&(t.add=e),(o(t,"add",!1)?this.displayList:this.updateList).add(i),i})},function(t,e,i){var h=i(28),n=i(16),l=i(13),c=i(221);n.register("renderTexture",function(t,e){var i=l(t=void 0===t?{}:t,"x",0),n=l(t,"y",0),r=l(t,"width",32),s=l(t,"height",32),o=l(t,"key",void 0),a=l(t,"frame",void 0),i=new c(this.scene,i,n,r,s,o,a);return void 0!==e&&(t.add=e),h(this.scene,i,t),i})},function(t,e,i){var h=i(28),n=i(16),l=i(13),c=i(6),u=i(223);n.register("rope",function(t,e){var i=l(t=void 0===t?{}:t,"key",null),n=l(t,"frame",null),r=l(t,"horizontal",!0),s=c(t,"points",void 0),o=c(t,"colors",void 0),a=c(t,"alphas",void 0),i=new u(this.scene,0,0,i,n,s,r,o,a);return void 0!==e&&(t.add=e),h(this.scene,i,t),t.add||this.updateList.add(i),i})},function(t,e,i){var r=i(28),s=i(439),n=i(16),o=i(13),a=i(73);n.register("sprite",function(t,e){var i=o(t=void 0===t?{}:t,"key",null),n=o(t,"frame",null),i=new a(this.scene,0,0,i,n);return void 0!==e&&(t.add=e),r(this.scene,i,t),s(i,t),i})},function(t,e,i){var o=i(148),a=i(28),n=i(16),h=i(13),l=i(6);n.register("bitmapText",function(t,e){var i=l(t=void 0===t?{}:t,"font",""),n=h(t,"text",""),r=h(t,"size",!1),s=l(t,"align",0),i=new o(this.scene,0,0,i,n,r,s);return void 0!==e&&(t.add=e),a(this.scene,i,t),i})},function(t,e,i){var s=i(28),n=i(16),o=i(13),a=i(224);n.register("text",function(t,e){var i=o(t=void 0===t?{}:t,"text",""),n=o(t,"style",null),r=o(t,"padding",null),r=(null!==r&&(n.padding=r),new a(this.scene,0,0,i,n));return void 0!==e&&(t.add=e),s(this.scene,r,t),r.autoRound=o(t,"autoRound",!0),r.resolution=o(t,"resolution",1),r})},function(t,e,i){var h=i(28),n=i(16),l=i(13),c=i(225);n.register("tileSprite",function(t,e){var i=l(t=void 0===t?{}:t,"x",0),n=l(t,"y",0),r=l(t,"width",512),s=l(t,"height",512),o=l(t,"key",""),a=l(t,"frame",""),i=new c(this.scene,i,n,r,s,o,a);return void 0!==e&&(t.add=e),h(this.scene,i,t),i})},function(t,e,i){var n=i(16),r=i(13),s=i(129);n.register("zone",function(t){var e=r(t,"x",0),i=r(t,"y",0),n=r(t,"width",1),t=r(t,"height",n);return new s(this.scene,e,i,n,t)})},function(t,e,i){var n=i(28),r=i(16),s=i(13),o=i(226);r.register("video",function(t,e){var i=s(t=void 0===t?{}:t,"key",null),i=new o(this.scene,0,0,i);return void 0!==e&&(t.add=e),n(this.scene,i,t),t.add||this.updateList.add(i),i})},function(t,e,i){i(1),i(1);var n=i(1177),i=i(1178);t.exports={renderWebGL:n,renderCanvas:i}},function(t,e,i){var r=i(19);t.exports=function(t,e,i,n){e.shader&&(i.addToRenderList(e),t.pipelines.clear(),e.renderToTexture?e.load():(i=r(e,i,n).calc,t.width===e._rendererWidth&&t.height===e._rendererHeight||e.projOrtho(0,t.width,t.height,0),e.load(i.matrix)),e.flush(),t.pipelines.rebind())}},function(t,e){t.exports=function(){}},function(t,e,i){i(1),i(1);var n=i(1180),i=i(1181);t.exports={renderWebGL:n,renderCanvas:i}},function(t,e,i){var A=i(19);t.exports=function(t,e,i,n){var r=e.faces,s=r.length;if(0!==s){i.addToRenderList(e);var o=t.pipelines.set(e.pipeline,e),n=A(e,i,n).calc,a=o.setGameObject(e),h=o.vertexViewF32,l=o.vertexViewU32,c=o.vertexCount*o.currentShader.vertexComponentCount-1,u=e.tintFill,d=[],p=e.debugCallback,f=n.a,g=n.b,m=n.c,y=n.d,v=n.e,x=n.f,b=e.viewPosition.z,w=e.hideCCW,T=i.roundPixels,S=i.alpha*e.alpha,P=0;t.pipelines.preBatch(e);for(var _=0;_<s;_++){var E=r[_];E.isInView(i,w,b,S,f,g,m,y,v,x,T)&&(o.shouldFlush(3)&&(o.flush(),c=0),c=E.load(h,l,c,a,u),P++,o.vertexCount+=3,p&&d.push(E))}e.totalFrame+=P,p&&p.call(e,e,d),t.pipelines.postBatch(e)}}},function(t,e){t.exports=function(){}},function(t,e,i){i(1);var n=i(1),i=i(1183);t.exports={renderWebGL:i,renderCanvas:n}},function(t,e,i){var m=i(19);t.exports=function(t,e,i,n){i.addToRenderList(e);var r=t.pipelines.set(e.pipeline),n=m(e,i,n).calc,s=e.width,o=e.height,a=-e._radius,h=-e._radius,s=a+s,o=h+o,l=n.getX(0,0),c=n.getY(0,0),u=n.getX(a,h),d=n.getY(a,h),p=n.getX(a,o),a=n.getY(a,o),f=n.getX(s,o),o=n.getY(s,o),g=n.getX(s,h),n=n.getY(s,h);t.pipelines.preBatch(e),r.batchPointLight(e,i,u,d,p,a,f,o,g,n,l,c),t.pipelines.postBatch(e)}},function(t,e,i){var a=i(229);i(5).register("shader",function(t,e,i,n,r,s,o){return this.displayList.add(new a(this.scene,t,e,i,n,r,s,o))})},function(t,e,i){var u=i(230);i(5).register("mesh",function(t,e,i,n,r,s,o,a,h,l,c){return this.displayList.add(new u(this.scene,t,e,i,n,r,s,o,a,h,l,c))})},function(t,e,i){var n=i(5),o=i(150);n.register("pointlight",function(t,e,i,n,r,s){return this.displayList.add(new o(this.scene,t,e,i,n,r,s))})},function(t,e,i){var a=i(28),n=i(16),h=i(13),l=i(229);n.register("shader",function(t,e){var i=h(t=void 0===t?{}:t,"key",null),n=h(t,"x",0),r=h(t,"y",0),s=h(t,"width",128),o=h(t,"height",128),i=new l(this.scene,i,n,r,s,o);return void 0!==e&&(t.add=e),a(this.scene,i,t),i})},function(t,e,i){var u=i(28),n=i(16),d=i(13),p=i(6),f=i(230);n.register("mesh",function(t,e){var i=d(t=void 0===t?{}:t,"key",null),n=d(t,"frame",null),r=p(t,"vertices",[]),s=p(t,"uvs",[]),o=p(t,"indicies",[]),a=p(t,"containsZ",!1),h=p(t,"normals",[]),l=p(t,"colors",16777215),c=p(t,"alphas",1),i=new f(this.scene,0,0,i,n,r,s,o,a,h,l,c);return void 0!==e&&(t.add=e),u(this.scene,i,t),i})},function(t,e,i){var o=i(28),n=i(16),a=i(13),h=i(150);n.register("pointlight",function(t,e){var i=a(t=void 0===t?{}:t,"color",16777215),n=a(t,"radius",128),r=a(t,"intensity",1),s=a(t,"attenuation",.1),i=new h(this.scene,0,0,i,n,r,s);return void 0!==e&&(t.add=e),o(this.scene,i,t),i})},function(t,e,i){var n=i(0),r=i(482),s=i(24),o=i(20),i=new n({Extends:r,initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once(o.BOOT,this.boot,this),r.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}});s.register("LightsPlugin",i,"lights"),t.exports=i},function(t,e,i){var n=i(65);n.Area=i(1192),n.Circumference=i(302),n.CircumferencePoint=i(169),n.Clone=i(1193),n.Contains=i(66),n.ContainsPoint=i(1194),n.ContainsRect=i(1195),n.CopyFrom=i(1196),n.Equals=i(1197),n.GetBounds=i(1198),n.GetPoint=i(300),n.GetPoints=i(301),n.Offset=i(1199),n.OffsetPoint=i(1200),n.Random=i(170),t.exports=n},function(t,e){t.exports=function(t){return 0<t.radius?Math.PI*t.radius*t.radius:0}},function(t,e,i){var n=i(65);t.exports=function(t){return new n(t.x,t.y,t.radius)}},function(t,e,i){var n=i(66);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(66);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)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.radius)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.radius===e.radius}},function(t,e,i){var n=i(10);t.exports=function(t,e){return(e=void 0===e?new n:e).x=t.left,e.y=t.top,e.width=t.diameter,e.height=t.diameter,e}},function(t,e){t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},function(t,e,i){var n=i(111);n.Area=i(1202),n.Circumference=i(447),n.CircumferencePoint=i(218),n.Clone=i(1203),n.Contains=i(112),n.ContainsPoint=i(1204),n.ContainsRect=i(1205),n.CopyFrom=i(1206),n.Equals=i(1207),n.GetBounds=i(1208),n.GetPoint=i(445),n.GetPoints=i(446),n.Offset=i(1209),n.OffsetPoint=i(1210),n.Random=i(180),t.exports=n},function(t,e){t.exports=function(t){return t.isEmpty()?0:t.getMajorRadius()*t.getMinorRadius()*Math.PI}},function(t,e,i){var n=i(111);t.exports=function(t){return new n(t.x,t.y,t.width,t.height)}},function(t,e,i){var n=i(112);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(112);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)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.width,t.height)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}},function(t,e,i){var n=i(10);t.exports=function(t,e){return(e=void 0===e?new n:e).x=t.left,e.y=t.top,e.width=t.width,e.height=t.height,e}},function(t,e){t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},function(t,e,i){var d=i(4),p=i(231);t.exports=function(t,e,i){var n,r,s,o,a,h,l,c,u;return void 0===i&&(i=[]),p(t,e)&&(n=t.x,r=t.y,t=t.radius,s=e.x,o=e.y,e=e.radius,r===o?0==(u=(c=-2*o)*c-4*(l=1)*(s*s+(a=(e*e-t*t-s*s+n*n)/(2*(n-s)))*a-2*s*a+o*o-e*e))?i.push(new d(a,-c/(2*l))):0<u&&(i.push(new d(a,(-c+Math.sqrt(u))/(2*l))),i.push(new d(a,(-c-Math.sqrt(u))/(2*l)))):0==(u=(c=2*r*(h=(n-s)/(r-o))-2*(e=(e*e-t*t-s*s+n*n-o*o+r*r)/(2*(r-o)))*h-2*n)*c-4*(l=h*h+1)*(n*n+r*r+e*e-t*t-2*r*e))?i.push(new d(a=-c/(2*l),e-a*h)):0<u&&(a=(-c+Math.sqrt(u))/(2*l),i.push(new d(a,e-a*h)),a=(-c-Math.sqrt(u))/(2*l),i.push(new d(a,e-a*h)))),i}},function(t,e,i){var o=i(232),a=i(151);t.exports=function(t,e,i){var n,r,s;return void 0===i&&(i=[]),a(t,e)&&(n=e.getLineA(),r=e.getLineB(),s=e.getLineC(),e=e.getLineD(),o(n,t,i),o(r,t,i),o(s,t,i),o(e,t,i)),i}},function(t,e,i){var a=i(140),h=i(487),l=new(i(47));function c(t,e,i,n,r){var s=Math.cos(t),o=Math.sin(t),e=(l.setTo(e,i,e+s,i+o),h(l,n));e&&r.push(new a(e.x,e.y,t,e.w))}function u(t,e){return t.z-e.z}t.exports=function(t,e,i){Array.isArray(i)||(i=[i]);for(var n=[],r=[],s=0;s<i.length;s++)for(var o=i[s].points,a=0;a<o.length;a++){var h=Math.atan2(o[a].y-e,o[a].x-t);-1===r.indexOf(h)&&(c(h,t,e,i,n),c(h-1e-5,t,e,i,n),c(h+1e-5,t,e,i,n),r.push(h))}return n.sort(u)}},function(t,e,i){var n=i(10),r=i(152);t.exports=function(t,e,i){return void 0===i&&(i=new n),r(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}},function(t,e,i){var o=i(234),a=i(152);t.exports=function(t,e,i){var n,r,s;return void 0===i&&(i=[]),a(t,e)&&(n=t.getLineA(),r=t.getLineB(),s=t.getLineC(),t=t.getLineD(),o(n,e,i),o(r,e,i),o(s,e,i),o(t,e,i)),i}},function(t,e,i){var s=i(489),o=i(234);t.exports=function(t,e,i){var n,r;return void 0===i&&(i=[]),s(t,e)&&(n=e.getLineA(),r=e.getLineB(),e=e.getLineC(),o(n,t,i),o(r,t,i),o(e,t,i)),i}},function(t,e,i){var s=i(232),o=i(491);t.exports=function(t,e,i){var n,r;return void 0===i&&(i=[]),o(t,e)&&(n=t.getLineA(),r=t.getLineB(),t=t.getLineC(),s(n,e,i),s(r,e,i),s(t,e,i)),i}},function(t,e,i){var s=i(494),o=i(492);t.exports=function(t,e,i){var n,r;return void 0===i&&(i=[]),s(t,e)&&(n=e.getLineA(),r=e.getLineB(),e=e.getLineC(),o(t,n,i),o(t,r,i),o(t,e,i)),i}},function(t,e,i){var s=i(496);t.exports=function(t,e){var i,n,r;return!!s(t,e)&&(i=Math.min(e.x1,e.x2),n=Math.max(e.x1,e.x2),r=Math.min(e.y1,e.y2),e=Math.max(e.y1,e.y2),t.x>=i&&t.x<=n&&t.y>=r&&t.y<=e)}},function(t,e){t.exports=function(t,e,i,n,r,s){return!(e>t.right+(s=void 0===s?0:s)||i<t.left-s||n>t.bottom+s||r<t.top-s)}},function(t,e,i){var n=i(47);n.Angle=i(97),n.BresenhamPoints=i(317),n.CenterOn=i(1222),n.Clone=i(1223),n.CopyFrom=i(1224),n.Equals=i(1225),n.Extend=i(1226),n.GetEasedPoints=i(1227),n.GetMidPoint=i(1228),n.GetNearestPoint=i(1229),n.GetNormal=i(1230),n.GetPoint=i(307),n.GetPoints=i(172),n.GetShortestDistance=i(1231),n.Height=i(1232),n.Length=i(67),n.NormalAngle=i(497),n.NormalX=i(1233),n.NormalY=i(1234),n.Offset=i(1235),n.PerpSlope=i(1236),n.Random=i(173),n.ReflectAngle=i(1237),n.Rotate=i(1238),n.RotateAroundPoint=i(1239),n.RotateAroundXY=i(236),n.SetToAngle=i(1240),n.Slope=i(1241),n.Width=i(1242),t.exports=n},function(t,e){t.exports=function(t,e,i){e-=(t.x1+t.x2)/2,i-=(t.y1+t.y2)/2;return t.x1+=e,t.y1+=i,t.x2+=e,t.y2+=i,t}},function(t,e,i){var n=i(47);t.exports=function(t){return new n(t.x1,t.y1,t.x2,t.y2)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x1,t.y1,t.x2,t.y2)}},function(t,e){t.exports=function(t,e){return t.x1===e.x1&&t.y1===e.y1&&t.x2===e.x2&&t.y2===e.y2}},function(t,e,i){var o=i(67);t.exports=function(t,e,i){void 0===i&&(i=e);var n=o(t),r=t.x2-t.x1,s=t.y2-t.y1;return e&&(t.x1=t.x1-r/n*e,t.y1=t.y1-s/n*e),i&&(t.x2=t.x2+r/n*i,t.y2=t.y2+s/n*i),t}},function(t,e,i){var y=i(352),v=i(80),x=i(4);t.exports=function(t,e,i,n,r){void 0===n&&(n=0);for(var s,o=[],a=t.x1,h=t.y1,l=t.x2-a,c=t.y2-h,u=v(e,r=void 0===r?[]:r),d=i-1,p=0;p<d;p++)s=u(p/d),o.push(new x(a+l*s,h+c*s));if(s=u(1),o.push(new x(a+l*s,h+c*s)),0<n){for(var f=o[0],g=[f],p=1;p<o.length-1;p++){var m=o[p];y(f,m)>=n&&(g.push(m),f=m)}t=o[o.length-1];return y(f,t)<n&&g.pop(),g.push(t),g}return o}},function(t,e,i){var n=i(4);t.exports=function(t,e){return(e=void 0===e?new n:e).x=(t.x1+t.x2)/2,e.y=(t.y1+t.y2)/2,e}},function(t,e,i){var a=i(4);t.exports=function(t,e,i){void 0===i&&(i=new a);var n=t.x1,r=t.y1,s=t.x2,t=t.y2,o=(s-n)*(s-n)+(t-r)*(t-r);return 0!=o&&(e=((e.x-n)*(s-n)+(e.y-r)*(t-r))/o,i.x=n+e*(s-n),i.y=r+e*(t-r)),i}},function(t,e,i){var n=i(14),r=i(97),s=i(4);t.exports=function(t,e){void 0===e&&(e=new s);t=r(t)-n.TAU;return e.x=Math.cos(t),e.y=Math.sin(t),e}},function(t,e){t.exports=function(t,e){var i=t.x1,n=t.y1,r=t.x2,t=t.y2,s=(r-i)*(r-i)+(t-n)*(t-n);return 0!=s&&(r=((n-e.y)*(r-i)-(i-e.x)*(t-n))/s,Math.abs(r)*Math.sqrt(s))}},function(t,e){t.exports=function(t){return Math.abs(t.y1-t.y2)}},function(t,e,i){var n=i(14),r=i(97);t.exports=function(t){return Math.cos(r(t)-n.TAU)}},function(t,e,i){var n=i(14),r=i(97);t.exports=function(t){return Math.sin(r(t)-n.TAU)}},function(t,e){t.exports=function(t,e,i){return t.x1+=e,t.y1+=i,t.x2+=e,t.y2+=i,t}},function(t,e){t.exports=function(t){return-((t.x2-t.x1)/(t.y2-t.y1))}},function(t,e,i){var n=i(97),r=i(497);t.exports=function(t,e){return 2*r(e)-Math.PI-n(t)}},function(t,e,i){var r=i(236);t.exports=function(t,e){var i=(t.x1+t.x2)/2,n=(t.y1+t.y2)/2;return r(t,i,n,e)}},function(t,e,i){var n=i(236);t.exports=function(t,e,i){return n(t,e.x,e.y,i)}},function(t,e){t.exports=function(t,e,i,n,r){return t.x1=e,t.y1=i,t.x2=e+Math.cos(n)*r,t.y2=i+Math.sin(n)*r,t}},function(t,e){t.exports=function(t){return(t.y2-t.y1)/(t.x2-t.x1)}},function(t,e){t.exports=function(t){return Math.abs(t.x1-t.x2)}},function(t,e,i){i={Face:i(116),GenerateGridVerts:i(1244),GenerateObjVerts:i(480),GenerateVerts:i(479),ParseObj:i(498),ParseObjMaterial:i(499),RotateFace:i(1245),Vertex:i(117)};t.exports=i},function(t,e,i){var J=i(116),Z=i(2),n=i(69),r=i(39),Q=i(117),$=new r,tt=new r,et=new n;t.exports=function(t){var e=Z(t,"mesh"),i=Z(t,"texture",null),n=Z(t,"frame"),r=Z(t,"width",1),s=Z(t,"height",r),o=Z(t,"widthSegments",1),a=Z(t,"heightSegments",o),h=Z(t,"x",0),l=Z(t,"y",0),c=Z(t,"z",0),u=Z(t,"rotateX",0),B=Z(t,"rotateY",0),F=Z(t,"rotateZ",0),N=Z(t,"zIsUp",!0),z=Z(t,"isOrtho",!!e&&e.dirtyCache[11]),d=Z(t,"colors",[16777215]),p=Z(t,"alphas",[1]),Y=Z(t,"tile",!1),X=Z(t,"flipY",!1),t=Z(t,"width",null),f={faces:[],verts:[]};if($.set(h,l,c),tt.set(u,B,F),et.fromRotationXYTranslation(tt,$,N),!i&&e)i=e.texture;else{if(!e||"string"!=typeof i)return f;i=e.scene.sys.textures.get(i)}var h=i.get(n),U=(!t&&z&&i&&e&&(r=h.width/e.height,s=h.height/e.height),r/2),V=s/2,g=Math.floor(o),m=Math.floor(a),y=g+1,G=m+1,j=r/g,W=s/m,v=[],x=[],b=0,w=1,T=0,S=1;h&&(b=h.u0,w=h.u1,S=X?(T=h.v1,h.v0):(T=h.v0,h.v1));for(var H=w-b,K=S-T,P=0;P<G;P++)for(var q=P*W-V,_=0;_<y;_++)x.push(_*j-U,-q),v.push(b+_/g*H,T+P/m*K);Array.isArray(d)||(d=[d]),Array.isArray(p)||(p=[p]);for(var E=0,A=0,P=0;P<m;P++)for(_=0;_<g;_++){var M=2*(_+y*P),k=2*(_+y*(P+1)),C=2*(_+1+y*(P+1)),O=2*(_+1+y*P),R=d[A],L=p[E],M=new Q(x[M],x[1+M],0,v[M],v[1+M],R,L).transformMat4(et),D=new Q(x[k],x[1+k],0,v[k],v[1+k],R,L).transformMat4(et),I=new Q(x[O],x[1+O],0,v[O],v[1+O],R,L).transformMat4(et),k=new Q(x[k],x[1+k],0,v[k],v[1+k],R,L).transformMat4(et),C=new Q(x[C],x[1+C],0,v[C],v[1+C],R,L).transformMat4(et),O=new Q(x[O],x[1+O],0,v[O],v[1+O],R,L).transformMat4(et);Y&&(M.setUVs(b,S),D.setUVs(b,T),I.setUVs(w,S),k.setUVs(b,T),C.setUVs(w,T),O.setUVs(w,S)),++A===d.length&&(A=0),++E===p.length&&(E=0),f.verts.push(M,D,I,k,C,O),f.faces.push(new J(M,D,I),new J(k,C,O))}return e&&(e.faces=e.faces.concat(f.faces),e.vertices=e.vertices.concat(f.verts)),f}},function(t,e){t.exports=function(t,e,i,n){void 0===i&&void 0===n&&(r=(i=t.getInCenter()).x,s=i.y);var r,s,n=Math.cos(e),i=Math.sin(e),e=t.vertex1,o=t.vertex2,t=t.vertex3,a=e.x-r,h=e.y-s;e.set(a*n-h*i+r,a*i+h*n+s),a=o.x-r,h=o.y-s,o.set(a*n-h*i+r,a*i+h*n+s),a=t.x-r,h=t.y-s,t.set(a*n-h*i+r,a*i+h*n+s)}},function(t,e,i){var n=i(4);n.Ceil=i(1247),n.Clone=i(1248),n.CopyFrom=i(1249),n.Equals=i(1250),n.Floor=i(1251),n.GetCentroid=i(1252),n.GetMagnitude=i(500),n.GetMagnitudeSq=i(501),n.GetRectangleFromPoints=i(1253),n.Interpolate=i(1254),n.Invert=i(1255),n.Negative=i(1256),n.Project=i(1257),n.ProjectUnit=i(1258),n.SetMagnitude=i(1259),t.exports=n},function(t,e){t.exports=function(t){return t.setTo(Math.ceil(t.x),Math.ceil(t.y))}},function(t,e,i){var n=i(4);t.exports=function(t){return new n(t.x,t.y)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y}},function(t,e){t.exports=function(t){return t.setTo(Math.floor(t.x),Math.floor(t.y))}},function(t,e,i){var r=i(4);t.exports=function(t,e){if(void 0===e&&(e=new r),!Array.isArray(t))throw new Error("GetCentroid points argument must be an array");var i=t.length;if(i<1)throw new Error("GetCentroid points array must not be empty");if(1===i)e.x=t[0].x,e.y=t[0].y;else{for(var n=0;n<i;n++)e.x+=t[n].x,e.y+=t[n].y;e.x/=i,e.y/=i}return e}},function(t,e,i){var h=i(10);t.exports=function(t,e){void 0===e&&(e=new h);for(var i=Number.NEGATIVE_INFINITY,n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY,s=Number.POSITIVE_INFINITY,o=0;o<t.length;o++){var a=t[o];a.x>i&&(i=a.x),a.x<n&&(n=a.x),a.y>r&&(r=a.y),a.y<s&&(s=a.y)}return e.x=n,e.y=s,e.width=i-n,e.height=r-s,e}},function(t,e,i){var r=i(4);t.exports=function(t,e,i,n){return void 0===i&&(i=0),(n=void 0===n?new r:n).x=t.x+(e.x-t.x)*i,n.y=t.y+(e.y-t.y)*i,n}},function(t,e){t.exports=function(t){return t.setTo(t.y,t.x)}},function(t,e,i){var n=i(4);t.exports=function(t,e){return(e=void 0===e?new n:e).setTo(-t.x,-t.y)}},function(t,e,i){var n=i(4),r=i(501);t.exports=function(t,e,i){void 0===i&&(i=new n);t=(t.x*e.x+t.y*e.y)/r(e);return 0!=t&&(i.x=t*e.x,i.y=t*e.y),i}},function(t,e,i){var n=i(4);t.exports=function(t,e,i){void 0===i&&(i=new n);t=t.x*e.x+t.y*e.y;return 0!=t&&(i.x=t*e.x,i.y=t*e.y),i}},function(t,e,i){var n=i(500);t.exports=function(t,e){var i;return 0===t.x&&0===t.y||(i=n(t),t.x/=i,t.y/=i),t.x*=e,t.y*=e,t}},function(t,e,i){var n=i(227);n.Clone=i(1261),n.Contains=i(228),n.ContainsPoint=i(1262),n.Earcut=i(59),n.GetAABB=i(469),n.GetNumberArray=i(1263),n.GetPoints=i(470),n.Perimeter=i(471),n.Reverse=i(1264),n.Simplify=i(1265),n.Smooth=i(472),n.Translate=i(1266),t.exports=n},function(t,e,i){var n=i(227);t.exports=function(t){return new n(t.points)}},function(t,e,i){var n=i(228);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e){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}},function(t,e){t.exports=function(t){return t.points.reverse(),t}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=1),void 0===i&&(i=!1);var n,r=t.points;return 2<r.length&&(e=e*e,i||(r=function(t,e){for(var i,n,r,s,o=t[0],a=[o],h=1,l=t.length;h<l;h++)r=o,0,e<(s=(n=i=t[h]).x-r.x)*s+(s=n.y-r.y)*s&&(a.push(i),o=i);return o!==i&&a.push(i),a}(r,e)),t.setTo((r=(i=r).length-1,n=[i[0]],function t(e,i,n,r,s){for(var o,a,h,l,c,u,d,p=r,f=i+1;f<n;f++){a=e[f],h=e[i],g=e[n],d=u=c=l=void 0,l=h.x,c=h.y,u=g.x-l,d=g.y-c,0===u&&0===d||(1<(h=((a.x-l)*u+(a.y-c)*d)/(u*u+d*d))?(l=g.x,c=g.y):0<h&&(l+=u*h,c+=d*h));var g=(u=a.x-l)*u+(d=a.y-c)*d;p<g&&(o=f,p=g)}r<p&&(1<o-i&&t(e,i,o,r,s),s.push(e[o]),1<n-o&&t(e,o,n,r,s))}(i,0,r,e,n),n.push(i[r]),n))),t}},function(t,e){t.exports=function(t,e,i){for(var n=t.points,r=0;r<n.length;r++)n[r].x+=e,n[r].y+=i;return t}},function(t,e){t.exports=function(t){return t.width*t.height}},function(t,e){t.exports=function(t){return t.x=Math.ceil(t.x),t.y=Math.ceil(t.y),t}},function(t,e){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}},function(t,e,i){var n=i(10);t.exports=function(t){return new n(t.x,t.y,t.width,t.height)}},function(t,e,i){var n=i(57);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.width,t.height)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}},function(t,e,i){var n=i(237);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)}},function(t,e,i){var n=i(237);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)}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t}},function(t,e){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}},function(t,e,i){var s=i(10);t.exports=function(t,e,i,n,r){return(r=void 0===r?new s:r).setTo(Math.min(t,i),Math.min(e,n),Math.abs(t-i),Math.abs(e-n))}},function(t,e,i){var n=i(4);t.exports=function(t,e){return(e=void 0===e?new n:e).x=t.centerX,e.y=t.centerY,e}},function(t,e,i){var n=i(4);t.exports=function(t,e){return(e=void 0===e?new n:e).x=t.width,e.y=t.height,e}},function(t,e,i){var s=i(190);t.exports=function(t,e,i){var n=t.centerX,r=t.centerY;return t.setSize(t.width+2*e,t.height+2*i),s(t,n,r)}},function(t,e,i){var n=i(10),r=i(152);t.exports=function(t,e,i){return void 0===i&&(i=new n),r(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}},function(t,e){t.exports=function(t,e){for(var i=t.x,n=t.right,r=t.y,s=t.bottom,o=0;o<e.length;o++)i=Math.min(i,e[o].x),n=Math.max(n,e[o].x),r=Math.min(r,e[o].y),s=Math.max(s,e[o].y);return t.x=i,t.y=r,t.width=n-i,t.height=s-r,t}},function(t,e){t.exports=function(t,e){var i=Math.min(t.x,e.x),n=Math.max(t.right,e.right),n=(t.x=i,t.width=n-i,Math.min(t.y,e.y)),i=Math.max(t.bottom,e.bottom);return t.y=n,t.height=i-n,t}},function(t,e){t.exports=function(t,e,i){var n=Math.min(t.x,e),e=Math.max(t.right,e),e=(t.x=n,t.width=e-n,Math.min(t.y,i)),n=Math.max(t.bottom,i);return t.y=e,t.height=n-e,t}},function(t,e){t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},function(t,e){t.exports=function(t,e){return t.x<e.right&&t.right>e.x&&t.y<e.bottom&&t.bottom>e.y}},function(t,e,i){var o=i(4),a=i(36);t.exports=function(t,e,i){void 0===i&&(i=new o),e=a(e);var n=Math.sin(e),e=Math.cos(e),r=0<e?t.width/2:t.width/-2,s=0<n?t.height/2:t.height/-2;return Math.abs(r*n)<Math.abs(s*e)?s=r*n/e:r=s*e/n,i.x=r+t.centerX,i.y=s+t.centerY,i}},function(t,e,i){var n=i(195),r=i(503),s=i(4);t.exports=function(t,e,i){if(void 0===i&&(i=new s),r(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}},function(t,e){t.exports=function(t,e){return t.width===e.width&&t.height===e.height}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=e),t.width*=e,t.height*=i,t}},function(t,e,i){var n=i(82);n.Area=i(1294),n.BuildEquilateral=i(1295),n.BuildFromPolygon=i(1296),n.BuildRight=i(1297),n.CenterOn=i(1298),n.Centroid=i(504),n.CircumCenter=i(1299),n.CircumCircle=i(1300),n.Clone=i(1301),n.Contains=i(115),n.ContainsArray=i(235),n.ContainsPoint=i(1302),n.CopyFrom=i(1303),n.Decompose=i(495),n.Equals=i(1304),n.GetPoint=i(476),n.GetPoints=i(477),n.InCenter=i(506),n.Perimeter=i(1305),n.Offset=i(505),n.Random=i(181),n.Rotate=i(1306),n.RotateAroundPoint=i(1307),n.RotateAroundXY=i(238),t.exports=n},function(t,e){t.exports=function(t){var e=t.x1,i=t.y1,n=t.x2,r=t.y2,s=t.x3,t=t.y3;return Math.abs(((s-e)*(r-i)-(n-e)*(t-i))/2)}},function(t,e,i){var r=i(82);t.exports=function(t,e,i){var n=i*(Math.sqrt(3)/2);return new r(t,e,t+i/2,e+n,t-i/2,e+n)}},function(t,e,i){var p=i(59),f=i(82);t.exports=function(t,e,i,n,r){void 0===i&&(i=1),void 0===n&&(n=1),void 0===r&&(r=[]);for(var s,o,a,h,l,c,u=p(t,e=void 0===e?null:e),d=0;d<u.length;d+=3)o=u[d],h=u[d+1],c=u[d+2],s=t[2*o]*i,o=t[2*o+1]*n,a=t[2*h]*i,h=t[2*h+1]*n,l=t[2*c]*i,c=t[2*c+1]*n,r.push(new f(s,o,a,h,l,c));return r}},function(t,e,i){var r=i(82);t.exports=function(t,e,i,n){return new r(t,e,t,e-(n=void 0===n?i:n),t+i,e)}},function(t,e,i){var r=i(504),s=i(505);t.exports=function(t,e,i,n){n=(n=void 0===n?r:n)(t),e-=n.x,i-=n.y;return s(t,e,i)}},function(t,e,i){var l=i(3);t.exports=function(t,e){void 0===e&&(e=new l);var i=t.x3,n=t.y3,r=t.x1-i,s=t.y1-n,o=t.x2-i,t=t.y2-n,a=2*(r*t-s*o),h=r*(o*o+t*t)-(r*r+s*s)*o;return e.x=i-(s*(o*o+t*t)-(r*r+s*s)*t)/a,e.y=n+h/a,e}},function(t,e,i){var v=i(65);t.exports=function(t,e){void 0===e&&(e=new v);var i,n,r,s,o=t.x1,a=t.y1,h=t.x2,l=t.y2,c=t.x3,t=t.y3,u=h-o,d=l-a,p=c-o,f=t-a,g=u*(o+h)+d*(a+l),m=p*(o+c)+f*(a+t),y=2*(u*(t-l)-d*(c-h));return Math.abs(y)<1e-6?(i=Math.min(o,h,c),n=Math.min(a,l,t),r=.5*(Math.max(o,h,c)-i),s=.5*(Math.max(a,l,t)-n),e.x=i+r,e.y=n+s):(e.x=(f*g-d*m)/y,e.y=(u*m-p*g)/y,r=e.x-o,s=e.y-a),e.radius=Math.sqrt(r*r+s*s),e}},function(t,e,i){var n=i(82);t.exports=function(t){return new n(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)}},function(t,e,i){var n=i(115);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)}},function(t,e){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}},function(t,e,i){var n=i(67);t.exports=function(t){var e=t.getLineA(),i=t.getLineB(),t=t.getLineC();return n(e)+n(i)+n(t)}},function(t,e,i){var n=i(238),r=i(506);t.exports=function(t,e){var i=r(t);return n(t,i.x,i.y,e)}},function(t,e,i){var n=i(238);t.exports=function(t,e,i){return n(t,e.x,e.y,i)}},function(t,e,i){var n=i(203),i=i(17)(!1,{CreatePixelPerfectHandler:i(507),CreateInteractiveObject:i(508),Events:i(51),Gamepad:i(1309),InputManager:i(409),InputPlugin:i(1321),InputPluginCache:i(153),Keyboard:i(1322),Mouse:i(1336),Pointer:i(412),Touch:i(1337)},n);t.exports=i},function(t,e,i){t.exports={Axis:i(509),Button:i(510),Events:i(239),Gamepad:i(511),GamepadPlugin:i(1316),Configs:i(1317)}},function(t,e){t.exports="down"},function(t,e){t.exports="up"},function(t,e){t.exports="connected"},function(t,e){t.exports="disconnected"},function(t,e){t.exports="down"},function(t,e){t.exports="up"},function(t,e,i){var n=i(0),r=i(9),s=i(239),a=i(511),o=i(6),h=i(153),l=i(51),i=new n({Extends:r,initialize:function(t){r.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=o(e,"gamepad",i.inputGamepad)&&t.device.input.gamepads,this.target=o(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(){function t(t){!t.defaultPrevented&&e.isActive()&&(e.refreshPads(),e.queue.push(t))}var e=this,i=this.target;this.onGamepadHandler=t,i.addEventListener("gamepadconnected",t,!1),i.addEventListener("gamepaddisconnected",t,!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=0;t<this.gamepads.length;t++)this.gamepads[t].removeAllListeners()},disconnectAll:function(){for(var t=0;t<this.gamepads.length;t++)this.gamepads[t].pad.connected=!1},refreshPads:function(){var t=navigator.getGamepads();if(t)for(var e=this.gamepads,i=0;i<t.length;i++){var n,r,s,o=t[i];o&&(s=o.id,(r=e[n=o.index])?r.id!==s?(r.destroy(),e[n]=new a(this,o)):r.update(o):(s=new a(this,o),e[n]=s,this._pad1?this._pad2?this._pad3?this._pad4||(this._pad4=s):this._pad3=s:this._pad2=s:this._pad1=s))}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],r=this.getPad(n.gamepad.index);"gamepadconnected"===n.type?this.emit(s.CONNECTED,r,n):"gamepaddisconnected"===n.type&&this.emit(s.DISCONNECTED,r,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",i,"gamepad","gamepad","inputGamepad"),t.exports=i},function(t,e,i){t.exports={DUALSHOCK_4:i(1318),SNES_USB:i(1319),XBOX_360:i(1320)}},function(t,e){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}},function(t,e){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}},function(t,e){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}},function(t,e,i){var s=i(65),o=i(66),n=i(0),a=i(203),p=i(508),r=i(507),h=i(50),l=i(111),c=i(112),g=i(51),u=i(9),f=i(2),d=i(56),m=i(153),y=i(7),v=i(24),x=i(10),b=i(57),w=i(20),T=i(82),S=i(115),i=new n({Extends:u,initialize:function(t){u.call(this),this.scene=t,this.systems=t.sys,this.settings=t.sys.settings,this.manager=t.sys.game.input,this.pluginEvents=new u,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(g.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(g.GAME_OUT,this.onGameOut,this),this.manager.events.on(g.GAME_OVER,this.onGameOver,this),this.enabled=!0,this._dragState=[0,0,0,0,0,0,0,0,0,0],this.pluginEvents.emit(g.START)},onGameOver:function(t){this.isActive()&&this.emit(g.GAME_OVER,t.timeStamp,t)},onGameOut:function(t){this.isActive()&&this.emit(g.GAME_OUT,t.timeStamp,t)},preUpdate:function(){this.pluginEvents.emit(g.PRE_UPDATE);var t=this._pendingRemoval,e=this._pendingInsertion,i=t.length,n=e.length;if(0!==i||0!==n){for(var r=this._list,s=0;s<i;s++){var o=t[s],a=r.indexOf(o);-1<a&&(r.splice(a,1),this.clear(o,!0))}t.length=0,this._pendingRemoval.length=0,this._list=r.concat(e.splice(0))}},isActive:function(){return this.enabled&&this.scene.sys.isActive()},updatePoll:function(t,e){if(!this.isActive())return!1;if(this.pluginEvents.emit(g.UPDATE,t,e),this._updatedThisFrame)return this._updatedThisFrame=!1;for(var i=this.manager,n=i.pointers,r=i.pointersTotal,s=0;s<r;s++)n[s].updateMotion();if(0===this._list.length)return!1;i=this.pollRate;if(-1===i)return!1;if(0<i){if(this._pollTimer-=e,!(this._pollTimer<0))return!1;this._pollTimer=this.pollRate}for(var o=!1,s=0;s<r;s++){var a=0,h=n[s];this._tempZones=[],this._temp=this.hitTestPointer(h),this.sortGameObjects(this._temp,h),this.sortDropZones(this._tempZones),this.topOnly&&(this._temp.length&&this._temp.splice(1),this._tempZones.length&&this._tempZones.splice(1)),a+=this.processOverOutEvents(h),2===this.getDragState(h)&&this.processDragThresholdEvent(h,t),0<a&&(o=!0)}return o},update:function(t,e){if(!this.isActive())return!1;for(var i=e.length,n=!1,r=0;r<i;r++){var s=0,o=e[r];switch(this._tempZones=[],this._temp=this.hitTestPointer(o),this.sortGameObjects(this._temp,o),this.sortDropZones(this._tempZones),this.topOnly&&(this._temp.length&&this._temp.splice(1),this._tempZones.length&&this._tempZones.splice(1)),t){case a.MOUSE_DOWN:s=(s=(s+=this.processDragDownEvent(o))+this.processDownEvents(o))+this.processOverOutEvents(o);break;case a.MOUSE_UP:s=(s=(s+=this.processDragUpEvent(o))+this.processUpEvents(o))+this.processOverOutEvents(o);break;case a.TOUCH_START:s=(s=(s+=this.processDragDownEvent(o))+this.processDownEvents(o))+this.processOverEvents(o);break;case a.TOUCH_END:case a.TOUCH_CANCEL:s=(s=(s+=this.processDragUpEvent(o))+this.processUpEvents(o))+this.processOutEvents(o);break;case a.MOUSE_MOVE:case a.TOUCH_MOVE:s=(s=(s+=this.processDragMoveEvent(o))+this.processMoveEvents(o))+this.processOverOutEvents(o);break;case a.MOUSE_WHEEL:s+=this.processWheelEvent(o)}0<s&&(n=!0)}return this._updatedThisFrame=!0,n},clear:function(t,e){void 0===e&&(e=!1);var i=t.input;if(i)return e||this.queueForRemoval(t),i.gameObject=void 0,i.target=void 0,i.hitArea=void 0,i.hitAreaCallback=void 0,i.callbackContext=void 0,t.input=null,-1<(e=this._draggable.indexOf(t))&&this._draggable.splice(e,1),-1<(e=this._drag[0].indexOf(t))&&this._drag[0].splice(e,1),-1<(e=this._over[0].indexOf(t))&&(this._over[0].splice(e,1),this.manager.resetCursor(i)),t},disable:function(t){t.input.enabled=!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],r=this.manager.hitTest(t,this._list,n),s=0;s<r.length;s++){var o=r[s];o.input.dropZone&&this._tempZones.push(o)}if(0<r.length)return t.camera=n,r}return t.camera=e[0],[]},processDownEvents:function(t){for(var e=0,i=this._temp,n=this._eventData,r=this._eventContainer,s=n.cancelled=!1,o=0;o<i.length;o++){var a=i[o];if(a.input){if(e++,a.emit(g.GAMEOBJECT_POINTER_DOWN,t,a.input.localX,a.input.localY,r),n.cancelled||!a.input){s=!0;break}if(this.emit(g.GAMEOBJECT_DOWN,t,a,r),n.cancelled||!a.input){s=!0;break}}}return!s&&this.manager&&(t.downElement===this.manager.game.canvas?this.emit(g.POINTER_DOWN,t,i):this.emit(g.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,r=this.dragDistanceThreshold;if(i=0<r&&h(t.x,t.y,t.downX,t.downY)>=r||0<n&&e>=t.downTime+n?!0:i)return this.setDragState(t,3),this.processDragStartList(t)},processDragStartList:function(t){if(3!==this.getDragState(t))return 0;for(var e=this._drag[t.id],i=0;i<e.length;i++){var n=e[i],r=n.input;r.dragState=2,r.dragStartX=n.x,r.dragStartY=n.y,r.dragStartXGlobal=t.worldX,r.dragStartYGlobal=t.worldY,r.dragX=r.dragStartXGlobal-r.dragStartX,r.dragY=r.dragStartYGlobal-r.dragStartY,n.emit(g.GAMEOBJECT_DRAG_START,t,r.dragX,r.dragY),this.emit(g.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 r=e[n];r.input.draggable&&0===r.input.dragState&&i.push(r)}return 0===i.length?(this.setDragState(t,0),0):(1<i.length&&(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;for(var e=this._tempZones,i=this._drag[t.id],n=0;n<i.length;n++){var r,s,o,a=i[n],h=a.input,l=h.target;l?0===(r=e.indexOf(l))?(a.emit(g.GAMEOBJECT_DRAG_OVER,t,l),this.emit(g.DRAG_OVER,t,a,l)):0<r?(a.emit(g.GAMEOBJECT_DRAG_LEAVE,t,l),this.emit(g.DRAG_LEAVE,t,a,l),h.target=e[0],l=h.target,a.emit(g.GAMEOBJECT_DRAG_ENTER,t,l),this.emit(g.DRAG_ENTER,t,a,l)):(a.emit(g.GAMEOBJECT_DRAG_LEAVE,t,l),this.emit(g.DRAG_LEAVE,t,a,l),e[0]?(h.target=e[0],l=h.target,a.emit(g.GAMEOBJECT_DRAG_ENTER,t,l),this.emit(g.DRAG_ENTER,t,a,l)):h.target=null):!l&&e[0]&&(h.target=e[0],l=h.target,a.emit(g.GAMEOBJECT_DRAG_ENTER,t,l),this.emit(g.DRAG_ENTER,t,a,l)),o=a.parentContainer?(r=t.worldX-h.dragStartXGlobal,l=t.worldY-h.dragStartYGlobal,s=a.getParentRotation(),o=r*Math.cos(s)+l*Math.sin(s),l=l*Math.cos(s)-r*Math.sin(s),o*=1/a.parentContainer.scaleX,l*=1/a.parentContainer.scaleY,s=o+h.dragStartX,l+h.dragStartY):(s=t.worldX-h.dragX,t.worldY-h.dragY),a.emit(g.GAMEOBJECT_DRAG,t,s,o),this.emit(g.DRAG,t,a,s,o)}return i.length},processDragUpEvent:function(t){for(var e=this._drag[t.id],i=0;i<e.length;i++){var n,r,s=e[i],o=s.input;o&&2===o.dragState&&(o.dragState=0,o.dragX=o.localX-s.displayOriginX,o.dragY=o.localY-s.displayOriginY,n=!1,(r=o.target)&&(s.emit(g.GAMEOBJECT_DROP,t,r),this.emit(g.DROP,t,s,r),n=!(o.target=null)),s.input&&(s.emit(g.GAMEOBJECT_DRAG_END,t,o.dragX,o.dragY,n),this.emit(g.DRAG_END,t,s,n)))}return this.setDragState(t,0),e.splice(0),0},processMoveEvents:function(t){for(var e=0,i=this._temp,n=this._eventData,r=this._eventContainer,s=n.cancelled=!1,o=0;o<i.length;o++){var a=i[o];if(a.input){if(e++,a.emit(g.GAMEOBJECT_POINTER_MOVE,t,a.input.localX,a.input.localY,r),n.cancelled||!a.input){s=!0;break}if(this.emit(g.GAMEOBJECT_MOVE,t,a,r),n.cancelled||!a.input){s=!0;break}if(this.topOnly)break}}return s||this.emit(g.POINTER_MOVE,t,i),e},processWheelEvent:function(t){for(var e=0,i=this._temp,n=this._eventData,r=this._eventContainer,s=n.cancelled=!1,o=t.deltaX,a=t.deltaY,h=t.deltaZ,l=0;l<i.length;l++){var c=i[l];if(c.input){if(e++,c.emit(g.GAMEOBJECT_POINTER_WHEEL,t,o,a,h,r),n.cancelled||!c.input){s=!0;break}if(this.emit(g.GAMEOBJECT_WHEEL,t,c,o,a,h,r),n.cancelled||!c.input){s=!0;break}}}return s||this.emit(g.POINTER_WHEEL,t,i,o,a,h),e},processOverEvents:function(t){var e=this._temp,i=0,n=e.length,r=[];if(0<n){for(var s=this.manager,o=this._eventData,a=this._eventContainer,h=o.cancelled=!1,l=0;l<n;l++){var c=e[l];if(c.input){if(r.push(c),s.setCursor(c.input),c.emit(g.GAMEOBJECT_POINTER_OVER,t,c.input.localX,c.input.localY,a),i++,o.cancelled||!c.input){h=!0;break}if(this.emit(g.GAMEOBJECT_OVER,t,c,a),o.cancelled||!c.input){h=!0;break}}}h||this.emit(g.POINTER_OVER,t,r)}return this._over[t.id]=r,i},processOutEvents:function(t){var e=this._over[t.id],i=0,n=e.length;if(0<n){var r=this.manager,s=this._eventData,o=this._eventContainer,a=s.cancelled=!1;this.sortGameObjects(e,t);for(var h=0;h<n;h++){var l=e[h];if((l=e[h]).input){if(r.resetCursor(l.input),l.emit(g.GAMEOBJECT_POINTER_OUT,t,o),i++,s.cancelled||!l.input){a=!0;break}if(this.emit(g.GAMEOBJECT_OUT,t,l,o),s.cancelled||!l.input){a=!0;break}a||this.emit(g.POINTER_OUT,t,e)}}this._over[t.id]=[]}return i},processOverOutEvents:function(t){for(var e,i=this._temp,n=[],r=[],s=[],o=this._over[t.id],a=this._drag[t.id],h=this.manager,l=0;l<o.length;l++)e=o[l],(-1===i.indexOf(e)&&-1===a.indexOf(e)?n:s).push(e);for(l=0;l<i.length;l++)e=i[l],-1===o.indexOf(e)&&r.push(e);var c=n.length,u=0,d=this._eventData,p=this._eventContainer,f=d.cancelled=!1;if(0<c){for(this.sortGameObjects(n,t),l=0;l<c;l++)if((e=n[l]).input){if(h.resetCursor(e.input),e.emit(g.GAMEOBJECT_POINTER_OUT,t,p),u++,d.cancelled||!e.input){f=!0;break}if(this.emit(g.GAMEOBJECT_OUT,t,e,p),d.cancelled||!e.input){f=!0;break}}f||this.emit(g.POINTER_OUT,t,n)}if(c=r.length,f=d.cancelled=!1,0<c){for(this.sortGameObjects(r,t),l=0;l<c;l++)if((e=r[l]).input){if(h.setCursor(e.input),e.emit(g.GAMEOBJECT_POINTER_OVER,t,e.input.localX,e.input.localY,p),u++,d.cancelled||!e.input){f=!0;break}if(this.emit(g.GAMEOBJECT_OVER,t,e,p),d.cancelled||!e.input){f=!0;break}}f||this.emit(g.POINTER_OVER,t,r)}return o=s.concat(r),this._over[t.id]=this.sortGameObjects(o,t),u},processUpEvents:function(t){for(var e=this._temp,i=this._eventData,n=this._eventContainer,r=i.cancelled=!1,s=0;s<e.length;s++){var o=e[s];if(o.input){if(o.emit(g.GAMEOBJECT_POINTER_UP,t,o.input.localX,o.input.localY,n),i.cancelled||!o.input){r=!0;break}if(this.emit(g.GAMEOBJECT_UP,t,o,n),i.cancelled||!o.input){r=!0;break}}}return!r&&this.manager&&(t.upElement===this.manager.game.canvas?this.emit(g.POINTER_UP,t,e):this.emit(g.POINTER_UP_OUTSIDE,t)),e.length},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],r=(n.input.draggable=e,this._draggable.indexOf(n));e&&-1===r?this._draggable.push(n):!e&&-1<r&&this._draggable.splice(r,1)}return this},makePixelPerfect:function(t){var e=this.systems.textures;return r(e,t=void 0===t?1:t)},setHitArea:function(t,e,i){if(void 0===e)return this.setHitAreaFromTexture(t);Array.isArray(t)||(t=[t]);var n,r=!1,s=!1,o=!1,a=!1,h=!1,l=!0;y(e)?(e=f(n=e,"hitArea",null),i=f(n,"hitAreaCallback",null),r=f(n,"draggable",!1),s=f(n,"dropZone",!1),o=f(n,"cursor",!1),a=f(n,"useHandCursor",!1),h=f(n,"pixelPerfect",!1),n=f(n,"alphaTolerance",1),h&&(e={},i=this.makePixelPerfect(n)),e&&i||(this.setHitAreaFromTexture(t),l=!1)):"function"!=typeof e||i||(i=e,e={});for(var c=0;c<t.length;c++){var u,d=t[c];h&&"Container"===d.type||((u=d.input||p(d,e,i)).customHitArea=l,u.dropZone=s,u.cursor=a?"pointer":o,d.input=u,r&&this.setDraggable(d),this.queueForInsertion(d))}return this},setHitAreaCircle:function(t,e,i,n,r){void 0===r&&(r=o);e=new s(e,i,n);return this.setHitArea(t,e,r)},setHitAreaEllipse:function(t,e,i,n,r,s){void 0===s&&(s=c);e=new l(e,i,n,r);return this.setHitArea(t,e,s)},setHitAreaFromTexture:function(t,e){void 0===e&&(e=b),Array.isArray(t)||(t=[t]);for(var i=0;i<t.length;i++){var n=t[i],r=n.frame,s=0,o=0;n.width?(s=n.width,o=n.height):r&&(s=r.realWidth,o=r.realHeight),"Container"===n.type&&(0===s||0===o)||0!==s&&0!==o&&(n.input=p(n,new x(0,0,s,o),e),this.queueForInsertion(n))}return this},setHitAreaRectangle:function(t,e,i,n,r,s){void 0===s&&(s=b);e=new x(e,i,n,r);return this.setHitArea(t,e,s)},setHitAreaTriangle:function(t,e,i,n,r,s,o,a){void 0===a&&(a=S);e=new T(e,i,n,r,s,o);return this.setHitArea(t,e,a)},enableDebug:function(o,a){void 0===a&&(a=65280);var t=o.input;if(t&&t.hitArea){var e=t.hitArea,i=e.type,h=t.hitAreaDebug,n=this.systems.add,r=this.systems.updateList,l=(h&&(r.remove(h),h.destroy(),h=null),0),c=0;switch(i){case d.CIRCLE:h=n.arc(0,0,e.radius),l=e.x-e.radius,c=e.y-e.radius;break;case d.ELLIPSE:h=n.ellipse(0,0,e.width,e.height),l=e.x-e.width/2,c=e.y-e.height/2;break;case d.LINE:h=n.line(0,0,e.x1,e.y1,e.x2,e.y2);break;case d.POLYGON:h=n.polygon(0,0,e.points);break;case d.RECTANGLE:h=n.rectangle(0,0,e.width,e.height),l=e.x,c=e.y;break;case d.TRIANGLE:h=n.triangle(0,0,e.x1,e.y1,e.x2,e.y2,e.x3,e.y3)}h&&(h.isFilled=!1,h.preUpdate=function(){h.setStrokeStyle(1/o.scale,a),h.setDisplayOrigin(o.displayOriginX,o.displayOriginY);var t,e=o.x,i=o.y,n=o.rotation,r=o.scaleX,s=o.scaleY;o.parentContainer&&(e=(t=o.getWorldTransformMatrix()).tx,i=t.ty,n=t.rotation,r=t.scaleX,s=t.scaleY),h.setRotation(n),h.setScale(r,s),h.setPosition(e+l,i+c),h.setScrollFactor(o.scrollFactorX,o.scrollFactorY),h.setDepth(o.depth)},r.add(h),t.hitAreaDebug=h)}return this},removeDebug:function(t){var e,t=t.input;return t&&t.hitAreaDebug&&(e=t.hitAreaDebug,this.systems.updateList.remove(e),e.destroy(),t.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){var i;return t.length<2?t:(i=e.camera.renderList,t.sort(function(t,e){return i.indexOf(e)-i.indexOf(t)}))},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){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(),r=Math.min(i.length,n.length),s=0;s<r;s++){var o=i[s],a=n[s];if(o!==a)return a-o}return n.length-i.length}return this.displayList.getIndex(e)-this.displayList.getIndex(t)},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(g.SHUTDOWN),this._temp.length=0,this._list.length=0,this._draggable.length=0,this._pendingRemoval.length=0,this._pendingInsertion.length=0;for(var t=this._dragState.length=0;t<10;t++)this._drag[t]=[],this._over[t]=[];this.removeAllListeners();var e=this.manager,i=(e.canvas.style.cursor=e.defaultCursor,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(g.GAME_OUT,this.onGameOut,this),e.events.off(g.GAME_OVER,this.onGameOver,this),i.off(w.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.pluginEvents.emit(g.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]}}});v.register("InputPlugin",i,"input"),t.exports=i},function(t,e,i){t.exports={Events:i(154),KeyboardManager:i(410),KeyboardPlugin:i(1330),Key:i(512),KeyCodes:i(143),KeyCombo:i(513),AdvanceKeyCombo:i(515),ProcessKeyCombo:i(514),ResetKeyCombo:i(516),JustDown:i(1332),JustUp:i(1333),DownDuration:i(1334),UpDuration:i(1335)}},function(t,e){t.exports="keydown"},function(t,e){t.exports="keyup"},function(t,e){t.exports="keycombomatch"},function(t,e){t.exports="down"},function(t,e){t.exports="keydown-"},function(t,e){t.exports="keyup-"},function(t,e){t.exports="up"},function(t,e,i){var n=i(0),r=i(9),h=i(154),s=i(22),o=i(6),a=i(51),l=i(153),c=i(512),u=i(143),d=i(513),p=i(1331),f=i(20),g=i(76),i=new n({Extends:r,initialize:function(t){r.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(a.BOOT,this.boot,this),t.pluginEvents.on(a.START,this.start,this)},boot:function(){var t=this.settings.input,t=(this.enabled=o(t,"keyboard",!0),o(t,"keyboard.capture",null));t&&this.addCaptures(t),this.sceneInputPlugin.pluginEvents.once(a.DESTROY,this.destroy,this)},start:function(){this.sceneInputPlugin.manager.events.on(a.MANAGER_PROCESS,this.update,this),this.sceneInputPlugin.pluginEvents.once(a.SHUTDOWN,this.shutdown,this),this.game.events.on(s.BLUR,this.resetKeys,this),this.scene.sys.events.on(f.PAUSE,this.resetKeys,this),this.scene.sys.events.on(f.SLEEP,this.resetKeys,this)},isActive:function(){return this.enabled&&this.scene.sys.isActive()},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:u.UP,down:u.DOWN,left:u.LEFT,right:u.RIGHT,space:u.SPACE,shift:u.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 r=0;r<t.length;r++){var s=t[r].trim();s&&(n[s]=this.addKey(s,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,r=this.keys;return t instanceof c?(-1<(n=r.indexOf(t))?r[n]=t:r[t.keyCode]=t,e&&this.addCapture(t.keyCode),t.setEmitOnRepeat(i),t):(r[t="string"==typeof t?u[t.toUpperCase()]:t]||(r[t]=new c(this,t),e&&this.addCapture(t),r[t].setEmitOnRepeat(i)),r[t])},removeKey:function(t,e){void 0===e&&(e=!1);var i,n,r=this.keys;return t instanceof c?-1<(n=r.indexOf(t))&&(i=this.keys[n],this.keys[n]=void 0):"string"==typeof t&&(t=u[t.toUpperCase()]),r[t]&&(i=r[t],r[t]=void 0),i&&(i.plugin=null,e&&i.destroy()),this},removeAllKeys:function(t){for(var e=this.keys,i=0;i<e.length;i++){var n=e[i];n&&(e[i]=void 0,t&&n.destroy())}return this},createCombo:function(t,e){return new d(this,t,e)},checkDown:function(t,e){if(void 0===e&&(e=0),this.enabled&&t.isDown){e=g(this.time-t.timeDown,e);if(e>t._tick)return t._tick=e,!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 r=t[n],s=r.keyCode,o=i[s],a=!1;void 0===r.cancelled&&(r.cancelled=0,r.stopImmediatePropagation=function(){r.cancelled=1},r.stopPropagation=function(){r.cancelled=-1}),-1===r.cancelled||s===this.prevCode&&r.timeStamp===this.prevTime&&r.type===this.prevType||(this.prevCode=s,this.prevTime=r.timeStamp,this.prevType=r.type,"keydown"===r.type?(o&&(a=o.isDown,o.onDown(r)),r.cancelled||o&&a||(p[s]&&this.emit(h.KEY_DOWN+p[s],r),r.cancelled||this.emit(h.ANY_KEY_DOWN,r))):(o&&o.onUp(r),r.cancelled||(p[s]&&this.emit(h.KEY_UP+p[s],r),r.cancelled||this.emit(h.ANY_KEY_UP,r))),1===r.cancelled&&(r.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(a.MANAGER_PROCESS,this.update,this),this.game.events.off(s.BLUR,this.resetKeys),this.scene.sys.events.off(f.PAUSE,this.resetKeys,this),this.scene.sys.events.off(f.SLEEP,this.resetKeys,this),this.queue=[]},destroy:function(){this.shutdown();for(var 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",i,"keyboard","keyboard","inputKeyboard"),t.exports=i},function(t,e,i){var n,r=i(143),s={};for(n in r)s[r[n]]=n;t.exports=s},function(t,e){t.exports=function(t){return!!t._justDown&&!(t._justDown=!1)}},function(t,e){t.exports=function(t){return!!t._justUp&&!(t._justUp=!1)}},function(t,e){t.exports=function(t,e){void 0===e&&(e=50);var i=t.plugin.game.loop.time-t.timeDown;return t.isDown&&i<e}},function(t,e){t.exports=function(t,e){void 0===e&&(e=50);var i=t.plugin.game.loop.time-t.timeUp;return t.isUp&&i<e}},function(t,e,i){t.exports={MouseManager:i(411)}},function(t,e,i){t.exports={TouchManager:i(413)}},function(t,e,i){var n=i(21),i=i(17)(!1,{Events:i(95),FileTypes:i(1339),File:i(23),FileTypesManager:i(8),GetURL:i(155),LoaderPlugin:i(1365),MergeXHRSettings:i(240),MultiFile:i(49),XHRLoader:i(517),XHRSettings:i(156)},n);t.exports=i},function(t,e,i){t.exports={AnimationJSONFile:i(1340),AsepriteFile:i(1341),AtlasJSONFile:i(1342),AtlasXMLFile:i(1343),AudioFile:i(518),AudioSpriteFile:i(1344),BinaryFile:i(1345),BitmapFontFile:i(1346),CSSFile:i(1347),GLSLFile:i(1348),HTML5AudioFile:i(519),HTMLFile:i(1349),HTMLTextureFile:i(1350),ImageFile:i(71),JSONFile:i(61),MultiAtlasFile:i(1351),MultiScriptFile:i(1352),OBJFile:i(1353),PackFile:i(1354),PluginFile:i(1355),SceneFile:i(1356),ScenePluginFile:i(1357),ScriptFile:i(520),SpriteSheetFile:i(1358),SVGFile:i(1359),TextFile:i(242),TilemapCSVFile:i(1360),TilemapImpactFile:i(1361),TilemapJSONFile:i(1362),UnityAtlasFile:i(1363),VideoFile:i(1364),XMLFile:i(241)}},function(t,e,i){var n=i(0),r=i(8),s=i(61),o=i(95),a=new n({Extends:s,initialize:function(t,e,i,n,r){s.call(this,t,e,i,n,r),this.type="animationJSON"},onProcess:function(){this.loader.once(o.POST_PROCESS,this.onLoadComplete,this),s.prototype.onProcess.call(this)},onLoadComplete:function(){this.loader.systems.anims.fromJSON(this.data)}});r.register("animation",function(t,e,i,n){if(Array.isArray(t))for(var r=0;r<t.length;r++)this.addFile(new a(this,t[r]));else this.addFile(new a(this,t,e,n,i));return this}),t.exports=a},function(t,e,i){var n=i(0),r=i(8),h=i(2),l=i(71),c=i(7),u=i(61),d=i(49),a=new n({Extends:d,initialize:function(t,e,i,n,r,s){var o,a=c(e)?(e=h(a=e,"key"),o=new l(t,{key:e,url:h(a,"textureURL"),extension:h(a,"textureExtension","png"),normalMap:h(a,"normalMap"),xhrSettings:h(a,"textureXhrSettings")}),new u(t,{key:e,url:h(a,"atlasURL"),extension:h(a,"atlasExtension","json"),xhrSettings:h(a,"atlasXhrSettings")})):(o=new l(t,e,i,r),new u(t,e,n,s));o.linkFile?d.call(this,t,"atlasjson",e,[o,a,o.linkFile]):d.call(this,t,"atlasjson",e,[o,a])},addToCache:function(){var t,e,i;this.isReadyToProcess()&&(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)}});r.register("aseprite",function(t,e,i,n,r){var s;if(Array.isArray(t))for(var o=0;o<t.length;o++)s=new a(this,t[o]),this.addFile(s.files);else s=new a(this,t,e,i,n,r),this.addFile(s.files);return this}),t.exports=a},function(t,e,i){var n=i(0),r=i(8),h=i(2),l=i(71),c=i(7),u=i(61),d=i(49),a=new n({Extends:d,initialize:function(t,e,i,n,r,s){var o,a=c(e)?(e=h(a=e,"key"),o=new l(t,{key:e,url:h(a,"textureURL"),extension:h(a,"textureExtension","png"),normalMap:h(a,"normalMap"),xhrSettings:h(a,"textureXhrSettings")}),new u(t,{key:e,url:h(a,"atlasURL"),extension:h(a,"atlasExtension","json"),xhrSettings:h(a,"atlasXhrSettings")})):(o=new l(t,e,i,r),new u(t,e,n,s));o.linkFile?d.call(this,t,"atlasjson",e,[o,a,o.linkFile]):d.call(this,t,"atlasjson",e,[o,a])},addToCache:function(){var t,e,i;this.isReadyToProcess()&&(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.pendingDestroy(),this.complete=!0)}});r.register("atlas",function(t,e,i,n,r){var s;if(Array.isArray(t))for(var o=0;o<t.length;o++)s=new a(this,t[o]),this.addFile(s.files);else s=new a(this,t,e,i,n,r),this.addFile(s.files);return this}),t.exports=a},function(t,e,i){var n=i(0),r=i(8),h=i(2),l=i(71),c=i(7),u=i(49),d=i(241),a=new n({Extends:u,initialize:function(t,e,i,n,r,s){var o,a=c(e)?(e=h(a=e,"key"),o=new l(t,{key:e,url:h(a,"textureURL"),extension:h(a,"textureExtension","png"),normalMap:h(a,"normalMap"),xhrSettings:h(a,"textureXhrSettings")}),new d(t,{key:e,url:h(a,"atlasURL"),extension:h(a,"atlasExtension","xml"),xhrSettings:h(a,"atlasXhrSettings")})):(o=new l(t,e,i,r),new d(t,e,n,s));o.linkFile?u.call(this,t,"atlasxml",e,[o,a,o.linkFile]):u.call(this,t,"atlasxml",e,[o,a])},addToCache:function(){var t,e,i;this.isReadyToProcess()&&(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),e.pendingDestroy(),this.complete=!0)}});r.register("atlasXML",function(t,e,i,n,r){var s;if(Array.isArray(t))for(var o=0;o<t.length;o++)s=new a(this,t[o]),this.addFile(s.files);else s=new a(this,t,e,i,n,r),this.addFile(s.files);return this}),t.exports=a},function(t,e,i){var l=i(518),n=i(0),r=i(8),c=i(2),u=i(7),d=i(61),p=i(49),f=new n({Extends:p,initialize:function(t,e,i,n,r,s,o){var a,h;u(e)&&(e=c(h=e,"key"),i=c(h,"jsonURL"),n=c(h,"audioURL"),r=c(h,"audioConfig"),s=c(h,"audioXhrSettings"),o=c(h,"jsonXhrSettings")),n?(h=l.create(t,e,n,r,s))&&(a=new d(t,e,i,o),p.call(this,t,"audiosprite",e,[h,a]),this.config.resourceLoad=!1):(a=new d(t,e,i,o),p.call(this,t,"audiosprite",e,[a]),this.config.resourceLoad=!0,this.config.audioConfig=r,this.config.audioXhrSettings=s)},onFileComplete:function(t){var e,i,n;-1!==this.files.indexOf(t)&&(this.pending--,this.config.resourceLoad&&"json"===t.type&&t.data.hasOwnProperty("resources")&&(e=t.data.resources,i=c(this.config,"audioConfig"),n=c(this.config,"audioXhrSettings"),(t=l.create(this.loader,t.key,e,i,n))&&(this.addToMultiFile(t),this.loader.addFile(t))))},addToCache:function(){var t,e;this.isReadyToProcess()&&(t=this.files[0],e=this.files[1],t.addToCache(),e.addToCache(),this.complete=!0)}});r.register("audioSprite",function(t,e,i,n,r,s){var o,a=this.systems.game,h=a.config.audio,a=a.device.audio;if(!(h&&h.noAudio||!a.webAudio&&!a.audioData))if(Array.isArray(t))for(var l=0;l<t.length;l++)(o=new f(this,t[l])).files&&this.addFile(o.files);else(o=new f(this,t,e,i,n,r,s)).files&&this.addFile(o.files);return this})},function(t,e,i){var n=i(0),r=i(21),a=i(23),s=i(8),h=i(2),l=i(7),o=new n({Extends:a,initialize:function(t,e,i,n,r){var s="bin",o=(l(e)&&(e=h(o=e,"key"),i=h(o,"url"),n=h(o,"xhrSettings"),s=h(o,"extension",s),r=h(o,"dataType",r)),{type:"binary",cache:t.cacheManager.binary,extension:s,responseType:"arraybuffer",key:e,url:i,xhrSettings:n,config:{dataType:r}});a.call(this,t,o)},onProcess:function(){this.state=r.FILE_PROCESSING;var t=this.config.dataType;this.data=t?new t(this.xhrLoader.response):this.xhrLoader.response,this.onProcessComplete()}});s.register("binary",function(t,e,i,n){if(Array.isArray(t))for(var r=0;r<t.length;r++)this.addFile(new o(this,t[r]));else this.addFile(new o(this,t,e,n,i));return this}),t.exports=o},function(t,e,i){var n=i(0),r=i(8),h=i(2),l=i(71),c=i(7),u=i(49),s=i(212),d=i(241),a=new n({Extends:u,initialize:function(t,e,i,n,r,s){var o,a=c(e)?(e=h(a=e,"key"),o=new l(t,{key:e,url:h(a,"textureURL"),extension:h(a,"textureExtension","png"),normalMap:h(a,"normalMap"),xhrSettings:h(a,"textureXhrSettings")}),new d(t,{key:e,url:h(a,"fontDataURL"),extension:h(a,"fontDataExtension","xml"),xhrSettings:h(a,"fontDataXhrSettings")})):(o=new l(t,e,i,r),new d(t,e,n,s));o.linkFile?u.call(this,t,"bitmapfont",e,[o,a,o.linkFile]):u.call(this,t,"bitmapfont",e,[o,a])},addToCache:function(){var t,e,i;this.isReadyToProcess()&&(t=this.files[0],i=this.files[1],t.addToCache(),i.pendingDestroy(),e=t.cache.get(t.key),i=s(i.data,t.cache.getFrame(t.key),0,0,e),this.loader.cacheManager.bitmapFont.add(t.key,{data:i,texture:t.key,frame:null}),this.complete=!0)}});r.register("bitmapFont",function(t,e,i,n,r){var s;if(Array.isArray(t))for(var o=0;o<t.length;o++)s=new a(this,t[o]),this.addFile(s.files);else s=new a(this,t,e,i,n,r),this.addFile(s.files);return this}),t.exports=a},function(t,e,i){var n=i(0),r=i(21),o=i(23),s=i(8),a=i(2),h=i(7),l=new n({Extends:o,initialize:function(t,e,i,n){var r="css",s=(h(e)&&(e=a(s=e,"key"),i=a(s,"url"),n=a(s,"xhrSettings"),r=a(s,"extension",r)),{type:"script",cache:!1,extension:r,responseType:"text",key:e,url:i,xhrSettings:n});o.call(this,t,s)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=document.createElement("style"),this.data.defer=!1,this.data.innerHTML=this.xhrLoader.responseText,document.head.appendChild(this.data),this.onProcessComplete()}});s.register("css",function(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},function(t,e,i){var n=i(0),r=i(21),a=i(23),s=i(8),h=i(2),l=i(7),c=i(396),o=new n({Extends:a,initialize:function(t,e,i,n,r){var s="glsl",o=(l(e)?(e=h(o=e,"key"),i=h(o,"url"),n=h(o,"shaderType","fragment"),r=h(o,"xhrSettings"),s=h(o,"extension",s)):void 0===n&&(n="fragment"),{type:"glsl",cache:t.cacheManager.shader,extension:s,responseType:"text",key:e,url:i,config:{shaderType:n},xhrSettings:r});a.call(this,t,o)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var t=this.data.split("\n"),e=this.extractBlock(t,0);if(e)for(;e;){var i,n=this.getShaderName(e.header),r=this.getShaderType(e.header),s=this.getShaderUniforms(e.header),o=e.shader;this.cache.has(n)?(i=this.cache.get(n),"fragment"===r?i.fragmentSrc=o:i.vertexSrc=o,i.uniforms||(i.uniforms=s)):"fragment"===r?this.cache.add(n,new c(n,o,"",s)):this.cache.add(n,new c(n,"",o,s)),e=this.extractBlock(t,e.offset)}else"fragment"===this.config.shaderType?this.cache.add(this.key,new c(this.key,this.data)):this.cache.add(this.key,new c(this.key,"",this.data));this.pendingDestroy()},getShaderName:function(t){for(var e=0;e<t.length;e++){var i=t[e].trim();if("name:"===i.substring(0,5))return i.substring(5).trim()}return this.key},getShaderType:function(t){for(var e=0;e<t.length;e++){var i=t[e].trim();if("type:"===i.substring(0,5))return i.substring(5).trim()}return this.config.shaderType},getShaderUniforms:function(t){for(var e={},i=0;i<t.length;i++){var n=t[i].trim();if("uniform."===n.substring(0,8)){var r=n.indexOf(":");if(r){var s=n.substring(8,r);try{e[s]=JSON.parse(n.substring(r+1))}catch(t){}}}}return e},extractBlock:function(t,e){for(var i=-1,n=-1,r=-1,s=!1,o=!1,a=[],h=[],l=e;l<t.length;l++){var c=t[l].trim();if("---"===c)if(-1===i)i=l,s=!0;else{if(!s){o=!1;break}n=l,o=!(s=!1)}else s?a.push(c):o&&(h.push(c),r=l)}return s||-1===n?null:{header:a,shader:h.join("\n"),offset:r}}});s.register("glsl",function(t,e,i,n){if(Array.isArray(t))for(var r=0;r<t.length;r++)this.addFile(new o(this,t[r]));else this.addFile(new o(this,t,e,i,n));return this}),t.exports=o},function(t,e,i){var n=i(0),r=i(21),o=i(23),s=i(8),a=i(2),h=i(7),l=new n({Extends:o,initialize:function(t,e,i,n){var r="html",s=(h(e)&&(e=a(s=e,"key"),i=a(s,"url"),n=a(s,"xhrSettings"),r=a(s,"extension",r)),{type:"text",cache:t.cacheManager.html,extension:r,responseType:"text",key:e,url:i,xhrSettings:n});o.call(this,t,s)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});s.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},function(t,e,i){var n=i(0),s=i(21),h=i(23),r=i(8),l=i(2),c=i(7),o=new n({Extends:h,initialize:function(t,e,i,n,r,s){void 0===n&&(n=512),void 0===r&&(r=512);var o="html",a=(c(e)&&(e=l(a=e,"key"),i=l(a,"url"),s=l(a,"xhrSettings"),o=l(a,"extension",o),n=l(a,"width",n),r=l(a,"height",r)),{type:"html",cache:t.textureManager,extension:o,responseType:"text",key:e,url:i,xhrSettings:s,config:{width:n,height:r}});h.call(this,t,a)},onProcess:function(){this.state=s.FILE_PROCESSING;var t=this.config.width,e=this.config.height,i=[],e=(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>"),[i.join("\n")]),n=this;try{var r=new window.Blob(e,{type:"image/svg+xml;charset=utf-8"})}catch(t){return n.state=s.FILE_ERRORED,void n.onProcessComplete()}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){h.revokeObjectURL(n.data),n.onProcessComplete()},this.data.onerror=function(){h.revokeObjectURL(n.data),n.onProcessError()},h.createObjectURL(this.data,r,"image/svg+xml")},addToCache:function(){var t=this.cache.addImage(this.key,this.data);this.pendingDestroy(t)}});r.register("htmlTexture",function(t,e,i,n,r){if(Array.isArray(t))for(var s=0;s<t.length;s++)this.addFile(new o(this,t[s]));else this.addFile(new o(this,t,e,i,n,r));return this}),t.exports=o},function(t,e,i){var n=i(0),r=i(8),p=i(2),f=i(71),h=i(7),l=i(61),c=i(49),a=new n({Extends:c,initialize:function(t,e,i,n,r,s,o){h(e)&&(e=p(a=e,"key"),i=p(a,"url",!1)?p(a,"url"):p(a,"atlasURL"),s=p(a,"xhrSettings"),n=p(a,"path"),r=p(a,"baseURL"),o=p(a,"textureXhrSettings"));var a=new l(t,e,i,s);c.call(this,t,"multiatlas",e,[a]),this.config.path=n,this.config.baseURL=r,this.config.textureXhrSettings=o},onFileComplete:function(t){if(-1!==this.files.indexOf(t)&&(this.pending--,"json"===t.type&&t.data.hasOwnProperty("textures"))){var e=t.data.textures,t=this.config,i=this.loader,n=i.baseURL,r=i.path,s=i.prefix,o=p(t,"baseURL",this.baseURL),a=p(t,"path",this.path),h=p(t,"prefix",this.prefix),l=p(t,"textureXhrSettings");i.setBaseURL(o),i.setPath(a),i.setPrefix(h);for(var c=0;c<e.length;c++){var u=e[c].image,d="MA"+this.multiKeyIndex+"_"+u,u=new f(i,d,u,l);this.addToMultiFile(u),i.addFile(u),e[c].normalMap&&((d=new f(i,d,e[c].normalMap,l)).type="normalMap",u.setLink(d),this.addToMultiFile(d),i.addFile(d))}i.setBaseURL(n),i.setPath(r),i.setPrefix(s)}},addToCache:function(){if(this.isReadyToProcess()){for(var t=this.files[0],e=[],i=[],n=[],r=1;r<this.files.length;r++){var s=this.files[r];if("normalMap"!==s.type)for(var o=s.key.indexOf("_"),a=s.key.substr(o+1),h=s.data,l=0;l<t.data.textures.length;l++){var c=t.data.textures[l];if(c.image===a){i.push(h),e.push(c),s.linkFile&&n.push(s.linkFile.data);break}}}for(0===n.length&&(n=void 0),this.loader.textureManager.addAtlasJSONArray(this.key,i,e,n),this.complete=!0,r=0;r<this.files.length;r++)this.files[r].pendingDestroy()}}});r.register("multiatlas",function(t,e,i,n,r){var s;if(Array.isArray(t))for(var o=0;o<t.length;o++)s=new a(this,t[o]),this.addFile(s.files);else s=new a(this,t,e,i,n,r),this.addFile(s.files);return this}),t.exports=a},function(t,e,i){var n=i(0),r=i(8),l=i(2),c=i(7),u=i(49),d=i(520),s=new n({Extends:u,initialize:function(t,e,i,n){var r,s="js",o=[];c(e)&&(e=l(r=e,"key"),i=l(r,"url"),n=l(r,"xhrSettings"),s=l(r,"extension",s)),Array.isArray(i)||(i=[i]);for(var a=0;a<i.length;a++){var h=new d(t,{key:e+"_"+a.toString(),url:i[a],extension:s,xhrSettings:n});h.onProcess=function(){this.onProcessComplete()},o.push(h)}u.call(this,t,"scripts",e,o)},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}}});r.register("scripts",function(t,e,i){var n;if(Array.isArray(t))for(var r=0;r<t.length;r++)n=new s(this,t[r]),this.addFile(n.files);else n=new s(this,t,e,i),this.addFile(n.files);return this}),t.exports=s},function(t,e,i){var n=i(0),r=i(8),c=i(2),u=i(7),d=i(49),s=i(498),o=i(499),p=i(242),a=new n({Extends:d,initialize:function(t,e,i,n,r,s){var o,a,h,l=t.cacheManager.obj;u(e)?(e=c(h=e,"key"),o=new p(t,{key:e,type:"obj",cache:l,url:c(h,"url"),extension:c(h,"extension","obj"),xhrSettings:c(h,"xhrSettings"),config:{flipUV:c(h,"flipUV",r)}}),(n=c(h,"matURL"))&&(a=new p(t,{key:e,type:"mat",cache:l,url:n,extension:c(h,"matExtension","mat"),xhrSettings:c(h,"xhrSettings")}))):(o=new p(t,{key:e,url:i,type:"obj",cache:l,extension:"obj",xhrSettings:s,config:{flipUV:r}}),n&&(a=new p(t,{key:e,url:n,type:"mat",cache:l,extension:"mat",xhrSettings:s}))),d.call(this,t,"obj",e,[o,a])},addToCache:function(){var t,e,i;this.isReadyToProcess()&&(t=this.files[0],e=this.files[1],i=s(t.data,t.config.flipUV),e&&(i.materials=o(e.data)),t.cache.add(t.key,i),this.complete=!0)}});r.register("obj",function(t,e,i,n,r){var s;if(Array.isArray(t))for(var o=0;o<t.length;o++)s=new a(this,t[o]),this.addFile(s.files);else s=new a(this,t,e,i,n,r),this.addFile(s.files);return this}),t.exports=a},function(t,e,i){var n=i(0),r=i(21),s=i(8),o=i(61),a=new n({Extends:o,initialize:function(t,e,i,n,r){o.call(this,t,e,i,n,r),this.type="packfile"},onProcess:function(){this.state!==r.FILE_POPULATED&&(this.state=r.FILE_PROCESSING,this.data=JSON.parse(this.xhrLoader.responseText)),this.loader.addPack(this.data,this.config),this.onProcessComplete()}});s.register("pack",function(t,e,i,n){if(Array.isArray(t))for(var r=0;r<t.length;r++)this.addFile(new a(this,t[r]));else this.addFile(new a(this,t,e,n,i));return this}),t.exports=a},function(t,e,i){var n=i(0),h=i(21),l=i(23),r=i(8),c=i(2),u=i(7),o=new n({Extends:l,initialize:function(t,e,i,n,r,s){var o="js",a=(u(e)&&(e=c(a=e,"key"),i=c(a,"url"),s=c(a,"xhrSettings"),o=c(a,"extension",o),n=c(a,"start"),r=c(a,"mapping")),{type:"plugin",cache:!1,extension:o,responseType:"text",key:e,url:i,xhrSettings:s,config:{start:n,mapping:r}});l.call(this,t,a),"function"==typeof i&&(this.data=i,this.state=h.FILE_POPULATED)},onProcess:function(){var t=this.loader.systems.plugins,e=this.config,i=c(e,"start",!1),e=c(e,"mapping",null);this.state===h.FILE_POPULATED?t.install(this.key,this.data,i,e):(this.state=h.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=t.install(this.key,window[this.key],i,e),(i||e)&&(this.loader.systems[e]=t,this.loader.scene[e]=t)),this.onProcessComplete()}});r.register("plugin",function(t,e,i,n,r){if(Array.isArray(t))for(var s=0;s<t.length;s++)this.addFile(new o(this,t[s]));else this.addFile(new o(this,t,e,i,n,r));return this}),t.exports=o},function(t,e,i){var n=i(0),r=i(21),o=i(23),s=i(8),a=i(2),h=i(7),l=new n({Extends:o,initialize:function(t,e,i,n){var r="js",s=(h(e)&&(e=a(s=e,"key"),i=a(s,"url"),n=a(s,"xhrSettings"),r=a(s,"extension",r)),{type:"text",extension:r,responseType:"text",key:e,url:i,xhrSettings:n});o.call(this,t,s)},onProcess:function(){this.state=r.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}});s.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},function(t,e,i){var n=i(0),h=i(21),l=i(23),r=i(8),c=i(2),u=i(7),o=new n({Extends:l,initialize:function(t,e,i,n,r,s){var o="js",a=(u(e)&&(e=c(a=e,"key"),i=c(a,"url"),s=c(a,"xhrSettings"),o=c(a,"extension",o),n=c(a,"systemKey"),r=c(a,"sceneKey")),{type:"scenePlugin",cache:!1,extension:o,responseType:"text",key:e,url:i,xhrSettings:s,config:{systemKey:n,sceneKey:r}});l.call(this,t,a),"function"==typeof i&&(this.data=i,this.state=h.FILE_POPULATED)},onProcess:function(){var t=this.loader.systems.plugins,e=this.config,i=this.key,n=c(e,"systemKey",i),e=c(e,"sceneKey",i);this.state===h.FILE_POPULATED?t.installScenePlugin(n,this.data,e,this.loader.scene,!0):(this.state=h.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],e,this.loader.scene,!0)),this.onProcessComplete()}});r.register("scenePlugin",function(t,e,i,n,r){if(Array.isArray(t))for(var s=0;s<t.length;s++)this.addFile(new o(this,t[s]));else this.addFile(new o(this,t,e,i,n,r));return this}),t.exports=o},function(t,e,i){var n=i(0),r=i(8),s=i(71),o=new n({Extends:s,initialize:function(t,e,i,n,r){s.call(this,t,e,i,r,n),this.type="spritesheet"},addToCache:function(){var t=this.cache.addSpriteSheet(this.key,this.data,this.config);this.pendingDestroy(t)}});r.register("spritesheet",function(t,e,i,n){if(Array.isArray(t))for(var r=0;r<t.length;r++)this.addFile(new o(this,t[r]));else this.addFile(new o(this,t,e,i,n));return this}),t.exports=o},function(t,e,i){var n=i(0),d=i(21),p=i(23),r=i(8),a=i(2),h=i(7),s=new n({Extends:p,initialize:function(t,e,i,n,r){var s="svg",o=(h(e)&&(e=a(o=e,"key"),i=a(o,"url"),n=a(o,"svgConfig",{}),r=a(o,"xhrSettings"),s=a(o,"extension",s)),{type:"svg",cache:t.textureManager,extension:s,responseType:"text",key:e,url:i,xhrSettings:r,config:{width:a(n,"width"),height:a(n,"height"),scale:a(n,"scale")}});p.call(this,t,o)},onProcess:function(){this.state=d.FILE_PROCESSING;var t=this.xhrLoader.responseText,e=[t],i=this.config.width,n=this.config.height,r=this.config.scale;t:if(i&&n||r){var s=(new DOMParser).parseFromString(t,"text/xml").getElementsByTagName("svg")[0],o=s.hasAttribute("viewBox"),a=parseFloat(s.getAttribute("width")),h=parseFloat(s.getAttribute("height"));if(!o&&a&&h?s.setAttribute("viewBox","0 0 "+a+" "+h):!o||a||h||(a=(o=s.getAttribute("viewBox").split(/\s+|,/))[2],h=o[3]),r){if(!a||!h)break t;i=a*r,n=h*r}s.setAttribute("width",i.toString()+"px"),s.setAttribute("height",n.toString()+"px"),e=[(new XMLSerializer).serializeToString(s)]}try{var l=new window.Blob(e,{type:"image/svg+xml;charset=utf-8"})}catch(t){return void this.onProcessError()}this.data=new Image,this.data.crossOrigin=this.crossOrigin;var c=this,u=!1;this.data.onload=function(){u||p.revokeObjectURL(c.data),c.onProcessComplete()},this.data.onerror=function(){u?c.onProcessError():(u=!0,p.revokeObjectURL(c.data),c.data.src="data:image/svg+xml,"+encodeURIComponent(e.join("")))},p.createObjectURL(this.data,l,"image/svg+xml")},addToCache:function(){var t=this.cache.addImage(this.key,this.data);this.pendingDestroy(t)}});r.register("svg",function(t,e,i,n){if(Array.isArray(t))for(var r=0;r<t.length;r++)this.addFile(new s(this,t[r]));else this.addFile(new s(this,t,e,i,n));return this}),t.exports=s},function(t,e,i){var n=i(0),r=i(21),o=i(23),s=i(8),a=i(2),h=i(7),l=i(40),c=new n({Extends:o,initialize:function(t,e,i,n){var r="csv",s=(h(e)&&(e=a(s=e,"key"),i=a(s,"url"),n=a(s,"xhrSettings"),r=a(s,"extension",r)),{type:"tilemapCSV",cache:t.cacheManager.tilemap,extension:r,responseType:"text",key:e,url:i,xhrSettings:n});o.call(this,t,s),this.tilemapFormat=l.CSV},onProcess:function(){this.state=r.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),this.pendingDestroy(t)}});s.register("tilemapCSV",function(t,e,i){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new c(this,t[n]));else this.addFile(new c(this,t,e,i));return this}),t.exports=c},function(t,e,i){var n=i(0),r=i(8),s=i(61),o=i(40),a=new n({Extends:s,initialize:function(t,e,i,n){s.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),this.pendingDestroy(t)}});r.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},function(t,e,i){var n=i(0),r=i(8),s=i(61),o=i(40),a=new n({Extends:s,initialize:function(t,e,i,n){s.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),this.pendingDestroy(t)}});r.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},function(t,e,i){var n=i(0),r=i(8),h=i(2),l=i(71),c=i(7),u=i(49),d=i(242),a=new n({Extends:u,initialize:function(t,e,i,n,r,s){var o,a=c(e)?(e=h(a=e,"key"),o=new l(t,{key:e,url:h(a,"textureURL"),extension:h(a,"textureExtension","png"),normalMap:h(a,"normalMap"),xhrSettings:h(a,"textureXhrSettings")}),new d(t,{key:e,url:h(a,"atlasURL"),extension:h(a,"atlasExtension","txt"),xhrSettings:h(a,"atlasXhrSettings")})):(o=new l(t,e,i,r),new d(t,e,n,s));o.linkFile?u.call(this,t,"unityatlas",e,[o,a,o.linkFile]):u.call(this,t,"unityatlas",e,[o,a])},addToCache:function(){var t,e,i;this.isReadyToProcess()&&(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),e.pendingDestroy(),this.complete=!0)}});r.register("unityAtlas",function(t,e,i,n,r){var s;if(Array.isArray(t))for(var o=0;o<t.length;o++)s=new a(this,t[o]),this.addFile(s.files);else s=new a(this,t,e,i,n,r),this.addFile(s.files);return this}),t.exports=a},function(t,e,i){var n=i(0),r=i(21),a=i(23),s=i(8),o=i(155),h=i(2),l=i(7),c=new n({Extends:a,initialize:function(t,e,i,n,r,s,o){e={type:"video",cache:t.cacheManager.video,extension:i.type,responseType:"blob",key:e,url:i.url,xhrSettings:o,config:{loadEvent:n="loadeddata"!==(n=void 0===n?"loadeddata":n)&&"canplay"!==n&&"canplaythrough"!==n?"loadeddata":n,asBlob:r=void 0===r?!1:r,noAudio:s=void 0===s?!1:s}};this.onLoadCallback=this.onVideoLoadHandler.bind(this),this.onErrorCallback=this.onVideoErrorHandler.bind(this),a.call(this,t,e)},onProcess:function(){var t,e;this.state=r.FILE_PROCESSING,this.config.asBlob?(t=this.createVideoElement(),this.data=t,(e=this).data.onloadeddata=function(){e.onProcessComplete()},this.data.onerror=function(){a.revokeObjectURL(e.data),e.onProcessError()},a.createObjectURL(t,this.xhrLoader.response,""),t.load()):this.onProcessComplete()},createVideoElement:function(){var t=document.createElement("video");return t.controls=!1,t.crossOrigin=this.loader.crossOrigin,this.config.noAudio&&(t.muted=!0,t.defaultMuted=!0,t.setAttribute("autoplay","autoplay")),t.setAttribute("playsinline","playsinline"),t.setAttribute("preload","auto"),t},onVideoLoadHandler:function(t){t=t.target;t.removeEventListener(this.config.loadEvent,this.onLoadCallback,!0),t.removeEventListener("error",this.onErrorCallback,!0),this.data=t,this.resetXHR(),this.loader.nextFile(this,!0)},onVideoErrorHandler:function(t){t=t.target;t&&(t.removeEventListener(this.config.loadEvent,this.onLoadCallback,!0),t.removeEventListener("error",this.onErrorCallback,!0)),this.resetXHR(),this.loader.nextFile(this,!1)},load:function(){var t,e=this.config.loadEvent;this.config.asBlob?a.prototype.load.call(this):(this.percentComplete=0,(t=this.createVideoElement()).addEventListener(e,this.onLoadCallback,!0),t.addEventListener("error",this.onErrorCallback,!0),t.src=o(this,this.loader.baseURL),t.load())}});c.create=function(t,e,i,n,r,s,o){var a=t.systems.game,a=(l(e)&&(i=h(e,"url",[]),n=h(e,"loadEvent","loadeddata"),r=h(e,"asBlob",!1),s=h(e,"noAudio",!1),o=h(e,"xhrSettings"),e=h(e,"key")),c.getVideoURL(a,i));if(a)return new c(t,e,a,n,r,s,o)},c.getVideoURL=function(t,e){Array.isArray(e)||(e=[e]);for(var i=0;i<e.length;i++){var n,r=h(e[i],"url",e[i]);if(0===r.indexOf("blob:"))return{url:r,type:""};if(n=0===r.indexOf("data:")?r.split(",")[0].match(/\/(.*?);/):r.match(/\.([a-zA-Z0-9]+)($|\?)/),n=h(e[i],"type",n?n[1]:"").toLowerCase(),t.device.video[n])return{url:r,type:n}}return null},s.register("video",function(t,e,i,n,r,s){var o;if(Array.isArray(t))for(var a=0;a<t.length;a++)(o=c.create(this,t[a]))&&this.addFile(o);else(o=c.create(this,t,e,i,n,r,s))&&this.addFile(o);return this}),t.exports=c},function(t,e,i){var n=i(0),r=i(21),s=i(149),o=i(9),a=i(95),h=i(8),m=i(2),l=i(24),c=i(20),u=i(156),i=new n({Extends:o,initialize:function(t){o.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,h.install(this),this.prefix="",this.path="",this.baseURL="",this.setBaseURL(m(i,"baseURL",e.loaderBaseURL)),this.setPath(m(i,"path",e.loaderPath)),this.setPrefix(m(i,"prefix",e.loaderPrefix)),this.maxParallelDownloads=m(i,"maxParallelDownloads",e.loaderMaxParallelDownloads),this.xhr=u(m(i,"responseType",e.loaderResponseType),m(i,"async",e.loaderAsync),m(i,"user",e.loaderUser),m(i,"password",e.loaderPassword),m(i,"timeout",e.loaderTimeout),m(i,"withCredentials",e.loaderWithCredentials)),this.crossOrigin=m(i,"crossOrigin",e.loaderCrossOrigin),this.totalToLoad=0,this.progress=0,this.list=new s,this.inflight=new s,this.queue=new s,this._deleteQueue=new s,this.totalFailed=0,this.totalComplete=0,this.state=r.LOADER_IDLE,this.multiKeyIndex=0,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""!==(t=void 0===t?"":t)&&"/"!==t.substr(-1)&&(t=t.concat("/")),this.baseURL=t,this},setPath:function(t){return""!==(t=void 0===t?"":t)&&"/"!==t.substr(-1)&&(t=t.concat("/")),this.path=t,this},setPrefix:function(t){return this.prefix=t=void 0===t?"":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.set(i),this.emit(a.ADD,i.key,i.type,this,i),this.isLoading()&&(this.totalToLoad++,this.updateProgress()))}},keyExists:function(e){var i=e.hasCacheConflict();return i||this.list.iterate(function(t){if(t.type===e.type&&t.key===e.key)return!(i=!0)}),!i&&this.isLoading()&&(this.inflight.iterate(function(t){if(t.type===e.type&&t.key===e.key)return!(i=!0)}),this.queue.iterate(function(t){if(t.type===e.type&&t.key===e.key)return!(i=!0)})),i},addPack:function(t,e){e&&t.hasOwnProperty(e)&&(t={packKey:t[e]});var i,n=0,r=this.baseURL,s=this.path,o=this.prefix;for(i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var a=t[i],h=m(a,"baseURL",r),l=m(a,"path",s),c=m(a,"prefix",o),u=m(a,"files",null),d=m(a,"defaultType","void");if(Array.isArray(u)){this.setBaseURL(h),this.setPath(l),this.setPrefix(c);for(var p=0;p<u.length;p++){var f=u[p],g=f.hasOwnProperty("type")?f.type:d;this[g]&&(this[g](f),n++)}}}return this.setBaseURL(r),this.setPath(s),this.setPrefix(o),0<n},isLoading:function(){return this.state===r.LOADER_LOADING||this.state===r.LOADER_PROCESSING},isReady:function(){return this.state===r.LOADER_IDLE||this.state===r.LOADER_COMPLETE},start:function(){this.isReady()&&(this.progress=0,this.totalFailed=0,this.totalComplete=0,this.totalToLoad=this.list.size,this.emit(a.START,this),0===this.list.size?this.loadComplete():(this.state=r.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(a.PROGRESS,this.progress)},update:function(){this.state===r.LOADER_LOADING&&0<this.list.size&&this.inflight.size<this.maxParallelDownloads&&this.checkLoadQueue()},checkLoadQueue:function(){this.list.each(function(t){if((t.state===r.FILE_POPULATED||t.state===r.FILE_PENDING&&this.inflight.size<this.maxParallelDownloads)&&(this.inflight.set(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.set(t),this.emit(a.FILE_LOAD,t),t.onProcess()):(this.totalFailed++,this._deleteQueue.set(t),this.emit(a.FILE_LOAD_ERROR,t),this.fileProcessComplete(t)))},fileProcessComplete:function(t){this.scene&&this.systems&&this.systems.game&&!this.systems.game.pendingDestroy&&(t.state===r.FILE_ERRORED?t.multiFile&&t.multiFile.onFileFailed(t):t.state===r.FILE_COMPLETE&&(t.multiFile?t.multiFile.isReadyToProcess()&&t.multiFile.addToCache():t.addToCache()),this.queue.delete(t),0===this.list.size&&0===this.inflight.size&&0===this.queue.size&&this.loadComplete())},loadComplete:function(){this.emit(a.POST_PROCESS,this),this.list.clear(),this.inflight.clear(),this.queue.clear(),this.progress=1,this.state=r.LOADER_COMPLETE,this.systems.events.off(c.UPDATE,this.update,this),this._deleteQueue.iterateLocal("destroy"),this._deleteQueue.clear(),this.emit(a.COMPLETE,this,this.totalComplete,this.totalFailed)},flagForRemoval:function(t){this._deleteQueue.set(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");t=new Blob([t],{type:i}),i=URL.createObjectURL(t),t=document.createElement("a");return t.download=e,t.textContent="Download "+e,t.href=i,t.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(m(e,"baseURL",t.loaderBaseURL)),this.setPath(m(e,"path",t.loaderPath)),this.setPrefix(m(e,"prefix",t.loaderPrefix)),this.state=r.LOADER_IDLE},shutdown:function(){this.reset(),this.state=r.LOADER_SHUTDOWN,this.systems.events.off(c.UPDATE,this.update,this),this.systems.events.off(c.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.state=r.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}});l.register("Loader",i,"load"),t.exports=i},function(t,e,i){var n=i(62),i=i(17)(!1,{ArcadePhysics:i(1367),Body:i(527),Collider:i(528),Components:i(243),Events:i(245),Factory:i(521),GetOverlapX:i(246),GetOverlapY:i(247),SeparateX:i(537),SeparateY:i(538),Group:i(524),Image:i(522),Sprite:i(157),StaticBody:i(539),StaticGroup:i(525),Tilemap:i(1391),World:i(526)},n);t.exports=i},function(t,e,i){var n=i(0),r=i(36),o=i(50),c=i(353),s=i(521),a=i(2),h=i(127),l=i(523),u=i(244),d=i(24),p=i(20),f=i(3),g=i(526),i=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.config=this.getConfig(),this.world,this.add,t.sys.events.once(p.BOOT,this.boot,this),t.sys.events.on(p.START,this.start,this)},boot:function(){this.world=new g(this.scene,this.config),this.add=new s(this.world),this.systems.events.once(p.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new g(this.scene,this.config),this.add=new s(this.world));var t=this.systems.events;a(this.config,"customUpdate",!1)||t.on(p.UPDATE,this.world.update,this.world),t.on(p.POST_UPDATE,this.world.postUpdate,this.world),t.once(p.SHUTDOWN,this.shutdown,this)},enableUpdate:function(){this.systems.events.on(p.UPDATE,this.world.update,this.world)},disableUpdate:function(){this.systems.events.off(p.UPDATE,this.world.update,this.world)},getConfig:function(){var t=this.systems.game.config.physics,e=this.systems.settings.physics;return h(a(e,"arcade",{}),a(t,"arcade",{}))},overlap:function(t,e,i,n,r){return void 0===i&&(i=null),void 0===r&&(r=i),this.world.collideObjects(t,e,i,n=void 0===n?null:n,r,!0)},collide:function(t,e,i,n,r){return void 0===i&&(i=null),void 0===r&&(r=i),this.world.collideObjects(t,e,i,n=void 0===n?null:n,r,!1)},collideTiles:function(t,e,i,n,r){return this.world.collideTiles(t,e,i,n,r)},overlapTiles:function(t,e,i,n,r){return this.world.overlapTiles(t,e,i,n,r)},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},accelerateTo:function(t,e,i,n,r,s){void 0===n&&(n=60);i=Math.atan2(i-t.y,e-t.x);return t.body.acceleration.setToPolar(i,n),void 0!==r&&void 0!==s&&t.body.maxVelocity.set(r,s),i},accelerateToObject:function(t,e,i,n,r){return this.accelerateTo(t,e.x,e.y,i,n,r)},closest:function(t,e){e=e||this.world.bodies.entries;for(var i=Number.MAX_VALUE,n=null,r=t.x,s=t.y,o=e.length,a=0;a<o;a++){var h=e[a],l=h.body||h;t!==h&&t!==l&&t!==l.gameObject&&t!==l.center&&(l=c(r,s,l.center.x,l.center.y))<i&&(n=h,i=l)}return n},furthest:function(t,e){e=e||this.world.bodies.entries;for(var i=-1,n=null,r=t.x,s=t.y,o=e.length,a=0;a<o;a++){var h=e[a],l=h.body||h;t!==h&&t!==l&&t!==l.gameObject&&t!==l.center&&i<(l=c(r,s,l.center.x,l.center.y))&&(n=h,i=l)}return n},moveTo:function(t,e,i,n,r){void 0===n&&(n=60),void 0===r&&(r=0);var s=Math.atan2(i-t.y,e-t.x);return 0<r&&(n=o(t.x,t.y,e,i)/(r/1e3)),t.body.velocity.setToPolar(s,n),s},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),(i=void 0===i?new f:i).setToPolar(r(t),e)},velocityFromRotation:function(t,e,i){return void 0===e&&(e=60),(i=void 0===i?new f:i).setToPolar(t,e)},overlapRect:function(t,e,i,n,r,s){return u(this.world,t,e,i,n,r,s)},overlapCirc:function(t,e,i,n,r){return l(this.world,t,e,i,n,r)},shutdown:function(){var t;this.world&&((t=this.systems.events).off(p.UPDATE,this.world.update,this.world),t.off(p.POST_UPDATE,this.world.postUpdate,this.world),t.off(p.SHUTDOWN,this.shutdown,this),this.add.destroy(),this.world.destroy(),this.add=null,this.world=null)},destroy:function(){this.shutdown(),this.scene.sys.events.off(p.START,this.start,this),this.scene=null,this.systems=null}});d.register("ArcadePhysics",i,"arcadePhysics"),t.exports=i},function(t,e){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}}},function(t,e){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}}},function(t,e){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){return this.body.setCollideWorldBounds(t,e,i),this}}},function(t,e){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}}}},function(t,e){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}}},function(t,e){t.exports={enableBody:function(t,e,i,n,r){return t&&this.body.reset(e,i),n&&(this.body.gameObject.active=!0),r&&(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}}},function(t,e){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}}},function(t,e){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}}},function(t,e){t.exports={setImmovable:function(t){return this.body.immovable=t=void 0===t?!0:t,this}}},function(t,e){t.exports={setMass:function(t){return this.body.mass=t,this}}},function(t,e){t.exports={setPushable:function(t){return this.body.pushable=t=void 0===t?!0:t,this}}},function(t,e){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}}},function(t,e){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}}},function(t,e){t.exports="collide"},function(t,e){t.exports="overlap"},function(t,e){t.exports="pause"},function(t,e){t.exports="resume"},function(t,e){t.exports="tilecollide"},function(t,e){t.exports="tileoverlap"},function(t,e){t.exports="worldbounds"},function(t,e){t.exports="worldstep"},function(t,e){function n(){return f&&x&&o.blocked.right?(s.processX(-w,u,!1,!0),1):p&&b&&o.blocked.left?(s.processX(w,u,!0),1):y&&b&&s.blocked.right?(o.processX(-w,d,!1,!0),2):m&&x&&s.blocked.left?(o.processX(w,d,!0),2):0}function r(t){var e;return a&&h?(w*=.5,0===t||3===t?(s.processX(w,l),o.processX(-w,c)):(s.processX(-w,l),o.processX(w,c))):a&&!h?0===t||3===t?s.processX(w,u,!0):s.processX(-w,u,!1,!0):!a&&h?0===t||3===t?o.processX(-w,d,!1,!0):o.processX(w,d,!0):(e=.5*w,0===t?v?(s.processX(w,0,!0),o.processX(0,null,!1,!0)):y?(s.processX(e,0,!0),o.processX(-e,0,!1,!0)):(s.processX(e,o.velocity.x,!0),o.processX(-e,null,!1,!0)):1===t?g?(s.processX(0,null,!1,!0),o.processX(w,0,!0)):f?(s.processX(-e,0,!1,!0),o.processX(e,0,!0)):(s.processX(-e,null,!1,!0),o.processX(e,s.velocity.x,!0)):2===t?v?(s.processX(-w,0,!1,!0),o.processX(0,null,!0)):m?(s.processX(-e,0,!1,!0),o.processX(e,0,!0)):(s.processX(-e,o.velocity.x,!1,!0),o.processX(e,null,!0)):3===t&&(g?(s.processX(0,null,!0),o.processX(-w,0,!1,!0)):p?(s.processX(e,0,!0),o.processX(-e,0,!1,!0)):(s.processX(e,o.velocity.y,!0),o.processX(-e,null,!1,!0)))),!0}var s,o,a,h,l,c,u,d,p,f,g,m,y,v,x,b,w;t.exports={BlockCheck:n,Check:function(){var t=s.velocity.x,e=o.velocity.x,e=Math.sqrt(e*e*o.mass/s.mass)*(0<e?1:-1),t=Math.sqrt(t*t*s.mass/o.mass)*(0<t?1:-1),i=.5*(e+t);return l=i+(e-=i)*s.bounce.x,c=i+(t-=i)*o.bounce.x,p&&b?r(0):m&&x?r(1):f&&x?r(2):!(!y||!b)&&r(3)},Set:function(t,e,i){o=e;e=(s=t).velocity.x,t=o.velocity.x;return a=s.pushable,p=s._dx<0,f=0<s._dx,g=0===s._dx,x=Math.abs(s.right-o.x)<=Math.abs(o.right-s.x),u=t-e*s.bounce.x,h=o.pushable,m=o._dx<0,y=0<o._dx,v=0===o._dx,b=!x,d=e-t*o.bounce.x,w=Math.abs(i),n()},Run:r,RunImmovableBody1:function(t){1===t?o.velocity.x=0:x?o.processX(w,d,!0):o.processX(-w,d,!1,!0),s.moves&&(o.y+=(s.y-s.prev.y)*s.friction.y,o._dy=o.y-o.prev.y)},RunImmovableBody2:function(t){2===t?s.velocity.x=0:b?s.processX(w,u,!0):s.processX(-w,u,!1,!0),o.moves&&(s.y+=(o.y-o.prev.y)*o.friction.y,s._dy=s.y-s.prev.y)}}},function(t,e){function n(){return f&&x&&o.blocked.down?(s.processY(-w,u,!1,!0),1):p&&b&&o.blocked.up?(s.processY(w,u,!0),1):y&&b&&s.blocked.down?(o.processY(-w,d,!1,!0),2):m&&x&&s.blocked.up?(o.processY(w,d,!0),2):0}function r(t){var e;return a&&h?(w*=.5,0===t||3===t?(s.processY(w,l),o.processY(-w,c)):(s.processY(-w,l),o.processY(w,c))):a&&!h?0===t||3===t?s.processY(w,u,!0):s.processY(-w,u,!1,!0):!a&&h?0===t||3===t?o.processY(-w,d,!1,!0):o.processY(w,d,!0):(e=.5*w,0===t?v?(s.processY(w,0,!0),o.processY(0,null,!1,!0)):y?(s.processY(e,0,!0),o.processY(-e,0,!1,!0)):(s.processY(e,o.velocity.y,!0),o.processY(-e,null,!1,!0)):1===t?g?(s.processY(0,null,!1,!0),o.processY(w,0,!0)):f?(s.processY(-e,0,!1,!0),o.processY(e,0,!0)):(s.processY(-e,null,!1,!0),o.processY(e,s.velocity.y,!0)):2===t?v?(s.processY(-w,0,!1,!0),o.processY(0,null,!0)):m?(s.processY(-e,0,!1,!0),o.processY(e,0,!0)):(s.processY(-e,o.velocity.y,!1,!0),o.processY(e,null,!0)):3===t&&(g?(s.processY(0,null,!0),o.processY(-w,0,!1,!0)):p?(s.processY(e,0,!0),o.processY(-e,0,!1,!0)):(s.processY(e,o.velocity.y,!0),o.processY(-e,null,!1,!0)))),!0}var s,o,a,h,l,c,u,d,p,f,g,m,y,v,x,b,w;t.exports={BlockCheck:n,Check:function(){var t=s.velocity.y,e=o.velocity.y,e=Math.sqrt(e*e*o.mass/s.mass)*(0<e?1:-1),t=Math.sqrt(t*t*s.mass/o.mass)*(0<t?1:-1),i=.5*(e+t);return l=i+(e-=i)*s.bounce.y,c=i+(t-=i)*o.bounce.y,p&&b?r(0):m&&x?r(1):f&&x?r(2):!(!y||!b)&&r(3)},Set:function(t,e,i){o=e;e=(s=t).velocity.y,t=o.velocity.y;return a=s.pushable,p=s._dy<0,f=0<s._dy,g=0===s._dy,x=Math.abs(s.bottom-o.y)<=Math.abs(o.bottom-s.y),u=t-e*s.bounce.y,h=o.pushable,m=o._dy<0,y=0<o._dy,v=0===o._dy,b=!x,d=e-t*o.bounce.y,w=Math.abs(i),n()},Run:r,RunImmovableBody1:function(t){1===t?o.velocity.y=0:x?o.processY(w,d,!0):o.processY(-w,d,!1,!0),s.moves&&(o.x+=(s.x-s.prev.x)*s.friction.x,o._dx=o.x-o.prev.x)},RunImmovableBody2:function(t){2===t?s.velocity.y=0:b?s.processY(w,u,!0):s.processY(-w,u,!1,!0),o.moves&&(s.x+=(o.x-o.prev.x)*o.friction.x,s._dx=s.x-s.prev.x)}}},function(t,e,i){i={ProcessTileCallbacks:i(530),ProcessTileSeparationX:i(534),ProcessTileSeparationY:i(536),SeparateTile:i(532),TileCheckX:i(533),TileCheckY:i(535),TileIntersectsBody:i(248)};t.exports=i},function(t,e,i){var n=i(0),r=i(3),i=new n({initialize:function(){this.boundsCenter=new r,this.centerDiff=new r},parseBody:function(t){var e,i,n,r,s;return!(!(t=t.hasOwnProperty("body")?t.body:t).hasOwnProperty("bounds")||!t.hasOwnProperty("centerOfMass"))&&(e=this.boundsCenter,i=this.centerDiff,n=t.bounds.max.x-t.bounds.min.x,r=t.bounds.max.y-t.bounds.min.y,s=n*t.centerOfMass.x,t=r*t.centerOfMass.y,e.set(n/2,r/2),i.set(s-e.x,t-e.y),!0)},getTopLeft:function(t,e,i){var n;return void 0===e&&(e=0),void 0===i&&(i=0),!!this.parseBody(t)&&(t=this.boundsCenter,n=this.centerDiff,new r(e+t.x+n.x,i+t.y+n.y))},getTopCenter:function(t,e,i){var n;return void 0===e&&(e=0),void 0===i&&(i=0),!!this.parseBody(t)&&(t=this.boundsCenter,n=this.centerDiff,new r(e+n.x,i+t.y+n.y))},getTopRight:function(t,e,i){var n;return void 0===e&&(e=0),void 0===i&&(i=0),!!this.parseBody(t)&&(t=this.boundsCenter,n=this.centerDiff,new r(e-(t.x-n.x),i+t.y+n.y))},getLeftCenter:function(t,e,i){var n;return void 0===e&&(e=0),void 0===i&&(i=0),!!this.parseBody(t)&&(t=this.boundsCenter,n=this.centerDiff,new r(e+t.x+n.x,i+n.y))},getCenter:function(t,e,i){return void 0===e&&(e=0),void 0===i&&(i=0),!!this.parseBody(t)&&(t=this.centerDiff,new r(e+t.x,i+t.y))},getRightCenter:function(t,e,i){var n;return void 0===e&&(e=0),void 0===i&&(i=0),!!this.parseBody(t)&&(t=this.boundsCenter,n=this.centerDiff,new r(e-(t.x-n.x),i+n.y))},getBottomLeft:function(t,e,i){var n;return void 0===e&&(e=0),void 0===i&&(i=0),!!this.parseBody(t)&&(t=this.boundsCenter,n=this.centerDiff,new r(e+t.x+n.x,i-(t.y-n.y)))},getBottomCenter:function(t,e,i){var n;return void 0===e&&(e=0),void 0===i&&(i=0),!!this.parseBody(t)&&(t=this.boundsCenter,n=this.centerDiff,new r(e+n.x,i-(t.y-n.y)))},getBottomRight:function(t,e,i){var n;return void 0===e&&(e=0),void 0===i&&(i=0),!!this.parseBody(t)&&(t=this.boundsCenter,n=this.centerDiff,new r(e-(t.x-n.x),i-(t.y-n.y)))}});t.exports=i},function(t,e){function P(t,e,i,n){var r,s=e[0]-t[0],e=e[1]-t[1],o=n[0]-i[0],n=n[1]-i[1];if(o*e-n*s!=0)return r=(s*(i[1]-t[1])+e*(t[0]-i[0]))/(o*e-n*s),i=(o*(t[1]-i[1])+n*(i[0]-t[0]))/(n*s-o*e),0<=r&&r<=1&&0<=i&&i<=1}function u(t,e,i){return(e[0]-t[0])*(i[1]-t[1])-(i[0]-t[0])*(e[1]-t[1])}function _(t,e,i){return 0<u(t,e,i)}function E(t,e,i){return 0<=u(t,e,i)}function A(t,e,i){return u(t,e,i)<0}function M(t,e,i){return u(t,e,i)<=0}t.exports={decomp:function(t){var e=function t(e){for(var i=[],n=[],r=[],s=Number.MAX_VALUE,o=0;o<e.length;++o)if(R(e,o))for(var a=0;a<e.length;++a)if(function(t,e,i){var n,r,h=c,l=f;if(!E(C(t,e+1),C(t,e),C(t,i))||!M(C(t,e-1),C(t,e),C(t,i))){r=k(C(t,e),C(t,i));for(var s=0;s!==t.length;++s)if((s+1)%t.length!==e&&s!==e&&E(C(t,e),C(t,i),C(t,s+1))&&M(C(t,e),C(t,i),C(t,s))&&(h[0]=C(t,e),h[1]=C(t,i),l[0]=C(t,s),l[1]=C(t,s+1),n=function(){var t=[0,0],e=h[1][1]-h[0][1],i=h[0][0]-h[1][0],n=e*h[0][0]+i*h[0][1],r=l[1][1]-l[0][1],s=l[0][0]-l[1][0],o=r*l[0][0]+s*l[0][1],a=e*s-r*i;return m(a,0,0)||(t[0]=(s*n-i*o)/a,t[1]=(e*o-r*n)/a),t}(),k(C(t,e),n)<r))return;return 1}}(e,o,a)){for(var n=t(g(e,o,a,r)),h=t(g(e,a,o,r)),l=0;l<h.length;l++)n.push(h[l]);n.length<s&&(s=(i=n).length,i.push([C(e,o),C(e,a)]))}return i}(t);return 0<e.length?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],r=0;r<i.length;r++)for(var s=i[r],o=0;o<n.length;o++){var a=t(n[o],s);if(a){n.splice(o,1),n.push(a[0],a[1]);break}}return n}s=i,r=e.indexOf(s[0]),o=e.indexOf(s[1]);return-1!==r&&-1!==o&&[g(e,r,o),g(e,o,r)]}(t,e):[t]},quickDecomp:function t(e,i,n,r,s,o,a){o=o||100,a=a||0,s=s||25,i=void 0!==i?i:[],n=n||[],r=r||[];var h=[0,0],l=[0,0],c=[0,0],u=0,d=0,p=0,f=0,g=0,m=0,y=0,v=[],x=[],b=e,w=e;if(!(w.length<3||o<++a)){for(var T=0;T<e.length;++T)if(R(b,T)){n.push(b[T]);for(var u=d=Number.MAX_VALUE,S=0;S<e.length;++S)_(C(b,T-1),C(b,T),C(b,S))&&M(C(b,T-1),C(b,T),C(b,S-1))&&(c=L(C(b,T-1),C(b,T),C(b,S),C(b,S-1)),A(C(b,T+1),C(b,T),c)&&(p=k(b[T],c))<d&&(d=p,l=c,m=S)),_(C(b,T+1),C(b,T),C(b,S+1))&&M(C(b,T+1),C(b,T),C(b,S))&&(c=L(C(b,T+1),C(b,T),C(b,S),C(b,S+1)),_(C(b,T-1),C(b,T),c)&&(p=k(b[T],c))<u&&(u=p,h=c,g=S));if(m===(g+1)%e.length)c[0]=(l[0]+h[0])/2,c[1]=(l[1]+h[1])/2,r.push(c),T<g?(O(v,b,T,g+1),v.push(c),x.push(c),0!==m&&O(x,b,m,b.length),O(x,b,0,T+1)):(0!==T&&O(v,b,T,b.length),O(v,b,0,g+1),v.push(c),x.push(c),O(x,b,m,T+1));else{if(g<m&&(g+=e.length),f=Number.MAX_VALUE,g<m)return i;for(S=m;S<=g;++S)E(C(b,T-1),C(b,T),C(b,S))&&M(C(b,T+1),C(b,T),C(b,S))&&(p=k(C(b,T),C(b,S)))<f&&function(t,e,i){for(var n=0;n!==t.length;++n)if(n!==e&&n!==i&&(n+1)%t.length!==e&&(n+1)%t.length!==i&&P(C(t,e),C(t,i),C(t,n),C(t,n+1)))return;return 1}(b,T,S)&&(f=p,y=S%e.length);T<y?(O(v,b,T,y+1),0!==y&&O(x,b,y,w.length),O(x,b,0,T+1)):(0!==T&&O(v,b,T,w.length),O(v,b,0,y+1),O(x,b,y,T+1))}return v.length<x.length?(t(v,i,n,r,s,o,a),t(x,i,n,r,s,o,a)):(t(x,i,n,r,s,o,a),t(v,i,n,r,s,o,a)),i}i.push(e)}return i},isSimple:function(t){for(var e=t,i=0;i<e.length-1;i++)for(var n=0;n<i-1;n++)if(P(e[i],e[i+1],e[n],e[n+1]))return!1;for(i=1;i<e.length-2;i++)if(P(e[0],e[e.length-1],e[i],e[i+1]))return!1;return!0},removeCollinearPoints:function(t,e){for(var i,n,r,s,o,a,h,l=0,c=t.length-1;3<t.length&&0<=c;--c)i=C(t,c-1),n=C(t,c),r=C(t,c+1),h=a=o=void 0,((s=e)?(h=p,(a=d)[0]=n[0]-i[0],a[1]=n[1]-i[1],h[0]=r[0]-n[0],h[1]=r[1]-n[1],o=a[0]*h[0]+a[1]*h[1],a=Math.sqrt(a[0]*a[0]+a[1]*a[1]),h=Math.sqrt(h[0]*h[0]+h[1]*h[1]),Math.acos(o/(a*h))<s):0===u(i,n,r))&&(t.splice(c%t.length,1),l++);return l},removeDuplicatePoints:function(t,e){for(var i,n,r,s=t.length-1;1<=s;--s)for(var o=t[s],a=s-1;0<=a;--a)i=o,n=t[a],r=e,m(i[0],n[0],r)&&m(i[1],n[1],r)&&t.splice(s,1)},makeCCW:function(t){for(var e=0,i=t,n=1;n<t.length;++n)(i[n][1]<i[e][1]||i[n][1]===i[e][1]&&i[n][0]>i[e][0])&&(e=n);return!_(C(t,e-1),C(t,e),C(t,e+1))&&(function(t){for(var e=[],i=t.length,n=0;n!==i;n++)e.push(t.pop());for(n=0;n!==i;n++)t[n]=e[n]}(t),!0)}};var d=[],p=[];function k(t,e){var i=e[0]-t[0],e=e[1]-t[1];return i*i+e*e}function C(t,e){var i=t.length;return t[e<0?e%i+i:e%i]}function O(t,e,i,n){for(var r=i;r<n;r++)t.push(e[r])}function R(t,e){return A(C(t,e-1),C(t,e),C(t,e+1))}var c=[],f=[];function g(t,e,i,n){var r=n||[];if(r.length=0,e<i)for(var s=e;s<=i;s++)r.push(t[s]);else{for(s=0;s<=i;s++)r.push(t[s]);for(s=e;s<t.length;s++)r.push(t[s])}return r}function L(t,e,i,n,r){var s=e[1]-t[1],e=t[0]-e[0],t=s*t[0]+e*t[1],o=n[1]-i[1],n=i[0]-n[0],i=o*i[0]+n*i[1],a=s*n-o*e;return m(a,0,r=r||0)?[0,0]:[(n*t-e*i)/a,(s*i-o*t)/a]}function m(t,e,i){return i=i||0,Math.abs(t-e)<=i}},function(t,e,i){var c=i(86),n=i(0),u=i(591),s=i(128),d=i(592),r=i(1395),p=i(1396),o=i(1397),a=i(593),h=i(589),l=i(590),f=i(1398),g=i(64),i=new n({initialize:function(t){this.world=t,this.scene=t.scene,this.sys=t.scene.sys},rectangle:function(t,e,i,n,r){t=c.rectangle(t,e,i,n,r);return this.world.add(t),t},trapezoid:function(t,e,i,n,r,s){t=c.trapezoid(t,e,i,n,r,s);return this.world.add(t),t},circle:function(t,e,i,n,r){t=c.circle(t,e,i,n,r);return this.world.add(t),t},polygon:function(t,e,i,n,r){t=c.polygon(t,e,i,n,r);return this.world.add(t),t},fromVertices:function(t,e,i,n,r,s,o){"string"==typeof i&&(i=g.fromPath(i));t=c.fromVertices(t,e,i,n,r,s,o);return this.world.add(t),t},fromPhysicsEditor:function(t,e,i,n,r){void 0===r&&(r=!0);t=h.parseBody(t,e,i,n);return r&&!this.world.has(t)&&this.world.add(t),t},fromSVG:function(t,e,i,n,r,s){void 0===n&&(n=1),void 0===r&&(r={}),void 0===s&&(s=!0);for(var o=i.getElementsByTagName("path"),a=[],h=0;h<o.length;h++){var l=d.pathToVertices(o[h],30);1!==n&&g.scale(l,n,n),a.push(l)}i=c.fromVertices(t,e,a,r);return s&&this.world.add(i),i},fromJSON:function(t,e,i,n,r){void 0===r&&(r=!0);t=l.parseBody(t,e,i,n=void 0===n?{}:n);return t&&r&&this.world.add(t),t},imageStack:function(i,n,t,e,r,s,o,a,h){void 0===o&&(o=0),void 0===a&&(a=0),void 0===h&&(h={});var l=this.world,c=this.sys.displayList,t=(h.addToWorld=!1,u.stack(t,e,r,s,o,a,function(t,e){t=new p(l,t,e,i,n,h);return c.add(t),t.body}));return l.add(t),t},stack:function(t,e,i,n,r,s,o){t=u.stack(t,e,i,n,r,s,o);return this.world.add(t),t},pyramid:function(t,e,i,n,r,s,o){t=u.pyramid(t,e,i,n,r,s,o);return this.world.add(t),t},chain:function(t,e,i,n,r,s){return u.chain(t,e,i,n,r,s)},mesh:function(t,e,i,n,r){return u.mesh(t,e,i,n,r)},newtonsCradle:function(t,e,i,n,r){t=u.newtonsCradle(t,e,i,n,r);return this.world.add(t),t},car:function(t,e,i,n,r){t=u.car(t,e,i,n,r);return this.world.add(t),t},softBody:function(t,e,i,n,r,s,o,a,h,l){t=u.softBody(t,e,i,n,r,s,o,a,h,l);return this.world.add(t),t},joint:function(t,e,i,n,r){return this.constraint(t,e,i,n,r)},spring:function(t,e,i,n,r){return this.constraint(t,e,i,n,r)},constraint:function(t,e,i,n,r){void 0===n&&(n=1),(r=void 0===r?{}:r).bodyA="body"===t.type?t:t.body,r.bodyB="body"===e.type?e:e.body,isNaN(i)||(r.length=i),r.stiffness=n;t=s.create(r);return this.world.add(t),t},worldConstraint:function(t,e,i,n){void 0===i&&(i=1),(n=void 0===n?{}:n).bodyB="body"===t.type?t:t.body,isNaN(e)||(n.length=e),n.stiffness=i;t=s.create(n);return this.world.add(t),t},mouseSpring:function(t){return this.pointerConstraint(t)},pointerConstraint:function(t){(t=void 0===t?{}:t).hasOwnProperty("render")||(t.render={visible:!1});t=new f(this.scene,this.world,t);return this.world.add(t.constraint),t},image:function(t,e,i,n,r){t=new p(this.world,t,e,i,n,r);return this.sys.displayList.add(t),t},tileBody:function(t,e){return new a(this.world,t,e)},sprite:function(t,e,i,n,r){t=new o(this.world,t,e,i,n,r);return this.sys.displayList.add(t),this.sys.updateList.add(t),t},gameObject:function(t,e,i){return r(this.world,t,e,i)},destroy:function(){this.world=null,this.scene=null,this.sys=null}});t.exports=i},function(t,e,i){var o=i(249),a=i(2),h=i(3);t.exports=function(t,n,e,i){void 0===e&&(e={}),void 0===i&&(i=!0);var r=n.x,s=n.y;return n.body={temp:!0,position:{x:r,y:s}},[o.Bounce,o.Collision,o.Force,o.Friction,o.Gravity,o.Mass,o.Sensor,o.SetBody,o.Sleep,o.Static,o.Transform,o.Velocity].forEach(function(t){for(var e in t)(i=t[e]).get&&"function"==typeof i.get||i.set&&"function"==typeof i.set?Object.defineProperty(n,e,{get:t[e].get,set:t[e].set}):Object.defineProperty(n,e,{value:t[e]});var i}),n.world=t,n._tempVec2=new h(r,s),e.hasOwnProperty("type")&&"body"===e.type?n.setExistingBody(e,i):(t=a(e,"shape",null)||"rectangle",e.addToWorld=i,n.setBody(t,e)),n}},function(t,e,i){var n=i(0),r=i(249),o=i(15),a=i(2),s=i(125),h=i(167),l=i(3),i=new n({Extends:s,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,h],initialize:function(t,e,i,n,r,s){o.call(this,t.scene,"Image"),this._crop=this.resetCropObject(),this.setTexture(n,r),this.setSizeToFrame(),this.setOrigin(),this.world=t,this._tempVec2=new l(e,i);n=a(s,"shape",null);n?this.setBody(n,s):this.setRectangle(this.width,this.height,s),this.setPosition(e,i),this.initPipeline()}});t.exports=i},function(t,e,i){var o=i(164),n=i(0),r=i(249),a=i(15),h=i(2),s=i(167),l=i(73),c=i(3),i=new n({Extends:l,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,s],initialize:function(t,e,i,n,r,s){a.call(this,t.scene,"Sprite"),this._crop=this.resetCropObject(),this.anims=new o(this),this.setTexture(n,r),this.setSizeToFrame(),this.setOrigin(),this.world=t,this._tempVec2=new c(e,i);n=h(s,"shape",null);n?this.setBody(n,s):this.setRectangle(this.width,this.height,s),this.setPosition(e,i),this.initPipeline()}});t.exports=i},function(t,e,i){var o=i(84),n=i(0),a=i(118),r=i(128),h=i(273),l=i(272),s=i(51),c=i(127),u=i(165),d=i(3),p=i(64),i=new n({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 d,this.body=null,this.part=null,this.constraint=r.create(c(i,{label:"Pointer Constraint",pointA:{x:0,y:0},pointB:{x:0,y:0},length:.01,stiffness:.1,angularStiffness:1,collisionFilter:{category:1,mask:4294967295,group:0}})),this.world.on(l.BEFORE_UPDATE,this.update,this),t.sys.input.on(s.POINTER_DOWN,this.onDown,this),t.sys.input.on(s.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 n=a.allBodies(this.world.localWorld),r=0;r<n.length;r++){var s=n[r];if(!s.ignorePointer&&o.contains(s.bounds,e)&&h.canCollide(s.collisionFilter,i.collisionFilter)&&this.hitTestBody(s,e))return this.world.emit(l.DRAG_START,s,this.part,this),!0}return!1},hitTestBody:function(t,e){for(var i=this.constraint,n=t.parts.length,r=1<n?1:0;r<n;r++){var s=t.parts[r];if(p.contains(s.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,u.set(t,!1),this.part=s,this.body=t,!0}return!1},update:function(){var t,e,i=this.pointer,n=this.body;this.active&&i?i.isDown||!n?i.isDown&&(n||this.getBody(i))&&(n=this.body,t=this.position,e=this.constraint,this.camera.getWorldPoint(i.x,i.y,t),e.pointA.x=t.x,e.pointA.y=t.y,u.set(n,!1),this.world.emit(l.DRAG,n,this)):this.stopDrag():n&&this.stopDrag()},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(l.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(l.BEFORE_UPDATE,this.update),this.scene.sys.input.off(s.POINTER_DOWN,this.onDown,this),this.scene.sys.input.off(s.POINTER_UP,this.onUp,this)}});t.exports=i},function(t,e,i){var n={},r=(t.exports=n,i(595)),s=i(32);n.name="matter-js",n.version="0.14.2",n.uses=[],n.used=[],n.use=function(){r.use(n,Array.prototype.slice.call(arguments))},n.before=function(t,e){return t=t.replace(/^Matter./,""),s.chainPathBefore(n,t,e)},n.after=function(t,e){return t=t.replace(/^Matter./,""),s.chainPathAfter(n,t,e)}},function(t,e,i){var c={},u=(t.exports=c,i(83)),a=i(274),h=i(84),d=i(86),l=i(64);c.collides=function(t,e){for(var i=[],n=0;n<e.length;n++){var r=e[n];if(t!==r&&h.overlaps(r.bounds,t.bounds))for(var s=1===r.parts.length?0:1;s<r.parts.length;s++){var o=r.parts[s];if(h.overlaps(o.bounds,t.bounds)){o=a.collides(o,t);if(o.collided){i.push(o);break}}}}return i},c.ray=function(t,e,i,n){n=n||1e-100;for(var r=u.angle(e,i),s=u.magnitude(u.sub(e,i)),o=.5*(i.x+e.x),i=.5*(i.y+e.y),e=d.rectangle(o,i,s,n,{angle:r}),a=c.collides(e,t),h=0;h<a.length;h+=1){var l=a[h];l.body=l.bodyB=l.bodyA}return a},c.region=function(t,e,i){for(var n=[],r=0;r<t.length;r++){var s=t[r],o=h.overlaps(s.bounds,e);(o&&!i||!o&&i)&&n.push(s)}return n},c.point=function(t,e){for(var i=[],n=0;n<t.length;n++){var r=t[n];if(h.contains(r.bounds,e))for(var s=1===r.parts.length?0:1;s<r.parts.length;s++){var o=r.parts[s];if(h.contains(o.bounds,e)&&l.contains(o.vertices,e)){i.push(r);break}}}return i}},function(t,e,i){var u={},n=(t.exports=u,i(596)),d=i(165),p=i(599),f=i(598),g=i(1523),r=i(597),m=i(166),y=i(118),v=i(128),s=i(32),a=i(41);u.create=function(t,e){e=(s.isElement(t)?e:t)||{},((t=s.isElement(t)?t:null)||e.render)&&s.warn("Engine.create: engine.render is deprecated (see docs)");t=s.extend({positionIterations:6,velocityIterations:4,constraintIterations:2,enableSleeping:!1,events:[],plugin:{},timing:{timestamp:0,timeScale:1},broadphase:{controller:r}},e);return t.world=e.world||n.create(t.world),t.pairs=f.create(),t.broadphase=t.broadphase.controller.create(t.broadphase),t.metrics=t.metrics||{extended:!1},t.metrics=g.create(t.metrics),t},u.update=function(t,e,i){i=i||1;var n,r=t.world,s=t.timing,o=t.broadphase,a=(s.timestamp+=(e=e||1e3/60)*s.timeScale,{timestamp:s.timestamp}),h=(m.trigger(t,"beforeUpdate",a),y.allBodies(r)),l=y.allConstraints(r);for(g.reset(t.metrics),t.enableSleeping&&d.update(h,s.timeScale),u._bodiesApplyGravity(h,r.gravity),u._bodiesUpdate(h,e,s.timeScale,i,r.bounds),v.preSolveAll(h),n=0;n<t.constraintIterations;n++)v.solveAll(l,s.timeScale);v.postSolveAll(h),e=o.controller?(r.isModified&&o.controller.clear(o),o.controller.update(o,h,t,r.isModified),o.pairsList):h,r.isModified&&y.setModified(r,!1,!1,!0);var i=o.detector(e,t),c=t.pairs,r=s.timestamp;for(f.update(c,i,r),f.removeOld(c,r),t.enableSleeping&&d.afterCollisions(c.list,s.timeScale),0<c.collisionStart.length&&m.trigger(t,"collisionStart",{pairs:c.collisionStart}),p.preSolvePosition(c.list),n=0;n<t.positionIterations;n++)p.solvePosition(c.list,h,s.timeScale);for(p.postSolvePosition(h),v.preSolveAll(h),n=0;n<t.constraintIterations;n++)v.solveAll(l,s.timeScale);for(v.postSolveAll(h),p.preSolveVelocity(c.list),n=0;n<t.velocityIterations;n++)p.solveVelocity(c.list,s.timeScale);return 0<c.collisionActive.length&&m.trigger(t,"collisionActive",{pairs:c.collisionActive}),0<c.collisionEnd.length&&m.trigger(t,"collisionEnd",{pairs:c.collisionEnd}),g.update(t.metrics,t),u._bodiesClearForces(h),m.trigger(t,"afterUpdate",a),t},u.merge=function(t,e){if(s.extend(t,e),e.world){t.world=e.world,u.clear(t);for(var i=y.allBodies(t.world),n=0;n<i.length;n++){var r=i[n];d.set(r,!1),r.id=s.nextId()}}},u.clear=function(t){var e=t.world;f.clear(t.pairs);var i=t.broadphase;i.controller&&(e=y.allBodies(e),i.controller.clear(i),i.controller.update(i,e,t,!0))},u._bodiesClearForces=function(t){for(var e=0;e<t.length;e++){var i=t[e];i.force.x=0,i.force.y=0,i.torque=0}},u._bodiesApplyGravity=function(t,e){var i=void 0!==e.scale?e.scale:.001;if((0!==e.x||0!==e.y)&&0!==i)for(var n=0;n<t.length;n++){var r=t[n];r.ignoreGravity||r.isStatic||r.isSleeping||(r.force.x+=r.mass*e.x*i*r.gravityScale.x,r.force.y+=r.mass*e.y*i*r.gravityScale.y)}},u._bodiesUpdate=function(t,e,i,n,r){for(var s=0;s<t.length;s++){var o=t[s];o.isStatic||o.isSleeping||a.update(o,e,i,n)}}},function(t,e,i){var s=i(86),n=i(41),r=i(0),m=i(32),l=i(118),c=i(1401),u=i(9),o=i(272),d=i(2),p=i(6),a=i(41),h=i(166),f=i(593),g=i(596),y=i(83),i=new r({Extends:u,initialize:function(t,e){u.call(this),this.scene=t,this.engine=c.create(e),this.localWorld=this.engine.world;var i=p(e,"gravity",null),i=(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=p(e,"enabled",!0),this.correction=p(e,"correction",1),this.getDelta=p(e,"getDelta",this.update60Hz),d(e,"runner",{})),n=d(i,"fps",!1),r=d(i,"fps",60),s=d(i,"delta",1e3/r),o=d(i,"deltaMin",1e3/r),a=d(i,"deltaMax",1e3/(.5*r));this.runner={fps:r=n?r:1e3/s,correction:d(i,"correction",1),deltaSampleSize:d(i,"deltaSampleSize",60),counterTimestamp:0,frameCounter:0,deltaHistory:[],timePrev:null,timeScalePrev:1,frameRequestId:null,isFixed:d(i,"isFixed",!1),delta:s,deltaMin:o,deltaMax:a},this.autoUpdate=p(e,"autoUpdate",!0);var h,n=p(e,"debug",!1);this.drawDebug="object"==typeof n||n,this.debugGraphic,this.debugConfig={showAxes:d(n,"showAxes",!1),showAngleIndicator:d(n,"showAngleIndicator",!1),angleColor:d(n,"angleColor",15208787),showBroadphase:d(n,"showBroadphase",!1),broadphaseColor:d(n,"broadphaseColor",16757760),showBounds:d(n,"showBounds",!1),boundsColor:d(n,"boundsColor",16777215),showVelocity:d(n,"showVelocity",!1),velocityColor:d(n,"velocityColor",44783),showCollisions:d(n,"showCollisions",!1),collisionColor:d(n,"collisionColor",16094476),showSeparations:d(n,"showSeparations",!1),separationColor:d(n,"separationColor",16753920),showBody:d(n,"showBody",!0),showStaticBody:d(n,"showStaticBody",!0),showInternalEdges:d(n,"showInternalEdges",!1),renderFill:d(n,"renderFill",!1),renderLine:d(n,"renderLine",!0),fillColor:d(n,"fillColor",1075465),fillOpacity:d(n,"fillOpacity",1),lineColor:d(n,"lineColor",2678297),lineOpacity:d(n,"lineOpacity",1),lineThickness:d(n,"lineThickness",1),staticFillColor:d(n,"staticFillColor",857979),staticLineColor:d(n,"staticLineColor",1255396),showSleeping:d(n,"showSleeping",!1),staticBodySleepOpacity:d(n,"staticBodySleepOpacity",.7),sleepFillColor:d(n,"sleepFillColor",4605510),sleepLineColor:d(n,"sleepLineColor",10066585),showSensors:d(n,"showSensors",!0),sensorFillColor:d(n,"sensorFillColor",857979),sensorLineColor:d(n,"sensorLineColor",1255396),showPositions:d(n,"showPositions",!0),positionSize:d(n,"positionSize",4),positionColor:d(n,"positionColor",14697178),showJoint:d(n,"showJoint",!0),jointColor:d(n,"jointColor",14737474),jointLineOpacity:d(n,"jointLineOpacity",1),jointLineThickness:d(n,"jointLineThickness",2),pinSize:d(n,"pinSize",4),pinColor:d(n,"pinColor",4382944),springColor:d(n,"springColor",14697184),anchorColor:d(n,"anchorColor",15724527),anchorSize:d(n,"anchorSize",4),showConvexHulls:d(n,"showConvexHulls",!1),hullColor:d(n,"hullColor",14091216)},this.drawDebug&&this.createDebugGraphic(),this.setEventsProxy(),d(e,"setBounds",!1)&&("boolean"==typeof(r=e.setBounds)?this.setBounds():(i=d(r,"x",0),s=d(r,"y",0),o=d(r,"width",t.sys.scale.width),a=d(r,"height",t.sys.scale.height),n=d(r,"thickness",64),e=d(r,"left",!0),t=d(r,"right",!0),h=d(r,"top",!0),r=d(r,"bottom",!0),this.setBounds(i,s,o,a,n,e,t,h,r)))},setCompositeRenderStyle:function(t){for(var e,i,n=t.bodies,r=t.constraints,s=t.composites,o=0;o<n.length;o++)i=(e=n[o]).render,this.setBodyRenderStyle(e,i.lineColor,i.lineOpacity,i.lineThickness,i.fillColor,i.fillOpacity);for(o=0;o<r.length;o++)i=(e=r[o]).render,this.setConstraintRenderStyle(e,i.lineColor,i.lineOpacity,i.lineThickness,i.pinSize,i.anchorColor,i.anchorSize);for(o=0;o<s.length;o++)e=s[o],this.setCompositeRenderStyle(e);return this},setBodyRenderStyle:function(t,e,i,n,r,s){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==r&&(r=t.isStatic?a.staticFillColor:a.fillColor),null==s&&(s=a.fillOpacity),!1!==e&&(o.lineColor=e),!1!==i&&(o.lineOpacity=i),!1!==n&&(o.lineThickness=n),!1!==r&&(o.fillColor=r),!1!==s&&(o.fillOpacity=s)),this},setConstraintRenderStyle:function(t,e,i,n,r,s,o){var a,t=t.render,h=this.debugConfig;return t&&(null==e&&("line"===(a=t.type)?e=h.jointColor:"pin"===a?e=h.pinColor:"spring"===a&&(e=h.springColor)),null==i&&(i=h.jointLineOpacity),null==n&&(n=h.jointLineThickness),null==r&&(r=h.pinSize),null==s&&(s=h.anchorColor),null==o&&(o=h.anchorSize),!1!==e&&(t.lineColor=e),!1!==i&&(t.lineOpacity=i),!1!==n&&(t.lineThickness=n),!1!==r&&(t.pinSize=r),!1!==s&&(t.anchorColor=s),!1!==o&&(t.anchorSize=o)),this},setEventsProxy:function(){var s=this,t=this.engine,e=this.localWorld;this.drawDebug&&(h.on(e,"compositeModified",function(t){s.setCompositeRenderStyle(t)}),h.on(e,"beforeAdd",function(t){for(var e=[].concat(t.object),i=0;i<e.length;i++){var n=e[i],r=n.render;"body"===n.type?s.setBodyRenderStyle(n,r.lineColor,r.lineOpacity,r.lineThickness,r.fillColor,r.fillOpacity):"composite"===n.type?s.setCompositeRenderStyle(n):"constraint"===n.type&&s.setConstraintRenderStyle(n,r.lineColor,r.lineOpacity,r.lineThickness,r.pinSize,r.anchorColor,r.anchorSize)}})),h.on(e,"beforeAdd",function(t){s.emit(o.BEFORE_ADD,t)}),h.on(e,"afterAdd",function(t){s.emit(o.AFTER_ADD,t)}),h.on(e,"beforeRemove",function(t){s.emit(o.BEFORE_REMOVE,t)}),h.on(e,"afterRemove",function(t){s.emit(o.AFTER_REMOVE,t)}),h.on(t,"beforeUpdate",function(t){s.emit(o.BEFORE_UPDATE,t)}),h.on(t,"afterUpdate",function(t){s.emit(o.AFTER_UPDATE,t)}),h.on(t,"collisionStart",function(t){var e,i,n=t.pairs;0<n.length&&(e=n[0].bodyA,i=n[0].bodyB),s.emit(o.COLLISION_START,t,e,i)}),h.on(t,"collisionActive",function(t){var e,i,n=t.pairs;0<n.length&&(e=n[0].bodyA,i=n[0].bodyB),s.emit(o.COLLISION_ACTIVE,t,e,i)}),h.on(t,"collisionEnd",function(t){var e,i,n=t.pairs;0<n.length&&(e=n[0].bodyA,i=n[0].bodyB),s.emit(o.COLLISION_END,t,e,i)})},setBounds:function(t,e,i,n,r,s,o,a,h){return void 0===i&&(i=this.scene.sys.scale.width),void 0===n&&(n=this.scene.sys.scale.height),void 0===o&&(o=!0),void 0===a&&(a=!0),void 0===h&&(h=!0),this.updateWall(s=void 0===s?!0:s,"left",(t=void 0===t?0:t)-(r=void 0===r?64:r),(e=void 0===e?0:e)-r,r,n+2*r),this.updateWall(o,"right",t+i,e-r,r,n+2*r),this.updateWall(a,"top",t,e-r,i,r),this.updateWall(h,"bottom",t,e+n,i,r),this},updateWall:function(t,e,i,n,r,s){var o=this.walls[e];t?(o&&g.remove(this.localWorld,o),this.walls[e]=this.create(i+=r/2,n+=s/2,r,s,{isStatic:!0,friction:0,frictionStatic:0})):(o&&g.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===e&&(e=1),this.localWorld.gravity.x=t=void 0===t?0:t,this.localWorld.gravity.y=e,void 0!==i&&(this.localWorld.gravity.scale=i),this},create:function(t,e,i,n,r){t=s.rectangle(t,e,i,n,r);return g.add(this.localWorld,t),t},add:function(t){return g.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],n=n.body||n;l.remove(this.localWorld,n,e)}return this},removeConstraint:function(t,e){return l.remove(this.localWorld,t,e),this},convertTilemapLayer:function(t,e){var i=t.layer,t=t.getTilesWithin(0,0,i.width,i.height,{isColliding:!0});return this.convertTiles(t,e),this},convertTiles:function(t,e){if(0!==t.length)for(var i=0;i<t.length;i++)new f(this,t[i],e);return this},nextGroup:function(t){return a.nextGroup(t)},nextCategory:function(){return a.nextCategory()},pause:function(){return this.enabled=!1,this.emit(o.PAUSE),this},resume:function(){return this.enabled=!0,this.emit(o.RESUME),this},update:function(t,e){var i,n,r,s;this.enabled&&this.autoUpdate&&(i=this.engine,n=this.runner,r=i.timing,s=this.correction,n.isFixed?e=this.getDelta(t,e):(e=t-n.timePrev||n.delta,n.timePrev=t,n.deltaHistory.push(e),n.deltaHistory=n.deltaHistory.slice(-n.deltaSampleSize),s=(e=(e=(e=Math.min.apply(null,n.deltaHistory))<n.deltaMin?n.deltaMin:e)>n.deltaMax?n.deltaMax:e)/n.delta,n.delta=e),0!==n.timeScalePrev&&(s*=r.timeScale/n.timeScalePrev),0===r.timeScale&&(s=0),n.timeScalePrev=r.timeScale,n.correction=s,n.frameCounter+=1,1e3<=t-n.counterTimestamp&&(n.fps=n.frameCounter*((t-n.counterTimestamp)/1e3),n.counterTimestamp=t,n.frameCounter=0),c.update(i,e,s))},step:function(t,e){c.update(this.engine,t,e)},update60Hz:function(){return 1e3/60},update30Hz:function(){return 1e3/30},has:function(t){t=t.hasOwnProperty("body")?t.body:t;return null!==l.get(this.localWorld,t.id,t.type)},getAllBodies:function(){return l.allBodies(this.localWorld)},getAllConstraints:function(){return l.allConstraints(this.localWorld)},getAllComposites:function(){return l.allComposites(this.localWorld)},postUpdate:function(){var t,e,i,n;this.drawDebug&&(t=this.debugConfig,e=this.engine,i=this.debugGraphic,n=l.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 r=m.keys(t.buckets),s=0;s<r.length;s++){var o=r[s];t.buckets[o].length<2||(o=o.split(/C|R/),e.strokeRect(parseInt(o[1],10)*t.bucketWidth,parseInt(o[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 r,s,o,a,h,l=t[n];l.isActive&&(r=(l=l.collision).bodyA,s=l.bodyB,o=r.position,a=s.position,l=l.penetration,h=r.isStatic||s.isStatic?1:4,s.isStatic&&(h=0),e.lineBetween(a.x,a.y,a.x-l.x*h,a.y-l.y*h),h=r.isStatic||s.isStatic?1:4,r.isStatic&&(h=0),e.lineBetween(o.x,o.y,o.x-l.x*h,o.y-l.y*h))}return this},renderCollisions:function(t,e,i){var n,r,s,o,a,h;for(e.lineStyle(1,i,.5),e.fillStyle(i,1),n=0;n<t.length;n++)if((r=t[n]).isActive)for(var l=0;l<r.activeContacts.length;l++){var c=r.activeContacts[l].vertex;e.fillRect(c.x-2,c.y-2,5,5)}for(n=0;n<t.length;n++)(r=t[n]).isActive&&(s=r.collision,0<(o=r.activeContacts).length&&(a=o[0].vertex.x,h=o[0].vertex.y,2===o.length&&(a=(o[0].vertex.x+o[1].vertex.x)/2,h=(o[0].vertex.y+o[1].vertex.y)/2),s.bodyB===s.supports[0].body||s.bodyA.isStatic?e.lineBetween(a-8*s.normal.x,h-8*s.normal.y,a,h):e.lineBetween(a+8*s.normal.x,h+8*s.normal.y,a,h)));return this},renderBodyBounds:function(t,e,i,n){e.lineStyle(1,i,n);for(var r=0;r<t.length;r++){var s=t[r];if(s.render.visible){var o=s.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=s.parts,h=1<a.length?1:0;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,r){e.lineStyle(1,n,r);for(var s=0;s<t.length;s++){var o,a,h,l=t[s],c=l.parts;if(l.render.visible)if(i)for(a=1<c.length?1:0;a<c.length;a++)for(o=c[a],h=0;h<o.axes.length;h++){var u=o.axes[h];e.lineBetween(o.position.x,o.position.y,o.position.x+20*u.x,o.position.y+20*u.y)}else for(a=1<c.length?1:0;a<c.length;a++)for(o=c[a],h=0;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,r){e.lineStyle(r,i,n);for(var s=0;s<t.length;s++){var o=t[s];o.render.visible&&e.lineBetween(o.position.x,o.position.y,o.position.x+2*(o.position.x-o.positionPrev.x),o.position.y+2*(o.position.y-o.positionPrev.y))}return this},renderBodies:function(t){for(var e=this.debugGraphic,i=this.debugConfig,n=i.showBody,r=i.showStaticBody,s=i.showSleeping,o=i.showInternalEdges,a=i.showConvexHulls,h=i.renderFill,l=i.renderLine,c=i.staticBodySleepOpacity,u=i.sleepFillColor,d=i.sleepLineColor,p=i.hullColor,f=0;f<t.length;f++){var g,m,y,v,x,b=t[f];!b.render.visible||!r&&b.isStatic||!n&&!b.isStatic||(x=b.render.lineColor,g=b.render.lineOpacity,m=b.render.lineThickness,y=b.render.fillColor,v=b.render.fillOpacity,s&&b.isSleeping&&(b.isStatic?(g*=c,v*=c):(x=d,y=u)),this.renderBody(b,e,o,x=l?x:null,g,m,y=h?y:null,v),x=b.parts.length,a&&1<x&&this.renderConvexHull(b,e,p,m))}},renderBody:function(t,e,i,n,r,s,o,a){void 0===n&&(n=null),void 0===r&&(r=null),void 0===s&&(s=1),void 0===o&&(o=null),void 0===a&&(a=null);for(var h,l,c=this.debugConfig,u=c.sensorFillColor,d=c.sensorLineColor,p=t.parts,f=p.length,g=1<f?1:0;g<f;g++){var m=p[g],y=m.render,v=y.opacity;if(y.visible&&0!==v&&(!m.isSensor||c.showSensors)){y=m.circleRadius;if(e.beginPath(),m.isSensor?(null!==o&&e.fillStyle(u,a*v),null!==n&&e.lineStyle(s,d,r*v)):(null!==o&&e.fillStyle(o,a*v),null!==n&&e.lineStyle(s,n,r*v)),y)e.arc(m.position.x,m.position.y,y,0,2*Math.PI);else{var x=m.vertices,b=x.length;e.moveTo(x[0].x,x[0].y);for(var w=1;w<b;w++){var T=x[w];!x[w-1].isInternal||i?e.lineTo(T.x,T.y):e.moveTo(T.x,T.y),w<b&&T.isInternal&&!i&&e.moveTo(x[T=(w+1)%b].x,x[T].y)}e.closePath()}null!==o&&e.fillPath(),null!==n&&e.strokePath()}}return c.showPositions&&!t.isStatic&&(h=t.position.x,t=t.position.y,l=Math.ceil(c.positionSize/2),e.fillStyle(c.positionColor,1),e.fillRect(h-l,t-l,c.positionSize,c.positionSize)),this},renderConvexHull:function(t,e,i,n){if(void 0===n&&(n=1),1<t.parts.length){var r=t.vertices;e.lineStyle(n,i),e.beginPath(),e.moveTo(r[0].x,r[0].y);for(var s=1;s<r.length;s++)e.lineTo(r[s].x,r[s].y);e.lineTo(r[0].x,r[0].y),e.strokePath()}return this},renderJoints:function(){for(var t=this.debugGraphic,e=l.allConstraints(this.localWorld),i=0;i<e.length;i++){var n=e[i].render,r=n.lineColor,s=n.lineOpacity,o=n.lineThickness,a=n.pinSize,h=n.anchorColor,n=n.anchorSize;this.renderConstraint(e[i],t,r,s,o,a,h,n)}},renderConstraint:function(t,e,i,n,r,s,o,a){var h=t.render;if(h.visible&&t.pointA&&t.pointB){e.lineStyle(r,i,n);var l,r=t.bodyA,i=t.bodyB,c=r?y.add(r.position,t.pointA):t.pointA;if("pin"===h.type)e.strokeCircle(c.x,c.y,s);else{if(l=i?y.add(i.position,t.pointB):t.pointB,e.beginPath(),e.moveTo(c.x,c.y),"spring"===h.type)for(var u,d=y.sub(l,c),p=y.perp(y.normalise(d)),f=Math.ceil(m.clamp(t.length/5,12,20)),g=1;g<f;g+=1)e.lineTo(c.x+d.x*(g/f)+p.x*(u=g%2==0?1:-1)*4,c.y+d.y*(g/f)+p.y*u*4);e.lineTo(l.x,l.y)}e.strokePath(),h.anchors&&0<a&&(e.fillStyle(o),e.fillCircle(c.x,c.y,a),e.fillCircle(l.x,l.y,a))}return this},resetCollisionIDs:function(){return n._nextCollidingGroupId=1,n._nextNonCollidingGroupId=-1,n._nextCategory=1,this},shutdown:function(){h.off(this.engine),this.removeAllListeners(),g.clear(this.localWorld,!1),c.clear(this.engine),this.drawDebug&&this.debugGraphic.destroy()},destroy:function(){this.shutdown()}});t.exports=i},function(t,e,i){t.exports={BasePlugin:i(540),DefaultPlugins:i(197),PluginCache:i(24),PluginManager:i(414),ScenePlugin:i(1404)}},function(t,e,i){var n=i(540),r=i(0),s=i(20),i=new r({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(s.BOOT,this.boot,this)},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=i},function(t,e,i){t.exports={Canvas:i(1406),Events:i(91),Snapshot:i(1407),WebGL:i(1408)}},function(t,e,i){t.exports={CanvasRenderer:i(368),GetBlendModes:i(370),SetTransform:i(30)}},function(t,e,i){t.exports={Canvas:i(369),WebGL:i(383)}},function(t,e,i){var n=i(107),i=i(17)(!1,{PipelineManager:i(372),Pipelines:i(1409),RenderTarget:i(141),Utils:i(12),WebGLPipeline:i(58),WebGLRenderer:i(371),WebGLShader:i(375)},n);t.exports=i},function(t,e,i){var n=i(92),i=i(17)(!1,{BitmapMaskPipeline:i(373),Events:i(374),GraphicsPipeline:i(376),LightPipeline:i(377),MultiPipeline:i(108),PointLightPipeline:i(378),PostFXPipeline:i(1410),RopePipeline:i(379),SinglePipeline:i(380),UtilityPipeline:i(381)},n);t.exports=i},function(t,e,i){var n=i(0),r=i(198),s=i(2),o=i(1411),a=i(382),h=i(58),i=new n({Extends:h,initialize:function(t){t.renderTarget=s(t,"renderTarget",1),t.fragShader=s(t,"fragShader",o),t.vertShader=s(t,"vertShader",a),t.attributes=s(t,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),t.batchSize=1,t.vertices=[-1,-1,0,0,-1,1,0,1,1,1,1,1,-1,-1,0,0,1,1,1,1,1,-1,1,0],h.call(this,t),this.isPostFX=!0,this.gameObject,this.colorMatrix=new r,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2,this.renderer.isBooted&&(this.manager=this.renderer.pipelines,this.boot())},boot:function(){h.prototype.boot.call(this);var t=this.manager.UTILITY_PIPELINE;this.fullFrame1=t.fullFrame1,this.fullFrame2=t.fullFrame2,this.halfFrame1=t.halfFrame1,this.halfFrame2=t.halfFrame2,this.set1i("uMainSampler",0)},onDraw:function(t){this.bindAndDraw(t)},copyFrame:function(t,e,i,n,r){this.manager.copyFrame(t,e,i,n,r)},copyToGame:function(t){this.manager.copyToGame(t)},drawFrame:function(t,e,i){this.manager.drawFrame(t,e,i,this.colorMatrix)},blendFrames:function(t,e,i,n,r){this.manager.blendFrames(t,e,i,n,r)},blendFramesAdditive:function(t,e,i,n,r){this.manager.blendFramesAdditive(t,e,i,n,r)},clearFrame:function(t,e){this.manager.clearFrame(t,e)},blitFrame:function(t,e,i,n,r,s){this.manager.blitFrame(t,e,i,n,r,s)},copyFrameRect:function(t,e,i,n,r,s,o,a){this.manager.copyFrameRect(t,e,i,n,r,s,o,a)},bindAndDraw:function(t,e,i,n,r){void 0===i&&(i=!0),void 0===n&&(n=!0);var s=this.gl,o=this.renderer;this.bind(r),this.set1i("uMainSampler",0),e?(s.viewport(0,0,e.width,e.height),s.bindFramebuffer(s.FRAMEBUFFER,e.framebuffer),s.framebufferTexture2D(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,e.texture,0),i&&(n?s.clearColor(0,0,0,0):s.clearColor(0,0,0,1),s.clear(s.COLOR_BUFFER_BIT))):(o.popFramebuffer(!1,!1,!1),o.currentFramebuffer||s.viewport(0,0,o.width,o.height)),s.activeTexture(s.TEXTURE0),s.bindTexture(s.TEXTURE_2D,t.texture),s.bufferData(s.ARRAY_BUFFER,this.vertexData,s.STATIC_DRAW),s.drawArrays(s.TRIANGLES,0,6),e?(s.bindTexture(s.TEXTURE_2D,null),s.bindFramebuffer(s.FRAMEBUFFER,null)):o.resetTextures()}});t.exports=i},function(t,e){t.exports=["#define SHADER_NAME PHASER_POSTFX_FS","","precision mediump float;","","uniform sampler2D uMainSampler;","","varying vec2 outTexCoord;","","void main ()","{"," gl_FragColor = texture2D(uMainSampler, outTexCoord);","}",""].join("\n")},function(t,e,i){var n=i(17),r=i(201),i=n(!1,{Center:i(403),Events:i(104),Orientation:i(404),ScaleManager:i(415),ScaleModes:i(405),Zoom:i(406)},r.CENTER),i=n(!1,i,r.ORIENTATION);i=n(!1,i,r.SCALE_MODE),i=n(!1,i,r.ZOOM),t.exports=i},function(t,e,i){var n=i(144),i=i(17)(!1,{Events:i(20),GetPhysicsPlugins:i(419),GetScenePlugins:i(420),SceneManager:i(417),ScenePlugin:i(1414),Settings:i(421),Systems:i(204)},n);t.exports=i},function(t,e,i){var n=i(18),r=i(0),o=i(20),a=i(2),i=i(24),r=new r({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(o.BOOT,this.boot,this),t.sys.events.on(o.START,this.pluginStart,this)},boot:function(){this.systems.events.once(o.DESTROY,this.destroy,this)},pluginStart:function(){this._target=null,this.systems.events.once(o.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){var e,i,n,r=a(t=void 0===t?{}:t,"target",!1),s=this.manager.getScene(r);return!(!r||!this.checkValidTransition(s))&&(e=a(t,"duration",1e3),this._elapsed=0,this._target=s,this._duration=e,this._willSleep=a(t,"sleep",!1),this._willRemove=a(t,"remove",!1),(i=a(t,"onUpdate",null))&&(this._onUpdate=i,this._onUpdateScope=a(t,"onUpdateScope",this.scene)),i=a(t,"allowInput",!1),this.settings.transitionAllowInput=i,(n=s.sys.settings).isTransition=!0,n.transitionFrom=this.scene,n.transitionDuration=e,n.transitionAllowInput=i,a(t,"moveAbove",!1)?this.manager.moveAbove(this.key,r):a(t,"moveBelow",!1)&&this.manager.moveBelow(this.key,r),s.sys.isSleeping()?s.sys.wake(a(t,"data")):this.manager.start(r,a(t,"data")),this.systems.events.emit(o.TRANSITION_OUT,s,e),this.systems.events.on(o.UPDATE,this.step,this),!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;this.systems.events.off(o.UPDATE,this.step,this),t.events.emit(o.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){return t!==this.key&&this.manager.queueOp("switch",this.key,t),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);e=this.manager.getScene(e);return e&&e.sys.setActive(t,i),this},setVisible:function(t,e){void 0===e&&(e=this.key);e=this.manager.getScene(e);return e&&e.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 t!==(e=void 0===e?this.key:e)&&this.manager.swapPosition(t,e),this},moveAbove:function(t,e){return t!==(e=void 0===e?this.key:e)&&this.manager.moveAbove(t,e),this},moveBelow:function(t,e){return t!==(e=void 0===e?this.key: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)},getIndex:function(t){return void 0===t&&(t=this.key),this.manager.getIndex(t)},shutdown:function(){var t=this.systems.events;t.off(o.SHUTDOWN,this.shutdown,this),t.off(o.POST_UPDATE,this.step,this),t.off(o.TRANSITION_OUT)},destroy:function(){this.shutdown(),this.scene.sys.events.off(o.START,this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});i.register("ScenePlugin",r,"scenePlugin"),t.exports=r},function(t,e,i){t.exports={Events:i(438),List:i(110),Map:i(102),ProcessQueue:i(211),RTree:i(531),Set:i(149),Size:i(416)}},function(t,e,i){var n=i(17),r=i(1417),n=n(!1,{CanvasTexture:i(423),Events:i(106),FilterMode:r,Frame:i(109),Parsers:i(425),Texture:i(206),TextureManager:i(422),TextureSource:i(424)},r);t.exports=n},function(t,e){t.exports={LINEAR:0,NEAREST:1}},function(t,e,i){var n=i(17),r=i(1419),n=n(!1,{Components:i(251),Parsers:i(1452),Formats:i(40),ImageCollection:i(576),ParseToTilemap:i(262),Tile:i(85),Tilemap:i(580),TilemapCreator:i(1459),TilemapFactory:i(1460),Tileset:i(122),TilemapLayer:i(581),Orientation:i(29),LayerData:i(120),MapData:i(121),ObjectLayer:i(572)},r.ORIENTATION);t.exports=n},function(t,e,i){i={ORIENTATION:i(29)};t.exports=i},function(t,e,i){var f=i(26),g=i(63);t.exports=function(t,e,i,n,r,s,o,a){void 0===o&&(o=!0);for(var h=f(t=t<0?0:t,e=e<0?0:e,i,n,null,a),l=r-t,c=s-e,u=0;u<h.length;u++){var d=h[u].x+l,p=h[u].y+c;0<=d&&d<a.width&&0<=p&&p<a.height&&a.data[p][d]&&a.data[p][d].copy(h[u])}o&&g(r-1,s-1,i+2,n+2,a)}},function(t,e,i){var u=i(26),d=i(542);t.exports=function(t,e,i,n,r,s){i=i||{},Array.isArray(t)||(t=[t]);var o=s.tilemapLayer;n=n||o.scene,r=r||n.cameras.main;for(var a=u(0,0,s.width,s.height,null,s),h=[],l=0;l<a.length;l++){var c=a[l];-1!==t.indexOf(c.index)&&(c=o.tileToWorldXY(c.x,c.y,void 0,r,s),i.x=c.x,i.y=c.y,h.push(n.make.sprite(i)))}if("number"==typeof e)for(l=0;l<t.length;l++)d(t[l],e,0,0,s.width,s.height,s);else if(Array.isArray(e))for(l=0;l<t.length;l++)d(t[l],e[l],0,0,s.width,s.height,s);return h}},function(t,e,i){var c=i(26),u=i(63),d=i(72);t.exports=function(t,e,i,n,r,s,o){for(var a=-1!==o.collideIndexes.indexOf(t),h=c(e,i,n,r,null,o),l=0;l<h.length;l++)h[l].index=t,d(h[l],a);s&&u(e-1,i-1,n+2,r+2,o)}},function(t,e,i){var h=i(26);t.exports=function(t,e,i,n,r,s,o,a){return h(i,n,r,s,o,a).filter(t,e)}},function(t,e){t.exports=function(t,e,i,n){void 0===e&&(e=0);var r,s,o,a=0;if(i=void 0===i?!1:i){for(s=n.height-1;0<=s;s--)for(r=n.width-1;0<=r;r--)if((o=n.data[s][r])&&o.index===t){if(a===e)return o;a+=1}}else for(s=0;s<n.height;s++)for(r=0;r<n.width;r++)if((o=n.data[s][r])&&o.index===t){if(a===e)return o;a+=1}return null}},function(t,e,i){var h=i(26);t.exports=function(t,e,i,n,r,s,o,a){return h(i,n,r,s,o,a).find(t,e)||null}},function(t,e,i){var h=i(26);t.exports=function(t,e,i,n,r,s,o,a){h(i,n,r,s,o,a).forEach(t,e)}},function(t,e,i){var n=i(29),r=i(544),s=i(545),o=i(547),a=i(1),h=i(548);t.exports=function(t){return t===n.ORTHOGONAL?r:t===n.HEXAGONAL?s:t===n.STAGGERED?h:t===n.ISOMETRIC?o:a}},function(t,e,i){var s=i(158),o=new(i(3));t.exports=function(t,e,i,n,r){return r.tilemapLayer.worldToTileXY(t,e,!0,o,n),s(o.x,o.y,i,r)}},function(t,e,i){function f(t,e){return y.RectangleToTriangle(e,t)}var g=i(483),m=i(26),y=i(484),v=i(1),i=i(3),x=new i,b=new i,w=new i;t.exports=function(t,e,i,n){if(void 0===t)return[];var r=v,s=(t instanceof g.Circle?r=y.CircleToRectangle:t instanceof g.Rectangle?r=y.RectangleToRectangle:t instanceof g.Triangle?r=f:t instanceof g.Line&&(r=y.LineToRectangle),n.tilemapLayer.worldToTileXY(t.left,t.top,!0,b,i),b.x),o=b.y,a=(n.tilemapLayer.worldToTileXY(t.right,t.bottom,!0,w,i),Math.ceil(w.x)),h=Math.ceil(w.y),a=Math.max(a-s,1),h=Math.max(h-o,1),l=m(s,o,a,h,e,n),s=n.tileWidth,o=n.tileHeight;n.tilemapLayer&&(s*=n.tilemapLayer.scaleX,o*=n.tilemapLayer.scaleY);for(var c=[],u=new g.Rectangle(0,0,s,o),d=0;d<l.length;d++){var p=l[d];n.tilemapLayer.tileToWorldXY(p.x,p.y,x,i),u.x=x.x,u.y=x.y,r(t,u)&&c.push(p)}return c}},function(t,e,i){var n=i(29),r=i(1),s=i(253);t.exports=function(t){return t===n.ORTHOGONAL?s:r}},function(t,e,i){var n=i(29),r=i(550),s=i(551),o=i(1),a=i(552),h=i(553);t.exports=function(t){return t===n.ORTHOGONAL?h:t===n.ISOMETRIC?s:t===n.HEXAGONAL?r:t===n.STAGGERED?a:o}},function(t,e,i){var n=i(29),r=i(554),s=i(1),o=i(555),a=i(254);t.exports=function(t){return t===n.ORTHOGONAL?a:t===n.HEXAGONAL?r:t===n.STAGGERED?o:s}},function(t,e,i){var n=i(29),r=i(1),s=i(255);t.exports=function(t){return t===n.ORTHOGONAL?s:r}},function(t,e,i){var n=i(29),r=i(556),s=i(557),o=i(1),a=i(558),h=i(559);t.exports=function(t){return t===n.ORTHOGONAL?h:t===n.ISOMETRIC?s:t===n.HEXAGONAL?r:t===n.STAGGERED?a:o}},function(t,e,i){var n=i(29),r=i(560),s=i(1),o=i(561),a=i(256);t.exports=function(t){return t===n.ORTHOGONAL?a:t===n.HEXAGONAL?r:t===n.STAGGERED?o:s}},function(t,e,i){var r=i(562),s=new(i(3));t.exports=function(t,e,i,n){n.tilemapLayer.worldToTileXY(t,e,!0,s,i);t=s.x,e=s.y;return r(t,e,n)}},function(t,e,i){var o=i(257),a=new(i(3));t.exports=function(t,e,i,n,r,s){return s.tilemapLayer.worldToTileXY(e,i,!0,a,r,s),o(t,a.x,a.y,n,s)}},function(t,e,i){var c=i(63),u=i(257);t.exports=function(t,e,i,n,r){if(void 0===n&&(n=!0),!Array.isArray(t))return null;for(var s=(t=Array.isArray(t[0])?t:[t]).length,o=t[0].length,a=0;a<s;a++)for(var h=0;h<o;h++){var l=t[a][h];u(l,e+h,i+a,!1,r)}n&&c(e-1,i-1,o+2,s+2,r)}},function(t,e,i){var h=i(26),l=i(210);t.exports=function(t,e,i,n,r,s){var o,a=h(t,e,i,n,{},s);if(!r)for(r=[],o=0;o<a.length;o++)-1===r.indexOf(a[o].index)&&r.push(a[o].index);for(o=0;o<a.length;o++)a[o].index=l(r)}},function(t,e,i){var o=i(563),a=new(i(3));t.exports=function(t,e,i,n,r,s){return s.tilemapLayer.worldToTileXY(t,e,!0,a,r,s),o(a.x,a.y,i,n,s)}},function(t,e,i){var f=i(26),i=i(397),g=new i(105,210,231,150),m=new i(243,134,48,200),y=new i(40,39,37,150);t.exports=function(t,e,i){var n=void 0!==(e=void 0===e?{}:e).tileColor?e.tileColor:g,r=void 0!==e.collidingTileColor?e.collidingTileColor:m,s=void 0!==e.faceColor?e.faceColor:y,o=f(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 a=0;a<o.length;a++){var h=o[a],l=h.width,c=h.height,u=h.pixelX,d=h.pixelY,p=h.collides?r:n;null!==p&&(t.fillStyle(p.color,p.alpha/255),t.fillRect(u,d,l,c)),u+=1,d+=1,l-=2,c-=2,null!==s&&(t.lineStyle(1,s.color,s.alpha/255),h.faceTop&&t.lineBetween(u,d,u+l,d),h.faceRight&&t.lineBetween(u+l,d,u+l,d+c),h.faceBottom&&t.lineBetween(u,d+c,u+l,d+c),h.faceLeft&&t.lineBetween(u,d,u,d+c))}}},function(t,e,i){var l=i(72),c=i(63),u=i(160);t.exports=function(t,e,i,n,r){void 0===e&&(e=!0),void 0===i&&(i=!0),void 0===r&&(r=!0),Array.isArray(t)||(t=[t]);for(var s=0;s<t.length;s++)u(t[s],e,n);if(r)for(var o=0;o<n.height;o++)for(var a=0;a<n.width;a++){var h=n.data[o][a];h&&-1!==t.indexOf(h.index)&&l(h,e)}i&&c(0,0,n.width,n.height,n)}},function(t,e,i){var c=i(72),u=i(63),d=i(160);t.exports=function(t,e,i,n,r,s){if(void 0===i&&(i=!0),void 0===n&&(n=!0),void 0===s&&(s=!0),!(e<t)){for(var o=t;o<=e;o++)d(o,i,r);if(s)for(var a=0;a<r.height;a++)for(var h=0;h<r.width;h++){var l=r.data[a][h];l&&l.index>=t&&l.index<=e&&c(l,i)}n&&u(0,0,r.width,r.height,r)}}},function(t,e,i){var a=i(72),h=i(63),l=i(160);t.exports=function(t,e,i,n){void 0===e&&(e=!0),void 0===i&&(i=!0),Array.isArray(t)||(t=[t]);for(var r=0;r<n.height;r++)for(var s=0;s<n.width;s++){var o=n.data[r][s];o&&-1===t.indexOf(o.index)&&(a(o,e),l(o.index,e,n))}i&&h(0,0,n.width,n.height,n)}},function(t,e,i){var c=i(72),u=i(63),d=i(126);t.exports=function(t,e,i,n){void 0===e&&(e=!0),void 0===i&&(i=!0);for(var r=0;r<n.height;r++)for(var s=0;s<n.width;s++){var o=n.data[r][s];if(o)for(var a in t)if(d(o.properties,a)){var h=t[a];Array.isArray(h)||(h=[h]);for(var l=0;l<h.length;l++)o.properties[a]===h[l]&&c(o,e)}}i&&u(0,0,n.width,n.height,n)}},function(t,e,i){var a=i(72),h=i(63);t.exports=function(t,e,i){void 0===t&&(t=!0),void 0===e&&(e=!0);for(var n=0;n<i.height;n++)for(var r=0;r<i.width;r++){var s,o=i.data[n][r];o&&(s=o.getCollisionGroup())&&s.objects&&0<s.objects.length&&a(o,t)}e&&h(0,0,i.width,i.height,i)}},function(t,e){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 r=0,s=t.length;r<s;r++)n.callbacks[t[r]]=null!==e?{callback:e,callbackContext:i}:void 0}},function(t,e,i){var l=i(26);t.exports=function(t,e,i,n,r,s,o){for(var a=l(t,e,i,n,null,o),h=0;h<a.length;h++)a[h].setCollisionCallback(r,s)}},function(t,e,i){var h=i(26),l=i(131);t.exports=function(t,e,i,n,r){var s=h(t,e,i,n,null,r),o=s.map(function(t){return t.index});l(o);for(var a=0;a<s.length;a++)s[a].index=o[a]}},function(t,e,i){var l=i(26);t.exports=function(t,e,i,n,r,s,o){for(var a=l(i,n,r,s,null,o),h=0;h<a.length;h++)a[h]&&(a[h].index===t?a[h].index=e:a[h].index===e&&(a[h].index=t))}},function(t,e,i){var f=i(26);t.exports=function(t,e,i,n,r,s){if(r){for(var o=f(t,e,i,n,null,s),a=0,h=0;h<r.length;h++)a+=r[h].weight;if(!(a<=0))for(h=0;h<o.length;h++){for(var l=Math.random()*a,c=0,u=-1,d=0;d<r.length;d++)if(l<=(c+=r[d].weight)){var p=r[d].index,u=Array.isArray(p)?p[Math.floor(Math.random()*p.length)]:p;break}o[h].index=u}}}},function(t,e,i){t.exports={FromOrientationString:i(258),Parse:i(564),Parse2DArray:i(259),ParseCSV:i(565),Impact:i(1454),Tiled:i(1455)}},function(t,e){t.exports=function(t,e){for(var i=0;i<t.length;i++){var n=t[i],r=i;if(n.name&&""!==n.name&&(r=n.name),Array.isArray(n.wangtiles)&&0<n.wangtiles.length){var s,o,a,h={},l={};if(Array.isArray(n.edgecolors))for(s=0;s<n.edgecolors.length;s++)a=1+s,""!==(o=n.edgecolors[s]).name&&(h[a]=o.name);if(Array.isArray(n.cornercolors))for(s=0;s<n.cornercolors.length;s++)a=1+s,""!==(o=n.cornercolors[s]).name&&(l[a]=o.name);if(Array.isArray(n.colors))for(s=0;s<n.colors.length;s++)a=1+s,""!==(o=n.colors[s]).name&&(h[a]=l[a]=o.name);for(var c=[h,l,h,l,h,l,h,l],u=0;u<n.wangtiles.length;u++){for(var d,p=n.wangtiles[u],f=(f=e[p.tileid]||(e[p.tileid]={})).wangid||(f.wangid={}),g=[],m=0;m<Math.min(c.length,p.wangid.length);m++)0!==(o=p.wangid[m])?void 0===(d=c[m][o])?g.push(o):g.push(d):g.push(void 0);f[r]=g}}}}},function(t,e,i){t.exports={ParseTileLayers:i(578),ParseTilesets:i(579),ParseWeltmeister:i(577)}},function(t,e,i){t.exports={AssignTileProperties:i(567),Base64Decode:i(574),BuildTilesetIndex:i(568),CreateGroupLayer:i(161),ParseGID:i(261),ParseImageLayers:i(569),ParseJSONTiled:i(566),ParseObject:i(260),ParseObjectLayers:i(570),ParseTileLayers:i(573),ParseTilesets:i(575)}},function(t,e,i){i(1),i(1);var n=i(1457),i=i(1458);t.exports={renderWebGL:n,renderCanvas:i}},function(t,e,i){var E=i(12);t.exports=function(t,e,i){var n=e.cull(i),r=n.length,s=i.alpha*e.alpha;if(!(0===r||s<=0)){var o=e.gidMap,a=t.pipelines.set(e.pipeline,e),h=E.getTintAppendFloatAlpha,l=e.scrollFactorX,c=e.scrollFactorY,u=e.x,d=e.y,p=e.scaleX,f=e.scaleY;t.pipelines.preBatch(e);for(var g=0;g<r;g++){var m,y,v,x,b,w,T,S,P=n[g],_=o[P.index];_&&null!==(w=_.getTileTextureCoordinates(P.index))&&(m=_.glTexture,y=a.setTexture2D(m,e),v=_.tileWidth,x=_.tileHeight,b=w.x,w=w.y,T=.5*_.tileWidth,_=.5*_.tileHeight,S=h(P.tint,s*P.alpha),a.batchTexture(e,m,m.width,m.height,u+(T+P.pixelX)*p,d+(_+P.pixelY)*f,P.width,P.height,p,f,P.rotation,P.flipX,P.flipY,l,c,T,_,b,w,v,x,S,S,S,S,!1,0,0,i,null,!0,y))}t.pipelines.postBatch(e)}}},function(t,e,i){var i=i(25),b=new i,w=new i,T=new i;t.exports=function(t,e,i,n){var r=e.cull(i),s=r.length,o=i.alpha*e.alpha;if(!(0===s||o<=0)){var a=b,h=w,l=T,c=(h.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),a.copyFrom(i.matrix),t.currentContext),u=e.gidMap;c.save(),(n?(a.multiplyWithOffset(n,-i.scrollX*e.scrollFactorX,-i.scrollY*e.scrollFactorY),h.e=e.x,h.f=e.y,a.multiply(h,l),l):(h.e-=i.scrollX*e.scrollFactorX,h.f-=i.scrollY*e.scrollFactorY,h)).copyToContext(c),(!t.antialias||1<e.scaleX||1<e.scaleY)&&(c.imageSmoothingEnabled=!1);for(var d=0;d<s;d++){var p,f,g,m,y,v=r[d],x=u[v.index];x&&(p=x.image.getSourceImage(),null!==(f=x.getTileTextureCoordinates(v.index))&&(m=.5*(g=x.tileWidth),y=.5*(x=x.tileHeight),c.save(),c.translate(v.pixelX+m,v.pixelY+y),0!==v.rotation&&c.rotate(v.rotation),(v.flipX||v.flipY)&&c.scale(v.flipX?-1:1,v.flipY?-1:1),c.globalAlpha=o*v.alpha,c.drawImage(p,f.x,f.y,g,x,-m,-y,g,x),c.restore()))}c.restore()}}},function(t,e,i){var n=i(16),r=i(262);n.register("tilemap",function(t){t=void 0!==t?t:{};return r(this.scene,t.key,t.tileWidth,t.tileHeight,t.width,t.height,t.data,t.insertNull)})},function(t,e,i){var n=i(5),a=i(262);n.register("tilemap",function(t,e,i,n,r,s,o){return a(this.scene,t=null===t?void 0:t,e=null===e?void 0:e,i=null===i?void 0:i,n=null===n?void 0:n,r=null===r?void 0:r,s,o)})},function(t,e,i){t.exports={Clock:i(1462),TimerEvent:i(582)}},function(t,e,i){var n=i(0),r=i(24),s=i(20),o=i(582),a=i(93),i=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.now=0,this.timeScale=1,this.paused=!1,this._active=[],this._pendingInsertion=[],this._pendingRemoval=[],t.sys.events.once(s.BOOT,this.boot,this),t.sys.events.on(s.START,this.start,this)},boot:function(){this.now=this.systems.game.loop.time,this.systems.events.once(s.DESTROY,this.destroy,this)},start:function(){var t=this.systems.events;t.on(s.PRE_UPDATE,this.preUpdate,this),t.on(s.UPDATE,this.update,this),t.once(s.SHUTDOWN,this.shutdown,this)},addEvent:function(t){var e;return t instanceof o?(this.removeEvent(e=t),e.elapsed=e.startAt,e.hasDispatched=!1,e.repeatCount=-1===e.repeat||e.loop?999999999999:e.repeat):e=new o(t),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=this._pendingRemoval.length,e=this._pendingInsertion.length;if(0!==t||0!==e){for(var i=0;i<t;i++){var n=this._pendingRemoval[i],r=this._active.indexOf(n);-1<r&&this._active.splice(r,1),n.destroy()}for(i=0;i<e;i++)n=this._pendingInsertion[i],this._active.push(n);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,r=this._active[i];r.paused||(r.elapsed+=e*r.timeScale,r.elapsed>=r.delay&&(n=r.elapsed-r.delay,r.elapsed=r.delay,!r.hasDispatched&&r.callback&&(r.hasDispatched=!0,r.callback.apply(r.callbackScope,r.args)),0<r.repeatCount?(r.repeatCount--,r.elapsed=n,r.hasDispatched=!1):this._pendingRemoval.push(r)))}}},shutdown:function(){for(var 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 e=this.systems.events;e.off(s.PRE_UPDATE,this.preUpdate,this),e.off(s.UPDATE,this.update,this),e.off(s.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.scene.sys.events.off(s.START,this.start,this),this.scene=null,this.systems=null}});r.register("Clock",i,"time"),t.exports=i},function(t,e,i){var n=i(100),i=i(17)(!1,{Builders:i(1464),Events:i(267),TweenManager:i(1480),Tween:i(266),TweenData:i(268),Timeline:i(588)},n);t.exports=i},function(t,e,i){t.exports={GetBoolean:i(99),GetEaseFunction:i(80),GetNewValue:i(162),GetProps:i(583),GetTargets:i(263),GetTweens:i(584),GetValueOp:i(264),NumberTweenBuilder:i(585),StaggerBuilder:i(586),TimelineBuilder:i(587),TweenBuilder:i(163)}},function(t,e){t.exports=["callbackScope","completeDelay","delay","duration","ease","easeParams","flipX","flipY","hold","loop","loopDelay","offset","onActive","onActiveParams","onActiveScope","onComplete","onCompleteParams","onCompleteScope","onLoop","onLoopParams","onLoopScope","onRepeat","onRepeatParams","onRepeatScope","onStart","onStartParams","onStartScope","onStop","onStopParams","onStopScope","onUpdate","onUpdateParams","onUpdateScope","onYoyo","onYoyoParams","onYoyoScope","paused","props","repeat","repeatDelay","targets","useFrames","yoyo"]},function(t,e){t.exports="complete"},function(t,e){t.exports="loop"},function(t,e){t.exports="pause"},function(t,e){t.exports="resume"},function(t,e){t.exports="start"},function(t,e){t.exports="update"},function(t,e){t.exports="active"},function(t,e){t.exports="complete"},function(t,e){t.exports="loop"},function(t,e){t.exports="repeat"},function(t,e){t.exports="start"},function(t,e){t.exports="stop"},function(t,e){t.exports="update"},function(t,e){t.exports="yoyo"},function(t,e,i){var n=i(93),r=i(0),s=i(585),o=i(24),a=i(20),h=i(586),l=i(587),c=i(100),u=i(163),i=new r({initialize:function(t){this.scene=t,this.systems=t.sys,this.timeScale=1,this._add=[],this._pending=[],this._active=[],this._destroy=[],this._toProcess=0,t.sys.events.once(a.BOOT,this.boot,this),t.sys.events.on(a.START,this.start,this)},boot:function(){this.systems.events.once(a.DESTROY,this.destroy,this)},start:function(){var t=this.systems.events;t.on(a.PRE_UPDATE,this.preUpdate,this),t.on(a.UPDATE,this.update,this),t.once(a.SHUTDOWN,this.shutdown,this),this.timeScale=1},createTimeline:function(t){return l(this,t)},timeline:function(t){t=l(this,t);return t.paused||(this._add.push(t),this._toProcess++),t},create:function(t){return u(this,t)},add:function(t){t=u(this,t);return this._add.push(t),this._toProcess++,t},existing:function(t){return this._add.push(t),this._toProcess++,this},addCounter:function(t){t=s(this,t);return this._add.push(t),this._toProcess++,t},stagger:function(t,e){return h(t,e)},preUpdate:function(){if(0!==this._toProcess){for(var t=this._destroy,e=this._active,i=this._pending,n=0;n<t.length;n++){var r=t[n],s=e.indexOf(r);-1===s?-1<(s=i.indexOf(r))&&(r.state=c.REMOVED,i.splice(s,1)):(r.state=c.REMOVED,e.splice(s,1))}for(t.length=0,t=this._add,n=0;n<t.length;n++)(r=t[n]).state===c.PENDING_ADD&&(r.init()?(r.play(),this._active):this._pending).push(r);t.length=0,this._toProcess=0}},update:function(t,e){var i,n=this._active;e*=this.timeScale;for(var r=0;r<n.length;r++)(i=n[r]).update(t,e)&&(this._destroy.push(i),this._toProcess++)},remove:function(t){return n(this._add,t),n(this._pending,t),n(this._active,t),n(this._destroy,t),t.state=c.REMOVED,this},makeActive:function(t){var e;return-1===this._add.indexOf(t)&&-1===this._active.indexOf(t)&&(-1!==(e=this._pending.indexOf(t))&&this._pending.splice(e,1),this._add.push(t),t.state=c.PENDING_ADD,this._toProcess++),this},each:function(t,e){for(var i,n=[null],r=1;r<arguments.length;r++)n.push(arguments[r]);for(i in this.list)n[0]=this.list[i],t.apply(e,n)},getAllTweens:function(){for(var t=this._active,e=[],i=0;i<t.length;i++)e.push(t[i]);return e},getGlobalTimeScale:function(){return this.timeScale},getTweensOf:function(t,e){void 0===e&&(e=!1);var i,n,r,s=this._active,o=[];for(Array.isArray(t)||(t=[t]),n=0;n<s.length;n++)for(i=s[n],r=0;r<t.length;r++)i.hasTarget(t[r])&&o.push(i);if(e)for(s=this._pending,n=0;n<s.length;n++)for(i=s[n],r=0;r<t.length;r++)i.hasTarget(t[r])&&o.push(i);return o},isTweening:function(t){for(var e,i=this._active,n=0;n<i.length;n++)if((e=i[n]).hasTarget(t)&&e.isPlaying())return!0;return!1},killAll:function(){for(var t=this.getAllTweens(),e=0;e<t.length;e++)t[e].stop();return this},killTweensOf:function(t){for(var e=this.getTweensOf(t),i=0;i<e.length;i++)e[i].stop();return this},pauseAll:function(){for(var t=this._active,e=0;e<t.length;e++)t[e].pause();return this},resumeAll:function(){for(var t=this._active,e=0;e<t.length;e++)t[e].resume();return this},setGlobalTimeScale:function(t){return this.timeScale=t,this},shutdown:function(){this.killAll(),this._add=[],this._pending=[],this._active=[],this._destroy=[],this._toProcess=0;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.shutdown,this)},destroy:function(){this.shutdown(),this.scene.sys.events.off(a.START,this.start,this),this.scene=null,this.systems=null}});o.register("TweenManager",i,"tweens"),t.exports=i},function(t,e,i){t.exports={Array:i(208),Base64:i(1482),Objects:i(1484),String:i(1488),NOOP:i(1)}},function(t,e,i){t.exports={ArrayBufferToBase64:i(1483),Base64ToArrayBuffer:i(433)}},function(t,e){var o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";t.exports=function(t,e){for(var i=new Uint8Array(t),n=i.length,r=e?"data:"+e+";base64,":"",s=0;s<n;s+=3)r=(r=(r=(r+=o[i[s]>>2])+o[(3&i[s])<<4|i[s+1]>>4])+o[(15&i[s+1])<<2|i[s+2]>>6])+o[63&i[s+2]];return n%3==2?r=r.substring(0,r.length-1)+"=":n%3==1&&(r=r.substring(0,r.length-2)+"=="),r}},function(t,e,i){t.exports={Clone:i(77),DeepCopy:i(175),Extend:i(17),GetAdvancedValue:i(13),GetFastValue:i(2),GetMinMaxValue:i(1485),GetValue:i(6),HasAll:i(1486),HasAny:i(455),HasValue:i(126),IsPlainObject:i(7),Merge:i(127),MergeRight:i(1487),Pick:i(571),SetValue:i(478)}},function(t,e,i){var s=i(6),o=i(18);t.exports=function(t,e,i,n,r){t=s(t,e,r=void 0===r?i:r);return o(t,i,n)}},function(t,e){t.exports=function(t,e){for(var i=0;i<e.length;i++)if(!t.hasOwnProperty(e[i]))return!1;return!0}},function(t,e,i){var r=i(77);t.exports=function(t,e){var i,n=r(t);for(i in e)n.hasOwnProperty(i)&&(n[i]=e[i]);return n}},function(t,e,i){t.exports={Format:i(1489),Pad:i(186),RemoveAt:i(1490),Reverse:i(1491),UppercaseFirst:i(205),UUID:i(222)}},function(t,e){t.exports=function(t,i){return t.replace(/%([0-9]+)/g,function(t,e){return i[Number(e)-1]})}},function(t,e){t.exports=function(t,e){return 0===e?t.slice(1):t.slice(0,e-1)+t.slice(e)}},function(t,e){t.exports=function(t){return t.split("").reverse().join("")}},function(t,e,i){t.exports={SoundManagerCreator:i(426),Events:i(70),BaseSound:i(146),BaseSoundManager:i(145),WebAudioSound:i(434),WebAudioSoundManager:i(432),HTML5AudioSound:i(429),HTML5AudioSoundManager:i(427),NoAudioSound:i(431),NoAudioSoundManager:i(430)}},function(t,e,i){t.exports={Arcade:i(1366),Matter:i(1494)}},function(t,e,i){t.exports={BodyBounds:i(1392),Components:i(249),Events:i(272),Factory:i(1394),MatterGameObject:i(1395),Image:i(1396),Matter:i(594),MatterPhysics:i(1524),PolyDecomp:i(1393),Sprite:i(1397),TileBody:i(593),PhysicsEditorParser:i(589),PhysicsJSONParser:i(590),PointerConstraint:i(1398),World:i(1402)}},function(t,e){t.exports={setBounce:function(t){return this.body.restitution=t,this}}},function(t,e){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}}},function(t,e,i){var n=i(41);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}}},function(t,e){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}}},function(t,e){t.exports={setIgnoreGravity:function(t){return this.body.ignoreGravity=t,this}}},function(t,e,i){var n=i(41),r=i(3);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 r(this.body.centerOfMass.x,this.body.centerOfMass.y)}}}},function(t,e){t.exports={setSensor:function(t){return this.body.isSensor=t,this},isSensor:function(){return this.body.isSensor}}},function(t,e,i){var d=i(86),p=i(41),a=i(124),f=i(2),g=i(589),m=i(590),y=i(64);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,r,s,o=this;return t.destroy=function(){o.world.remove(o.body,!0),o.body.gameObject=null},e&&(this.world.has(t)&&this.world.remove(t,!0),this.world.add(t)),this._originComponent&&(e=t.render.sprite.xOffset,n=t.render.sprite.yOffset,r=t.centerOfMass.x,s=t.centerOfMass.y,a(r,.5)&&a(s,.5)?this.setOrigin(e+.5,n+.5):(r=t.centerOffset.x,s=t.centerOffset.y,this.setOrigin(e+r/this.displayWidth,n+s/this.displayHeight))),this},setBody:function(t,e){if(t){var i=f(t="string"==typeof t?{type:t}:t,"type","rectangle"),n=f(t,"x",this._tempVec2.x),r=f(t,"y",this._tempVec2.y),s=f(t,"width",this.width),o=f(t,"height",this.height);switch(i){case"rectangle":l=d.rectangle(n,r,s,o,e);break;case"circle":var a=f(t,"radius",Math.max(s,o)/2),h=f(t,"maxSides",25),l=d.circle(n,r,a,e,h);break;case"trapezoid":a=f(t,"slope",.5),l=d.trapezoid(n,r,s,o,a,e);break;case"polygon":h=f(t,"sides",5),a=f(t,"radius",Math.max(s,o)/2);l=d.polygon(n,r,h,a,e);break;case"fromVertices":case"fromVerts":var c,u,h=f(t,"verts",null);h&&("string"==typeof h&&(h=y.fromPath(h)),l=this.body&&!this.body.hasOwnProperty("temp")?(p.setVertices(this.body,h),this.body):(a=f(t,"flagInternal",!1),c=f(t,"removeCollinear",.01),u=f(t,"minimumArea",10),d.fromVertices(n,r,h,e,a,c,u)));break;case"fromPhysicsEditor":l=g.parseBody(n,r,t,e);break;case"fromPhysicsTracer":l=m.parseBody(n,r,t,e)}l&&this.setExistingBody(l,t.addToWorld)}return this}}},function(t,e,i){var n=i(272),r=i(165),s=i(166);t.exports={setToSleep:function(){return r.set(this.body,!0),this},setAwake:function(){return r.set(this.body,!1),this},setSleepThreshold:function(t){return this.body.sleepThreshold=t=void 0===t?60:t,this},setSleepEvents:function(t,e){return this.setSleepStartEvent(t),this.setSleepEndEvent(e),this},setSleepStartEvent:function(t){var e;return t?(e=this.world,s.on(this.body,"sleepStart",function(t){e.emit(n.SLEEP_START,t,this)})):s.off(this.body,"sleepStart"),this},setSleepEndEvent:function(t){var e;return t?(e=this.world,s.on(this.body,"sleepEnd",function(t){e.emit(n.SLEEP_END,t,this)})):s.off(this.body,"sleepEnd"),this}}},function(t,e){t.exports="afteradd"},function(t,e){t.exports="afterremove"},function(t,e){t.exports="afterupdate"},function(t,e){t.exports="beforeadd"},function(t,e){t.exports="beforeremove"},function(t,e){t.exports="beforeupdate"},function(t,e){t.exports="collisionactive"},function(t,e){t.exports="collisionend"},function(t,e){t.exports="collisionstart"},function(t,e){t.exports="dragend"},function(t,e){t.exports="drag"},function(t,e){t.exports="dragstart"},function(t,e){t.exports="pause"},function(t,e){t.exports="resume"},function(t,e){t.exports="sleepend"},function(t,e){t.exports="sleepstart"},function(t,e,i){var n=i(41);t.exports={setStatic:function(t){return n.setStatic(this.body,t),this},isStatic:function(){return this.body.isStatic}}},function(t,e,i){var s=i(41),n=i(14),r=i(269),o=i(270);t.exports={x:{get:function(){return this.body.position.x},set:function(t){this._tempVec2.set(t,this.y),s.setPosition(this.body,this._tempVec2)}},y:{get:function(){return this.body.position.y},set:function(t){this._tempVec2.set(this.x,t),s.setPosition(this.body,this._tempVec2)}},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,s.scale(this.body,e,i),s.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,s.scale(this.body,e,i),s.scale(this.body,this._scaleX,t)}},angle:{get:function(){return o(this.body.angle*n.RAD_TO_DEG)},set:function(t){this.rotation=o(t)*n.DEG_TO_RAD}},rotation:{get:function(){return this.body.angle},set:function(t){this._rotation=r(t),s.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),s.setPosition(this.body,this._tempVec2),this},setRotation:function(t){return this._rotation=r(t=void 0===t?0:t),s.setAngle(this.body,t),this},setFixedRotation:function(){return s.setInertia(this.body,1/0),this},setAngle:function(t){return this.angle=t=void 0===t?0:t,s.setAngle(this.body,this.rotation),this},setScale:function(t,e,i){void 0===t&&(t=1),void 0===e&&(e=t);var n=1/this._scaleX,r=1/this._scaleY;return this._scaleX=t,this._scaleY=e,s.scale(this.body,n,r,i),s.scale(this.body,t,e,i),this}}},function(t,e,i){var n=i(41);t.exports={setAngularVelocity:function(t){return n.setAngularVelocity(this.body,t),this},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}}},function(t,e,i){var n={},r=(t.exports=n,i(118)),s=i(32);n.create=function(t){return s.extend({extended:!1,narrowDetections:0,narrowphaseTests:0,narrowReuse:0,narrowReuseCount:0,midphaseTests:0,broadphaseTests:0,narrowEff:1e-4,midEff:1e-4,broadEff:1e-4,collisions:0,buckets:0,bodies:0,pairs:0},!1,t)},n.reset=function(t){t.extended&&(t.narrowDetections=0,t.narrowphaseTests=0,t.narrowReuse=0,t.narrowReuseCount=0,t.midphaseTests=0,t.broadphaseTests=0,t.narrowEff=0,t.midEff=0,t.broadEff=0,t.collisions=0,t.buckets=0,t.pairs=0,t.bodies=0)},n.update=function(t,e){var i;t.extended&&(i=e.world,i=r.allBodies(i),t.collisions=t.narrowDetections,t.pairs=e.pairs.list.length,t.bodies=i.length,t.midEff=(t.narrowDetections/(t.midphaseTests||1)).toFixed(2),t.narrowEff=(t.narrowDetections/(t.narrowphaseTests||1)).toFixed(2),t.broadEff=(1-t.broadphaseTests/(i.length||1)).toFixed(2),t.narrowReuse=(t.narrowReuseCount/(t.narrowphaseTests||1)).toFixed(2))}},function(t,I,e){var s=e(123),i=e(271),n=e(86),o=e(41),r=e(1392),a=e(84),h=e(0),l=e(118),c=e(591),u=e(128),d=e(273),p=e(50),f=e(1394),g=e(2),m=e(6),y=e(597),v=e(1525),x=e(1526),b=e(1399),w=e(1527),T=e(127),S=e(250),P=e(598),_=e(595),E=e(24),A=e(1400),M=e(599),k=e(274),C=e(20),O=e(592),R=e(83),L=e(64),D=e(1402),e=new h({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=l,this.detector=d,this.grid=y,this.pair=S,this.pairs=P,this.query=A,this.resolver=M,this.sat=k,this.constraint=u,this.bodies=n,this.composites=c,this.axes=i,this.bounds=a,this.svg=O,this.vector=R,this.vertices=L,this.verts=L,this._tempVec2=R.create(),m(this.config,"plugins.collisionevents",!0)&&this.enableCollisionEventsPlugin(),m(this.config,"plugins.attractors",!1)&&this.enableAttractorPlugin(),m(this.config,"plugins.wrap",!1)&&this.enableWrapPlugin(),M._restingThresh=m(this.config,"restingThresh",4),M._restingThreshTangent=m(this.config,"restingThreshTangent",6),M._positionDampen=m(this.config,"positionDampen",.9),M._positionWarming=m(this.config,"positionWarming",.8),M._frictionNormalMultiplier=m(this.config,"frictionNormalMultiplier",5),t.sys.events.once(C.BOOT,this.boot,this),t.sys.events.on(C.START,this.start,this)},boot:function(){this.world=new D(this.scene,this.config),this.add=new f(this.world),this.bodyBounds=new r,this.systems.events.once(C.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new D(this.scene,this.config),this.add=new f(this.world));var t=this.systems.events;t.on(C.UPDATE,this.world.update,this.world),t.on(C.POST_UPDATE,this.world.postUpdate,this.world),t.once(C.SHUTDOWN,this.shutdown,this)},getConfig:function(){var t=this.systems.game.config.physics,e=this.systems.settings.physics;return T(g(e,"matter",{}),g(t,"matter",{}))},enableAttractorPlugin:function(){return _.register(v),_.use(b,v),this},enableWrapPlugin:function(){return _.register(w),_.use(b,w),this},enableCollisionEventsPlugin:function(){return _.register(x),_.use(b,x),this},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},set60Hz:function(){return this.world.getDelta=this.world.update60Hz,this.world.autoUpdate=!0,this},set30Hz:function(){return this.world.getDelta=this.world.update30Hz,this.world.autoUpdate=!0,this},step:function(t,e){this.world.step(t,e)},containsPoint:function(t,e,i){t=this.getMatterBodies(t);e=R.create(e,i);return 0<A.point(t,e).length},intersectPoint:function(t,e,i){i=this.getMatterBodies(i);var t=R.create(t,e),n=[];return A.point(i,t).forEach(function(t){-1===n.indexOf(t)&&n.push(t)}),n},intersectRect:function(t,e,i,n,r,s){void 0===r&&(r=!1),s=this.getMatterBodies(s);var o=[];return A.region(s,{min:{x:t,y:e},max:{x:t+i,y:e+n}},r).forEach(function(t){-1===o.indexOf(t)&&o.push(t)}),o},intersectRay:function(t,e,i,n,r,s){void 0===r&&(r=1),s=this.getMatterBodies(s);for(var o=[],a=A.ray(s,R.create(t,e),R.create(i,n),r),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=A.collides(t,e),r=0;r<n.length;r++){var s=n[r];s.bodyA===t?i.push(s.bodyB):i.push(s.bodyA)}return i},overlap:function(t,e,i,n,r){void 0===i&&(i=null),void 0===n&&(n=null),void 0===r&&(r=i),Array.isArray(t)||(t=[t]),t=this.getMatterBodies(t),e=this.getMatterBodies(e);for(var s=!1,o=0;o<t.length;o++)for(var a=t[o],h=A.collides(a,e),l=0;l<h.length;l++){var c=h[l],u=c.bodyA.id===a.id?c.bodyB:c.bodyA;if(!n||n.call(r,a,u,c))if(s=!0,i)i.call(r,a,u,c);else if(!n)return!0}return s},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 r=this._tempVec2;return t.forEach(function(t){void 0===n&&(n=t.angle),r.x=i*Math.cos(n),r.y=i*Math.sin(n),o.applyForce(t,e,r)}),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,r=t.pointB.y;return t.bodyA&&(e+=t.bodyA.position.x,i+=t.bodyA.position.y),t.bodyB&&(n+=t.bodyB.position.x,r+=t.bodyB.position.y),p(e,i,n,r)},alignBody:function(t,e,i,n){var r;switch(t=t.hasOwnProperty("body")?t.body:t,n){case s.TOP_LEFT:case s.LEFT_TOP:r=this.bodyBounds.getTopLeft(t,e,i);break;case s.TOP_CENTER:r=this.bodyBounds.getTopCenter(t,e,i);break;case s.TOP_RIGHT:case s.RIGHT_TOP:r=this.bodyBounds.getTopRight(t,e,i);break;case s.LEFT_CENTER:r=this.bodyBounds.getLeftCenter(t,e,i);break;case s.CENTER:r=this.bodyBounds.getCenter(t,e,i);break;case s.RIGHT_CENTER:r=this.bodyBounds.getRightCenter(t,e,i);break;case s.LEFT_BOTTOM:case s.BOTTOM_LEFT:r=this.bodyBounds.getBottomLeft(t,e,i);break;case s.BOTTOM_CENTER:r=this.bodyBounds.getBottomCenter(t,e,i);break;case s.BOTTOM_RIGHT:case s.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(C.UPDATE,this.world.update,this.world),t.off(C.POST_UPDATE,this.world.postUpdate,this.world)),t.off(C.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(C.START,this.start,this),this.scene=null,this.systems=null}});E.register("MatterPhysics",e,"matterPhysics"),t.exports=e},function(t,e,i){var c=i(594),r={name:"matter-attractors",version:"0.1.7",for:"matter-js@^0.14.2",silent:!0,install:function(t){t.after("Body.create",function(){r.Body.init(this)}),t.before("Engine.update",function(t){r.Engine.update(t)})},Body:{init:function(t){t.plugin.attractors=t.plugin.attractors||[]}},Engine:{update:function(t){for(var e=c.Composite.allBodies(t.world),i=0;i<e.length;i++){var n=e[i],r=n.plugin.attractors;if(r&&0<r.length)for(var s=0;s<e.length;s++){var o=e[s];if(i!==s)for(var a=0;a<r.length;a++){var h=r[a],l=h;(l=c.Common.isFunction(h)?h(n,o):l)&&c.Body.applyForce(o,o.position,l)}}}}},Attractors:{gravityConstant:.001,gravity:function(t,e){var i=c.Vector.sub(e.position,t.position),n=c.Vector.magnitudeSquared(i)||1e-4,i=c.Vector.normalise(i),n=-r.Attractors.gravityConstant*(t.mass*e.mass/n),i=c.Vector.mult(i,n);c.Body.applyForce(t,t.position,c.Vector.neg(i)),c.Body.applyForce(e,e.position,i)}}};t.exports=r},function(t,e){t.exports={name:"matter-collision-events",version:"0.1.6",for:"matter-js@^0.14.2",silent:!0,install:function(n){n.after("Engine.create",function(){n.Events.on(this,"collisionStart",function(t){t.pairs.map(function(t){var e=t.bodyA,i=t.bodyB;e.gameObject&&e.gameObject.emit("collide",e,i,t),i.gameObject&&i.gameObject.emit("collide",i,e,t),n.Events.trigger(e,"onCollide",{pair:t}),n.Events.trigger(i,"onCollide",{pair:t}),e.onCollideCallback&&e.onCollideCallback(t),i.onCollideCallback&&i.onCollideCallback(t),e.onCollideWith[i.id]&&e.onCollideWith[i.id](i,t),i.onCollideWith[e.id]&&i.onCollideWith[e.id](e,t)})}),n.Events.on(this,"collisionActive",function(t){t.pairs.map(function(t){var e=t.bodyA,i=t.bodyB;e.gameObject&&e.gameObject.emit("collideActive",e,i,t),i.gameObject&&i.gameObject.emit("collideActive",i,e,t),n.Events.trigger(e,"onCollideActive",{pair:t}),n.Events.trigger(i,"onCollideActive",{pair:t}),e.onCollideActiveCallback&&e.onCollideActiveCallback(t),i.onCollideActiveCallback&&i.onCollideActiveCallback(t)})}),n.Events.on(this,"collisionEnd",function(t){t.pairs.map(function(t){var e=t.bodyA,i=t.bodyB;e.gameObject&&e.gameObject.emit("collideEnd",e,i,t),i.gameObject&&i.gameObject.emit("collideEnd",i,e,t),n.Events.trigger(e,"onCollideEnd",{pair:t}),n.Events.trigger(i,"onCollideEnd",{pair:t}),e.onCollideEndCallback&&e.onCollideEndCallback(t),i.onCollideEndCallback&&i.onCollideEndCallback(t)})})})}}},function(t,e,i){var o=i(594),a={name:"matter-wrap",version:"0.1.4",for:"matter-js@^0.14.2",silent:!0,install:function(t){t.after("Engine.update",function(){a.Engine.update(this)})},Engine:{update:function(t){for(var t=t.world,e=o.Composite.allBodies(t),i=o.Composite.allComposites(t),n=0;n<e.length;n+=1){var r=e[n];r.plugin.wrap&&a.Body.wrap(r,r.plugin.wrap)}for(n=0;n<i.length;n+=1){var s=i[n];s.plugin.wrap&&a.Composite.wrap(s,s.plugin.wrap)}}},Bounds:{wrap:function(t,e){var i=null,n=null;if(void 0!==e.min.x&&void 0!==e.max.x&&(t.min.x>e.max.x?i=e.min.x-t.max.x:t.max.x<e.min.x&&(i=e.max.x-t.min.x)),void 0!==e.min.y&&void 0!==e.max.y&&(t.min.y>e.max.y?n=e.min.y-t.max.y:t.max.y<e.min.y&&(n=e.max.y-t.min.y)),null!==i||null!==n)return{x:i||0,y:n||0}}},Body:{wrap:function(t,e){e=a.Bounds.wrap(t.bounds,e);return e&&o.Body.translate(t,e),e}},Composite:{bounds:function(t){for(var e=o.Composite.allBodies(t),i=[],n=0;n<e.length;n+=1){var r=e[n];i.push(r.bounds.min,r.bounds.max)}return o.Bounds.create(i)},wrap:function(t,e){e=a.Bounds.wrap(a.Composite.bounds(t),e);return e&&o.Composite.translate(t,e),e}}};t.exports=a},function(r,t,s){!function(t){var e=s(33),i=s(17),n={Actions:s(275),Animations:s(723),BlendModes:s(35),Cache:s(735),Cameras:s(738),Core:s(806),Class:s(0),Create:s(888),Curves:s(894),Data:s(896),Display:s(898),DOM:s(917),Events:s(918),Game:s(920),GameObjects:s(1011),Geom:s(483),Input:s(1308),Loader:s(1338),Math:s(193),Physics:s(1493),Plugins:s(1403),Renderer:s(1405),Scale:s(1412),ScaleModes:s(168),Scene:s(418),Scenes:s(1413),Structs:s(1415),Textures:s(1416),Tilemaps:s(1418),Time:s(1461),Tweens:s(1463),Utils:s(1481)};n.Sound=s(1492),n=i(!1,n,e),r.exports=n,t.Phaser=n}.call(this,s(600))}],r.c=n,r.d=function(t,e,i){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(i,n,function(t){return e[t]}.bind(null,n));return i},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=1528);function r(t){var e;return(n[t]||(e=n[t]={i:t,l:!1,exports:{}},i[t].call(e.exports,e,e.exports,r),e.l=!0,e)).exports}var i,n}),!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).h5branding=t.h5branding||{})}(this,function(s){"use strict";var nt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function rt(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function t(t,e){return t(e={exports:{}},e.exports),e.exports}t(function(t,e){t.exports=function(){function n(t){var e=typeof t;return t!==null&&(e==="object"||e==="function")}function h(t){return typeof t==="function"}var t=void 0;if(Array.isArray)t=Array.isArray;else t=function(t){return Object.prototype.toString.call(t)==="[object Array]"};var i=t,r=0,e=void 0,s=void 0,o=function t(e,i){m[r]=e;m[r+1]=i;r+=2;if(r===2)if(s)s(y);else v()};function a(t){s=t}function l(t){o=t}var c=typeof window!=="undefined"?window:undefined,u=c||{},d=u.MutationObserver||u.WebKitMutationObserver,p=typeof self==="undefined"&&typeof process!=="undefined"&&{}.toString.call(process)==="[object process]",f=typeof Uint8ClampedArray!=="undefined"&&typeof importScripts!=="undefined"&&typeof MessageChannel!=="undefined";function B(){return function(){return process.nextTick(y)}}function F(){if(typeof e!=="undefined")return function(){e(y)};return g()}function N(){var t=0;var e=new d(y);var i=document.createTextNode("");e.observe(i,{characterData:true});return function(){i.data=t=++t%2}}function z(){var t=new MessageChannel;t.port1.onmessage=y;return function(){return t.port2.postMessage(0)}}function g(){var t=setTimeout;return function(){return t(y,1)}}var m=new Array(1e3);function y(){for(var t=0;t<r;t+=2){var e=m[t];var i=m[t+1];e(i);m[t]=undefined;m[t+1]=undefined}r=0}function Y(){try{var t=Function("return this")().require("vertx");e=t.runOnLoop||t.runOnContext;return F()}catch(t){return g()}}var v=void 0;if(p)v=B();else if(d)v=N();else if(f)v=z();else if(c===undefined&&typeof rt==="function")v=Y();else v=g();function x(t,e){var i=this;var n=new this.constructor(T);if(n[w]===undefined)D(n);var r=i._state;if(r){var s=arguments[r-1];o(function(){return R(r,n,s,i._result)})}else C(i,n,t,e);return n}function b(t){var e=this;if(t&&typeof t==="object"&&t.constructor===e)return t;var i=new e(T);A(i,t);return i}var w=Math.random().toString(36).substring(2);function T(){}var S=void 0,P=1,_=2;function X(){return new TypeError("You cannot resolve a promise with itself")}function U(){return new TypeError("A promises callback cannot return that same promise.")}function V(t,e,i,n){try{t.call(e,i,n)}catch(t){return t}}function G(t,n,r){o(function(e){var i=false;var t=V(r,n,function(t){if(i)return;i=true;if(n!==t)A(e,t);else M(e,t)},function(t){if(i)return;i=true;k(e,t)},"Settle: "+(e._label||" unknown promise"));if(!i&&t){i=true;k(e,t)}},t)}function j(e,t){if(t._state===P)M(e,t._result);else if(t._state===_)k(e,t._result);else C(t,undefined,function(t){return A(e,t)},function(t){return k(e,t)})}function E(t,e,i){if(e.constructor===t.constructor&&i===x&&e.constructor.resolve===b)j(t,e);else if(i===undefined)M(t,e);else if(h(i))G(t,e,i);else M(t,e)}function A(e,t){if(e===t)k(e,X());else if(n(t)){var i=void 0;try{i=t.then}catch(t){k(e,t);return}E(e,t,i)}else M(e,t)}function W(t){if(t._onerror)t._onerror(t._result);O(t)}function M(t,e){if(t._state!==S)return;t._result=e;t._state=P;if(t._subscribers.length!==0)o(O,t)}function k(t,e){if(t._state!==S)return;t._state=_;t._result=e;o(W,t)}function C(t,e,i,n){var r=t._subscribers;var s=r.length;t._onerror=null;r[s]=e;r[s+P]=i;r[s+_]=n;if(s===0&&t._state)o(O,t)}function O(t){var e=t._subscribers;var i=t._state;if(e.length===0)return;var n=void 0,r=void 0,s=t._result;for(var o=0;o<e.length;o+=3){n=e[o];r=e[o+i];if(n)R(i,n,r,s);else r(s)}t._subscribers.length=0}function R(t,e,i,n){var r=h(i),s=void 0,o=void 0,a=true;if(r){try{s=i(n)}catch(t){a=false;o=t}if(e===s){k(e,U());return}}else s=n;if(e._state!==S);else if(r&&a)A(e,s);else if(a===false)k(e,o);else if(t===P)M(e,s);else if(t===_)k(e,s)}function H(i,t){try{t(function t(e){A(i,e)},function t(e){k(i,e)})}catch(t){k(i,t)}}var L=0;function K(){return L++}function D(t){t[w]=L++;t._state=undefined;t._result=undefined;t._subscribers=[]}function q(){return new Error("Array Methods must be provided an Array")}var J=function(){function t(t,e){this._instanceConstructor=t;this.promise=new t(T);if(!this.promise[w])D(this.promise);if(i(e)){this.length=e.length;this._remaining=e.length;this._result=new Array(this.length);if(this.length===0)M(this.promise,this._result);else{this.length=this.length||0;this._enumerate(e);if(this._remaining===0)M(this.promise,this._result)}}else k(this.promise,q())}t.prototype._enumerate=function t(e){for(var i=0;this._state===S&&i<e.length;i++)this._eachEntry(e[i],i)};t.prototype._eachEntry=function t(e,i){var n=this._instanceConstructor;var r=n.resolve;if(r===b){var s=void 0;var o=void 0;var a=false;try{s=e.then}catch(t){a=true;o=t}if(s===x&&e._state!==S)this._settledAt(e._state,i,e._result);else if(typeof s!=="function"){this._remaining--;this._result[i]=e}else if(n===I){var h=new n(T);if(a)k(h,o);else E(h,e,s);this._willSettleAt(h,i)}else this._willSettleAt(new n(function(t){return t(e)}),i)}else this._willSettleAt(r(e),i)};t.prototype._settledAt=function t(e,i,n){var r=this.promise;if(r._state===S){this._remaining--;if(e===_)k(r,n);else this._result[i]=n}if(this._remaining===0)M(r,this._result)};t.prototype._willSettleAt=function t(e,i){var n=this;C(e,undefined,function(t){return n._settledAt(P,i,t)},function(t){return n._settledAt(_,i,t)})};return t}();function Z(t){return new J(this,t).promise}function Q(r){var s=this;if(!i(r))return new s(function(t,e){return e(new TypeError("You must pass an array to race."))});else return new s(function(t,e){var i=r.length;for(var n=0;n<i;n++)s.resolve(r[n]).then(t,e)})}function $(t){var e=this;var i=new e(T);k(i,t);return i}function tt(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function et(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}var I=function(){function e(t){this[w]=K();this._result=this._state=undefined;this._subscribers=[];if(T!==t){typeof t!=="function"&&tt();this instanceof e?H(this,t):et()}}e.prototype.catch=function t(e){return this.then(null,e)};e.prototype.finally=function t(e){var i=this;var n=i.constructor;if(h(e))return i.then(function(t){return n.resolve(e()).then(function(){return t})},function(t){return n.resolve(e()).then(function(){throw t})});return i.then(e,e)};return e}();function it(){var t=void 0;if(typeof nt!=="undefined")t=nt;else if(typeof self!=="undefined")t=self;else try{t=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var e=t.Promise;if(e){var i=null;try{i=Object.prototype.toString.call(e.resolve())}catch(t){}if(i==="[object Promise]"&&!e.cast)return}t.Promise=I}return I.prototype.then=x,I.all=Z,I.race=Q,I.resolve=b,I.reject=$,I._setScheduler=a,I._setAsap=l,I._asap=o,I.polyfill=it,I.Promise=I}()}).polyfill(),e.has=function(t){var e,i,n=t.lastIndexOf(".");return!(n<=0||n>=t.length-1)&&(!((e=t.lastIndexOf(".",n-1))<=0||n-1<=e)&&(!!(i=r[t.slice(n+1)])&&0<=i.indexOf(" "+t.slice(e+1,n)+" ")))},e.is=function(t){var e,i=t.lastIndexOf(".");return!(i<=0||i>=t.length-1)&&(!(0<=t.lastIndexOf(".",i-1))&&(!!(e=r[t.slice(i+1)])&&0<=e.indexOf(" "+t.slice(0,i)+" ")))},e.get=function(t){var e,i,n=t.lastIndexOf(".");return n<=0||n>=t.length-1||(e=t.lastIndexOf(".",n-1))<=0||n-1<=e||!(i=r[t.slice(n+1)])||i.indexOf(" "+t.slice(e+1,n)+" ")<0?null:t.slice(e+1)};var r,i=e;function e(){}o.setList=function(t){r=t||{}},o.getDomain=function(t){var e;return r?(e=t.match(/\./g))&&e.length<2?t:(e=this.getTld(t))?(e=t.length-e.length-1,e=t.lastIndexOf(".",e-1)+1,t.substring(e)||""):null:null},o.getTld=function(t){var e;return r?(e=t.lastIndexOf("."),e=t.substring(e+1),r[e.toLowerCase()]&&i.get(t)||e):""},o.KEY="Domains";var n=o;function o(){}Object.defineProperty(h,"instance",{get:function(){return h.classInstance=void 0===h.classInstance?new h:h.classInstance},enumerable:!1,configurable:!0}),h.prototype.load=function(e,t,i){var n=this;return this.contains(e)?Promise.reject("Already in cache."):(this.cache[e]={url:t,data:null},this.requestXhr(t,i).then(function(t){return n.loadComplete(e,t)}).catch(function(t){return n.remove(e),Promise.reject(t)}))},h.prototype.loadComplete=function(t,e){if(!this.contains(t))return Promise.reject("Item was removed from cache before loading was complete.");try{var i=JSON.parse(e);return this.cache[t].data=i,Promise.resolve(i)}catch(t){return Promise.reject("There was an error parsing JSON file.")}},h.prototype.remove=function(t){this.contains(t)&&delete this.cache[t]},h.prototype.get=function(t){return this.contains(t)?this.cache[t].data:null},h.prototype.contains=function(t){return this.cache.hasOwnProperty(t)},h.prototype.isLoading=function(t){return this.contains(t)&&null===this.cache[t].data},h.prototype.isLoaded=function(t){return this.contains(t)&&null!==this.cache[t].data},h.prototype.loadScript=function(n,t,r){return new Promise(function(t,e){var i=document.createElement("script");i.src=n,i.async=!1,i.onload=function(){"function"==typeof r&&r(),t()},document.head.appendChild(i)})},h.prototype.requestXhr=function(i,n){var r;return void 0===n&&(n="application/json"),window.XMLHttpRequest?(r=new XMLHttpRequest,new Promise(function(t,e){r.onreadystatechange=function(){4===r.readyState&&(200===r.status?(t(r.responseText),r.onreadystatechange=null):0<r.status&&(e("There was a problem with the request: status ".concat(r.status)),r.onreadystatechange=null))};try{r.open("GET",i,!0),r.setRequestHeader("Content-Type",n),r.send()}catch(t){e("Error: Unable to send request, CORS not allowed.")}})):Promise.reject("Unable to send request, XMLHttpRequest not supported.")};var a=h;function h(){this.cache={}}function l(s,o,a,h){return new(a=a||Promise)(function(t,e){function i(t){try{r(h.next(t))}catch(t){e(t)}}function n(t){try{r(h.throw(t))}catch(t){e(t)}}function r(e){e.done?t(e.value):new a(function(t){t(e.value)}).then(i,n)}r((h=h.apply(s,o||[])).next())})}function c(n,r){var s,o,a,h={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},t={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(t[Symbol.iterator]=function(){return this}),t;function e(i){return function(t){var e=[i,t];if(s)throw new TypeError("Generator is already executing.");for(;h;)try{if(s=1,o&&(a=2&e[0]?o.return:e[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,e[1])).done)return a;switch(o=0,(e=a?[2&e[0],a.value]:e)[0]){case 0:case 1:a=e;break;case 4:return h.label++,{value:e[1],done:!1};case 5:h.label++,o=e[1],e=[0];continue;case 7:e=h.ops.pop(),h.trys.pop();continue;default:if(!(a=0<(a=h.trys).length&&a[a.length-1])&&(6===e[0]||2===e[0])){h=0;continue}if(3===e[0]&&(!a||e[1]>a[0]&&e[1]<a[3]))h.label=e[1];else if(6===e[0]&&h.label<a[1])h.label=a[1],a=e;else{if(!(a&&h.label<a[2])){a[2]&&h.ops.pop(),h.trys.pop();continue}h.label=a[2],h.ops.push(e)}}e=r.call(n,h)}catch(t){e=[6,t],o=0}finally{s=a=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}}}s.BrandingDomain=void 0,(_=s.BrandingDomain||(s.BrandingDomain={}))[_.Neutral=0]="Neutral",_[_.Yepi=1]="Yepi",_[_.Spele=2]="Spele",_[_.Funnygames=3]="Funnygames",_[_.Kizi=4]="Kizi",_[_.PlayCell=5]="PlayCell",_[_.GameCell=6]="GameCell",_[_.Bild=7]="Bild",_[_.AGame=8]="AGame",_[_.Admeen=9]="Admeen",_[_.PlayTime=10]="PlayTime",_[_.Zigiz=11]="Zigiz";d.isBip=function(){return-1!==window.location.search.indexOf("bipgaming")||"bip.fbrq.io"===window.location.host},d.isPlaycellApp=function(){return-1!==window.location.search.indexOf("playcellApp")},d.isAGame=function(){return-1!==window.location.search.indexOf("agame")},d.isAirfi=function(){return!!window.hasOwnProperty("airfi")&&window.airfi},d.isPlaytime=function(){return-1!==window.location.host.indexOf("playtime.nl")},d.isBild=function(){return"bild.fbrq.io"===window.location.host||-1!==window.location.host.indexOf("contentfleet.com")},d.isYandex=function(){return window.hasOwnProperty("_YaSDK")||window.hasOwnProperty("YaGames")},d.getYandexBaseURL=function(){var t;if(null!=(t=null==(t=window.YandexGamesSDKEnvironment)?void 0:t.browser)&&t.lang&&"en"===window.YandexGamesSDKEnvironment.browser.lang)return"yandex.com";return"yandex.ru"};var u=d;function d(){}s.UtmTargets=void 0,(_=s.UtmTargets||(s.UtmTargets={}))[_.splashscreen=0]="splashscreen",_[_.logo=1]="logo",_[_.facebook=2]="facebook",_[_.twitter=3]="twitter",_[_.playstore=4]="playstore",_[_.appstore=5]="appstore",_[_.more_games=6]="more_games",_[_.download_game=7]="download_game",_[_.walkthrough=8]="walkthrough",_[_.disclaimer=9]="disclaimer",_[_.highscores=10]="highscores";f.getProtocol=function(t){return t?"https://":"//"},f.getUtmContent=function(t){return"string"==typeof t?t:s.UtmTargets[t]},f.getDomainURL=function(t,e){var i;switch(t){case s.BrandingDomain.Spele:i=e+"www.spele.nl";break;case s.BrandingDomain.Yepi:i=e+"www.yepi.com";break;case s.BrandingDomain.Admeen:i="https://media.admeen.com/branding/link.php";break;case s.BrandingDomain.PlayCell:i=e+"www.playcell.com";break;case s.BrandingDomain.GameCell:i=e+"www.gamecell.com";break;case s.BrandingDomain.Kizi:i=e+"www.kizi.com";break;case s.BrandingDomain.Bild:i=e+"www.bildspielt.de";break;case s.BrandingDomain.Funnygames:i=e+"www.funnygames.nu";break;case s.BrandingDomain.PlayTime:i=e+"playtime.nl";break;default:case s.BrandingDomain.AGame:i=e+"www.agame.com";break;case s.BrandingDomain.Zigiz:i=e+"m.zigiz.com"}return i},f.getPromoURL=function(t,e,i,n,r){return window.hasOwnProperty("_YaSDK")||window.hasOwnProperty("YaGames")?"https://".concat(u.getYandexBaseURL(),"/games/developer?name=Azerion"):t===s.BrandingDomain.Admeen?"https://media.admeen.com/branding/link.php":t===s.BrandingDomain.Bild?e:e+"/?utm_source="+i+"&utm_medium=html5&utm_term="+n+"&utm_content="+r+"&utm_campaign=Gamedistribution"};var p=f;function f(){}function g(t,e,i){var n=document.createElement("script");n.setAttribute("src",t+"?v="+e),"function"==typeof i&&(n.onload=i),document.body.appendChild(n)}y.loadPortalScript=function(t){t&&t.hasOwnProperty("minijuegos")&&-1!==t.minijuegos.indexOf(T.getSourceSite())&&(void 0!==window.mpConfig?window.mpConfig.partner="orange-games":window.mpConfig={partner:"orange-games"},g("https://ext.minijuegosgratis.com/external-host/main.js",Date.now()/1e3)),t&&t.hasOwnProperty("kongregate")&&-1!==t.kongregate.indexOf(T.getSourceSite())&&g("https://cdn1.kongregate.com/javascripts/kongregate_api.js",Date.now()/1e3,function(){"undefined"!=typeof kongregateAPI&&kongregateAPI.loadAPI(function(){window.kongregate=kongregateAPI.getAPI()})}),t&&t.hasOwnProperty("newgrounds")&&-1!==t.newgrounds.indexOf(T.getSourceSite())&&g("./fbrq/scripts/newgroundsio.min.js",Date.now()/1e3)};var m=y;function y(){}x.isStandAlone=function(){var t;return null!=(t=window._azerionIntegration)&&t.sa?null==(t=window._azerionIntegration)?void 0:t.sa:!!window.hasOwnProperty("fbrqSA")&&window.fbrqSA},x.hasDomainForCustomBuild=function(){var t;return(null==(t=window._azerionIntegration)?void 0:t.bd)||window.hasOwnProperty("fbrqBD")},x.getDomainForCustomBuild=function(){var t;return null!=(t=window._azerionIntegration)&&t.bd&&(null==(t=window._azerionIntegration)?void 0:t.bd)in s.BrandingDomain?null==(t=window._azerionIntegration)?void 0:t.bd:window.hasOwnProperty("fbrqBD")&&window.fbrqBD in s.BrandingDomain?window.fbrqBD:void 0},x.hasLinksSettingsForCustomBuild=function(){var t;return(null==(t=window._azerionIntegration)?void 0:t.la)||window.hasOwnProperty("fbrqLA")},x.getLinkSettingsForCustomBuild=function(){var t;return null!=(t=window._azerionIntegration)&&t.la?null==(t=window._azerionIntegration)?void 0:t.la:window.hasOwnProperty("fbrqLA")?window.hasOwnProperty("fbrqLA"):void 0};var v=x;function x(){}w.preload=function(t){var e=Promise.all([a.instance.load(n.KEY,"".concat(T.ASSET_LOCATION,"json/domains.json?v=").concat(t),"text/plain"),a.instance.load(w.SITELOCK_PORTALS,"".concat(T.ASSET_LOCATION,"json/sitelock.json?v=").concat(t),"text/plain")]);return Promise.all([a.instance.load(w.INTERNAL_PORTALS_KEY,"".concat(T.ASSET_LOCATION,"json/internal.json?v=").concat(t),"text/plain"),a.instance.load(w.CONTRACTED_PORTALS_KEY,"".concat(T.ASSET_LOCATION,"json/contracted.json?v=").concat(t),"text/plain"),a.instance.load(w.SPECIAL_PORTALS_KEY,"".concat(T.ASSET_LOCATION,"json/special.json?v=").concat(t),"text/plain")]),e.then(function(t){var e=t[0],t=t[1];n.setList(e),m.loadPortalScript(t),w.setSiteLock(t)}).catch(function(){})},w.setSiteLock=function(t){w.siteLocks=t},Object.defineProperty(w,"brandingLogoUrl",{get:function(){var t;switch(T.isOnDevice()||u.isAirfi()?T.ASSET_LOCATION="assets/":"fbrq.io"===T.getSourceSite(!0)&&(T.ASSET_LOCATION="https://"+window.location.host+"/@azerion/splash/assets/"),T.getBrandingDomain()){case s.BrandingDomain.Spele:t="spele";break;case s.BrandingDomain.PlayCell:t="playcell";break;case s.BrandingDomain.GameCell:t="gamecell";break;case s.BrandingDomain.Yepi:t="yepi";break;case s.BrandingDomain.Admeen:t="admeen";break;case s.BrandingDomain.Bild:t="bild";break;case s.BrandingDomain.Kizi:t="kizi";break;case s.BrandingDomain.Funnygames:t="funnygames";break;case s.BrandingDomain.PlayTime:t="playtime";break;default:case s.BrandingDomain.AGame:t="agame";break;case s.BrandingDomain.Zigiz:t="zigiz"}return T.ASSET_LOCATION+"images/branding_logo_"+t+"_small.png"},enumerable:!1,configurable:!0}),Object.defineProperty(w,"brandingBackgroundColor",{get:function(){var t;switch(T.getBrandingDomain()){case s.BrandingDomain.Spele:t="#4a72ad";break;case s.BrandingDomain.PlayCell:t="#52a1e1";break;case s.BrandingDomain.GameCell:t="#c600b2";break;case s.BrandingDomain.Yepi:t="#0573a7";break;case s.BrandingDomain.AGame:t="#0C486C";break;case s.BrandingDomain.Admeen:t="#4267B2";break;case s.BrandingDomain.Bild:t="#de0000";break;default:case s.BrandingDomain.Kizi:t="#012f50";break;case s.BrandingDomain.Funnygames:t="#33b0ff";break;case s.BrandingDomain.PlayTime:case s.BrandingDomain.Zigiz:t="#023a63"}return t},enumerable:!1,configurable:!0}),w.blockedDomain=function(){return T.isOnDevice()||w.isSpecial()},w.createCampaignURL=function(t,e){var i=T.getSourceSite(),n=T.getBrandingDomain(),r=p.getProtocol(T.isOnDevice()),r=p.getDomainURL(n,r),e=p.getUtmContent(e);return p.getPromoURL(n,r,i,t,e)},w.openCampaignLink=function(t,e){t=w.createCampaignURL(t,e);w.blockedDomain()||(e=window.open(t))&&e.focus&&e.focus()},w.isInternal=function(){return w.hostMatchesList(a.instance.get(w.INTERNAL_PORTALS_KEY))},w.isContracted=function(){return w.hostMatchesList(a.instance.get(w.CONTRACTED_PORTALS_KEY))},w.isSpecial=function(){return w.hostMatchesList(a.instance.get(w.SPECIAL_PORTALS_KEY))},w.isAdmeen=function(){var t;return!(!w.siteLocks||!w.siteLocks.hasOwnProperty("admeen"))&&(t=w.siteLocks.admeen,w.hostMatchesList(t))},w.isKongregate=function(){var t;return!(!w.siteLocks||!w.siteLocks.hasOwnProperty("kongregate"))&&(t=w.siteLocks.kongregate,w.hostMatchesList(t))},w.isNewgrounds=function(){var t;return!(!w.siteLocks||!w.siteLocks.hasOwnProperty("newgrounds"))&&(t=w.siteLocks.newgrounds,w.hostMatchesList(t))},w.crossPromoAllowed=function(){var t=w.siteLocks.yandex;return w.hostMatchesList(t)},w.outGoingLinksAllowed=function(){return!(u.isAirfi()||w.isSpecial()||w.isContracted())&&(!v.hasLinksSettingsForCustomBuild()||v.getLinkSettingsForCustomBuild())},w.hostMatchesList=function(t){t=t||[];for(var e=T.getSourceSite(),i=0;i<t.length;i++)if(e===t[i])return!0;return!1},w.LOGO_KEY="branding_logo",w.INTERNAL_PORTALS_KEY="branding_portals",w.CONTRACTED_PORTALS_KEY="branding_contracted",w.SPECIAL_PORTALS_KEY="branding_special",w.SITELOCK_PORTALS="sitelock_portals",w.DOMAIN_OVERWRITE=null,w.analyticsEnabled=!0;var b=w;function w(){}S.loadHost=function(){return l(this,void 0,void 0,function(){var e,i;return c(this,function(t){switch(t.label){case 0:if(e=document.referrer||window.location.host,!window.hasOwnProperty("gdsdk"))return[3,4];t.label=1;case 1:return t.trys.push([1,3,,4]),[4,window.gdsdk.getSession()];case 2:return i=t.sent(),e=i.location.parentDomain,[3,4];case 3:return t.sent(),[3,4];case 4:return S.HOST=e,[2]}})})},S.getSourceSite=function(t){var e=S.HOST;return-1!==(e=(t=void 0===t?!1:t)?window.location.host:e).indexOf("embed.gamedistribution.com")&&-1!==window.location.search.indexOf("gd_sdk_referrer_url")&&(e=S.getUrlParameter("gd_sdk_referrer_url")||e),e=decodeURIComponent(e),u.isBild()?"bildspielt.de":u.isBip()?"bipgaming.com":(e=(e=-1<e.indexOf("://")?e.split("/")[2]:e.split("/")[0]).split(":")[0],null!==(t=n.getDomain(e))?t:3===e.split(".").length?e.substr(e.indexOf(".")+1):e)},S.getBrandingDomain=function(){if(v.hasDomainForCustomBuild())return v.getDomainForCustomBuild();if(b.DOMAIN_OVERWRITE)return b.DOMAIN_OVERWRITE;var t=S.getSourceSite();if(b.isAdmeen())return s.BrandingDomain.Admeen;if(u.isPlaycellApp()||u.isBip())return s.BrandingDomain.PlayCell;switch(t){case"spele.nl":return s.BrandingDomain.Spele;case"yepi.com":return s.BrandingDomain.Yepi;case"oyunskor.com":case"barbioyunu.com.tr":case"bebekoyunu.com.tr":case"oyunkolu.com":case"oyungemisi.com":case"oyunlar1.com":case"oyunkuzusu.com":case"kraloyun.com":case"rekoroyun.com":case"oyundedem.com":case"oyunoyna.com":case"pastaoyunu.com.tr":case"playcell.com":return s.BrandingDomain.PlayCell;case"gamecell.com":return s.BrandingDomain.GameCell;case"playxl.com":return s.BrandingDomain.Admeen;case"kizi.com":return s.BrandingDomain.Kizi;case"bildspielt.de":return s.BrandingDomain.Bild;case"funnygames.nl":return s.BrandingDomain.Funnygames;case"playtime.nl":return s.BrandingDomain.PlayTime;default:case"agame.com":return s.BrandingDomain.AGame;case"gmbl.nl":case"zigiz.com":return s.BrandingDomain.Zigiz;case"coolmathgames.com":return s.BrandingDomain.Neutral}},S.getReferrer=function(t){return-1!==t.indexOf("?ref=")?t.substr(t.indexOf("?ref=")+5):t},S.inIframe=function(){try{return window.self!==window.top}catch(t){return!0}},S.inGDGameZone=function(){return-1!==document.referrer.indexOf("html5.gamedistribution.com")},S.getDomain=function(t){var e=document.createElement("a");return e.href=t,e.origin},S.isOnDevice=function(){return void 0!==window.cordova&&!/(gamedistribution\.com)/.test(window.location.hostname)},S.isTc=function(){return/(teamcity\.azerdev\.com)/.test(window.location.host)},S.getRandomRange=function(t,e){return Math.random()*(e-t)+t|0},S.getUrlParameter=function(t){t=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");t=new RegExp("[\\?&]"+t+"=([^&#]*)").exec(location.search);return null===t?"":decodeURIComponent(t[1].replace(/\+/g," "))},S.intTimeToString=function(t){var e=Math.floor(t/3600),i=Math.floor(t%3600/60),t=t%60;return(e<10?"0"+e:e.toString())+":"+(i<10?"0"+i:i.toString())+":"+(t<10?"0"+t:t.toString())},S.LANGUAGE="en",S.HOST=document.referrer||window.location.host,S.ASSET_LOCATION=v.isStandAlone()?"assets/":"./fbrq/";var T=S;function S(){}var P=t(function(t,e){t.exports=function e(n,r,s){function o(i,t){if(!r[i]){if(!n[i]){if(!t&&rt)return rt();if(a)return a(i,!0);t=new Error("Cannot find module '"+i+"'");throw t.code="MODULE_NOT_FOUND",t}t=r[i]={exports:{}};n[i][0].call(t.exports,function(t){var e=n[i][1][t];return o(e||t)},t,t.exports,e,n,r,s)}return r[i].exports}for(var a=rt,t=0;t<s.length;t++)o(s[t]);return o}({1:[function(t,Y,X){!function(){var c,i,u,d,p,t,f,a,l,o,h,s,r,g,n,m,e,y,v=this||Function("return this")(),x=(t=Date.now||function(){return+new Date},f="undefined"!=typeof SHIFTY_DEBUG_NOW?SHIFTY_DEBUG_NOW:t,i="undefined"!=typeof window&&(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||window.mozCancelRequestAnimationFrame&&window.mozRequestAnimationFrame)||setTimeout,k.prototype.tween=function(t){return this._isTweening?this:(void 0===t&&this._configured||this.setConfig(t),this._timestamp=f(),this._start(this.get(),this._attachment),this.resume())},k.prototype.setConfig=function(t){t=t||{},this._configured=!0,this._attachment=t.attachment,this._pausedAtTime=null,this._scheduleId=null,this._delay=t.delay||0,this._start=t.start||b,this._step=t.step||b,this._finish=t.finish||b,this._duration=t.duration||500,this._currentState=T({},t.from||this.get()),this._originalState=this.get(),this._targetState=T({},t.to||this.get());var e=this,i=(this._timeoutHandler=function(){A(e,e._timestamp,e._delay,e._duration,e._currentState,e._originalState,e._targetState,e._easing,e._step,e._scheduleFunction)},this._currentState),n=this._targetState;return S(n,i),this._easing=M(i,t.easing||"linear"),this._filterArgs=[i,this._originalState,n,this._easing],E(this,"tweenCreated"),this},k.prototype.get=function(){return T({},this._currentState)},k.prototype.set=function(t){this._currentState=t},k.prototype.pause=function(){return this._pausedAtTime=f(),this._isPaused=!0,this},k.prototype.resume=function(){return this._isPaused&&(this._timestamp+=f()-this._pausedAtTime),this._isPaused=!1,this._isTweening=!0,this._timeoutHandler(),this},k.prototype.seek=function(t){t=Math.max(t,0);var e=f();return this._timestamp+t!==0&&(this._timestamp=e-t,this.isPlaying()||(this._isTweening=!0,this._isPaused=!1,A(this,this._timestamp,this._delay,this._duration,this._currentState,this._originalState,this._targetState,this._easing,this._step,this._scheduleFunction,e),this.pause())),this},k.prototype.stop=function(t){return this._isTweening=!1,this._isPaused=!1,this._timeoutHandler=b,(v.cancelAnimationFrame||v.webkitCancelAnimationFrame||v.oCancelAnimationFrame||v.msCancelAnimationFrame||v.mozCancelRequestAnimationFrame||v.clearTimeout)(this._scheduleId),t&&(E(this,"beforeTween"),P(1,this._currentState,this._originalState,this._targetState,1,0,this._easing),E(this,"afterTween"),E(this,"afterTweenEnd"),this._finish.call(this,this._currentState,this._attachment)),this},k.prototype.isPlaying=function(){return this._isTweening&&!this._isPaused},k.prototype.setScheduleFunction=function(t){this._scheduleFunction=t},k.prototype.dispose=function(){for(var t in this)this.hasOwnProperty(t)&&delete this[t]},k.prototype.filter={},c=k.prototype.formula={linear:function(t){return t}},T(k,{now:f,each:w,tweenProps:P,tweenProp:_,applyFilter:E,shallowCopy:T,defaults:S,composeEasingObject:M}),"function"==typeof SHIFTY_DEBUG_NOW&&(v.timeoutHandler=A),"object"==typeof X?Y.exports=k:void 0===v.Tweenable&&(v.Tweenable=k),k);function b(){}function w(t,e){for(var i in t)Object.hasOwnProperty.call(t,i)&&e(i)}function T(e,i){return w(i,function(t){e[t]=i[t]}),e}function S(e,i){w(i,function(t){void 0===e[t]&&(e[t]=i[t])})}function P(t,e,i,n,r,s,o){var a,h,l=t<s?0:(t-s)/r;for(a in e)e.hasOwnProperty(a)&&(h="function"==typeof(h=o[a])?h:c[h],e[a]=_(i[a],n[a],h,l));return e}function _(t,e,i,n){return t+(e-t)*i(n)}function E(e,i){var n=k.prototype.filter,r=e._filterArgs;w(n,function(t){void 0!==n[t][i]&&n[t][i].apply(e,r)})}function A(t,e,i,n,r,s,o,a,h,l,c){p=e+i+n,u=Math.min(c||f(),p),d=p<=u,p=n-(p-u),t.isPlaying()&&(d?(h(o,t._attachment,p),t.stop(!0)):(t._scheduleId=l(t._timeoutHandler,1e3/60),E(t,"beforeTween"),u<e+i?P(1,r,s,o,1,1,a):P(u,r,s,o,n,e+i,a),E(t,"afterTween"),h(r,t._attachment,p)))}function M(t,e){var i={},n=typeof e;return w(t,"string"==n||"function"==n?function(t){i[t]=e}:function(t){i[t]||(i[t]=e[t]||"linear")}),i}function k(t,e){this._currentState=t||{},this._configured=!1,this._scheduleFunction=i,void 0!==e&&this.setConfig(e)}function B(t,e,i,n,r,s){var h=0,l=0,c=0,o=0,a=0,u=0;function d(t){return((h*t+l)*t+c)*t}function p(t){return 0<=t?t:0-t}return h=1-(c=3*e)-(l=3*(n-e)-c),o=1-(u=3*i)-(a=3*(r-i)-u),n=function(t,e){var i,n,r,s,o,a;for(r=t,a=0;a<8;a++){if(p(s=d(r)-t)<e)return r;if(p(o=function(t){return(3*h*t+2*l)*t+c}(r))<1e-6)break;r-=s/o}if(n=1,(r=t)<(i=0))return i;if(n<r)return n;for(;i<n;){if(p((s=d(r))-t)<e)return r;s<t?i=r:n=r,r=.5*(n-i)+i}return r}(n=t,1/(200*s)),((o*n+a)*n+u)*n}function C(i){l.each(i,function(t){var e=i[t];"string"==typeof e&&e.match(n)&&(i[t]=R(n,e,F))})}function F(t){t=function(t){3===(t=t.replace(/#/,"")).length&&(t=(t=t.split(""))[0]+t[0]+t[1]+t[1]+t[2]+t[2]);return e[0]=O(t.substr(0,2)),e[1]=O(t.substr(2,2)),e[2]=O(t.substr(4,2)),e}(t);return"rgb("+t[0]+","+t[1]+","+t[2]+")"}function O(t){return parseInt(t,16)}function R(t,e,i){var n=e.match(t),r=e.replace(t,m);if(n)for(var s,o=n.length,a=0;a<o;a++)s=n.shift(),r=r.replace(m,i(s));return r}function N(t){for(var e=t.match(s),i=e.length,n=t.match(g)[0],r=0;r<i;r++)n+=parseInt(e[r],10)+",";return n=n.slice(0,-1)+")"}function z(r){var s={};return l.each(r,function(t){var e,i,n=r[t];"string"==typeof n&&(e=I(n),s[t]={formatString:((i=(n=n).match(h))?1!==i.length&&!n.charAt(0).match(o)||i.unshift(""):i=["",""],i.join(m)),chunkNames:function(t,e){for(var i=[],n=t.length,r=0;r<n;r++)i.push("_"+e+"_"+r);return i}(e,t)})}),s}function L(r,s){l.each(s,function(t){for(var e=I(r[t]),i=e.length,n=0;n<i;n++)r[s[t].chunkNames[n]]=+e[n];delete r[t]})}function D(i,n){l.each(n,function(t){i[t];var e=function(t,e){y.length=0;for(var i=e.length,n=0;n<i;n++)y.push(t[e[n]]);return y}(function(t,e){for(var i,n={},r=e.length,s=0;s<r;s++)i=e[s],n[i]=t[i],delete t[i];return n}(i,n[t].chunkNames),n[t].chunkNames),e=function(t,e){for(var i=t,n=e.length,r=0;r<n;r++)i=i.replace(m,+e[r].toFixed(4));return i}(n[t].formatString,e);i[t]=R(r,e,N)})}function I(t){return t.match(s)}x.shallowCopy(x.prototype.formula,{easeInQuad:function(t){return Math.pow(t,2)},easeOutQuad:function(t){return-(Math.pow(t-1,2)-1)},easeInOutQuad:function(t){return(t/=.5)<1?.5*Math.pow(t,2):-.5*((t-=2)*t-2)},easeInCubic:function(t){return Math.pow(t,3)},easeOutCubic:function(t){return Math.pow(t-1,3)+1},easeInOutCubic:function(t){return(t/=.5)<1?.5*Math.pow(t,3):.5*(Math.pow(t-2,3)+2)},easeInQuart:function(t){return Math.pow(t,4)},easeOutQuart:function(t){return-(Math.pow(t-1,4)-1)},easeInOutQuart:function(t){return(t/=.5)<1?.5*Math.pow(t,4):-.5*((t-=2)*Math.pow(t,3)-2)},easeInQuint:function(t){return Math.pow(t,5)},easeOutQuint:function(t){return Math.pow(t-1,5)+1},easeInOutQuint:function(t){return(t/=.5)<1?.5*Math.pow(t,5):.5*(Math.pow(t-2,5)+2)},easeInSine:function(t){return 1-Math.cos(t*(Math.PI/2))},easeOutSine:function(t){return Math.sin(t*(Math.PI/2))},easeInOutSine:function(t){return-.5*(Math.cos(Math.PI*t)-1)},easeInExpo:function(t){return 0===t?0:Math.pow(2,10*(t-1))},easeOutExpo:function(t){return 1===t?1:1-Math.pow(2,-10*t)},easeInOutExpo:function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t))},easeInCirc:function(t){return-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-Math.pow(t-1,2))},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeOutBounce: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},easeInBack:function(t){return t*t*(2.70158*t-1.70158)},easeOutBack:function(t){return(t-=1)*t*(2.70158*t+1.70158)+1},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},elastic:function(t){return-1*Math.pow(4,-8*t)*Math.sin((6*t-1)*(2*Math.PI)/2)+1},swingFromTo:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},swingFrom:function(t){return t*t*(2.70158*t-1.70158)},swingTo:function(t){return--t*t*(2.70158*t+1.70158)+1},bounce: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},bouncePast:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?2-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?2-(7.5625*(t-=2.25/2.75)*t+.9375):2-(7.5625*(t-=2.625/2.75)*t+.984375)},easeFromTo:function(t){return(t/=.5)<1?.5*Math.pow(t,4):-.5*((t-=2)*Math.pow(t,3)-2)},easeFrom:function(t){return Math.pow(t,4)},easeTo:function(t){return Math.pow(t,.25)}}),x.setBezierFunction=function(t,e,i,n,r){s=e,o=i,a=n,h=r;var s,o,a,h,l=function(t){return B(t,s,o,a,h,1)};return l.displayName=t,l.x1=e,l.y1=i,l.x2=n,l.y2=r,x.prototype.formula[t]=l},x.unsetBezierFunction=function(t){delete x.prototype.formula[t]},(a=new x)._filterArgs=[],x.interpolate=function(t,e,i,n,r){var s=x.shallowCopy({},t),r=r||0,n=x.composeEasingObject(t,n||"linear"),o=(a.set({}),a._filterArgs),o=(o.length=0,o[0]=s,o[1]=t,o[2]=e,o[3]=n,x.applyFilter(a,"tweenCreated"),x.applyFilter(a,"beforeTween"),x.tweenProps(i,s,t,e,1,r,n));return x.applyFilter(a,"afterTween"),o},l=x,o=/(\d|\-|\.)/,h=/([^\-0-9\.]+)/g,s=/[0-9.\-]+/g,r=new RegExp("rgb\\("+s.source+/,\s*/.source+s.source+/,\s*/.source+s.source+"\\)","g"),g=/^.*\(/,n=/#([0-9]|[a-f]){3,6}/gi,m="VAL",e=[],y=[],l.prototype.filter.token={tweenCreated:function(t,e,i,n){C(t),C(e),C(i),this._tokenData=z(t)},beforeTween:function(t,e,i,n){var a,h;a=n,h=this._tokenData,l.each(h,function(t){var e=h[t].chunkNames,i=e.length,n=a[t];if("string"==typeof n)for(var r=n.split(" "),s=r[r.length-1],o=0;o<i;o++)a[e[o]]=r[o]||s;else for(o=0;o<i;o++)a[e[o]]=n;delete a[t]}),L(t,this._tokenData),L(e,this._tokenData),L(i,this._tokenData)},afterTween:function(t,e,i,n){var o,a;D(t,this._tokenData),D(e,this._tokenData),D(i,this._tokenData),o=n,a=this._tokenData,l.each(a,function(t){var e=a[t].chunkNames,i=e.length,n=o[e[0]];if("string"==typeof n){for(var r="",s=0;s<i;s++)r+=" "+o[e[s]],delete o[e[s]];o[t]=r.substr(1)}else o[t]=n})}}}.call(null)},{}],2:[function(t,e,i){function n(t,e){this._pathTemplate="M 50,50 m 0,-{radius} a {radius},{radius} 0 1 1 0,{2radius} a {radius},{radius} 0 1 1 0,-{2radius}",this.containerAspectRatio=1,r.apply(this,arguments)}var r=t("./shape"),s=t("./utils");((n.prototype=new r).constructor=n).prototype._pathString=function(t){var e=t.strokeWidth,t=50-(e=t.trailWidth&&t.trailWidth>t.strokeWidth?t.trailWidth:e)/2;return s.render(this._pathTemplate,{radius:t,"2radius":2*t})},n.prototype._trailString=function(t){return this._pathString(t)},e.exports=n},{"./shape":7,"./utils":9}],3:[function(t,e,i){function n(t,e){this._pathTemplate="M 0,{center} L 100,{center}",r.apply(this,arguments)}var r=t("./shape"),s=t("./utils");((n.prototype=new r).constructor=n).prototype._initializeSvg=function(t,e){t.setAttribute("viewBox","0 0 100 "+e.strokeWidth),t.setAttribute("preserveAspectRatio","none")},n.prototype._pathString=function(t){return s.render(this._pathTemplate,{center:t.strokeWidth/2})},n.prototype._trailString=function(t){return this._pathString(t)},e.exports=n},{"./shape":7,"./utils":9}],4:[function(t,e,i){e.exports={Line:t("./line"),Circle:t("./circle"),SemiCircle:t("./semicircle"),Square:t("./square"),Path:t("./path"),Shape:t("./shape"),utils:t("./utils")}},{"./circle":2,"./line":3,"./path":5,"./semicircle":6,"./shape":7,"./square":8,"./utils":9}],5:[function(t,e,i){function n(t,e){if(!(this instanceof n))throw new Error("Constructor was called without new keyword");e=h.extend({duration:800,easing:"linear",from:{},to:{},step:function(){}},e),t=h.isString(t)?document.querySelector(t):t,this.path=t,this._opts=e,this._tweenable=null,t=this.path.getTotalLength(),this.path.style.strokeDasharray=t+" "+t,this.set(0)}var a=t("shifty"),h=t("./utils"),r={easeIn:"easeInCubic",easeOut:"easeOutCubic",easeInOut:"easeInOutCubic"};n.prototype.value=function(){var t=this._getComputedDashOffset(),e=this.path.getTotalLength();return parseFloat((1-t/e).toFixed(6),10)},n.prototype.set=function(t){this.stop(),this.path.style.strokeDashoffset=this._progressToOffset(t);var e,i=this._opts.step;h.isFunction(i)&&(e=this._easing(this._opts.easing),i(this._calculateTo(t,e),this._opts.shape||this,this._opts.attachment))},n.prototype.stop=function(){this._stopTween(),this.path.style.strokeDashoffset=this._getComputedDashOffset()},n.prototype.animate=function(t,i,e){i=i||{},h.isFunction(i)&&(e=i,i={});var n=h.extend({},i),r=h.extend({},this._opts),r=(i=h.extend(r,i),this._easing(i.easing)),n=this._resolveFromAndTo(t,r,n),s=(this.stop(),this.path.getBoundingClientRect(),this._getComputedDashOffset()),t=this._progressToOffset(t),o=this;this._tweenable=new a,this._tweenable.tween({from:h.extend({offset:s},n.from),to:h.extend({offset:t},n.to),duration:i.duration,easing:r,step:function(t){o.path.style.strokeDashoffset=t.offset;var e=i.shape||o;i.step(t,e,i.attachment)},finish:function(t){h.isFunction(e)&&e()}})},n.prototype._getComputedDashOffset=function(){var t=window.getComputedStyle(this.path,null);return parseFloat(t.getPropertyValue("stroke-dashoffset"),10)},n.prototype._progressToOffset=function(t){var e=this.path.getTotalLength();return e-t*e},n.prototype._resolveFromAndTo=function(t,e,i){return i.from&&i.to?{from:i.from,to:i.to}:{from:this._calculateFrom(e),to:this._calculateTo(t,e)}},n.prototype._calculateFrom=function(t){return a.interpolate(this._opts.from,this._opts.to,this.value(),t)},n.prototype._calculateTo=function(t,e){return a.interpolate(this._opts.from,this._opts.to,t,e)},n.prototype._stopTween=function(){null!==this._tweenable&&(this._tweenable.stop(),this._tweenable=null)},n.prototype._easing=function(t){return r.hasOwnProperty(t)?r[t]:t},e.exports=n},{"./utils":9,shifty:1}],6:[function(t,e,i){function n(t,e){this._pathTemplate="M 50,50 m -{radius},0 a {radius},{radius} 0 1 1 {2radius},0",this.containerAspectRatio=2,r.apply(this,arguments)}var r=t("./shape"),s=t("./circle"),o=t("./utils");((n.prototype=new r).constructor=n).prototype._initializeSvg=function(t,e){t.setAttribute("viewBox","0 0 100 50")},n.prototype._initializeTextContainer=function(t,e,i){t.text.style&&(i.style.top="auto",i.style.bottom="0",t.text.alignToBottom?o.setStyle(i,"transform","translate(-50%, 0)"):o.setStyle(i,"transform","translate(-50%, 50%)"))},n.prototype._pathString=s.prototype._pathString,n.prototype._trailString=s.prototype._trailString,e.exports=n},{"./circle":2,"./shape":7,"./utils":9}],7:[function(t,e,i){function n(t,e){if(!(this instanceof n))throw new Error("Constructor was called without new keyword");if(0!==arguments.length){this._opts=s.extend({color:"#555",strokeWidth:1,trailColor:null,trailWidth:null,fill:null,text:{style:{color:null,position:"absolute",left:"50%",top:"50%",padding:0,margin:0,transform:{prefix:!0,value:"translate(-50%, -50%)"}},autoStyleContainer:!0,alignToBottom:!0,value:null,className:"progressbar-text"},svgStyle:{display:"block",width:"100%"},warnings:!1},e,!0),s.isObject(e)&&void 0!==e.svgStyle&&(this._opts.svgStyle=e.svgStyle),s.isObject(e)&&s.isObject(e.text)&&void 0!==e.text.style&&(this._opts.text.style=e.text.style);var e=this._createSvgView(this._opts),i=s.isString(t)?document.querySelector(t):t;if(!i)throw new Error("Container does not exist: "+t);this._container=i,this._container.appendChild(e.svg),this._opts.warnings&&this._warnContainerAspectRatio(this._container),this._opts.svgStyle&&s.setStyles(e.svg,this._opts.svgStyle),this.svg=e.svg,this.path=e.path,this.trail=e.trail,this.text=null;t=s.extend({attachment:void 0,shape:this},this._opts);this._progressPath=new r(e.path,t),s.isObject(this._opts.text)&&null!==this._opts.text.value&&this.setText(this._opts.text.value)}}var r=t("./path"),s=t("./utils"),o="Object is destroyed";n.prototype.animate=function(t,e,i){if(null===this._progressPath)throw new Error(o);this._progressPath.animate(t,e,i)},n.prototype.stop=function(){if(null===this._progressPath)throw new Error(o);void 0!==this._progressPath&&this._progressPath.stop()},n.prototype.destroy=function(){if(null===this._progressPath)throw new Error(o);this.stop(),this.svg.parentNode.removeChild(this.svg),this.svg=null,this.path=null,this.trail=null,(this._progressPath=null)!==this.text&&(this.text.parentNode.removeChild(this.text),this.text=null)},n.prototype.set=function(t){if(null===this._progressPath)throw new Error(o);this._progressPath.set(t)},n.prototype.value=function(){if(null===this._progressPath)throw new Error(o);return void 0===this._progressPath?0:this._progressPath.value()},n.prototype.setText=function(t){if(null===this._progressPath)throw new Error(o);null===this.text&&(this.text=this._createTextContainer(this._opts,this._container),this._container.appendChild(this.text)),s.isObject(t)?(s.removeChildren(this.text),this.text.appendChild(t)):this.text.innerHTML=t},n.prototype._createSvgView=function(t){var e=document.createElementNS("http://www.w3.org/2000/svg","svg"),i=(this._initializeSvg(e,t),null),t=((t.trailColor||t.trailWidth)&&(i=this._createTrail(t),e.appendChild(i)),this._createPath(t));return e.appendChild(t),{svg:e,path:t,trail:i}},n.prototype._initializeSvg=function(t,e){t.setAttribute("viewBox","0 0 100 100")},n.prototype._createPath=function(t){var e=this._pathString(t);return this._createPathElement(e,t)},n.prototype._createTrail=function(t){var e=this._trailString(t),t=s.extend({},t);return t.trailColor||(t.trailColor="#eee"),t.trailWidth||(t.trailWidth=t.strokeWidth),t.color=t.trailColor,t.strokeWidth=t.trailWidth,t.fill=null,this._createPathElement(e,t)},n.prototype._createPathElement=function(t,e){var i=document.createElementNS("http://www.w3.org/2000/svg","path");return i.setAttribute("d",t),i.setAttribute("stroke",e.color),i.setAttribute("stroke-width",e.strokeWidth),e.fill?i.setAttribute("fill",e.fill):i.setAttribute("fill-opacity","0"),i},n.prototype._createTextContainer=function(t,e){var i=document.createElement("div"),n=(i.className=t.text.className,t.text.style);return n&&(t.text.autoStyleContainer&&(e.style.position="relative"),s.setStyles(i,n),n.color||(i.style.color=t.color)),this._initializeTextContainer(t,e,i),i},n.prototype._initializeTextContainer=function(t,e,i){},n.prototype._pathString=function(t){throw new Error("Override this function for each progress bar")},n.prototype._trailString=function(t){throw new Error("Override this function for each progress bar")},n.prototype._warnContainerAspectRatio=function(t){var e;this.containerAspectRatio&&(t=window.getComputedStyle(t,null),e=parseFloat(t.getPropertyValue("width"),10),t=parseFloat(t.getPropertyValue("height"),10),s.floatEquals(this.containerAspectRatio,e/t))},e.exports=n},{"./path":5,"./utils":9}],8:[function(t,e,i){function n(t,e){this._pathTemplate="M 0,{halfOfStrokeWidth} L {width},{halfOfStrokeWidth} L {width},{width} L {halfOfStrokeWidth},{width} L {halfOfStrokeWidth},{strokeWidth}",this._trailTemplate="M {startMargin},{halfOfStrokeWidth} L {width},{halfOfStrokeWidth} L {width},{width} L {halfOfStrokeWidth},{width} L {halfOfStrokeWidth},{halfOfStrokeWidth}",r.apply(this,arguments)}var r=t("./shape"),s=t("./utils");((n.prototype=new r).constructor=n).prototype._pathString=function(t){var e=100-t.strokeWidth/2;return s.render(this._pathTemplate,{width:e,strokeWidth:t.strokeWidth,halfOfStrokeWidth:t.strokeWidth/2})},n.prototype._trailString=function(t){var e=100-t.strokeWidth/2;return s.render(this._trailTemplate,{width:e,strokeWidth:t.strokeWidth,halfOfStrokeWidth:t.strokeWidth/2,startMargin:t.strokeWidth/2-t.trailWidth/2})},e.exports=n},{"./shape":7,"./utils":9}],9:[function(t,e,i){var s="Webkit Moz O ms".split(" ");function n(t,e,i){for(var n=t.style,r=0;r<s.length;++r)n[s[r]+o(e)]=i;n[e]=i}function o(t){return t.charAt(0).toUpperCase()+t.slice(1)}function a(t){return"[object Array]"!==Object.prototype.toString.call(t)&&("object"==typeof t&&!!t)}function r(t,e){for(var i in t)t.hasOwnProperty(i)&&e(t[i],i)}e.exports={extend:function t(e,i,n){for(var r in e=e||{},n=n||!1,i=i||{}){var s,o;i.hasOwnProperty(r)&&(s=e[r],o=i[r],n&&a(s)&&a(o)?e[r]=t(s,o,n):e[r]=o)}return e},render:function(t,e){var i,n,r,s=t;for(i in e)e.hasOwnProperty(i)&&(n=e[i],r=new RegExp("\\{"+i+"\\}","g"),s=s.replace(r,n));return s},setStyle:n,setStyles:function(i,t){r(t,function(t,e){null!=t&&(a(t)&&!0===t.prefix?n(i,e,t.value):i.style[e]=t)})},capitalize:o,isString:function(t){return"string"==typeof t||t instanceof String},isFunction:function(t){return"function"==typeof t},isObject:a,forEachObject:r,floatEquals:function(t,e){return Math.abs(t-e)<.001},removeChildren:function(t){for(;t.firstChild;)t.removeChild(t.firstChild)}}},{}]},{},[4])(4)});E.getInstance=function(t){if(!E.instance){if(!t)throw new Error("Can not create new SplashLoader instance without options!");E.instance=new E(t)}return E.instance},E.prototype.create=function(){return l(this,void 0,void 0,function(){var n,r,s,o;return c(this,function(t){switch(t.label){case 0:return r="\n #h5branding-center {\n position: absolute;\n top: 45%;\n left: 50%;\n transform: translate(-50%, -20%);\n text-align: center;\n width: 100%;\n }\n #h5branding-wrapper {\n position: relative;\n z-index: 665;\n width: 150px;\n height: 150px;\n display:inline-block;\n margin: 35px 40px 96px 40px;\n }\n\n #h5branding-version {\n position: absolute;\n right: 10px;\n font-family: Helvetica, Arial, sans-serif;\n color: #ffffff;\n font-size: 0.8em;\n top: 10px;\n display: none;\n }\n\n #h5branding-wrapper > #h5branding-bar, #h5branding-wrapper > img {\n box-shadow: inset 10px 10px 20px 5px rgba(0, 0, 0, 0.5);\n border-radius: 50%;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n }\n\n #h5branding-ad {\n position: relative;\n z-index: 667;\n border-radius: 5px;\n border: 3px solid white;\n background: rgba(256, 256, 256, 0.2);\n width: 336px;\n height: 280px;\n display: none;\n margin: 0px 10px 0px 10px;\n }\n\n #h5branding-wrapper > img {\n /* Needs appropriate vendor prefixes */\n box-sizing: border-box;\n\n /* This needs to be equal to strokeWidth */\n padding: 4%;\n }\n\n #h5branding-wrapper > img {\n border-radius: 50%;\n box-shadow: inset 0 5px 5px rgba(0, 0, 0, 0.5), 5px 5px 7px rgba(0, 0, 0, 0.3);\n }\n\n #h5branding-container {\n box-sizing: border-box;\n position: absolute;\n z-index: 664;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: #000;\n overflow: hidden;\n }\n\n #h5branding-background {\n position: absolute;\n top: -25%;\n left: -25%;\n width: 150%;\n height: 150%;\n background-blend-mode: multiply;\n background-size: cover;\n filter: blur(40px) brightness(1.5);\n }\n\n @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {\n /* IE10+ CSS styles go here */\n #h5branding-background {\n background-image: none !important;\n }\n }\n\n #h5branding-logo {\n position: absolute;\n margin: 0 auto;\n left: 0;\n right: 0;\n text-align: center;\n top: 10%;\n }\n\n #h5branding-logo > img {\n height: 150px;\n }\n\n #h5branding-title {\n position: absolute;\n width: 100%;\n background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.5) 50%, transparent);\n color: #fff;\n text-shadow: 0 0 1px rgba(0, 0, 0, 0.7);\n bottom:10%;\n padding: 15px 0;\n text-align: center;\n font-size: 18px;\n font-family: Helvetica, Arial, sans-serif;\n font-weight: bold;\n line-height: 100%;\n }\n\n #h5branding-button {\n /* border: 0; */\n padding: 10px 22px;\n border-radius: 5px;\n border: 3px solid white;\n background: linear-gradient(0deg, #dddddd, #ffffff);\n color: #222;\n text-transform: uppercase;\n text-shadow: 0 0 1px #fff;\n font-family: Helvetica, Arial, sans-serif;\n font-weight: bold;\n font-size: 18px;\n cursor: pointer;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);\n display: none;\n width: 150px;\n position: absolute;\n top: 170px;\n margin: 0 auto;\n left: 0;\n right: 0;\n }\n\n @media (orientation: portrait) and (max-width: 1080px) {\n #h5branding-logo > img {\n height: initial;\n width:100%;\n }\n }\n\n @media (orientation: landscape) and (max-height: 640px) {\n #h5branding-title {\n display: none;\n }\n\n #h5branding-logo > img {\n height: 100px;\n }\n }\n\n @media (orientation: landscape) and (max-height: 460px) {\n #h5branding-title {\n display: none;\n }\n\n #h5branding-wrapper {\n width: 110px;\n height: 110px;\n margin: 0;\n }\n\n #h5branding-logo {\n top: 0;\n transform: scale(0.7, 0.7);\n }\n\n #h5branding-button {\n top: initial;\n width: 110px;\n font-size: 14px;\n position: absolute;\n top: 140px;\n left: 0;\n right: 0;\n }\n\n #h5branding-ad {\n display: none !important;\n }\n }\n\n @media (orientation: portrait) and (max-width: 250px) {\n #h5branding-logo {\n top: 2%;\n }\n }\n\n @media (orientation: landscape) and (max-width: 330px) {\n #h5branding-button {\n top: 120px;\n }\n\n #h5branding-logo > img {\n height: 70px;\n }\n }\n\n @media (max-width: 600px) and (max-height: 850px) {\n #h5branding-ad {\n display: none !important;\n }\n }\n\n @media (max-width: 600px) and (max-height: 1100px) {\n #h5branding-center {\n top: 40%;\n }\n\n #h5branding-title {\n bottom: 5%\n }\n }\n\n @media (max-width: 600px) and (max-height: 900px) {\n #h5branding-title {\n display: none\n }\n }\n\n @media (orientation: landscape) and (min-width: 800px) {\n #h5branding-wrapper {\n margin-left: 120px;\n margin-right: 120px;\n }\n }\n\n ",e=this.getGameLogoUrl(),i=this.options.gameTitle,n='\n <div id="h5branding-background"></div>\n <div id="h5branding-version"></div>\n <div id="h5branding-logo"></div>\n <div id="h5branding-center">\n <div id="h5branding-ad"></div>\n <div id="h5branding-wrapper">\n <img src="'.concat(e,'" />\n <div id="h5branding-bar"></div>\n <button id="h5branding-button" onclick="h5branding.SplashLoader.getInstance().onPlayButtonClick();">Play</button>\n </div>\n </div>\n <div id="h5branding-title">').concat(i,"</div>\n "),s=document.head||document.getElementsByTagName("head")[0],(o=document.createElement("style")).type="text/css",o.styleSheet?o.styleSheet.cssText=r:o.appendChild(document.createTextNode(r)),s.appendChild(o),(r=document.createElement("div")).innerHTML=n,r.id="h5branding-container",(s=document.body||document.getElementsByTagName("body")[0]).insertBefore(r,s.firstChild),this.circleLoader=new P.Circle("#h5branding-bar",{strokeWidth:3,color:this.options.barColor}),(o=document.getElementById("h5branding-version"))&&(o.innerHTML=this.options.version),[4,this.loadLibs()];case 1:return t.sent(),[4,T.loadHost()];case 2:return t.sent(),[4,this.loadBranding()];case 3:return t.sent(),this.loaded=!0,[2]}var e,i})})},E.prototype.loadBranding=function(){return l(this,void 0,void 0,function(){var e,i;return c(this,function(t){switch(t.label){case 0:return[4,b.preload(Date.now().toString())];case 1:return t.sent(),(e=document.getElementById("h5branding-background"))&&(e.style.backgroundColor=b.brandingBackgroundColor),(e=document.getElementById("h5branding-logo"))&&T.getBrandingDomain()!==s.BrandingDomain.Neutral&&((i=document.createElement("img")).src=b.brandingLogoUrl.replace("_small",""),e.appendChild(i)),[2]}})})},E.prototype.loadLibs=function(){var i=this,n=this.options.libs.map(function(t,e){return a.instance.loadScript(t,!0,function(){i.setScriptloadProgress(n.length,e+1)})});return Promise.all(n)},Object.defineProperty(E.prototype,"bannerAllowed",{get:function(){var t=document.body.clientWidth,e=document.body.clientHeight;return this.progress<100&&!(e<t&&e<=460)&&!(t<600&&e<850)},enumerable:!1,configurable:!0}),E.prototype.showBanner=function(){var t;return this.bannerAllowed&&(t=document.getElementById("h5branding-ad"))?(t.style.display="inline-flex",t):null},E.prototype.setScriptloadProgress=function(t,e){this.circleLoader.animate(.3*e/t,null,function(){})},E.prototype.setLoadProgress=function(t){var e,i=this;this.loaded&&(100===(this.progress=t=30+.7*t)?(e=document.querySelector("#h5branding-button"),this.circleLoader.animate(1,null,function(){!T.inGDGameZone()&&e&&!0===i.showPlayButton?e.style.display="block":!T.inGDGameZone()&&!1!==i.showPlayButton||i.onPlayButtonClick()})):this.circleLoader.animate(t/100,null,function(){}))},E.prototype.setButtonCallback=function(t){this.buttonCallback=t},E.prototype.onPlayButtonClick=function(){this.buttonCallback&&this.buttonCallback()},E.prototype.destroy=function(){var t=document.querySelector("#h5branding-container");null!==t&&null!==t.parentNode&&t.parentNode.removeChild(t)},E.prototype.getGameLogoUrl=function(){return"assets/icon.jpeg"};var _=E;function E(t){this.circleLoader=null,this.loaded=!1,this.showPlayButton="undefined"==typeof playBtn||playBtn,this.progress=0,this.options={gameId:"12346",gameTitle:"Place Holder",gameName:"place-holder",libs:[],version:"dev",barColor:"white",gaMeasurementId:"none"},this.options.gameId=t.gameId,this.options.gameTitle=t.gameTitle,this.options.version=t.version,this.options.barColor=t.barColor||this.options.barColor,this.options.libs=t.libs,this.options.gaMeasurementId=t.gaMeasurementId}s.Branding=b,s.Domain=n,s.Hosts=u,s.SplashLoader=_,s.Utils=T,Object.defineProperty(s,"__esModule",{value:!0})}),(()=>{var n={34:t=>{"use strict";var n=Object.prototype.hasOwnProperty,p="~";function i(){}function s(t,e,i){this.fn=t,this.context=e,this.once=i||!1}function r(t,e,i,n,r){if("function"!=typeof i)throw new TypeError("The listener must be a function");i=new s(i,n||t,r),n=p?p+e:e;return t._events[n]?t._events[n].fn?t._events[n]=[t._events[n],i]:t._events[n].push(i):(t._events[n]=i,t._eventsCount++),t}function h(t,e){0==--t._eventsCount?t._events=new i:delete t._events[e]}function e(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(p=!1)),e.prototype.eventNames=function(){var t,e,i=[];if(0===this._eventsCount)return i;for(e in t=this._events)n.call(t,e)&&i.push(p?e.slice(1):e);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i},e.prototype.listeners=function(t){var t=p?p+t:t,e=this._events[t];if(!e)return[];if(e.fn)return[e.fn];for(var i=0,n=e.length,r=new Array(n);i<n;i++)r[i]=e[i].fn;return r},e.prototype.listenerCount=function(t){t=p?p+t:t,t=this._events[t];return t?t.fn?1:t.length:0},e.prototype.emit=function(t,e,i,n,r,s){var o=p?p+t:t;if(!this._events[o])return!1;var a,h=this._events[o],l=arguments.length;if(h.fn){switch(h.once&&this.removeListener(t,h.fn,void 0,!0),l){case 1:return h.fn.call(h.context),!0;case 2:return h.fn.call(h.context,e),!0;case 3:return h.fn.call(h.context,e,i),!0;case 4:return h.fn.call(h.context,e,i,n),!0;case 5:return h.fn.call(h.context,e,i,n,r),!0;case 6:return h.fn.call(h.context,e,i,n,r,s),!0}for(d=1,a=new Array(l-1);d<l;d++)a[d-1]=arguments[d];h.fn.apply(h.context,a)}else for(var c,u=h.length,d=0;d<u;d++)switch(h[d].once&&this.removeListener(t,h[d].fn,void 0,!0),l){case 1:h[d].fn.call(h[d].context);break;case 2:h[d].fn.call(h[d].context,e);break;case 3:h[d].fn.call(h[d].context,e,i);break;case 4:h[d].fn.call(h[d].context,e,i,n);break;default:if(!a)for(c=1,a=new Array(l-1);c<l;c++)a[c-1]=arguments[c];h[d].fn.apply(h[d].context,a)}return!0},e.prototype.on=function(t,e,i){return r(this,t,e,i,!1)},e.prototype.once=function(t,e,i){return r(this,t,e,i,!0)},e.prototype.removeListener=function(t,e,i,n){t=p?p+t:t;if(this._events[t])if(e){var r=this._events[t];if(r.fn)r.fn!==e||n&&!r.once||i&&r.context!==i||h(this,t);else{for(var s=0,o=[],a=r.length;s<a;s++)(r[s].fn!==e||n&&!r[s].once||i&&r[s].context!==i)&&o.push(r[s]);o.length?this._events[t]=1===o.length?o[0]:o:h(this,t)}}else h(this,t);return this},e.prototype.removeAllListeners=function(t){return t?(t=p?p+t:t,this._events[t]&&h(this,t)):(this._events=new i,this._eventsCount=0),this},e.prototype.off=e.prototype.removeListener,e.prototype.addListener=e.prototype.on,e.prefixed=p,t.exports=e.EventEmitter=e},729:(t,e,i)=>{i=[i,e,i(548),i(498)],e=function(t,e,i,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AdType=e.AdEvents=e.ProviderTypes=e.GameDistributionBannerSize=e.GameDistributionAlignment=e.AdWrapper=void 0,Object.defineProperty(e,"AdWrapper",{enumerable:!0,get:function(){return i.AdWrapper}}),Object.defineProperty(e,"GameDistributionAlignment",{enumerable:!0,get:function(){return n.GameDistributionAlignment}}),Object.defineProperty(e,"GameDistributionBannerSize",{enumerable:!0,get:function(){return n.GameDistributionBannerSize}}),Object.defineProperty(e,"ProviderTypes",{enumerable:!0,get:function(){return n.ProviderTypes}}),Object.defineProperty(e,"AdEvents",{enumerable:!0,get:function(){return n.AdEvents}}),Object.defineProperty(e,"AdType",{enumerable:!0,get:function(){return n.AdType}})}.apply(e,i);void 0!==e&&(t.exports=e)},110:(t,e,i)=>{i=[i,e,i(12)],e=function(t,e,i){"use strict";function n(){this.adsEnabled=!1}Object.defineProperty(e,"__esModule",{value:!0}),e.AdFreeUntrackedProvider=void 0,n.prototype.setManager=function(t){this.adManager=t},n.prototype.showAd=function(t){void 0===t&&(t=i.AdType.interstitial),this.resumeGameplay()},n.prototype.resumeGameplay=function(){this.adManager.emit(i.AdEvents.CONTENT_RESUMED)},n.prototype.preloadAd=function(t){void 0===t&&(t=i.AdType.interstitial)},n.prototype.destroyAd=function(){},n.prototype.hideAd=function(){},n.prototype.adAvailable=function(t){return!0},e.AdFreeUntrackedProvider=n}.apply(e,i);void 0!==e&&(t.exports=e)},670:(t,e,i)=>{i=[i,e,i(12)],e=function(t,e,n){"use strict";function i(){this.adsEnabled=!1}Object.defineProperty(e,"__esModule",{value:!0}),e.DummyProvider=void 0,i.prototype.setManager=function(t){this.adManager=t,this.adsEnabled=!0},i.prototype.showAd=function(t){var e=this,i=(void 0===t&&(t=n.AdType.interstitial),this.adManager.emit(n.AdEvents.CONTENT_PAUSED),Math.floor(2*Math.random()));1!==i&&t===n.AdType.rewarded&&setTimeout(function(){e.adManager.emit(n.AdEvents.AD_REWARDED)},100),setTimeout(function(){e.resumeGameplay()},200)},i.prototype.resumeGameplay=function(){this.adManager.emit(n.AdEvents.CONTENT_RESUMED)},i.prototype.preloadAd=function(t){void 0===t&&(t=n.AdType.interstitial)},i.prototype.destroyAd=function(){},i.prototype.hideAd=function(){},i.prototype.adAvailable=function(t){return!0},e.DummyProvider=i}.apply(e,i);void 0!==e&&(t.exports=e)},474:(t,e,i)=>{i=[i,e,i(12)],e=function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GameDistribution=e.GameDistributionAdType=void 0,(n=i=e.GameDistributionAdType||(e.GameDistributionAdType={})).interstitial="interstitial",n.rewarded="rewarded",n.display="display",s.prototype.setManager=function(t){this.adManager=t,this.adManager.emit(r.AdEvents.AD_PROVIDER_LOADED)},s.prototype.sdkLoaded=function(){this.adsEnabled=!0},s.prototype.showAd=function(t){var e=this;this.adsEnabled?void 0===window.gdsdk||window.gdsdk&&void 0===window.gdsdk.showAd?(this.adsEnabled=!1,this.adManager.emit(r.AdEvents.CONTENT_RESUMED)):window.gdsdk.showAd(t===r.AdType.rewarded?i.rewarded:i.interstitial).then(function(){t===r.AdType.rewarded&&(e.adManager.emit(r.AdEvents.AD_REWARDED),e.hasRewarded=!1),e.adManager.emit(r.AdEvents.CONTENT_RESUMED)}).catch(function(){t===r.AdType.rewarded&&e.hasRewarded&&(e.hasRewarded=!1),e.adManager.emit(r.AdEvents.CONTENT_RESUMED)}):this.adManager.emit(r.AdEvents.CONTENT_RESUMED)},s.prototype.preloadAd=function(t){var e=this;!this.hasRewarded&&this.adsEnabled&&t===r.AdType.rewarded&&window.gdsdk.preloadAd(i.rewarded).then(function(){e.hasRewarded=!0,e.adManager.emit(r.AdEvents.AD_LOADED,t)})},s.prototype.adAvailable=function(t){return t!==r.AdType.rewarded||this.hasRewarded},s.prototype.destroyAd=function(){},s.prototype.hideAd=function(){};var i,n=s;function s(t){var e,i,n=this;if(this.adsEnabled=!1,this.hasRewarded=!1,this.adShowing=!1,!t)throw new Error("Valid game id is not provided for GD Ad provider");window.GD_OPTIONS={gameId:t,advertisementSettings:{autoplay:!1},onEvent:function(t){switch(t.name){case"SDK_GAME_PAUSE":n.adManager.emit(r.AdEvents.CONTENT_PAUSED);break;case"SDK_READY":n.sdkLoaded()}}},t=document,e="gamedistribution-jssdk",i=t.getElementsByTagName("script")[0],t.getElementById(e)||((t=t.createElement("script")).id=e,t.src="./gamedistribution/js/main.min.js",i.parentNode&&i.parentNode.insertBefore(t,i))}e.GameDistribution=n}.apply(e,i);void 0!==e&&(t.exports=e)},444:(t,e,i)=>{i=[i,e,i(474),i(869)],e=function(t,e,i,n){"use strict";function r(){this.scaleFactor=1,this.offsetX=0,this.offsetY=0,this.element=document.createElement("div"),this.element.style.position="absolute",this.element.style.top="0px",this.element.style.left="0px",this.element.id="banner-".concat(Date.now()).concat(1e7*Math.random()|0),document.body.appendChild(this.element)}Object.defineProperty(e,"__esModule",{value:!0}),e.GameDistributionBanner=void 0,r.prototype.loadBanner=function(){return void 0===window.gdsdk?Promise.reject("GD Sdk not available, probably due to adblocker"):window.gdsdk.showAd(i.GameDistributionAdType.display,{containerId:this.element.id})},r.prototype.destroy=function(){document.body.removeChild(this.element),this.resizeListener&&window.removeEventListener("resize",this.resizeListener),delete this.element,delete this.parent,delete this.alignment},r.prototype.alignIn=function(t,e){var i=this;this.parent||(this.parent=t,this.alignment=e,this.resizeListener=function(){return i.resize()},window.addEventListener("resize",this.resizeListener),this.resize())},r.prototype.setOffset=function(t,e){void 0===e&&(e=0),this.offsetX=t=void 0===t?0:t,this.offsetY=e,this.resize()},r.prototype.resize=function(){if(this.parent){var t=this.parent.getBoundingClientRect();switch(this.alignment){case n.GameDistributionAlignment.TopLeft:this.position(t.left,t.top);break;case n.GameDistributionAlignment.TopCenter:this.position(t.left+t.width/2-this.width*this.scaleFactor/2,t.top);break;case n.GameDistributionAlignment.TopRight:this.position(t.left+t.width-this.width*this.scaleFactor,t.top);break;case n.GameDistributionAlignment.CenterLeft:this.position(t.left,t.top+t.height/2-this.height*this.scaleFactor/2);break;case n.GameDistributionAlignment.Center:this.position(t.left+t.width/2-this.width*this.scaleFactor/2,t.top+t.height/2-this.height*this.scaleFactor/2);break;case n.GameDistributionAlignment.CenterRight:this.position(t.left+t.width-this.width*this.scaleFactor,t.top+t.height/2-this.height*this.scaleFactor/2);break;case n.GameDistributionAlignment.BottomLeft:this.position(t.left,t.top+t.height-this.height*this.scaleFactor);break;case n.GameDistributionAlignment.BottomCenter:this.position(t.left+t.width/2-this.width*this.scaleFactor/2,t.top+t.height-this.height*this.scaleFactor);break;case n.GameDistributionAlignment.BottomRight:this.position(t.left+t.width-this.width*this.scaleFactor,t.top+t.height-this.height*this.scaleFactor)}}},r.prototype.setSize=function(t){var e,i;switch(t){default:case n.GameDistributionBannerSize.LargeRectangle:e=336,i=280;break;case n.GameDistributionBannerSize.MediumRectangle:e=300,i=250;break;case n.GameDistributionBannerSize.Billboard:e=970,i=250;break;case n.GameDistributionBannerSize.Leaderboard:e=728,i=90;break;case n.GameDistributionBannerSize.Skyscraper:e=120,i=600;break;case n.GameDistributionBannerSize.WideSkyscraper:e=160,i=600}this.width=e,this.height=i,this.element.style.width="".concat(e,"px"),this.element.style.height="".concat(i,"px")},r.prototype.position=function(t,e){this.element.style.left="".concat(t+this.offsetX,"px"),this.element.style.top="".concat(e+this.offsetY,"px")},r.prototype.scale=function(t){this.element.style.transformOrigin="left top",this.scaleFactor=t,this.element.style.transform="scale(".concat(t,")")},e.GameDistributionBanner=r}.apply(e,i);void 0!==e&&(t.exports=e)},654:(t,e,i)=>{i=[i,e,i(12)],e=function(t,e,n){"use strict";function i(t){var e,i,n,r=this;this.adsEnabled=!1,i=document,e="yandex-jssdk",n=i.getElementsByTagName("script")[0],i.getElementById(e)||((i=i.createElement("script")).addEventListener("load",function(){r.initialize()}),i.id=e,i.src="//yandex.ru/games/sdk/v2",n.parentNode.insertBefore(i,n)),e=document,i="gamedistribution-jssdk",n=e.getElementsByTagName("script")[0],e.getElementById(i)||((e=e.createElement("script")).id=i,e.src="./gamedistribution/js/main.min.js",n.parentNode.insertBefore(e,n))}Object.defineProperty(e,"__esModule",{value:!0}),e.YandexAdProvider=void 0,i.prototype.setManager=function(t){this.adManager=t},i.prototype.showAd=function(t){var e,i=this;void 0===t&&(t=n.AdType.interstitial),this.adsEnabled&&window.hasOwnProperty("_YaSDK")?t===n.AdType.interstitial&&null!=(e=null==(e=window._YaSDK)?void 0:e.adv)&&e.adOpened||(t===n.AdType.rewarded?null!=(e=null==(t=null==(e=window._YaSDK)?void 0:e.adv)?void 0:t.showRewardedVideo)&&e.call(t,{callbacks:{onOpen:function(){},onRewarded:function(){i.adManager.emit(n.AdEvents.AD_REWARDED)},onClose:function(){i.resumeGameplay()},onError:function(t){i.resumeGameplay()}}}):null!=(e=null==(t=null==(e=window._YaSDK)?void 0:e.adv)?void 0:t.showFullscreenAdv)&&e.call(t,{callbacks:{onClose:function(){i.resumeGameplay()},onError:function(){i.resumeGameplay()}}})):this.resumeGameplay()},i.prototype.initialize=function(){var e=this;window.YaGames.init().then(function(t){window._YaSDK=t,e.adsEnabled=!0})},i.prototype.resumeGameplay=function(){this.adManager.emit(n.AdEvents.CONTENT_RESUMED)},i.prototype.preloadAd=function(t){void 0===t&&(t=n.AdType.interstitial)},i.prototype.destroyAd=function(){},i.prototype.hideAd=function(){},i.prototype.adAvailable=function(t){return!0},e.YandexAdProvider=i}.apply(e,i);void 0!==e&&(t.exports=e)},563:(t,e,i)=>{i=[i,e,i(110),i(670),i(474),i(444),i(654)],e=function(t,e,i,n,r,s,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.YandexAdProvider=e.GameDistributionBanner=e.GameDistribution=e.DummyProvider=e.AdFreeUntrackedProvider=void 0,Object.defineProperty(e,"AdFreeUntrackedProvider",{enumerable:!0,get:function(){return i.AdFreeUntrackedProvider}}),Object.defineProperty(e,"DummyProvider",{enumerable:!0,get:function(){return n.DummyProvider}}),Object.defineProperty(e,"GameDistribution",{enumerable:!0,get:function(){return r.GameDistribution}}),Object.defineProperty(e,"GameDistributionBanner",{enumerable:!0,get:function(){return s.GameDistributionBanner}}),Object.defineProperty(e,"YandexAdProvider",{enumerable:!0,get:function(){return o.YandexAdProvider}})}.apply(e,i);void 0!==e&&(t.exports=e)},869:(t,e,i)=>{i=function(t,e){"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),e.GameDistributionAlignment=e.GameDistributionBannerSize=void 0,(i=e.GameDistributionBannerSize||(e.GameDistributionBannerSize={}))[i.LargeRectangle=0]="LargeRectangle",i[i.MediumRectangle=1]="MediumRectangle",i[i.Billboard=2]="Billboard",i[i.Leaderboard=3]="Leaderboard",i[i.Skyscraper=4]="Skyscraper",i[i.WideSkyscraper=5]="WideSkyscraper",(i=e.GameDistributionAlignment||(e.GameDistributionAlignment={}))[i.TopLeft=0]="TopLeft",i[i.TopCenter=1]="TopCenter",i[i.TopRight=2]="TopRight",i[i.CenterLeft=3]="CenterLeft",i[i.Center=4]="Center",i[i.CenterRight=5]="CenterRight",i[i.BottomLeft=6]="BottomLeft",i[i.BottomCenter=7]="BottomCenter",i[i.BottomRight=8]="BottomRight"}.apply(e,[i,e]);void 0!==i&&(t.exports=i)},498:(t,e,i)=>{i=[i,e,i(12),i(869)],e=function(t,e,i,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GameDistributionAlignment=e.GameDistributionBannerSize=e.ProviderTypes=e.AdType=e.AdEvents=void 0,Object.defineProperty(e,"AdEvents",{enumerable:!0,get:function(){return i.AdEvents}}),Object.defineProperty(e,"AdType",{enumerable:!0,get:function(){return i.AdType}}),Object.defineProperty(e,"ProviderTypes",{enumerable:!0,get:function(){return i.ProviderTypes}}),Object.defineProperty(e,"GameDistributionBannerSize",{enumerable:!0,get:function(){return n.GameDistributionBannerSize}}),Object.defineProperty(e,"GameDistributionAlignment",{enumerable:!0,get:function(){return n.GameDistributionAlignment}})}.apply(e,i);void 0!==e&&(t.exports=e)},12:(t,e,i)=>{i=function(t,e){"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),e.ProviderTypes=e.AdType=e.AdEvents=void 0,(i=e.AdEvents||(e.AdEvents={})).CONTENT_PAUSED="onContentPaused",i.CONTENT_RESUMED="onContentResumed",i.AD_PROGRESSION="onAdProgression",i.AD_DISABLED="onAdsDisabled",i.AD_CLICKED="onAdClicked",i.AD_REWARDED="onAdRewardGranted",i.BANNER_SHOWN="onBannerShown",i.BANNER_HIDDEN="onBannerHidden",i.AD_LOADED="onAdLoaded",i.AD_PROVIDER_LOADED="onAdProviderLoaded",(i=e.AdType||(e.AdType={}))[i.interstitial=0]="interstitial",i[i.rewarded=1]="rewarded",i[i.banner=2]="banner",(i=e.ProviderTypes||(e.ProviderTypes={})).Yandex="yx",i.Dummy="dm",i.AdFree="af",i.GD="gd",i.GDBanner="gdb"}.apply(e,[i,e]);void 0!==i&&(t.exports=i)},548:function(t,e,i){var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),h=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},i=[i,e,i(34),i(12),i(563)],e=function(t,e,i,n,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AdWrapper=void 0,i=h(i);s=i.default,a(o,s),o.prototype.showAd=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];if(null===this.provider)throw new Error("Can not request an ad without an provider, please attach an ad provider!");e.unshift(t),this.provider.showAd.apply(this.provider,e)},o.prototype.createBanner=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.provider.loadBanner.apply(this.provider,t)},o.prototype.loadBanner=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return"function"==typeof this.provider.loadBanner?this.provider.loadBanner.apply(this.provider,t):null},o.prototype.preloadAd=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];if(null===this.provider)throw new Error("Can not preload an ad without an provider, please attach an ad provider!");e.unshift(t),this.provider.preloadAd.apply(this.provider,e)},o.prototype.destroyAd=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];if(null===this.provider)throw new Error("Can not destroy an ad without an provider, please attach an ad provider!");e.unshift(t),this.provider.destroyAd.apply(this.provider,e)},o.prototype.hideAd=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];if(null===this.provider)throw new Error("Can not hide an ad without an provider, please attach an ad provider!");e.unshift(t),this.provider.hideAd.apply(this.provider,e)},o.prototype.adsEnabled=function(){if(null===this.provider)throw new Error("Can not hide an ad without an provider, please attach an ad provider!");return this.provider.adsEnabled},o.prototype.adAvailable=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];if(null===this.provider)throw new Error("Can not hide an ad without an provider, please attach an ad provider!");return e.unshift(t),this.provider.adAvailable.apply(this.provider,e)};var s,i=o;function o(t,e){var i=s.call(this)||this;switch(i.bannerActive=!1,i.provider=null,t){case n.ProviderTypes.AdFree:i.provider=new r.AdFreeUntrackedProvider;break;case n.ProviderTypes.Dummy:i.provider=new r.DummyProvider;break;case n.ProviderTypes.Yandex:i.provider=new r.YandexAdProvider;break;default:case n.ProviderTypes.GD:i.provider=new r.GameDistribution(e)}return i.provider.setManager(i),i}e.AdWrapper=i}.apply(e,i);void 0!==e&&(t.exports=e)}},r={};var t=function t(e){var i=r[e];return void 0===i&&(i=r[e]={exports:{}},n[e].call(i.exports,i,i.exports,t)),i.exports}(729);self.h5ads=t})(),(()=>{var i={666:(t,e,i)=>{"use strict";i.r(e),i.d(e,{default:()=>b});var e=i(402),e=i.n(e),n=i(352),n=i.n(n),r=i(393),r=i.n(r),s=new URL(i(214),i.b),o=new URL(i(349),i.b),a=new URL(i(204),i.b),h=new URL(i(931),i.b),l=new URL(i(486),i.b),c=new URL(i(609),i.b),u=new URL(i(469),i.b),d=new URL(i(819),i.b),p=new URL(i(144),i.b),f=new URL(i(217),i.b),g=new URL(i(956),i.b),m=new URL(i(740),i.b),y=new URL(i(460),i.b),v=new URL(i(175),i.b),x=new URL(i(647),i.b),i=new URL(i(692),i.b),n=n()(e()),e=r()(s),s=r()(o),o=r()(a),a=r()(h),h=r()(l),l=r()(c),c=r()(u),u=r()(d),d=r()(p),p=r()(f),f=r()(g),g=r()(m),m=r()(y),y=r()(v),v=r()(x),x=r()(i);n.push([t.id,'@charset "UTF-8";/*!\n * Bootstrap v5.1.3 (https://getbootstrap.com/)\n * Copyright 2011-2021 The Bootstrap Authors\n * Copyright 2011-2021 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n */:root{--bs-blue:#0d6efd;--bs-indigo:#6610f2;--bs-purple:#6f42c1;--bs-pink:#d63384;--bs-red:#dc3545;--bs-orange:#fd7e14;--bs-yellow:#ffc107;--bs-green:#198754;--bs-teal:#20c997;--bs-cyan:#0dcaf0;--bs-white:#fff;--bs-gray:#6c757d;--bs-gray-dark:#343a40;--bs-gray-100:#f8f9fa;--bs-gray-200:#e9ecef;--bs-gray-300:#dee2e6;--bs-gray-400:#ced4da;--bs-gray-500:#adb5bd;--bs-gray-600:#6c757d;--bs-gray-700:#495057;--bs-gray-800:#343a40;--bs-gray-900:#212529;--bs-primary:#0d6efd;--bs-secondary:#6c757d;--bs-success:#198754;--bs-info:#0dcaf0;--bs-warning:#ffc107;--bs-danger:#dc3545;--bs-light:#f8f9fa;--bs-dark:#212529;--bs-primary-rgb:13,110,253;--bs-secondary-rgb:108,117,125;--bs-success-rgb:25,135,84;--bs-info-rgb:13,202,240;--bs-warning-rgb:255,193,7;--bs-danger-rgb:220,53,69;--bs-light-rgb:248,249,250;--bs-dark-rgb:33,37,41;--bs-white-rgb:255,255,255;--bs-black-rgb:0,0,0;--bs-body-color-rgb:33,37,41;--bs-body-bg-rgb:255,255,255;--bs-font-sans-serif:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--bs-font-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--bs-gradient:linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));--bs-body-font-family:var(--bs-font-sans-serif);--bs-body-font-size:1rem;--bs-body-font-weight:400;--bs-body-line-height:1.5;--bs-body-color:#212529;--bs-body-bg:#fff}*,::after,::before{box-sizing:border-box}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}body{margin:0;font-family:var(--bs-body-font-family);font-size:var(--bs-body-font-size);font-weight:var(--bs-body-font-weight);line-height:var(--bs-body-line-height);color:var(--bs-body-color);text-align:var(--bs-body-text-align);background-color:var(--bs-body-bg);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}hr{margin:1rem 0;color:inherit;background-color:currentColor;border:0;opacity:.25}hr:not([size]){height:1px}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem;font-weight:500;line-height:1.2}.h1,h1{font-size:calc(1.375rem + 1.5vw)}@media (min-width:1200px){.h1,h1{font-size:2.5rem}}.h2,h2{font-size:calc(1.325rem + .9vw)}@media (min-width:1200px){.h2,h2{font-size:2rem}}.h3,h3{font-size:calc(1.3rem + .6vw)}@media (min-width:1200px){.h3,h3{font-size:1.75rem}}.h4,h4{font-size:calc(1.275rem + .3vw)}@media (min-width:1200px){.h4,h4{font-size:1.5rem}}.h5,h5{font-size:1.25rem}.h6,h6{font-size:1rem}p{margin-top:0;margin-bottom:1rem}abbr[data-bs-original-title],abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}ol,ul{padding-left:2rem}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}.small,small{font-size:.875em}.mark,mark{padding:.2em;background-color:#fcf8e3}sub,sup{position:relative;font-size:.75em;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#0d6efd;text-decoration:underline}a:hover{color:#0a58ca}a:not([href]):not([class]),a:not([href]):not([class]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:var(--bs-font-monospace);font-size:1em;direction:ltr;unicode-bidi:bidi-override}pre{display:block;margin-top:0;margin-bottom:1rem;overflow:auto;font-size:.875em}pre code{font-size:inherit;color:inherit;word-break:normal}code{font-size:.875em;color:#d63384;word-wrap:break-word}a>code{color:inherit}kbd{padding:.2rem .4rem;font-size:.875em;color:#fff;background-color:#212529;border-radius:.2rem}kbd kbd{padding:0;font-size:1em;font-weight:700}figure{margin:0 0 1rem}img,svg{vertical-align:middle}table{caption-side:bottom;border-collapse:collapse}caption{padding-top:.5rem;padding-bottom:.5rem;color:#6c757d;text-align:left}th{text-align:inherit;text-align:-webkit-match-parent}tbody,td,tfoot,th,thead,tr{border-color:inherit;border-style:solid;border-width:0}label{display:inline-block}button{border-radius:0}button:focus:not(:focus-visible){outline:0}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}select:disabled{opacity:1}[list]::-webkit-calendar-picker-indicator{display:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}::-moz-focus-inner{padding:0;border-style:none}textarea{resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{float:left;width:100%;padding:0;margin-bottom:.5rem;font-size:calc(1.275rem + .3vw);line-height:inherit}@media (min-width:1200px){legend{font-size:1.5rem}}legend+*{clear:left}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-fields-wrapper,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-text,::-webkit-datetime-edit-year-field{padding:0}::-webkit-inner-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:textfield}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-color-swatch-wrapper{padding:0}::-webkit-file-upload-button{font:inherit}::file-selector-button{font:inherit}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}iframe{border:0}summary{display:list-item;cursor:pointer}progress{vertical-align:baseline}[hidden]{display:none!important}.lead{font-size:1.25rem;font-weight:300}.display-1{font-size:calc(1.625rem + 4.5vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-1{font-size:5rem}}.display-2{font-size:calc(1.575rem + 3.9vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-2{font-size:4.5rem}}.display-3{font-size:calc(1.525rem + 3.3vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-3{font-size:4rem}}.display-4{font-size:calc(1.475rem + 2.7vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-4{font-size:3.5rem}}.display-5{font-size:calc(1.425rem + 2.1vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-5{font-size:3rem}}.display-6{font-size:calc(1.375rem + 1.5vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-6{font-size:2.5rem}}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none}.list-inline-item{display:inline-block}.list-inline-item:not(:last-child){margin-right:.5rem}.initialism{font-size:.875em;text-transform:uppercase}.blockquote{margin-bottom:1rem;font-size:1.25rem}.blockquote>:last-child{margin-bottom:0}.blockquote-footer{margin-top:-1rem;margin-bottom:1rem;font-size:.875em;color:#6c757d}.blockquote-footer::before{content:"— "}.img-fluid{max-width:100%;height:auto}.img-thumbnail{padding:.25rem;background-color:#fff;border:1px solid #dee2e6;border-radius:.25rem;max-width:100%;height:auto}.figure{display:inline-block}.figure-img{margin-bottom:.5rem;line-height:1}.figure-caption{font-size:.875em;color:#6c757d}.container,.container-fluid,.container-lg,.container-md,.container-sm,.container-xl,.container-xxl{width:100%;padding-right:var(--bs-gutter-x,.75rem);padding-left:var(--bs-gutter-x,.75rem);margin-right:auto;margin-left:auto}@media (min-width:576px){.container,.container-sm{max-width:540px}}@media (min-width:768px){.container,.container-md,.container-sm{max-width:720px}}@media (min-width:992px){.container,.container-lg,.container-md,.container-sm{max-width:960px}}@media (min-width:1200px){.container,.container-lg,.container-md,.container-sm,.container-xl{max-width:1140px}}@media (min-width:1400px){.container,.container-lg,.container-md,.container-sm,.container-xl,.container-xxl{max-width:1320px}}.row{--bs-gutter-x:1.5rem;--bs-gutter-y:0;display:flex;flex-wrap:wrap;margin-top:calc(-1 * var(--bs-gutter-y));margin-right:calc(-.5 * var(--bs-gutter-x));margin-left:calc(-.5 * var(--bs-gutter-x))}.row>*{flex-shrink:0;width:100%;max-width:100%;padding-right:calc(var(--bs-gutter-x) * .5);padding-left:calc(var(--bs-gutter-x) * .5);margin-top:var(--bs-gutter-y)}.col{flex:1 0 0%}.row-cols-auto>*{flex:0 0 auto;width:auto}.row-cols-1>*{flex:0 0 auto;width:100%}.row-cols-2>*{flex:0 0 auto;width:50%}.row-cols-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-4>*{flex:0 0 auto;width:25%}.row-cols-5>*{flex:0 0 auto;width:20%}.row-cols-6>*{flex:0 0 auto;width:16.6666666667%}.col-auto{flex:0 0 auto;width:auto}.col-1{flex:0 0 auto;width:8.33333333%}.col-2{flex:0 0 auto;width:16.66666667%}.col-3{flex:0 0 auto;width:25%}.col-4{flex:0 0 auto;width:33.33333333%}.col-5{flex:0 0 auto;width:41.66666667%}.col-6{flex:0 0 auto;width:50%}.col-7{flex:0 0 auto;width:58.33333333%}.col-8{flex:0 0 auto;width:66.66666667%}.col-9{flex:0 0 auto;width:75%}.col-10{flex:0 0 auto;width:83.33333333%}.col-11{flex:0 0 auto;width:91.66666667%}.col-12{flex:0 0 auto;width:100%}.offset-1{margin-left:8.33333333%}.offset-2{margin-left:16.66666667%}.offset-3{margin-left:25%}.offset-4{margin-left:33.33333333%}.offset-5{margin-left:41.66666667%}.offset-6{margin-left:50%}.offset-7{margin-left:58.33333333%}.offset-8{margin-left:66.66666667%}.offset-9{margin-left:75%}.offset-10{margin-left:83.33333333%}.offset-11{margin-left:91.66666667%}.g-0,.gx-0{--bs-gutter-x:0}.g-0,.gy-0{--bs-gutter-y:0}.g-1,.gx-1{--bs-gutter-x:0.25rem}.g-1,.gy-1{--bs-gutter-y:0.25rem}.g-2,.gx-2{--bs-gutter-x:0.5rem}.g-2,.gy-2{--bs-gutter-y:0.5rem}.g-3,.gx-3{--bs-gutter-x:1rem}.g-3,.gy-3{--bs-gutter-y:1rem}.g-4,.gx-4{--bs-gutter-x:1.5rem}.g-4,.gy-4{--bs-gutter-y:1.5rem}.g-5,.gx-5{--bs-gutter-x:3rem}.g-5,.gy-5{--bs-gutter-y:3rem}@media (min-width:576px){.col-sm{flex:1 0 0%}.row-cols-sm-auto>*{flex:0 0 auto;width:auto}.row-cols-sm-1>*{flex:0 0 auto;width:100%}.row-cols-sm-2>*{flex:0 0 auto;width:50%}.row-cols-sm-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-sm-4>*{flex:0 0 auto;width:25%}.row-cols-sm-5>*{flex:0 0 auto;width:20%}.row-cols-sm-6>*{flex:0 0 auto;width:16.6666666667%}.col-sm-auto{flex:0 0 auto;width:auto}.col-sm-1{flex:0 0 auto;width:8.33333333%}.col-sm-2{flex:0 0 auto;width:16.66666667%}.col-sm-3{flex:0 0 auto;width:25%}.col-sm-4{flex:0 0 auto;width:33.33333333%}.col-sm-5{flex:0 0 auto;width:41.66666667%}.col-sm-6{flex:0 0 auto;width:50%}.col-sm-7{flex:0 0 auto;width:58.33333333%}.col-sm-8{flex:0 0 auto;width:66.66666667%}.col-sm-9{flex:0 0 auto;width:75%}.col-sm-10{flex:0 0 auto;width:83.33333333%}.col-sm-11{flex:0 0 auto;width:91.66666667%}.col-sm-12{flex:0 0 auto;width:100%}.offset-sm-0{margin-left:0}.offset-sm-1{margin-left:8.33333333%}.offset-sm-2{margin-left:16.66666667%}.offset-sm-3{margin-left:25%}.offset-sm-4{margin-left:33.33333333%}.offset-sm-5{margin-left:41.66666667%}.offset-sm-6{margin-left:50%}.offset-sm-7{margin-left:58.33333333%}.offset-sm-8{margin-left:66.66666667%}.offset-sm-9{margin-left:75%}.offset-sm-10{margin-left:83.33333333%}.offset-sm-11{margin-left:91.66666667%}.g-sm-0,.gx-sm-0{--bs-gutter-x:0}.g-sm-0,.gy-sm-0{--bs-gutter-y:0}.g-sm-1,.gx-sm-1{--bs-gutter-x:0.25rem}.g-sm-1,.gy-sm-1{--bs-gutter-y:0.25rem}.g-sm-2,.gx-sm-2{--bs-gutter-x:0.5rem}.g-sm-2,.gy-sm-2{--bs-gutter-y:0.5rem}.g-sm-3,.gx-sm-3{--bs-gutter-x:1rem}.g-sm-3,.gy-sm-3{--bs-gutter-y:1rem}.g-sm-4,.gx-sm-4{--bs-gutter-x:1.5rem}.g-sm-4,.gy-sm-4{--bs-gutter-y:1.5rem}.g-sm-5,.gx-sm-5{--bs-gutter-x:3rem}.g-sm-5,.gy-sm-5{--bs-gutter-y:3rem}}@media (min-width:768px){.col-md{flex:1 0 0%}.row-cols-md-auto>*{flex:0 0 auto;width:auto}.row-cols-md-1>*{flex:0 0 auto;width:100%}.row-cols-md-2>*{flex:0 0 auto;width:50%}.row-cols-md-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-md-4>*{flex:0 0 auto;width:25%}.row-cols-md-5>*{flex:0 0 auto;width:20%}.row-cols-md-6>*{flex:0 0 auto;width:16.6666666667%}.col-md-auto{flex:0 0 auto;width:auto}.col-md-1{flex:0 0 auto;width:8.33333333%}.col-md-2{flex:0 0 auto;width:16.66666667%}.col-md-3{flex:0 0 auto;width:25%}.col-md-4{flex:0 0 auto;width:33.33333333%}.col-md-5{flex:0 0 auto;width:41.66666667%}.col-md-6{flex:0 0 auto;width:50%}.col-md-7{flex:0 0 auto;width:58.33333333%}.col-md-8{flex:0 0 auto;width:66.66666667%}.col-md-9{flex:0 0 auto;width:75%}.col-md-10{flex:0 0 auto;width:83.33333333%}.col-md-11{flex:0 0 auto;width:91.66666667%}.col-md-12{flex:0 0 auto;width:100%}.offset-md-0{margin-left:0}.offset-md-1{margin-left:8.33333333%}.offset-md-2{margin-left:16.66666667%}.offset-md-3{margin-left:25%}.offset-md-4{margin-left:33.33333333%}.offset-md-5{margin-left:41.66666667%}.offset-md-6{margin-left:50%}.offset-md-7{margin-left:58.33333333%}.offset-md-8{margin-left:66.66666667%}.offset-md-9{margin-left:75%}.offset-md-10{margin-left:83.33333333%}.offset-md-11{margin-left:91.66666667%}.g-md-0,.gx-md-0{--bs-gutter-x:0}.g-md-0,.gy-md-0{--bs-gutter-y:0}.g-md-1,.gx-md-1{--bs-gutter-x:0.25rem}.g-md-1,.gy-md-1{--bs-gutter-y:0.25rem}.g-md-2,.gx-md-2{--bs-gutter-x:0.5rem}.g-md-2,.gy-md-2{--bs-gutter-y:0.5rem}.g-md-3,.gx-md-3{--bs-gutter-x:1rem}.g-md-3,.gy-md-3{--bs-gutter-y:1rem}.g-md-4,.gx-md-4{--bs-gutter-x:1.5rem}.g-md-4,.gy-md-4{--bs-gutter-y:1.5rem}.g-md-5,.gx-md-5{--bs-gutter-x:3rem}.g-md-5,.gy-md-5{--bs-gutter-y:3rem}}@media (min-width:992px){.col-lg{flex:1 0 0%}.row-cols-lg-auto>*{flex:0 0 auto;width:auto}.row-cols-lg-1>*{flex:0 0 auto;width:100%}.row-cols-lg-2>*{flex:0 0 auto;width:50%}.row-cols-lg-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-lg-4>*{flex:0 0 auto;width:25%}.row-cols-lg-5>*{flex:0 0 auto;width:20%}.row-cols-lg-6>*{flex:0 0 auto;width:16.6666666667%}.col-lg-auto{flex:0 0 auto;width:auto}.col-lg-1{flex:0 0 auto;width:8.33333333%}.col-lg-2{flex:0 0 auto;width:16.66666667%}.col-lg-3{flex:0 0 auto;width:25%}.col-lg-4{flex:0 0 auto;width:33.33333333%}.col-lg-5{flex:0 0 auto;width:41.66666667%}.col-lg-6{flex:0 0 auto;width:50%}.col-lg-7{flex:0 0 auto;width:58.33333333%}.col-lg-8{flex:0 0 auto;width:66.66666667%}.col-lg-9{flex:0 0 auto;width:75%}.col-lg-10{flex:0 0 auto;width:83.33333333%}.col-lg-11{flex:0 0 auto;width:91.66666667%}.col-lg-12{flex:0 0 auto;width:100%}.offset-lg-0{margin-left:0}.offset-lg-1{margin-left:8.33333333%}.offset-lg-2{margin-left:16.66666667%}.offset-lg-3{margin-left:25%}.offset-lg-4{margin-left:33.33333333%}.offset-lg-5{margin-left:41.66666667%}.offset-lg-6{margin-left:50%}.offset-lg-7{margin-left:58.33333333%}.offset-lg-8{margin-left:66.66666667%}.offset-lg-9{margin-left:75%}.offset-lg-10{margin-left:83.33333333%}.offset-lg-11{margin-left:91.66666667%}.g-lg-0,.gx-lg-0{--bs-gutter-x:0}.g-lg-0,.gy-lg-0{--bs-gutter-y:0}.g-lg-1,.gx-lg-1{--bs-gutter-x:0.25rem}.g-lg-1,.gy-lg-1{--bs-gutter-y:0.25rem}.g-lg-2,.gx-lg-2{--bs-gutter-x:0.5rem}.g-lg-2,.gy-lg-2{--bs-gutter-y:0.5rem}.g-lg-3,.gx-lg-3{--bs-gutter-x:1rem}.g-lg-3,.gy-lg-3{--bs-gutter-y:1rem}.g-lg-4,.gx-lg-4{--bs-gutter-x:1.5rem}.g-lg-4,.gy-lg-4{--bs-gutter-y:1.5rem}.g-lg-5,.gx-lg-5{--bs-gutter-x:3rem}.g-lg-5,.gy-lg-5{--bs-gutter-y:3rem}}@media (min-width:1200px){.col-xl{flex:1 0 0%}.row-cols-xl-auto>*{flex:0 0 auto;width:auto}.row-cols-xl-1>*{flex:0 0 auto;width:100%}.row-cols-xl-2>*{flex:0 0 auto;width:50%}.row-cols-xl-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-xl-4>*{flex:0 0 auto;width:25%}.row-cols-xl-5>*{flex:0 0 auto;width:20%}.row-cols-xl-6>*{flex:0 0 auto;width:16.6666666667%}.col-xl-auto{flex:0 0 auto;width:auto}.col-xl-1{flex:0 0 auto;width:8.33333333%}.col-xl-2{flex:0 0 auto;width:16.66666667%}.col-xl-3{flex:0 0 auto;width:25%}.col-xl-4{flex:0 0 auto;width:33.33333333%}.col-xl-5{flex:0 0 auto;width:41.66666667%}.col-xl-6{flex:0 0 auto;width:50%}.col-xl-7{flex:0 0 auto;width:58.33333333%}.col-xl-8{flex:0 0 auto;width:66.66666667%}.col-xl-9{flex:0 0 auto;width:75%}.col-xl-10{flex:0 0 auto;width:83.33333333%}.col-xl-11{flex:0 0 auto;width:91.66666667%}.col-xl-12{flex:0 0 auto;width:100%}.offset-xl-0{margin-left:0}.offset-xl-1{margin-left:8.33333333%}.offset-xl-2{margin-left:16.66666667%}.offset-xl-3{margin-left:25%}.offset-xl-4{margin-left:33.33333333%}.offset-xl-5{margin-left:41.66666667%}.offset-xl-6{margin-left:50%}.offset-xl-7{margin-left:58.33333333%}.offset-xl-8{margin-left:66.66666667%}.offset-xl-9{margin-left:75%}.offset-xl-10{margin-left:83.33333333%}.offset-xl-11{margin-left:91.66666667%}.g-xl-0,.gx-xl-0{--bs-gutter-x:0}.g-xl-0,.gy-xl-0{--bs-gutter-y:0}.g-xl-1,.gx-xl-1{--bs-gutter-x:0.25rem}.g-xl-1,.gy-xl-1{--bs-gutter-y:0.25rem}.g-xl-2,.gx-xl-2{--bs-gutter-x:0.5rem}.g-xl-2,.gy-xl-2{--bs-gutter-y:0.5rem}.g-xl-3,.gx-xl-3{--bs-gutter-x:1rem}.g-xl-3,.gy-xl-3{--bs-gutter-y:1rem}.g-xl-4,.gx-xl-4{--bs-gutter-x:1.5rem}.g-xl-4,.gy-xl-4{--bs-gutter-y:1.5rem}.g-xl-5,.gx-xl-5{--bs-gutter-x:3rem}.g-xl-5,.gy-xl-5{--bs-gutter-y:3rem}}@media (min-width:1400px){.col-xxl{flex:1 0 0%}.row-cols-xxl-auto>*{flex:0 0 auto;width:auto}.row-cols-xxl-1>*{flex:0 0 auto;width:100%}.row-cols-xxl-2>*{flex:0 0 auto;width:50%}.row-cols-xxl-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-xxl-4>*{flex:0 0 auto;width:25%}.row-cols-xxl-5>*{flex:0 0 auto;width:20%}.row-cols-xxl-6>*{flex:0 0 auto;width:16.6666666667%}.col-xxl-auto{flex:0 0 auto;width:auto}.col-xxl-1{flex:0 0 auto;width:8.33333333%}.col-xxl-2{flex:0 0 auto;width:16.66666667%}.col-xxl-3{flex:0 0 auto;width:25%}.col-xxl-4{flex:0 0 auto;width:33.33333333%}.col-xxl-5{flex:0 0 auto;width:41.66666667%}.col-xxl-6{flex:0 0 auto;width:50%}.col-xxl-7{flex:0 0 auto;width:58.33333333%}.col-xxl-8{flex:0 0 auto;width:66.66666667%}.col-xxl-9{flex:0 0 auto;width:75%}.col-xxl-10{flex:0 0 auto;width:83.33333333%}.col-xxl-11{flex:0 0 auto;width:91.66666667%}.col-xxl-12{flex:0 0 auto;width:100%}.offset-xxl-0{margin-left:0}.offset-xxl-1{margin-left:8.33333333%}.offset-xxl-2{margin-left:16.66666667%}.offset-xxl-3{margin-left:25%}.offset-xxl-4{margin-left:33.33333333%}.offset-xxl-5{margin-left:41.66666667%}.offset-xxl-6{margin-left:50%}.offset-xxl-7{margin-left:58.33333333%}.offset-xxl-8{margin-left:66.66666667%}.offset-xxl-9{margin-left:75%}.offset-xxl-10{margin-left:83.33333333%}.offset-xxl-11{margin-left:91.66666667%}.g-xxl-0,.gx-xxl-0{--bs-gutter-x:0}.g-xxl-0,.gy-xxl-0{--bs-gutter-y:0}.g-xxl-1,.gx-xxl-1{--bs-gutter-x:0.25rem}.g-xxl-1,.gy-xxl-1{--bs-gutter-y:0.25rem}.g-xxl-2,.gx-xxl-2{--bs-gutter-x:0.5rem}.g-xxl-2,.gy-xxl-2{--bs-gutter-y:0.5rem}.g-xxl-3,.gx-xxl-3{--bs-gutter-x:1rem}.g-xxl-3,.gy-xxl-3{--bs-gutter-y:1rem}.g-xxl-4,.gx-xxl-4{--bs-gutter-x:1.5rem}.g-xxl-4,.gy-xxl-4{--bs-gutter-y:1.5rem}.g-xxl-5,.gx-xxl-5{--bs-gutter-x:3rem}.g-xxl-5,.gy-xxl-5{--bs-gutter-y:3rem}}.table{--bs-table-bg:transparent;--bs-table-accent-bg:transparent;--bs-table-striped-color:#212529;--bs-table-striped-bg:rgba(0, 0, 0, 0.05);--bs-table-active-color:#212529;--bs-table-active-bg:rgba(0, 0, 0, 0.1);--bs-table-hover-color:#212529;--bs-table-hover-bg:rgba(0, 0, 0, 0.075);width:100%;margin-bottom:1rem;color:#212529;vertical-align:top;border-color:#dee2e6}.table>:not(caption)>*>*{padding:.5rem .5rem;background-color:var(--bs-table-bg);border-bottom-width:1px;box-shadow:inset 0 0 0 9999px var(--bs-table-accent-bg)}.table>tbody{vertical-align:inherit}.table>thead{vertical-align:bottom}.table>:not(:first-child){border-top:2px solid currentColor}.caption-top{caption-side:top}.table-sm>:not(caption)>*>*{padding:.25rem .25rem}.table-bordered>:not(caption)>*{border-width:1px 0}.table-bordered>:not(caption)>*>*{border-width:0 1px}.table-borderless>:not(caption)>*>*{border-bottom-width:0}.table-borderless>:not(:first-child){border-top-width:0}.table-striped>tbody>tr:nth-of-type(odd)>*{--bs-table-accent-bg:var(--bs-table-striped-bg);color:var(--bs-table-striped-color)}.table-active{--bs-table-accent-bg:var(--bs-table-active-bg);color:var(--bs-table-active-color)}.table-hover>tbody>tr:hover>*{--bs-table-accent-bg:var(--bs-table-hover-bg);color:var(--bs-table-hover-color)}.table-primary{--bs-table-bg:#cfe2ff;--bs-table-striped-bg:#c5d7f2;--bs-table-striped-color:#000;--bs-table-active-bg:#bacbe6;--bs-table-active-color:#000;--bs-table-hover-bg:#bfd1ec;--bs-table-hover-color:#000;color:#000;border-color:#bacbe6}.table-secondary{--bs-table-bg:#e2e3e5;--bs-table-striped-bg:#d7d8da;--bs-table-striped-color:#000;--bs-table-active-bg:#cbccce;--bs-table-active-color:#000;--bs-table-hover-bg:#d1d2d4;--bs-table-hover-color:#000;color:#000;border-color:#cbccce}.table-success{--bs-table-bg:#d1e7dd;--bs-table-striped-bg:#c7dbd2;--bs-table-striped-color:#000;--bs-table-active-bg:#bcd0c7;--bs-table-active-color:#000;--bs-table-hover-bg:#c1d6cc;--bs-table-hover-color:#000;color:#000;border-color:#bcd0c7}.table-info{--bs-table-bg:#cff4fc;--bs-table-striped-bg:#c5e8ef;--bs-table-striped-color:#000;--bs-table-active-bg:#badce3;--bs-table-active-color:#000;--bs-table-hover-bg:#bfe2e9;--bs-table-hover-color:#000;color:#000;border-color:#badce3}.table-warning{--bs-table-bg:#fff3cd;--bs-table-striped-bg:#f2e7c3;--bs-table-striped-color:#000;--bs-table-active-bg:#e6dbb9;--bs-table-active-color:#000;--bs-table-hover-bg:#ece1be;--bs-table-hover-color:#000;color:#000;border-color:#e6dbb9}.table-danger{--bs-table-bg:#f8d7da;--bs-table-striped-bg:#eccccf;--bs-table-striped-color:#000;--bs-table-active-bg:#dfc2c4;--bs-table-active-color:#000;--bs-table-hover-bg:#e5c7ca;--bs-table-hover-color:#000;color:#000;border-color:#dfc2c4}.table-light{--bs-table-bg:#f8f9fa;--bs-table-striped-bg:#ecedee;--bs-table-striped-color:#000;--bs-table-active-bg:#dfe0e1;--bs-table-active-color:#000;--bs-table-hover-bg:#e5e6e7;--bs-table-hover-color:#000;color:#000;border-color:#dfe0e1}.table-dark{--bs-table-bg:#212529;--bs-table-striped-bg:#2c3034;--bs-table-striped-color:#fff;--bs-table-active-bg:#373b3e;--bs-table-active-color:#fff;--bs-table-hover-bg:#323539;--bs-table-hover-color:#fff;color:#fff;border-color:#373b3e}.table-responsive{overflow-x:auto;-webkit-overflow-scrolling:touch}@media (max-width:575.98px){.table-responsive-sm{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media (max-width:767.98px){.table-responsive-md{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media (max-width:991.98px){.table-responsive-lg{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media (max-width:1199.98px){.table-responsive-xl{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media (max-width:1399.98px){.table-responsive-xxl{overflow-x:auto;-webkit-overflow-scrolling:touch}}.form-label{margin-bottom:.5rem}.col-form-label{padding-top:calc(.375rem + 1px);padding-bottom:calc(.375rem + 1px);margin-bottom:0;font-size:inherit;line-height:1.5}.col-form-label-lg{padding-top:calc(.5rem + 1px);padding-bottom:calc(.5rem + 1px);font-size:1.25rem}.col-form-label-sm{padding-top:calc(.25rem + 1px);padding-bottom:calc(.25rem + 1px);font-size:.875rem}.form-text{margin-top:.25rem;font-size:.875em;color:#6c757d}.form-control{display:block;width:100%;padding:.375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#212529;background-color:#fff;background-clip:padding-box;border:1px solid #ced4da;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:.25rem;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-control{transition:none}}.form-control[type=file]{overflow:hidden}.form-control[type=file]:not(:disabled):not([readonly]){cursor:pointer}.form-control:focus{color:#212529;background-color:#fff;border-color:#86b7fe;outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.form-control::-webkit-date-and-time-value{height:1.5em}.form-control::-moz-placeholder{color:#6c757d;opacity:1}.form-control::placeholder{color:#6c757d;opacity:1}.form-control:disabled,.form-control[readonly]{background-color:#e9ecef;opacity:1}.form-control::-webkit-file-upload-button{padding:.375rem .75rem;margin:-.375rem -.75rem;-webkit-margin-end:.75rem;margin-inline-end:.75rem;color:#212529;background-color:#e9ecef;pointer-events:none;border-color:inherit;border-style:solid;border-width:0;border-inline-end-width:1px;border-radius:0;-webkit-transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}.form-control::file-selector-button{padding:.375rem .75rem;margin:-.375rem -.75rem;-webkit-margin-end:.75rem;margin-inline-end:.75rem;color:#212529;background-color:#e9ecef;pointer-events:none;border-color:inherit;border-style:solid;border-width:0;border-inline-end-width:1px;border-radius:0;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-control::-webkit-file-upload-button{-webkit-transition:none;transition:none}.form-control::file-selector-button{transition:none}}.form-control:hover:not(:disabled):not([readonly])::-webkit-file-upload-button{background-color:#dde0e3}.form-control:hover:not(:disabled):not([readonly])::file-selector-button{background-color:#dde0e3}.form-control::-webkit-file-upload-button{padding:.375rem .75rem;margin:-.375rem -.75rem;-webkit-margin-end:.75rem;margin-inline-end:.75rem;color:#212529;background-color:#e9ecef;pointer-events:none;border-color:inherit;border-style:solid;border-width:0;border-inline-end-width:1px;border-radius:0;-webkit-transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-control::-webkit-file-upload-button{-webkit-transition:none;transition:none}}.form-control:hover:not(:disabled):not([readonly])::-webkit-file-upload-button{background-color:#dde0e3}.form-control-plaintext{display:block;width:100%;padding:.375rem 0;margin-bottom:0;line-height:1.5;color:#212529;background-color:transparent;border:solid transparent;border-width:1px 0}.form-control-plaintext.form-control-lg,.form-control-plaintext.form-control-sm{padding-right:0;padding-left:0}.form-control-sm{min-height:calc(1.5em + .5rem + 2px);padding:.25rem .5rem;font-size:.875rem;border-radius:.2rem}.form-control-sm::-webkit-file-upload-button{padding:.25rem .5rem;margin:-.25rem -.5rem;-webkit-margin-end:.5rem;margin-inline-end:.5rem}.form-control-sm::file-selector-button{padding:.25rem .5rem;margin:-.25rem -.5rem;-webkit-margin-end:.5rem;margin-inline-end:.5rem}.form-control-sm::-webkit-file-upload-button{padding:.25rem .5rem;margin:-.25rem -.5rem;-webkit-margin-end:.5rem;margin-inline-end:.5rem}.form-control-lg{min-height:calc(1.5em + 1rem + 2px);padding:.5rem 1rem;font-size:1.25rem;border-radius:.3rem}.form-control-lg::-webkit-file-upload-button{padding:.5rem 1rem;margin:-.5rem -1rem;-webkit-margin-end:1rem;margin-inline-end:1rem}.form-control-lg::file-selector-button{padding:.5rem 1rem;margin:-.5rem -1rem;-webkit-margin-end:1rem;margin-inline-end:1rem}.form-control-lg::-webkit-file-upload-button{padding:.5rem 1rem;margin:-.5rem -1rem;-webkit-margin-end:1rem;margin-inline-end:1rem}textarea.form-control{min-height:calc(1.5em + .75rem + 2px)}textarea.form-control-sm{min-height:calc(1.5em + .5rem + 2px)}textarea.form-control-lg{min-height:calc(1.5em + 1rem + 2px)}.form-control-color{width:3rem;height:auto;padding:.375rem}.form-control-color:not(:disabled):not([readonly]){cursor:pointer}.form-control-color::-moz-color-swatch{height:1.5em;border-radius:.25rem}.form-control-color::-webkit-color-swatch{height:1.5em;border-radius:.25rem}.form-select{display:block;width:100%;padding:.375rem 2.25rem .375rem .75rem;-moz-padding-start:calc(0.75rem - 3px);font-size:1rem;font-weight:400;line-height:1.5;color:#212529;background-color:#fff;background-image:url('+e+');background-repeat:no-repeat;background-position:right .75rem center;background-size:16px 12px;border:1px solid #ced4da;border-radius:.25rem;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out;-webkit-appearance:none;-moz-appearance:none;appearance:none}@media (prefers-reduced-motion:reduce){.form-select{transition:none}}.form-select:focus{border-color:#86b7fe;outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.form-select[multiple],.form-select[size]:not([size="1"]){padding-right:.75rem;background-image:none}.form-select:disabled{background-color:#e9ecef}.form-select:-moz-focusring{color:transparent;text-shadow:0 0 0 #212529}.form-select-sm{padding-top:.25rem;padding-bottom:.25rem;padding-left:.5rem;font-size:.875rem;border-radius:.2rem}.form-select-lg{padding-top:.5rem;padding-bottom:.5rem;padding-left:1rem;font-size:1.25rem;border-radius:.3rem}.form-check{display:block;min-height:1.5rem;padding-left:1.5em;margin-bottom:.125rem}.form-check .form-check-input{float:left;margin-left:-1.5em}.form-check-input{width:1em;height:1em;margin-top:.25em;vertical-align:top;background-color:#fff;background-repeat:no-repeat;background-position:center;background-size:contain;border:1px solid rgba(0,0,0,.25);-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-print-color-adjust:exact;color-adjust:exact}.form-check-input[type=checkbox]{border-radius:.25em}.form-check-input[type=radio]{border-radius:50%}.form-check-input:active{filter:brightness(90%)}.form-check-input:focus{border-color:#86b7fe;outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.form-check-input:checked{background-color:#0d6efd;border-color:#0d6efd}.form-check-input:checked[type=checkbox]{background-image:url('+s+")}.form-check-input:checked[type=radio]{background-image:url("+o+")}.form-check-input[type=checkbox]:indeterminate{background-color:#0d6efd;border-color:#0d6efd;background-image:url("+a+")}.form-check-input:disabled{pointer-events:none;filter:none;opacity:.5}.form-check-input:disabled~.form-check-label,.form-check-input[disabled]~.form-check-label{opacity:.5}.form-switch{padding-left:2.5em}.form-switch .form-check-input{width:2em;margin-left:-2.5em;background-image:url("+h+");background-position:left center;border-radius:2em;transition:background-position .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-switch .form-check-input{transition:none}}.form-switch .form-check-input:focus{background-image:url("+l+")}.form-switch .form-check-input:checked{background-position:right center;background-image:url("+c+")}.form-check-inline{display:inline-block;margin-right:1rem}.btn-check{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.btn-check:disabled+.btn,.btn-check[disabled]+.btn{pointer-events:none;filter:none;opacity:.65}.form-range{width:100%;height:1.5rem;padding:0;background-color:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none}.form-range:focus{outline:0}.form-range:focus::-webkit-slider-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .25rem rgba(13,110,253,.25)}.form-range:focus::-moz-range-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .25rem rgba(13,110,253,.25)}.form-range::-moz-focus-outer{border:0}.form-range::-webkit-slider-thumb{width:1rem;height:1rem;margin-top:-.25rem;background-color:#0d6efd;border:0;border-radius:1rem;-webkit-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;-webkit-appearance:none;appearance:none}@media (prefers-reduced-motion:reduce){.form-range::-webkit-slider-thumb{-webkit-transition:none;transition:none}}.form-range::-webkit-slider-thumb:active{background-color:#b6d4fe}.form-range::-webkit-slider-runnable-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:#dee2e6;border-color:transparent;border-radius:1rem}.form-range::-moz-range-thumb{width:1rem;height:1rem;background-color:#0d6efd;border:0;border-radius:1rem;-moz-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;-moz-appearance:none;appearance:none}@media (prefers-reduced-motion:reduce){.form-range::-moz-range-thumb{-moz-transition:none;transition:none}}.form-range::-moz-range-thumb:active{background-color:#b6d4fe}.form-range::-moz-range-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:#dee2e6;border-color:transparent;border-radius:1rem}.form-range:disabled{pointer-events:none}.form-range:disabled::-webkit-slider-thumb{background-color:#adb5bd}.form-range:disabled::-moz-range-thumb{background-color:#adb5bd}.form-floating{position:relative}.form-floating>.form-control,.form-floating>.form-select{height:calc(3.5rem + 2px);line-height:1.25}.form-floating>label{position:absolute;top:0;left:0;height:100%;padding:1rem .75rem;pointer-events:none;border:1px solid transparent;transform-origin:0 0;transition:opacity .1s ease-in-out,transform .1s ease-in-out}@media (prefers-reduced-motion:reduce){.form-floating>label{transition:none}}.form-floating>.form-control{padding:1rem .75rem}.form-floating>.form-control::-moz-placeholder{color:transparent}.form-floating>.form-control::placeholder{color:transparent}.form-floating>.form-control:not(:-moz-placeholder-shown){padding-top:1.625rem;padding-bottom:.625rem}.form-floating>.form-control:focus,.form-floating>.form-control:not(:placeholder-shown){padding-top:1.625rem;padding-bottom:.625rem}.form-floating>.form-control:-webkit-autofill{padding-top:1.625rem;padding-bottom:.625rem}.form-floating>.form-select{padding-top:1.625rem;padding-bottom:.625rem}.form-floating>.form-control:not(:-moz-placeholder-shown)~label{opacity:.65;transform:scale(.85) translateY(-.5rem) translateX(.15rem)}.form-floating>.form-control:focus~label,.form-floating>.form-control:not(:placeholder-shown)~label,.form-floating>.form-select~label{opacity:.65;transform:scale(.85) translateY(-.5rem) translateX(.15rem)}.form-floating>.form-control:-webkit-autofill~label{opacity:.65;transform:scale(.85) translateY(-.5rem) translateX(.15rem)}.input-group{position:relative;display:flex;flex-wrap:wrap;align-items:stretch;width:100%}.input-group>.form-control,.input-group>.form-select{position:relative;flex:1 1 auto;width:1%;min-width:0}.input-group>.form-control:focus,.input-group>.form-select:focus{z-index:3}.input-group .btn{position:relative;z-index:2}.input-group .btn:focus{z-index:3}.input-group-text{display:flex;align-items:center;padding:.375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:center;white-space:nowrap;background-color:#e9ecef;border:1px solid #ced4da;border-radius:.25rem}.input-group-lg>.btn,.input-group-lg>.form-control,.input-group-lg>.form-select,.input-group-lg>.input-group-text{padding:.5rem 1rem;font-size:1.25rem;border-radius:.3rem}.input-group-sm>.btn,.input-group-sm>.form-control,.input-group-sm>.form-select,.input-group-sm>.input-group-text{padding:.25rem .5rem;font-size:.875rem;border-radius:.2rem}.input-group-lg>.form-select,.input-group-sm>.form-select{padding-right:3rem}.input-group:not(.has-validation)>.dropdown-toggle:nth-last-child(n+3),.input-group:not(.has-validation)>:not(:last-child):not(.dropdown-toggle):not(.dropdown-menu){border-top-right-radius:0;border-bottom-right-radius:0}.input-group.has-validation>.dropdown-toggle:nth-last-child(n+4),.input-group.has-validation>:nth-last-child(n+3):not(.dropdown-toggle):not(.dropdown-menu){border-top-right-radius:0;border-bottom-right-radius:0}.input-group>:not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback){margin-left:-1px;border-top-left-radius:0;border-bottom-left-radius:0}.valid-feedback{display:none;width:100%;margin-top:.25rem;font-size:.875em;color:#198754}.valid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;color:#fff;background-color:rgba(25,135,84,.9);border-radius:.25rem}.is-valid~.valid-feedback,.is-valid~.valid-tooltip,.was-validated :valid~.valid-feedback,.was-validated :valid~.valid-tooltip{display:block}.form-control.is-valid,.was-validated .form-control:valid{border-color:#198754;padding-right:calc(1.5em + .75rem);background-image:url("+u+');background-repeat:no-repeat;background-position:right calc(.375em + .1875rem) center;background-size:calc(.75em + .375rem) calc(.75em + .375rem)}.form-control.is-valid:focus,.was-validated .form-control:valid:focus{border-color:#198754;box-shadow:0 0 0 .25rem rgba(25,135,84,.25)}.was-validated textarea.form-control:valid,textarea.form-control.is-valid{padding-right:calc(1.5em + .75rem);background-position:top calc(.375em + .1875rem) right calc(.375em + .1875rem)}.form-select.is-valid,.was-validated .form-select:valid{border-color:#198754}.form-select.is-valid:not([multiple]):not([size]),.form-select.is-valid:not([multiple])[size="1"],.was-validated .form-select:valid:not([multiple]):not([size]),.was-validated .form-select:valid:not([multiple])[size="1"]{padding-right:4.125rem;background-image:url('+e+"),url("+u+");background-position:right .75rem center,center right 2.25rem;background-size:16px 12px,calc(.75em + .375rem) calc(.75em + .375rem)}.form-select.is-valid:focus,.was-validated .form-select:valid:focus{border-color:#198754;box-shadow:0 0 0 .25rem rgba(25,135,84,.25)}.form-check-input.is-valid,.was-validated .form-check-input:valid{border-color:#198754}.form-check-input.is-valid:checked,.was-validated .form-check-input:valid:checked{background-color:#198754}.form-check-input.is-valid:focus,.was-validated .form-check-input:valid:focus{box-shadow:0 0 0 .25rem rgba(25,135,84,.25)}.form-check-input.is-valid~.form-check-label,.was-validated .form-check-input:valid~.form-check-label{color:#198754}.form-check-inline .form-check-input~.valid-feedback{margin-left:.5em}.input-group .form-control.is-valid,.input-group .form-select.is-valid,.was-validated .input-group .form-control:valid,.was-validated .input-group .form-select:valid{z-index:1}.input-group .form-control.is-valid:focus,.input-group .form-select.is-valid:focus,.was-validated .input-group .form-control:valid:focus,.was-validated .input-group .form-select:valid:focus{z-index:3}.invalid-feedback{display:none;width:100%;margin-top:.25rem;font-size:.875em;color:#dc3545}.invalid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;color:#fff;background-color:rgba(220,53,69,.9);border-radius:.25rem}.is-invalid~.invalid-feedback,.is-invalid~.invalid-tooltip,.was-validated :invalid~.invalid-feedback,.was-validated :invalid~.invalid-tooltip{display:block}.form-control.is-invalid,.was-validated .form-control:invalid{border-color:#dc3545;padding-right:calc(1.5em + .75rem);background-image:url("+d+');background-repeat:no-repeat;background-position:right calc(.375em + .1875rem) center;background-size:calc(.75em + .375rem) calc(.75em + .375rem)}.form-control.is-invalid:focus,.was-validated .form-control:invalid:focus{border-color:#dc3545;box-shadow:0 0 0 .25rem rgba(220,53,69,.25)}.was-validated textarea.form-control:invalid,textarea.form-control.is-invalid{padding-right:calc(1.5em + .75rem);background-position:top calc(.375em + .1875rem) right calc(.375em + .1875rem)}.form-select.is-invalid,.was-validated .form-select:invalid{border-color:#dc3545}.form-select.is-invalid:not([multiple]):not([size]),.form-select.is-invalid:not([multiple])[size="1"],.was-validated .form-select:invalid:not([multiple]):not([size]),.was-validated .form-select:invalid:not([multiple])[size="1"]{padding-right:4.125rem;background-image:url('+e+"),url("+d+');background-position:right .75rem center,center right 2.25rem;background-size:16px 12px,calc(.75em + .375rem) calc(.75em + .375rem)}.form-select.is-invalid:focus,.was-validated .form-select:invalid:focus{border-color:#dc3545;box-shadow:0 0 0 .25rem rgba(220,53,69,.25)}.form-check-input.is-invalid,.was-validated .form-check-input:invalid{border-color:#dc3545}.form-check-input.is-invalid:checked,.was-validated .form-check-input:invalid:checked{background-color:#dc3545}.form-check-input.is-invalid:focus,.was-validated .form-check-input:invalid:focus{box-shadow:0 0 0 .25rem rgba(220,53,69,.25)}.form-check-input.is-invalid~.form-check-label,.was-validated .form-check-input:invalid~.form-check-label{color:#dc3545}.form-check-inline .form-check-input~.invalid-feedback{margin-left:.5em}.input-group .form-control.is-invalid,.input-group .form-select.is-invalid,.was-validated .input-group .form-control:invalid,.was-validated .input-group .form-select:invalid{z-index:2}.input-group .form-control.is-invalid:focus,.input-group .form-select.is-invalid:focus,.was-validated .input-group .form-control:invalid:focus,.was-validated .input-group .form-select:invalid:focus{z-index:3}.btn{display:inline-block;font-weight:400;line-height:1.5;color:#212529;text-align:center;text-decoration:none;vertical-align:middle;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:transparent;border:1px solid transparent;padding:.375rem .75rem;font-size:1rem;border-radius:.25rem;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.btn{transition:none}}.btn:hover{color:#212529}.btn-check:focus+.btn,.btn:focus{outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.btn.disabled,.btn:disabled,fieldset:disabled .btn{pointer-events:none;opacity:.65}.btn-primary{color:#fff;background-color:#0d6efd;border-color:#0d6efd}.btn-primary:hover{color:#fff;background-color:#0b5ed7;border-color:#0a58ca}.btn-check:focus+.btn-primary,.btn-primary:focus{color:#fff;background-color:#0b5ed7;border-color:#0a58ca;box-shadow:0 0 0 .25rem rgba(49,132,253,.5)}.btn-check:active+.btn-primary,.btn-check:checked+.btn-primary,.btn-primary.active,.btn-primary:active,.show>.btn-primary.dropdown-toggle{color:#fff;background-color:#0a58ca;border-color:#0a53be}.btn-check:active+.btn-primary:focus,.btn-check:checked+.btn-primary:focus,.btn-primary.active:focus,.btn-primary:active:focus,.show>.btn-primary.dropdown-toggle:focus{box-shadow:0 0 0 .25rem rgba(49,132,253,.5)}.btn-primary.disabled,.btn-primary:disabled{color:#fff;background-color:#0d6efd;border-color:#0d6efd}.btn-secondary{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-secondary:hover{color:#fff;background-color:#5c636a;border-color:#565e64}.btn-check:focus+.btn-secondary,.btn-secondary:focus{color:#fff;background-color:#5c636a;border-color:#565e64;box-shadow:0 0 0 .25rem rgba(130,138,145,.5)}.btn-check:active+.btn-secondary,.btn-check:checked+.btn-secondary,.btn-secondary.active,.btn-secondary:active,.show>.btn-secondary.dropdown-toggle{color:#fff;background-color:#565e64;border-color:#51585e}.btn-check:active+.btn-secondary:focus,.btn-check:checked+.btn-secondary:focus,.btn-secondary.active:focus,.btn-secondary:active:focus,.show>.btn-secondary.dropdown-toggle:focus{box-shadow:0 0 0 .25rem rgba(130,138,145,.5)}.btn-secondary.disabled,.btn-secondary:disabled{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-success{color:#fff;background-color:#198754;border-color:#198754}.btn-success:hover{color:#fff;background-color:#157347;border-color:#146c43}.btn-check:focus+.btn-success,.btn-success:focus{color:#fff;background-color:#157347;border-color:#146c43;box-shadow:0 0 0 .25rem rgba(60,153,110,.5)}.btn-check:active+.btn-success,.btn-check:checked+.btn-success,.btn-success.active,.btn-success:active,.show>.btn-success.dropdown-toggle{color:#fff;background-color:#146c43;border-color:#13653f}.btn-check:active+.btn-success:focus,.btn-check:checked+.btn-success:focus,.btn-success.active:focus,.btn-success:active:focus,.show>.btn-success.dropdown-toggle:focus{box-shadow:0 0 0 .25rem rgba(60,153,110,.5)}.btn-success.disabled,.btn-success:disabled{color:#fff;background-color:#198754;border-color:#198754}.btn-info{color:#000;background-color:#0dcaf0;border-color:#0dcaf0}.btn-info:hover{color:#000;background-color:#31d2f2;border-color:#25cff2}.btn-check:focus+.btn-info,.btn-info:focus{color:#000;background-color:#31d2f2;border-color:#25cff2;box-shadow:0 0 0 .25rem rgba(11,172,204,.5)}.btn-check:active+.btn-info,.btn-check:checked+.btn-info,.btn-info.active,.btn-info:active,.show>.btn-info.dropdown-toggle{color:#000;background-color:#3dd5f3;border-color:#25cff2}.btn-check:active+.btn-info:focus,.btn-check:checked+.btn-info:focus,.btn-info.active:focus,.btn-info:active:focus,.show>.btn-info.dropdown-toggle:focus{box-shadow:0 0 0 .25rem rgba(11,172,204,.5)}.btn-info.disabled,.btn-info:disabled{color:#000;background-color:#0dcaf0;border-color:#0dcaf0}.btn-warning{color:#000;background-color:#ffc107;border-color:#ffc107}.btn-warning:hover{color:#000;background-color:#ffca2c;border-color:#ffc720}.btn-check:focus+.btn-warning,.btn-warning:focus{color:#000;background-color:#ffca2c;border-color:#ffc720;box-shadow:0 0 0 .25rem rgba(217,164,6,.5)}.btn-check:active+.btn-warning,.btn-check:checked+.btn-warning,.btn-warning.active,.btn-warning:active,.show>.btn-warning.dropdown-toggle{color:#000;background-color:#ffcd39;border-color:#ffc720}.btn-check:active+.btn-warning:focus,.btn-check:checked+.btn-warning:focus,.btn-warning.active:focus,.btn-warning:active:focus,.show>.btn-warning.dropdown-toggle:focus{box-shadow:0 0 0 .25rem rgba(217,164,6,.5)}.btn-warning.disabled,.btn-warning:disabled{color:#000;background-color:#ffc107;border-color:#ffc107}.btn-danger{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-danger:hover{color:#fff;background-color:#bb2d3b;border-color:#b02a37}.btn-check:focus+.btn-danger,.btn-danger:focus{color:#fff;background-color:#bb2d3b;border-color:#b02a37;box-shadow:0 0 0 .25rem rgba(225,83,97,.5)}.btn-check:active+.btn-danger,.btn-check:checked+.btn-danger,.btn-danger.active,.btn-danger:active,.show>.btn-danger.dropdown-toggle{color:#fff;background-color:#b02a37;border-color:#a52834}.btn-check:active+.btn-danger:focus,.btn-check:checked+.btn-danger:focus,.btn-danger.active:focus,.btn-danger:active:focus,.show>.btn-danger.dropdown-toggle:focus{box-shadow:0 0 0 .25rem rgba(225,83,97,.5)}.btn-danger.disabled,.btn-danger:disabled{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-light{color:#000;background-color:#f8f9fa;border-color:#f8f9fa}.btn-light:hover{color:#000;background-color:#f9fafb;border-color:#f9fafb}.btn-check:focus+.btn-light,.btn-light:focus{color:#000;background-color:#f9fafb;border-color:#f9fafb;box-shadow:0 0 0 .25rem rgba(211,212,213,.5)}.btn-check:active+.btn-light,.btn-check:checked+.btn-light,.btn-light.active,.btn-light:active,.show>.btn-light.dropdown-toggle{color:#000;background-color:#f9fafb;border-color:#f9fafb}.btn-check:active+.btn-light:focus,.btn-check:checked+.btn-light:focus,.btn-light.active:focus,.btn-light:active:focus,.show>.btn-light.dropdown-toggle:focus{box-shadow:0 0 0 .25rem rgba(211,212,213,.5)}.btn-light.disabled,.btn-light:disabled{color:#000;background-color:#f8f9fa;border-color:#f8f9fa}.btn-dark{color:#fff;background-color:#212529;border-color:#212529}.btn-dark:hover{color:#fff;background-color:#1c1f23;border-color:#1a1e21}.btn-check:focus+.btn-dark,.btn-dark:focus{color:#fff;background-color:#1c1f23;border-color:#1a1e21;box-shadow:0 0 0 .25rem rgba(66,70,73,.5)}.btn-check:active+.btn-dark,.btn-check:checked+.btn-dark,.btn-dark.active,.btn-dark:active,.show>.btn-dark.dropdown-toggle{color:#fff;background-color:#1a1e21;border-color:#191c1f}.btn-check:active+.btn-dark:focus,.btn-check:checked+.btn-dark:focus,.btn-dark.active:focus,.btn-dark:active:focus,.show>.btn-dark.dropdown-toggle:focus{box-shadow:0 0 0 .25rem rgba(66,70,73,.5)}.btn-dark.disabled,.btn-dark:disabled{color:#fff;background-color:#212529;border-color:#212529}.btn-outline-primary{color:#0d6efd;border-color:#0d6efd}.btn-outline-primary:hover{color:#fff;background-color:#0d6efd;border-color:#0d6efd}.btn-check:focus+.btn-outline-primary,.btn-outline-primary:focus{box-shadow:0 0 0 .25rem rgba(13,110,253,.5)}.btn-check:active+.btn-outline-primary,.btn-check:checked+.btn-outline-primary,.btn-outline-primary.active,.btn-outline-primary.dropdown-toggle.show,.btn-outline-primary:active{color:#fff;background-color:#0d6efd;border-color:#0d6efd}.btn-check:active+.btn-outline-primary:focus,.btn-check:checked+.btn-outline-primary:focus,.btn-outline-primary.active:focus,.btn-outline-primary.dropdown-toggle.show:focus,.btn-outline-primary:active:focus{box-shadow:0 0 0 .25rem rgba(13,110,253,.5)}.btn-outline-primary.disabled,.btn-outline-primary:disabled{color:#0d6efd;background-color:transparent}.btn-outline-secondary{color:#6c757d;border-color:#6c757d}.btn-outline-secondary:hover{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-check:focus+.btn-outline-secondary,.btn-outline-secondary:focus{box-shadow:0 0 0 .25rem rgba(108,117,125,.5)}.btn-check:active+.btn-outline-secondary,.btn-check:checked+.btn-outline-secondary,.btn-outline-secondary.active,.btn-outline-secondary.dropdown-toggle.show,.btn-outline-secondary:active{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-check:active+.btn-outline-secondary:focus,.btn-check:checked+.btn-outline-secondary:focus,.btn-outline-secondary.active:focus,.btn-outline-secondary.dropdown-toggle.show:focus,.btn-outline-secondary:active:focus{box-shadow:0 0 0 .25rem rgba(108,117,125,.5)}.btn-outline-secondary.disabled,.btn-outline-secondary:disabled{color:#6c757d;background-color:transparent}.btn-outline-success{color:#198754;border-color:#198754}.btn-outline-success:hover{color:#fff;background-color:#198754;border-color:#198754}.btn-check:focus+.btn-outline-success,.btn-outline-success:focus{box-shadow:0 0 0 .25rem rgba(25,135,84,.5)}.btn-check:active+.btn-outline-success,.btn-check:checked+.btn-outline-success,.btn-outline-success.active,.btn-outline-success.dropdown-toggle.show,.btn-outline-success:active{color:#fff;background-color:#198754;border-color:#198754}.btn-check:active+.btn-outline-success:focus,.btn-check:checked+.btn-outline-success:focus,.btn-outline-success.active:focus,.btn-outline-success.dropdown-toggle.show:focus,.btn-outline-success:active:focus{box-shadow:0 0 0 .25rem rgba(25,135,84,.5)}.btn-outline-success.disabled,.btn-outline-success:disabled{color:#198754;background-color:transparent}.btn-outline-info{color:#0dcaf0;border-color:#0dcaf0}.btn-outline-info:hover{color:#000;background-color:#0dcaf0;border-color:#0dcaf0}.btn-check:focus+.btn-outline-info,.btn-outline-info:focus{box-shadow:0 0 0 .25rem rgba(13,202,240,.5)}.btn-check:active+.btn-outline-info,.btn-check:checked+.btn-outline-info,.btn-outline-info.active,.btn-outline-info.dropdown-toggle.show,.btn-outline-info:active{color:#000;background-color:#0dcaf0;border-color:#0dcaf0}.btn-check:active+.btn-outline-info:focus,.btn-check:checked+.btn-outline-info:focus,.btn-outline-info.active:focus,.btn-outline-info.dropdown-toggle.show:focus,.btn-outline-info:active:focus{box-shadow:0 0 0 .25rem rgba(13,202,240,.5)}.btn-outline-info.disabled,.btn-outline-info:disabled{color:#0dcaf0;background-color:transparent}.btn-outline-warning{color:#ffc107;border-color:#ffc107}.btn-outline-warning:hover{color:#000;background-color:#ffc107;border-color:#ffc107}.btn-check:focus+.btn-outline-warning,.btn-outline-warning:focus{box-shadow:0 0 0 .25rem rgba(255,193,7,.5)}.btn-check:active+.btn-outline-warning,.btn-check:checked+.btn-outline-warning,.btn-outline-warning.active,.btn-outline-warning.dropdown-toggle.show,.btn-outline-warning:active{color:#000;background-color:#ffc107;border-color:#ffc107}.btn-check:active+.btn-outline-warning:focus,.btn-check:checked+.btn-outline-warning:focus,.btn-outline-warning.active:focus,.btn-outline-warning.dropdown-toggle.show:focus,.btn-outline-warning:active:focus{box-shadow:0 0 0 .25rem rgba(255,193,7,.5)}.btn-outline-warning.disabled,.btn-outline-warning:disabled{color:#ffc107;background-color:transparent}.btn-outline-danger{color:#dc3545;border-color:#dc3545}.btn-outline-danger:hover{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-check:focus+.btn-outline-danger,.btn-outline-danger:focus{box-shadow:0 0 0 .25rem rgba(220,53,69,.5)}.btn-check:active+.btn-outline-danger,.btn-check:checked+.btn-outline-danger,.btn-outline-danger.active,.btn-outline-danger.dropdown-toggle.show,.btn-outline-danger:active{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-check:active+.btn-outline-danger:focus,.btn-check:checked+.btn-outline-danger:focus,.btn-outline-danger.active:focus,.btn-outline-danger.dropdown-toggle.show:focus,.btn-outline-danger:active:focus{box-shadow:0 0 0 .25rem rgba(220,53,69,.5)}.btn-outline-danger.disabled,.btn-outline-danger:disabled{color:#dc3545;background-color:transparent}.btn-outline-light{color:#f8f9fa;border-color:#f8f9fa}.btn-outline-light:hover{color:#000;background-color:#f8f9fa;border-color:#f8f9fa}.btn-check:focus+.btn-outline-light,.btn-outline-light:focus{box-shadow:0 0 0 .25rem rgba(248,249,250,.5)}.btn-check:active+.btn-outline-light,.btn-check:checked+.btn-outline-light,.btn-outline-light.active,.btn-outline-light.dropdown-toggle.show,.btn-outline-light:active{color:#000;background-color:#f8f9fa;border-color:#f8f9fa}.btn-check:active+.btn-outline-light:focus,.btn-check:checked+.btn-outline-light:focus,.btn-outline-light.active:focus,.btn-outline-light.dropdown-toggle.show:focus,.btn-outline-light:active:focus{box-shadow:0 0 0 .25rem rgba(248,249,250,.5)}.btn-outline-light.disabled,.btn-outline-light:disabled{color:#f8f9fa;background-color:transparent}.btn-outline-dark{color:#212529;border-color:#212529}.btn-outline-dark:hover{color:#fff;background-color:#212529;border-color:#212529}.btn-check:focus+.btn-outline-dark,.btn-outline-dark:focus{box-shadow:0 0 0 .25rem rgba(33,37,41,.5)}.btn-check:active+.btn-outline-dark,.btn-check:checked+.btn-outline-dark,.btn-outline-dark.active,.btn-outline-dark.dropdown-toggle.show,.btn-outline-dark:active{color:#fff;background-color:#212529;border-color:#212529}.btn-check:active+.btn-outline-dark:focus,.btn-check:checked+.btn-outline-dark:focus,.btn-outline-dark.active:focus,.btn-outline-dark.dropdown-toggle.show:focus,.btn-outline-dark:active:focus{box-shadow:0 0 0 .25rem rgba(33,37,41,.5)}.btn-outline-dark.disabled,.btn-outline-dark:disabled{color:#212529;background-color:transparent}.btn-link{font-weight:400;color:#0d6efd;text-decoration:underline}.btn-link:hover{color:#0a58ca}.btn-link.disabled,.btn-link:disabled{color:#6c757d}.btn-group-lg>.btn,.btn-lg{padding:.5rem 1rem;font-size:1.25rem;border-radius:.3rem}.btn-group-sm>.btn,.btn-sm{padding:.25rem .5rem;font-size:.875rem;border-radius:.2rem}.fade{transition:opacity .15s linear}@media (prefers-reduced-motion:reduce){.fade{transition:none}}.fade:not(.show){opacity:0}.collapse:not(.show){display:none}.collapsing{height:0;overflow:hidden;transition:height .35s ease}@media (prefers-reduced-motion:reduce){.collapsing{transition:none}}.collapsing.collapse-horizontal{width:0;height:auto;transition:width .35s ease}@media (prefers-reduced-motion:reduce){.collapsing.collapse-horizontal{transition:none}}.dropdown,.dropend,.dropstart,.dropup{position:relative}.dropdown-toggle{white-space:nowrap}.dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent}.dropdown-toggle:empty::after{margin-left:0}.dropdown-menu{position:absolute;z-index:1000;display:none;min-width:10rem;padding:.5rem 0;margin:0;font-size:1rem;color:#212529;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.15);border-radius:.25rem}.dropdown-menu[data-bs-popper]{top:100%;left:0;margin-top:.125rem}.dropdown-menu-start{--bs-position:start}.dropdown-menu-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-end{--bs-position:end}.dropdown-menu-end[data-bs-popper]{right:0;left:auto}@media (min-width:576px){.dropdown-menu-sm-start{--bs-position:start}.dropdown-menu-sm-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-sm-end{--bs-position:end}.dropdown-menu-sm-end[data-bs-popper]{right:0;left:auto}}@media (min-width:768px){.dropdown-menu-md-start{--bs-position:start}.dropdown-menu-md-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-md-end{--bs-position:end}.dropdown-menu-md-end[data-bs-popper]{right:0;left:auto}}@media (min-width:992px){.dropdown-menu-lg-start{--bs-position:start}.dropdown-menu-lg-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-lg-end{--bs-position:end}.dropdown-menu-lg-end[data-bs-popper]{right:0;left:auto}}@media (min-width:1200px){.dropdown-menu-xl-start{--bs-position:start}.dropdown-menu-xl-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-xl-end{--bs-position:end}.dropdown-menu-xl-end[data-bs-popper]{right:0;left:auto}}@media (min-width:1400px){.dropdown-menu-xxl-start{--bs-position:start}.dropdown-menu-xxl-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-xxl-end{--bs-position:end}.dropdown-menu-xxl-end[data-bs-popper]{right:0;left:auto}}.dropup .dropdown-menu[data-bs-popper]{top:auto;bottom:100%;margin-top:0;margin-bottom:.125rem}.dropup .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:0;border-right:.3em solid transparent;border-bottom:.3em solid;border-left:.3em solid transparent}.dropup .dropdown-toggle:empty::after{margin-left:0}.dropend .dropdown-menu[data-bs-popper]{top:0;right:auto;left:100%;margin-top:0;margin-left:.125rem}.dropend .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-right:0;border-bottom:.3em solid transparent;border-left:.3em solid}.dropend .dropdown-toggle:empty::after{margin-left:0}.dropend .dropdown-toggle::after{vertical-align:0}.dropstart .dropdown-menu[data-bs-popper]{top:0;right:100%;left:auto;margin-top:0;margin-right:.125rem}.dropstart .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:""}.dropstart .dropdown-toggle::after{display:none}.dropstart .dropdown-toggle::before{display:inline-block;margin-right:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-right:.3em solid;border-bottom:.3em solid transparent}.dropstart .dropdown-toggle:empty::after{margin-left:0}.dropstart .dropdown-toggle::before{vertical-align:0}.dropdown-divider{height:0;margin:.5rem 0;overflow:hidden;border-top:1px solid rgba(0,0,0,.15)}.dropdown-item{display:block;width:100%;padding:.25rem 1rem;clear:both;font-weight:400;color:#212529;text-align:inherit;text-decoration:none;white-space:nowrap;background-color:transparent;border:0}.dropdown-item:focus,.dropdown-item:hover{color:#1e2125;background-color:#e9ecef}.dropdown-item.active,.dropdown-item:active{color:#fff;text-decoration:none;background-color:#0d6efd}.dropdown-item.disabled,.dropdown-item:disabled{color:#adb5bd;pointer-events:none;background-color:transparent}.dropdown-menu.show{display:block}.dropdown-header{display:block;padding:.5rem 1rem;margin-bottom:0;font-size:.875rem;color:#6c757d;white-space:nowrap}.dropdown-item-text{display:block;padding:.25rem 1rem;color:#212529}.dropdown-menu-dark{color:#dee2e6;background-color:#343a40;border-color:rgba(0,0,0,.15)}.dropdown-menu-dark .dropdown-item{color:#dee2e6}.dropdown-menu-dark .dropdown-item:focus,.dropdown-menu-dark .dropdown-item:hover{color:#fff;background-color:rgba(255,255,255,.15)}.dropdown-menu-dark .dropdown-item.active,.dropdown-menu-dark .dropdown-item:active{color:#fff;background-color:#0d6efd}.dropdown-menu-dark .dropdown-item.disabled,.dropdown-menu-dark .dropdown-item:disabled{color:#adb5bd}.dropdown-menu-dark .dropdown-divider{border-color:rgba(0,0,0,.15)}.dropdown-menu-dark .dropdown-item-text{color:#dee2e6}.dropdown-menu-dark .dropdown-header{color:#adb5bd}.btn-group,.btn-group-vertical{position:relative;display:inline-flex;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;flex:1 1 auto}.btn-group-vertical>.btn-check:checked+.btn,.btn-group-vertical>.btn-check:focus+.btn,.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn-check:checked+.btn,.btn-group>.btn-check:focus+.btn,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:1}.btn-toolbar{display:flex;flex-wrap:wrap;justify-content:flex-start}.btn-toolbar .input-group{width:auto}.btn-group>.btn-group:not(:first-child),.btn-group>.btn:not(:first-child){margin-left:-1px}.btn-group>.btn-group:not(:last-child)>.btn,.btn-group>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:not(:first-child)>.btn,.btn-group>.btn:nth-child(n+3),.btn-group>:not(.btn-check)+.btn{border-top-left-radius:0;border-bottom-left-radius:0}.dropdown-toggle-split{padding-right:.5625rem;padding-left:.5625rem}.dropdown-toggle-split::after,.dropend .dropdown-toggle-split::after,.dropup .dropdown-toggle-split::after{margin-left:0}.dropstart .dropdown-toggle-split::before{margin-right:0}.btn-group-sm>.btn+.dropdown-toggle-split,.btn-sm+.dropdown-toggle-split{padding-right:.375rem;padding-left:.375rem}.btn-group-lg>.btn+.dropdown-toggle-split,.btn-lg+.dropdown-toggle-split{padding-right:.75rem;padding-left:.75rem}.btn-group-vertical{flex-direction:column;align-items:flex-start;justify-content:center}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group{width:100%}.btn-group-vertical>.btn-group:not(:first-child),.btn-group-vertical>.btn:not(:first-child){margin-top:-1px}.btn-group-vertical>.btn-group:not(:last-child)>.btn,.btn-group-vertical>.btn:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:not(:first-child)>.btn,.btn-group-vertical>.btn~.btn{border-top-left-radius:0;border-top-right-radius:0}.nav{display:flex;flex-wrap:wrap;padding-left:0;margin-bottom:0;list-style:none}.nav-link{display:block;padding:.5rem 1rem;color:#0d6efd;text-decoration:none;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out}@media (prefers-reduced-motion:reduce){.nav-link{transition:none}}.nav-link:focus,.nav-link:hover{color:#0a58ca}.nav-link.disabled{color:#6c757d;pointer-events:none;cursor:default}.nav-tabs{border-bottom:1px solid #dee2e6}.nav-tabs .nav-link{margin-bottom:-1px;background:0 0;border:1px solid transparent;border-top-left-radius:.25rem;border-top-right-radius:.25rem}.nav-tabs .nav-link:focus,.nav-tabs .nav-link:hover{border-color:#e9ecef #e9ecef #dee2e6;isolation:isolate}.nav-tabs .nav-link.disabled{color:#6c757d;background-color:transparent;border-color:transparent}.nav-tabs .nav-item.show .nav-link,.nav-tabs .nav-link.active{color:#495057;background-color:#fff;border-color:#dee2e6 #dee2e6 #fff}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.nav-pills .nav-link{background:0 0;border:0;border-radius:.25rem}.nav-pills .nav-link.active,.nav-pills .show>.nav-link{color:#fff;background-color:#0d6efd}.nav-fill .nav-item,.nav-fill>.nav-link{flex:1 1 auto;text-align:center}.nav-justified .nav-item,.nav-justified>.nav-link{flex-basis:0;flex-grow:1;text-align:center}.nav-fill .nav-item .nav-link,.nav-justified .nav-item .nav-link{width:100%}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.navbar{position:relative;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;padding-top:.5rem;padding-bottom:.5rem}.navbar>.container,.navbar>.container-fluid,.navbar>.container-lg,.navbar>.container-md,.navbar>.container-sm,.navbar>.container-xl,.navbar>.container-xxl{display:flex;flex-wrap:inherit;align-items:center;justify-content:space-between}.navbar-brand{padding-top:.3125rem;padding-bottom:.3125rem;margin-right:1rem;font-size:1.25rem;text-decoration:none;white-space:nowrap}.navbar-nav{display:flex;flex-direction:column;padding-left:0;margin-bottom:0;list-style:none}.navbar-nav .nav-link{padding-right:0;padding-left:0}.navbar-nav .dropdown-menu{position:static}.navbar-text{padding-top:.5rem;padding-bottom:.5rem}.navbar-collapse{flex-basis:100%;flex-grow:1;align-items:center}.navbar-toggler{padding:.25rem .75rem;font-size:1.25rem;line-height:1;background-color:transparent;border:1px solid transparent;border-radius:.25rem;transition:box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.navbar-toggler{transition:none}}.navbar-toggler:hover{text-decoration:none}.navbar-toggler:focus{text-decoration:none;outline:0;box-shadow:0 0 0 .25rem}.navbar-toggler-icon{display:inline-block;width:1.5em;height:1.5em;vertical-align:middle;background-repeat:no-repeat;background-position:center;background-size:100%}.navbar-nav-scroll{max-height:var(--bs-scroll-height,75vh);overflow-y:auto}@media (min-width:576px){.navbar-expand-sm{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-sm .navbar-nav{flex-direction:row}.navbar-expand-sm .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-sm .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-sm .navbar-nav-scroll{overflow:visible}.navbar-expand-sm .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-sm .navbar-toggler{display:none}.navbar-expand-sm .offcanvas-header{display:none}.navbar-expand-sm .offcanvas{position:inherit;bottom:0;z-index:1000;flex-grow:1;visibility:visible!important;background-color:transparent;border-right:0;border-left:0;transition:none;transform:none}.navbar-expand-sm .offcanvas-bottom,.navbar-expand-sm .offcanvas-top{height:auto;border-top:0;border-bottom:0}.navbar-expand-sm .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}}@media (min-width:768px){.navbar-expand-md{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-md .navbar-nav{flex-direction:row}.navbar-expand-md .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-md .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-md .navbar-nav-scroll{overflow:visible}.navbar-expand-md .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-md .navbar-toggler{display:none}.navbar-expand-md .offcanvas-header{display:none}.navbar-expand-md .offcanvas{position:inherit;bottom:0;z-index:1000;flex-grow:1;visibility:visible!important;background-color:transparent;border-right:0;border-left:0;transition:none;transform:none}.navbar-expand-md .offcanvas-bottom,.navbar-expand-md .offcanvas-top{height:auto;border-top:0;border-bottom:0}.navbar-expand-md .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}}@media (min-width:992px){.navbar-expand-lg{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-lg .navbar-nav{flex-direction:row}.navbar-expand-lg .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-lg .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-lg .navbar-nav-scroll{overflow:visible}.navbar-expand-lg .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-lg .navbar-toggler{display:none}.navbar-expand-lg .offcanvas-header{display:none}.navbar-expand-lg .offcanvas{position:inherit;bottom:0;z-index:1000;flex-grow:1;visibility:visible!important;background-color:transparent;border-right:0;border-left:0;transition:none;transform:none}.navbar-expand-lg .offcanvas-bottom,.navbar-expand-lg .offcanvas-top{height:auto;border-top:0;border-bottom:0}.navbar-expand-lg .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}}@media (min-width:1200px){.navbar-expand-xl{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-xl .navbar-nav{flex-direction:row}.navbar-expand-xl .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-xl .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-xl .navbar-nav-scroll{overflow:visible}.navbar-expand-xl .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-xl .navbar-toggler{display:none}.navbar-expand-xl .offcanvas-header{display:none}.navbar-expand-xl .offcanvas{position:inherit;bottom:0;z-index:1000;flex-grow:1;visibility:visible!important;background-color:transparent;border-right:0;border-left:0;transition:none;transform:none}.navbar-expand-xl .offcanvas-bottom,.navbar-expand-xl .offcanvas-top{height:auto;border-top:0;border-bottom:0}.navbar-expand-xl .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}}@media (min-width:1400px){.navbar-expand-xxl{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-xxl .navbar-nav{flex-direction:row}.navbar-expand-xxl .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-xxl .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-xxl .navbar-nav-scroll{overflow:visible}.navbar-expand-xxl .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-xxl .navbar-toggler{display:none}.navbar-expand-xxl .offcanvas-header{display:none}.navbar-expand-xxl .offcanvas{position:inherit;bottom:0;z-index:1000;flex-grow:1;visibility:visible!important;background-color:transparent;border-right:0;border-left:0;transition:none;transform:none}.navbar-expand-xxl .offcanvas-bottom,.navbar-expand-xxl .offcanvas-top{height:auto;border-top:0;border-bottom:0}.navbar-expand-xxl .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}}.navbar-expand{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand .navbar-nav{flex-direction:row}.navbar-expand .navbar-nav .dropdown-menu{position:absolute}.navbar-expand .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand .navbar-nav-scroll{overflow:visible}.navbar-expand .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand .navbar-toggler{display:none}.navbar-expand .offcanvas-header{display:none}.navbar-expand .offcanvas{position:inherit;bottom:0;z-index:1000;flex-grow:1;visibility:visible!important;background-color:transparent;border-right:0;border-left:0;transition:none;transform:none}.navbar-expand .offcanvas-bottom,.navbar-expand .offcanvas-top{height:auto;border-top:0;border-bottom:0}.navbar-expand .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}.navbar-light .navbar-brand{color:rgba(0,0,0,.9)}.navbar-light .navbar-brand:focus,.navbar-light .navbar-brand:hover{color:rgba(0,0,0,.9)}.navbar-light .navbar-nav .nav-link{color:rgba(0,0,0,.55)}.navbar-light .navbar-nav .nav-link:focus,.navbar-light .navbar-nav .nav-link:hover{color:rgba(0,0,0,.7)}.navbar-light .navbar-nav .nav-link.disabled{color:rgba(0,0,0,.3)}.navbar-light .navbar-nav .nav-link.active,.navbar-light .navbar-nav .show>.nav-link{color:rgba(0,0,0,.9)}.navbar-light .navbar-toggler{color:rgba(0,0,0,.55);border-color:rgba(0,0,0,.1)}.navbar-light .navbar-toggler-icon{background-image:url('+p+")}.navbar-light .navbar-text{color:rgba(0,0,0,.55)}.navbar-light .navbar-text a,.navbar-light .navbar-text a:focus,.navbar-light .navbar-text a:hover{color:rgba(0,0,0,.9)}.navbar-dark .navbar-brand{color:#fff}.navbar-dark .navbar-brand:focus,.navbar-dark .navbar-brand:hover{color:#fff}.navbar-dark .navbar-nav .nav-link{color:rgba(255,255,255,.55)}.navbar-dark .navbar-nav .nav-link:focus,.navbar-dark .navbar-nav .nav-link:hover{color:rgba(255,255,255,.75)}.navbar-dark .navbar-nav .nav-link.disabled{color:rgba(255,255,255,.25)}.navbar-dark .navbar-nav .nav-link.active,.navbar-dark .navbar-nav .show>.nav-link{color:#fff}.navbar-dark .navbar-toggler{color:rgba(255,255,255,.55);border-color:rgba(255,255,255,.1)}.navbar-dark .navbar-toggler-icon{background-image:url("+f+")}.navbar-dark .navbar-text{color:rgba(255,255,255,.55)}.navbar-dark .navbar-text a,.navbar-dark .navbar-text a:focus,.navbar-dark .navbar-text a:hover{color:#fff}.card{position:relative;display:flex;flex-direction:column;min-width:0;word-wrap:break-word;background-color:#fff;background-clip:border-box;border:1px solid rgba(0,0,0,.125);border-radius:.25rem}.card>hr{margin-right:0;margin-left:0}.card>.list-group{border-top:inherit;border-bottom:inherit}.card>.list-group:first-child{border-top-width:0;border-top-left-radius:calc(.25rem - 1px);border-top-right-radius:calc(.25rem - 1px)}.card>.list-group:last-child{border-bottom-width:0;border-bottom-right-radius:calc(.25rem - 1px);border-bottom-left-radius:calc(.25rem - 1px)}.card>.card-header+.list-group,.card>.list-group+.card-footer{border-top:0}.card-body{flex:1 1 auto;padding:1rem 1rem}.card-title{margin-bottom:.5rem}.card-subtitle{margin-top:-.25rem;margin-bottom:0}.card-text:last-child{margin-bottom:0}.card-link+.card-link{margin-left:1rem}.card-header{padding:.5rem 1rem;margin-bottom:0;background-color:rgba(0,0,0,.03);border-bottom:1px solid rgba(0,0,0,.125)}.card-header:first-child{border-radius:calc(.25rem - 1px) calc(.25rem - 1px) 0 0}.card-footer{padding:.5rem 1rem;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.125)}.card-footer:last-child{border-radius:0 0 calc(.25rem - 1px) calc(.25rem - 1px)}.card-header-tabs{margin-right:-.5rem;margin-bottom:-.5rem;margin-left:-.5rem;border-bottom:0}.card-header-pills{margin-right:-.5rem;margin-left:-.5rem}.card-img-overlay{position:absolute;top:0;right:0;bottom:0;left:0;padding:1rem;border-radius:calc(.25rem - 1px)}.card-img,.card-img-bottom,.card-img-top{width:100%}.card-img,.card-img-top{border-top-left-radius:calc(.25rem - 1px);border-top-right-radius:calc(.25rem - 1px)}.card-img,.card-img-bottom{border-bottom-right-radius:calc(.25rem - 1px);border-bottom-left-radius:calc(.25rem - 1px)}.card-group>.card{margin-bottom:.75rem}@media (min-width:576px){.card-group{display:flex;flex-flow:row wrap}.card-group>.card{flex:1 0 0%;margin-bottom:0}.card-group>.card+.card{margin-left:0;border-left:0}.card-group>.card:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.card-group>.card:not(:last-child) .card-header,.card-group>.card:not(:last-child) .card-img-top{border-top-right-radius:0}.card-group>.card:not(:last-child) .card-footer,.card-group>.card:not(:last-child) .card-img-bottom{border-bottom-right-radius:0}.card-group>.card:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.card-group>.card:not(:first-child) .card-header,.card-group>.card:not(:first-child) .card-img-top{border-top-left-radius:0}.card-group>.card:not(:first-child) .card-footer,.card-group>.card:not(:first-child) .card-img-bottom{border-bottom-left-radius:0}}.accordion-button{position:relative;display:flex;align-items:center;width:100%;padding:1rem 1.25rem;font-size:1rem;color:#212529;text-align:left;background-color:#fff;border:0;border-radius:0;overflow-anchor:none;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out,border-radius .15s ease}@media (prefers-reduced-motion:reduce){.accordion-button{transition:none}}.accordion-button:not(.collapsed){color:#0c63e4;background-color:#e7f1ff;box-shadow:inset 0 -1px 0 rgba(0,0,0,.125)}.accordion-button:not(.collapsed)::after{background-image:url("+g+');transform:rotate(-180deg)}.accordion-button::after{flex-shrink:0;width:1.25rem;height:1.25rem;margin-left:auto;content:"";background-image:url('+m+');background-repeat:no-repeat;background-size:1.25rem;transition:transform .2s ease-in-out}@media (prefers-reduced-motion:reduce){.accordion-button::after{transition:none}}.accordion-button:hover{z-index:2}.accordion-button:focus{z-index:3;border-color:#86b7fe;outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.accordion-header{margin-bottom:0}.accordion-item{background-color:#fff;border:1px solid rgba(0,0,0,.125)}.accordion-item:first-of-type{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.accordion-item:first-of-type .accordion-button{border-top-left-radius:calc(.25rem - 1px);border-top-right-radius:calc(.25rem - 1px)}.accordion-item:not(:first-of-type){border-top:0}.accordion-item:last-of-type{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.accordion-item:last-of-type .accordion-button.collapsed{border-bottom-right-radius:calc(.25rem - 1px);border-bottom-left-radius:calc(.25rem - 1px)}.accordion-item:last-of-type .accordion-collapse{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.accordion-body{padding:1rem 1.25rem}.accordion-flush .accordion-collapse{border-width:0}.accordion-flush .accordion-item{border-right:0;border-left:0;border-radius:0}.accordion-flush .accordion-item:first-child{border-top:0}.accordion-flush .accordion-item:last-child{border-bottom:0}.accordion-flush .accordion-item .accordion-button{border-radius:0}.breadcrumb{display:flex;flex-wrap:wrap;padding:0 0;margin-bottom:1rem;list-style:none}.breadcrumb-item+.breadcrumb-item{padding-left:.5rem}.breadcrumb-item+.breadcrumb-item::before{float:left;padding-right:.5rem;color:#6c757d;content:var(--bs-breadcrumb-divider, "/")}.breadcrumb-item.active{color:#6c757d}.pagination{display:flex;padding-left:0;list-style:none}.page-link{position:relative;display:block;color:#0d6efd;text-decoration:none;background-color:#fff;border:1px solid #dee2e6;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.page-link{transition:none}}.page-link:hover{z-index:2;color:#0a58ca;background-color:#e9ecef;border-color:#dee2e6}.page-link:focus{z-index:3;color:#0a58ca;background-color:#e9ecef;outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.page-item:not(:first-child) .page-link{margin-left:-1px}.page-item.active .page-link{z-index:3;color:#fff;background-color:#0d6efd;border-color:#0d6efd}.page-item.disabled .page-link{color:#6c757d;pointer-events:none;background-color:#fff;border-color:#dee2e6}.page-link{padding:.375rem .75rem}.page-item:first-child .page-link{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.page-item:last-child .page-link{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.pagination-lg .page-link{padding:.75rem 1.5rem;font-size:1.25rem}.pagination-lg .page-item:first-child .page-link{border-top-left-radius:.3rem;border-bottom-left-radius:.3rem}.pagination-lg .page-item:last-child .page-link{border-top-right-radius:.3rem;border-bottom-right-radius:.3rem}.pagination-sm .page-link{padding:.25rem .5rem;font-size:.875rem}.pagination-sm .page-item:first-child .page-link{border-top-left-radius:.2rem;border-bottom-left-radius:.2rem}.pagination-sm .page-item:last-child .page-link{border-top-right-radius:.2rem;border-bottom-right-radius:.2rem}.badge{display:inline-block;padding:.35em .65em;font-size:.75em;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25rem}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.alert{position:relative;padding:1rem 1rem;margin-bottom:1rem;border:1px solid transparent;border-radius:.25rem}.alert-heading{color:inherit}.alert-link{font-weight:700}.alert-dismissible{padding-right:3rem}.alert-dismissible .btn-close{position:absolute;top:0;right:0;z-index:2;padding:1.25rem 1rem}.alert-primary{color:#084298;background-color:#cfe2ff;border-color:#b6d4fe}.alert-primary .alert-link{color:#06357a}.alert-secondary{color:#41464b;background-color:#e2e3e5;border-color:#d3d6d8}.alert-secondary .alert-link{color:#34383c}.alert-success{color:#0f5132;background-color:#d1e7dd;border-color:#badbcc}.alert-success .alert-link{color:#0c4128}.alert-info{color:#055160;background-color:#cff4fc;border-color:#b6effb}.alert-info .alert-link{color:#04414d}.alert-warning{color:#664d03;background-color:#fff3cd;border-color:#ffecb5}.alert-warning .alert-link{color:#523e02}.alert-danger{color:#842029;background-color:#f8d7da;border-color:#f5c2c7}.alert-danger .alert-link{color:#6a1a21}.alert-light{color:#636464;background-color:#fefefe;border-color:#fdfdfe}.alert-light .alert-link{color:#4f5050}.alert-dark{color:#141619;background-color:#d3d3d4;border-color:#bcbebf}.alert-dark .alert-link{color:#101214}@-webkit-keyframes progress-bar-stripes{0%{background-position-x:1rem}}@keyframes progress-bar-stripes{0%{background-position-x:1rem}}.progress{display:flex;height:1rem;overflow:hidden;font-size:.75rem;background-color:#e9ecef;border-radius:.25rem}.progress-bar{display:flex;flex-direction:column;justify-content:center;overflow:hidden;color:#fff;text-align:center;white-space:nowrap;background-color:#0d6efd;transition:width .6s ease}@media (prefers-reduced-motion:reduce){.progress-bar{transition:none}}.progress-bar-striped{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:1rem 1rem}.progress-bar-animated{-webkit-animation:1s linear infinite progress-bar-stripes;animation:1s linear infinite progress-bar-stripes}@media (prefers-reduced-motion:reduce){.progress-bar-animated{-webkit-animation:none;animation:none}}.list-group{display:flex;flex-direction:column;padding-left:0;margin-bottom:0;border-radius:.25rem}.list-group-numbered{list-style-type:none;counter-reset:section}.list-group-numbered>li::before{content:counters(section, ".") ". ";counter-increment:section}.list-group-item-action{width:100%;color:#495057;text-align:inherit}.list-group-item-action:focus,.list-group-item-action:hover{z-index:1;color:#495057;text-decoration:none;background-color:#f8f9fa}.list-group-item-action:active{color:#212529;background-color:#e9ecef}.list-group-item{position:relative;display:block;padding:.5rem 1rem;color:#212529;text-decoration:none;background-color:#fff;border:1px solid rgba(0,0,0,.125)}.list-group-item:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.list-group-item:last-child{border-bottom-right-radius:inherit;border-bottom-left-radius:inherit}.list-group-item.disabled,.list-group-item:disabled{color:#6c757d;pointer-events:none;background-color:#fff}.list-group-item.active{z-index:2;color:#fff;background-color:#0d6efd;border-color:#0d6efd}.list-group-item+.list-group-item{border-top-width:0}.list-group-item+.list-group-item.active{margin-top:-1px;border-top-width:1px}.list-group-horizontal{flex-direction:row}.list-group-horizontal>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal>.list-group-item.active{margin-top:0}.list-group-horizontal>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}@media (min-width:576px){.list-group-horizontal-sm{flex-direction:row}.list-group-horizontal-sm>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-sm>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-sm>.list-group-item.active{margin-top:0}.list-group-horizontal-sm>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-sm>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}@media (min-width:768px){.list-group-horizontal-md{flex-direction:row}.list-group-horizontal-md>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-md>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-md>.list-group-item.active{margin-top:0}.list-group-horizontal-md>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-md>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}@media (min-width:992px){.list-group-horizontal-lg{flex-direction:row}.list-group-horizontal-lg>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-lg>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-lg>.list-group-item.active{margin-top:0}.list-group-horizontal-lg>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-lg>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}@media (min-width:1200px){.list-group-horizontal-xl{flex-direction:row}.list-group-horizontal-xl>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-xl>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-xl>.list-group-item.active{margin-top:0}.list-group-horizontal-xl>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-xl>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}@media (min-width:1400px){.list-group-horizontal-xxl{flex-direction:row}.list-group-horizontal-xxl>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-xxl>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-xxl>.list-group-item.active{margin-top:0}.list-group-horizontal-xxl>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-xxl>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}.list-group-flush{border-radius:0}.list-group-flush>.list-group-item{border-width:0 0 1px}.list-group-flush>.list-group-item:last-child{border-bottom-width:0}.list-group-item-primary{color:#084298;background-color:#cfe2ff}.list-group-item-primary.list-group-item-action:focus,.list-group-item-primary.list-group-item-action:hover{color:#084298;background-color:#bacbe6}.list-group-item-primary.list-group-item-action.active{color:#fff;background-color:#084298;border-color:#084298}.list-group-item-secondary{color:#41464b;background-color:#e2e3e5}.list-group-item-secondary.list-group-item-action:focus,.list-group-item-secondary.list-group-item-action:hover{color:#41464b;background-color:#cbccce}.list-group-item-secondary.list-group-item-action.active{color:#fff;background-color:#41464b;border-color:#41464b}.list-group-item-success{color:#0f5132;background-color:#d1e7dd}.list-group-item-success.list-group-item-action:focus,.list-group-item-success.list-group-item-action:hover{color:#0f5132;background-color:#bcd0c7}.list-group-item-success.list-group-item-action.active{color:#fff;background-color:#0f5132;border-color:#0f5132}.list-group-item-info{color:#055160;background-color:#cff4fc}.list-group-item-info.list-group-item-action:focus,.list-group-item-info.list-group-item-action:hover{color:#055160;background-color:#badce3}.list-group-item-info.list-group-item-action.active{color:#fff;background-color:#055160;border-color:#055160}.list-group-item-warning{color:#664d03;background-color:#fff3cd}.list-group-item-warning.list-group-item-action:focus,.list-group-item-warning.list-group-item-action:hover{color:#664d03;background-color:#e6dbb9}.list-group-item-warning.list-group-item-action.active{color:#fff;background-color:#664d03;border-color:#664d03}.list-group-item-danger{color:#842029;background-color:#f8d7da}.list-group-item-danger.list-group-item-action:focus,.list-group-item-danger.list-group-item-action:hover{color:#842029;background-color:#dfc2c4}.list-group-item-danger.list-group-item-action.active{color:#fff;background-color:#842029;border-color:#842029}.list-group-item-light{color:#636464;background-color:#fefefe}.list-group-item-light.list-group-item-action:focus,.list-group-item-light.list-group-item-action:hover{color:#636464;background-color:#e5e5e5}.list-group-item-light.list-group-item-action.active{color:#fff;background-color:#636464;border-color:#636464}.list-group-item-dark{color:#141619;background-color:#d3d3d4}.list-group-item-dark.list-group-item-action:focus,.list-group-item-dark.list-group-item-action:hover{color:#141619;background-color:#bebebf}.list-group-item-dark.list-group-item-action.active{color:#fff;background-color:#141619;border-color:#141619}.btn-close{box-sizing:content-box;width:1em;height:1em;padding:.25em .25em;color:#000;background:transparent url('+y+') center/1em auto no-repeat;border:0;border-radius:.25rem;opacity:.5}.btn-close:hover{color:#000;text-decoration:none;opacity:.75}.btn-close:focus{outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25);opacity:1}.btn-close.disabled,.btn-close:disabled{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:.25}.btn-close-white{filter:invert(1) grayscale(100%) brightness(200%)}.toast{width:350px;max-width:100%;font-size:.875rem;pointer-events:auto;background-color:rgba(255,255,255,.85);background-clip:padding-box;border:1px solid rgba(0,0,0,.1);box-shadow:0 .5rem 1rem rgba(0,0,0,.15);border-radius:.25rem}.toast.showing{opacity:0}.toast:not(.show){display:none}.toast-container{width:-webkit-max-content;width:-moz-max-content;width:max-content;max-width:100%;pointer-events:none}.toast-container>:not(:last-child){margin-bottom:.75rem}.toast-header{display:flex;align-items:center;padding:.5rem .75rem;color:#6c757d;background-color:rgba(255,255,255,.85);background-clip:padding-box;border-bottom:1px solid rgba(0,0,0,.05);border-top-left-radius:calc(.25rem - 1px);border-top-right-radius:calc(.25rem - 1px)}.toast-header .btn-close{margin-right:-.375rem;margin-left:.75rem}.toast-body{padding:.75rem;word-wrap:break-word}.modal{position:fixed;top:0;left:0;z-index:1055;display:none;width:100%;height:100%;overflow-x:hidden;overflow-y:auto;outline:0}.modal-dialog{position:relative;width:auto;margin:.5rem;pointer-events:none}.modal.fade .modal-dialog{transition:transform .3s ease-out;transform:translate(0,-50px)}@media (prefers-reduced-motion:reduce){.modal.fade .modal-dialog{transition:none}}.modal.show .modal-dialog{transform:none}.modal.modal-static .modal-dialog{transform:scale(1.02)}.modal-dialog-scrollable{height:calc(100% - 1rem)}.modal-dialog-scrollable .modal-content{max-height:100%;overflow:hidden}.modal-dialog-scrollable .modal-body{overflow-y:auto}.modal-dialog-centered{display:flex;align-items:center;min-height:calc(100% - 1rem)}.modal-content{position:relative;display:flex;flex-direction:column;width:100%;pointer-events:auto;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.2);border-radius:.3rem;outline:0}.modal-backdrop{position:fixed;top:0;left:0;z-index:1050;width:100vw;height:100vh;background-color:#000}.modal-backdrop.fade{opacity:0}.modal-backdrop.show{opacity:.5}.modal-header{display:flex;flex-shrink:0;align-items:center;justify-content:space-between;padding:1rem 1rem;border-bottom:1px solid #dee2e6;border-top-left-radius:calc(.3rem - 1px);border-top-right-radius:calc(.3rem - 1px)}.modal-header .btn-close{padding:.5rem .5rem;margin:-.5rem -.5rem -.5rem auto}.modal-title{margin-bottom:0;line-height:1.5}.modal-body{position:relative;flex:1 1 auto;padding:1rem}.modal-footer{display:flex;flex-wrap:wrap;flex-shrink:0;align-items:center;justify-content:flex-end;padding:.75rem;border-top:1px solid #dee2e6;border-bottom-right-radius:calc(.3rem - 1px);border-bottom-left-radius:calc(.3rem - 1px)}.modal-footer>*{margin:.25rem}@media (min-width:576px){.modal-dialog{max-width:500px;margin:1.75rem auto}.modal-dialog-scrollable{height:calc(100% - 3.5rem)}.modal-dialog-centered{min-height:calc(100% - 3.5rem)}.modal-sm{max-width:300px}}@media (min-width:992px){.modal-lg,.modal-xl{max-width:800px}}@media (min-width:1200px){.modal-xl{max-width:1140px}}.modal-fullscreen{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen .modal-header{border-radius:0}.modal-fullscreen .modal-body{overflow-y:auto}.modal-fullscreen .modal-footer{border-radius:0}@media (max-width:575.98px){.modal-fullscreen-sm-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-sm-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-sm-down .modal-header{border-radius:0}.modal-fullscreen-sm-down .modal-body{overflow-y:auto}.modal-fullscreen-sm-down .modal-footer{border-radius:0}}@media (max-width:767.98px){.modal-fullscreen-md-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-md-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-md-down .modal-header{border-radius:0}.modal-fullscreen-md-down .modal-body{overflow-y:auto}.modal-fullscreen-md-down .modal-footer{border-radius:0}}@media (max-width:991.98px){.modal-fullscreen-lg-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-lg-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-lg-down .modal-header{border-radius:0}.modal-fullscreen-lg-down .modal-body{overflow-y:auto}.modal-fullscreen-lg-down .modal-footer{border-radius:0}}@media (max-width:1199.98px){.modal-fullscreen-xl-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-xl-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-xl-down .modal-header{border-radius:0}.modal-fullscreen-xl-down .modal-body{overflow-y:auto}.modal-fullscreen-xl-down .modal-footer{border-radius:0}}@media (max-width:1399.98px){.modal-fullscreen-xxl-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-xxl-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-xxl-down .modal-header{border-radius:0}.modal-fullscreen-xxl-down .modal-body{overflow-y:auto}.modal-fullscreen-xxl-down .modal-footer{border-radius:0}}.tooltip{position:absolute;z-index:1080;display:block;margin:0;font-family:var(--bs-font-sans-serif);font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;white-space:normal;line-break:auto;font-size:.875rem;word-wrap:break-word;opacity:0}.tooltip.show{opacity:.9}.tooltip .tooltip-arrow{position:absolute;display:block;width:.8rem;height:.4rem}.tooltip .tooltip-arrow::before{position:absolute;content:"";border-color:transparent;border-style:solid}.bs-tooltip-auto[data-popper-placement^=top],.bs-tooltip-top{padding:.4rem 0}.bs-tooltip-auto[data-popper-placement^=top] .tooltip-arrow,.bs-tooltip-top .tooltip-arrow{bottom:0}.bs-tooltip-auto[data-popper-placement^=top] .tooltip-arrow::before,.bs-tooltip-top .tooltip-arrow::before{top:-1px;border-width:.4rem .4rem 0;border-top-color:#000}.bs-tooltip-auto[data-popper-placement^=right],.bs-tooltip-end{padding:0 .4rem}.bs-tooltip-auto[data-popper-placement^=right] .tooltip-arrow,.bs-tooltip-end .tooltip-arrow{left:0;width:.4rem;height:.8rem}.bs-tooltip-auto[data-popper-placement^=right] .tooltip-arrow::before,.bs-tooltip-end .tooltip-arrow::before{right:-1px;border-width:.4rem .4rem .4rem 0;border-right-color:#000}.bs-tooltip-auto[data-popper-placement^=bottom],.bs-tooltip-bottom{padding:.4rem 0}.bs-tooltip-auto[data-popper-placement^=bottom] .tooltip-arrow,.bs-tooltip-bottom .tooltip-arrow{top:0}.bs-tooltip-auto[data-popper-placement^=bottom] .tooltip-arrow::before,.bs-tooltip-bottom .tooltip-arrow::before{bottom:-1px;border-width:0 .4rem .4rem;border-bottom-color:#000}.bs-tooltip-auto[data-popper-placement^=left],.bs-tooltip-start{padding:0 .4rem}.bs-tooltip-auto[data-popper-placement^=left] .tooltip-arrow,.bs-tooltip-start .tooltip-arrow{right:0;width:.4rem;height:.8rem}.bs-tooltip-auto[data-popper-placement^=left] .tooltip-arrow::before,.bs-tooltip-start .tooltip-arrow::before{left:-1px;border-width:.4rem 0 .4rem .4rem;border-left-color:#000}.tooltip-inner{max-width:200px;padding:.25rem .5rem;color:#fff;text-align:center;background-color:#000;border-radius:.25rem}.popover{position:absolute;top:0;left:0;z-index:1070;display:block;max-width:276px;font-family:var(--bs-font-sans-serif);font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;white-space:normal;line-break:auto;font-size:.875rem;word-wrap:break-word;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.2);border-radius:.3rem}.popover .popover-arrow{position:absolute;display:block;width:1rem;height:.5rem}.popover .popover-arrow::after,.popover .popover-arrow::before{position:absolute;display:block;content:"";border-color:transparent;border-style:solid}.bs-popover-auto[data-popper-placement^=top]>.popover-arrow,.bs-popover-top>.popover-arrow{bottom:calc(-.5rem - 1px)}.bs-popover-auto[data-popper-placement^=top]>.popover-arrow::before,.bs-popover-top>.popover-arrow::before{bottom:0;border-width:.5rem .5rem 0;border-top-color:rgba(0,0,0,.25)}.bs-popover-auto[data-popper-placement^=top]>.popover-arrow::after,.bs-popover-top>.popover-arrow::after{bottom:1px;border-width:.5rem .5rem 0;border-top-color:#fff}.bs-popover-auto[data-popper-placement^=right]>.popover-arrow,.bs-popover-end>.popover-arrow{left:calc(-.5rem - 1px);width:.5rem;height:1rem}.bs-popover-auto[data-popper-placement^=right]>.popover-arrow::before,.bs-popover-end>.popover-arrow::before{left:0;border-width:.5rem .5rem .5rem 0;border-right-color:rgba(0,0,0,.25)}.bs-popover-auto[data-popper-placement^=right]>.popover-arrow::after,.bs-popover-end>.popover-arrow::after{left:1px;border-width:.5rem .5rem .5rem 0;border-right-color:#fff}.bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow,.bs-popover-bottom>.popover-arrow{top:calc(-.5rem - 1px)}.bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow::before,.bs-popover-bottom>.popover-arrow::before{top:0;border-width:0 .5rem .5rem .5rem;border-bottom-color:rgba(0,0,0,.25)}.bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow::after,.bs-popover-bottom>.popover-arrow::after{top:1px;border-width:0 .5rem .5rem .5rem;border-bottom-color:#fff}.bs-popover-auto[data-popper-placement^=bottom] .popover-header::before,.bs-popover-bottom .popover-header::before{position:absolute;top:0;left:50%;display:block;width:1rem;margin-left:-.5rem;content:"";border-bottom:1px solid #f0f0f0}.bs-popover-auto[data-popper-placement^=left]>.popover-arrow,.bs-popover-start>.popover-arrow{right:calc(-.5rem - 1px);width:.5rem;height:1rem}.bs-popover-auto[data-popper-placement^=left]>.popover-arrow::before,.bs-popover-start>.popover-arrow::before{right:0;border-width:.5rem 0 .5rem .5rem;border-left-color:rgba(0,0,0,.25)}.bs-popover-auto[data-popper-placement^=left]>.popover-arrow::after,.bs-popover-start>.popover-arrow::after{right:1px;border-width:.5rem 0 .5rem .5rem;border-left-color:#fff}.popover-header{padding:.5rem 1rem;margin-bottom:0;font-size:1rem;background-color:#f0f0f0;border-bottom:1px solid rgba(0,0,0,.2);border-top-left-radius:calc(.3rem - 1px);border-top-right-radius:calc(.3rem - 1px)}.popover-header:empty{display:none}.popover-body{padding:1rem 1rem;color:#212529}.carousel{position:relative}.carousel.pointer-event{touch-action:pan-y}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner::after{display:block;clear:both;content:""}.carousel-item{position:relative;display:none;float:left;width:100%;margin-right:-100%;-webkit-backface-visibility:hidden;backface-visibility:hidden;transition:transform .6s ease-in-out}@media (prefers-reduced-motion:reduce){.carousel-item{transition:none}}.carousel-item-next,.carousel-item-prev,.carousel-item.active{display:block}.active.carousel-item-end,.carousel-item-next:not(.carousel-item-start){transform:translateX(100%)}.active.carousel-item-start,.carousel-item-prev:not(.carousel-item-end){transform:translateX(-100%)}.carousel-fade .carousel-item{opacity:0;transition-property:opacity;transform:none}.carousel-fade .carousel-item-next.carousel-item-start,.carousel-fade .carousel-item-prev.carousel-item-end,.carousel-fade .carousel-item.active{z-index:1;opacity:1}.carousel-fade .active.carousel-item-end,.carousel-fade .active.carousel-item-start{z-index:0;opacity:0;transition:opacity 0s .6s}@media (prefers-reduced-motion:reduce){.carousel-fade .active.carousel-item-end,.carousel-fade .active.carousel-item-start{transition:none}}.carousel-control-next,.carousel-control-prev{position:absolute;top:0;bottom:0;z-index:1;display:flex;align-items:center;justify-content:center;width:15%;padding:0;color:#fff;text-align:center;background:0 0;border:0;opacity:.5;transition:opacity .15s ease}@media (prefers-reduced-motion:reduce){.carousel-control-next,.carousel-control-prev{transition:none}}.carousel-control-next:focus,.carousel-control-next:hover,.carousel-control-prev:focus,.carousel-control-prev:hover{color:#fff;text-decoration:none;outline:0;opacity:.9}.carousel-control-prev{left:0}.carousel-control-next{right:0}.carousel-control-next-icon,.carousel-control-prev-icon{display:inline-block;width:2rem;height:2rem;background-repeat:no-repeat;background-position:50%;background-size:100% 100%}.carousel-control-prev-icon{background-image:url('+v+")}.carousel-control-next-icon{background-image:url("+x+')}.carousel-indicators{position:absolute;right:0;bottom:0;left:0;z-index:2;display:flex;justify-content:center;padding:0;margin-right:15%;margin-bottom:1rem;margin-left:15%;list-style:none}.carousel-indicators [data-bs-target]{box-sizing:content-box;flex:0 1 auto;width:30px;height:3px;padding:0;margin-right:3px;margin-left:3px;text-indent:-999px;cursor:pointer;background-color:#fff;background-clip:padding-box;border:0;border-top:10px solid transparent;border-bottom:10px solid transparent;opacity:.5;transition:opacity .6s ease}@media (prefers-reduced-motion:reduce){.carousel-indicators [data-bs-target]{transition:none}}.carousel-indicators .active{opacity:1}.carousel-caption{position:absolute;right:15%;bottom:1.25rem;left:15%;padding-top:1.25rem;padding-bottom:1.25rem;color:#fff;text-align:center}.carousel-dark .carousel-control-next-icon,.carousel-dark .carousel-control-prev-icon{filter:invert(1) grayscale(100)}.carousel-dark .carousel-indicators [data-bs-target]{background-color:#000}.carousel-dark .carousel-caption{color:#000}@-webkit-keyframes spinner-border{to{transform:rotate(360deg)}}@keyframes spinner-border{to{transform:rotate(360deg)}}.spinner-border{display:inline-block;width:2rem;height:2rem;vertical-align:-.125em;border:.25em solid currentColor;border-right-color:transparent;border-radius:50%;-webkit-animation:.75s linear infinite spinner-border;animation:.75s linear infinite spinner-border}.spinner-border-sm{width:1rem;height:1rem;border-width:.2em}@-webkit-keyframes spinner-grow{0%{transform:scale(0)}50%{opacity:1;transform:none}}@keyframes spinner-grow{0%{transform:scale(0)}50%{opacity:1;transform:none}}.spinner-grow{display:inline-block;width:2rem;height:2rem;vertical-align:-.125em;background-color:currentColor;border-radius:50%;opacity:0;-webkit-animation:.75s linear infinite spinner-grow;animation:.75s linear infinite spinner-grow}.spinner-grow-sm{width:1rem;height:1rem}@media (prefers-reduced-motion:reduce){.spinner-border,.spinner-grow{-webkit-animation-duration:1.5s;animation-duration:1.5s}}.offcanvas{position:fixed;bottom:0;z-index:1045;display:flex;flex-direction:column;max-width:100%;visibility:hidden;background-color:#fff;background-clip:padding-box;outline:0;transition:transform .3s ease-in-out}@media (prefers-reduced-motion:reduce){.offcanvas{transition:none}}.offcanvas-backdrop{position:fixed;top:0;left:0;z-index:1040;width:100vw;height:100vh;background-color:#000}.offcanvas-backdrop.fade{opacity:0}.offcanvas-backdrop.show{opacity:.5}.offcanvas-header{display:flex;align-items:center;justify-content:space-between;padding:1rem 1rem}.offcanvas-header .btn-close{padding:.5rem .5rem;margin-top:-.5rem;margin-right:-.5rem;margin-bottom:-.5rem}.offcanvas-title{margin-bottom:0;line-height:1.5}.offcanvas-body{flex-grow:1;padding:1rem 1rem;overflow-y:auto}.offcanvas-start{top:0;left:0;width:400px;border-right:1px solid rgba(0,0,0,.2);transform:translateX(-100%)}.offcanvas-end{top:0;right:0;width:400px;border-left:1px solid rgba(0,0,0,.2);transform:translateX(100%)}.offcanvas-top{top:0;right:0;left:0;height:30vh;max-height:100%;border-bottom:1px solid rgba(0,0,0,.2);transform:translateY(-100%)}.offcanvas-bottom{right:0;left:0;height:30vh;max-height:100%;border-top:1px solid rgba(0,0,0,.2);transform:translateY(100%)}.offcanvas.show{transform:none}.placeholder{display:inline-block;min-height:1em;vertical-align:middle;cursor:wait;background-color:currentColor;opacity:.5}.placeholder.btn::before{display:inline-block;content:""}.placeholder-xs{min-height:.6em}.placeholder-sm{min-height:.8em}.placeholder-lg{min-height:1.2em}.placeholder-glow .placeholder{-webkit-animation:placeholder-glow 2s ease-in-out infinite;animation:placeholder-glow 2s ease-in-out infinite}@-webkit-keyframes placeholder-glow{50%{opacity:.2}}@keyframes placeholder-glow{50%{opacity:.2}}.placeholder-wave{-webkit-mask-image:linear-gradient(130deg,#000 55%,rgba(0,0,0,0.8) 75%,#000 95%);mask-image:linear-gradient(130deg,#000 55%,rgba(0,0,0,0.8) 75%,#000 95%);-webkit-mask-size:200% 100%;mask-size:200% 100%;-webkit-animation:placeholder-wave 2s linear infinite;animation:placeholder-wave 2s linear infinite}@-webkit-keyframes placeholder-wave{100%{-webkit-mask-position:-200% 0%;mask-position:-200% 0%}}@keyframes placeholder-wave{100%{-webkit-mask-position:-200% 0%;mask-position:-200% 0%}}.clearfix::after{display:block;clear:both;content:""}.link-primary{color:#0d6efd}.link-primary:focus,.link-primary:hover{color:#0a58ca}.link-secondary{color:#6c757d}.link-secondary:focus,.link-secondary:hover{color:#565e64}.link-success{color:#198754}.link-success:focus,.link-success:hover{color:#146c43}.link-info{color:#0dcaf0}.link-info:focus,.link-info:hover{color:#3dd5f3}.link-warning{color:#ffc107}.link-warning:focus,.link-warning:hover{color:#ffcd39}.link-danger{color:#dc3545}.link-danger:focus,.link-danger:hover{color:#b02a37}.link-light{color:#f8f9fa}.link-light:focus,.link-light:hover{color:#f9fafb}.link-dark{color:#212529}.link-dark:focus,.link-dark:hover{color:#1a1e21}.ratio{position:relative;width:100%}.ratio::before{display:block;padding-top:var(--bs-aspect-ratio);content:""}.ratio>*{position:absolute;top:0;left:0;width:100%;height:100%}.ratio-1x1{--bs-aspect-ratio:100%}.ratio-4x3{--bs-aspect-ratio:75%}.ratio-16x9{--bs-aspect-ratio:56.25%}.ratio-21x9{--bs-aspect-ratio:42.8571428571%}.fixed-top{position:fixed;top:0;right:0;left:0;z-index:1030}.fixed-bottom{position:fixed;right:0;bottom:0;left:0;z-index:1030}.sticky-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}@media (min-width:576px){.sticky-sm-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}}@media (min-width:768px){.sticky-md-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}}@media (min-width:992px){.sticky-lg-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}}@media (min-width:1200px){.sticky-xl-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}}@media (min-width:1400px){.sticky-xxl-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}}.hstack{display:flex;flex-direction:row;align-items:center;align-self:stretch}.vstack{display:flex;flex:1 1 auto;flex-direction:column;align-self:stretch}.visually-hidden,.visually-hidden-focusable:not(:focus):not(:focus-within){position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}.stretched-link::after{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;content:""}.text-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vr{display:inline-block;align-self:stretch;width:1px;min-height:1em;background-color:currentColor;opacity:.25}.align-baseline{vertical-align:baseline!important}.align-top{vertical-align:top!important}.align-middle{vertical-align:middle!important}.align-bottom{vertical-align:bottom!important}.align-text-bottom{vertical-align:text-bottom!important}.align-text-top{vertical-align:text-top!important}.float-start{float:left!important}.float-end{float:right!important}.float-none{float:none!important}.opacity-0{opacity:0!important}.opacity-25{opacity:.25!important}.opacity-50{opacity:.5!important}.opacity-75{opacity:.75!important}.opacity-100{opacity:1!important}.overflow-auto{overflow:auto!important}.overflow-hidden{overflow:hidden!important}.overflow-visible{overflow:visible!important}.overflow-scroll{overflow:scroll!important}.d-inline{display:inline!important}.d-inline-block{display:inline-block!important}.d-block{display:block!important}.d-grid{display:grid!important}.d-table{display:table!important}.d-table-row{display:table-row!important}.d-table-cell{display:table-cell!important}.d-flex{display:flex!important}.d-inline-flex{display:inline-flex!important}.d-none{display:none!important}.shadow{box-shadow:0 .5rem 1rem rgba(0,0,0,.15)!important}.shadow-sm{box-shadow:0 .125rem .25rem rgba(0,0,0,.075)!important}.shadow-lg{box-shadow:0 1rem 3rem rgba(0,0,0,.175)!important}.shadow-none{box-shadow:none!important}.position-static{position:static!important}.position-relative{position:relative!important}.position-absolute{position:absolute!important}.position-fixed{position:fixed!important}.position-sticky{position:-webkit-sticky!important;position:sticky!important}.top-0{top:0!important}.top-50{top:50%!important}.top-100{top:100%!important}.bottom-0{bottom:0!important}.bottom-50{bottom:50%!important}.bottom-100{bottom:100%!important}.start-0{left:0!important}.start-50{left:50%!important}.start-100{left:100%!important}.end-0{right:0!important}.end-50{right:50%!important}.end-100{right:100%!important}.translate-middle{transform:translate(-50%,-50%)!important}.translate-middle-x{transform:translateX(-50%)!important}.translate-middle-y{transform:translateY(-50%)!important}.border{border:1px solid #dee2e6!important}.border-0{border:0!important}.border-top{border-top:1px solid #dee2e6!important}.border-top-0{border-top:0!important}.border-end{border-right:1px solid #dee2e6!important}.border-end-0{border-right:0!important}.border-bottom{border-bottom:1px solid #dee2e6!important}.border-bottom-0{border-bottom:0!important}.border-start{border-left:1px solid #dee2e6!important}.border-start-0{border-left:0!important}.border-primary{border-color:#0d6efd!important}.border-secondary{border-color:#6c757d!important}.border-success{border-color:#198754!important}.border-info{border-color:#0dcaf0!important}.border-warning{border-color:#ffc107!important}.border-danger{border-color:#dc3545!important}.border-light{border-color:#f8f9fa!important}.border-dark{border-color:#212529!important}.border-white{border-color:#fff!important}.border-1{border-width:1px!important}.border-2{border-width:2px!important}.border-3{border-width:3px!important}.border-4{border-width:4px!important}.border-5{border-width:5px!important}.w-25{width:25%!important}.w-50{width:50%!important}.w-75{width:75%!important}.w-100{width:100%!important}.w-auto{width:auto!important}.mw-100{max-width:100%!important}.vw-100{width:100vw!important}.min-vw-100{min-width:100vw!important}.h-25{height:25%!important}.h-50{height:50%!important}.h-75{height:75%!important}.h-100{height:100%!important}.h-auto{height:auto!important}.mh-100{max-height:100%!important}.vh-100{height:100vh!important}.min-vh-100{min-height:100vh!important}.flex-fill{flex:1 1 auto!important}.flex-row{flex-direction:row!important}.flex-column{flex-direction:column!important}.flex-row-reverse{flex-direction:row-reverse!important}.flex-column-reverse{flex-direction:column-reverse!important}.flex-grow-0{flex-grow:0!important}.flex-grow-1{flex-grow:1!important}.flex-shrink-0{flex-shrink:0!important}.flex-shrink-1{flex-shrink:1!important}.flex-wrap{flex-wrap:wrap!important}.flex-nowrap{flex-wrap:nowrap!important}.flex-wrap-reverse{flex-wrap:wrap-reverse!important}.gap-0{gap:0!important}.gap-1{gap:.25rem!important}.gap-2{gap:.5rem!important}.gap-3{gap:1rem!important}.gap-4{gap:1.5rem!important}.gap-5{gap:3rem!important}.justify-content-start{justify-content:flex-start!important}.justify-content-end{justify-content:flex-end!important}.justify-content-center{justify-content:center!important}.justify-content-between{justify-content:space-between!important}.justify-content-around{justify-content:space-around!important}.justify-content-evenly{justify-content:space-evenly!important}.align-items-start{align-items:flex-start!important}.align-items-end{align-items:flex-end!important}.align-items-center{align-items:center!important}.align-items-baseline{align-items:baseline!important}.align-items-stretch{align-items:stretch!important}.align-content-start{align-content:flex-start!important}.align-content-end{align-content:flex-end!important}.align-content-center{align-content:center!important}.align-content-between{align-content:space-between!important}.align-content-around{align-content:space-around!important}.align-content-stretch{align-content:stretch!important}.align-self-auto{align-self:auto!important}.align-self-start{align-self:flex-start!important}.align-self-end{align-self:flex-end!important}.align-self-center{align-self:center!important}.align-self-baseline{align-self:baseline!important}.align-self-stretch{align-self:stretch!important}.order-first{order:-1!important}.order-0{order:0!important}.order-1{order:1!important}.order-2{order:2!important}.order-3{order:3!important}.order-4{order:4!important}.order-5{order:5!important}.order-last{order:6!important}.m-0{margin:0!important}.m-1{margin:.25rem!important}.m-2{margin:.5rem!important}.m-3{margin:1rem!important}.m-4{margin:1.5rem!important}.m-5{margin:3rem!important}.m-auto{margin:auto!important}.mx-0{margin-right:0!important;margin-left:0!important}.mx-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-3{margin-right:1rem!important;margin-left:1rem!important}.mx-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-5{margin-right:3rem!important;margin-left:3rem!important}.mx-auto{margin-right:auto!important;margin-left:auto!important}.my-0{margin-top:0!important;margin-bottom:0!important}.my-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-0{margin-top:0!important}.mt-1{margin-top:.25rem!important}.mt-2{margin-top:.5rem!important}.mt-3{margin-top:1rem!important}.mt-4{margin-top:1.5rem!important}.mt-5{margin-top:3rem!important}.mt-auto{margin-top:auto!important}.me-0{margin-right:0!important}.me-1{margin-right:.25rem!important}.me-2{margin-right:.5rem!important}.me-3{margin-right:1rem!important}.me-4{margin-right:1.5rem!important}.me-5{margin-right:3rem!important}.me-auto{margin-right:auto!important}.mb-0{margin-bottom:0!important}.mb-1{margin-bottom:.25rem!important}.mb-2{margin-bottom:.5rem!important}.mb-3{margin-bottom:1rem!important}.mb-4{margin-bottom:1.5rem!important}.mb-5{margin-bottom:3rem!important}.mb-auto{margin-bottom:auto!important}.ms-0{margin-left:0!important}.ms-1{margin-left:.25rem!important}.ms-2{margin-left:.5rem!important}.ms-3{margin-left:1rem!important}.ms-4{margin-left:1.5rem!important}.ms-5{margin-left:3rem!important}.ms-auto{margin-left:auto!important}.p-0{padding:0!important}.p-1{padding:.25rem!important}.p-2{padding:.5rem!important}.p-3{padding:1rem!important}.p-4{padding:1.5rem!important}.p-5{padding:3rem!important}.px-0{padding-right:0!important;padding-left:0!important}.px-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-3{padding-right:1rem!important;padding-left:1rem!important}.px-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-5{padding-right:3rem!important;padding-left:3rem!important}.py-0{padding-top:0!important;padding-bottom:0!important}.py-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-0{padding-top:0!important}.pt-1{padding-top:.25rem!important}.pt-2{padding-top:.5rem!important}.pt-3{padding-top:1rem!important}.pt-4{padding-top:1.5rem!important}.pt-5{padding-top:3rem!important}.pe-0{padding-right:0!important}.pe-1{padding-right:.25rem!important}.pe-2{padding-right:.5rem!important}.pe-3{padding-right:1rem!important}.pe-4{padding-right:1.5rem!important}.pe-5{padding-right:3rem!important}.pb-0{padding-bottom:0!important}.pb-1{padding-bottom:.25rem!important}.pb-2{padding-bottom:.5rem!important}.pb-3{padding-bottom:1rem!important}.pb-4{padding-bottom:1.5rem!important}.pb-5{padding-bottom:3rem!important}.ps-0{padding-left:0!important}.ps-1{padding-left:.25rem!important}.ps-2{padding-left:.5rem!important}.ps-3{padding-left:1rem!important}.ps-4{padding-left:1.5rem!important}.ps-5{padding-left:3rem!important}.font-monospace{font-family:var(--bs-font-monospace)!important}.fs-1{font-size:calc(1.375rem + 1.5vw)!important}.fs-2{font-size:calc(1.325rem + .9vw)!important}.fs-3{font-size:calc(1.3rem + .6vw)!important}.fs-4{font-size:calc(1.275rem + .3vw)!important}.fs-5{font-size:1.25rem!important}.fs-6{font-size:1rem!important}.fst-italic{font-style:italic!important}.fst-normal{font-style:normal!important}.fw-light{font-weight:300!important}.fw-lighter{font-weight:lighter!important}.fw-normal{font-weight:400!important}.fw-bold{font-weight:700!important}.fw-bolder{font-weight:bolder!important}.lh-1{line-height:1!important}.lh-sm{line-height:1.25!important}.lh-base{line-height:1.5!important}.lh-lg{line-height:2!important}.text-start{text-align:left!important}.text-end{text-align:right!important}.text-center{text-align:center!important}.text-decoration-none{text-decoration:none!important}.text-decoration-underline{text-decoration:underline!important}.text-decoration-line-through{text-decoration:line-through!important}.text-lowercase{text-transform:lowercase!important}.text-uppercase{text-transform:uppercase!important}.text-capitalize{text-transform:capitalize!important}.text-wrap{white-space:normal!important}.text-nowrap{white-space:nowrap!important}.text-break{word-wrap:break-word!important;word-break:break-word!important}.text-primary{--bs-text-opacity:1;color:rgba(var(--bs-primary-rgb),var(--bs-text-opacity))!important}.text-secondary{--bs-text-opacity:1;color:rgba(var(--bs-secondary-rgb),var(--bs-text-opacity))!important}.text-success{--bs-text-opacity:1;color:rgba(var(--bs-success-rgb),var(--bs-text-opacity))!important}.text-info{--bs-text-opacity:1;color:rgba(var(--bs-info-rgb),var(--bs-text-opacity))!important}.text-warning{--bs-text-opacity:1;color:rgba(var(--bs-warning-rgb),var(--bs-text-opacity))!important}.text-danger{--bs-text-opacity:1;color:rgba(var(--bs-danger-rgb),var(--bs-text-opacity))!important}.text-light{--bs-text-opacity:1;color:rgba(var(--bs-light-rgb),var(--bs-text-opacity))!important}.text-dark{--bs-text-opacity:1;color:rgba(var(--bs-dark-rgb),var(--bs-text-opacity))!important}.text-black{--bs-text-opacity:1;color:rgba(var(--bs-black-rgb),var(--bs-text-opacity))!important}.text-white{--bs-text-opacity:1;color:rgba(var(--bs-white-rgb),var(--bs-text-opacity))!important}.text-body{--bs-text-opacity:1;color:rgba(var(--bs-body-color-rgb),var(--bs-text-opacity))!important}.text-muted{--bs-text-opacity:1;color:#6c757d!important}.text-black-50{--bs-text-opacity:1;color:rgba(0,0,0,.5)!important}.text-white-50{--bs-text-opacity:1;color:rgba(255,255,255,.5)!important}.text-reset{--bs-text-opacity:1;color:inherit!important}.text-opacity-25{--bs-text-opacity:0.25}.text-opacity-50{--bs-text-opacity:0.5}.text-opacity-75{--bs-text-opacity:0.75}.text-opacity-100{--bs-text-opacity:1}.bg-primary{--bs-bg-opacity:1;background-color:rgba(var(--bs-primary-rgb),var(--bs-bg-opacity))!important}.bg-secondary{--bs-bg-opacity:1;background-color:rgba(var(--bs-secondary-rgb),var(--bs-bg-opacity))!important}.bg-success{--bs-bg-opacity:1;background-color:rgba(var(--bs-success-rgb),var(--bs-bg-opacity))!important}.bg-info{--bs-bg-opacity:1;background-color:rgba(var(--bs-info-rgb),var(--bs-bg-opacity))!important}.bg-warning{--bs-bg-opacity:1;background-color:rgba(var(--bs-warning-rgb),var(--bs-bg-opacity))!important}.bg-danger{--bs-bg-opacity:1;background-color:rgba(var(--bs-danger-rgb),var(--bs-bg-opacity))!important}.bg-light{--bs-bg-opacity:1;background-color:rgba(var(--bs-light-rgb),var(--bs-bg-opacity))!important}.bg-dark{--bs-bg-opacity:1;background-color:rgba(var(--bs-dark-rgb),var(--bs-bg-opacity))!important}.bg-black{--bs-bg-opacity:1;background-color:rgba(var(--bs-black-rgb),var(--bs-bg-opacity))!important}.bg-white{--bs-bg-opacity:1;background-color:rgba(var(--bs-white-rgb),var(--bs-bg-opacity))!important}.bg-body{--bs-bg-opacity:1;background-color:rgba(var(--bs-body-bg-rgb),var(--bs-bg-opacity))!important}.bg-transparent{--bs-bg-opacity:1;background-color:transparent!important}.bg-opacity-10{--bs-bg-opacity:0.1}.bg-opacity-25{--bs-bg-opacity:0.25}.bg-opacity-50{--bs-bg-opacity:0.5}.bg-opacity-75{--bs-bg-opacity:0.75}.bg-opacity-100{--bs-bg-opacity:1}.bg-gradient{background-image:var(--bs-gradient)!important}.user-select-all{-webkit-user-select:all!important;-moz-user-select:all!important;user-select:all!important}.user-select-auto{-webkit-user-select:auto!important;-moz-user-select:auto!important;user-select:auto!important}.user-select-none{-webkit-user-select:none!important;-moz-user-select:none!important;user-select:none!important}.pe-none{pointer-events:none!important}.pe-auto{pointer-events:auto!important}.rounded{border-radius:.25rem!important}.rounded-0{border-radius:0!important}.rounded-1{border-radius:.2rem!important}.rounded-2{border-radius:.25rem!important}.rounded-3{border-radius:.3rem!important}.rounded-circle{border-radius:50%!important}.rounded-pill{border-radius:50rem!important}.rounded-top{border-top-left-radius:.25rem!important;border-top-right-radius:.25rem!important}.rounded-end{border-top-right-radius:.25rem!important;border-bottom-right-radius:.25rem!important}.rounded-bottom{border-bottom-right-radius:.25rem!important;border-bottom-left-radius:.25rem!important}.rounded-start{border-bottom-left-radius:.25rem!important;border-top-left-radius:.25rem!important}.visible{visibility:visible!important}.invisible{visibility:hidden!important}@media (min-width:576px){.float-sm-start{float:left!important}.float-sm-end{float:right!important}.float-sm-none{float:none!important}.d-sm-inline{display:inline!important}.d-sm-inline-block{display:inline-block!important}.d-sm-block{display:block!important}.d-sm-grid{display:grid!important}.d-sm-table{display:table!important}.d-sm-table-row{display:table-row!important}.d-sm-table-cell{display:table-cell!important}.d-sm-flex{display:flex!important}.d-sm-inline-flex{display:inline-flex!important}.d-sm-none{display:none!important}.flex-sm-fill{flex:1 1 auto!important}.flex-sm-row{flex-direction:row!important}.flex-sm-column{flex-direction:column!important}.flex-sm-row-reverse{flex-direction:row-reverse!important}.flex-sm-column-reverse{flex-direction:column-reverse!important}.flex-sm-grow-0{flex-grow:0!important}.flex-sm-grow-1{flex-grow:1!important}.flex-sm-shrink-0{flex-shrink:0!important}.flex-sm-shrink-1{flex-shrink:1!important}.flex-sm-wrap{flex-wrap:wrap!important}.flex-sm-nowrap{flex-wrap:nowrap!important}.flex-sm-wrap-reverse{flex-wrap:wrap-reverse!important}.gap-sm-0{gap:0!important}.gap-sm-1{gap:.25rem!important}.gap-sm-2{gap:.5rem!important}.gap-sm-3{gap:1rem!important}.gap-sm-4{gap:1.5rem!important}.gap-sm-5{gap:3rem!important}.justify-content-sm-start{justify-content:flex-start!important}.justify-content-sm-end{justify-content:flex-end!important}.justify-content-sm-center{justify-content:center!important}.justify-content-sm-between{justify-content:space-between!important}.justify-content-sm-around{justify-content:space-around!important}.justify-content-sm-evenly{justify-content:space-evenly!important}.align-items-sm-start{align-items:flex-start!important}.align-items-sm-end{align-items:flex-end!important}.align-items-sm-center{align-items:center!important}.align-items-sm-baseline{align-items:baseline!important}.align-items-sm-stretch{align-items:stretch!important}.align-content-sm-start{align-content:flex-start!important}.align-content-sm-end{align-content:flex-end!important}.align-content-sm-center{align-content:center!important}.align-content-sm-between{align-content:space-between!important}.align-content-sm-around{align-content:space-around!important}.align-content-sm-stretch{align-content:stretch!important}.align-self-sm-auto{align-self:auto!important}.align-self-sm-start{align-self:flex-start!important}.align-self-sm-end{align-self:flex-end!important}.align-self-sm-center{align-self:center!important}.align-self-sm-baseline{align-self:baseline!important}.align-self-sm-stretch{align-self:stretch!important}.order-sm-first{order:-1!important}.order-sm-0{order:0!important}.order-sm-1{order:1!important}.order-sm-2{order:2!important}.order-sm-3{order:3!important}.order-sm-4{order:4!important}.order-sm-5{order:5!important}.order-sm-last{order:6!important}.m-sm-0{margin:0!important}.m-sm-1{margin:.25rem!important}.m-sm-2{margin:.5rem!important}.m-sm-3{margin:1rem!important}.m-sm-4{margin:1.5rem!important}.m-sm-5{margin:3rem!important}.m-sm-auto{margin:auto!important}.mx-sm-0{margin-right:0!important;margin-left:0!important}.mx-sm-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-sm-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-sm-3{margin-right:1rem!important;margin-left:1rem!important}.mx-sm-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-sm-5{margin-right:3rem!important;margin-left:3rem!important}.mx-sm-auto{margin-right:auto!important;margin-left:auto!important}.my-sm-0{margin-top:0!important;margin-bottom:0!important}.my-sm-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-sm-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-sm-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-sm-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-sm-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-sm-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-sm-0{margin-top:0!important}.mt-sm-1{margin-top:.25rem!important}.mt-sm-2{margin-top:.5rem!important}.mt-sm-3{margin-top:1rem!important}.mt-sm-4{margin-top:1.5rem!important}.mt-sm-5{margin-top:3rem!important}.mt-sm-auto{margin-top:auto!important}.me-sm-0{margin-right:0!important}.me-sm-1{margin-right:.25rem!important}.me-sm-2{margin-right:.5rem!important}.me-sm-3{margin-right:1rem!important}.me-sm-4{margin-right:1.5rem!important}.me-sm-5{margin-right:3rem!important}.me-sm-auto{margin-right:auto!important}.mb-sm-0{margin-bottom:0!important}.mb-sm-1{margin-bottom:.25rem!important}.mb-sm-2{margin-bottom:.5rem!important}.mb-sm-3{margin-bottom:1rem!important}.mb-sm-4{margin-bottom:1.5rem!important}.mb-sm-5{margin-bottom:3rem!important}.mb-sm-auto{margin-bottom:auto!important}.ms-sm-0{margin-left:0!important}.ms-sm-1{margin-left:.25rem!important}.ms-sm-2{margin-left:.5rem!important}.ms-sm-3{margin-left:1rem!important}.ms-sm-4{margin-left:1.5rem!important}.ms-sm-5{margin-left:3rem!important}.ms-sm-auto{margin-left:auto!important}.p-sm-0{padding:0!important}.p-sm-1{padding:.25rem!important}.p-sm-2{padding:.5rem!important}.p-sm-3{padding:1rem!important}.p-sm-4{padding:1.5rem!important}.p-sm-5{padding:3rem!important}.px-sm-0{padding-right:0!important;padding-left:0!important}.px-sm-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-sm-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-sm-3{padding-right:1rem!important;padding-left:1rem!important}.px-sm-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-sm-5{padding-right:3rem!important;padding-left:3rem!important}.py-sm-0{padding-top:0!important;padding-bottom:0!important}.py-sm-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-sm-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-sm-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-sm-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-sm-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-sm-0{padding-top:0!important}.pt-sm-1{padding-top:.25rem!important}.pt-sm-2{padding-top:.5rem!important}.pt-sm-3{padding-top:1rem!important}.pt-sm-4{padding-top:1.5rem!important}.pt-sm-5{padding-top:3rem!important}.pe-sm-0{padding-right:0!important}.pe-sm-1{padding-right:.25rem!important}.pe-sm-2{padding-right:.5rem!important}.pe-sm-3{padding-right:1rem!important}.pe-sm-4{padding-right:1.5rem!important}.pe-sm-5{padding-right:3rem!important}.pb-sm-0{padding-bottom:0!important}.pb-sm-1{padding-bottom:.25rem!important}.pb-sm-2{padding-bottom:.5rem!important}.pb-sm-3{padding-bottom:1rem!important}.pb-sm-4{padding-bottom:1.5rem!important}.pb-sm-5{padding-bottom:3rem!important}.ps-sm-0{padding-left:0!important}.ps-sm-1{padding-left:.25rem!important}.ps-sm-2{padding-left:.5rem!important}.ps-sm-3{padding-left:1rem!important}.ps-sm-4{padding-left:1.5rem!important}.ps-sm-5{padding-left:3rem!important}.text-sm-start{text-align:left!important}.text-sm-end{text-align:right!important}.text-sm-center{text-align:center!important}}@media (min-width:768px){.float-md-start{float:left!important}.float-md-end{float:right!important}.float-md-none{float:none!important}.d-md-inline{display:inline!important}.d-md-inline-block{display:inline-block!important}.d-md-block{display:block!important}.d-md-grid{display:grid!important}.d-md-table{display:table!important}.d-md-table-row{display:table-row!important}.d-md-table-cell{display:table-cell!important}.d-md-flex{display:flex!important}.d-md-inline-flex{display:inline-flex!important}.d-md-none{display:none!important}.flex-md-fill{flex:1 1 auto!important}.flex-md-row{flex-direction:row!important}.flex-md-column{flex-direction:column!important}.flex-md-row-reverse{flex-direction:row-reverse!important}.flex-md-column-reverse{flex-direction:column-reverse!important}.flex-md-grow-0{flex-grow:0!important}.flex-md-grow-1{flex-grow:1!important}.flex-md-shrink-0{flex-shrink:0!important}.flex-md-shrink-1{flex-shrink:1!important}.flex-md-wrap{flex-wrap:wrap!important}.flex-md-nowrap{flex-wrap:nowrap!important}.flex-md-wrap-reverse{flex-wrap:wrap-reverse!important}.gap-md-0{gap:0!important}.gap-md-1{gap:.25rem!important}.gap-md-2{gap:.5rem!important}.gap-md-3{gap:1rem!important}.gap-md-4{gap:1.5rem!important}.gap-md-5{gap:3rem!important}.justify-content-md-start{justify-content:flex-start!important}.justify-content-md-end{justify-content:flex-end!important}.justify-content-md-center{justify-content:center!important}.justify-content-md-between{justify-content:space-between!important}.justify-content-md-around{justify-content:space-around!important}.justify-content-md-evenly{justify-content:space-evenly!important}.align-items-md-start{align-items:flex-start!important}.align-items-md-end{align-items:flex-end!important}.align-items-md-center{align-items:center!important}.align-items-md-baseline{align-items:baseline!important}.align-items-md-stretch{align-items:stretch!important}.align-content-md-start{align-content:flex-start!important}.align-content-md-end{align-content:flex-end!important}.align-content-md-center{align-content:center!important}.align-content-md-between{align-content:space-between!important}.align-content-md-around{align-content:space-around!important}.align-content-md-stretch{align-content:stretch!important}.align-self-md-auto{align-self:auto!important}.align-self-md-start{align-self:flex-start!important}.align-self-md-end{align-self:flex-end!important}.align-self-md-center{align-self:center!important}.align-self-md-baseline{align-self:baseline!important}.align-self-md-stretch{align-self:stretch!important}.order-md-first{order:-1!important}.order-md-0{order:0!important}.order-md-1{order:1!important}.order-md-2{order:2!important}.order-md-3{order:3!important}.order-md-4{order:4!important}.order-md-5{order:5!important}.order-md-last{order:6!important}.m-md-0{margin:0!important}.m-md-1{margin:.25rem!important}.m-md-2{margin:.5rem!important}.m-md-3{margin:1rem!important}.m-md-4{margin:1.5rem!important}.m-md-5{margin:3rem!important}.m-md-auto{margin:auto!important}.mx-md-0{margin-right:0!important;margin-left:0!important}.mx-md-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-md-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-md-3{margin-right:1rem!important;margin-left:1rem!important}.mx-md-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-md-5{margin-right:3rem!important;margin-left:3rem!important}.mx-md-auto{margin-right:auto!important;margin-left:auto!important}.my-md-0{margin-top:0!important;margin-bottom:0!important}.my-md-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-md-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-md-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-md-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-md-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-md-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-md-0{margin-top:0!important}.mt-md-1{margin-top:.25rem!important}.mt-md-2{margin-top:.5rem!important}.mt-md-3{margin-top:1rem!important}.mt-md-4{margin-top:1.5rem!important}.mt-md-5{margin-top:3rem!important}.mt-md-auto{margin-top:auto!important}.me-md-0{margin-right:0!important}.me-md-1{margin-right:.25rem!important}.me-md-2{margin-right:.5rem!important}.me-md-3{margin-right:1rem!important}.me-md-4{margin-right:1.5rem!important}.me-md-5{margin-right:3rem!important}.me-md-auto{margin-right:auto!important}.mb-md-0{margin-bottom:0!important}.mb-md-1{margin-bottom:.25rem!important}.mb-md-2{margin-bottom:.5rem!important}.mb-md-3{margin-bottom:1rem!important}.mb-md-4{margin-bottom:1.5rem!important}.mb-md-5{margin-bottom:3rem!important}.mb-md-auto{margin-bottom:auto!important}.ms-md-0{margin-left:0!important}.ms-md-1{margin-left:.25rem!important}.ms-md-2{margin-left:.5rem!important}.ms-md-3{margin-left:1rem!important}.ms-md-4{margin-left:1.5rem!important}.ms-md-5{margin-left:3rem!important}.ms-md-auto{margin-left:auto!important}.p-md-0{padding:0!important}.p-md-1{padding:.25rem!important}.p-md-2{padding:.5rem!important}.p-md-3{padding:1rem!important}.p-md-4{padding:1.5rem!important}.p-md-5{padding:3rem!important}.px-md-0{padding-right:0!important;padding-left:0!important}.px-md-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-md-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-md-3{padding-right:1rem!important;padding-left:1rem!important}.px-md-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-md-5{padding-right:3rem!important;padding-left:3rem!important}.py-md-0{padding-top:0!important;padding-bottom:0!important}.py-md-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-md-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-md-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-md-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-md-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-md-0{padding-top:0!important}.pt-md-1{padding-top:.25rem!important}.pt-md-2{padding-top:.5rem!important}.pt-md-3{padding-top:1rem!important}.pt-md-4{padding-top:1.5rem!important}.pt-md-5{padding-top:3rem!important}.pe-md-0{padding-right:0!important}.pe-md-1{padding-right:.25rem!important}.pe-md-2{padding-right:.5rem!important}.pe-md-3{padding-right:1rem!important}.pe-md-4{padding-right:1.5rem!important}.pe-md-5{padding-right:3rem!important}.pb-md-0{padding-bottom:0!important}.pb-md-1{padding-bottom:.25rem!important}.pb-md-2{padding-bottom:.5rem!important}.pb-md-3{padding-bottom:1rem!important}.pb-md-4{padding-bottom:1.5rem!important}.pb-md-5{padding-bottom:3rem!important}.ps-md-0{padding-left:0!important}.ps-md-1{padding-left:.25rem!important}.ps-md-2{padding-left:.5rem!important}.ps-md-3{padding-left:1rem!important}.ps-md-4{padding-left:1.5rem!important}.ps-md-5{padding-left:3rem!important}.text-md-start{text-align:left!important}.text-md-end{text-align:right!important}.text-md-center{text-align:center!important}}@media (min-width:992px){.float-lg-start{float:left!important}.float-lg-end{float:right!important}.float-lg-none{float:none!important}.d-lg-inline{display:inline!important}.d-lg-inline-block{display:inline-block!important}.d-lg-block{display:block!important}.d-lg-grid{display:grid!important}.d-lg-table{display:table!important}.d-lg-table-row{display:table-row!important}.d-lg-table-cell{display:table-cell!important}.d-lg-flex{display:flex!important}.d-lg-inline-flex{display:inline-flex!important}.d-lg-none{display:none!important}.flex-lg-fill{flex:1 1 auto!important}.flex-lg-row{flex-direction:row!important}.flex-lg-column{flex-direction:column!important}.flex-lg-row-reverse{flex-direction:row-reverse!important}.flex-lg-column-reverse{flex-direction:column-reverse!important}.flex-lg-grow-0{flex-grow:0!important}.flex-lg-grow-1{flex-grow:1!important}.flex-lg-shrink-0{flex-shrink:0!important}.flex-lg-shrink-1{flex-shrink:1!important}.flex-lg-wrap{flex-wrap:wrap!important}.flex-lg-nowrap{flex-wrap:nowrap!important}.flex-lg-wrap-reverse{flex-wrap:wrap-reverse!important}.gap-lg-0{gap:0!important}.gap-lg-1{gap:.25rem!important}.gap-lg-2{gap:.5rem!important}.gap-lg-3{gap:1rem!important}.gap-lg-4{gap:1.5rem!important}.gap-lg-5{gap:3rem!important}.justify-content-lg-start{justify-content:flex-start!important}.justify-content-lg-end{justify-content:flex-end!important}.justify-content-lg-center{justify-content:center!important}.justify-content-lg-between{justify-content:space-between!important}.justify-content-lg-around{justify-content:space-around!important}.justify-content-lg-evenly{justify-content:space-evenly!important}.align-items-lg-start{align-items:flex-start!important}.align-items-lg-end{align-items:flex-end!important}.align-items-lg-center{align-items:center!important}.align-items-lg-baseline{align-items:baseline!important}.align-items-lg-stretch{align-items:stretch!important}.align-content-lg-start{align-content:flex-start!important}.align-content-lg-end{align-content:flex-end!important}.align-content-lg-center{align-content:center!important}.align-content-lg-between{align-content:space-between!important}.align-content-lg-around{align-content:space-around!important}.align-content-lg-stretch{align-content:stretch!important}.align-self-lg-auto{align-self:auto!important}.align-self-lg-start{align-self:flex-start!important}.align-self-lg-end{align-self:flex-end!important}.align-self-lg-center{align-self:center!important}.align-self-lg-baseline{align-self:baseline!important}.align-self-lg-stretch{align-self:stretch!important}.order-lg-first{order:-1!important}.order-lg-0{order:0!important}.order-lg-1{order:1!important}.order-lg-2{order:2!important}.order-lg-3{order:3!important}.order-lg-4{order:4!important}.order-lg-5{order:5!important}.order-lg-last{order:6!important}.m-lg-0{margin:0!important}.m-lg-1{margin:.25rem!important}.m-lg-2{margin:.5rem!important}.m-lg-3{margin:1rem!important}.m-lg-4{margin:1.5rem!important}.m-lg-5{margin:3rem!important}.m-lg-auto{margin:auto!important}.mx-lg-0{margin-right:0!important;margin-left:0!important}.mx-lg-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-lg-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-lg-3{margin-right:1rem!important;margin-left:1rem!important}.mx-lg-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-lg-5{margin-right:3rem!important;margin-left:3rem!important}.mx-lg-auto{margin-right:auto!important;margin-left:auto!important}.my-lg-0{margin-top:0!important;margin-bottom:0!important}.my-lg-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-lg-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-lg-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-lg-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-lg-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-lg-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-lg-0{margin-top:0!important}.mt-lg-1{margin-top:.25rem!important}.mt-lg-2{margin-top:.5rem!important}.mt-lg-3{margin-top:1rem!important}.mt-lg-4{margin-top:1.5rem!important}.mt-lg-5{margin-top:3rem!important}.mt-lg-auto{margin-top:auto!important}.me-lg-0{margin-right:0!important}.me-lg-1{margin-right:.25rem!important}.me-lg-2{margin-right:.5rem!important}.me-lg-3{margin-right:1rem!important}.me-lg-4{margin-right:1.5rem!important}.me-lg-5{margin-right:3rem!important}.me-lg-auto{margin-right:auto!important}.mb-lg-0{margin-bottom:0!important}.mb-lg-1{margin-bottom:.25rem!important}.mb-lg-2{margin-bottom:.5rem!important}.mb-lg-3{margin-bottom:1rem!important}.mb-lg-4{margin-bottom:1.5rem!important}.mb-lg-5{margin-bottom:3rem!important}.mb-lg-auto{margin-bottom:auto!important}.ms-lg-0{margin-left:0!important}.ms-lg-1{margin-left:.25rem!important}.ms-lg-2{margin-left:.5rem!important}.ms-lg-3{margin-left:1rem!important}.ms-lg-4{margin-left:1.5rem!important}.ms-lg-5{margin-left:3rem!important}.ms-lg-auto{margin-left:auto!important}.p-lg-0{padding:0!important}.p-lg-1{padding:.25rem!important}.p-lg-2{padding:.5rem!important}.p-lg-3{padding:1rem!important}.p-lg-4{padding:1.5rem!important}.p-lg-5{padding:3rem!important}.px-lg-0{padding-right:0!important;padding-left:0!important}.px-lg-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-lg-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-lg-3{padding-right:1rem!important;padding-left:1rem!important}.px-lg-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-lg-5{padding-right:3rem!important;padding-left:3rem!important}.py-lg-0{padding-top:0!important;padding-bottom:0!important}.py-lg-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-lg-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-lg-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-lg-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-lg-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-lg-0{padding-top:0!important}.pt-lg-1{padding-top:.25rem!important}.pt-lg-2{padding-top:.5rem!important}.pt-lg-3{padding-top:1rem!important}.pt-lg-4{padding-top:1.5rem!important}.pt-lg-5{padding-top:3rem!important}.pe-lg-0{padding-right:0!important}.pe-lg-1{padding-right:.25rem!important}.pe-lg-2{padding-right:.5rem!important}.pe-lg-3{padding-right:1rem!important}.pe-lg-4{padding-right:1.5rem!important}.pe-lg-5{padding-right:3rem!important}.pb-lg-0{padding-bottom:0!important}.pb-lg-1{padding-bottom:.25rem!important}.pb-lg-2{padding-bottom:.5rem!important}.pb-lg-3{padding-bottom:1rem!important}.pb-lg-4{padding-bottom:1.5rem!important}.pb-lg-5{padding-bottom:3rem!important}.ps-lg-0{padding-left:0!important}.ps-lg-1{padding-left:.25rem!important}.ps-lg-2{padding-left:.5rem!important}.ps-lg-3{padding-left:1rem!important}.ps-lg-4{padding-left:1.5rem!important}.ps-lg-5{padding-left:3rem!important}.text-lg-start{text-align:left!important}.text-lg-end{text-align:right!important}.text-lg-center{text-align:center!important}}@media (min-width:1200px){.float-xl-start{float:left!important}.float-xl-end{float:right!important}.float-xl-none{float:none!important}.d-xl-inline{display:inline!important}.d-xl-inline-block{display:inline-block!important}.d-xl-block{display:block!important}.d-xl-grid{display:grid!important}.d-xl-table{display:table!important}.d-xl-table-row{display:table-row!important}.d-xl-table-cell{display:table-cell!important}.d-xl-flex{display:flex!important}.d-xl-inline-flex{display:inline-flex!important}.d-xl-none{display:none!important}.flex-xl-fill{flex:1 1 auto!important}.flex-xl-row{flex-direction:row!important}.flex-xl-column{flex-direction:column!important}.flex-xl-row-reverse{flex-direction:row-reverse!important}.flex-xl-column-reverse{flex-direction:column-reverse!important}.flex-xl-grow-0{flex-grow:0!important}.flex-xl-grow-1{flex-grow:1!important}.flex-xl-shrink-0{flex-shrink:0!important}.flex-xl-shrink-1{flex-shrink:1!important}.flex-xl-wrap{flex-wrap:wrap!important}.flex-xl-nowrap{flex-wrap:nowrap!important}.flex-xl-wrap-reverse{flex-wrap:wrap-reverse!important}.gap-xl-0{gap:0!important}.gap-xl-1{gap:.25rem!important}.gap-xl-2{gap:.5rem!important}.gap-xl-3{gap:1rem!important}.gap-xl-4{gap:1.5rem!important}.gap-xl-5{gap:3rem!important}.justify-content-xl-start{justify-content:flex-start!important}.justify-content-xl-end{justify-content:flex-end!important}.justify-content-xl-center{justify-content:center!important}.justify-content-xl-between{justify-content:space-between!important}.justify-content-xl-around{justify-content:space-around!important}.justify-content-xl-evenly{justify-content:space-evenly!important}.align-items-xl-start{align-items:flex-start!important}.align-items-xl-end{align-items:flex-end!important}.align-items-xl-center{align-items:center!important}.align-items-xl-baseline{align-items:baseline!important}.align-items-xl-stretch{align-items:stretch!important}.align-content-xl-start{align-content:flex-start!important}.align-content-xl-end{align-content:flex-end!important}.align-content-xl-center{align-content:center!important}.align-content-xl-between{align-content:space-between!important}.align-content-xl-around{align-content:space-around!important}.align-content-xl-stretch{align-content:stretch!important}.align-self-xl-auto{align-self:auto!important}.align-self-xl-start{align-self:flex-start!important}.align-self-xl-end{align-self:flex-end!important}.align-self-xl-center{align-self:center!important}.align-self-xl-baseline{align-self:baseline!important}.align-self-xl-stretch{align-self:stretch!important}.order-xl-first{order:-1!important}.order-xl-0{order:0!important}.order-xl-1{order:1!important}.order-xl-2{order:2!important}.order-xl-3{order:3!important}.order-xl-4{order:4!important}.order-xl-5{order:5!important}.order-xl-last{order:6!important}.m-xl-0{margin:0!important}.m-xl-1{margin:.25rem!important}.m-xl-2{margin:.5rem!important}.m-xl-3{margin:1rem!important}.m-xl-4{margin:1.5rem!important}.m-xl-5{margin:3rem!important}.m-xl-auto{margin:auto!important}.mx-xl-0{margin-right:0!important;margin-left:0!important}.mx-xl-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-xl-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-xl-3{margin-right:1rem!important;margin-left:1rem!important}.mx-xl-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-xl-5{margin-right:3rem!important;margin-left:3rem!important}.mx-xl-auto{margin-right:auto!important;margin-left:auto!important}.my-xl-0{margin-top:0!important;margin-bottom:0!important}.my-xl-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-xl-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-xl-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-xl-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-xl-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-xl-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-xl-0{margin-top:0!important}.mt-xl-1{margin-top:.25rem!important}.mt-xl-2{margin-top:.5rem!important}.mt-xl-3{margin-top:1rem!important}.mt-xl-4{margin-top:1.5rem!important}.mt-xl-5{margin-top:3rem!important}.mt-xl-auto{margin-top:auto!important}.me-xl-0{margin-right:0!important}.me-xl-1{margin-right:.25rem!important}.me-xl-2{margin-right:.5rem!important}.me-xl-3{margin-right:1rem!important}.me-xl-4{margin-right:1.5rem!important}.me-xl-5{margin-right:3rem!important}.me-xl-auto{margin-right:auto!important}.mb-xl-0{margin-bottom:0!important}.mb-xl-1{margin-bottom:.25rem!important}.mb-xl-2{margin-bottom:.5rem!important}.mb-xl-3{margin-bottom:1rem!important}.mb-xl-4{margin-bottom:1.5rem!important}.mb-xl-5{margin-bottom:3rem!important}.mb-xl-auto{margin-bottom:auto!important}.ms-xl-0{margin-left:0!important}.ms-xl-1{margin-left:.25rem!important}.ms-xl-2{margin-left:.5rem!important}.ms-xl-3{margin-left:1rem!important}.ms-xl-4{margin-left:1.5rem!important}.ms-xl-5{margin-left:3rem!important}.ms-xl-auto{margin-left:auto!important}.p-xl-0{padding:0!important}.p-xl-1{padding:.25rem!important}.p-xl-2{padding:.5rem!important}.p-xl-3{padding:1rem!important}.p-xl-4{padding:1.5rem!important}.p-xl-5{padding:3rem!important}.px-xl-0{padding-right:0!important;padding-left:0!important}.px-xl-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-xl-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-xl-3{padding-right:1rem!important;padding-left:1rem!important}.px-xl-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-xl-5{padding-right:3rem!important;padding-left:3rem!important}.py-xl-0{padding-top:0!important;padding-bottom:0!important}.py-xl-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-xl-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-xl-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-xl-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-xl-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-xl-0{padding-top:0!important}.pt-xl-1{padding-top:.25rem!important}.pt-xl-2{padding-top:.5rem!important}.pt-xl-3{padding-top:1rem!important}.pt-xl-4{padding-top:1.5rem!important}.pt-xl-5{padding-top:3rem!important}.pe-xl-0{padding-right:0!important}.pe-xl-1{padding-right:.25rem!important}.pe-xl-2{padding-right:.5rem!important}.pe-xl-3{padding-right:1rem!important}.pe-xl-4{padding-right:1.5rem!important}.pe-xl-5{padding-right:3rem!important}.pb-xl-0{padding-bottom:0!important}.pb-xl-1{padding-bottom:.25rem!important}.pb-xl-2{padding-bottom:.5rem!important}.pb-xl-3{padding-bottom:1rem!important}.pb-xl-4{padding-bottom:1.5rem!important}.pb-xl-5{padding-bottom:3rem!important}.ps-xl-0{padding-left:0!important}.ps-xl-1{padding-left:.25rem!important}.ps-xl-2{padding-left:.5rem!important}.ps-xl-3{padding-left:1rem!important}.ps-xl-4{padding-left:1.5rem!important}.ps-xl-5{padding-left:3rem!important}.text-xl-start{text-align:left!important}.text-xl-end{text-align:right!important}.text-xl-center{text-align:center!important}}@media (min-width:1400px){.float-xxl-start{float:left!important}.float-xxl-end{float:right!important}.float-xxl-none{float:none!important}.d-xxl-inline{display:inline!important}.d-xxl-inline-block{display:inline-block!important}.d-xxl-block{display:block!important}.d-xxl-grid{display:grid!important}.d-xxl-table{display:table!important}.d-xxl-table-row{display:table-row!important}.d-xxl-table-cell{display:table-cell!important}.d-xxl-flex{display:flex!important}.d-xxl-inline-flex{display:inline-flex!important}.d-xxl-none{display:none!important}.flex-xxl-fill{flex:1 1 auto!important}.flex-xxl-row{flex-direction:row!important}.flex-xxl-column{flex-direction:column!important}.flex-xxl-row-reverse{flex-direction:row-reverse!important}.flex-xxl-column-reverse{flex-direction:column-reverse!important}.flex-xxl-grow-0{flex-grow:0!important}.flex-xxl-grow-1{flex-grow:1!important}.flex-xxl-shrink-0{flex-shrink:0!important}.flex-xxl-shrink-1{flex-shrink:1!important}.flex-xxl-wrap{flex-wrap:wrap!important}.flex-xxl-nowrap{flex-wrap:nowrap!important}.flex-xxl-wrap-reverse{flex-wrap:wrap-reverse!important}.gap-xxl-0{gap:0!important}.gap-xxl-1{gap:.25rem!important}.gap-xxl-2{gap:.5rem!important}.gap-xxl-3{gap:1rem!important}.gap-xxl-4{gap:1.5rem!important}.gap-xxl-5{gap:3rem!important}.justify-content-xxl-start{justify-content:flex-start!important}.justify-content-xxl-end{justify-content:flex-end!important}.justify-content-xxl-center{justify-content:center!important}.justify-content-xxl-between{justify-content:space-between!important}.justify-content-xxl-around{justify-content:space-around!important}.justify-content-xxl-evenly{justify-content:space-evenly!important}.align-items-xxl-start{align-items:flex-start!important}.align-items-xxl-end{align-items:flex-end!important}.align-items-xxl-center{align-items:center!important}.align-items-xxl-baseline{align-items:baseline!important}.align-items-xxl-stretch{align-items:stretch!important}.align-content-xxl-start{align-content:flex-start!important}.align-content-xxl-end{align-content:flex-end!important}.align-content-xxl-center{align-content:center!important}.align-content-xxl-between{align-content:space-between!important}.align-content-xxl-around{align-content:space-around!important}.align-content-xxl-stretch{align-content:stretch!important}.align-self-xxl-auto{align-self:auto!important}.align-self-xxl-start{align-self:flex-start!important}.align-self-xxl-end{align-self:flex-end!important}.align-self-xxl-center{align-self:center!important}.align-self-xxl-baseline{align-self:baseline!important}.align-self-xxl-stretch{align-self:stretch!important}.order-xxl-first{order:-1!important}.order-xxl-0{order:0!important}.order-xxl-1{order:1!important}.order-xxl-2{order:2!important}.order-xxl-3{order:3!important}.order-xxl-4{order:4!important}.order-xxl-5{order:5!important}.order-xxl-last{order:6!important}.m-xxl-0{margin:0!important}.m-xxl-1{margin:.25rem!important}.m-xxl-2{margin:.5rem!important}.m-xxl-3{margin:1rem!important}.m-xxl-4{margin:1.5rem!important}.m-xxl-5{margin:3rem!important}.m-xxl-auto{margin:auto!important}.mx-xxl-0{margin-right:0!important;margin-left:0!important}.mx-xxl-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-xxl-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-xxl-3{margin-right:1rem!important;margin-left:1rem!important}.mx-xxl-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-xxl-5{margin-right:3rem!important;margin-left:3rem!important}.mx-xxl-auto{margin-right:auto!important;margin-left:auto!important}.my-xxl-0{margin-top:0!important;margin-bottom:0!important}.my-xxl-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-xxl-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-xxl-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-xxl-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-xxl-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-xxl-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-xxl-0{margin-top:0!important}.mt-xxl-1{margin-top:.25rem!important}.mt-xxl-2{margin-top:.5rem!important}.mt-xxl-3{margin-top:1rem!important}.mt-xxl-4{margin-top:1.5rem!important}.mt-xxl-5{margin-top:3rem!important}.mt-xxl-auto{margin-top:auto!important}.me-xxl-0{margin-right:0!important}.me-xxl-1{margin-right:.25rem!important}.me-xxl-2{margin-right:.5rem!important}.me-xxl-3{margin-right:1rem!important}.me-xxl-4{margin-right:1.5rem!important}.me-xxl-5{margin-right:3rem!important}.me-xxl-auto{margin-right:auto!important}.mb-xxl-0{margin-bottom:0!important}.mb-xxl-1{margin-bottom:.25rem!important}.mb-xxl-2{margin-bottom:.5rem!important}.mb-xxl-3{margin-bottom:1rem!important}.mb-xxl-4{margin-bottom:1.5rem!important}.mb-xxl-5{margin-bottom:3rem!important}.mb-xxl-auto{margin-bottom:auto!important}.ms-xxl-0{margin-left:0!important}.ms-xxl-1{margin-left:.25rem!important}.ms-xxl-2{margin-left:.5rem!important}.ms-xxl-3{margin-left:1rem!important}.ms-xxl-4{margin-left:1.5rem!important}.ms-xxl-5{margin-left:3rem!important}.ms-xxl-auto{margin-left:auto!important}.p-xxl-0{padding:0!important}.p-xxl-1{padding:.25rem!important}.p-xxl-2{padding:.5rem!important}.p-xxl-3{padding:1rem!important}.p-xxl-4{padding:1.5rem!important}.p-xxl-5{padding:3rem!important}.px-xxl-0{padding-right:0!important;padding-left:0!important}.px-xxl-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-xxl-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-xxl-3{padding-right:1rem!important;padding-left:1rem!important}.px-xxl-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-xxl-5{padding-right:3rem!important;padding-left:3rem!important}.py-xxl-0{padding-top:0!important;padding-bottom:0!important}.py-xxl-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-xxl-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-xxl-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-xxl-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-xxl-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-xxl-0{padding-top:0!important}.pt-xxl-1{padding-top:.25rem!important}.pt-xxl-2{padding-top:.5rem!important}.pt-xxl-3{padding-top:1rem!important}.pt-xxl-4{padding-top:1.5rem!important}.pt-xxl-5{padding-top:3rem!important}.pe-xxl-0{padding-right:0!important}.pe-xxl-1{padding-right:.25rem!important}.pe-xxl-2{padding-right:.5rem!important}.pe-xxl-3{padding-right:1rem!important}.pe-xxl-4{padding-right:1.5rem!important}.pe-xxl-5{padding-right:3rem!important}.pb-xxl-0{padding-bottom:0!important}.pb-xxl-1{padding-bottom:.25rem!important}.pb-xxl-2{padding-bottom:.5rem!important}.pb-xxl-3{padding-bottom:1rem!important}.pb-xxl-4{padding-bottom:1.5rem!important}.pb-xxl-5{padding-bottom:3rem!important}.ps-xxl-0{padding-left:0!important}.ps-xxl-1{padding-left:.25rem!important}.ps-xxl-2{padding-left:.5rem!important}.ps-xxl-3{padding-left:1rem!important}.ps-xxl-4{padding-left:1.5rem!important}.ps-xxl-5{padding-left:3rem!important}.text-xxl-start{text-align:left!important}.text-xxl-end{text-align:right!important}.text-xxl-center{text-align:center!important}}@media (min-width:1200px){.fs-1{font-size:2.5rem!important}.fs-2{font-size:2rem!important}.fs-3{font-size:1.75rem!important}.fs-4{font-size:1.5rem!important}}@media print{.d-print-inline{display:inline!important}.d-print-inline-block{display:inline-block!important}.d-print-block{display:block!important}.d-print-grid{display:grid!important}.d-print-table{display:table!important}.d-print-table-row{display:table-row!important}.d-print-table-cell{display:table-cell!important}.d-print-flex{display:flex!important}.d-print-inline-flex{display:inline-flex!important}.d-print-none{display:none!important}}',""]);const b=n},276:()=>{function n(t){var e=r[t];return void 0!==e||(e=r[t]={id:t,exports:{}},i[t].call(e.exports,e,e.exports,n)),e.exports}var i,r,t;i={666:(t,e,i)=>{"use strict";i.r(e),i.d(e,{default:()=>b});var e=i(402),e=i.n(e),n=i(352),n=i.n(n),r=i(393),r=i.n(r),s=new URL(i(214),i.b),o=new URL(i(349),i.b),a=new URL(i(204),i.b),h=new URL(i(931),i.b),l=new URL(i(486),i.b),c=new URL(i(609),i.b),u=new URL(i(469),i.b),d=new URL(i(819),i.b),p=new URL(i(144),i.b),f=new URL(i(217),i.b),g=new URL(i(956),i.b),m=new URL(i(740),i.b),y=new URL(i(460),i.b),v=new URL(i(175),i.b),x=new URL(i(647),i.b),i=new URL(i(692),i.b),n=n()(e()),e=r()(s),s=r()(o),o=r()(a),a=r()(h),h=r()(l),l=r()(c),c=r()(u),u=r()(d),d=r()(p),p=r()(f),f=r()(g),g=r()(m),m=r()(y),y=r()(v),v=r()(x),x=r()(i);n.push([t.id,'@charset "UTF-8";/*!\n * Bootstrap v5.1.3 (https://getbootstrap.com/)\n * Copyright 2011-2021 The Bootstrap Authors\n * Copyright 2011-2021 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n */:root{--bs-blue:#0d6efd;--bs-indigo:#6610f2;--bs-purple:#6f42c1;--bs-pink:#d63384;--bs-red:#dc3545;--bs-orange:#fd7e14;--bs-yellow:#ffc107;--bs-green:#198754;--bs-teal:#20c997;--bs-cyan:#0dcaf0;--bs-white:#fff;--bs-gray:#6c757d;--bs-gray-dark:#343a40;--bs-gray-100:#f8f9fa;--bs-gray-200:#e9ecef;--bs-gray-300:#dee2e6;--bs-gray-400:#ced4da;--bs-gray-500:#adb5bd;--bs-gray-600:#6c757d;--bs-gray-700:#495057;--bs-gray-800:#343a40;--bs-gray-900:#212529;--bs-primary:#0d6efd;--bs-secondary:#6c757d;--bs-success:#198754;--bs-info:#0dcaf0;--bs-warning:#ffc107;--bs-danger:#dc3545;--bs-light:#f8f9fa;--bs-dark:#212529;--bs-primary-rgb:13,110,253;--bs-secondary-rgb:108,117,125;--bs-success-rgb:25,135,84;--bs-info-rgb:13,202,240;--bs-warning-rgb:255,193,7;--bs-danger-rgb:220,53,69;--bs-light-rgb:248,249,250;--bs-dark-rgb:33,37,41;--bs-white-rgb:255,255,255;--bs-black-rgb:0,0,0;--bs-body-color-rgb:33,37,41;--bs-body-bg-rgb:255,255,255;--bs-font-sans-serif:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--bs-font-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--bs-gradient:linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));--bs-body-font-family:var(--bs-font-sans-serif);--bs-body-font-size:1rem;--bs-body-font-weight:400;--bs-body-line-height:1.5;--bs-body-color:#212529;--bs-body-bg:#fff}*,::after,::before{box-sizing:border-box}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}body{margin:0;font-family:var(--bs-body-font-family);font-size:var(--bs-body-font-size);font-weight:var(--bs-body-font-weight);line-height:var(--bs-body-line-height);color:var(--bs-body-color);text-align:var(--bs-body-text-align);background-color:var(--bs-body-bg);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}hr{margin:1rem 0;color:inherit;background-color:currentColor;border:0;opacity:.25}hr:not([size]){height:1px}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem;font-weight:500;line-height:1.2}.h1,h1{font-size:calc(1.375rem + 1.5vw)}@media (min-width:1200px){.h1,h1{font-size:2.5rem}}.h2,h2{font-size:calc(1.325rem + .9vw)}@media (min-width:1200px){.h2,h2{font-size:2rem}}.h3,h3{font-size:calc(1.3rem + .6vw)}@media (min-width:1200px){.h3,h3{font-size:1.75rem}}.h4,h4{font-size:calc(1.275rem + .3vw)}@media (min-width:1200px){.h4,h4{font-size:1.5rem}}.h5,h5{font-size:1.25rem}.h6,h6{font-size:1rem}p{margin-top:0;margin-bottom:1rem}abbr[data-bs-original-title],abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}ol,ul{padding-left:2rem}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}.small,small{font-size:.875em}.mark,mark{padding:.2em;background-color:#fcf8e3}sub,sup{position:relative;font-size:.75em;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#0d6efd;text-decoration:underline}a:hover{color:#0a58ca}a:not([href]):not([class]),a:not([href]):not([class]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:var(--bs-font-monospace);font-size:1em;direction:ltr;unicode-bidi:bidi-override}pre{display:block;margin-top:0;margin-bottom:1rem;overflow:auto;font-size:.875em}pre code{font-size:inherit;color:inherit;word-break:normal}code{font-size:.875em;color:#d63384;word-wrap:break-word}a>code{color:inherit}kbd{padding:.2rem .4rem;font-size:.875em;color:#fff;background-color:#212529;border-radius:.2rem}kbd kbd{padding:0;font-size:1em;font-weight:700}figure{margin:0 0 1rem}img,svg{vertical-align:middle}table{caption-side:bottom;border-collapse:collapse}caption{padding-top:.5rem;padding-bottom:.5rem;color:#6c757d;text-align:left}th{text-align:inherit;text-align:-webkit-match-parent}tbody,td,tfoot,th,thead,tr{border-color:inherit;border-style:solid;border-width:0}label{display:inline-block}button{border-radius:0}button:focus:not(:focus-visible){outline:0}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}select:disabled{opacity:1}[list]::-webkit-calendar-picker-indicator{display:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}::-moz-focus-inner{padding:0;border-style:none}textarea{resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{float:left;width:100%;padding:0;margin-bottom:.5rem;font-size:calc(1.275rem + .3vw);line-height:inherit}@media (min-width:1200px){legend{font-size:1.5rem}}legend+*{clear:left}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-fields-wrapper,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-text,::-webkit-datetime-edit-year-field{padding:0}::-webkit-inner-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:textfield}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-color-swatch-wrapper{padding:0}::-webkit-file-upload-button{font:inherit}::file-selector-button{font:inherit}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}iframe{border:0}summary{display:list-item;cursor:pointer}progress{vertical-align:baseline}[hidden]{display:none!important}.lead{font-size:1.25rem;font-weight:300}.display-1{font-size:calc(1.625rem + 4.5vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-1{font-size:5rem}}.display-2{font-size:calc(1.575rem + 3.9vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-2{font-size:4.5rem}}.display-3{font-size:calc(1.525rem + 3.3vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-3{font-size:4rem}}.display-4{font-size:calc(1.475rem + 2.7vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-4{font-size:3.5rem}}.display-5{font-size:calc(1.425rem + 2.1vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-5{font-size:3rem}}.display-6{font-size:calc(1.375rem + 1.5vw);font-weight:300;line-height:1.2}@media (min-width:1200px){.display-6{font-size:2.5rem}}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none}.list-inline-item{display:inline-block}.list-inline-item:not(:last-child){margin-right:.5rem}.initialism{font-size:.875em;text-transform:uppercase}.blockquote{margin-bottom:1rem;font-size:1.25rem}.blockquote>:last-child{margin-bottom:0}.blockquote-footer{margin-top:-1rem;margin-bottom:1rem;font-size:.875em;color:#6c757d}.blockquote-footer::before{content:"— "}.img-fluid{max-width:100%;height:auto}.img-thumbnail{padding:.25rem;background-color:#fff;border:1px solid #dee2e6;border-radius:.25rem;max-width:100%;height:auto}.figure{display:inline-block}.figure-img{margin-bottom:.5rem;line-height:1}.figure-caption{font-size:.875em;color:#6c757d}.container,.container-fluid,.container-lg,.container-md,.container-sm,.container-xl,.container-xxl{width:100%;padding-right:var(--bs-gutter-x,.75rem);padding-left:var(--bs-gutter-x,.75rem);margin-right:auto;margin-left:auto}@media (min-width:576px){.container,.container-sm{max-width:540px}}@media (min-width:768px){.container,.container-md,.container-sm{max-width:720px}}@media (min-width:992px){.container,.container-lg,.container-md,.container-sm{max-width:960px}}@media (min-width:1200px){.container,.container-lg,.container-md,.container-sm,.container-xl{max-width:1140px}}@media (min-width:1400px){.container,.container-lg,.container-md,.container-sm,.container-xl,.container-xxl{max-width:1320px}}.row{--bs-gutter-x:1.5rem;--bs-gutter-y:0;display:flex;flex-wrap:wrap;margin-top:calc(-1 * var(--bs-gutter-y));margin-right:calc(-.5 * var(--bs-gutter-x));margin-left:calc(-.5 * var(--bs-gutter-x))}.row>*{flex-shrink:0;width:100%;max-width:100%;padding-right:calc(var(--bs-gutter-x) * .5);padding-left:calc(var(--bs-gutter-x) * .5);margin-top:var(--bs-gutter-y)}.col{flex:1 0 0%}.row-cols-auto>*{flex:0 0 auto;width:auto}.row-cols-1>*{flex:0 0 auto;width:100%}.row-cols-2>*{flex:0 0 auto;width:50%}.row-cols-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-4>*{flex:0 0 auto;width:25%}.row-cols-5>*{flex:0 0 auto;width:20%}.row-cols-6>*{flex:0 0 auto;width:16.6666666667%}.col-auto{flex:0 0 auto;width:auto}.col-1{flex:0 0 auto;width:8.33333333%}.col-2{flex:0 0 auto;width:16.66666667%}.col-3{flex:0 0 auto;width:25%}.col-4{flex:0 0 auto;width:33.33333333%}.col-5{flex:0 0 auto;width:41.66666667%}.col-6{flex:0 0 auto;width:50%}.col-7{flex:0 0 auto;width:58.33333333%}.col-8{flex:0 0 auto;width:66.66666667%}.col-9{flex:0 0 auto;width:75%}.col-10{flex:0 0 auto;width:83.33333333%}.col-11{flex:0 0 auto;width:91.66666667%}.col-12{flex:0 0 auto;width:100%}.offset-1{margin-left:8.33333333%}.offset-2{margin-left:16.66666667%}.offset-3{margin-left:25%}.offset-4{margin-left:33.33333333%}.offset-5{margin-left:41.66666667%}.offset-6{margin-left:50%}.offset-7{margin-left:58.33333333%}.offset-8{margin-left:66.66666667%}.offset-9{margin-left:75%}.offset-10{margin-left:83.33333333%}.offset-11{margin-left:91.66666667%}.g-0,.gx-0{--bs-gutter-x:0}.g-0,.gy-0{--bs-gutter-y:0}.g-1,.gx-1{--bs-gutter-x:0.25rem}.g-1,.gy-1{--bs-gutter-y:0.25rem}.g-2,.gx-2{--bs-gutter-x:0.5rem}.g-2,.gy-2{--bs-gutter-y:0.5rem}.g-3,.gx-3{--bs-gutter-x:1rem}.g-3,.gy-3{--bs-gutter-y:1rem}.g-4,.gx-4{--bs-gutter-x:1.5rem}.g-4,.gy-4{--bs-gutter-y:1.5rem}.g-5,.gx-5{--bs-gutter-x:3rem}.g-5,.gy-5{--bs-gutter-y:3rem}@media (min-width:576px){.col-sm{flex:1 0 0%}.row-cols-sm-auto>*{flex:0 0 auto;width:auto}.row-cols-sm-1>*{flex:0 0 auto;width:100%}.row-cols-sm-2>*{flex:0 0 auto;width:50%}.row-cols-sm-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-sm-4>*{flex:0 0 auto;width:25%}.row-cols-sm-5>*{flex:0 0 auto;width:20%}.row-cols-sm-6>*{flex:0 0 auto;width:16.6666666667%}.col-sm-auto{flex:0 0 auto;width:auto}.col-sm-1{flex:0 0 auto;width:8.33333333%}.col-sm-2{flex:0 0 auto;width:16.66666667%}.col-sm-3{flex:0 0 auto;width:25%}.col-sm-4{flex:0 0 auto;width:33.33333333%}.col-sm-5{flex:0 0 auto;width:41.66666667%}.col-sm-6{flex:0 0 auto;width:50%}.col-sm-7{flex:0 0 auto;width:58.33333333%}.col-sm-8{flex:0 0 auto;width:66.66666667%}.col-sm-9{flex:0 0 auto;width:75%}.col-sm-10{flex:0 0 auto;width:83.33333333%}.col-sm-11{flex:0 0 auto;width:91.66666667%}.col-sm-12{flex:0 0 auto;width:100%}.offset-sm-0{margin-left:0}.offset-sm-1{margin-left:8.33333333%}.offset-sm-2{margin-left:16.66666667%}.offset-sm-3{margin-left:25%}.offset-sm-4{margin-left:33.33333333%}.offset-sm-5{margin-left:41.66666667%}.offset-sm-6{margin-left:50%}.offset-sm-7{margin-left:58.33333333%}.offset-sm-8{margin-left:66.66666667%}.offset-sm-9{margin-left:75%}.offset-sm-10{margin-left:83.33333333%}.offset-sm-11{margin-left:91.66666667%}.g-sm-0,.gx-sm-0{--bs-gutter-x:0}.g-sm-0,.gy-sm-0{--bs-gutter-y:0}.g-sm-1,.gx-sm-1{--bs-gutter-x:0.25rem}.g-sm-1,.gy-sm-1{--bs-gutter-y:0.25rem}.g-sm-2,.gx-sm-2{--bs-gutter-x:0.5rem}.g-sm-2,.gy-sm-2{--bs-gutter-y:0.5rem}.g-sm-3,.gx-sm-3{--bs-gutter-x:1rem}.g-sm-3,.gy-sm-3{--bs-gutter-y:1rem}.g-sm-4,.gx-sm-4{--bs-gutter-x:1.5rem}.g-sm-4,.gy-sm-4{--bs-gutter-y:1.5rem}.g-sm-5,.gx-sm-5{--bs-gutter-x:3rem}.g-sm-5,.gy-sm-5{--bs-gutter-y:3rem}}@media (min-width:768px){.col-md{flex:1 0 0%}.row-cols-md-auto>*{flex:0 0 auto;width:auto}.row-cols-md-1>*{flex:0 0 auto;width:100%}.row-cols-md-2>*{flex:0 0 auto;width:50%}.row-cols-md-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-md-4>*{flex:0 0 auto;width:25%}.row-cols-md-5>*{flex:0 0 auto;width:20%}.row-cols-md-6>*{flex:0 0 auto;width:16.6666666667%}.col-md-auto{flex:0 0 auto;width:auto}.col-md-1{flex:0 0 auto;width:8.33333333%}.col-md-2{flex:0 0 auto;width:16.66666667%}.col-md-3{flex:0 0 auto;width:25%}.col-md-4{flex:0 0 auto;width:33.33333333%}.col-md-5{flex:0 0 auto;width:41.66666667%}.col-md-6{flex:0 0 auto;width:50%}.col-md-7{flex:0 0 auto;width:58.33333333%}.col-md-8{flex:0 0 auto;width:66.66666667%}.col-md-9{flex:0 0 auto;width:75%}.col-md-10{flex:0 0 auto;width:83.33333333%}.col-md-11{flex:0 0 auto;width:91.66666667%}.col-md-12{flex:0 0 auto;width:100%}.offset-md-0{margin-left:0}.offset-md-1{margin-left:8.33333333%}.offset-md-2{margin-left:16.66666667%}.offset-md-3{margin-left:25%}.offset-md-4{margin-left:33.33333333%}.offset-md-5{margin-left:41.66666667%}.offset-md-6{margin-left:50%}.offset-md-7{margin-left:58.33333333%}.offset-md-8{margin-left:66.66666667%}.offset-md-9{margin-left:75%}.offset-md-10{margin-left:83.33333333%}.offset-md-11{margin-left:91.66666667%}.g-md-0,.gx-md-0{--bs-gutter-x:0}.g-md-0,.gy-md-0{--bs-gutter-y:0}.g-md-1,.gx-md-1{--bs-gutter-x:0.25rem}.g-md-1,.gy-md-1{--bs-gutter-y:0.25rem}.g-md-2,.gx-md-2{--bs-gutter-x:0.5rem}.g-md-2,.gy-md-2{--bs-gutter-y:0.5rem}.g-md-3,.gx-md-3{--bs-gutter-x:1rem}.g-md-3,.gy-md-3{--bs-gutter-y:1rem}.g-md-4,.gx-md-4{--bs-gutter-x:1.5rem}.g-md-4,.gy-md-4{--bs-gutter-y:1.5rem}.g-md-5,.gx-md-5{--bs-gutter-x:3rem}.g-md-5,.gy-md-5{--bs-gutter-y:3rem}}@media (min-width:992px){.col-lg{flex:1 0 0%}.row-cols-lg-auto>*{flex:0 0 auto;width:auto}.row-cols-lg-1>*{flex:0 0 auto;width:100%}.row-cols-lg-2>*{flex:0 0 auto;width:50%}.row-cols-lg-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-lg-4>*{flex:0 0 auto;width:25%}.row-cols-lg-5>*{flex:0 0 auto;width:20%}.row-cols-lg-6>*{flex:0 0 auto;width:16.6666666667%}.col-lg-auto{flex:0 0 auto;width:auto}.col-lg-1{flex:0 0 auto;width:8.33333333%}.col-lg-2{flex:0 0 auto;width:16.66666667%}.col-lg-3{flex:0 0 auto;width:25%}.col-lg-4{flex:0 0 auto;width:33.33333333%}.col-lg-5{flex:0 0 auto;width:41.66666667%}.col-lg-6{flex:0 0 auto;width:50%}.col-lg-7{flex:0 0 auto;width:58.33333333%}.col-lg-8{flex:0 0 auto;width:66.66666667%}.col-lg-9{flex:0 0 auto;width:75%}.col-lg-10{flex:0 0 auto;width:83.33333333%}.col-lg-11{flex:0 0 auto;width:91.66666667%}.col-lg-12{flex:0 0 auto;width:100%}.offset-lg-0{margin-left:0}.offset-lg-1{margin-left:8.33333333%}.offset-lg-2{margin-left:16.66666667%}.offset-lg-3{margin-left:25%}.offset-lg-4{margin-left:33.33333333%}.offset-lg-5{margin-left:41.66666667%}.offset-lg-6{margin-left:50%}.offset-lg-7{margin-left:58.33333333%}.offset-lg-8{margin-left:66.66666667%}.offset-lg-9{margin-left:75%}.offset-lg-10{margin-left:83.33333333%}.offset-lg-11{margin-left:91.66666667%}.g-lg-0,.gx-lg-0{--bs-gutter-x:0}.g-lg-0,.gy-lg-0{--bs-gutter-y:0}.g-lg-1,.gx-lg-1{--bs-gutter-x:0.25rem}.g-lg-1,.gy-lg-1{--bs-gutter-y:0.25rem}.g-lg-2,.gx-lg-2{--bs-gutter-x:0.5rem}.g-lg-2,.gy-lg-2{--bs-gutter-y:0.5rem}.g-lg-3,.gx-lg-3{--bs-gutter-x:1rem}.g-lg-3,.gy-lg-3{--bs-gutter-y:1rem}.g-lg-4,.gx-lg-4{--bs-gutter-x:1.5rem}.g-lg-4,.gy-lg-4{--bs-gutter-y:1.5rem}.g-lg-5,.gx-lg-5{--bs-gutter-x:3rem}.g-lg-5,.gy-lg-5{--bs-gutter-y:3rem}}@media (min-width:1200px){.col-xl{flex:1 0 0%}.row-cols-xl-auto>*{flex:0 0 auto;width:auto}.row-cols-xl-1>*{flex:0 0 auto;width:100%}.row-cols-xl-2>*{flex:0 0 auto;width:50%}.row-cols-xl-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-xl-4>*{flex:0 0 auto;width:25%}.row-cols-xl-5>*{flex:0 0 auto;width:20%}.row-cols-xl-6>*{flex:0 0 auto;width:16.6666666667%}.col-xl-auto{flex:0 0 auto;width:auto}.col-xl-1{flex:0 0 auto;width:8.33333333%}.col-xl-2{flex:0 0 auto;width:16.66666667%}.col-xl-3{flex:0 0 auto;width:25%}.col-xl-4{flex:0 0 auto;width:33.33333333%}.col-xl-5{flex:0 0 auto;width:41.66666667%}.col-xl-6{flex:0 0 auto;width:50%}.col-xl-7{flex:0 0 auto;width:58.33333333%}.col-xl-8{flex:0 0 auto;width:66.66666667%}.col-xl-9{flex:0 0 auto;width:75%}.col-xl-10{flex:0 0 auto;width:83.33333333%}.col-xl-11{flex:0 0 auto;width:91.66666667%}.col-xl-12{flex:0 0 auto;width:100%}.offset-xl-0{margin-left:0}.offset-xl-1{margin-left:8.33333333%}.offset-xl-2{margin-left:16.66666667%}.offset-xl-3{margin-left:25%}.offset-xl-4{margin-left:33.33333333%}.offset-xl-5{margin-left:41.66666667%}.offset-xl-6{margin-left:50%}.offset-xl-7{margin-left:58.33333333%}.offset-xl-8{margin-left:66.66666667%}.offset-xl-9{margin-left:75%}.offset-xl-10{margin-left:83.33333333%}.offset-xl-11{margin-left:91.66666667%}.g-xl-0,.gx-xl-0{--bs-gutter-x:0}.g-xl-0,.gy-xl-0{--bs-gutter-y:0}.g-xl-1,.gx-xl-1{--bs-gutter-x:0.25rem}.g-xl-1,.gy-xl-1{--bs-gutter-y:0.25rem}.g-xl-2,.gx-xl-2{--bs-gutter-x:0.5rem}.g-xl-2,.gy-xl-2{--bs-gutter-y:0.5rem}.g-xl-3,.gx-xl-3{--bs-gutter-x:1rem}.g-xl-3,.gy-xl-3{--bs-gutter-y:1rem}.g-xl-4,.gx-xl-4{--bs-gutter-x:1.5rem}.g-xl-4,.gy-xl-4{--bs-gutter-y:1.5rem}.g-xl-5,.gx-xl-5{--bs-gutter-x:3rem}.g-xl-5,.gy-xl-5{--bs-gutter-y:3rem}}@media (min-width:1400px){.col-xxl{flex:1 0 0%}.row-cols-xxl-auto>*{flex:0 0 auto;width:auto}.row-cols-xxl-1>*{flex:0 0 auto;width:100%}.row-cols-xxl-2>*{flex:0 0 auto;width:50%}.row-cols-xxl-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-xxl-4>*{flex:0 0 auto;width:25%}.row-cols-xxl-5>*{flex:0 0 auto;width:20%}.row-cols-xxl-6>*{flex:0 0 auto;width:16.6666666667%}.col-xxl-auto{flex:0 0 auto;width:auto}.col-xxl-1{flex:0 0 auto;width:8.33333333%}.col-xxl-2{flex:0 0 auto;width:16.66666667%}.col-xxl-3{flex:0 0 auto;width:25%}.col-xxl-4{flex:0 0 auto;width:33.33333333%}.col-xxl-5{flex:0 0 auto;width:41.66666667%}.col-xxl-6{flex:0 0 auto;width:50%}.col-xxl-7{flex:0 0 auto;width:58.33333333%}.col-xxl-8{flex:0 0 auto;width:66.66666667%}.col-xxl-9{flex:0 0 auto;width:75%}.col-xxl-10{flex:0 0 auto;width:83.33333333%}.col-xxl-11{flex:0 0 auto;width:91.66666667%}.col-xxl-12{flex:0 0 auto;width:100%}.offset-xxl-0{margin-left:0}.offset-xxl-1{margin-left:8.33333333%}.offset-xxl-2{margin-left:16.66666667%}.offset-xxl-3{margin-left:25%}.offset-xxl-4{margin-left:33.33333333%}.offset-xxl-5{margin-left:41.66666667%}.offset-xxl-6{margin-left:50%}.offset-xxl-7{margin-left:58.33333333%}.offset-xxl-8{margin-left:66.66666667%}.offset-xxl-9{margin-left:75%}.offset-xxl-10{margin-left:83.33333333%}.offset-xxl-11{margin-left:91.66666667%}.g-xxl-0,.gx-xxl-0{--bs-gutter-x:0}.g-xxl-0,.gy-xxl-0{--bs-gutter-y:0}.g-xxl-1,.gx-xxl-1{--bs-gutter-x:0.25rem}.g-xxl-1,.gy-xxl-1{--bs-gutter-y:0.25rem}.g-xxl-2,.gx-xxl-2{--bs-gutter-x:0.5rem}.g-xxl-2,.gy-xxl-2{--bs-gutter-y:0.5rem}.g-xxl-3,.gx-xxl-3{--bs-gutter-x:1rem}.g-xxl-3,.gy-xxl-3{--bs-gutter-y:1rem}.g-xxl-4,.gx-xxl-4{--bs-gutter-x:1.5rem}.g-xxl-4,.gy-xxl-4{--bs-gutter-y:1.5rem}.g-xxl-5,.gx-xxl-5{--bs-gutter-x:3rem}.g-xxl-5,.gy-xxl-5{--bs-gutter-y:3rem}}.table{--bs-table-bg:transparent;--bs-table-accent-bg:transparent;--bs-table-striped-color:#212529;--bs-table-striped-bg:rgba(0, 0, 0, 0.05);--bs-table-active-color:#212529;--bs-table-active-bg:rgba(0, 0, 0, 0.1);--bs-table-hover-color:#212529;--bs-table-hover-bg:rgba(0, 0, 0, 0.075);width:100%;margin-bottom:1rem;color:#212529;vertical-align:top;border-color:#dee2e6}.table>:not(caption)>*>*{padding:.5rem .5rem;background-color:var(--bs-table-bg);border-bottom-width:1px;box-shadow:inset 0 0 0 9999px var(--bs-table-accent-bg)}.table>tbody{vertical-align:inherit}.table>thead{vertical-align:bottom}.table>:not(:first-child){border-top:2px solid currentColor}.caption-top{caption-side:top}.table-sm>:not(caption)>*>*{padding:.25rem .25rem}.table-bordered>:not(caption)>*{border-width:1px 0}.table-bordered>:not(caption)>*>*{border-width:0 1px}.table-borderless>:not(caption)>*>*{border-bottom-width:0}.table-borderless>:not(:first-child){border-top-width:0}.table-striped>tbody>tr:nth-of-type(odd)>*{--bs-table-accent-bg:var(--bs-table-striped-bg);color:var(--bs-table-striped-color)}.table-active{--bs-table-accent-bg:var(--bs-table-active-bg);color:var(--bs-table-active-color)}.table-hover>tbody>tr:hover>*{--bs-table-accent-bg:var(--bs-table-hover-bg);color:var(--bs-table-hover-color)}.table-primary{--bs-table-bg:#cfe2ff;--bs-table-striped-bg:#c5d7f2;--bs-table-striped-color:#000;--bs-table-active-bg:#bacbe6;--bs-table-active-color:#000;--bs-table-hover-bg:#bfd1ec;--bs-table-hover-color:#000;color:#000;border-color:#bacbe6}.table-secondary{--bs-table-bg:#e2e3e5;--bs-table-striped-bg:#d7d8da;--bs-table-striped-color:#000;--bs-table-active-bg:#cbccce;--bs-table-active-color:#000;--bs-table-hover-bg:#d1d2d4;--bs-table-hover-color:#000;color:#000;border-color:#cbccce}.table-success{--bs-table-bg:#d1e7dd;--bs-table-striped-bg:#c7dbd2;--bs-table-striped-color:#000;--bs-table-active-bg:#bcd0c7;--bs-table-active-color:#000;--bs-table-hover-bg:#c1d6cc;--bs-table-hover-color:#000;color:#000;border-color:#bcd0c7}.table-info{--bs-table-bg:#cff4fc;--bs-table-striped-bg:#c5e8ef;--bs-table-striped-color:#000;--bs-table-active-bg:#badce3;--bs-table-active-color:#000;--bs-table-hover-bg:#bfe2e9;--bs-table-hover-color:#000;color:#000;border-color:#badce3}.table-warning{--bs-table-bg:#fff3cd;--bs-table-striped-bg:#f2e7c3;--bs-table-striped-color:#000;--bs-table-active-bg:#e6dbb9;--bs-table-active-color:#000;--bs-table-hover-bg:#ece1be;--bs-table-hover-color:#000;color:#000;border-color:#e6dbb9}.table-danger{--bs-table-bg:#f8d7da;--bs-table-striped-bg:#eccccf;--bs-table-striped-color:#000;--bs-table-active-bg:#dfc2c4;--bs-table-active-color:#000;--bs-table-hover-bg:#e5c7ca;--bs-table-hover-color:#000;color:#000;border-color:#dfc2c4}.table-light{--bs-table-bg:#f8f9fa;--bs-table-striped-bg:#ecedee;--bs-table-striped-color:#000;--bs-table-active-bg:#dfe0e1;--bs-table-active-color:#000;--bs-table-hover-bg:#e5e6e7;--bs-table-hover-color:#000;color:#000;border-color:#dfe0e1}.table-dark{--bs-table-bg:#212529;--bs-table-striped-bg:#2c3034;--bs-table-striped-color:#fff;--bs-table-active-bg:#373b3e;--bs-table-active-color:#fff;--bs-table-hover-bg:#323539;--bs-table-hover-color:#fff;color:#fff;border-color:#373b3e}.table-responsive{overflow-x:auto;-webkit-overflow-scrolling:touch}@media (max-width:575.98px){.table-responsive-sm{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media (max-width:767.98px){.table-responsive-md{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media (max-width:991.98px){.table-responsive-lg{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media (max-width:1199.98px){.table-responsive-xl{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media (max-width:1399.98px){.table-responsive-xxl{overflow-x:auto;-webkit-overflow-scrolling:touch}}.form-label{margin-bottom:.5rem}.col-form-label{padding-top:calc(.375rem + 1px);padding-bottom:calc(.375rem + 1px);margin-bottom:0;font-size:inherit;line-height:1.5}.col-form-label-lg{padding-top:calc(.5rem + 1px);padding-bottom:calc(.5rem + 1px);font-size:1.25rem}.col-form-label-sm{padding-top:calc(.25rem + 1px);padding-bottom:calc(.25rem + 1px);font-size:.875rem}.form-text{margin-top:.25rem;font-size:.875em;color:#6c757d}.form-control{display:block;width:100%;padding:.375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#212529;background-color:#fff;background-clip:padding-box;border:1px solid #ced4da;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:.25rem;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-control{transition:none}}.form-control[type=file]{overflow:hidden}.form-control[type=file]:not(:disabled):not([readonly]){cursor:pointer}.form-control:focus{color:#212529;background-color:#fff;border-color:#86b7fe;outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.form-control::-webkit-date-and-time-value{height:1.5em}.form-control::-moz-placeholder{color:#6c757d;opacity:1}.form-control::placeholder{color:#6c757d;opacity:1}.form-control:disabled,.form-control[readonly]{background-color:#e9ecef;opacity:1}.form-control::-webkit-file-upload-button{padding:.375rem .75rem;margin:-.375rem -.75rem;-webkit-margin-end:.75rem;margin-inline-end:.75rem;color:#212529;background-color:#e9ecef;pointer-events:none;border-color:inherit;border-style:solid;border-width:0;border-inline-end-width:1px;border-radius:0;-webkit-transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}.form-control::file-selector-button{padding:.375rem .75rem;margin:-.375rem -.75rem;-webkit-margin-end:.75rem;margin-inline-end:.75rem;color:#212529;background-color:#e9ecef;pointer-events:none;border-color:inherit;border-style:solid;border-width:0;border-inline-end-width:1px;border-radius:0;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-control::-webkit-file-upload-button{-webkit-transition:none;transition:none}.form-control::file-selector-button{transition:none}}.form-control:hover:not(:disabled):not([readonly])::-webkit-file-upload-button{background-color:#dde0e3}.form-control:hover:not(:disabled):not([readonly])::file-selector-button{background-color:#dde0e3}.form-control::-webkit-file-upload-button{padding:.375rem .75rem;margin:-.375rem -.75rem;-webkit-margin-end:.75rem;margin-inline-end:.75rem;color:#212529;background-color:#e9ecef;pointer-events:none;border-color:inherit;border-style:solid;border-width:0;border-inline-end-width:1px;border-radius:0;-webkit-transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-control::-webkit-file-upload-button{-webkit-transition:none;transition:none}}.form-control:hover:not(:disabled):not([readonly])::-webkit-file-upload-button{background-color:#dde0e3}.form-control-plaintext{display:block;width:100%;padding:.375rem 0;margin-bottom:0;line-height:1.5;color:#212529;background-color:transparent;border:solid transparent;border-width:1px 0}.form-control-plaintext.form-control-lg,.form-control-plaintext.form-control-sm{padding-right:0;padding-left:0}.form-control-sm{min-height:calc(1.5em + .5rem + 2px);padding:.25rem .5rem;font-size:.875rem;border-radius:.2rem}.form-control-sm::-webkit-file-upload-button{padding:.25rem .5rem;margin:-.25rem -.5rem;-webkit-margin-end:.5rem;margin-inline-end:.5rem}.form-control-sm::file-selector-button{padding:.25rem .5rem;margin:-.25rem -.5rem;-webkit-margin-end:.5rem;margin-inline-end:.5rem}.form-control-sm::-webkit-file-upload-button{padding:.25rem .5rem;margin:-.25rem -.5rem;-webkit-margin-end:.5rem;margin-inline-end:.5rem}.form-control-lg{min-height:calc(1.5em + 1rem + 2px);padding:.5rem 1rem;font-size:1.25rem;border-radius:.3rem}.form-control-lg::-webkit-file-upload-button{padding:.5rem 1rem;margin:-.5rem -1rem;-webkit-margin-end:1rem;margin-inline-end:1rem}.form-control-lg::file-selector-button{padding:.5rem 1rem;margin:-.5rem -1rem;-webkit-margin-end:1rem;margin-inline-end:1rem}.form-control-lg::-webkit-file-upload-button{padding:.5rem 1rem;margin:-.5rem -1rem;-webkit-margin-end:1rem;margin-inline-end:1rem}textarea.form-control{min-height:calc(1.5em + .75rem + 2px)}textarea.form-control-sm{min-height:calc(1.5em + .5rem + 2px)}textarea.form-control-lg{min-height:calc(1.5em + 1rem + 2px)}.form-control-color{width:3rem;height:auto;padding:.375rem}.form-control-color:not(:disabled):not([readonly]){cursor:pointer}.form-control-color::-moz-color-swatch{height:1.5em;border-radius:.25rem}.form-control-color::-webkit-color-swatch{height:1.5em;border-radius:.25rem}.form-select{display:block;width:100%;padding:.375rem 2.25rem .375rem .75rem;-moz-padding-start:calc(0.75rem - 3px);font-size:1rem;font-weight:400;line-height:1.5;color:#212529;background-color:#fff;background-image:url('+e+');background-repeat:no-repeat;background-position:right .75rem center;background-size:16px 12px;border:1px solid #ced4da;border-radius:.25rem;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out;-webkit-appearance:none;-moz-appearance:none;appearance:none}@media (prefers-reduced-motion:reduce){.form-select{transition:none}}.form-select:focus{border-color:#86b7fe;outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.form-select[multiple],.form-select[size]:not([size="1"]){padding-right:.75rem;background-image:none}.form-select:disabled{background-color:#e9ecef}.form-select:-moz-focusring{color:transparent;text-shadow:0 0 0 #212529}.form-select-sm{padding-top:.25rem;padding-bottom:.25rem;padding-left:.5rem;font-size:.875rem;border-radius:.2rem}.form-select-lg{padding-top:.5rem;padding-bottom:.5rem;padding-left:1rem;font-size:1.25rem;border-radius:.3rem}.form-check{display:block;min-height:1.5rem;padding-left:1.5em;margin-bottom:.125rem}.form-check .form-check-input{float:left;margin-left:-1.5em}.form-check-input{width:1em;height:1em;margin-top:.25em;vertical-align:top;background-color:#fff;background-repeat:no-repeat;background-position:center;background-size:contain;border:1px solid rgba(0,0,0,.25);-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-print-color-adjust:exact;color-adjust:exact}.form-check-input[type=checkbox]{border-radius:.25em}.form-check-input[type=radio]{border-radius:50%}.form-check-input:active{filter:brightness(90%)}.form-check-input:focus{border-color:#86b7fe;outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.form-check-input:checked{background-color:#0d6efd;border-color:#0d6efd}.form-check-input:checked[type=checkbox]{background-image:url('+s+")}.form-check-input:checked[type=radio]{background-image:url("+o+")}.form-check-input[type=checkbox]:indeterminate{background-color:#0d6efd;border-color:#0d6efd;background-image:url("+a+")}.form-check-input:disabled{pointer-events:none;filter:none;opacity:.5}.form-check-input:disabled~.form-check-label,.form-check-input[disabled]~.form-check-label{opacity:.5}.form-switch{padding-left:2.5em}.form-switch .form-check-input{width:2em;margin-left:-2.5em;background-image:url("+h+");background-position:left center;border-radius:2em;transition:background-position .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-switch .form-check-input{transition:none}}.form-switch .form-check-input:focus{background-image:url("+l+")}.form-switch .form-check-input:checked{background-position:right center;background-image:url("+c+")}.form-check-inline{display:inline-block;margin-right:1rem}.btn-check{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.btn-check:disabled+.btn,.btn-check[disabled]+.btn{pointer-events:none;filter:none;opacity:.65}.form-range{width:100%;height:1.5rem;padding:0;background-color:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none}.form-range:focus{outline:0}.form-range:focus::-webkit-slider-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .25rem rgba(13,110,253,.25)}.form-range:focus::-moz-range-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .25rem rgba(13,110,253,.25)}.form-range::-moz-focus-outer{border:0}.form-range::-webkit-slider-thumb{width:1rem;height:1rem;margin-top:-.25rem;background-color:#0d6efd;border:0;border-radius:1rem;-webkit-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;-webkit-appearance:none;appearance:none}@media (prefers-reduced-motion:reduce){.form-range::-webkit-slider-thumb{-webkit-transition:none;transition:none}}.form-range::-webkit-slider-thumb:active{background-color:#b6d4fe}.form-range::-webkit-slider-runnable-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:#dee2e6;border-color:transparent;border-radius:1rem}.form-range::-moz-range-thumb{width:1rem;height:1rem;background-color:#0d6efd;border:0;border-radius:1rem;-moz-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;-moz-appearance:none;appearance:none}@media (prefers-reduced-motion:reduce){.form-range::-moz-range-thumb{-moz-transition:none;transition:none}}.form-range::-moz-range-thumb:active{background-color:#b6d4fe}.form-range::-moz-range-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:#dee2e6;border-color:transparent;border-radius:1rem}.form-range:disabled{pointer-events:none}.form-range:disabled::-webkit-slider-thumb{background-color:#adb5bd}.form-range:disabled::-moz-range-thumb{background-color:#adb5bd}.form-floating{position:relative}.form-floating>.form-control,.form-floating>.form-select{height:calc(3.5rem + 2px);line-height:1.25}.form-floating>label{position:absolute;top:0;left:0;height:100%;padding:1rem .75rem;pointer-events:none;border:1px solid transparent;transform-origin:0 0;transition:opacity .1s ease-in-out,transform .1s ease-in-out}@media (prefers-reduced-motion:reduce){.form-floating>label{transition:none}}.form-floating>.form-control{padding:1rem .75rem}.form-floating>.form-control::-moz-placeholder{color:transparent}.form-floating>.form-control::placeholder{color:transparent}.form-floating>.form-control:not(:-moz-placeholder-shown){padding-top:1.625rem;padding-bottom:.625rem}.form-floating>.form-control:focus,.form-floating>.form-control:not(:placeholder-shown){padding-top:1.625rem;padding-bottom:.625rem}.form-floating>.form-control:-webkit-autofill{padding-top:1.625rem;padding-bottom:.625rem}.form-floating>.form-select{padding-top:1.625rem;padding-bottom:.625rem}.form-floating>.form-control:not(:-moz-placeholder-shown)~label{opacity:.65;transform:scale(.85) translateY(-.5rem) translateX(.15rem)}.form-floating>.form-control:focus~label,.form-floating>.form-control:not(:placeholder-shown)~label,.form-floating>.form-select~label{opacity:.65;transform:scale(.85) translateY(-.5rem) translateX(.15rem)}.form-floating>.form-control:-webkit-autofill~label{opacity:.65;transform:scale(.85) translateY(-.5rem) translateX(.15rem)}.input-group{position:relative;display:flex;flex-wrap:wrap;align-items:stretch;width:100%}.input-group>.form-control,.input-group>.form-select{position:relative;flex:1 1 auto;width:1%;min-width:0}.input-group>.form-control:focus,.input-group>.form-select:focus{z-index:3}.input-group .btn{position:relative;z-index:2}.input-group .btn:focus{z-index:3}.input-group-text{display:flex;align-items:center;padding:.375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:center;white-space:nowrap;background-color:#e9ecef;border:1px solid #ced4da;border-radius:.25rem}.input-group-lg>.btn,.input-group-lg>.form-control,.input-group-lg>.form-select,.input-group-lg>.input-group-text{padding:.5rem 1rem;font-size:1.25rem;border-radius:.3rem}.input-group-sm>.btn,.input-group-sm>.form-control,.input-group-sm>.form-select,.input-group-sm>.input-group-text{padding:.25rem .5rem;font-size:.875rem;border-radius:.2rem}.input-group-lg>.form-select,.input-group-sm>.form-select{padding-right:3rem}.input-group:not(.has-validation)>.dropdown-toggle:nth-last-child(n+3),.input-group:not(.has-validation)>:not(:last-child):not(.dropdown-toggle):not(.dropdown-menu){border-top-right-radius:0;border-bottom-right-radius:0}.input-group.has-validation>.dropdown-toggle:nth-last-child(n+4),.input-group.has-validation>:nth-last-child(n+3):not(.dropdown-toggle):not(.dropdown-menu){border-top-right-radius:0;border-bottom-right-radius:0}.input-group>:not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback){margin-left:-1px;border-top-left-radius:0;border-bottom-left-radius:0}.valid-feedback{display:none;width:100%;margin-top:.25rem;font-size:.875em;color:#198754}.valid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;color:#fff;background-color:rgba(25,135,84,.9);border-radius:.25rem}.is-valid~.valid-feedback,.is-valid~.valid-tooltip,.was-validated :valid~.valid-feedback,.was-validated :valid~.valid-tooltip{display:block}.form-control.is-valid,.was-validated .form-control:valid{border-color:#198754;padding-right:calc(1.5em + .75rem);background-image:url("+u+');background-repeat:no-repeat;background-position:right calc(.375em + .1875rem) center;background-size:calc(.75em + .375rem) calc(.75em + .375rem)}.form-control.is-valid:focus,.was-validated .form-control:valid:focus{border-color:#198754;box-shadow:0 0 0 .25rem rgba(25,135,84,.25)}.was-validated textarea.form-control:valid,textarea.form-control.is-valid{padding-right:calc(1.5em + .75rem);background-position:top calc(.375em + .1875rem) right calc(.375em + .1875rem)}.form-select.is-valid,.was-validated .form-select:valid{border-color:#198754}.form-select.is-valid:not([multiple]):not([size]),.form-select.is-valid:not([multiple])[size="1"],.was-validated .form-select:valid:not([multiple]):not([size]),.was-validated .form-select:valid:not([multiple])[size="1"]{padding-right:4.125rem;background-image:url('+e+"),url("+u+");background-position:right .75rem center,center right 2.25rem;background-size:16px 12px,calc(.75em + .375rem) calc(.75em + .375rem)}.form-select.is-valid:focus,.was-validated .form-select:valid:focus{border-color:#198754;box-shadow:0 0 0 .25rem rgba(25,135,84,.25)}.form-check-input.is-valid,.was-validated .form-check-input:valid{border-color:#198754}.form-check-input.is-valid:checked,.was-validated .form-check-input:valid:checked{background-color:#198754}.form-check-input.is-valid:focus,.was-validated .form-check-input:valid:focus{box-shadow:0 0 0 .25rem rgba(25,135,84,.25)}.form-check-input.is-valid~.form-check-label,.was-validated .form-check-input:valid~.form-check-label{color:#198754}.form-check-inline .form-check-input~.valid-feedback{margin-left:.5em}.input-group .form-control.is-valid,.input-group .form-select.is-valid,.was-validated .input-group .form-control:valid,.was-validated .input-group .form-select:valid{z-index:1}.input-group .form-control.is-valid:focus,.input-group .form-select.is-valid:focus,.was-validated .input-group .form-control:valid:focus,.was-validated .input-group .form-select:valid:focus{z-index:3}.invalid-feedback{display:none;width:100%;margin-top:.25rem;font-size:.875em;color:#dc3545}.invalid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;color:#fff;background-color:rgba(220,53,69,.9);border-radius:.25rem}.is-invalid~.invalid-feedback,.is-invalid~.invalid-tooltip,.was-validated :invalid~.invalid-feedback,.was-validated :invalid~.invalid-tooltip{display:block}.form-control.is-invalid,.was-validated .form-control:invalid{border-color:#dc3545;padding-right:calc(1.5em + .75rem);background-image:url("+d+');background-repeat:no-repeat;background-position:right calc(.375em + .1875rem) center;background-size:calc(.75em + .375rem) calc(.75em + .375rem)}.form-control.is-invalid:focus,.was-validated .form-control:invalid:focus{border-color:#dc3545;box-shadow:0 0 0 .25rem rgba(220,53,69,.25)}.was-validated textarea.form-control:invalid,textarea.form-control.is-invalid{padding-right:calc(1.5em + .75rem);background-position:top calc(.375em + .1875rem) right calc(.375em + .1875rem)}.form-select.is-invalid,.was-validated .form-select:invalid{border-color:#dc3545}.form-select.is-invalid:not([multiple]):not([size]),.form-select.is-invalid:not([multiple])[size="1"],.was-validated .form-select:invalid:not([multiple]):not([size]),.was-validated .form-select:invalid:not([multiple])[size="1"]{padding-right:4.125rem;background-image:url('+e+"),url("+d+');background-position:right .75rem center,center right 2.25rem;background-size:16px 12px,calc(.75em + .375rem) calc(.75em + .375rem)}.form-select.is-invalid:focus,.was-validated .form-select:invalid:focus{border-color:#dc3545;box-shadow:0 0 0 .25rem rgba(220,53,69,.25)}.form-check-input.is-invalid,.was-validated .form-check-input:invalid{border-color:#dc3545}.form-check-input.is-invalid:checked,.was-validated .form-check-input:invalid:checked{background-color:#dc3545}.form-check-input.is-invalid:focus,.was-validated .form-check-input:invalid:focus{box-shadow:0 0 0 .25rem rgba(220,53,69,.25)}.form-check-input.is-invalid~.form-check-label,.was-validated .form-check-input:invalid~.form-check-label{color:#dc3545}.form-check-inline .form-check-input~.invalid-feedback{margin-left:.5em}.input-group .form-control.is-invalid,.input-group .form-select.is-invalid,.was-validated .input-group .form-control:invalid,.was-validated .input-group .form-select:invalid{z-index:2}.input-group .form-control.is-invalid:focus,.input-group .form-select.is-invalid:focus,.was-validated .input-group .form-control:invalid:focus,.was-validated .input-group .form-select:invalid:focus{z-index:3}.btn{display:inline-block;font-weight:400;line-height:1.5;color:#212529;text-align:center;text-decoration:none;vertical-align:middle;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:transparent;border:1px solid transparent;padding:.375rem .75rem;font-size:1rem;border-radius:.25rem;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.btn{transition:none}}.btn:hover{color:#212529}.btn-check:focus+.btn,.btn:focus{outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.btn.disabled,.btn:disabled,fieldset:disabled .btn{pointer-events:none;opacity:.65}.btn-primary{color:#fff;background-color:#0d6efd;border-color:#0d6efd}.btn-primary:hover{color:#fff;background-color:#0b5ed7;border-color:#0a58ca}.btn-check:focus+.btn-primary,.btn-primary:focus{color:#fff;background-color:#0b5ed7;border-color:#0a58ca;box-shadow:0 0 0 .25rem rgba(49,132,253,.5)}.btn-check:active+.btn-primary,.btn-check:checked+.btn-primary,.btn-primary.active,.btn-primary:active,.show>.btn-primary.dropdown-toggle{color:#fff;background-color:#0a58ca;border-color:#0a53be}.btn-check:active+.btn-primary:focus,.btn-check:checked+.btn-primary:focus,.btn-primary.active:focus,.btn-primary:active:focus,.show>.btn-primary.dropdown-toggle:focus{box-shadow:0 0 0 .25rem rgba(49,132,253,.5)}.btn-primary.disabled,.btn-primary:disabled{color:#fff;background-color:#0d6efd;border-color:#0d6efd}.btn-secondary{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-secondary:hover{color:#fff;background-color:#5c636a;border-color:#565e64}.btn-check:focus+.btn-secondary,.btn-secondary:focus{color:#fff;background-color:#5c636a;border-color:#565e64;box-shadow:0 0 0 .25rem rgba(130,138,145,.5)}.btn-check:active+.btn-secondary,.btn-check:checked+.btn-secondary,.btn-secondary.active,.btn-secondary:active,.show>.btn-secondary.dropdown-toggle{color:#fff;background-color:#565e64;border-color:#51585e}.btn-check:active+.btn-secondary:focus,.btn-check:checked+.btn-secondary:focus,.btn-secondary.active:focus,.btn-secondary:active:focus,.show>.btn-secondary.dropdown-toggle:focus{box-shadow:0 0 0 .25rem rgba(130,138,145,.5)}.btn-secondary.disabled,.btn-secondary:disabled{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-success{color:#fff;background-color:#198754;border-color:#198754}.btn-success:hover{color:#fff;background-color:#157347;border-color:#146c43}.btn-check:focus+.btn-success,.btn-success:focus{color:#fff;background-color:#157347;border-color:#146c43;box-shadow:0 0 0 .25rem rgba(60,153,110,.5)}.btn-check:active+.btn-success,.btn-check:checked+.btn-success,.btn-success.active,.btn-success:active,.show>.btn-success.dropdown-toggle{color:#fff;background-color:#146c43;border-color:#13653f}.btn-check:active+.btn-success:focus,.btn-check:checked+.btn-success:focus,.btn-success.active:focus,.btn-success:active:focus,.show>.btn-success.dropdown-toggle:focus{box-shadow:0 0 0 .25rem rgba(60,153,110,.5)}.btn-success.disabled,.btn-success:disabled{color:#fff;background-color:#198754;border-color:#198754}.btn-info{color:#000;background-color:#0dcaf0;border-color:#0dcaf0}.btn-info:hover{color:#000;background-color:#31d2f2;border-color:#25cff2}.btn-check:focus+.btn-info,.btn-info:focus{color:#000;background-color:#31d2f2;border-color:#25cff2;box-shadow:0 0 0 .25rem rgba(11,172,204,.5)}.btn-check:active+.btn-info,.btn-check:checked+.btn-info,.btn-info.active,.btn-info:active,.show>.btn-info.dropdown-toggle{color:#000;background-color:#3dd5f3;border-color:#25cff2}.btn-check:active+.btn-info:focus,.btn-check:checked+.btn-info:focus,.btn-info.active:focus,.btn-info:active:focus,.show>.btn-info.dropdown-toggle:focus{box-shadow:0 0 0 .25rem rgba(11,172,204,.5)}.btn-info.disabled,.btn-info:disabled{color:#000;background-color:#0dcaf0;border-color:#0dcaf0}.btn-warning{color:#000;background-color:#ffc107;border-color:#ffc107}.btn-warning:hover{color:#000;background-color:#ffca2c;border-color:#ffc720}.btn-check:focus+.btn-warning,.btn-warning:focus{color:#000;background-color:#ffca2c;border-color:#ffc720;box-shadow:0 0 0 .25rem rgba(217,164,6,.5)}.btn-check:active+.btn-warning,.btn-check:checked+.btn-warning,.btn-warning.active,.btn-warning:active,.show>.btn-warning.dropdown-toggle{color:#000;background-color:#ffcd39;border-color:#ffc720}.btn-check:active+.btn-warning:focus,.btn-check:checked+.btn-warning:focus,.btn-warning.active:focus,.btn-warning:active:focus,.show>.btn-warning.dropdown-toggle:focus{box-shadow:0 0 0 .25rem rgba(217,164,6,.5)}.btn-warning.disabled,.btn-warning:disabled{color:#000;background-color:#ffc107;border-color:#ffc107}.btn-danger{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-danger:hover{color:#fff;background-color:#bb2d3b;border-color:#b02a37}.btn-check:focus+.btn-danger,.btn-danger:focus{color:#fff;background-color:#bb2d3b;border-color:#b02a37;box-shadow:0 0 0 .25rem rgba(225,83,97,.5)}.btn-check:active+.btn-danger,.btn-check:checked+.btn-danger,.btn-danger.active,.btn-danger:active,.show>.btn-danger.dropdown-toggle{color:#fff;background-color:#b02a37;border-color:#a52834}.btn-check:active+.btn-danger:focus,.btn-check:checked+.btn-danger:focus,.btn-danger.active:focus,.btn-danger:active:focus,.show>.btn-danger.dropdown-toggle:focus{box-shadow:0 0 0 .25rem rgba(225,83,97,.5)}.btn-danger.disabled,.btn-danger:disabled{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-light{color:#000;background-color:#f8f9fa;border-color:#f8f9fa}.btn-light:hover{color:#000;background-color:#f9fafb;border-color:#f9fafb}.btn-check:focus+.btn-light,.btn-light:focus{color:#000;background-color:#f9fafb;border-color:#f9fafb;box-shadow:0 0 0 .25rem rgba(211,212,213,.5)}.btn-check:active+.btn-light,.btn-check:checked+.btn-light,.btn-light.active,.btn-light:active,.show>.btn-light.dropdown-toggle{color:#000;background-color:#f9fafb;border-color:#f9fafb}.btn-check:active+.btn-light:focus,.btn-check:checked+.btn-light:focus,.btn-light.active:focus,.btn-light:active:focus,.show>.btn-light.dropdown-toggle:focus{box-shadow:0 0 0 .25rem rgba(211,212,213,.5)}.btn-light.disabled,.btn-light:disabled{color:#000;background-color:#f8f9fa;border-color:#f8f9fa}.btn-dark{color:#fff;background-color:#212529;border-color:#212529}.btn-dark:hover{color:#fff;background-color:#1c1f23;border-color:#1a1e21}.btn-check:focus+.btn-dark,.btn-dark:focus{color:#fff;background-color:#1c1f23;border-color:#1a1e21;box-shadow:0 0 0 .25rem rgba(66,70,73,.5)}.btn-check:active+.btn-dark,.btn-check:checked+.btn-dark,.btn-dark.active,.btn-dark:active,.show>.btn-dark.dropdown-toggle{color:#fff;background-color:#1a1e21;border-color:#191c1f}.btn-check:active+.btn-dark:focus,.btn-check:checked+.btn-dark:focus,.btn-dark.active:focus,.btn-dark:active:focus,.show>.btn-dark.dropdown-toggle:focus{box-shadow:0 0 0 .25rem rgba(66,70,73,.5)}.btn-dark.disabled,.btn-dark:disabled{color:#fff;background-color:#212529;border-color:#212529}.btn-outline-primary{color:#0d6efd;border-color:#0d6efd}.btn-outline-primary:hover{color:#fff;background-color:#0d6efd;border-color:#0d6efd}.btn-check:focus+.btn-outline-primary,.btn-outline-primary:focus{box-shadow:0 0 0 .25rem rgba(13,110,253,.5)}.btn-check:active+.btn-outline-primary,.btn-check:checked+.btn-outline-primary,.btn-outline-primary.active,.btn-outline-primary.dropdown-toggle.show,.btn-outline-primary:active{color:#fff;background-color:#0d6efd;border-color:#0d6efd}.btn-check:active+.btn-outline-primary:focus,.btn-check:checked+.btn-outline-primary:focus,.btn-outline-primary.active:focus,.btn-outline-primary.dropdown-toggle.show:focus,.btn-outline-primary:active:focus{box-shadow:0 0 0 .25rem rgba(13,110,253,.5)}.btn-outline-primary.disabled,.btn-outline-primary:disabled{color:#0d6efd;background-color:transparent}.btn-outline-secondary{color:#6c757d;border-color:#6c757d}.btn-outline-secondary:hover{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-check:focus+.btn-outline-secondary,.btn-outline-secondary:focus{box-shadow:0 0 0 .25rem rgba(108,117,125,.5)}.btn-check:active+.btn-outline-secondary,.btn-check:checked+.btn-outline-secondary,.btn-outline-secondary.active,.btn-outline-secondary.dropdown-toggle.show,.btn-outline-secondary:active{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-check:active+.btn-outline-secondary:focus,.btn-check:checked+.btn-outline-secondary:focus,.btn-outline-secondary.active:focus,.btn-outline-secondary.dropdown-toggle.show:focus,.btn-outline-secondary:active:focus{box-shadow:0 0 0 .25rem rgba(108,117,125,.5)}.btn-outline-secondary.disabled,.btn-outline-secondary:disabled{color:#6c757d;background-color:transparent}.btn-outline-success{color:#198754;border-color:#198754}.btn-outline-success:hover{color:#fff;background-color:#198754;border-color:#198754}.btn-check:focus+.btn-outline-success,.btn-outline-success:focus{box-shadow:0 0 0 .25rem rgba(25,135,84,.5)}.btn-check:active+.btn-outline-success,.btn-check:checked+.btn-outline-success,.btn-outline-success.active,.btn-outline-success.dropdown-toggle.show,.btn-outline-success:active{color:#fff;background-color:#198754;border-color:#198754}.btn-check:active+.btn-outline-success:focus,.btn-check:checked+.btn-outline-success:focus,.btn-outline-success.active:focus,.btn-outline-success.dropdown-toggle.show:focus,.btn-outline-success:active:focus{box-shadow:0 0 0 .25rem rgba(25,135,84,.5)}.btn-outline-success.disabled,.btn-outline-success:disabled{color:#198754;background-color:transparent}.btn-outline-info{color:#0dcaf0;border-color:#0dcaf0}.btn-outline-info:hover{color:#000;background-color:#0dcaf0;border-color:#0dcaf0}.btn-check:focus+.btn-outline-info,.btn-outline-info:focus{box-shadow:0 0 0 .25rem rgba(13,202,240,.5)}.btn-check:active+.btn-outline-info,.btn-check:checked+.btn-outline-info,.btn-outline-info.active,.btn-outline-info.dropdown-toggle.show,.btn-outline-info:active{color:#000;background-color:#0dcaf0;border-color:#0dcaf0}.btn-check:active+.btn-outline-info:focus,.btn-check:checked+.btn-outline-info:focus,.btn-outline-info.active:focus,.btn-outline-info.dropdown-toggle.show:focus,.btn-outline-info:active:focus{box-shadow:0 0 0 .25rem rgba(13,202,240,.5)}.btn-outline-info.disabled,.btn-outline-info:disabled{color:#0dcaf0;background-color:transparent}.btn-outline-warning{color:#ffc107;border-color:#ffc107}.btn-outline-warning:hover{color:#000;background-color:#ffc107;border-color:#ffc107}.btn-check:focus+.btn-outline-warning,.btn-outline-warning:focus{box-shadow:0 0 0 .25rem rgba(255,193,7,.5)}.btn-check:active+.btn-outline-warning,.btn-check:checked+.btn-outline-warning,.btn-outline-warning.active,.btn-outline-warning.dropdown-toggle.show,.btn-outline-warning:active{color:#000;background-color:#ffc107;border-color:#ffc107}.btn-check:active+.btn-outline-warning:focus,.btn-check:checked+.btn-outline-warning:focus,.btn-outline-warning.active:focus,.btn-outline-warning.dropdown-toggle.show:focus,.btn-outline-warning:active:focus{box-shadow:0 0 0 .25rem rgba(255,193,7,.5)}.btn-outline-warning.disabled,.btn-outline-warning:disabled{color:#ffc107;background-color:transparent}.btn-outline-danger{color:#dc3545;border-color:#dc3545}.btn-outline-danger:hover{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-check:focus+.btn-outline-danger,.btn-outline-danger:focus{box-shadow:0 0 0 .25rem rgba(220,53,69,.5)}.btn-check:active+.btn-outline-danger,.btn-check:checked+.btn-outline-danger,.btn-outline-danger.active,.btn-outline-danger.dropdown-toggle.show,.btn-outline-danger:active{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-check:active+.btn-outline-danger:focus,.btn-check:checked+.btn-outline-danger:focus,.btn-outline-danger.active:focus,.btn-outline-danger.dropdown-toggle.show:focus,.btn-outline-danger:active:focus{box-shadow:0 0 0 .25rem rgba(220,53,69,.5)}.btn-outline-danger.disabled,.btn-outline-danger:disabled{color:#dc3545;background-color:transparent}.btn-outline-light{color:#f8f9fa;border-color:#f8f9fa}.btn-outline-light:hover{color:#000;background-color:#f8f9fa;border-color:#f8f9fa}.btn-check:focus+.btn-outline-light,.btn-outline-light:focus{box-shadow:0 0 0 .25rem rgba(248,249,250,.5)}.btn-check:active+.btn-outline-light,.btn-check:checked+.btn-outline-light,.btn-outline-light.active,.btn-outline-light.dropdown-toggle.show,.btn-outline-light:active{color:#000;background-color:#f8f9fa;border-color:#f8f9fa}.btn-check:active+.btn-outline-light:focus,.btn-check:checked+.btn-outline-light:focus,.btn-outline-light.active:focus,.btn-outline-light.dropdown-toggle.show:focus,.btn-outline-light:active:focus{box-shadow:0 0 0 .25rem rgba(248,249,250,.5)}.btn-outline-light.disabled,.btn-outline-light:disabled{color:#f8f9fa;background-color:transparent}.btn-outline-dark{color:#212529;border-color:#212529}.btn-outline-dark:hover{color:#fff;background-color:#212529;border-color:#212529}.btn-check:focus+.btn-outline-dark,.btn-outline-dark:focus{box-shadow:0 0 0 .25rem rgba(33,37,41,.5)}.btn-check:active+.btn-outline-dark,.btn-check:checked+.btn-outline-dark,.btn-outline-dark.active,.btn-outline-dark.dropdown-toggle.show,.btn-outline-dark:active{color:#fff;background-color:#212529;border-color:#212529}.btn-check:active+.btn-outline-dark:focus,.btn-check:checked+.btn-outline-dark:focus,.btn-outline-dark.active:focus,.btn-outline-dark.dropdown-toggle.show:focus,.btn-outline-dark:active:focus{box-shadow:0 0 0 .25rem rgba(33,37,41,.5)}.btn-outline-dark.disabled,.btn-outline-dark:disabled{color:#212529;background-color:transparent}.btn-link{font-weight:400;color:#0d6efd;text-decoration:underline}.btn-link:hover{color:#0a58ca}.btn-link.disabled,.btn-link:disabled{color:#6c757d}.btn-group-lg>.btn,.btn-lg{padding:.5rem 1rem;font-size:1.25rem;border-radius:.3rem}.btn-group-sm>.btn,.btn-sm{padding:.25rem .5rem;font-size:.875rem;border-radius:.2rem}.fade{transition:opacity .15s linear}@media (prefers-reduced-motion:reduce){.fade{transition:none}}.fade:not(.show){opacity:0}.collapse:not(.show){display:none}.collapsing{height:0;overflow:hidden;transition:height .35s ease}@media (prefers-reduced-motion:reduce){.collapsing{transition:none}}.collapsing.collapse-horizontal{width:0;height:auto;transition:width .35s ease}@media (prefers-reduced-motion:reduce){.collapsing.collapse-horizontal{transition:none}}.dropdown,.dropend,.dropstart,.dropup{position:relative}.dropdown-toggle{white-space:nowrap}.dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent}.dropdown-toggle:empty::after{margin-left:0}.dropdown-menu{position:absolute;z-index:1000;display:none;min-width:10rem;padding:.5rem 0;margin:0;font-size:1rem;color:#212529;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.15);border-radius:.25rem}.dropdown-menu[data-bs-popper]{top:100%;left:0;margin-top:.125rem}.dropdown-menu-start{--bs-position:start}.dropdown-menu-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-end{--bs-position:end}.dropdown-menu-end[data-bs-popper]{right:0;left:auto}@media (min-width:576px){.dropdown-menu-sm-start{--bs-position:start}.dropdown-menu-sm-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-sm-end{--bs-position:end}.dropdown-menu-sm-end[data-bs-popper]{right:0;left:auto}}@media (min-width:768px){.dropdown-menu-md-start{--bs-position:start}.dropdown-menu-md-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-md-end{--bs-position:end}.dropdown-menu-md-end[data-bs-popper]{right:0;left:auto}}@media (min-width:992px){.dropdown-menu-lg-start{--bs-position:start}.dropdown-menu-lg-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-lg-end{--bs-position:end}.dropdown-menu-lg-end[data-bs-popper]{right:0;left:auto}}@media (min-width:1200px){.dropdown-menu-xl-start{--bs-position:start}.dropdown-menu-xl-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-xl-end{--bs-position:end}.dropdown-menu-xl-end[data-bs-popper]{right:0;left:auto}}@media (min-width:1400px){.dropdown-menu-xxl-start{--bs-position:start}.dropdown-menu-xxl-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-xxl-end{--bs-position:end}.dropdown-menu-xxl-end[data-bs-popper]{right:0;left:auto}}.dropup .dropdown-menu[data-bs-popper]{top:auto;bottom:100%;margin-top:0;margin-bottom:.125rem}.dropup .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:0;border-right:.3em solid transparent;border-bottom:.3em solid;border-left:.3em solid transparent}.dropup .dropdown-toggle:empty::after{margin-left:0}.dropend .dropdown-menu[data-bs-popper]{top:0;right:auto;left:100%;margin-top:0;margin-left:.125rem}.dropend .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-right:0;border-bottom:.3em solid transparent;border-left:.3em solid}.dropend .dropdown-toggle:empty::after{margin-left:0}.dropend .dropdown-toggle::after{vertical-align:0}.dropstart .dropdown-menu[data-bs-popper]{top:0;right:100%;left:auto;margin-top:0;margin-right:.125rem}.dropstart .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:""}.dropstart .dropdown-toggle::after{display:none}.dropstart .dropdown-toggle::before{display:inline-block;margin-right:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-right:.3em solid;border-bottom:.3em solid transparent}.dropstart .dropdown-toggle:empty::after{margin-left:0}.dropstart .dropdown-toggle::before{vertical-align:0}.dropdown-divider{height:0;margin:.5rem 0;overflow:hidden;border-top:1px solid rgba(0,0,0,.15)}.dropdown-item{display:block;width:100%;padding:.25rem 1rem;clear:both;font-weight:400;color:#212529;text-align:inherit;text-decoration:none;white-space:nowrap;background-color:transparent;border:0}.dropdown-item:focus,.dropdown-item:hover{color:#1e2125;background-color:#e9ecef}.dropdown-item.active,.dropdown-item:active{color:#fff;text-decoration:none;background-color:#0d6efd}.dropdown-item.disabled,.dropdown-item:disabled{color:#adb5bd;pointer-events:none;background-color:transparent}.dropdown-menu.show{display:block}.dropdown-header{display:block;padding:.5rem 1rem;margin-bottom:0;font-size:.875rem;color:#6c757d;white-space:nowrap}.dropdown-item-text{display:block;padding:.25rem 1rem;color:#212529}.dropdown-menu-dark{color:#dee2e6;background-color:#343a40;border-color:rgba(0,0,0,.15)}.dropdown-menu-dark .dropdown-item{color:#dee2e6}.dropdown-menu-dark .dropdown-item:focus,.dropdown-menu-dark .dropdown-item:hover{color:#fff;background-color:rgba(255,255,255,.15)}.dropdown-menu-dark .dropdown-item.active,.dropdown-menu-dark .dropdown-item:active{color:#fff;background-color:#0d6efd}.dropdown-menu-dark .dropdown-item.disabled,.dropdown-menu-dark .dropdown-item:disabled{color:#adb5bd}.dropdown-menu-dark .dropdown-divider{border-color:rgba(0,0,0,.15)}.dropdown-menu-dark .dropdown-item-text{color:#dee2e6}.dropdown-menu-dark .dropdown-header{color:#adb5bd}.btn-group,.btn-group-vertical{position:relative;display:inline-flex;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;flex:1 1 auto}.btn-group-vertical>.btn-check:checked+.btn,.btn-group-vertical>.btn-check:focus+.btn,.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn-check:checked+.btn,.btn-group>.btn-check:focus+.btn,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:1}.btn-toolbar{display:flex;flex-wrap:wrap;justify-content:flex-start}.btn-toolbar .input-group{width:auto}.btn-group>.btn-group:not(:first-child),.btn-group>.btn:not(:first-child){margin-left:-1px}.btn-group>.btn-group:not(:last-child)>.btn,.btn-group>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:not(:first-child)>.btn,.btn-group>.btn:nth-child(n+3),.btn-group>:not(.btn-check)+.btn{border-top-left-radius:0;border-bottom-left-radius:0}.dropdown-toggle-split{padding-right:.5625rem;padding-left:.5625rem}.dropdown-toggle-split::after,.dropend .dropdown-toggle-split::after,.dropup .dropdown-toggle-split::after{margin-left:0}.dropstart .dropdown-toggle-split::before{margin-right:0}.btn-group-sm>.btn+.dropdown-toggle-split,.btn-sm+.dropdown-toggle-split{padding-right:.375rem;padding-left:.375rem}.btn-group-lg>.btn+.dropdown-toggle-split,.btn-lg+.dropdown-toggle-split{padding-right:.75rem;padding-left:.75rem}.btn-group-vertical{flex-direction:column;align-items:flex-start;justify-content:center}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group{width:100%}.btn-group-vertical>.btn-group:not(:first-child),.btn-group-vertical>.btn:not(:first-child){margin-top:-1px}.btn-group-vertical>.btn-group:not(:last-child)>.btn,.btn-group-vertical>.btn:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:not(:first-child)>.btn,.btn-group-vertical>.btn~.btn{border-top-left-radius:0;border-top-right-radius:0}.nav{display:flex;flex-wrap:wrap;padding-left:0;margin-bottom:0;list-style:none}.nav-link{display:block;padding:.5rem 1rem;color:#0d6efd;text-decoration:none;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out}@media (prefers-reduced-motion:reduce){.nav-link{transition:none}}.nav-link:focus,.nav-link:hover{color:#0a58ca}.nav-link.disabled{color:#6c757d;pointer-events:none;cursor:default}.nav-tabs{border-bottom:1px solid #dee2e6}.nav-tabs .nav-link{margin-bottom:-1px;background:0 0;border:1px solid transparent;border-top-left-radius:.25rem;border-top-right-radius:.25rem}.nav-tabs .nav-link:focus,.nav-tabs .nav-link:hover{border-color:#e9ecef #e9ecef #dee2e6;isolation:isolate}.nav-tabs .nav-link.disabled{color:#6c757d;background-color:transparent;border-color:transparent}.nav-tabs .nav-item.show .nav-link,.nav-tabs .nav-link.active{color:#495057;background-color:#fff;border-color:#dee2e6 #dee2e6 #fff}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.nav-pills .nav-link{background:0 0;border:0;border-radius:.25rem}.nav-pills .nav-link.active,.nav-pills .show>.nav-link{color:#fff;background-color:#0d6efd}.nav-fill .nav-item,.nav-fill>.nav-link{flex:1 1 auto;text-align:center}.nav-justified .nav-item,.nav-justified>.nav-link{flex-basis:0;flex-grow:1;text-align:center}.nav-fill .nav-item .nav-link,.nav-justified .nav-item .nav-link{width:100%}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.navbar{position:relative;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;padding-top:.5rem;padding-bottom:.5rem}.navbar>.container,.navbar>.container-fluid,.navbar>.container-lg,.navbar>.container-md,.navbar>.container-sm,.navbar>.container-xl,.navbar>.container-xxl{display:flex;flex-wrap:inherit;align-items:center;justify-content:space-between}.navbar-brand{padding-top:.3125rem;padding-bottom:.3125rem;margin-right:1rem;font-size:1.25rem;text-decoration:none;white-space:nowrap}.navbar-nav{display:flex;flex-direction:column;padding-left:0;margin-bottom:0;list-style:none}.navbar-nav .nav-link{padding-right:0;padding-left:0}.navbar-nav .dropdown-menu{position:static}.navbar-text{padding-top:.5rem;padding-bottom:.5rem}.navbar-collapse{flex-basis:100%;flex-grow:1;align-items:center}.navbar-toggler{padding:.25rem .75rem;font-size:1.25rem;line-height:1;background-color:transparent;border:1px solid transparent;border-radius:.25rem;transition:box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.navbar-toggler{transition:none}}.navbar-toggler:hover{text-decoration:none}.navbar-toggler:focus{text-decoration:none;outline:0;box-shadow:0 0 0 .25rem}.navbar-toggler-icon{display:inline-block;width:1.5em;height:1.5em;vertical-align:middle;background-repeat:no-repeat;background-position:center;background-size:100%}.navbar-nav-scroll{max-height:var(--bs-scroll-height,75vh);overflow-y:auto}@media (min-width:576px){.navbar-expand-sm{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-sm .navbar-nav{flex-direction:row}.navbar-expand-sm .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-sm .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-sm .navbar-nav-scroll{overflow:visible}.navbar-expand-sm .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-sm .navbar-toggler{display:none}.navbar-expand-sm .offcanvas-header{display:none}.navbar-expand-sm .offcanvas{position:inherit;bottom:0;z-index:1000;flex-grow:1;visibility:visible!important;background-color:transparent;border-right:0;border-left:0;transition:none;transform:none}.navbar-expand-sm .offcanvas-bottom,.navbar-expand-sm .offcanvas-top{height:auto;border-top:0;border-bottom:0}.navbar-expand-sm .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}}@media (min-width:768px){.navbar-expand-md{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-md .navbar-nav{flex-direction:row}.navbar-expand-md .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-md .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-md .navbar-nav-scroll{overflow:visible}.navbar-expand-md .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-md .navbar-toggler{display:none}.navbar-expand-md .offcanvas-header{display:none}.navbar-expand-md .offcanvas{position:inherit;bottom:0;z-index:1000;flex-grow:1;visibility:visible!important;background-color:transparent;border-right:0;border-left:0;transition:none;transform:none}.navbar-expand-md .offcanvas-bottom,.navbar-expand-md .offcanvas-top{height:auto;border-top:0;border-bottom:0}.navbar-expand-md .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}}@media (min-width:992px){.navbar-expand-lg{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-lg .navbar-nav{flex-direction:row}.navbar-expand-lg .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-lg .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-lg .navbar-nav-scroll{overflow:visible}.navbar-expand-lg .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-lg .navbar-toggler{display:none}.navbar-expand-lg .offcanvas-header{display:none}.navbar-expand-lg .offcanvas{position:inherit;bottom:0;z-index:1000;flex-grow:1;visibility:visible!important;background-color:transparent;border-right:0;border-left:0;transition:none;transform:none}.navbar-expand-lg .offcanvas-bottom,.navbar-expand-lg .offcanvas-top{height:auto;border-top:0;border-bottom:0}.navbar-expand-lg .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}}@media (min-width:1200px){.navbar-expand-xl{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-xl .navbar-nav{flex-direction:row}.navbar-expand-xl .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-xl .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-xl .navbar-nav-scroll{overflow:visible}.navbar-expand-xl .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-xl .navbar-toggler{display:none}.navbar-expand-xl .offcanvas-header{display:none}.navbar-expand-xl .offcanvas{position:inherit;bottom:0;z-index:1000;flex-grow:1;visibility:visible!important;background-color:transparent;border-right:0;border-left:0;transition:none;transform:none}.navbar-expand-xl .offcanvas-bottom,.navbar-expand-xl .offcanvas-top{height:auto;border-top:0;border-bottom:0}.navbar-expand-xl .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}}@media (min-width:1400px){.navbar-expand-xxl{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-xxl .navbar-nav{flex-direction:row}.navbar-expand-xxl .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-xxl .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-xxl .navbar-nav-scroll{overflow:visible}.navbar-expand-xxl .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-xxl .navbar-toggler{display:none}.navbar-expand-xxl .offcanvas-header{display:none}.navbar-expand-xxl .offcanvas{position:inherit;bottom:0;z-index:1000;flex-grow:1;visibility:visible!important;background-color:transparent;border-right:0;border-left:0;transition:none;transform:none}.navbar-expand-xxl .offcanvas-bottom,.navbar-expand-xxl .offcanvas-top{height:auto;border-top:0;border-bottom:0}.navbar-expand-xxl .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}}.navbar-expand{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand .navbar-nav{flex-direction:row}.navbar-expand .navbar-nav .dropdown-menu{position:absolute}.navbar-expand .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand .navbar-nav-scroll{overflow:visible}.navbar-expand .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand .navbar-toggler{display:none}.navbar-expand .offcanvas-header{display:none}.navbar-expand .offcanvas{position:inherit;bottom:0;z-index:1000;flex-grow:1;visibility:visible!important;background-color:transparent;border-right:0;border-left:0;transition:none;transform:none}.navbar-expand .offcanvas-bottom,.navbar-expand .offcanvas-top{height:auto;border-top:0;border-bottom:0}.navbar-expand .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}.navbar-light .navbar-brand{color:rgba(0,0,0,.9)}.navbar-light .navbar-brand:focus,.navbar-light .navbar-brand:hover{color:rgba(0,0,0,.9)}.navbar-light .navbar-nav .nav-link{color:rgba(0,0,0,.55)}.navbar-light .navbar-nav .nav-link:focus,.navbar-light .navbar-nav .nav-link:hover{color:rgba(0,0,0,.7)}.navbar-light .navbar-nav .nav-link.disabled{color:rgba(0,0,0,.3)}.navbar-light .navbar-nav .nav-link.active,.navbar-light .navbar-nav .show>.nav-link{color:rgba(0,0,0,.9)}.navbar-light .navbar-toggler{color:rgba(0,0,0,.55);border-color:rgba(0,0,0,.1)}.navbar-light .navbar-toggler-icon{background-image:url('+p+")}.navbar-light .navbar-text{color:rgba(0,0,0,.55)}.navbar-light .navbar-text a,.navbar-light .navbar-text a:focus,.navbar-light .navbar-text a:hover{color:rgba(0,0,0,.9)}.navbar-dark .navbar-brand{color:#fff}.navbar-dark .navbar-brand:focus,.navbar-dark .navbar-brand:hover{color:#fff}.navbar-dark .navbar-nav .nav-link{color:rgba(255,255,255,.55)}.navbar-dark .navbar-nav .nav-link:focus,.navbar-dark .navbar-nav .nav-link:hover{color:rgba(255,255,255,.75)}.navbar-dark .navbar-nav .nav-link.disabled{color:rgba(255,255,255,.25)}.navbar-dark .navbar-nav .nav-link.active,.navbar-dark .navbar-nav .show>.nav-link{color:#fff}.navbar-dark .navbar-toggler{color:rgba(255,255,255,.55);border-color:rgba(255,255,255,.1)}.navbar-dark .navbar-toggler-icon{background-image:url("+f+")}.navbar-dark .navbar-text{color:rgba(255,255,255,.55)}.navbar-dark .navbar-text a,.navbar-dark .navbar-text a:focus,.navbar-dark .navbar-text a:hover{color:#fff}.card{position:relative;display:flex;flex-direction:column;min-width:0;word-wrap:break-word;background-color:#fff;background-clip:border-box;border:1px solid rgba(0,0,0,.125);border-radius:.25rem}.card>hr{margin-right:0;margin-left:0}.card>.list-group{border-top:inherit;border-bottom:inherit}.card>.list-group:first-child{border-top-width:0;border-top-left-radius:calc(.25rem - 1px);border-top-right-radius:calc(.25rem - 1px)}.card>.list-group:last-child{border-bottom-width:0;border-bottom-right-radius:calc(.25rem - 1px);border-bottom-left-radius:calc(.25rem - 1px)}.card>.card-header+.list-group,.card>.list-group+.card-footer{border-top:0}.card-body{flex:1 1 auto;padding:1rem 1rem}.card-title{margin-bottom:.5rem}.card-subtitle{margin-top:-.25rem;margin-bottom:0}.card-text:last-child{margin-bottom:0}.card-link+.card-link{margin-left:1rem}.card-header{padding:.5rem 1rem;margin-bottom:0;background-color:rgba(0,0,0,.03);border-bottom:1px solid rgba(0,0,0,.125)}.card-header:first-child{border-radius:calc(.25rem - 1px) calc(.25rem - 1px) 0 0}.card-footer{padding:.5rem 1rem;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.125)}.card-footer:last-child{border-radius:0 0 calc(.25rem - 1px) calc(.25rem - 1px)}.card-header-tabs{margin-right:-.5rem;margin-bottom:-.5rem;margin-left:-.5rem;border-bottom:0}.card-header-pills{margin-right:-.5rem;margin-left:-.5rem}.card-img-overlay{position:absolute;top:0;right:0;bottom:0;left:0;padding:1rem;border-radius:calc(.25rem - 1px)}.card-img,.card-img-bottom,.card-img-top{width:100%}.card-img,.card-img-top{border-top-left-radius:calc(.25rem - 1px);border-top-right-radius:calc(.25rem - 1px)}.card-img,.card-img-bottom{border-bottom-right-radius:calc(.25rem - 1px);border-bottom-left-radius:calc(.25rem - 1px)}.card-group>.card{margin-bottom:.75rem}@media (min-width:576px){.card-group{display:flex;flex-flow:row wrap}.card-group>.card{flex:1 0 0%;margin-bottom:0}.card-group>.card+.card{margin-left:0;border-left:0}.card-group>.card:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.card-group>.card:not(:last-child) .card-header,.card-group>.card:not(:last-child) .card-img-top{border-top-right-radius:0}.card-group>.card:not(:last-child) .card-footer,.card-group>.card:not(:last-child) .card-img-bottom{border-bottom-right-radius:0}.card-group>.card:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.card-group>.card:not(:first-child) .card-header,.card-group>.card:not(:first-child) .card-img-top{border-top-left-radius:0}.card-group>.card:not(:first-child) .card-footer,.card-group>.card:not(:first-child) .card-img-bottom{border-bottom-left-radius:0}}.accordion-button{position:relative;display:flex;align-items:center;width:100%;padding:1rem 1.25rem;font-size:1rem;color:#212529;text-align:left;background-color:#fff;border:0;border-radius:0;overflow-anchor:none;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out,border-radius .15s ease}@media (prefers-reduced-motion:reduce){.accordion-button{transition:none}}.accordion-button:not(.collapsed){color:#0c63e4;background-color:#e7f1ff;box-shadow:inset 0 -1px 0 rgba(0,0,0,.125)}.accordion-button:not(.collapsed)::after{background-image:url("+g+');transform:rotate(-180deg)}.accordion-button::after{flex-shrink:0;width:1.25rem;height:1.25rem;margin-left:auto;content:"";background-image:url('+m+');background-repeat:no-repeat;background-size:1.25rem;transition:transform .2s ease-in-out}@media (prefers-reduced-motion:reduce){.accordion-button::after{transition:none}}.accordion-button:hover{z-index:2}.accordion-button:focus{z-index:3;border-color:#86b7fe;outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.accordion-header{margin-bottom:0}.accordion-item{background-color:#fff;border:1px solid rgba(0,0,0,.125)}.accordion-item:first-of-type{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.accordion-item:first-of-type .accordion-button{border-top-left-radius:calc(.25rem - 1px);border-top-right-radius:calc(.25rem - 1px)}.accordion-item:not(:first-of-type){border-top:0}.accordion-item:last-of-type{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.accordion-item:last-of-type .accordion-button.collapsed{border-bottom-right-radius:calc(.25rem - 1px);border-bottom-left-radius:calc(.25rem - 1px)}.accordion-item:last-of-type .accordion-collapse{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.accordion-body{padding:1rem 1.25rem}.accordion-flush .accordion-collapse{border-width:0}.accordion-flush .accordion-item{border-right:0;border-left:0;border-radius:0}.accordion-flush .accordion-item:first-child{border-top:0}.accordion-flush .accordion-item:last-child{border-bottom:0}.accordion-flush .accordion-item .accordion-button{border-radius:0}.breadcrumb{display:flex;flex-wrap:wrap;padding:0 0;margin-bottom:1rem;list-style:none}.breadcrumb-item+.breadcrumb-item{padding-left:.5rem}.breadcrumb-item+.breadcrumb-item::before{float:left;padding-right:.5rem;color:#6c757d;content:var(--bs-breadcrumb-divider, "/")}.breadcrumb-item.active{color:#6c757d}.pagination{display:flex;padding-left:0;list-style:none}.page-link{position:relative;display:block;color:#0d6efd;text-decoration:none;background-color:#fff;border:1px solid #dee2e6;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.page-link{transition:none}}.page-link:hover{z-index:2;color:#0a58ca;background-color:#e9ecef;border-color:#dee2e6}.page-link:focus{z-index:3;color:#0a58ca;background-color:#e9ecef;outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.page-item:not(:first-child) .page-link{margin-left:-1px}.page-item.active .page-link{z-index:3;color:#fff;background-color:#0d6efd;border-color:#0d6efd}.page-item.disabled .page-link{color:#6c757d;pointer-events:none;background-color:#fff;border-color:#dee2e6}.page-link{padding:.375rem .75rem}.page-item:first-child .page-link{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.page-item:last-child .page-link{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.pagination-lg .page-link{padding:.75rem 1.5rem;font-size:1.25rem}.pagination-lg .page-item:first-child .page-link{border-top-left-radius:.3rem;border-bottom-left-radius:.3rem}.pagination-lg .page-item:last-child .page-link{border-top-right-radius:.3rem;border-bottom-right-radius:.3rem}.pagination-sm .page-link{padding:.25rem .5rem;font-size:.875rem}.pagination-sm .page-item:first-child .page-link{border-top-left-radius:.2rem;border-bottom-left-radius:.2rem}.pagination-sm .page-item:last-child .page-link{border-top-right-radius:.2rem;border-bottom-right-radius:.2rem}.badge{display:inline-block;padding:.35em .65em;font-size:.75em;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25rem}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.alert{position:relative;padding:1rem 1rem;margin-bottom:1rem;border:1px solid transparent;border-radius:.25rem}.alert-heading{color:inherit}.alert-link{font-weight:700}.alert-dismissible{padding-right:3rem}.alert-dismissible .btn-close{position:absolute;top:0;right:0;z-index:2;padding:1.25rem 1rem}.alert-primary{color:#084298;background-color:#cfe2ff;border-color:#b6d4fe}.alert-primary .alert-link{color:#06357a}.alert-secondary{color:#41464b;background-color:#e2e3e5;border-color:#d3d6d8}.alert-secondary .alert-link{color:#34383c}.alert-success{color:#0f5132;background-color:#d1e7dd;border-color:#badbcc}.alert-success .alert-link{color:#0c4128}.alert-info{color:#055160;background-color:#cff4fc;border-color:#b6effb}.alert-info .alert-link{color:#04414d}.alert-warning{color:#664d03;background-color:#fff3cd;border-color:#ffecb5}.alert-warning .alert-link{color:#523e02}.alert-danger{color:#842029;background-color:#f8d7da;border-color:#f5c2c7}.alert-danger .alert-link{color:#6a1a21}.alert-light{color:#636464;background-color:#fefefe;border-color:#fdfdfe}.alert-light .alert-link{color:#4f5050}.alert-dark{color:#141619;background-color:#d3d3d4;border-color:#bcbebf}.alert-dark .alert-link{color:#101214}@-webkit-keyframes progress-bar-stripes{0%{background-position-x:1rem}}@keyframes progress-bar-stripes{0%{background-position-x:1rem}}.progress{display:flex;height:1rem;overflow:hidden;font-size:.75rem;background-color:#e9ecef;border-radius:.25rem}.progress-bar{display:flex;flex-direction:column;justify-content:center;overflow:hidden;color:#fff;text-align:center;white-space:nowrap;background-color:#0d6efd;transition:width .6s ease}@media (prefers-reduced-motion:reduce){.progress-bar{transition:none}}.progress-bar-striped{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:1rem 1rem}.progress-bar-animated{-webkit-animation:1s linear infinite progress-bar-stripes;animation:1s linear infinite progress-bar-stripes}@media (prefers-reduced-motion:reduce){.progress-bar-animated{-webkit-animation:none;animation:none}}.list-group{display:flex;flex-direction:column;padding-left:0;margin-bottom:0;border-radius:.25rem}.list-group-numbered{list-style-type:none;counter-reset:section}.list-group-numbered>li::before{content:counters(section, ".") ". ";counter-increment:section}.list-group-item-action{width:100%;color:#495057;text-align:inherit}.list-group-item-action:focus,.list-group-item-action:hover{z-index:1;color:#495057;text-decoration:none;background-color:#f8f9fa}.list-group-item-action:active{color:#212529;background-color:#e9ecef}.list-group-item{position:relative;display:block;padding:.5rem 1rem;color:#212529;text-decoration:none;background-color:#fff;border:1px solid rgba(0,0,0,.125)}.list-group-item:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.list-group-item:last-child{border-bottom-right-radius:inherit;border-bottom-left-radius:inherit}.list-group-item.disabled,.list-group-item:disabled{color:#6c757d;pointer-events:none;background-color:#fff}.list-group-item.active{z-index:2;color:#fff;background-color:#0d6efd;border-color:#0d6efd}.list-group-item+.list-group-item{border-top-width:0}.list-group-item+.list-group-item.active{margin-top:-1px;border-top-width:1px}.list-group-horizontal{flex-direction:row}.list-group-horizontal>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal>.list-group-item.active{margin-top:0}.list-group-horizontal>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}@media (min-width:576px){.list-group-horizontal-sm{flex-direction:row}.list-group-horizontal-sm>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-sm>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-sm>.list-group-item.active{margin-top:0}.list-group-horizontal-sm>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-sm>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}@media (min-width:768px){.list-group-horizontal-md{flex-direction:row}.list-group-horizontal-md>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-md>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-md>.list-group-item.active{margin-top:0}.list-group-horizontal-md>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-md>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}@media (min-width:992px){.list-group-horizontal-lg{flex-direction:row}.list-group-horizontal-lg>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-lg>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-lg>.list-group-item.active{margin-top:0}.list-group-horizontal-lg>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-lg>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}@media (min-width:1200px){.list-group-horizontal-xl{flex-direction:row}.list-group-horizontal-xl>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-xl>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-xl>.list-group-item.active{margin-top:0}.list-group-horizontal-xl>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-xl>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}@media (min-width:1400px){.list-group-horizontal-xxl{flex-direction:row}.list-group-horizontal-xxl>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-xxl>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-xxl>.list-group-item.active{margin-top:0}.list-group-horizontal-xxl>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-xxl>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}.list-group-flush{border-radius:0}.list-group-flush>.list-group-item{border-width:0 0 1px}.list-group-flush>.list-group-item:last-child{border-bottom-width:0}.list-group-item-primary{color:#084298;background-color:#cfe2ff}.list-group-item-primary.list-group-item-action:focus,.list-group-item-primary.list-group-item-action:hover{color:#084298;background-color:#bacbe6}.list-group-item-primary.list-group-item-action.active{color:#fff;background-color:#084298;border-color:#084298}.list-group-item-secondary{color:#41464b;background-color:#e2e3e5}.list-group-item-secondary.list-group-item-action:focus,.list-group-item-secondary.list-group-item-action:hover{color:#41464b;background-color:#cbccce}.list-group-item-secondary.list-group-item-action.active{color:#fff;background-color:#41464b;border-color:#41464b}.list-group-item-success{color:#0f5132;background-color:#d1e7dd}.list-group-item-success.list-group-item-action:focus,.list-group-item-success.list-group-item-action:hover{color:#0f5132;background-color:#bcd0c7}.list-group-item-success.list-group-item-action.active{color:#fff;background-color:#0f5132;border-color:#0f5132}.list-group-item-info{color:#055160;background-color:#cff4fc}.list-group-item-info.list-group-item-action:focus,.list-group-item-info.list-group-item-action:hover{color:#055160;background-color:#badce3}.list-group-item-info.list-group-item-action.active{color:#fff;background-color:#055160;border-color:#055160}.list-group-item-warning{color:#664d03;background-color:#fff3cd}.list-group-item-warning.list-group-item-action:focus,.list-group-item-warning.list-group-item-action:hover{color:#664d03;background-color:#e6dbb9}.list-group-item-warning.list-group-item-action.active{color:#fff;background-color:#664d03;border-color:#664d03}.list-group-item-danger{color:#842029;background-color:#f8d7da}.list-group-item-danger.list-group-item-action:focus,.list-group-item-danger.list-group-item-action:hover{color:#842029;background-color:#dfc2c4}.list-group-item-danger.list-group-item-action.active{color:#fff;background-color:#842029;border-color:#842029}.list-group-item-light{color:#636464;background-color:#fefefe}.list-group-item-light.list-group-item-action:focus,.list-group-item-light.list-group-item-action:hover{color:#636464;background-color:#e5e5e5}.list-group-item-light.list-group-item-action.active{color:#fff;background-color:#636464;border-color:#636464}.list-group-item-dark{color:#141619;background-color:#d3d3d4}.list-group-item-dark.list-group-item-action:focus,.list-group-item-dark.list-group-item-action:hover{color:#141619;background-color:#bebebf}.list-group-item-dark.list-group-item-action.active{color:#fff;background-color:#141619;border-color:#141619}.btn-close{box-sizing:content-box;width:1em;height:1em;padding:.25em .25em;color:#000;background:transparent url('+y+') center/1em auto no-repeat;border:0;border-radius:.25rem;opacity:.5}.btn-close:hover{color:#000;text-decoration:none;opacity:.75}.btn-close:focus{outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25);opacity:1}.btn-close.disabled,.btn-close:disabled{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:.25}.btn-close-white{filter:invert(1) grayscale(100%) brightness(200%)}.toast{width:350px;max-width:100%;font-size:.875rem;pointer-events:auto;background-color:rgba(255,255,255,.85);background-clip:padding-box;border:1px solid rgba(0,0,0,.1);box-shadow:0 .5rem 1rem rgba(0,0,0,.15);border-radius:.25rem}.toast.showing{opacity:0}.toast:not(.show){display:none}.toast-container{width:-webkit-max-content;width:-moz-max-content;width:max-content;max-width:100%;pointer-events:none}.toast-container>:not(:last-child){margin-bottom:.75rem}.toast-header{display:flex;align-items:center;padding:.5rem .75rem;color:#6c757d;background-color:rgba(255,255,255,.85);background-clip:padding-box;border-bottom:1px solid rgba(0,0,0,.05);border-top-left-radius:calc(.25rem - 1px);border-top-right-radius:calc(.25rem - 1px)}.toast-header .btn-close{margin-right:-.375rem;margin-left:.75rem}.toast-body{padding:.75rem;word-wrap:break-word}.modal{position:fixed;top:0;left:0;z-index:1055;display:none;width:100%;height:100%;overflow-x:hidden;overflow-y:auto;outline:0}.modal-dialog{position:relative;width:auto;margin:.5rem;pointer-events:none}.modal.fade .modal-dialog{transition:transform .3s ease-out;transform:translate(0,-50px)}@media (prefers-reduced-motion:reduce){.modal.fade .modal-dialog{transition:none}}.modal.show .modal-dialog{transform:none}.modal.modal-static .modal-dialog{transform:scale(1.02)}.modal-dialog-scrollable{height:calc(100% - 1rem)}.modal-dialog-scrollable .modal-content{max-height:100%;overflow:hidden}.modal-dialog-scrollable .modal-body{overflow-y:auto}.modal-dialog-centered{display:flex;align-items:center;min-height:calc(100% - 1rem)}.modal-content{position:relative;display:flex;flex-direction:column;width:100%;pointer-events:auto;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.2);border-radius:.3rem;outline:0}.modal-backdrop{position:fixed;top:0;left:0;z-index:1050;width:100vw;height:100vh;background-color:#000}.modal-backdrop.fade{opacity:0}.modal-backdrop.show{opacity:.5}.modal-header{display:flex;flex-shrink:0;align-items:center;justify-content:space-between;padding:1rem 1rem;border-bottom:1px solid #dee2e6;border-top-left-radius:calc(.3rem - 1px);border-top-right-radius:calc(.3rem - 1px)}.modal-header .btn-close{padding:.5rem .5rem;margin:-.5rem -.5rem -.5rem auto}.modal-title{margin-bottom:0;line-height:1.5}.modal-body{position:relative;flex:1 1 auto;padding:1rem}.modal-footer{display:flex;flex-wrap:wrap;flex-shrink:0;align-items:center;justify-content:flex-end;padding:.75rem;border-top:1px solid #dee2e6;border-bottom-right-radius:calc(.3rem - 1px);border-bottom-left-radius:calc(.3rem - 1px)}.modal-footer>*{margin:.25rem}@media (min-width:576px){.modal-dialog{max-width:500px;margin:1.75rem auto}.modal-dialog-scrollable{height:calc(100% - 3.5rem)}.modal-dialog-centered{min-height:calc(100% - 3.5rem)}.modal-sm{max-width:300px}}@media (min-width:992px){.modal-lg,.modal-xl{max-width:800px}}@media (min-width:1200px){.modal-xl{max-width:1140px}}.modal-fullscreen{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen .modal-header{border-radius:0}.modal-fullscreen .modal-body{overflow-y:auto}.modal-fullscreen .modal-footer{border-radius:0}@media (max-width:575.98px){.modal-fullscreen-sm-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-sm-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-sm-down .modal-header{border-radius:0}.modal-fullscreen-sm-down .modal-body{overflow-y:auto}.modal-fullscreen-sm-down .modal-footer{border-radius:0}}@media (max-width:767.98px){.modal-fullscreen-md-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-md-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-md-down .modal-header{border-radius:0}.modal-fullscreen-md-down .modal-body{overflow-y:auto}.modal-fullscreen-md-down .modal-footer{border-radius:0}}@media (max-width:991.98px){.modal-fullscreen-lg-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-lg-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-lg-down .modal-header{border-radius:0}.modal-fullscreen-lg-down .modal-body{overflow-y:auto}.modal-fullscreen-lg-down .modal-footer{border-radius:0}}@media (max-width:1199.98px){.modal-fullscreen-xl-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-xl-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-xl-down .modal-header{border-radius:0}.modal-fullscreen-xl-down .modal-body{overflow-y:auto}.modal-fullscreen-xl-down .modal-footer{border-radius:0}}@media (max-width:1399.98px){.modal-fullscreen-xxl-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-xxl-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-xxl-down .modal-header{border-radius:0}.modal-fullscreen-xxl-down .modal-body{overflow-y:auto}.modal-fullscreen-xxl-down .modal-footer{border-radius:0}}.tooltip{position:absolute;z-index:1080;display:block;margin:0;font-family:var(--bs-font-sans-serif);font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;white-space:normal;line-break:auto;font-size:.875rem;word-wrap:break-word;opacity:0}.tooltip.show{opacity:.9}.tooltip .tooltip-arrow{position:absolute;display:block;width:.8rem;height:.4rem}.tooltip .tooltip-arrow::before{position:absolute;content:"";border-color:transparent;border-style:solid}.bs-tooltip-auto[data-popper-placement^=top],.bs-tooltip-top{padding:.4rem 0}.bs-tooltip-auto[data-popper-placement^=top] .tooltip-arrow,.bs-tooltip-top .tooltip-arrow{bottom:0}.bs-tooltip-auto[data-popper-placement^=top] .tooltip-arrow::before,.bs-tooltip-top .tooltip-arrow::before{top:-1px;border-width:.4rem .4rem 0;border-top-color:#000}.bs-tooltip-auto[data-popper-placement^=right],.bs-tooltip-end{padding:0 .4rem}.bs-tooltip-auto[data-popper-placement^=right] .tooltip-arrow,.bs-tooltip-end .tooltip-arrow{left:0;width:.4rem;height:.8rem}.bs-tooltip-auto[data-popper-placement^=right] .tooltip-arrow::before,.bs-tooltip-end .tooltip-arrow::before{right:-1px;border-width:.4rem .4rem .4rem 0;border-right-color:#000}.bs-tooltip-auto[data-popper-placement^=bottom],.bs-tooltip-bottom{padding:.4rem 0}.bs-tooltip-auto[data-popper-placement^=bottom] .tooltip-arrow,.bs-tooltip-bottom .tooltip-arrow{top:0}.bs-tooltip-auto[data-popper-placement^=bottom] .tooltip-arrow::before,.bs-tooltip-bottom .tooltip-arrow::before{bottom:-1px;border-width:0 .4rem .4rem;border-bottom-color:#000}.bs-tooltip-auto[data-popper-placement^=left],.bs-tooltip-start{padding:0 .4rem}.bs-tooltip-auto[data-popper-placement^=left] .tooltip-arrow,.bs-tooltip-start .tooltip-arrow{right:0;width:.4rem;height:.8rem}.bs-tooltip-auto[data-popper-placement^=left] .tooltip-arrow::before,.bs-tooltip-start .tooltip-arrow::before{left:-1px;border-width:.4rem 0 .4rem .4rem;border-left-color:#000}.tooltip-inner{max-width:200px;padding:.25rem .5rem;color:#fff;text-align:center;background-color:#000;border-radius:.25rem}.popover{position:absolute;top:0;left:0;z-index:1070;display:block;max-width:276px;font-family:var(--bs-font-sans-serif);font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;white-space:normal;line-break:auto;font-size:.875rem;word-wrap:break-word;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.2);border-radius:.3rem}.popover .popover-arrow{position:absolute;display:block;width:1rem;height:.5rem}.popover .popover-arrow::after,.popover .popover-arrow::before{position:absolute;display:block;content:"";border-color:transparent;border-style:solid}.bs-popover-auto[data-popper-placement^=top]>.popover-arrow,.bs-popover-top>.popover-arrow{bottom:calc(-.5rem - 1px)}.bs-popover-auto[data-popper-placement^=top]>.popover-arrow::before,.bs-popover-top>.popover-arrow::before{bottom:0;border-width:.5rem .5rem 0;border-top-color:rgba(0,0,0,.25)}.bs-popover-auto[data-popper-placement^=top]>.popover-arrow::after,.bs-popover-top>.popover-arrow::after{bottom:1px;border-width:.5rem .5rem 0;border-top-color:#fff}.bs-popover-auto[data-popper-placement^=right]>.popover-arrow,.bs-popover-end>.popover-arrow{left:calc(-.5rem - 1px);width:.5rem;height:1rem}.bs-popover-auto[data-popper-placement^=right]>.popover-arrow::before,.bs-popover-end>.popover-arrow::before{left:0;border-width:.5rem .5rem .5rem 0;border-right-color:rgba(0,0,0,.25)}.bs-popover-auto[data-popper-placement^=right]>.popover-arrow::after,.bs-popover-end>.popover-arrow::after{left:1px;border-width:.5rem .5rem .5rem 0;border-right-color:#fff}.bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow,.bs-popover-bottom>.popover-arrow{top:calc(-.5rem - 1px)}.bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow::before,.bs-popover-bottom>.popover-arrow::before{top:0;border-width:0 .5rem .5rem .5rem;border-bottom-color:rgba(0,0,0,.25)}.bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow::after,.bs-popover-bottom>.popover-arrow::after{top:1px;border-width:0 .5rem .5rem .5rem;border-bottom-color:#fff}.bs-popover-auto[data-popper-placement^=bottom] .popover-header::before,.bs-popover-bottom .popover-header::before{position:absolute;top:0;left:50%;display:block;width:1rem;margin-left:-.5rem;content:"";border-bottom:1px solid #f0f0f0}.bs-popover-auto[data-popper-placement^=left]>.popover-arrow,.bs-popover-start>.popover-arrow{right:calc(-.5rem - 1px);width:.5rem;height:1rem}.bs-popover-auto[data-popper-placement^=left]>.popover-arrow::before,.bs-popover-start>.popover-arrow::before{right:0;border-width:.5rem 0 .5rem .5rem;border-left-color:rgba(0,0,0,.25)}.bs-popover-auto[data-popper-placement^=left]>.popover-arrow::after,.bs-popover-start>.popover-arrow::after{right:1px;border-width:.5rem 0 .5rem .5rem;border-left-color:#fff}.popover-header{padding:.5rem 1rem;margin-bottom:0;font-size:1rem;background-color:#f0f0f0;border-bottom:1px solid rgba(0,0,0,.2);border-top-left-radius:calc(.3rem - 1px);border-top-right-radius:calc(.3rem - 1px)}.popover-header:empty{display:none}.popover-body{padding:1rem 1rem;color:#212529}.carousel{position:relative}.carousel.pointer-event{touch-action:pan-y}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner::after{display:block;clear:both;content:""}.carousel-item{position:relative;display:none;float:left;width:100%;margin-right:-100%;-webkit-backface-visibility:hidden;backface-visibility:hidden;transition:transform .6s ease-in-out}@media (prefers-reduced-motion:reduce){.carousel-item{transition:none}}.carousel-item-next,.carousel-item-prev,.carousel-item.active{display:block}.active.carousel-item-end,.carousel-item-next:not(.carousel-item-start){transform:translateX(100%)}.active.carousel-item-start,.carousel-item-prev:not(.carousel-item-end){transform:translateX(-100%)}.carousel-fade .carousel-item{opacity:0;transition-property:opacity;transform:none}.carousel-fade .carousel-item-next.carousel-item-start,.carousel-fade .carousel-item-prev.carousel-item-end,.carousel-fade .carousel-item.active{z-index:1;opacity:1}.carousel-fade .active.carousel-item-end,.carousel-fade .active.carousel-item-start{z-index:0;opacity:0;transition:opacity 0s .6s}@media (prefers-reduced-motion:reduce){.carousel-fade .active.carousel-item-end,.carousel-fade .active.carousel-item-start{transition:none}}.carousel-control-next,.carousel-control-prev{position:absolute;top:0;bottom:0;z-index:1;display:flex;align-items:center;justify-content:center;width:15%;padding:0;color:#fff;text-align:center;background:0 0;border:0;opacity:.5;transition:opacity .15s ease}@media (prefers-reduced-motion:reduce){.carousel-control-next,.carousel-control-prev{transition:none}}.carousel-control-next:focus,.carousel-control-next:hover,.carousel-control-prev:focus,.carousel-control-prev:hover{color:#fff;text-decoration:none;outline:0;opacity:.9}.carousel-control-prev{left:0}.carousel-control-next{right:0}.carousel-control-next-icon,.carousel-control-prev-icon{display:inline-block;width:2rem;height:2rem;background-repeat:no-repeat;background-position:50%;background-size:100% 100%}.carousel-control-prev-icon{background-image:url('+v+")}.carousel-control-next-icon{background-image:url("+x+')}.carousel-indicators{position:absolute;right:0;bottom:0;left:0;z-index:2;display:flex;justify-content:center;padding:0;margin-right:15%;margin-bottom:1rem;margin-left:15%;list-style:none}.carousel-indicators [data-bs-target]{box-sizing:content-box;flex:0 1 auto;width:30px;height:3px;padding:0;margin-right:3px;margin-left:3px;text-indent:-999px;cursor:pointer;background-color:#fff;background-clip:padding-box;border:0;border-top:10px solid transparent;border-bottom:10px solid transparent;opacity:.5;transition:opacity .6s ease}@media (prefers-reduced-motion:reduce){.carousel-indicators [data-bs-target]{transition:none}}.carousel-indicators .active{opacity:1}.carousel-caption{position:absolute;right:15%;bottom:1.25rem;left:15%;padding-top:1.25rem;padding-bottom:1.25rem;color:#fff;text-align:center}.carousel-dark .carousel-control-next-icon,.carousel-dark .carousel-control-prev-icon{filter:invert(1) grayscale(100)}.carousel-dark .carousel-indicators [data-bs-target]{background-color:#000}.carousel-dark .carousel-caption{color:#000}@-webkit-keyframes spinner-border{to{transform:rotate(360deg)}}@keyframes spinner-border{to{transform:rotate(360deg)}}.spinner-border{display:inline-block;width:2rem;height:2rem;vertical-align:-.125em;border:.25em solid currentColor;border-right-color:transparent;border-radius:50%;-webkit-animation:.75s linear infinite spinner-border;animation:.75s linear infinite spinner-border}.spinner-border-sm{width:1rem;height:1rem;border-width:.2em}@-webkit-keyframes spinner-grow{0%{transform:scale(0)}50%{opacity:1;transform:none}}@keyframes spinner-grow{0%{transform:scale(0)}50%{opacity:1;transform:none}}.spinner-grow{display:inline-block;width:2rem;height:2rem;vertical-align:-.125em;background-color:currentColor;border-radius:50%;opacity:0;-webkit-animation:.75s linear infinite spinner-grow;animation:.75s linear infinite spinner-grow}.spinner-grow-sm{width:1rem;height:1rem}@media (prefers-reduced-motion:reduce){.spinner-border,.spinner-grow{-webkit-animation-duration:1.5s;animation-duration:1.5s}}.offcanvas{position:fixed;bottom:0;z-index:1045;display:flex;flex-direction:column;max-width:100%;visibility:hidden;background-color:#fff;background-clip:padding-box;outline:0;transition:transform .3s ease-in-out}@media (prefers-reduced-motion:reduce){.offcanvas{transition:none}}.offcanvas-backdrop{position:fixed;top:0;left:0;z-index:1040;width:100vw;height:100vh;background-color:#000}.offcanvas-backdrop.fade{opacity:0}.offcanvas-backdrop.show{opacity:.5}.offcanvas-header{display:flex;align-items:center;justify-content:space-between;padding:1rem 1rem}.offcanvas-header .btn-close{padding:.5rem .5rem;margin-top:-.5rem;margin-right:-.5rem;margin-bottom:-.5rem}.offcanvas-title{margin-bottom:0;line-height:1.5}.offcanvas-body{flex-grow:1;padding:1rem 1rem;overflow-y:auto}.offcanvas-start{top:0;left:0;width:400px;border-right:1px solid rgba(0,0,0,.2);transform:translateX(-100%)}.offcanvas-end{top:0;right:0;width:400px;border-left:1px solid rgba(0,0,0,.2);transform:translateX(100%)}.offcanvas-top{top:0;right:0;left:0;height:30vh;max-height:100%;border-bottom:1px solid rgba(0,0,0,.2);transform:translateY(-100%)}.offcanvas-bottom{right:0;left:0;height:30vh;max-height:100%;border-top:1px solid rgba(0,0,0,.2);transform:translateY(100%)}.offcanvas.show{transform:none}.placeholder{display:inline-block;min-height:1em;vertical-align:middle;cursor:wait;background-color:currentColor;opacity:.5}.placeholder.btn::before{display:inline-block;content:""}.placeholder-xs{min-height:.6em}.placeholder-sm{min-height:.8em}.placeholder-lg{min-height:1.2em}.placeholder-glow .placeholder{-webkit-animation:placeholder-glow 2s ease-in-out infinite;animation:placeholder-glow 2s ease-in-out infinite}@-webkit-keyframes placeholder-glow{50%{opacity:.2}}@keyframes placeholder-glow{50%{opacity:.2}}.placeholder-wave{-webkit-mask-image:linear-gradient(130deg,#000 55%,rgba(0,0,0,0.8) 75%,#000 95%);mask-image:linear-gradient(130deg,#000 55%,rgba(0,0,0,0.8) 75%,#000 95%);-webkit-mask-size:200% 100%;mask-size:200% 100%;-webkit-animation:placeholder-wave 2s linear infinite;animation:placeholder-wave 2s linear infinite}@-webkit-keyframes placeholder-wave{100%{-webkit-mask-position:-200% 0%;mask-position:-200% 0%}}@keyframes placeholder-wave{100%{-webkit-mask-position:-200% 0%;mask-position:-200% 0%}}.clearfix::after{display:block;clear:both;content:""}.link-primary{color:#0d6efd}.link-primary:focus,.link-primary:hover{color:#0a58ca}.link-secondary{color:#6c757d}.link-secondary:focus,.link-secondary:hover{color:#565e64}.link-success{color:#198754}.link-success:focus,.link-success:hover{color:#146c43}.link-info{color:#0dcaf0}.link-info:focus,.link-info:hover{color:#3dd5f3}.link-warning{color:#ffc107}.link-warning:focus,.link-warning:hover{color:#ffcd39}.link-danger{color:#dc3545}.link-danger:focus,.link-danger:hover{color:#b02a37}.link-light{color:#f8f9fa}.link-light:focus,.link-light:hover{color:#f9fafb}.link-dark{color:#212529}.link-dark:focus,.link-dark:hover{color:#1a1e21}.ratio{position:relative;width:100%}.ratio::before{display:block;padding-top:var(--bs-aspect-ratio);content:""}.ratio>*{position:absolute;top:0;left:0;width:100%;height:100%}.ratio-1x1{--bs-aspect-ratio:100%}.ratio-4x3{--bs-aspect-ratio:75%}.ratio-16x9{--bs-aspect-ratio:56.25%}.ratio-21x9{--bs-aspect-ratio:42.8571428571%}.fixed-top{position:fixed;top:0;right:0;left:0;z-index:1030}.fixed-bottom{position:fixed;right:0;bottom:0;left:0;z-index:1030}.sticky-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}@media (min-width:576px){.sticky-sm-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}}@media (min-width:768px){.sticky-md-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}}@media (min-width:992px){.sticky-lg-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}}@media (min-width:1200px){.sticky-xl-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}}@media (min-width:1400px){.sticky-xxl-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}}.hstack{display:flex;flex-direction:row;align-items:center;align-self:stretch}.vstack{display:flex;flex:1 1 auto;flex-direction:column;align-self:stretch}.visually-hidden,.visually-hidden-focusable:not(:focus):not(:focus-within){position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}.stretched-link::after{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;content:""}.text-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vr{display:inline-block;align-self:stretch;width:1px;min-height:1em;background-color:currentColor;opacity:.25}.align-baseline{vertical-align:baseline!important}.align-top{vertical-align:top!important}.align-middle{vertical-align:middle!important}.align-bottom{vertical-align:bottom!important}.align-text-bottom{vertical-align:text-bottom!important}.align-text-top{vertical-align:text-top!important}.float-start{float:left!important}.float-end{float:right!important}.float-none{float:none!important}.opacity-0{opacity:0!important}.opacity-25{opacity:.25!important}.opacity-50{opacity:.5!important}.opacity-75{opacity:.75!important}.opacity-100{opacity:1!important}.overflow-auto{overflow:auto!important}.overflow-hidden{overflow:hidden!important}.overflow-visible{overflow:visible!important}.overflow-scroll{overflow:scroll!important}.d-inline{display:inline!important}.d-inline-block{display:inline-block!important}.d-block{display:block!important}.d-grid{display:grid!important}.d-table{display:table!important}.d-table-row{display:table-row!important}.d-table-cell{display:table-cell!important}.d-flex{display:flex!important}.d-inline-flex{display:inline-flex!important}.d-none{display:none!important}.shadow{box-shadow:0 .5rem 1rem rgba(0,0,0,.15)!important}.shadow-sm{box-shadow:0 .125rem .25rem rgba(0,0,0,.075)!important}.shadow-lg{box-shadow:0 1rem 3rem rgba(0,0,0,.175)!important}.shadow-none{box-shadow:none!important}.position-static{position:static!important}.position-relative{position:relative!important}.position-absolute{position:absolute!important}.position-fixed{position:fixed!important}.position-sticky{position:-webkit-sticky!important;position:sticky!important}.top-0{top:0!important}.top-50{top:50%!important}.top-100{top:100%!important}.bottom-0{bottom:0!important}.bottom-50{bottom:50%!important}.bottom-100{bottom:100%!important}.start-0{left:0!important}.start-50{left:50%!important}.start-100{left:100%!important}.end-0{right:0!important}.end-50{right:50%!important}.end-100{right:100%!important}.translate-middle{transform:translate(-50%,-50%)!important}.translate-middle-x{transform:translateX(-50%)!important}.translate-middle-y{transform:translateY(-50%)!important}.border{border:1px solid #dee2e6!important}.border-0{border:0!important}.border-top{border-top:1px solid #dee2e6!important}.border-top-0{border-top:0!important}.border-end{border-right:1px solid #dee2e6!important}.border-end-0{border-right:0!important}.border-bottom{border-bottom:1px solid #dee2e6!important}.border-bottom-0{border-bottom:0!important}.border-start{border-left:1px solid #dee2e6!important}.border-start-0{border-left:0!important}.border-primary{border-color:#0d6efd!important}.border-secondary{border-color:#6c757d!important}.border-success{border-color:#198754!important}.border-info{border-color:#0dcaf0!important}.border-warning{border-color:#ffc107!important}.border-danger{border-color:#dc3545!important}.border-light{border-color:#f8f9fa!important}.border-dark{border-color:#212529!important}.border-white{border-color:#fff!important}.border-1{border-width:1px!important}.border-2{border-width:2px!important}.border-3{border-width:3px!important}.border-4{border-width:4px!important}.border-5{border-width:5px!important}.w-25{width:25%!important}.w-50{width:50%!important}.w-75{width:75%!important}.w-100{width:100%!important}.w-auto{width:auto!important}.mw-100{max-width:100%!important}.vw-100{width:100vw!important}.min-vw-100{min-width:100vw!important}.h-25{height:25%!important}.h-50{height:50%!important}.h-75{height:75%!important}.h-100{height:100%!important}.h-auto{height:auto!important}.mh-100{max-height:100%!important}.vh-100{height:100vh!important}.min-vh-100{min-height:100vh!important}.flex-fill{flex:1 1 auto!important}.flex-row{flex-direction:row!important}.flex-column{flex-direction:column!important}.flex-row-reverse{flex-direction:row-reverse!important}.flex-column-reverse{flex-direction:column-reverse!important}.flex-grow-0{flex-grow:0!important}.flex-grow-1{flex-grow:1!important}.flex-shrink-0{flex-shrink:0!important}.flex-shrink-1{flex-shrink:1!important}.flex-wrap{flex-wrap:wrap!important}.flex-nowrap{flex-wrap:nowrap!important}.flex-wrap-reverse{flex-wrap:wrap-reverse!important}.gap-0{gap:0!important}.gap-1{gap:.25rem!important}.gap-2{gap:.5rem!important}.gap-3{gap:1rem!important}.gap-4{gap:1.5rem!important}.gap-5{gap:3rem!important}.justify-content-start{justify-content:flex-start!important}.justify-content-end{justify-content:flex-end!important}.justify-content-center{justify-content:center!important}.justify-content-between{justify-content:space-between!important}.justify-content-around{justify-content:space-around!important}.justify-content-evenly{justify-content:space-evenly!important}.align-items-start{align-items:flex-start!important}.align-items-end{align-items:flex-end!important}.align-items-center{align-items:center!important}.align-items-baseline{align-items:baseline!important}.align-items-stretch{align-items:stretch!important}.align-content-start{align-content:flex-start!important}.align-content-end{align-content:flex-end!important}.align-content-center{align-content:center!important}.align-content-between{align-content:space-between!important}.align-content-around{align-content:space-around!important}.align-content-stretch{align-content:stretch!important}.align-self-auto{align-self:auto!important}.align-self-start{align-self:flex-start!important}.align-self-end{align-self:flex-end!important}.align-self-center{align-self:center!important}.align-self-baseline{align-self:baseline!important}.align-self-stretch{align-self:stretch!important}.order-first{order:-1!important}.order-0{order:0!important}.order-1{order:1!important}.order-2{order:2!important}.order-3{order:3!important}.order-4{order:4!important}.order-5{order:5!important}.order-last{order:6!important}.m-0{margin:0!important}.m-1{margin:.25rem!important}.m-2{margin:.5rem!important}.m-3{margin:1rem!important}.m-4{margin:1.5rem!important}.m-5{margin:3rem!important}.m-auto{margin:auto!important}.mx-0{margin-right:0!important;margin-left:0!important}.mx-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-3{margin-right:1rem!important;margin-left:1rem!important}.mx-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-5{margin-right:3rem!important;margin-left:3rem!important}.mx-auto{margin-right:auto!important;margin-left:auto!important}.my-0{margin-top:0!important;margin-bottom:0!important}.my-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-0{margin-top:0!important}.mt-1{margin-top:.25rem!important}.mt-2{margin-top:.5rem!important}.mt-3{margin-top:1rem!important}.mt-4{margin-top:1.5rem!important}.mt-5{margin-top:3rem!important}.mt-auto{margin-top:auto!important}.me-0{margin-right:0!important}.me-1{margin-right:.25rem!important}.me-2{margin-right:.5rem!important}.me-3{margin-right:1rem!important}.me-4{margin-right:1.5rem!important}.me-5{margin-right:3rem!important}.me-auto{margin-right:auto!important}.mb-0{margin-bottom:0!important}.mb-1{margin-bottom:.25rem!important}.mb-2{margin-bottom:.5rem!important}.mb-3{margin-bottom:1rem!important}.mb-4{margin-bottom:1.5rem!important}.mb-5{margin-bottom:3rem!important}.mb-auto{margin-bottom:auto!important}.ms-0{margin-left:0!important}.ms-1{margin-left:.25rem!important}.ms-2{margin-left:.5rem!important}.ms-3{margin-left:1rem!important}.ms-4{margin-left:1.5rem!important}.ms-5{margin-left:3rem!important}.ms-auto{margin-left:auto!important}.p-0{padding:0!important}.p-1{padding:.25rem!important}.p-2{padding:.5rem!important}.p-3{padding:1rem!important}.p-4{padding:1.5rem!important}.p-5{padding:3rem!important}.px-0{padding-right:0!important;padding-left:0!important}.px-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-3{padding-right:1rem!important;padding-left:1rem!important}.px-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-5{padding-right:3rem!important;padding-left:3rem!important}.py-0{padding-top:0!important;padding-bottom:0!important}.py-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-0{padding-top:0!important}.pt-1{padding-top:.25rem!important}.pt-2{padding-top:.5rem!important}.pt-3{padding-top:1rem!important}.pt-4{padding-top:1.5rem!important}.pt-5{padding-top:3rem!important}.pe-0{padding-right:0!important}.pe-1{padding-right:.25rem!important}.pe-2{padding-right:.5rem!important}.pe-3{padding-right:1rem!important}.pe-4{padding-right:1.5rem!important}.pe-5{padding-right:3rem!important}.pb-0{padding-bottom:0!important}.pb-1{padding-bottom:.25rem!important}.pb-2{padding-bottom:.5rem!important}.pb-3{padding-bottom:1rem!important}.pb-4{padding-bottom:1.5rem!important}.pb-5{padding-bottom:3rem!important}.ps-0{padding-left:0!important}.ps-1{padding-left:.25rem!important}.ps-2{padding-left:.5rem!important}.ps-3{padding-left:1rem!important}.ps-4{padding-left:1.5rem!important}.ps-5{padding-left:3rem!important}.font-monospace{font-family:var(--bs-font-monospace)!important}.fs-1{font-size:calc(1.375rem + 1.5vw)!important}.fs-2{font-size:calc(1.325rem + .9vw)!important}.fs-3{font-size:calc(1.3rem + .6vw)!important}.fs-4{font-size:calc(1.275rem + .3vw)!important}.fs-5{font-size:1.25rem!important}.fs-6{font-size:1rem!important}.fst-italic{font-style:italic!important}.fst-normal{font-style:normal!important}.fw-light{font-weight:300!important}.fw-lighter{font-weight:lighter!important}.fw-normal{font-weight:400!important}.fw-bold{font-weight:700!important}.fw-bolder{font-weight:bolder!important}.lh-1{line-height:1!important}.lh-sm{line-height:1.25!important}.lh-base{line-height:1.5!important}.lh-lg{line-height:2!important}.text-start{text-align:left!important}.text-end{text-align:right!important}.text-center{text-align:center!important}.text-decoration-none{text-decoration:none!important}.text-decoration-underline{text-decoration:underline!important}.text-decoration-line-through{text-decoration:line-through!important}.text-lowercase{text-transform:lowercase!important}.text-uppercase{text-transform:uppercase!important}.text-capitalize{text-transform:capitalize!important}.text-wrap{white-space:normal!important}.text-nowrap{white-space:nowrap!important}.text-break{word-wrap:break-word!important;word-break:break-word!important}.text-primary{--bs-text-opacity:1;color:rgba(var(--bs-primary-rgb),var(--bs-text-opacity))!important}.text-secondary{--bs-text-opacity:1;color:rgba(var(--bs-secondary-rgb),var(--bs-text-opacity))!important}.text-success{--bs-text-opacity:1;color:rgba(var(--bs-success-rgb),var(--bs-text-opacity))!important}.text-info{--bs-text-opacity:1;color:rgba(var(--bs-info-rgb),var(--bs-text-opacity))!important}.text-warning{--bs-text-opacity:1;color:rgba(var(--bs-warning-rgb),var(--bs-text-opacity))!important}.text-danger{--bs-text-opacity:1;color:rgba(var(--bs-danger-rgb),var(--bs-text-opacity))!important}.text-light{--bs-text-opacity:1;color:rgba(var(--bs-light-rgb),var(--bs-text-opacity))!important}.text-dark{--bs-text-opacity:1;color:rgba(var(--bs-dark-rgb),var(--bs-text-opacity))!important}.text-black{--bs-text-opacity:1;color:rgba(var(--bs-black-rgb),var(--bs-text-opacity))!important}.text-white{--bs-text-opacity:1;color:rgba(var(--bs-white-rgb),var(--bs-text-opacity))!important}.text-body{--bs-text-opacity:1;color:rgba(var(--bs-body-color-rgb),var(--bs-text-opacity))!important}.text-muted{--bs-text-opacity:1;color:#6c757d!important}.text-black-50{--bs-text-opacity:1;color:rgba(0,0,0,.5)!important}.text-white-50{--bs-text-opacity:1;color:rgba(255,255,255,.5)!important}.text-reset{--bs-text-opacity:1;color:inherit!important}.text-opacity-25{--bs-text-opacity:0.25}.text-opacity-50{--bs-text-opacity:0.5}.text-opacity-75{--bs-text-opacity:0.75}.text-opacity-100{--bs-text-opacity:1}.bg-primary{--bs-bg-opacity:1;background-color:rgba(var(--bs-primary-rgb),var(--bs-bg-opacity))!important}.bg-secondary{--bs-bg-opacity:1;background-color:rgba(var(--bs-secondary-rgb),var(--bs-bg-opacity))!important}.bg-success{--bs-bg-opacity:1;background-color:rgba(var(--bs-success-rgb),var(--bs-bg-opacity))!important}.bg-info{--bs-bg-opacity:1;background-color:rgba(var(--bs-info-rgb),var(--bs-bg-opacity))!important}.bg-warning{--bs-bg-opacity:1;background-color:rgba(var(--bs-warning-rgb),var(--bs-bg-opacity))!important}.bg-danger{--bs-bg-opacity:1;background-color:rgba(var(--bs-danger-rgb),var(--bs-bg-opacity))!important}.bg-light{--bs-bg-opacity:1;background-color:rgba(var(--bs-light-rgb),var(--bs-bg-opacity))!important}.bg-dark{--bs-bg-opacity:1;background-color:rgba(var(--bs-dark-rgb),var(--bs-bg-opacity))!important}.bg-black{--bs-bg-opacity:1;background-color:rgba(var(--bs-black-rgb),var(--bs-bg-opacity))!important}.bg-white{--bs-bg-opacity:1;background-color:rgba(var(--bs-white-rgb),var(--bs-bg-opacity))!important}.bg-body{--bs-bg-opacity:1;background-color:rgba(var(--bs-body-bg-rgb),var(--bs-bg-opacity))!important}.bg-transparent{--bs-bg-opacity:1;background-color:transparent!important}.bg-opacity-10{--bs-bg-opacity:0.1}.bg-opacity-25{--bs-bg-opacity:0.25}.bg-opacity-50{--bs-bg-opacity:0.5}.bg-opacity-75{--bs-bg-opacity:0.75}.bg-opacity-100{--bs-bg-opacity:1}.bg-gradient{background-image:var(--bs-gradient)!important}.user-select-all{-webkit-user-select:all!important;-moz-user-select:all!important;user-select:all!important}.user-select-auto{-webkit-user-select:auto!important;-moz-user-select:auto!important;user-select:auto!important}.user-select-none{-webkit-user-select:none!important;-moz-user-select:none!important;user-select:none!important}.pe-none{pointer-events:none!important}.pe-auto{pointer-events:auto!important}.rounded{border-radius:.25rem!important}.rounded-0{border-radius:0!important}.rounded-1{border-radius:.2rem!important}.rounded-2{border-radius:.25rem!important}.rounded-3{border-radius:.3rem!important}.rounded-circle{border-radius:50%!important}.rounded-pill{border-radius:50rem!important}.rounded-top{border-top-left-radius:.25rem!important;border-top-right-radius:.25rem!important}.rounded-end{border-top-right-radius:.25rem!important;border-bottom-right-radius:.25rem!important}.rounded-bottom{border-bottom-right-radius:.25rem!important;border-bottom-left-radius:.25rem!important}.rounded-start{border-bottom-left-radius:.25rem!important;border-top-left-radius:.25rem!important}.visible{visibility:visible!important}.invisible{visibility:hidden!important}@media (min-width:576px){.float-sm-start{float:left!important}.float-sm-end{float:right!important}.float-sm-none{float:none!important}.d-sm-inline{display:inline!important}.d-sm-inline-block{display:inline-block!important}.d-sm-block{display:block!important}.d-sm-grid{display:grid!important}.d-sm-table{display:table!important}.d-sm-table-row{display:table-row!important}.d-sm-table-cell{display:table-cell!important}.d-sm-flex{display:flex!important}.d-sm-inline-flex{display:inline-flex!important}.d-sm-none{display:none!important}.flex-sm-fill{flex:1 1 auto!important}.flex-sm-row{flex-direction:row!important}.flex-sm-column{flex-direction:column!important}.flex-sm-row-reverse{flex-direction:row-reverse!important}.flex-sm-column-reverse{flex-direction:column-reverse!important}.flex-sm-grow-0{flex-grow:0!important}.flex-sm-grow-1{flex-grow:1!important}.flex-sm-shrink-0{flex-shrink:0!important}.flex-sm-shrink-1{flex-shrink:1!important}.flex-sm-wrap{flex-wrap:wrap!important}.flex-sm-nowrap{flex-wrap:nowrap!important}.flex-sm-wrap-reverse{flex-wrap:wrap-reverse!important}.gap-sm-0{gap:0!important}.gap-sm-1{gap:.25rem!important}.gap-sm-2{gap:.5rem!important}.gap-sm-3{gap:1rem!important}.gap-sm-4{gap:1.5rem!important}.gap-sm-5{gap:3rem!important}.justify-content-sm-start{justify-content:flex-start!important}.justify-content-sm-end{justify-content:flex-end!important}.justify-content-sm-center{justify-content:center!important}.justify-content-sm-between{justify-content:space-between!important}.justify-content-sm-around{justify-content:space-around!important}.justify-content-sm-evenly{justify-content:space-evenly!important}.align-items-sm-start{align-items:flex-start!important}.align-items-sm-end{align-items:flex-end!important}.align-items-sm-center{align-items:center!important}.align-items-sm-baseline{align-items:baseline!important}.align-items-sm-stretch{align-items:stretch!important}.align-content-sm-start{align-content:flex-start!important}.align-content-sm-end{align-content:flex-end!important}.align-content-sm-center{align-content:center!important}.align-content-sm-between{align-content:space-between!important}.align-content-sm-around{align-content:space-around!important}.align-content-sm-stretch{align-content:stretch!important}.align-self-sm-auto{align-self:auto!important}.align-self-sm-start{align-self:flex-start!important}.align-self-sm-end{align-self:flex-end!important}.align-self-sm-center{align-self:center!important}.align-self-sm-baseline{align-self:baseline!important}.align-self-sm-stretch{align-self:stretch!important}.order-sm-first{order:-1!important}.order-sm-0{order:0!important}.order-sm-1{order:1!important}.order-sm-2{order:2!important}.order-sm-3{order:3!important}.order-sm-4{order:4!important}.order-sm-5{order:5!important}.order-sm-last{order:6!important}.m-sm-0{margin:0!important}.m-sm-1{margin:.25rem!important}.m-sm-2{margin:.5rem!important}.m-sm-3{margin:1rem!important}.m-sm-4{margin:1.5rem!important}.m-sm-5{margin:3rem!important}.m-sm-auto{margin:auto!important}.mx-sm-0{margin-right:0!important;margin-left:0!important}.mx-sm-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-sm-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-sm-3{margin-right:1rem!important;margin-left:1rem!important}.mx-sm-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-sm-5{margin-right:3rem!important;margin-left:3rem!important}.mx-sm-auto{margin-right:auto!important;margin-left:auto!important}.my-sm-0{margin-top:0!important;margin-bottom:0!important}.my-sm-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-sm-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-sm-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-sm-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-sm-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-sm-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-sm-0{margin-top:0!important}.mt-sm-1{margin-top:.25rem!important}.mt-sm-2{margin-top:.5rem!important}.mt-sm-3{margin-top:1rem!important}.mt-sm-4{margin-top:1.5rem!important}.mt-sm-5{margin-top:3rem!important}.mt-sm-auto{margin-top:auto!important}.me-sm-0{margin-right:0!important}.me-sm-1{margin-right:.25rem!important}.me-sm-2{margin-right:.5rem!important}.me-sm-3{margin-right:1rem!important}.me-sm-4{margin-right:1.5rem!important}.me-sm-5{margin-right:3rem!important}.me-sm-auto{margin-right:auto!important}.mb-sm-0{margin-bottom:0!important}.mb-sm-1{margin-bottom:.25rem!important}.mb-sm-2{margin-bottom:.5rem!important}.mb-sm-3{margin-bottom:1rem!important}.mb-sm-4{margin-bottom:1.5rem!important}.mb-sm-5{margin-bottom:3rem!important}.mb-sm-auto{margin-bottom:auto!important}.ms-sm-0{margin-left:0!important}.ms-sm-1{margin-left:.25rem!important}.ms-sm-2{margin-left:.5rem!important}.ms-sm-3{margin-left:1rem!important}.ms-sm-4{margin-left:1.5rem!important}.ms-sm-5{margin-left:3rem!important}.ms-sm-auto{margin-left:auto!important}.p-sm-0{padding:0!important}.p-sm-1{padding:.25rem!important}.p-sm-2{padding:.5rem!important}.p-sm-3{padding:1rem!important}.p-sm-4{padding:1.5rem!important}.p-sm-5{padding:3rem!important}.px-sm-0{padding-right:0!important;padding-left:0!important}.px-sm-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-sm-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-sm-3{padding-right:1rem!important;padding-left:1rem!important}.px-sm-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-sm-5{padding-right:3rem!important;padding-left:3rem!important}.py-sm-0{padding-top:0!important;padding-bottom:0!important}.py-sm-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-sm-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-sm-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-sm-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-sm-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-sm-0{padding-top:0!important}.pt-sm-1{padding-top:.25rem!important}.pt-sm-2{padding-top:.5rem!important}.pt-sm-3{padding-top:1rem!important}.pt-sm-4{padding-top:1.5rem!important}.pt-sm-5{padding-top:3rem!important}.pe-sm-0{padding-right:0!important}.pe-sm-1{padding-right:.25rem!important}.pe-sm-2{padding-right:.5rem!important}.pe-sm-3{padding-right:1rem!important}.pe-sm-4{padding-right:1.5rem!important}.pe-sm-5{padding-right:3rem!important}.pb-sm-0{padding-bottom:0!important}.pb-sm-1{padding-bottom:.25rem!important}.pb-sm-2{padding-bottom:.5rem!important}.pb-sm-3{padding-bottom:1rem!important}.pb-sm-4{padding-bottom:1.5rem!important}.pb-sm-5{padding-bottom:3rem!important}.ps-sm-0{padding-left:0!important}.ps-sm-1{padding-left:.25rem!important}.ps-sm-2{padding-left:.5rem!important}.ps-sm-3{padding-left:1rem!important}.ps-sm-4{padding-left:1.5rem!important}.ps-sm-5{padding-left:3rem!important}.text-sm-start{text-align:left!important}.text-sm-end{text-align:right!important}.text-sm-center{text-align:center!important}}@media (min-width:768px){.float-md-start{float:left!important}.float-md-end{float:right!important}.float-md-none{float:none!important}.d-md-inline{display:inline!important}.d-md-inline-block{display:inline-block!important}.d-md-block{display:block!important}.d-md-grid{display:grid!important}.d-md-table{display:table!important}.d-md-table-row{display:table-row!important}.d-md-table-cell{display:table-cell!important}.d-md-flex{display:flex!important}.d-md-inline-flex{display:inline-flex!important}.d-md-none{display:none!important}.flex-md-fill{flex:1 1 auto!important}.flex-md-row{flex-direction:row!important}.flex-md-column{flex-direction:column!important}.flex-md-row-reverse{flex-direction:row-reverse!important}.flex-md-column-reverse{flex-direction:column-reverse!important}.flex-md-grow-0{flex-grow:0!important}.flex-md-grow-1{flex-grow:1!important}.flex-md-shrink-0{flex-shrink:0!important}.flex-md-shrink-1{flex-shrink:1!important}.flex-md-wrap{flex-wrap:wrap!important}.flex-md-nowrap{flex-wrap:nowrap!important}.flex-md-wrap-reverse{flex-wrap:wrap-reverse!important}.gap-md-0{gap:0!important}.gap-md-1{gap:.25rem!important}.gap-md-2{gap:.5rem!important}.gap-md-3{gap:1rem!important}.gap-md-4{gap:1.5rem!important}.gap-md-5{gap:3rem!important}.justify-content-md-start{justify-content:flex-start!important}.justify-content-md-end{justify-content:flex-end!important}.justify-content-md-center{justify-content:center!important}.justify-content-md-between{justify-content:space-between!important}.justify-content-md-around{justify-content:space-around!important}.justify-content-md-evenly{justify-content:space-evenly!important}.align-items-md-start{align-items:flex-start!important}.align-items-md-end{align-items:flex-end!important}.align-items-md-center{align-items:center!important}.align-items-md-baseline{align-items:baseline!important}.align-items-md-stretch{align-items:stretch!important}.align-content-md-start{align-content:flex-start!important}.align-content-md-end{align-content:flex-end!important}.align-content-md-center{align-content:center!important}.align-content-md-between{align-content:space-between!important}.align-content-md-around{align-content:space-around!important}.align-content-md-stretch{align-content:stretch!important}.align-self-md-auto{align-self:auto!important}.align-self-md-start{align-self:flex-start!important}.align-self-md-end{align-self:flex-end!important}.align-self-md-center{align-self:center!important}.align-self-md-baseline{align-self:baseline!important}.align-self-md-stretch{align-self:stretch!important}.order-md-first{order:-1!important}.order-md-0{order:0!important}.order-md-1{order:1!important}.order-md-2{order:2!important}.order-md-3{order:3!important}.order-md-4{order:4!important}.order-md-5{order:5!important}.order-md-last{order:6!important}.m-md-0{margin:0!important}.m-md-1{margin:.25rem!important}.m-md-2{margin:.5rem!important}.m-md-3{margin:1rem!important}.m-md-4{margin:1.5rem!important}.m-md-5{margin:3rem!important}.m-md-auto{margin:auto!important}.mx-md-0{margin-right:0!important;margin-left:0!important}.mx-md-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-md-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-md-3{margin-right:1rem!important;margin-left:1rem!important}.mx-md-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-md-5{margin-right:3rem!important;margin-left:3rem!important}.mx-md-auto{margin-right:auto!important;margin-left:auto!important}.my-md-0{margin-top:0!important;margin-bottom:0!important}.my-md-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-md-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-md-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-md-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-md-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-md-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-md-0{margin-top:0!important}.mt-md-1{margin-top:.25rem!important}.mt-md-2{margin-top:.5rem!important}.mt-md-3{margin-top:1rem!important}.mt-md-4{margin-top:1.5rem!important}.mt-md-5{margin-top:3rem!important}.mt-md-auto{margin-top:auto!important}.me-md-0{margin-right:0!important}.me-md-1{margin-right:.25rem!important}.me-md-2{margin-right:.5rem!important}.me-md-3{margin-right:1rem!important}.me-md-4{margin-right:1.5rem!important}.me-md-5{margin-right:3rem!important}.me-md-auto{margin-right:auto!important}.mb-md-0{margin-bottom:0!important}.mb-md-1{margin-bottom:.25rem!important}.mb-md-2{margin-bottom:.5rem!important}.mb-md-3{margin-bottom:1rem!important}.mb-md-4{margin-bottom:1.5rem!important}.mb-md-5{margin-bottom:3rem!important}.mb-md-auto{margin-bottom:auto!important}.ms-md-0{margin-left:0!important}.ms-md-1{margin-left:.25rem!important}.ms-md-2{margin-left:.5rem!important}.ms-md-3{margin-left:1rem!important}.ms-md-4{margin-left:1.5rem!important}.ms-md-5{margin-left:3rem!important}.ms-md-auto{margin-left:auto!important}.p-md-0{padding:0!important}.p-md-1{padding:.25rem!important}.p-md-2{padding:.5rem!important}.p-md-3{padding:1rem!important}.p-md-4{padding:1.5rem!important}.p-md-5{padding:3rem!important}.px-md-0{padding-right:0!important;padding-left:0!important}.px-md-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-md-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-md-3{padding-right:1rem!important;padding-left:1rem!important}.px-md-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-md-5{padding-right:3rem!important;padding-left:3rem!important}.py-md-0{padding-top:0!important;padding-bottom:0!important}.py-md-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-md-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-md-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-md-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-md-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-md-0{padding-top:0!important}.pt-md-1{padding-top:.25rem!important}.pt-md-2{padding-top:.5rem!important}.pt-md-3{padding-top:1rem!important}.pt-md-4{padding-top:1.5rem!important}.pt-md-5{padding-top:3rem!important}.pe-md-0{padding-right:0!important}.pe-md-1{padding-right:.25rem!important}.pe-md-2{padding-right:.5rem!important}.pe-md-3{padding-right:1rem!important}.pe-md-4{padding-right:1.5rem!important}.pe-md-5{padding-right:3rem!important}.pb-md-0{padding-bottom:0!important}.pb-md-1{padding-bottom:.25rem!important}.pb-md-2{padding-bottom:.5rem!important}.pb-md-3{padding-bottom:1rem!important}.pb-md-4{padding-bottom:1.5rem!important}.pb-md-5{padding-bottom:3rem!important}.ps-md-0{padding-left:0!important}.ps-md-1{padding-left:.25rem!important}.ps-md-2{padding-left:.5rem!important}.ps-md-3{padding-left:1rem!important}.ps-md-4{padding-left:1.5rem!important}.ps-md-5{padding-left:3rem!important}.text-md-start{text-align:left!important}.text-md-end{text-align:right!important}.text-md-center{text-align:center!important}}@media (min-width:992px){.float-lg-start{float:left!important}.float-lg-end{float:right!important}.float-lg-none{float:none!important}.d-lg-inline{display:inline!important}.d-lg-inline-block{display:inline-block!important}.d-lg-block{display:block!important}.d-lg-grid{display:grid!important}.d-lg-table{display:table!important}.d-lg-table-row{display:table-row!important}.d-lg-table-cell{display:table-cell!important}.d-lg-flex{display:flex!important}.d-lg-inline-flex{display:inline-flex!important}.d-lg-none{display:none!important}.flex-lg-fill{flex:1 1 auto!important}.flex-lg-row{flex-direction:row!important}.flex-lg-column{flex-direction:column!important}.flex-lg-row-reverse{flex-direction:row-reverse!important}.flex-lg-column-reverse{flex-direction:column-reverse!important}.flex-lg-grow-0{flex-grow:0!important}.flex-lg-grow-1{flex-grow:1!important}.flex-lg-shrink-0{flex-shrink:0!important}.flex-lg-shrink-1{flex-shrink:1!important}.flex-lg-wrap{flex-wrap:wrap!important}.flex-lg-nowrap{flex-wrap:nowrap!important}.flex-lg-wrap-reverse{flex-wrap:wrap-reverse!important}.gap-lg-0{gap:0!important}.gap-lg-1{gap:.25rem!important}.gap-lg-2{gap:.5rem!important}.gap-lg-3{gap:1rem!important}.gap-lg-4{gap:1.5rem!important}.gap-lg-5{gap:3rem!important}.justify-content-lg-start{justify-content:flex-start!important}.justify-content-lg-end{justify-content:flex-end!important}.justify-content-lg-center{justify-content:center!important}.justify-content-lg-between{justify-content:space-between!important}.justify-content-lg-around{justify-content:space-around!important}.justify-content-lg-evenly{justify-content:space-evenly!important}.align-items-lg-start{align-items:flex-start!important}.align-items-lg-end{align-items:flex-end!important}.align-items-lg-center{align-items:center!important}.align-items-lg-baseline{align-items:baseline!important}.align-items-lg-stretch{align-items:stretch!important}.align-content-lg-start{align-content:flex-start!important}.align-content-lg-end{align-content:flex-end!important}.align-content-lg-center{align-content:center!important}.align-content-lg-between{align-content:space-between!important}.align-content-lg-around{align-content:space-around!important}.align-content-lg-stretch{align-content:stretch!important}.align-self-lg-auto{align-self:auto!important}.align-self-lg-start{align-self:flex-start!important}.align-self-lg-end{align-self:flex-end!important}.align-self-lg-center{align-self:center!important}.align-self-lg-baseline{align-self:baseline!important}.align-self-lg-stretch{align-self:stretch!important}.order-lg-first{order:-1!important}.order-lg-0{order:0!important}.order-lg-1{order:1!important}.order-lg-2{order:2!important}.order-lg-3{order:3!important}.order-lg-4{order:4!important}.order-lg-5{order:5!important}.order-lg-last{order:6!important}.m-lg-0{margin:0!important}.m-lg-1{margin:.25rem!important}.m-lg-2{margin:.5rem!important}.m-lg-3{margin:1rem!important}.m-lg-4{margin:1.5rem!important}.m-lg-5{margin:3rem!important}.m-lg-auto{margin:auto!important}.mx-lg-0{margin-right:0!important;margin-left:0!important}.mx-lg-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-lg-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-lg-3{margin-right:1rem!important;margin-left:1rem!important}.mx-lg-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-lg-5{margin-right:3rem!important;margin-left:3rem!important}.mx-lg-auto{margin-right:auto!important;margin-left:auto!important}.my-lg-0{margin-top:0!important;margin-bottom:0!important}.my-lg-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-lg-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-lg-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-lg-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-lg-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-lg-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-lg-0{margin-top:0!important}.mt-lg-1{margin-top:.25rem!important}.mt-lg-2{margin-top:.5rem!important}.mt-lg-3{margin-top:1rem!important}.mt-lg-4{margin-top:1.5rem!important}.mt-lg-5{margin-top:3rem!important}.mt-lg-auto{margin-top:auto!important}.me-lg-0{margin-right:0!important}.me-lg-1{margin-right:.25rem!important}.me-lg-2{margin-right:.5rem!important}.me-lg-3{margin-right:1rem!important}.me-lg-4{margin-right:1.5rem!important}.me-lg-5{margin-right:3rem!important}.me-lg-auto{margin-right:auto!important}.mb-lg-0{margin-bottom:0!important}.mb-lg-1{margin-bottom:.25rem!important}.mb-lg-2{margin-bottom:.5rem!important}.mb-lg-3{margin-bottom:1rem!important}.mb-lg-4{margin-bottom:1.5rem!important}.mb-lg-5{margin-bottom:3rem!important}.mb-lg-auto{margin-bottom:auto!important}.ms-lg-0{margin-left:0!important}.ms-lg-1{margin-left:.25rem!important}.ms-lg-2{margin-left:.5rem!important}.ms-lg-3{margin-left:1rem!important}.ms-lg-4{margin-left:1.5rem!important}.ms-lg-5{margin-left:3rem!important}.ms-lg-auto{margin-left:auto!important}.p-lg-0{padding:0!important}.p-lg-1{padding:.25rem!important}.p-lg-2{padding:.5rem!important}.p-lg-3{padding:1rem!important}.p-lg-4{padding:1.5rem!important}.p-lg-5{padding:3rem!important}.px-lg-0{padding-right:0!important;padding-left:0!important}.px-lg-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-lg-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-lg-3{padding-right:1rem!important;padding-left:1rem!important}.px-lg-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-lg-5{padding-right:3rem!important;padding-left:3rem!important}.py-lg-0{padding-top:0!important;padding-bottom:0!important}.py-lg-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-lg-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-lg-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-lg-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-lg-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-lg-0{padding-top:0!important}.pt-lg-1{padding-top:.25rem!important}.pt-lg-2{padding-top:.5rem!important}.pt-lg-3{padding-top:1rem!important}.pt-lg-4{padding-top:1.5rem!important}.pt-lg-5{padding-top:3rem!important}.pe-lg-0{padding-right:0!important}.pe-lg-1{padding-right:.25rem!important}.pe-lg-2{padding-right:.5rem!important}.pe-lg-3{padding-right:1rem!important}.pe-lg-4{padding-right:1.5rem!important}.pe-lg-5{padding-right:3rem!important}.pb-lg-0{padding-bottom:0!important}.pb-lg-1{padding-bottom:.25rem!important}.pb-lg-2{padding-bottom:.5rem!important}.pb-lg-3{padding-bottom:1rem!important}.pb-lg-4{padding-bottom:1.5rem!important}.pb-lg-5{padding-bottom:3rem!important}.ps-lg-0{padding-left:0!important}.ps-lg-1{padding-left:.25rem!important}.ps-lg-2{padding-left:.5rem!important}.ps-lg-3{padding-left:1rem!important}.ps-lg-4{padding-left:1.5rem!important}.ps-lg-5{padding-left:3rem!important}.text-lg-start{text-align:left!important}.text-lg-end{text-align:right!important}.text-lg-center{text-align:center!important}}@media (min-width:1200px){.float-xl-start{float:left!important}.float-xl-end{float:right!important}.float-xl-none{float:none!important}.d-xl-inline{display:inline!important}.d-xl-inline-block{display:inline-block!important}.d-xl-block{display:block!important}.d-xl-grid{display:grid!important}.d-xl-table{display:table!important}.d-xl-table-row{display:table-row!important}.d-xl-table-cell{display:table-cell!important}.d-xl-flex{display:flex!important}.d-xl-inline-flex{display:inline-flex!important}.d-xl-none{display:none!important}.flex-xl-fill{flex:1 1 auto!important}.flex-xl-row{flex-direction:row!important}.flex-xl-column{flex-direction:column!important}.flex-xl-row-reverse{flex-direction:row-reverse!important}.flex-xl-column-reverse{flex-direction:column-reverse!important}.flex-xl-grow-0{flex-grow:0!important}.flex-xl-grow-1{flex-grow:1!important}.flex-xl-shrink-0{flex-shrink:0!important}.flex-xl-shrink-1{flex-shrink:1!important}.flex-xl-wrap{flex-wrap:wrap!important}.flex-xl-nowrap{flex-wrap:nowrap!important}.flex-xl-wrap-reverse{flex-wrap:wrap-reverse!important}.gap-xl-0{gap:0!important}.gap-xl-1{gap:.25rem!important}.gap-xl-2{gap:.5rem!important}.gap-xl-3{gap:1rem!important}.gap-xl-4{gap:1.5rem!important}.gap-xl-5{gap:3rem!important}.justify-content-xl-start{justify-content:flex-start!important}.justify-content-xl-end{justify-content:flex-end!important}.justify-content-xl-center{justify-content:center!important}.justify-content-xl-between{justify-content:space-between!important}.justify-content-xl-around{justify-content:space-around!important}.justify-content-xl-evenly{justify-content:space-evenly!important}.align-items-xl-start{align-items:flex-start!important}.align-items-xl-end{align-items:flex-end!important}.align-items-xl-center{align-items:center!important}.align-items-xl-baseline{align-items:baseline!important}.align-items-xl-stretch{align-items:stretch!important}.align-content-xl-start{align-content:flex-start!important}.align-content-xl-end{align-content:flex-end!important}.align-content-xl-center{align-content:center!important}.align-content-xl-between{align-content:space-between!important}.align-content-xl-around{align-content:space-around!important}.align-content-xl-stretch{align-content:stretch!important}.align-self-xl-auto{align-self:auto!important}.align-self-xl-start{align-self:flex-start!important}.align-self-xl-end{align-self:flex-end!important}.align-self-xl-center{align-self:center!important}.align-self-xl-baseline{align-self:baseline!important}.align-self-xl-stretch{align-self:stretch!important}.order-xl-first{order:-1!important}.order-xl-0{order:0!important}.order-xl-1{order:1!important}.order-xl-2{order:2!important}.order-xl-3{order:3!important}.order-xl-4{order:4!important}.order-xl-5{order:5!important}.order-xl-last{order:6!important}.m-xl-0{margin:0!important}.m-xl-1{margin:.25rem!important}.m-xl-2{margin:.5rem!important}.m-xl-3{margin:1rem!important}.m-xl-4{margin:1.5rem!important}.m-xl-5{margin:3rem!important}.m-xl-auto{margin:auto!important}.mx-xl-0{margin-right:0!important;margin-left:0!important}.mx-xl-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-xl-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-xl-3{margin-right:1rem!important;margin-left:1rem!important}.mx-xl-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-xl-5{margin-right:3rem!important;margin-left:3rem!important}.mx-xl-auto{margin-right:auto!important;margin-left:auto!important}.my-xl-0{margin-top:0!important;margin-bottom:0!important}.my-xl-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-xl-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-xl-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-xl-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-xl-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-xl-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-xl-0{margin-top:0!important}.mt-xl-1{margin-top:.25rem!important}.mt-xl-2{margin-top:.5rem!important}.mt-xl-3{margin-top:1rem!important}.mt-xl-4{margin-top:1.5rem!important}.mt-xl-5{margin-top:3rem!important}.mt-xl-auto{margin-top:auto!important}.me-xl-0{margin-right:0!important}.me-xl-1{margin-right:.25rem!important}.me-xl-2{margin-right:.5rem!important}.me-xl-3{margin-right:1rem!important}.me-xl-4{margin-right:1.5rem!important}.me-xl-5{margin-right:3rem!important}.me-xl-auto{margin-right:auto!important}.mb-xl-0{margin-bottom:0!important}.mb-xl-1{margin-bottom:.25rem!important}.mb-xl-2{margin-bottom:.5rem!important}.mb-xl-3{margin-bottom:1rem!important}.mb-xl-4{margin-bottom:1.5rem!important}.mb-xl-5{margin-bottom:3rem!important}.mb-xl-auto{margin-bottom:auto!important}.ms-xl-0{margin-left:0!important}.ms-xl-1{margin-left:.25rem!important}.ms-xl-2{margin-left:.5rem!important}.ms-xl-3{margin-left:1rem!important}.ms-xl-4{margin-left:1.5rem!important}.ms-xl-5{margin-left:3rem!important}.ms-xl-auto{margin-left:auto!important}.p-xl-0{padding:0!important}.p-xl-1{padding:.25rem!important}.p-xl-2{padding:.5rem!important}.p-xl-3{padding:1rem!important}.p-xl-4{padding:1.5rem!important}.p-xl-5{padding:3rem!important}.px-xl-0{padding-right:0!important;padding-left:0!important}.px-xl-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-xl-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-xl-3{padding-right:1rem!important;padding-left:1rem!important}.px-xl-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-xl-5{padding-right:3rem!important;padding-left:3rem!important}.py-xl-0{padding-top:0!important;padding-bottom:0!important}.py-xl-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-xl-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-xl-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-xl-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-xl-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-xl-0{padding-top:0!important}.pt-xl-1{padding-top:.25rem!important}.pt-xl-2{padding-top:.5rem!important}.pt-xl-3{padding-top:1rem!important}.pt-xl-4{padding-top:1.5rem!important}.pt-xl-5{padding-top:3rem!important}.pe-xl-0{padding-right:0!important}.pe-xl-1{padding-right:.25rem!important}.pe-xl-2{padding-right:.5rem!important}.pe-xl-3{padding-right:1rem!important}.pe-xl-4{padding-right:1.5rem!important}.pe-xl-5{padding-right:3rem!important}.pb-xl-0{padding-bottom:0!important}.pb-xl-1{padding-bottom:.25rem!important}.pb-xl-2{padding-bottom:.5rem!important}.pb-xl-3{padding-bottom:1rem!important}.pb-xl-4{padding-bottom:1.5rem!important}.pb-xl-5{padding-bottom:3rem!important}.ps-xl-0{padding-left:0!important}.ps-xl-1{padding-left:.25rem!important}.ps-xl-2{padding-left:.5rem!important}.ps-xl-3{padding-left:1rem!important}.ps-xl-4{padding-left:1.5rem!important}.ps-xl-5{padding-left:3rem!important}.text-xl-start{text-align:left!important}.text-xl-end{text-align:right!important}.text-xl-center{text-align:center!important}}@media (min-width:1400px){.float-xxl-start{float:left!important}.float-xxl-end{float:right!important}.float-xxl-none{float:none!important}.d-xxl-inline{display:inline!important}.d-xxl-inline-block{display:inline-block!important}.d-xxl-block{display:block!important}.d-xxl-grid{display:grid!important}.d-xxl-table{display:table!important}.d-xxl-table-row{display:table-row!important}.d-xxl-table-cell{display:table-cell!important}.d-xxl-flex{display:flex!important}.d-xxl-inline-flex{display:inline-flex!important}.d-xxl-none{display:none!important}.flex-xxl-fill{flex:1 1 auto!important}.flex-xxl-row{flex-direction:row!important}.flex-xxl-column{flex-direction:column!important}.flex-xxl-row-reverse{flex-direction:row-reverse!important}.flex-xxl-column-reverse{flex-direction:column-reverse!important}.flex-xxl-grow-0{flex-grow:0!important}.flex-xxl-grow-1{flex-grow:1!important}.flex-xxl-shrink-0{flex-shrink:0!important}.flex-xxl-shrink-1{flex-shrink:1!important}.flex-xxl-wrap{flex-wrap:wrap!important}.flex-xxl-nowrap{flex-wrap:nowrap!important}.flex-xxl-wrap-reverse{flex-wrap:wrap-reverse!important}.gap-xxl-0{gap:0!important}.gap-xxl-1{gap:.25rem!important}.gap-xxl-2{gap:.5rem!important}.gap-xxl-3{gap:1rem!important}.gap-xxl-4{gap:1.5rem!important}.gap-xxl-5{gap:3rem!important}.justify-content-xxl-start{justify-content:flex-start!important}.justify-content-xxl-end{justify-content:flex-end!important}.justify-content-xxl-center{justify-content:center!important}.justify-content-xxl-between{justify-content:space-between!important}.justify-content-xxl-around{justify-content:space-around!important}.justify-content-xxl-evenly{justify-content:space-evenly!important}.align-items-xxl-start{align-items:flex-start!important}.align-items-xxl-end{align-items:flex-end!important}.align-items-xxl-center{align-items:center!important}.align-items-xxl-baseline{align-items:baseline!important}.align-items-xxl-stretch{align-items:stretch!important}.align-content-xxl-start{align-content:flex-start!important}.align-content-xxl-end{align-content:flex-end!important}.align-content-xxl-center{align-content:center!important}.align-content-xxl-between{align-content:space-between!important}.align-content-xxl-around{align-content:space-around!important}.align-content-xxl-stretch{align-content:stretch!important}.align-self-xxl-auto{align-self:auto!important}.align-self-xxl-start{align-self:flex-start!important}.align-self-xxl-end{align-self:flex-end!important}.align-self-xxl-center{align-self:center!important}.align-self-xxl-baseline{align-self:baseline!important}.align-self-xxl-stretch{align-self:stretch!important}.order-xxl-first{order:-1!important}.order-xxl-0{order:0!important}.order-xxl-1{order:1!important}.order-xxl-2{order:2!important}.order-xxl-3{order:3!important}.order-xxl-4{order:4!important}.order-xxl-5{order:5!important}.order-xxl-last{order:6!important}.m-xxl-0{margin:0!important}.m-xxl-1{margin:.25rem!important}.m-xxl-2{margin:.5rem!important}.m-xxl-3{margin:1rem!important}.m-xxl-4{margin:1.5rem!important}.m-xxl-5{margin:3rem!important}.m-xxl-auto{margin:auto!important}.mx-xxl-0{margin-right:0!important;margin-left:0!important}.mx-xxl-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-xxl-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-xxl-3{margin-right:1rem!important;margin-left:1rem!important}.mx-xxl-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-xxl-5{margin-right:3rem!important;margin-left:3rem!important}.mx-xxl-auto{margin-right:auto!important;margin-left:auto!important}.my-xxl-0{margin-top:0!important;margin-bottom:0!important}.my-xxl-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-xxl-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-xxl-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-xxl-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-xxl-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-xxl-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-xxl-0{margin-top:0!important}.mt-xxl-1{margin-top:.25rem!important}.mt-xxl-2{margin-top:.5rem!important}.mt-xxl-3{margin-top:1rem!important}.mt-xxl-4{margin-top:1.5rem!important}.mt-xxl-5{margin-top:3rem!important}.mt-xxl-auto{margin-top:auto!important}.me-xxl-0{margin-right:0!important}.me-xxl-1{margin-right:.25rem!important}.me-xxl-2{margin-right:.5rem!important}.me-xxl-3{margin-right:1rem!important}.me-xxl-4{margin-right:1.5rem!important}.me-xxl-5{margin-right:3rem!important}.me-xxl-auto{margin-right:auto!important}.mb-xxl-0{margin-bottom:0!important}.mb-xxl-1{margin-bottom:.25rem!important}.mb-xxl-2{margin-bottom:.5rem!important}.mb-xxl-3{margin-bottom:1rem!important}.mb-xxl-4{margin-bottom:1.5rem!important}.mb-xxl-5{margin-bottom:3rem!important}.mb-xxl-auto{margin-bottom:auto!important}.ms-xxl-0{margin-left:0!important}.ms-xxl-1{margin-left:.25rem!important}.ms-xxl-2{margin-left:.5rem!important}.ms-xxl-3{margin-left:1rem!important}.ms-xxl-4{margin-left:1.5rem!important}.ms-xxl-5{margin-left:3rem!important}.ms-xxl-auto{margin-left:auto!important}.p-xxl-0{padding:0!important}.p-xxl-1{padding:.25rem!important}.p-xxl-2{padding:.5rem!important}.p-xxl-3{padding:1rem!important}.p-xxl-4{padding:1.5rem!important}.p-xxl-5{padding:3rem!important}.px-xxl-0{padding-right:0!important;padding-left:0!important}.px-xxl-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-xxl-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-xxl-3{padding-right:1rem!important;padding-left:1rem!important}.px-xxl-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-xxl-5{padding-right:3rem!important;padding-left:3rem!important}.py-xxl-0{padding-top:0!important;padding-bottom:0!important}.py-xxl-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-xxl-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-xxl-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-xxl-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-xxl-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-xxl-0{padding-top:0!important}.pt-xxl-1{padding-top:.25rem!important}.pt-xxl-2{padding-top:.5rem!important}.pt-xxl-3{padding-top:1rem!important}.pt-xxl-4{padding-top:1.5rem!important}.pt-xxl-5{padding-top:3rem!important}.pe-xxl-0{padding-right:0!important}.pe-xxl-1{padding-right:.25rem!important}.pe-xxl-2{padding-right:.5rem!important}.pe-xxl-3{padding-right:1rem!important}.pe-xxl-4{padding-right:1.5rem!important}.pe-xxl-5{padding-right:3rem!important}.pb-xxl-0{padding-bottom:0!important}.pb-xxl-1{padding-bottom:.25rem!important}.pb-xxl-2{padding-bottom:.5rem!important}.pb-xxl-3{padding-bottom:1rem!important}.pb-xxl-4{padding-bottom:1.5rem!important}.pb-xxl-5{padding-bottom:3rem!important}.ps-xxl-0{padding-left:0!important}.ps-xxl-1{padding-left:.25rem!important}.ps-xxl-2{padding-left:.5rem!important}.ps-xxl-3{padding-left:1rem!important}.ps-xxl-4{padding-left:1.5rem!important}.ps-xxl-5{padding-left:3rem!important}.text-xxl-start{text-align:left!important}.text-xxl-end{text-align:right!important}.text-xxl-center{text-align:center!important}}@media (min-width:1200px){.fs-1{font-size:2.5rem!important}.fs-2{font-size:2rem!important}.fs-3{font-size:1.75rem!important}.fs-4{font-size:1.5rem!important}}@media print{.d-print-inline{display:inline!important}.d-print-inline-block{display:inline-block!important}.d-print-block{display:block!important}.d-print-grid{display:grid!important}.d-print-table{display:table!important}.d-print-table-row{display:table-row!important}.d-print-table-cell{display:table-cell!important}.d-print-flex{display:flex!important}.d-print-inline-flex{display:inline-flex!important}.d-print-none{display:none!important}}',""]);const b=n},352:t=>{"use strict";t.exports=function(n){var c=[];return c.toString=function(){return this.map(function(t){var e="",i=void 0!==t[5];return t[4]&&(e+="@supports (".concat(t[4],") {")),t[2]&&(e+="@media ".concat(t[2]," {")),i&&(e+="@layer".concat(0<t[5].length?" ".concat(t[5]):""," {")),e+=n(t),i&&(e+="}"),t[2]&&(e+="}"),t[4]&&(e+="}"),e}).join("")},c.i=function(t,e,i,n,r){"string"==typeof t&&(t=[[null,t,void 0]]);var s={};if(i)for(var o=0;o<this.length;o++){var a=this[o][0];null!=a&&(s[a]=!0)}for(var h=0;h<t.length;h++){var l=[].concat(t[h]);i&&s[l[0]]||(void 0!==r&&(void 0!==l[5]&&(l[1]="@layer".concat(0<l[5].length?" ".concat(l[5]):""," {").concat(l[1],"}")),l[5]=r),e&&(l[2]&&(l[1]="@media ".concat(l[2]," {").concat(l[1],"}")),l[2]=e),n&&(l[4]?(l[1]="@supports (".concat(l[4],") {").concat(l[1],"}"),l[4]=n):l[4]="".concat(n)),c.push(l))}},c}},393:t=>{"use strict";t.exports=function(t,e){return e=e||{},t&&(t=String(t.__esModule?t.default:t),/^['"].*['"]$/.test(t)&&(t=t.slice(1,-1)),e.hash&&(t+=e.hash),/["'() \t\n]|(%20)/.test(t)||e.needQuotes?'"'.concat(t.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):t)}},402:t=>{"use strict";t.exports=function(t){return t[1]}},701:(t,e,r)=>{"use strict";var i,n,a=function(){return i=void 0===i?Boolean(window&&document&&document.all&&!window.atob):i},s=(n={},function(t){if(void 0===n[t]){var e=document.querySelector(t);if(window.HTMLIFrameElement&&e instanceof window.HTMLIFrameElement)try{e=e.contentDocument.head}catch(t){e=null}n[t]=e}return n[t]}),l=[];function c(t){for(var e=-1,i=0;i<l.length;i++)if(l[i].identifier===t){e=i;break}return e}function h(t,e){for(var i={},n=[],r=0;r<t.length;r++){var s=t[r],o=e.base?s[0]+e.base:s[0],a=i[o]||0,h="".concat(o," ").concat(a),o=(i[o]=a+1,c(h)),a={css:s[1],media:s[2],sourceMap:s[3]};-1!==o?(l[o].references++,l[o].updater(a)):l.push({identifier:h,updater:function(e,t){var i,n,r;{var s;r=t.singleton?(s=g++,i=f=f||u(t),n=p.bind(null,i,s,!1),p.bind(null,i,s,!0)):(i=u(t),n=function(t,e,i){var n=i.css,r=i.media,i=i.sourceMap;r?t.setAttribute("media",r):t.removeAttribute("media");i&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */"));if(t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}.bind(null,i,t),function(){var t=i;null!==t.parentNode&&t.parentNode.removeChild(t)})}return n(e),function(t){t?t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap||n(e=t):r()}}(a,e),references:1}),n.push(h)}return n}function u(t){var e=document.createElement("style"),i=t.attributes||{};if(void 0!==i.nonce||(n=r.nc)&&(i.nonce=n),Object.keys(i).forEach(function(t){e.setAttribute(t,i[t])}),"function"==typeof t.insert)t.insert(e);else{var n=s(t.insert||"head");if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(e)}return e}o=[];var o,d=function(t,e){return o[t]=e,o.filter(Boolean).join("\n")};function p(t,e,i,n){var i=i?"":n.media?"@media ".concat(n.media," {").concat(n.css,"}"):n.css;t.styleSheet?t.styleSheet.cssText=d(e,i):(n=document.createTextNode(i),(i=t.childNodes)[e]&&t.removeChild(i[e]),i.length?t.insertBefore(n,i[e]):t.appendChild(n))}var f=null,g=0;t.exports=function(t,s){(s=s||{}).singleton||"boolean"==typeof s.singleton||(s.singleton=a());var o=h(t=t||[],s);return function(t){if(t=t||[],"[object Array]"===Object.prototype.toString.call(t)){for(var e=0;e<o.length;e++){var i=c(o[e]);l[i].references--}for(var t=h(t,s),n=0;n<o.length;n++){var r=c(o[n]);0===l[r].references&&(l[r].updater(),l.splice(r,1))}o=t}}}},39:(t,e,i)=>{"use strict";i.r(e),i.d(e,{default:()=>r});var e=i(701),e=i.n(e),i=i(666),n={insert:"head",singleton:!1};e()(i.default,n);const r=i.default.locals||{}},334:(t,e,i)=>{i=[i,e,i(902)],e=function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=class{openAuthDialog(){return new Promise((e,t)=>{i.LoginPrompt.showPopup(()=>{e();var t=new Event("mockLogin");document.dispatchEvent(t)},()=>{t()})})}}}.apply(e,i);void 0!==e&&(t.exports=e)},985:(t,e,i)=>{i=[i,e,i(756)],e=function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TestResponses=void 0,e.TestResponses=[{id:1,value:!0,testLabel:"Can review, logged in"},{id:2,value:!1,reason:i.NegativeResponses.NO_AUTH,testLabel:"Use is not logged in"},{id:3,value:!1,reason:i.NegativeResponses.GAME_RATED,testLabel:"Game already rated"},{id:4,value:!1,reason:i.NegativeResponses.REVIEW_WAS_REQUESTED,testLabel:"Review requested, user rated or closed pop up"}]}.apply(e,i);void 0!==e&&(t.exports=e)},283:(t,e,i)=>{i=[i,e,i(985)],e=function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Feedback=void 0;e.Feedback=class{constructor(e){this.testResponses=i.TestResponses,this.currentResponse=e?this.testResponses.find(t=>t.id===e):this.testResponses.find(t=>1===t.id)}canReview(){return new Promise((t,e)=>{t(this.currentResponse)})}requestReview(){return new Promise((t,e)=>{t({feedbackSent:!0})})}}}.apply(e,i);void 0!==e&&(t.exports=e)},190:(t,e,i)=>{i=function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Leaderboard=void 0;e.Leaderboard=class{constructor(t){this.leaderboardName=t}setLeaderboardScore(t,e,i){this.leaderboardName=t,this.playerEntry||this.createPlayerEntry(e)}createPlayerEntry(t){this.playerEntry={score:t,player:{publicName:"test-user"}}}getPlayerEntry(){return this.playerEntry}getLeaderboardName(){return this.leaderboardName}getScore(){return this.playerEntry.score}}}.apply(e,[i,e]);void 0!==i&&(t.exports=i)},197:(t,e,i)=>{i=[i,e,i(190)],e=function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Leaderboards=void 0;e.Leaderboards=class{constructor(t){this.leaderboards=[],this.leaderboards.push(new i.Leaderboard(t))}setLeaderboardScore(e,t,i){let n=this.leaderboards.find(t=>t.getLeaderboardName()===e);n.setLeaderboardScore(e,t,i)}getLeaderboardPlayerEntry(e){let i=this.leaderboards.find(t=>t.getLeaderboardName()===e);return new Promise((t,e)=>{i||e({code:"LEADERBOARD_NOT_FOUND"}),i.getPlayerEntry()||e({code:"LEADERBOARD_PLAYER_NOT_PRESENT"}),t({score:i.getScore()})})}}}.apply(e,i);void 0!==e&&(t.exports=e)},902:(t,e,i)=>{i=function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LoginPrompt=void 0;class p{static showPopup(t,e){const i=document.createElement("div"),n=(i.id="prompt-container",i.className="modal",i.style.display="block",i.style.top="10%",document.body.appendChild(i),document.createElement("div")),r=(n.className="modal-dialog",i.appendChild(n),document.createElement("div")),s=(r.className="modal-content",n.appendChild(r),document.createElement("div")),o=(s.className="modal-header",r.appendChild(s),document.createElement("button")),a=(o.className="btn-close",o.ariaLabel="Close",s.appendChild(o),o.onclick=()=>{e(),p.hidePopup()},document.createElement("div")),h=(a.className="modal-title",r.appendChild(a),document.createElement("div")),l=(h.style.height="20px",r.appendChild(h),document.createElement("div")),c=(l.className="modal-title",l.innerText="To continue, you need to login",l.style.display="flex",l.style.justifyContent="left",l.style.padding="20px",r.appendChild(l),document.createElement("h5")),u=(c.className="modal-footer",r.appendChild(c),document.createElement("button")),d=(u.className="btn btn-success btn-large",u.ariaLabel="Log in",u.innerText="Log in",c.appendChild(u),u.onclick=()=>{t(),p.hidePopup()},document.createElement("button"));d.className="btn btn-secondary btn-large",d.ariaLabel="Cancel",d.innerText="Cancel",c.appendChild(d),d.onclick=()=>{e(),p.hidePopup()}}static hidePopup(){const t=document.getElementById("prompt-container");t.querySelectorAll("*").forEach(t=>t.remove()),t.remove()}}e.LoginPrompt=p}.apply(e,[i,e]);void 0!==i&&(t.exports=i)},862:(t,e,i)=>{i=function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=class{constructor(t){this.loggedIn=!0,t.hasOwnProperty("loggedIn")&&(this.loggedIn=t.loggedIn),document.addEventListener("mockLogin",t=>{this.loggedIn=!0})}getPlayer(){return new Promise((t,e)=>{this.loggedIn||e(),t()})}}}.apply(e,[i,e]);void 0!==i&&(t.exports=i)},756:(t,e,i)=>{i=function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NegativeResponses=void 0,(e=e.NegativeResponses||(e.NegativeResponses={})).NO_AUTH="NO_AUTH",e.GAME_RATED="GAME_RATED",e.REVIEW_ALREADY_REQUESTED="REVIEW_ALREADY_REQUESTED",e.REVIEW_WAS_REQUESTED="REVIEW_WAS_REQUESTED",e.UNKNOWN="UNKNOWN"}.apply(e,[i,e]);void 0!==i&&(t.exports=i)},65:function(t,e,i){var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},i=[i,e,i(197),i(283),i(334),i(862),i(39)],e=function(t,e,i,n,r,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Wrapper=void 0,r=o(r),s=o(s);e.Wrapper=class{constructor(t){this.leaderboards=new i.Leaderboards(t.leaderboardName),this.feedback=new n.Feedback(t.id),this.authorization=new r.default,this.player=new s.default(t)}getLeaderboards(){return new Promise((t,e)=>{t(this.leaderboards)})}openAuthDialog(){return this.authorization.openAuthDialog()}getPlayer(){return this.player.getPlayer()}}}.apply(e,i);void 0!==e&&(t.exports=e)},204:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%27-4 -4 8 8%27%3e%3ccircle r=%272%27 fill=%27%23fff%27/%3e%3c/svg%3e"},609:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%27-4 -4 8 8%27%3e%3ccircle r=%273%27 fill=%27%2386b7fe%27/%3e%3c/svg%3e"},469:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%27-4 -4 8 8%27%3e%3ccircle r=%273%27 fill=%27%23fff%27/%3e%3c/svg%3e"},486:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%27-4 -4 8 8%27%3e%3ccircle r=%273%27 fill=%27rgba%280, 0, 0, 0.25%29%27/%3e%3c/svg%3e"},144:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 12 12%27 width=%2712%27 height=%2712%27 fill=%27none%27 stroke=%27%23dc3545%27%3e%3ccircle cx=%276%27 cy=%276%27 r=%274.5%27/%3e%3cpath stroke-linejoin=%27round%27 d=%27M5.8 3.6h.4L6 6.5z%27/%3e%3ccircle cx=%276%27 cy=%278.2%27 r=%27.6%27 fill=%27%23dc3545%27 stroke=%27none%27/%3e%3c/svg%3e"},175:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%23000%27%3e%3cpath d=%27M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z%27/%3e%3c/svg%3e"},740:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%230c63e4%27%3e%3cpath fill-rule=%27evenodd%27 d=%27M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z%27/%3e%3c/svg%3e"},460:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%23212529%27%3e%3cpath fill-rule=%27evenodd%27 d=%27M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z%27/%3e%3c/svg%3e"},647:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%23fff%27%3e%3cpath d=%27M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z%27/%3e%3c/svg%3e"},692:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%23fff%27%3e%3cpath d=%27M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z%27/%3e%3c/svg%3e"},214:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27%3e%3cpath fill=%27none%27 stroke=%27%23343a40%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%272%27 d=%27M2 5l6 6 6-6%27/%3e%3c/svg%3e"},931:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 20 20%27%3e%3cpath fill=%27none%27 stroke=%27%23fff%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%273%27 d=%27M6 10h8%27/%3e%3c/svg%3e"},349:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 20 20%27%3e%3cpath fill=%27none%27 stroke=%27%23fff%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%273%27 d=%27M6 10l3 3l6-6%27/%3e%3c/svg%3e"},217:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 30 30%27%3e%3cpath stroke=%27rgba%280, 0, 0, 0.55%29%27 stroke-linecap=%27round%27 stroke-miterlimit=%2710%27 stroke-width=%272%27 d=%27M4 7h22M4 15h22M4 23h22%27/%3e%3c/svg%3e"},956:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 30 30%27%3e%3cpath stroke=%27rgba%28255, 255, 255, 0.55%29%27 stroke-linecap=%27round%27 stroke-miterlimit=%2710%27 stroke-width=%272%27 d=%27M4 7h22M4 15h22M4 23h22%27/%3e%3c/svg%3e"},819:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 8 8%27%3e%3cpath fill=%27%23198754%27 d=%27M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z%27/%3e%3c/svg%3e"}},r={},n.m=i,n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.b=document.baseURI||self.location.href,t=n(65),self.azMockSDK=t},720:t=>{t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n},t.exports.__esModule=!0,t.exports.default=t.exports},822:t=>{t.exports=function(t){if(Array.isArray(t))return t},t.exports.__esModule=!0,t.exports.default=t.exports},168:t=>{t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},t.exports.__esModule=!0,t.exports.default=t.exports},972:t=>{t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.exports.__esModule=!0,t.exports.default=t.exports},884:t=>{function n(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}t.exports=function(t,e,i){return e&&n(t.prototype,e),i&&n(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t},t.exports.__esModule=!0,t.exports.default=t.exports},239:t=>{t.exports=function(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t},t.exports.__esModule=!0,t.exports.default=t.exports},94:e=>{function i(t){return e.exports=i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},e.exports.__esModule=!0,e.exports.default=e.exports,i(t)}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},914:(t,e,i)=>{var n=i(307);t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&n(t,e)},t.exports.__esModule=!0,t.exports.default=t.exports},325:t=>{t.exports=function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)},t.exports.__esModule=!0,t.exports.default=t.exports},533:t=>{t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.__esModule=!0,t.exports.default=t.exports},164:(t,e,i)=>{var n=i(630).default,r=i(168);t.exports=function(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return r(t)},t.exports.__esModule=!0,t.exports.default=t.exports},307:i=>{function n(t,e){return i.exports=n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},i.exports.__esModule=!0,i.exports.default=i.exports,n(t,e)}i.exports=n,i.exports.__esModule=!0,i.exports.default=i.exports},362:(t,e,i)=>{var n=i(822),r=i(325),s=i(698),o=i(533);t.exports=function(t){return n(t)||r(t)||s(t)||o()},t.exports.__esModule=!0,t.exports.default=t.exports},630:e=>{function i(t){return e.exports=i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e.exports.__esModule=!0,e.exports.default=e.exports,i(t)}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},698:(t,e,i)=>{var n=i(720);t.exports=function(t,e){var i;if(t)return"string"==typeof t?n(t,e):"Map"===(i="Object"===(i=Object.prototype.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:i)||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?n(t,e):void 0},t.exports.__esModule=!0,t.exports.default=t.exports},352:t=>{"use strict";t.exports=function(n){var c=[];return c.toString=function(){return this.map(function(t){var e="",i=void 0!==t[5];return t[4]&&(e+="@supports (".concat(t[4],") {")),t[2]&&(e+="@media ".concat(t[2]," {")),i&&(e+="@layer".concat(0<t[5].length?" ".concat(t[5]):""," {")),e+=n(t),i&&(e+="}"),t[2]&&(e+="}"),t[4]&&(e+="}"),e}).join("")},c.i=function(t,e,i,n,r){"string"==typeof t&&(t=[[null,t,void 0]]);var s={};if(i)for(var o=0;o<this.length;o++){var a=this[o][0];null!=a&&(s[a]=!0)}for(var h=0;h<t.length;h++){var l=[].concat(t[h]);i&&s[l[0]]||(void 0!==r&&(void 0!==l[5]&&(l[1]="@layer".concat(0<l[5].length?" ".concat(l[5]):""," {").concat(l[1],"}")),l[5]=r),e&&(l[2]&&(l[1]="@media ".concat(l[2]," {").concat(l[1],"}")),l[2]=e),n&&(l[4]?(l[1]="@supports (".concat(l[4],") {").concat(l[1],"}"),l[4]=n):l[4]="".concat(n)),c.push(l))}},c}},393:t=>{"use strict";t.exports=function(t,e){return e=e||{},t&&(t=String(t.__esModule?t.default:t),/^['"].*['"]$/.test(t)&&(t=t.slice(1,-1)),e.hash&&(t+=e.hash),/["'() \t\n]|(%20)/.test(t)||e.needQuotes?'"'.concat(t.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):t)}},402:t=>{"use strict";t.exports=function(t){return t[1]}},986:(B,F,t)=>{"use strict";var e=t(630),i=t(972),n=t(884),N=t(168),z=t(914),Y=t(164),X=t(94),U=t(239),t=t(362);function r(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var k=r(e),o=r(i),e=r(n),a=r(N),i=r(z),s=r(Y),h=r(X),l=r(U),V=r(t);function G(e,t){var i,n=Object.keys(e);return Object.getOwnPropertySymbols&&(i=Object.getOwnPropertySymbols(e),t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)),n}function j(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?G(Object(i),!0).forEach(function(t){l.default(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):G(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}var W={type:"logger",log:function(t){this.output("log",t)},warn:function(t){this.output("warn",t)},error:function(t){this.output("error",t)},output:function(t,e){console&&console[t]}};function c(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};o.default(this,c),this.init(t,e)}e.default(c,[{key:"init",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};this.prefix=e.prefix||"i18next:",this.logger=t||W,this.options=e,this.debug=e.debug}},{key:"setDebug",value:function(t){this.debug=t}},{key:"log",value:function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return this.forward(e,"log","",!0)}},{key:"warn",value:function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return this.forward(e,"warn","",!0)}},{key:"error",value:function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return this.forward(e,"error","")}},{key:"deprecate",value:function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(t,e,i,n){return n&&!this.debug?null:("string"==typeof t[0]&&(t[0]="".concat(i).concat(this.prefix," ").concat(t[0])),this.logger[e](t))}},{key:"create",value:function(t){return new c(this.logger,j(j({},{prefix:"".concat(this.prefix,":").concat(t,":")}),this.options))}}]);var u=new c,d=(e.default(p,[{key:"on",value:function(t,e){var i=this;return t.split(" ").forEach(function(t){i.observers[t]=i.observers[t]||[],i.observers[t].push(e)}),this}},{key:"off",value:function(t,e){this.observers[t]&&(e?this.observers[t]=this.observers[t].filter(function(t){return t!==e}):delete this.observers[t])}},{key:"emit",value:function(e){for(var t=arguments.length,i=new Array(1<t?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];this.observers[e]&&[].concat(this.observers[e]).forEach(function(t){t.apply(void 0,i)}),this.observers["*"]&&[].concat(this.observers["*"]).forEach(function(t){t.apply(t,[e].concat(i))})}}]),p);function p(){o.default(this,p),this.observers={}}function f(){var i,n,t=new Promise(function(t,e){i=t,n=e});return t.resolve=i,t.reject=n,t}function H(t){return null==t?"":""+t}function g(t,e,i){function n(t){return t&&-1<t.indexOf("###")?t.replace(/###/g,"."):t}function r(){return!t||"string"==typeof t}for(var s="string"!=typeof e?[].concat(e):e.split(".");1<s.length;){if(r())return{};var o=n(s.shift());!t[o]&&i&&(t[o]=new i),t=Object.prototype.hasOwnProperty.call(t,o)?t[o]:{}}return r()?{}:{obj:t,k:n(s.shift())}}function K(t,e,i){t=g(t,e,Object);t.obj[t.k]=i}function m(t,e){t=g(t,e),e=t.obj,t=t.k;if(e)return e[t]}function q(t,e,i){t=m(t,i);return void 0!==t?t:m(e,i)}function y(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var J={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function Z(t){return"string"==typeof t?t.replace(/[&<>"'\/]/g,function(t){return J[t]}):t}var v="undefined"!=typeof window&&window.navigator&&window.navigator.userAgent&&-1<window.navigator.userAgent.indexOf("MSIE"),Q=[" ",",","?","!",";"];function $(e,t){var i,n=Object.keys(e);return Object.getOwnPropertySymbols&&(i=Object.getOwnPropertySymbols(e),t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)),n}function x(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?$(Object(i),!0).forEach(function(t){l.default(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):$(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}function tt(i){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=h.default(i);return t=n?(t=h.default(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),s.default(this,t)}}i.default(b,d),et=tt(b),e.default(b,[{key:"addNamespaces",value:function(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}},{key:"removeNamespaces",value:function(t){t=this.options.ns.indexOf(t);-1<t&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(t,e,i){var n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{},r=(void 0!==n.keySeparator?n:this.options).keySeparator,n=(void 0!==n.ignoreJSONStructure?n:this.options).ignoreJSONStructure,s=[t,e],s=(i&&"string"!=typeof i&&(s=s.concat(i)),i&&"string"==typeof i&&(s=s.concat(r?i.split(r):i)),-1<t.indexOf(".")&&(s=t.split(".")),m(this.data,s));return s||!n||"string"!=typeof i?s:function t(e,i,n){var r=2<arguments.length&&void 0!==n?n:".";if(e){if(e[i])return e[i];for(var s=i.split(r),o=e,a=0;a<s.length;++a){if(!o)return;if("string"==typeof o[s[a]]&&a+1<s.length)return;if(void 0===o[s[a]]){for(var h=2,l=s.slice(a,a+h).join(r),c=o[l];void 0===c&&s.length>a+h;)h++,c=o[l=s.slice(a,a+h).join(r)];if(void 0===c)return;if(i.endsWith(l)){if("string"==typeof c)return c;if(l&&"string"==typeof c[l])return c[l]}var u=s.slice(a+h).join(r);return u?t(c,u,r):void 0}o=o[s[a]]}return o}}(this.data&&this.data[t]&&this.data[t][e],i,r)}},{key:"addResource",value:function(t,e,i,n){var r=4<arguments.length&&void 0!==arguments[4]?arguments[4]:{silent:!1},s=this.options.keySeparator,o=(void 0===s&&(s="."),[t,e]);i&&(o=o.concat(s?i.split(s):i)),-1<t.indexOf(".")&&(n=e,e=(o=t.split("."))[1]),this.addNamespaces(e),K(this.data,o,n),r.silent||this.emit("added",t,e,i,n)}},{key:"addResources",value:function(t,e,i){var n,r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(n in i)"string"!=typeof i[n]&&"[object Array]"!==Object.prototype.toString.apply(i[n])||this.addResource(t,e,n,i[n],{silent:!0});r.silent||this.emit("added",t,e,i)}},{key:"addResourceBundle",value:function(t,e,i,n,r){var s=5<arguments.length&&void 0!==arguments[5]?arguments[5]:{silent:!1},o=[t,e],a=(-1<t.indexOf(".")&&(n=i,i=e,e=(o=t.split("."))[1]),this.addNamespaces(e),m(this.data,o)||{});n?function t(e,i,n){for(var r in i)"__proto__"!==r&&"constructor"!==r&&(r in e?"string"==typeof e[r]||e[r]instanceof String||"string"==typeof i[r]||i[r]instanceof String?n&&(e[r]=i[r]):t(e[r],i[r],n):e[r]=i[r])}(a,i,r):a=x(x({},a),i),K(this.data,o,a),s.silent||this.emit("added",t,e,i)}},{key:"removeResourceBundle",value:function(t,e){this.hasResourceBundle(t,e)&&delete this.data[t][e],this.removeNamespaces(e),this.emit("removed",t,e)}},{key:"hasResourceBundle",value:function(t,e){return void 0!==this.getResource(t,e)}},{key:"getResourceBundle",value:function(t,e){return e=e||this.options.defaultNS,"v1"===this.options.compatibilityAPI?x(x({},{}),this.getResource(t,e)):this.getResource(t,e)}},{key:"getDataByLanguage",value:function(t){return this.data[t]}},{key:"hasLanguageSomeTranslations",value:function(t){var e=this.getDataByLanguage(t);return!!(e&&Object.keys(e)||[]).find(function(t){return e[t]&&0<Object.keys(e[t]).length})}},{key:"toJSON",value:function(){return this.data}}]);var et,it=b;function b(t){var e,i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return o.default(this,b),e=et.call(this),v&&d.call(a.default(e)),e.data=t||{},e.options=i,void 0===e.options.keySeparator&&(e.options.keySeparator="."),void 0===e.options.ignoreJSONStructure&&(e.options.ignoreJSONStructure=!0),e}var nt={processors:{},addPostProcessor:function(t){this.processors[t.name]=t},handle:function(t,e,i,n,r){var s=this;return t.forEach(function(t){s.processors[t]&&(e=s.processors[t].process(e,i,n,r))}),e}};function rt(e,t){var i,n=Object.keys(e);return Object.getOwnPropertySymbols&&(i=Object.getOwnPropertySymbols(e),t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)),n}function C(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?rt(Object(i),!0).forEach(function(t){l.default(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):rt(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}function st(i){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=h.default(i);return t=n?(t=h.default(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),s.default(this,t)}}var ot,at={},ht=(i.default(O,d),ot=st(O),e.default(O,[{key:"changeLanguage",value:function(t){t&&(this.language=t)}},{key:"exists",value:function(t){return null!=t&&((t=this.resolve(t,1<arguments.length&&void 0!==arguments[1]?arguments[1]:{interpolation:{}}))&&void 0!==t.res)}},{key:"extractFromKey",value:function(t,e){var i,n,r,s=(void 0!==e.nsSeparator?e:this.options).nsSeparator,o=(void 0===s&&(s=":"),(void 0!==e.keySeparator?e:this.options).keySeparator),a=e.ns||this.options.defaultNS||[],h=s&&-1<t.indexOf(s),l=!(this.options.userDefinedKeySeparator||e.keySeparator||this.options.userDefinedNsSeparator||e.nsSeparator||(e=t,i=(i=s)||"",n=(n=o)||"",0===(l=Q.filter(function(t){return i.indexOf(t)<0&&n.indexOf(t)<0})).length||((r=!(l=new RegExp("(".concat(l.map(function(t){return"?"===t?"\\?":t}).join("|"),")"))).test(e))||0<(c=e.indexOf(n))&&!l.test(e.substring(0,c))&&(r=!0),r)));if(h&&!l){e=t.match(this.interpolator.nestingRegexp);if(e&&0<e.length)return{key:t,namespaces:a};var c=t.split(s);(s!==o||s===o&&-1<this.options.ns.indexOf(c[0]))&&(a=c.shift()),t=c.join(o)}return{key:t,namespaces:a="string"==typeof a?[a]:a}}},{key:"translate",value:function(t,n,e){var r=this;if(n=(n="object"!==k.default(n)&&this.options.overloadTranslationOptionHandler?this.options.overloadTranslationOptionHandler(arguments):n)||{},null==t)return"";Array.isArray(t)||(t=[String(t)]);var i=(void 0!==n.keySeparator?n:this.options).keySeparator,s=this.extractFromKey(t[t.length-1],n),o=s.key,a=s.namespaces,h=a[a.length-1],s=n.lng||this.language,l=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(s&&"cimode"===s.toLowerCase())return l?(l=n.nsSeparator||this.options.nsSeparator,h+l+o):o;var l=this.resolve(t,n),c=l&&l.res,u=l&&l.usedKey||o,d=l&&l.exactUsedKey||o,p=Object.prototype.toString.apply(c),f=(void 0!==n.joinArrays?n:this.options).joinArrays,g=!this.i18nFormat||this.i18nFormat.handleAsObject;if(g&&c&&("string"!=typeof c&&"boolean"!=typeof c&&"number"!=typeof c)&&["[object Number]","[object Function]","[object RegExp]"].indexOf(p)<0&&("string"!=typeof f||"[object Array]"!==p)){if(!n.returnObjects&&!this.options.returnObjects)return this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(u,c,C(C({},n),{},{ns:a})):"key '".concat(o," (").concat(this.language,")' returned an object instead of string.");if(i){var m,y,v="[object Array]"===p,x=v?[]:{},b=v?d:u;for(m in c)Object.prototype.hasOwnProperty.call(c,m)&&(y="".concat(b).concat(i).concat(m),x[m]=this.translate(y,C(C({},n),{joinArrays:!1,ns:a})),x[m]===y&&(x[m]=c[m]));c=x}}else if(g&&"string"==typeof f&&"[object Array]"===p)c=(c=c.join(f))&&this.extendTranslation(c,t,n,e);else{var v=!1,d=!1,u=void 0!==n.count&&"string"!=typeof n.count,w=O.hasDefaultValue(n),g=u?this.pluralResolver.getSuffix(s,n.count,n):"",T=n["defaultValue".concat(g)]||n.defaultValue;!this.isValidLookup(c)&&w&&(v=!0,c=T),this.isValidLookup(c)||(d=!0,c=o);var S=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&d?void 0:c,P=w&&T!==c&&this.options.updateMissing;if(d||v||P){this.logger.log(P?"updateKey":"missingKey",s,h,o,P?T:c),!i||(p=this.resolve(o,C(C({},n),{},{keySeparator:!1})))&&p.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.");var _=[],E=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if("fallback"===this.options.saveMissingTo&&E&&E[0])for(var A=0;A<E.length;A++)_.push(E[A]);else"all"===this.options.saveMissingTo?_=this.languageUtils.toResolveHierarchy(n.lng||this.language):_.push(n.lng||this.language);var M=function(t,e,i){i=w&&i!==c?i:S;r.options.missingKeyHandler?r.options.missingKeyHandler(t,h,e,i,P,n):r.backendConnector&&r.backendConnector.saveMissing&&r.backendConnector.saveMissing(t,h,e,i,P,n),r.emit("missingKey",t,h,e,c)};this.options.saveMissing&&(this.options.saveMissingPlurals&&u?_.forEach(function(e){r.pluralResolver.getSuffixes(e,n).forEach(function(t){M([e],o+t,n["defaultValue".concat(t)]||T)})}):M(_,o,T))}c=this.extendTranslation(c,t,n,l,e),d&&c===o&&this.options.appendNamespaceToMissingKey&&(c="".concat(h,":").concat(o)),(d||v)&&this.options.parseMissingKeyHandler&&(c="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(o,v?c:void 0):this.options.parseMissingKeyHandler(c))}return c}},{key:"extendTranslation",value:function(t,n,r,e,s){var i,o=this,a=(this.i18nFormat&&this.i18nFormat.parse?t=this.i18nFormat.parse(t,r,e.usedLng,e.usedNS,e.usedKey,{resolved:e}):r.skipInterpolation||(r.interpolation&&this.interpolator.init(C(C({},r),{interpolation:C(C({},this.options.interpolation),r.interpolation)})),(a="string"==typeof t&&(r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r:this.options).interpolation.skipOnVariables)&&(h=(h=t.match(this.interpolator.nestingRegexp))&&h.length),i=r.replace&&"string"!=typeof r.replace?r.replace:r,this.options.interpolation.defaultVariables&&(i=C(C({},this.options.interpolation.defaultVariables),i)),t=this.interpolator.interpolate(t,i,r.lng||this.language,r),a&&h<((i=t.match(this.interpolator.nestingRegexp))&&i.length)&&(r.nest=!1),!1!==r.nest&&(t=this.interpolator.nest(t,function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return s&&s[0]===e[0]&&!r.context?(o.logger.warn("It seems you are nesting recursively key: ".concat(e[0]," in key: ").concat(n[0])),null):o.translate.apply(o,e.concat([n]))},r)),r.interpolation&&this.interpolator.reset()),r.postProcess||this.options.postProcess),h="string"==typeof a?[a]:a;return t=null!=t&&h&&h.length&&!1!==r.applyPostProcessor?nt.handle(h,t,n,this.options&&this.options.postProcessPassResolved?C({i18nResolved:e},r):r,this):t}},{key:"resolve",value:function(t){var c,i,u,d,n,p=this,f=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return(t="string"==typeof t?[t]:t).forEach(function(t){var o,a,h,l,e;p.isValidLookup(c)||(t=p.extractFromKey(t,f),o=t.key,i=o,t=t.namespaces,p.options.fallbackNS&&(t=t.concat(p.options.fallbackNS)),a=void 0!==f.count&&"string"!=typeof f.count,h=a&&!f.ordinal&&0===f.count&&p.pluralResolver.shouldUseIntlApi(),l=void 0!==f.context&&("string"==typeof f.context||"number"==typeof f.context)&&""!==f.context,e=f.lngs||p.languageUtils.toResolveHierarchy(f.lng||p.language,f.fallbackLng),t.forEach(function(s){p.isValidLookup(c)||(n=s,!at["".concat(e[0],"-").concat(s)]&&p.utils&&p.utils.hasLoadedNamespace&&!p.utils.hasLoadedNamespace(n)&&(at["".concat(e[0],"-").concat(s)]=!0,p.logger.warn('key "'.concat(i,'" for languages "').concat(e.join(", "),'" won\'t get resolved as namespace "').concat(n,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),e.forEach(function(t){if(!p.isValidLookup(c)){d=t;var e,i,n,r=[o];for(p.i18nFormat&&p.i18nFormat.addLookupKeys?p.i18nFormat.addLookupKeys(r,o,t,s,f):(a&&(e=p.pluralResolver.getSuffix(t,f.count,f)),a&&(r.push(o+e),h&&r.push(o+"_zero")),l&&(i="".concat(o).concat(p.options.contextSeparator).concat(f.context),r.push(i),a&&(r.push(i+e),h&&r.push(i+"_zero"))));n=r.pop();)p.isValidLookup(c)||(u=n,c=p.getResource(t,s,n,f))}}))}))}),{res:c,usedKey:i,exactUsedKey:u,usedLng:d,usedNS:n}}},{key:"isValidLookup",value:function(t){return!(void 0===t||!this.options.returnNull&&null===t||!this.options.returnEmptyString&&""===t)}},{key:"getResource",value:function(t,e,i){var n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{};return(this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat:this.resourceStore).getResource(t,e,i,n)}}],[{key:"hasDefaultValue",value:function(t){var e,i="defaultValue";for(e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&i===e.substring(0,i.length)&&void 0!==t[e])return!0;return!1}}]),O);function O(t){var e,i,n,r,s=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return o.default(this,O),e=ot.call(this),v&&d.call(a.default(e)),i=["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],n=t,r=a.default(e),i.forEach(function(t){n[t]&&(r[t]=n[t])}),e.options=s,void 0===e.options.keySeparator&&(e.options.keySeparator="."),e.logger=u.create("translator"),e}function w(t){return t.charAt(0).toUpperCase()+t.slice(1)}e.default(T,[{key:"getScriptPartFromCode",value:function(t){return!t||t.indexOf("-")<0||2===(t=t.split("-")).length||(t.pop(),"x"===t[t.length-1].toLowerCase())?null:this.formatLanguageCode(t.join("-"))}},{key:"getLanguagePartFromCode",value:function(t){return!t||t.indexOf("-")<0?t:(t=t.split("-"),this.formatLanguageCode(t[0]))}},{key:"formatLanguageCode",value:function(t){var e,i;return"string"==typeof t&&-1<t.indexOf("-")?(e=["hans","hant","latn","cyrl","cans","mong","arab"],i=t.split("-"),this.options.lowerCaseLng?i=i.map(function(t){return t.toLowerCase()}):2===i.length?(i[0]=i[0].toLowerCase(),i[1]=i[1].toUpperCase(),-1<e.indexOf(i[1].toLowerCase())&&(i[1]=w(i[1].toLowerCase()))):3===i.length&&(i[0]=i[0].toLowerCase(),2===i[1].length&&(i[1]=i[1].toUpperCase()),"sgn"!==i[0]&&2===i[2].length&&(i[2]=i[2].toUpperCase()),-1<e.indexOf(i[1].toLowerCase())&&(i[1]=w(i[1].toLowerCase())),-1<e.indexOf(i[2].toLowerCase())&&(i[2]=w(i[2].toLowerCase()))),i.join("-")):this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}},{key:"isSupportedCode",value:function(t){return"languageOnly"!==this.options.load&&!this.options.nonExplicitSupportedLngs||(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||-1<this.supportedLngs.indexOf(t)}},{key:"getBestMatchFromCodes",value:function(t){var i,n=this;return t?(t.forEach(function(t){i||(t=n.formatLanguageCode(t),n.options.supportedLngs&&!n.isSupportedCode(t)||(i=t))}),!i&&this.options.supportedLngs&&t.forEach(function(t){var e;if(!i)return e=n.getLanguagePartFromCode(t),n.isSupportedCode(e)?i=e:void(i=n.options.supportedLngs.find(function(t){if(0===t.indexOf(e))return t}))}),i=i||this.getFallbackCodes(this.options.fallbackLng)[0]):null}},{key:"getFallbackCodes",value:function(t,e){return t?("string"==typeof(t="function"==typeof t?t(e):t)&&(t=[t]),"[object Array]"===Object.prototype.toString.apply(t)?t:e?t[e]||t[this.getScriptPartFromCode(e)]||t[this.formatLanguageCode(e)]||t[this.getLanguagePartFromCode(e)]||t.default||[]:t.default||[]):[]}},{key:"toResolveHierarchy",value:function(t,e){function i(t){t&&(n.isSupportedCode(t)?r.push(t):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(t)))}var n=this,e=this.getFallbackCodes(e||this.options.fallbackLng||[],t),r=[];return"string"==typeof t&&-1<t.indexOf("-")?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(t)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(t)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(t))):"string"==typeof t&&i(this.formatLanguageCode(t)),e.forEach(function(t){r.indexOf(t)<0&&i(n.formatLanguageCode(t))}),r}}]);var lt=T;function T(t){o.default(this,T),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=u.create("languageUtils")}var ct=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],ut={1:function(t){return Number(1<t)},2:function(t){return Number(1!=t)},3:function(t){return 0},4:function(t){return Number(t%10==1&&t%100!=11?0:2<=t%10&&t%10<=4&&(t%100<10||20<=t%100)?1:2)},5:function(t){return Number(0==t?0:1==t?1:2==t?2:3<=t%100&&t%100<=10?3:11<=t%100?4:5)},6:function(t){return Number(1==t?0:2<=t&&t<=4?1:2)},7:function(t){return Number(1==t?0:2<=t%10&&t%10<=4&&(t%100<10||20<=t%100)?1:2)},8:function(t){return Number(1==t?0:2==t?1:8!=t&&11!=t?2:3)},9:function(t){return Number(2<=t)},10:function(t){return Number(1==t?0:2==t?1:t<7?2:t<11?3:4)},11:function(t){return Number(1==t||11==t?0:2==t||12==t?1:2<t&&t<20?2:3)},12:function(t){return Number(t%10!=1||t%100==11)},13:function(t){return Number(0!==t)},14:function(t){return Number(1==t?0:2==t?1:3==t?2:3)},15:function(t){return Number(t%10==1&&t%100!=11?0:2<=t%10&&(t%100<10||20<=t%100)?1:2)},16:function(t){return Number(t%10==1&&t%100!=11?0:0!==t?1:2)},17:function(t){return Number(1==t||t%10==1&&t%100!=11?0:1)},18:function(t){return Number(0==t?0:1==t?1:2)},19:function(t){return Number(1==t?0:0==t||1<t%100&&t%100<11?1:10<t%100&&t%100<20?2:3)},20:function(t){return Number(1==t?0:0==t||0<t%100&&t%100<20?1:2)},21:function(t){return Number(t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0)},22:function(t){return Number(1==t?0:2==t?1:(t<0||10<t)&&t%10==0?2:3)}},dt=["v1","v2","v3"],pt={zero:0,one:1,two:2,few:3,many:4,other:5};e.default(S,[{key:"addRule",value:function(t,e){this.rules[t]=e}},{key:"getRule",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(t,{type:e.ordinal?"ordinal":"cardinal"})}catch(t){return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}},{key:"needsPlural",value:function(t){t=this.getRule(t,1<arguments.length&&void 0!==arguments[1]?arguments[1]:{});return this.shouldUseIntlApi()?t&&1<t.resolvedOptions().pluralCategories.length:t&&1<t.numbers.length}},{key:"getPluralFormsOfKey",value:function(t,e){return this.getSuffixes(t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:{}).map(function(t){return"".concat(e).concat(t)})}},{key:"getSuffixes",value:function(e){var i=this,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},t=this.getRule(e,n);return t?this.shouldUseIntlApi()?t.resolvedOptions().pluralCategories.sort(function(t,e){return pt[t]-pt[e]}).map(function(t){return"".concat(i.options.prepend).concat(t)}):t.numbers.map(function(t){return i.getSuffix(e,t,n)}):[]}},{key:"getSuffix",value:function(t,e){var i=this.getRule(t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:{});return i?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(i.select(e)):this.getSuffixRetroCompatible(i,e):(this.logger.warn("no plural rule found for: ".concat(t)),"")}},{key:"getSuffixRetroCompatible",value:function(t,e){function i(){return n.options.prepend&&r.toString()?n.options.prepend+r.toString():r.toString()}var n=this,e=t.noAbs?t.plurals(e):t.plurals(Math.abs(e)),r=t.numbers[e];this.options.simplifyPluralSuffix&&2===t.numbers.length&&1===t.numbers[0]&&(2===r?r="plural":1===r&&(r=""));return"v1"===this.options.compatibilityJSON?1===r?"":"number"==typeof r?"_plural_".concat(r.toString()):i():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===t.numbers.length&&1===t.numbers[0]?i():this.options.prepend&&e.toString()?this.options.prepend+e.toString():e.toString()}},{key:"shouldUseIntlApi",value:function(){return!dt.includes(this.options.compatibilityJSON)}}]);var ft=S;function S(t){var i,e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};o.default(this,S),this.languageUtils=t,this.options=e,this.logger=u.create("pluralResolver"),this.options.compatibilityJSON&&"v4"!==this.options.compatibilityJSON||"undefined"!=typeof Intl&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=(i={},ct.forEach(function(e){e.lngs.forEach(function(t){i[t]={numbers:e.nr,plurals:ut[e.fc]}})}),i)}function gt(e,t){var i,n=Object.keys(e);return Object.getOwnPropertySymbols&&(i=Object.getOwnPropertySymbols(e),t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)),n}function P(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?gt(Object(i),!0).forEach(function(t){l.default(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):gt(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}e.default(_,[{key:"init",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=(t.interpolation||(t.interpolation={escapeValue:!0}),t.interpolation);this.escape=void 0!==t.escape?t.escape:Z,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?y(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?y(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator||t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=!this.unescapePrefix&&t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?y(t.nestingPrefix):t.nestingPrefixEscaped||y("$t("),this.nestingSuffix=t.nestingSuffix?y(t.nestingSuffix):t.nestingSuffixEscaped||y(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator||t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces||1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var t="".concat(this.prefix,"(.+?)").concat(this.suffix),t=(this.regexp=new RegExp(t,"g"),"".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix)),t=(this.regexpUnescape=new RegExp(t,"g"),"".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix));this.nestingRegexp=new RegExp(t,"g")}},{key:"interpolate",value:function(r,s,o,a){var h,l,c,u=this,d=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function e(t){return t.replace(/\$/g,"$$$$")}this.resetRegExp();var p=a&&a.missingInterpolationHandler||this.options.missingInterpolationHandler,f=(a&&a.interpolation&&void 0!==a.interpolation.skipOnVariables?a:this.options).interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e},{regex:this.regexp,safeValue:function(t){return u.escapeValue?e(u.escape(t)):e(t)}}].forEach(function(t){for(c=0;h=t.regex.exec(r);){var e=h[1].trim();if((n=void 0)===(l=(i=e).indexOf(u.formatSeparator)<0?(n=q(s,d,i),u.alwaysFormat?u.format(n,void 0,o,P(P(P({},a),s),{},{interpolationkey:i})):n):(i=(n=i.split(u.formatSeparator)).shift().trim(),n=n.join(u.formatSeparator).trim(),u.format(q(s,d,i),n,o,P(P(P({},a),s),{},{interpolationkey:i})))))if("function"==typeof p){n=p(r,h,a);l="string"==typeof n?n:""}else{if(!a||!a.hasOwnProperty(e)){if(f){l=h[0];continue}u.logger.warn("missed to pass in variable ".concat(e," for interpolating ").concat(r))}l=""}else"string"==typeof l||u.useRawValueToEscape||(l=H(l));i=t.safeValue(l);if(r=r.replace(h[0],i),f?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=h[0].length):t.regex.lastIndex=0,++c>=u.maxReplaces)break}var i,n}),r}},{key:"nest",value:function(t,e){var i,n=this,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},s=P({},r);function o(e,t){var i=this.nestingOptionsSeparator;if(!(e.indexOf(i)<0)){var n=e.split(new RegExp("".concat(i,"[ ]*{"))),r="{".concat(n[1]);e=n[0],r=(r=this.interpolate(r,s)).replace(/'/g,'"');try{s=JSON.parse(r),t&&(s=P(P({},t),s))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(i).concat(r)}delete s.defaultValue}return e}for(s.applyPostProcessor=!1,delete s.defaultValue;i=this.nestingRegexp.exec(t);){var a,h=[],l=!1;if(-1===i[0].indexOf(this.formatSeparator)||/{.*}/.test(i[1])||(a=i[1].split(this.formatSeparator).map(function(t){return t.trim()}),i[1]=a.shift(),h=a,l=!0),(a=e(o.call(this,i[1].trim(),s),s))&&i[0]===t&&"string"!=typeof a)return a;(a="string"!=typeof a?H(a):a)||(this.logger.warn("missed to resolve ".concat(i[1]," for nesting ").concat(t)),a=""),l&&(a=h.reduce(function(t,e){return n.format(t,e,r.lng,P(P({},r),{},{interpolationkey:i[1].trim()}))},a.trim())),t=t.replace(i[0],a),this.regexp.lastIndex=0}return t}}]);var mt=_;function _(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};o.default(this,_),this.logger=u.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(t){return t},this.init(t)}function yt(e,t){var i,n=Object.keys(e);return Object.getOwnPropertySymbols&&(i=Object.getOwnPropertySymbols(e),t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)),n}function E(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?yt(Object(i),!0).forEach(function(t){l.default(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):yt(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}e.default(A,[{key:"init",value:function(t){var e=(1<arguments.length&&void 0!==arguments[1]?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=e.formatSeparator||e.formatSeparator||","}},{key:"add",value:function(t,e){this.formats[t.toLowerCase().trim()]=e}},{key:"format",value:function(t,e,a,h){var l=this;return e.split(this.formatSeparator).reduce(function(t,e){n=(e=e).toLowerCase().trim(),i={},-1<e.indexOf("(")&&(n=(e=e.split("("))[0].toLowerCase().trim(),e=e[1].substring(0,e[1].length-1),"currency"===n&&e.indexOf(":")<0?i.currency||(i.currency=e.trim()):"relativetime"===n&&e.indexOf(":")<0?i.range||(i.range=e.trim()):e.split(";").forEach(function(t){var e;t&&(t=t.split(":"),e=(t=V.default(t))[0],"false"===(t=t.slice(1).join(":")).trim()&&(i[e.trim()]=!1),"true"===t.trim()&&(i[e.trim()]=!0),isNaN(t.trim())||(i[e.trim()]=parseInt(t.trim(),10)),i[e.trim()]||(i[e.trim()]=t.trim()))}));var i,e={formatName:n,formatOptions:i},n=e.formatName,e=e.formatOptions;if(l.formats[n]){var r=t;try{var s=h&&h.formatParams&&h.formatParams[h.interpolationkey]||{},o=s.locale||s.lng||h.locale||h.lng||a,r=l.formats[n](t,o,E(E(E({},e),h),s))}catch(t){l.logger.warn(t)}return r}return l.logger.warn("there was no format function for ".concat(n)),t},t)}}]);var vt=A;function A(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};o.default(this,A),this.logger=u.create("formatter"),this.options=t,this.formats={number:function(t,e,i){return new Intl.NumberFormat(e,i).format(t)},currency:function(t,e,i){return new Intl.NumberFormat(e,E(E({},i),{},{style:"currency"})).format(t)},datetime:function(t,e,i){return new Intl.DateTimeFormat(e,E({},i)).format(t)},relativetime:function(t,e,i){return new Intl.RelativeTimeFormat(e,E({},i)).format(t,i.range||"day")},list:function(t,e,i){return new Intl.ListFormat(e,E({},i)).format(t)}},this.init(t)}function xt(e,t){var i,n=Object.keys(e);return Object.getOwnPropertySymbols&&(i=Object.getOwnPropertySymbols(e),t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)),n}function bt(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?xt(Object(i),!0).forEach(function(t){l.default(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):xt(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}function wt(i){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=h.default(i);return t=n?(t=h.default(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),s.default(this,t)}}i.default(M,d),Tt=wt(M),e.default(M,[{key:"queueLoad",value:function(t,e,r,i){var s=this,o=[],a=[],h=[],l=[];return t.forEach(function(i){var n=!0;e.forEach(function(t){var e="".concat(i,"|").concat(t);!r.reload&&s.store.hasResourceBundle(i,t)?s.state[e]=2:s.state[e]<0||(1===s.state[e]?a.indexOf(e)<0&&a.push(e):(s.state[e]=1,n=!1,a.indexOf(e)<0&&a.push(e),o.indexOf(e)<0&&o.push(e),l.indexOf(t)<0&&l.push(t)))}),n||h.push(i)}),(o.length||a.length)&&this.queue.push({pending:a,loaded:{},errors:[],callback:i}),{toLoad:o,pending:a,toLoadLanguages:h,toLoadNamespaces:l}}},{key:"loaded",value:function(h,l,t){var e=h.split("|"),c=e[0],u=e[1],d=(l&&this.emit("failedLoading",c,u,l),t&&this.store.addResourceBundle(c,u,t),this.state[h]=l?-1:2,{});this.queue.forEach(function(t){e=t.loaded,n=u,i=(e=g(e,i=[c],Object)).obj,e=e.k,i[e]=i[e]||[],r&&(i[e]=i[e].concat(n)),r||i[e].push(n);for(var e,i,n,r,s=t.pending,o=h,a=s.indexOf(o);-1!==a;)s.splice(a,1),a=s.indexOf(o);l&&t.errors.push(l),0!==t.pending.length||t.done||(Object.keys(t.loaded).forEach(function(e){d[e]||(d[e]=[]),t.loaded[e].length&&t.loaded[e].forEach(function(t){d[e].indexOf(t)<0&&d[e].push(t)})}),t.done=!0,t.errors.length?t.callback(t.errors):t.callback())}),this.emit("loaded",d),this.queue=this.queue.filter(function(t){return!t.done})}},{key:"read",value:function(i,n,r){var s=this,o=3<arguments.length&&void 0!==arguments[3]?arguments[3]:0,a=4<arguments.length&&void 0!==arguments[4]?arguments[4]:350,h=5<arguments.length?arguments[5]:void 0;return i.length?this.backend[r](i,n,function(t,e){t&&e&&o<5?setTimeout(function(){s.read.call(s,i,n,r,o+1,2*a,h)},a):h(t,e)}):h(null,{})}},{key:"prepareLoading",value:function(t,e){var i=this,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},r=3<arguments.length?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();"string"==typeof t&&(t=this.languageUtils.toResolveHierarchy(t));t=this.queueLoad(t,e="string"==typeof e?[e]:e,n,r);if(!t.toLoad.length)return t.pending.length||r(),null;t.toLoad.forEach(function(t){i.loadOne(t)})}},{key:"load",value:function(t,e,i){this.prepareLoading(t,e,{},i)}},{key:"reload",value:function(t,e,i){this.prepareLoading(t,e,{reload:!0},i)}},{key:"loadOne",value:function(i){var n=this,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"",t=i.split("|"),s=t[0],o=t[1];this.read(s,o,"read",void 0,void 0,function(t,e){t&&n.logger.warn("".concat(r,"loading namespace ").concat(o," for language ").concat(s," failed"),t),!t&&e&&n.logger.log("".concat(r,"loaded namespace ").concat(o," for language ").concat(s),e),n.loaded(i,t,e)})}},{key:"saveMissing",value:function(t,e,i,n,r){var s=5<arguments.length&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(e)?this.logger.warn('did not save key "'.concat(i,'" as the namespace "').concat(e,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):null!=i&&""!==i&&(this.backend&&this.backend.create&&this.backend.create(t,e,i,n,null,bt(bt({},s),{},{isUpdate:r})),t&&t[0]&&this.store.addResource(t[0],e,i,n))}}]);var Tt,St=M;function M(t,e,i){var n,r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{};return o.default(this,M),n=Tt.call(this),v&&d.call(a.default(n)),n.backend=t,n.store=e,n.services=i,n.languageUtils=i.languageUtils,n.options=r,n.logger=u.create("backendConnector"),n.state={},n.queue=[],n.backend&&n.backend.init&&n.backend.init(i,r.backend,r),n}function Pt(t){return"string"==typeof t.ns&&(t.ns=[t.ns]),"string"==typeof t.fallbackLng&&(t.fallbackLng=[t.fallbackLng]),"string"==typeof t.fallbackNS&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t}function _t(e,t){var i,n=Object.keys(e);return Object.getOwnPropertySymbols&&(i=Object.getOwnPropertySymbols(e),t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)),n}function R(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?_t(Object(i),!0).forEach(function(t){l.default(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):_t(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}function Et(i){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=h.default(i);return t=n?(t=h.default(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),s.default(this,t)}}function L(){}i.default(I,d),At=Et(I),e.default(I,[{key:"init",value:function(){var t,e,r=this,i=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},n=1<arguments.length?arguments[1]:void 0,s=("function"==typeof i&&(n=i,i={}),!i.defaultNS&&i.ns&&("string"==typeof i.ns?i.defaultNS=i.ns:i.ns.indexOf("translation")<0&&(i.defaultNS=i.ns[0])),{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){var e,i={};return"object"===k.default(t[1])&&(i=t[1]),"string"==typeof t[1]&&(i.defaultValue=t[1]),"string"==typeof t[2]&&(i.tDescription=t[2]),"object"!==k.default(t[2])&&"object"!==k.default(t[3])||(e=t[3]||t[2],Object.keys(e).forEach(function(t){i[t]=e[t]})),i},interpolation:{escapeValue:!0,format:function(t,e,i,n){return t},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}});function o(t){return t?"function"==typeof t?new t:t:null}this.options=R(R(R({},s),this.options),Pt(i)),"v1"!==this.options.compatibilityAPI&&(this.options.interpolation=R(R({},s.interpolation),this.options.interpolation)),void 0!==i.keySeparator&&(this.options.userDefinedKeySeparator=i.keySeparator),void 0!==i.nsSeparator&&(this.options.userDefinedNsSeparator=i.nsSeparator),this.options.isClone||(this.modules.logger?u.init(o(this.modules.logger),this.options):u.init(null,this.options),this.modules.formatter?t=this.modules.formatter:"undefined"!=typeof Intl&&(t=vt),i=new lt(this.options),this.store=new it(this.options.resources,this.options),(e=this.services).logger=u,e.resourceStore=this.store,e.languageUtils=i,e.pluralResolver=new ft(i,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!t||this.options.interpolation.format&&this.options.interpolation.format!==s.interpolation.format||(e.formatter=o(t),e.formatter.init(e,this.options),this.options.interpolation.format=e.formatter.format.bind(e.formatter)),e.interpolator=new mt(this.options),e.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},e.backendConnector=new St(o(this.modules.backend),e.resourceStore,e,this.options),e.backendConnector.on("*",function(t){for(var e=arguments.length,i=new Array(1<e?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];r.emit.apply(r,[t].concat(i))}),this.modules.languageDetector&&(e.languageDetector=o(this.modules.languageDetector),e.languageDetector.init(e,this.options.detection,this.options)),this.modules.i18nFormat&&(e.i18nFormat=o(this.modules.i18nFormat),e.i18nFormat.init&&e.i18nFormat.init(this)),this.translator=new ht(this.services,this.options),this.translator.on("*",function(t){for(var e=arguments.length,i=new Array(1<e?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];r.emit.apply(r,[t].concat(i))}),this.modules.external.forEach(function(t){t.init&&t.init(r)})),this.format=this.options.interpolation.format,n=n||L,!this.options.fallbackLng||this.services.languageDetector||this.options.lng||0<(i=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng)).length&&"dev"!==i[0]&&(this.options.lng=i[0]),this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(function(e){r[e]=function(){var t;return(t=r.store)[e].apply(t,arguments)}});function a(){function t(t,e){r.isInitialized&&!r.initializedStoreOnce&&r.logger.warn("init: i18next is already initialized. You should call init just once!"),r.isInitialized=!0,r.options.isClone||r.logger.log("initialized",r.options),r.emit("initialized",r.options),h.resolve(e),n(t,e)}if(r.languages&&"v1"!==r.options.compatibilityAPI&&!r.isInitialized)return t(null,r.t.bind(r));r.changeLanguage(r.options.lng,t)}["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(function(e){r[e]=function(){var t;return(t=r.store)[e].apply(t,arguments),r}});var h=f();return this.options.resources||!this.options.initImmediate?a():setTimeout(a,0),h}},{key:"loadResources",value:function(t){var e=this,i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:L,n="string"==typeof t?t:this.language;if("function"==typeof t&&(i=t),!this.options.resources||this.options.partialBundledLanguages){if(n&&"cimode"===n.toLowerCase())return i();var r=[],t=function(t){t&&e.services.languageUtils.toResolveHierarchy(t).forEach(function(t){r.indexOf(t)<0&&r.push(t)})};n?t(n):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(t),this.options.preload&&this.options.preload.forEach(t),this.services.backendConnector.load(r,this.options.ns,i)}else i(null)}},{key:"reloadResources",value:function(t,e,i){var n=f();return t=t||this.languages,e=e||this.options.ns,i=i||L,this.services.backendConnector.reload(t,e,function(t){n.resolve(),i(t)}),n}},{key:"use",value:function(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(t.type)return"backend"===t.type&&(this.modules.backend=t),("logger"===t.type||t.log&&t.warn&&t.error)&&(this.modules.logger=t),"languageDetector"===t.type&&(this.modules.languageDetector=t),"i18nFormat"===t.type&&(this.modules.i18nFormat=t),"postProcessor"===t.type&&nt.addPostProcessor(t),"formatter"===t.type&&(this.modules.formatter=t),"3rdParty"===t.type&&this.modules.external.push(t),this;throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()")}},{key:"changeLanguage",value:function(i,n){function t(t){var e="string"==typeof(t=i||t||!r.services.languageDetector?t:[])?t:r.services.languageUtils.getBestMatchFromCodes(t);e&&(r.language||o(e),r.translator.language||r.translator.changeLanguage(e),r.services.languageDetector&&r.services.languageDetector.cacheUserLanguage(e)),r.loadResources(e,function(t){a(t,e)})}var r=this,s=(this.isLanguageChangingTo=i,f()),o=(this.emit("languageChanging",i),function(t){if(r.language=t,r.languages=r.services.languageUtils.toResolveHierarchy(t),r.resolvedLanguage=void 0,!(-1<["cimode","dev"].indexOf(t)))for(var e=0;e<r.languages.length;e++){var i=r.languages[e];if(!(-1<["cimode","dev"].indexOf(i))&&r.store.hasLanguageSomeTranslations(i)){r.resolvedLanguage=i;break}}}),a=function(t,e){e?(o(e),r.translator.changeLanguage(e),r.isLanguageChangingTo=void 0,r.emit("languageChanged",e),r.logger.log("languageChanged",e)):r.isLanguageChangingTo=void 0,s.resolve(function(){return r.t.apply(r,arguments)}),n&&n(t,function(){return r.t.apply(r,arguments)})};return i||!this.services.languageDetector||this.services.languageDetector.async?!i&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(t):t(i):t(this.services.languageDetector.detect()),s}},{key:"getFixedT",value:function(t,e,o){function a(t,e){var i;if("object"!==k.default(e)){for(var n=arguments.length,r=new Array(2<n?n-2:0),s=2;s<n;s++)r[s-2]=arguments[s];i=h.options.overloadTranslationOptionHandler([t,e].concat(r))}else i=R({},e);return i.lng=i.lng||a.lng,i.lngs=i.lngs||a.lngs,i.ns=i.ns||a.ns,e=h.options.keySeparator||".",e=o?"".concat(o).concat(e).concat(t):t,h.t(e,i)}var h=this;return"string"==typeof t?a.lng=t:a.lngs=t,a.ns=e,a.keyPrefix=o,a}},{key:"t",value:function(){var t;return this.translator&&(t=this.translator).translate.apply(t,arguments)}},{key:"exists",value:function(){var t;return this.translator&&(t=this.translator).exists.apply(t,arguments)}},{key:"setDefaultNamespace",value:function(t){this.options.defaultNS=t}},{key:"hasLoadedNamespace",value:function(t){var i=this,e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var n=this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,s=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;function o(t,e){return-1===(t=i.services.backendConnector.state["".concat(t,"|").concat(e)])||2===t}if(e.precheck){e=e.precheck(this,o);if(void 0!==e)return e}return!!this.hasResourceBundle(n,t)||(!this.services.backendConnector.backend||!(!o(n,t)||r&&!o(s,t)))}},{key:"loadNamespaces",value:function(t,e){var i=this,n=f();return this.options.ns?((t="string"==typeof t?[t]:t).forEach(function(t){i.options.ns.indexOf(t)<0&&i.options.ns.push(t)}),this.loadResources(function(t){n.resolve(),e&&e(t)}),n):(e&&e(),Promise.resolve())}},{key:"loadLanguages",value:function(t,e){var i=f(),n=this.options.preload||[],t=(t="string"==typeof t?[t]:t).filter(function(t){return n.indexOf(t)<0});return t.length?(this.options.preload=n.concat(t),this.loadResources(function(t){i.resolve(),e&&e(t)}),i):(e&&e(),Promise.resolve())}},{key:"dir",value:function(t){return!(t=t||this.resolvedLanguage||(this.languages&&0<this.languages.length?this.languages[0]:this.language))||-1<["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(this.services.languageUtils.getLanguagePartFromCode(t))||1<t.toLowerCase().indexOf("-arab")?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var e=this,t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:L,t=R(R(R({},this.options),t),{isClone:!0}),r=new I(t);return["store","services","language"].forEach(function(t){r[t]=e[t]}),r.services=R({},this.services),r.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},r.translator=new ht(r.services,r.options),r.translator.on("*",function(t){for(var e=arguments.length,i=new Array(1<e?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];r.emit.apply(r,[t].concat(i))}),r.init(t,i),r.translator.options=r.options,r.translator.backendConnector.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},r}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]);var At,D=I;function I(){var t,e,i=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},n=1<arguments.length?arguments[1]:void 0;if(o.default(this,I),t=At.call(this),v&&d.call(a.default(t)),t.options=Pt(i),t.services={},t.logger=u,t.modules={external:[]},e=a.default(t),Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(function(t){"function"==typeof e[t]&&(e[t]=e[t].bind(e))}),n&&!t.isInitialized&&!i.isClone){if(!t.options.initImmediate)return t.init(i,n),s.default(t,a.default(t));setTimeout(function(){t.init(i,n)},0)}return t}l.default(D,"createInstance",function(){return new D(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},1<arguments.length?arguments[1]:void 0)});n=D.createInstance();n.createInstance=D.createInstance,B.exports=n},701:(t,e,r)=>{"use strict";var i,n,a=function(){return i=void 0===i?Boolean(window&&document&&document.all&&!window.atob):i},s=(n={},function(t){if(void 0===n[t]){var e=document.querySelector(t);if(window.HTMLIFrameElement&&e instanceof window.HTMLIFrameElement)try{e=e.contentDocument.head}catch(t){e=null}n[t]=e}return n[t]}),l=[];function c(t){for(var e=-1,i=0;i<l.length;i++)if(l[i].identifier===t){e=i;break}return e}function h(t,e){for(var i={},n=[],r=0;r<t.length;r++){var s=t[r],o=e.base?s[0]+e.base:s[0],a=i[o]||0,h="".concat(o," ").concat(a),o=(i[o]=a+1,c(h)),a={css:s[1],media:s[2],sourceMap:s[3]};-1!==o?(l[o].references++,l[o].updater(a)):l.push({identifier:h,updater:function(e,t){var i,n,r;{var s;r=t.singleton?(s=g++,i=f=f||u(t),n=p.bind(null,i,s,!1),p.bind(null,i,s,!0)):(i=u(t),n=function(t,e,i){var n=i.css,r=i.media,i=i.sourceMap;r?t.setAttribute("media",r):t.removeAttribute("media");i&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */"));if(t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}.bind(null,i,t),function(){var t=i;null!==t.parentNode&&t.parentNode.removeChild(t)})}return n(e),function(t){t?t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap||n(e=t):r()}}(a,e),references:1}),n.push(h)}return n}function u(t){var e=document.createElement("style"),i=t.attributes||{};if(void 0!==i.nonce||(n=r.nc)&&(i.nonce=n),Object.keys(i).forEach(function(t){e.setAttribute(t,i[t])}),"function"==typeof t.insert)t.insert(e);else{var n=s(t.insert||"head");if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(e)}return e}o=[];var o,d=function(t,e){return o[t]=e,o.filter(Boolean).join("\n")};function p(t,e,i,n){var i=i?"":n.media?"@media ".concat(n.media," {").concat(n.css,"}"):n.css;t.styleSheet?t.styleSheet.cssText=d(e,i):(n=document.createTextNode(i),(i=t.childNodes)[e]&&t.removeChild(i[e]),i.length?t.insertBefore(n,i[e]):t.appendChild(n))}var f=null,g=0;t.exports=function(t,s){(s=s||{}).singleton||"boolean"==typeof s.singleton||(s.singleton=a());var o=h(t=t||[],s);return function(t){if(t=t||[],"[object Array]"===Object.prototype.toString.call(t)){for(var e=0;e<o.length;e++){var i=c(o[e]);l[i].references--}for(var t=h(t,s),n=0;n<o.length;n++){var r=c(o[n]);0===l[r].references&&(l[r].updater(),l.splice(r,1))}o=t}}}},39:(t,e,i)=>{"use strict";i.r(e),i.d(e,{default:()=>r});var e=i(701),e=i.n(e),i=i(666),n={insert:"head",singleton:!1};e()(i.default,n);const r=i.default.locals||{}},712:(t,e,i)=>{i=function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DummyFeedbackClient=void 0;e.DummyFeedbackClient=class{constructor(t){this.leaderboardName=t.leaderboardName}openAuthDialog(){return new Promise((t,e)=>{t(!0)})}getPlayer(i){return new Promise((t,e)=>{i(),t(!0)})}initPlayer(t,e){this.getPlayer(t).catch(()=>{this.openAuthDialog().then(()=>{this.getPlayer(t).catch(t=>e())}).catch(()=>{e()})})}requestReview(t){let e=new Promise((t,e)=>{t(!0)});e.then(()=>{t()})}startReview(e){this.canReview().then(t=>{t.value?this.requestReview(e):"NO_AUTH"===t.reason?this.openAuthDialog().then(()=>{this.getPlayer(()=>{this.requestReview(e)}).catch(t=>e())}).catch(()=>{e()}):e()}).catch(()=>{e()})}canReview(){return new Promise((t,e)=>{t({value:!0})})}setLeaderboardScore(t,i){this.initPlayer(()=>{{this.leaderboardName;var e=i;let t=new Promise((t,e)=>{t(!0)});t.then(()=>{e()})}},i)}}}.apply(e,[i,e]);void 0!==i&&(t.exports=i)},710:(t,e,i)=>{i=[i,e,i(601),i(276)],e=function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MockFeedbackClient=void 0;e.MockFeedbackClient=class{constructor(t){this.leaderboardName=t.leaderboardName,window._azMockSDK=new azMockSDK.Wrapper(t)}openAuthDialog(){return window._azMockSDK.openAuthDialog()}getPlayer(e){return window._azMockSDK.getPlayer().then(t=>{e()})}initPlayer(t,e){this.getPlayer(t).catch(()=>{this.openAuthDialog().then(()=>{this.getPlayer(t).catch(t=>e())}).catch(()=>{e()})})}requestReview(e){window._azMockSDK.feedback.requestReview().then(t=>{e()}).catch(()=>{e()})}startReview(e){this.canReview().then(t=>{t.value?i.RatingPopUp.showPopup(()=>{this.requestReview(e)},()=>{e()}):"NO_AUTH"===t.reason?i.RatingPopUp.showPopup(()=>{this.openAuthDialog().then(()=>{this.getPlayer(()=>{this.requestReview(e)}).catch(t=>e())}).catch(()=>{e()})},()=>{e()}):e()}).catch(()=>{e()})}canReview(){return window._azMockSDK.feedback.canReview()}setLeaderboardScore(t,e){this.initPlayer(()=>{var i,n,r;i=this.leaderboardName,n=t,r=e,window._azMockSDK.getLeaderboards().then(e=>{e.getLeaderboardPlayerEntry(i).then(t=>{t.score<n&&e.setLeaderboardScore(i,n),r()}).catch(t=>{"LEADERBOARD_PLAYER_NOT_PRESENT"===t.code&&e.setLeaderboardScore(i,n),r()})}).catch(()=>{r()})},e)}}}.apply(e,i);void 0!==e&&(t.exports=e)},639:(t,e,i)=>{i=[i,e,i(601)],e=function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.YandexFeedbackClient=void 0;e.YandexFeedbackClient=class{constructor(t){this.leaderboardName=t.leaderboardName}openAuthDialog(){return window._YaSDK.auth.openAuthDialog()}getPlayer(e){return window._YaSDK.getPlayer().then(t=>{e()})}initPlayer(t,e){this.getPlayer(t).catch(()=>{this.openAuthDialog().then(()=>{this.getPlayer(t).catch(t=>e())}).catch(()=>{e()})})}requestReview(e){window._YaSDK.feedback.requestReview().then(t=>{e()}).catch(()=>{e()})}startReview(e){this.canReview().then(t=>{t.value?i.RatingPopUp.showPopup(()=>{this.requestReview(e)},()=>{e()}):"NO_AUTH"===t.reason?i.RatingPopUp.showPopup(()=>{this.openAuthDialog().then(()=>{this.getPlayer(()=>{this.requestReview(e)}).catch(t=>e())}).catch(()=>{e()})},()=>{e()}):e()}).catch(()=>{e()})}canReview(){return window._YaSDK.feedback.canReview()}setLeaderboardScore(t,e){this.initPlayer(()=>{var i,n,r;i=this.leaderboardName,n=t,r=e,window._YaSDK.getLeaderboards().then(e=>{e.getLeaderboardPlayerEntry(i).then(t=>{t.score<n&&e.setLeaderboardScore(i,n),r()}).catch(t=>{"LEADERBOARD_PLAYER_NOT_PRESENT"===t.code&&e.setLeaderboardScore(i,n),r()})}).catch(()=>{r()})},e)}}}.apply(e,i);void 0!==e&&(t.exports=e)},925:(t,e,i)=>{i=[i,e,i(685)],e=function(t,e,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LeaderboardPopUp=void 0;class x{static showPopup(t,e,i){const n=document.createElement("div"),r=(n.id="prompt-container",n.className="modal",n.style.display="block",n.style.top="10%",document.body.appendChild(n),document.createElement("div")),s=(r.className="modal-dialog",r.style.maxWidth="350px",n.appendChild(r),document.createElement("div")),o=(s.className="modal-content",r.appendChild(s),document.createElement("div")),a=(o.className="modal-header",s.appendChild(o),document.createElement("h5")),h=(a.className="modal-title",a.innerText=v.LocalizationManager.getValue("leaderboard"),a.style.display="flex",a.style.justifyContent="center",o.appendChild(a),document.createElement("button")),l=(h.className="btn-close",h.ariaLabel="Close",o.appendChild(h),h.onclick=()=>{i(),x.hidePopup()},document.createElement("div")),c=(l.style.height="20px",s.appendChild(l),document.createElement("h5")),u=(c.className="modal-title text-muted",c.innerText=v.LocalizationManager.getValue("your_score"),c.style.display="flex",c.style.justifyContent="center",s.appendChild(c),document.createElement("h6")),d=(u.className="modal-title text-muted",u.innerText=t.toString(),u.style.display="flex",u.style.justifyContent="center",u.style.marginBottom="20px",s.appendChild(u),document.createElement("div")),p=(d.className="text-center",s.appendChild(d),document.createElement("img")),f=(p.className="rounded",p.src="assets/images/leaderboard.png",p.style.width="50px",p.style.height="50px",d.appendChild(p),document.createElement("div")),g=(f.className="modal-title",f.innerText=v.LocalizationManager.getValue("ask_submit"),f.style.display="flex",f.style.justifyContent="center",f.style.padding="20px",f.style.textAlign="center",s.appendChild(f),document.createElement("h5")),m=(g.className="modal-footer",g.style.flexDirection="column",s.appendChild(g),document.createElement("button")),y=(m.className="btn btn-success btn-large",m.ariaLabel="Submit",m.innerText=v.LocalizationManager.getValue("submit"),m.style.width="110px",g.appendChild(m),m.onclick=()=>{e(),x.hidePopup()},document.createElement("button"));y.className="btn btn-danger btn-large",y.ariaLabel="No thanks",y.innerText=v.LocalizationManager.getValue("no_thanks"),y.style.width="110px",g.appendChild(y),y.onclick=()=>{i(),x.hidePopup()}}static hidePopup(){const t=document.getElementById("prompt-container");t.querySelectorAll("*").forEach(t=>t.remove()),t.remove()}}e.LeaderboardPopUp=x}.apply(e,i);void 0!==e&&(t.exports=e)},685:function(t,e,i){var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},i=[i,e,i(986)],e=function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LocalizationManager=void 0,i=n(i);e.LocalizationManager=class{static init(){i.default.init({lng:"en",debug:!1,resources:{en:{translation:{ask_submit:"Would you like to login and submit your score?",no_thanks:"No thanks",submit:"Submit",your_score:"Your Score",leaderboard:"Leaderboard",enjoy_game:"Enjoying this game?",do_review:"Why not log in and share your love with a review?",rate_now:"Rate Now!"}},ru:{translation:{ask_submit:"Вы хотите авторизоваться, чтобы отправить рекорд?",no_thanks:"Нет",submit:"Отправить",your_score:"ОЧКИ",leaderboard:"РЕЙТИНГИ",enjoy_game:"Нравится игра?",do_review:"Не хотите авторизоваться, чтобы поделиться своим мнением?",rate_now:"Написать отзыв!"}}}}).then(()=>{let t=navigator.language;-1!==t.indexOf("-")&&(t=t.split("-")[0]),-1===["ru","en"].indexOf(t)&&(t="en"),i.default.changeLanguage(t)})}static getValue(t){return i.default.t(t)}}}.apply(e,i);void 0!==e&&(t.exports=e)},601:(t,e,i)=>{i=[i,e,i(685)],e=function(t,e,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RatingPopUp=void 0;class m{static showPopup(t,e){const i=document.createElement("div"),n=(i.id="prompt-container",i.className="modal",i.style.display="block",i.style.top="10%",document.body.appendChild(i),document.createElement("div")),r=(n.className="modal-dialog",n.style.maxWidth="350px",i.appendChild(n),document.createElement("div")),s=(r.className="modal-content",n.appendChild(r),document.createElement("div")),o=(s.className="modal-header",r.appendChild(s),document.createElement("h5")),a=(o.className="modal-title",o.innerText=g.LocalizationManager.getValue("enjoy_game"),o.style.display="flex",o.style.justifyContent="center",s.appendChild(o),document.createElement("button")),h=(a.className="btn-close",a.ariaLabel="Close",s.appendChild(a),a.onclick=()=>{e(),m.hidePopup()},document.createElement("div")),l=(h.style.height="20px",r.appendChild(h),document.createElement("div")),c=(l.className="text-center",r.appendChild(l),document.createElement("img")),u=(c.className="rounded",c.src="assets/images/happy.png",l.appendChild(c),document.createElement("div")),d=(u.className="modal-title",u.innerText=g.LocalizationManager.getValue("do_review"),u.style.display="flex",u.style.justifyContent="center",u.style.textAlign="center",u.style.padding="20px",r.appendChild(u),document.createElement("h5")),p=(d.className="modal-footer",d.style.flexDirection="column",r.appendChild(d),document.createElement("button")),f=(p.className="btn btn-success btn-large",p.ariaLabel="Rate Now!",p.innerText=g.LocalizationManager.getValue("rate_now"),p.style.width="150px",d.appendChild(p),p.onclick=()=>{t(),m.hidePopup()},document.createElement("button"));f.className="btn btn-danger btn-large",f.ariaLabel="No thanks",f.innerText=g.LocalizationManager.getValue("no_thanks"),f.style.width="150px",d.appendChild(f),f.onclick=()=>{e(),m.hidePopup()}}static hidePopup(){const t=document.getElementById("prompt-container");t.querySelectorAll("*").forEach(t=>t.remove()),t.remove()}}e.RatingPopUp=m}.apply(e,i);void 0!==e&&(t.exports=e)},65:(t,e,i)=>{i=[i,e,i(710),i(639),i(712),i(925),i(685),i(39)],e=function(t,e,i,n,r,s,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Wrapper=void 0;class a{static init(t,e){if(a.client)throw new Error("Feedback client already initialized");switch(t){case"mock":a.client=new i.MockFeedbackClient(e);break;case"yandex":a.client=new n.YandexFeedbackClient(e);break;default:a.client=new r.DummyFeedbackClient(e)}o.LocalizationManager.init()}static startReview(t){this.client.startReview(t)}static setLeaderboardScore(t,e){s.LeaderboardPopUp.showPopup(t,()=>{this.client.setLeaderboardScore(t,e)},()=>{e()})}}(e.Wrapper=a).client=null}.apply(e,i);void 0!==e&&(t.exports=e)},204:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%27-4 -4 8 8%27%3e%3ccircle r=%272%27 fill=%27%23fff%27/%3e%3c/svg%3e"},609:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%27-4 -4 8 8%27%3e%3ccircle r=%273%27 fill=%27%2386b7fe%27/%3e%3c/svg%3e"},469:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%27-4 -4 8 8%27%3e%3ccircle r=%273%27 fill=%27%23fff%27/%3e%3c/svg%3e"},486:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%27-4 -4 8 8%27%3e%3ccircle r=%273%27 fill=%27rgba%280, 0, 0, 0.25%29%27/%3e%3c/svg%3e"},144:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 12 12%27 width=%2712%27 height=%2712%27 fill=%27none%27 stroke=%27%23dc3545%27%3e%3ccircle cx=%276%27 cy=%276%27 r=%274.5%27/%3e%3cpath stroke-linejoin=%27round%27 d=%27M5.8 3.6h.4L6 6.5z%27/%3e%3ccircle cx=%276%27 cy=%278.2%27 r=%27.6%27 fill=%27%23dc3545%27 stroke=%27none%27/%3e%3c/svg%3e"},175:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%23000%27%3e%3cpath d=%27M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z%27/%3e%3c/svg%3e"},740:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%230c63e4%27%3e%3cpath fill-rule=%27evenodd%27 d=%27M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z%27/%3e%3c/svg%3e"},460:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%23212529%27%3e%3cpath fill-rule=%27evenodd%27 d=%27M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z%27/%3e%3c/svg%3e"},647:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%23fff%27%3e%3cpath d=%27M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z%27/%3e%3c/svg%3e"},692:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%23fff%27%3e%3cpath d=%27M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z%27/%3e%3c/svg%3e"},214:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27%3e%3cpath fill=%27none%27 stroke=%27%23343a40%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%272%27 d=%27M2 5l6 6 6-6%27/%3e%3c/svg%3e"},931:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 20 20%27%3e%3cpath fill=%27none%27 stroke=%27%23fff%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%273%27 d=%27M6 10h8%27/%3e%3c/svg%3e"},349:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 20 20%27%3e%3cpath fill=%27none%27 stroke=%27%23fff%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%273%27 d=%27M6 10l3 3l6-6%27/%3e%3c/svg%3e"},217:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 30 30%27%3e%3cpath stroke=%27rgba%280, 0, 0, 0.55%29%27 stroke-linecap=%27round%27 stroke-miterlimit=%2710%27 stroke-width=%272%27 d=%27M4 7h22M4 15h22M4 23h22%27/%3e%3c/svg%3e"},956:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 30 30%27%3e%3cpath stroke=%27rgba%28255, 255, 255, 0.55%29%27 stroke-linecap=%27round%27 stroke-miterlimit=%2710%27 stroke-width=%272%27 d=%27M4 7h22M4 15h22M4 23h22%27/%3e%3c/svg%3e"},819:t=>{"use strict";t.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 8 8%27%3e%3cpath fill=%27%23198754%27 d=%27M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z%27/%3e%3c/svg%3e"}},n={};function r(t){var e=n[t];return void 0!==e||(e=n[t]={id:t,exports:{}},i[t].call(e.exports,e,e.exports,r)),e.exports}r.m=i,r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var i in e)r.o(e,i)&&!r.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.b=document.baseURI||self.location.href;var t=r(65);self._azFeedback=t})(),window.SpinePlugin=function(i){var n={};function r(t){var e;return(n[t]||(e=n[t]={i:t,l:!1,exports:{}},i[t].call(e.exports,e,e.exports,r),e.l=!0,e)).exports}return r.m=i,r.c=n,r.d=function(t,e,i){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(i,n,function(t){return e[t]}.bind(null,n));return i},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=63)}([function(t,e){function s(t,e,i,n){for(var r in e)if(e.hasOwnProperty(r)){a=r,h=void 0,h=(o=i)?e[a]:Object.getOwnPropertyDescriptor(e,a);o=!(!(h=!o&&h.value&&"object"==typeof h.value?h.value:h)||!((a=h).get&&"function"==typeof a.get||a.set&&"function"==typeof a.set))&&(void 0===h.enumerable&&(h.enumerable=!0),void 0===h.configurable&&(h.configurable=!0),h);if(!1!==o){if(a=(n||t).prototype,h=r,s=void 0,(s=Object.getOwnPropertyDescriptor(a,h))&&!1===(s=s.value&&"object"==typeof s.value?s.value:s).configurable){if(l.ignoreFinals)continue;throw new Error("cannot override final property '"+r+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(t.prototype,r,o)}else t.prototype[r]=e[r]}var s,o,a,h}function o(t,e){if(e){Array.isArray(e)||(e=[e]);for(var i=0;i<e.length;i++)s(t,e[i].prototype||e[i])}}function l(t){var e,i,n;if((t=t||{}).initialize){if("function"!=typeof t.initialize)throw new Error("initialize must be a function");n=t.initialize,delete t.initialize}else n=t.Extends?(i=t.Extends,function(){i.apply(this,arguments)}):function(){};t.Extends?(n.prototype=Object.create(t.Extends.prototype),n.prototype.constructor=n,e=t.Extends,delete t.Extends):n.prototype.constructor=n;var r=null;return t.Mixins&&(r=t.Mixins,delete t.Mixins),o(n,r),s(n,t,!0,e),n}l.extend=s,l.mixin=o,l.ignoreFinals=!1,t.exports=l},function(t,e){t.exports=function(){}},function(t,e,i){var n=i(0),r=i(32),s=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 s(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)},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 r(this.x,t.x,e)&&r(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,t=t.y-this.y;return Math.sqrt(e*e+t*t)},distanceSq:function(t){var e=t.x-this.x,t=t.y-this.y;return e*e+t*t},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 0<i&&(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){var i=this.x,n=this.y;return this.x=i+(e=void 0===e?0:e)*(t.x-i),this.y=n+e*(t.y-n),this},transformMat3:function(t){var e=this.x,i=this.y,t=t.val;return this.x=t[0]*e+t[3]*i+t[6],this.y=t[1]*e+t[4]*i+t[7],this},transformMat4:function(t){var e=this.x,i=this.y,t=t.val;return this.x=t[0]*e+t[4]*i+t[12],this.y=t[1]*e+t[5]*i+t[13],this},reset:function(){return this.x=0,this.y=0,this},limit:function(t){var e=this.length();return e&&t<e&&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),t=Math.sin(t);return this.set(e*this.x-t*this.y,t*this.x+e*this.y)}});s.ZERO=new s,s.RIGHT=new s(1,0),s.LEFT=new s(-1,0),s.UP=new s(0,-1),s.DOWN=new s(0,1),s.ONE=new s(1,1),t.exports=s},function(t,e){t.exports=function(t,e,i){return Math.max(e,Math.min(i,t))}},function(t,e){var i={PI2:2*Math.PI,TAU:.5*Math.PI,EPSILON:1e-6,DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,RND:null,MIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER||-9007199254740991,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991};t.exports=i},function(t,e){t.exports=function(t,e,i,n){t=t.length;if(e<0||t<e||i<=e||t<i||t<e+i){if(n)throw new Error("Range Error: Values outside acceptable range");return!1}return!0}},function(t,e){t.exports=function(t,e,i){i-=e;return e+((t-e)%i+i)%i}},function(t,e){t.exports=function(t){if("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}},function(t,e,i){var n=i(4);t.exports=function(t){return t>Math.PI&&(t-=n.PI2),Math.abs(((t+n.TAU)%n.PI2-n.PI2)%n.PI2)}},function(t,e,i){var n=i(4);t.exports=function(t){return t*n.RAD_TO_DEG}},function(t,e){t.exports=function(t,e,i){if(t&&"number"!=typeof t){if(t.hasOwnProperty(e))return t[e];if(-1===e.indexOf("."))return i;for(var n=e.split("."),r=t,s=i,o=0;o<n.length;o++){if(!r.hasOwnProperty(n[o])){s=i;break}s=r[n[o]],r=r[n[o]]}return s}return i}},function(t,e){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}},function(t,e){t.exports=function(t,e){if(!(e>=t.length)){for(var i=t.length-1,n=t[e],r=e;r<i;r++)t[r]=t[r+1];return t.length=i,n}}},function(t,e,i){var n=i(0),r=i(26),i=new n({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=t),this.type=r.POINT,this.x=t,this.y=e},setTo:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.x=t,this.y=e,this}});t.exports=i},function(t,e,i){var n=new(i(0))({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},crossVectors:function(t,e){var i=t.x,n=t.y,t=t.z,r=e.x,s=e.y,e=e.z;return this.x=n*e-t*s,this.y=t*r-i*e,this.z=i*s-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 this.x=t[e=void 0===e?0: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,t=t.z-this.z||0;return Math.sqrt(e*e+i*i+t*t)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,t=t.z-this.z||0;return e*e+i*i+t*t},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 0<n&&(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,r=t.x,s=t.y,t=t.z;return this.x=i*t-n*s,this.y=n*r-e*t,this.z=e*s-i*r,this},lerp:function(t,e){var i=this.x,n=this.y,r=this.z;return this.x=i+(e=void 0===e?0:e)*(t.x-i),this.y=n+e*(t.y-n),this.z=r+e*(t.z-r),this},applyMatrix3:function(t){var e=this.x,i=this.y,n=this.z,t=t.val;return this.x=t[0]*e+t[3]*i+t[6]*n,this.y=t[1]*e+t[4]*i+t[7]*n,this.z=t[2]*e+t[5]*i+t[8]*n,this},applyMatrix4:function(t){var e=this.x,i=this.y,n=this.z,t=t.val,r=1/(t[3]*e+t[7]*i+t[11]*n+t[15]);return this.x=(t[0]*e+t[4]*i+t[8]*n+t[12])*r,this.y=(t[1]*e+t[5]*i+t[9]*n+t[13])*r,this.z=(t[2]*e+t[6]*i+t[10]*n+t[14])*r,this},transformMat3:function(t){var e=this.x,i=this.y,n=this.z,t=t.val;return this.x=e*t[0]+i*t[3]+n*t[6],this.y=e*t[1]+i*t[4]+n*t[7],this.z=e*t[2]+i*t[5]+n*t[8],this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,t=t.val;return this.x=t[0]*e+t[4]*i+t[8]*n+t[12],this.y=t[1]*e+t[5]*i+t[9]*n+t[13],this.z=t[2]*e+t[6]*i+t[10]*n+t[14],this},transformCoordinates:function(t){var e=this.x,i=this.y,n=this.z,t=t.val,r=e*t[0]+i*t[4]+n*t[8]+t[12],s=e*t[1]+i*t[5]+n*t[9]+t[13],o=e*t[2]+i*t[6]+n*t[10]+t[14],e=e*t[3]+i*t[7]+n*t[11]+t[15];return this.x=r/e,this.y=s/e,this.z=o/e,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,r=t.x,s=t.y,o=t.z,t=t.w,a=t*e+s*n-o*i,h=t*i+o*e-r*n,l=t*n+r*i-s*e,e=-r*e-s*i-o*n;return this.x=a*t+e*-r+h*-o-l*-s,this.y=h*t+e*-s+l*-r-a*-o,this.z=l*t+e*-o+a*-s-h*-r,this},project:function(t){var e=this.x,i=this.y,n=this.z,t=t.val,r=t[0],s=t[1],o=t[2],a=t[3],h=t[4],l=t[5],c=t[6],u=t[7],d=t[8],p=t[9],f=t[10],g=t[11],m=t[12],y=t[13],v=t[14],a=1/(e*a+i*u+n*g+t[15]);return this.x=(e*r+i*h+n*d+m)*a,this.y=(e*s+i*l+n*p+y)*a,this.z=(e*o+i*c+n*f+v)*a,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,r=t.z,t=t.w,i=this.x-i,n=t-this.y-1-n,s=this.z;return this.x=2*i/r-1,this.y=2*n/t-1,this.z=2*s-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},function(t,e){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}},function(t,e,i){var n=i(24),r=i(57);t.exports=function(t,e){if(void 0===e&&(e=90),!n(t))return null;if(90===(e="string"!=typeof e?(e%360+360)%360:e)||-270===e||"rotateLeft"===e)(t=r(t)).reverse();else if(-90===e||270===e||"rotateRight"===e)t.reverse(),t=r(t);else if(180===Math.abs(e)||"rotate180"===e){for(var i=0;i<t.length;i++)t[i].reverse();t.reverse()}return t}},function(t,e){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}},function(t,e){t.exports=function(t,e){return Math.random()*(e-t)+t}},function(t,e,i){var n=i(4);t.exports=function(t){return t*n.DEG_TO_RAD}},function(t,e,i){var n=i(0),i=i(14),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,r,s,o,a,h,l,c,u,d,p,f,g){var m=this.val;return m[0]=t,m[1]=e,m[2]=i,m[3]=n,m[4]=r,m[5]=s,m[6]=o,m[7]=a,m[8]=h,m[9]=l,m[10]=c,m[11]=u,m[12]=d,m[13]=p,m[14]=f,m[15]=g,this},copy:function(t){t=t.val;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])},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 i=a.fromQuat(i).val,n=e.x,r=e.y,e=e.z;return this.setValues(i[0]*n,i[1]*n,i[2]*n,0,i[4]*r,i[5]*r,i[6]*r,0,i[8]*e,i[9]*e,i[10]*e,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],r=t[6],s=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]=r,t[11]=t[14],t[12]=n,t[13]=s,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],r=t[3],s=t[4],o=t[5],a=t[6],h=t[7],l=t[8],c=t[9],u=t[10],d=t[11],p=t[12],f=t[13],g=t[14],t=t[15],m=e*o-i*s,y=e*a-n*s,v=e*h-r*s,x=i*a-n*o,b=i*h-r*o,w=n*h-r*a,T=l*f-c*p,S=l*g-u*p,P=l*t-d*p,_=c*g-u*f,E=c*t-d*f,A=u*t-d*g,M=m*A-y*E+v*_+x*P-b*S+w*T;return M?this.setValues((o*A-a*E+h*_)*(M=1/M),(n*E-i*A-r*_)*M,(f*w-g*b+t*x)*M,(u*b-c*w-d*x)*M,(a*P-s*A-h*S)*M,(e*A-n*P+r*S)*M,(g*v-p*w-t*y)*M,(l*w-u*v+d*y)*M,(s*E-o*P+h*T)*M,(i*P-e*E-r*T)*M,(p*b-f*v+t*m)*M,(c*v-l*b-d*m)*M,(o*S-s*_-a*T)*M,(e*_-i*S+n*T)*M,(f*y-p*x-g*m)*M,(l*x-c*y+u*m)*M):this},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=t[2],r=t[3],s=t[4],o=t[5],a=t[6],h=t[7],l=t[8],c=t[9],u=t[10],d=t[11],p=t[12],f=t[13],g=t[14],t=t[15];return this.setValues(o*(u*t-d*g)-c*(a*t-h*g)+f*(a*d-h*u),-(i*(u*t-d*g)-c*(n*t-r*g)+f*(n*d-r*u)),i*(a*t-h*g)-o*(n*t-r*g)+f*(n*h-r*a),-(i*(a*d-h*u)-o*(n*d-r*u)+c*(n*h-r*a)),-(s*(u*t-d*g)-l*(a*t-h*g)+p*(a*d-h*u)),e*(u*t-d*g)-l*(n*t-r*g)+p*(n*d-r*u),-(e*(a*t-h*g)-s*(n*t-r*g)+p*(n*h-r*a)),e*(a*d-h*u)-s*(n*d-r*u)+l*(n*h-r*a),s*(c*t-d*f)-l*(o*t-h*f)+p*(o*d-h*c),-(e*(c*t-d*f)-l*(i*t-r*f)+p*(i*d-r*c)),e*(o*t-h*f)-s*(i*t-r*f)+p*(i*h-r*o),-(e*(o*d-h*c)-s*(i*d-r*c)+l*(i*h-r*o)),-(s*(c*g-u*f)-l*(o*g-a*f)+p*(o*u-a*c)),e*(c*g-u*f)-l*(i*g-n*f)+p*(i*u-n*c),-(e*(o*g-a*f)-s*(i*g-n*f)+p*(i*a-n*o)),e*(o*u-a*c)-s*(i*u-n*c)+l*(i*a-n*o))},determinant:function(){var t=this.val,e=t[0],i=t[1],n=t[2],r=t[3],s=t[4],o=t[5],a=t[6],h=t[7],l=t[8],c=t[9],u=t[10],d=t[11],p=t[12],f=t[13],g=t[14],t=t[15];return(e*o-i*s)*(u*t-d*g)-(e*a-n*s)*(c*t-d*f)+(e*h-r*s)*(c*g-u*f)+(i*a-n*o)*(l*t-d*p)-(i*h-r*o)*(l*g-u*p)+(n*h-r*a)*(l*f-c*p)},multiply:function(t){var e=this.val,i=e[0],n=e[1],r=e[2],s=e[3],o=e[4],a=e[5],h=e[6],l=e[7],c=e[8],u=e[9],d=e[10],p=e[11],f=e[12],g=e[13],m=e[14],y=e[15],t=t.val,v=t[0],x=t[1],b=t[2],w=t[3];return e[0]=v*i+x*o+b*c+w*f,e[1]=v*n+x*a+b*u+w*g,e[2]=v*r+x*h+b*d+w*m,e[3]=v*s+x*l+b*p+w*y,v=t[4],x=t[5],b=t[6],w=t[7],e[4]=v*i+x*o+b*c+w*f,e[5]=v*n+x*a+b*u+w*g,e[6]=v*r+x*h+b*d+w*m,e[7]=v*s+x*l+b*p+w*y,v=t[8],x=t[9],b=t[10],w=t[11],e[8]=v*i+x*o+b*c+w*f,e[9]=v*n+x*a+b*u+w*g,e[10]=v*r+x*h+b*d+w*m,e[11]=v*s+x*l+b*p+w*y,v=t[12],x=t[13],b=t[14],w=t[15],e[12]=v*i+x*o+b*c+w*f,e[13]=v*n+x*a+b*u+w*g,e[14]=v*r+x*h+b*d+w*m,e[15]=v*s+x*l+b*p+w*y,this},multiplyLocal:function(t){var e=this.val,t=t.val;return this.setValues(e[0]*t[0]+e[1]*t[4]+e[2]*t[8]+e[3]*t[12],e[0]*t[1]+e[1]*t[5]+e[2]*t[9]+e[3]*t[13],e[0]*t[2]+e[1]*t[6]+e[2]*t[10]+e[3]*t[14],e[0]*t[3]+e[1]*t[7]+e[2]*t[11]+e[3]*t[15],e[4]*t[0]+e[5]*t[4]+e[6]*t[8]+e[7]*t[12],e[4]*t[1]+e[5]*t[5]+e[6]*t[9]+e[7]*t[13],e[4]*t[2]+e[5]*t[6]+e[6]*t[10]+e[7]*t[14],e[4]*t[3]+e[5]*t[7]+e[6]*t[11]+e[7]*t[15],e[8]*t[0]+e[9]*t[4]+e[10]*t[8]+e[11]*t[12],e[8]*t[1]+e[9]*t[5]+e[10]*t[9]+e[11]*t[13],e[8]*t[2]+e[9]*t[6]+e[10]*t[10]+e[11]*t[14],e[8]*t[3]+e[9]*t[7]+e[10]*t[11]+e[11]*t[15],e[12]*t[0]+e[13]*t[4]+e[14]*t[8]+e[15]*t[12],e[12]*t[1]+e[13]*t[5]+e[14]*t[9]+e[15]*t[13],e[12]*t[2]+e[13]*t[6]+e[14]*t[10]+e[15]*t[14],e[12]*t[3]+e[13]*t[7]+e[14]*t[11]+e[15]*t[15])},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var t=t.val,e=e.val,i=t[0],n=t[4],r=t[8],s=t[12],o=t[1],a=t[5],h=t[9],l=t[13],c=t[2],u=t[6],d=t[10],p=t[14],f=t[3],g=t[7],m=t[11],t=t[15],y=e[0],v=e[4],x=e[8],b=e[12],w=e[1],T=e[5],S=e[9],P=e[13],_=e[2],E=e[6],A=e[10],M=e[14],k=e[3],C=e[7],O=e[11],e=e[15];return this.setValues(i*y+n*w+r*_+s*k,o*y+a*w+h*_+l*k,c*y+u*w+d*_+p*k,f*y+g*w+m*_+t*k,i*v+n*T+r*E+s*C,o*v+a*T+h*E+l*C,c*v+u*T+d*E+p*C,f*v+g*T+m*E+t*C,i*x+n*S+r*A+s*O,o*x+a*S+h*A+l*O,c*x+u*S+d*A+p*O,f*x+g*S+m*A+t*O,i*b+n*P+r*M+s*e,o*b+a*P+h*M+l*e,c*b+u*P+d*M+p*e,f*b+g*P+m*M+t*e)},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),e=Math.sin(e),n=1-i,r=t.x,s=t.y,t=t.z,o=n*r,a=n*s;return this.setValues(o*r+i,o*s-e*t,o*t+e*s,0,o*s+e*t,a*s+i,a*t-e*r,0,o*t-e*s,a*t+e*r,n*t*t+i,0,0,0,0,1)},rotate:function(t,e){var i=this.val,n=e.x,r=e.y,e=e.z,s=Math.sqrt(n*n+r*r+e*e);if(Math.abs(s)<1e-6)return this;n*=s=1/s,r*=s,e*=s;var s=Math.sin(t),t=Math.cos(t),o=1-t,a=i[0],h=i[1],l=i[2],c=i[3],u=i[4],d=i[5],p=i[6],f=i[7],g=i[8],m=i[9],y=i[10],v=i[11],x=i[12],b=i[13],w=i[14],i=i[15],T=n*n*o+t,S=r*n*o+e*s,P=e*n*o-r*s,_=n*r*o-e*s,E=r*r*o+t,A=e*r*o+n*s,M=n*e*o+r*s,r=r*e*o-n*s,n=e*e*o+t;return this.setValues(a*T+u*S+g*P,h*T+d*S+m*P,l*T+p*S+y*P,c*T+f*S+v*P,a*_+u*E+g*A,h*_+d*E+m*A,l*_+p*E+y*A,c*_+f*E+v*A,a*M+u*r+g*n,h*M+d*r+m*n,l*M+p*r+y*n,c*M+f*r+v*n,x,b,w,i)},rotateX:function(t){var e=this.val,i=Math.sin(t),t=Math.cos(t),n=e[4],r=e[5],s=e[6],o=e[7],a=e[8],h=e[9],l=e[10],c=e[11];return e[4]=n*t+a*i,e[5]=r*t+h*i,e[6]=s*t+l*i,e[7]=o*t+c*i,e[8]=a*t-n*i,e[9]=h*t-r*i,e[10]=l*t-s*i,e[11]=c*t-o*i,this},rotateY:function(t){var e=this.val,i=Math.sin(t),t=Math.cos(t),n=e[0],r=e[1],s=e[2],o=e[3],a=e[8],h=e[9],l=e[10],c=e[11];return e[0]=n*t-a*i,e[1]=r*t-h*i,e[2]=s*t-l*i,e[3]=o*t-c*i,e[8]=n*i+a*t,e[9]=r*i+h*t,e[10]=s*i+l*t,e[11]=o*i+c*t,this},rotateZ:function(t){var e=this.val,i=Math.sin(t),t=Math.cos(t),n=e[0],r=e[1],s=e[2],o=e[3],a=e[4],h=e[5],l=e[6],c=e[7];return e[0]=n*t+a*i,e[1]=r*t+h*i,e[2]=s*t+l*i,e[3]=o*t+c*i,e[4]=a*t-n*i,e[5]=h*t-r*i,e[6]=l*t-s*i,e[7]=c*t-o*i,this},fromRotationTranslation:function(t,e){var i=t.x,n=t.y,r=t.z,t=t.w,s=i+i,o=n+n,a=r+r,h=i*s,l=i*o,i=i*a,c=n*o,n=n*a,r=r*a,s=t*s,o=t*o,t=t*a;return this.setValues(1-(c+r),l+t,i-o,0,l-t,1-(h+r),n+s,0,i+o,n-s,1-(h+c),0,e.x,e.y,e.z,1)},fromQuat:function(t){var e=t.x,i=t.y,n=t.z,t=t.w,r=e+e,s=i+i,o=n+n,a=e*r,h=e*s,e=e*o,l=i*s,i=i*o,n=n*o,r=t*r,s=t*s,t=t*o;return this.setValues(1-(l+n),h+t,e-s,0,h-t,1-(a+n),i+r,0,e+s,i-r,1-(a+l),0,0,0,0,1)},frustum:function(t,e,i,n,r,s){var o=1/(e-t),a=1/(n-i),h=1/(r-s);return this.setValues(2*r*o,0,0,0,0,2*r*a,0,0,(e+t)*o,(n+i)*a,(s+r)*h,-1,0,0,s*r*2*h,0)},perspective:function(t,e,i,n){var t=1/Math.tan(t/2),r=1/(i-n);return this.setValues(t/e,0,0,0,0,t,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,r,s){var o=0==(o=t-e)?o:1/o,a=0==(a=i-n)?a:1/a,h=0==(h=r-s)?h:1/h;return this.setValues(-2*o,0,0,0,0,-2*a,0,0,0,0,2*h,0,(t+e)*o,(n+i)*a,(s+r)*h,1)},lookAtRH:function(t,e,i){var n=this.val;return l.subVectors(t,e),0===l.getLengthSquared()&&(l.z=1),l.normalize(),s.crossVectors(i,l),0===s.getLengthSquared()&&(1===Math.abs(i.z)?l.x+=1e-4:l.z+=1e-4,l.normalize(),s.crossVectors(i,l)),s.normalize(),o.crossVectors(l,s),n[0]=s.x,n[1]=s.y,n[2]=s.z,n[4]=o.x,n[5]=o.y,n[6]=o.z,n[8]=l.x,n[9]=l.y,n[10]=l.z,this},lookAt:function(t,e,i){var n,r,s,o,a=t.x,h=t.y,t=t.z,l=i.x,c=i.y,i=i.z,u=e.x,d=e.y,e=e.z;return Math.abs(a-u)<1e-6&&Math.abs(h-d)<1e-6&&Math.abs(t-e)<1e-6?this.identity():(u=a-u,d=h-d,e=t-e,r=c*(e*=n=1/Math.sqrt(u*u+d*d+e*e))-i*(d*=n),i=i*(u*=n)-l*e,l=l*d-c*u,(n=Math.sqrt(r*r+i*i+l*l))?(r*=n=1/n,i*=n,l*=n):l=i=r=0,c=d*l-e*i,s=e*r-u*l,o=u*i-d*r,(n=Math.sqrt(c*c+s*s+o*o))?(c*=n=1/n,s*=n,o*=n):o=s=c=0,this.setValues(r,c,u,0,i,s,d,0,l,o,e,0,-(r*a+i*h+l*t),-(c*a+s*h+o*t),-(u*a+d*h+e*t),1))},yawPitchRoll:function(t,e,i){this.zero(),a.zero(),h.zero();var n=this.val,r=a.val,s=h.val,o=Math.sin(i),i=Math.cos(i);return n[10]=1,n[15]=1,n[0]=i,n[1]=o,n[4]=-o,n[5]=i,o=Math.sin(e),i=Math.cos(e),r[0]=1,r[15]=1,r[5]=i,r[10]=i,r[9]=-o,r[6]=o,o=Math.sin(t),i=Math.cos(t),s[5]=1,s[15]=1,s[0]=i,s[2]=-o,s[8]=o,s[10]=i,this.multiplyLocal(a),this.multiplyLocal(h),this},setWorldMatrix:function(t,e,i,n,r){return this.yawPitchRoll(t.y,t.x,t.z),a.scaling(i.x,i.y,i.z),h.xyz(e.x,e.y,e.z),this.multiplyLocal(a),this.multiplyLocal(h),n&&this.multiplyLocal(n),r&&this.multiplyLocal(r),this},multiplyToMat4:function(t,e){var i=this.val,t=t.val,n=i[0],r=i[1],s=i[2],o=i[3],a=i[4],h=i[5],l=i[6],c=i[7],u=i[8],d=i[9],p=i[10],f=i[11],g=i[12],m=i[13],y=i[14],i=i[15],v=t[0],x=t[1],b=t[2],w=t[3],T=t[4],S=t[5],P=t[6],_=t[7],E=t[8],A=t[9],M=t[10],k=t[11],C=t[12],O=t[13],R=t[14],t=t[15];return e.setValues(v*n+x*a+b*u+w*g,x*r+x*h+b*d+w*m,b*s+x*l+b*p+w*y,w*o+x*c+b*f+w*i,T*n+S*a+P*u+_*g,T*r+S*h+P*d+_*m,T*s+S*l+P*p+_*y,T*o+S*c+P*f+_*i,E*n+A*a+M*u+k*g,E*r+A*h+M*d+k*m,E*s+A*l+M*p+k*y,E*o+A*c+M*f+k*i,C*n+O*a+R*u+t*g,C*r+O*h+R*d+t*m,C*s+O*l+R*p+t*y,C*o+O*c+R*f+t*i)},fromRotationXYTranslation:function(t,e,i){var n=e.x,r=e.y,e=e.z,s=Math.sin(t.x),o=Math.cos(t.x),a=Math.sin(t.y),t=Math.cos(t.y),h=n,l=r,c=e,u=-s,d=0-u*a,p=0-o*a,u=u*t,f=o*t;return i||(h=t*n+a*e,l=d*n+o*r+u*e,c=p*n+s*r+f*e),this.setValues(t,d,p,0,0,o,s,0,a,u,f,0,h,l,c,1)},getMaxScaleOnAxis:function(){var t=this.val,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],i=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],t=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,i,t))}}),a=new r,h=new r,s=new i,o=new i,l=new i;t.exports=r},function(t,e,i){var n=i(0),r=i(15),s=i(205),o=i(11),a=i(216),h=i(45),l=i(217),c=i(46),i=new n({initialize:function(t,e){this.loader=t,this.cache=o(e,"cache",!1),this.type=o(e,"type",!1),this.key=o(e,"key",!1);var i=this.key;if(t.prefix&&""!==t.prefix&&(this.key=t.prefix+i),!this.type||!this.key)throw new Error("Invalid Loader."+this.type+" key");var n=o(e,"url");void 0===n?n=t.path+i+"."+o(e,"extension",""):"string"!=typeof n||n.match(/^(?:blob:|data:|http:\/\/|https:\/\/|\/\/)/)||(n=t.path+n),this.url=n,this.src="",this.xhrSettings=c(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?r.FILE_POPULATED:r.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},setLink:function(t){(this.linkFile=t).linkFile=this},resetXHR:function(){this.xhrLoader&&(this.xhrLoader.onload=void 0,this.xhrLoader.onerror=void 0,this.xhrLoader.onprogress=void 0)},load:function(){this.state===r.FILE_POPULATED?this.loader.nextFile(this,!0):(this.state=r.FILE_LOADING,this.src=a(this,this.loader.baseURL),0!==this.src.indexOf("data:")&&(this.xhrLoader=l(this,this.loader.xhr)))},onLoad:function(t,e){var i=t.responseURL&&0===t.responseURL.indexOf("file://")&&0===e.target.status,e=!(e.target&&200!==e.target.status)||i;4===t.readyState&&400<=t.status&&t.status<=599&&(e=!1),this.state=r.FILE_LOADED,this.resetXHR(),this.loader.nextFile(this,e)},onError:function(){this.resetXHR(),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(s.FILE_PROGRESS,this,this.percentComplete))},onProcess:function(){this.state=r.FILE_PROCESSING,this.onProcessComplete()},onProcessComplete:function(){this.state=r.FILE_COMPLETE,this.multiFile&&this.multiFile.onFileComplete(this),this.loader.fileProcessComplete(this)},onProcessError:function(){this.state=r.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.cache.add(this.key,this.data),this.pendingDestroy()},pendingDestroy:function(t){void 0===t&&(t=this.data);var e=this.key,i=this.type;this.loader.emit(s.FILE_COMPLETE,e,i,t),this.loader.emit(s.FILE_KEY_COMPLETE+i+"-"+e,e,i,t),this.loader.flagForRemoval(this)},destroy:function(){this.loader=null,this.cache=null,this.xhrSettings=null,this.multiFile=null,this.linkFile=null,this.data=null}});i.createObjectURL=function(t,e,i){var n;"function"==typeof URL?t.src=URL.createObjectURL(e):((n=new FileReader).onload=function(){t.removeAttribute("crossOrigin"),t.src="data:"+(e.type||i)+";base64,"+n.result.split(",")[1]},n.onerror=t.onerror,n.readAsDataURL(e))},i.revokeObjectURL=function(t){"function"==typeof URL&&URL.revokeObjectURL(t.src)},t.exports=i},function(t,e){var i={};t.exports={install:function(t){for(var e in i)t[e]=i[e]},register:function(t,e){i[t]=e},destroy:function(){i={}}}},function(t,e,i){var n=i(0),r=i(4),c=i(2),i=new n({initialize:function(t,e,i,n,r,s){void 0===t&&(t=1),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=1),void 0===r&&(r=0),void 0===s&&(s=0),this.matrix=new Float32Array([t,e,i,n,r,s,0,0,1]),this.decomposedMatrix={translateX:0,translateY:0,scaleX:1,scaleY:1,rotation:0}},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)*(Math.atan(-this.c/this.a)<0?-1:1)}},rotationNormalized:{get:function(){var t=this.matrix,e=t[0],i=t[1],n=t[2],t=t[3];return e||i?0<i?Math.acos(e/this.scaleX):-Math.acos(e/this.scaleX):n||t?r.TAU-(0<t?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),t=Math.cos(t),i=this.matrix,n=i[0],r=i[1],s=i[2],o=i[3];return i[0]=n*t+s*e,i[1]=r*t+o*e,i[2]=n*-e+s*t,i[3]=r*-e+o*t,this},multiply:function(t,e){var i=this.matrix,t=t.matrix,n=i[0],r=i[1],s=i[2],o=i[3],a=i[4],i=i[5],h=t[0],l=t[1],c=t[2],u=t[3],d=t[4],t=t[5],e=void 0===e?this:e;return e.a=h*n+l*s,e.b=h*r+l*o,e.c=c*n+u*s,e.d=c*r+u*o,e.e=d*n+t*s+a,e.f=d*r+t*o+i,e},multiplyWithOffset:function(t,e,i){var n=this.matrix,t=t.matrix,r=n[0],s=n[1],o=n[2],a=n[3],h=e*r+i*o+n[4],e=e*s+i*a+n[5],i=t[0],l=t[1],c=t[2],u=t[3],d=t[4],t=t[5];return n[0]=i*r+l*o,n[1]=i*s+l*a,n[2]=c*r+u*o,n[3]=c*s+u*a,n[4]=d*r+t*o+h,n[5]=d*s+t*a+e,this},transform:function(t,e,i,n,r,s){var o=this.matrix,a=o[0],h=o[1],l=o[2],c=o[3],u=o[4],d=o[5];return o[0]=t*a+e*l,o[1]=t*h+e*c,o[2]=i*a+n*l,o[3]=i*h+n*c,o[4]=r*a+s*l+u,o[5]=r*h+s*c+d,this},transformPoint:function(t,e,i){var n=this.matrix,r=n[0],s=n[1],o=n[2],a=n[3],h=n[4],n=n[5];return(i=void 0===i?{x:0,y:0}:i).x=t*r+e*o+h,i.y=t*s+e*a+n,i},invert:function(){var t=this.matrix,e=t[0],i=t[1],n=t[2],r=t[3],s=t[4],o=t[5],a=e*r-i*n;return t[0]=r/a,t[1]=-i/a,t[2]=-n/a,t[3]=e/a,t[4]=(n*o-r*s)/a,t[5]=-(e*o-i*s)/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},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){var e=this.matrix;return t.setTransform(e[0],e[1],e[2],e[3],e[4],e[5]),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,r,s){var o=this.matrix;return o[0]=t,o[1]=e,o[2]=i,o[3]=n,o[4]=r,o[5]=s,this},decomposeMatrix:function(){var t=this.decomposedMatrix,e=this.matrix,i=e[0],n=e[1],r=e[2],s=e[3],o=i*s-n*r;return t.translateX=e[4],t.translateY=e[5],i||n?(e=Math.sqrt(i*i+n*n),t.rotation=0<n?Math.acos(i/e):-Math.acos(i/e),t.scaleX=e,t.scaleY=o/e):r||s?(n=Math.sqrt(r*r+s*s),t.rotation=.5*Math.PI-(0<s?Math.acos(-r/n):-Math.acos(r/n)),t.scaleX=o/n,t.scaleY=n):(t.rotation=0,t.scaleX=0,t.scaleY=0),t},applyITRS:function(t,e,i,n,r){var s=this.matrix,o=Math.sin(i),i=Math.cos(i);return s[4]=t,s[5]=e,s[0]=i*n,s[1]=o*n,s[2]=-o*r,s[3]=i*r,this},applyInverse:function(t,e,i){void 0===i&&(i=new c);var n=this.matrix,r=n[0],s=n[1],o=n[2],a=n[3],h=n[4],n=n[5],l=1/(r*a+o*-s);return i.x=a*l*t+-o*l*e+(n*o-h*a)*l,i.y=r*l*e+-s*l*t+(-n*r+h*s)*l,i},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){t=this.getX(t,e);return t=i?Math.round(t):t},getYRound:function(t,e,i){t=this.getY(t,e);return t=i?Math.round(t):t},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.decomposedMatrix=null}});t.exports=i},function(t,e){t.exports=function(t){if(!Array.isArray(t)||t.length<2||!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}},function(t,e,i){var n=i(0),r=i(299),s=i(61),o=i(300),a=i(26),h=i(301),l=i(306),i=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 r(this,t,e)},getPoint:function(t,e){return s(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(t=void 0===t?new h:t).setTo(this.x,this.y,this.right,this.y),t},getLineB:function(t){return(t=void 0===t?new h:t).setTo(this.right,this.y,this.right,this.bottom),t},getLineC:function(t){return(t=void 0===t?new h:t).setTo(this.right,this.bottom,this.x,this.bottom),t},getLineD:function(t){return(t=void 0===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}}});t.exports=i},function(t,e){t.exports={CIRCLE:0,ELLIPSE:1,LINE:2,POINT:3,POLYGON:4,RECTANGLE:5,TRIANGLE:6}},function(t,e,i){function l(){var t,e,i,n,r,s=arguments[0]||{},o=1,a=arguments.length,h=!1;for("boolean"==typeof s&&(h=s,s=arguments[1]||{},o=2),a===o&&(s=this,--o);o<a;o++)if(null!=(t=arguments[o]))for(e in t)r=s[e],s!==(i=t[e])&&(h&&i&&(c(i)||(n=Array.isArray(i)))?(r=n?(n=!1,r&&Array.isArray(r)?r:[]):r&&c(r)?r:{},s[e]=l(h,r,i)):void 0!==i&&(s[e]=i));return s}var c=i(7);t.exports=l},function(t,e){t.exports=function(t,e,i,n){return Math.atan2(n-e,i-t)}},function(t,e){t.exports=function(t){return 0<=(t%=2*Math.PI)?t:t+2*Math.PI}},function(t,e,i){var n=i(6);t.exports=function(t){return n(t,-Math.PI,Math.PI)}},function(t,e,i){var n=i(6);t.exports=function(t){return n(t,-180,180)}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),Math.abs(t-e)<i}},function(t,e,i){var n=i(34);t.exports=function(t,e){return n(t)/n(e)/n(t-e)}},function(t,e){t.exports=function(t){if(0===t)return 1;for(var e=t;--t;)e*=t;return e}},function(t,e){t.exports=function(t,e,i,n,r){var e=.5*(n-e),r=.5*(r-i),s=t*t;return t*s*(2*i-2*n+e+r)+(-3*i+3*n-2*e-r)*s+e*t+i}},function(t,e){t.exports=function(t,e,i){return(e-t)*i+t}},function(t,e){t.exports=function(t,e,i){return t<=e?0:i<=t?1:(t=(t-e)/(i-e))*t*(3-2*t)}},function(t,e){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)}},function(t,e){t.exports=function(t,e,i,n){var r=Math.cos(n),n=Math.sin(n),s=t.x-e,o=t.y-i;return t.x=s*r-o*n+e,t.y=s*n+o*r+i,t}},function(t,e){t.exports=function(t){return 0<t?Math.ceil(t):Math.floor(t)}},function(t,e,i){var c=i(2);t.exports=function(t,e,i,n,r,s,o,a){void 0===a&&(a=new c);var h=Math.sin(r),r=Math.cos(r),l=r*s,s=h*s,h=-h*o,r=r*o,o=1/(l*r+h*-s);return a.x=r*o*t+-h*o*e+(n*h-i*r)*o,a.y=l*o*e+-s*o*t+(-n*l+i*s)*o,a}},function(t,e,i){var n=new(i(0))({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,t=t.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},fromMat4:function(t){var t=t.val,e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[4],e[4]=t[5],e[5]=t[6],e[6]=t[8],e[7]=t[9],e[8]=t[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],r=t[3],s=t[4],o=t[5],a=t[6],h=t[7],l=t[8],c=l*s-o*h,u=-l*r+o*a,d=h*r-s*a,p=e*c+i*u+n*d;return p?(t[0]=c*(p=1/p),t[1]=(-l*i+n*h)*p,t[2]=(o*i-n*s)*p,t[3]=u*p,t[4]=(l*e-n*a)*p,t[5]=(-o*e+n*r)*p,t[6]=d*p,t[7]=(-h*e+i*a)*p,t[8]=(s*e-i*r)*p,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=t[2],r=t[3],s=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return t[0]=s*l-o*h,t[1]=n*h-i*l,t[2]=i*o-n*s,t[3]=o*a-r*l,t[4]=e*l-n*a,t[5]=n*r-e*o,t[6]=r*h-s*a,t[7]=i*a-e*h,t[8]=e*s-i*r,this},determinant:function(){var t=this.val,e=t[0],i=t[1],n=t[2],r=t[3],s=t[4],o=t[5],a=t[6],h=t[7],t=t[8];return e*(t*s-o*h)+i*(-t*r+o*a)+n*(h*r-s*a)},multiply:function(t){var e=this.val,i=e[0],n=e[1],r=e[2],s=e[3],o=e[4],a=e[5],h=e[6],l=e[7],c=e[8],t=t.val,u=t[0],d=t[1],p=t[2],f=t[3],g=t[4],m=t[5],y=t[6],v=t[7],t=t[8];return e[0]=u*i+d*s+p*h,e[1]=u*n+d*o+p*l,e[2]=u*r+d*a+p*c,e[3]=f*i+g*s+m*h,e[4]=f*n+g*o+m*l,e[5]=f*r+g*a+m*c,e[6]=y*i+v*s+t*h,e[7]=y*n+v*o+t*l,e[8]=y*r+v*a+t*c,this},translate:function(t){var e=this.val,i=t.x,t=t.y;return e[6]=i*e[0]+t*e[3]+e[6],e[7]=i*e[1]+t*e[4]+e[7],e[8]=i*e[2]+t*e[5]+e[8],this},rotate:function(t){var e=this.val,i=e[0],n=e[1],r=e[2],s=e[3],o=e[4],a=e[5],h=Math.sin(t),t=Math.cos(t);return e[0]=t*i+h*s,e[1]=t*n+h*o,e[2]=t*r+h*a,e[3]=t*s-h*i,e[4]=t*o-h*n,e[5]=t*a-h*r,this},scale:function(t){var e=this.val,i=t.x,t=t.y;return e[0]=i*e[0],e[1]=i*e[1],e[2]=i*e[2],e[3]=t*e[3],e[4]=t*e[4],e[5]=t*e[5],this},fromQuat:function(t){var e=t.x,i=t.y,n=t.z,t=t.w,r=e+e,s=i+i,o=n+n,a=e*r,h=e*s,e=e*o,l=i*s,i=i*o,n=n*o,r=t*r,s=t*s,t=t*o,o=this.val;return o[0]=1-(l+n),o[3]=h+t,o[6]=e-s,o[1]=h-t,o[4]=1-(a+n),o[7]=i+r,o[2]=e+s,o[5]=i-r,o[8]=1-(a+l),this},normalFromMat4:function(t){var t=t.val,e=this.val,i=t[0],n=t[1],r=t[2],s=t[3],o=t[4],a=t[5],h=t[6],l=t[7],c=t[8],u=t[9],d=t[10],p=t[11],f=t[12],g=t[13],m=t[14],t=t[15],y=i*a-n*o,v=i*h-r*o,x=i*l-s*o,b=n*h-r*a,w=n*l-s*a,T=r*l-s*h,S=c*g-u*f,P=c*m-d*f,c=c*t-p*f,_=u*m-d*g,u=u*t-p*g,d=d*t-p*m,p=y*d-v*u+x*_+b*c-w*P+T*S;return p?(e[0]=(a*d-h*u+l*_)*(p=1/p),e[1]=(h*c-o*d-l*P)*p,e[2]=(o*u-a*c+l*S)*p,e[3]=(r*u-n*d-s*_)*p,e[4]=(i*d-r*c+s*P)*p,e[5]=(n*c-i*u-s*S)*p,e[6]=(g*T-m*w+t*b)*p,e[7]=(m*x-f*T-t*v)*p,e[8]=(f*w-g*x+t*y)*p,this):null}});t.exports=n},function(t,e,i){var n=i(0),r=i(42),s=i(1),i=i(14),o=new Int8Array([1,2,0]),a=new Float32Array([0,0,0]),h=new i(1,0,0),l=new i(0,1,0),c=new i,u=new r,i=new n({initialize:function(t,e,i,n){this.onChangeCallback=s,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,r){return void 0===r&&(r=!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),r&&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,r=t*t+e*e+i*i+n*n;return 0<r&&(r=1/Math.sqrt(r),this._x=t*r,this._y=e*r,this._z=i*r,this._w=n*r),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){var i=this.x,n=this.y,r=this.z,s=this.w;return this.set(i+(e=void 0===e?0:e)*(t.x-i),n+e*(t.y-n),r+e*(t.z-r),s+e*(t.w-s))},rotationTo:function(t,e){var i=t.x*e.x+t.y*e.y+t.z*e.z;return i<-.999999?(c.copy(h).cross(t).length()<1e-6&&c.copy(l).cross(t),c.normalize(),this.setAxisAngle(c,Math.PI)):.999999<i?this.set(0,0,0,1):(c.copy(t).cross(e),this._x=c.x,this._y=c.y,this._z=c.z,this._w=1+i,this.normalize())},setAxes:function(t,e,i){var n=u.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(u).normalize()},identity:function(){return this.set(0,0,0,1)},setAxisAngle:function(t,e){e*=.5;var i=Math.sin(e);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,r=this.w,s=t.x,o=t.y,a=t.z,t=t.w;return this.set(e*t+r*s+i*a-n*o,i*t+r*o+n*s-e*a,n*t+r*a+e*o-i*s,r*t-e*s-i*o-n*a)},slerp:function(t,e){var i=this.x,n=this.y,r=this.z,s=this.w,o=t.x,a=t.y,h=t.z,t=t.w,l=i*o+n*a+r*h+s*t;l<0&&(l=-l,o=-o,a=-a,h=-h,t=-t);var c,u=1-e,d=e;return 1e-6<1-l&&(l=Math.acos(l),c=Math.sin(l),u=Math.sin((1-e)*l)/c,d=Math.sin(e*l)/c),this.set(u*i+d*o,u*n+d*a,u*r+d*h,u*s+d*t)},invert:function(){var t=this.x,e=this.y,i=this.z,n=this.w,r=t*t+e*e+i*i+n*n,r=r?1/r: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,r=this.w,s=Math.sin(t),t=Math.cos(t);return this.set(e*t+r*s,i*t+n*s,n*t-i*s,r*t-e*s)},rotateY:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,r=this.w,s=Math.sin(t),t=Math.cos(t);return this.set(e*t-n*s,i*t+r*s,n*t+e*s,r*t-i*s)},rotateZ:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,r=this.w,s=Math.sin(t),t=Math.cos(t);return this.set(e*t+i*s,i*t-e*s,n*t+r*s,r*t-n*s)},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,r=t.z/2,s=Math.cos(i),o=Math.cos(n),a=Math.cos(r),h=Math.sin(i),l=Math.sin(n),c=Math.sin(r);switch(t.order){case"XYZ":this.set(h*o*a+s*l*c,s*l*a-h*o*c,s*o*c+h*l*a,s*o*a-h*l*c,e);break;case"YXZ":this.set(h*o*a+s*l*c,s*l*a-h*o*c,s*o*c-h*l*a,s*o*a+h*l*c,e);break;case"ZXY":this.set(h*o*a-s*l*c,s*l*a+h*o*c,s*o*c+h*l*a,s*o*a-h*l*c,e);break;case"ZYX":this.set(h*o*a-s*l*c,s*l*a+h*o*c,s*o*c-h*l*a,s*o*a+h*l*c,e);break;case"YZX":this.set(h*o*a+s*l*c,s*l*a+h*o*c,s*o*c-h*l*a,s*o*a-h*l*c,e);break;case"XZY":this.set(h*o*a-s*l*c,s*l*a-h*o*c,s*o*c+h*l*a,s*o*a+h*l*c,e)}return this},setFromRotationMatrix:function(t){var e,t=t.val,i=t[0],n=t[4],r=t[8],s=t[1],o=t[5],a=t[9],h=t[2],l=t[6],t=t[10],c=i+o+t;return 0<c?(e=.5/Math.sqrt(c+1),this.set((l-a)*e,(r-h)*e,(s-n)*e,.25/e)):o<i&&t<i?(e=2*Math.sqrt(1+i-o-t),this.set(.25*e,(n+s)/e,(r+h)/e,(l-a)/e)):t<o?(e=2*Math.sqrt(1+o-i-t),this.set((n+s)/e,.25*e,(a+l)/e,(r-h)/e)):(e=2*Math.sqrt(1+t-i-o),this.set((r+h)/e,(a+l)/e,.25*e,(s-n)/e)),this},fromMat3:function(t){var e,i,n,t=t.val,r=t[0]+t[4]+t[8];return 0<r?(n=Math.sqrt(r+1),this.w=.5*n,this._x=(t[7]-t[5])*(n=.5/n),this._y=(t[2]-t[6])*n,this._z=(t[3]-t[1])*n):(t[4]>t[r=0]&&(r=1),t[8]>t[3*r+r]&&(r=2),e=o[r],i=o[e],n=Math.sqrt(t[3*r+r]-t[3*e+e]-t[3*i+i]+1),a[r]=.5*n,a[e]=(t[3*e+r]+t[3*r+e])*(n=.5/n),a[i]=(t[3*i+r]+t[3*r+i])*n,this._x=a[0],this._y=a[1],this._z=a[2],this._w=(t[3*i+e]-t[3*e+i])*n),this.onChangeCallback(this),this}});t.exports=i},function(t,e,i){t.exports={ADDED_TO_SCENE:i(180),BOOT:i(181),CREATE:i(182),DESTROY:i(183),PAUSE:i(184),POST_UPDATE:i(185),PRE_RENDER:i(186),PRE_UPDATE:i(187),READY:i(188),REMOVED_FROM_SCENE:i(189),RENDER:i(190),RESUME:i(191),SHUTDOWN:i(192),SLEEP:i(193),START:i(194),TRANSITION_COMPLETE:i(195),TRANSITION_INIT:i(196),TRANSITION_OUT:i(197),TRANSITION_START:i(198),TRANSITION_WAKE:i(199),UPDATE:i(200),WAKE:i(201)}},function(t,e,i){var r=i(27),s=i(46);t.exports=function(t,e){var i=void 0===t?s():r({},t);if(e)for(var n in e)void 0!==e[n]&&(i[n]=e[n]);return i}},function(t,e){t.exports=function(t,e,i,n,r,s){return{responseType:t=void 0===t?"":t,async:e=void 0===e?!0:e,user:i=void 0===i?"":i,password:n=void 0===n?"":n,timeout:r=void 0===r?0:r,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:s=void 0===s?!1:s}}},function(t,e){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}}},function(t,e){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 this.depth=t=void 0===t?0:t,this}}},function(t,e){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}}},function(t,e){t.exports={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,e){return void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this}}},function(t,e,i){var n=i(4),r=i(23),s=i(41),o=i(30),a=i(31),h=i(2);t.exports={_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,0===(this._scaleY=t)?this.renderFlags&=-5:this.renderFlags|=4}},scaleX:{get:function(){return this._scaleX},set:function(t){0===(this._scaleX=t)?this.renderFlags&=-5:this.renderFlags|=4}},scaleY:{get:function(){return this._scaleY},set:function(t){0===(this._scaleY=t)?this.renderFlags&=-5: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===e&&(e=0),void 0===i&&(i=this.scene.sys.scale.width),void 0===n&&(n=this.scene.sys.scale.height),this.x=(t=void 0===t?0:t)+Math.random()*i,this.y=e+Math.random()*n,this},setRotation:function(t){return this.rotation=t=void 0===t?0:t,this},setAngle:function(t){return this.angle=t=void 0===t?0: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 this.x=t=void 0===t?0:t,this},setY:function(t){return this.y=t=void 0===t?0:t,this},setZ:function(t){return this.z=t=void 0===t?0:t,this},setW:function(t){return this.w=t=void 0===t?0:t,this},getLocalTransformMatrix:function(t){return(t=void 0===t?new r:t).applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY)},getWorldTransformMatrix:function(t,e){void 0===t&&(t=new r),void 0===e&&(e=new r);var i=this.parentContainer;if(!i)return this.getLocalTransformMatrix(t);for(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 t},getLocalPoint:function(t,e,i,n){i=i||new h;var r=(n=n||this.scene.sys.cameras.main).scrollX,n=n.scrollY,t=t+r*this.scrollFactorX-r,r=e+n*this.scrollFactorY-n;return this.parentContainer?this.getWorldTransformMatrix().applyInverse(t,r,i):s(t,r,this.x,this.y,this.rotation,this.scaleX,this.scaleY,i),this._originComponent&&(i.x+=this._displayOriginX,i.y+=this._displayOriginY),i},getParentRotation:function(){for(var t=0,e=this.parentContainer;e;)t+=e.rotation,e=e.parentContainer;return t}}},function(t,e){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}}},function(t,e,i){var n=i(0),r=i(54),s=i(222),o=i(229),a=i(55),h=i(44),l=new n({Extends:o,initialize:function(t,e){o.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.input=null,this.body=null,this.ignoreDestroy=!1,this.on(a.ADDED_TO_SCENE,this.addedToScene,this),this.on(a.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 s(this)),this},setData:function(t,e){return this.data||(this.data=new s(this)),this.data.set(t,e),this},incData:function(t,e){return this.data||(this.data=new s(this)),this.data.inc(t,e),this},toggleData:function(t){return this.data||(this.data=new s(this)),this.data.toggle(t),this},getData:function(t){return this.data||(this.data=new s(this)),this.data.get(t)},setInteractive:function(t,e,i){return this.scene.sys.input.enable(this,t,e,i),this},disableInteractive:function(){return this.input&&(this.input.enabled=!1),this},removeInteractive:function(){return this.scene.sys.input.clear(this),this.input=void 0,this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return r(this)},willRender:function(t){return!(l.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},getIndexList:function(){for(var t=this,e=this.parentContainer,i=[];e&&(i.unshift(e.getIndex(t)),(t=e).parentContainer);)e=e.parentContainer;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).add(this,!0),t.queueDepthSort(),this.emit(a.ADDED_TO_SCENE,this,this.scene),t.events.emit(h.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.exists(this)&&(t.remove(this,!0),t.queueDepthSort(),this.displayList=null,this.emit(a.REMOVED_FROM_SCENE,this,this.scene),t.events.emit(h.REMOVED_FROM_SCENE,this,this.scene)),this},removeFromUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.remove(this),this},destroy:function(){this.scene&&!this.ignoreDestroy&&(this.preDestroy&&this.preDestroy.call(this),this.emit(a.DESTROY,this),this.removeAllListeners(),this.postPipelines&&this.resetPostPipeline(!0),this.removeFromDisplayList(),this.removeFromUpdateList(),this.input&&(this.scene.sys.input.clear(this),this.input=void 0),this.data&&(this.data.destroy(),this.data=void 0),this.body&&(this.body.destroy(),this.body=void 0),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0)}});l.RENDER_MASK=15,t.exports=l},function(t,e){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}},function(t,e,i){t.exports={ADDED_TO_SCENE:i(230),DESTROY:i(231),REMOVED_FROM_SCENE:i(232),VIDEO_COMPLETE:i(233),VIDEO_CREATED:i(234),VIDEO_ERROR:i(235),VIDEO_LOOP:i(236),VIDEO_PLAY:i(237),VIDEO_SEEKED:i(238),VIDEO_SEEKING:i(239),VIDEO_STOP:i(240),VIDEO_TIMEOUT:i(241),VIDEO_UNLOCKED:i(242)}},function(t,e,i){var i=i(23),o=new i,a=new i,h=new i,l={camera:o,sprite:a,calc:h};t.exports=function(t,e,i){var n=o,r=a,s=h;return r.applyITRS(t.x,t.y,t.rotation,t.scaleX,t.scaleY),n.copyFrom(e.matrix),i?(n.multiplyWithOffset(i,-e.scrollX*t.scrollFactorX,-e.scrollY*t.scrollFactorY),r.e=t.x,r.f=t.y):(r.e-=e.scrollX*t.scrollFactorX,r.f-=e.scrollY*t.scrollFactorY),n.multiply(r,s),l}},function(t,e){t.exports=function(t){for(var e=t.length,i=t[0].length,n=new Array(i),r=0;r<i;r++){n[r]=new Array(e);for(var s=e-1;-1<s;s--)n[r][s]=t[s][r]}return n}},function(t,e){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}},function(t,e){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}},function(t,e){t.exports=function(t){for(var e=t.length-1;0<e;e--){var i=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[i],t[i]=n}return t}},function(t,e,i){var r=i(62),s=i(13);t.exports=function(t,e,i){var n;return(void 0===i&&(i=new s),e<=0||1<=e)?(i.x=t.x,i.y=t.y):(n=r(t)*e,.5<e?(n-=t.width+t.height)<=t.width?(i.x=t.right-n,i.y=t.bottom):(i.x=t.x,i.y=t.bottom-(n-t.width)):n<=t.width?(i.x=t.x+n,i.y=t.y):(i.x=t.right,i.y=t.y+(n-t.width))),i}},function(t,e){t.exports=function(t){return 2*(t.width+t.height)}},function(t,e,i){var n,a=i(64),r=i(0),h=i(10),s=i(177),l=i(178),c=i(202),u=i(203),d=i(221),p=i(254),f=i(1),i=new r({Extends:l,initialize:function(t,e,o){l.call(this,t,e,o);var i=e.game;this.isWebGL=2===i.config.renderType,this.cache=i.cache.addCustom("spine"),this.spineTextures=i.cache.addCustom("spineTextures"),this.json=i.cache.json,this.textures=i.textures,this.drawDebug=!1,this.gl,this.renderer,this.sceneRenderer,this.skeletonRenderer,this.skeletonDebugRenderer,this.plugin=c,this.temp1,this.temp2,this.isWebGL?(this.runtime=c.webgl,this.renderer=i.renderer,this.gl=i.renderer.gl,this.getAtlas=this.getAtlasWebGL):(this.runtime=c.canvas,this.renderer=i.renderer,this.getAtlas=this.getAtlasCanvas),this.renderer||(this.renderer={width:i.scale.width,height:i.scale.height,preRender:f,postRender:f,render:f,destroy:f}),e.registerFileType("spine",this.spineFileCallback,t),e.registerGameObject("spine",function(t,e,i,n,r){var s=this.scene.sys[o],s=new d(this.scene,s,t,e,i,n,r);return this.displayList.add(s),this.updateList.add(s),s},function(t,e){var i=h(t=void 0===t?{}:t,"key",null),n=h(t,"animationName",null),r=h(t,"loop",!1),s=this.scene.sys[o],s=new d(this.scene,s,0,0,i,n,r),i=(void 0!==e&&(t.add=e),a(this.scene,s,t),h(t,"skinName",!1)),n=(i&&s.setSkinByName(i),h(t,"slotName",!1)),r=h(t,"attachmentName",null);return n&&s.setAttachment(n,r),s.refresh()}),e.registerGameObject("spineContainer",function(t,e,i){var n=this.scene.sys[o],n=new p(this.scene,n,t,e,i);return this.displayList.add(n),n},function(t,e){var i=h(t=void 0===t?{}:t,"x",0),n=h(t,"y",0),r=h(t,"children",null),s=this.scene.sys[o],s=new p(this.scene,s,i,n,r);return void 0!==e&&(t.add=e),a(this.scene,s,t),s})},boot:function(){this.isWebGL?(this.bootWebGL(),this.onResize(),this.game.scale.on(s,this.onResize,this)):this.bootCanvas();var t=this.systems.events;t.once("shutdown",this.shutdown,this),t.once("destroy",this.destroy,this),this.game.events.once("destroy",this.gameDestroy,this)},bootCanvas:function(){this.skeletonRenderer=new c.canvas.SkeletonRenderer(this.scene.sys.context)},bootWebGL:function(){function t(t,e){var i;t===this.srcBlend&&e===this.dstBlend||(i=this.context.gl,this.srcBlend=t,this.dstBlend=e,this.isDrawing&&(this.flush(),i.blendFunc(this.srcBlend,this.dstBlend)))}n||((n=new c.webgl.SceneRenderer(this.renderer.canvas,this.gl,!0)).batcher.setBlendMode=t,n.shapes.setBlendMode=t),this.sceneRenderer=n,this.skeletonRenderer=n.skeletonRenderer,this.skeletonDebugRenderer=n.skeletonDebugRenderer,this.temp1=new c.webgl.Vector3(0,0,0),this.temp2=new c.webgl.Vector3(0,0,0)},getAtlasCanvas:function(t){var e,i,n=this.cache.get(t);if(n)return(i=this.spineTextures).has(t)?i.get(t):(e=this.textures,new c.TextureAtlas(n.data,function(t){return new c.canvas.CanvasTexture(e.get(n.prefix+t).getSourceImage())}))},getAtlasWebGL:function(t){var e,i,n,r=this.cache.get(t);if(r)return(n=this.spineTextures).has(t)?n.get(t):(e=this.textures,(i=this.sceneRenderer.context.gl).pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),new c.TextureAtlas(r.data,function(t){return new c.webgl.GLTexture(i,e.get(r.prefix+t).getSourceImage(),!1)}))},spineFileCallback:function(t,e,i,n,r,s){var o;if(Array.isArray(t))for(var a=0;a<t.length;a++)o=new u(this,t[a]),this.addFile(o.files);else o=new u(this,t,e,i,n,r,s),this.addFile(o.files);return this},worldToLocal:function(t,e,i,n){var r=this.temp1,s=this.temp2,o=this.sceneRenderer.camera,t=(r.set(t+i.x,e-i.y,0),o.viewportWidth),e=o.viewportHeight;return o.screenToWorld(r,t,e),n&&null!==n.parent?(n.parent.worldToLocal(s.set(r.x-i.x,r.y-i.y,0)),new c.Vector2(s.x,s.y)):n?new c.Vector2(r.x-i.x,r.y-i.y):new c.Vector2(r.x,r.y)},getVector2:function(t,e){return new c.Vector2(t,e)},getVector3:function(t,e,i){return new c.webgl.Vector3(t,e,i)},setDebugBones:function(t){return this.skeletonDebugRenderer.drawBones=t=void 0===t?!0:t,this},setDebugRegionAttachments:function(t){return this.skeletonDebugRenderer.drawRegionAttachments=t=void 0===t?!0:t,this},setDebugBoundingBoxes:function(t){return this.skeletonDebugRenderer.drawBoundingBoxes=t=void 0===t?!0:t,this},setDebugMeshHull:function(t){return this.skeletonDebugRenderer.drawMeshHull=t=void 0===t?!0:t,this},setDebugMeshTriangles:function(t){return this.skeletonDebugRenderer.drawMeshTriangles=t=void 0===t?!0:t,this},setDebugPaths:function(t){return this.skeletonDebugRenderer.drawPaths=t=void 0===t?!0:t,this},setDebugSkeletonXY:function(t){return this.skeletonDebugRenderer.drawSkeletonXY=t=void 0===t?!0:t,this},setDebugClipping:function(t){return this.skeletonDebugRenderer.drawClipping=t=void 0===t?!0:t,this},setEffect:function(t){return this.sceneRenderer.skeletonRenderer.vertexEffect=t,this},createSkeleton:function(t,e){var i=t,n=t,r=-1!==t.indexOf("."),t=(r&&(i=(t=t.split(".")).shift(),n=t.join(".")),this.cache.get(i)),s=this.getAtlas(i);if(!s)return null;this.spineTextures.has(i)||this.spineTextures.add(i,s);t=t.preMultipliedAlpha,s=new c.AtlasAttachmentLoader(s),s=new c.SkeletonJson(s);return(i=e||(e=this.json.get(i),r?h(e,n):e))?{skeletonData:r=s.readSkeletonData(i),skeleton:new c.Skeleton(r),preMultipliedAlpha:t}:null},createAnimationState:function(t){t=new c.AnimationStateData(t.data);return{stateData:t,state:new c.AnimationState(t)}},getBounds:function(t){var e=new c.Vector2,i=new c.Vector2;return t.getBounds(e,i,[]),{offset:e,size:i}},onResize:function(){var t=this.renderer,e=this.sceneRenderer,i=t.width,t=t.height;e.camera.position.x=i/2,e.camera.position.y=t/2,e.camera.setViewport(i,t)},shutdown:function(){this.systems.events.off("shutdown",this.shutdown,this),this.isWebGL&&this.game.scale.off(s,this.onResize,this)},destroy:function(){this.shutdown(),this.game=null,this.scene=null,this.systems=null,this.cache=null,this.spineTextures=null,this.json=null,this.textures=null,this.skeletonRenderer=null,this.gl=null},gameDestroy:function(){this.pluginManager.removeGameObject("spine",!0,!0),this.pluginManager.removeGameObject("spineContainer",!0,!0),this.pluginManager=null,n&&(n.dispose(),n=null),this.sceneRenderer=null}});i.SpineGameObject=d,i.SpineContainer=p,t.exports=i},function(t,e,i){var s=i(17),o=i(65);t.exports=function(t,e,i){e.x=o(i,"x",0),e.y=o(i,"y",0),e.depth=o(i,"depth",0),e.flipX=o(i,"flipX",!1),e.flipY=o(i,"flipY",!1);var n=o(i,"scale",null),n=("number"==typeof n?e.setScale(n):null!==n&&(e.scaleX=o(n,"x",1),e.scaleY=o(n,"y",1)),o(i,"scrollFactor",null)),n=("number"==typeof n?e.setScrollFactor(n):null!==n&&(e.scrollFactorX=o(n,"x",1),e.scrollFactorY=o(n,"y",1)),e.rotation=o(i,"rotation",0),o(i,"angle",null));null!==n&&(e.angle=n),e.alpha=o(i,"alpha",1);var r,n=o(i,"origin",null);return"number"==typeof n?e.setOrigin(n):null!==n&&(r=o(n,"x",.5),n=o(n,"y",.5),e.setOrigin(r,n)),e.blendMode=o(i,"blendMode",s.NORMAL),e.visible=o(i,"visible",!0),o(i,"add",!0)&&t.sys.displayList.add(e),e.preUpdate&&t.sys.updateList.add(e),e}},function(t,e,i){var n=i(66),r=i(10);t.exports=function(t,e,i){t=r(t,e,null);if(null===t)return i;if(Array.isArray(t))return n.RND.pick(t);if("object"==typeof t){if(t.hasOwnProperty("randInt"))return n.RND.integerInRange(t.randInt[0],t.randInt[1]);if(t.hasOwnProperty("randFloat"))return n.RND.realInRange(t.randFloat[0],t.randFloat[1])}else if("function"==typeof t)return t(e);return t}},function(t,e,i){var n=i(4),i=i(27)(!1,{Angle:i(67),Distance:i(76),Easing:i(84),Fuzzy:i(129),Interpolation:i(134),Pow2:i(142),Snap:i(146),RandomDataGenerator:i(150),Average:i(151),Bernstein:i(33),Between:i(152),CatmullRom:i(35),CeilTo:i(153),Clamp:i(3),DegToRad:i(19),Difference:i(154),Euler:i(155),Factorial:i(34),FloatBetween:i(18),FloorTo:i(156),FromPercent:i(157),GetSpeed:i(158),IsEven:i(159),IsEvenStrict:i(160),Linear:i(36),MaxAdd:i(161),Median:i(162),MinSub:i(163),Percent:i(164),RadToDeg:i(9),RandomXY:i(165),RandomXYZ:i(166),RandomXYZW:i(167),Rotate:i(168),RotateAround:i(39),RotateAroundDistance:i(169),RotateTo:i(170),RoundAwayFromZero:i(40),RoundTo:i(171),SinCosTableGenerator:i(172),SmootherStep:i(38),SmoothStep:i(37),ToXY:i(173),TransformXY:i(41),Within:i(174),Wrap:i(6),Vector2:i(2),Vector3:i(14),Vector4:i(175),Matrix3:i(42),Matrix4:i(20),Quaternion:i(43),RotateVec3:i(176)},n);t.exports=i},function(t,e,i){t.exports={Between:i(28),BetweenPoints:i(68),BetweenPointsY:i(69),BetweenY:i(70),CounterClockwise:i(8),Normalize:i(29),Random:i(71),RandomDegrees:i(72),Reverse:i(73),RotateTo:i(74),ShortestBetween:i(75),Wrap:i(30),WrapDegrees:i(31)}},function(t,e){t.exports=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)}},function(t,e){t.exports=function(t,e){return Math.atan2(e.x-t.x,e.y-t.y)}},function(t,e){t.exports=function(t,e,i,n){return Math.atan2(i-t,n-e)}},function(t,e,i){var n=i(18);t.exports=function(){return n(-Math.PI,Math.PI)}},function(t,e,i){var n=i(18);t.exports=function(){return n(-180,180)}},function(t,e,i){var n=i(29);t.exports=function(t){return n(t+Math.PI)}},function(t,e,i){var n=i(4);t.exports=function(t,e,i){return void 0===i&&(i=.05),t!==e&&(Math.abs(e-t)<=i||Math.abs(e-t)>=n.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(e<t?e+=n.PI2:e-=n.PI2),t<e?t+=i:e<t&&(t-=i))),t}},function(t,e){t.exports=function(t,e){e-=t;return 0==e?0:e-360*Math.floor((180+e)/360)}},function(t,e,i){t.exports={Between:i(77),BetweenPoints:i(78),BetweenPointsSquared:i(79),Chebyshev:i(80),Power:i(81),Snake:i(82),Squared:i(83)}},function(t,e){t.exports=function(t,e,i,n){t-=i,i=e-n;return Math.sqrt(t*t+i*i)}},function(t,e){t.exports=function(t,e){var i=t.x-e.x,t=t.y-e.y;return Math.sqrt(i*i+t*t)}},function(t,e){t.exports=function(t,e){var i=t.x-e.x,t=t.y-e.y;return i*i+t*t}},function(t,e){t.exports=function(t,e,i,n){return Math.max(Math.abs(t-i),Math.abs(e-n))}},function(t,e){t.exports=function(t,e,i,n,r){return void 0===r&&(r=2),Math.sqrt(Math.pow(i-t,r)+Math.pow(n-e,r))}},function(t,e){t.exports=function(t,e,i,n){return Math.abs(t-i)+Math.abs(e-n)}},function(t,e){t.exports=function(t,e,i,n){t-=i,i=e-n;return t*t+i*i}},function(t,e,i){t.exports={Back:i(85),Bounce:i(89),Circular:i(93),Cubic:i(97),Elastic:i(101),Expo:i(105),Linear:i(109),Quadratic:i(111),Quartic:i(115),Quintic:i(119),Sine:i(123),Stepped:i(127)}},function(t,e,i){t.exports={In:i(86),Out:i(87),InOut:i(88)}},function(t,e){t.exports=function(t,e){return t*t*(((e=void 0===e?1.70158:e)+1)*t-e)}},function(t,e){t.exports=function(t,e){return--t*t*(((e=void 0===e?1.70158:e)+1)*t+e)+1}},function(t,e){t.exports=function(t,e){e=1.525*(e=void 0===e?1.70158:e);return(t*=2)<1?t*t*((1+e)*t-e)*.5:.5*((t-=2)*t*((1+e)*t+e)+2)}},function(t,e,i){t.exports={In:i(90),Out:i(91),InOut:i(92)}},function(t,e){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)}},function(t,e){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}},function(t,e){t.exports=function(t){var e=!1;return t<.5?(t=1-2*t,e=!0):t=2*t-1,t<1/2.75?t*=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?.5*(1-t):.5*t+.5}},function(t,e,i){t.exports={In:i(94),Out:i(95),InOut:i(96)}},function(t,e){t.exports=function(t){return 1-Math.sqrt(1-t*t)}},function(t,e){t.exports=function(t){return Math.sqrt(1- --t*t)}},function(t,e){t.exports=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},function(t,e,i){t.exports={In:i(98),Out:i(99),InOut:i(100)}},function(t,e){t.exports=function(t){return t*t*t}},function(t,e){t.exports=function(t){return--t*t*t+1}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},function(t,e,i){t.exports={In:i(102),Out:i(103),InOut:i(104)}},function(t,e){t.exports=function(t,e,i){var n;return void 0===e&&(e=.1),void 0===i&&(i=.1),0===t?0:1===t?1:(n=i/4,e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),-(e*Math.pow(2,10*--t)*Math.sin((t-n)*(2*Math.PI)/i)))}},function(t,e){t.exports=function(t,e,i){var n;return void 0===e&&(e=.1),void 0===i&&(i=.1),0===t?0:1===t?1:(n=i/4,e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*t)*Math.sin((t-n)*(2*Math.PI)/i)+1)}},function(t,e){t.exports=function(t,e,i){var n;return void 0===e&&(e=.1),void 0===i&&(i=.1),0===t?0:1===t?1:(n=i/4,e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),(t*=2)<1?e*Math.pow(2,10*--t)*Math.sin((t-n)*(2*Math.PI)/i)*-.5:e*Math.pow(2,-10*--t)*Math.sin((t-n)*(2*Math.PI)/i)*.5+1)}},function(t,e,i){t.exports={In:i(106),Out:i(107),InOut:i(108)}},function(t,e){t.exports=function(t){return Math.pow(2,10*(t-1))-.001}},function(t,e){t.exports=function(t){return 1-Math.pow(2,-10*t)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))}},function(t,e,i){t.exports=i(110)},function(t,e){t.exports=function(t){return t}},function(t,e,i){t.exports={In:i(112),Out:i(113),InOut:i(114)}},function(t,e){t.exports=function(t){return t*t}},function(t,e){t.exports=function(t){return t*(2-t)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},function(t,e,i){t.exports={In:i(116),Out:i(117),InOut:i(118)}},function(t,e){t.exports=function(t){return t*t*t*t}},function(t,e){t.exports=function(t){return 1- --t*t*t*t}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},function(t,e,i){t.exports={In:i(120),Out:i(121),InOut:i(122)}},function(t,e){t.exports=function(t){return t*t*t*t*t}},function(t,e){t.exports=function(t){return--t*t*t*t*t+1}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},function(t,e,i){t.exports={In:i(124),Out:i(125),InOut:i(126)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:1-Math.cos(t*Math.PI/2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:Math.sin(t*Math.PI/2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:.5*(1-Math.cos(Math.PI*t))}},function(t,e,i){t.exports=i(128)},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1),t<=0?0:1<=t?1:1/e*(1+(e*t|0))}},function(t,e,i){t.exports={Ceil:i(130),Equal:i(32),Floor:i(131),GreaterThan:i(132),LessThan:i(133)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.ceil(t-e)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.floor(t+e)}},function(t,e){t.exports=function(t,e,i){return e-(i=void 0===i?1e-4:i)<t}},function(t,e){t.exports=function(t,e,i){return t<e+(i=void 0===i?1e-4:i)}},function(t,e,i){t.exports={Bezier:i(135),CatmullRom:i(136),CubicBezier:i(137),Linear:i(138),QuadraticBezier:i(139),SmoothStep:i(140),SmootherStep:i(141)}},function(t,e,i){var s=i(33);t.exports=function(t,e){for(var i=0,n=t.length-1,r=0;r<=n;r++)i+=Math.pow(1-e,n-r)*Math.pow(e,r)*t[r]*s(n,r);return i}},function(t,e,i){var s=i(35);t.exports=function(t,e){var i=t.length-1,n=i*e,r=Math.floor(n);return t[0]===t[i]?(e<0&&(r=Math.floor(n=i*(1+e))),s(n-r,t[(r-1+i)%i],t[r],t[(r+1)%i],t[(r+2)%i])):e<0?t[0]-(s(-n,t[0],t[0],t[1],t[1])-t[0]):1<e?t[i]-(s(n-i,t[i],t[i],t[i-1],t[i-1])-t[i]):s(n-r,t[r?r-1:0],t[r],t[i<r+1?i:r+1],t[i<r+2?i:r+2])}},function(t,e){t.exports=function(t,e,i,n,r){return(s=1-t)*s*s*e+3*(s=1-t)*s*t*i+3*(1-t)*t*t*n+t*t*t*r;var s}},function(t,e,i){var s=i(36);t.exports=function(t,e){var i=t.length-1,n=i*e,r=Math.floor(n);return e<0?s(t[0],t[1],n):1<e?s(t[i],t[i-1],i-n):s(t[r],t[i<r+1?i:r+1],n-r)}},function(t,e){t.exports=function(t,e,i,n){return(r=1-t)*r*e+2*(1-t)*t*i+t*t*n;var r}},function(t,e,i){var n=i(37);t.exports=function(t,e,i){return e+(i-e)*n(t,0,1)}},function(t,e,i){var n=i(38);t.exports=function(t,e,i){return e+(i-e)*n(t,0,1)}},function(t,e,i){t.exports={GetNext:i(143),IsSize:i(144),IsValue:i(145)}},function(t,e){t.exports=function(t){t=Math.log(t)/.6931471805599453;return 1<<Math.ceil(t)}},function(t,e){t.exports=function(t,e){return 0<t&&0==(t&t-1)&&0<e&&0==(e&e-1)}},function(t,e){t.exports=function(t){return 0<t&&0==(t&t-1)}},function(t,e,i){t.exports={Ceil:i(147),Floor:i(148),To:i(149)}},function(t,e){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)}},function(t,e){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)}},function(t,e){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)}},function(t,e,i){i=new(i(0))({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+2.3283064365386963e-10*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=(e=((e=.02519603282416938*(i+=t.charCodeAt(n)))-(i=e>>>0))*i)>>>0,i+=4294967296*(e-=i);return 2.3283064365386963e-10*((this.n=i)>>>0)},init:function(t){"string"==typeof t?this.state(t):this.sow(t)},sow:function(t){if(this.n=4022871197,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 4294967296*this.rnd()},frac:function(){return this.rnd()+11102230246251565e-32*(2097152*this.rnd()|0)},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(){for(var t="",e="",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-1)+.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;0<e;e--){var i=Math.floor(this.frac()*(e+1)),n=t[i];t[i]=t[e],t[e]=n}return t}});t.exports=i},function(t,e){t.exports=function(t){for(var e=0,i=0;i<t.length;i++)e+=+t[i];return e/t.length}},function(t,e){t.exports=function(t,e){return Math.floor(Math.random()*(e-t+1)+t)}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);i=Math.pow(i,-e);return Math.ceil(t*i)/i}},function(t,e){t.exports=function(t,e){return Math.abs(t-e)}},function(t,e,i){var m=i(3),n=i(0),r=i(20),s=i(1),o=new r,i=new n({initialize:function t(e,i,n,r){void 0===i&&(i=0),void 0===n&&(n=0),void 0===r&&(r=t.DefaultOrder),this._x=e=void 0===e?0:e,this._y=i,this._z=n,this._order=r,this.onChangeCallback=s},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)}},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),o.fromQuat(t),this.setFromRotationMatrix(o,e,i)},setFromRotationMatrix:function(t,e,i){void 0===e&&(e=this._order),void 0===i&&(i=!1);var t=t.val,n=t[0],r=t[4],s=t[8],o=t[1],a=t[5],h=t[9],l=t[2],c=t[6],u=t[10],d=0,p=0,f=0,g=.99999;switch(e){case"XYZ":p=Math.asin(m(s,-1,1)),Math.abs(s)<g?(d=Math.atan2(-h,u),f=Math.atan2(-r,n)):d=Math.atan2(c,a);break;case"YXZ":d=Math.asin(-m(h,-1,1)),Math.abs(h)<g?(p=Math.atan2(s,u),f=Math.atan2(o,a)):p=Math.atan2(-l,n);break;case"ZXY":d=Math.asin(m(c,-1,1)),f=Math.abs(c)<g?(p=Math.atan2(-l,u),Math.atan2(-r,a)):Math.atan2(o,n);break;case"ZYX":p=Math.asin(-m(l,-1,1)),f=Math.abs(l)<g?(d=Math.atan2(c,u),Math.atan2(o,n)):Math.atan2(-r,a);break;case"YZX":f=Math.asin(m(o,-1,1)),p=Math.abs(o)<g?(d=Math.atan2(-h,a),Math.atan2(-l,n)):Math.atan2(s,u);break;case"XZY":f=Math.asin(-m(r,-1,1)),Math.abs(r)<g?(d=Math.atan2(c,a),p=Math.atan2(s,n)):d=Math.atan2(-h,u)}return this._x=d,this._y=p,this._z=f,this._order=e,i&&this.onChangeCallback(this),this}});i.RotationOrders=["XYZ","YXZ","ZXY","ZYX","YZX","XZY"],i.DefaultOrder="XYZ",t.exports=i},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);i=Math.pow(i,-e);return Math.floor(t*i)/i}},function(t,e,i){var n=i(3);t.exports=function(t,e,i){return(i-e)*(t=n(t,0,1))+e}},function(t,e){t.exports=function(t,e){return t/e/1e3}},function(t,e){t.exports=function(t){return t==parseFloat(t)?!(t%2):void 0}},function(t,e){t.exports=function(t){return t===parseFloat(t)?!(t%2):void 0}},function(t,e){t.exports=function(t,e,i){return Math.min(t+e,i)}},function(t,e){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]}},function(t,e){t.exports=function(t,e,i){return Math.max(t-e,i)}},function(t,e){t.exports=function(t,e,i,n){e=(t-e)/((i=void 0===i?e+1:i)-e);return 1<e?void 0!==n?(e=(n-t)/(n-i))<0&&(e=0):e=1:e<0&&(e=0),e}},function(t,e){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}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI,n=2*Math.random()-1,r=Math.sqrt(1-n*n)*e;return t.x=Math.cos(i)*r,t.y=Math.sin(i)*r,t.z=n*e,t}},function(t,e){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}},function(t,e){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}},function(t,e){t.exports=function(t,e,i,n,r){n+=Math.atan2(t.y-i,t.x-e);return t.x=e+r*Math.cos(n),t.y=i+r*Math.sin(n),t}},function(t,e){t.exports=function(t,e,i,n,r){return t.x=e+r*Math.cos(n),t.y=i+r*Math.sin(n),t}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);i=Math.pow(i,-e);return Math.round(t*i)/i}},function(t,e){t.exports=function(t,e,i,n){void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=1),n*=Math.PI/t;for(var r=[],s=[],o=0;o<t;o++)e+=(i-=e*n)*n,r[o]=i,s[o]=e;return{sin:s,cos:r,length:t}}},function(t,e,i){var s=i(2);t.exports=function(t,e,i,n){void 0===n&&(n=new s);var r=0;return 0<t&&t<=e*i&&(i=e-1<t?t-(r=Math.floor(t/e))*e:t,n.set(i,r)),n}},function(t,e){t.exports=function(t,e,i){return Math.abs(t-e)<=i}},function(t,e,i){var n=new(i(0))({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,r=t*t+e*e+i*i+n*n;return 0<r&&(r=1/Math.sqrt(r),this.x=t*r,this.y=e*r,this.z=i*r,this.w=n*r),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){var i=this.x,n=this.y,r=this.z,s=this.w;return this.x=i+(e=void 0===e?0:e)*(t.x-i),this.y=n+e*(t.y-n),this.z=r+e*(t.z-r),this.w=s+e*(t.w-s),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,t=t.w-this.w||0;return Math.sqrt(e*e+i*i+n*n+t*t)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,t=t.w-this.w||0;return e*e+i*i+n*n+t*t},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,r=this.w,t=t.val;return this.x=t[0]*e+t[4]*i+t[8]*n+t[12]*r,this.y=t[1]*e+t[5]*i+t[9]*n+t[13]*r,this.z=t[2]*e+t[6]*i+t[10]*n+t[14]*r,this.w=t[3]*e+t[7]*i+t[11]*n+t[15]*r,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,r=t.x,s=t.y,o=t.z,t=t.w,a=t*e+s*n-o*i,h=t*i+o*e-r*n,l=t*n+r*i-s*e,e=-r*e-s*i-o*n;return this.x=a*t+e*-r+h*-o-l*-s,this.y=h*t+e*-s+l*-r-a*-o,this.z=l*t+e*-o+a*-s-h*-r,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},function(t,e,i){var n=i(14),r=i(20),i=i(43),s=new r,o=new i,a=new n;t.exports=function(t,e,i){return o.setAxisAngle(e,i),s.fromRotationTranslation(o,a.set(0,0,0)),t.transformMat4(s)}},function(t,e){t.exports="resize"},function(t,e,i){var n=i(179),r=i(0),s=i(44),i=new r({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(s.BOOT,this.boot,this)},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=i},function(t,e,i){i=new(i(0))({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}});t.exports=i},function(t,e){t.exports="addedtoscene"},function(t,e){t.exports="boot"},function(t,e){t.exports="create"},function(t,e){t.exports="destroy"},function(t,e){t.exports="pause"},function(t,e){t.exports="postupdate"},function(t,e){t.exports="prerender"},function(t,e){t.exports="preupdate"},function(t,e){t.exports="ready"},function(t,e){t.exports="removedfromscene"},function(t,e){t.exports="render"},function(t,e){t.exports="resume"},function(t,e){t.exports="shutdown"},function(t,e){t.exports="sleep"},function(t,e){t.exports="start"},function(t,e){t.exports="transitioncomplete"},function(t,e){t.exports="transitioninit"},function(t,e){t.exports="transitionout"},function(t,e){t.exports="transitionstart"},function(t,e){t.exports="transitionwake"},function(t,e){t.exports="update"},function(t,e){t.exports="wake"},function(ji,t){!function(){var P,C,O,_,R,L,q,D,K,I,B,v,W,F,Y,E,X,U,H,J,Z,Q,$,et,it,nt,rt,st,ot,at,ht,lt,ct,ut,dt,pt,M,ft,gt,mt,yt,vt,xt,bt,wt,Tt,St,Pt,_t,Et,At,V,Mt,kt,Ct,Ot,i,t,Rt,l,Lt,tt,Dt,e=this&&this.__extends||(P=function(t,e){return(P=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}P(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});function It(t){if(this.animationToMixTime={},this.defaultMix=0,null==t)throw new Error("skeletonData cannot be null.");this.skeletonData=t}function Bt(t,e){void 0===e&&(e=""),this.assets={},this.errors={},this.toLoad=0,this.loaded=0,this.rawDataUris={},this.textureLoader=t,this.pathPrefix=e}function Ft(t){this.atlas=t}function Nt(t,e,i){if(this.children=new Array,this.x=0,this.y=0,this.rotation=0,this.scaleX=0,this.scaleY=0,this.shearX=0,this.shearY=0,this.ax=0,this.ay=0,this.arotation=0,this.ascaleX=0,this.ascaleY=0,this.ashearX=0,this.ashearY=0,this.appliedValid=!1,this.a=0,this.b=0,this.c=0,this.d=0,this.worldY=0,this.worldX=0,this.sorted=!1,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.skeleton=e,this.parent=i,this.setToSetupPose()}function zt(t,e){if(this.bendDirection=0,this.compress=!1,this.stretch=!1,this.mix=1,this.softness=0,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.mix=t.mix,this.softness=t.softness,this.bendDirection=t.bendDirection,this.compress=t.compress,this.stretch=t.stretch,this.bones=new Array;for(var i=0;i<t.bones.length;i++)this.bones.push(e.findBone(t.bones[i].name));this.target=e.findBone(t.target.name)}function Yt(t){t=D.call(this,t,0,!1)||this;return t.bones=new Array,t.bendDirection=1,t.compress=!1,t.stretch=!1,t.uniform=!1,t.mix=1,t.softness=0,t}function Xt(t,e){if(this.position=0,this.spacing=0,this.rotateMix=0,this.translateMix=0,this.spaces=new Array,this.positions=new Array,this.world=new Array,this.curves=new Array,this.lengths=new Array,this.segments=new Array,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.bones=new Array;for(var i=0,n=t.bones.length;i<n;i++)this.bones.push(e.findBone(t.bones[i].name));this.target=e.findSlot(t.target.name),this.position=t.position,this.spacing=t.spacing,this.rotateMix=t.rotateMix,this.translateMix=t.translateMix}function Ut(t){t=I.call(this,t,0,!1)||this;return t.bones=new Array,t}function Vt(t){this.toLoad=new Array,this.assets={},this.clientId=t}function Gt(t){void 0===t&&(t=""),this.clientAssets={},this.queuedAssets={},this.rawAssets={},this.errors={},this.pathPrefix=t}function n(t){if(this._updateCache=new Array,this.updateCacheReset=new Array,this.time=0,this.scaleX=1,this.scaleY=1,this.x=0,this.y=0,null==t)throw new Error("data cannot be null.");this.data=t,this.bones=new Array;for(var e=0;e<t.bones.length;e++){var i,n=t.bones[e],r=void 0;null==n.parent?r=new v.Bone(n,this,null):(i=this.bones[n.parent.index],r=new v.Bone(n,this,i),i.children.push(r)),this.bones.push(r)}for(this.slots=new Array,this.drawOrder=new Array,e=0;e<t.slots.length;e++){var s=t.slots[e],r=this.bones[s.boneData.index],s=new v.Slot(s,r);this.slots.push(s),this.drawOrder.push(s)}for(this.ikConstraints=new Array,e=0;e<t.ikConstraints.length;e++){var o=t.ikConstraints[e];this.ikConstraints.push(new v.IkConstraint(o,this))}for(this.transformConstraints=new Array,e=0;e<t.transformConstraints.length;e++){var a=t.transformConstraints[e];this.transformConstraints.push(new v.TransformConstraint(a,this))}for(this.pathConstraints=new Array,e=0;e<t.pathConstraints.length;e++){var h=t.pathConstraints[e];this.pathConstraints.push(new v.PathConstraint(h,this))}this.color=new v.Color(1,1,1,1),this.updateCache()}function jt(){this.minX=0,this.minY=0,this.maxX=0,this.maxY=0,this.boundingBoxes=new Array,this.polygons=new Array,this.polygonPool=new Je.Pool(function(){return Je.Utils.newFloatArray(16)})}function Wt(){this.triangulator=new W.Triangulator,this.clippingPolygon=new Array,this.clipOutput=new Array,this.clippedVertices=new Array,this.clippedTriangles=new Array,this.scratch=new Array}function Ht(){this.bones=new Array,this.slots=new Array,this.skins=new Array,this.events=new Array,this.animations=new Array,this.ikConstraints=new Array,this.transformConstraints=new Array,this.pathConstraints=new Array,this.fps=0}function Kt(t,e){if(this.deform=new Array,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("bone cannot be null.");this.data=t,this.bone=e,this.color=new F.Color,this.darkColor=null==t.darkColor?null:new F.Color,this.setToSetupPose()}function qt(t,e){if(this.rotateMix=0,this.translateMix=0,this.scaleMix=0,this.shearMix=0,this.temp=new E.Vector2,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.rotateMix=t.rotateMix,this.translateMix=t.translateMix,this.scaleMix=t.scaleMix,this.shearMix=t.shearMix,this.bones=new Array;for(var i=0;i<t.bones.length;i++)this.bones.push(e.findBone(t.bones[i].name));this.target=e.findBone(t.target.name)}function Jt(t){t=X.call(this,t,0,!1)||this;return t.bones=new Array,t.rotateMix=0,t.translateMix=0,t.scaleMix=0,t.shearMix=0,t.offsetRotation=0,t.offsetX=0,t.offsetY=0,t.offsetScaleX=0,t.offsetScaleY=0,t.offsetShearY=0,t.relative=!1,t.local=!1,t}function Zt(){this.convexPolygons=new Array,this.convexPolygonsIndices=new Array,this.indicesArray=new Array,this.isConcaveArray=new Array,this.triangles=new Array,this.polygonPool=new U.Pool(function(){return new Array}),this.polygonIndicesPool=new U.Pool(function(){return new Array})}function Qt(t){t=Z.call(this,t)||this;return t.color=new J.Color(1,1,1,1),t}function $t(t){t=$.call(this,t)||this;return t.color=new Q.Color(.2275,.2275,.8078,1),t}function te(t){t=it.call(this,t)||this;return t.color=new et.Color(1,1,1,1),t.tempColor=new et.Color(0,0,0,0),t}function ee(t){t=rt.call(this,t)||this;return t.closed=!1,t.constantSpeed=!1,t.color=new nt.Color(1,1,1,1),t}function ie(t){t=ot.call(this,t)||this;return t.color=new st.Color(.38,.94,0,1),t}function d(t){t=ht.call(this,t)||this;return t.x=0,t.y=0,t.scaleX=1,t.scaleY=1,t.rotation=0,t.width=0,t.height=0,t.color=new at.Color(1,1,1,1),t.offset=at.Utils.newFloatArray(8),t.uvs=at.Utils.newFloatArray(8),t.tempColor=new at.Color(1,1,1,1),t}function ne(t,e){this.jitterX=0,this.jitterY=0,this.jitterX=t,this.jitterY=e}function re(t){this.centerX=0,this.centerY=0,this.radius=0,this.angle=0,this.worldX=0,this.worldY=0,this.radius=t}function se(t){return dt.call(this,function(t){return new ut.canvas.CanvasTexture(t)},t=void 0===t?"":t)||this}function oe(t){return pt.call(this,t)||this}function ae(t){this.triangleRendering=!1,this.debugRendering=!1,this.vertices=M.Utils.newFloatArray(8192),this.tempColor=new M.Color,this.ctx=t}function he(e,t){return gt.call(this,function(t){return new ft.webgl.GLTexture(e,t)},t=void 0===t?"":t)||this}function le(t,e){this.position=new mt.Vector3(0,0,0),this.direction=new mt.Vector3(0,0,-1),this.up=new mt.Vector3(0,1,0),this.near=0,this.far=100,this.zoom=1,this.viewportWidth=0,this.viewportHeight=0,this.projectionView=new mt.Matrix4,this.inverseProjectionView=new mt.Matrix4,this.projection=new mt.Matrix4,this.view=new mt.Matrix4,this.tmp=new mt.Vector3,this.viewportWidth=t,this.viewportHeight=e,this.update()}function ce(t,e,i){void 0===i&&(i=!1);e=xt.call(this,e)||this;return e.texture=null,e.boundUnit=0,e.useMipMaps=!1,e.context=t instanceof vt.ManagedWebGLRenderingContext?t:new vt.ManagedWebGLRenderingContext(t),e.useMipMaps=i,e.restore(),e.context.addRestorable(e),e}function ue(t,e,i){if(void 0===e&&(e=!0),void 0===i&&(i=10920),this.isDrawing=!1,this.shader=null,this.lastTexture=null,this.verticesLength=0,this.indicesLength=0,10920<i)throw new Error("Can't have more than 10920 triangles per batch: "+i);this.context=t instanceof bt.ManagedWebGLRenderingContext?t:new bt.ManagedWebGLRenderingContext(t);e=e?[new bt.Position2Attribute,new bt.ColorAttribute,new bt.TexCoordAttribute,new bt.Color2Attribute]:[new bt.Position2Attribute,new bt.ColorAttribute,new bt.TexCoordAttribute];this.mesh=new bt.Mesh(t,e,i,3*i),this.srcBlend=this.context.gl.SRC_ALPHA,this.dstBlend=this.context.gl.ONE_MINUS_SRC_ALPHA}function r(t,e,i){void 0===i&&(i=!0),this.twoColorTint=!1,this.activeRenderer=null,this.QUAD=[0,0,1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0,1,1,1,1,0,0],this.QUAD_TRIANGLES=[0,1,2,2,3,0],this.WHITE=new wt.Color(1,1,1,1),this.canvas=t,this.context=e instanceof Tt.ManagedWebGLRenderingContext?e:new Tt.ManagedWebGLRenderingContext(e),this.twoColorTint=i,this.camera=new Tt.OrthoCamera(t.width,t.height),this.batcherShader=i?Tt.Shader.newTwoColoredTextured(this.context):Tt.Shader.newColoredTextured(this.context),this.batcher=new Tt.PolygonBatcher(this.context,i),this.shapesShader=Tt.Shader.newColored(this.context),this.shapes=new Tt.ShapeRenderer(this.context),this.skeletonRenderer=new Tt.SkeletonRenderer(this.context,i),this.skeletonDebugRenderer=new Tt.SkeletonDebugRenderer(this.context)}function s(t,e,i){this.vertexShader=e,this.fragmentShader=i,this.vs=null,this.fs=null,this.program=null,this.tmp2x2=new Float32Array(4),this.tmp3x3=new Float32Array(9),this.tmp4x4=new Float32Array(16),this.vsSource=e,this.fsSource=i,this.context=t instanceof Pt.ManagedWebGLRenderingContext?t:new Pt.ManagedWebGLRenderingContext(t),this.context.addRestorable(this),this.compile()}function o(t,e){if(void 0===e&&(e=10920),this.isDrawing=!1,this.shapeType=At.Filled,this.color=new _t.Color(1,1,1,1),this.vertexIndex=0,this.tmp=new _t.Vector2,10920<e)throw new Error("Can't have more than 10920 triangles per batch: "+e);this.context=t instanceof Et.ManagedWebGLRenderingContext?t:new Et.ManagedWebGLRenderingContext(t),this.mesh=new Et.Mesh(t,[new Et.Position2Attribute,new Et.ColorAttribute],e,0),this.srcBlend=this.context.gl.SRC_ALPHA,this.dstBlend=this.context.gl.ONE_MINUS_SRC_ALPHA}function de(t){this.boneLineColor=new V.Color(1,0,0,1),this.boneOriginColor=new V.Color(0,1,0,1),this.attachmentLineColor=new V.Color(0,0,1,.5),this.triangleLineColor=new V.Color(1,.64,0,.5),this.pathColor=(new V.Color).setFromString("FF7F00"),this.clipColor=new V.Color(.8,0,0,2),this.aabbColor=new V.Color(0,1,0,.5),this.drawBones=!0,this.drawRegionAttachments=!0,this.drawBoundingBoxes=!0,this.drawMeshHull=!0,this.drawMeshTriangles=!0,this.drawPaths=!0,this.drawSkeletonXY=!1,this.drawClipping=!0,this.premultipliedAlpha=!1,this.scale=1,this.boneWidth=2,this.bounds=new V.SkeletonBounds,this.temp=new Array,this.vertices=V.Utils.newFloatArray(2048),this.context=t instanceof Mt.ManagedWebGLRenderingContext?t:new Mt.ManagedWebGLRenderingContext(t)}function pe(t,e){void 0===e&&(e=!0),this.premultipliedAlpha=!1,this.vertexEffect=null,this.tempColor=new kt.Color,this.tempColor2=new kt.Color,this.vertexSize=8,this.twoColorTint=!1,this.renderable=new Ot(null,0,0),this.clipper=new kt.SkeletonClipping,this.temp=new kt.Vector2,this.temp2=new kt.Vector2,this.temp3=new kt.Color,this.temp4=new kt.Color,(this.twoColorTint=e)&&(this.vertexSize+=4),this.vertices=kt.Utils.newFloatArray(1024*this.vertexSize)}function fe(t,e,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),this.x=0,this.y=0,this.z=0,this.x=t,this.y=e,this.z=i}var N=t=t||{};ve.prototype.hasTimeline=function(t){return 1==this.timelineIds[t]},ve.prototype.apply=function(t,e,i,n,r,s,o,a){if(null==t)throw new Error("skeleton cannot be null.");n&&0!=this.duration&&(i%=this.duration,0<e&&(e%=this.duration));for(var h=this.timelines,l=0,c=h.length;l<c;l++)h[l].apply(t,e,i,r,s,o,a)},ve.binarySearch=function(t,e,i){var n=0,r=t.length/(i=void 0===i?1:i)-2;if(0==r)return i;for(var s=r>>>1;;){if(t[(s+1)*i]<=e?n=s+1:r=s,n==r)return(n+1)*i;s=n+r>>>1}},ve.linearSearch=function(t,e,i){for(var n=0,r=t.length-i;n<=r;n+=i)if(t[n]>e)return n;return-1};var z,ge,me,ye=ve;function ve(t,e,i){if(null==t)throw new Error("name cannot be null.");if(null==e)throw new Error("timelines cannot be null.");this.name=t,this.timelines=e,this.timelineIds=[];for(var n=0;n<e.length;n++)this.timelineIds[e[n].getPropertyId()]=!0;this.duration=i}N.Animation=ye,(a=z=N.MixBlend||(N.MixBlend={}))[a.setup=0]="setup",a[a.first=1]="first",a[a.replace=2]="replace",a[a.add=3]="add",(a=ge=N.MixDirection||(N.MixDirection={}))[a.mixIn=0]="mixIn",a[a.mixOut=1]="mixOut",(a=me=N.TimelineType||(N.TimelineType={}))[a.rotate=0]="rotate",a[a.translate=1]="translate",a[a.scale=2]="scale",a[a.shear=3]="shear",a[a.attachment=4]="attachment",a[a.color=5]="color",a[a.deform=6]="deform",a[a.event=7]="event",a[a.drawOrder=8]="drawOrder",a[a.ikConstraint=9]="ikConstraint",a[a.transformConstraint=10]="transformConstraint",a[a.pathConstraintPosition=11]="pathConstraintPosition",a[a.pathConstraintSpacing=12]="pathConstraintSpacing",a[a.pathConstraintMix=13]="pathConstraintMix",a[a.twoColor=14]="twoColor",x.prototype.getFrameCount=function(){return this.curves.length/x.BEZIER_SIZE+1},x.prototype.setLinear=function(t){this.curves[t*x.BEZIER_SIZE]=x.LINEAR},x.prototype.setStepped=function(t){this.curves[t*x.BEZIER_SIZE]=x.STEPPED},x.prototype.getCurveType=function(t){var t=t*x.BEZIER_SIZE;return t==this.curves.length||(t=this.curves[t])==x.LINEAR?x.LINEAR:t==x.STEPPED?x.STEPPED:x.BEZIER},x.prototype.setCurve=function(t,e,i,n,r){var s=.03*(2*-e+n),o=.03*(2*-i+r),a=.006*(3*(e-n)+1),h=.006*(3*(i-r)+1),l=2*s+a,c=2*o+h,u=.3*e+s+.16666667*a,d=.3*i+o+.16666667*h,p=t*x.BEZIER_SIZE,f=this.curves;f[p++]=x.BEZIER;for(var g=u,m=d,y=p+x.BEZIER_SIZE-1;p<y;p+=2)f[p]=g,f[p+1]=m,u+=l,d+=c,l+=a,c+=h,g+=u,m+=d},x.prototype.getCurvePercent=function(t,e){e=N.MathUtils.clamp(e,0,1);var i=this.curves,n=t*x.BEZIER_SIZE,t=i[n];if(t==x.LINEAR)return e;if(t==x.STEPPED)return 0;for(var r,s,o=0,a=++n,h=n+x.BEZIER_SIZE-1;n<h;n+=2)if(e<=(o=i[n]))return s=r=void 0,(s=n==a?r=0:(r=i[n-2],i[n-1]))+(i[n+1]-s)*(e-r)/(o-r);t=i[n-1];return t+(1-t)*(e-o)/(1-o)},x.LINEAR=0,x.STEPPED=1,x.BEZIER=2,x.BEZIER_SIZE=19;var a=x;function x(t){if(t<=0)throw new Error("frameCount must be > 0: "+t);this.curves=N.Utils.newFloatArray((t-1)*x.BEZIER_SIZE)}N.CurveTimeline=a,e(be,xe=a),be.prototype.getPropertyId=function(){return(me.rotate<<24)+this.boneIndex},be.prototype.setFrame=function(t,e,i){this.frames[t<<=1]=e,this.frames[t+be.ROTATION]=i},be.prototype.apply=function(t,e,i,n,r,s,o){var a=this.frames,h=t.bones[this.boneIndex];if(h.active)if(i<a[0])switch(s){case z.setup:return void(h.rotation=h.data.rotation);case z.first:var l=h.data.rotation-h.rotation;h.rotation+=(l-360*(16384-(16384.499999999996-l/360|0)))*r}else if(i>=a[a.length-be.ENTRIES]){var c=a[a.length+be.PREV_ROTATION];switch(s){case z.setup:h.rotation=h.data.rotation+c*r;break;case z.first:case z.replace:c=(c+=h.data.rotation-h.rotation)-360*(16384-(16384.499999999996-c/360|0));case z.add:h.rotation+=c*r}}else{var t=ye.binarySearch(a,i,be.ENTRIES),u=a[t+be.PREV_ROTATION],d=a[t],i=this.getCurvePercent((t>>1)-1,1-(i-d)/(a[t+be.PREV_TIME]-d)),p=u+((p=a[t+be.ROTATION]-u)-360*(16384-(16384.499999999996-p/360|0)))*i;switch(s){case z.setup:h.rotation=h.data.rotation+(p-360*(16384-(16384.499999999996-p/360|0)))*r;break;case z.first:case z.replace:p+=h.data.rotation-h.rotation;case z.add:h.rotation+=(p-360*(16384-(16384.499999999996-p/360|0)))*r}}},be.ENTRIES=2,be.PREV_TIME=-2,be.PREV_ROTATION=-1,be.ROTATION=1;var xe,h=be;function be(t){var e=xe.call(this,t)||this;return e.frames=N.Utils.newFloatArray(t<<1),e}N.RotateTimeline=be,e(p,we=a),p.prototype.getPropertyId=function(){return(me.translate<<24)+this.boneIndex},p.prototype.setFrame=function(t,e,i,n){this.frames[t*=p.ENTRIES]=e,this.frames[t+p.X]=i,this.frames[t+p.Y]=n},p.prototype.apply=function(t,e,i,n,r,s,o){var a=this.frames,h=t.bones[this.boneIndex];if(h.active)if(i<a[0])switch(s){case z.setup:return h.x=h.data.x,void(h.y=h.data.y);case z.first:h.x+=(h.data.x-h.x)*r,h.y+=(h.data.y-h.y)*r}else{var l,c=0,u=0;switch(i>=a[a.length-p.ENTRIES]?(c=a[a.length+p.PREV_X],u=a[a.length+p.PREV_Y]):(c=a[(t=ye.binarySearch(a,i,p.ENTRIES))+p.PREV_X],u=a[t+p.PREV_Y],l=a[t],i=this.getCurvePercent(t/p.ENTRIES-1,1-(i-l)/(a[t+p.PREV_TIME]-l)),c+=(a[t+p.X]-c)*i,u+=(a[t+p.Y]-u)*i),s){case z.setup:h.x=h.data.x+c*r,h.y=h.data.y+u*r;break;case z.first:case z.replace:h.x+=(h.data.x+c-h.x)*r,h.y+=(h.data.y+u-h.y)*r;break;case z.add:h.x+=c*r,h.y+=u*r}}},p.ENTRIES=3,p.PREV_TIME=-3,p.PREV_X=-2,p.PREV_Y=-1,p.X=1,p.Y=2;var we,h=p;function p(t){var e=we.call(this,t)||this;return e.frames=N.Utils.newFloatArray(t*p.ENTRIES),e}N.TranslateTimeline=h,e(Se,Te=h),Se.prototype.getPropertyId=function(){return(me.scale<<24)+this.boneIndex},Se.prototype.apply=function(t,e,i,n,r,s,o){var a=this.frames,h=t.bones[this.boneIndex];if(h.active)if(i<a[0])switch(s){case z.setup:return h.scaleX=h.data.scaleX,void(h.scaleY=h.data.scaleY);case z.first:h.scaleX+=(h.data.scaleX-h.scaleX)*r,h.scaleY+=(h.data.scaleY-h.scaleY)*r}else{var l,c=0,u=0,u=i>=a[a.length-Se.ENTRIES]?(c=a[a.length+Se.PREV_X]*h.data.scaleX,a[a.length+Se.PREV_Y]*h.data.scaleY):(c=a[(t=ye.binarySearch(a,i,Se.ENTRIES))+Se.PREV_X],u=a[t+Se.PREV_Y],l=a[t],i=this.getCurvePercent(t/Se.ENTRIES-1,1-(i-l)/(a[t+Se.PREV_TIME]-l)),c=(c+(a[t+Se.X]-c)*i)*h.data.scaleX,(u+(a[t+Se.Y]-u)*i)*h.data.scaleY);if(1==r)s==z.add?(h.scaleX+=c-h.data.scaleX,h.scaleY+=u-h.data.scaleY):(h.scaleX=c,h.scaleY=u);else{var d=0,p=0;if(o==ge.mixOut)switch(s){case z.setup:d=h.data.scaleX,p=h.data.scaleY,h.scaleX=d+(Math.abs(c)*N.MathUtils.signum(d)-d)*r,h.scaleY=p+(Math.abs(u)*N.MathUtils.signum(p)-p)*r;break;case z.first:case z.replace:d=h.scaleX,p=h.scaleY,h.scaleX=d+(Math.abs(c)*N.MathUtils.signum(d)-d)*r,h.scaleY=p+(Math.abs(u)*N.MathUtils.signum(p)-p)*r;break;case z.add:d=h.scaleX,p=h.scaleY,h.scaleX=d+(Math.abs(c)*N.MathUtils.signum(d)-h.data.scaleX)*r,h.scaleY=p+(Math.abs(u)*N.MathUtils.signum(p)-h.data.scaleY)*r}else switch(s){case z.setup:d=Math.abs(h.data.scaleX)*N.MathUtils.signum(c),p=Math.abs(h.data.scaleY)*N.MathUtils.signum(u),h.scaleX=d+(c-d)*r,h.scaleY=p+(u-p)*r;break;case z.first:case z.replace:d=Math.abs(h.scaleX)*N.MathUtils.signum(c),p=Math.abs(h.scaleY)*N.MathUtils.signum(u),h.scaleX=d+(c-d)*r,h.scaleY=p+(u-p)*r;break;case z.add:d=N.MathUtils.signum(c),p=N.MathUtils.signum(u),h.scaleX=Math.abs(h.scaleX)*d+(c-Math.abs(h.data.scaleX)*d)*r,h.scaleY=Math.abs(h.scaleY)*p+(u-Math.abs(h.data.scaleY)*p)*r}}}};var Te,c=Se;function Se(t){return Te.call(this,t)||this}N.ScaleTimeline=Se,e(_e,Pe=h),_e.prototype.getPropertyId=function(){return(me.shear<<24)+this.boneIndex},_e.prototype.apply=function(t,e,i,n,r,s,o){var a=this.frames,h=t.bones[this.boneIndex];if(h.active)if(i<a[0])switch(s){case z.setup:return h.shearX=h.data.shearX,void(h.shearY=h.data.shearY);case z.first:h.shearX+=(h.data.shearX-h.shearX)*r,h.shearY+=(h.data.shearY-h.shearY)*r}else{var l,c=0,u=0;switch(i>=a[a.length-_e.ENTRIES]?(c=a[a.length+_e.PREV_X],u=a[a.length+_e.PREV_Y]):(c=a[(t=ye.binarySearch(a,i,_e.ENTRIES))+_e.PREV_X],u=a[t+_e.PREV_Y],l=a[t],i=this.getCurvePercent(t/_e.ENTRIES-1,1-(i-l)/(a[t+_e.PREV_TIME]-l)),c+=(a[t+_e.X]-c)*i,u+=(a[t+_e.Y]-u)*i),s){case z.setup:h.shearX=h.data.shearX+c*r,h.shearY=h.data.shearY+u*r;break;case z.first:case z.replace:h.shearX+=(h.data.shearX+c-h.shearX)*r,h.shearY+=(h.data.shearY+u-h.shearY)*r;break;case z.add:h.shearX+=c*r,h.shearY+=u*r}}};var Pe,c=_e;function _e(t){return Pe.call(this,t)||this}N.ShearTimeline=_e,e(m,Ee=a),m.prototype.getPropertyId=function(){return(me.color<<24)+this.slotIndex},m.prototype.setFrame=function(t,e,i,n,r,s){this.frames[t*=m.ENTRIES]=e,this.frames[t+m.R]=i,this.frames[t+m.G]=n,this.frames[t+m.B]=r,this.frames[t+m.A]=s},m.prototype.apply=function(t,e,i,n,r,s,o){var a=t.slots[this.slotIndex];if(a.bone.active){t=this.frames;if(i<t[0])switch(s){case z.setup:return void a.color.setFromColor(a.data.color);case z.first:var h=a.color,l=a.data.color;h.add((l.r-h.r)*r,(l.g-h.g)*r,(l.b-h.b)*r,(l.a-h.a)*r)}else{var c,u,d=0,p=0,f=0,g=0;i>=t[t.length-m.ENTRIES]?(d=t[(c=t.length)+m.PREV_R],p=t[c+m.PREV_G],f=t[c+m.PREV_B],g=t[c+m.PREV_A]):(d=t[(c=ye.binarySearch(t,i,m.ENTRIES))+m.PREV_R],p=t[c+m.PREV_G],f=t[c+m.PREV_B],g=t[c+m.PREV_A],u=t[c],i=this.getCurvePercent(c/m.ENTRIES-1,1-(i-u)/(t[c+m.PREV_TIME]-u)),d+=(t[c+m.R]-d)*i,p+=(t[c+m.G]-p)*i,f+=(t[c+m.B]-f)*i,g+=(t[c+m.A]-g)*i),1==r?a.color.set(d,p,f,g):(h=a.color,s==z.setup&&h.setFromColor(a.data.color),h.add((d-h.r)*r,(p-h.g)*r,(f-h.b)*r,(g-h.a)*r))}}},m.ENTRIES=5,m.PREV_TIME=-5,m.PREV_R=-4,m.PREV_G=-3,m.PREV_B=-2,m.PREV_A=-1,m.R=1,m.G=2,m.B=3,m.A=4;var Ee,h=m;function m(t){var e=Ee.call(this,t)||this;return e.frames=N.Utils.newFloatArray(t*m.ENTRIES),e}N.ColorTimeline=m,e(w,Ae=a),w.prototype.getPropertyId=function(){return(me.twoColor<<24)+this.slotIndex},w.prototype.setFrame=function(t,e,i,n,r,s,o,a,h){this.frames[t*=w.ENTRIES]=e,this.frames[t+w.R]=i,this.frames[t+w.G]=n,this.frames[t+w.B]=r,this.frames[t+w.A]=s,this.frames[t+w.R2]=o,this.frames[t+w.G2]=a,this.frames[t+w.B2]=h},w.prototype.apply=function(t,e,i,n,r,s,o){var a=t.slots[this.slotIndex];if(a.bone.active){t=this.frames;if(i<t[0])switch(s){case z.setup:return a.color.setFromColor(a.data.color),void a.darkColor.setFromColor(a.data.darkColor);case z.first:var h=a.color,l=a.darkColor,c=a.data.color,u=a.data.darkColor;h.add((c.r-h.r)*r,(c.g-h.g)*r,(c.b-h.b)*r,(c.a-h.a)*r),l.add((u.r-l.r)*r,(u.g-l.g)*r,(u.b-l.b)*r,0)}else{var d,p,f=0,g=0,m=0,y=0,v=0,x=0,b=0;i>=t[t.length-w.ENTRIES]?(f=t[(d=t.length)+w.PREV_R],g=t[d+w.PREV_G],m=t[d+w.PREV_B],y=t[d+w.PREV_A],v=t[d+w.PREV_R2],x=t[d+w.PREV_G2],b=t[d+w.PREV_B2]):(f=t[(d=ye.binarySearch(t,i,w.ENTRIES))+w.PREV_R],g=t[d+w.PREV_G],m=t[d+w.PREV_B],y=t[d+w.PREV_A],v=t[d+w.PREV_R2],x=t[d+w.PREV_G2],b=t[d+w.PREV_B2],p=t[d],i=this.getCurvePercent(d/w.ENTRIES-1,1-(i-p)/(t[d+w.PREV_TIME]-p)),f+=(t[d+w.R]-f)*i,g+=(t[d+w.G]-g)*i,m+=(t[d+w.B]-m)*i,y+=(t[d+w.A]-y)*i,v+=(t[d+w.R2]-v)*i,x+=(t[d+w.G2]-x)*i,b+=(t[d+w.B2]-b)*i),1==r?(a.color.set(f,g,m,y),a.darkColor.set(v,x,b,1)):(h=a.color,l=a.darkColor,s==z.setup&&(h.setFromColor(a.data.color),l.setFromColor(a.data.darkColor)),h.add((f-h.r)*r,(g-h.g)*r,(m-h.b)*r,(y-h.a)*r),l.add((v-l.r)*r,(x-l.g)*r,(b-l.b)*r,0))}}},w.ENTRIES=8,w.PREV_TIME=-8,w.PREV_R=-7,w.PREV_G=-6,w.PREV_B=-5,w.PREV_A=-4,w.PREV_R2=-3,w.PREV_G2=-2,w.PREV_B2=-1,w.R=1,w.G=2,w.B=3,w.A=4,w.R2=5,w.G2=6,w.B2=7;var Ae,c=w;function w(t){var e=Ae.call(this,t)||this;return e.frames=N.Utils.newFloatArray(t*w.ENTRIES),e}function Me(t){this.frames=N.Utils.newFloatArray(t),this.attachmentNames=new Array(t)}N.TwoColorTimeline=w,Me.prototype.getPropertyId=function(){return(me.attachment<<24)+this.slotIndex},Me.prototype.getFrameCount=function(){return this.frames.length},Me.prototype.setFrame=function(t,e,i){this.frames[t]=e,this.attachmentNames[t]=i},Me.prototype.apply=function(t,e,i,n,r,s,o){var a=t.slots[this.slotIndex];a.bone.active&&(o!=ge.mixOut?i<(o=this.frames)[0]?s!=z.setup&&s!=z.first||this.setAttachment(t,a,a.data.attachmentName):(o=i>=o[o.length-1]?o.length-1:ye.binarySearch(o,i,1)-1,i=this.attachmentNames[o],t.slots[this.slotIndex].setAttachment(null==i?null:t.getAttachment(this.slotIndex,i))):s==z.setup&&this.setAttachment(t,a,a.data.attachmentName))},Me.prototype.setAttachment=function(t,e,i){e.attachment=null==i?null:t.getAttachment(this.slotIndex,i)},N.AttachmentTimeline=Me;var ke,Ce=null,h=(e(Oe,ke=a),Oe.prototype.getPropertyId=function(){return(me.deform<<27)+ +this.attachment.id+this.slotIndex},Oe.prototype.setFrame=function(t,e,i){this.frames[t]=e,this.frameVertices[t]=i},Oe.prototype.apply=function(t,I,e,B,i,n,F){t=t.slots[this.slotIndex];if(t.bone.active){var r=t.getAttachment();if(r instanceof N.VertexAttachment&&r.deformAttachment==this.attachment){var s=t.deform,t=(0==s.length&&(n=z.setup),this.frameVertices),o=t[0].length,a=this.frames;if(e<a[0]){var h=r;switch(n){case z.setup:return void(s.length=0);case z.first:if(1==i)s.length=0;else{var l=N.Utils.setArraySize(s,o);if(null==h.bones)for(var c=h.vertices,u=0;u<o;u++)l[u]+=(c[u]-l[u])*i;else for(i=1-i,u=0;u<o;u++)l[u]*=i}}}else{var d=N.Utils.setArraySize(s,o);if(e>=a[a.length-1]){var p=t[a.length-1];if(1==i)if(n==z.add)if(null==(h=r).bones)for(var c=h.vertices,f=0;f<o;f++)d[f]+=p[f]-c[f];else for(var g=0;g<o;g++)d[g]+=p[g];else N.Utils.arrayCopy(p,0,d,0,o);else switch(n){case z.setup:if(null==r.bones)for(var c=r.vertices,m=0;m<o;m++){var y=c[m];d[m]=y+(p[m]-y)*i}else for(var v=0;v<o;v++)d[v]=p[v]*i;break;case z.first:case z.replace:for(var x=0;x<o;x++)d[x]+=(p[x]-d[x])*i;break;case z.add:if(null==(h=r).bones)for(var c=h.vertices,b=0;b<o;b++)d[b]+=(p[b]-c[b])*i;else for(var w=0;w<o;w++)d[w]+=p[w]*i}}else{var T=ye.binarySearch(a,e),S=t[T-1],P=t[T],t=a[T],_=this.getCurvePercent(T-1,1-(e-t)/(a[T-1]-t));if(1==i)if(n==z.add)if(null==(h=r).bones)for(var c=h.vertices,E=0;E<o;E++){var A=S[E];d[E]+=A+(P[E]-A)*_-c[E]}else for(var M=0;M<o;M++)A=S[M],d[M]+=A+(P[M]-A)*_;else for(var k=0;k<o;k++)A=S[k],d[k]=A+(P[k]-A)*_;else switch(n){case z.setup:if(null==r.bones)for(var c=r.vertices,C=0;C<o;C++)A=S[C],y=c[C],d[C]=y+(A+(P[C]-A)*_-y)*i;else for(var O=0;O<o;O++)A=S[O],d[O]=(A+(P[O]-A)*_)*i;break;case z.first:case z.replace:for(var R=0;R<o;R++)A=S[R],d[R]+=(A+(P[R]-A)*_-d[R])*i;break;case z.add:if(null==(h=r).bones)for(var c=h.vertices,L=0;L<o;L++)A=S[L],d[L]+=(A+(P[L]-A)*_-c[L])*i;else for(var D=0;D<o;D++)A=S[D],d[D]+=(A+(P[D]-A)*_)*i}}}}}},Oe);function Oe(t){var e=ke.call(this,t)||this;return e.frames=N.Utils.newFloatArray(t),e.frameVertices=new Array(t),null==Ce&&(Ce=N.Utils.newFloatArray(64)),e}function Re(t){this.frames=N.Utils.newFloatArray(t),this.events=new Array(t)}function Le(t){this.frames=N.Utils.newFloatArray(t),this.drawOrders=new Array(t)}N.DeformTimeline=h,Re.prototype.getPropertyId=function(){return me.event<<24},Re.prototype.getFrameCount=function(){return this.frames.length},Re.prototype.setFrame=function(t,e){this.frames[t]=e.time,this.events[t]=e},Re.prototype.apply=function(t,e,i,n,r,s,o){if(null!=n){var a=this.frames,h=this.frames.length;if(i<e)this.apply(t,e,Number.MAX_VALUE,n,r,s,o),e=-1;else if(e>=a[h-1])return;if(!(i<a[0])){var l=0;if(e<a[0])l=0;else for(var c=a[l=ye.binarySearch(a,e)];0<l&&a[l-1]==c;)l--;for(;l<h&&i>=a[l];l++)n.push(this.events[l])}}},N.EventTimeline=Re,Le.prototype.getPropertyId=function(){return me.drawOrder<<24},Le.prototype.getFrameCount=function(){return this.frames.length},Le.prototype.setFrame=function(t,e,i){this.frames[t]=e,this.drawOrders[t]=i},Le.prototype.apply=function(t,e,i,n,r,s,o){var a=t.drawOrder,h=t.slots;if(o!=ge.mixOut){o=this.frames;if(i<o[0])s!=z.setup&&s!=z.first||N.Utils.arrayCopy(t.slots,0,t.drawOrder,0,t.slots.length);else{var o=i>=o[o.length-1]?o.length-1:ye.binarySearch(o,i)-1,l=this.drawOrders[o];if(null==l)N.Utils.arrayCopy(h,0,a,0,h.length);else for(var c=0,u=l.length;c<u;c++)a[c]=h[l[c]]}}else s==z.setup&&N.Utils.arrayCopy(t.slots,0,t.drawOrder,0,t.slots.length)},N.DrawOrderTimeline=Le,e(f,De=a),f.prototype.getPropertyId=function(){return(me.ikConstraint<<24)+this.ikConstraintIndex},f.prototype.setFrame=function(t,e,i,n,r,s,o){this.frames[t*=f.ENTRIES]=e,this.frames[t+f.MIX]=i,this.frames[t+f.SOFTNESS]=n,this.frames[t+f.BEND_DIRECTION]=r,this.frames[t+f.COMPRESS]=s?1:0,this.frames[t+f.STRETCH]=o?1:0},f.prototype.apply=function(t,e,i,n,r,s,o){var a,h,l,c=this.frames,u=t.ikConstraints[this.ikConstraintIndex];if(u.active)if(i<c[0])switch(s){case z.setup:return u.mix=u.data.mix,u.softness=u.data.softness,u.bendDirection=u.data.bendDirection,u.compress=u.data.compress,void(u.stretch=u.data.stretch);case z.first:u.mix+=(u.data.mix-u.mix)*r,u.softness+=(u.data.softness-u.softness)*r,u.bendDirection=u.data.bendDirection,u.compress=u.data.compress,u.stretch=u.data.stretch}else i>=c[c.length-f.ENTRIES]?s==z.setup?(u.mix=u.data.mix+(c[c.length+f.PREV_MIX]-u.data.mix)*r,u.softness=u.data.softness+(c[c.length+f.PREV_SOFTNESS]-u.data.softness)*r,o==ge.mixOut?(u.bendDirection=u.data.bendDirection,u.compress=u.data.compress,u.stretch=u.data.stretch):(u.bendDirection=c[c.length+f.PREV_BEND_DIRECTION],u.compress=0!=c[c.length+f.PREV_COMPRESS],u.stretch=0!=c[c.length+f.PREV_STRETCH])):(u.mix+=(c[c.length+f.PREV_MIX]-u.mix)*r,u.softness+=(c[c.length+f.PREV_SOFTNESS]-u.softness)*r,o==ge.mixIn&&(u.bendDirection=c[c.length+f.PREV_BEND_DIRECTION],u.compress=0!=c[c.length+f.PREV_COMPRESS],u.stretch=0!=c[c.length+f.PREV_STRETCH])):(a=c[(t=ye.binarySearch(c,i,f.ENTRIES))+f.PREV_MIX],h=c[t+f.PREV_SOFTNESS],l=c[t],i=this.getCurvePercent(t/f.ENTRIES-1,1-(i-l)/(c[t+f.PREV_TIME]-l)),s==z.setup?(u.mix=u.data.mix+(a+(c[t+f.MIX]-a)*i-u.data.mix)*r,u.softness=u.data.softness+(h+(c[t+f.SOFTNESS]-h)*i-u.data.softness)*r,o==ge.mixOut?(u.bendDirection=u.data.bendDirection,u.compress=u.data.compress,u.stretch=u.data.stretch):(u.bendDirection=c[t+f.PREV_BEND_DIRECTION],u.compress=0!=c[t+f.PREV_COMPRESS],u.stretch=0!=c[t+f.PREV_STRETCH])):(u.mix+=(a+(c[t+f.MIX]-a)*i-u.mix)*r,u.softness+=(h+(c[t+f.SOFTNESS]-h)*i-u.softness)*r,o==ge.mixIn&&(u.bendDirection=c[t+f.PREV_BEND_DIRECTION],u.compress=0!=c[t+f.PREV_COMPRESS],u.stretch=0!=c[t+f.PREV_STRETCH])))},f.ENTRIES=6,f.PREV_TIME=-6,f.PREV_MIX=-5,f.PREV_SOFTNESS=-4,f.PREV_BEND_DIRECTION=-3,f.PREV_COMPRESS=-2,f.PREV_STRETCH=-1,f.MIX=1,f.SOFTNESS=2,f.BEND_DIRECTION=3,f.COMPRESS=4,f.STRETCH=5;var De,c=f;function f(t){var e=De.call(this,t)||this;return e.frames=N.Utils.newFloatArray(t*f.ENTRIES),e}N.IkConstraintTimeline=f,e(g,Ie=a),g.prototype.getPropertyId=function(){return(me.transformConstraint<<24)+this.transformConstraintIndex},g.prototype.setFrame=function(t,e,i,n,r,s){this.frames[t*=g.ENTRIES]=e,this.frames[t+g.ROTATE]=i,this.frames[t+g.TRANSLATE]=n,this.frames[t+g.SCALE]=r,this.frames[t+g.SHEAR]=s},g.prototype.apply=function(t,e,i,n,r,s,o){var a=this.frames,h=t.transformConstraints[this.transformConstraintIndex];if(h.active)if(i<a[0]){var l=h.data;switch(s){case z.setup:return h.rotateMix=l.rotateMix,h.translateMix=l.translateMix,h.scaleMix=l.scaleMix,void(h.shearMix=l.shearMix);case z.first:h.rotateMix+=(l.rotateMix-h.rotateMix)*r,h.translateMix+=(l.translateMix-h.translateMix)*r,h.scaleMix+=(l.scaleMix-h.scaleMix)*r,h.shearMix+=(l.shearMix-h.shearMix)*r}}else{var c,u,t=0,d=0,p=0,f=0;i>=a[a.length-g.ENTRIES]?(t=a[(c=a.length)+g.PREV_ROTATE],d=a[c+g.PREV_TRANSLATE],p=a[c+g.PREV_SCALE],f=a[c+g.PREV_SHEAR]):(t=a[(c=ye.binarySearch(a,i,g.ENTRIES))+g.PREV_ROTATE],d=a[c+g.PREV_TRANSLATE],p=a[c+g.PREV_SCALE],f=a[c+g.PREV_SHEAR],u=a[c],i=this.getCurvePercent(c/g.ENTRIES-1,1-(i-u)/(a[c+g.PREV_TIME]-u)),t+=(a[c+g.ROTATE]-t)*i,d+=(a[c+g.TRANSLATE]-d)*i,p+=(a[c+g.SCALE]-p)*i,f+=(a[c+g.SHEAR]-f)*i),s==z.setup?(l=h.data,h.rotateMix=l.rotateMix+(t-l.rotateMix)*r,h.translateMix=l.translateMix+(d-l.translateMix)*r,h.scaleMix=l.scaleMix+(p-l.scaleMix)*r,h.shearMix=l.shearMix+(f-l.shearMix)*r):(h.rotateMix+=(t-h.rotateMix)*r,h.translateMix+=(d-h.translateMix)*r,h.scaleMix+=(p-h.scaleMix)*r,h.shearMix+=(f-h.shearMix)*r)}},g.ENTRIES=5,g.PREV_TIME=-5,g.PREV_ROTATE=-4,g.PREV_TRANSLATE=-3,g.PREV_SCALE=-2,g.PREV_SHEAR=-1,g.ROTATE=1,g.TRANSLATE=2,g.SCALE=3,g.SHEAR=4;var Ie,h=g;function g(t){var e=Ie.call(this,t)||this;return e.frames=N.Utils.newFloatArray(t*g.ENTRIES),e}N.TransformConstraintTimeline=g,e(u,Be=a),u.prototype.getPropertyId=function(){return(me.pathConstraintPosition<<24)+this.pathConstraintIndex},u.prototype.setFrame=function(t,e,i){this.frames[t*=u.ENTRIES]=e,this.frames[t+u.VALUE]=i},u.prototype.apply=function(t,e,i,n,r,s,o){var a=this.frames,h=t.pathConstraints[this.pathConstraintIndex];if(h.active)if(i<a[0])switch(s){case z.setup:return void(h.position=h.data.position);case z.first:h.position+=(h.data.position-h.position)*r}else{var l,c,t=0;i>=a[a.length-u.ENTRIES]?t=a[a.length+u.PREV_VALUE]:(t=a[(l=ye.binarySearch(a,i,u.ENTRIES))+u.PREV_VALUE],c=a[l],i=this.getCurvePercent(l/u.ENTRIES-1,1-(i-c)/(a[l+u.PREV_TIME]-c)),t+=(a[l+u.VALUE]-t)*i),s==z.setup?h.position=h.data.position+(t-h.data.position)*r:h.position+=(t-h.position)*r}},u.ENTRIES=2,u.PREV_TIME=-2,u.PREV_VALUE=-1,u.VALUE=1;var Be,c=u;function u(t){var e=Be.call(this,t)||this;return e.frames=N.Utils.newFloatArray(t*u.ENTRIES),e}N.PathConstraintPositionTimeline=c,e(Ne,Fe=c),Ne.prototype.getPropertyId=function(){return(me.pathConstraintSpacing<<24)+this.pathConstraintIndex},Ne.prototype.apply=function(t,e,i,n,r,s,o){var a=this.frames,h=t.pathConstraints[this.pathConstraintIndex];if(h.active)if(i<a[0])switch(s){case z.setup:return void(h.spacing=h.data.spacing);case z.first:h.spacing+=(h.data.spacing-h.spacing)*r}else{var l,c,t=0;i>=a[a.length-Ne.ENTRIES]?t=a[a.length+Ne.PREV_VALUE]:(t=a[(l=ye.binarySearch(a,i,Ne.ENTRIES))+Ne.PREV_VALUE],c=a[l],i=this.getCurvePercent(l/Ne.ENTRIES-1,1-(i-c)/(a[l+Ne.PREV_TIME]-c)),t+=(a[l+Ne.VALUE]-t)*i),s==z.setup?h.spacing=h.data.spacing+(t-h.data.spacing)*r:h.spacing+=(t-h.spacing)*r}};var Fe,h=Ne;function Ne(t){return Fe.call(this,t)||this}N.PathConstraintSpacingTimeline=Ne,e(y,ze=a),y.prototype.getPropertyId=function(){return(me.pathConstraintMix<<24)+this.pathConstraintIndex},y.prototype.setFrame=function(t,e,i,n){this.frames[t*=y.ENTRIES]=e,this.frames[t+y.ROTATE]=i,this.frames[t+y.TRANSLATE]=n},y.prototype.apply=function(t,e,i,n,r,s,o){var a=this.frames,h=t.pathConstraints[this.pathConstraintIndex];if(h.active)if(i<a[0])switch(s){case z.setup:return h.rotateMix=h.data.rotateMix,void(h.translateMix=h.data.translateMix);case z.first:h.rotateMix+=(h.data.rotateMix-h.rotateMix)*r,h.translateMix+=(h.data.translateMix-h.translateMix)*r}else{var l,c,t=0,u=0;i>=a[a.length-y.ENTRIES]?(t=a[a.length+y.PREV_ROTATE],u=a[a.length+y.PREV_TRANSLATE]):(t=a[(l=ye.binarySearch(a,i,y.ENTRIES))+y.PREV_ROTATE],u=a[l+y.PREV_TRANSLATE],c=a[l],i=this.getCurvePercent(l/y.ENTRIES-1,1-(i-c)/(a[l+y.PREV_TIME]-c)),t+=(a[l+y.ROTATE]-t)*i,u+=(a[l+y.TRANSLATE]-u)*i),s==z.setup?(h.rotateMix=h.data.rotateMix+(t-h.data.rotateMix)*r,h.translateMix=h.data.translateMix+(u-h.data.translateMix)*r):(h.rotateMix+=(t-h.rotateMix)*r,h.translateMix+=(u-h.translateMix)*r)}},y.ENTRIES=3,y.PREV_TIME=-3,y.PREV_ROTATE=-2,y.PREV_TRANSLATE=-1,y.ROTATE=1,y.TRANSLATE=2;var ze,c=y;function y(t){var e=ze.call(this,t)||this;return e.frames=N.Utils.newFloatArray(t*y.ENTRIES),e}N.PathConstraintMixTimeline=y;var A=t=t||{},h=(k.prototype.update=function(t){t*=this.timeScale;for(var e=this.tracks,i=0,n=e.length;i<n;i++){var r=e[i];if(null!=r){r.animationLast=r.nextAnimationLast,r.trackLast=r.nextTrackLast;var s=t*r.timeScale;if(0<r.delay){if(r.delay-=s,0<r.delay)continue;s=-r.delay,r.delay=0}var o=r.next;if(null!=o){var a=r.trackLast-o.delay;if(0<=a){for(o.delay=0,o.trackTime+=0==r.timeScale?0:(a/r.timeScale+t)*o.timeScale,r.trackTime+=s,this.setCurrent(i,o,!0);null!=o.mixingFrom;)o.mixTime+=t,o=o.mixingFrom;continue}}else if(r.trackLast>=r.trackEnd&&null==r.mixingFrom){e[i]=null,this.queue.end(r),this.disposeNext(r);continue}if(null!=r.mixingFrom&&this.updateMixingFrom(r,t)){var h=r.mixingFrom;for((r.mixingFrom=null)!=h&&(h.mixingTo=null);null!=h;)this.queue.end(h),h=h.mixingFrom}r.trackTime+=s}}this.queue.drain()},k.prototype.updateMixingFrom=function(t,e){var i,n=t.mixingFrom;return null==n||(i=this.updateMixingFrom(n,e),n.animationLast=n.nextAnimationLast,n.trackLast=n.nextTrackLast,0<t.mixTime&&t.mixTime>=t.mixDuration?(0!=n.totalAlpha&&0!=t.mixDuration||(t.mixingFrom=n.mixingFrom,null!=n.mixingFrom&&(n.mixingFrom.mixingTo=t),t.interruptAlpha=n.interruptAlpha,this.queue.end(n)),i):(n.trackTime+=e*n.timeScale,t.mixTime+=e,!1))},k.prototype.apply=function(t){if(null==t)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();for(var e=this.events,i=this.tracks,n=!1,r=0,s=i.length;r<s;r++){var o=i[r];if(!(null==o||0<o.delay)){var n=!0,a=0==r?A.MixBlend.first:o.mixBlend,h=o.alpha,l=(null!=o.mixingFrom?h*=this.applyMixingFrom(o,t,a):o.trackTime>=o.trackEnd&&null==o.next&&(h=0),o.animationLast),c=o.getAnimationTime(),u=o.animation.timelines.length,d=o.animation.timelines;if(0==r&&1==h||a==A.MixBlend.add)for(var p=0;p<u;p++){A.Utils.webkit602BugfixHelper(h,a);var f=d[p];f instanceof A.AttachmentTimeline?this.applyAttachmentTimeline(f,t,c,a,!0):f.apply(t,l,c,e,h,a,A.MixDirection.mixIn)}else{var g=o.timelineMode,m=0==o.timelinesRotation.length;m&&A.Utils.setArraySize(o.timelinesRotation,u<<1,null);for(var y=o.timelinesRotation,p=0;p<u;p++){var v=d[p],x=g[p]==k.SUBSEQUENT?a:A.MixBlend.setup;v instanceof A.RotateTimeline?this.applyRotateTimeline(v,t,c,h,x,y,p<<1,m):v instanceof A.AttachmentTimeline?this.applyAttachmentTimeline(v,t,c,a,!0):(A.Utils.webkit602BugfixHelper(h,a),v.apply(t,l,c,e,h,x,A.MixDirection.mixIn))}}this.queueEvents(o,c),e.length=0,o.nextAnimationLast=c,o.nextTrackLast=o.trackTime}}for(var b=this.unkeyedState+k.SETUP,w=t.slots,T=0,S=t.slots.length;T<S;T++){var P,_=w[T];_.attachmentState==b&&(P=_.data.attachmentName,_.attachment=null==P?null:t.getAttachment(_.data.index,P))}return this.unkeyedState+=2,this.queue.drain(),n},k.prototype.applyMixingFrom=function(t,e,i){var n=t.mixingFrom,r=(null!=n.mixingFrom&&this.applyMixingFrom(n,e,i),0),s=(0==t.mixDuration?(r=1,i==A.MixBlend.first&&(i=A.MixBlend.setup)):(1<(r=t.mixTime/t.mixDuration)&&(r=1),i!=A.MixBlend.first&&(i=n.mixBlend)),r<n.eventThreshold?this.events:null),o=r<n.attachmentThreshold,a=r<n.drawOrderThreshold,h=n.animationLast,l=n.getAnimationTime(),c=n.animation.timelines.length,u=n.animation.timelines,d=n.alpha*t.interruptAlpha,p=d*(1-r);if(i==A.MixBlend.add)for(var f=0;f<c;f++)u[f].apply(e,h,l,s,p,i,A.MixDirection.mixOut);else{var g=n.timelineMode,m=n.timelineHoldMix,y=0==n.timelinesRotation.length;y&&A.Utils.setArraySize(n.timelinesRotation,c<<1,null);for(var v=n.timelinesRotation,f=n.totalAlpha=0;f<c;f++){var x=u[f],b=A.MixDirection.mixOut,w=void 0,T=0;switch(g[f]){case k.SUBSEQUENT:if(!a&&x instanceof A.DrawOrderTimeline)continue;w=i,T=p;break;case k.FIRST:w=A.MixBlend.setup,T=p;break;case k.HOLD_SUBSEQUENT:w=i,T=d;break;case k.HOLD_FIRST:w=A.MixBlend.setup,T=d;break;default:var w=A.MixBlend.setup,S=m[f],T=d*Math.max(0,1-S.mixTime/S.mixDuration)}n.totalAlpha+=T,x instanceof A.RotateTimeline?this.applyRotateTimeline(x,e,l,T,w,v,f<<1,y):x instanceof A.AttachmentTimeline?this.applyAttachmentTimeline(x,e,l,w,o):(A.Utils.webkit602BugfixHelper(T,i),a&&x instanceof A.DrawOrderTimeline&&w==A.MixBlend.setup&&(b=A.MixDirection.mixIn),x.apply(e,h,l,s,T,w,b))}}return 0<t.mixDuration&&this.queueEvents(n,l),this.events.length=0,n.nextAnimationLast=l,n.nextTrackLast=n.trackTime,r},k.prototype.applyAttachmentTimeline=function(t,e,i,n,r){var s,o=e.slots[t.slotIndex];o.bone.active&&(i<(s=t.frames)[0]?n!=A.MixBlend.setup&&n!=A.MixBlend.first||this.setAttachment(e,o,o.data.attachmentName,r):(n=i>=s[s.length-1]?s.length-1:A.Animation.binarySearch(s,i)-1,this.setAttachment(e,o,t.attachmentNames[n],r)),o.attachmentState<=this.unkeyedState&&(o.attachmentState=this.unkeyedState+k.SETUP))},k.prototype.setAttachment=function(t,e,i,n){e.attachment=null==i?null:t.getAttachment(e.data.index,i),n&&(e.attachmentState=this.unkeyedState+k.CURRENT)},k.prototype.applyRotateTimeline=function(t,e,i,n,r,s,o,a){if(a&&(s[o]=0),1!=n){var h=t,l=h.frames,c=e.bones[h.boneIndex];if(c.active){var u=0,d=0;if(i<l[0])switch(r){case A.MixBlend.setup:c.rotation=c.data.rotation;default:return;case A.MixBlend.first:u=c.rotation,d=c.data.rotation}else{u=(r==A.MixBlend.setup?c.data:c).rotation;i>=l[l.length-A.RotateTimeline.ENTRIES]?d=c.data.rotation+l[l.length+A.RotateTimeline.PREV_ROTATION]:(f=l[(p=A.Animation.binarySearch(l,i,A.RotateTimeline.ENTRIES))+A.RotateTimeline.PREV_ROTATION],g=l[p],h=h.getCurvePercent((p>>1)-1,1-(i-g)/(l[p+A.RotateTimeline.PREV_TIME]-g)),d=l[p+A.RotateTimeline.ROTATION]-f,d=f+(d-=360*(16384-(16384.499999999996-d/360|0)))*h+c.data.rotation,d-=360*(16384-(16384.499999999996-d/360|0)))}var p,f,g=0,l=d-u;0==(l-=360*(16384-(16384.499999999996-l/360|0)))?g=s[o]:(p=0,f=a?(p=0,l):(p=s[o],s[o+1]),h=0<l,a=0<=p,A.MathUtils.signum(f)!=A.MathUtils.signum(l)&&Math.abs(f)<=90&&(180<Math.abs(p)&&(p+=360*A.MathUtils.signum(p)),a=h),g=l+p-p%360,a!=h&&(g+=360*A.MathUtils.signum(p)),s[o]=g),s[o+1]=l,c.rotation=(u+=g*n)-360*(16384-(16384.499999999996-u/360|0))}}else t.apply(e,0,i,null,1,r,A.MixDirection.mixIn)},k.prototype.queueEvents=function(t,e){for(var i=t.animationStart,n=t.animationEnd,r=n-i,s=t.trackLast%r,o=this.events,a=0,h=o.length;a<h;a++){var l=o[a];if(l.time<s)break;l.time>n||this.queue.event(t,l)}for((t.loop?0==r||s>t.trackTime%r:n<=e&&t.animationLast<n)&&this.queue.complete(t);a<h;a++)o[a].time<i||this.queue.event(t,o[a])},k.prototype.clearTracks=function(){var t=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(var e=0,i=this.tracks.length;e<i;e++)this.clearTrack(e);this.tracks.length=0,this.queue.drainDisabled=t,this.queue.drain()},k.prototype.clearTrack=function(t){if(!(t>=this.tracks.length)){t=this.tracks[t];if(null!=t){this.queue.end(t),this.disposeNext(t);for(var e=t;;){var i=e.mixingFrom;if(null==i)break;this.queue.end(i),e.mixingFrom=null,e.mixingTo=null,e=i}this.tracks[t.trackIndex]=null,this.queue.drain()}}},k.prototype.setCurrent=function(t,e,i){var n=this.expandToIndex(t);this.tracks[t]=e,null!=n&&(i&&this.queue.interrupt(n),((e.mixingFrom=n).mixingTo=e).mixTime=0,null!=n.mixingFrom&&0<n.mixDuration&&(e.interruptAlpha*=Math.min(1,n.mixTime/n.mixDuration)),n.timelinesRotation.length=0),this.queue.start(e)},k.prototype.setAnimation=function(t,e,i){var n=this.data.skeletonData.findAnimation(e);if(null==n)throw new Error("Animation not found: "+e);return this.setAnimationWith(t,n,i)},k.prototype.setAnimationWith=function(t,e,i){if(null==e)throw new Error("animation cannot be null.");var n=!0,r=this.expandToIndex(t),e=(null!=r&&(-1==r.nextTrackLast?(this.tracks[t]=r.mixingFrom,this.queue.interrupt(r),this.queue.end(r),this.disposeNext(r),r=r.mixingFrom,n=!1):this.disposeNext(r)),this.trackEntry(t,e,i,r));return this.setCurrent(t,e,n),this.queue.drain(),e},k.prototype.addAnimation=function(t,e,i,n){var r=this.data.skeletonData.findAnimation(e);if(null==r)throw new Error("Animation not found: "+e);return this.addAnimationWith(t,r,i,n)},k.prototype.addAnimationWith=function(t,e,i,n){if(null==e)throw new Error("animation cannot be null.");var r=this.expandToIndex(t);if(null!=r)for(;null!=r.next;)r=r.next;i=this.trackEntry(t,e,i,r);return null==r?(this.setCurrent(t,i,!0),this.queue.drain()):(r.next=i,n<=0&&(0!=(t=r.animationEnd-r.animationStart)?(r.loop?n+=t*(1+(r.trackTime/t|0)):n+=Math.max(t,r.trackTime),n-=this.data.getMix(r.animation,e)):n=r.trackTime)),i.delay=n,i},k.prototype.setEmptyAnimation=function(t,e){t=this.setAnimationWith(t,k.emptyAnimation,!1);return t.mixDuration=e,t.trackEnd=e,t},k.prototype.addEmptyAnimation=function(t,e,i){i<=0&&(i-=e);t=this.addAnimationWith(t,k.emptyAnimation,!1,i);return t.mixDuration=e,t.trackEnd=e,t},k.prototype.setEmptyAnimations=function(t){var e=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(var i=0,n=this.tracks.length;i<n;i++){var r=this.tracks[i];null!=r&&this.setEmptyAnimation(r.trackIndex,t)}this.queue.drainDisabled=e,this.queue.drain()},k.prototype.expandToIndex=function(t){return t<this.tracks.length?this.tracks[t]:(A.Utils.ensureArrayCapacity(this.tracks,t+1,null),this.tracks.length=t+1,null)},k.prototype.trackEntry=function(t,e,i,n){var r=this.trackEntryPool.obtain();return r.trackIndex=t,r.animation=e,r.loop=i,r.holdPrevious=!1,r.eventThreshold=0,r.attachmentThreshold=0,r.drawOrderThreshold=0,r.animationStart=0,r.animationEnd=e.duration,r.animationLast=-1,r.nextAnimationLast=-1,r.delay=0,r.trackTime=0,r.trackLast=-1,r.nextTrackLast=-1,r.trackEnd=Number.MAX_VALUE,r.timeScale=1,r.alpha=1,r.interruptAlpha=1,r.mixTime=0,r.mixDuration=null==n?0:this.data.getMix(n.animation,e),r.mixBlend=A.MixBlend.replace,r},k.prototype.disposeNext=function(t){for(var e=t.next;null!=e;)this.queue.dispose(e),e=e.next;t.next=null},k.prototype._animationsChanged=function(){this.animationsChanged=!1,this.propertyIDs.clear();for(var t=0,e=this.tracks.length;t<e;t++){var i=this.tracks[t];if(null!=i){for(;null!=i.mixingFrom;)i=i.mixingFrom;for(;null!=i.mixingFrom&&i.mixBlend==A.MixBlend.add||this.computeHold(i),null!=(i=i.mixingTo););}}},k.prototype.computeHold=function(t){var e=t.mixingTo,i=t.animation.timelines,n=t.animation.timelines.length,r=A.Utils.setArraySize(t.timelineMode,n),s=(t.timelineHoldMix.length=0,A.Utils.setArraySize(t.timelineHoldMix,n)),o=this.propertyIDs;if(null!=e&&e.holdPrevious)for(var a=0;a<n;a++)r[a]=o.add(i[a].getPropertyId())?k.HOLD_FIRST:k.HOLD_SUBSEQUENT;else t:for(a=0;a<n;a++){var h=i[a],l=h.getPropertyId();if(o.add(l))if(null==e||h instanceof A.AttachmentTimeline||h instanceof A.DrawOrderTimeline||h instanceof A.EventTimeline||!e.animation.hasTimeline(l))r[a]=k.FIRST;else{for(var c=e.mixingTo;null!=c;c=c.mixingTo)if(!c.animation.hasTimeline(l)){if(0<t.mixDuration){r[a]=k.HOLD_MIX,s[a]=c;continue t}break}r[a]=k.HOLD_FIRST}else r[a]=k.SUBSEQUENT}},k.prototype.getCurrent=function(t){return t>=this.tracks.length?null:this.tracks[t]},k.prototype.addListener=function(t){if(null==t)throw new Error("listener cannot be null.");this.listeners.push(t)},k.prototype.removeListener=function(t){t=this.listeners.indexOf(t);0<=t&&this.listeners.splice(t,1)},k.prototype.clearListeners=function(){this.listeners.length=0},k.prototype.clearListenerNotifications=function(){this.queue.clear()},k.emptyAnimation=new A.Animation("<empty>",[],0),k.SUBSEQUENT=0,k.FIRST=1,k.HOLD_SUBSEQUENT=2,k.HOLD_FIRST=3,k.HOLD_MIX=4,k.SETUP=1,k.CURRENT=2,k);function k(t){this.tracks=new Array,this.timeScale=1,this.unkeyedState=0,this.events=new Array,this.listeners=new Array,this.queue=new Ve(this),this.propertyIDs=new A.IntSet,this.animationsChanged=!1,this.trackEntryPool=new A.Pool(function(){return new Ye}),this.data=t}A.AnimationState=h,Xe.prototype.reset=function(){this.next=null,this.mixingFrom=null,this.mixingTo=null,this.animation=null,this.listener=null,this.timelineMode.length=0,this.timelineHoldMix.length=0,this.timelinesRotation.length=0},Xe.prototype.getAnimationTime=function(){var t;return this.loop?0==(t=this.animationEnd-this.animationStart)?this.animationStart:this.trackTime%t+this.animationStart:Math.min(this.trackTime+this.animationStart,this.animationEnd)},Xe.prototype.setAnimationLast=function(t){this.animationLast=t,this.nextAnimationLast=t},Xe.prototype.isComplete=function(){return this.trackTime>=this.animationEnd-this.animationStart},Xe.prototype.resetRotationDirections=function(){this.timelinesRotation.length=0};var Ye=Xe;function Xe(){this.mixBlend=A.MixBlend.replace,this.timelineMode=new Array,this.timelineHoldMix=new Array,this.timelinesRotation=new Array}A.TrackEntry=Ye,Ge.prototype.start=function(t){this.objects.push(Ue.start),this.objects.push(t),this.animState.animationsChanged=!0},Ge.prototype.interrupt=function(t){this.objects.push(Ue.interrupt),this.objects.push(t)},Ge.prototype.end=function(t){this.objects.push(Ue.end),this.objects.push(t),this.animState.animationsChanged=!0},Ge.prototype.dispose=function(t){this.objects.push(Ue.dispose),this.objects.push(t)},Ge.prototype.complete=function(t){this.objects.push(Ue.complete),this.objects.push(t)},Ge.prototype.event=function(t,e){this.objects.push(Ue.event),this.objects.push(t),this.objects.push(e)},Ge.prototype.drain=function(){if(!this.drainDisabled){this.drainDisabled=!0;for(var t=this.objects,e=this.animState.listeners,i=0;i<t.length;i+=2){var n=t[i],r=t[i+1];switch(n){case Ue.start:null!=r.listener&&r.listener.start&&r.listener.start(r);for(var s=0;s<e.length;s++)e[s].start&&e[s].start(r);break;case Ue.interrupt:for(null!=r.listener&&r.listener.interrupt&&r.listener.interrupt(r),s=0;s<e.length;s++)e[s].interrupt&&e[s].interrupt(r);break;case Ue.end:for(null!=r.listener&&r.listener.end&&r.listener.end(r),s=0;s<e.length;s++)e[s].end&&e[s].end(r);case Ue.dispose:for(null!=r.listener&&r.listener.dispose&&r.listener.dispose(r),s=0;s<e.length;s++)e[s].dispose&&e[s].dispose(r);this.animState.trackEntryPool.free(r);break;case Ue.complete:for(null!=r.listener&&r.listener.complete&&r.listener.complete(r),s=0;s<e.length;s++)e[s].complete&&e[s].complete(r);break;case Ue.event:var o=t[2+i++];for(null!=r.listener&&r.listener.event&&r.listener.event(r,o),s=0;s<e.length;s++)e[s].event&&e[s].event(r,o)}}this.clear(),this.drainDisabled=!1}},Ge.prototype.clear=function(){this.objects.length=0};var Ue,Ve=Ge;function Ge(t){this.objects=[],this.drainDisabled=!1,this.animState=t}function je(){}A.EventQueue=Ve,(h=Ue=A.EventType||(A.EventType={}))[h.start=0]="start",h[h.interrupt=1]="interrupt",h[h.end=2]="end",h[h.dispose=3]="dispose",h[h.complete=4]="complete",h[h.event=5]="event",je.prototype.start=function(t){},je.prototype.interrupt=function(t){},je.prototype.end=function(t){},je.prototype.dispose=function(t){},je.prototype.complete=function(t){},je.prototype.event=function(t,e){},A.AnimationStateAdapter=je,a=t=t||{},It.prototype.setMix=function(t,e,i){var n=this.skeletonData.findAnimation(t);if(null==n)throw new Error("Animation not found: "+t);t=this.skeletonData.findAnimation(e);if(null==t)throw new Error("Animation not found: "+e);this.setMixWith(n,t,i)},It.prototype.setMixWith=function(t,e,i){if(null==t)throw new Error("from cannot be null.");if(null==e)throw new Error("to cannot be null.");t=t.name+"."+e.name;this.animationToMixTime[t]=i},It.prototype.getMix=function(t,e){t=t.name+"."+e.name,e=this.animationToMixTime[t];return void 0===e?this.defaultMix:e},a.AnimationStateData=It,C=t=t||{},Bt.prototype.downloadText=function(t,e,i){var n=new XMLHttpRequest;n.overrideMimeType("text/html"),this.rawDataUris[t]&&(t=this.rawDataUris[t]),n.open("GET",t,!0),n.onload=function(){200==n.status?e(n.responseText):i(n.status,n.responseText)},n.onerror=function(){i(n.status,n.responseText)},n.send()},Bt.prototype.downloadBinary=function(t,e,i){var n=new XMLHttpRequest;this.rawDataUris[t]&&(t=this.rawDataUris[t]),n.open("GET",t,!0),n.responseType="arraybuffer",n.onload=function(){200==n.status?e(new Uint8Array(n.response)):i(n.status,n.responseText)},n.onerror=function(){i(n.status,n.responseText)},n.send()},Bt.prototype.setRawDataURI=function(t,e){this.rawDataUris[this.pathPrefix+t]=e},Bt.prototype.loadBinary=function(i,e,n){var r=this;void 0===e&&(e=null),void 0===n&&(n=null),i=this.pathPrefix+i,this.toLoad++,this.downloadBinary(i,function(t){r.assets[i]=t,e&&e(i,t),r.toLoad--,r.loaded++},function(t,e){r.errors[i]="Couldn't load binary "+i+": status "+status+", "+e,n&&n(i,"Couldn't load binary "+i+": status "+status+", "+e),r.toLoad--,r.loaded++})},Bt.prototype.loadText=function(i,e,n){var r=this;void 0===e&&(e=null),void 0===n&&(n=null),i=this.pathPrefix+i,this.toLoad++,this.downloadText(i,function(t){r.assets[i]=t,e&&e(i,t),r.toLoad--,r.loaded++},function(t,e){r.errors[i]="Couldn't load text "+i+": status "+status+", "+e,n&&n(i,"Couldn't load text "+i+": status "+status+", "+e),r.toLoad--,r.loaded++})},Bt.prototype.loadTexture=function(i,n,e){var r=this,s=(void 0===n&&(n=null),void 0===e&&(e=null),i=this.pathPrefix+i),o=(this.toLoad++,new Image);o.crossOrigin="anonymous",o.onload=function(t){var e=r.textureLoader(o);r.assets[s]=e,r.toLoad--,r.loaded++,n&&n(i,o)},o.onerror=function(t){r.errors[i]="Couldn't load image "+i,r.toLoad--,r.loaded++,e&&e(i,"Couldn't load image "+i)},this.rawDataUris[i]&&(i=this.rawDataUris[i]),o.src=i},Bt.prototype.loadTextureAtlas=function(a,h,l){var c=this,u=(void 0===h&&(h=null),void 0===l&&(l=null),0<=a.lastIndexOf("/")?a.substring(0,a.lastIndexOf("/")):"");a=this.pathPrefix+a,this.toLoad++,this.downloadText(a,function(r){var s={count:0},o=new Array;try{new C.TextureAtlas(r,function(t){o.push(""==u?t:u+"/"+t);t=document.createElement("img");return t.width=16,t.height=16,new C.FakeTexture(t)})}catch(e){var t=e;return c.errors[a]="Couldn't load texture atlas "+a+": "+t.message,l&&l(a,"Couldn't load texture atlas "+a+": "+t.message),c.toLoad--,void c.loaded++}for(var e=0,i=o;e<i.length;e++)!function(t){var n=!1;c.loadTexture(t,function(t,e){if(s.count++,s.count==o.length)if(n)c.errors[a]="Couldn't load texture atlas page "+t+"} of atlas "+a,l&&l(a,"Couldn't load texture atlas page "+t+" of atlas "+a),c.toLoad--,c.loaded++;else try{var i=new C.TextureAtlas(r,function(t){return c.get(""==u?t:u+"/"+t)});c.assets[a]=i,h&&h(a,i),c.toLoad--,c.loaded++}catch(t){i=t;c.errors[a]="Couldn't load texture atlas "+a+": "+i.message,l&&l(a,"Couldn't load texture atlas "+a+": "+i.message),c.toLoad--,c.loaded++}},function(t,e){n=!0,s.count++,s.count==o.length&&(c.errors[a]="Couldn't load texture atlas page "+t+"} of atlas "+a,l&&l(a,"Couldn't load texture atlas page "+t+" of atlas "+a),c.toLoad--,c.loaded++)})}(i[e])},function(t,e){c.errors[a]="Couldn't load texture atlas "+a+": status "+status+", "+e,l&&l(a,"Couldn't load texture atlas "+a+": status "+status+", "+e),c.toLoad--,c.loaded++})},Bt.prototype.get=function(t){return t=this.pathPrefix+t,this.assets[t]},Bt.prototype.remove=function(t){t=this.pathPrefix+t;var e=this.assets[t];e.dispose&&e.dispose(),this.assets[t]=null},Bt.prototype.removeAll=function(){for(var t in this.assets){t=this.assets[t];t.dispose&&t.dispose()}this.assets={}},Bt.prototype.isLoadingComplete=function(){return 0==this.toLoad},Bt.prototype.getToLoad=function(){return this.toLoad},Bt.prototype.getLoaded=function(){return this.loaded},Bt.prototype.dispose=function(){this.removeAll()},Bt.prototype.hasErrors=function(){return 0<Object.keys(this.errors).length},Bt.prototype.getErrors=function(){return this.errors},C.AssetManager=Bt,O=t=t||{},Ft.prototype.newRegionAttachment=function(t,e,i){var n=this.atlas.findRegion(i);if(null==n)throw new Error("Region not found in atlas: "+i+" (region attachment: "+e+")");n.renderObject=n;i=new O.RegionAttachment(e);return i.setRegion(n),i},Ft.prototype.newMeshAttachment=function(t,e,i){var n=this.atlas.findRegion(i);if(null==n)throw new Error("Region not found in atlas: "+i+" (mesh attachment: "+e+")");n.renderObject=n;i=new O.MeshAttachment(e);return i.region=n,i},Ft.prototype.newBoundingBoxAttachment=function(t,e){return new O.BoundingBoxAttachment(e)},Ft.prototype.newPathAttachment=function(t,e){return new O.PathAttachment(e)},Ft.prototype.newPointAttachment=function(t,e){return new O.PointAttachment(e)},Ft.prototype.newClippingAttachment=function(t,e){return new O.ClippingAttachment(e)},O.AtlasAttachmentLoader=Ft,(h=(c=t=t||{}).BlendMode||(c.BlendMode={}))[h.Normal=0]="Normal",h[h.Additive=1]="Additive",h[h.Multiply=2]="Multiply",h[h.Screen=3]="Screen",_=t=t||{},Nt.prototype.isActive=function(){return this.active},Nt.prototype.update=function(){this.updateWorldTransformWith(this.x,this.y,this.rotation,this.scaleX,this.scaleY,this.shearX,this.shearY)},Nt.prototype.updateWorldTransform=function(){this.updateWorldTransformWith(this.x,this.y,this.rotation,this.scaleX,this.scaleY,this.shearX,this.shearY)},Nt.prototype.updateWorldTransformWith=function(t,e,i,n,r,s,o){this.ax=t,this.ay=e,this.arotation=i,this.ascaleX=n,this.ascaleY=r,this.ashearX=s,this.ashearY=o,this.appliedValid=!0;var a,h,l,c=this.parent;if(null==c)g=i+90+o,h=(a=this.skeleton).scaleX,l=a.scaleY,this.a=_.MathUtils.cosDeg(i+s)*n*h,this.b=_.MathUtils.cosDeg(g)*r*h,this.c=_.MathUtils.sinDeg(i+s)*n*l,this.d=_.MathUtils.sinDeg(g)*r*l,this.worldX=t*h+a.x,this.worldY=e*l+a.y;else{var u=c.a,d=c.b,p=c.c,f=c.d;switch(this.worldX=u*t+d*e+c.worldX,this.worldY=p*t+f*e+c.worldY,this.data.transformMode){case _.TransformMode.Normal:var g=i+90+o,m=_.MathUtils.cosDeg(i+s)*n,y=_.MathUtils.cosDeg(g)*r,v=_.MathUtils.sinDeg(i+s)*n,x=_.MathUtils.sinDeg(g)*r;return this.a=u*m+d*v,this.b=u*y+d*x,this.c=p*m+f*v,void(this.d=p*y+f*x);case _.TransformMode.OnlyTranslation:g=i+90+o,this.a=_.MathUtils.cosDeg(i+s)*n,this.b=_.MathUtils.cosDeg(g)*r,this.c=_.MathUtils.sinDeg(i+s)*n,this.d=_.MathUtils.sinDeg(g)*r;break;case _.TransformMode.NoRotationOrReflection:var b=i+s-(w=1e-4<(T=u*u+p*p)?(T=Math.abs(u*f-d*p)/T,u/=this.skeleton.scaleX,d=(p/=this.skeleton.scaleY)*T,f=u*T,Math.atan2(p,u)*_.MathUtils.radDeg):(p=u=0,90-Math.atan2(f,d)*_.MathUtils.radDeg)),w=i+o-w+90,m=_.MathUtils.cosDeg(b)*n,y=_.MathUtils.cosDeg(w)*r,v=_.MathUtils.sinDeg(b)*n,x=_.MathUtils.sinDeg(w)*r;this.a=u*m-d*v,this.b=u*y-d*x,this.c=p*m+f*v,this.d=p*y+f*x;break;case _.TransformMode.NoScale:case _.TransformMode.NoScaleOrReflection:var T,b=_.MathUtils.cosDeg(i),w=_.MathUtils.sinDeg(i),S=(u*b+d*w)/this.skeleton.scaleX,b=(p*b+f*w)/this.skeleton.scaleY,w=(S*=T=1e-5<(T=Math.sqrt(S*S+b*b))?1/T:T,b*=T,T=Math.sqrt(S*S+b*b),this.data.transformMode==_.TransformMode.NoScale&&u*f-d*p<0!=(this.skeleton.scaleX<0!=this.skeleton.scaleY<0)&&(T=-T),Math.PI/2+Math.atan2(b,S)),P=Math.cos(w)*T,w=Math.sin(w)*T,m=_.MathUtils.cosDeg(s)*n,y=_.MathUtils.cosDeg(90+o)*r,v=_.MathUtils.sinDeg(s)*n,x=_.MathUtils.sinDeg(90+o)*r;this.a=S*m+P*v,this.b=S*y+P*x,this.c=b*m+w*v,this.d=b*y+w*x}this.a*=this.skeleton.scaleX,this.b*=this.skeleton.scaleX,this.c*=this.skeleton.scaleY,this.d*=this.skeleton.scaleY}},Nt.prototype.setToSetupPose=function(){var t=this.data;this.x=t.x,this.y=t.y,this.rotation=t.rotation,this.scaleX=t.scaleX,this.scaleY=t.scaleY,this.shearX=t.shearX,this.shearY=t.shearY},Nt.prototype.getWorldRotationX=function(){return Math.atan2(this.c,this.a)*_.MathUtils.radDeg},Nt.prototype.getWorldRotationY=function(){return Math.atan2(this.d,this.b)*_.MathUtils.radDeg},Nt.prototype.getWorldScaleX=function(){return Math.sqrt(this.a*this.a+this.c*this.c)},Nt.prototype.getWorldScaleY=function(){return Math.sqrt(this.b*this.b+this.d*this.d)},Nt.prototype.updateAppliedTransform=function(){this.appliedValid=!0;var t,e,i,n,r,s,o=this.parent;null==o?(this.ax=this.worldX,this.ay=this.worldY,this.arotation=Math.atan2(this.c,this.a)*_.MathUtils.radDeg,this.ascaleX=Math.sqrt(this.a*this.a+this.c*this.c),this.ascaleY=Math.sqrt(this.b*this.b+this.d*this.d),this.ashearX=0,this.ashearY=Math.atan2(this.a*this.b+this.c*this.d,this.a*this.d-this.b*this.c)*_.MathUtils.radDeg):(r=o.a,n=o.b,t=o.c,i=o.d,e=this.worldX-o.worldX,o=this.worldY-o.worldY,this.ax=e*i*(s=1/(r*i-n*t))-o*n*s,this.ay=o*r*s-e*t*s,i=(o=s*i)*this.a-(e=s*n)*this.c,n=o*this.b-e*this.d,r=(o=s*r)*this.c-(e=s*t)*this.a,s=o*this.d-e*this.b,this.ashearX=0,this.ascaleX=Math.sqrt(i*i+r*r),1e-4<this.ascaleX?(this.ascaleY=(t=i*s-n*r)/this.ascaleX,this.ashearY=Math.atan2(i*n+r*s,t)*_.MathUtils.radDeg,this.arotation=Math.atan2(r,i)*_.MathUtils.radDeg):(this.ascaleX=0,this.ascaleY=Math.sqrt(n*n+s*s),this.ashearY=0,this.arotation=90-Math.atan2(s,n)*_.MathUtils.radDeg))},Nt.prototype.worldToLocal=function(t){var e=this.a,i=this.b,n=this.c,r=this.d,s=1/(e*r-i*n),o=t.x-this.worldX,a=t.y-this.worldY;return t.x=o*r*s-a*i*s,t.y=a*e*s-o*n*s,t},Nt.prototype.localToWorld=function(t){var e=t.x,i=t.y;return t.x=e*this.a+i*this.b+this.worldX,t.y=e*this.c+i*this.d+this.worldY,t},Nt.prototype.worldToLocalRotation=function(t){var e=_.MathUtils.sinDeg(t),t=_.MathUtils.cosDeg(t);return Math.atan2(this.a*e-this.c*t,this.d*t-this.b*e)*_.MathUtils.radDeg+this.rotation-this.shearX},Nt.prototype.localToWorldRotation=function(t){t-=this.rotation-this.shearX;var e=_.MathUtils.sinDeg(t),t=_.MathUtils.cosDeg(t);return Math.atan2(t*this.c+e*this.d,t*this.a+e*this.b)*_.MathUtils.radDeg},Nt.prototype.rotateWorld=function(t){var e=this.a,i=this.b,n=this.c,r=this.d,s=_.MathUtils.cosDeg(t),t=_.MathUtils.sinDeg(t);this.a=s*e-t*n,this.b=s*i-t*r,this.c=t*e+s*n,this.d=t*i+s*r,this.appliedValid=!1},_.Bone=Nt,(R=t=t||{}).BoneData=function(t,e,i){if(this.x=0,this.y=0,this.rotation=0,this.scaleX=1,this.scaleY=1,this.shearX=0,this.shearY=0,this.transformMode=L.Normal,this.skinRequired=!1,this.color=new R.Color,t<0)throw new Error("index must be >= 0.");if(null==e)throw new Error("name cannot be null.");this.index=t,this.name=e,this.parent=i},(a=L=R.TransformMode||(R.TransformMode={}))[a.Normal=0]="Normal",a[a.OnlyTranslation=1]="OnlyTranslation",a[a.NoRotationOrReflection=2]="NoRotationOrReflection",a[a.NoScale=3]="NoScale",a[a.NoScaleOrReflection=4]="NoScaleOrReflection",(t=t||{}).ConstraintData=function(t,e,i){this.name=t,this.order=e,this.skinRequired=i},(t=t||{}).Event=function(t,e){if(null==e)throw new Error("data cannot be null.");this.time=t,this.data=e},(t=t||{}).EventData=function(t){this.name=t},q=t=t||{},zt.prototype.isActive=function(){return this.active},zt.prototype.apply=function(){this.update()},zt.prototype.update=function(){var t=this.target,e=this.bones;switch(e.length){case 1:this.apply1(e[0],t.worldX,t.worldY,this.compress,this.stretch,this.data.uniform,this.mix);break;case 2:this.apply2(e[0],e[1],t.worldX,t.worldY,this.bendDirection,this.stretch,this.softness,this.mix)}},zt.prototype.apply1=function(t,e,i,n,r,s,o){t.appliedValid||t.updateAppliedTransform();var a=t.parent,h=a.a,l=a.b,c=a.c,u=a.d,d=-t.ashearX-t.arotation,p=0,f=0;switch(t.data.transformMode){case q.TransformMode.OnlyTranslation:p=e-t.worldX,f=i-t.worldY;break;case q.TransformMode.NoRotationOrReflection:var g=Math.abs(h*u-l*c)/(h*h+c*c),m=h/t.skeleton.scaleX,y=c/t.skeleton.scaleY,l=-y*g*t.skeleton.scaleX,u=m*g*t.skeleton.scaleY;d+=Math.atan2(y,m)*q.MathUtils.radDeg;default:var y=e-a.worldX,m=i-a.worldY,v=h*u-l*c,p=(y*u-m*l)/v-t.ax,f=(m*h-y*c)/v-t.ay}d+=Math.atan2(f,p)*q.MathUtils.radDeg,t.ascaleX<0&&(d+=180),180<d?d-=360:d<-180&&(d+=360);var x=t.ascaleX,b=t.ascaleY;if(n||r){switch(t.data.transformMode){case q.TransformMode.NoScale:case q.TransformMode.NoScaleOrReflection:p=e-t.worldX,f=i-t.worldY}var w=t.data.length*x,T=Math.sqrt(p*p+f*f);(n&&T<w||r&&w<T&&1e-4<w)&&(x*=g=(T/w-1)*o+1,s&&(b*=g))}t.updateWorldTransformWith(t.ax,t.ay,t.arotation+d*o,x,b,t.ashearX,t.ashearY)},zt.prototype.apply2=function(t,e,i,n,r,B,s,o){if(0!=o){t.appliedValid||t.updateAppliedTransform(),e.appliedValid||e.updateAppliedTransform();var F,a,N=t.ax,z=t.ay,h=t.ascaleX,Y=h,l=t.ascaleY,c=e.ascaleX,X=0,u=0,u=h<0?(h=-h,X=180,-1):(X=0,1),d=(l<0&&(l=-l,u=-u),F=c<0?(c=-c,180):0,e.ax),p=0,f=0,g=t.a,m=t.b,y=t.c,v=t.d,U=Math.abs(h-l)<=1e-4,x=U?(f=g*d+m*(p=e.ay)+t.worldX,y*d+v*p+t.worldY):(p=0,f=g*d+t.worldX,y*d+t.worldY),b=t.parent,g=b.a,m=b.b,y=b.c,w=1/(g*(v=b.d)-m*y),T=f-b.worldX,S=x-b.worldY,f=(T*v-S*m)*w-N,x=(S*g-T*y)*w-z,P=Math.sqrt(f*f+x*x),_=e.data.length*c;if(P<1e-4)this.apply1(t,i,n,!1,B,!1,o),e.updateWorldTransformWith(d,p,0,e.ascaleX,e.ascaleY,e.ashearX,e.ashearY);else{var E=((T=i-b.worldX)*v-(S=n-b.worldY)*m)*w-N,A=(S*g-T*y)*w-z,M=E*E+A*A;0!=s&&(s*=h*(c+1)/2,0<(x=(f=Math.sqrt(M))-P-_*h+s)&&(M=(E-=(i=(x-s*(1-(i=Math.min(1,x/(2*s))-1)*i))/f)*E)*E+(A-=i*A)*A));t:if(U){var k=(M-P*P-(_*=h)*_)/(2*P*_);k<-1?k=-1:1<k&&(k=1,B&&(Y*=(Math.sqrt(M)/(P+_)-1)*o+1)),a=Math.acos(k)*r,g=P+_*k,m=_*Math.sin(a),I=Math.atan2(A*g-E*m,E*g+A*m)}else{var k=(g=h*_)*g,C=(m=l*_)*m,V=Math.atan2(A,E),O=-2*C*P,R=C-k;if(0<=(v=O*O-4*R*(y=C*P*P+k*M-k*C))){var L=Math.sqrt(v),O=(L=-(O+(L=O<0?-L:L))/2)/R,R=y/L,L=Math.abs(O)<Math.abs(R)?O:R;if(L*L<=M){S=Math.sqrt(M-L*L)*r,I=V-Math.atan2(S,L),a=Math.atan2(S/l,(L-P)/h);break t}}var O=q.MathUtils.PI,R=P-g,L=R*R,G=0,j=0,D=P+g,W=D*D,H=0;-1<=(y=-g*P/(k-C))&&y<=1&&(y=Math.acos(y),(v=(T=g*Math.cos(y)+P)*T+(S=m*Math.sin(y))*S)<L&&(O=y,L=v,R=T,G=S),W<v&&(j=y,W=v,D=T,H=S)),a=M<=(L+W)/2?(I=V-Math.atan2(G*r,R),O*r):(I=V-Math.atan2(H*r,D),j*r)}var I,n=Math.atan2(p,d)*u,b=t.arotation;180<(I=(I-n)*q.MathUtils.radDeg+X-b)?I-=360:I<-180&&(I+=360),t.updateWorldTransformWith(N,z,b+I*o,Y,t.ascaleY,0,0),b=e.arotation,180<(a=((a+n)*q.MathUtils.radDeg-e.ashearX)*u+F-b)?a-=360:a<-180&&(a+=360),e.updateWorldTransformWith(d,p,b+a*o,e.ascaleX,e.ascaleY,e.ashearX,e.ashearY)}}else e.updateWorldTransform()},q.IkConstraint=zt,c=t=t||{},D=c.ConstraintData,e(Yt,D),c.IkConstraintData=Yt,K=t=t||{},Xt.prototype.isActive=function(){return this.active},Xt.prototype.apply=function(){this.update()},Xt.prototype.update=function(){var t=this.target.getAttachment();if(t instanceof K.PathAttachment){var e=this.rotateMix,i=this.translateMix,n=0<e;if(0<i||n){var r=this.data,s=r.spacingMode==K.SpacingMode.Percent,o=r.rotateMode,a=o==K.RotateMode.Tangent,h=o==K.RotateMode.ChainScale,l=this.bones.length,c=a?l:l+1,u=this.bones,d=K.Utils.setArraySize(this.spaces,c),p=null,f=this.spacing;if(h||!s){h&&(p=K.Utils.setArraySize(this.lengths,l));for(var B=r.spacingMode==K.SpacingMode.Length,g=0,F=c-1;g<F;){var m,y=(S=u[g]).data.length;y<Xt.epsilon?(h&&(p[g]=0),d[++g]=0):s?(h&&(_=y*S.a,E=y*S.c,m=Math.sqrt(_*_+E*E),p[g]=m),d[++g]=f):(_=y*S.a,E=y*S.c,m=Math.sqrt(_*_+E*E),h&&(p[g]=m),d[++g]=(B?y+f:f)*m/y)}}else for(g=1;g<c;g++)d[g]=f;var v=this.computeWorldPositions(t,c,a,r.positionMode==K.PositionMode.Percent,s),x=v[0],b=v[1],w=r.offsetRotation,T=!1;0==w?T=o==K.RotateMode.Chain:(T=!1,w*=0<(P=this.target.bone).a*P.d-P.b*P.c?K.MathUtils.degRad:-K.MathUtils.degRad);for(var S,g=0,P=3;g<l;g++,P+=3){(S=u[g]).worldX+=(x-S.worldX)*i,S.worldY+=(b-S.worldY)*i;var _,E,A,M,k,C,O,R,N,L,D=(_=v[P])-x,I=(E=v[P+1])-b;h&&0!=(A=p[g])&&(A=(Math.sqrt(D*D+I*I)/A-1)*e+1,S.a*=A,S.c*=A),x=_,b=E,n&&(A=S.a,M=S.b,k=S.c,C=S.d,R=O=L=0,L=a?v[P-1]:0==d[g+1]?v[P+2]:Math.atan2(I,D),L-=Math.atan2(k,A),T?(O=Math.cos(L),R=Math.sin(L),x+=((N=S.data.length)*(O*A-R*k)-D)*e,b+=(N*(R*A+O*k)-I)*e):L+=w,L>K.MathUtils.PI?L-=K.MathUtils.PI2:L<-K.MathUtils.PI&&(L+=K.MathUtils.PI2),L*=e,O=Math.cos(L),R=Math.sin(L),S.a=O*A-R*k,S.b=O*M-R*C,S.c=R*A+O*k,S.d=R*M+O*C),S.appliedValid=!1}}}},Xt.prototype.computeWorldPositions=function(t,e,B,F,N){var i=this.target,n=this.position,r=this.spaces,s=K.Utils.setArraySize(this.positions,3*e+2),o=null,a=t.closed,h=t.worldVerticesLength,l=h/6,c=Xt.NONE;if(t.constantSpeed){a?(o=K.Utils.setArraySize(this.world,h+=2),t.computeWorldVertices(i,2,h-4,o,0,2),t.computeWorldVertices(i,0,2,o,h-4,2),o[h-2]=o[0],o[h-1]=o[1]):(l--,o=K.Utils.setArraySize(this.world,h-=4),t.computeWorldVertices(i,2,h,o,0,2));for(var z=K.Utils.setArraySize(this.curves,l),u=0,d=o[0],p=o[1],f=0,g=0,m=0,y=0,v=0,Y=0,X=0,U=0,x=0,b=0,w=0,T=0,S=0,P=0,_=0,E=2;_<l;_++,E+=6)f=o[E],g=o[E+1],m=o[E+2],y=o[E+3],w=2*(X=.1875*(d-2*f+m))+(x=.09375*(3*(f-m)-d+(v=o[E+4]))),T=2*(U=.1875*(p-2*g+y))+(b=.09375*(3*(g-y)-p+(Y=o[E+5]))),S=.75*(f-d)+X+.16666667*x,P=.75*(g-p)+U+.16666667*b,u+=Math.sqrt(S*S+P*P),S+=w,P+=T,w+=x,T+=b,u+=Math.sqrt(S*S+P*P),S+=w,P+=T,u+=Math.sqrt(S*S+P*P),S+=w+x,P+=T+b,u+=Math.sqrt(S*S+P*P),z[_]=u,d=v,p=Y;if(n*=F?u:u/t.lengths[l-1],N)for(_=1;_<e;_++)r[_]*=u;for(var A=this.segments,M=0,_=0,k=0,C=0,O=0;_<e;_++,k+=3){var V,R=n+=V=r[_];if(a)(R%=u)<0&&(R+=u),C=0;else{if(R<0){this.addBeforePosition(R,o,0,s,k);continue}if(u<R){this.addAfterPosition(R-u,o,h-4,s,k);continue}}for(;;C++){var G=z[C];if(!(G<R)){0==C?R/=G:R=(R-(D=z[C-1]))/(G-D);break}}if(C!=c){var L=6*(c=C),d=o[L],p=o[L+1],f=o[L+2],g=o[L+3],m=o[L+4],y=o[L+5],w=2*(X=.03*(d-2*f+m))+(x=.006*(3*(f-m)-d+(v=o[L+6]))),T=2*(U=.03*(p-2*g+y))+(b=.006*(3*(g-y)-p+(Y=o[L+7]))),S=.3*(f-d)+X+.16666667*x,P=.3*(g-p)+U+.16666667*b,M=Math.sqrt(S*S+P*P);for(A[0]=M,L=1;L<8;L++)S+=w,P+=T,w+=x,T+=b,M+=Math.sqrt(S*S+P*P),A[L]=M;S+=w,P+=T,M+=Math.sqrt(S*S+P*P),A[8]=M,S+=w+x,P+=T+b,M+=Math.sqrt(S*S+P*P),A[9]=M,O=0}for(R*=M;;O++){var D,j=A[O];if(!(j<R)){0==O?R/=j:R=O+(R-(D=A[O-1]))/(j-D);break}}this.addCurvePosition(.1*R,d,p,f,g,m,y,v,Y,s,k,B||0<_&&0==V)}}else{var W=t.lengths,I=W[l-=a?1:2];if(F&&(n*=I),N)for(var _=1;_<e;_++)r[_]*=I;for(var o=K.Utils.setArraySize(this.world,8),_=0,k=0,C=0;_<e;_++,k+=3){var R=n+=V=r[_];if(a)(R%=I)<0&&(R+=I),C=0;else{if(R<0){c!=Xt.BEFORE&&(c=Xt.BEFORE,t.computeWorldVertices(i,2,4,o,0,2)),this.addBeforePosition(R,o,0,s,k);continue}if(I<R){c!=Xt.AFTER&&(c=Xt.AFTER,t.computeWorldVertices(i,h-6,4,o,0,2)),this.addAfterPosition(R-I,o,0,s,k);continue}}for(;;C++){var H=W[C];if(!(H<R)){0==C?R/=H:R=(R-(D=W[C-1]))/(H-D);break}}C!=c&&(c=C,a&&C==l?(t.computeWorldVertices(i,h-4,4,o,0,2),t.computeWorldVertices(i,0,4,o,4,2)):t.computeWorldVertices(i,6*C+2,8,o,0,2)),this.addCurvePosition(R,o[0],o[1],o[2],o[3],o[4],o[5],o[6],o[7],s,k,B||0<_&&0==V)}}return s},Xt.prototype.addBeforePosition=function(t,e,i,n,r){var s=e[i],o=e[i+1],a=e[i+2]-s,e=e[i+3]-o,i=Math.atan2(e,a);n[r]=s+t*Math.cos(i),n[r+1]=o+t*Math.sin(i),n[r+2]=i},Xt.prototype.addAfterPosition=function(t,e,i,n,r){var s=e[i+2],o=e[i+3],a=s-e[i],e=o-e[i+1],i=Math.atan2(e,a);n[r]=s+t*Math.cos(i),n[r+1]=o+t*Math.sin(i),n[r+2]=i},Xt.prototype.addCurvePosition=function(t,e,i,n,r,s,o,a,h,l,c,u){var d,p,f,g,m,y,v;0==t||isNaN(t)?(l[c]=e,l[c+1]=i,l[c+2]=Math.atan2(r-i,n-e)):(v=i*(y=(p=(f=1-t)*f)*f)+r*(g=f*(m=3*(f=f*t)))+o*(m=m*t)+h*(d=(h=t*t)*t),l[c]=y=e*y+n*g+s*m+a*d,l[c+1]=v,u&&(l[c+2]=t<.001?Math.atan2(r-i,n-e):Math.atan2(v-(i*p+r*f*2+o*h),y-(e*p+n*f*2+s*h))))},Xt.NONE=-1,Xt.BEFORE=-2,Xt.AFTER=-3,Xt.epsilon=1e-5,K.PathConstraint=Xt,h=t=t||{},I=h.ConstraintData,e(Ut,I),h.PathConstraintData=Ut,(a=h.PositionMode||(h.PositionMode={}))[a.Fixed=0]="Fixed",a[a.Percent=1]="Percent",(c=h.SpacingMode||(h.SpacingMode={}))[c.Length=0]="Length",c[c.Fixed=1]="Fixed",c[c.Percent=2]="Percent",(a=h.RotateMode||(h.RotateMode={}))[a.Tangent=0]="Tangent",a[a.Chain=1]="Chain",a[a.ChainScale=2]="ChainScale",c=t=t||{},Vt.prototype.loaded=function(){var t,e=0;for(t in this.assets)e++;return e},B=Vt,Gt.prototype.queueAsset=function(t,e,i){var n=this.clientAssets[t];return null==n&&(n=new B(t),this.clientAssets[t]=n),null!==e&&(n.textureLoader=e),n.toLoad.push(i),this.queuedAssets[i]!==i&&(this.queuedAssets[i]=i,!0)},Gt.prototype.loadText=function(t,e){var i,n=this;e=this.pathPrefix+e,this.queueAsset(t,null,e)&&((i=new XMLHttpRequest).overrideMimeType("text/html"),i.onreadystatechange=function(){i.readyState==XMLHttpRequest.DONE&&(200<=i.status&&i.status<300?n.rawAssets[e]=i.responseText:n.errors[e]="Couldn't load text "+e+": status "+i.status+", "+i.responseText)},i.open("GET",e,!0),i.send())},Gt.prototype.loadJson=function(t,e){var i,n=this;e=this.pathPrefix+e,this.queueAsset(t,null,e)&&((i=new XMLHttpRequest).overrideMimeType("text/html"),i.onreadystatechange=function(){i.readyState==XMLHttpRequest.DONE&&(200<=i.status&&i.status<300?n.rawAssets[e]=JSON.parse(i.responseText):n.errors[e]="Couldn't load text "+e+": status "+i.status+", "+i.responseText)},i.open("GET",e,!0),i.send())},Gt.prototype.loadTexture=function(t,e,i){var n,r=this;i=this.pathPrefix+i,this.queueAsset(t,e,i)&&("undefined"!=typeof window&&"undefined"!=typeof navigator&&window.document||"undefined"==typeof importScripts?((n=new Image).crossOrigin="anonymous",n.onload=function(t){r.rawAssets[i]=n},n.onerror=function(t){r.errors[i]="Couldn't load image "+i},n.src=i):fetch(i,{mode:"cors"}).then(function(t){return t.ok||(r.errors[i]="Couldn't load image "+i),t.blob()}).then(function(t){return createImageBitmap(t,{premultiplyAlpha:"none",colorSpaceConversion:"none"})}).then(function(t){r.rawAssets[i]=t}))},Gt.prototype.get=function(t,e){e=this.pathPrefix+e;t=this.clientAssets[t];return null==t||t.assets[e]},Gt.prototype.updateClientAssets=function(t){for(var e=!("undefined"!=typeof window&&"undefined"!=typeof navigator&&window.document)&&"undefined"!=typeof importScripts,i=0;i<t.toLoad.length;i++){var n,r=t.toLoad[i];null!=t.assets[r]||null!=(n=this.rawAssets[r])&&(e?n instanceof ImageBitmap?t.assets[r]=t.textureLoader(n):t.assets[r]=n:n instanceof HTMLImageElement?t.assets[r]=t.textureLoader(n):t.assets[r]=n)}},Gt.prototype.isLoadingComplete=function(t){t=this.clientAssets[t];return null==t||(this.updateClientAssets(t),t.toLoad.length==t.loaded())},Gt.prototype.dispose=function(){},Gt.prototype.hasErrors=function(){return 0<Object.keys(this.errors).length},Gt.prototype.getErrors=function(){return this.errors},c.SharedAssetManager=Gt,v=t=t||{},n.prototype.updateCache=function(){this._updateCache.length=0,this.updateCacheReset.length=0;for(var t=this.bones,e=0,i=t.length;e<i;e++)(r=t[e]).sorted=r.data.skinRequired,r.active=!r.sorted;if(null!=this.skin)for(var n=this.skin.bones,e=0,i=this.skin.bones.length;e<i;e++)for(var r=this.bones[n[e].index];r.sorted=!1,r.active=!0,null!=(r=r.parent););var s=this.ikConstraints,o=this.transformConstraints,a=this.pathConstraints,h=s.length,l=o.length,c=a.length,u=h+l+c;t:for(e=0;e<u;e++){for(var d=0;d<h;d++)if((p=s[d]).data.order==e){this.sortIkConstraint(p);continue t}for(d=0;d<l;d++)if((p=o[d]).data.order==e){this.sortTransformConstraint(p);continue t}for(var p,d=0;d<c;d++)if((p=a[d]).data.order==e){this.sortPathConstraint(p);continue t}}for(e=0,i=t.length;e<i;e++)this.sortBone(t[e])},n.prototype.sortIkConstraint=function(t){var e,i,n;t.active=t.target.isActive()&&(!t.data.skinRequired||null!=this.skin&&v.Utils.contains(this.skin.constraints,t.data,!0)),t.active&&(e=t.target,this.sortBone(e),i=(e=t.bones)[0],this.sortBone(i),1<e.length&&(n=e[e.length-1],-1<this._updateCache.indexOf(n)||this.updateCacheReset.push(n)),this._updateCache.push(t),this.sortReset(i.children),e[e.length-1].sorted=!0)},n.prototype.sortPathConstraint=function(t){if(t.active=t.target.bone.isActive()&&(!t.data.skinRequired||null!=this.skin&&v.Utils.contains(this.skin.constraints,t.data,!0)),t.active){var e=t.target,i=e.data.index,n=e.bone;null!=this.skin&&this.sortPathConstraintAttachment(this.skin,i,n),null!=this.data.defaultSkin&&this.data.defaultSkin!=this.skin&&this.sortPathConstraintAttachment(this.data.defaultSkin,i,n);for(var r=0,s=this.data.skins.length;r<s;r++)this.sortPathConstraintAttachment(this.data.skins[r],i,n);e=e.getAttachment();e instanceof v.PathAttachment&&this.sortPathConstraintAttachmentWith(e,n);for(var o=t.bones,a=o.length,r=0;r<a;r++)this.sortBone(o[r]);for(this._updateCache.push(t),r=0;r<a;r++)this.sortReset(o[r].children);for(r=0;r<a;r++)o[r].sorted=!0}},n.prototype.sortTransformConstraint=function(t){if(t.active=t.target.isActive()&&(!t.data.skinRequired||null!=this.skin&&v.Utils.contains(this.skin.constraints,t.data,!0)),t.active){this.sortBone(t.target);var e=t.bones,i=e.length;if(t.data.local)for(var n=0;n<i;n++){var r=e[n];this.sortBone(r.parent),-1<this._updateCache.indexOf(r)||this.updateCacheReset.push(r)}else for(n=0;n<i;n++)this.sortBone(e[n]);this._updateCache.push(t);for(var s=0;s<i;s++)this.sortReset(e[s].children);for(s=0;s<i;s++)e[s].sorted=!0}},n.prototype.sortPathConstraintAttachment=function(t,e,i){var n=t.attachments[e];if(n)for(var r in n)this.sortPathConstraintAttachmentWith(n[r],i)},n.prototype.sortPathConstraintAttachmentWith=function(t,e){if(t instanceof v.PathAttachment){var i=t.bones;if(null==i)this.sortBone(e);else for(var n=this.bones,r=0;r<i.length;)for(var s=i[r++],o=r+s;r<o;r++){var a=i[r];this.sortBone(n[a])}}},n.prototype.sortBone=function(t){var e;t.sorted||(null!=(e=t.parent)&&this.sortBone(e),t.sorted=!0,this._updateCache.push(t))},n.prototype.sortReset=function(t){for(var e=0,i=t.length;e<i;e++){var n=t[e];n.active&&(n.sorted&&this.sortReset(n.children),n.sorted=!1)}},n.prototype.updateWorldTransform=function(){for(var t=this.updateCacheReset,e=0,i=t.length;e<i;e++){var n=t[e];n.ax=n.x,n.ay=n.y,n.arotation=n.rotation,n.ascaleX=n.scaleX,n.ascaleY=n.scaleY,n.ashearX=n.shearX,n.ashearY=n.shearY,n.appliedValid=!0}for(var r=this._updateCache,e=0,i=r.length;e<i;e++)r[e].update()},n.prototype.setToSetupPose=function(){this.setBonesToSetupPose(),this.setSlotsToSetupPose()},n.prototype.setBonesToSetupPose=function(){for(var t=this.bones,e=0,i=t.length;e<i;e++)t[e].setToSetupPose();for(var n=this.ikConstraints,e=0,i=n.length;e<i;e++)(a=n[e]).mix=a.data.mix,a.softness=a.data.softness,a.bendDirection=a.data.bendDirection,a.compress=a.data.compress,a.stretch=a.data.stretch;for(var r=this.transformConstraints,e=0,i=r.length;e<i;e++){var s=(a=r[e]).data;a.rotateMix=s.rotateMix,a.translateMix=s.translateMix,a.scaleMix=s.scaleMix,a.shearMix=s.shearMix}for(var o=this.pathConstraints,e=0,i=o.length;e<i;e++){var a,s=(a=o[e]).data;a.position=s.position,a.spacing=s.spacing,a.rotateMix=s.rotateMix,a.translateMix=s.translateMix}},n.prototype.setSlotsToSetupPose=function(){var t=this.slots;v.Utils.arrayCopy(t,0,this.drawOrder,0,t.length);for(var e=0,i=t.length;e<i;e++)t[e].setToSetupPose()},n.prototype.getRootBone=function(){return 0==this.bones.length?null:this.bones[0]},n.prototype.findBone=function(t){if(null==t)throw new Error("boneName cannot be null.");for(var e=this.bones,i=0,n=e.length;i<n;i++){var r=e[i];if(r.data.name==t)return r}return null},n.prototype.findBoneIndex=function(t){if(null==t)throw new Error("boneName cannot be null.");for(var e=this.bones,i=0,n=e.length;i<n;i++)if(e[i].data.name==t)return i;return-1},n.prototype.findSlot=function(t){if(null==t)throw new Error("slotName cannot be null.");for(var e=this.slots,i=0,n=e.length;i<n;i++){var r=e[i];if(r.data.name==t)return r}return null},n.prototype.findSlotIndex=function(t){if(null==t)throw new Error("slotName cannot be null.");for(var e=this.slots,i=0,n=e.length;i<n;i++)if(e[i].data.name==t)return i;return-1},n.prototype.setSkinByName=function(t){var e=this.data.findSkin(t);if(null==e)throw new Error("Skin not found: "+t);this.setSkin(e)},n.prototype.setSkin=function(t){if(t!=this.skin){if(null!=t)if(null!=this.skin)t.attachAll(this,this.skin);else for(var e=this.slots,i=0,n=e.length;i<n;i++){var r=e[i],s=r.data.attachmentName;null!=s&&null!=(s=t.getAttachment(i,s))&&r.setAttachment(s)}this.skin=t,this.updateCache()}},n.prototype.getAttachmentByName=function(t,e){return this.getAttachment(this.data.findSlotIndex(t),e)},n.prototype.getAttachment=function(t,e){if(null==e)throw new Error("attachmentName cannot be null.");if(null!=this.skin){var i=this.skin.getAttachment(t,e);if(null!=i)return i}return null!=this.data.defaultSkin?this.data.defaultSkin.getAttachment(t,e):null},n.prototype.setAttachment=function(t,e){if(null==t)throw new Error("slotName cannot be null.");for(var i=this.slots,n=0,r=i.length;n<r;n++){var s=i[n];if(s.data.name==t){var o=null;if(null!=e&&null==(o=this.getAttachment(n,e)))throw new Error("Attachment not found: "+e+", for slot: "+t);return void s.setAttachment(o)}}throw new Error("Slot not found: "+t)},n.prototype.findIkConstraint=function(t){if(null==t)throw new Error("constraintName cannot be null.");for(var e=this.ikConstraints,i=0,n=e.length;i<n;i++){var r=e[i];if(r.data.name==t)return r}return null},n.prototype.findTransformConstraint=function(t){if(null==t)throw new Error("constraintName cannot be null.");for(var e=this.transformConstraints,i=0,n=e.length;i<n;i++){var r=e[i];if(r.data.name==t)return r}return null},n.prototype.findPathConstraint=function(t){if(null==t)throw new Error("constraintName cannot be null.");for(var e=this.pathConstraints,i=0,n=e.length;i<n;i++){var r=e[i];if(r.data.name==t)return r}return null},n.prototype.getBounds=function(t,e,i){if(void 0===i&&(i=new Array(2)),null==t)throw new Error("offset cannot be null.");if(null==e)throw new Error("size cannot be null.");for(var n=this.drawOrder,r=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,a=Number.NEGATIVE_INFINITY,h=0,l=n.length;h<l;h++){var c=n[h];if(c.bone.active){var u=0,d=null,p=c.getAttachment();if(p instanceof v.RegionAttachment?(d=v.Utils.setArraySize(i,u=8,0),p.computeWorldVertices(c.bone,d,0,2)):p instanceof v.MeshAttachment&&(u=(p=p).worldVerticesLength,d=v.Utils.setArraySize(i,u,0),p.computeWorldVertices(c,0,u,d,0,2)),null!=d)for(var f=0,g=d.length;f<g;f+=2)var m=d[f],y=d[f+1],r=Math.min(r,m),s=Math.min(s,y),o=Math.max(o,m),a=Math.max(a,y)}}t.set(r,s),e.set(o-r,a-s)},n.prototype.update=function(t){this.time+=t},v.Skeleton=n;var G=t=t||{},h=(j.prototype.readSkeletonData=function(t){var e=this.scale,i=new G.SkeletonData,n=(i.name="",new We(t));if(i.hash=n.readString(),i.version=n.readString(),"3.8.75"==i.version)throw new Error("Unsupported skeleton data, please export with a newer version of Spine.");i.x=n.readFloat(),i.y=n.readFloat(),i.width=n.readFloat(),i.height=n.readFloat();var r=n.readBoolean();r&&(i.fps=n.readFloat(),i.imagesPath=n.readString(),i.audioPath=n.readString());for(var s=0,s=n.readInt(!0),o=0;o<s;o++)n.strings.push(n.readString());for(s=n.readInt(!0),o=0;o<s;o++){var a=n.readString(),h=0==o?null:i.bones[n.readInt(!0)];(u=new G.BoneData(o,a,h)).rotation=n.readFloat(),u.x=n.readFloat()*e,u.y=n.readFloat()*e,u.scaleX=n.readFloat(),u.scaleY=n.readFloat(),u.shearX=n.readFloat(),u.shearY=n.readFloat(),u.length=n.readFloat()*e,u.transformMode=j.TransformModeValues[n.readInt(!0)],u.skinRequired=n.readBoolean(),r&&G.Color.rgba8888ToColor(u.color,n.readInt32()),i.bones.push(u)}for(s=n.readInt(!0),o=0;o<s;o++){var l=n.readString(),c=i.bones[n.readInt(!0)],u=new G.SlotData(o,l,c),l=(G.Color.rgba8888ToColor(u.color,n.readInt32()),n.readInt32());-1!=l&&G.Color.rgb888ToColor(u.darkColor=new G.Color,l),u.attachmentName=n.readStringRef(),u.blendMode=j.BlendModeValues[n.readInt(!0)],i.slots.push(u)}s=n.readInt(!0);for(var o=0,d=void 0;o<s;o++){(u=new G.IkConstraintData(n.readString())).order=n.readInt(!0),u.skinRequired=n.readBoolean();for(var d=n.readInt(!0),p=0;p<d;p++)u.bones.push(i.bones[n.readInt(!0)]);u.target=i.bones[n.readInt(!0)],u.mix=n.readFloat(),u.softness=n.readFloat()*e,u.bendDirection=n.readByte(),u.compress=n.readBoolean(),u.stretch=n.readBoolean(),u.uniform=n.readBoolean(),i.ikConstraints.push(u)}for(s=n.readInt(!0),d=void(o=0);o<s;o++){for((u=new G.TransformConstraintData(n.readString())).order=n.readInt(!0),u.skinRequired=n.readBoolean(),d=n.readInt(!0),p=0;p<d;p++)u.bones.push(i.bones[n.readInt(!0)]);u.target=i.bones[n.readInt(!0)],u.local=n.readBoolean(),u.relative=n.readBoolean(),u.offsetRotation=n.readFloat(),u.offsetX=n.readFloat()*e,u.offsetY=n.readFloat()*e,u.offsetScaleX=n.readFloat(),u.offsetScaleY=n.readFloat(),u.offsetShearY=n.readFloat(),u.rotateMix=n.readFloat(),u.translateMix=n.readFloat(),u.scaleMix=n.readFloat(),u.shearMix=n.readFloat(),i.transformConstraints.push(u)}for(s=n.readInt(!0),d=void(o=0);o<s;o++){for((u=new G.PathConstraintData(n.readString())).order=n.readInt(!0),u.skinRequired=n.readBoolean(),d=n.readInt(!0),p=0;p<d;p++)u.bones.push(i.bones[n.readInt(!0)]);u.target=i.slots[n.readInt(!0)],u.positionMode=j.PositionModeValues[n.readInt(!0)],u.spacingMode=j.SpacingModeValues[n.readInt(!0)],u.rotateMode=j.RotateModeValues[n.readInt(!0)],u.offsetRotation=n.readFloat(),u.position=n.readFloat(),u.positionMode==G.PositionMode.Fixed&&(u.position*=e),u.spacing=n.readFloat(),u.spacingMode!=G.SpacingMode.Length&&u.spacingMode!=G.SpacingMode.Fixed||(u.spacing*=e),u.rotateMix=n.readFloat(),u.translateMix=n.readFloat(),i.pathConstraints.push(u)}t=this.readSkin(n,i,!0,r);for(null!=t&&(i.defaultSkin=t,i.skins.push(t)),o=i.skins.length,G.Utils.setArraySize(i.skins,s=o+n.readInt(!0));o<s;o++)i.skins[o]=this.readSkin(n,i,!1,r);for(s=this.linkedMeshes.length,o=0;o<s;o++){var f=this.linkedMeshes[o],g=null==f.skin?i.defaultSkin:i.findSkin(f.skin);if(null==g)throw new Error("Skin not found: "+f.skin);g=g.getAttachment(f.slotIndex,f.parent);if(null==g)throw new Error("Parent mesh not found: "+f.parent);f.mesh.deformAttachment=f.inheritDeform?g:f.mesh,f.mesh.setParentMesh(g),f.mesh.updateUVs()}for(this.linkedMeshes.length=0,s=n.readInt(!0),o=0;o<s;o++)(u=new G.EventData(n.readStringRef())).intValue=n.readInt(!1),u.floatValue=n.readFloat(),u.stringValue=n.readString(),u.audioPath=n.readString(),null!=u.audioPath&&(u.volume=n.readFloat(),u.balance=n.readFloat()),i.events.push(u);for(s=n.readInt(!0),o=0;o<s;o++)i.animations.push(this.readAnimation(n,n.readString(),i));return i},j.prototype.readSkin=function(t,e,i,n){var r=null,s=0;if(i){if(0==(s=t.readInt(!0)))return null;r=new G.Skin("default")}else{(r=new G.Skin(t.readStringRef())).bones.length=t.readInt(!0);for(var o=0,a=r.bones.length;o<a;o++)r.bones[o]=e.bones[t.readInt(!0)];for(a=t.readInt(!(o=0));o<a;o++)r.constraints.push(e.ikConstraints[t.readInt(!0)]);for(a=t.readInt(!(o=0));o<a;o++)r.constraints.push(e.transformConstraints[t.readInt(!0)]);for(a=t.readInt(!(o=0));o<a;o++)r.constraints.push(e.pathConstraints[t.readInt(!0)]);s=t.readInt(!0)}for(o=0;o<s;o++)for(var h=t.readInt(!0),l=0,c=t.readInt(!0);l<c;l++){var u=t.readStringRef(),d=this.readAttachment(t,e,r,h,u,n);null!=d&&r.setAttachment(h,u,d)}return r},j.prototype.readAttachment=function(t,e,i,n,r,s){var o=this.scale,a=t.readStringRef(),r=(null==a&&(a=r),t.readByte());switch(j.AttachmentTypeValues[r]){case G.AttachmentType.Region:var h=t.readStringRef(),l=t.readFloat(),c=t.readFloat(),u=t.readFloat(),d=t.readFloat(),p=t.readFloat(),f=t.readFloat(),g=t.readFloat(),m=t.readInt32(),y=(null==h&&(h=a),this.attachmentLoader.newRegionAttachment(i,a,h));return null==y?null:(y.path=h,y.x=c*o,y.y=u*o,y.scaleX=d,y.scaleY=p,y.rotation=l,y.width=f*o,y.height=g*o,G.Color.rgba8888ToColor(y.color,m),y.updateOffset(),y);case G.AttachmentType.BoundingBox:var v=t.readInt(!0),x=this.readVertices(t,v),m=s?t.readInt32():0,d=this.attachmentLoader.newBoundingBoxAttachment(i,a);return null==d?null:(d.worldVerticesLength=v<<1,d.vertices=x.vertices,d.bones=x.bones,s&&G.Color.rgba8888ToColor(d.color,m),d);case G.AttachmentType.Mesh:var h=t.readStringRef(),m=t.readInt32(),v=t.readInt(!0),p=this.readFloatArray(t,v<<1,1),y=this.readShortArray(t),x=this.readVertices(t,v),d=t.readInt(!0),b=null,f=0,g=0;return s&&(b=this.readShortArray(t),f=t.readFloat(),g=t.readFloat()),null==h&&(h=a),null==(w=this.attachmentLoader.newMeshAttachment(i,a,h))?null:(w.path=h,G.Color.rgba8888ToColor(w.color,m),w.bones=x.bones,w.vertices=x.vertices,w.worldVerticesLength=v<<1,w.triangles=y,w.regionUVs=p,w.updateUVs(),w.hullLength=d<<1,s&&(w.edges=b,w.width=f*o,w.height=g*o),w);case G.AttachmentType.LinkedMesh:var w,h=t.readStringRef(),m=t.readInt32(),y=t.readStringRef(),p=t.readStringRef(),d=t.readBoolean(),f=0,g=0;return s&&(f=t.readFloat(),g=t.readFloat()),null==h&&(h=a),null==(w=this.attachmentLoader.newMeshAttachment(i,a,h))?null:(w.path=h,G.Color.rgba8888ToColor(w.color,m),s&&(w.width=f*o,w.height=g*o),this.linkedMeshes.push(new Ke(w,y,n,p,d)),w);case G.AttachmentType.Path:for(var b=t.readBoolean(),f=t.readBoolean(),v=t.readInt(!0),x=this.readVertices(t,v),T=G.Utils.newArray(v/3,0),S=0,P=T.length;S<P;S++)T[S]=t.readFloat()*o;return m=s?t.readInt32():0,null==(h=this.attachmentLoader.newPathAttachment(i,a))?null:(h.closed=b,h.constantSpeed=f,h.worldVerticesLength=v<<1,h.vertices=x.vertices,h.bones=x.bones,h.lengths=T,s&&G.Color.rgba8888ToColor(h.color,m),h);case G.AttachmentType.Point:l=t.readFloat(),c=t.readFloat(),u=t.readFloat(),m=s?t.readInt32():0,g=this.attachmentLoader.newPointAttachment(i,a);return null==g?null:(g.x=c*o,g.y=u*o,g.rotation=l,s&&G.Color.rgba8888ToColor(g.color,m),g);case G.AttachmentType.Clipping:y=t.readInt(!0),v=t.readInt(!0),x=this.readVertices(t,v),m=s?t.readInt32():0,p=this.attachmentLoader.newClippingAttachment(i,a);return null==p?null:(p.endSlot=e.slots[y],p.worldVerticesLength=v<<1,p.vertices=x.vertices,p.bones=x.bones,s&&G.Color.rgba8888ToColor(p.color,m),p)}return null},j.prototype.readVertices=function(t,e){var i=e<<1,n=new qe,r=this.scale;if(t.readBoolean()){for(var s=new Array,o=new Array,a=0;a<e;a++){var h=t.readInt(!0);o.push(h);for(var l=0;l<h;l++)o.push(t.readInt(!0)),s.push(t.readFloat()*r),s.push(t.readFloat()*r),s.push(t.readFloat())}n.vertices=G.Utils.toFloatArray(s),n.bones=o}else n.vertices=this.readFloatArray(t,i,r);return n},j.prototype.readFloatArray=function(t,e,i){var n=new Array(e);if(1==i)for(var r=0;r<e;r++)n[r]=t.readFloat();else for(r=0;r<e;r++)n[r]=t.readFloat()*i;return n},j.prototype.readShortArray=function(t){for(var e=t.readInt(!0),i=new Array(e),n=0;n<e;n++)i[n]=t.readShort();return i},j.prototype.readAnimation=function(t,B,e){for(var i=new Array,n=this.scale,r=0,s=new G.Color,o=new G.Color,a=0,h=t.readInt(!0);a<h;a++)for(var l=t.readInt(!0),c=0,u=t.readInt(!0);c<u;c++){var d=t.readByte(),p=t.readInt(!0);switch(d){case j.SLOT_ATTACHMENT:(y=new G.AttachmentTimeline(p)).slotIndex=l;for(var f=0;f<p;f++)y.setFrame(f,t.readFloat(),t.readStringRef());i.push(y),r=Math.max(r,y.frames[p-1]);break;case j.SLOT_COLOR:for((y=new G.ColorTimeline(p)).slotIndex=l,f=0;f<p;f++){var g=t.readFloat();G.Color.rgba8888ToColor(s,t.readInt32()),y.setFrame(f,g,s.r,s.g,s.b,s.a),f<p-1&&this.readCurve(t,f,y)}i.push(y),r=Math.max(r,y.frames[(p-1)*G.ColorTimeline.ENTRIES]);break;case j.SLOT_TWO_COLOR:for((y=new G.TwoColorTimeline(p)).slotIndex=l,f=0;f<p;f++)g=t.readFloat(),G.Color.rgba8888ToColor(s,t.readInt32()),G.Color.rgb888ToColor(o,t.readInt32()),y.setFrame(f,g,s.r,s.g,s.b,s.a,o.r,o.g,o.b),f<p-1&&this.readCurve(t,f,y);i.push(y),r=Math.max(r,y.frames[(p-1)*G.TwoColorTimeline.ENTRIES])}}for(h=t.readInt(!(a=0));a<h;a++)for(var m=t.readInt(!0),c=0,u=t.readInt(!0);c<u;c++)switch(d=t.readByte(),p=t.readInt(!0),d){case j.BONE_ROTATE:for((y=new G.RotateTimeline(p)).boneIndex=m,f=0;f<p;f++)y.setFrame(f,t.readFloat(),t.readFloat()),f<p-1&&this.readCurve(t,f,y);i.push(y),r=Math.max(r,y.frames[(p-1)*G.RotateTimeline.ENTRIES]);break;case j.BONE_TRANSLATE:case j.BONE_SCALE:case j.BONE_SHEAR:var y=void 0,v=1;for(d==j.BONE_SCALE?y=new G.ScaleTimeline(p):d==j.BONE_SHEAR?y=new G.ShearTimeline(p):(y=new G.TranslateTimeline(p),v=n),y.boneIndex=m,f=0;f<p;f++)y.setFrame(f,t.readFloat(),t.readFloat()*v,t.readFloat()*v),f<p-1&&this.readCurve(t,f,y);i.push(y),r=Math.max(r,y.frames[(p-1)*G.TranslateTimeline.ENTRIES])}for(h=t.readInt(!(a=0));a<h;a++){var x=t.readInt(!0),p=t.readInt(!0);for((y=new G.IkConstraintTimeline(p)).ikConstraintIndex=x,f=0;f<p;f++)y.setFrame(f,t.readFloat(),t.readFloat(),t.readFloat()*n,t.readByte(),t.readBoolean(),t.readBoolean()),f<p-1&&this.readCurve(t,f,y);i.push(y),r=Math.max(r,y.frames[(p-1)*G.IkConstraintTimeline.ENTRIES])}for(h=t.readInt(!(a=0));a<h;a++){for(x=t.readInt(!0),p=t.readInt(!0),(y=new G.TransformConstraintTimeline(p)).transformConstraintIndex=x,f=0;f<p;f++)y.setFrame(f,t.readFloat(),t.readFloat(),t.readFloat(),t.readFloat(),t.readFloat()),f<p-1&&this.readCurve(t,f,y);i.push(y),r=Math.max(r,y.frames[(p-1)*G.TransformConstraintTimeline.ENTRIES])}for(h=t.readInt(!(a=0));a<h;a++)for(var x=t.readInt(!0),b=e.pathConstraints[x],c=0,u=t.readInt(!0);c<u;c++)switch(d=t.readByte(),p=t.readInt(!0),d){case j.PATH_POSITION:case j.PATH_SPACING:y=void 0,v=1;for(d==j.PATH_SPACING?(y=new G.PathConstraintSpacingTimeline(p),b.spacingMode!=G.SpacingMode.Length&&b.spacingMode!=G.SpacingMode.Fixed||(v=n)):(y=new G.PathConstraintPositionTimeline(p),b.positionMode==G.PositionMode.Fixed&&(v=n)),y.pathConstraintIndex=x,f=0;f<p;f++)y.setFrame(f,t.readFloat(),t.readFloat()*v),f<p-1&&this.readCurve(t,f,y);i.push(y),r=Math.max(r,y.frames[(p-1)*G.PathConstraintPositionTimeline.ENTRIES]);break;case j.PATH_MIX:for((y=new G.PathConstraintMixTimeline(p)).pathConstraintIndex=x,f=0;f<p;f++)y.setFrame(f,t.readFloat(),t.readFloat(),t.readFloat()),f<p-1&&this.readCurve(t,f,y);i.push(y),r=Math.max(r,y.frames[(p-1)*G.PathConstraintMixTimeline.ENTRIES])}for(h=t.readInt(!(a=0));a<h;a++)for(var F=e.skins[t.readInt(!0)],c=0,u=t.readInt(!0);c<u;c++)for(var l=t.readInt(!0),N=0,z=t.readInt(!0);N<z;N++){var w=F.getAttachment(l,t.readStringRef()),T=null!=w.bones,S=w.vertices,Y=T?S.length/3*2:S.length,p=t.readInt(!0);for((y=new G.DeformTimeline(p)).slotIndex=l,y.attachment=w,f=0;f<p;f++){var g=t.readFloat(),P=void 0,_=t.readInt(!0);if(0==_)P=T?G.Utils.newFloatArray(Y):S;else{var P=G.Utils.newFloatArray(Y),E=t.readInt(!0);if(_+=E,1==n)for(var A=E;A<_;A++)P[A]=t.readFloat();else for(A=E;A<_;A++)P[A]=t.readFloat()*n;if(!T)for(var A=0,X=P.length;A<X;A++)P[A]+=S[A]}y.setFrame(f,g,P),f<p-1&&this.readCurve(t,f,y)}i.push(y),r=Math.max(r,y.frames[p-1])}var M=t.readInt(!0);if(0<M){for(var y=new G.DrawOrderTimeline(M),k=e.slots.length,a=0;a<M;a++){for(var g=t.readFloat(),U=t.readInt(!0),C=G.Utils.newArray(k,0),c=k-1;0<=c;c--)C[c]=-1;for(var O=G.Utils.newArray(k-U,0),R=0,L=0,c=0;c<U;c++){for(l=t.readInt(!0);R!=l;)O[L++]=R++;C[R+t.readInt(!0)]=R++}for(;R<k;)O[L++]=R++;for(c=k-1;0<=c;c--)-1==C[c]&&(C[c]=O[--L]);y.setFrame(a,g,C)}i.push(y),r=Math.max(r,y.frames[M-1])}var D=t.readInt(!0);if(0<D){for(y=new G.EventTimeline(D),a=0;a<D;a++){var g=t.readFloat(),V=e.events[t.readInt(!0)],I=new G.Event(g,V);I.intValue=t.readInt(!1),I.floatValue=t.readFloat(),I.stringValue=t.readBoolean()?t.readString():V.stringValue,null!=I.data.audioPath&&(I.volume=t.readFloat(),I.balance=t.readFloat()),y.setFrame(a,I)}i.push(y),r=Math.max(r,y.frames[D-1])}return new G.Animation(B,i,r)},j.prototype.readCurve=function(t,e,i){switch(t.readByte()){case j.CURVE_STEPPED:i.setStepped(e);break;case j.CURVE_BEZIER:this.setCurve(i,e,t.readFloat(),t.readFloat(),t.readFloat(),t.readFloat())}},j.prototype.setCurve=function(t,e,i,n,r,s){t.setCurve(e,i,n,r,s)},j.AttachmentTypeValues=[0,1,2,3,4,5,6],j.TransformModeValues=[G.TransformMode.Normal,G.TransformMode.OnlyTranslation,G.TransformMode.NoRotationOrReflection,G.TransformMode.NoScale,G.TransformMode.NoScaleOrReflection],j.PositionModeValues=[G.PositionMode.Fixed,G.PositionMode.Percent],j.SpacingModeValues=[G.SpacingMode.Length,G.SpacingMode.Fixed,G.SpacingMode.Percent],j.RotateModeValues=[G.RotateMode.Tangent,G.RotateMode.Chain,G.RotateMode.ChainScale],j.BlendModeValues=[G.BlendMode.Normal,G.BlendMode.Additive,G.BlendMode.Multiply,G.BlendMode.Screen],j.BONE_ROTATE=0,j.BONE_TRANSLATE=1,j.BONE_SCALE=2,j.BONE_SHEAR=3,j.SLOT_ATTACHMENT=0,j.SLOT_COLOR=1,j.SLOT_TWO_COLOR=2,j.PATH_POSITION=0,j.PATH_SPACING=1,j.PATH_MIX=2,j.CURVE_LINEAR=0,j.CURVE_STEPPED=1,j.CURVE_BEZIER=2,j);function j(t){this.scale=1,this.linkedMeshes=new Array,this.attachmentLoader=t}G.SkeletonBinary=h,He.prototype.readByte=function(){return this.buffer.getInt8(this.index++)},He.prototype.readShort=function(){var t=this.buffer.getInt16(this.index);return this.index+=2,t},He.prototype.readInt32=function(){var t=this.buffer.getInt32(this.index);return this.index+=4,t},He.prototype.readInt=function(t){var e=this.readByte(),i=127&e;return 0!=(128&e)&&(i|=(127&(e=this.readByte()))<<7,0!=(128&e)&&(i|=(127&(e=this.readByte()))<<14,0!=(128&e)&&(i|=(127&(e=this.readByte()))<<21,0!=(128&e)&&(i|=(127&this.readByte())<<28)))),t?i:i>>>1^-(1&i)},He.prototype.readStringRef=function(){var t=this.readInt(!0);return 0==t?null:this.strings[t-1]},He.prototype.readString=function(){var t=this.readInt(!0);switch(t){case 0:return null;case 1:return""}t--;for(var e="",i=0;i<t;){var n=this.readByte();switch(n>>4){case 12:case 13:e+=String.fromCharCode((31&n)<<6|63&this.readByte()),i+=2;break;case 14:e+=String.fromCharCode((15&n)<<12|(63&this.readByte())<<6|63&this.readByte()),i+=3;break;default:e+=String.fromCharCode(n),i++}}return e},He.prototype.readFloat=function(){var t=this.buffer.getFloat32(this.index);return this.index+=4,t},He.prototype.readBoolean=function(){return 0!=this.readByte()};var We=He;function He(t,e,i,n){void 0===e&&(e=new Array),void 0===i&&(i=0),void 0===n&&(n=new DataView(t.buffer)),this.strings=e,this.index=i,this.buffer=n}var Ke=function(t,e,i,n,r){this.mesh=t,this.skin=e,this.slotIndex=i,this.parent=n,this.inheritDeform=r},qe=function(t,e){void 0===e&&(e=null),this.bones=t=void 0===t?null:t,this.vertices=e},Je=t=t||{},c=(jt.prototype.update=function(t,e){if(null==t)throw new Error("skeleton cannot be null.");var i=this.boundingBoxes,n=this.polygons,r=this.polygonPool,s=t.slots,o=s.length;i.length=0,r.freeAll(n);for(var a=n.length=0;a<o;a++){var h,l,c=s[a];c.bone.active&&(h=c.getAttachment())instanceof Je.BoundingBoxAttachment&&(h=h,i.push(h),(l=r.obtain()).length!=h.worldVerticesLength&&(l=Je.Utils.newFloatArray(h.worldVerticesLength)),n.push(l),h.computeWorldVertices(c,0,h.worldVerticesLength,l,0,2))}e?this.aabbCompute():(this.minX=Number.POSITIVE_INFINITY,this.minY=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY,this.maxY=Number.NEGATIVE_INFINITY)},jt.prototype.aabbCompute=function(){for(var t=Number.POSITIVE_INFINITY,e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY,n=Number.NEGATIVE_INFINITY,r=this.polygons,s=0,o=r.length;s<o;s++)for(var a=r[s],h=a,l=0,c=a.length;l<c;l+=2)var u=h[l],d=h[l+1],t=Math.min(t,u),e=Math.min(e,d),i=Math.max(i,u),n=Math.max(n,d);this.minX=t,this.minY=e,this.maxX=i,this.maxY=n},jt.prototype.aabbContainsPoint=function(t,e){return t>=this.minX&&t<=this.maxX&&e>=this.minY&&e<=this.maxY},jt.prototype.aabbIntersectsSegment=function(t,e,i,n){var r=this.minX,s=this.minY,o=this.maxX,a=this.maxY;return!(t<=r&&i<=r||e<=s&&n<=s||o<=t&&o<=i||a<=e&&a<=n)&&(s<(i=(n=(n-e)/(i-t))*(r-t)+e)&&i<a||(s<(i=n*(o-t)+e)&&i<a||(r<(i=(s-e)/n+t)&&i<o||r<(i=(a-e)/n+t)&&i<o)))},jt.prototype.aabbIntersectsSkeleton=function(t){return this.minX<t.maxX&&this.maxX>t.minX&&this.minY<t.maxY&&this.maxY>t.minY},jt.prototype.containsPoint=function(t,e){for(var i=this.polygons,n=0,r=i.length;n<r;n++)if(this.containsPointPolygon(i[n],t,e))return this.boundingBoxes[n];return null},jt.prototype.containsPointPolygon=function(t,e,i){for(var n=t,r=t.length,s=r-2,o=!1,a=0;a<r;a+=2){var h,l=n[a+1],c=n[s+1];(l<i&&i<=c||c<i&&i<=l)&&(h=n[a])+(i-l)/(c-l)*(n[s]-h)<e&&(o=!o),s=a}return o},jt.prototype.intersectsSegment=function(t,e,i,n){for(var r=this.polygons,s=0,o=r.length;s<o;s++)if(this.intersectsSegmentPolygon(r[s],t,e,i,n))return this.boundingBoxes[s];return null},jt.prototype.intersectsSegmentPolygon=function(t,e,i,n,r){for(var s=t,o=t.length,a=e-n,h=i-r,l=e*r-i*n,c=s[o-2],u=s[o-1],d=0;d<o;d+=2){var p=s[d],f=s[d+1],g=c*f-u*p,m=c-p,y=u-f,v=a*y-h*m,m=(l*m-a*g)/v;if((c<=m&&m<=p||p<=m&&m<=c)&&(e<=m&&m<=n||n<=m&&m<=e)){m=(l*y-h*g)/v;if((u<=m&&m<=f||f<=m&&m<=u)&&(i<=m&&m<=r||r<=m&&m<=i))return!0}c=p,u=f}return!1},jt.prototype.getPolygon=function(t){if(null==t)throw new Error("boundingBox cannot be null.");t=this.boundingBoxes.indexOf(t);return-1==t?null:this.polygons[t]},jt.prototype.getWidth=function(){return this.maxX-this.minX},jt.prototype.getHeight=function(){return this.maxY-this.minY},Je.SkeletonBounds=jt,W=t=t||{},Wt.prototype.clipStart=function(t,e){if(null!=this.clipAttachment)return 0;var i=(this.clipAttachment=e).worldVerticesLength,n=W.Utils.setArraySize(this.clippingPolygon,i),e=(e.computeWorldVertices(t,0,i,n,0,2),this.clippingPolygon);Wt.makeClockwise(e);for(var r=this.clippingPolygons=this.triangulator.decompose(e,this.triangulator.triangulate(e)),s=0,o=r.length;s<o;s++){var a=r[s];Wt.makeClockwise(a),a.push(a[0]),a.push(a[1])}return r.length},Wt.prototype.clipEndWithSlot=function(t){null!=this.clipAttachment&&this.clipAttachment.endSlot==t.data&&this.clipEnd()},Wt.prototype.clipEnd=function(){null!=this.clipAttachment&&(this.clipAttachment=null,this.clippingPolygons=null,this.clippedVertices.length=0,this.clippedTriangles.length=0,this.clippingPolygon.length=0)},Wt.prototype.isClipping=function(){return null!=this.clipAttachment},Wt.prototype.clipTriangles=function(t,B,e,F,i,n,r,s){var o=this.clipOutput,a=this.clippedVertices,h=this.clippedTriangles,N=this.clippingPolygons,z=this.clippingPolygons.length,l=s?12:8,c=0;a.length=0;t:for(var u=h.length=0;u<F;u+=3)for(var d=e[u]<<1,p=t[d],f=t[1+d],g=i[d],m=i[1+d],y=t[d=e[u+1]<<1],v=t[1+d],x=i[d],b=i[1+d],w=t[d=e[u+2]<<1],T=t[1+d],S=i[d],P=i[1+d],_=0;_<z;_++){var E=a.length;if(!this.clip(p,f,y,v,w,T,N[_],o)){(C=W.Utils.setArraySize(a,E+3*l))[E]=p,C[E+1]=f,C[E+2]=n.r,C[E+3]=n.g,C[E+4]=n.b,C[E+5]=n.a,s?(C[E+6]=g,C[E+7]=m,C[E+8]=r.r,C[E+9]=r.g,C[E+10]=r.b,C[E+11]=r.a,C[E+12]=y,C[E+13]=v,C[E+14]=n.r,C[E+15]=n.g,C[E+16]=n.b,C[E+17]=n.a,C[E+18]=x,C[E+19]=b,C[E+20]=r.r,C[E+21]=r.g,C[E+22]=r.b,C[E+23]=r.a,C[E+24]=w,C[E+25]=T,C[E+26]=n.r,C[E+27]=n.g,C[E+28]=n.b,C[E+29]=n.a,C[E+30]=S,C[E+31]=P,C[E+32]=r.r,C[E+33]=r.g,C[E+34]=r.b,C[E+35]=r.a):(C[E+6]=g,C[E+7]=m,C[E+8]=y,C[E+9]=v,C[E+10]=n.r,C[E+11]=n.g,C[E+12]=n.b,C[E+13]=n.a,C[E+14]=x,C[E+15]=b,C[E+16]=w,C[E+17]=T,C[E+18]=n.r,C[E+19]=n.g,C[E+20]=n.b,C[E+21]=n.a,C[E+22]=S,C[E+23]=P),E=h.length,(I=W.Utils.setArraySize(h,E+3))[E]=c,I[E+1]=c+1,I[E+2]=c+2,c+=3;continue t}var A=o.length;if(0!=A){for(var M=v-T,Y=w-y,X=p-w,U=T-f,V=1/(M*X+Y*(f-T)),k=A>>1,G=this.clipOutput,C=W.Utils.setArraySize(a,E+k*l),O=0;O<A;O+=2){var R=G[O],L=G[O+1],R=(C[E]=R,C[E+1]=L,C[E+2]=n.r,C[E+3]=n.g,C[E+4]=n.b,C[E+5]=n.a,R-w),L=L-T,D=(M*R+Y*L)*V,R=(U*R+X*L)*V,L=1-D-R;C[E+6]=g*D+x*R+S*L,C[E+7]=m*D+b*R+P*L,s&&(C[E+8]=r.r,C[E+9]=r.g,C[E+10]=r.b,C[E+11]=r.a),E+=l}var E=h.length,I=W.Utils.setArraySize(h,E+3*(k-2));for(k--,O=1;O<k;O++)I[E]=c,I[E+1]=c+O,I[E+2]=c+O+1,E+=3;c+=1+k}}},Wt.prototype.clip=function(t,e,i,n,r,s,o,a){var h=a,l=!1,c=null;2<=o.length%4?(c=a,a=this.scratch):c=this.scratch,c.length=0,c.push(t),c.push(e),c.push(i),c.push(n),c.push(r),c.push(s),c.push(t),c.push(e),a.length=0;for(var u=o,d=o.length-4,p=0;;p+=2){for(var f=u[p],g=u[p+1],m=u[p+2],y=u[p+3],v=f-m,x=g-y,b=c,w=c.length-2,T=a.length,S=0;S<w;S+=2){var P=b[S],_=b[S+1],E=b[S+2],A=b[S+3],M=0<v*(A-y)-x*(E-m);if(0<v*(_-y)-x*(P-m)){if(M){a.push(E),a.push(A);continue}var k,C,O,R=(k=A-_)*(m-f)-(C=E-P)*(y-g);1e-6<Math.abs(R)?(a.push(f+(m-f)*(O=(C*(g-_)-k*(f-P))/R)),a.push(g+(y-g)*O)):(a.push(f),a.push(g))}else M&&(R=(k=A-_)*(m-f)-(C=E-P)*(y-g),1e-6<Math.abs(R)?(a.push(f+(m-f)*(O=(C*(g-_)-k*(f-P))/R)),a.push(g+(y-g)*O)):(a.push(f),a.push(g)),a.push(E),a.push(A));l=!0}if(T==a.length)return!(h.length=0);if(a.push(a[0]),a.push(a[1]),p==d)break;T=a;(a=c).length=0,c=T}if(h!=a)for(var p=h.length=0,L=a.length-2;p<L;p++)h[p]=a[p];else h.length=h.length-2;return l},Wt.makeClockwise=function(t){for(var e,i,n,r=t,t=t.length,s=r[t-2]*r[1]-r[0]*r[t-1],o=0,a=t-3;o<a;o+=2)e=r[o],i=r[o+1],n=r[o+2],s+=e*r[o+3]-n*i;if(!(s<0))for(var o=0,h=t-2,a=t>>1;o<a;o+=2){var l=r[o],c=r[o+1],u=h-o;r[o]=r[u],r[o+1]=r[1+u],r[u]=l,r[1+u]=c}},W.SkeletonClipping=Wt,a=t=t||{},Ht.prototype.findBone=function(t){if(null==t)throw new Error("boneName cannot be null.");for(var e=this.bones,i=0,n=e.length;i<n;i++){var r=e[i];if(r.name==t)return r}return null},Ht.prototype.findBoneIndex=function(t){if(null==t)throw new Error("boneName cannot be null.");for(var e=this.bones,i=0,n=e.length;i<n;i++)if(e[i].name==t)return i;return-1},Ht.prototype.findSlot=function(t){if(null==t)throw new Error("slotName cannot be null.");for(var e=this.slots,i=0,n=e.length;i<n;i++){var r=e[i];if(r.name==t)return r}return null},Ht.prototype.findSlotIndex=function(t){if(null==t)throw new Error("slotName cannot be null.");for(var e=this.slots,i=0,n=e.length;i<n;i++)if(e[i].name==t)return i;return-1},Ht.prototype.findSkin=function(t){if(null==t)throw new Error("skinName cannot be null.");for(var e=this.skins,i=0,n=e.length;i<n;i++){var r=e[i];if(r.name==t)return r}return null},Ht.prototype.findEvent=function(t){if(null==t)throw new Error("eventDataName cannot be null.");for(var e=this.events,i=0,n=e.length;i<n;i++){var r=e[i];if(r.name==t)return r}return null},Ht.prototype.findAnimation=function(t){if(null==t)throw new Error("animationName cannot be null.");for(var e=this.animations,i=0,n=e.length;i<n;i++){var r=e[i];if(r.name==t)return r}return null},Ht.prototype.findIkConstraint=function(t){if(null==t)throw new Error("constraintName cannot be null.");for(var e=this.ikConstraints,i=0,n=e.length;i<n;i++){var r=e[i];if(r.name==t)return r}return null},Ht.prototype.findTransformConstraint=function(t){if(null==t)throw new Error("constraintName cannot be null.");for(var e=this.transformConstraints,i=0,n=e.length;i<n;i++){var r=e[i];if(r.name==t)return r}return null},Ht.prototype.findPathConstraint=function(t){if(null==t)throw new Error("constraintName cannot be null.");for(var e=this.pathConstraints,i=0,n=e.length;i<n;i++){var r=e[i];if(r.name==t)return r}return null},Ht.prototype.findPathConstraintIndex=function(t){if(null==t)throw new Error("pathConstraintName cannot be null.");for(var e=this.pathConstraints,i=0,n=e.length;i<n;i++)if(e[i].name==t)return i;return-1},a.SkeletonData=Ht,tt=t=t||{},Gi.prototype.readSkeletonData=function(t){var e=this.scale,i=new tt.SkeletonData,n="string"==typeof t?JSON.parse(t):t,t=n.skeleton;if(null!=t){if(i.hash=t.hash,i.version=t.spine,"3.8.75"==i.version)throw new Error("Unsupported skeleton data, please export with a newer version of Spine.");i.x=t.x,i.y=t.y,i.width=t.width,i.height=t.height,i.fps=t.fps,i.imagesPath=t.images}if(n.bones)for(var r=0;r<n.bones.length;r++){var s=n.bones[r],o=null,a=this.getValue(s,"parent",null);if(null!=a&&null==(o=i.findBone(a)))throw new Error("Parent bone not found: "+a);(u=new tt.BoneData(i.bones.length,s.name,o)).length=this.getValue(s,"length",0)*e,u.x=this.getValue(s,"x",0)*e,u.y=this.getValue(s,"y",0)*e,u.rotation=this.getValue(s,"rotation",0),u.scaleX=this.getValue(s,"scaleX",1),u.scaleY=this.getValue(s,"scaleY",1),u.shearX=this.getValue(s,"shearX",0),u.shearY=this.getValue(s,"shearY",0),u.transformMode=Gi.transformModeFromString(this.getValue(s,"transform","normal")),u.skinRequired=this.getValue(s,"skin",!1),i.bones.push(u)}if(n.slots)for(r=0;r<n.slots.length;r++){var h=(T=n.slots[r]).name,l=T.bone,c=i.findBone(l);if(null==c)throw new Error("Slot bone not found: "+l);var u=new tt.SlotData(i.slots.length,h,c),c=this.getValue(T,"color",null),c=(null!=c&&u.color.setFromString(c),this.getValue(T,"dark",null));null!=c&&(u.darkColor=new tt.Color(1,1,1,1),u.darkColor.setFromString(c)),u.attachmentName=this.getValue(T,"attachment",null),u.blendMode=Gi.blendModeFromString(this.getValue(T,"blend","normal")),i.slots.push(u)}if(n.ik)for(r=0;r<n.ik.length;r++){var d=n.ik[r];(u=new tt.IkConstraintData(d.name)).order=this.getValue(d,"order",0),u.skinRequired=this.getValue(d,"skin",!1);for(var p=0;p<d.bones.length;p++){if(l=d.bones[p],null==(y=i.findBone(l)))throw new Error("IK bone not found: "+l);u.bones.push(y)}var f=d.target;if(u.target=i.findBone(f),null==u.target)throw new Error("IK target bone not found: "+f);u.mix=this.getValue(d,"mix",1),u.softness=this.getValue(d,"softness",0)*e,u.bendDirection=this.getValue(d,"bendPositive",!0)?1:-1,u.compress=this.getValue(d,"compress",!1),u.stretch=this.getValue(d,"stretch",!1),u.uniform=this.getValue(d,"uniform",!1),i.ikConstraints.push(u)}if(n.transform)for(r=0;r<n.transform.length;r++){for(d=n.transform[r],(u=new tt.TransformConstraintData(d.name)).order=this.getValue(d,"order",0),u.skinRequired=this.getValue(d,"skin",!1),p=0;p<d.bones.length;p++){if(l=d.bones[p],null==(y=i.findBone(l)))throw new Error("Transform constraint bone not found: "+l);u.bones.push(y)}if(f=d.target,u.target=i.findBone(f),null==u.target)throw new Error("Transform constraint target bone not found: "+f);u.local=this.getValue(d,"local",!1),u.relative=this.getValue(d,"relative",!1),u.offsetRotation=this.getValue(d,"rotation",0),u.offsetX=this.getValue(d,"x",0)*e,u.offsetY=this.getValue(d,"y",0)*e,u.offsetScaleX=this.getValue(d,"scaleX",0),u.offsetScaleY=this.getValue(d,"scaleY",0),u.offsetShearY=this.getValue(d,"shearY",0),u.rotateMix=this.getValue(d,"rotateMix",1),u.translateMix=this.getValue(d,"translateMix",1),u.scaleMix=this.getValue(d,"scaleMix",1),u.shearMix=this.getValue(d,"shearMix",1),i.transformConstraints.push(u)}if(n.path)for(r=0;r<n.path.length;r++){for(d=n.path[r],(u=new tt.PathConstraintData(d.name)).order=this.getValue(d,"order",0),u.skinRequired=this.getValue(d,"skin",!1),p=0;p<d.bones.length;p++){if(l=d.bones[p],null==(y=i.findBone(l)))throw new Error("Transform constraint bone not found: "+l);u.bones.push(y)}if(f=d.target,u.target=i.findSlot(f),null==u.target)throw new Error("Path target slot not found: "+f);u.positionMode=Gi.positionModeFromString(this.getValue(d,"positionMode","percent")),u.spacingMode=Gi.spacingModeFromString(this.getValue(d,"spacingMode","length")),u.rotateMode=Gi.rotateModeFromString(this.getValue(d,"rotateMode","tangent")),u.offsetRotation=this.getValue(d,"rotation",0),u.position=this.getValue(d,"position",0),u.positionMode==tt.PositionMode.Fixed&&(u.position*=e),u.spacing=this.getValue(d,"spacing",0),u.spacingMode!=tt.SpacingMode.Length&&u.spacingMode!=tt.SpacingMode.Fixed||(u.spacing*=e),u.rotateMix=this.getValue(d,"rotateMix",1),u.translateMix=this.getValue(d,"translateMix",1),i.pathConstraints.push(u)}if(n.skins)for(r=0;r<n.skins.length;r++){var g=n.skins[r],m=new tt.Skin(g.name);if(g.bones)for(var y,v=0;v<g.bones.length;v++){if(null==(y=i.findBone(g.bones[v])))throw new Error("Skin bone not found: "+g.bones[r]);m.bones.push(y)}if(g.ik)for(v=0;v<g.ik.length;v++){if(null==(x=i.findIkConstraint(g.ik[v])))throw new Error("Skin IK constraint not found: "+g.ik[r]);m.constraints.push(x)}if(g.transform)for(v=0;v<g.transform.length;v++){if(null==(x=i.findTransformConstraint(g.transform[v])))throw new Error("Skin transform constraint not found: "+g.transform[r]);m.constraints.push(x)}if(g.path)for(var x,v=0;v<g.path.length;v++){if(null==(x=i.findPathConstraint(g.path[v])))throw new Error("Skin path constraint not found: "+g.path[r]);m.constraints.push(x)}for(h in g.attachments){var b=i.findSlot(h);if(null==b)throw new Error("Slot not found: "+h);var w,T=g.attachments[h];for(w in T){var S=this.readAttachment(T[w],m,b.index,w,i);null!=S&&m.setAttachment(b.index,w,S)}}i.skins.push(m),"default"==m.name&&(i.defaultSkin=m)}for(var r=0,P=this.linkedMeshes.length;r<P;r++){var _=this.linkedMeshes[r];if(null==(m=null==_.skin?i.defaultSkin:i.findSkin(_.skin)))throw new Error("Skin not found: "+_.skin);var E=m.getAttachment(_.slotIndex,_.parent);if(null==E)throw new Error("Parent mesh not found: "+_.parent);_.mesh.deformAttachment=_.inheritDeform?E:_.mesh,_.mesh.setParentMesh(E),_.mesh.updateUVs()}if(this.linkedMeshes.length=0,n.events)for(var A in n.events){var M=n.events[A];(u=new tt.EventData(A)).intValue=this.getValue(M,"int",0),u.floatValue=this.getValue(M,"float",0),u.stringValue=this.getValue(M,"string",""),u.audioPath=this.getValue(M,"audio",null),null!=u.audioPath&&(u.volume=this.getValue(M,"volume",1),u.balance=this.getValue(M,"balance",0)),i.events.push(u)}if(n.animations)for(var k in n.animations){var C=n.animations[k];this.readAnimation(C,k,i)}return i},Gi.prototype.readAttachment=function(t,e,i,n,r){var s=this.scale;switch(n=this.getValue(t,"name",n),this.getValue(t,"type","region")){case"region":var o=this.getValue(t,"path",n),a=this.attachmentLoader.newRegionAttachment(e,n,o);return null==a?null:(a.path=o,a.x=this.getValue(t,"x",0)*s,a.y=this.getValue(t,"y",0)*s,a.scaleX=this.getValue(t,"scaleX",1),a.scaleY=this.getValue(t,"scaleY",1),a.rotation=this.getValue(t,"rotation",0),a.width=t.width*s,a.height=t.height*s,null!=(d=this.getValue(t,"color",null))&&a.color.setFromString(d),a.updateOffset(),a);case"boundingbox":a=this.attachmentLoader.newBoundingBoxAttachment(e,n);return null==a?null:(this.readVertices(t,a,t.vertexCount<<1),null!=(d=this.getValue(t,"color",null))&&a.color.setFromString(d),a);case"mesh":case"linkedmesh":o=this.getValue(t,"path",n),a=this.attachmentLoader.newMeshAttachment(e,n,o);if(null==a)return null;a.path=o,null!=(d=this.getValue(t,"color",null))&&a.color.setFromString(d),a.width=this.getValue(t,"width",0)*s,a.height=this.getValue(t,"height",0)*s;var h=this.getValue(t,"parent",null);return null!=h?this.linkedMeshes.push(new Dt(a,this.getValue(t,"skin",null),i,h,this.getValue(t,"deform",!0))):(h=t.uvs,this.readVertices(t,a,h.length),a.triangles=t.triangles,a.regionUVs=h,a.updateUVs(),a.edges=this.getValue(t,"edges",null),a.hullLength=2*this.getValue(t,"hull",0)),a;case"path":if(null==(o=this.attachmentLoader.newPathAttachment(e,n)))return null;o.closed=this.getValue(t,"closed",!1),o.constantSpeed=this.getValue(t,"constantSpeed",!0);var l=t.vertexCount;this.readVertices(t,o,l<<1);for(var c=tt.Utils.newArray(l/3,0),u=0;u<t.lengths.length;u++)c[u]=t.lengths[u]*s;return o.lengths=c,null!=(d=this.getValue(t,"color",null))&&o.color.setFromString(d),o;case"point":h=this.attachmentLoader.newPointAttachment(e,n);return null==h?null:(h.x=this.getValue(t,"x",0)*s,h.y=this.getValue(t,"y",0)*s,h.rotation=this.getValue(t,"rotation",0),null!=(d=this.getValue(t,"color",null))&&h.color.setFromString(d),h);case"clipping":a=this.attachmentLoader.newClippingAttachment(e,n);if(null==a)return null;o=this.getValue(t,"end",null);if(null!=o){h=r.findSlot(o);if(null==h)throw new Error("Clipping end slot not found: "+o);a.endSlot=h}var d,l=t.vertexCount;return this.readVertices(t,a,l<<1),null!=(d=this.getValue(t,"color",null))&&a.color.setFromString(d),a}return null},Gi.prototype.readVertices=function(t,e,i){var n=this.scale,r=(e.worldVerticesLength=i,t.vertices);if(i!=r.length){for(var s=new Array,o=new Array,a=0,h=r.length;a<h;){var l=r[a++];o.push(l);for(var c=a+4*l;a<c;a+=4)o.push(r[a]),s.push(r[a+1]*n),s.push(r[a+2]*n),s.push(r[a+3])}e.bones=o,e.vertices=tt.Utils.toFloatArray(s)}else{var u=tt.Utils.toFloatArray(r);if(1!=n)for(a=0,h=r.length;a<h;a++)u[a]*=n;e.vertices=u}},Gi.prototype.readAnimation=function(t,B,e){var i=this.scale,n=new Array,r=0;if(t.slots)for(var s in t.slots){var o=t.slots[s];if(-1==(R=e.findSlotIndex(s)))throw new Error("Slot not found: "+s);for(w in o){var a=o[w];if("attachment"==w){(m=new tt.AttachmentTimeline(a.length)).slotIndex=R;for(var h=0,l=0;l<a.length;l++){var c=a[l];m.setFrame(h++,this.getValue(c,"time",0),c.name)}n.push(m),r=Math.max(r,m.frames[m.getFrameCount()-1])}else if("color"==w){for((m=new tt.ColorTimeline(a.length)).slotIndex=R,l=h=0;l<a.length;l++){var c=a[l],u=new tt.Color;u.setFromString(c.color),m.setFrame(h,this.getValue(c,"time",0),u.r,u.g,u.b,u.a),this.readCurve(c,m,h),h++}n.push(m),r=Math.max(r,m.frames[(m.getFrameCount()-1)*tt.ColorTimeline.ENTRIES])}else{if("twoColor"!=w)throw new Error("Invalid timeline type for a slot: "+w+" ("+s+")");for((m=new tt.TwoColorTimeline(a.length)).slotIndex=R,l=h=0;l<a.length;l++){var c=a[l],d=new tt.Color,p=new tt.Color;d.setFromString(c.light),p.setFromString(c.dark),m.setFrame(h,this.getValue(c,"time",0),d.r,d.g,d.b,d.a,p.r,p.g,p.b),this.readCurve(c,m,h),h++}n.push(m),r=Math.max(r,m.frames[(m.getFrameCount()-1)*tt.TwoColorTimeline.ENTRIES])}}}if(t.bones)for(var f in t.bones){var F=t.bones[f],g=e.findBoneIndex(f);if(-1==g)throw new Error("Bone not found: "+f);for(w in F)if(a=F[w],"rotate"===w){for((m=new tt.RotateTimeline(a.length)).boneIndex=g,l=h=0;l<a.length;l++)c=a[l],m.setFrame(h,this.getValue(c,"time",0),this.getValue(c,"angle",0)),this.readCurve(c,m,h),h++;n.push(m),r=Math.max(r,m.frames[(m.getFrameCount()-1)*tt.RotateTimeline.ENTRIES])}else{if("translate"!==w&&"scale"!==w&&"shear"!==w)throw new Error("Invalid timeline type for a bone: "+w+" ("+f+")");var m=null,y=1,N=0;for("scale"===w?(m=new tt.ScaleTimeline(a.length),N=1):"shear"===w?m=new tt.ShearTimeline(a.length):(m=new tt.TranslateTimeline(a.length),y=i),m.boneIndex=g,l=h=0;l<a.length;l++){var c=a[l],z=this.getValue(c,"x",N),Y=this.getValue(c,"y",N);m.setFrame(h,this.getValue(c,"time",0),z*y,Y*y),this.readCurve(c,m,h),h++}n.push(m),r=Math.max(r,m.frames[(m.getFrameCount()-1)*tt.TranslateTimeline.ENTRIES])}}if(t.ik)for(var v in t.ik){var x=t.ik[v],X=e.findIkConstraint(v);for((m=new tt.IkConstraintTimeline(x.length)).ikConstraintIndex=e.ikConstraints.indexOf(X),l=h=0;l<x.length;l++)c=x[l],m.setFrame(h,this.getValue(c,"time",0),this.getValue(c,"mix",1),this.getValue(c,"softness",0)*i,this.getValue(c,"bendPositive",!0)?1:-1,this.getValue(c,"compress",!1),this.getValue(c,"stretch",!1)),this.readCurve(c,m,h),h++;n.push(m),r=Math.max(r,m.frames[(m.getFrameCount()-1)*tt.IkConstraintTimeline.ENTRIES])}if(t.transform)for(var v in t.transform){for(x=t.transform[v],X=e.findTransformConstraint(v),(m=new tt.TransformConstraintTimeline(x.length)).transformConstraintIndex=e.transformConstraints.indexOf(X),l=h=0;l<x.length;l++)c=x[l],m.setFrame(h,this.getValue(c,"time",0),this.getValue(c,"rotateMix",1),this.getValue(c,"translateMix",1),this.getValue(c,"scaleMix",1),this.getValue(c,"shearMix",1)),this.readCurve(c,m,h),h++;n.push(m),r=Math.max(r,m.frames[(m.getFrameCount()-1)*tt.TransformConstraintTimeline.ENTRIES])}if(t.path)for(var v in t.path){var x=t.path[v],b=e.findPathConstraintIndex(v);if(-1==b)throw new Error("Path constraint not found: "+v);var U=e.pathConstraints[b];for(w in x)if(a=x[w],"position"===w||"spacing"===w){m=null,y=1;for("spacing"===w?(m=new tt.PathConstraintSpacingTimeline(a.length),U.spacingMode!=tt.SpacingMode.Length&&U.spacingMode!=tt.SpacingMode.Fixed||(y=i)):(m=new tt.PathConstraintPositionTimeline(a.length),U.positionMode==tt.PositionMode.Fixed&&(y=i)),m.pathConstraintIndex=b,l=h=0;l<a.length;l++)c=a[l],m.setFrame(h,this.getValue(c,"time",0),this.getValue(c,w,0)*y),this.readCurve(c,m,h),h++;n.push(m),r=Math.max(r,m.frames[(m.getFrameCount()-1)*tt.PathConstraintPositionTimeline.ENTRIES])}else if("mix"===w){for((m=new tt.PathConstraintMixTimeline(a.length)).pathConstraintIndex=b,l=h=0;l<a.length;l++)c=a[l],m.setFrame(h,this.getValue(c,"time",0),this.getValue(c,"rotateMix",1),this.getValue(c,"translateMix",1)),this.readCurve(c,m,h),h++;n.push(m),r=Math.max(r,m.frames[(m.getFrameCount()-1)*tt.PathConstraintMixTimeline.ENTRIES])}}if(t.deform)for(var V in t.deform){var G=t.deform[V],j=e.findSkin(V);if(null==j)throw new Error("Skin not found: "+V);for(s in G){if(o=G[s],-1==(R=e.findSlotIndex(s)))throw new Error("Slot not found: "+o.name);for(var w in o){var a=o[w],T=j.getAttachment(R,w);if(null==T)throw new Error("Deform attachment not found: "+a.name);var W=null!=T.bones,S=T.vertices,H=W?S.length/3*2:S.length;(m=new tt.DeformTimeline(a.length)).slotIndex=R,m.attachment=T;for(var h=0,P=0;P<a.length;P++){var c=a[P],_=void 0,E=this.getValue(c,"vertices",null);if(null==E)_=W?tt.Utils.newFloatArray(H):S;else{var _=tt.Utils.newFloatArray(H),K=this.getValue(c,"offset",0);if(tt.Utils.arrayCopy(E,0,_,K,E.length),1!=i)for(var q=(l=K)+E.length;l<q;l++)_[l]*=i;if(!W)for(l=0;l<H;l++)_[l]+=S[l]}m.setFrame(h,this.getValue(c,"time",0),_),this.readCurve(c,m,h),h++}n.push(m),r=Math.max(r,m.frames[m.getFrameCount()-1])}}}var A=t.drawOrder;if(null!=(A=null==A?t.draworder:A)){for(var m=new tt.DrawOrderTimeline(A.length),M=e.slots.length,h=0,P=0;P<A.length;P++){var J=A[P],k=null,C=this.getValue(J,"offsets",null);if(null!=C){for(var k=tt.Utils.newArray(M,-1),Z=tt.Utils.newArray(M-C.length,0),O=0,Q=0,l=0;l<C.length;l++){var R,$=C[l];if(-1==(R=e.findSlotIndex($.slot)))throw new Error("Slot not found: "+$.slot);for(;O!=R;)Z[Q++]=O++;k[O+$.offset]=O++}for(;O<M;)Z[Q++]=O++;for(l=M-1;0<=l;l--)-1==k[l]&&(k[l]=Z[--Q])}m.setFrame(h++,this.getValue(J,"time",0),k)}n.push(m),r=Math.max(r,m.frames[m.getFrameCount()-1])}if(t.events){for(m=new tt.EventTimeline(t.events.length),l=h=0;l<t.events.length;l++){var L=t.events[l],D=e.findEvent(L.name);if(null==D)throw new Error("Event not found: "+L.name);var I=new tt.Event(tt.Utils.toSinglePrecision(this.getValue(L,"time",0)),D);I.intValue=this.getValue(L,"int",D.intValue),I.floatValue=this.getValue(L,"float",D.floatValue),I.stringValue=this.getValue(L,"string",D.stringValue),null!=I.data.audioPath&&(I.volume=this.getValue(L,"volume",1),I.balance=this.getValue(L,"balance",0)),m.setFrame(h++,I)}n.push(m),r=Math.max(r,m.frames[m.getFrameCount()-1])}if(isNaN(r))throw new Error("Error while parsing animation, duration is NaN");e.animations.push(new tt.Animation(B,n,r))},Gi.prototype.readCurve=function(t,e,i){var n;t.hasOwnProperty("curve")&&("stepped"==t.curve?e.setStepped(i):(n=t.curve,e.setCurve(i,n,this.getValue(t,"c2",0),this.getValue(t,"c3",1),this.getValue(t,"c4",1))))},Gi.prototype.getValue=function(t,e,i){return void 0!==t[e]?t[e]:i},Gi.blendModeFromString=function(t){if("normal"==(t=t.toLowerCase()))return tt.BlendMode.Normal;if("additive"==t)return tt.BlendMode.Additive;if("multiply"==t)return tt.BlendMode.Multiply;if("screen"==t)return tt.BlendMode.Screen;throw new Error("Unknown blend mode: "+t)},Gi.positionModeFromString=function(t){if("fixed"==(t=t.toLowerCase()))return tt.PositionMode.Fixed;if("percent"==t)return tt.PositionMode.Percent;throw new Error("Unknown position mode: "+t)},Gi.spacingModeFromString=function(t){if("length"==(t=t.toLowerCase()))return tt.SpacingMode.Length;if("fixed"==t)return tt.SpacingMode.Fixed;if("percent"==t)return tt.SpacingMode.Percent;throw new Error("Unknown position mode: "+t)},Gi.rotateModeFromString=function(t){if("tangent"==(t=t.toLowerCase()))return tt.RotateMode.Tangent;if("chain"==t)return tt.RotateMode.Chain;if("chainscale"==t)return tt.RotateMode.ChainScale;throw new Error("Unknown rotate mode: "+t)},Gi.transformModeFromString=function(t){if("normal"==(t=t.toLowerCase()))return tt.TransformMode.Normal;if("onlytranslation"==t)return tt.TransformMode.OnlyTranslation;if("norotationorreflection"==t)return tt.TransformMode.NoRotationOrReflection;if("noscale"==t)return tt.TransformMode.NoScale;if("noscaleorreflection"==t)return tt.TransformMode.NoScaleOrReflection;throw new Error("Unknown transform mode: "+t)},tt.SkeletonJson=Gi,Dt=function(t,e,i,n,r){this.mesh=t,this.skin=e,this.slotIndex=i,this.parent=n,this.inheritDeform=r},(Lt=t=t||{}).SkinEntry=Ui,Vi.prototype.setAttachment=function(t,e,i){if(null==i)throw new Error("attachment cannot be null.");var n=this.attachments;t>=n.length&&(n.length=t+1),n[t]||(n[t]={}),n[t][e]=i},Vi.prototype.addSkin=function(t){for(var e=0;e<t.bones.length;e++){for(var i=t.bones[e],n=!1,r=0;r<this.bones.length;r++)if(this.bones[r]==i){n=!0;break}n||this.bones.push(i)}for(e=0;e<t.constraints.length;e++){for(var s=t.constraints[e],n=!1,r=0;r<this.constraints.length;r++)if(this.constraints[r]==s){n=!0;break}n||this.constraints.push(s)}for(var o=t.getAttachments(),e=0;e<o.length;e++){var a=o[e];this.setAttachment(a.slotIndex,a.name,a.attachment)}},Vi.prototype.copySkin=function(t){for(var e=0;e<t.bones.length;e++){for(var i=t.bones[e],n=!1,r=0;r<this.bones.length;r++)if(this.bones[r]==i){n=!0;break}n||this.bones.push(i)}for(e=0;e<t.constraints.length;e++){for(var s=t.constraints[e],n=!1,r=0;r<this.constraints.length;r++)if(this.constraints[r]==s){n=!0;break}n||this.constraints.push(s)}for(var o=t.getAttachments(),e=0;e<o.length;e++){var a=o[e];null!=a.attachment&&(a.attachment instanceof Lt.MeshAttachment?a.attachment=a.attachment.newLinkedMesh():a.attachment=a.attachment.copy(),this.setAttachment(a.slotIndex,a.name,a.attachment))}},Vi.prototype.getAttachment=function(t,e){t=this.attachments[t];return t?t[e]:null},Vi.prototype.removeAttachment=function(t,e){t=this.attachments[t];t&&(t[e]=null)},Vi.prototype.getAttachments=function(){for(var t=new Array,e=0;e<this.attachments.length;e++){var i=this.attachments[e];if(i)for(var n in i){var r=i[n];r&&t.push(new Ui(e,n,r))}}return t},Vi.prototype.getAttachmentsForSlot=function(t,e){var i=this.attachments[t];if(i)for(var n in i){var r=i[n];r&&e.push(new Ui(t,n,r))}},Vi.prototype.clear=function(){this.attachments.length=0,this.bones.length=0,this.constraints.length=0},Vi.prototype.attachAll=function(t,e){for(var i=0,n=0;n<t.slots.length;n++){var r=t.slots[n],s=r.getAttachment();if(s&&i<e.attachments.length){var o,a=e.attachments[i];for(o in a)if(s==a[o]){var h=this.getAttachment(i,o);null!=h&&r.setAttachment(h);break}}i++}},Lt.Skin=Vi,F=t=t||{},Kt.prototype.getSkeleton=function(){return this.bone.skeleton},Kt.prototype.getAttachment=function(){return this.attachment},Kt.prototype.setAttachment=function(t){this.attachment!=t&&(this.attachment=t,this.attachmentTime=this.bone.skeleton.time,this.deform.length=0)},Kt.prototype.setAttachmentTime=function(t){this.attachmentTime=this.bone.skeleton.time-t},Kt.prototype.getAttachmentTime=function(){return this.bone.skeleton.time-this.attachmentTime},Kt.prototype.setToSetupPose=function(){this.color.setFromColor(this.data.color),null!=this.darkColor&&this.darkColor.setFromColor(this.data.darkColor),null==this.data.attachmentName?this.attachment=null:(this.attachment=null,this.setAttachment(this.bone.skeleton.getAttachment(this.data.index,this.data.attachmentName)))},F.Slot=Kt,(Y=t=t||{}).SlotData=function(t,e,i){if(this.color=new Y.Color(1,1,1,1),t<0)throw new Error("index must be >= 0.");if(null==e)throw new Error("name cannot be null.");if(null==i)throw new Error("boneData cannot be null.");this.index=t,this.name=e,this.boneData=i},t=t||{});$e.prototype.getImage=function(){return this._image},$e.filterFromString=function(t){switch(t.toLowerCase()){case"nearest":return Ze.Nearest;case"linear":return Ze.Linear;case"mipmap":return Ze.MipMap;case"mipmapnearestnearest":return Ze.MipMapNearestNearest;case"mipmaplinearnearest":return Ze.MipMapLinearNearest;case"mipmapnearestlinear":return Ze.MipMapNearestLinear;case"mipmaplinearlinear":return Ze.MipMapLinearLinear;default:throw new Error("Unknown texture filter "+t)}},$e.wrapFromString=function(t){switch(t.toLowerCase()){case"mirroredtepeat":return Qe.MirroredRepeat;case"clamptoedge":return Qe.ClampToEdge;case"repeat":return Qe.Repeat;default:throw new Error("Unknown texture wrap "+t)}};var Ze,Qe,h=$e;function $e(t){this._image=t}c.Texture=h,(a=Ze=c.TextureFilter||(c.TextureFilter={}))[a.Nearest=9728]="Nearest",a[a.Linear=9729]="Linear",a[a.MipMap=9987]="MipMap",a[a.MipMapNearestNearest=9984]="MipMapNearestNearest",a[a.MipMapLinearNearest=9985]="MipMapLinearNearest",a[a.MipMapNearestLinear=9986]="MipMapNearestLinear",a[a.MipMapLinearLinear=9987]="MipMapLinearLinear",(a=Qe=c.TextureWrap||(c.TextureWrap={}))[a.MirroredRepeat=33648]="MirroredRepeat",a[a.ClampToEdge=33071]="ClampToEdge",a[a.Repeat=10497]="Repeat",c.TextureRegion=function(){this.u=0,this.v=0,this.u2=0,this.v2=0,this.width=0,this.height=0,this.rotate=!1,this.offsetX=0,this.offsetY=0,this.originalWidth=0,this.originalHeight=0},e(ei,ti=h),ei.prototype.setFilters=function(t,e){},ei.prototype.setWraps=function(t,e){},ei.prototype.dispose=function(){};var ti,a=ei;function ei(){return null!==ti&&ti.apply(this,arguments)||this}c.FakeTexture=a;var ii=t=t||{};function ni(t,e){this.pages=new Array,this.regions=new Array,this.load(t,e)}ni.prototype.load=function(t,e){if(null==e)throw new Error("textureLoader cannot be null.");for(var i=new ri(t),n=new Array(4),r=null;;){var s,o,a,h,l,c=i.readLine();if(null==c)break;0==(c=c.trim()).length?r=null:r?((s=new hi).name=c,s.page=r,"true"==(l=i.readValue()).toLocaleLowerCase()?s.degrees=90:"false"==l.toLocaleLowerCase()?s.degrees=0:s.degrees=parseFloat(l),s.rotate=90==s.degrees,i.readTuple(n),l=parseInt(n[0]),o=parseInt(n[1]),i.readTuple(n),a=parseInt(n[0]),h=parseInt(n[1]),s.u=l/r.width,s.v=o/r.height,s.rotate?(s.u2=(l+h)/r.width,s.v2=(o+a)/r.height):(s.u2=(l+a)/r.width,s.v2=(o+h)/r.height),s.x=l,s.y=o,s.width=Math.abs(a),s.height=Math.abs(h),4==i.readTuple(n)&&4==i.readTuple(n)&&i.readTuple(n),s.originalWidth=parseInt(n[0]),s.originalHeight=parseInt(n[1]),i.readTuple(n),s.offsetX=parseInt(n[0]),s.offsetY=parseInt(n[1]),s.index=parseInt(i.readValue()),s.texture=r.texture,this.regions.push(s)):((r=new oi).name=c,2==i.readTuple(n)&&(r.width=parseInt(n[0]),r.height=parseInt(n[1]),i.readTuple(n)),i.readTuple(n),r.minFilter=ii.Texture.filterFromString(n[0]),r.magFilter=ii.Texture.filterFromString(n[1]),l=i.readValue(),r.uWrap=ii.TextureWrap.ClampToEdge,r.vWrap=ii.TextureWrap.ClampToEdge,"x"==l?r.uWrap=ii.TextureWrap.Repeat:"y"==l?r.vWrap=ii.TextureWrap.Repeat:"xy"==l&&(r.uWrap=r.vWrap=ii.TextureWrap.Repeat),r.texture=e(c),r.texture.setFilters(r.minFilter,r.magFilter),r.texture.setWraps(r.uWrap,r.vWrap),r.width=r.texture.getImage().width,r.height=r.texture.getImage().height,this.pages.push(r))}},ni.prototype.findRegion=function(t){for(var e=0;e<this.regions.length;e++)if(this.regions[e].name==t)return this.regions[e];return null},ni.prototype.dispose=function(){for(var t=0;t<this.pages.length;t++)this.pages[t].texture.dispose()},ii.TextureAtlas=ni,si.prototype.readLine=function(){return this.index>=this.lines.length?null:this.lines[this.index++]},si.prototype.readValue=function(){var t=this.readLine(),e=t.indexOf(":");if(-1==e)throw new Error("Invalid line: "+t);return t.substring(e+1).trim()},si.prototype.readTuple=function(t){var e=this.readLine(),i=e.indexOf(":");if(-1==i)throw new Error("Invalid line: "+e);for(var n=0,r=i+1;n<3;n++){var s=e.indexOf(",",r);if(-1==s)break;t[n]=e.substr(r,s-r).trim(),r=s+1}return t[n]=e.substring(r).trim(),n+1};var ri=si;function si(t){this.index=0,this.lines=t.split(/\r\n|\r|\n/)}var oi=function(){};ii.TextureAtlasPage=oi,ai=ii.TextureRegion,e(li,ai);var ai,hi=li;function li(){return null!==ai&&ai.apply(this,arguments)||this}ii.TextureAtlasRegion=hi,E=t=t||{},qt.prototype.isActive=function(){return this.active},qt.prototype.apply=function(){this.update()},qt.prototype.update=function(){this.data.local?this.data.relative?this.applyRelativeLocal():this.applyAbsoluteLocal():this.data.relative?this.applyRelativeWorld():this.applyAbsoluteWorld()},qt.prototype.applyAbsoluteWorld=function(){for(var t=this.rotateMix,e=this.translateMix,i=this.scaleMix,n=this.shearMix,r=this.target,s=r.a,o=r.b,a=r.c,h=r.d,l=0<s*h-o*a?E.MathUtils.degRad:-E.MathUtils.degRad,c=this.data.offsetRotation*l,u=this.data.offsetShearY*l,d=this.bones,p=0,f=d.length;p<f;p++){var g,m,y,v,x,b,w,T,S=d[p],P=!1;0!=t&&(m=S.a,v=S.b,y=S.c,x=S.d,(w=Math.atan2(a,s)-Math.atan2(y,m)+c)>E.MathUtils.PI?w-=E.MathUtils.PI2:w<-E.MathUtils.PI&&(w+=E.MathUtils.PI2),w*=t,g=Math.cos(w),b=Math.sin(w),S.a=g*m-b*y,S.b=g*v-b*x,S.c=b*m+g*y,S.d=b*v+g*x,P=!0),0!=e&&(m=this.temp,r.localToWorld(m.set(this.data.offsetX,this.data.offsetY)),S.worldX+=(m.x-S.worldX)*e,S.worldY+=(m.y-S.worldY)*e,P=!0),0<i&&(T=Math.sqrt(S.a*S.a+S.c*S.c),y=Math.sqrt(s*s+a*a),1e-5<T&&(T=(T+(y-T+this.data.offsetScaleX)*i)/T),S.a*=T,S.c*=T,T=Math.sqrt(S.b*S.b+S.d*S.d),y=Math.sqrt(o*o+h*h),1e-5<T&&(T=(T+(y-T+this.data.offsetScaleY)*i)/T),S.b*=T,S.d*=T,P=!0),0<n&&(v=S.b,x=S.d,b=Math.atan2(x,v),(w=Math.atan2(h,o)-Math.atan2(a,s)-(b-Math.atan2(S.c,S.a)))>E.MathUtils.PI?w-=E.MathUtils.PI2:w<-E.MathUtils.PI&&(w+=E.MathUtils.PI2),w=b+(w+u)*n,T=Math.sqrt(v*v+x*x),S.b=Math.cos(w)*T,S.d=Math.sin(w)*T,P=!0),P&&(S.appliedValid=!1)}},qt.prototype.applyRelativeWorld=function(){for(var t=this.rotateMix,e=this.translateMix,i=this.scaleMix,n=this.shearMix,r=this.target,s=r.a,o=r.b,a=r.c,h=r.d,l=0<s*h-o*a?E.MathUtils.degRad:-E.MathUtils.degRad,c=this.data.offsetRotation*l,u=this.data.offsetShearY*l,d=this.bones,p=0,f=d.length;p<f;p++){var g,m,y,v,x,b,w,T,S=d[p],P=!1;0!=t&&(v=S.a,b=S.b,g=S.c,w=S.d,(x=Math.atan2(a,s)+c)>E.MathUtils.PI?x-=E.MathUtils.PI2:x<-E.MathUtils.PI&&(x+=E.MathUtils.PI2),x*=t,m=Math.cos(x),y=Math.sin(x),S.a=m*v-y*g,S.b=m*b-y*w,S.c=y*v+m*g,S.d=y*b+m*w,P=!0),0!=e&&(v=this.temp,r.localToWorld(v.set(this.data.offsetX,this.data.offsetY)),S.worldX+=v.x*e,S.worldY+=v.y*e,P=!0),0<i&&(T=(Math.sqrt(s*s+a*a)-1+this.data.offsetScaleX)*i+1,S.a*=T,S.c*=T,T=(Math.sqrt(o*o+h*h)-1+this.data.offsetScaleY)*i+1,S.b*=T,S.d*=T,P=!0),0<n&&((x=Math.atan2(h,o)-Math.atan2(a,s))>E.MathUtils.PI?x-=E.MathUtils.PI2:x<-E.MathUtils.PI&&(x+=E.MathUtils.PI2),b=S.b,w=S.d,x=Math.atan2(w,b)+(x-E.MathUtils.PI/2+u)*n,T=Math.sqrt(b*b+w*w),S.b=Math.cos(x)*T,S.d=Math.sin(x)*T,P=!0),P&&(S.appliedValid=!1)}},qt.prototype.applyAbsoluteLocal=function(){var t=this.rotateMix,e=this.translateMix,i=this.scaleMix,n=this.shearMix,r=this.target;r.appliedValid||r.updateAppliedTransform();for(var s=this.bones,o=0,a=s.length;o<a;o++){var h=s[o],l=(h.appliedValid||h.updateAppliedTransform(),h.arotation),c=(0!=t&&(f=r.arotation-l+this.data.offsetRotation,l+=(f-=360*(16384-(16384.499999999996-f/360|0)))*t),h.ax),u=h.ay,d=(0!=e&&(c+=(r.ax-c+this.data.offsetX)*e,u+=(r.ay-u+this.data.offsetY)*e),h.ascaleX),p=h.ascaleY;0!=i&&(1e-5<d&&(d=(d+(r.ascaleX-d+this.data.offsetScaleX)*i)/d),1e-5<p&&(p=(p+(r.ascaleY-p+this.data.offsetScaleY)*i)/p));var f,g=h.ashearY;0!=n&&(f=r.ashearY-g+this.data.offsetShearY,f-=360*(16384-(16384.499999999996-f/360|0)),h.shearY+=f*n),h.updateWorldTransformWith(c,u,l,d,p,h.ashearX,g)}},qt.prototype.applyRelativeLocal=function(){var t=this.rotateMix,e=this.translateMix,i=this.scaleMix,n=this.shearMix,r=this.target;r.appliedValid||r.updateAppliedTransform();for(var s=this.bones,o=0,a=s.length;o<a;o++){var h=s[o],l=(h.appliedValid||h.updateAppliedTransform(),h.arotation),c=(0!=t&&(l+=(r.arotation+this.data.offsetRotation)*t),h.ax),u=h.ay,d=(0!=e&&(c+=(r.ax+this.data.offsetX)*e,u+=(r.ay+this.data.offsetY)*e),h.ascaleX),p=h.ascaleY,f=(0!=i&&(1e-5<d&&(d*=(r.ascaleX-1+this.data.offsetScaleX)*i+1),1e-5<p&&(p*=(r.ascaleY-1+this.data.offsetScaleY)*i+1)),h.ashearY);0!=n&&(f+=(r.ashearY+this.data.offsetShearY)*n),h.updateWorldTransformWith(c,u,l,d,p,h.ashearX,f)}},E.TransformConstraint=qt,h=t=t||{},X=h.ConstraintData,e(Jt,X),h.TransformConstraintData=Jt,U=t=t||{},Zt.prototype.triangulate=function(t){for(var e=t,i=t.length>>1,n=this.indicesArray,r=n.length=0;r<i;r++)n[r]=r;for(var s=this.isConcaveArray,r=s.length=0,o=i;r<o;++r)s[r]=Zt.isConcave(r,i,e,n);var a=this.triangles;for(a.length=0;3<i;){for(var h=i-1,r=0,l=1;;){t:if(!s[r]){for(var c=n[h]<<1,u=n[r]<<1,d=n[l]<<1,p=e[c],f=e[1+c],g=e[u],m=e[1+u],y=e[d],v=e[1+d],x=(l+1)%i;x!=h;x=(x+1)%i)if(s[x]){var b=n[x]<<1,w=e[b],b=e[1+b];if(Zt.positiveArea(y,v,p,f,w,b)&&Zt.positiveArea(p,f,g,m,w,b)&&Zt.positiveArea(g,m,y,v,w,b))break t}break}if(0==l){for(;s[r]&&0<--r;);break}h=r,l=((r=l)+1)%i}a.push(n[(i+r-1)%i]),a.push(n[r]),a.push(n[(r+1)%i]),n.splice(r,1),s.splice(r,1);var T=(--i+r-1)%i,S=r==i?0:r;s[T]=Zt.isConcave(T,i,e,n),s[S]=Zt.isConcave(S,i,e,n)}return 3==i&&(a.push(n[2]),a.push(n[0]),a.push(n[1])),a},Zt.prototype.decompose=function(B,t){var e=B,i=this.convexPolygons,n=(this.polygonPool.freeAll(i),i.length=0,this.convexPolygonsIndices),r=(this.polygonIndicesPool.freeAll(n),n.length=0,this.polygonIndicesPool.obtain());r.length=0;for(var s=this.polygonPool.obtain(),o=-1,a=s.length=0,h=0,l=t.length;h<l;h+=3){var c=t[h]<<1,u=t[h+1]<<1,d=t[h+2]<<1,p=e[c],f=e[1+c],g=e[u],m=e[1+u],y=e[d],v=e[1+d],x=!1;o==c&&(b=s.length-4,E=Zt.winding(s[b],s[b+1],s[b+2],s[b+3],y,v),A=Zt.winding(y,v,s[0],s[1],s[2],s[3]),E==a&&A==a&&(s.push(y),s.push(v),r.push(d),x=!0)),x||(0<s.length?(i.push(s),n.push(r)):(this.polygonPool.free(s),this.polygonIndicesPool.free(r)),(s=this.polygonPool.obtain()).length=0,s.push(p),s.push(f),s.push(g),s.push(m),s.push(y),s.push(v),(r=this.polygonIndicesPool.obtain()).length=0,r.push(c),r.push(u),r.push(d),a=Zt.winding(p,f,g,m,y,v),o=c)}for(0<s.length&&(i.push(s),n.push(r)),h=0,l=i.length;h<l;h++)if(0!=(r=n[h]).length)for(var b,w,T,S,P,_,E,A,F=r[0],N=r[r.length-1],M=(s=i[h])[b=s.length-4],k=s[b+1],C=s[b+2],O=s[b+3],R=s[0],L=s[1],z=s[2],Y=s[3],D=Zt.winding(M,k,C,O,R,L),I=0;I<l;I++)I!=h&&3==(w=n[I]).length&&(T=w[0],S=w[1],P=w[2],y=(_=i[I])[_.length-2],v=_[_.length-1],T==F&&S==N&&(E=Zt.winding(M,k,C,O,y,v),A=Zt.winding(y,v,R,L,z,Y),E==D&&A==D&&(_.length=0,w.length=0,s.push(y),s.push(v),r.push(P),M=C,k=O,C=y,O=v,I=0)));for(h=i.length-1;0<=h;h--)0==(s=i[h]).length&&(i.splice(h,1),this.polygonPool.free(s),r=n[h],n.splice(h,1),this.polygonIndicesPool.free(r));return i},Zt.isConcave=function(t,e,i,n){var r=n[(e+t-1)%e]<<1,s=n[t]<<1,n=n[(t+1)%e]<<1;return!this.positiveArea(i[r],i[1+r],i[s],i[1+s],i[n],i[1+n])},Zt.positiveArea=function(t,e,i,n,r,s){return 0<=t*(s-n)+i*(e-s)+r*(n-e)},Zt.winding=function(t,e,i,n,r,s){i-=t,n-=e;return 0<=r*n-s*i+i*e-t*n?1:-1},U.Triangulator=Zt;c=t=t||{};function ci(){this.array=new Array}function ui(t,e,i,n){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.r=t=void 0===t?0:t,this.g=e,this.b=i,this.a=n}function b(){}ci.prototype.add=function(t){var e=this.contains(t);return this.array[0|t]=0|t,!e},ci.prototype.contains=function(t){return null!=this.array[0|t]},ci.prototype.remove=function(t){this.array[0|t]=void 0},ci.prototype.clear=function(){this.array.length=0},c.IntSet=ci,ui.prototype.set=function(t,e,i,n){return this.r=t,this.g=e,this.b=i,this.a=n,this.clamp(),this},ui.prototype.setFromColor=function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this},ui.prototype.setFromString=function(t){return t="#"==t.charAt(0)?t.substr(1):t,this.r=parseInt(t.substr(0,2),16)/255,this.g=parseInt(t.substr(2,2),16)/255,this.b=parseInt(t.substr(4,2),16)/255,this.a=(8!=t.length?255:parseInt(t.substr(6,2),16))/255,this},ui.prototype.add=function(t,e,i,n){return this.r+=t,this.g+=e,this.b+=i,this.a+=n,this.clamp(),this},ui.prototype.clamp=function(){return this.r<0?this.r=0:1<this.r&&(this.r=1),this.g<0?this.g=0:1<this.g&&(this.g=1),this.b<0?this.b=0:1<this.b&&(this.b=1),this.a<0?this.a=0:1<this.a&&(this.a=1),this},ui.rgba8888ToColor=function(t,e){t.r=((4278190080&e)>>>24)/255,t.g=((16711680&e)>>>16)/255,t.b=((65280&e)>>>8)/255,t.a=(255&e)/255},ui.rgb888ToColor=function(t,e){t.r=((16711680&e)>>>16)/255,t.g=((65280&e)>>>8)/255,t.b=(255&e)/255},ui.WHITE=new ui(1,1,1,1),ui.RED=new ui(1,0,0,1),ui.GREEN=new ui(0,1,0,1),ui.BLUE=new ui(0,0,1,1),ui.MAGENTA=new ui(1,0,1,1),c.Color=ui,b.clamp=function(t,e,i){return t<e?e:i<t?i:t},b.cosDeg=function(t){return Math.cos(t*b.degRad)},b.sinDeg=function(t){return Math.sin(t*b.degRad)},b.signum=function(t){return 0<t?1:t<0?-1:0},b.toInt=function(t){return 0<t?Math.floor(t):Math.ceil(t)},b.cbrt=function(t){var e=Math.pow(Math.abs(t),1/3);return t<0?-e:e},b.randomTriangular=function(t,e){return b.randomTriangularWith(t,e,.5*(t+e))},b.randomTriangularWith=function(t,e,i){var n=Math.random(),r=e-t;return n<=(i-t)/r?t+Math.sqrt(n*r*(i-t)):e-Math.sqrt((1-n)*r*(e-i))},b.PI2=2*(b.PI=3.1415927),b.radDeg=b.radiansToDegrees=180/b.PI,b.degRad=b.degreesToRadians=b.PI/180,c.MathUtils=b,di.prototype.apply=function(t,e,i){return t+(e-t)*this.applyInternal(i)};var a=di;function di(){}c.Interpolation=a,e(fi,pi=a),fi.prototype.applyInternal=function(t){return t<=.5?Math.pow(2*t,this.power)/2:Math.pow(2*(t-1),this.power)/(this.power%2==0?-2:2)+1};var pi,a=fi;function fi(t){var e=pi.call(this)||this;return e.power=2,e.power=t,e}c.Pow=a,e(mi,gi=a),mi.prototype.applyInternal=function(t){return Math.pow(t-1,this.power)*(this.power%2==0?-1:1)+1};var gi,a=mi;function mi(t){return gi.call(this,t)||this}function yi(){}function vi(){}function xi(t){this.items=new Array,this.instantiator=t}function bi(t,e){void 0===e&&(e=0),this.x=t=void 0===t?0:t,this.y=e}function wi(){this.maxDelta=.064,this.framesPerSecond=0,this.delta=0,this.totalTime=0,this.lastTime=Date.now()/1e3,this.frameCount=0,this.frameTime=0}function Ti(t){void 0===t&&(t=32),this.addedValues=0,this.lastValue=0,this.mean=0,this.dirty=!0,this.values=new Array(t)}c.PowOut=mi,yi.arrayCopy=function(t,e,i,n,r){for(var s=e,o=n;s<e+r;s++,o++)i[o]=t[s]},yi.setArraySize=function(t,e,i){void 0===i&&(i=0);var n=t.length;if(n!=e&&n<(t.length=e))for(var r=n;r<e;r++)t[r]=i;return t},yi.ensureArrayCapacity=function(t,e,i){return void 0===i&&(i=0),t.length>=e?t:yi.setArraySize(t,e,i)},yi.newArray=function(t,e){for(var i=new Array(t),n=0;n<t;n++)i[n]=e;return i},yi.newFloatArray=function(t){if(yi.SUPPORTS_TYPED_ARRAYS)return new Float32Array(t);for(var e=new Array(t),i=0;i<e.length;i++)e[i]=0;return e},yi.newShortArray=function(t){if(yi.SUPPORTS_TYPED_ARRAYS)return new Int16Array(t);for(var e=new Array(t),i=0;i<e.length;i++)e[i]=0;return e},yi.toFloatArray=function(t){return yi.SUPPORTS_TYPED_ARRAYS?new Float32Array(t):t},yi.toSinglePrecision=function(t){return yi.SUPPORTS_TYPED_ARRAYS?Math.fround(t):t},yi.webkit602BugfixHelper=function(t,e){},yi.contains=function(t,e,i){void 0===i&&(i=!0);for(var n=0;n<t.length;n++)if(t[n]==e)return!0;return!1},yi.SUPPORTS_TYPED_ARRAYS="undefined"!=typeof Float32Array,c.Utils=yi,vi.logBones=function(t){for(var e=0;e<t.bones.length;e++)t.bones[e]},c.DebugUtils=vi,xi.prototype.obtain=function(){return 0<this.items.length?this.items.pop():this.instantiator()},xi.prototype.free=function(t){t.reset&&t.reset(),this.items.push(t)},xi.prototype.freeAll=function(t){for(var e=0;e<t.length;e++)this.free(t[e])},xi.prototype.clear=function(){this.items.length=0},c.Pool=xi,bi.prototype.set=function(t,e){return this.x=t,this.y=e,this},bi.prototype.length=function(){var t=this.x,e=this.y;return Math.sqrt(t*t+e*e)},bi.prototype.normalize=function(){var t=this.length();return 0!=t&&(this.x/=t,this.y/=t),this},c.Vector2=bi,wi.prototype.update=function(){var t=Date.now()/1e3;this.delta=t-this.lastTime,this.frameTime+=this.delta,this.totalTime+=this.delta,this.delta>this.maxDelta&&(this.delta=this.maxDelta),this.lastTime=t,this.frameCount++,1<this.frameTime&&(this.framesPerSecond=this.frameCount/this.frameTime,this.frameTime=0,this.frameCount=0)},c.TimeKeeper=wi,Ti.prototype.hasEnoughData=function(){return this.addedValues>=this.values.length},Ti.prototype.addValue=function(t){this.addedValues<this.values.length&&this.addedValues++,this.values[this.lastValue++]=t,this.lastValue>this.values.length-1&&(this.lastValue=0),this.dirty=!0},Ti.prototype.getMean=function(){if(this.hasEnoughData()){if(this.dirty){for(var t=0,e=0;e<this.values.length;e++)t+=this.values[e];this.mean=t/this.values.length,this.dirty=!1}return this.mean}return 0},c.WindowedMean=Ti,Math.fround||(Math.fround=(H=new Float32Array(1),function(t){return H[0]=t,H[0]}));var Si,Pi=t=t||{};function _i(t){if(null==t)throw new Error("name cannot be null.");this.name=t}function Ei(t){t=Si.call(this,t)||this;return t.id=(65535&Ei.nextID++)<<11,t.worldVerticesLength=0,t.deformAttachment=t}Pi.Attachment=_i,e(Ei,Si=_i),Ei.prototype.computeWorldVertices=function(t,e,i,n,r,s){i=r+(i>>1)*s;var o=t.bone.skeleton,a=t.deform,h=this.vertices,l=this.bones;if(null!=l){for(var c=0,u=0,d=0;d<e;d+=2)c+=(m=l[c])+1,u+=m;var p=o.bones;if(0==a.length)for(T=r,S=3*u;T<i;T+=s){var f=0,g=0,m=l[c++];for(m+=c;c<m;c++,S+=3){var y=p[l[c]],v=h[S],x=h[S+1],b=h[S+2];f+=(v*y.a+x*y.b+y.worldX)*b,g+=(v*y.c+x*y.d+y.worldY)*b}n[T]=f,n[T+1]=g}else for(var w=a,T=r,S=3*u,P=u<<1;T<i;T+=s){for(g=f=0,m=l[c++],m+=c;c<m;c++,S+=3,P+=2)y=p[l[c]],v=h[S]+w[P],x=h[S+1]+w[P+1],b=h[S+2],f+=(v*y.a+x*y.b+y.worldX)*b,g+=(v*y.c+x*y.d+y.worldY)*b;n[T]=f,n[T+1]=g}}else{0<a.length&&(h=a);for(var _=(y=t.bone).worldX,E=y.worldY,A=y.a,S=y.b,M=y.c,k=y.d,C=e,T=r;T<i;C+=2,T+=s){v=h[C],x=h[C+1];n[T]=v*A+x*S+_,n[T+1]=v*M+x*k+E}}},Ei.prototype.copyTo=function(t){null!=this.bones?(t.bones=new Array(this.bones.length),Pi.Utils.arrayCopy(this.bones,0,t.bones,0,this.bones.length)):t.bones=null,null!=this.vertices?(t.vertices=Pi.Utils.newFloatArray(this.vertices.length),Pi.Utils.arrayCopy(this.vertices,0,t.vertices,0,this.vertices.length)):t.vertices=null,t.worldVerticesLength=this.worldVerticesLength,t.deformAttachment=this.deformAttachment},Ei.nextID=0,Pi.VertexAttachment=Ei,(a=(h=t=t||{}).AttachmentType||(h.AttachmentType={}))[a.Region=0]="Region",a[a.BoundingBox=1]="BoundingBox",a[a.Mesh=2]="Mesh",a[a.LinkedMesh=3]="LinkedMesh",a[a.Path=4]="Path",a[a.Point=5]="Point",a[a.Clipping=6]="Clipping",J=t=t||{},Z=J.VertexAttachment,e(Qt,Z),Qt.prototype.copy=function(){var t=new Qt(this.name);return this.copyTo(t),t.color.setFromColor(this.color),t},J.BoundingBoxAttachment=Qt,Q=t=t||{},$=Q.VertexAttachment,e($t,$),$t.prototype.copy=function(){var t=new $t(this.name);return this.copyTo(t),t.endSlot=this.endSlot,t.color.setFromColor(this.color),t},Q.ClippingAttachment=$t,et=t=t||{},it=et.VertexAttachment,e(te,it),te.prototype.updateUVs=function(){var t=this.regionUVs,e=(null!=this.uvs&&this.uvs.length==t.length||(this.uvs=et.Utils.newFloatArray(t.length)),this.uvs),i=this.uvs.length,n=this.region.u,r=this.region.v,s=0,o=0;if(this.region instanceof et.TextureAtlasRegion){var a=this.region,h=a.texture.getImage().width,l=a.texture.getImage().height;switch(a.degrees){case 90:n-=(a.originalHeight-a.offsetY-a.height)/h,r-=(a.originalWidth-a.offsetX-a.width)/l;for(var s=a.originalHeight/h,o=a.originalWidth/l,c=0;c<i;c+=2)e[c]=n+t[c+1]*s,e[c+1]=r+(1-t[c])*o;return;case 180:for(n-=(a.originalWidth-a.offsetX-a.width)/h,r-=a.offsetY/l,s=a.originalWidth/h,o=a.originalHeight/l,c=0;c<i;c+=2)e[c]=n+(1-t[c])*s,e[c+1]=r+(1-t[c+1])*o;return;case 270:for(n-=a.offsetY/h,r-=a.offsetX/l,s=a.originalHeight/h,o=a.originalWidth/l,c=0;c<i;c+=2)e[c]=n+(1-t[c+1])*s,e[c+1]=r+t[c]*o;return}n-=a.offsetX/h,r-=(a.originalHeight-a.offsetY-a.height)/l,s=a.originalWidth/h,o=a.originalHeight/l}else null==this.region?(n=r=0,s=o=1):(s=this.region.u2-n,o=this.region.v2-r);for(c=0;c<i;c+=2)e[c]=n+t[c]*s,e[c+1]=r+t[c+1]*o},te.prototype.getParentMesh=function(){return this.parentMesh},te.prototype.setParentMesh=function(t){null!=(this.parentMesh=t)&&(this.bones=t.bones,this.vertices=t.vertices,this.worldVerticesLength=t.worldVerticesLength,this.regionUVs=t.regionUVs,this.triangles=t.triangles,this.hullLength=t.hullLength,this.worldVerticesLength=t.worldVerticesLength)},te.prototype.copy=function(){var t;return null!=this.parentMesh?this.newLinkedMesh():((t=new te(this.name)).region=this.region,t.path=this.path,t.color.setFromColor(this.color),this.copyTo(t),t.regionUVs=new Array(this.regionUVs.length),et.Utils.arrayCopy(this.regionUVs,0,t.regionUVs,0,this.regionUVs.length),t.uvs=new Array(this.uvs.length),et.Utils.arrayCopy(this.uvs,0,t.uvs,0,this.uvs.length),t.triangles=new Array(this.triangles.length),et.Utils.arrayCopy(this.triangles,0,t.triangles,0,this.triangles.length),t.hullLength=this.hullLength,null!=this.edges&&(t.edges=new Array(this.edges.length),et.Utils.arrayCopy(this.edges,0,t.edges,0,this.edges.length)),t.width=this.width,t.height=this.height,t)},te.prototype.newLinkedMesh=function(){var t=new te(this.name);return t.region=this.region,t.path=this.path,t.color.setFromColor(this.color),t.deformAttachment=this.deformAttachment,t.setParentMesh(null!=this.parentMesh?this.parentMesh:this),t.updateUVs(),t},et.MeshAttachment=te,nt=t=t||{},rt=nt.VertexAttachment,e(ee,rt),ee.prototype.copy=function(){var t=new ee(this.name);return this.copyTo(t),t.lengths=new Array(this.lengths.length),nt.Utils.arrayCopy(this.lengths,0,t.lengths,0,this.lengths.length),t.closed=closed,t.constantSpeed=this.constantSpeed,t.color.setFromColor(this.color),t},nt.PathAttachment=ee,st=t=t||{},ot=st.VertexAttachment,e(ie,ot),ie.prototype.computeWorldPosition=function(t,e){return e.x=this.x*t.a+this.y*t.b+t.worldX,e.y=this.x*t.c+this.y*t.d+t.worldY,e},ie.prototype.computeWorldRotation=function(t){var e=st.MathUtils.cosDeg(this.rotation),i=st.MathUtils.sinDeg(this.rotation),n=e*t.a+i*t.b,e=e*t.c+i*t.d;return Math.atan2(e,n)*st.MathUtils.radDeg},ie.prototype.copy=function(){var t=new ie(this.name);return t.x=this.x,t.y=this.y,t.rotation=this.rotation,t.color.setFromColor(this.color),t},st.PointAttachment=ie,at=t=t||{},ht=at.Attachment,e(d,ht),d.prototype.updateOffset=function(){var t=this.width/this.region.originalWidth*this.scaleX,e=this.height/this.region.originalHeight*this.scaleY,i=-this.width/2*this.scaleX+this.region.offsetX*t,n=-this.height/2*this.scaleY+this.region.offsetY*e,t=i+this.region.width*t,e=n+this.region.height*e,r=this.rotation*Math.PI/180,s=Math.cos(r),r=Math.sin(r),o=i*s+this.x,i=i*r,a=n*s+this.y,n=n*r,h=t*s+this.x,t=t*r,s=e*s+this.y,e=e*r,r=this.offset;r[d.OX1]=o-n,r[d.OY1]=a+i,r[d.OX2]=o-e,r[d.OY2]=s+i,r[d.OX3]=h-e,r[d.OY3]=s+t,r[d.OX4]=h-n,r[d.OY4]=a+t},d.prototype.setRegion=function(t){this.region=t;var e=this.uvs;t.rotate?(e[2]=t.u,e[3]=t.v2,e[4]=t.u,e[5]=t.v,e[6]=t.u2,e[7]=t.v,e[0]=t.u2,e[1]=t.v2):(e[0]=t.u,e[1]=t.v2,e[2]=t.u,e[3]=t.v,e[4]=t.u2,e[5]=t.v,e[6]=t.u2,e[7]=t.v2)},d.prototype.computeWorldVertices=function(t,e,i,n){var r=this.offset,s=t.worldX,o=t.worldY,a=t.a,h=t.b,l=t.c,t=t.d,c=r[d.OX1],u=r[d.OY1];e[i]=c*a+u*h+s,e[i+1]=c*l+u*t+o,c=r[d.OX2],u=r[d.OY2],e[i+=n]=c*a+u*h+s,e[i+1]=c*l+u*t+o,c=r[d.OX3],u=r[d.OY3],e[i+=n]=c*a+u*h+s,e[i+1]=c*l+u*t+o,c=r[d.OX4],u=r[d.OY4],e[i+=n]=c*a+u*h+s,e[i+1]=c*l+u*t+o},d.prototype.copy=function(){var t=new d(this.name);return t.region=this.region,t.rendererObject=this.rendererObject,t.path=this.path,t.x=this.x,t.y=this.y,t.scaleX=this.scaleX,t.scaleY=this.scaleY,t.rotation=this.rotation,t.width=this.width,t.height=this.height,at.Utils.arrayCopy(this.uvs,0,t.uvs,0,8),at.Utils.arrayCopy(this.offset,0,t.offset,0,8),t.color.setFromColor(this.color),t},d.OX1=0,d.OY1=1,d.OX2=2,d.OY2=3,d.OX3=4,d.OY3=5,d.OX4=6,d.OY4=7,d.X1=0,d.Y1=1,d.C1R=2,d.C1G=3,d.C1B=4,d.C1A=5,d.U1=6,d.V1=7,d.X2=8,d.Y2=9,d.C2R=10,d.C2G=11,d.C2B=12,d.C2A=13,d.U2=14,d.V2=15,d.X3=16,d.Y3=17,d.C3R=18,d.C3G=19,d.C3B=20,d.C3A=21,d.U3=22,d.V3=23,d.X4=24,d.Y4=25,d.C4R=26,d.C4G=27,d.C4B=28,d.C4A=29,d.U4=30,d.V4=31,at.RegionAttachment=d,lt=t=t||{},ne.prototype.begin=function(t){},ne.prototype.transform=function(t,e,i,n){t.x+=lt.MathUtils.randomTriangular(-this.jitterX,this.jitterY),t.y+=lt.MathUtils.randomTriangular(-this.jitterX,this.jitterY)},ne.prototype.end=function(){},lt.JitterEffect=ne,ct=t=t||{},re.prototype.begin=function(t){this.worldX=t.x+this.centerX,this.worldY=t.y+this.centerY},re.prototype.transform=function(t,e,i,n){var r=this.angle*ct.MathUtils.degreesToRadians,s=t.x-this.worldX,o=t.y-this.worldY,a=Math.sqrt(s*s+o*o);a<this.radius&&(r=re.interpolation.apply(0,r,(this.radius-a)/this.radius),a=Math.cos(r),r=Math.sin(r),t.x=a*s-r*o+this.worldX,t.y=r*s+a*o+this.worldY)},re.prototype.end=function(){},re.interpolation=new ct.PowOut(2),ct.SwirlEffect=re,c=(ut=t=t||{}).canvas||(ut.canvas={}),dt=ut.AssetManager,e(se,dt),c.AssetManager=se,a=(h=t=t||{}).canvas||(h.canvas={}),pt=h.Texture,e(oe,pt),oe.prototype.setFilters=function(t,e){},oe.prototype.setWraps=function(t,e){},oe.prototype.dispose=function(){},a.CanvasTexture=oe,c=(M=t=t||{}).canvas||(M.canvas={}),ae.prototype.draw=function(t){this.triangleRendering?this.drawTriangles(t):this.drawImages(t)},ae.prototype.drawImages=function(t){var e=this.ctx,i=t.drawOrder;this.debugRendering&&(e.strokeStyle="green"),e.save();for(var n=0,r=i.length;n<r;n++){var s,o,a,h,l,c,u,d,p=i[n];p.bone.active&&(o=u=null,(s=p.getAttachment())instanceof M.RegionAttachment&&(a=(o=(u=s).region).texture.getImage(),l=p.bone.skeleton.color,c=p.color,u=u.color,d=l.a*c.a*u.a,(h=this.tempColor).set(l.r*c.r*u.r,l.g*c.g*u.g,l.b*c.b*u.b,d),l=s,c=p.bone,u=o.width,d=o.height,e.save(),e.transform(c.a,c.c,c.b,c.d,c.worldX,c.worldY),e.translate(s.offset[0],s.offset[1]),e.rotate(s.rotation*Math.PI/180),p=l.width/u,e.scale(p*s.scaleX,p*s.scaleY),e.translate(u/2,d/2),s.region.rotate&&(c=u,u=d,d=c,e.rotate(-Math.PI/2)),e.scale(1,-1),e.translate(-u/2,-d/2),1==h.r&&1==h.g&&1==h.b&&1==h.a||(e.globalAlpha=h.a),e.drawImage(a,o.x,o.y,u,d,0,0,u,d),this.debugRendering&&e.strokeRect(0,0,u,d),e.restore()))}e.restore()},ae.prototype.drawTriangles=function(t){for(var e=null,i=this.vertices,n=null,r=t.drawOrder,s=0,o=r.length;s<o;s++){var a=r[s],h=a.getAttachment(),l=null;if(h instanceof M.RegionAttachment)var c=h,i=this.computeRegionVertices(a,c,!1),n=ae.QUAD_TRIANGLES,l=c.region.texture.getImage();else{if(!(h instanceof M.MeshAttachment))continue;c=h;i=this.computeMeshVertices(a,c,!1),n=c.triangles,l=c.region.renderObject.texture.getImage()}if(null!=l){var u=a.data.blendMode,u=(u!=e&&(e=u),a.bone.skeleton.color),a=a.color,h=h.color,d=u.a*a.a*h.a,p=this.tempColor,f=(p.set(u.r*a.r*h.r,u.g*a.g*h.g,u.b*a.b*h.b,d),this.ctx);1==p.r&&1==p.g&&1==p.b&&1==p.a||(f.globalAlpha=p.a);for(var g=0;g<n.length;g+=3){var m=8*n[g],y=8*n[g+1],v=8*n[g+2],x=i[m],b=i[1+m],w=i[6+m],m=i[7+m],T=i[y],S=i[1+y],P=i[6+y],y=i[7+y],_=i[v],E=i[1+v],A=i[6+v],v=i[7+v];this.drawTriangle(l,x,b,w,m,T,S,P,y,_,E,A,v),this.debugRendering&&(f.strokeStyle="green",f.beginPath(),f.moveTo(x,b),f.lineTo(T,S),f.lineTo(_,E),f.lineTo(x,b),f.stroke())}}}this.ctx.globalAlpha=1},ae.prototype.drawTriangle=function(t,e,i,n,r,s,o,a,h,l,c,u,d){var p=this.ctx,f=(n*=t.width,r*=t.height,a*=t.width,h*=t.height,u*=t.width,d*=t.height,p.beginPath(),p.moveTo(e,i),p.lineTo(s,o),p.lineTo(l,c),p.closePath(),1/((a-=n)*(d-=r)-(u-=n)*(h-=r))),g=(d*(s-=e)-h*(l-=e))*f,d=(d*(o-=i)-h*(c-=i))*f,h=(a*l-u*s)*f,l=(a*c-u*o)*f,s=e-g*n-h*r,a=i-d*n-l*r;p.save(),p.transform(g,d,h,l,s,a),p.clip(),p.drawImage(t,0,0),p.restore()},ae.prototype.computeRegionVertices=function(t,e,i){var n=t.bone.skeleton.color,r=t.color,s=e.color,o=n.a*r.a*s.a,i=i?o:1,a=this.tempColor,n=(a.set(n.r*r.r*s.r*i,n.g*r.g*s.g*i,n.b*r.b*s.b*i,o),e.computeWorldVertices(t.bone,this.vertices,0,ae.VERTEX_SIZE),this.vertices),r=e.uvs;return n[M.RegionAttachment.C1R]=a.r,n[M.RegionAttachment.C1G]=a.g,n[M.RegionAttachment.C1B]=a.b,n[M.RegionAttachment.C1A]=a.a,n[M.RegionAttachment.U1]=r[0],n[M.RegionAttachment.V1]=r[1],n[M.RegionAttachment.C2R]=a.r,n[M.RegionAttachment.C2G]=a.g,n[M.RegionAttachment.C2B]=a.b,n[M.RegionAttachment.C2A]=a.a,n[M.RegionAttachment.U2]=r[2],n[M.RegionAttachment.V2]=r[3],n[M.RegionAttachment.C3R]=a.r,n[M.RegionAttachment.C3G]=a.g,n[M.RegionAttachment.C3B]=a.b,n[M.RegionAttachment.C3A]=a.a,n[M.RegionAttachment.U3]=r[4],n[M.RegionAttachment.V3]=r[5],n[M.RegionAttachment.C4R]=a.r,n[M.RegionAttachment.C4G]=a.g,n[M.RegionAttachment.C4B]=a.b,n[M.RegionAttachment.C4A]=a.a,n[M.RegionAttachment.U4]=r[6],n[M.RegionAttachment.V4]=r[7],n},ae.prototype.computeMeshVertices=function(t,e,i){var n=t.bone.skeleton.color,r=t.color,s=e.color,o=n.a*r.a*s.a,i=i?o:1,a=this.tempColor,n=(a.set(n.r*r.r*s.r*i,n.g*r.g*s.g*i,n.b*r.b*s.b*i,o),e.worldVerticesLength/2),h=(this.vertices.length<e.worldVerticesLength&&(this.vertices=M.Utils.newFloatArray(e.worldVerticesLength)),this.vertices);e.computeWorldVertices(t,0,e.worldVerticesLength,h,0,ae.VERTEX_SIZE);for(var l=e.uvs,c=0,u=n,d=0,p=2;c<u;c++)h[p++]=a.r,h[p++]=a.g,h[p++]=a.b,h[p++]=a.a,h[p++]=l[d++],h[p++]=l[d++],p+=2;return h},ae.QUAD_TRIANGLES=[0,1,2,2,3,0],ae.VERTEX_SIZE=8,c.SkeletonRenderer=ae,h=(ft=t=t||{}).webgl||(ft.webgl={}),gt=ft.AssetManager,e(he,gt),h.AssetManager=he,a=t=t||{},mt=a.webgl||(a.webgl={}),le.prototype.update=function(){var t=this.projection,e=this.view,i=this.projectionView,n=this.inverseProjectionView,r=this.zoom,s=this.viewportWidth,o=this.viewportHeight;t.ortho(r*(-s/2),r*(s/2),r*(-o/2),r*(o/2),this.near,this.far),e.lookAt(this.position,this.direction,this.up),i.set(t.values),i.multiply(e),n.set(i.values).invert()},le.prototype.screenToWorld=function(t,e,i){var n=t.x,r=i-t.y-1,s=this.tmp;return s.x=2*n/e-1,s.y=2*r/i-1,s.z=2*t.z-1,s.project(this.inverseProjectionView),t.set(s.x,s.y,s.z),t},le.prototype.setViewport=function(t,e){this.viewportWidth=t,this.viewportHeight=e},mt.OrthoCamera=le,yt=t=t||{},vt=yt.webgl||(yt.webgl={}),xt=yt.Texture,e(ce,xt),ce.prototype.setFilters=function(t,e){var i=this.context.gl;this.bind(),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,t),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,ce.validateMagFilter(e))},ce.validateMagFilter=function(t){switch(t){case yt.TextureFilter.MipMap:case yt.TextureFilter.MipMapLinearLinear:case yt.TextureFilter.MipMapLinearNearest:case yt.TextureFilter.MipMapNearestLinear:case yt.TextureFilter.MipMapNearestNearest:return yt.TextureFilter.Linear;default:return t}},ce.prototype.setWraps=function(t,e){var i=this.context.gl;this.bind(),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,t),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,e)},ce.prototype.update=function(t){var e=this.context.gl;this.texture||(this.texture=this.context.gl.createTexture()),this.bind(),ce.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL&&e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,this._image),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t?e.LINEAR_MIPMAP_LINEAR:e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),t&&e.generateMipmap(e.TEXTURE_2D)},ce.prototype.restore=function(){this.texture=null,this.update(this.useMipMaps)},ce.prototype.bind=function(t){var e=this.context.gl;this.boundUnit=t=void 0===t?0:t,e.activeTexture(e.TEXTURE0+t),e.bindTexture(e.TEXTURE_2D,this.texture)},ce.prototype.unbind=function(){var t=this.context.gl;t.activeTexture(t.TEXTURE0+this.boundUnit),t.bindTexture(t.TEXTURE_2D,null)},ce.prototype.dispose=function(){this.context.removeRestorable(this),this.context.gl.deleteTexture(this.texture)},ce.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL=!1,vt.GLTexture=ce,(l=(t=t||{}).webgl||(t.webgl={})).M00=0,l.M01=4,l.M02=8,l.M03=12,l.M10=1,l.M11=5,l.M12=9,l.M13=13,l.M20=2,l.M21=6,l.M22=10,l.M23=14,l.M30=3,l.M31=7,l.M32=11,l.M33=15,S.prototype.set=function(t){return this.values.set(t),this},S.prototype.transpose=function(){var t=this.temp,e=this.values;return t[l.M00]=e[l.M00],t[l.M01]=e[l.M10],t[l.M02]=e[l.M20],t[l.M03]=e[l.M30],t[l.M10]=e[l.M01],t[l.M11]=e[l.M11],t[l.M12]=e[l.M21],t[l.M13]=e[l.M31],t[l.M20]=e[l.M02],t[l.M21]=e[l.M12],t[l.M22]=e[l.M22],t[l.M23]=e[l.M32],t[l.M30]=e[l.M03],t[l.M31]=e[l.M13],t[l.M32]=e[l.M23],t[l.M33]=e[l.M33],this.set(t)},S.prototype.identity=function(){var t=this.values;return t[l.M00]=1,t[l.M01]=0,t[l.M02]=0,t[l.M03]=0,t[l.M10]=0,t[l.M11]=1,t[l.M12]=0,t[l.M13]=0,t[l.M20]=0,t[l.M21]=0,t[l.M22]=1,t[l.M23]=0,t[l.M30]=0,t[l.M31]=0,t[l.M32]=0,t[l.M33]=1,this},S.prototype.invert=function(){var t=this.values,e=this.temp,i=t[l.M30]*t[l.M21]*t[l.M12]*t[l.M03]-t[l.M20]*t[l.M31]*t[l.M12]*t[l.M03]-t[l.M30]*t[l.M11]*t[l.M22]*t[l.M03]+t[l.M10]*t[l.M31]*t[l.M22]*t[l.M03]+t[l.M20]*t[l.M11]*t[l.M32]*t[l.M03]-t[l.M10]*t[l.M21]*t[l.M32]*t[l.M03]-t[l.M30]*t[l.M21]*t[l.M02]*t[l.M13]+t[l.M20]*t[l.M31]*t[l.M02]*t[l.M13]+t[l.M30]*t[l.M01]*t[l.M22]*t[l.M13]-t[l.M00]*t[l.M31]*t[l.M22]*t[l.M13]-t[l.M20]*t[l.M01]*t[l.M32]*t[l.M13]+t[l.M00]*t[l.M21]*t[l.M32]*t[l.M13]+t[l.M30]*t[l.M11]*t[l.M02]*t[l.M23]-t[l.M10]*t[l.M31]*t[l.M02]*t[l.M23]-t[l.M30]*t[l.M01]*t[l.M12]*t[l.M23]+t[l.M00]*t[l.M31]*t[l.M12]*t[l.M23]+t[l.M10]*t[l.M01]*t[l.M32]*t[l.M23]-t[l.M00]*t[l.M11]*t[l.M32]*t[l.M23]-t[l.M20]*t[l.M11]*t[l.M02]*t[l.M33]+t[l.M10]*t[l.M21]*t[l.M02]*t[l.M33]+t[l.M20]*t[l.M01]*t[l.M12]*t[l.M33]-t[l.M00]*t[l.M21]*t[l.M12]*t[l.M33]-t[l.M10]*t[l.M01]*t[l.M22]*t[l.M33]+t[l.M00]*t[l.M11]*t[l.M22]*t[l.M33];if(0==i)throw new Error("non-invertible matrix");i=1/i;return e[l.M00]=t[l.M12]*t[l.M23]*t[l.M31]-t[l.M13]*t[l.M22]*t[l.M31]+t[l.M13]*t[l.M21]*t[l.M32]-t[l.M11]*t[l.M23]*t[l.M32]-t[l.M12]*t[l.M21]*t[l.M33]+t[l.M11]*t[l.M22]*t[l.M33],e[l.M01]=t[l.M03]*t[l.M22]*t[l.M31]-t[l.M02]*t[l.M23]*t[l.M31]-t[l.M03]*t[l.M21]*t[l.M32]+t[l.M01]*t[l.M23]*t[l.M32]+t[l.M02]*t[l.M21]*t[l.M33]-t[l.M01]*t[l.M22]*t[l.M33],e[l.M02]=t[l.M02]*t[l.M13]*t[l.M31]-t[l.M03]*t[l.M12]*t[l.M31]+t[l.M03]*t[l.M11]*t[l.M32]-t[l.M01]*t[l.M13]*t[l.M32]-t[l.M02]*t[l.M11]*t[l.M33]+t[l.M01]*t[l.M12]*t[l.M33],e[l.M03]=t[l.M03]*t[l.M12]*t[l.M21]-t[l.M02]*t[l.M13]*t[l.M21]-t[l.M03]*t[l.M11]*t[l.M22]+t[l.M01]*t[l.M13]*t[l.M22]+t[l.M02]*t[l.M11]*t[l.M23]-t[l.M01]*t[l.M12]*t[l.M23],e[l.M10]=t[l.M13]*t[l.M22]*t[l.M30]-t[l.M12]*t[l.M23]*t[l.M30]-t[l.M13]*t[l.M20]*t[l.M32]+t[l.M10]*t[l.M23]*t[l.M32]+t[l.M12]*t[l.M20]*t[l.M33]-t[l.M10]*t[l.M22]*t[l.M33],e[l.M11]=t[l.M02]*t[l.M23]*t[l.M30]-t[l.M03]*t[l.M22]*t[l.M30]+t[l.M03]*t[l.M20]*t[l.M32]-t[l.M00]*t[l.M23]*t[l.M32]-t[l.M02]*t[l.M20]*t[l.M33]+t[l.M00]*t[l.M22]*t[l.M33],e[l.M12]=t[l.M03]*t[l.M12]*t[l.M30]-t[l.M02]*t[l.M13]*t[l.M30]-t[l.M03]*t[l.M10]*t[l.M32]+t[l.M00]*t[l.M13]*t[l.M32]+t[l.M02]*t[l.M10]*t[l.M33]-t[l.M00]*t[l.M12]*t[l.M33],e[l.M13]=t[l.M02]*t[l.M13]*t[l.M20]-t[l.M03]*t[l.M12]*t[l.M20]+t[l.M03]*t[l.M10]*t[l.M22]-t[l.M00]*t[l.M13]*t[l.M22]-t[l.M02]*t[l.M10]*t[l.M23]+t[l.M00]*t[l.M12]*t[l.M23],e[l.M20]=t[l.M11]*t[l.M23]*t[l.M30]-t[l.M13]*t[l.M21]*t[l.M30]+t[l.M13]*t[l.M20]*t[l.M31]-t[l.M10]*t[l.M23]*t[l.M31]-t[l.M11]*t[l.M20]*t[l.M33]+t[l.M10]*t[l.M21]*t[l.M33],e[l.M21]=t[l.M03]*t[l.M21]*t[l.M30]-t[l.M01]*t[l.M23]*t[l.M30]-t[l.M03]*t[l.M20]*t[l.M31]+t[l.M00]*t[l.M23]*t[l.M31]+t[l.M01]*t[l.M20]*t[l.M33]-t[l.M00]*t[l.M21]*t[l.M33],e[l.M22]=t[l.M01]*t[l.M13]*t[l.M30]-t[l.M03]*t[l.M11]*t[l.M30]+t[l.M03]*t[l.M10]*t[l.M31]-t[l.M00]*t[l.M13]*t[l.M31]-t[l.M01]*t[l.M10]*t[l.M33]+t[l.M00]*t[l.M11]*t[l.M33],e[l.M23]=t[l.M03]*t[l.M11]*t[l.M20]-t[l.M01]*t[l.M13]*t[l.M20]-t[l.M03]*t[l.M10]*t[l.M21]+t[l.M00]*t[l.M13]*t[l.M21]+t[l.M01]*t[l.M10]*t[l.M23]-t[l.M00]*t[l.M11]*t[l.M23],e[l.M30]=t[l.M12]*t[l.M21]*t[l.M30]-t[l.M11]*t[l.M22]*t[l.M30]-t[l.M12]*t[l.M20]*t[l.M31]+t[l.M10]*t[l.M22]*t[l.M31]+t[l.M11]*t[l.M20]*t[l.M32]-t[l.M10]*t[l.M21]*t[l.M32],e[l.M31]=t[l.M01]*t[l.M22]*t[l.M30]-t[l.M02]*t[l.M21]*t[l.M30]+t[l.M02]*t[l.M20]*t[l.M31]-t[l.M00]*t[l.M22]*t[l.M31]-t[l.M01]*t[l.M20]*t[l.M32]+t[l.M00]*t[l.M21]*t[l.M32],e[l.M32]=t[l.M02]*t[l.M11]*t[l.M30]-t[l.M01]*t[l.M12]*t[l.M30]-t[l.M02]*t[l.M10]*t[l.M31]+t[l.M00]*t[l.M12]*t[l.M31]+t[l.M01]*t[l.M10]*t[l.M32]-t[l.M00]*t[l.M11]*t[l.M32],e[l.M33]=t[l.M01]*t[l.M12]*t[l.M20]-t[l.M02]*t[l.M11]*t[l.M20]+t[l.M02]*t[l.M10]*t[l.M21]-t[l.M00]*t[l.M12]*t[l.M21]-t[l.M01]*t[l.M10]*t[l.M22]+t[l.M00]*t[l.M11]*t[l.M22],t[l.M00]=e[l.M00]*i,t[l.M01]=e[l.M01]*i,t[l.M02]=e[l.M02]*i,t[l.M03]=e[l.M03]*i,t[l.M10]=e[l.M10]*i,t[l.M11]=e[l.M11]*i,t[l.M12]=e[l.M12]*i,t[l.M13]=e[l.M13]*i,t[l.M20]=e[l.M20]*i,t[l.M21]=e[l.M21]*i,t[l.M22]=e[l.M22]*i,t[l.M23]=e[l.M23]*i,t[l.M30]=e[l.M30]*i,t[l.M31]=e[l.M31]*i,t[l.M32]=e[l.M32]*i,t[l.M33]=e[l.M33]*i,this},S.prototype.determinant=function(){var t=this.values;return t[l.M30]*t[l.M21]*t[l.M12]*t[l.M03]-t[l.M20]*t[l.M31]*t[l.M12]*t[l.M03]-t[l.M30]*t[l.M11]*t[l.M22]*t[l.M03]+t[l.M10]*t[l.M31]*t[l.M22]*t[l.M03]+t[l.M20]*t[l.M11]*t[l.M32]*t[l.M03]-t[l.M10]*t[l.M21]*t[l.M32]*t[l.M03]-t[l.M30]*t[l.M21]*t[l.M02]*t[l.M13]+t[l.M20]*t[l.M31]*t[l.M02]*t[l.M13]+t[l.M30]*t[l.M01]*t[l.M22]*t[l.M13]-t[l.M00]*t[l.M31]*t[l.M22]*t[l.M13]-t[l.M20]*t[l.M01]*t[l.M32]*t[l.M13]+t[l.M00]*t[l.M21]*t[l.M32]*t[l.M13]+t[l.M30]*t[l.M11]*t[l.M02]*t[l.M23]-t[l.M10]*t[l.M31]*t[l.M02]*t[l.M23]-t[l.M30]*t[l.M01]*t[l.M12]*t[l.M23]+t[l.M00]*t[l.M31]*t[l.M12]*t[l.M23]+t[l.M10]*t[l.M01]*t[l.M32]*t[l.M23]-t[l.M00]*t[l.M11]*t[l.M32]*t[l.M23]-t[l.M20]*t[l.M11]*t[l.M02]*t[l.M33]+t[l.M10]*t[l.M21]*t[l.M02]*t[l.M33]+t[l.M20]*t[l.M01]*t[l.M12]*t[l.M33]-t[l.M00]*t[l.M21]*t[l.M12]*t[l.M33]-t[l.M10]*t[l.M01]*t[l.M22]*t[l.M33]+t[l.M00]*t[l.M11]*t[l.M22]*t[l.M33]},S.prototype.translate=function(t,e,i){var n=this.values;return n[l.M03]+=t,n[l.M13]+=e,n[l.M23]+=i,this},S.prototype.copy=function(){return(new S).set(this.values)},S.prototype.projection=function(t,e,i,n){this.identity();var i=1/Math.tan(i*(Math.PI/180)/2),r=(e+t)/(t-e),t=2*e*t/(t-e),e=this.values;return e[l.M00]=i/n,e[l.M10]=0,e[l.M20]=0,e[l.M30]=0,e[l.M01]=0,e[l.M11]=i,e[l.M21]=0,e[l.M31]=0,e[l.M02]=0,e[l.M12]=0,e[l.M22]=r,e[l.M32]=-1,e[l.M03]=0,e[l.M13]=0,e[l.M23]=t,e[l.M33]=0,this},S.prototype.ortho2d=function(t,e,i,n){return this.ortho(t,t+i,e,e+n,0,1)},S.prototype.ortho=function(t,e,i,n,r,s){this.identity();var o=2/(n-i),a=-2/(s-r),h=-(e+t)/(e-t),n=-(n+i)/(n-i),i=-(s+r)/(s-r),s=this.values;return s[l.M00]=2/(e-t),s[l.M10]=0,s[l.M20]=0,s[l.M30]=0,s[l.M01]=0,s[l.M11]=o,s[l.M21]=0,s[l.M31]=0,s[l.M02]=0,s[l.M12]=0,s[l.M22]=a,s[l.M32]=0,s[l.M03]=h,s[l.M13]=n,s[l.M23]=i,s[l.M33]=1,this},S.prototype.multiply=function(t){var e=this.temp,i=this.values,t=t.values;return e[l.M00]=i[l.M00]*t[l.M00]+i[l.M01]*t[l.M10]+i[l.M02]*t[l.M20]+i[l.M03]*t[l.M30],e[l.M01]=i[l.M00]*t[l.M01]+i[l.M01]*t[l.M11]+i[l.M02]*t[l.M21]+i[l.M03]*t[l.M31],e[l.M02]=i[l.M00]*t[l.M02]+i[l.M01]*t[l.M12]+i[l.M02]*t[l.M22]+i[l.M03]*t[l.M32],e[l.M03]=i[l.M00]*t[l.M03]+i[l.M01]*t[l.M13]+i[l.M02]*t[l.M23]+i[l.M03]*t[l.M33],e[l.M10]=i[l.M10]*t[l.M00]+i[l.M11]*t[l.M10]+i[l.M12]*t[l.M20]+i[l.M13]*t[l.M30],e[l.M11]=i[l.M10]*t[l.M01]+i[l.M11]*t[l.M11]+i[l.M12]*t[l.M21]+i[l.M13]*t[l.M31],e[l.M12]=i[l.M10]*t[l.M02]+i[l.M11]*t[l.M12]+i[l.M12]*t[l.M22]+i[l.M13]*t[l.M32],e[l.M13]=i[l.M10]*t[l.M03]+i[l.M11]*t[l.M13]+i[l.M12]*t[l.M23]+i[l.M13]*t[l.M33],e[l.M20]=i[l.M20]*t[l.M00]+i[l.M21]*t[l.M10]+i[l.M22]*t[l.M20]+i[l.M23]*t[l.M30],e[l.M21]=i[l.M20]*t[l.M01]+i[l.M21]*t[l.M11]+i[l.M22]*t[l.M21]+i[l.M23]*t[l.M31],e[l.M22]=i[l.M20]*t[l.M02]+i[l.M21]*t[l.M12]+i[l.M22]*t[l.M22]+i[l.M23]*t[l.M32],e[l.M23]=i[l.M20]*t[l.M03]+i[l.M21]*t[l.M13]+i[l.M22]*t[l.M23]+i[l.M23]*t[l.M33],e[l.M30]=i[l.M30]*t[l.M00]+i[l.M31]*t[l.M10]+i[l.M32]*t[l.M20]+i[l.M33]*t[l.M30],e[l.M31]=i[l.M30]*t[l.M01]+i[l.M31]*t[l.M11]+i[l.M32]*t[l.M21]+i[l.M33]*t[l.M31],e[l.M32]=i[l.M30]*t[l.M02]+i[l.M31]*t[l.M12]+i[l.M32]*t[l.M22]+i[l.M33]*t[l.M32],e[l.M33]=i[l.M30]*t[l.M03]+i[l.M31]*t[l.M13]+i[l.M32]*t[l.M23]+i[l.M33]*t[l.M33],this.set(this.temp)},S.prototype.multiplyLeft=function(t){var e=this.temp,i=this.values,t=t.values;return e[l.M00]=t[l.M00]*i[l.M00]+t[l.M01]*i[l.M10]+t[l.M02]*i[l.M20]+t[l.M03]*i[l.M30],e[l.M01]=t[l.M00]*i[l.M01]+t[l.M01]*i[l.M11]+t[l.M02]*i[l.M21]+t[l.M03]*i[l.M31],e[l.M02]=t[l.M00]*i[l.M02]+t[l.M01]*i[l.M12]+t[l.M02]*i[l.M22]+t[l.M03]*i[l.M32],e[l.M03]=t[l.M00]*i[l.M03]+t[l.M01]*i[l.M13]+t[l.M02]*i[l.M23]+t[l.M03]*i[l.M33],e[l.M10]=t[l.M10]*i[l.M00]+t[l.M11]*i[l.M10]+t[l.M12]*i[l.M20]+t[l.M13]*i[l.M30],e[l.M11]=t[l.M10]*i[l.M01]+t[l.M11]*i[l.M11]+t[l.M12]*i[l.M21]+t[l.M13]*i[l.M31],e[l.M12]=t[l.M10]*i[l.M02]+t[l.M11]*i[l.M12]+t[l.M12]*i[l.M22]+t[l.M13]*i[l.M32],e[l.M13]=t[l.M10]*i[l.M03]+t[l.M11]*i[l.M13]+t[l.M12]*i[l.M23]+t[l.M13]*i[l.M33],e[l.M20]=t[l.M20]*i[l.M00]+t[l.M21]*i[l.M10]+t[l.M22]*i[l.M20]+t[l.M23]*i[l.M30],e[l.M21]=t[l.M20]*i[l.M01]+t[l.M21]*i[l.M11]+t[l.M22]*i[l.M21]+t[l.M23]*i[l.M31],e[l.M22]=t[l.M20]*i[l.M02]+t[l.M21]*i[l.M12]+t[l.M22]*i[l.M22]+t[l.M23]*i[l.M32],e[l.M23]=t[l.M20]*i[l.M03]+t[l.M21]*i[l.M13]+t[l.M22]*i[l.M23]+t[l.M23]*i[l.M33],e[l.M30]=t[l.M30]*i[l.M00]+t[l.M31]*i[l.M10]+t[l.M32]*i[l.M20]+t[l.M33]*i[l.M30],e[l.M31]=t[l.M30]*i[l.M01]+t[l.M31]*i[l.M11]+t[l.M32]*i[l.M21]+t[l.M33]*i[l.M31],e[l.M32]=t[l.M30]*i[l.M02]+t[l.M31]*i[l.M12]+t[l.M32]*i[l.M22]+t[l.M33]*i[l.M32],e[l.M33]=t[l.M30]*i[l.M03]+t[l.M31]*i[l.M13]+t[l.M32]*i[l.M23]+t[l.M33]*i[l.M33],this.set(this.temp)},S.prototype.lookAt=function(t,e,i){S.initTemps();var n=S.xAxis,r=S.yAxis,s=S.zAxis,e=(s.setFrom(e).normalize(),n.setFrom(e).normalize(),n.cross(i).normalize(),r.setFrom(n).cross(s).normalize(),this.identity(),this.values);return e[l.M00]=n.x,e[l.M01]=n.y,e[l.M02]=n.z,e[l.M10]=r.x,e[l.M11]=r.y,e[l.M12]=r.z,e[l.M20]=-s.x,e[l.M21]=-s.y,e[l.M22]=-s.z,S.tmpMatrix.identity(),S.tmpMatrix.values[l.M03]=-t.x,S.tmpMatrix.values[l.M13]=-t.y,S.tmpMatrix.values[l.M23]=-t.z,this.multiply(S.tmpMatrix),this},S.initTemps=function(){null===S.xAxis&&(S.xAxis=new l.Vector3),null===S.yAxis&&(S.yAxis=new l.Vector3),null===S.zAxis&&(S.zAxis=new l.Vector3)},S.xAxis=null,S.yAxis=null,S.zAxis=null,S.tmpMatrix=new S,l.Matrix4=S;var Ai,Mi=(t=t||{}).webgl||(t.webgl={});function T(t,e,i,n){this.attributes=e,this.verticesLength=0,this.dirtyVertices=!1,this.indicesLength=0,this.dirtyIndices=!1,this.elementsPerVertex=0,this.context=t instanceof Mi.ManagedWebGLRenderingContext?t:new Mi.ManagedWebGLRenderingContext(t);for(var r=this.elementsPerVertex=0;r<e.length;r++)this.elementsPerVertex+=e[r].numElements;this.vertices=new Float32Array(i*this.elementsPerVertex),this.indices=new Uint16Array(n),this.context.addRestorable(this)}function ki(t,e,i){this.name=t,this.type=e,this.numElements=i}function Ci(){return Ai.call(this,Mi.Shader.POSITION,Ni.Float,2)||this}T.prototype.getAttributes=function(){return this.attributes},T.prototype.maxVertices=function(){return this.vertices.length/this.elementsPerVertex},T.prototype.numVertices=function(){return this.verticesLength/this.elementsPerVertex},T.prototype.setVerticesLength=function(t){this.dirtyVertices=!0,this.verticesLength=t},T.prototype.getVertices=function(){return this.vertices},T.prototype.maxIndices=function(){return this.indices.length},T.prototype.numIndices=function(){return this.indicesLength},T.prototype.setIndicesLength=function(t){this.dirtyIndices=!0,this.indicesLength=t},T.prototype.getIndices=function(){return this.indices},T.prototype.getVertexSizeInFloats=function(){for(var t=0,e=0;e<this.attributes.length;e++)t+=this.attributes[e].numElements;return t},T.prototype.setVertices=function(t){if(this.dirtyVertices=!0,t.length>this.vertices.length)throw Error("Mesh can't store more than "+this.maxVertices()+" vertices");this.vertices.set(t,0),this.verticesLength=t.length},T.prototype.setIndices=function(t){if(this.dirtyIndices=!0,t.length>this.indices.length)throw Error("Mesh can't store more than "+this.maxIndices()+" indices");this.indices.set(t,0),this.indicesLength=t.length},T.prototype.draw=function(t,e){this.drawWithOffset(t,e,0,0<this.indicesLength?this.indicesLength:this.verticesLength/this.elementsPerVertex)},T.prototype.drawWithOffset=function(t,e,i,n){var r=this.context.gl;(this.dirtyVertices||this.dirtyIndices)&&this.update(),this.bind(t),0<this.indicesLength?r.drawElements(e,n,r.UNSIGNED_SHORT,2*i):r.drawArrays(e,i,n),this.unbind(t)},T.prototype.bind=function(t){var e=this.context.gl;e.bindBuffer(e.ARRAY_BUFFER,this.verticesBuffer);for(var i=0,n=0;n<this.attributes.length;n++){var r=this.attributes[n],s=t.getAttributeLocation(r.name);e.enableVertexAttribArray(s),e.vertexAttribPointer(s,r.numElements,e.FLOAT,!1,4*this.elementsPerVertex,4*i),i+=r.numElements}0<this.indicesLength&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,this.indicesBuffer)},T.prototype.unbind=function(t){for(var e=this.context.gl,i=0;i<this.attributes.length;i++){var n=this.attributes[i],n=t.getAttributeLocation(n.name);e.disableVertexAttribArray(n)}e.bindBuffer(e.ARRAY_BUFFER,null),0<this.indicesLength&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,null)},T.prototype.update=function(){var t=this.context.gl;this.dirtyVertices&&(this.verticesBuffer||(this.verticesBuffer=t.createBuffer()),t.bindBuffer(t.ARRAY_BUFFER,this.verticesBuffer),t.bufferData(t.ARRAY_BUFFER,this.vertices.subarray(0,this.verticesLength),t.DYNAMIC_DRAW),this.dirtyVertices=!1),this.dirtyIndices&&(this.indicesBuffer||(this.indicesBuffer=t.createBuffer()),t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,this.indicesBuffer),t.bufferData(t.ELEMENT_ARRAY_BUFFER,this.indices.subarray(0,this.indicesLength),t.DYNAMIC_DRAW),this.dirtyIndices=!1)},T.prototype.restore=function(){this.verticesBuffer=null,this.indicesBuffer=null,this.update()},T.prototype.dispose=function(){this.context.removeRestorable(this);var t=this.context.gl;t.deleteBuffer(this.verticesBuffer),t.deleteBuffer(this.indicesBuffer)},Mi.Mesh=T,Mi.VertexAttribute=ki,e(Ci,Ai=ki),Mi.Position2Attribute=Ci,e(Ri,Oi=ki);var Oi;function Ri(){return Oi.call(this,Mi.Shader.POSITION,Ni.Float,3)||this}Mi.Position3Attribute=Ri,e(Di,Li=ki);var Li;function Di(t){return Li.call(this,Mi.Shader.TEXCOORDS+(0==(t=void 0===t?0:t)?"":t),Ni.Float,2)||this}Mi.TexCoordAttribute=Di,e(Bi,Ii=ki);var Ii;function Bi(){return Ii.call(this,Mi.Shader.COLOR,Ni.Float,4)||this}Mi.ColorAttribute=Bi,e(zi,Fi=ki);var Fi,Ni;function zi(){return Fi.call(this,Mi.Shader.COLOR2,Ni.Float,4)||this}function Yi(t,e){void 0===e&&(e={alpha:"true"}),this.restorables=new Array,t instanceof HTMLCanvasElement||t instanceof EventTarget?this.setupCanvas(t,e):(this.gl=t,this.canvas=this.gl.canvas)}function Xi(){}function S(){this.temp=new Float32Array(16),this.values=new Float32Array(16);var t=this.values;t[l.M00]=1,t[l.M11]=1,t[l.M22]=1,t[l.M33]=1}function Ui(t,e,i){this.slotIndex=t,this.name=e,this.attachment=i}function Vi(t){if(this.attachments=new Array,this.bones=Array(),this.constraints=new Array,null==t)throw new Error("name cannot be null.");this.name=t}function Gi(t){this.scale=1,this.linkedMeshes=new Array,this.attachmentLoader=t}Mi.Color2Attribute=zi,(Ni=Mi.VertexAttributeType||(Mi.VertexAttributeType={}))[Ni.Float=0]="Float",c=t=t||{},bt=c.webgl||(c.webgl={}),ue.prototype.begin=function(t){var e=this.context.gl;if(this.isDrawing)throw new Error("PolygonBatch is already drawing. Call PolygonBatch.end() before calling PolygonBatch.begin()");this.drawCalls=0,this.shader=t,this.lastTexture=null,this.isDrawing=!0,e.enable(e.BLEND),e.blendFunc(this.srcBlend,this.dstBlend)},ue.prototype.setBlendMode=function(t,e){var i=this.context.gl;this.srcBlend=t,this.dstBlend=e,this.isDrawing&&(this.flush(),i.blendFunc(this.srcBlend,this.dstBlend))},ue.prototype.draw=function(t,e,i){t!=this.lastTexture?(this.flush(),this.lastTexture=t):(this.verticesLength+e.length>this.mesh.getVertices().length||this.indicesLength+i.length>this.mesh.getIndices().length)&&this.flush();var n=this.mesh.numVertices();this.mesh.getVertices().set(e,this.verticesLength),this.verticesLength+=e.length,this.mesh.setVerticesLength(this.verticesLength);for(var r=this.mesh.getIndices(),s=this.indicesLength,o=0;o<i.length;s++,o++)r[s]=i[o]+n;this.indicesLength+=i.length,this.mesh.setIndicesLength(this.indicesLength)},ue.prototype.flush=function(){var t=this.context.gl;0!=this.verticesLength&&(this.lastTexture.bind(),this.mesh.draw(this.shader,t.TRIANGLES),this.verticesLength=0,this.indicesLength=0,this.mesh.setVerticesLength(0),this.mesh.setIndicesLength(0),this.drawCalls++)},ue.prototype.end=function(){var t=this.context.gl;if(!this.isDrawing)throw new Error("PolygonBatch is not drawing. Call PolygonBatch.begin() before calling PolygonBatch.end()");(0<this.verticesLength||0<this.indicesLength)&&this.flush(),this.shader=null,this.lastTexture=null,this.isDrawing=!1,t.disable(t.BLEND)},ue.prototype.getDrawCalls=function(){return this.drawCalls},ue.prototype.dispose=function(){this.mesh.dispose()},bt.PolygonBatcher=ue,wt=t=t||{},Tt=wt.webgl||(wt.webgl={}),r.prototype.begin=function(){this.camera.update(),this.enableRenderer(this.batcher)},r.prototype.drawSkeleton=function(t,e,i,n){void 0===e&&(e=!1),void 0===i&&(i=-1),void 0===n&&(n=-1),this.enableRenderer(this.batcher),this.skeletonRenderer.premultipliedAlpha=e,this.skeletonRenderer.draw(this.batcher,t,i,n)},r.prototype.drawSkeletonDebug=function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=null),this.enableRenderer(this.shapes),this.skeletonDebugRenderer.premultipliedAlpha=e,this.skeletonDebugRenderer.draw(this.shapes,t,i)},r.prototype.drawTexture=function(t,e,i,n,r,s){void 0===s&&(s=null),this.enableRenderer(this.batcher),null===s&&(s=this.WHITE);var o=this.QUAD,a=0;o[a++]=e,o[a++]=i,o[a++]=s.r,o[a++]=s.g,o[a++]=s.b,o[a++]=s.a,o[a++]=0,o[a++]=1,this.twoColorTint&&(o[a++]=0,o[a++]=0,o[a++]=0,o[a++]=0),o[a++]=e+n,o[a++]=i,o[a++]=s.r,o[a++]=s.g,o[a++]=s.b,o[a++]=s.a,o[a++]=1,o[a++]=1,this.twoColorTint&&(o[a++]=0,o[a++]=0,o[a++]=0,o[a++]=0),o[a++]=e+n,o[a++]=i+r,o[a++]=s.r,o[a++]=s.g,o[a++]=s.b,o[a++]=s.a,o[a++]=1,o[a++]=0,this.twoColorTint&&(o[a++]=0,o[a++]=0,o[a++]=0,o[a++]=0),o[a++]=e,o[a++]=i+r,o[a++]=s.r,o[a++]=s.g,o[a++]=s.b,o[a++]=s.a,o[a++]=0,o[a++]=0,this.twoColorTint&&(o[a++]=0,o[a++]=0,o[a++]=0,o[a++]=0),this.batcher.draw(t,o,this.QUAD_TRIANGLES)},r.prototype.drawTextureUV=function(t,e,i,n,r,s,o,a,h,l){void 0===l&&(l=null),this.enableRenderer(this.batcher),null===l&&(l=this.WHITE);var c=this.QUAD,u=0;c[u++]=e,c[u++]=i,c[u++]=l.r,c[u++]=l.g,c[u++]=l.b,c[u++]=l.a,c[u++]=s,c[u++]=o,this.twoColorTint&&(c[u++]=0,c[u++]=0,c[u++]=0,c[u++]=0),c[u++]=e+n,c[u++]=i,c[u++]=l.r,c[u++]=l.g,c[u++]=l.b,c[u++]=l.a,c[u++]=a,c[u++]=o,this.twoColorTint&&(c[u++]=0,c[u++]=0,c[u++]=0,c[u++]=0),c[u++]=e+n,c[u++]=i+r,c[u++]=l.r,c[u++]=l.g,c[u++]=l.b,c[u++]=l.a,c[u++]=a,c[u++]=h,this.twoColorTint&&(c[u++]=0,c[u++]=0,c[u++]=0,c[u++]=0),c[u++]=e,c[u++]=i+r,c[u++]=l.r,c[u++]=l.g,c[u++]=l.b,c[u++]=l.a,c[u++]=s,c[u++]=h,this.twoColorTint&&(c[u++]=0,c[u++]=0,c[u++]=0,c[u++]=0),this.batcher.draw(t,c,this.QUAD_TRIANGLES)},r.prototype.drawTextureRotated=function(t,e,i,n,r,s,o,a,h,l){void 0===h&&(h=null),void 0===l&&(l=!1),this.enableRenderer(this.batcher),null===h&&(h=this.WHITE);var l=this.QUAD,e=e+s,i=i+o,c=-s,u=-o,n=n-s,s=r-o,r=c,o=u,d=s,p=n,f=0,g=0,m=0,y=0,v=0,x=0,b=0,a=0!=a?(m=(y=(w=wt.MathUtils.cosDeg(a))*p-(a=wt.MathUtils.sinDeg(a))*s)+((f=w*r-a*o)-(x=w*c-a*d)),(v=a*p+w*s)+((g=a*r+w*o)-(b=a*c+w*d))):(f=r,g=o,x=c,b=d,y=p,v=s,m=n,u),w=(g+=i,m+=e,a+=i,y+=e,v+=i,x+=e,b+=i,0);l[w++]=f+=e,l[w++]=g,l[w++]=h.r,l[w++]=h.g,l[w++]=h.b,l[w++]=h.a,l[w++]=0,l[w++]=1,this.twoColorTint&&(l[w++]=0,l[w++]=0,l[w++]=0,l[w++]=0),l[w++]=m,l[w++]=a,l[w++]=h.r,l[w++]=h.g,l[w++]=h.b,l[w++]=h.a,l[w++]=1,l[w++]=1,this.twoColorTint&&(l[w++]=0,l[w++]=0,l[w++]=0,l[w++]=0),l[w++]=y,l[w++]=v,l[w++]=h.r,l[w++]=h.g,l[w++]=h.b,l[w++]=h.a,l[w++]=1,l[w++]=0,this.twoColorTint&&(l[w++]=0,l[w++]=0,l[w++]=0,l[w++]=0),l[w++]=x,l[w++]=b,l[w++]=h.r,l[w++]=h.g,l[w++]=h.b,l[w++]=h.a,l[w++]=0,l[w++]=0,this.twoColorTint&&(l[w++]=0,l[w++]=0,l[w++]=0,l[w++]=0),this.batcher.draw(t,l,this.QUAD_TRIANGLES)},r.prototype.drawRegion=function(t,e,i,n,r,s,o){void 0===s&&(s=null),void 0===o&&(o=!1),this.enableRenderer(this.batcher),null===s&&(s=this.WHITE);var o=this.QUAD,a=0;o[a++]=e,o[a++]=i,o[a++]=s.r,o[a++]=s.g,o[a++]=s.b,o[a++]=s.a,o[a++]=t.u,o[a++]=t.v2,this.twoColorTint&&(o[a++]=0,o[a++]=0,o[a++]=0,o[a++]=0),o[a++]=e+n,o[a++]=i,o[a++]=s.r,o[a++]=s.g,o[a++]=s.b,o[a++]=s.a,o[a++]=t.u2,o[a++]=t.v2,this.twoColorTint&&(o[a++]=0,o[a++]=0,o[a++]=0,o[a++]=0),o[a++]=e+n,o[a++]=i+r,o[a++]=s.r,o[a++]=s.g,o[a++]=s.b,o[a++]=s.a,o[a++]=t.u2,o[a++]=t.v,this.twoColorTint&&(o[a++]=0,o[a++]=0,o[a++]=0,o[a++]=0),o[a++]=e,o[a++]=i+r,o[a++]=s.r,o[a++]=s.g,o[a++]=s.b,o[a++]=s.a,o[a++]=t.u,o[a++]=t.v,this.twoColorTint&&(o[a++]=0,o[a++]=0,o[a++]=0,o[a++]=0),this.batcher.draw(t.texture,o,this.QUAD_TRIANGLES)},r.prototype.line=function(t,e,i,n,r,s){void 0===r&&(r=null),void 0===s&&(s=null),this.enableRenderer(this.shapes),this.shapes.line(t,e,i,n,r)},r.prototype.triangle=function(t,e,i,n,r,s,o,a,h,l){void 0===a&&(a=null),void 0===h&&(h=null),void 0===l&&(l=null),this.enableRenderer(this.shapes),this.shapes.triangle(t,e,i,n,r,s,o,a,h,l)},r.prototype.quad=function(t,e,i,n,r,s,o,a,h,l,c,u,d){void 0===l&&(l=null),void 0===c&&(c=null),void 0===u&&(u=null),void 0===d&&(d=null),this.enableRenderer(this.shapes),this.shapes.quad(t,e,i,n,r,s,o,a,h,l,c,u,d)},r.prototype.rect=function(t,e,i,n,r,s){void 0===s&&(s=null),this.enableRenderer(this.shapes),this.shapes.rect(t,e,i,n,r,s)},r.prototype.rectLine=function(t,e,i,n,r,s,o){void 0===o&&(o=null),this.enableRenderer(this.shapes),this.shapes.rectLine(t,e,i,n,r,s,o)},r.prototype.polygon=function(t,e,i,n){void 0===n&&(n=null),this.enableRenderer(this.shapes),this.shapes.polygon(t,e,i,n)},r.prototype.circle=function(t,e,i,n,r,s){void 0===r&&(r=null),void 0===s&&(s=0),this.enableRenderer(this.shapes),this.shapes.circle(t,e,i,n,r,s)},r.prototype.curve=function(t,e,i,n,r,s,o,a,h,l){void 0===l&&(l=null),this.enableRenderer(this.shapes),this.shapes.curve(t,e,i,n,r,s,o,a,h,l)},r.prototype.end=function(){this.activeRenderer===this.batcher?this.batcher.end():this.activeRenderer===this.shapes&&this.shapes.end(),this.activeRenderer=null},r.prototype.resize=function(t){var e=this.canvas,i=e.clientWidth,n=e.clientHeight;e.width==i&&e.height==n||(e.width=i,e.height=n),this.context.gl.viewport(0,0,e.width,e.height),t!==St.Stretch&&(t===St.Expand?this.camera.setViewport(i,n):t===St.Fit&&(i=e.width,n=e.height,t=this.camera.viewportWidth,t=(e=this.camera.viewportHeight)/t<n/i?t/i:e/n,this.camera.viewportWidth=i*t,this.camera.viewportHeight=n*t)),this.camera.update()},r.prototype.enableRenderer=function(t){this.activeRenderer!==t&&(this.end(),t instanceof Tt.PolygonBatcher?(this.batcherShader.bind(),this.batcherShader.setUniform4x4f(Tt.Shader.MVP_MATRIX,this.camera.projectionView.values),this.batcherShader.setUniformi("u_texture",0),this.batcher.begin(this.batcherShader),this.activeRenderer=this.batcher):t instanceof Tt.ShapeRenderer?(this.shapesShader.bind(),this.shapesShader.setUniform4x4f(Tt.Shader.MVP_MATRIX,this.camera.projectionView.values),this.shapes.begin(this.shapesShader),this.activeRenderer=this.shapes):this.activeRenderer=this.skeletonDebugRenderer)},r.prototype.dispose=function(){this.batcher.dispose(),this.batcherShader.dispose(),this.shapes.dispose(),this.shapesShader.dispose(),this.skeletonDebugRenderer.dispose()},Tt.SceneRenderer=r,(h=St=Tt.ResizeMode||(Tt.ResizeMode={}))[h.Stretch=0]="Stretch",h[h.Expand=1]="Expand",h[h.Fit=2]="Fit",a=t=t||{},Pt=a.webgl||(a.webgl={}),s.prototype.getProgram=function(){return this.program},s.prototype.getVertexShader=function(){return this.vertexShader},s.prototype.getFragmentShader=function(){return this.fragmentShader},s.prototype.getVertexShaderSource=function(){return this.vsSource},s.prototype.getFragmentSource=function(){return this.fsSource},s.prototype.compile=function(){var t=this.context.gl;try{this.vs=this.compileShader(t.VERTEX_SHADER,this.vertexShader),this.fs=this.compileShader(t.FRAGMENT_SHADER,this.fragmentShader),this.program=this.compileProgram(this.vs,this.fs)}catch(t){throw this.dispose(),t}},s.prototype.compileShader=function(t,e){var i=this.context.gl,t=i.createShader(t);if(i.shaderSource(t,e),i.compileShader(t),!i.getShaderParameter(t,i.COMPILE_STATUS)){e="Couldn't compile shader: "+i.getShaderInfoLog(t);if(i.deleteShader(t),!i.isContextLost())throw new Error(e)}return t},s.prototype.compileProgram=function(t,e){var i=this.context.gl,n=i.createProgram();if(i.attachShader(n,t),i.attachShader(n,e),i.linkProgram(n),!i.getProgramParameter(n,i.LINK_STATUS)){t="Couldn't compile shader program: "+i.getProgramInfoLog(n);if(i.deleteProgram(n),!i.isContextLost())throw new Error(t)}return n},s.prototype.restore=function(){this.compile()},s.prototype.bind=function(){this.context.gl.useProgram(this.program)},s.prototype.unbind=function(){this.context.gl.useProgram(null)},s.prototype.setUniformi=function(t,e){this.context.gl.uniform1i(this.getUniformLocation(t),e)},s.prototype.setUniformf=function(t,e){this.context.gl.uniform1f(this.getUniformLocation(t),e)},s.prototype.setUniform2f=function(t,e,i){this.context.gl.uniform2f(this.getUniformLocation(t),e,i)},s.prototype.setUniform3f=function(t,e,i,n){this.context.gl.uniform3f(this.getUniformLocation(t),e,i,n)},s.prototype.setUniform4f=function(t,e,i,n,r){this.context.gl.uniform4f(this.getUniformLocation(t),e,i,n,r)},s.prototype.setUniform2x2f=function(t,e){var i=this.context.gl;this.tmp2x2.set(e),i.uniformMatrix2fv(this.getUniformLocation(t),!1,this.tmp2x2)},s.prototype.setUniform3x3f=function(t,e){var i=this.context.gl;this.tmp3x3.set(e),i.uniformMatrix3fv(this.getUniformLocation(t),!1,this.tmp3x3)},s.prototype.setUniform4x4f=function(t,e){var i=this.context.gl;this.tmp4x4.set(e),i.uniformMatrix4fv(this.getUniformLocation(t),!1,this.tmp4x4)},s.prototype.getUniformLocation=function(t){var e=this.context.gl,i=e.getUniformLocation(this.program,t);if(i||e.isContextLost())return i;throw new Error("Couldn't find location for uniform "+t)},s.prototype.getAttributeLocation=function(t){var e=this.context.gl,i=e.getAttribLocation(this.program,t);if(-1!=i||e.isContextLost())return i;throw new Error("Couldn't find location for attribute "+t)},s.prototype.dispose=function(){this.context.removeRestorable(this);var t=this.context.gl;this.vs&&(t.deleteShader(this.vs),this.vs=null),this.fs&&(t.deleteShader(this.fs),this.fs=null),this.program&&(t.deleteProgram(this.program),this.program=null)},s.newColoredTextured=function(t){return new s(t,"\n\t\t\t\tattribute vec4 "+s.POSITION+";\n\t\t\t\tattribute vec4 "+s.COLOR+";\n\t\t\t\tattribute vec2 "+s.TEXCOORDS+";\n\t\t\t\tuniform mat4 "+s.MVP_MATRIX+";\n\t\t\t\tvarying vec4 v_color;\n\t\t\t\tvarying vec2 v_texCoords;\n\n\t\t\t\tvoid main () {\n\t\t\t\t\tv_color = "+s.COLOR+";\n\t\t\t\t\tv_texCoords = "+s.TEXCOORDS+";\n\t\t\t\t\tgl_Position = "+s.MVP_MATRIX+" * "+s.POSITION+";\n\t\t\t\t}\n\t\t\t","\n\t\t\t\t#ifdef GL_ES\n\t\t\t\t\t#define LOWP lowp\n\t\t\t\t\tprecision mediump float;\n\t\t\t\t#else\n\t\t\t\t\t#define LOWP\n\t\t\t\t#endif\n\t\t\t\tvarying LOWP vec4 v_color;\n\t\t\t\tvarying vec2 v_texCoords;\n\t\t\t\tuniform sampler2D u_texture;\n\n\t\t\t\tvoid main () {\n\t\t\t\t\tgl_FragColor = v_color * texture2D(u_texture, v_texCoords);\n\t\t\t\t}\n\t\t\t")},s.newTwoColoredTextured=function(t){return new s(t,"\n\t\t\t\tattribute vec4 "+s.POSITION+";\n\t\t\t\tattribute vec4 "+s.COLOR+";\n\t\t\t\tattribute vec4 "+s.COLOR2+";\n\t\t\t\tattribute vec2 "+s.TEXCOORDS+";\n\t\t\t\tuniform mat4 "+s.MVP_MATRIX+";\n\t\t\t\tvarying vec4 v_light;\n\t\t\t\tvarying vec4 v_dark;\n\t\t\t\tvarying vec2 v_texCoords;\n\n\t\t\t\tvoid main () {\n\t\t\t\t\tv_light = "+s.COLOR+";\n\t\t\t\t\tv_dark = "+s.COLOR2+";\n\t\t\t\t\tv_texCoords = "+s.TEXCOORDS+";\n\t\t\t\t\tgl_Position = "+s.MVP_MATRIX+" * "+s.POSITION+";\n\t\t\t\t}\n\t\t\t","\n\t\t\t\t#ifdef GL_ES\n\t\t\t\t\t#define LOWP lowp\n\t\t\t\t\tprecision mediump float;\n\t\t\t\t#else\n\t\t\t\t\t#define LOWP\n\t\t\t\t#endif\n\t\t\t\tvarying LOWP vec4 v_light;\n\t\t\t\tvarying LOWP vec4 v_dark;\n\t\t\t\tvarying vec2 v_texCoords;\n\t\t\t\tuniform sampler2D u_texture;\n\n\t\t\t\tvoid main () {\n\t\t\t\t\tvec4 texColor = texture2D(u_texture, v_texCoords);\n\t\t\t\t\tgl_FragColor.a = texColor.a * v_light.a;\n\t\t\t\t\tgl_FragColor.rgb = ((texColor.a - 1.0) * v_dark.a + 1.0 - texColor.rgb) * v_dark.rgb + texColor.rgb * v_light.rgb;\n\t\t\t\t}\n\t\t\t")},s.newColored=function(t){return new s(t,"\n\t\t\t\tattribute vec4 "+s.POSITION+";\n\t\t\t\tattribute vec4 "+s.COLOR+";\n\t\t\t\tuniform mat4 "+s.MVP_MATRIX+";\n\t\t\t\tvarying vec4 v_color;\n\n\t\t\t\tvoid main () {\n\t\t\t\t\tv_color = "+s.COLOR+";\n\t\t\t\t\tgl_Position = "+s.MVP_MATRIX+" * "+s.POSITION+";\n\t\t\t\t}\n\t\t\t","\n\t\t\t\t#ifdef GL_ES\n\t\t\t\t\t#define LOWP lowp\n\t\t\t\t\tprecision mediump float;\n\t\t\t\t#else\n\t\t\t\t\t#define LOWP\n\t\t\t\t#endif\n\t\t\t\tvarying LOWP vec4 v_color;\n\n\t\t\t\tvoid main () {\n\t\t\t\t\tgl_FragColor = v_color;\n\t\t\t\t}\n\t\t\t")},s.MVP_MATRIX="u_projTrans",s.POSITION="a_position",s.COLOR="a_color",s.COLOR2="a_color2",s.TEXCOORDS="a_texCoords",s.SAMPLER="u_texture",Pt.Shader=s,_t=t=t||{},Et=_t.webgl||(_t.webgl={}),o.prototype.begin=function(t){if(this.isDrawing)throw new Error("ShapeRenderer.begin() has already been called");this.shader=t,this.vertexIndex=0,this.isDrawing=!0;t=this.context.gl;t.enable(t.BLEND),t.blendFunc(this.srcBlend,this.dstBlend)},o.prototype.setBlendMode=function(t,e){var i=this.context.gl;this.srcBlend=t,this.dstBlend=e,this.isDrawing&&(this.flush(),i.blendFunc(this.srcBlend,this.dstBlend))},o.prototype.setColor=function(t){this.color.setFromColor(t)},o.prototype.setColorWith=function(t,e,i,n){this.color.set(t,e,i,n)},o.prototype.point=function(t,e,i){void 0===i&&(i=null),this.check(At.Point,1),null===i&&(i=this.color),this.vertex(t,e,i)},o.prototype.line=function(t,e,i,n,r){void 0===r&&(r=null),this.check(At.Line,2),this.mesh.getVertices(),this.vertexIndex,null===r&&(r=this.color),this.vertex(t,e,r),this.vertex(i,n,r)},o.prototype.triangle=function(t,e,i,n,r,s,o,a,h,l){void 0===a&&(a=null),void 0===h&&(h=null),void 0===l&&(l=null),this.check(t?At.Filled:At.Line,3),this.mesh.getVertices(),this.vertexIndex,null===a&&(a=this.color),null===h&&(h=this.color),null===l&&(l=this.color),t?(this.vertex(e,i,a),this.vertex(n,r,h),this.vertex(s,o,l)):(this.vertex(e,i,a),this.vertex(n,r,h),this.vertex(n,r,a),this.vertex(s,o,h),this.vertex(s,o,a),this.vertex(e,i,h))},o.prototype.quad=function(t,e,i,n,r,s,o,a,h,l,c,u,d){void 0===l&&(l=null),void 0===c&&(c=null),void 0===u&&(u=null),void 0===d&&(d=null),this.check(t?At.Filled:At.Line,3),this.mesh.getVertices(),this.vertexIndex,null===l&&(l=this.color),null===c&&(c=this.color),null===u&&(u=this.color),null===d&&(d=this.color),t?(this.vertex(e,i,l),this.vertex(n,r,c),this.vertex(s,o,u),this.vertex(s,o,u)):(this.vertex(e,i,l),this.vertex(n,r,c),this.vertex(n,r,c),this.vertex(s,o,u),this.vertex(s,o,u),this.vertex(a,h,d)),this.vertex(a,h,d),this.vertex(e,i,l)},o.prototype.rect=function(t,e,i,n,r,s){this.quad(t,e,i,e+n,i,e+n,i+r,e,i+r,s=void 0===s?null:s,s,s,s)},o.prototype.rectLine=function(t,e,i,n,r,s,o){void 0===o&&(o=null),this.check(t?At.Filled:At.Line,8),null===o&&(o=this.color);var a=this.tmp.set(r-i,e-n),h=(a.normalize(),a.x*(s*=.5)),a=a.y*s;t?(this.vertex(e+h,i+a,o),this.vertex(e-h,i-a,o),this.vertex(n+h,r+a,o),this.vertex(n-h,r-a,o),this.vertex(n+h,r+a,o)):(this.vertex(e+h,i+a,o),this.vertex(e-h,i-a,o),this.vertex(n+h,r+a,o),this.vertex(n-h,r-a,o),this.vertex(n+h,r+a,o),this.vertex(e+h,i+a,o),this.vertex(n-h,r-a,o)),this.vertex(e-h,i-a,o)},o.prototype.x=function(t,e,i){this.line(t-i,e-i,t+i,e+i),this.line(t-i,e+i,t+i,e-i)},o.prototype.polygon=function(t,e,i,n){if(void 0===n&&(n=null),i<3)throw new Error("Polygon must contain at least 3 vertices");this.check(At.Line,2*i),null===n&&(n=this.color),this.mesh.getVertices(),this.vertexIndex;for(var r=t[e<<=1],s=t[e+1],o=e+(i<<=1),a=e,h=e+i-2;a<h;a+=2){var l=t[a],c=t[a+1],u=0,d=o<=a+2?(u=r,s):(u=t[a+2],t[a+3]);this.vertex(l,c,n),this.vertex(u,d,n)}},o.prototype.circle=function(t,e,i,n,r,s){if(void 0===r&&(r=null),(s=0===(s=void 0===s?0:s)?Math.max(1,6*_t.MathUtils.cbrt(n)|0):s)<=0)throw new Error("segments must be > 0.");null===r&&(r=this.color);var o=2*_t.MathUtils.PI/s,a=Math.cos(o),h=Math.sin(o),l=n,c=0;if(t){for(this.check(At.Filled,3*s+3),s--,d=0;d<s;d++){this.vertex(e,i,r),this.vertex(e+l,i+c,r);var u=l;this.vertex(e+(l=a*l-h*c),i+(c=h*u+a*c),r)}this.vertex(e,i,r)}else{this.check(At.Line,2*s+2);for(var d=0;d<s;d++){this.vertex(e+l,i+c,r);var p=l,l=a*l-h*c,c=h*p+a*c;this.vertex(e+l,i+c,r)}}this.vertex(e+l,i+c,r),this.vertex(e+(l=n),i+(c=0),r)},o.prototype.curve=function(t,e,i,n,r,s,o,a,h,l){void 0===l&&(l=null),this.check(At.Line,2*h+2),null===l&&(l=this.color);for(var c=1/h,u=c*c,d=c*c*c,c=3*c,p=3*u,u=6*u,f=6*d,g=t-2*i+r,m=e-2*n+s,r=3*(i-r)-t+o,s=3*(n-s)-e+a,y=t,v=e,x=(i-t)*c+g*p+r*d,b=(n-e)*c+m*p+s*d,w=g*u+r*f,T=m*u+s*f,S=r*f,P=s*f;0<h--;)this.vertex(y,v,l),y+=x,v+=b,x+=w,b+=T,w+=S,T+=P,this.vertex(y,v,l);this.vertex(y,v,l),this.vertex(o,a,l)},o.prototype.vertex=function(t,e,i){var n=this.vertexIndex,r=this.mesh.getVertices();r[n++]=t,r[n++]=e,r[n++]=i.r,r[n++]=i.g,r[n++]=i.b,r[n++]=i.a,this.vertexIndex=n},o.prototype.end=function(){if(!this.isDrawing)throw new Error("ShapeRenderer.begin() has not been called");this.flush(),this.context.gl.disable(this.context.gl.BLEND),this.isDrawing=!1},o.prototype.flush=function(){0!=this.vertexIndex&&(this.mesh.setVerticesLength(this.vertexIndex),this.mesh.draw(this.shader,this.shapeType),this.vertexIndex=0)},o.prototype.check=function(t,e){if(!this.isDrawing)throw new Error("ShapeRenderer.begin() has not been called");this.shapeType==t?this.mesh.maxVertices()-this.mesh.numVertices()<e&&this.flush():(this.flush(),this.shapeType=t)},o.prototype.dispose=function(){this.mesh.dispose()},Et.ShapeRenderer=o,(e=At=Et.ShapeType||(Et.ShapeType={}))[e.Point=0]="Point",e[e.Line=1]="Line",e[e.Filled=4]="Filled",V=t=t||{},Mt=V.webgl||(V.webgl={}),de.prototype.draw=function(t,e,i){void 0===i&&(i=null);var n=e.x,r=e.y,s=this.context.gl,o=this.premultipliedAlpha?s.ONE:s.SRC_ALPHA,a=(t.setBlendMode(o,s.ONE_MINUS_SRC_ALPHA),e.bones);if(this.drawBones){t.setColor(this.boneLineColor);for(var h=0,l=a.length;h<l;h++){var c=a[h];i&&-1<i.indexOf(c.data.name)||null!=c.parent&&(b=n+c.data.length*c.a+c.worldX,w=r+c.data.length*c.c+c.worldY,t.rectLine(!0,n+c.worldX,r+c.worldY,b,w,this.boneWidth*this.scale))}this.drawSkeletonXY&&t.x(n,r,4*this.scale)}if(this.drawRegionAttachments)for(t.setColor(this.attachmentLineColor),h=0,l=(R=e.slots).length;h<l;h++)(D=(L=R[h]).getAttachment())instanceof V.RegionAttachment&&(d=this.vertices,D.computeWorldVertices(L.bone,d,0,2),t.line(d[0],d[1],d[2],d[3]),t.line(d[2],d[3],d[4],d[5]),t.line(d[4],d[5],d[6],d[7]),t.line(d[6],d[7],d[0],d[1]));if(this.drawMeshHull||this.drawMeshTriangles)for(h=0,l=(R=e.slots).length;h<l;h++)if((L=R[h]).bone.active&&(D=L.getAttachment())instanceof V.MeshAttachment){var u=D,d=this.vertices,p=(u.computeWorldVertices(L,0,u.worldVerticesLength,d,0,2),u.triangles),u=u.hullLength;if(this.drawMeshTriangles){t.setColor(this.triangleLineColor);for(var f=0,g=p.length;f<g;f+=3){var m=2*p[f],y=2*p[f+1],v=2*p[f+2];t.triangle(!1,d[m],d[1+m],d[y],d[1+y],d[v],d[1+v])}}if(this.drawMeshHull&&0<u){t.setColor(this.attachmentLineColor);for(var x=d[(u=2*(u>>1))-2],B=d[u-1],f=0,g=u;f<g;f+=2){var b=d[f],w=d[f+1];t.line(b,w,x,B),x=b,B=w}}}if(this.drawBoundingBoxes){o=this.bounds;o.update(e,!0),t.setColor(this.aabbColor),t.rect(!1,o.minX,o.minY,o.getWidth(),o.getHeight());for(var F=o.polygons,N=o.boundingBoxes,h=0,l=F.length;h<l;h++){var z=F[h];t.setColor(N[h].color),t.polygon(z,0,z.length)}}if(this.drawPaths)for(h=0,l=(R=e.slots).length;h<l;h++)if((L=R[h]).bone.active&&(D=L.getAttachment())instanceof V.PathAttachment){var T=D,g=T.worldVerticesLength,S=this.temp=V.Utils.setArraySize(this.temp,g,0),Y=(T.computeWorldVertices(L,0,g,S,0,2),this.pathColor),P=S[2],_=S[3],E=0,A=0;for(T.closed&&(t.setColor(Y),M=S[0],k=S[1],C=S[g-2],O=S[g-1],E=S[g-4],A=S[g-3],t.curve(P,_,M,k,C,O,E,A,32),t.setColor(de.LIGHT_GRAY),t.line(P,_,M,k),t.line(E,A,C,O)),g-=4,f=4;f<g;f+=6){var M=S[f],k=S[f+1],C=S[f+2],O=S[f+3],E=S[f+4],A=S[f+5];t.setColor(Y),t.curve(P,_,M,k,C,O,E,A,32),t.setColor(de.LIGHT_GRAY),t.line(P,_,M,k),t.line(E,A,C,O),P=E,_=A}}if(this.drawBones)for(t.setColor(this.boneOriginColor),h=0,l=a.length;h<l;h++)c=a[h],i&&-1<i.indexOf(c.data.name)||t.circle(!0,n+c.worldX,r+c.worldY,3*this.scale,de.GREEN,8);if(this.drawClipping){var R=e.slots;t.setColor(this.clipColor);for(var L,D,h=0,l=R.length;h<l;h++)if((L=R[h]).bone.active&&(D=L.getAttachment())instanceof V.ClippingAttachment){var X=D,g=X.worldVerticesLength,S=this.temp=V.Utils.setArraySize(this.temp,g,0);X.computeWorldVertices(L,0,g,S,0,2);for(var I=0,U=S.length;I<U;I+=2)b=S[I],w=S[I+1],E=S[(I+2)%S.length],A=S[(I+3)%S.length],t.line(b,w,E,A)}}},de.prototype.dispose=function(){},de.LIGHT_GRAY=new V.Color(192/255,192/255,192/255,1),de.GREEN=new V.Color(0,1,0,1),Mt.SkeletonDebugRenderer=de,kt=t=t||{},Ct=kt.webgl||(kt.webgl={}),Ot=function(t,e,i){this.vertices=t,this.numVertices=e,this.numFloats=i},pe.prototype.draw=function(t,e,i,n){void 0===n&&(n=-1);var r=this.clipper,s=this.premultipliedAlpha,o=this.twoColorTint,a=null,h=this.temp,l=this.temp2,c=this.temp3,u=this.temp4,d=this.renderable,p=null,f=null,g=e.drawOrder,m=null,y=e.color,v=o?12:8,x=!1;-1==(i=void 0===i?-1:i)&&(x=!0);for(var b=0,w=g.length;b<w;b++){var T=r.isClipping()?2:v,S=g[b];if(S.bone.active&&(x=0<=i&&i==S.data.index||x)){0<=n&&n==S.data.index&&(x=!1);var P=S.getAttachment(),_=null;if(P instanceof kt.RegionAttachment){var E=P;d.vertices=this.vertices,d.numVertices=4,d.numFloats=T<<2,E.computeWorldVertices(S.bone,d.vertices,0,T),f=pe.QUAD_TRIANGLES,p=E.uvs,_=E.region.renderObject.texture,m=E.color}else{if(!(P instanceof kt.MeshAttachment)){if(P instanceof kt.ClippingAttachment){r.clipStart(S,P);continue}r.clipEndWithSlot(S);continue}E=P;d.vertices=this.vertices,d.numVertices=E.worldVerticesLength>>1,d.numFloats=d.numVertices*T,d.numFloats>d.vertices.length&&(d.vertices=this.vertices=kt.Utils.newFloatArray(d.numFloats)),E.computeWorldVertices(S,0,E.worldVerticesLength,d.vertices,0,T),f=E.triangles,_=E.region.renderObject.texture,p=E.uvs,m=E.color}if(null!=_){var P=S.color,A=this.tempColor,M=(A.r=y.r*P.r*m.r,A.g=y.g*P.g*m.g,A.b=y.b*P.b*m.b,A.a=y.a*P.a*m.a,s&&(A.r*=A.a,A.g*=A.a,A.b*=A.a),this.tempColor2),T=(null==S.darkColor?M.set(0,0,0,1):(s?(M.r=S.darkColor.r*A.a,M.g=S.darkColor.g*A.a,M.b=S.darkColor.b*A.a):M.setFromColor(S.darkColor),M.a=s?1:0),S.data.blendMode);if(T!=a&&t.setBlendMode(Ct.WebGLBlendModeConverter.getSourceGLBlendMode(a=T,s),Ct.WebGLBlendModeConverter.getDestGLBlendMode(a)),r.isClipping()){r.clipTriangles(d.vertices,d.numFloats,f,f.length,p,A,M,o);P=new Float32Array(r.clippedVertices),T=r.clippedTriangles;if(null!=this.vertexEffect){var k=this.vertexEffect,C=P;if(o)for(var O=0,R=P.length;O<R;O+=v)h.x=C[O],h.y=C[O+1],c.set(C[O+2],C[O+3],C[O+4],C[O+5]),l.x=C[O+6],l.y=C[O+7],u.set(C[O+8],C[O+9],C[O+10],C[O+11]),k.transform(h,l,c,u),C[O]=h.x,C[O+1]=h.y,C[O+2]=c.r,C[O+3]=c.g,C[O+4]=c.b,C[O+5]=c.a,C[O+6]=l.x,C[O+7]=l.y,C[O+8]=u.r,C[O+9]=u.g,C[O+10]=u.b,C[O+11]=u.a;else for(var O=0,L=P.length;O<L;O+=v)h.x=C[O],h.y=C[O+1],c.set(C[O+2],C[O+3],C[O+4],C[O+5]),l.x=C[O+6],l.y=C[O+7],u.set(0,0,0,0),k.transform(h,l,c,u),C[O]=h.x,C[O+1]=h.y,C[O+2]=c.r,C[O+3]=c.g,C[O+4]=c.b,C[O+5]=c.a,C[O+6]=l.x,C[O+7]=l.y}t.draw(_,P,T)}else{if(C=d.vertices,null!=this.vertexEffect)if(k=this.vertexEffect,o)for(var O=0,D=0,I=d.numFloats;O<I;O+=v,D+=2)h.x=C[O],h.y=C[O+1],l.x=p[D],l.y=p[D+1],c.setFromColor(A),u.setFromColor(M),k.transform(h,l,c,u),C[O]=h.x,C[O+1]=h.y,C[O+2]=c.r,C[O+3]=c.g,C[O+4]=c.b,C[O+5]=c.a,C[O+6]=l.x,C[O+7]=l.y,C[O+8]=u.r,C[O+9]=u.g,C[O+10]=u.b,C[O+11]=u.a;else for(var O=0,D=0,B=d.numFloats;O<B;O+=v,D+=2)h.x=C[O],h.y=C[O+1],l.x=p[D],l.y=p[D+1],c.setFromColor(A),u.set(0,0,0,0),k.transform(h,l,c,u),C[O]=h.x,C[O+1]=h.y,C[O+2]=c.r,C[O+3]=c.g,C[O+4]=c.b,C[O+5]=c.a,C[O+6]=l.x,C[O+7]=l.y;else if(o)for(var O=2,D=0,F=d.numFloats;O<F;O+=v,D+=2)C[O]=A.r,C[O+1]=A.g,C[O+2]=A.b,C[O+3]=A.a,C[O+4]=p[D],C[O+5]=p[D+1],C[O+6]=M.r,C[O+7]=M.g,C[O+8]=M.b,C[O+9]=M.a;else for(var O=2,D=0,N=d.numFloats;O<N;O+=v,D+=2)C[O]=A.r,C[O+1]=A.g,C[O+2]=A.b,C[O+3]=A.a,C[O+4]=p[D],C[O+5]=p[D+1];P=d.vertices.subarray(0,d.numFloats);t.draw(_,P,f)}}}r.clipEndWithSlot(S)}r.clipEnd()},pe.QUAD_TRIANGLES=[0,1,2,2,3,0],Ct.SkeletonRenderer=pe,c=t=t||{},i=c.webgl||(c.webgl={}),fe.prototype.setFrom=function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this},fe.prototype.set=function(t,e,i){return this.x=t,this.y=e,this.z=i,this},fe.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this},fe.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this},fe.prototype.scale=function(t){return this.x*=t,this.y*=t,this.z*=t,this},fe.prototype.normalize=function(){var t=this.length();return 0!=t&&(this.x*=t=1/t,this.y*=t,this.z*=t),this},fe.prototype.cross=function(t){return this.set(this.y*t.z-this.z*t.y,this.z*t.x-this.x*t.z,this.x*t.y-this.y*t.x)},fe.prototype.multiply=function(t){t=t.values;return this.set(this.x*t[i.M00]+this.y*t[i.M01]+this.z*t[i.M02]+t[i.M03],this.x*t[i.M10]+this.y*t[i.M11]+this.z*t[i.M12]+t[i.M13],this.x*t[i.M20]+this.y*t[i.M21]+this.z*t[i.M22]+t[i.M23])},fe.prototype.project=function(t){var t=t.values,e=1/(this.x*t[i.M30]+this.y*t[i.M31]+this.z*t[i.M32]+t[i.M33]);return this.set((this.x*t[i.M00]+this.y*t[i.M01]+this.z*t[i.M02]+t[i.M03])*e,(this.x*t[i.M10]+this.y*t[i.M11]+this.z*t[i.M12]+t[i.M13])*e,(this.x*t[i.M20]+this.y*t[i.M21]+this.z*t[i.M22]+t[i.M23])*e)},fe.prototype.dot=function(t){return this.x*t.x+this.y*t.y+this.z*t.z},fe.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},fe.prototype.distance=function(t){var e=t.x-this.x,i=t.y-this.y,t=t.z-this.z;return Math.sqrt(e*e+i*i+t*t)},i.Vector3=fe,h=(Rt=t=t||{}).webgl||(Rt.webgl={}),Yi.prototype.setupCanvas=function(t,e){var n=this;this.gl=t.getContext("webgl2",e)||t.getContext("webgl",e),(this.canvas=t).addEventListener("webglcontextlost",function(t){t&&t.preventDefault()}),t.addEventListener("webglcontextrestored",function(t){for(var e=0,i=n.restorables.length;e<i;e++)n.restorables[e].restore()})},Yi.prototype.addRestorable=function(t){this.restorables.push(t)},Yi.prototype.removeRestorable=function(t){t=this.restorables.indexOf(t);-1<t&&this.restorables.splice(t,1)},h.ManagedWebGLRenderingContext=Yi,Xi.getDestGLBlendMode=function(t){switch(t){case Rt.BlendMode.Normal:return Xi.ONE_MINUS_SRC_ALPHA;case Rt.BlendMode.Additive:return Xi.ONE;case Rt.BlendMode.Multiply:case Rt.BlendMode.Screen:return Xi.ONE_MINUS_SRC_ALPHA;default:throw new Error("Unknown blend mode: "+t)}},Xi.getSourceGLBlendMode=function(t,e){switch(void 0===e&&(e=!1),t){case Rt.BlendMode.Normal:case Rt.BlendMode.Additive:return e?Xi.ONE:Xi.SRC_ALPHA;case Rt.BlendMode.Multiply:return Xi.DST_COLOR;case Rt.BlendMode.Screen:return Xi.ONE;default:throw new Error("Unknown blend mode: "+t)}},Xi.ZERO=0,Xi.ONE=1,Xi.SRC_COLOR=768,Xi.ONE_MINUS_SRC_COLOR=769,Xi.SRC_ALPHA=770,Xi.ONE_MINUS_SRC_ALPHA=771,Xi.DST_ALPHA=772,Xi.ONE_MINUS_DST_ALPHA=773,Xi.DST_COLOR=774,h.WebGLBlendModeConverter=Xi,ji.exports=t}.call(window)},function(t,e,i){var n=i(0),g=i(11),m=i(204),p=i(7),f=i(218),y=i(219),v=i(220),i=new n({Extends:y,initialize:function(t,e,i,n,r,s,o){var a,h,l,c=[],u=t.cacheManager.custom.spine;if(p(e)){var d=e;for(e=g(d,"key"),h=new f(t,{key:e,url:g(d,"jsonURL"),extension:g(d,"jsonExtension","json"),xhrSettings:g(d,"jsonXhrSettings")}),n=g(d,"atlasURL"),r=g(d,"preMultipliedAlpha"),Array.isArray(n)||(n=[n]),a=0;a<n.length;a++)(l=new v(t,{key:e+"!"+a,url:n[a],extension:g(d,"atlasExtension","atlas"),xhrSettings:g(d,"atlasXhrSettings")})).cache=u,c.push(l)}else for(h=new f(t,e,i,s),Array.isArray(n)||(n=[n]),a=0;a<n.length;a++)(l=new v(t,e+"!"+a,n[a],o)).cache=u,c.push(l);c.unshift(h),y.call(this,t,"spine",e,c),this.config.preMultipliedAlpha=r},onFileComplete:function(t){if(-1!==this.files.indexOf(t)&&(this.pending--,"text"===t.type)){for(var e=t.data.split("\n"),i=[],n=0;n<e.length;n++){var r=e[n];""===r.trim()&&n<e.length-1&&(r=e[n+1],i.push(r))}var s=this.config,o=this.loader,a=o.baseURL,h=o.path,l=o.prefix,c=g(s,"baseURL",this.baseURL),t=g(s,"path",t.src.match(/^.*\//))[0],u=g(s,"prefix",this.prefix),d=g(s,"textureXhrSettings");o.setBaseURL(c),o.setPath(t),o.setPrefix(u);for(var p=0;p<i.length;p++){var f=i[p],f=new m(o,f,f,d);o.keyExists(f)||(this.addToMultiFile(f),o.addFile(f))}o.setBaseURL(a),o.setPath(h),o.setPrefix(l)}},addToCache:function(){if(this.isReadyToProcess()){var t;this.files[0].addToCache();for(var e="",i="",n=!!this.config.preMultipliedAlpha,r=this.loader.textureManager,s=1;s<this.files.length;s++){var o,a,h=this.files[s];"text"===h.type?(e=h.key.replace(/![\d]$/,""),t=h.cache,i=i.concat(h.data)):(o=(a=h.key.trim()).indexOf("!"),a=a.substr(o+1),r.exists(a)||r.addImage(a,h.data)),h.pendingDestroy()}t.add(e,{preMultipliedAlpha:n,data:i,prefix:this.prefix}),this.complete=!0}}});t.exports=i},function(t,e,i){var n=i(0),r=i(15),l=i(21),s=i(22),c=i(11),u=i(7),o=new n({Extends:l,initialize:function t(e,i,n,r,s){var o,a="png";u(i)&&(i=c(h=i,"key"),n=c(h,"url"),o=c(h,"normalMap"),r=c(h,"xhrSettings"),a=c(h,"extension",a),s=c(h,"frameConfig")),Array.isArray(n)&&(o=n[1],n=n[0]);var h={type:"image",cache:e.textureManager,extension:a,responseType:"blob",key:i,url:n,xhrSettings:r,config:s};l.call(this,e,h),o&&((a=new t(e,this.key,o,r,s)).type="normalMap",this.setLink(a),e.addFile(a))},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){l.revokeObjectURL(t.data),t.onProcessComplete()},this.data.onerror=function(){l.revokeObjectURL(t.data),t.onProcessError()},l.createObjectURL(this.data,this.xhrLoader.response,"image/png")},addToCache:function(){var t,e=this.linkFile;e&&e.state===r.FILE_COMPLETE?(t="image"===this.type?this.cache.addImage(this.key,this.data,e.data):this.cache.addImage(e.key,e.data,this.data),this.pendingDestroy(t),e.pendingDestroy(t)):e||(t=this.cache.addImage(this.key,this.data),this.pendingDestroy(t))}});s.register("image",function(t,e,i){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new o(this,t[n]));else this.addFile(new o(this,t,e,i));return this}),t.exports=o},function(t,e,i){t.exports={ADD:i(206),COMPLETE:i(207),FILE_COMPLETE:i(208),FILE_KEY_COMPLETE:i(209),FILE_LOAD_ERROR:i(210),FILE_LOAD:i(211),FILE_PROGRESS:i(212),POST_PROCESS:i(213),PROGRESS:i(214),START:i(215)}},function(t,e){t.exports="addfile"},function(t,e){t.exports="complete"},function(t,e){t.exports="filecomplete"},function(t,e){t.exports="filecomplete-"},function(t,e){t.exports="loaderror"},function(t,e){t.exports="load"},function(t,e){t.exports="fileprogress"},function(t,e){t.exports="postprocess"},function(t,e){t.exports="progress"},function(t,e){t.exports="start"},function(t,e){t.exports=function(t,e){return!!t.url&&(t.url.match(/^(?:blob:|data:|http:\/\/|https:\/\/|\/\/)/)?t.url:e+t.url)}},function(t,e,i){var s=i(45);t.exports=function(t,e){var i=s(e,t.xhrSettings),n=new XMLHttpRequest;if(n.open("GET",t.src,i.async,i.user,i.password),n.responseType=t.xhrSettings.responseType,n.timeout=i.timeout,i.headers)for(var r in i.headers)n.setRequestHeader(r,i.headers[r]);return i.header&&i.headerValue&&n.setRequestHeader(i.header,i.headerValue),i.requestedWith&&n.setRequestHeader("X-Requested-With",i.requestedWith),i.overrideMimeType&&n.overrideMimeType(i.overrideMimeType),i.withCredentials&&(n.withCredentials=!0),n.onload=t.onLoad.bind(t,n),n.onerror=t.onError.bind(t,n),n.onprogress=t.onProgress.bind(t),n.send(),n}},function(t,e,i){var n=i(0),a=i(15),h=i(21),r=i(22),l=i(11),c=i(10),u=i(7),s=new n({Extends:h,initialize:function(t,e,i,n,r){var s="json",o=(u(e)&&(e=l(o=e,"key"),i=l(o,"url"),n=l(o,"xhrSettings"),s=l(o,"extension",s),r=l(o,"dataKey",r)),{type:"json",cache:t.cacheManager.json,extension:s,responseType:"text",key:e,url:i,xhrSettings:n,config:r});h.call(this,t,o),u(i)&&(this.data=r?c(i,r):i,this.state=a.FILE_POPULATED)},onProcess:function(){if(this.state!==a.FILE_POPULATED){this.state=a.FILE_PROCESSING;try{var t=JSON.parse(this.xhrLoader.responseText)}catch(t){throw this.onProcessError(),t}var e=this.config;this.data="string"==typeof e?c(t,e,t):t}this.onProcessComplete()}});r.register("json",function(t,e,i,n){if(Array.isArray(t))for(var r=0;r<t.length;r++)this.addFile(new s(this,t[r]));else this.addFile(new s(this,t,e,n,i));return this}),t.exports=s},function(t,e,i){i=new(i(0))({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,this.multiKeyIndex=t.multiKeyIndex++,this.files=r,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 s=0;s<r.length;s++)r[s].multiFile=this},isReadyToProcess:function(){return 0===this.pending&&0===this.failed&&!this.complete},addToMultiFile:function(t){return this.files.push(t),(t.multiFile=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++}});t.exports=i},function(t,e,i){var n=i(0),r=i(15),h=i(21),s=i(22),l=i(11),c=i(7),o=new n({Extends:h,initialize:function(t,e,i,n){var r="text",s="txt",o=t.cacheManager.text,a=(c(e)&&(e=l(a=e,"key"),i=l(a,"url"),n=l(a,"xhrSettings"),s=l(a,"extension",s),r=l(a,"type",r),o=l(a,"cache",o)),{type:r,cache:o,extension:s,responseType:"text",key:e,url:i,xhrSettings:n});h.call(this,t,a)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});s.register("text",function(t,e,i){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new o(this,t[n]));else this.addFile(new o(this,t,e,i));return this}),t.exports=o},function(t,e,i){var a=i(28),h=i(3),n=i(0),r=i(47),s=i(48),o=i(49),l=i(50),c=i(51),u=i(52),d=i(8),p=i(19),f=i(53),g=i(9),m=i(243),i=i(250),n=new n({Extends:f,Mixins:[r,s,o,l,c,u,i],initialize:function(t,e,i,n,r,s,o){f.call(this,t,"Spine"),this.plugin=e,this.skeleton=null,this.skeletonData=null,this.state=null,this.stateData=null,this.root=null,this.bounds=null,this.drawDebug=!1,this.timeScale=1,this.displayOriginX=0,this.displayOriginY=0,this.preMultipliedAlpha=!1,this.blendMode=-1,this.setPosition(i,n),r&&this.setSkeleton(r,s,o)},willRender:function(t,e){var i,t=!this.skeleton||!(15!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id);return e||t||!this.parentContainer||(i=(e=this.plugin).sceneRenderer,e.gl&&i.batcher.isDrawing&&(i.end(),e.renderer.pipelines.rebind())),t},setAlpha:function(t,e){return void 0===t&&(t=1),e?(e=this.findSlot(e))&&(e.color.a=h(t,0,1)):this.alpha=t,this},alpha:{get:function(){return this.skeleton.color.a},set:function(t){t=h(t,0,1);this.skeleton&&(this.skeleton.color.a=t),0===t?this.renderFlags&=-3:this.renderFlags|=2}},red:{get:function(){return this.skeleton.color.r},set:function(t){t=h(t,0,1);this.skeleton&&(this.skeleton.color.r=t)}},green:{get:function(){return this.skeleton.color.g},set:function(t){t=h(t,0,1);this.skeleton&&(this.skeleton.color.g=t)}},blue:{get:function(){return this.skeleton.color.b},set:function(t){t=h(t,0,1);this.skeleton&&(this.skeleton.color.b=t)}},setColor:function(t,e){var i=((t=void 0===t?16777215:t)>>16&255)/255,n=(t>>8&255)/255,r=(255&t)/255,t=16777215<t?(t>>>24)/255:null,s=this.skeleton;return(s=e&&(e=this.findSlot(e))?e:s).color.r=i,s.color.g=n,s.color.b=r,null!==t&&(s.color.a=t),this},setSkeletonFromJSON:function(t,e,i,n){return this.setSkeleton(t,e,i,n)},setSkeleton:function(t,e,i,n){this.state&&(this.state.clearListeners(),this.state.clearListenerNotifications());t=this.plugin.createSkeleton(t,n),this.skeletonData=t.skeletonData,this.preMultipliedAlpha=t.preMultipliedAlpha,n=t.skeleton;return n.setSkin(),n.setToSetupPose(),this.skeleton=n,t=this.plugin.createAnimationState(n),this.state&&(this.state.clearListeners(),this.state.clearListenerNotifications()),this.state=t.state,this.stateData=t.stateData,this.state.addListener({event:this.onEvent.bind(this),complete:this.onComplete.bind(this),start:this.onStart.bind(this),end:this.onEnd.bind(this),dispose:this.onDispose.bind(this),interrupted:this.onInterrupted.bind(this)}),e&&this.setAnimation(0,e,i),this.root=this.getRootBone(),this.root&&(this.root.rotation=g(d(this.rotation))+90),this.state.apply(n),n.updateCache(),this.updateSize()},onComplete:function(t){this.emit(m.COMPLETE,t)},onDispose:function(t){this.emit(m.DISPOSE,t)},onEnd:function(t){this.emit(m.END,t)},onEvent:function(t,e){this.emit(m.EVENT,t,e)},onInterrupted:function(t){this.emit(m.INTERRUPTED,t)},onStart:function(t){this.emit(m.START,t)},refresh:function(){return this.root&&(this.root.rotation=g(d(this.rotation))+90),this.updateSize(),this.skeleton.updateCache(),this},setSize:function(t,e,i,n){var r=this.skeleton;return void 0===t&&(t=r.data.width),void 0===e&&(e=r.data.height),void 0===i&&(i=0),void 0===n&&(n=0),this.width=t,this.height=e,this.displayOriginX=r.x-i,this.displayOriginY=r.y-n,this},setOffset:function(t,e){var i=this.skeleton;return void 0===e&&(e=0),this.displayOriginX=i.x-(t=void 0===t?0:t),this.displayOriginY=i.y-e,this},updateSize:function(){var t=this.skeleton,e=this.plugin.renderer.height,i=this.scaleX,n=this.scaleY,r=(t.x=this.x,t.y=e-this.y,t.scaleX=1,t.scaleY=1,t.updateWorldTransform(),this.getBounds());return this.width=r.size.x,this.height=r.size.y,this.displayOriginX=this.x-r.offset.x,this.displayOriginY=this.y-(e-(this.height+r.offset.y)),t.scaleX=i,t.scaleY=n,t.updateWorldTransform(),this},scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,this.refresh()}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,this.refresh()}},getBoneList:function(){var t=[],e=this.skeletonData;if(e)for(var i=0;i<e.bones.length;i++)t.push(e.bones[i].name);return t},getSkinList:function(){var t=[],e=this.skeletonData;if(e)for(var i=0;i<e.skins.length;i++)t.push(e.skins[i].name);return t},getSlotList:function(){for(var t=[],e=this.skeleton,i=0;i<e.slots.length;i++)t.push(e.slots[i].data.name);return t},getAnimationList:function(){var t=[],e=this.skeletonData;if(e)for(var i=0;i<e.animations.length;i++)t.push(e.animations[i].name);return t},getCurrentAnimation:function(t){t=this.state.getCurrent(t=void 0===t?0:t);if(t)return t.animation},play:function(t,e,i){return this.setAnimation(0,t,e,i),this},setAnimation:function(t,e,i,n){if(void 0===i&&(i=!1),(n=void 0===n?!1:n)&&this.state){n=this.state.getCurrent(t);if(n&&n.animation.name===e&&!n.isComplete())return}if(this.findAnimation(e))return this.state.setAnimation(t,e,i)},addAnimation:function(t,e,i,n){return this.state.addAnimation(t,e,i=void 0===i?!1:i,n=void 0===n?0:n)},setEmptyAnimation:function(t,e){return this.state.setEmptyAnimation(t,e)},clearTrack:function(t){return this.state.clearTrack(t),this},clearTracks:function(){return this.state.clearTracks(),this},setSkinByName:function(t){var e=this.skeleton;return e.setSkinByName(t),e.setSlotsToSetupPose(),this.state.apply(e),this},setSkin:function(t){var e=this.skeleton;return e.setSkin(t),e.setSlotsToSetupPose(),this.state.apply(e),this},setMix:function(t,e,i){return this.stateData.setMix(t,e,i),this},getAttachment:function(t,e){return this.skeleton.getAttachment(t,e)},getAttachmentByName:function(t,e){return this.skeleton.getAttachmentByName(t,e)},setAttachment:function(t,e){if(Array.isArray(t)&&Array.isArray(e)&&t.length===e.length)for(var i=0;i<t.length;i++)this.skeleton.setAttachment(t[i],e[i]);else this.skeleton.setAttachment(t,e);return this},setToSetupPose:function(){return this.skeleton.setToSetupPose(),this},setSlotsToSetupPose:function(){return this.skeleton.setSlotsToSetupPose(),this},setBonesToSetupPose:function(){return this.skeleton.setBonesToSetupPose(),this},getRootBone:function(){return this.skeleton.getRootBone()},angleBoneToXY:function(t,e,i,n,r,s){void 0===n&&(n=0),void 0===r&&(r=0),void 0===s&&(s=360);var o=this.plugin.renderer.height,o=d(a(t.worldX,o-t.worldY,e,i)+p(n));return t.rotation=h(g(o),r,s),this},findBone:function(t){return this.skeleton.findBone(t)},findBoneIndex:function(t){return this.skeleton.findBoneIndex(t)},findSlot:function(t){return this.skeleton.findSlot(t)},findSlotIndex:function(t){return this.skeleton.findSlotIndex(t)},findSkin:function(t){return this.skeletonData.findSkin(t)},findEvent:function(t){return this.skeletonData.findEvent(t)},findAnimation:function(t){return this.skeletonData.findAnimation(t)},findIkConstraint:function(t){return this.skeletonData.findIkConstraint(t)},findTransformConstraint:function(t){return this.skeletonData.findTransformConstraint(t)},findPathConstraint:function(t){return this.skeletonData.findPathConstraint(t)},findPathConstraintIndex:function(t){return this.skeletonData.findPathConstraintIndex(t)},getBounds:function(){return this.plugin.getBounds(this.skeleton)},preUpdate:function(t,e){var i=this.skeleton;this.state.update(e/1e3*this.timeScale),this.state.apply(i)},preDestroy:function(){this.state&&(this.state.clearListeners(),this.state.clearListenerNotifications()),this.plugin=null,this.skeleton=null,this.skeletonData=null,this.state=null,this.stateData=null}});t.exports=n},function(t,e,i){var n=i(0),a=i(223),i=new n({initialize:function(t,e){this.parent=t,(this.events=e)||(this.events=t.events||t),this.list={},this.values={},this._frozen=!1,!t.hasOwnProperty("sys")&&this.events&&this.events.once(a.DESTROY,this.destroy,this)},get:function(t){var e=this.list;if(Array.isArray(t)){for(var i=[],n=0;n<t.length;n++)i.push(e[t[n]]);return i}return e[t]},getAll:function(){var t,e={};for(t in this.list)this.list.hasOwnProperty(t)&&(e[t]=this.list[t]);return e},query:function(t){var e,i={};for(e in this.list)this.list.hasOwnProperty(e)&&e.match(t)&&(i[e]=this.list[e]);return i},set:function(t,e){if(!this._frozen){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){var i;return this._frozen||(void 0===e&&(e=1),i=this.get(t),this.set(t,(i=void 0===i?0:i)+e)),this},toggle:function(t){return this._frozen||this.set(t,!this.get(t)),this},setValue:function(i,t){return this._frozen||(this.has(i)?this.values[i]=t:(r=(n=this).list,s=this.events,o=this.parent,Object.defineProperty(this.values,i,{enumerable:!0,configurable:!0,get:function(){return r[i]},set:function(t){var e;n._frozen||(e=r[i],r[i]=t,s.emit(a.CHANGE_DATA,o,i,t,e),s.emit(a.CHANGE_DATA_KEY+i,o,t,e))}}),r[i]=t,s.emit(a.SET_DATA,o,i,t))),this;var n,r,s,o},each:function(t,e){for(var i,n=[this.parent,null,void 0],r=1;r<arguments.length;r++)n.push(arguments[r]);for(i in this.list)n[1]=i,n[2]=this.list[i],t.apply(e,n);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){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){var e;return this.has(t)&&(e=this.list[t],delete this.list[t],delete this.values[t],this.events.emit(a.REMOVE_DATA,this.parent,t,e)),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(a.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(a.CHANGE_DATA),this.events.off(a.SET_DATA),this.events.off(a.REMOVE_DATA),this.parent=null},freeze:{get:function(){return this._frozen},set:function(t){this._frozen=!!t}},count:{get:function(){var t,e=0;for(t in this.list)void 0!==this.list[t]&&e++;return e}}});t.exports=i},function(t,e,i){t.exports={CHANGE_DATA:i(224),CHANGE_DATA_KEY:i(225),DESTROY:i(226),REMOVE_DATA:i(227),SET_DATA:i(228)}},function(t,e){t.exports="changedata"},function(t,e){t.exports="changedata-"},function(t,e){t.exports="destroy"},function(t,e){t.exports="removedata"},function(t,e){t.exports="setdata"},function(t,e,i){"use strict";var n=Object.prototype.hasOwnProperty,p="~";function r(){}function s(t,e,i){this.fn=t,this.context=e,this.once=i||!1}function o(t,e,i,n,r){if("function"!=typeof i)throw new TypeError("The listener must be a function");i=new s(i,n||t,r),n=p?p+e:e;return t._events[n]?t._events[n].fn?t._events[n]=[t._events[n],i]:t._events[n].push(i):(t._events[n]=i,t._eventsCount++),t}function h(t,e){0==--t._eventsCount?t._events=new r:delete t._events[e]}function a(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(p=!1)),a.prototype.eventNames=function(){var t,e,i=[];if(0===this._eventsCount)return i;for(e in t=this._events)n.call(t,e)&&i.push(p?e.slice(1):e);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i},a.prototype.listeners=function(t){var t=p?p+t:t,e=this._events[t];if(!e)return[];if(e.fn)return[e.fn];for(var i=0,n=e.length,r=new Array(n);i<n;i++)r[i]=e[i].fn;return r},a.prototype.listenerCount=function(t){t=p?p+t:t,t=this._events[t];return t?t.fn?1:t.length:0},a.prototype.emit=function(t,e,i,n,r,s){var o=p?p+t:t;if(!this._events[o])return!1;var a,h=this._events[o],l=arguments.length;if(h.fn){switch(h.once&&this.removeListener(t,h.fn,void 0,!0),l){case 1:return h.fn.call(h.context),!0;case 2:return h.fn.call(h.context,e),!0;case 3:return h.fn.call(h.context,e,i),!0;case 4:return h.fn.call(h.context,e,i,n),!0;case 5:return h.fn.call(h.context,e,i,n,r),!0;case 6:return h.fn.call(h.context,e,i,n,r,s),!0}for(d=1,a=new Array(l-1);d<l;d++)a[d-1]=arguments[d];h.fn.apply(h.context,a)}else for(var c,u=h.length,d=0;d<u;d++)switch(h[d].once&&this.removeListener(t,h[d].fn,void 0,!0),l){case 1:h[d].fn.call(h[d].context);break;case 2:h[d].fn.call(h[d].context,e);break;case 3:h[d].fn.call(h[d].context,e,i);break;case 4:h[d].fn.call(h[d].context,e,i,n);break;default:if(!a)for(c=1,a=new Array(l-1);c<l;c++)a[c-1]=arguments[c];h[d].fn.apply(h[d].context,a)}return!0},a.prototype.on=function(t,e,i){return o(this,t,e,i,!1)},a.prototype.once=function(t,e,i){return o(this,t,e,i,!0)},a.prototype.removeListener=function(t,e,i,n){t=p?p+t:t;if(this._events[t])if(e){var r=this._events[t];if(r.fn)r.fn!==e||n&&!r.once||i&&r.context!==i||h(this,t);else{for(var s=0,o=[],a=r.length;s<a;s++)(r[s].fn!==e||n&&!r[s].once||i&&r[s].context!==i)&&o.push(r[s]);o.length?this._events[t]=1===o.length?o[0]:o:h(this,t)}}else h(this,t);return this},a.prototype.removeAllListeners=function(t){return t?(t=p?p+t:t,this._events[t]&&h(this,t)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=p,t.exports=a.EventEmitter=a},function(t,e){t.exports="addedtoscene"},function(t,e){t.exports="destroy"},function(t,e){t.exports="removedfromscene"},function(t,e){t.exports="complete"},function(t,e){t.exports="created"},function(t,e){t.exports="error"},function(t,e){t.exports="loop"},function(t,e){t.exports="play"},function(t,e){t.exports="seeked"},function(t,e){t.exports="seeking"},function(t,e){t.exports="stop"},function(t,e){t.exports="timeout"},function(t,e){t.exports="unlocked"},function(t,e,i){t.exports={COMPLETE:i(244),DISPOSE:i(245),END:i(246),EVENT:i(247),INTERRUPTED:i(248),START:i(249)}},function(t,e){t.exports="complete"},function(t,e){t.exports="dispose"},function(t,e){t.exports="end"},function(t,e){t.exports="event"},function(t,e){t.exports="interrupted"},function(t,e){t.exports="start"},function(t,e,i){i(1),i(1),i(1);var n=i(251),r=i(252),i=i(253);t.exports={renderWebGL:n,renderCanvas:i,renderDirect:r}},function(t,e,i){var u=i(3),d=i(8),p=i(56),f=i(9),g=i(6);t.exports=function(t,e,i,n,r){var s=e.plugin,o=e.skeleton,a=s.sceneRenderer,h=(t.newType&&(t.pipelines.clear(),a.begin()),e.scrollFactorX),l=e.scrollFactorY,c=o.color.a;r&&(e.scrollFactorX=r.scrollFactorX,e.scrollFactorY=r.scrollFactorY,o.color.a=u(c*r.alpha,0,1)),i.addToRenderList(e);var i=p(e,i,n).calc,n=t.height;o.x=i.tx,o.y=n-i.ty,o.scaleX=i.scaleX,o.scaleY=i.scaleY,e.scaleX<0?(o.scaleX*=-1,e.root.rotation=g(f(i.rotationNormalized)-180,0,360)):e.root.rotation=g(f(d(i.rotationNormalized))+90,0,360),e.scaleY<0&&(o.scaleY*=-1,e.scaleX<0?e.root.rotation-=2*f(i.rotationNormalized):e.root.rotation+=2*f(i.rotationNormalized)),o.updateWorldTransform(),a.drawSkeleton(o,e.preMultipliedAlpha),r&&(e.scrollFactorX=h,e.scrollFactorY=l,o.color.a=c),(s.drawDebug||e.drawDebug)&&(n=o.x,i=o.y,o.x=0,o.y=0,a.drawSkeletonDebug(o,e.preMultipliedAlpha),o.x=n,o.y=i),t.nextTypeMatch||(a.end(),t.pipelines.rebind())}},function(t,e,i){var u=i(3),d=i(8),p=i(56),f=i(9),g=i(6);t.exports=function(t,e,i,n,r){var s=e.plugin,o=e.skeleton,a=s.sceneRenderer,h=(t.pipelines.clear(),a.begin(),e.scrollFactorX),l=e.scrollFactorY,c=o.color.a;r&&(e.scrollFactorX=r.scrollFactorX,e.scrollFactorY=r.scrollFactorY,o.color.a=u(c*r.alpha,0,1)),i.addToRenderList(e);var i=p(e,i,n).calc,n=t.height;o.x=i.tx,o.y=n-i.ty,o.scaleX=i.scaleX,o.scaleY=i.scaleY,e.scaleX<0?(o.scaleX*=-1,e.root.rotation=g(f(i.rotationNormalized)-180,0,360)):e.root.rotation=g(f(d(i.rotationNormalized))+90,0,360),e.scaleY<0&&(o.scaleY*=-1,e.scaleX<0?e.root.rotation-=2*f(i.rotationNormalized):e.root.rotation+=2*f(i.rotationNormalized)),o.updateWorldTransform(),a.drawSkeleton(o,e.preMultipliedAlpha),r&&(e.scrollFactorX=h,e.scrollFactorY=l,o.color.a=c),(s.drawDebug||e.drawDebug)&&(n=o.x,i=o.y,o.x=0,o.y=0,a.drawSkeletonDebug(o,e.preMultipliedAlpha),o.x=n,o.y=i),a.end(),t.pipelines.rebind()}},function(t,e,i){var c=i(8),u=i(9),d=i(6);t.exports=function(t,e,i,n){var r=t.currentContext,s=e.plugin,o=e.skeleton,a=s.skeletonRenderer,h=t._tempMatrix1,l=t._tempMatrix2,t=t._tempMatrix3;i.addToRenderList(e),l.applyITRS(e.x,e.y,e.rotation,Math.abs(e.scaleX),Math.abs(e.scaleY)),h.copyFrom(i.matrix),n?(h.multiplyWithOffset(n,-i.scrollX*e.scrollFactorX,-i.scrollY*e.scrollFactorY),l.e=e.x,l.f=e.y):(l.e-=i.scrollX*e.scrollFactorX,l.f-=i.scrollY*e.scrollFactorY),h.multiply(l,t),o.x=t.tx,o.y=t.ty,o.scaleX=t.scaleX,o.scaleY=-1*t.scaleY,e.scaleX<0?(o.scaleX*=-1,e.root.rotation=u(t.rotationNormalized)):e.root.rotation=d(u(c(t.rotationNormalized))+90,0,360),e.scaleY<0&&(o.scaleY*=-1,e.scaleX<0?e.root.rotation-=2*u(t.rotationNormalized):e.root.rotation+=2*u(t.rotationNormalized)),i.renderToTexture&&(o.y=t.ty,o.scaleY*=-1),o.updateWorldTransform(),a.ctx=r,a.debugRendering=s.drawDebug||e.drawDebug,r.save(),a.draw(o),r.restore()}},function(t,e,i){var n=i(0),s=i(255),i=i(347),n=new n({Extends:s,Mixins:[i],initialize:function(t,e,i,n,r){s.call(this,t,i,n,r),this.type="Spine",this.plugin=e},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[],this._displayList=null,this.plugin=null}});t.exports=n},function(t,e,i){var s=i(256),r=i(17),n=i(0),o=i(293),a=i(55),h=i(53),l=i(25),c=i(343),u=i(346),d=i(2),i=new n({Extends:h,Mixins:[o.AlphaSingle,o.BlendMode,o.ComputedSize,o.Depth,o.Mask,o.Pipeline,o.Transform,o.Visible,c],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.tempTransformMatrix=new o.TransformMatrix,this._sortKey="",this._sysEvents=t.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.initPipeline(),this.setPosition(e,i),this.clearAlpha(),this.setBlendMode(r.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 this.exclusive=t=void 0===t?!0:t,this},getBounds:function(t){var e;if((t=void 0===t?new l:t).setTo(this.x,this.y,0,0),this.parentContainer&&(e=this.parentContainer.getBoundsTransformMatrix().transformPoint(this.x,this.y),t.setTo(e.x,e.y,0,0)),0<this.list.length){var i=this.list,n=new l,r=!1;t.setEmpty();for(var s=0;s<i.length;s++){var o=i[s];o.getBounds&&(o.getBounds(n),r?u(n,t,t):(t.setTo(n.x,n.y,n.width,n.height),r=!0))}}return t},addHandler:function(t){t.once(a.DESTROY,this.remove,this),this.exclusive&&(t.parentContainer&&t.parentContainer.remove(t),t.removeFromDisplayList(),t.parentContainer=this)},removeHandler:function(t){t.off(a.DESTROY,this.remove),this.exclusive&&(t.parentContainer=null,t.addToDisplayList())},pointToContainer:function(t,e){void 0===e&&(e=new d),this.parentContainer?this.parentContainer.pointToContainer(t,e):e=new d(t.x,t.y);var i=this.tempTransformMatrix;return i.applyITRS(this.x,this.y,this.rotation,this.scaleX,this.scaleY),i.invert(),i.transformPoint(t.x,t.y,e),e},getBoundsTransformMatrix:function(){return this.getWorldTransformMatrix(this.tempTransformMatrix,this.localTransform)},add:function(t){return s.Add(this.list,t,this.maxSize,this.addHandler,this),this},addAt:function(t,e){return s.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(i,t){return i&&s.StableSort(this.list,t=void 0===t?function(t,e){return t[i]-e[i]}:t),this},getByName:function(t){return s.GetFirst(this.list,"name",t)},getRandom:function(t,e){return s.GetRandom(this.list,t,e)},getFirst:function(t,e,i,n){return s.GetFirst(this.list,t,e,i,n)},getAll:function(t,e,i,n){return s.GetAll(this.list,t,e,i,n)},count:function(t,e,i,n){return s.CountAllMatching(this.list,t,e,i,n)},swap:function(t,e){return s.Swap(this.list,t,e),this},moveTo:function(t,e){return s.MoveTo(this.list,t,e),this},remove:function(t,e){var i=s.Remove(this.list,t,this.removeHandler,this);if(e&&i){Array.isArray(i)||(i=[i]);for(var n=0;n<i.length;n++)i[n].destroy()}return this},removeAt:function(t,e){t=s.RemoveAt(this.list,t,this.removeHandler,this);return e&&t&&t.destroy(),this},removeBetween:function(t,e,i){var n=s.RemoveBetween(this.list,t,e,this.removeHandler,this);if(i)for(var r=0;r<n.length;r++)n[r].destroy();return this},removeAll:function(t){var e=s.RemoveBetween(this.list,0,this.list.length,this.removeHandler,this);if(t)for(var i=0;i<e.length;i++)e[i].destroy();return this},bringToTop:function(t){return s.BringToTop(this.list,t),this},sendToBack:function(t){return s.SendToBack(this.list,t),this},moveUp:function(t){return s.MoveUp(this.list,t),this},moveDown:function(t){return s.MoveDown(this.list,t),this},reverse:function(){return this.list.reverse(),this},shuffle:function(){return s.Shuffle(this.list),this},replace:function(t,e,i){return s.Replace(this.list,t,e)&&(this.addHandler(e),this.removeHandler(t),i&&t.destroy()),this},exists:function(t){return-1<this.list.indexOf(t)},setAll:function(t,e,i,n){return s.SetAll(this.list,t,e,i,n),this},each:function(t,e){for(var i=[null],n=this.list.slice(),r=n.length,s=2;s<arguments.length;s++)i.push(arguments[s]);for(s=0;s<r;s++)i[0]=n[s],t.apply(e,i);return this},iterate: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);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&&(s.SetAll(this.list,"scrollFactorX",t),s.SetAll(this.list,"scrollFactorY",e)),this},length:{get:function(){return this.list.length}},first:{get:function(){return(this.position=0)<this.list.length?this.list[0]:null}},last:{get:function(){return 0<this.list.length?(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 0<this.position?(this.position--,this.list[this.position]):null}},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[]}});t.exports=i},function(t,e,i){t.exports={Matrix:i(257),Add:i(266),AddAt:i(267),BringToTop:i(268),CountAllMatching:i(269),Each:i(270),EachInRange:i(271),FindClosestInSorted:i(272),GetAll:i(273),GetFirst:i(274),GetRandom:i(275),MoveDown:i(276),MoveTo:i(277),MoveUp:i(278),NumberArray:i(279),NumberArrayStep:i(280),QuickSelect:i(281),Range:i(282),Remove:i(283),RemoveAt:i(284),RemoveBetween:i(285),RemoveRandomElement:i(286),Replace:i(287),RotateLeft:i(58),RotateRight:i(59),SafeRange:i(5),SendToBack:i(288),SetAll:i(289),Shuffle:i(60),SortByDigits:i(290),SpliceOne:i(12),StableSort:i(291),Swap:i(292)}},function(t,e,i){t.exports={CheckMatrix:i(24),MatrixToString:i(258),ReverseColumns:i(260),ReverseRows:i(261),Rotate180:i(262),RotateLeft:i(263),RotateMatrix:i(16),RotateRight:i(264),Translate:i(265),TransposeMatrix:i(57)}},function(t,e,i){var o=i(259),a=i(24);t.exports=function(t){var e="";if(a(t))for(var i=0;i<t.length;i++){for(var n=0;n<t[i].length;n++){var r=t[i][n].toString();e+="undefined"!==r?o(r,2):"?",n<t[i].length-1&&(e+=" |")}if(i<t.length-1){e+="\n";for(var s=0;s<t[i].length;s++)e+="---",s<t[i].length-1&&(e+="+");e+="\n"}}return e}},function(t,e){t.exports=function(t,e,i,n){var r;if(void 0===i&&(i=" "),void 0===n&&(n=3),(e=void 0===e?0:e)+1>=(t=t.toString()).length)switch(n){case 1:t=new Array(e+1-t.length).join(i)+t;break;case 3:var s=Math.ceil((r=e-t.length)/2);t=new Array(r-s+1).join(i)+t+new Array(s+1).join(i);break;default:t+=new Array(e+1-t.length).join(i)}return t}},function(t,e){t.exports=function(t){return t.reverse()}},function(t,e){t.exports=function(t){for(var e=0;e<t.length;e++)t[e].reverse();return t}},function(t,e,i){var n=i(16);t.exports=function(t){return n(t,180)}},function(t,e,i){var n=i(16);t.exports=function(t){return n(t,90)}},function(t,e,i){var n=i(16);t.exports=function(t){return n(t,-90)}},function(t,e,i){var s=i(58),o=i(59);t.exports=function(t,e,i){if(void 0===e&&(e=0),0!==(i=void 0===i?0:i)&&(i<0?s(t,Math.abs(i)):o(t,i)),0!==e)for(var n=0;n<t.length;n++){var r=t[n];e<0?s(r,Math.abs(e)):o(r,e)}return t}},function(t,e){t.exports=function(t,e,i,n,r){if(void 0===r&&(r=t),0<i){var s=i-t.length;if(s<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.push(e),n&&n.call(r,e),e):null;for(var o=e.length-1;0<=o;)-1!==t.indexOf(e[o])&&e.splice(o,1),o--;if(0===(o=e.length))return null;0<i&&s<o&&(e.splice(s),o=s);for(var a=0;a<o;a++){var h=e[a];t.push(h),n&&n.call(r,h)}return e}},function(t,e){t.exports=function(t,e,i,n,r,s){if(void 0===i&&(i=0),void 0===s&&(s=t),0<n){var o=n-t.length;if(o<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.splice(i,0,e),r&&r.call(s,e),e):null;for(var a=e.length-1;0<=a;)-1!==t.indexOf(e[a])&&e.pop(),a--;if(0===(a=e.length))return null;0<n&&o<a&&(e.splice(o),a=o);for(var h=a-1;0<=h;h--){var l=e[h];t.splice(i,0,l),r&&r.call(s,l)}return e}},function(t,e){t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i<t.length&&(t.splice(i,1),t.push(e)),e}},function(t,e,i){var a=i(5);t.exports=function(t,e,i,n,r){void 0===r&&(r=t.length);var s=0;if(a(t,n=void 0===n?0:n,r))for(var o=n;o<r;o++)t[o][e]===i&&s++;return s}},function(t,e){t.exports=function(t,e,i){for(var n=[null],r=3;r<arguments.length;r++)n.push(arguments[r]);for(r=0;r<t.length;r++)n[0]=t[r],e.apply(i,n);return t}},function(t,e,i){var a=i(5);t.exports=function(t,e,i,n,r){if(void 0===r&&(r=t.length),a(t,n=void 0===n?0:n,r)){for(var s=[null],o=5;o<arguments.length;o++)s.push(arguments[o]);for(o=n;o<r;o++)s[0]=t[o],e.apply(i,s)}return t}},function(t,e){t.exports=function(t,e,i){if(!e.length)return NaN;if(1===e.length)return e[0];var n,r,s=1;if(i){if(t<e[0][i])return e[0];for(;e[s][i]<t;)s++}else for(;e[s]<t;)s++;return s>e.length&&(s=e.length),i?(n=e[s-1][i],(r=e[s][i])-t<=t-n?e[s]:e[s-1]):(n=e[s-1],(r=e[s])-t<=t-n?r:n)}},function(t,e,i){var h=i(5);t.exports=function(t,e,i,n,r){void 0===r&&(r=t.length);var s=[];if(h(t,n=void 0===n?0:n,r))for(var o=n;o<r;o++){var a=t[o];(!e||void 0===i&&a.hasOwnProperty(e)||e&&void 0!==i&&a[e]===i)&&s.push(a)}return s}},function(t,e,i){var a=i(5);t.exports=function(t,e,i,n,r){if(void 0===r&&(r=t.length),a(t,n=void 0===n?0:n,r))for(var s=n;s<r;s++){var o=t[s];if(!e||void 0===i&&o.hasOwnProperty(e)||e&&void 0!==i&&o[e]===i)return o}return null}},function(t,e){t.exports=function(t,e,i){void 0===i&&(i=t.length);e=(e=void 0===e?0:e)+Math.floor(Math.random()*i);return void 0===t[e]?null:t[e]}},function(t,e){t.exports=function(t,e){var i,n,r=t.indexOf(e);return 0<r&&(i=t[r-1],n=t.indexOf(i),t[r]=i,t[n]=e),t}},function(t,e){t.exports=function(t,e,i){var n=t.indexOf(e);if(-1===n||i<0||i>=t.length)throw new Error("Supplied index out of bounds");return n!==i&&(t.splice(n,1),t.splice(i,0,e)),e}},function(t,e){t.exports=function(t,e){var i,n,r=t.indexOf(e);return-1!==r&&r<t.length-1&&(i=t[r+1],n=t.indexOf(i),t[r]=i,t[n]=e),t}},function(t,e){t.exports=function(t,e,i,n){var r,s=[],o=!1;if((i||n)&&(o=!0,i=i||"",n=n||""),e<t)for(r=t;e<=r;r--)o?s.push(i+r.toString()+n):s.push(r);else for(r=t;r<=e;r++)o?s.push(i+r.toString()+n):s.push(r);return s}},function(t,e,i){var o=i(40);t.exports=function(t,e,i){void 0===t&&(t=0),void 0===i&&(i=1),null===(e=void 0===e?null:e)&&(e=t,t=0);for(var n=[],r=Math.max(o((e-t)/(i||1)),0),s=0;s<r;s++)n.push(t),t+=i;return n}},function(t,e){function p(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function f(t,e){return t<e?-1:e<t?1:0}function g(t,e,i,n,r){for(void 0===i&&(i=0),void 0===n&&(n=t.length-1),void 0===r&&(r=f);i<n;){600<n-i&&(s=n-i+1,l=e-i+1,a=Math.log(s),o=.5*Math.exp(2*a/3),a=.5*Math.sqrt(a*o*(s-o)/s)*(l-s/2<0?-1:1),h=Math.max(i,Math.floor(e-l*o/s+a)),l=Math.min(n,Math.floor(e+(s-l)*o/s+a)),g(t,e,h,l,r));var s,o,a,h,l,c=t[e],u=i,d=n;for(p(t,i,e),0<r(t[n],c)&&p(t,i,n);u<d;){for(p(t,u,d),u++,d--;r(t[u],c)<0;)u++;for(;0<r(t[d],c);)d--}0===r(t[i],c)?p(t,i,d):p(t,++d,n),d<=e&&(i=d+1),e<=d&&(n=d-1)}}t.exports=g},function(t,e,i){var d=i(10),p=i(60);t.exports=function(t,e,i){var n=d(i,"max",0),r=d(i,"qty",1),s=d(i,"random",!1),o=d(i,"randomB",!1),a=d(i,"repeat",0),h=d(i,"yoyo",!1),l=[];o&&p(e),-1===a&&(a=0===n?0:(i=t.length*e.length*r,h&&(i*=2),Math.ceil(n/i)));for(var c=0;c<=a;c++){var u=function(t,e,i){for(var n=[],r=0;r<t.length;r++)for(var s=0;s<e.length;s++)for(var o=0;o<i;o++)n.push({a:t[r],b:e[s]});return n}(t,e,r);s&&p(u),l=l.concat(u),h&&(u.reverse(),l=l.concat(u))}return n&&l.splice(n),l}},function(t,e,i){var h=i(12);t.exports=function(t,e,i,n){if(void 0===n&&(n=t),!Array.isArray(e))return-1!==(o=t.indexOf(e))?(h(t,o),i&&i.call(n,e),e):null;for(var r=e.length-1,s=[];0<=r;){var o,a=e[r];-1!==(o=t.indexOf(a))&&(h(t,o),s.push(a),i&&i.call(n,a)),r--}return s}},function(t,e,i){var r=i(12);t.exports=function(t,e,i,n){if(void 0===n&&(n=t),e<0||e>t.length-1)throw new Error("Index out of bounds");t=r(t,e);return i&&i.call(n,t),t}},function(t,e,i){var h=i(5);t.exports=function(t,e,i,n,r){if(void 0===i&&(i=t.length),void 0===r&&(r=t),h(t,e=void 0===e?0:e,i)){var s=t.splice(e,i-e);if(n)for(var o=0;o<s.length;o++){var a=s[o];n.call(r,a)}return s}return[]}},function(t,e,i){var n=i(12);t.exports=function(t,e,i){void 0===i&&(i=t.length);e=(e=void 0===e?0:e)+Math.floor(Math.random()*i);return n(t,e)}},function(t,e){t.exports=function(t,e,i){var e=t.indexOf(e),n=t.indexOf(i);return-1!==e&&-1===n&&(t[e]=i,!0)}},function(t,e){t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&0<i&&(t.splice(i,1),t.unshift(e)),e}},function(t,e,i){var a=i(5);t.exports=function(t,e,i,n,r){if(void 0===r&&(r=t.length),a(t,n=void 0===n?0:n,r))for(var s=n;s<r;s++){var o=t[s];o.hasOwnProperty(e)&&(o[e]=i)}return t}},function(t,e){t.exports=function(t){var i=/\D/g;return t.sort(function(t,e){return parseInt(t.replace(i,""),10)-parseInt(e.replace(i,""),10)}),t}},function(t,e){function i(t,e){return String(t).localeCompare(e)}function o(t,e,i,n){for(var r,s,o,a,h=t.length,l=0,c=2*i,u=0;u<h;u+=c)for(h<(s=(r=u+i)+i)&&(s=h),o=u,a=r=h<r?h:r;;)if(o<r&&a<s)e(t[o],t[a])<=0?n[l++]=t[o++]:n[l++]=t[a++];else if(o<r)n[l++]=t[o++];else{if(!(a<s))break;n[l++]=t[a++]}}t.exports=function(t,e){e=function(t,e){var i=t.length;if(!(i<=1))for(var n=new Array(i),r=1;r<i;r*=2){o(t,e,r,n);var s=t;t=n,n=s}return t}(t,e=void 0===e?i:e);return e!==t&&o(e,null,t.length,t),t}},function(t,e){t.exports=function(t,e,i){if(e!==i){var n=t.indexOf(e),r=t.indexOf(i);if(n<0||r<0)throw new Error("Supplied items must be elements of the same array");return t[n]=i,t[r]=e,t}}},function(t,e,i){t.exports={Alpha:i(294),AlphaSingle:i(295),BlendMode:i(296),ComputedSize:i(47),Crop:i(297),Depth:i(48),Flip:i(49),GetBounds:i(298),Mask:i(307),Origin:i(332),PathFollower:i(333),Pipeline:i(336),ScrollFactor:i(50),Size:i(339),Texture:i(340),TextureCrop:i(341),Tint:i(342),ToJSON:i(54),Transform:i(51),TransformMatrix:i(23),Visible:i(52)}},function(t,e,i){var r=i(3);t.exports={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t,e,i,n){return void 0===t&&(t=1),void 0===e?this.alpha=t:(this._alphaTL=r(t,0,1),this._alphaTR=r(e,0,1),this._alphaBL=r(i,0,1),this._alphaBR=r(n,0,1)),this},alpha:{get:function(){return this._alpha},set:function(t){t=r(t,0,1);this._alpha=t,this._alphaTL=t,this._alphaTR=t,this._alphaBL=t,0===(this._alphaBR=t)?this.renderFlags&=-3:this.renderFlags|=2}},alphaTopLeft:{get:function(){return this._alphaTL},set:function(t){t=r(t,0,1);0!==(this._alphaTL=t)&&(this.renderFlags|=2)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(t){t=r(t,0,1);0!==(this._alphaTR=t)&&(this.renderFlags|=2)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(t){t=r(t,0,1);0!==(this._alphaBL=t)&&(this.renderFlags|=2)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(t){t=r(t,0,1);0!==(this._alphaBR=t)&&(this.renderFlags|=2)}}}},function(t,e,i){var n=i(3);t.exports={_alpha:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t){return this.alpha=t=void 0===t?1:t,this},alpha:{get:function(){return this._alpha},set:function(t){t=n(t,0,1);0===(this._alpha=t)?this.renderFlags&=-3:this.renderFlags|=2}}}},function(t,e,i){var n=i(17),i={_blendMode:n.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(t){"string"==typeof t&&(t=n[t]),-1<=(t|=0)&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=i},function(t,e){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},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}}}},function(t,e,i){var l=i(25),n=i(39),r=i(2);t.exports={prepareBoundsOutput:function(t,e){return void 0===e&&(e=!1),0!==this.rotation&&n(t,this.x,this.y,this.rotation),e&&this.parentContainer&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t),t},getCenter:function(t){return(t=void 0===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,t},getTopLeft:function(t,e){return(t=t||new r).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).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).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).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).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).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).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).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){var e,i,n,r,s,o,a,h;return void 0===t&&(t=new l),this.parentContainer?(h=this.parentContainer.getBoundsTransformMatrix(),this.getTopLeft(t),h.transformPoint(t.x,t.y,t),e=t.x,i=t.y,this.getTopRight(t),h.transformPoint(t.x,t.y,t),n=t.x,r=t.y,this.getBottomLeft(t),h.transformPoint(t.x,t.y,t),s=t.x,o=t.y,this.getBottomRight(t),h.transformPoint(t.x,t.y,t)):(this.getTopLeft(t),e=t.x,i=t.y,this.getTopRight(t),n=t.x,r=t.y,this.getBottomLeft(t),s=t.x,o=t.y,this.getBottomRight(t)),h=t.x,a=t.y,t.x=Math.min(e,n,s,h),t.y=Math.min(i,r,o,a),t.width=Math.max(e,n,s,h)-t.x,t.height=Math.max(i,r,o,a)-t.y,t}}},function(t,e){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}},function(t,e,i){var s=i(61),o=i(62);t.exports=function(t,e,i,n){void 0===n&&(n=[]),!e&&0<i&&(e=o(t)/i);for(var r=0;r<e;r++)n.push(s(t,r/e));return n}},function(t,e,i){var n=i(0),r=i(302),s=i(303),o=i(26),a=i(305),h=i(2),i=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 r(this,t,e)},getPoints:function(t,e,i){return s(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i,n){return void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x1=t=void 0===t?0:t,this.y1=e,this.x2=i,this.y2=n,this},getPointA:function(t){return(t=void 0===t?new h:t).set(this.x1,this.y1),t},getPointB:function(t){return(t=void 0===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}}});t.exports=i},function(t,e,i){var n=i(13);t.exports=function(t,e,i){return(i=void 0===i?new n:i).x=t.x1+(t.x2-t.x1)*e,i.y=t.y1+(t.y2-t.y1)*e,i}},function(t,e,i){var c=i(304),u=i(13);t.exports=function(t,e,i,n){void 0===n&&(n=[]),!e&&0<i&&(e=c(t)/i);for(var r=t.x1,s=t.y1,o=t.x2,a=t.y2,h=0;h<e;h++){var l=h/e;n.push(new u(r+(o-r)*l,s+(a-s)*l))}return n}},function(t,e){t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},function(t,e,i){var n=i(13);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}},function(t,e,i){var n=i(13);t.exports=function(t,e){return(e=void 0===e?new n:e).x=t.x+Math.random()*t.width,e.y=t.y+Math.random()*t.height,e}},function(t,e,i){var n=i(308),r=i(331);t.exports={mask:null,setMask:function(t){return this.mask=t,this},clearMask:function(t){return(t=void 0===t?!1:t)&&this.mask&&this.mask.destroy(),this.mask=null,this},createBitmapMask:function(t){return void 0===t&&(this.texture||this.shader)&&(t=this),new n(this.scene,t)},createGeometryMask:function(t){return void 0===t&&"Graphics"===this.type&&(t=this),new r(this.scene,t)}}},function(t,e,i){var n=i(0),r=i(309),s=i(326),i=new n({initialize:function(t,e){var i=t.sys.renderer;this.renderer=i,this.bitmapMask=e,this.maskTexture=null,this.mainTexture=null,this.dirty=!0,this.mainFramebuffer=null,this.maskFramebuffer=null,this.invertAlpha=!1,this.isStencil=!1,this.createMask(),t.sys.game.events.on(r.CONTEXT_RESTORED,this.createMask,this),i&&i.on(s.RESIZE,this.createMask,this)},createMask:function(){var t,e,i,n,r,s=this.renderer;s&&s.gl&&(this.mainTexture&&this.clearMask(),t=s.width,e=s.height,i=s.gl,n=0==(t&t-1)&&0==(e&e-1)?i.REPEAT:i.CLAMP_TO_EDGE,r=i.LINEAR,this.mainTexture=s.createTexture2D(0,r,r,n,n,i.RGBA,null,t,e),this.maskTexture=s.createTexture2D(0,r,r,n,n,i.RGBA,null,t,e),this.mainFramebuffer=s.createFramebuffer(t,e,this.mainTexture,!0),this.maskFramebuffer=s.createFramebuffer(t,e,this.maskTexture,!0))},clearMask:function(){var t=this.renderer;t&&t.gl&&this.mainTexture&&(t.deleteTexture(this.mainTexture),t.deleteTexture(this.maskTexture),t.deleteFramebuffer(this.mainFramebuffer),t.deleteFramebuffer(this.maskFramebuffer),this.mainTexture=null,this.maskTexture=null,this.mainFramebuffer=null,this.maskFramebuffer=null)},setBitmap:function(t){this.bitmapMask=t},preRenderWebGL:function(t,e,i){t.pipelines.BITMAPMASK_PIPELINE.beginMask(this,e,i)},postRenderWebGL:function(t,e){t.pipelines.BITMAPMASK_PIPELINE.endMask(this,e)},preRenderCanvas:function(){},postRenderCanvas:function(){},destroy:function(){this.clearMask(),this.renderer&&this.renderer.off(s.RESIZE,this.createMask,this),this.bitmapMask=null,this.prevFramebuffer=null,this.renderer=null}});t.exports=i},function(t,e,i){t.exports={BLUR:i(310),BOOT:i(311),CONTEXT_LOST:i(312),CONTEXT_RESTORED:i(313),DESTROY:i(314),FOCUS:i(315),HIDDEN:i(316),PAUSE:i(317),POST_RENDER:i(318),POST_STEP:i(319),PRE_RENDER:i(320),PRE_STEP:i(321),READY:i(322),RESUME:i(323),STEP:i(324),VISIBLE:i(325)}},function(t,e){t.exports="blur"},function(t,e){t.exports="boot"},function(t,e){t.exports="contextlost"},function(t,e){t.exports="contextrestored"},function(t,e){t.exports="destroy"},function(t,e){t.exports="focus"},function(t,e){t.exports="hidden"},function(t,e){t.exports="pause"},function(t,e){t.exports="postrender"},function(t,e){t.exports="poststep"},function(t,e){t.exports="prerender"},function(t,e){t.exports="prestep"},function(t,e){t.exports="ready"},function(t,e){t.exports="resume"},function(t,e){t.exports="step"},function(t,e){t.exports="visible"},function(t,e,i){t.exports={POST_RENDER:i(327),PRE_RENDER:i(328),RENDER:i(329),RESIZE:i(330)}},function(t,e){t.exports="postrender"},function(t,e){t.exports="prerender"},function(t,e){t.exports="render"},function(t,e){t.exports="resize"},function(t,e,i){i=new(i(0))({initialize:function(t,e){this.geometryMask=e,this.invertAlpha=!1,this.isStencil=!0,this.level=0},setShape:function(t){return this.geometryMask=t,this},setInvertAlpha:function(t){return this.invertAlpha=t=void 0===t?!0:t,this},preRenderWebGL:function(t,e,i){var n=t.gl;t.flush(),0===t.maskStack.length&&(n.enable(n.STENCIL_TEST),n.clear(n.STENCIL_BUFFER_BIT),t.maskCount=0),t.currentCameraMask.mask!==this&&(t.currentMask.mask=this),t.maskStack.push({mask:this,camera:i}),this.applyStencil(t,i,!0),t.maskCount++},applyStencil:function(t,e,i){var n=t.gl,r=this.geometryMask,s=t.maskCount;n.colorMask(!1,!1,!1,!1),i?(n.stencilFunc(n.EQUAL,s,255),n.stencilOp(n.KEEP,n.KEEP,n.INCR)):(n.stencilFunc(n.EQUAL,s+1,255),n.stencilOp(n.KEEP,n.KEEP,n.DECR)),r.renderWebGL(t,r,e),t.flush(),n.colorMask(!0,!0,!0,!0),n.stencilOp(n.KEEP,n.KEEP,n.KEEP),i?this.invertAlpha?n.stencilFunc(n.NOTEQUAL,s+1,255):n.stencilFunc(n.EQUAL,s+1,255):this.invertAlpha?n.stencilFunc(n.NOTEQUAL,s,255):n.stencilFunc(n.EQUAL,s,255)},postRenderWebGL:function(t){var e=t.gl;t.maskStack.pop(),t.maskCount--,t.flush();var i=t.currentMask;0===t.maskStack.length?(i.mask=null,e.disable(e.STENCIL_TEST)):((e=t.maskStack[t.maskStack.length-1]).mask.applyStencil(t,e.camera,!1),t.currentCameraMask.mask!==e.mask?(i.mask=e.mask,i.camera=e.camera):i.mask=null)},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}});t.exports=i},function(t,e){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}}},function(t,e,i){var r=i(19),s=i(334),o=i(10),a=i(335),h=i(2),i={path:null,rotateToPath:!1,pathRotationOffset:0,pathOffset:null,pathVector:null,pathDelta:null,pathTween:null,pathConfig:null,_prevDirection:a.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&&i.isPlaying()&&i.stop(),(t="number"==typeof t?{duration:t}:t).from=o(t,"from",0),t.to=o(t,"to",1),s(t,"positionOnPath",!1));this.rotateToPath=s(t,"rotateToPath",!1),this.pathRotationOffset=o(t,"rotationOffset",0);var n=o(t,"startAt",e);return n&&(t.onStart=function(t){var t=t.data[0],e=(t.progress=n,t.elapsed=t.duration*n,t.ease(t.progress));t.current=t.start+(t.end-t.start)*e,t.target[t.key]=t.current}),this.pathOffset||(this.pathOffset=new h(this.x,this.y)),this.pathVector||(this.pathVector=new h),this.pathDelta||(this.pathDelta=new h),this.pathDelta.reset(),this.pathTween=this.scene.sys.tweens.addCounter(t),this.path.getStartPoint(this.pathOffset),i&&(this.x=this.pathOffset.x,this.y=this.pathOffset.y),this.pathOffset.x=this.x-this.pathOffset.x,this.pathOffset.y=this.y-this.pathOffset.y,this._prevDirection=a.PLAYING_FORWARD,this.rotateToPath&&(e=this.path.getPoint(.1),this.rotation=Math.atan2(e.y-this.y,e.x-this.x)+r(this.pathRotationOffset)),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,e,i,n=this.pathTween;n&&(t=n.data[0],e=this.pathDelta,i=this.pathVector,e.copy(i).negate(),t.state===a.COMPLETE?(this.path.getPoint(1,i),e.add(i),i.add(this.pathOffset),this.setPosition(i.x,i.y)):t.state!==a.PLAYING_FORWARD&&t.state!==a.PLAYING_BACKWARD||(this.path.getPoint(n.getValue(),i),e.add(i),i.add(this.pathOffset),n=this.x,e=this.y,this.setPosition(i.x,i.y),i=this.x-n,n=this.y-e,0==i&&0==n||(t.state!==this._prevDirection?this._prevDirection=t.state:this.rotateToPath&&(this.rotation=Math.atan2(n,i)+r(this.pathRotationOffset)))))}};t.exports=i},function(t,e){t.exports=function(t,e,i){return t&&t.hasOwnProperty(e)?t[e]:i}},function(t,e){t.exports={CREATED:0,INIT:1,DELAY:2,OFFSET_DELAY:3,PENDING_RENDER:4,PLAYING_FORWARD:5,PLAYING_BACKWARD:6,HOLD_DELAY:7,REPEAT_DELAY:8,COMPLETE:9,PENDING_ADD:20,PAUSED:21,LOOP_DELAY:22,ACTIVE:23,COMPLETE_DELAY:24,PENDING_REMOVE:25,REMOVED:26}},function(t,e,i){var a=i(337),n=i(338),r=i(12);t.exports={defaultPipeline:null,pipeline:null,hasPostPipeline:!1,postPipelines:null,pipelineData:null,initPipeline:function(t){void 0===t&&(t=n.MULTI_PIPELINE);var e=this.scene.sys.renderer;if(e){e=e.pipelines;if(this.postPipelines=[],this.pipelineData={},e){e=e.get(t);if(e)return this.defaultPipeline=e,this.pipeline=e,!0}}return!1},setPipeline:function(t,e,i){var n=this.scene.sys.renderer;return!n||(n=n.pipelines)&&((n=n.get(t))&&(this.pipeline=n),e&&(this.pipelineData=i?a(e):e)),this},setPostPipeline:function(t,e,i){var n=this.scene.sys.renderer;if(n){var r=n.pipelines;if(r){Array.isArray(t)||(t=[t]);for(var s=0;s<t.length;s++){var o=r.getPostPipeline(t[s],this);o&&this.postPipelines.push(o)}e&&(this.pipelineData=i?a(e):e)}this.hasPostPipeline=0<this.postPipelines.length}return this},setPipelineData:function(t,e){var i=this.pipelineData;return void 0===e?delete i[t]:i[t]=e,this},getPostPipeline:function(t){for(var e=this.postPipelines,i=[],n=0;n<e.length;n++){var r=e[n];("string"==typeof t&&r.name===t||r instanceof t)&&i.push(r)}return 1===i.length?i[0]:i},resetPipeline:function(t,e){return void 0===t&&(t=!1),void 0===e&&(e=!1),this.pipeline=this.defaultPipeline,t&&(this.postPipelines=[],this.hasPostPipeline=!1),e&&(this.pipelineData={}),null!==this.pipeline},resetPostPipeline:function(t){void 0===t&&(t=!1);for(var e=this.postPipelines,i=0;i<e.length;i++)e[i].destroy();this.postPipelines=[],this.hasPostPipeline=!1,t&&(this.pipelineData={})},removePostPipeline:function(t){for(var e=this.postPipelines,i=e.length-1;0<=i;i--){var n=e[i];("string"==typeof t&&n.name===t||"string"!=typeof t&&n instanceof t)&&(n.destroy(),r(e,i))}return this.hasPostPipeline=0<this.postPipelines.length,this},getPipelineName:function(){return this.pipeline.name}}},function(t,e){function r(t){var e,i,n;if("object"!=typeof t||null===t)return t;for(n in e=Array.isArray(t)?[]:{},t)i=t[n],e[n]=r(i);return e}t.exports=r},function(t,e){t.exports={BITMAPMASK_PIPELINE:"BitmapMaskPipeline",LIGHT_PIPELINE:"Light2D",POINTLIGHT_PIPELINE:"PointLightPipeline",SINGLE_PIPELINE:"SinglePipeline",MULTI_PIPELINE:"MultiPipeline",ROPE_PIPELINE:"RopePipeline",GRAPHICS_PIPELINE:"GraphicsPipeline",POSTFX_PIPELINE:"PostFXPipeline",UTILITY_PIPELINE:"UtilityPipeline"}},function(t,e){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){return void 0===t&&(t=this.frame),this.width=t.realWidth,this.height=t.realHeight,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}}},function(t,e){t.exports={texture:null,frame:null,isCropped:!1,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),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}}},function(t,e){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),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,ch:0}}}},function(t,e){t.exports={tintTopLeft:16777215,tintTopRight:16777215,tintBottomLeft:16777215,tintBottomRight:16777215,tintFill:!1,clearTint:function(){return this.setTint(16777215),this},setTint:function(t,e,i,n){return void 0===t&&(t=16777215),void 0===e&&(n=i=e=t),this.tintTopLeft=t,this.tintTopRight=e,this.tintBottomLeft=i,this.tintBottomRight=n,this.tintFill=!1,this},setTintFill:function(t,e,i,n){return this.setTint(t,e,i,n),this.tintFill=!0,this},tint:{set:function(t){this.setTint(t,t,t,t)}},isTinted:{get:function(){var t=16777215;return this.tintFill||this.tintTopLeft!==t||this.tintTopRight!==t||this.tintBottomLeft!==t||this.tintBottomRight!==t}}}},function(t,e,i){i(1),i(1);var n=i(344),i=i(345);t.exports={renderWebGL:n,renderCanvas:i}},function(t,e){t.exports=function(t,e,i,n){var r=e.list,s=r.length;if(0!==s){i.addToRenderList(e);var o=e.localTransform,a=(n?(o.loadIdentity(),o.multiply(n),o.translate(e.x,e.y),o.rotate(e.rotation),o.scale(e.scaleX,e.scaleY)):o.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),t.pipelines.preBatch(e),-1!==e.blendMode);a||t.setBlendMode(0);for(var h=e.alpha,l=e.scrollFactorX,c=e.scrollFactorY,u=0;u<s;u++){var d,p,f,g,m,y,v,x,b=r[u];b.willRender(i)&&(g=void 0!==b.alphaTopLeft?(d=b.alphaTopLeft,p=b.alphaTopRight,f=b.alphaBottomLeft,b.alphaBottomRight):f=p=d=b.alpha,m=b.scrollFactorX,y=b.scrollFactorY,a||b.blendMode===t.currentBlendMode||t.setBlendMode(b.blendMode),(v=b.mask)&&v.preRenderWebGL(t,b,i),(x=b.type)!==t.currentType&&(t.newType=!0,t.currentType=x),t.nextTypeMatch=u<s-1&&r[u+1].type===t.currentType,b.setScrollFactor(m*l,y*c),b.setAlpha(d*h,p*h,f*h,g*h),b.renderWebGL(t,b,i,o),b.setAlpha(d,p,f,g),b.setScrollFactor(m,y),v&&v.postRenderWebGL(t,i),t.newType=!1)}t.pipelines.postBatch(e)}}},function(t,e){t.exports=function(t,e,i,n){var r=e.list;if(0!==r.length){i.addToRenderList(e);var s=e.localTransform,o=(n?(s.loadIdentity(),s.multiply(n),s.translate(e.x,e.y),s.rotate(e.rotation),s.scale(e.scaleX,e.scaleY)):s.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),-1!==e.blendMode),a=(o||t.setBlendMode(0),e._alpha),h=e.scrollFactorX,l=e.scrollFactorY;e.mask&&e.mask.preRenderCanvas(t,null,i);for(var c=0;c<r.length;c++){var u,d,p,f=r[c];f.willRender(i)&&(u=f.alpha,d=f.scrollFactorX,p=f.scrollFactorY,o||f.blendMode===t.currentBlendMode||t.setBlendMode(f.blendMode),f.setScrollFactor(d*h,p*l),f.setAlpha(u*a),f.renderCanvas(t,f,i,s),f.setAlpha(u),f.setScrollFactor(d,p))}e.mask&&e.mask.postRenderCanvas(t)}}},function(t,e,i){var o=i(25);t.exports=function(t,e,i){void 0===i&&(i=new o);var n=Math.min(t.x,e.x),r=Math.min(t.y,e.y),s=Math.max(t.right,e.right)-n,t=Math.max(t.bottom,e.bottom)-r;return i.setTo(n,r,s,t)}},function(t,e,i){i(1),i(1);var n=i(348),i=i(349);t.exports={renderWebGL:n,renderCanvas:i}},function(t,e){t.exports=function(t,e,i,n){var r=e.plugin.sceneRenderer,s=e.list;if(0!==s.length){i.addToRenderList(e);var o=e.localTransform,n=(n?(o.loadIdentity(),o.multiply(n),o.translate(e.x,e.y),o.rotate(e.rotation),o.scale(e.scaleX,e.scaleY)):o.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),t.newType&&(t.pipelines.clear(),r.begin()),t.nextTypeMatch);t.nextTypeMatch=!0,t.newType=!1;for(var a=0;a<s.length;a++){var h,l=s[a];l.willRender(i,e)&&((h=l.mask)&&(r.end(),t.pipelines.rebind(),h.preRenderWebGL(t,l,i),t.pipelines.clear(),r.begin()),l.renderWebGL(t,l,i,o,e),h&&(r.end(),t.pipelines.rebind(),h.postRenderWebGL(t,i),t.pipelines.clear(),r.begin()))}(t.nextTypeMatch=n)||(r.end(),t.pipelines.rebind())}else r.batcher.isDrawing&&t.finalType&&(r.end(),t.pipelines.rebind())}},function(t,e){t.exports=function(t,e,i,n){var r=e.list;if(0!==r.length){i.addToRenderList(e);var s=e.localTransform,o=(n?(s.loadIdentity(),s.multiply(n),s.translate(e.x,e.y),s.rotate(e.rotation),s.scale(e.scaleX,e.scaleY)):s.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),-1!==e.blendMode),a=(o||t.setBlendMode(0),e._alpha),h=e.scrollFactorX,l=e.scrollFactorY;e.mask&&e.mask.preRenderCanvas(t,null,i);for(var c=0;c<r.length;c++){var u,d,p,f=r[c];f.willRender(i)&&(u=f.alpha,d=f.scrollFactorX,p=f.scrollFactorY,o||f.blendMode===t.currentBlendMode||t.setBlendMode(f.blendMode),f.setScrollFactor(d*h,p*l),f.setAlpha(u*a),f.renderCanvas(t,f,i,s),f.setAlpha(u),f.setScrollFactor(d,p))}e.mask&&e.mask.postRenderCanvas(t)}}}]),"function"==typeof define&&define.amd?define(x):"object"==typeof exports?module.exports=x():this.SAT=x(),!function(i){var n={};function r(t){var e;return(n[t]||(e=n[t]={i:t,l:!1,exports:{}},i[t].call(e.exports,e,e.exports,r),e.l=!0,e)).exports}r.m=i,r.c=n,r.d=function(t,e,i){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(i,n,function(t){return e[t]}.bind(null,n));return i},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=75)}([function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Spines=e.Jsons=e.Fonts=e.Sounds=e.Atlases=e.Constants=e.Images=void 0;var n=i(80),r=(Object.defineProperty(e,"Images",{enumerable:!0,get:function(){return n.Images}}),i(81)),s=(Object.defineProperty(e,"Constants",{enumerable:!0,get:function(){return r.Constants}}),i(82)),o=(Object.defineProperty(e,"Atlases",{enumerable:!0,get:function(){return s.Atlases}}),i(83)),a=(Object.defineProperty(e,"Sounds",{enumerable:!0,get:function(){return o.Sounds}}),i(84)),h=(Object.defineProperty(e,"Fonts",{enumerable:!0,get:function(){return a.Fonts}}),i(85)),l=(Object.defineProperty(e,"Jsons",{enumerable:!0,get:function(){return h.Jsons}}),i(86));Object.defineProperty(e,"Spines",{enumerable:!0,get:function(){return l.Spines}})},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.JD9SliceRenderTexture=e.JD9SliceContainer=e.JDTextInput=e.JDMaskParent=e.JDImageNineSlice=e.JDSpineGameObject=e.JDTextTranslated=e.JDTextFit=e.JDText=e.JDImageSkew=e.JDImagePivot=e.JDBmpdTextStroke=e.JDBmpdTextTranslated=e.JDBmpdTextFit=e.JDBmpdText=e.JDImageAnim=e.JDImage=e.JDSprite=void 0;var n=i(88),r=(Object.defineProperty(e,"JDSprite",{enumerable:!0,get:function(){return n.JDSprite}}),i(36)),s=(Object.defineProperty(e,"JDImage",{enumerable:!0,get:function(){return r.JDImage}}),i(89)),o=(Object.defineProperty(e,"JDImageAnim",{enumerable:!0,get:function(){return s.JDImageAnim}}),i(52)),a=(Object.defineProperty(e,"JDBmpdText",{enumerable:!0,get:function(){return o.JDBmpdText}}),i(53)),h=(Object.defineProperty(e,"JDBmpdTextFit",{enumerable:!0,get:function(){return a.JDBmpdTextFit}}),i(90)),l=(Object.defineProperty(e,"JDBmpdTextTranslated",{enumerable:!0,get:function(){return h.JDBmpdTextTranslated}}),i(91)),c=(Object.defineProperty(e,"JDBmpdTextStroke",{enumerable:!0,get:function(){return l.JDBmpdTextStroke}}),i(54)),u=(Object.defineProperty(e,"JDImagePivot",{enumerable:!0,get:function(){return c.JDImagePivot}}),i(96)),d=(Object.defineProperty(e,"JDImageSkew",{enumerable:!0,get:function(){return u.JDImageSkew}}),i(37)),p=(Object.defineProperty(e,"JDText",{enumerable:!0,get:function(){return d.JDText}}),i(10)),f=(Object.defineProperty(e,"JDTextFit",{enumerable:!0,get:function(){return p.JDTextFit}}),i(97)),g=(Object.defineProperty(e,"JDTextTranslated",{enumerable:!0,get:function(){return f.JDTextTranslated}}),i(98)),m=(Object.defineProperty(e,"JDSpineGameObject",{enumerable:!0,get:function(){return g.JDSpineGameObject}}),i(99)),y=(Object.defineProperty(e,"JDImageNineSlice",{enumerable:!0,get:function(){return m.JDImageNineSlice}}),i(100)),v=(Object.defineProperty(e,"JDMaskParent",{enumerable:!0,get:function(){return y.JDMaskParent}}),i(38)),x=(Object.defineProperty(e,"JDTextInput",{enumerable:!0,get:function(){return v.JDTextInput}}),i(103)),b=(Object.defineProperty(e,"JD9SliceContainer",{enumerable:!0,get:function(){return x.JD9SliceContainer}}),i(104));Object.defineProperty(e,"JD9SliceRenderTexture",{enumerable:!0,get:function(){return b.JD9SliceRenderTexture}})},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BalanceData=e.BalanceConfig=void 0;var n,r=i(0),s=i(4),i=((i=n=e.BalanceConfig||(e.BalanceConfig={})).WireSparkSpeed="wss",i.TimeNewElevator="tne",i.SpeedElevator="se",i.PortalTimeCooldown="ptc",i.RopeUpVelY="ruvy",i.RopeDownVelY="rdvy",i.AppearingBlockApper="aba",i.AppearingBlockDisapper="abd",i.SpikeBlockVelocity="sbv",i.TowerWallWidth="tww",i.ClassicLaserFireTime="clft",i.ClassicLaserFireDistance="clfd",i.MissileLauncherFireTime="mlft",i.MissileLauncherFireDistance="mlfd",i.MissileSpeed="ms",i.MissileLifeTime="mlt",i.MissileFollowSpeed="mfs",i.ClassicLaserCameraFireTime="clcft",i.SurveillanceCameraRotaionSpeed="scrs",i.SurveillanceCameraFollowSpeed="scfs",i.PulseBlockPushPlayer="pbpp",i.PulseBlockPushOther="pbpo",i.PulseBlockDistanceEmit="pbde",o.init=function(){this.configDefault={},this.configDefault[n.WireSparkSpeed]=.15,this.configDefault[n.TimeNewElevator]=120,this.configDefault[n.SpeedElevator]=2,this.configDefault[n.PortalTimeCooldown]=240,this.configDefault[n.RopeUpVelY]=2.5,this.configDefault[n.RopeDownVelY]=2.5,this.configDefault[n.AppearingBlockApper]=.3,this.configDefault[n.AppearingBlockDisapper]=.3,this.configDefault[n.SpikeBlockVelocity]=.3,this.configDefault[n.TowerWallWidth]=880,this.configDefault[n.ClassicLaserFireTime]=80,this.configDefault[n.ClassicLaserFireDistance]=250,this.configDefault[n.MissileLauncherFireTime]=80,this.configDefault[n.MissileLauncherFireDistance]=400,this.configDefault[n.MissileSpeed]=3,this.configDefault[n.MissileLifeTime]=150,this.configDefault[n.MissileFollowSpeed]=1,this.configDefault[n.ClassicLaserCameraFireTime]=50,this.configDefault[n.SurveillanceCameraRotaionSpeed]=1,this.configDefault[n.SurveillanceCameraFollowSpeed]=2,this.configDefault[n.PulseBlockPushPlayer]=20,this.configDefault[n.PulseBlockPushOther]=20,this.configDefault[n.PulseBlockDistanceEmit]=200},o.getConfigData=function(t,e){t=t[e];return t=void 0===t?this.configDefault[e]:t},o.initConfig=function(t){this.config_ElevatorTimeNew=this.getConfigData(t,n.TimeNewElevator),this.config_ElevatorSpeed=this.getConfigData(t,n.SpeedElevator),this.config_PortalTimeCooldown=this.getConfigData(t,n.PortalTimeCooldown),this.config_RopeUpVelY=this.getConfigData(t,n.RopeUpVelY),this.config_RopeDownVelY=this.getConfigData(t,n.RopeUpVelY),this.config_AppearingBlockApper=this.getConfigData(t,n.AppearingBlockApper),this.config_AppearingBlockDisapper=this.getConfigData(t,n.AppearingBlockDisapper),this.config_SpikeBlockVelocity=this.getConfigData(t,n.SpikeBlockVelocity),this.config_WireSparkSpeed=this.getConfigData(t,n.WireSparkSpeed),this.config_TowerWallWidth=this.getConfigData(t,n.TowerWallWidth),this.config_ClassicLaserFireTime=this.getConfigData(t,n.ClassicLaserFireTime),this.config_ClassicLaserFireDistance=this.getConfigData(t,n.ClassicLaserFireDistance),this.config_MissileLauncherFireTime=this.getConfigData(t,n.MissileLauncherFireTime),this.config_MissileLauncherFireDistance=this.getConfigData(t,n.MissileLauncherFireDistance),this.config_MissileSpeed=this.getConfigData(t,n.MissileSpeed),this.config_MissileLifeTime=this.getConfigData(t,n.MissileLifeTime),this.config_MissileFollowSpeed=this.getConfigData(t,n.MissileFollowSpeed),this.config_ClassicLaserCameraFireTime=this.getConfigData(t,n.ClassicLaserCameraFireTime),this.config_SurveillanceCameraRotaionSpeed=s.Tools.toRad(this.getConfigData(t,n.SurveillanceCameraRotaionSpeed)/60),this.config_SurveillanceCameraFollowSpeed=s.Tools.toRad(this.getConfigData(t,n.SurveillanceCameraFollowSpeed))/10,this.config_PulseBlockPushPlayer=this.getConfigData(t,n.PulseBlockPushPlayer),this.config_PulseBlockPushOther=this.getConfigData(t,n.PulseBlockPushOther),this.config_PulseBlockDistanceEmit=this.getConfigData(t,n.PulseBlockDistanceEmit),this.towerCellSize=this.config_TowerWallWidth/this.towerHorizontalCells,this.towerHalfCellSize=this.towerCellSize/2,!0===r.Constants.IS_MOBILE&&(this.particleLimit=0,this.blend=!1,this.parallax=!1)},o.getBasicBlockFrame=function(t){t=Number(t);return"basicBlockColors "+(1e4+(t=!t||t>=this.basicBlockColorFrames?0:t))},o.getSlopeFrame=function(t){t=Number(t);return"leftSlopeColors "+(1e4+(t=!t||t>=this.basicBlockColorFrames?0:t))},(i=o).mutedSfx=!1,o.mutedMusic=!1,o.incorrectOrientation=!1,o.actsStarts=1,o.totalActs=10,o.editID="edit",o.mainmenuID="mainmenu",o.hubID="hub",o.towerID="tower",o.vexID=""+i.totalActs,o.basicBlockColorFrames=10,o.towerFloor=0,o.totalMoney=0,o.totalTowerMoney=0,o.totalDeaths=0,o.currSkin=0,o.autoReset=!1,o.autoRestart=!1,o.noBlood=!1,o.particleLimit=30,o.blend=!0,o.parallax=!0,o.levelsCompleted=0,o.actFinishTime=-1,o.towerHorizontalCells=11,o.towerCellSize=1,o.towerHalfCellSize=1,o);function o(){}e.BalanceData=i},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DetectNoBlood=e.TexturesEdit=e.SoundManager=e.SkinsData=e.SaveGame=e.Localization=e.DailyTask=e.BalanceData=e.Achievements=void 0;var n=i(18),r=(Object.defineProperty(e,"Achievements",{enumerable:!0,get:function(){return n.Achievements}}),i(2)),s=(Object.defineProperty(e,"BalanceData",{enumerable:!0,get:function(){return r.BalanceData}}),i(23)),o=(Object.defineProperty(e,"DailyTask",{enumerable:!0,get:function(){return s.DailyTask}}),i(16)),a=(Object.defineProperty(e,"Localization",{enumerable:!0,get:function(){return o.Localization}}),i(17)),h=(Object.defineProperty(e,"SaveGame",{enumerable:!0,get:function(){return a.SaveGame}}),i(24)),l=(Object.defineProperty(e,"SkinsData",{enumerable:!0,get:function(){return h.SkinsData}}),i(11)),c=(Object.defineProperty(e,"SoundManager",{enumerable:!0,get:function(){return l.SoundManager}}),i(105)),u=(Object.defineProperty(e,"TexturesEdit",{enumerable:!0,get:function(){return c.TexturesEdit}}),i(106));Object.defineProperty(e,"DetectNoBlood",{enumerable:!0,get:function(){return u.DetectNoBlood}})},function(t,e,i){"use strict";function n(){}Object.defineProperty(e,"__esModule",{value:!0}),e.Tools=void 0,n.random=function(t,e){return Math.floor(Math.random()*(e-t+1))+t},n.randomNum=function(t,e){return Math.random()*(e-t)+t},n.simpleRandom=function(){return 100*Math.random()},n.randomOne=function(t){return void 0===t&&(t=.5),Math.random()<t?1:-1},n.randomBool=function(t){return void 0===t&&(t=.5),Math.random()<t},n.getDir=function(t){return t<0?-1:0<t?1:0},n.roundDec=function(t,e){void 0===e&&(e=0);e=Math.pow(10,e);return Math.round(t*e)/e},n.clamp=function(t,e,i){return Math.max(e,Math.min(i,t))},n.lerp=function(t,e,i){return t+(e-t)*n.clamp(i,0,1)},n.lerpUnity=function(t,e,i){return t+(e-t)*n.clamp01Unity(i)},n.clamp01Unity=function(t){return t<0?0:1<t?1:t},n.magnitudeUnity=function(t,e){return Math.sqrt(t*t+e*e)},n.sqrtMagnitudeUnity=function(t,e){return t*t+e*e},n.toDeg=function(t){return t*this.radToDeg},n.toRad=function(t){return t*this.degToRad},n.rotatePointByAngle=function(t,e,i,n,r){var s=Math.cos(r),r=Math.sin(r);return{x:t+(i-t)*s-(n-e)*r,y:e+(i-t)*r+(n-e)*s}},n.distance=function(t,e,i,n){return Math.sqrt((i-t)*(i-t)+(n-e)*(n-e))},n.angleOfPoints=function(t,e,i,n){return Math.atan2(n-e,i-t)},n.getObjectRandomProperty=function(t){var e=Object.keys(t);return t[e[e.length*Math.random()<<0]]},n.abs=function(t){return t=t<0?-t:t},n.getSlideSide=function(t,e,i,n){t=this.toDeg(this.angleOfPoints(t,e,i,n));return t<-45&&-135<t?"down":135<t&&t<=180||-180<=t&&t<-135?"right":45<t&&t<135?"up":-45<t&&t<45?"left":void 0},n.toPercent=function(t,e){return t/e*100},n.fromPercent=function(t,e){return t*e/100},n.damping=function(t,e,i){return void 0===e&&(e=.05),void 0===i&&(i=.95),0!==t&&(n.abs(t*=i)<e&&(t=0)),t},n.intersectsRectangles=function(t,e,i,n,r,s,o,a){return!(t+i<r||e+n<s||r+o<t||s+a<e)},n.intersectCircleRectange=function(t,e,i,n,r,s,o){s/=2,o/=2,t=Math.abs(t-n-s),n=Math.abs(e-r-o);return!(s+i<t)&&(!(o+i<n)&&(t<=s||(n<=o||(e=t-s)*e+(r=n-o)*r<=i*i)))},n.containsRectPoint=function(t,e,i,n,r,s){return t<=r&&r<t+i&&e<=s&&s<e+n},n.angleDifference=function(t,e){e=e<t?t-e:e-t;return e<180?e:360-e},n.vec2Length=function(t,e){return Math.sqrt(t*t+e*e)},n.getRandomCellID=function(t){return Math.floor(Math.random()*t)},n.getAndDelRandomCell=function(t){var e=n.getRandomCellID(t.length),i=t[e];return t.splice(e,1),i},n.getRandomCell=function(t){return t[n.getRandomCellID(t.length)]},n.shuffle=function(t){for(var e=t.length;1<e;){e--;var i=Math.floor(Math.random()*(e+1)),n=t[i];t[i]=t[e],t[e]=n}},n.getFrom1Dto2DIndex=function(t,e){return{x:t%e,y:Math.floor(t/e)}},n.containsPointInPoly=function(t,e,i){for(var n=!1,r=t.length-1,s=0;s<t.length;r=s++){var o=t[s].x,a=t[s].y,h=t[r].x,l=t[r].y;!0==(i<a!=i<l&&e<(h-o)*(i-a)/(l-a)+o)&&(n=!n)}return n},n.interpolateColor=function(t,e,i,n){return this.getHexColorFromRBG255(this.interpolateColorRGB(this.getRGB255(t),this.getRGB255(e),i,n))},n.interpolateColorRGB=function(t,e,i,n){return{r:(e.r-t.r)*i/n+t.r,g:(e.g-t.g)*i/n+t.g,b:(e.b-t.b)*i/n+t.b}},n.getRGB=function(t){return{r:(t>>16&255)/255,g:(t>>8&255)/255,b:(255&t)/255}},n.getRGBFromString=function(t){t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return t?{r:parseInt(t[1],16)/255,g:parseInt(t[2],16)/255,b:parseInt(t[3],16)/255}:null},n.getRGB255=function(t){return{r:t>>16&255,g:t>>8&255,b:255&t}},n.getHexColorFromRBG255=function(t){return this.getHexColorFrom255(t.r,t.g,t.b)},n.getHexColorFrom255=function(t,e,i){return t<<16|e<<8|i},n.rgbToHexString=function(t,e,i,n){return(n=void 0===n?"#":n)+((1<<24)+(t<<16)+(e<<8)+i).toString(16).slice(1)},n.formatNumber=function(t){return t.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,")},n.sortArrayObectsByKey=function(t,i,e){var n=-1,r=1;!1===(e=void 0===e?!0:e)&&(r=-(n=1)),t.sort(function(t,e){t=t[i],e=e[i];return t<e?n:e<t?r:0})},n.checkSkewValue=function(t){return t>Math.PI?t=-(Math.PI-(t-Math.PI)):t<-Math.PI&&(t=Math.PI+(t+Math.PI)),t},n.smartRotation=function(t){return(t%=n.PI2)>Math.PI?t-=n.PI2:t<-Math.PI&&(t+=n.PI2),t},n.convertNumToStr=function(t,e){void 0===e&&(e=2);var i=String(Math.floor(t));for("NaN"===i&&(i="0");i.length<e;)i="0"+i;return i},n.formatNum=function(t,e,i){void 0===i&&(i=-1);var n=t<0;t=Math.abs(t);for(var r=""+Math.floor(t);r.length<e;)r="0"+r;if(0<=i){var s=""+t,t=s.indexOf(".");for(-1===t&&(t=s.length-1),s=s.substr(t+1,i);s.length<i;)s+="0";r+="."+s}return r=!0==n?"-"+r:r},n.getVolumeFromVelocity=function(t,e,i){return(i=void 0===i?1:i)<t/(e=void 0===e?10:e)?i:t/e},n.calcCurrentTime=function(t){var e=new Date(Date.now()),t=new Date(t);return t.setTime(t.getTime()),e-t},n.isAnHour=function(t){return 1<=Math.floor(t/1e3/60/60)},n.getFollowRotationSpeed=function(t,e,i,n,r,s){return void 0===s&&(s=1),this.getFollowRotationSpeedR(i,this.angleOfPoints(t,e,n,r),s)},n.getFollowRotationSpeedR=function(t,e,i){e=(e-t)%this.PI2;return.001<e||e<-.001?(e>Math.PI?e-=this.PI2:e<-Math.PI&&(e+=this.PI2),e*i):0},n.PI2=2*Math.PI,n.PI05=Math.PI/2,n.PI025=Math.PI/4,n.degToRad=Math.PI/180,n.radToDeg=180/Math.PI,e.Tools=n},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.Block=void 0,i(13)),a=i(7),i=(r=o.Entity,s(h,r),h.prototype.update=function(){},h.prototype.landOn=function(t){this.landed=t},h.prototype.applyForce=function(t,e){},h.prototype.levelStart=function(){},h.prototype.destroy=function(){this.topPolygon=null,this.bottomPolygon=null,this.leftPolygon=null,this.rightPolygon=null,this.lhPolygon=null,this.rhPolygon=null,this.totalPolygon=null,this.layer=null,this.landed=null,r.prototype.destroy.call(this)},h.prototype.resetLevel=function(){this.landed=null},h.prototype.reset=function(){this.landed=null},h.prototype.init=function(t,e,i,n){this.xPos=t,this.yPos=e,this.prevX=t,this.prevY=e,this.startX=t,this.startY=e,this.width=i,this.height=n,this.xVelocity=0,this.yVelocity=0,this.landed=null,this.alive=!0,this.halfWidth=.5*this.width,this.halfHeight=.5*this.height,this.initEdges(),this.initBounds(),this.initOffsets()},h.prototype.initEdges=function(){this.leftEdge=this.xPos-this.halfWidth,this.rightEdge=this.xPos+this.halfWidth,this.topEdge=this.yPos-this.halfHeight,this.bottomEdge=this.yPos+this.halfHeight},h.prototype.initBounds=function(){this.lhPolygon=this.getPolygon(h.TOP_BOUND_WIDTH,h.TOP_BOUND_HEIGHT),this.rhPolygon=this.getPolygon(h.TOP_BOUND_WIDTH,h.TOP_BOUND_HEIGHT),this.totalPolygon=this.getPolygon(this.width,this.height),this.leftPolygon=this.getPolygon(h.TOP_BOUND_WIDTH,this.height),this.rightPolygon=this.getPolygon(h.TOP_BOUND_WIDTH,this.height),this.topPolygon=this.getPolygon(this.width,h.TOP_BOUND_HEIGHT),this.bottomPolygon=this.getPolygon(this.width,h.TOP_BOUND_HEIGHT)},h.prototype.getPolygon=function(t,e){return a.Helpers.getPolygon(this.xPos,this.yPos,t,e)},h.prototype.initOffsets=function(){this.lhPolygon.setOffset(new SAT.Vector(-this.halfWidth,-this.halfHeight)),this.rhPolygon.setOffset(new SAT.Vector(this.halfWidth-h.TOP_BOUND_WIDTH,-this.halfHeight)),this.totalPolygon.setOffset(new SAT.Vector(-this.halfWidth,-this.halfHeight)),this.leftPolygon.setOffset(new SAT.Vector(-this.halfWidth,-this.halfHeight)),this.rightPolygon.setOffset(new SAT.Vector(this.halfWidth-h.TOP_BOUND_WIDTH,-this.halfHeight)),this.topPolygon.setOffset(new SAT.Vector(-this.halfWidth,-this.halfHeight)),this.bottomPolygon.setOffset(new SAT.Vector(-this.halfWidth,this.halfHeight-h.TOP_BOUND_HEIGHT))},h.prototype.updatePosition=function(){this.initEdges(),this.totalPolygon.pos.x=this.xPos,this.totalPolygon.pos.y=this.yPos,this.topPolygon.pos.x=this.xPos,this.topPolygon.pos.y=this.yPos,this.lhPolygon.pos.x=this.xPos,this.lhPolygon.pos.y=this.yPos,this.rhPolygon.pos.x=this.xPos,this.rhPolygon.pos.y=this.yPos,this.leftPolygon.pos.x=this.xPos,this.leftPolygon.pos.y=this.yPos,this.rightPolygon.pos.x=this.xPos,this.rightPolygon.pos.y=this.yPos,this.bottomPolygon.pos.x=this.xPos,this.bottomPolygon.pos.y=this.yPos,this.updateGraphicPosition()},h.prototype.updateGraphicPosition=function(){},h.prototype.destroySelf=function(){this.main.removeBlockFrom(this.main.blocks,this),r.prototype.destroySelf.call(this)},h.prototype.drawTestBounds=function(){this.clearDebugGraphics(),this.drawDebugPolyLine(this.totalPolygon,16711680,1),this.drawDebugPoly(this.leftPolygon,16711680),this.drawDebugPoly(this.leftPolygon,16711680),this.drawDebugPoly(this.rightPolygon,65280),this.drawDebugPoly(this.topPolygon,255),this.drawDebugPoly(this.bottomPolygon,16711935)},h.TOP_BOUND_WIDTH=10,h.TOP_BOUND_HEIGHT=10,h);function h(t,e){t=r.call(this,t)||this;return t.scalable=!0,t.hangable=!0,t.layer=e,t}e.Block=i},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ButtonContainerFrame=e.ButtonFrame=e.ButtonScaleImage=e.ButtonImage=e.ButtonScale=e.ButtonContainer=e.BaseButton=void 0;var n=i(42),r=(Object.defineProperty(e,"BaseButton",{enumerable:!0,get:function(){return n.BaseButton}}),i(43)),s=(Object.defineProperty(e,"ButtonContainer",{enumerable:!0,get:function(){return r.ButtonContainer}}),i(115)),o=(Object.defineProperty(e,"ButtonScale",{enumerable:!0,get:function(){return s.ButtonScale}}),i(44)),a=(Object.defineProperty(e,"ButtonImage",{enumerable:!0,get:function(){return o.ButtonImage}}),i(116)),h=(Object.defineProperty(e,"ButtonScaleImage",{enumerable:!0,get:function(){return a.ButtonScaleImage}}),i(117)),l=(Object.defineProperty(e,"ButtonFrame",{enumerable:!0,get:function(){return h.ButtonFrame}}),i(118));Object.defineProperty(e,"ButtonContainerFrame",{enumerable:!0,get:function(){return l.ButtonContainerFrame}})},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Helpers=void 0;var n=i(4),r=i(16),s=i(8);function o(){}o.timeDecorator=function(t){var e=Math.floor(t/100%10),i=e.toString(),e=(e<10&&(i="0"+e),Math.floor(t/1e3%60)),n=e.toString(),e=(e<10&&(n="0"+n),Math.floor(t/1e3/60%60)),t=e.toString();return"".concat(t=e<10?"0"+t:t,":").concat(n,":").concat(i)},o.timeDecoratorHub=function(t){var e=Math.floor(t/1e3%60),i=e.toString(),e=(e<10&&(i="0"+i),Math.floor(t/1e3/60%60)),n=e.toString(),e=(e<10&&(n="0"+n),Math.floor(t/1e3/60/60|0)),t=e.toString();return"".concat(t=e<10?"0"+t:t,":").concat(n,":").concat(i)},o.timeDecoratorActBlock=function(t){var e=Math.floor(t/1e3%60),i=e.toString(),e=(e<10&&(i="0"+i),Math.floor(t/1e3/60%60)),t=e.toString();return"".concat(t=e<10?"0"+t:t,":").concat(i)},o.moneyDecorator=function(t){return t<1e3?""+t:t.toString().replace(/\B(?=(\d{3})+(?!\d))/g,".")},o.getDeathText=function(t){var e=1;return t===s.DeathType.spike||t===s.DeathType.hardLanding||t===s.DeathType.quadrant||t===s.DeathType.dead_15?e=2:t===s.DeathType.buzzsaw||t===s.DeathType.squashed||t===s.DeathType.drowned||t===s.DeathType.fall||t===s.DeathType.dead_7||t===s.DeathType.shurikan||t===s.DeathType.sparkElectric||t===s.DeathType.poolElectric||t===s.DeathType.dead_13||t===s.DeathType.laser?e=3:t===s.DeathType.noEntry?e=1:t===s.DeathType.reaper&&(e=4),"death"+t+"_"+n.Tools.random(1,e)},o.formatNumberZeroLess10=function(t){return t<10?"0"+t:""+t},o.getLevelTargetText=function(t,e){return 1===t?r.Localization.getText("lvlTarget1"):2===t?r.Localization.getText("lvlTarget2").replace("<x>",""+e):3===t?e<=1?r.Localization.getText("lvlTarget3"):r.Localization.getText("lvlTarget3less").replace("<x>",""+e):void 0},o.getPolygon=function(t,e,i,n){return new SAT.Polygon(new SAT.Vector(t,e),[new SAT.Vector(0,0),new SAT.Vector(i,0),new SAT.Vector(i,n),new SAT.Vector(0,n)])},o.getPolygonOffset=function(t,e,i,n,r,s){t=this.getPolygon(t,e,i,n);return t.setOffset(new SAT.Vector(r,s)),t},o.isAnHour=function(t){return!!t&&1<=Math.floor(t/1e3/60/60)},e.Helpers=o},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.PlayerBase=e.DeathType=e.PlayerState=e.FacingDir=void 0;function s(t,e,i,n){this.xOff=t,this.yOff=e,this.width=i,this.height=n}var o,a,h,l,c=i(13),u=i(0),d=i(1),p=i(3),f=i(7),g=i(19),m=i(58),y=i(59),v=i(60),x=i(61),i=((i=o=o||{})[i.Head=0]="Head",i[i.Body=1]="Body",i[i.Hands=2]="Hands",i[i.Feet=3]="Feet",(i=a=e.FacingDir||(e.FacingDir={}))[i.Left=0]="Left",i[i.Right=1]="Right",(i=h=e.PlayerState||(e.PlayerState={}))[i.Finish=0]="Finish",i[i.Stand=1]="Stand",i[i.Running=2]="Running",i[i.Jumping=3]="Jumping",i[i.Falling=4]="Falling",i[i.Sliding=5]="Sliding",i[i.Crouching=6]="Crouching",i[i.Scaling=7]="Scaling",i[i.Hanging=8]="Hanging",i[i.Zipping=9]="Zipping",i[i.Swinging=10]="Swinging",i[i.Pushing=11]="Pushing",i[i.Kicking=12]="Kicking",i[i.Spawning=13]="Spawning",i[i.Swimming=14]="Swimming",i[i.JumpDown=15]="JumpDown",i[i.JumpFrontFlip=16]="JumpFrontFlip",i[i.JumpBackFlip=17]="JumpBackFlip",i[i.Land=18]="Land",i[i.SwimmingStand=19]="SwimmingStand",i[i.Climb=20]="Climb",i[i.Kite=21]="Kite",i[i.Grapple=22]="Grapple",i[i.Attack=23]="Attack",(i=e.DeathType||(e.DeathType={})).spike="0",i.hardLanding="1",i.buzzsaw="2",i.squashed="3",i.drowned="4",i.fall="5",i.noEntry="6",i.dead_7="7",i.reaper="8",i.shurikan="9",i.quadrant="10",i.sparkElectric="11",i.poolElectric="12",i.dead_13="13",i.laser="14",i.dead_15="15",l=c.Entity,r(b,l),b.prototype.addToNewLayer=function(t){var e=this.container.parentContainer;e!==t&&(e&&(t.remove(this.grappleRope),t.remove(this.container),t.remove(this.attackWindGust)),t.add(this.grappleRope),t.add(this.container),t.add(this.attackWindGust))},b.prototype.addStateInfo=function(t,e,i,n,r){var s={};s[o.Head]=e,s[o.Body]=i,s[o.Hands]=n,s[o.Feet]=r,this.makeTotalBounds(s),this.stateInfos[t]=s},b.prototype.createStateInfos=function(){this.stateInfos={},this.addStateInfo(h.Stand,new s(-4,-33,8,10),new s(-6,-24,12,17),new s(1,-20,8,10),new s(-7,-6,13,10)),this.addStateInfo(h.Running,new s(-4,-33,8,10),new s(-12,-30,24,27),new s(1,-20,8,10),new s(-7,-6,13,10)),this.addStateInfo(h.Jumping,new s(-4,-33,8,17),new s(-5,-23,12,17),new s(4,-35,8,16),new s(-6,-6,8,9)),this.addStateInfo(h.Sliding,new s(-16,-10,8,7),new s(-13,-12,18,10),new s(0,-12,8,10),new s(-7,-6,13,10)),this.addStateInfo(h.Crouching,new s(-4,-19,8,10),new s(-5,-11,12,10),new s(0,-15,8,10),new s(-7,-6,13,10)),this.addStateInfo(h.Scaling,new s(-4,-33,8,10),new s(-6,-24,15,17),new s(4,-37,8,20),new s(-6,-7,7,6)),this.addStateInfo(h.Zipping,new s(-4,-33,8,10),new s(-4.8,-23,12,17),new s(-1,-36,8,10),new s(-7,-6,13,9)),this.addStateInfo(h.Swinging,new s(-4,-33,8,17),new s(-4.8,-23,12,17),new s(-1,-36,8,10),new s(-7,-6,13,9)),this.addStateInfo(h.Pushing,new s(-4,-33,8,17),new s(-4.8,-23,12,17),new s(-2,-26,8,10),new s(-7,-6,13,9)),this.addStateInfo(h.Swimming,new s(-4,-18,8,10),new s(-6,-9,12,17),new s(1,-5,8,10),new s(-7,9,13,10)),this.stateInfos[h.Hanging]=this.stateInfos[h.Scaling],this.stateInfos[h.SwimmingStand]=this.stateInfos[h.Swimming],this.stateInfos[h.JumpDown]=this.stateInfos[h.Jumping],this.stateInfos[h.Falling]=this.stateInfos[h.Jumping],this.stateInfos[h.Kite]=this.stateInfos[h.Jumping],this.stateInfos[h.Climb]=this.stateInfos[h.Jumping],this.stateInfos[h.Grapple]=this.stateInfos[h.Jumping],this.stateInfos[h.Spawning]=this.stateInfos[h.Stand],this.stateInfos[h.Kicking]=this.stateInfos[h.Stand],this.stateInfos[h.Land]=this.stateInfos[h.Stand],this.stateInfos[h.Attack]=this.stateInfos[h.Stand]},b.prototype.makeTotalBounds=function(t){t.leftEdgeOff=Math.min(t[o.Hands].xOff,t[o.Feet].xOff,t[o.Head].xOff,t[o.Body].xOff),t.topEdgeOff=Math.min(t[o.Hands].yOff,t[o.Feet].yOff,t[o.Head].yOff,t[o.Body].yOff),t.rightEdgeOff=Math.max(t[o.Hands].xOff+t[o.Hands].width,t[o.Feet].xOff+t[o.Feet].width,t[o.Head].xOff+t[o.Head].width,t[o.Body].xOff+t[o.Body].width),t.bottomEdgeOff=Math.max(t[o.Hands].yOff+t[o.Hands].height,t[o.Feet].yOff+t[o.Feet].height,t[o.Head].yOff+t[o.Head].height,t[o.Body].yOff+t[o.Body].height)},b.prototype.setStateInfos=function(){this.headInfo=this.stateInfos[this.state][o.Head],this.bodyInfo=this.stateInfos[this.state][o.Body],this.handsInfo=this.stateInfos[this.state][o.Hands],this.feetInfo=this.stateInfos[this.state][o.Feet]},b.prototype.setPolygon=function(t,e,i,n,r){t.points[0].x=0,t.points[0].y=0,t.points[1].x=e,t.points[1].y=0,t.points[2].x=e,t.points[2].y=i,t.points[3].x=0,t.points[3].y=i,t.offset.x=n,t.offset.y=r},b.prototype.resetHitBoxes=function(){var t,e,i,n=this.facing===a.Right?(t=this.headInfo.xOff,e=this.handsInfo.xOff,i=this.bodyInfo.xOff,this.feetInfo.xOff):(t=-this.headInfo.xOff-this.headInfo.width,e=-this.handsInfo.xOff-this.handsInfo.width,i=-this.bodyInfo.xOff-this.bodyInfo.width,-this.feetInfo.xOff-this.feetInfo.width);this.setPolygon(this.headPolygon,this.headInfo.width,this.headInfo.height,t,this.headInfo.yOff),this.setPolygon(this.handsPolygon,this.handsInfo.width,this.handsInfo.height,e,this.handsInfo.yOff),this.setPolygon(this.feetPolygon,this.feetInfo.width,this.feetInfo.height,n,this.feetInfo.yOff),this.setPolygon(this.bodyPolygon,this.bodyInfo.width,this.bodyInfo.height,i,this.bodyInfo.yOff),this.width=this.stateInfos[this.state].rightEdgeOff-this.stateInfos[this.state].leftEdgeOff,this.height=this.stateInfos[this.state].bottomEdgeOff-this.stateInfos[this.state].topEdgeOff,this.halfWidth=this.width/2,this.halfHeight=this.height/2,this.setPolygon(this.totalPolygon,this.width,this.height,this.stateInfos[this.state].leftEdgeOff,this.stateInfos[this.state].topEdgeOff),this.updateHitBoxesPos()},b.prototype.onAnimationComplete=function(){},b.prototype.faceLeft=function(){this.facing!==a.Left&&(this.facing=a.Left,0<this.spine.scaleX&&(this.spine.scaleX*=-1),this.resetHitBoxes())},b.prototype.faceRight=function(){this.facing!==a.Right&&(this.facing=a.Right,this.spine.scaleX<0&&(this.spine.scaleX*=-1),this.resetHitBoxes())},b.prototype.setSpineOffX=function(t){this.spine.x=t},b.prototype.setSpineOffY=function(t){this.spine.y=t},b.prototype.setSkin=function(t){this.spine.setSkin(f.Helpers.formatNumberZeroLess10(t))},b.prototype.updateHitBoxesPos=function(){this.headPolygon.pos.x=this.xPos,this.headPolygon.pos.y=this.yPos,this.bodyPolygon.pos.x=this.xPos,this.bodyPolygon.pos.y=this.yPos,this.handsPolygon.pos.x=this.xPos,this.handsPolygon.pos.y=this.yPos,this.feetPolygon.pos.x=this.xPos,this.feetPolygon.pos.y=this.yPos,this.totalPolygon.pos.x=this.xPos,this.totalPolygon.pos.y=this.yPos;var t=this.currentSlope?this.hitBoxForSlope:this.rPos;this.headPolygon.setAngle(t),this.bodyPolygon.setAngle(t),this.handsPolygon.setAngle(t),this.feetPolygon.setAngle(t),this.totalPolygon.setAngle(t)},b.prototype.setDirTo=function(t){this.facing===a.Left&&t>this.xPos?this.faceRight():this.facing===a.Right&&t<this.xPos&&this.faceLeft()},b.prototype.setDirToVel=function(){this.facing===a.Left&&0<this.xVelocity?this.faceRight():this.facing===a.Right&&this.xVelocity<0&&this.faceLeft()},b.prototype.setPosition=function(t,e){this.xPos=t,this.yPos=e,this.xVelocity=0,this.yVelocity=0,this.forcedXVelocity=0,this.rPos=0,this.rPosDest=0},b.prototype.canCameraLookAround=function(){return!1!==this.container.visible&&(this.state===h.Stand||this.state===h.Swimming||this.state===h.Hanging||this.state===h.Climb||this.state===h.Land)},b.prototype.hide=function(){this.hideSprite(),this.container.visible=!1,this.alive=!1,this.appearText.hide(),this.attackWindGust.stop()},b.prototype.updatePositions=function(){this.container.x=this.xPos,this.container.y=this.yPos,this.container.rotation=this.rPos,this.updateHitBoxesPos()},b.prototype.hideSprite=function(t){},b.prototype.landActiveBlock=function(t,e){!1!==e&&("dailyTask"===t.type?this.main.showPanelDailyTask():"dailyStage"===t.type?(this.main.playerEnterTowerBlock=!0,this.main.showSubSceneTransition(g.SubSceneList.Tower)):"play"===t.type?this.main.showSubSceneTransition(g.SubSceneList.Hub):"skins"===t.type?this.main.showSubSceneTransition(g.SubSceneList.SkinsRarity,t.id):"throphie"===t.type?this.main.showPanelTrophies():"gate"===t.type?t.open():!1!==t.hardEnabled&&(t.levelNum===Number(p.BalanceData.vexID)?this.main.showSubSceneTransition(g.SubSceneList.Vex,t.levelNum,t.isHard):this.main.showSubSceneTransition(g.SubSceneList.Act,t.levelNum,t.isHard)))},b.prototype.addShield=function(){this.shield=new Phaser.GameObjects.Image(this.main,0,-18,u.Atlases.gameplay,"shield 10000"),this.container.add(this.shield),this.shieldCounter=-1,this.isShield=!0},b.prototype.update=function(){!0===this.showPressDown?(!1===this.appearText.alive&&this.appearText.show(this.xPos,this.yPos-70,"pressDownEnter"),this.main.zoomTo(this.main.zoomAct)):(!0===this.appearText.isPressDown()&&this.appearText.hide(),this.main.zoomTo(this.main.zoomDefault)),this.appearText.update(),this.shield&&0<=this.shieldCounter&&(18<this.shieldCounter?(this.shield.scale-=.05,this.shield.scaleX<=0&&(this.shield.destroy(),this.shield=null,this.isShield=!1)):(this.shieldCounter+=.15,this.shield.scale=.8+.2*(.5+.5*Math.cos(this.shieldCounter)))),this.attackWindGust.update()},b.prototype.checkAttackPolyCollision=function(t){return!0===this.attackWindGust.visible&&!0===SAT.testPolygonPolygon(t,this.attackWindGust.poly)},b.prototype.showGrappleTarget=function(t,e){!1===t?this.state!==h.Grapple&&(e.onContact(!1,0),this.grapplePoint=null):(this.grapplePoint&&this.grapplePoint.onContact(!1,0),e.onContact(!0,1),this.grapplePoint=e)},Object.defineProperty(b.prototype,"scaleX",{get:function(){return this.spine.scaleX},enumerable:!1,configurable:!0}),b.prototype.pause=function(){this.spine.pause(),!0===p.SoundManager.isPlaying("ziplineFull",!0)&&p.SoundManager.pause("ziplineFull",!0),!0===p.SoundManager.isPlaying("kite",!0)&&p.SoundManager.pause("kite",!0)},b.prototype.resume=function(){!0===p.SoundManager.isPaused("ziplineFull",!0)&&p.SoundManager.resume("ziplineFull",!0),!0===p.SoundManager.isPaused("kite",!0)&&p.SoundManager.resume("kite",!0),this.spine.resume(),this.keys.resetKeys()},b);function b(t){var e=l.call(this,t)||this,i=(e.showPressDown=!1,e.isShield=!1,e.keys=t.keys,e.appearText=new x.AppearingText(t,t.cameraGroup),e.container=new Phaser.GameObjects.Container(t),e.container.visible=!1,e.poleRedSection=new Phaser.GameObjects.Image(t,0,0,u.Atlases.gameplay,"poleRedSection 10000"),e.poleRedSection.setOrigin(0,.5),e.poleRedSection.alpha=0,t.layerTopObstacle.add(e.poleRedSection),e.grappleRope=new Phaser.GameObjects.Image(t,0,0,u.Atlases.gameplay,"whiteLine 10000"),e.grappleRope.setOrigin(0,.5),e.grappleRope.tint=3903231,e.grappleRope.visible=!1,e.breatheGroup=new m.PlayerBreatheBar(t),e.container.add(e.breatheGroup),e.spine=new d.JDSpineGameObject(e.main,0,0,"player"),e.setSkin(p.BalanceData.currSkin),e.spine.getView());return i.on(d.JDSpineGameObject.EVENT_COMPLETE,e.onAnimationComplete,e),e.container.add(i),e.spineHeight=i.height,e.jumpPotion=new v.PlayerJumpPotion(t),e.container.add(e.jumpPotion),e.attackWindGust=new y.PlayerWindGust(t,0,0),e.createStateInfos(),e.headPolygon=new SAT.Polygon(new SAT.Vector(0,0),[new SAT.Vector(0,0),new SAT.Vector(0,0),new SAT.Vector(0,0),new SAT.Vector(0,0)]),e.handsPolygon=new SAT.Polygon(new SAT.Vector(0,0),[new SAT.Vector(0,0),new SAT.Vector(0,0),new SAT.Vector(0,0),new SAT.Vector(0,0)]),e.feetPolygon=new SAT.Polygon(new SAT.Vector(0,0),[new SAT.Vector(0,0),new SAT.Vector(0,0),new SAT.Vector(0,0),new SAT.Vector(0,0)]),e.bodyPolygon=new SAT.Polygon(new SAT.Vector(0,0),[new SAT.Vector(0,0),new SAT.Vector(0,0),new SAT.Vector(0,0),new SAT.Vector(0,0)]),e.totalPolygon=new SAT.Polygon(new SAT.Vector(0,0),[new SAT.Vector(0,0),new SAT.Vector(0,0),new SAT.Vector(0,0),new SAT.Vector(0,0)]),e}e.PlayerBase=i},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AzerionSDK=void 0;var s=i(0),o=i(87);function n(){}n.init=function(t,e,i){void 0===i&&(i=!0),this.game=t,this.loader=document.getElementById("loader"),!0===i&&(window.addEventListener("keydown",function(t){t.preventDefault()}),window.addEventListener("keyup",function(t){t.preventDefault()})),window._azerionIntegration.sa&&window._azerionIntegration.sa&&(h5branding.Utils.ASSET_LOCATION="assets/"),h5branding.SplashLoader.getInstance({gameId:s.Constants.GAME_DISTRIBUTION_ID,gameName:s.Constants.GAME_TITLE,gameTitle:s.Constants.GAME_SPLASH_TITLE,libs:libs,version:version}).create().then(function(){azAdWrapper=new window.h5ads.AdWrapper(window._azerionIntegration.advType,s.Constants.GAME_DISTRIBUTION_ID),o.PauseHandler.getInstance(t),e()}).catch(function(t){})},n.onLoadProgress=function(t){h5branding.SplashLoader.getInstance().setLoadProgress(t)},n.removeSplashLoader=function(t){var e=this;this.onLoadProgress(100),h5branding.SplashLoader.getInstance().setButtonCallback(function(){h5branding.SplashLoader.getInstance().destroy(),h5branding.Utils.inGDGameZone()?(e.loaderHide(),t()):e.showAD("splash",t)})},n.analyticsSendEvent=function(t){window.gdsdk.sendEvent({eventName:"track-milestone",data:{milestoneDescription:t}})},n.showAD=function(t,e,i,n){var r=this;this.loaderShow(),!1===s.Constants.IS_AD_AVAILABLE?(this.loaderHide(),e&&e.call(this)):(azAdWrapper.once(h5ads.AdEvents.CONTENT_PAUSED,function(){r.loaderHide(),i&&i.call(r),r.adPlaying=!0,r.game.events.emit(Phaser.Core.Events.PAUSE),o.PauseHandler.getInstance().pause()}),azAdWrapper.once(h5ads.AdEvents.CONTENT_RESUMED,function(){window.focus(),r.loaderHide(),e&&e.call(r),azAdWrapper.removeAllListeners(h5ads.AdEvents.CONTENT_PAUSED),azAdWrapper.removeAllListeners(h5ads.AdEvents.CONTENT_RESUMED),r.adPlaying=!1,r.game.events.emit(Phaser.Core.Events.RESUME),o.PauseHandler.getInstance().resume()}),azAdWrapper.showAd(h5ads.AdType.interstitial))},n.showADRewarded=function(t,e){var i,n=this;void 0===e&&(e=null),this.loaderShow(),!1===s.Constants.IS_AD_AVAILABLE?(this.loaderHide(),t&&t(!0)):(i=!1,azAdWrapper.once(h5ads.AdEvents.CONTENT_PAUSED,function(){n.loaderHide(),n.analyticsSendEvent("button_clicked_rewardedVideo"),n.adPlaying=!0,n.game.events.emit(Phaser.Core.Events.PAUSE),o.PauseHandler.getInstance().pause(),e&&e()}),azAdWrapper.once(h5ads.AdEvents.CONTENT_RESUMED,function(){window.focus(),n.game.events.emit(Phaser.Core.Events.RESUME),o.PauseHandler.getInstance().resume(),n.adPlaying=!1,n.loaderHide(),t&&t(i),azAdWrapper.removeAllListeners(h5ads.AdEvents.CONTENT_PAUSED),azAdWrapper.removeAllListeners(h5ads.AdEvents.CONTENT_RESUMED),azAdWrapper.removeAllListeners(h5ads.AdEvents.AD_REWARDED),azAdWrapper.preloadAd(h5ads.AdType.rewarded)}),azAdWrapper.addListener(h5ads.AdEvents.AD_REWARDED,function(){i=!0}),azAdWrapper.showAd(h5ads.AdType.rewarded))},n.isAdPlaying=function(){return this.adPlaying},n.loaderShow=function(){this.loader&&(this.loader.style.display="block")},n.loaderHide=function(){this.loader&&(this.loader.style.display="none")},n.adPlaying=!1,e.AzerionSDK=n},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.JDTextFit=e.JDTextFitParam=void 0;var h,l,c=i(37),i=((i=h=e.JDTextFitParam||(e.JDTextFitParam={}))[i.size=0]="size",i[i.wordWrap=1]="wordWrap",i[i.both=2]="both",l=c.JDText,r(s,l),s.prototype.setText=function(t){return l.prototype.setText.call(this,t),(this.maxWidth||this.maxHeight)&&this.calcFitSize(),this},s.prototype.setFitSize=function(t,e,i){void 0===e&&(e=h.size),void 0===i&&(i=0),this.maxWidth=t,this.maxHeight=i,this.fitParam=e,this.maxWidth<=0?this.style.setFontSize(this.fontSize):this.calcFitSize()},s.prototype.calcFitSize=function(){var t=this.fontSize;if(this.style.setFontSize(t),this.fitParam!==h.wordWrap)for(this.fitParam===h.both&&l.prototype.setText.call(this,this.customBasicWordWrap(this.text,this.context,this.maxWidth));this.width>this.maxWidth||0<this.maxHeight&&this.height>this.maxHeight;)this.style.setFontSize(--t);else l.prototype.setText.call(this,this.customBasicWordWrap(this.text,this.context,this.maxWidth))},s.prototype.customBasicWordWrap=function(t,e,i){for(var n="",r=t.split(this.splitRegExp),s=r.length-1,o=e.measureText(" ").width,a=0;a<=s;a++){for(var h=i,l=r[a].split(" "),c=l.length-1,u=0;u<=c;u++){var d=l[u],p=e.measureText(d).width,f=p;u<c&&(f+=o),h<f&&0<u&&(n=n.slice(0,-1),n+="\n",h=i),n+=d,u<c?(n+=" ",h-=f):h-=p}a<s&&(n+="\n")}return n},s);function s(t,e,i,n,r,s,o,a){void 0===a&&(a=c.JDTextAlign.center);t=l.call(this,t,e,i,n,r,s,o=void 0===o?"#ffffff":o,a)||this;return t.fontSize=s,t.fitParam=h.size,t}e.JDTextFit=i},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SoundManager=e.SoundType=void 0;var n,s=i(2),o=i(17),i=((i=n=e.SoundType||(e.SoundType={})).Music="mus",i.SFX="sfx",r.init=function(t){this.soundManager=t.sound,!0===this.soundManager.locked&&this.soundManager.context&&this.soundManager.context.suspend()},r.getSound=function(t){return void 0===this.sfxInstances[t]&&(this.sfxInstances[t]=this.soundManager.add(t)),this.sfxInstances[t]},r.getSfxLoop=function(t){return void 0===this.sfxLoopInstances[t]&&(this.sfxLoopInstances[t]=this.soundManager.add(t)),this.sfxLoopInstances[t]},r.getSoundCheck=function(t,e){return!1===e?this.getSound(t):this.getSfxLoop(t)},r.isPlaying=function(t,e){return this.getSoundCheck(t,e).isPlaying},r.isPaused=function(t,e){return this.getSoundCheck(t,e).isPaused},r.pause=function(t,e){this.getSoundCheck(t,e).pause()},r.resume=function(t,e){this.getSoundCheck(t,e).resume()},r.playMusic=function(t){this.music?!1===s.BalanceData.mutedMusic?this.music.key===t?!1===this.music.isPlaying&&this.music.play(void 0,{volume:1,loop:!0}):(this.music.stop(),this.music=this.getSound(t),this.music.play(void 0,{volume:1,loop:!0})):this.music.volume=1:(this.music=this.getSound(t),!1===s.BalanceData.mutedMusic&&this.music.play(void 0,{volume:1,loop:!0}))},r.stopMusic=function(){this.music&&this.music.stop()},r.playSFX=function(t,e,i){void 0===e&&(e=1),void 0===i&&(i=!1),!0!==s.BalanceData.mutedSfx?!0===i?this.getSfxLoop(t).play(void 0,{volume:e,loop:!0}):this.getSound(t).play(void 0,{volume:e}):!0===i&&this.getSfxLoop(t)},r.stopSFX=function(t){void 0!==this.sfxInstances[t]&&this.sfxInstances[t].stop()},r.stopSFXLoop=function(t){void 0!==this.sfxLoopInstances[t]&&this.sfxLoopInstances[t].stop()},r.stopAllSFXLoop=function(){for(var t=0,e=Object.keys(this.sfxLoopInstances);t<e.length;t++){var i=e[t];this.sfxLoopInstances[i].stop()}},r.changeEnabledMusic=function(){!1===s.BalanceData.mutedMusic?null!==this.music&&this.music.pause():null!==this.music&&(!0===this.music.isPaused?this.music.resume():this.music.play(void 0)),s.BalanceData.mutedMusic=!s.BalanceData.mutedMusic,o.SaveGame.getInstance().saveProgress()},r.changeEnabledSFX=function(){if(!1===s.BalanceData.mutedSfx)for(var t=0,e=Object.keys(this.sfxLoopInstances);t<e.length;t++){var i=e[t];!0===this.sfxLoopInstances[i].isPlaying&&this.sfxLoopInstances[i].pause()}else for(var n=0,r=Object.keys(this.sfxLoopInstances);n<r.length;n++)i=r[n],!0===this.sfxLoopInstances[i].isPaused&&this.sfxLoopInstances[i].resume();s.BalanceData.mutedSfx=!s.BalanceData.mutedSfx,o.SaveGame.getInstance().saveProgress()},r.setEnabled=function(t){t===n.Music?this.changeEnabledMusic():this.changeEnabledSFX()},r.music=null,r.sfxLoopInstances={},r.sfxInstances={},r);function r(){}e.SoundManager=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),i=(Object.defineProperty(e,"__esModule",{value:!0}),e.Item=void 0,r=i(13).Entity,s(o,r),o.prototype.destroySelf=function(){this.main.removeBlockFrom(this.main.items,this),r.prototype.destroySelf.call(this)},o.prototype.levelStart=function(){},o);function o(){return null!==r&&r.apply(this,arguments)||this}e.Item=i},function(t,e,i){"use strict";function n(t){this.alive=!1,this.main=t}Object.defineProperty(e,"__esModule",{value:!0}),e.Entity=void 0,n.prototype.update=function(){},n.prototype.reset=function(){},n.prototype.resetLevel=function(){void 0!==this.startX&&void 0!==this.startY&&(this.xPos=this.startX,this.yPos=this.startY)},n.prototype.levelStart=function(){},n.prototype.destroy=function(){this.main=null,this.boundsGraphic&&this.boundsGraphic.destroy()},n.prototype.destroySelf=function(){this.destroy()},n.prototype.clearDebugGraphics=function(){this.boundsGraphic||(this.boundsGraphic=new Phaser.GameObjects.Graphics(this.main),this.main.cameraGroup.add(this.boundsGraphic)),this.boundsGraphic.clear()},n.prototype.drawDebugPoly=function(t,e,i){this.boundsGraphic.fillStyle(e,i=void 0===i?.3:i),this.boundsGraphic.beginPath();for(var n=t.pos.x,r=t.pos.y,s=t.offset.x,o=t.offset.y,a=0;a<t.points.length;a++){var h=t.points[a];0===a?this.boundsGraphic.moveTo(n+h.x+s,r+h.y+o):this.boundsGraphic.lineTo(n+h.x+s,r+h.y+o)}this.boundsGraphic.fillPath()},n.prototype.drawDebugPolyLine=function(t,e,i){this.boundsGraphic.lineStyle(2,e,i=void 0===i?.3:i),this.boundsGraphic.beginPath();for(var n=t.pos.x,r=t.pos.y,s=t.offset.x,o=t.offset.y,a=0;a<t.points.length;a++){var h=t.points[a];0===a?this.boundsGraphic.moveTo(n+h.x+s,r+h.y+o):this.boundsGraphic.lineTo(n+h.x+s,r+h.y+o)}this.boundsGraphic.closePath(),this.boundsGraphic.strokePath()},e.Entity=n},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),i=(Object.defineProperty(e,"__esModule",{value:!0}),e.Obstacle=void 0,r=i(13).Entity,s(o,r),o.prototype.destroySelf=function(){this.main.removeBlockFrom(this.main.obstacles,this),r.prototype.destroySelf.call(this)},o.prototype.destroy=function(){r.prototype.destroy.call(this),this.layer=null},o.prototype.levelStart=function(){},o.prototype.update=function(){},o.prototype.updatePosition=function(){},o);function o(t,e){t=r.call(this,t)||this;return t.layer=e,t}e.Obstacle=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.BasicPanel=void 0,i(3)),h=i(0),l=i(6),c=i(1),u=i(9),i=(r=Phaser.GameObjects.Container,s(a,r),a.prototype.init=function(t){},a.prototype.clikcOnBlack=function(){this.scene.panelManager.hideCurrent()},a.prototype.show=function(){this.visible=!0},a.prototype.hide=function(){this.visible=!1},a.prototype.resize=function(){this.scale=h.Constants.UI_ADDITIONAL_PANELS_SCALE},a.prototype.update=function(){},a.prototype.custom=function(t){},a.prototype.destroy=function(){r.prototype.destroy.call(this),this.scene=null,this.txtTitle=null},a.prototype.addBg=function(t,e,i,n){t=new Phaser.GameObjects.Image(this.scene,t,e,o.TexturesEdit.getPanelBgTexture(this.scene,i,n));return this.add(t),t},a.prototype.addBgTitle=function(t,e,i,n){t=new Phaser.GameObjects.Image(this.scene,t,e,h.Atlases.gameplay,"whiteBlock 10000");return t.setTint(4950515,180474,4950515,180474),t.setDisplaySize(i-14,n),this.add(t),t},a.prototype.addBgTitleBtn=function(t,e,i,n,r){var s=this,o=(void 0===n&&(n=!0),void 0===r&&(r=null),t/2),a=e/2,e=(this.addBg(0,0,t,e).setInteractive(),40-a+7);this.addBgTitle(0,e,t,80),this.txtTitle=new c.JDBmpdTextTranslated(this.scene,0,e-3,h.Fonts.Main,i,58),this.txtTitle.setFitSize(t-100),this.add(this.txtTitle),!0===n&&((e=new l.ButtonScaleImage(this.scene,o-15,15-a,h.Atlases.ui,"btnX 10000")).onUp=r?function(){return u.AzerionSDK.showAD(r,function(){return s.clikcOnBlack()})}:function(){return s.clikcOnBlack()},this.add(e.getView()))},a);function a(t){return r.call(this,t,h.Constants.GHW,h.Constants.GHH)||this}e.BasicPanel=i},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Localization=void 0;var n=i(0),r=i(2),s=i(17);function o(){}o.load=function(){this.language&&!1!==n.Constants.SHOW_PANEL_LANGUAGE||(this.language=(navigator.language||navigator.userLanguage).substr(0,2),-1===n.Constants.AVAILABLE_LANGUAGES.indexOf(this.language)&&(this.language="en"),this.setLng(this.language,!1))},o.getLang=function(){return this.language},o.add=function(t,e){this.data[t]=e},o.setLng=function(t,e){void 0===e&&(e=!0),this.language=t,n.Fonts.setFont(t),!0===e&&s.SaveGame.getInstance().saveProgress()},o.getText=function(t){var e=this.language,e=(!0===r.BalanceData.noBlood&&"en"===this.language&&(e=this.language+"_no_blood"),this.data[e][t]);return e||""===t?e:t},o.getData=function(){return this.data[this.language]},o.EVENT_CHANGE_LANG="event_change_lang",o.data={},e.Localization=o},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SaveGame=void 0;var n=i(16),r=i(0),s=i(2);function o(){var t;this.isCookie=navigator.cookieEnabled,(t=!0===this.isCookie?localStorage.getItem(r.Constants.STORAGE_KEY):t)?(t=JSON.parse(t),this.checkPoint=t.checkPoint,s.BalanceData.levelsCompleted=t.levelsCompleted,this.setOptions(t.options),this.setStats(t.stats),this.levels=t.levels,this.achievements=t.achievements,this.daily=t.daily,this.skins=t.skins):this.clearAll()}o.getInstance=function(){return o.instance=o.instance?o.instance:new o},o.prototype.clearAll=function(){this.checkPoint=null,this.levels={};for(var t=s.BalanceData.actsStarts;t<=s.BalanceData.totalActs;t++)this.levels[t]=this.getNewLevelData();s.BalanceData.levelsCompleted=0,this.saveProgress()},o.prototype.getNewLevelData=function(){return{tt:-1,tth:-1,cc:0,nd:0,cch:0,ndh:0}},o.prototype.getAllValues=function(){return{checkPoint:this.checkPoint,levelsCompleted:s.BalanceData.levelsCompleted,options:this.getOptions(),stats:this.getStats(),levels:this.getAllLevels(),achievements:this.getAchievements(),daily:this.getDaily(),skins:this.getSkins()}},o.prototype.getOptions=function(){return{ar:s.BalanceData.autoReset,art:s.BalanceData.autoRestart,nb:s.BalanceData.noBlood,mts:s.BalanceData.mutedSfx,mtm:s.BalanceData.mutedMusic,lng:n.Localization.getLang()}},o.prototype.setOptions=function(t){s.BalanceData.autoReset=t.ar,s.BalanceData.autoRestart=t.art,s.BalanceData.noBlood=t.nb,s.BalanceData.mutedSfx=t.mts,s.BalanceData.mutedMusic=t.mtm,n.Localization.setLng(t.lng,!1)},o.prototype.getStats=function(){return{td:s.BalanceData.totalDeaths,tm:s.BalanceData.totalMoney,cs:s.BalanceData.currSkin,ttm:s.BalanceData.totalTowerMoney,tf:s.BalanceData.towerFloor}},o.prototype.setStats=function(t){s.BalanceData.totalDeaths=t.td,s.BalanceData.totalMoney=t.tm,s.BalanceData.currSkin=t.cs,s.BalanceData.totalTowerMoney=t.ttm,s.BalanceData.towerFloor=t.tf},o.prototype.getCheckPoint=function(){return this.checkPoint},o.prototype.saveCheckPoint=function(t,e){this.checkPoint={x:t,y:e},this.saveProgress()},o.prototype.removeCheckPoint=function(){this.checkPoint=null,this.saveProgress()},o.prototype.getAllLevels=function(){return this.levels},o.prototype.getLevel=function(t){return this.levels[t]},o.prototype.saveLevel=function(t,e){this.levels[t]=e,s.BalanceData.levelsCompleted=Number(t),this.saveProgress()},o.prototype.getAchievements=function(){return this.achievements},o.prototype.saveAchievements=function(t){this.achievements=t,this.saveProgress()},o.prototype.getDaily=function(){return this.daily},o.prototype.saveDaily=function(t){this.daily=t,this.saveProgress()},o.prototype.getSkins=function(){return this.skins},o.prototype.saveSkins=function(t){this.skins=t,this.saveProgress()},o.prototype.saveProgress=function(){!0===this.isCookie&&!0===navigator.cookieEnabled&&localStorage.setItem(r.Constants.STORAGE_KEY,JSON.stringify(this.getAllValues()))},e.SaveGame=o},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TrophieAchieves=e.TrophieTower=e.Achievements=void 0;var n,r,s=i(9),o=i(2),a=i(17);function h(){}h.init=function(t){if(this.main=t,this.achievements=a.SaveGame.getInstance().getAchievements(),!this.achievements){this.achievements={},this.achievements={a:[],ah:[]};for(var e=o.BalanceData.actsStarts;e<=o.BalanceData.totalActs;e++)this.achievements.a[e]=0,this.achievements.ah[e]=0}for(e=o.BalanceData.actsStarts;e<=o.BalanceData.totalActs;e++)this.actCompletes+=this.achievements.a[e],this.actHardCompletes+=this.achievements.ah[e];this.totalComplete=this.actCompletes+this.actHardCompletes,this.totalAchives=2*o.BalanceData.totalActs-1,this.initAchievesList(),this.save()},h.isCompletedAct=function(t,e){return!1===e?1===this.achievements.a[t]:1===this.achievements.ah[t]},h.completeAct=function(t,e){if(this.totalComplete+=1,!1===e){if(0!==this.achievements.a[t])return;s.AzerionSDK.analyticsSendEvent("unlock_act_"+t),this.achievements.a[t]=1,this.actCompletes+=1,this.openAchieve("Act",t),this.actCompletes===o.BalanceData.totalActs-1&&this.saveAchive(r.allActs)}else{if(0!==this.achievements.ah[t])return;s.AzerionSDK.analyticsSendEvent("unlock_act_"+t+"_hard"),this.achievements.ah[t]=1,this.actHardCompletes+=1,this.openAchieve("ActHard",t),this.actHardCompletes===o.BalanceData.totalActs-1&&this.saveAchive(r.allActsHard)}this.save()},h.save=function(){a.SaveGame.getInstance().saveAchievements(this.achievements)},h.getTotalProgress=function(){return this.totalComplete/this.totalAchives},h.initAchievesList=function(){this.achieveList={},this.createAchieve(n.floors10,1),this.createAchieve(n.floors100,1),this.createAchieve(n.floors500,1),this.createAchieve(n.killAndroid,1),this.createAchieve(n.killBatteringRam,1),this.createAchieve(n.killDrone,1),this.createAchieve(r.death,1),this.createAchieve(r.playHour,1),this.createAchieve(r.gasping,1),this.createAchieve(r.vex,1),this.createAchieve(r.allActs,1),this.createAchieve(r.allActsHard,1),this.createAchieve(r.allSkins,1),this.createAchieve(r.daily10,10),this.createAchieve(r.daily50,50),this.createAchieve(r.daily100,100)},h.createAchieve=function(t,e,i){void 0===i&&(i=!1),this.getAchiveCount(t)<0||(this.achieveList[t]={amount:e,once:i})},h.openAchieve=function(t,e){this.main.events.emit(this.EVENT_ACHIEVEMENT_COMPLETE,t,e)},h.saveAchive=function(t,e,i){if(void 0===e&&(e=1),void 0===i&&(i=!0),this.achieveList[t]){e=this.getAchiveCount(t)+e;if(e>=this.achieveList[t].amount)this.openAchieve("award",t),this.achievements[t]=-1,delete this.achieveList[t];else{if(!0===this.achieveList[t].once)return;this.achievements[t]=e}!0===i&&this.save()}},h.getAchiveCount=function(t){return Number(this.achievements[t])||0},h.isAchieveCompleted=function(t){return!this.achieveList[t]},h.EVENT_ACHIEVEMENT_COMPLETE="event_achievement_complete",h.actCompletes=0,h.actHardCompletes=0,h.totalAchives=0,h.totalComplete=0,e.Achievements=h,(i=n=e.TrophieTower||(e.TrophieTower={})).floors10="floor10",i.floors100="floor100",i.floors500="floor500",i.killAndroid="killAndroid",i.killBatteringRam="killBatteringRam",i.killDrone="killDrone",(i=r=e.TrophieAchieves||(e.TrophieAchieves={})).death="death",i.playHour="playh",i.gasping="gasping",i.vex="vex",i.allActs="allActs",i.allActsHard="allActsHard",i.allSkins="allSkins",i.daily10="daily10",i.daily50="daily50",i.daily100="daily100"},function(t,e,i){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.SubSceneList=e.Bool3=void 0,(n=e.Bool3||(e.Bool3={}))[n.true=0]="true",n[n.false=1]="false",n[n.none=2]="none",(n=e.SubSceneList||(e.SubSceneList={}))[n.Menu=0]="Menu",n[n.Hub=1]="Hub",n[n.Act=2]="Act",n[n.Tower=3]="Tower",n[n.Vex=4]="Vex",n[n.SkinsRarity=5]="SkinsRarity",n[n.SkinsSelect=6]="SkinsSelect"},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ClassicLaserCamera=e.SurveillanceCamera=e.WireTrail=e.SpikeActBlockHard=e.Spike30x=e.Spike25x=e.Spike20x=e.Spike15x=e.Spike10xHigh=e.Spike10x=e.Spike5x=e.Spike=e.Spark=e.ShurikanSpawner=e.ShurikanHorizontal=e.ShurikanDispenser=e.Reaper=e.Quadrant=e.Obstacle=e.LaserPoint=e.FallingSpike=e.BuzzsawEnlarging=e.MissileLauncher=e.ClassicLaserStatic=e.ClassicLaser=e.BuzzsawBouncing=e.BuzzsawVertical=e.BuzzsawOnStick=e.BuzzsawHorizontal=e.Buzzsaw=e.BulletMissile=e.Bullet=void 0;var n=i(66),r=(Object.defineProperty(e,"Bullet",{enumerable:!0,get:function(){return n.Bullet}}),i(67)),s=(Object.defineProperty(e,"BulletMissile",{enumerable:!0,get:function(){return r.BulletMissile}}),i(30)),o=(Object.defineProperty(e,"Buzzsaw",{enumerable:!0,get:function(){return s.Buzzsaw}}),i(154)),a=(Object.defineProperty(e,"BuzzsawHorizontal",{enumerable:!0,get:function(){return o.BuzzsawHorizontal}}),i(155)),h=(Object.defineProperty(e,"BuzzsawOnStick",{enumerable:!0,get:function(){return a.BuzzsawOnStick}}),i(156)),l=(Object.defineProperty(e,"BuzzsawVertical",{enumerable:!0,get:function(){return h.BuzzsawVertical}}),i(157)),c=(Object.defineProperty(e,"BuzzsawBouncing",{enumerable:!0,get:function(){return l.BuzzsawBouncing}}),i(45)),u=(Object.defineProperty(e,"ClassicLaser",{enumerable:!0,get:function(){return c.ClassicLaser}}),i(68)),d=(Object.defineProperty(e,"ClassicLaserStatic",{enumerable:!0,get:function(){return u.ClassicLaserStatic}}),i(158)),p=(Object.defineProperty(e,"MissileLauncher",{enumerable:!0,get:function(){return d.MissileLauncher}}),i(159)),f=(Object.defineProperty(e,"BuzzsawEnlarging",{enumerable:!0,get:function(){return p.BuzzsawEnlarging}}),i(160)),g=(Object.defineProperty(e,"FallingSpike",{enumerable:!0,get:function(){return f.FallingSpike}}),i(161)),m=(Object.defineProperty(e,"LaserPoint",{enumerable:!0,get:function(){return g.LaserPoint}}),i(14)),y=(Object.defineProperty(e,"Obstacle",{enumerable:!0,get:function(){return m.Obstacle}}),i(162)),v=(Object.defineProperty(e,"Quadrant",{enumerable:!0,get:function(){return y.Quadrant}}),i(163)),x=(Object.defineProperty(e,"Reaper",{enumerable:!0,get:function(){return v.Reaper}}),i(164)),b=(Object.defineProperty(e,"ShurikanDispenser",{enumerable:!0,get:function(){return x.ShurikanDispenser}}),i(165)),w=(Object.defineProperty(e,"ShurikanHorizontal",{enumerable:!0,get:function(){return b.ShurikanHorizontal}}),i(166)),T=(Object.defineProperty(e,"ShurikanSpawner",{enumerable:!0,get:function(){return w.ShurikanSpawner}}),i(167)),S=(Object.defineProperty(e,"Spark",{enumerable:!0,get:function(){return T.Spark}}),i(22)),P=(Object.defineProperty(e,"Spike",{enumerable:!0,get:function(){return S.Spike}}),i(168)),_=(Object.defineProperty(e,"Spike5x",{enumerable:!0,get:function(){return P.Spike5x}}),i(169)),E=(Object.defineProperty(e,"Spike10x",{enumerable:!0,get:function(){return _.Spike10x}}),i(170)),A=(Object.defineProperty(e,"Spike10xHigh",{enumerable:!0,get:function(){return E.Spike10xHigh}}),i(171)),M=(Object.defineProperty(e,"Spike15x",{enumerable:!0,get:function(){return A.Spike15x}}),i(172)),k=(Object.defineProperty(e,"Spike20x",{enumerable:!0,get:function(){return M.Spike20x}}),i(173)),C=(Object.defineProperty(e,"Spike25x",{enumerable:!0,get:function(){return k.Spike25x}}),i(174)),O=(Object.defineProperty(e,"Spike30x",{enumerable:!0,get:function(){return C.Spike30x}}),i(175)),R=(Object.defineProperty(e,"SpikeActBlockHard",{enumerable:!0,get:function(){return O.SpikeActBlockHard}}),i(176)),L=(Object.defineProperty(e,"WireTrail",{enumerable:!0,get:function(){return R.WireTrail}}),i(177)),D=(Object.defineProperty(e,"SurveillanceCamera",{enumerable:!0,get:function(){return L.SurveillanceCamera}}),i(178));Object.defineProperty(e,"ClassicLaserCamera",{enumerable:!0,get:function(){return D.ClassicLaserCamera}})},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.PanelManager=e.PanelList=void 0;var s,o,a=i(0),h=i(28),l=i(121),i=((i=s=e.PanelList||(e.PanelList={}))[i.NoOne=0]="NoOne",i[i.PanelOptionsMenu=1]="PanelOptionsMenu",i[i.PanelOptionsHub=2]="PanelOptionsHub",i[i.PanelTrophies=3]="PanelTrophies",i[i.PanelPause=4]="PanelPause",i[i.PanelActSelect=5]="PanelActSelect",i[i.PanelLevelComplete=6]="PanelLevelComplete",i[i.PanelLevelObjectives=7]="PanelLevelObjectives",i[i.PanelDailyTasks=8]="PanelDailyTasks",i[i.PanelAreYouOk=9]="PanelAreYouOk",i[i.PanelLanguages=10]="PanelLanguages",i[i.PanelTowerComplete=11]="PanelTowerComplete",i[i.PanelTowerDefeat=12]="PanelTowerDefeat",i[i.PanelPowerUp=13]="PanelPowerUp",i[i.PanelFreeSkin=14]="PanelFreeSkin",o=Phaser.GameObjects.Container,r(c,o),c.prototype.getPanel=function(t){switch(t){case s.PanelOptionsMenu:return new l.PanelOptionsMenu(this.scene);case s.PanelOptionsHub:return new l.PanelOptionsHub(this.scene);case s.PanelTrophies:return new l.PanelTrophies(this.scene);case s.PanelPause:return new l.PanelPause(this.scene);case s.PanelActSelect:return new l.PanelActSelect(this.scene);case s.PanelLevelComplete:return new l.PanelLevelComplete(this.scene);case s.PanelLevelObjectives:return new l.PanelLevelObjectives(this.scene);case s.PanelDailyTasks:return new l.PanelDailyTasks(this.scene);case s.PanelAreYouOk:return new l.PanelAreYouOk(this.scene);case s.PanelLanguages:return new l.PanelLanguages(this.scene);case s.PanelTowerComplete:return new l.PanelTowerComplete(this.scene);case s.PanelTowerDefeat:return new l.PanelTowerDefeat(this.scene);case s.PanelPowerUp:return new l.PanelPowerUp(this.scene);case s.PanelFreeSkin:return new l.PanelFreeSkin(this.scene);default:return null}},c.prototype.isExist=function(t){return!!this.stock[t]},c.prototype.show=function(t,e){this.stock[t]||((i=this.getPanel(t)).init(e),i.resize(),this.add(i),this.stock[t]=i,i=null);var i,e=this.currentPanel;this.currentPanel!==s.NoOne&&this.hide(this.currentPanel),this.prevPanel=e,this.currentPanel=t,this.stock[t].show(),this.visible=!0},c.prototype.custom=function(t,e){this.stock[t]&&this.stock[t].custom(e)},c.prototype.hide=function(t){this.stock[t]&&(this.currentPanel=s.NoOne,this.stock[t].hide(),this.hideThis(),this.prevPanel!==s.NoOne&&(this.show(this.prevPanel),this.prevPanel=s.NoOne))},c.prototype.hideThis=function(){this.visible=!1},c.prototype.hideCurrent=function(){this.hide(this.currentPanel)},c.prototype.clickOnBlack=function(){this.stock[this.currentPanel].clikcOnBlack()},c.prototype.hideAll=function(){for(var t=0,e=Object.keys(this.stock);t<e.length;t++){var i=e[t];this.stock[i].hide()}this.hideThis(),this.currentPanel=s.NoOne,this.prevPanel=s.NoOne},c.prototype.update=function(){if(!1!==this.visible)for(var t=0,e=Object.keys(this.stock);t<e.length;t++){var i=e[t];this.stock[i].update()}},c.prototype.resize=function(){for(var t=0,e=Object.keys(this.stock);t<e.length;t++){var i=e[t];this.stock[i].resize()}h.CustomResize.scaleFitScreen(this.black)},c.prototype.removePanel=function(t){this.stock[t].destroy(),this.remove(this.stock[t]),delete this.stock[t]},c.prototype.reset=function(){for(var t=0,e=Object.keys(this.stock);t<e.length;t++){var i=e[t];this.removePanel(i)}!(this.stock={})===this.notHideBlackAfterReset&&this.hideThis(),this.notHideBlackAfterReset=!1,this.currentPanel=s.NoOne,this.prevPanel=s.NoOne},c.prototype.destroy=function(){o.prototype.destroy.call(this),this.stock=null,this.black=null,this.prevPanel=null,this.currentPanel=null},c);function c(t){var e=o.call(this,t)||this;return e.notHideBlackAfterReset=!1,e.stock={},e.currentPanel=s.NoOne,e.prevPanel=s.NoOne,e.black=new Phaser.GameObjects.Rectangle(t,a.Constants.GHW,a.Constants.GHH,a.Constants.UI_WIDTH,a.Constants.UI_HEIGHT,0,.6),e.black.setInteractive(),e.black.on(Phaser.Input.Events.POINTER_DOWN,e.clickOnBlack,e),e.add(e.black),e.hideThis(),e}e.PanelManager=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.Spike=void 0,i(14)),a=i(0),h=i(4),l=i(8),i=(r=o.Obstacle,s(c,r),c.prototype.init=function(t,e){this.sprite=new Phaser.GameObjects.Image(this.main,0,0,a.Atlases.gameplay,t),this.layer.add(this.sprite),this.width=10*e,this.height=18},c.prototype.levelStart=function(){for(var t=0,e=this.main.pools;t<e.length;t++){var i=e[t];SAT.testPolygonPolygon(this.deathBoxPolygon,i.totalPolygon)&&(this.layer.remove(this.sprite),this.main.layerUnderPool.add(this.sprite))}},c.prototype.spawn=function(t){this.xPos=t.x,this.yPos=t.y,this.sprite.x=this.xPos,this.sprite.y=this.yPos,this.alive=!0,this.sprite.visible=!0,this.sprite.rotation=h.Tools.toRad(t.rotation);var t=Math.cos(this.sprite.rotation),e=Math.sin(this.sprite.rotation),i=.5*this.width,n=.5*this.height;this.deathBoxPolygon=new SAT.Polygon(new SAT.Vector(this.xPos,this.yPos),[new SAT.Vector(-i*t- -n*e,-i*e+-n*t),new SAT.Vector(i*t- -n*e,i*e+-n*t),new SAT.Vector(i*t-n*e,i*e+n*t),new SAT.Vector(-i*t-n*e,-i*e+n*t)])},c.prototype.update=function(){this.main.checkPlayerDeathByPolygon(this.deathBoxPolygon,l.DeathType.spike)},c.prototype.movePosition=function(t,e){this.xPos=t,this.yPos=e,this.updatePosition()},c.prototype.updatePosition=function(){this.sprite.x=this.xPos,this.sprite.y=this.yPos,this.deathBoxPolygon.pos.x=this.xPos,this.deathBoxPolygon.pos.y=this.yPos},c.prototype.destroy=function(){this.sprite.destroy(),this.sprite=null,this.deathBoxPolygon=null},c);function c(t,e){t=r.call(this,t,e)||this;return t.init("spike 10000",1),t}e.Spike=i},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DailyTask=e.TaskID=void 0;var n,r=i(4),s=i(7),o=i(18),a=i(2),h=i(16),l=i(17),i=((i=n=e.TaskID||(e.TaskID={}))[i.collectCoins=0]="collectCoins",i[i.completeLevel=1]="completeLevel",i[i.playTowerOfTerror=2]="playTowerOfTerror",i[i.completeAny3Levels=3]="completeAny3Levels",c.init=function(t,e,i){this.scene=t,this.rewardCoins=e,this.taskCollectCoins=i,this.timeToReset=864e5,this.data=l.SaveGame.getInstance().getDaily(),this.data||this.reset(this.timeToReset),this.resetTxt(),this.startTimer()},c.tickTimer=function(){var t=Date.now(),e=(this.data.rTime<t&&(e=(t-this.data.rTime)%this.timeToReset,this.reset(this.timeToReset-e),this.resetTxt(),this.scene.events.emit(this.EVENT_TIMER_RESET)),this.data.rTime-t);this.scene.events.emit(this.EVENT_TIMER_TICK,s.Helpers.timeDecoratorHub(e))},c.startTimer=function(){var t=this;this.tickTimer(),this.intervalID||(this.intervalID=setInterval(function(){return t.tickTimer()},1e3))},c.stopTimer=function(){this.intervalID&&(clearInterval(this.intervalID),this.intervalID=null)},c.getRewardCoins=function(){return this.rewardCoins},c.reward=function(t){a.BalanceData.totalMoney+=this.rewardCoins,this.data.tasks[t].c=this.data.tasks[t].t,this.data.tasks[t].r=2,this.save(),this.scene.events.emit(this.EVENT_REWARDED)},c.getData=function(t){return{curr:this.data.tasks[t].c,target:this.data.tasks[t].t,rewarded:this.data.tasks[t].r,des:this.dataTxt[t]}},c.saveData=function(t,e){0!==this.data.tasks[t].r||t===n.completeLevel&&e!==this.data.tasks[t].l||(this.data.tasks[t].c+=1,this.data.tasks[t].c>=this.data.tasks[t].t&&(this.data.tasks[t].r=1,o.Achievements.saveAchive(o.TrophieAchieves.daily10,1,!1),o.Achievements.saveAchive(o.TrophieAchieves.daily50,1,!1),o.Achievements.saveAchive(o.TrophieAchieves.daily100,1)),this.save())},c.canShowTaskI=function(){for(var t=0;t<this.data.tasks.length;t++)if(1===this.data.tasks[t].r)return!0;return!1},c.resetByAD=function(){this.reset(this.timeToReset),this.scene.events.emit(this.EVENT_TIMER_RESET)},c.reset=function(t){var e=new Array(4),i=(e[n.collectCoins]={c:0,t:r.Tools.getRandomCell(this.taskCollectCoins),r:0},a.BalanceData.levelsCompleted+1);i>a.BalanceData.totalActs&&(i=a.BalanceData.totalActs),e[n.completeLevel]={c:0,t:1,r:0,l:r.Tools.random(1,i)},e[n.playTowerOfTerror]={c:0,t:1,r:0},e[n.completeAny3Levels]={c:0,t:3,r:0},this.data={rTime:Date.now()+t,tasks:e},this.resetTxt(),this.save()},c.resetTxt=function(){this.dataTxt=[h.Localization.getText("dailyTaskDes0").replace("<x>",""+this.data.tasks[n.collectCoins].t),h.Localization.getText("dailyTaskDes1")+" "+this.data.tasks[n.completeLevel].l,h.Localization.getText("dailyTaskDes2"),h.Localization.getText("dailyTaskDes3")]},c.save=function(){l.SaveGame.getInstance().saveDaily(this.data)},c.EVENT_REWARDED="event_daily_rewarded",c.EVENT_TIMER_TICK="event_daily_timer_tick",c.EVENT_TIMER_RESET="event_daily_timer_reset",c.taskCollectCoins=[],c);function c(){}e.DailyTask=i},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SkinsData=void 0;var a=i(7),n=i(2),o=i(17);function r(){}r.init=function(t,e,i){if(this.skinsPrice=t,this.skinRareIDs=e,this.skinIDs=i,this.skinsRarity=this.skinRareIDs.length,this.totalSkins=0,this.data=o.SaveGame.getInstance().getSkins(),this.data){for(n=0;n<this.skinsRarity;n++)if(r=this.skinIDs[n].length,this.totalSkins+=r,this.data[n].length<r)for(s=0;s<r;s++)this.data[n].push(0)}else{this.data=new Array(this.skinsRarity+1);for(var n=0;n<this.skinsRarity;n++){var r=this.skinIDs[n].length;this.totalSkins+=r,this.data[n]=new Array(r);for(var s=0;s<r;s++)this.data[n][s]=0}this.data[this.skinsRarity]=[0,0,0,0,0],this.data[0][0]=2}for(this.save(),this.totalSkinsOpened=0,this.skinsOpened=new Array(this.skinsRarity),n=0;n<this.skinsRarity;n++)for(s=this.skinsOpened[n]=0;s<this.data[n].length;s++)0!==this.data[n][s]&&(this.skinsOpened[n]+=1,this.totalSkinsOpened+=1)},r.checkFreeSkin=function(t){for(var e=new Date,i=a.Helpers.formatNumberZeroLess10(e.getDate())+"/"+a.Helpers.formatNumberZeroLess10(e.getMonth()+1)+"/"+e.getFullYear(),n=-1,r=0;r<t.length;r++)if(i===t[r].date){n=t[r].skinID;break}if(!(n<0))for(r=0;r<this.skinsRarity;r++)for(var s=this.skinIDs[r].length,o=0;o<s;o++)if(this.skinIDs[r][o]===n)return 0<this.data[r][o]?void 0:(this.freeSkinData={rare:r,id:o,skinID:n},void this.openSkin(r,o))},r.getSkinFrameName=function(t){return a.Helpers.formatNumberZeroLess10(t)+" 10000"},r.getSkinIndex=function(t,e){return this.skinIDs[t].indexOf(e)},r.getSkinCell=function(t,e){return this.skinIDs[t][e]},r.getRaritySkinsAmount=function(t){return this.data[t].length},r.getSlotStatus=function(t,e){return this.data[t][e]},r.hasUnusedSkin=function(t){for(var e=0;e<this.data[t].length;e++)if(1===this.data[t][e])return!0;return!1},r.canShowI=function(){for(var t=0;t<this.skinsRarity;t++)if(!0===this.canShowIRarity(t))return!0;return!1},r.canShowIRarity=function(t){for(var e=0;e<this.data[t].length;e++)if(1===this.data[t][e])return!0;return!1},r.enouthMoney=function(t){var e=this.getPrice(t);if(!0===this.isTowerRarity(t)){if(n.BalanceData.totalTowerMoney>=e)return!0}else if(n.BalanceData.totalMoney>=e)return!0;return!1},r.isTowerRarity=function(t){return t===this.skinsRarity-1},r.hasSpinTokens=function(t){return 0!==this.data[this.skinsRarity][t]},r.getSpinTokensAmount=function(t){return this.data[this.skinsRarity][t]},r.getPrice=function(t){return this.skinsPrice[t]},r.getSkinOpened=function(t){return this.skinsOpened[t]},r.openSkin=function(t,e){this.skinsOpened[t]+=1,this.totalSkinsOpened+=1,this.data[t][e]=1,this.save()},r.setSkinStatus2=function(t,e){this.data[t][e]=2,this.save()},r.addSpinToken=function(t,e){this.data[this.skinsRarity][t]+=e=void 0===e?1:e,this.save()},r.save=function(){o.SaveGame.getInstance().saveSkins(this.data)},e.SkinsData=r},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PSkinMoney=e.PSkinTitle=e.PTNT=e.PAchievement=e.PLevelTower=e.PLevel=e.PTimeTower=e.PTimeHub=e.PTimeAct=void 0;var n=i(136),r=(Object.defineProperty(e,"PTimeAct",{enumerable:!0,get:function(){return n.PTimeAct}}),i(137)),s=(Object.defineProperty(e,"PTimeHub",{enumerable:!0,get:function(){return r.PTimeHub}}),i(138)),o=(Object.defineProperty(e,"PTimeTower",{enumerable:!0,get:function(){return s.PTimeTower}}),i(139)),a=(Object.defineProperty(e,"PLevel",{enumerable:!0,get:function(){return o.PLevel}}),i(140)),h=(Object.defineProperty(e,"PLevelTower",{enumerable:!0,get:function(){return a.PLevelTower}}),i(141)),l=(Object.defineProperty(e,"PAchievement",{enumerable:!0,get:function(){return h.PAchievement}}),i(142)),c=(Object.defineProperty(e,"PTNT",{enumerable:!0,get:function(){return l.PTNT}}),i(143)),u=(Object.defineProperty(e,"PSkinTitle",{enumerable:!0,get:function(){return c.PSkinTitle}}),i(144));Object.defineProperty(e,"PSkinMoney",{enumerable:!0,get:function(){return u.PSkinMoney}})},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PipelineManager=e.PipelineList=void 0;var n,r=i(27),i=((i=n=e.PipelineList||(e.PipelineList={})).PivotSkew="PivotSkew",i.Blur="Blur",i.ColorMatrix="ColorMatrix",i.MIXBlurColorMatrix="MIXBlurColorMatrix",s.init=function(t){this.game=t,this.pipelines={}},s.getPipeline=function(t,e){var e=t+(e=void 0===e?"":e),i=this.pipelines[e];return i||(t===n.PivotSkew?i=new r.PLPivotSkew(this.game):t===n.Blur?i=new r.PLBlur(this.game):t===n.ColorMatrix?i=new r.PLColorMatrix(this.game):t===n.MIXBlurColorMatrix&&(i=new r.PLMIXBlurColorMatrix(this.game)),this.game.renderer.pipelines.add(e,i),this.pipelines[e]=i),t},s);function s(){}e.PipelineManager=i},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PLMIXBlurColorMatrix=e.PLColorMatrix=e.PLPivotSkew=e.PLBlur=e.PipelineManager=e.JDRender=void 0;var n=i(92),r=(Object.defineProperty(e,"JDRender",{enumerable:!0,get:function(){return n.JDRender}}),i(26)),s=(Object.defineProperty(e,"PipelineManager",{enumerable:!0,get:function(){return r.PipelineManager}}),i(93)),o=(Object.defineProperty(e,"PLBlur",{enumerable:!0,get:function(){return s.PLBlur}}),i(55)),a=(Object.defineProperty(e,"PLPivotSkew",{enumerable:!0,get:function(){return o.PLPivotSkew}}),i(94)),h=(Object.defineProperty(e,"PLColorMatrix",{enumerable:!0,get:function(){return a.PLColorMatrix}}),i(95));Object.defineProperty(e,"PLMIXBlurColorMatrix",{enumerable:!0,get:function(){return h.PLMIXBlurColorMatrix}})},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CustomResize=void 0;var a=i(0),n=i(2);function r(){}r.init=function(){(this.userRatio=1)<(window.devicePixelRatio||1)&&(this.userRatio=.85),this.orientationDiv=document.getElementById(a.Constants.DIV_ID_ORIENTATION),this.contentDiv=document.getElementById(a.Constants.DIV_ID),this.contentDiv.style.width="100vw",this.contentDiv.style.height="100vh",this.contentDiv.style.outline="0",Phaser.Scale.ScaleManager.prototype.boot=function(){this.canvas=this.game.canvas,this.fullscreen=this.game.device.fullscreen,this.game.events.on(Phaser.Core.Events.PRE_STEP,this.step,this),this.game.events.once(Phaser.Core.Events.DESTROY,this.destroy,this),this.startListeners()},Phaser.Scale.ScaleManager.prototype.getParentBounds=function(){var t,e,i;return!!this.parent&&(t=this.parentSize,e=window.innerWidth,i=window.innerHeight,(t.width!==e||t.height!==i)&&(t.setSize(e,i),!0))},Phaser.Scale.ScaleManager.prototype.step=function(t,e){this.parent&&(this._lastCheck+=e,(this.dirty||this._lastCheck>this.resizeInterval)&&(this.getParentBounds()&&r.resize(this.game,this.parentSize.width,this.parentSize.height),this.dirty=!1,this._lastCheck=0))},Phaser.Scale.ScaleManager.prototype.updateScale=function(){var t=this.parentSize.width,e=(this.gameSize.width===r.MaxCanvasW&&(t=r.MaxCanvasW/r.scaleFactor),this.parentSize.height),t=(this.gameSize.height===r.MaxCanvasH&&(e=r.MaxCanvasH/r.scaleFactor),this.displaySize.resize(t,e),this.canvas.style);t.width=this.displaySize.width+"px",t.height=this.displaySize.height+"px",this.getParentBounds(),this.updateCenter()}},r.setGameSize=function(t,e){a.Constants.GW=t,a.Constants.GH=e,a.Constants.GHW=Math.floor(a.Constants.GW/2),a.Constants.GHH=Math.floor(a.Constants.GH/2),a.Constants.GW>a.Constants.GH?(a.Constants.ORIENTATION_LANDSCAPE=!0,this.contentDiv.style.position="relative"):(a.Constants.ORIENTATION_LANDSCAPE=!1,this.contentDiv.style.position="fixed")},r.setMaxCanvasSize=function(t,e){this.MaxCanvasW=t,this.MaxCanvasH=e,this.OW=(this.MaxCanvasW-a.Constants.GW)/2,this.OH=(this.MaxCanvasH-a.Constants.GH)/2},r.refresh=function(t){this.resize(t,window.innerWidth,window.innerHeight)},r.resize=function(t,e,i){var n=a.Constants.GW,r=a.Constants.GH;this.scaleFactor=this.userRatio,this.scaleFactor/=i<e?i/r:i/n,a.Constants.userRatio=this.scaleFactor,this.CanvasW=Math.ceil(e*this.scaleFactor),this.CanvasH=Math.ceil(i*this.scaleFactor),this.CanvasW>this.MaxCanvasW&&(this.CanvasW=this.MaxCanvasW),this.CanvasH>this.MaxCanvasH&&(this.CanvasH=this.MaxCanvasH),this.CanvasHalfW=this.CanvasW/2,this.CanvasHalfH=this.CanvasH/2,this.resizeUI(this.CanvasW,this.CanvasH,a.Constants.UI_WIDTH,a.Constants.UI_HEIGHT),this.nativeResize(t.scale,this.CanvasW,this.CanvasH),!0===a.Constants.IS_MOBILE&&(this.checkOrientation(e,i),window.scroll(0,0))},r.nativeResize=function(t,e,i){var n=t.width,r=t.height,s=(t.gameSize.resize(e,i),t.baseSize.resize(e,i),t.canvas.width=t.baseSize.width,t.canvas.height=t.baseSize.height,t.canvas.style);s.width=e+"px",s.height=i+"px",t.refresh(n,r)},r.checkOrientation=function(t,e){e<t===a.Constants.ORIENTATION_LANDSCAPE?(this.orientationDiv.style.display="none",n.BalanceData.incorrectOrientation=!1):(this.orientationDiv.style.display="block",n.BalanceData.incorrectOrientation=!0)},r.resizeUI=function(t,e,i,n){var r=i<t?1:t/i,s=n<e?1:e/n,r=r<s?r:s,s=(i-a.Constants.GW)/2,o=(n-a.Constants.GH)/2,s=Math.round(t/2-i*r/2)+s*r,o=Math.round(e/2-n*r/2)+o*r;a.Constants.UI_SCALE_FIT_X=t/i/r*1.01,a.Constants.UI_SCALE_FIT_Y=e/n/r*1.01,a.Constants.UI_SCALE=r,a.Constants.UI_SHIFT_X=Math.round(s/r),a.Constants.UI_SHIFT_Y=Math.round(o/r)},r.resizeCamera=function(t){t.setOrigin(0,0),t.zoom=a.Constants.UI_SCALE,t.setScroll(-a.Constants.UI_SHIFT_X,-a.Constants.UI_SHIFT_Y)},r.resizeContainer=function(t){t.scale=a.Constants.UI_SCALE,t.x=a.Constants.UI_SHIFT_X*a.Constants.UI_SCALE,t.y=a.Constants.UI_SHIFT_Y*a.Constants.UI_SCALE},r.scaleFitScreen=function(t){t.scaleX=a.Constants.UI_SCALE_FIT_X,t.scaleY=a.Constants.UI_SCALE_FIT_Y},r.scaleFactor=1,e.CustomResize=r},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActTower=e.HoverPlatform=e.PulseBlock=e.VexTNT=e.SkinsBlock=e.VerticalBlock=e.SwimmingPool=e.SpeedBlock=e.SparkBlock=e.SolarBlock=e.PushBlock=e.Slope=e.LockBlock=e.InvisBlockUp=e.InvisBlockDown=e.InvisBlock=e.IceBlock=e.HorizontalBlock=e.GlassBlock=e.FallingBlock=e.ExplosiveBlock=e.ElevatorGenerator=e.ElevatorEliminator=e.Elevator=e.BounceBlock=e.BlockSpike=e.BlockedWall=e.BasicBlock=e.AppearingBlock=e.ActBlock=e.BlockBehavior=e.Block=void 0;var n=i(5),r=(Object.defineProperty(e,"Block",{enumerable:!0,get:function(){return n.Block}}),i(34)),s=(Object.defineProperty(e,"BlockBehavior",{enumerable:!0,get:function(){return r.BlockBehavior}}),i(150)),o=(Object.defineProperty(e,"ActBlock",{enumerable:!0,get:function(){return s.ActBlock}}),i(151)),a=(Object.defineProperty(e,"AppearingBlock",{enumerable:!0,get:function(){return o.AppearingBlock}}),i(65)),h=(Object.defineProperty(e,"BasicBlock",{enumerable:!0,get:function(){return a.BasicBlock}}),i(152)),l=(Object.defineProperty(e,"BlockedWall",{enumerable:!0,get:function(){return h.BlockedWall}}),i(153)),c=(Object.defineProperty(e,"BlockSpike",{enumerable:!0,get:function(){return l.BlockSpike}}),i(179)),u=(Object.defineProperty(e,"BounceBlock",{enumerable:!0,get:function(){return c.BounceBlock}}),i(180)),d=(Object.defineProperty(e,"Elevator",{enumerable:!0,get:function(){return u.Elevator}}),i(181)),p=(Object.defineProperty(e,"ElevatorEliminator",{enumerable:!0,get:function(){return d.ElevatorEliminator}}),i(182)),f=(Object.defineProperty(e,"ElevatorGenerator",{enumerable:!0,get:function(){return p.ElevatorGenerator}}),i(183)),g=(Object.defineProperty(e,"ExplosiveBlock",{enumerable:!0,get:function(){return f.ExplosiveBlock}}),i(184)),m=(Object.defineProperty(e,"FallingBlock",{enumerable:!0,get:function(){return g.FallingBlock}}),i(185)),y=(Object.defineProperty(e,"GlassBlock",{enumerable:!0,get:function(){return m.GlassBlock}}),i(186)),v=(Object.defineProperty(e,"HorizontalBlock",{enumerable:!0,get:function(){return y.HorizontalBlock}}),i(187)),x=(Object.defineProperty(e,"IceBlock",{enumerable:!0,get:function(){return v.IceBlock}}),i(46)),b=(Object.defineProperty(e,"InvisBlock",{enumerable:!0,get:function(){return x.InvisBlock}}),i(188)),w=(Object.defineProperty(e,"InvisBlockDown",{enumerable:!0,get:function(){return b.InvisBlockDown}}),i(189)),T=(Object.defineProperty(e,"InvisBlockUp",{enumerable:!0,get:function(){return w.InvisBlockUp}}),i(190)),S=(Object.defineProperty(e,"LockBlock",{enumerable:!0,get:function(){return T.LockBlock}}),i(191)),P=(Object.defineProperty(e,"Slope",{enumerable:!0,get:function(){return S.Slope}}),i(192)),_=(Object.defineProperty(e,"PushBlock",{enumerable:!0,get:function(){return P.PushBlock}}),i(193)),E=(Object.defineProperty(e,"SolarBlock",{enumerable:!0,get:function(){return _.SolarBlock}}),i(194)),A=(Object.defineProperty(e,"SparkBlock",{enumerable:!0,get:function(){return E.SparkBlock}}),i(195)),M=(Object.defineProperty(e,"SpeedBlock",{enumerable:!0,get:function(){return A.SpeedBlock}}),i(196)),k=(Object.defineProperty(e,"SwimmingPool",{enumerable:!0,get:function(){return M.SwimmingPool}}),i(197)),C=(Object.defineProperty(e,"VerticalBlock",{enumerable:!0,get:function(){return k.VerticalBlock}}),i(198)),O=(Object.defineProperty(e,"SkinsBlock",{enumerable:!0,get:function(){return C.SkinsBlock}}),i(199)),R=(Object.defineProperty(e,"VexTNT",{enumerable:!0,get:function(){return O.VexTNT}}),i(200)),L=(Object.defineProperty(e,"PulseBlock",{enumerable:!0,get:function(){return R.PulseBlock}}),i(201)),D=(Object.defineProperty(e,"HoverPlatform",{enumerable:!0,get:function(){return L.HoverPlatform}}),i(202));Object.defineProperty(e,"ActTower",{enumerable:!0,get:function(){return D.ActTower}})},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.Buzzsaw=void 0,i(14)),a=i(0),h=i(4),l=i(8),i=(r=o.Obstacle,s(c,r),c.prototype.levelStart=function(){if(!1!==this.checkUnderPool)for(var t=0,e=this.main.pools;t<e.length;t++){var i=e[t];if(!0===SAT.testCirclePolygon(this.deathCircle,i.totalPolygon)){this.layer.remove(this.sprite),this.main.layerUnderPool.add(this.sprite),this.checkUnderPool=!1;break}}},c.prototype.spawn=function(t){this.xPos=t.x,this.yPos=t.y,this.startX=this.xPos,this.startY=this.yPos,this.sprite.visible=!0,this.updatePosition(),this.alive=!0;t=t.size/100;this.sprite.setScale(t,t),this.deathCircle.r=44*t},c.prototype.update=function(){this.sprite.rotation+=this.speedRot,this.main.checkPlayerDeathByCircle(this.deathCircle,l.DeathType.buzzsaw)},c.prototype.updatePosition=function(){this.sprite.x=this.xPos,this.sprite.y=this.yPos,this.deathCircle.pos.x=this.xPos,this.deathCircle.pos.y=this.yPos},c.prototype.destroy=function(){this.sprite.destroy(),this.deathCircle=null,r.prototype.destroy.call(this)},c);function c(t,e){var i=r.call(this,t,e)||this;return i.checkUnderPool=!0,i.sprite=new Phaser.GameObjects.Image(t,0,0,a.Atlases.gameplay,"buzzsaw 10000"),e.add(i.sprite),i.sprite.visible=!1,i.deathCircle=new SAT.Circle(new SAT.Vector(0,0),44),i.speedRot=h.Tools.toRad(2),i}e.Buzzsaw=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),i=(Object.defineProperty(e,"__esModule",{value:!0}),e.BasicSubGamePlay=void 0,r=i(33).BasicSubScene,s(o,r),o.prototype.init=function(){},o.prototype.updateDeaths=function(t){},o.prototype.resetLevel=function(){},o.prototype.updateTime=function(){},o.prototype.enterLevel=function(t){},o.prototype.exitLevel=function(){},o.prototype.resize=function(){},o.prototype.getRank=function(){return-1},o.prototype.getTime=function(){return"-1"},o);function o(){return null!==r&&r.apply(this,arguments)||this}e.BasicSubGamePlay=i},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DailyTaskPause=e.DailyTaskPanel=e.ButtonMenu=e.ControllerStick=e.ControllerButton=void 0;var n=i(112),r=(Object.defineProperty(e,"ControllerButton",{enumerable:!0,get:function(){return n.ControllerButton}}),i(113)),s=(Object.defineProperty(e,"ControllerStick",{enumerable:!0,get:function(){return r.ControllerStick}}),i(114)),o=(Object.defineProperty(e,"ButtonMenu",{enumerable:!0,get:function(){return s.ButtonMenu}}),i(119)),a=(Object.defineProperty(e,"DailyTaskPanel",{enumerable:!0,get:function(){return o.DailyTaskPanel}}),i(120));Object.defineProperty(e,"DailyTaskPause",{enumerable:!0,get:function(){return a.DailyTaskPause}})},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),s=(Object.defineProperty(e,"__esModule",{value:!0}),e.BasicSubScene=void 0,r=Phaser.GameObjects.Container,s(o,r),o.prototype.init=function(t){},o.prototype.resize=function(){},o.prototype.update=function(){},o.prototype.updateMoney=function(t){},o.prototype.destroy=function(){r.prototype.destroy.call(this),this.scene=null},o);function o(){return null!==r&&r.apply(this,arguments)||this}e.BasicSubScene=s},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),i=(Object.defineProperty(e,"__esModule",{value:!0}),e.BlockBehavior=void 0,r=i(5).Block,s(o,r),o.prototype.applyForce=function(t,e){this.xVelocity+=t,this.yVelocity+=e},o.prototype.update=function(){this.xPos+=this.xVelocity,this.yPos+=this.yVelocity,this.xVelocity*=this.fricitonX,this.yVelocity*=this.fricitonY,this.xPos===this.prevX&&this.yPos===this.prevY||this.updatePosition()},o);function o(){var t=null!==r&&r.apply(this,arguments)||this;return t.fricitonX=.97,t.fricitonY=.97,t}e.BlockBehavior=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),s=(Object.defineProperty(e,"__esModule",{value:!0}),e.BasicScene=void 0,r=Phaser.Scene,s(o,r),o.prototype.init=function(){this.events.once(Phaser.Scenes.Events.SHUTDOWN,this.destroy,this)},o.prototype.create=function(){this.initResize()},o.prototype.initResize=function(){this.scale.on(Phaser.Scale.Events.RESIZE,this.resize,this),this.resize()},o.prototype.resize=function(){},o.prototype.destroy=function(){this.scale.off(Phaser.Scale.Events.RESIZE,this.resize,this)},o);function o(){return null!==r&&r.apply(this,arguments)||this}e.BasicScene=s},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),s=(Object.defineProperty(e,"__esModule",{value:!0}),e.JDImage=void 0,r=Phaser.GameObjects.Image,s(o,r),o.prototype.setTexture=function(t,e){return r.prototype.setTexture.call(this,t,e),this.refreshDrawTint=!0,this},o.prototype.setFrame=function(t,e,i){return r.prototype.setFrame.call(this,t,e,i),this.refreshDrawTint=!0,this},o.prototype.destroy=function(){Phaser.GameObjects.GameObject.prototype.destroy.call(this)},o);function o(){var t=null!==r&&r.apply(this,arguments)||this;return t.refreshDrawTint=!1,t}e.JDImage=s},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.JDText=e.JDTextAlign=void 0;var c,u,d=i(0),i=((i=c=e.JDTextAlign||(e.JDTextAlign={})).left="left",i.right="right",i.center="center",u=Phaser.GameObjects.Text,r(s,u),s);function s(t,e,i,n,r,s,o,a){void 0===o&&(o="#ffffff"),void 0===a&&(a=c.center);var h=this,l=d.Fonts.getTextMetrics(s);return(h=u.call(this,t,e,i,r,{fontFamily:n,fontSize:s+"px",color:o,align:a,metrics:l})||this).setOrigin(.5,.5),l||d.Fonts.setTextMetrics(s,h.style.metrics),h}e.JDText=i},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.JDTextInput=e.JDTextInputType=e.JDTextInputBg=void 0;var s,o,a,h=i(101),l=i(0),c=i(56),u=i(37),i=((i=s=e.JDTextInputBg||(e.JDTextInputBg={}))[i.none=0]="none",i[i.both=1]="both",i[i.bg=2]="bg",i[i.border=3]="border",(i=o=e.JDTextInputType||(e.JDTextInputType={})).text="text",i.password="password",i.number="number",a=Phaser.GameObjects.Container,r(d,a),d.prototype.renderWebGL=function(t,e,i,n){a.prototype.renderWebGL.call(this,t,e,i,n),!1===this.inputText.visible&&c.InputField.render(i,n)},d.prototype.renderCanvas=function(t,e,i,n){a.prototype.renderCanvas.call(this,t,e,i,n),!1===this.inputText.visible&&c.InputField.render(i,n)},d.prototype.inputDown=function(){this.inputText.visible=!1,c.InputField.onTxtIn(this),this.emit(d.EVENT_FOCUS_IN,this)},d.prototype.inputUp=function(t,e){!1===this.inputText.visible&&this.inputBox!==e[0]&&c.InputField.onFocusOut()},d.prototype.onFocusOut=function(t){this.inputText.visible=!0,this.updateText(t),this.emit(d.EVENT_FOCUS_OUT,this)},d.prototype.updateText=function(t){this.realText=t=t||"";var e=this.options.bgWidth-2*this.options.textBorderOffX;if(this.options.type===o.password){this.inputText.text=this.checkPlaceHolder("");for(var i=0;i<this.realText.length&&(this.inputText.text+="•",!(this.inputText.width>e));i++);}else for(t=this.checkPlaceHolder(t),this.inputText.text=t;this.inputText.width>e;)this.inputText.text=this.inputText.text.slice(0,-1)},d.prototype.checkPlaceHolder=function(t){return 0===this.realText.length&&this.options.placeHolder?(t=this.options.placeHolder,this.options.placeHolderColor&&this.inputText.setColor(this.options.placeHolderColor)):this.inputText.style.color!==this.options.fontColor&&this.inputText.setColor(this.options.fontColor),t},Object.defineProperty(d.prototype,"text",{get:function(){return this.realText},set:function(t){this.updateText(t)},enumerable:!1,configurable:!0}),d.prototype.getInput=function(){return this.inputBox.input},d.prototype.destroy=function(){this.scene.input.off(Phaser.Input.Events.POINTER_DOWN,this.inputUp,this),a.prototype.destroy.call(this),this.options=null,this.inputBox=null,this.inputText=null},d.EVENT_FOCUS_IN="EVENT_FOCUS_IN",d.EVENT_FOCUS_OUT="EVENT_FOCUS_OUT",d);function d(t,e,i,n){void 0===n&&(n={});e=a.call(this,t,e,i)||this;return e.options=n,e.options.text=void 0===n.text?"":n.text,e.options.fontFamily=void 0===n.fontFamily?l.Fonts.Main:n.fontFamily,e.options.fontSize=void 0===n.fontSize?30:n.fontSize,e.options.fontColor=void 0===n.fontColor?"#000000":n.fontColor,e.options.textAlign=void 0===n.textAlign?u.JDTextAlign.left:n.textAlign,e.options.textAlignVertical=void 0===n.textAlignVertical?.5:n.textAlignVertical,e.options.textBorderOffX=void 0===n.textBorderOffX?0:n.textBorderOffX,e.options.textBorderOffY=void 0===n.textBorderOffY?0:n.textBorderOffY,e.options.type=n.type||o.text,e.options.inputTextColor=void 0===n.inputTextColor?e.options.fontColor:n.inputTextColor,e.realText=e.options.text,e.inputText=new Phaser.GameObjects.Text(t,0,e.options.textBorderOffY,"",{fontFamily:e.options.fontFamily,fontSize:e.options.fontSize+"px",color:e.options.fontColor,align:e.options.textAlign}),e.options.textAlign===u.JDTextAlign.left?(e.inputText.setOrigin(0,e.options.textAlignVertical),e.inputText.x=e.options.textBorderOffX):e.options.textAlign===u.JDTextAlign.center?e.inputText.setOrigin(.5,e.options.textAlignVertical):e.options.textAlign===u.JDTextAlign.right&&(e.inputText.setOrigin(1,e.options.textAlignVertical),e.inputText.x=-e.options.textBorderOffX),e.options.bgShow=void 0===n.bgShow?s.both:n.bgShow,e.options.bgWidth=void 0===n.bgWidth?e.inputText.width:n.bgWidth,e.options.bgHeight=void 0===n.bgHeight?e.inputText.height:n.bgHeight,e.options.bgRadius=void 0===n.bgRadius?0:n.bgRadius,e.options.bgColor=void 0===n.bgColor?16777215:n.bgColor,e.options.bgBorderThickness=void 0===n.bgBorderThickness?2:n.bgBorderThickness,e.options.bgBorderColor=void 0===n.bgBorderColor?0:n.bgBorderColor,e.inputBox=new h.InputBox(t,e.options,e.inputText.originX,e.inputText.originY),e.add(e.inputBox),e.add(e.inputText),e.inputBox.on(Phaser.Input.Events.POINTER_DOWN,e.inputDown,e),e.scene.input.on(Phaser.Input.Events.POINTER_DOWN,e.inputUp,e),e.updateText(e.realText),e}e.JDTextInput=i},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.World=e.GameStates=void 0;var o,s,a=i(107),h=i(2),l=i(17),c=i(21),u=i(11),d=i(18),p=i(23),f=i(4),g=i(0),m=i(19),y=i(20),v=i(7),x=i(9),i=((i=o=e.GameStates||(e.GameStates={}))[i.Loading=0]="Loading",i[i.Playing=1]="Playing",i[i.MainMenu=2]="MainMenu",i[i.Skins=3]="Skins",i[i.Pause=4]="Pause",s=a.WorldCreator,r(b,s),b.prototype.create=function(){s.prototype.create.call(this),this.firstSpawn=!1,this.currLevelID=h.BalanceData.mainmenuID,this.state=o.MainMenu,!0===this.skipMenu?this.showSubSceneTransition(m.SubSceneList.Hub):this.showSubMenu(),this.game.events.on(Phaser.Core.Events.BLUR,this.onFocusLost,this),this.game.events.on(Phaser.Core.Events.FOCUS,this.onFocusFound,this),this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.T).on("down",this.finishLevel,this)},b.prototype.showPanelTrophies=function(){this.pauseState(),this.panelManager.show(c.PanelList.PanelTrophies)},b.prototype.showPanelDailyTask=function(){this.pauseState(),this.panelManager.show(c.PanelList.PanelDailyTasks)},b.prototype.showSubSceneTransition=function(t,e,i){void 0===e&&(e=-1),void 0===i&&(i=!1),!0!==this.transition.visible&&(t===m.SubSceneList.Menu?this.transition.beginTransition(this.showSubMenu,this):t===m.SubSceneList.Hub?(this.preparePlayingScene(),this.transition.beginTransition(this.showSubHub,this)):t===m.SubSceneList.Act?(this.preparePlayingScene(),this.transition.beginTransition(this.showSubAct,this,e,i)):t===m.SubSceneList.Tower?(this.preparePlayingScene(),this.transition.beginTransition(this.showSubTower,this,!0===this.firstSession?0:e)):t===m.SubSceneList.Vex?(this.preparePlayingScene(),this.transition.beginTransition(this.showSubVex,this,e,i)):t===m.SubSceneList.SkinsRarity&&this.transition.beginTransition(this.showSubSkinRarity,this,e),this.state=o.Loading)},b.prototype.backFromSubSkin=function(){this.prevLevelID===h.BalanceData.mainmenuID?this.showSubSceneTransition(m.SubSceneList.Menu):this.prevLevelID===h.BalanceData.hubID?this.showSubSceneTransition(m.SubSceneList.Hub):this.showSubSceneTransition(m.SubSceneList.Act,Number(this.prevLevelID),this.isCurrLevelHard)},b.prototype.showSubSkinRarity=function(t){this.resetSubScene(),this.keys.hide(),this.currLevelID="skin"+t,this.state=o.Skins,this.showSubScene(m.SubSceneList.SkinsRarity)},b.prototype.showSubMenu=function(){l.SaveGame.getInstance().saveProgress(),this.resetSubScene(),this.keys.show(),this.state=o.MainMenu,this.showSubScene(m.SubSceneList.Menu)},b.prototype.resetSubScene=function(){this.prevLevelID=this.currLevelID,this.destroyLevel(),this.timerLive=!1,this.currLevelID=h.BalanceData.mainmenuID,this.setCameraZero(),this.zoomTo(1,!0),this.backgroundStaticPos()},b.prototype.preparePlayingScene=function(){this.lookingAround=!1,h.BalanceData.levelMapStartTime||(h.BalanceData.levelMapStartTime=Date.now()),l.SaveGame.getInstance().saveProgress(),this.state===o.MainMenu?this.prevLevelID=h.BalanceData.mainmenuID:(this.prevLevelID=this.currLevelID,this.currSubScene!==m.SubSceneList.Hub&&this.prevLevelID===h.BalanceData.mainmenuID||(this.prevLevelID=this.currLevelID))},b.prototype.beforeStartPlayingScene=function(t,e){this.currLevelID!==h.BalanceData.mainmenuID&&this.prevLevelID===h.BalanceData.hubID&&l.SaveGame.getInstance().removeCheckPoint(),this.prevLevelID!==h.BalanceData.mainmenuID&&(this.prevLevelID=this.currLevelID),this.isCurrLevelHard=e,this.currLevelID=""+t,this.currentLevel=this.getLevel(this.currLevelID),this.effectsOverlay.hideFlash(),this.destroyLevel()},b.prototype.startPlayingScene=function(t){this.resetVars(),this.towerEndY=0,this.createLevelPlayerSpawn(!1===t?this.currentLevel.data:this.currentLevel.dataHard),this.startPlayingSceneNoCreateLevel()},b.prototype.startPlayingSceneNoCreateLevel=function(){this.firstSpawn=!1,this.timerLive=!1,this.currentTime=null,this.currentDeaths=0,this.currentMoney=0,this.state=o.Playing,this.keys.show(),0===h.BalanceData.levelsCompleted?this.keys.setAlpha(.8):1===h.BalanceData.levelsCompleted?this.keys.setAlpha(.5):this.keys.setAlpha(.3),this.setCameraOnPlayer()},b.prototype.startPlayingScene2=function(){h.BalanceData.actStartTime=Date.now(),this.subScene.enterLevel(!1),this.setBackgrounColor(),this.updateParallax()},b.prototype.showSubHub=function(){this.beforeStartPlayingScene(h.BalanceData.hubID,this.isCurrLevelHard),this.showSubScene(m.SubSceneList.Hub),this.startPlayingScene(!1),u.SoundManager.playMusic("mus_hub"),this.setBackgrounColor(),this.subScene.updateDeaths(h.BalanceData.totalDeaths)},b.prototype.showSubAct=function(t,e){this.beforeStartPlayingScene(t,e),this.showSubScene(m.SubSceneList.Act),!0===g.Constants.IS_EDITOR?u.SoundManager.playMusic("mus_act1"):!0===e?u.SoundManager.playMusic("mus_act"+t+"hard"):u.SoundManager.playMusic("mus_act"+t),this.startPlayingScene(e),this.startPlayingScene2()},b.prototype.showSubVex=function(){this.beforeStartPlayingScene(h.BalanceData.vexID,!1),this.showSubScene(m.SubSceneList.Vex),u.SoundManager.playMusic("mus_vex"),this.startPlayingScene(!1),this.startPlayingScene2()},b.prototype.showSubTower=function(t){this.beforeStartPlayingScene(h.BalanceData.towerID,!1),this.showSubScene(m.SubSceneList.Tower),u.SoundManager.playMusic("mus_tower"),this.resetVars(),this.towerEndY=0,this.currHeroFloor=0,this.currTowerDifficult=0,this.minTowerDifficult=0,this.currPatternCompleted=0,this.prevTowerPattern=-1,t<0?(this.minTowerPattern=1,this.addNextRandomTower()):(this.minTowerPattern=0,this.createBonusLevel(this.currentLevel.data[this.currTowerDifficult][t]),this.firstSession=!1,this.minTowerPattern=1),this.startPlayingSceneNoCreateLevel(),this.startPlayingScene2()},b.prototype.createBonusLevel=function(t){this.createTowerWalls(),0===this.towerEndY?this.createLevelPlayerSpawn(JSON.parse(JSON.stringify(t))):this.createLevel(JSON.parse(JSON.stringify(t)))},b.prototype.addNextRandomTower=function(){for(var t,e=f.Tools.random(this.minTowerDifficult,this.currTowerDifficult);(t=f.Tools.random(this.minTowerPattern,this.currentLevel.data[this.currTowerDifficult].length-1))===this.prevTowerPattern;);this.createBonusLevel(this.currentLevel.data[e][t]),this.prevTowerPattern=t},b.prototype.createNextPattern=function(){this.currPatternCompleted+=1,this.destroyLevel(!1),this.resetVars(),this.addNextRandomTower(),this.currPatternCompleted%3==0&&(!0===g.Constants.IS_AD_REWARD_AVAILABLE&&!1===this.player.isShield&&this.panelManager.show(c.PanelList.PanelPowerUp),this.currTowerDifficult<this.currentLevel.data.length-1&&(this.currTowerDifficult+=1),2<this.currTowerDifficult&&this.minTowerDifficult<this.currTowerDifficult&&(this.minTowerDifficult+=1),this.minTowerPattern=0)},b.prototype.finishTowerStage=function(){this.timerLive=!1,this.player.hide(),!0===g.Constants.IS_AD_REWARD_AVAILABLE&&!1===this.panelManager.isExist(c.PanelList.PanelTowerDefeat)?this.panelManager.show(c.PanelList.PanelTowerDefeat):this.showTowerCompletePanel(),this.pauseWorld()},b.prototype.showTowerCompletePanel=function(){this.panelManager.show(c.PanelList.PanelTowerComplete),p.DailyTask.saveData(p.TaskID.playTowerOfTerror)},b.prototype.restartTowerStage=function(){this.firstSpawn=!1,this.zoomTo(this.zoomStart,!0),this.resetLevel(!1),this.setCameraOnPlayer(),this.resumeWorld()},b.prototype.finishLevel=function(){this.pauseWorld();var t=Number(this.currLevelID);t>h.BalanceData.levelsCompleted&&(h.BalanceData.levelsCompleted=t),p.DailyTask.saveData(p.TaskID.completeLevel,t),p.DailyTask.saveData(p.TaskID.completeAny3Levels),this.currLevelID===h.BalanceData.vexID?(d.Achievements.saveAchive(d.TrophieAchieves.vex),x.AzerionSDK.analyticsSendEvent("unlock_act_vexation")):d.Achievements.completeAct(Number(this.currLevelID),this.isCurrLevelHard),this.panelManager.show(c.PanelList.PanelLevelComplete),this.currentLevel.complete(h.BalanceData.actFinishTime,this.currentDeaths,this.isCurrLevelHard)},b.prototype.updateProgressTnt=function(t){this.subScene.updateProgressTnt&&this.subScene.updateProgressTnt(t)},b.prototype.resumeOnFinish=function(){this.showSubSceneTransition(m.SubSceneList.Hub),this.keys.show(),this.player.resume()},b.prototype.createSceneMainMenu=function(){this.resetVars(),this.spawnX=this.spawnY=0,this.state=o.MainMenu,u.SoundManager.playMusic("mus_menu")},b.prototype.checkpointTriggered=function(t){this.player.collideWithCheckPoint(t);for(var e=0;e<10;e++)this.particleManager.createColorParticle(t.xPos,t.yPos,10*Math.random()-5,-6-4*Math.random(),65280);u.SoundManager.playSFX("ding"),this.effectsOverlay.checkPoint(),this.currLevelID===h.BalanceData.hubID&&l.SaveGame.getInstance().saveCheckPoint(t.xPos,t.yPos);for(var i=0,n=this.obstacles;i<n.length;i++){var r=n[i];!0===r.alive&&r instanceof y.BulletMissile&&r.die()}},b.prototype.portToActBlock=function(t){this.panelManager.hideAll(),this.resumeWorld(),this.lookingAround=!1,this.player.portToActBlock(this.actBlocks[t+"false"].xPos,this.actBlocks[t+"false"].topEdge),this.setCameraOnPlayer(),this.startGamePlay()},b.prototype.collectCoin=function(){this.currentMoney+=1,!1===this.isTower()?(h.BalanceData.totalMoney+=1,p.DailyTask.saveData(p.TaskID.collectCoins)):h.BalanceData.totalTowerMoney+=1,this.subScene.updateMoney(this.currentMoney)},b.prototype.update=function(){this.state===o.Playing?(this.updateLogic(),this.cameraLogic(),this.updateParallax()):this.state===o.MainMenu?(this.updateLogic(),this.moveBackground(-.5,-.5)):this.state===o.Skins&&this.moveBackground(-.5,-.5),s.prototype.update.call(this)},b.prototype.explodeComplete=function(){this.showSubSceneTransition(m.SubSceneList.Hub)},b.prototype.updateLogic=function(){this.currSubScene===m.SubSceneList.Hub?this.subScene.updateTime():this.currSubScene!==m.SubSceneList.Menu&&(this.currSubScene===m.SubSceneList.Tower&&(this.calcHeroFloor(),this.cameraY+this.getGameHalfHeight()-h.BalanceData.towerCellSize>this.towerEndY&&this.createNextPattern()),!0===this.timerLive&&(this.currentTime=h.BalanceData.actStartTime,this.subScene.updateTime()),!0===h.BalanceData.autoReset&&!0===this.currentLevel.isTargetLevelComplete(this.isCurrLevelHard)&&Math.round(Date.now()-h.BalanceData.actStartTime)>this.currentLevel.getTopTime(this.isCurrLevelHard)&&this.resetLevel(!0)),!1===d.Achievements.isAchieveCompleted(d.TrophieAchieves.playHour)&&!0===v.Helpers.isAnHour(Date.now()-h.BalanceData.levelMapStartTime)&&d.Achievements.saveAchive(d.TrophieAchieves.playHour),s.prototype.updateLogic.call(this),this.effectsOverlay.update()},b.prototype.calcHeroFloor=function(){this.currHeroFloor=Math.floor((this.player.yPos-10)/h.BalanceData.towerCellSize),500<=this.currHeroFloor?d.Achievements.saveAchive(d.TrophieTower.floors500):100<=this.currHeroFloor?d.Achievements.saveAchive(d.TrophieTower.floors100):10<=this.currHeroFloor&&d.Achievements.saveAchive(d.TrophieTower.floors10)},b.prototype.reset=function(){this.currentTime=Date.now();for(var t=0,e=this.blocks;t<e.length;t++)e[t].reset();for(var i=0,n=this.obstacles;i<n.length;i++)n[i].reset();for(var r=0,s=this.items;r<s.length;r++)s[r].reset();this.effectsOverlay.goLight(),this.state!==o.MainMenu&&this.keys.show()},b.prototype.resetLevel=function(t){if(void 0===t&&(t=!0),this.currSubScene!==m.SubSceneList.Menu){this.effectsOverlay.goLight();for(var e=0,i=this.obstacles;e<i.length;e++)i[e].resetLevel();for(var n=0,r=this.blocks;n<r.length;n++)r[n].resetLevel();for(var s=0,o=this.items;s<o.length;s++)o[s].resetLevel();this.wireTrail&&this.wireTrail.resetLevel(),this.player.spawn({x:this.spawnX,y:this.spawnY}),this.subScene.resetLevel(),this.currentDeaths=0,this.subScene.updateDeaths(this.currentDeaths),!0===t&&(this.currentTime=null,h.BalanceData.actStartTime=Date.now())}},b.prototype.resize=function(){s.prototype.resize.call(this),this.checkResizePauseResume(),this.state===o.Playing&&this.player?this.setCameraOnPlayer():this.backgroundStaticPos()},b.prototype.checkResizePauseResume=function(){!0===h.BalanceData.incorrectOrientation?this.onFocusLost():this.resumeMenu()},b.prototype.onFocusLost=function(){if(!0!==x.AzerionSDK.isAdPlaying()&&this.panelManager.currentPanel===c.PanelList.NoOne){if(this.state===o.Playing)this.currSubScene===m.SubSceneList.Hub?this.panelManager.show(c.PanelList.PanelOptionsHub):this.panelManager.show(c.PanelList.PanelPause);else if(this.state===o.MainMenu)this.panelManager.show(c.PanelList.PanelOptionsMenu);else if(this.state===o.Skins)return;this.pauseState()}},b.prototype.onFocusFound=function(){!0!==x.AzerionSDK.isAdPlaying()&&this.resumeMenu()},b.prototype.pauseWorld=function(){h.BalanceData.mapPausedTime=Date.now(),h.BalanceData.actPausedTime=h.BalanceData.mapPausedTime,this.player.pause(),this.pauseState(),this.events.emit("pauseWorld")},b.prototype.pauseState=function(){this.state=o.Pause,this.keys.hide()},b.prototype.resumeWorld=function(){var t=Date.now();h.BalanceData.levelMapStartTime+=t-h.BalanceData.mapPausedTime,h.BalanceData.actStartTime+=t-h.BalanceData.actPausedTime,this.state=o.Playing,this.player.resume(),this.keys.show(),this.events.emit("resumeWorld")},b.prototype.resumeMenu=function(){this.state===o.Pause&&this.currSubScene===m.SubSceneList.Menu&&this.panelManager.currentPanel===c.PanelList.NoOne&&(this.state=o.MainMenu,this.player.resume(),this.keys.show())},b.prototype.startGamePlay=function(){!1===this.firstSpawn&&(this.firstSpawn=!0,this.timerLive=!0,this.currLevelID!==h.BalanceData.mainmenuID&&this.cameraZoom!==this.zoomDefault&&!1===g.Constants.IS_EDITOR&&this.zoomTo(this.zoomDefault))},b.prototype.isTargetLevelComplete=function(){return Number(this.currentLevel.isTargetLevelComplete(this.isCurrLevelHard))},b.prototype.isTargetCoinsComplete=function(){return this.currentLevel.isTargetCoinsComplete(this.isCurrLevelHard)},b.prototype.isTargetDeathComplete=function(){return this.currentLevel.isTargetDeathComplete(this.isCurrLevelHard)},b.prototype.completeTargetCoins=function(){this.currentLevel.completeTargetCoins(this.isCurrLevelHard)},b.prototype.completeTargetDeath=function(){this.currentLevel.completeTargetDeath(this.isCurrLevelHard)},b.prototype.getTargetCoins=function(){return this.currentLevel.getTargetCoins(this.isCurrLevelHard)},b.prototype.getTargetDeath=function(){return this.currentLevel.getTargetDeath(this.isCurrLevelHard)},b.Name="world",b);function b(){var t=null!==s&&s.apply(this,arguments)||this;return t.skipMenu=!1,t.currHeroFloor=0,t.firstSession=!0,t}e.World=i},function(t,e,i){"use strict";var n,s,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),i=(Object.defineProperty(e,"__esModule",{value:!0}),e.Particle=void 0,s=i(13).Entity,r(o,s),o.prototype.spawnBase=function(t,e,i,n){this.xPos=t,this.yPos=e,this.xVelocity=i,this.yVelocity=n,this.hitBoxPolygon=this.hitBox.toPolygon(),this.fadeTime=0,this.alive=!0,this.water=!1,this.onIce=!1,this.updateHitBox()},o.prototype.updateHitBox=function(){this.hitBoxPolygon.pos.x=this.xPos-this.halfSize,this.hitBoxPolygon.pos.y=this.yPos-this.halfSize},o.prototype.destroy=function(t){void 0===t&&(t=!1),this.hitBoxPolygon=null,this.hitBox=null,t?--this.main.particleManager.particleUINum:--this.main.particleManager.particleNum,this.alive=!1,s.prototype.destroy.call(this)},o.prototype.multAlpha=function(t){},o.prototype.update=function(){this.alive&&(this.getWater(),!0===this.water?(this.xPos+=.1*this.xVelocity,this.yPos+=.5*this.yVelocity,this.liquid&&(this.yPos+=.5*this.yVelocity,-1<this.yVelocity&&(this.yVelocity-=.05))):(this.xPos+=this.xVelocity,this.yPos+=this.yVelocity),!0===this.collide&&this.yVelocity<12&&(!0===this.water?!1===this.liquid&&(this.yVelocity+=.25*this.main.gravity):this.yVelocity+=this.main.gravity),!0===this.water||!0===this.onIce?this.xVelocity*=.99:this.xVelocity*=.95,Math.abs(this.xVelocity)<.1&&(this.xVelocity=0),!0===this.collide&&this.runCollisions())},o.prototype.runCollisions=function(){for(var t=0;t<this.main.blocks.length;t++){var e=this.main.blocks[t];if(!1!==e.alive)if(!0!==SAT.testPolygonPolygon(this.hitBoxPolygon,e.topPolygon))if(!0===SAT.testPolygonPolygon(this.hitBoxPolygon,e.bottomPolygon)&&this.yVelocity<0)this.yVelocity*=-.5,this.yPos=e.bottomEdge,0<this.xVelocity?this.xVelocity-=.1:this.xVelocity<0&&(this.xVelocity+=.1),this.yPos+=this.yVelocity;else if(!0!==SAT.testPolygonPolygon(this.hitBoxPolygon,e.leftPolygon))if(!0!==SAT.testPolygonPolygon(this.hitBoxPolygon,e.rightPolygon)){for(var i=0,n=this.main.pools;i<n.length;i++){var r=n[i];if(SAT.testPolygonPolygon(this.hitBoxPolygon,r.totalPolygon)){if(!0===this.liquid&&!1===this.water)return void this.destroy(this.isUI);!1===this.water&&(this.yVelocity=0),this.water=!0}}if(!0===this.liquid&&!1===this.water)return void this.destroy(this.isUI)}else this.xVelocity*=-.5,this.xPos=e.rightEdge+this.halfSize,this.xPos+=this.xVelocity;else this.xVelocity*=-.5,this.xPos=e.leftEdge-this.halfSize,this.xPos+=this.xVelocity;else 4<=this.yVelocity?this.yVelocity*=-.25:1<=this.yVelocity&&(this.yVelocity=0),this.yPos=e.topEdge-this.halfSize,this.xPos+=e.xVelocity,"speed"===e.type&&(this.xVelocity+=e.speedInc),"ice"===e.type&&(this.onIce=!0)}},o.prototype.getWater=function(){this.water=!1;for(var t=0,e=this.main.pools;t<e.length;t++){var i=e[t];if(SAT.testPolygonPolygon(this.hitBoxPolygon,i.totalPolygon)){this.water=!0;break}}},o);function o(t,e,i,n,r){t=s.call(this,t)||this;return t.fadeAfter=150,t.size=e,t.halfSize=t.size/2,t.hitBox=new SAT.Box(new SAT.Vector(0,0),e,e),t.collide=i,t.alive=!1,t.fadeAfter=r,t.liquid=n,t}e.Particle=i},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GameKeys=e.KeyPressed=void 0;var n,r=i(0),s=i(32),o=i(39),i=((i=n=e.KeyPressed||(e.KeyPressed={})).left="l",i.right="r",i.up="u",i.down="d",i.punch="punch",a.prototype.isKeyPressed=function(t){return this.isPressed[t]},a.prototype.setPressed=function(t,e){this.isPressed[t]!==e&&(this.isPressed[t]=e,this.scene.player.keyPressed(t,e))},a.prototype.onKeyDown=function(t){!0!==this.disable&&((t=t.keyCode)===Phaser.Input.Keyboard.KeyCodes.A||t===Phaser.Input.Keyboard.KeyCodes.LEFT?this.setPressed(n.left,!0):t===Phaser.Input.Keyboard.KeyCodes.D||t===Phaser.Input.Keyboard.KeyCodes.RIGHT?this.setPressed(n.right,!0):t===Phaser.Input.Keyboard.KeyCodes.W||t===Phaser.Input.Keyboard.KeyCodes.UP?this.setPressed(n.up,!0):t===Phaser.Input.Keyboard.KeyCodes.S||t===Phaser.Input.Keyboard.KeyCodes.DOWN?this.setPressed(n.down,!0):t===Phaser.Input.Keyboard.KeyCodes.SPACE&&this.setPressed(n.punch,!0))},a.prototype.onKeyUp=function(t){!0!==this.disable&&((t=t.keyCode)===Phaser.Input.Keyboard.KeyCodes.A||t===Phaser.Input.Keyboard.KeyCodes.LEFT?this.setPressed(n.left,!1):t===Phaser.Input.Keyboard.KeyCodes.D||t===Phaser.Input.Keyboard.KeyCodes.RIGHT?this.setPressed(n.right,!1):t===Phaser.Input.Keyboard.KeyCodes.W||t===Phaser.Input.Keyboard.KeyCodes.UP?this.setPressed(n.up,!1):t===Phaser.Input.Keyboard.KeyCodes.S||t===Phaser.Input.Keyboard.KeyCodes.DOWN?this.setPressed(n.down,!1):t===Phaser.Input.Keyboard.KeyCodes.SPACE&&!0===this.scene.isTower()&&this.setPressed(n.punch,!1))},a.prototype.show=function(){!0===r.Constants.IS_MOBILE&&(this.scene.state===o.GameStates.MainMenu?this.checkMenu():this.showButtons())},a.prototype.showButtons=function(){this.circleMovement.show(),this.buttonJump.show(),this.buttonCrouch.show(),!0===this.scene.isTower()&&this.buttonAttack.show()},a.prototype.hide=function(){!0===r.Constants.IS_MOBILE&&this.hideButtons()},a.prototype.hideButtons=function(){this.circleMovement.hide(),this.buttonJump.hide(),this.buttonCrouch.hide(),this.buttonAttack.hide()},a.prototype.isScreenButtonDown=function(){return!0===r.Constants.IS_MOBILE&&(!0===this.circleMovement.isDown||!0===this.buttonJump.isDown||!0===this.buttonCrouch.isDown||!0===this.buttonAttack.isDown)},a.prototype.setAlpha=function(t){!0===r.Constants.IS_MOBILE&&(this.circleMovement.sprite.alpha=t,this.buttonJump.sprite.alpha=t,this.buttonCrouch.sprite.alpha=t,this.buttonAttack.sprite.alpha=t)},a.prototype.resetKeys=function(){this.setPressed(n.left,!1),this.setPressed(n.right,!1),this.setPressed(n.up,!1),this.setPressed(n.down,!1),this.setPressed(n.punch,!1)},a.prototype.resize=function(){var t;!0===r.Constants.IS_MOBILE&&(this.circleMovement.sprite.x=270-r.Constants.UI_SHIFT_X,this.circleMovement.sprite.y=440+r.Constants.UI_SHIFT_Y,t=r.Constants.GW+r.Constants.UI_SHIFT_X,this.buttonCrouch.sprite.x=t-520,this.buttonCrouch.sprite.y=this.circleMovement.sprite.y+70,this.buttonJump.sprite.x=t-200,this.buttonJump.sprite.y=this.buttonCrouch.sprite.y-100,this.buttonAttack.sprite.x=this.buttonJump.sprite.x,this.buttonAttack.sprite.y=this.buttonJump.sprite.y-320,this.scene.state===o.GameStates.MainMenu&&this.checkMenu())},a.prototype.checkMenu=function(){1560<this.buttonCrouch.sprite.x?this.showButtons():this.hideButtons()},a);function a(t,e){this.scene=t,this.disable=!1,this.isPressed={},this.isPressed[n.left]=!1,this.isPressed[n.right]=!1,this.isPressed[n.down]=!1,this.isPressed[n.up]=!1,!(this.isPressed[n.punch]=!1)===r.Constants.IS_MOBILE&&(this.circleMovement=new s.ControllerStick(this),e.add(this.circleMovement.sprite),this.buttonJump=new s.ControllerButton(this,"jumpButton 10000",n.up),e.add(this.buttonJump.sprite),this.buttonCrouch=new s.ControllerButton(this,"crouchButton 10000",n.down),e.add(this.buttonCrouch.sprite),this.buttonAttack=new s.ControllerButton(this,"attackButton 10000",n.punch),e.add(this.buttonAttack.sprite)),t.input.keyboard.on("keydown",this.onKeyDown,this),t.input.keyboard.on("keyup",this.onKeyUp,this)}e.GameKeys=i},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaseButton=void 0;var n=i(0),r=i(3);function s(t){this.isOver=!1,this.currPointerID=-1,this.soundDown=n.Constants.SFX_BTN_ON_DOWN,this.soundUp=n.Constants.SFX_BTN_ON_UP,this.tintOut=16777215,this.tintOver=13421772,this.scene=t}s.prototype.createView=function(t){this.view=t,this.view.once(Phaser.GameObjects.Events.DESTROY,this.destroyInternal,this)},s.prototype.initEvents=function(t,e,i,n){t.setInteractive(e,i,n),t.input.cursor="pointer",t.on(Phaser.Input.Events.POINTER_DOWN,this.inputDown,this),this.scene.input.on(Phaser.Input.Events.POINTER_UP,this.inputUp,this),t.on(Phaser.Input.Events.POINTER_OUT,this.inputOut,this),t.on(Phaser.Input.Events.POINTER_OVER,this.inputOver,this),this.interactiveElement=t},s.prototype.setTintInteractive=function(t,e){this.tintOut=t,this.tintOver=e,this.inputOut()},s.prototype.inputOut=function(){!(this.isOver=!1)===this.interactiveElement.input.enabled&&(this.interactiveElement.tint=this.tintOut)},s.prototype.inputOver=function(){(this.isOver=!0)===this.interactiveElement.input.enabled&&(this.interactiveElement.tint=this.tintOver)},s.prototype.inputDown=function(t){this.currPointerID=t.id,this.downState(),this.downComplete()},s.prototype.downState=function(){},s.prototype.upState=function(){},s.prototype.inputUp=function(t){0<=this.currPointerID&&this.upState(),!1!==this.isOver&&this.currPointerID===t.id?(this.currPointerID=-1,this.upComplete()):this.currPointerID=-1},s.prototype.downComplete=function(){this.onDown&&this.onDown(),this.soundDown&&r.SoundManager.playSFX(this.soundDown)},s.prototype.upComplete=function(){this.onUp&&this.onUp(),this.soundUp&&r.SoundManager.playSFX(this.soundUp)},s.prototype.setXY=function(t,e){this.view.x=t,this.view.y=e},s.prototype.setInteraction=function(t){this.interactiveElement.input.enabled=t},Object.defineProperty(s.prototype,"x",{get:function(){return this.view.x},set:function(t){this.view.x=t},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"y",{get:function(){return this.view.y},set:function(t){this.view.y=t},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"scaleX",{get:function(){return this.view.scaleX},set:function(t){this.view.scaleX=t},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"scale",{get:function(){return this.view.scale},set:function(t){this.view.scale=t},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"scaleY",{get:function(){return this.view.scaleY},set:function(t){this.view.scaleY=t},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"visible",{get:function(){return this.view.visible},set:function(t){this.view.visible=t},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"alpha",{get:function(){return this.view.alpha},set:function(t){this.view.alpha=t},enumerable:!1,configurable:!0}),s.prototype.getView=function(){return this.view},s.prototype.getInteractiveElement=function(){return this.interactiveElement},s.prototype.destroyInternal=function(){this.view=null,this.interactiveElement=null,this.scene=null,this.onDown=null,this.onUp=null},s.prototype.destroy=function(){this.view.destroy()},e.BaseButton=s},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),a=(Object.defineProperty(e,"__esModule",{value:!0}),e.ButtonContainer=void 0,i(1)),i=(r=i(42).BaseButton,s(o,r),o.prototype.add=function(t){this.view.add(t)},o.prototype.addImageEvents=function(t,e,i,n,r,s){void 0===i&&(i=0),void 0===n&&(n=0),void 0===r&&(r=1),void 0===s&&(s=1),this.image=new Phaser.GameObjects.Image(this.scene,i,n,t,e),this.image.setScale(r,s),this.add(this.image),this.initEvents(this.image)},o.prototype.addIcon=function(t,e,i,n,r,s){void 0===i&&(i=0),void 0===n&&(n=0),void 0===r&&(r=1),void 0===s&&(s=1),this.icon=new Phaser.GameObjects.Image(this.scene,i,n,t,e),this.icon.setScale(r,s),this.add(this.icon)},o.prototype.addTxt=function(t,e,i,n,r,s,o){this.txt=new a.JDBmpdText(this.scene,s=void 0===s?0:s,o=void 0===o?0:o,e,t,i,n=void 0===n?16777215:n,r=void 0===r?1:r),this.add(this.txt)},o.prototype.addTxtFit=function(t,e,i,n,r,s,o){this.txtFit=new a.JDBmpdTextFit(this.scene,s=void 0===s?0:s,o=void 0===o?0:o,e,t,i,n=void 0===n?16777215:n,r=void 0===r?1:r),this.add(this.txtFit)},o.prototype.addTxtTranslated=function(t,e,i,n,r,s,o){this.txtTranslated=new a.JDBmpdTextTranslated(this.scene,s=void 0===s?0:s,o=void 0===o?0:o,e,t,i,n=void 0===n?16777215:n,r=void 0===r?1:r),this.add(this.txtTranslated)},o.prototype.destroyInternal=function(){r.prototype.destroyInternal.call(this),this.image=null,this.icon=null,this.txt=null,this.txtFit=null,this.txtTranslated=null},o);function o(t,e,i){var n=r.call(this,t)||this;return n.createView(new Phaser.GameObjects.Container(t,e,i)),n}e.ButtonContainer=i},function(t,e,i){"use strict";var n,s,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),i=(Object.defineProperty(e,"__esModule",{value:!0}),e.ButtonImage=void 0,s=i(42).BaseButton,r(o,s),Object.defineProperty(o.prototype,"flipX",{get:function(){return this.view.flipX},set:function(t){this.view.flipX=t},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"flipY",{get:function(){return this.view.flipY},set:function(t){this.view.flipY=t},enumerable:!1,configurable:!0}),o);function o(t,e,i,n,r){t=s.call(this,t)||this;return t.createView(new Phaser.GameObjects.Image(t.scene,e,i,n,r)),t.initEvents(t.view),t}e.ButtonImage=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.ClassicLaser=void 0,i(68)),a=i(4),h=i(3),i=(r=o.ClassicLaserStatic,s(l,r),l.prototype.initGraphic=function(){r.prototype.initGraphic.call(this),this.fireDistance=h.BalanceData.config_ClassicLaserFireDistance},l.prototype.spawn=function(t){t.rotation=a.Tools.PI05,r.prototype.spawn.call(this,t),this.spinDest=a.Tools.PI05,this.count=0},l.prototype.levelStart=function(){this.platforms=[];for(var t=new SAT.Circle(new SAT.Vector(this.xPos,this.yPos),this.fireDistance),e=0,i=this.main.blocks;e<i.length;e++){var n=i[e];SAT.testCirclePolygon(t,n.totalPolygon)&&this.platforms.push(n)}},l.prototype.update=function(){var t=this.main.player;!0===t.alive&&this.lookAtHero(t,a.Tools.distance(this.xPos,this.yPos,t.xPos,t.yPos)<=this.fireDistance)},l.prototype.lookAtHero=function(t,e){!0===e?!0===this.main.raycastToPlayerTwoLines(this.platforms,this.xPos,this.yPos)&&(this.count=0,this.spinDest=Math.atan2(t.yPos-t.halfHeight-this.yPos,t.xPos-this.xPos),r.prototype.update.call(this)):!0===this.bullet.alive&&this.count<10?(this.count+=1,this.spinDest=Math.atan2(t.yPos-t.halfHeight-this.yPos,t.xPos-this.xPos)):(this.shootTimer=0,this.spinDest=a.Tools.PI05),this.sprite.rotation+=a.Tools.getFollowRotationSpeedR(this.sprite.rotation,this.spinDest,.125)},l.prototype.resetLevel=function(){this.reset(),this.spinDest=a.Tools.PI05},l.prototype.destroy=function(){this.platforms=null,r.prototype.destroy.call(this)},l);function l(){return null!==r&&r.apply(this,arguments)||this}e.ClassicLaser=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.InvisBlock=void 0,i(5)),a=i(0),h=i(4),i=(r=o.Block,s(l,r),l.prototype.initGraphics=function(){this.sprite=new Phaser.GameObjects.Image(this.main,0,0,a.Atlases.gameplay,"invisBlock 10000"),this.container.add(this.sprite)},l.prototype.spawn=function(t){this.init(t.x,t.y,t.width,t.height),this.updateGraphicPosition(),this.container.setScale(this.width/100,this.height/100)},l.prototype.updateGraphicPosition=function(){this.container.x=this.xPos,this.container.y=this.yPos},l.prototype.update=function(){var t;!1!==this.alive&&(t=this.main.player,(t=h.Tools.distance(this.xPos,this.yPos,t.xPos,t.yPos))>this.RANGE?this.container.alpha=1:t<this.HALF_RANGE?this.container.alpha=0:this.container.alpha=(t-this.HALF_RANGE)/this.HALF_RANGE*1,this.xPos===this.prevX&&this.yPos===this.prevY||this.updatePosition(),this.prevX=this.xPos,this.prevY=this.yPos)},l.prototype.destroy=function(){this.sprite.destroy(),this.sprite=null,this.container.destroy(),this.container=null,r.prototype.destroy.call(this)},l.prototype.resetLevel=function(){this.reset()},l);function l(t,e){var i=r.call(this,t,e)||this;return i.RANGE=200,i.HALF_RANGE=100,i.container=new Phaser.GameObjects.Container(t),e.add(i.container),i.initGraphics(),i}e.InvisBlock=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.BasicSubSkins=void 0,i(33)),a=i(3),h=i(2),l=i(17),c=i(25),i=(r=o.BasicSubScene,s(u,r),u.prototype.init=function(){r.prototype.init.call(this),this.title=new c.PSkinTitle(this.scene),this.add(this.title),this.coins=new c.PSkinMoney(this.scene),this.add(this.coins),this.spineContainer=this.scene.make.spineContainer({}),this.add(this.spineContainer)},u.prototype.moveSpineContainerTop=function(){this.moveTo(this.spineContainer,this.length-1)},u.prototype.back=function(){this.scene.backFromSubSkin()},u.prototype.addMoney=function(t,e){!0===a.SkinsData.isTowerRarity(e)?h.BalanceData.totalTowerMoney+=t:h.BalanceData.totalMoney+=t,this.coins.updateCoins(),l.SaveGame.getInstance().saveProgress()},u.prototype.resize=function(){this.title.resize(),this.coins.resize()},u.prototype.destroy=function(){r.prototype.destroy.call(this),this.title=null,this.coins=null,this.spineContainer=null},u);function u(){return null!==r&&r.apply(this,arguments)||this}e.BasicSubSkins=i},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BasicSkinRarity=void 0;var a=i(0),h=i(1),l=i(3),n=i(7);function r(t,e){this.subscene=t,this.rarity=e}r.prototype.create=function(t,e,i,n,r,s,o){this.subscene.add(new Phaser.GameObjects.Image(this.subscene.scene,t,e,l.TexturesEdit.getPanelBgTexture(this.subscene.scene,340,n)));e=new Phaser.GameObjects.Image(this.subscene.scene,t,e-n/2+42,a.Atlases.gameplay,"whiteBlock 10000"),e.displayWidth=326,e.displayHeight=70,e.setTint(4950515,180474,4950515,180474),this.subscene.add(e),this.imgSkin=new h.JDSpineGameObject(this.subscene.scene,t,i+100,"player","stand"),this.subscene.spineContainer.add(this.imgSkin.getView()),this.setImgSkin(r),this.imgSkin.scaleX=this.imgSkin.scaleY=6.5,n=new h.JDBmpdTextTranslated(this.subscene.scene,t,e.y,a.Fonts.Main,s,40,o);n.setFitSize(290),this.subscene.add(n)},r.prototype.setImgSkin=function(t){this.imgSkin.setSkin(n.Helpers.formatNumberZeroLess10(t))},r.prototype.spin=function(t){},r.prototype.destroy=function(){this.subscene=null,this.imgSkin=null},e.BasicSkinRarity=r},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.Key=void 0,i(0)),a=i(8),h=i(4),i=(r=i(12).Item,s(l,r),l.prototype.init=function(t,e,i){this.sprite=new Phaser.GameObjects.Image(this.main,0,0,o.Atlases.gameplay,e),t.add(this.sprite),this.lineGraphic=new Phaser.GameObjects.Image(this.main,0,0,o.Atlases.gameplay,"whiteLine 10000"),this.lineGraphic.setOrigin(0,.5),this.lineGraphic.tint=i,t.add(this.lineGraphic)},l.prototype.spawn=function(t){this.xPos=t.x,this.yPos=t.y,this.startX=this.xPos,this.startY=this.yPos,this.xVelocity=0,this.yVelocity=0,this.sprite.x=this.xPos,this.sprite.y=this.yPos,this.hitBoxPolygon.pos.x=this.xPos,this.hitBoxPolygon.pos.y=this.yPos,this.alive=!0,this.used=!1,this.keyNum=0,this.saveUse=!1,this.following=!1,this.lineGraphic.visible=!1,this.rad=0},l.prototype.useKey=function(){this.used=!0,this.lineGraphic.visible=!1,this.sprite.visible=!1,this.alive=!1},l.prototype.followPlayer=function(){var t,e=10*(this.keyNum-1),i=(this.rad=h.Tools.toRad(-4*this.player.xVelocity),this.yVelocity<0&&(this.yVelocity+=.5),this.yPos+=this.yVelocity,e=this.player.swimming?(t=this.player.xPos,this.player.yPos-e):(t=this.player.facing===a.FacingDir.Right?this.player.xPos-30:this.player.xPos+30,this.player.yPos-6-e),t-this.xPos),n=e-this.yPos;this.xPos+=i/5,this.yPos+=n/5,Math.abs(i)<1&&(this.xPos=t),Math.abs(n)<1&&(this.yPos=e),this.hitBoxPolygon.pos.x=this.xPos,this.hitBoxPolygon.pos.y=this.yPos},l.prototype.runCollisions=function(){for(var t=0,e=this.main.blocks;t<e.length;t++){var i=e[t];i.alive&&(SAT.testPolygonPolygon(i.topPolygon,this.hitBoxPolygon)?(this.player.xVelocity<5?this.yVelocity=this.player.xVelocity*this.player.xVelocity*-.2:this.yVelocity=-5,this.yPos=i.topEdge-20,this.hitBoxPolygon.pos.y=this.yPos):SAT.testPolygonPolygon(i.rightPolygon,this.hitBoxPolygon)?this.xPos=i.rightEdge+11:SAT.testPolygonPolygon(i.leftPolygon,this.hitBoxPolygon)?this.xPos=i.leftEdge-11:SAT.testPolygonPolygon(i.bottomPolygon,this.hitBoxPolygon)&&(this.yVelocity*=-1,this.yPos=i.bottomEdge+21))}},l.prototype.collideWithHero=function(){this.player.collideWithKey(this)},l.prototype.update=function(){!1!==this.alive&&(!0!==this.used?!0===this.following?(this.followPlayer(),this.runCollisions(),this.player.currentPole?this.updateLineToPlayer(this.player.xPos,this.player.yPos-31):this.player.crouching?this.updateLineToPlayer(this.player.xPos,this.player.yPos-6):this.updateLineToPlayer(this.player.xPos,this.player.yPos-16),this.updatePositions()):!0===SAT.testPolygonPolygon(this.player.bodyPolygon,this.hitBoxPolygon)&&(this.following=!0,this.lineGraphic.visible=!0,this.collideWithHero()):.1<this.sprite.scaleX?(this.sprite.scaleX-=.1,this.sprite.scaleY=this.sprite.scaleX,this.rad-=h.Tools.toRad(5),this.sprite.rotation=this.rad):(this.alive=!1,this.sprite.visible=!1))},l.prototype.updateLineToPlayer=function(t,e){this.lineGraphic.x=this.xPos,this.lineGraphic.y=this.yPos,this.lineGraphic.displayWidth=h.Tools.distance(this.xPos,this.yPos,t,e),this.lineGraphic.rotation=h.Tools.angleOfPoints(this.xPos,this.yPos,t,e)},l.prototype.reset=function(){!1===this.used&&(this.xPos=this.startX,this.yPos=this.startY,this.updatePositions(),this.following=!1,this.lineGraphic.visible=!1)},l.prototype.resetLevel=function(){this.xPos=this.startX,this.yPos=this.startY,this.updatePositions(),this.sprite.setScale(1,1),this.used=!1,this.alive=!0,this.sprite.visible=!0,this.lineGraphic.visible=!1,this.following=!1},l.prototype.updatePositions=function(){this.sprite.x=this.xPos,this.sprite.y=this.yPos,this.hitBoxPolygon.pos.x=this.xPos,this.hitBoxPolygon.pos.y=this.yPos},l.prototype.destroy=function(){this.sprite.destroy(),this.sprite=null,this.hitBoxPolygon=null,this.lineGraphic.destroy(),this.lineGraphic=null,this.player=null,r.prototype.destroy.call(this)},l);function l(t,e){t=r.call(this,t)||this;return t.init(e,"key 10000",16763904),t.hitBoxPolygon=new SAT.Box(new SAT.Vector(0,0),20,40).toPolygon(),t.hitBoxPolygon.setOffset(new SAT.Vector(-10,-20)),t.player=t.main.player,t}e.Key=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.BasicFade=void 0,i(4)),i=(r=i(12).Item,s(a,r),a.prototype.spawn=function(t){this.id=t.textNum,this.xPos=t.x,this.yPos=t.y,this.sprite.x=this.xPos,this.sprite.y=this.yPos,this.sprite.rotation=o.Tools.toRad(t.rotation),this.sprite.scale=this.startScale,this.sprite.visible=!0,this.sprite.alpha=0,this.reappear=0,this.alive=!0,this.canAppear=!1,this.canDisappear=!1},a.prototype.update=function(){var t,e=o.Tools.distance(this.main.player.xPos,this.main.player.yPos,this.xPos,this.yPos);e<this.appearDistSq?(this.canAppear=!0,this.canDisappear=!1):e>this.disappearDistSq&&(this.canDisappear=!0),!0===this.canAppear?(this.sprite.alpha-=.25*(this.sprite.alpha-1),t=this.sprite.scaleX,(t-=.25*(t-this.startScale))>=this.startScale-.01&&(this.canAppear=!1,this.reappear=0),this.sprite.scale=t):!0===this.canDisappear&&(this.reappear>=this.reappearTime?(this.sprite.alpha-=.25*this.sprite.alpha,t=this.sprite.scaleX,(t-=.25*t)<=0&&(this.canDisappear=!1),this.sprite.scale=t):this.reappear+=1)},a.prototype.destroy=function(){this.sprite.destroy(),this.sprite=null,r.prototype.destroy.call(this)},a);function a(){var t=null!==r&&r.apply(this,arguments)||this;return t.appearDistSq=150,t.disappearDistSq=170,t.reappearTime=30,t.startScale=1,t}e.BasicFade=i},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.World=e.Boot=e.BasicScene=void 0;var n=i(35),r=(Object.defineProperty(e,"BasicScene",{enumerable:!0,get:function(){return n.BasicScene}}),i(79)),s=(Object.defineProperty(e,"Boot",{enumerable:!0,get:function(){return r.Boot}}),i(39));Object.defineProperty(e,"World",{enumerable:!0,get:function(){return s.World}})},function(t,e,i){"use strict";var n,h,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),r=(Object.defineProperty(e,"__esModule",{value:!0}),e.JDBmpdText=void 0,h=Phaser.GameObjects.BitmapText,r(s,h),s.prototype.setText=function(t){return this.refreshDrawTint=!0,h.prototype.setText.call(this,t),this},s.prototype.setColor=function(t){this.tint=t},s.prototype.destroy=function(){Phaser.GameObjects.GameObject.prototype.destroy.call(this)},s.prototype.toUpperCase=function(){h.prototype.setText.call(this,this.text.toUpperCase())},s);function s(t,e,i,n,r,s,o,a){void 0===o&&(o=16777215);t=h.call(this,t,e,i,n,r,s,a=void 0===a?1:a)||this;return t.refreshDrawTint=!1,t.setOrigin(.5*a,.5),t.setColor(o),t}e.JDBmpdText=r},function(t,e,i){"use strict";var n,h,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),s=(Object.defineProperty(e,"__esModule",{value:!0}),e.JDBmpdTextFit=void 0,i(52)),o=i(10),i=(h=s.JDBmpdText,r(a,h),a.prototype.setFitSize=function(t,e,i){void 0===e&&(e=o.JDTextFitParam.size),void 0===i&&(i=0),this.maxSWidth=t,this.maxSHeight=i,this.fitParam=e,this.maxSWidth<=0?(this.setMaxWidth(this.maxSWidth),this.fontSize!==this.createFontSize&&(this.fontSize=this.createFontSize)):this.calcFitSize()},a.prototype.setText=function(t){return h.prototype.setText.call(this,t),(this.maxSWidth||this.maxSHeight)&&this.calcFitSize(),this},a.prototype.calcFitSize=function(){if(this.fontSize!==this.createFontSize&&(this.fontSize=this.createFontSize),this.fitParam!==o.JDTextFitParam.wordWrap){this.fitParam===o.JDTextFitParam.both&&this.setMaxWidth(this.maxSWidth);var t=this.scaleX,e=this.scaleY;for(this.setScale(1,1);this.width>this.maxSWidth||0<this.maxSHeight&&this.height>this.maxSHeight;)--this.fontSize;this.setScale(t,e)}else this.setMaxWidth(this.maxSWidth)},a);function a(t,e,i,n,r,s,o,a){t=h.call(this,t,e,i,n,r,s,o=void 0===o?16777215:o,a=void 0===a?1:a)||this;return t.createFontSize=s,t}e.JDBmpdTextFit=i},function(t,e,i){"use strict";var n,s,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.JDImagePivot=void 0,i(26)),i=(s=i(36).JDImage,r(a,s),a.prototype.setPivot=function(t,e){this.pivotX=t,this.pivotY=e},a);function a(t,e,i,n,r){t=s.call(this,t,e,i,n,r)||this;return t.pivotX=0,t.pivotY=0,t.setPipeline(o.PipelineManager.getPipeline(o.PipelineList.PivotSkew)),t}e.JDImagePivot=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),s=(Object.defineProperty(e,"__esModule",{value:!0}),e.PLPivotSkew=void 0,r=Phaser.Renderer.WebGL.Pipelines.MultiPipeline,s(w,r),w.prototype.batchSprite=function(t,e,i){this.manager.set(this,t);var n=this._tempMatrix1,r=this._tempMatrix2,s=this._tempMatrix3,o=t.frame,a=o.glTexture,h=o.u0,l=o.v0,c=o.u1,u=o.v1,d=o.x,p=o.y,f=o.cutWidth,g=o.cutHeight,m=o.customPivot,y=t.displayOriginX,v=t.displayOriginY,d=-y+d,p=-v+p,x=(t.isCropped&&((x=t._crop).flipX===t.flipX&&x.flipY===t.flipY||o.updateCropUVs(x,t.flipX,t.flipY),h=x.u0,l=x.v0,c=x.u1,u=x.v1,f=x.width,g=x.height,d=-y+x.x,p=-v+x.y),1),b=1,y=(t.flipX&&(m||(d+=-o.realWidth+2*y),x=-1),(t.flipY||o.source.isGLTexture&&!a.flipY)&&(m||(p+=-o.realHeight+2*v),b=-1),w.calculateMatrix(t,x,b,n,r,s,e,i),d+f),m=p+g,v=e.roundPixels,x=s.getXRound(d,p,v),b=s.getYRound(d,p,v),n=s.getXRound(d,m,v),r=s.getYRound(d,m,v),i=s.getXRound(y,m,v),f=s.getYRound(y,m,v),g=s.getXRound(y,p,v),d=s.getYRound(y,p,v),m=Phaser.Renderer.WebGL.Utils.getTintAppendFloatAlpha,s=e.alpha,y=m(t.tintTopLeft,s*t._alphaTL),p=m(t.tintTopRight,s*t._alphaTR),v=m(t.tintBottomLeft,s*t._alphaBL),e=m(t.tintBottomRight,s*t._alphaBR),m=(this.shouldFlush(6)&&this.flush(),this.setGameObject(t,o));this.manager.preBatch(t),this.batchQuad(t,x,b,n,r,i,f,g,d,h,l,c,u,y,p,v,e,t.tintFill,a,m),this.manager.postBatch(t)},w.calculateMatrix=function(i,t,e,n,r,s,o,a){var h,l,c,u,d,p,f=i.scaleX*t,g=i.scaleY*e,t=i.x,e=i.y;function m(){var t,e;u=0!==i.rotation?(t=Math.cos(i.rotation),e=Math.sin(i.rotation),h=t*f,l=e*f,c=-e*g,t*g):(h=f,c=l=0,g)}(i.skewX||i.skewY)&&(d=i.rotation+i.skewX,(p=i.rotation+i.skewY)%w.PI2||d%w.PI2)?(d===i._cachedRotX&&p===i._cachedRotY||(i._cachedRotX=d,i._cachedRotY=p,i._crA=Math.cos(p),i._srB=Math.sin(p),i._srC=Math.sin(-d),i._crD=Math.cos(d)),h=i._crA*f,l=i._srB*f,c=i._srC*g,u=i._crD*g):m(),(i.pivotX||i.pivotY)&&(t+=i.pivotX*h+i.pivotY*c,e+=i.pivotX*l+i.pivotY*u),n.copyFrom(o.matrix),a?n.multiplyWithOffset(a,-o.scrollX*i.scrollFactorX,-o.scrollY*i.scrollFactorY):(t-=o.scrollX*i.scrollFactorX,e-=o.scrollY*i.scrollFactorY),r.setTransform(h,l,c,u,t,e),n.multiply(r,s)},w.PI2=2*Math.PI,w);function w(t){return r.call(this,{game:t})||this}e.PLPivotSkew=s},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InputField=void 0;var n=i(102);function r(){}r.init=function(t){this.game=t,this.dom=new n.InputDom(t)},r.onFocusOut=function(){this.txt&&this.endFocus()},r.onTxtIn=function(t){this.txt!==t&&(this.onTxtOut(),this.txt=t,this.dom.focus(this.txt.options,this.txt.text),!1===this.game.device.os.desktop&&(r.KeyboardOpen=!0,this.game.events.emit(r.EVENT_KEYBOARD_OPEN)))},r.onTxtOut=function(){this.txt&&this.txt.onFocusOut(this.dom.getValue()),this.txt=null},r.endFocus=function(){!1===this.game.device.os.desktop&&(r.KeyboardOpen=!1,this.game.events.emit(r.EVENT_KEYBOARD_CLOSED)),this.onTxtOut(),this.dom.blur()},r.render=function(t,e){this.dom.render(this.txt,t,e)},r.EVENT_KEYBOARD_OPEN="EVENT_KEYBOARD_OPEN",r.EVENT_KEYBOARD_CLOSED="EVENT_KEYBOARD_CLOSED",r.KeyboardOpen=!1,r.blockInput=!0,e.InputField=r},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.JD9SliceBase=void 0,(n=u=u||{}).tl="tl",n.tr="tr",n.br="br",n.bl="bl",n.tm="tm",n.bm="bm",n.lm="lm",n.rm="rm",n.c="c",d.addConfig=function(t,e,i,n,r){this.configs[t.key+this.getFrameName(t.frame)]={tl:{x:e,y:n},tr:{x:i,y:n},bl:{x:e,y:r},br:{x:i,y:r},minWidth:e+i,minHeight:n+r}},d.getConfig=function(t){return this.configs[t],this.configs[t]},d.getFrameName=function(t){return void 0!==t?t:this._baseFrameName},d.removeConfig=function(t,e){delete this.configs[t+this.getFrameName(e)]},d.removeFromTexture=function(t,e,i){var n=t.textures.get(e);i=i||e;for(var r=0,s=Object.keys(u);r<s.length;r++){var o=s[r];n.remove(i+u[o])}},d.prototype.getView=function(){return this.view},d.prototype.addView=function(t){this.view=t,this.view.once(Phaser.GameObjects.Events.DESTROY,this.destroyInternal,this)},d.prototype.setInteractive=function(){},d.prototype.add9Slice=function(t,e,i,n,r,s,o){var a=this.data9Slice.length;r.frame=d.getFrameName(r.frame),void 0===s&&(s=this.originX),void 0===o&&(o=this.originY),this.data9Slice.push({x:t+(this.width-i)*s,y:e+(this.height-n)*o,tKey:r.key,tFrame:r.frame,config:d.getConfig(r.key+r.frame),frames:{}}),this.setSize(a,i,n),this.initFrames(a)},d.prototype.changeFrame=function(t,e){var i=this.data9Slice[t];void 0!==e.key&&(i.tKey=e.key),i.tFrame=d.getFrameName(e.frame),void 0!==e.x&&(i.x=e.x),void 0!==e.y&&(i.y=e.y),this.setSize(t,e.width,e.height),void 0!==e.key&&void 0!==e.frame&&this.initFrames(t)},d.prototype.removeFrames=function(t){this.data9Slice.splice(t,1)},d.prototype.clear=function(){this.data9Slice=[]},d.prototype.initFrames=function(t){var o=this.data9Slice[t],t=o.tKey,a=o.tFrame,h=this.scene.textures.get(t),e=h.get(a),i=e.width,n=e.height,l=e.cutX,c=e.cutY;function r(t,e,i,n,r){var s=a+t;h.has(s)?o.frames[t]=h.frames[s]:o.frames[t]=h.add(s,0,l+e,c+i,n,r)}a===d._baseFrameName&&(a=t);var e=o.config,t=(r(u.tl,0,0,e.tl.x,e.tl.y),r(u.tr,i-e.tr.x,0,e.tr.x,e.tr.y),r(u.br,i-e.br.x,n-e.br.y,e.br.x,e.br.y),r(u.bl,0,n-e.bl.y,e.bl.x,e.bl.y),r(u.tm,e.tl.x,0,i-(e.tl.x+e.tr.x),Math.max(e.tl.y,e.tr.y)),r(u.bm,e.bl.x,n-Math.max(e.bl.y,e.br.y),i-(e.bl.x+e.br.x),Math.max(e.bl.y,e.br.y)),r(u.lm,0,e.tl.y,Math.max(e.tl.x,e.bl.x),n-(e.tl.y+e.bl.y)),r(u.rm,i-Math.max(e.tr.x,e.br.x),e.tr.y,Math.max(e.tr.x,e.br.x),n-e.tr.y-e.br.y),Math.min(e.tl.x,e.bl.x)),s=Math.min(e.tl.y,e.tr.y);r(u.c,t,s,i-t-Math.min(e.tr.x,e.br.x),n-s-Math.min(e.br.y,e.bl.y))},d.prototype.drawFrame=function(t,e,i,n,r,s){},d.prototype.drawFrames=function(t){var t=this.data9Slice[t],e=t.config,i=t.frames,n=Math.min(e.tl.x,e.bl.x),r=Math.min(e.tr.x,e.br.x),s=Math.min(e.tl.y,e.tr.y),o=Math.min(e.bl.y,e.br.y);this.drawFrame(t,i[u.c],n,s,t.width-n-r,t.height-s-o),this.drawFrame(t,i[u.tm],e.tl.x,0,t.width-e.tl.x-e.tr.x,i[u.tm].height),this.drawFrame(t,i[u.bm],e.bl.x,t.height-i[u.bm].height,t.width-e.bl.x-e.br.x,i[u.bm].height),this.drawFrame(t,i[u.lm],0,e.tl.y,i[u.lm].width,t.height-e.tl.y-e.bl.y),this.drawFrame(t,i[u.rm],t.width-e.tr.x,e.tr.y,i[u.rm].width,t.height-e.tr.y-e.br.y),this.drawFrame(t,i[u.tl],0,0,e.tl.x,e.tl.y),this.drawFrame(t,i[u.tr],t.width-e.tr.x,0,e.tr.x,e.tr.y),this.drawFrame(t,i[u.br],t.width-e.br.x,t.height-e.br.y,e.br.x,e.br.y),this.drawFrame(t,i[u.bl],0,t.height-e.bl.y,e.bl.x,e.bl.y)},d.prototype.draw=function(){for(var t=0;t<this.data9Slice.length;t++)this.drawFrames(t)},d.prototype.setSize=function(t,e,i){var n=this.data9Slice[t].config,r=(void 0===e&&(e=n.minWidth),void 0===i&&(i=n.minHeight),e>n.minWidth?e:n.minWidth),i=i>n.minHeight?i:n.minHeight;n.minWidth>e||n.minHeight,this.data9Slice[t].width=r,this.data9Slice[t].height=i},d.prototype.tintFragments=function(t,e){},d.prototype.destroyInternal=function(){this.view=null,this.scene=null,this.data9Slice=null},d.prototype.destroy=function(){this.view.destroy()},d.configs={},d._baseFrameName="__BASE";var u,n=d;function d(t,e,i,n,r){this.scene=t,this.data9Slice=new Array,this.width=e,this.height=i,this.originX=n,this.originY=r}e.JD9SliceBase=n},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.PlayerBreatheBar=void 0,i(0)),a=i(3),h=i(18),i=(r=Phaser.GameObjects.Container,s(l,r),l.prototype.reset=function(){this.breathe=this.maxBreathe},l.prototype.show=function(t){--this.breathe,this.breathe<90&&a.Achievements.saveAchive(h.TrophieAchieves.gasping),this.visible=!0,this.rotation=-t,this.scaleX<1&&(this.scaleX-=.05,1<this.scaleX&&(this.scaleX=1),this.scaleY=this.scaleX,this.alpha=this.scaleX);for(var e=Math.floor(this.breathe/60),i=0;i<10;i++){var n=this.breatheBlocks[i];e<i?0<n.alpha&&(n.alpha-=.1,n.y-=.5,n.alpha<0&&(n.alpha=0,n.y=-85)):n.alpha<1&&(n.alpha+=.1,n.y=-65,1<n.alpha&&(n.alpha=1,n.y=-65))}return this.breathe},l.prototype.addBreath=function(t){this.breathe<this.maxBreathe?this.breathe+=t:this.breathe=this.maxBreathe},l.prototype.hide=function(){this.visible=!1},l);function l(t){var e=r.call(this,t)||this;e.maxBreathe=600,e.hide(),e.breatheBlocks=[];for(var i=0;i<10;i++){var n=new Phaser.GameObjects.Image(t,10*(i-4.5),-65,o.Atlases.gameplay,"breatheBlock 10000");e.add(n),e.breatheBlocks.push(n)}return e}e.PlayerBreatheBar=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.PlayerWindGust=void 0,i(0)),a=i(7),h=i(8),i=(r=Phaser.GameObjects.Image,s(l,r),l.prototype.start=function(t,e,i){this.visible=!0,this.alpha=1,i===h.FacingDir.Right?(this.x=t-30,this.scaleX=1,this.polyOffX=27,this.speed=4,this.endX=this.x+60):(this.x=t+30,this.scaleX=-1,this.polyOffX=-67,this.speed=-4,this.endX=this.x-60),this.y=e,this.updatePolyPos()},l.prototype.stop=function(){this.visible=!1},l.prototype.update=function(){!1!==this.visible&&(this.x+=this.speed,this.updatePolyPos(),(0<this.speed&&this.x>=this.endX||this.speed<0&&this.x<=this.endX)&&(this.alpha-=.1,this.alpha<=0&&this.stop()))},l.prototype.updatePolyPos=function(){this.poly.pos.x=this.x+this.polyOffX,this.poly.pos.y=this.y-15},l);function l(t,e,i){t=r.call(this,t,e,i,o.Atlases.gameplay,"heroWindGust 10000")||this;return t.setOrigin(0,.5),t.poly=a.Helpers.getPolygon(e,i,40,26),t.stop(),t}e.PlayerWindGust=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.PlayerJumpPotion=void 0,i(0)),a=i(8),i=(r=Phaser.GameObjects.Image,s(h,r),h.prototype.start=function(){this.visible=!0,this.counter=0},h.prototype.stop=function(){this.visible=!1},h.prototype.update=function(t,e){!1!==this.visible&&(e===a.PlayerState.Sliding?this.x=-30*t:this.x=-20*t,this.counter+=.1,this.scale=.7+.3*(.5+.5*Math.cos(this.counter)))},h);function h(t){t=r.call(this,t,0,3,o.Atlases.gameplay,"jumpPotionAnim 10000")||this;return t.setOrigin(.5,1),t.stop(),t}e.PlayerJumpPotion=i},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.AppearingText=void 0;var s,o,a=i(1),h=i(0),l=i(16),c=i(10),i=((i=s=s||{})[i.checkPoint=0]="checkPoint",i[i.downEndter=1]="downEndter",i[i.death=2]="death",o=a.JDBmpdTextFit,r(u,o),u.prototype.show=function(t,e,i){this.xPos=t,this.yPos=e,this.x=t,this.y=e,this.currText=i,this.visible=!0,this.alpha=1,this.alive=!0,"checkpoint"===i?(this.setFitSize(0),this.setColor(56396),this.scale=1,this.currType=s.checkPoint,this.displayTime=60,this.moveDist=0):"pressDownEnter"===i?(this.setColor(0),this.displayTime=60,this.scale=1,this.setFitSize(200,c.JDTextFitParam.both,70),this.currType=s.downEndter,this.visible=!1):(this.setFitSize(0),this.setColor(16711680),this.scale=this.scaleXY=.75,this.currType=s.death),this.changeLang()},u.prototype.changeLang=function(){this.currText&&(this.setFont(h.Fonts.Main),this.setText(l.Localization.getText(this.currText)))},u.prototype.isPressDown=function(){return!0===this.alive&&this.currType===s.downEndter},u.prototype.hide=function(){this.alive=!1,this.visible=!1},u.prototype.update=function(){!1!==this.alive&&(this.currType===s.checkPoint?(-30<this.moveDist&&(this.moveDist-=2),this.y=this.yPos+this.moveDist,--this.displayTime,this.displayTime<=0&&this.hide()):this.currType===s.death?(this.scaleXY<1.2?(this.scaleXY-=.03*(this.scaleXY-1.2),1.2-this.scaleXY<.01&&(this.scaleXY=1.2),this.scale=this.scaleXY):(this.alpha-=.075*this.alpha,this.alpha<=.02&&this.hide()),this.yPos-=.5,this.y=this.yPos):this.currType===s.downEndter&&(this.x=this.scene.player.xPos,this.y=this.yPos,--this.displayTime,this.displayTime<=0&&(this.visible=!this.visible,this.displayTime=30)))},u);function u(t,e){t=o.call(this,t,0,0,h.Fonts.TutDeath,"",20,16711680)||this;return t.visible=!1,t.alive=!1,e.add(t),t}e.AppearingText=i},function(t,e,i){"use strict";var n,h,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),s=(Object.defineProperty(e,"__esModule",{value:!0}),e.ColorParticle=void 0,i(40)),l=i(0),i=(h=s.Particle,r(o,h),o.prototype.spawn=function(t,e,i,n){h.prototype.spawnBase.call(this,t,e,i,n),this.graphics.x=t,this.graphics.y=e,this.fadeTime=0},o.prototype.destroy=function(t){this.alive&&(this.graphics.destroy(),this.graphics=null,this.alive=!1,h.prototype.destroy.call(this,t))},o.prototype.multAlpha=function(t){this.graphics.alpha*=t},o.prototype.update=function(){if(!1!==this.alive){if(this.fadeTime>=this.fadeAfter){if(this.graphics.alpha-=.05,this.scaleOut&&(this.graphics.scale*=.9),this.graphics.alpha<=0)return void this.destroy(this.isUI)}else this.fadeTime+=1;var t=this.xPos,e=this.yPos;h.prototype.update.call(this),!this.alive||t===this.xPos&&e===this.yPos||(this.graphics.x=this.xPos,this.graphics.y=this.yPos,this.updateHitBox())}},o);function o(t,e,i,n,r,s,o,a){r=h.call(this,t,n,r,s,o)||this;return r.scaleOut=a,r.size=n,r.graphics=new Phaser.GameObjects.Image(t,0,0,l.Atlases.gameplay,"particle"+n+" 10000"),r.graphics.tint=i,e.add(r.graphics),r.fadeAfter=o,r.isUI=!1,r}e.ColorParticle=i},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BasicDailyTask=void 0;var n=i(3),o=i(0),r=i(1);function s(t,e){this.parent=t,this.id=e}s.prototype.createTittle=function(t,e,i){this.txtTitle=new r.JDBmpdTextTranslated(this.parent.scene,t,e,o.Fonts.Main,"dailyTaskTitle"+this.id,i,16777215,0),this.parent.add(this.txtTitle)},s.prototype.createProgress=function(t,e,i,n,r){void 0===r&&(r="");var s=new Phaser.GameObjects.Image(this.parent.scene,t,e-20,o.Atlases.ui,"progressBg"+r+" 10000");this.parent.add(s),this.progress=new Phaser.GameObjects.Image(this.parent.scene,t,e-20,o.Atlases.ui,"progress"+r+" 10000"),this.parent.add(this.progress),this.setProgress(i/n)},s.prototype.setProgress=function(t){this.progress.setCrop(0,0,this.progress.width*t,this.progress.height)},s.prototype.reset=function(){this.setProgress(0)},s.prototype.reward=function(){n.DailyTask.reward(this.id),this.rewarded()},s.prototype.rewarded=function(){},s.prototype.destroy=function(){this.progress=null,this.parent=null,this.txtTitle=null},e.BasicDailyTask=s},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PlayerWindGust=e.PlayerJumpPotion=e.AppearingText=e.PlayerGib=e.PlayerBreatheBar=e.Player=e.Entity=void 0;var n=i(13),r=(Object.defineProperty(e,"Entity",{enumerable:!0,get:function(){return n.Entity}}),i(146)),s=(Object.defineProperty(e,"Player",{enumerable:!0,get:function(){return r.Player}}),i(58)),o=(Object.defineProperty(e,"PlayerBreatheBar",{enumerable:!0,get:function(){return s.PlayerBreatheBar}}),i(147)),a=(Object.defineProperty(e,"PlayerGib",{enumerable:!0,get:function(){return o.PlayerGib}}),i(61)),h=(Object.defineProperty(e,"AppearingText",{enumerable:!0,get:function(){return a.AppearingText}}),i(60)),l=(Object.defineProperty(e,"PlayerJumpPotion",{enumerable:!0,get:function(){return h.PlayerJumpPotion}}),i(59));Object.defineProperty(e,"PlayerWindGust",{enumerable:!0,get:function(){return l.PlayerWindGust}})},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.BasicBlock=void 0,i(0)),a=i(2),i=(r=i(5).Block,s(h,r),h.prototype.spawn=function(t){this.init(t.x,t.y,t.width,t.height),this.updateGraphicPosition(),this.sprite.setFrame(a.BalanceData.getBasicBlockFrame(this.main.currLevelID)),this.sprite.setScale(this.width/100,this.height/100),this.sprite.visible=!0},h.prototype.update=function(){this.xPos===this.prevX&&this.yPos===this.prevY||this.updatePosition()},h.prototype.updateGraphicPosition=function(){this.sprite.x=this.xPos,this.sprite.y=this.yPos},h.prototype.destroy=function(){this.sprite.destroy(),this.sprite=null,r.prototype.destroy.call(this)},h);function h(t,e){e=r.call(this,t,e)||this;return e.sprite=new Phaser.GameObjects.Image(t,0,0,o.Atlases.gameplay),e.layer.add(e.sprite),e.sprite.visible=!1,e}e.BasicBlock=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.Bullet=void 0,i(14)),a=i(0),h=i(8),l=i(3),i=(r=o.Obstacle,s(c,r),c.prototype.addDeathBox=function(){this.deathBoxPolygon=new SAT.Polygon(new SAT.Vector(0,0),[new SAT.Vector(0,8),new SAT.Vector(8,8)]),this.deathBoxPolygon.setOffset(new SAT.Vector(-4,0))},c.prototype.initGraphic=function(t){this.sprite=new Phaser.GameObjects.Image(this.main,0,0,a.Atlases.gameplay,t),this.layer.add(this.sprite),this.sprite.visible=!1},c.prototype.spawn=function(t,e,i,n){this.xPos=t,this.yPos=e,this.xVelocity=Math.cos(i)*n,this.yVelocity=Math.sin(i)*n,this.updatePosition(),this.sprite.rotation=i,this.deathBoxPolygon.setAngle(i),this.alive=!0,this.sprite.visible=!0,this.lifeTime=600,!0===this.main.inCameraView(this.xPos-15,this.xPos+15,this.yPos-15,this.yPos+15)&&l.SoundManager.playSFX("laserFire")},c.prototype.update=function(){if(!1!==this.alive)if(this.xPos+=this.xVelocity,this.yPos+=this.yVelocity,this.updatePosition(),--this.lifeTime,this.lifeTime<=0)this.die();else if(!0!==this.main.checkPlayerDeathByPolygon(this.deathBoxPolygon,h.DeathType.laser))for(var t=0,e=this.main.blocks;t<e.length;t++){var i=e[t];if(SAT.testPolygonPolygon(i.totalPolygon,this.deathBoxPolygon)){for(var n=0;n<10;n++)this.main.particleManager.createColorParticle(this.xPos,this.yPos,16*Math.random()-8,16*Math.random()-8,16711680);this.die()}}else this.die()},c.prototype.updatePosition=function(){this.sprite.x=this.xPos,this.sprite.y=this.yPos,this.deathBoxPolygon.pos.x=this.xPos,this.deathBoxPolygon.pos.y=this.yPos},c.prototype.die=function(){this.alive=!1,this.sprite.visible=!1},c.prototype.reset=function(){this.die()},c.prototype.resetLevel=function(){this.reset()},c.prototype.destroy=function(){this.sprite.destroy(),this.sprite=null,this.deathBoxPolygon=null,r.prototype.destroy.call(this)},c);function c(t,e){t=r.call(this,t,e)||this;return t.initGraphic("classicLaserBullet 10000"),t.addDeathBox(),t}e.Bullet=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.BulletMissile=void 0,i(66)),a=i(8),h=i(4),l=i(3),c=i(7),i=(r=o.Bullet,s(u,r),u.prototype.initGraphic=function(t){r.prototype.initGraphic.call(this,"missileLauncherBullet 10000"),this.explodeBody=new SAT.Circle(new SAT.Vector(this.xPos,this.yPos),40)},u.prototype.addDeathBox=function(){this.deathBoxPolygon=c.Helpers.getPolygonOffset(0,0,26,14,-13,-7)},u.prototype.spawn=function(t,e,i,n){r.prototype.spawn.call(this,t,e,i,n),this.shootPower=n,this.rPos=i,this.lifeTime=l.BalanceData.config_MissileLifeTime,this.exploding=!1,this.deathByBlast=!1,this.sprite.visible=!0},u.prototype.explode=function(){this.sprite.visible=!1,this.exploding=!0,this.main.particleManager.showExplosion(this.xPos,this.yPos),this.explodeBody.pos.x=this.xPos,this.explodeBody.pos.y=this.yPos,this.lifeTime=0},u.prototype.update=function(){if(!1!==this.alive){var t=this.main.player;if(!0===this.exploding)this.lifeTime+=1,!1===this.deathByBlast&&!0===this.main.checkPlayerDeathByCircle(this.explodeBody,a.DeathType.laser)?this.deathByBlast=!0:16<this.lifeTime&&this.die();else if(this.rPos+=h.Tools.getFollowRotationSpeed(this.xPos,this.yPos,this.rPos,t.xPos,t.yPos-t.halfHeight,l.BalanceData.config_MissileFollowSpeed),this.xPos+=Math.cos(this.rPos)*this.shootPower,this.yPos+=Math.sin(this.rPos)*this.shootPower,this.updatePosition(),--this.lifeTime,this.lifeTime<=0)this.explode();else if(!0===SAT.testPolygonPolygon(this.main.player.totalPolygon,this.deathBoxPolygon))this.explode(),this.main.player.kill(a.DeathType.laser);else for(var e=0,i=this.main.blocks;e<i.length;e++){var n=i[e];if(SAT.testPolygonPolygon(n.totalPolygon,this.deathBoxPolygon)){for(var r=0;r<10;r++)this.main.particleManager.createColorParticle(this.xPos,this.yPos,16*Math.random()-8,16*Math.random()-8,16711680);this.explode(),"explosive"===n.type&&n.explode()}}}},u.prototype.reset=function(){!1===this.exploding&&r.prototype.reset.call(this)},u.prototype.updatePosition=function(){r.prototype.updatePosition.call(this),this.sprite.rotation=this.rPos,this.deathBoxPolygon.setAngle(this.rPos)},u);function u(){return null!==r&&r.apply(this,arguments)||this}e.BulletMissile=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.ClassicLaserStatic=void 0,i(20)),a=i(0),h=i(4),l=i(3),i=(r=i(14).Obstacle,s(c,r),c.prototype.initGraphic=function(){this.sprite=new Phaser.GameObjects.Image(this.main,0,0,a.Atlases.gameplay,"classicLaser 10000"),this.layer.add(this.sprite),this.bullet=new o.Bullet(this.main,this.main.layerObstacle),this.main.obstacles.push(this.bullet)},c.prototype.spawn=function(t){this.xPos=t.x,this.yPos=t.y,this.startX=this.xPos,this.startY=this.yPos,this.sprite.x=this.xPos,this.sprite.y=this.yPos,this.sprite.rotation=h.Tools.toRad(t.rotation),this.shootTimer=0},c.prototype.update=function(){!1===this.bullet.alive&&(this.shootTimer+=1,this.shootTimer>=this.fireRate&&(this.shootTimer=0,this.bullet.spawn(this.xPos,this.yPos,this.sprite.rotation,this.shootPower)))},c.prototype.reset=function(){this.shootTimer=0},c.prototype.destroy=function(){this.bullet=null,this.sprite.destroy(),this.sprite=null,r.prototype.destroy.call(this)},c);function c(t,e){t=r.call(this,t,e)||this;return t.shootPower=12.5,t.fireRate=l.BalanceData.config_ClassicLaserFireTime,t.initGraphic(),t}e.ClassicLaserStatic=i},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EffectStars=e.SkinSlot=e.SkinRarityEquip=e.SkinRaritySpin=e.SkinRarity=void 0;var n=i(208),r=(Object.defineProperty(e,"SkinRarity",{enumerable:!0,get:function(){return n.SkinRarity}}),i(209)),s=(Object.defineProperty(e,"SkinRaritySpin",{enumerable:!0,get:function(){return r.SkinRaritySpin}}),i(210)),o=(Object.defineProperty(e,"SkinRarityEquip",{enumerable:!0,get:function(){return s.SkinRarityEquip}}),i(211)),a=(Object.defineProperty(e,"SkinSlot",{enumerable:!0,get:function(){return o.SkinSlot}}),i(212));Object.defineProperty(e,"EffectStars",{enumerable:!0,get:function(){return a.EffectStars}})},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.Checkpoint=void 0,i(12)),a=i(0),h=i(4),i=(r=o.Item,s(l,r),l.prototype.spawn=function(t){this.xPos=t.x,this.yPos=t.y,this.startY=this.yPos,this.sprite.x=this.xPos,this.sprite.y=this.yPos,this.hitBoxPolygon.pos.x=this.xPos,this.hitBoxPolygon.pos.y=this.yPos,this.state=0,this.floatRad=0,this.alive=!0},l.prototype.resetLevel=function(){this.setSpriteFrame(0),this.state=0},l.prototype.setSpriteFrame=function(t){!0===this.floating?this.sprite.setFrame("checkpointSwimming 1000"+t):this.sprite.setFrame("checkpoint 1000"+t)},l.prototype.update=function(){this.updateState(),!0===this.floating&&(this.floatRad=(this.floatRad+.02)%h.Tools.PI2,this.sprite.y=this.startY+(25+10*Math.sin(this.floatRad)),this.sprite.rotation=.5*Math.cos(this.floatRad))},l.prototype.updateState=function(){0===this.state&&SAT.testPolygonPolygon(this.main.player.bodyPolygon,this.hitBoxPolygon)?(this.main.checkpointTriggered(this),this.setSpriteFrame(1),this.state=1):1!==this.state||this.xPos===this.main.player.checkpoint.x&&this.yPos===this.main.player.checkpoint.y||(this.setSpriteFrame(2),this.state=2)},l.prototype.destroy=function(){this.sprite.destroy(),this.sprite=null,this.hitBoxPolygon=null,r.prototype.destroy.call(this)},l);function l(t,e,i){var n=r.call(this,t)||this;return!0===(n.floating=i)?n.sprite=new Phaser.GameObjects.Image(t,0,0,a.Atlases.gameplay,"checkpointSwimming 10000"):(n.sprite=new Phaser.GameObjects.Image(t,0,0,a.Atlases.gameplay,"checkpoint 10000"),n.sprite.setOrigin(8/21.15,17/55)),e.add(n.sprite),n.hitBoxPolygon=new SAT.Box(new SAT.Vector(0,0),60,80).toPolygon(),n.hitBoxPolygon.setOffset(new SAT.Vector(-30,-40)),n.type="checkPoint",n}e.Checkpoint=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.Coin=void 0,i(0)),a=i(4),h=i(11),i=(r=i(12).Item,s(l,r),l.prototype.init=function(t,e,i){this.sprite=new Phaser.GameObjects.Image(t,0,0,o.Atlases.gameplay,!1===t.isTower()?"coinGame 10000":"coinTower 10000"),e.add(this.sprite),this.sprite.visible=!1},l.prototype.spawn=function(t){this.xPos=t.x,this.yPos=t.y,this.sprite.visible=!0,this.sprite.x=this.xPos,this.sprite.y=this.yPos,this.alive=!0},l.prototype.update=function(){if(!0===this.alive&&a.Tools.distance(this.xPos,this.yPos,this.main.player.xPos,this.main.player.yPos-this.main.player.halfHeight)<=40){this.collect();for(var t=0;t<15;t++)this.main.particleManager.createColorParticle(this.xPos,this.yPos,10*Math.random()-5,-10*Math.random(),16763904)}},l.prototype.collect=function(){this.main.collectCoin(),h.SoundManager.playSFX("starPickup"),this.die()},l.prototype.die=function(){this.alive=!1,this.sprite.visible=!1},l.prototype.resetLevel=function(){this.alive=!0,this.sprite.visible=!0},l.prototype.destroy=function(){this.sprite.destroy(),this.sprite=null,r.prototype.destroy.call(this)},l);function l(t,e,i){var n=r.call(this,t)||this;return n.init(t,e,i),n}e.Coin=i},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HazardStrips=e.ZiplinePole=e.ZiplineWire=e.Wire=e.Rope=e.Pole=e.Cable=void 0;var n=i(234),r=(Object.defineProperty(e,"Cable",{enumerable:!0,get:function(){return n.Cable}}),i(235)),s=(Object.defineProperty(e,"Pole",{enumerable:!0,get:function(){return r.Pole}}),i(236)),o=(Object.defineProperty(e,"Rope",{enumerable:!0,get:function(){return s.Rope}}),i(237)),a=(Object.defineProperty(e,"Wire",{enumerable:!0,get:function(){return o.Wire}}),i(238)),h=(Object.defineProperty(e,"ZiplineWire",{enumerable:!0,get:function(){return a.ZiplineWire}}),i(239)),l=(Object.defineProperty(e,"ZiplinePole",{enumerable:!0,get:function(){return h.ZiplinePole}}),i(240));Object.defineProperty(e,"HazardStrips",{enumerable:!0,get:function(){return l.HazardStrips}})},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.EnemyAndroid=void 0;var s,o,a=i(1),h=i(3),l=i(18),c=i(8),u=i(7),i=i(74),d=((d=s=s||{})[d.stand=0]="stand",d[d.walk=1]="walk",d[d.run=2]="run",d[d.attack=3]="attack",o=i.BasicGroundEnemy,r(p,o),p.prototype.initGraphic=function(t,e){this.jdSprite=new a.JDSpineGameObject(this.main,0,0,e),this.sprite=this.jdSprite.getView(),t.add(this.sprite),this.sprite.on(a.JDSpineGameObject.EVENT_COMPLETE,this.onAnimationComplete,this),this.jdSprite.scaleX=this.jdSprite.scaleY=this.startScale},p.prototype.onAnimationComplete=function(){"attack"===this.jdSprite.getCurrentAnimationName()&&this.setStateWalk()},p.prototype.spawn=function(t){o.prototype.spawn.call(this,t),this.startY+=h.BalanceData.towerHalfCellSize,this.reset()},p.prototype.levelStart=function(){this.calcBorders(this.borderOffX)},p.prototype.update=function(){if(!1!==this.alive)if(this.currState===s.walk){if(this.currFloor===this.main.currHeroFloor){var t=this.main.player.xPos;if(0<this.xVelocity&&this.xPos<t&&t<this.borderRight+this.borderOffX||this.xVelocity<0&&this.xPos>t&&t>this.borderLeft-this.borderOffX)return void this.setStateRun()}this.incVelocity()}else this.currState===s.run?(t=this.main.player.xPos,this.currFloor!==this.main.currHeroFloor||t<this.borderLeft-this.borderOffX||t>this.borderRight+this.borderOffX||0<this.xVelocity&&this.xPos>t||this.xVelocity<0&&this.xPos<t?this.setStateWalk():Math.abs(this.xPos-t)<35?this.setStateAttack():this.incVelocity()):this.currState===s.attack&&(this.attack(),this.checkSmash())},p.prototype.attack=function(){var t;this.currFloor===this.main.currHeroFloor&&(t=this.main.player.xPos,(this.xPos<t&&t<this.borderRight+this.borderOffX||this.xPos>t&&t>this.borderLeft-this.borderOffX)&&.85<this.jdSprite.getAnimationProgress()&&Math.abs(this.xPos-t)<35&&this.main.player.kill(c.DeathType.buzzsaw))},p.prototype.incVelocity=function(){this.xPos+=this.xVelocity,this.xPos>this.borderRight?(this.xPos=this.borderRight,this.changeDir()):this.xPos<this.borderLeft&&(this.xPos=this.borderLeft,this.changeDir()),this.updatePosition()},p.prototype.smash=function(){o.prototype.smash.call(this),h.Achievements.saveAchive(l.TrophieTower.killAndroid)},p.prototype.die=function(){this.alive=!1,this.sprite.visible=!1},p.prototype.changeDir=function(){this.currState!==s.run?o.prototype.changeDir.call(this):this.xVelocity=0},p.prototype.setDir=function(){o.prototype.setDir.call(this,this.startScale)},p.prototype.reset=function(){o.prototype.reset.call(this),this.recalcBorders(),this.setStateWalk()},p.prototype.setStateWalk=function(){this.currState=s.walk,"walk"!==this.jdSprite.currAnimationName&&this.jdSprite.playFromProgress("walk",this.jdSprite.getAnimationProgress(),!0,1),this.sprite.timeScale=1,this.xVelocity=this.startSpeed*this.currDir},p.prototype.setStateRun=function(){this.currState=s.run,this.xVelocity*=2,"walk_danger"!==this.jdSprite.currAnimationName&&this.jdSprite.playFromProgress("walk_danger",this.jdSprite.getAnimationProgress(),!0,2)},p.prototype.setStateAttack=function(){this.currState=s.attack,this.jdSprite.play("attack",!1,2),this.xVelocity=0},p.prototype.destroy=function(){this.main.events.off("pauseWorld",this.jdSprite.pause,this.jdSprite),this.main.events.off("resumeWorld",this.jdSprite.resume,this.jdSprite),this.jdSprite.destroy(),this.jdSprite=null,o.prototype.destroy.call(this)},p);function p(t,e){var i=o.call(this,t,null)||this;return i.startScale=.05,i.borderOffX=10,i.smashOffY=-30,i.initGraphic(e,"Enemy1"),i.totalPolygon=u.Helpers.getPolygonOffset(0,0,30,55,-15,-55),t.events.on("pauseWorld",i.jdSprite.pause,i.jdSprite),t.events.on("resumeWorld",i.jdSprite.resume,i.jdSprite),i}e.EnemyAndroid=d},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.BasicGroundEnemy=void 0,i(0)),a=i(3),h=i(8),i=(r=i(20).Obstacle,s(l,r),l.prototype.initGraphic=function(t,e){this.sprite=new Phaser.GameObjects.Image(this.main,0,0,o.Atlases.gameplay,e),t.add(this.sprite)},l.prototype.spawn=function(t){this.startX=t.x,this.startY=t.y,0<t.dir?this.startDir=1:this.startDir=-1,this.startSpeed=Math.abs(t.dir),this.currFloor=Math.floor(this.startY/a.BalanceData.towerCellSize)},l.prototype.calcBorders=function(t){this.bOffX=t,this.recalcBorders()},l.prototype.recalcBorders=function(){this.borderCount=0;var t=Math.ceil(this.yPos/a.BalanceData.towerCellSize)*a.BalanceData.towerCellSize-a.BalanceData.towerHalfCellSize;this.borderLeft=this.xPos-this.main.raycastToClosestBlock(this.xPos,t,Math.cos(Math.PI),Math.sin(Math.PI),a.BalanceData.config_TowerWallWidth)+this.bOffX,this.borderRight=this.xPos+this.main.raycastToClosestBlock(this.xPos,t,Math.cos(0),Math.sin(0),a.BalanceData.config_TowerWallWidth)-this.bOffX;for(var e=[],i=0,n=this.main.blocks;i<n.length;i++){var r=n[i];"gate"!==r.type&&!1!==r.alive&&this.currFloor+1===Math.floor(r.yPos/a.BalanceData.towerCellSize)&&e.push(r)}for(var s=Math.floor((this.xPos+a.BalanceData.towerHalfCellSize)/a.BalanceData.towerCellSize)*a.BalanceData.towerCellSize,o=s+a.BalanceData.towerHalfCellSize-1;o>this.borderLeft;){if(!0===this.main.raycastTo(e,o,t,o,t+a.BalanceData.towerCellSize)){this.borderLeft=o+this.bOffX+1;break}o-=a.BalanceData.towerCellSize}for(o=s-a.BalanceData.towerHalfCellSize+1;o<this.borderRight;){if(!0===this.main.raycastTo(e,o,t,o,t+a.BalanceData.towerCellSize)){this.borderRight=o-this.bOffX-1;break}o+=a.BalanceData.towerCellSize}},l.prototype.updatePosition=function(){this.sprite.x=this.xPos,this.sprite.y=this.yPos,this.totalPolygon.pos.x=this.xPos,this.totalPolygon.pos.y=this.yPos,this.checkSmash(),this.borderCount+=1,30<=this.borderCount&&this.recalcBorders()},l.prototype.checkSmash=function(){!0===this.main.player.checkAttackPolyCollision(this.totalPolygon)&&this.smash(),this.main.checkPlayerDeathByPolygon(this.totalPolygon,h.DeathType.noEntry)},l.prototype.smash=function(){this.main.particleManager.showExplosion(this.xPos,this.yPos+this.smashOffY),this.die()},l.prototype.die=function(){this.alive=!1,this.sprite.visible=!1},l.prototype.changeDir=function(){this.currDir=-this.currDir,this.setDir()},l.prototype.setDir=function(t){this.sprite.scaleX=(t=void 0===t?1:t)*this.currDir,this.xVelocity=this.startSpeed*this.currDir},l.prototype.reset=function(){this.alive=!0,this.sprite.visible=!0,this.xPos=this.startX,this.yPos=this.startY,this.currDir=this.startDir,this.setDir(),this.updatePosition()},l.prototype.resetLevel=function(){this.reset()},l.prototype.destroy=function(){this.sprite.destroy(),this.sprite=null,this.totalPolygon=null,r.prototype.destroy.call(this)},l);function l(t,e){t=r.call(this,t,e)||this;return t.startSpeed=1,t.smashOffY=0,t}e.BasicGroundEnemy=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.Game=void 0,i(76),i(51)),a=i(0),h=i(28),l=i(27),c=i(249),u=i(9),i=(r=Phaser.Game,s(d,r),d.prototype.initScenes=function(){this.scene.add(o.Boot.Name,o.Boot),this.scene.add(o.World.Name,o.World),this.scene.start(o.Boot.Name)},d);function d(){var t=this;return h.CustomResize.init(),c.NativeChanges.addDelay(11),c.NativeChanges.setBitmapTextSize(),c.NativeChanges.deleteInstanceFromAtlasJSON(),c.NativeChanges.strokePath(),t=r.call(this,{parent:a.Constants.DIV_ID,title:a.Constants.GAME_NAME,disableContextMenu:!0,type:Phaser.AUTO,scale:{mode:Phaser.Scale.NONE,autoCenter:Phaser.Scale.CENTER_BOTH},plugins:{scene:[{key:"SpinePlugin",plugin:window.SpinePlugin,mapping:"spine"}]},clearBeforeRender:!1,batchSize:256,powerPreference:"high-performance"})||this,l.JDRender.init(t),!1===t.device.os.desktop?(a.Constants.IS_MOBILE=!0,a.Constants.GW=1280,a.Constants.GH=720,a.Constants.UI_ADDITIONAL_TOP_PANELS_SCALE=1.3,a.Constants.UI_ADDITIONAL_PANELS_SCALE=1.18):a.Constants.IS_MOBILE=!1,h.CustomResize.setGameSize(a.Constants.GW,a.Constants.GH),h.CustomResize.setMaxCanvasSize(1.5*a.Constants.GW,1.5*a.Constants.GH),h.CustomResize.refresh(t),u.AzerionSDK.init(t,function(){return t.initScenes()},!0),t}new(e.Game=i)},function(e,t,i){!function(t){e.exports=t.Phaser=i(78)}.call(this,i(77))},function(t,e){var i=function(){return this}();try{i=i||new Function("return this")()}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e,i){function r(t){var e;return(s[t]||(e=s[t]={i:t,l:!1,exports:{}},n[t].call(e.exports,e,e.exports,r),e.l=!0,e)).exports}var n,s;t.exports=(s={},r.m=n=[function(t,e){function s(t,e,i,n){for(var r in e)if(e.hasOwnProperty(r)){a=r,h=void 0,h=(o=i)?e[a]:Object.getOwnPropertyDescriptor(e,a);o=!(!(h=!o&&h.value&&"object"==typeof h.value?h.value:h)||!((a=h).get&&"function"==typeof a.get||a.set&&"function"==typeof a.set))&&(void 0===h.enumerable&&(h.enumerable=!0),void 0===h.configurable&&(h.configurable=!0),h);if(!1!==o){if(a=(n||t).prototype,h=r,s=void 0,(s=Object.getOwnPropertyDescriptor(a,h))&&!1===(s=s.value&&"object"==typeof s.value?s.value:s).configurable){if(l.ignoreFinals)continue;throw new Error("cannot override final property '"+r+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(t.prototype,r,o)}else t.prototype[r]=e[r]}var s,o,a,h}function o(t,e){if(e){Array.isArray(e)||(e=[e]);for(var i=0;i<e.length;i++)s(t,e[i].prototype||e[i])}}function l(t){var e,i,n;if((t=t||{}).initialize){if("function"!=typeof t.initialize)throw new Error("initialize must be a function");n=t.initialize,delete t.initialize}else n=t.Extends?(i=t.Extends,function(){i.apply(this,arguments)}):function(){};t.Extends?(n.prototype=Object.create(t.Extends.prototype),n.prototype.constructor=n,e=t.Extends,delete t.Extends):n.prototype.constructor=n;var r=null;return t.Mixins&&(r=t.Mixins,delete t.Mixins),o(n,r),s(n,t,!0,e),n}l.extend=s,l.mixin=o,l.ignoreFinals=!1,t.exports=l},function(t,e){t.exports=function(){}},function(t,e){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}},function(t,e,i){var n=i(0),r=i(124),s=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 s(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)},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 r(this.x,t.x,e)&&r(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,t=t.y-this.y;return Math.sqrt(e*e+t*t)},distanceSq:function(t){var e=t.x-this.x,t=t.y-this.y;return e*e+t*t},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 0<i&&(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){var i=this.x,n=this.y;return this.x=i+(e=void 0===e?0:e)*(t.x-i),this.y=n+e*(t.y-n),this},transformMat3:function(t){var e=this.x,i=this.y,t=t.val;return this.x=t[0]*e+t[3]*i+t[6],this.y=t[1]*e+t[4]*i+t[7],this},transformMat4:function(t){var e=this.x,i=this.y,t=t.val;return this.x=t[0]*e+t[4]*i+t[12],this.y=t[1]*e+t[5]*i+t[13],this},reset:function(){return this.x=0,this.y=0,this},limit:function(t){var e=this.length();return e&&t<e&&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),t=Math.sin(t);return this.set(e*this.x-t*this.y,t*this.x+e*this.y)}});s.ZERO=new s,s.RIGHT=new s(1,0),s.LEFT=new s(-1,0),s.UP=new s(0,-1),s.DOWN=new s(0,1),s.ONE=new s(1,1),t.exports=s},function(t,e,i){var n=i(0),r=i(56),i=new n({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=t),this.type=r.POINT,this.x=t,this.y=e},setTo:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.x=t,this.y=e,this}});t.exports=i},function(t,e,i){var n=i(0),r=i(24),s=i(20),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(s.BOOT,this.boot,this),this.events.on(s.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(s.DESTROY,this.destroy,this)},start:function(){this.events.once(s.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(s.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(s.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]},r.register("GameObjectFactory",o,"add"),t.exports=o},function(t,e){t.exports=function(t,e,i){if(t&&"number"!=typeof t){if(t.hasOwnProperty(e))return t[e];if(-1===e.indexOf("."))return i;for(var n=e.split("."),r=t,s=i,o=0;o<n.length;o++){if(!r.hasOwnProperty(n[o])){s=i;break}s=r[n[o]],r=r[n[o]]}return s}return i}},function(t,e){t.exports=function(t){if("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}},function(t,e){var i={};t.exports={install:function(t){for(var e in i)t[e]=i[e]},register:function(t,e){i[t]=e},destroy:function(){i={}}}},function(t,e,i){"use strict";var n=Object.prototype.hasOwnProperty,p="~";function r(){}function s(t,e,i){this.fn=t,this.context=e,this.once=i||!1}function o(t,e,i,n,r){if("function"!=typeof i)throw new TypeError("The listener must be a function");i=new s(i,n||t,r),n=p?p+e:e;return t._events[n]?t._events[n].fn?t._events[n]=[t._events[n],i]:t._events[n].push(i):(t._events[n]=i,t._eventsCount++),t}function h(t,e){0==--t._eventsCount?t._events=new r:delete t._events[e]}function a(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(p=!1)),a.prototype.eventNames=function(){var t,e,i=[];if(0===this._eventsCount)return i;for(e in t=this._events)n.call(t,e)&&i.push(p?e.slice(1):e);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i},a.prototype.listeners=function(t){var t=p?p+t:t,e=this._events[t];if(!e)return[];if(e.fn)return[e.fn];for(var i=0,n=e.length,r=new Array(n);i<n;i++)r[i]=e[i].fn;return r},a.prototype.listenerCount=function(t){t=p?p+t:t,t=this._events[t];return t?t.fn?1:t.length:0},a.prototype.emit=function(t,e,i,n,r,s){var o=p?p+t:t;if(!this._events[o])return!1;var a,h=this._events[o],l=arguments.length;if(h.fn){switch(h.once&&this.removeListener(t,h.fn,void 0,!0),l){case 1:return h.fn.call(h.context),!0;case 2:return h.fn.call(h.context,e),!0;case 3:return h.fn.call(h.context,e,i),!0;case 4:return h.fn.call(h.context,e,i,n),!0;case 5:return h.fn.call(h.context,e,i,n,r),!0;case 6:return h.fn.call(h.context,e,i,n,r,s),!0}for(d=1,a=new Array(l-1);d<l;d++)a[d-1]=arguments[d];h.fn.apply(h.context,a)}else for(var c,u=h.length,d=0;d<u;d++)switch(h[d].once&&this.removeListener(t,h[d].fn,void 0,!0),l){case 1:h[d].fn.call(h[d].context);break;case 2:h[d].fn.call(h[d].context,e);break;case 3:h[d].fn.call(h[d].context,e,i);break;case 4:h[d].fn.call(h[d].context,e,i,n);break;default:if(!a)for(c=1,a=new Array(l-1);c<l;c++)a[c-1]=arguments[c];h[d].fn.apply(h[d].context,a)}return!0},a.prototype.on=function(t,e,i){return o(this,t,e,i,!1)},a.prototype.once=function(t,e,i){return o(this,t,e,i,!0)},a.prototype.removeListener=function(t,e,i,n){t=p?p+t:t;if(this._events[t])if(e){var r=this._events[t];if(r.fn)r.fn!==e||n&&!r.once||i&&r.context!==i||h(this,t);else{for(var s=0,o=[],a=r.length;s<a;s++)(r[s].fn!==e||n&&!r[s].once||i&&r[s].context!==i)&&o.push(r[s]);o.length?this._events[t]=1===o.length?o[0]:o:h(this,t)}}else h(this,t);return this},a.prototype.removeAllListeners=function(t){return t?(t=p?p+t:t,this._events[t]&&h(this,t)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=p,t.exports=a.EventEmitter=a},function(t,e,i){var n=i(0),r=i(57),s=i(171),o=i(306),a=i(56),h=i(47),l=i(174),i=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 r(this,t,e)},getPoint:function(t,e){return s(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(t=void 0===t?new h:t).setTo(this.x,this.y,this.right,this.y),t},getLineB:function(t){return(t=void 0===t?new h:t).setTo(this.right,this.y,this.right,this.bottom),t},getLineC:function(t){return(t=void 0===t?new h:t).setTo(this.right,this.bottom,this.x,this.bottom),t},getLineD:function(t){return(t=void 0===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}}});t.exports=i},function(t,e,i){t.exports={Alpha:i(607),AlphaSingle:i(303),BlendMode:i(304),ComputedSize:i(608),Crop:i(609),Depth:i(305),Flip:i(610),GetBounds:i(611),Mask:i(309),Origin:i(632),PathFollower:i(633),Pipeline:i(167),ScrollFactor:i(312),Size:i(634),Texture:i(635),TextureCrop:i(636),Tint:i(637),ToJSON:i(176),Transform:i(313),TransformMatrix:i(25),Visible:i(314)}},function(t,e){t.exports={getTintFromFloats:function(t,e,i,n){return((255&(255*n|0))<<24|(255&(255*t|0))<<16|(255&(255*e|0))<<8|255&(255*i|0))>>>0},getTintAppendFloatAlpha:function(t,e){return((255&(255*e|0))<<24|t)>>>0},getTintAppendFloatAlphaAndSwap:function(t,e){return((255&(255*e|0))<<24|(255&(0|t))<<16|(255&(t>>8|0))<<8|255&(t>>16|0))>>>0},getFloatsFromUintRGB:function(t){return[(255&(t>>16|0))/255,(255&(t>>8|0))/255,(255&(0|t))/255]},checkShaderMax:function(t,e){e&&-1!==e||(e=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS));for(var i=t.createShader(t.FRAGMENT_SHADER),n=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join("\n");;){var r=n.replace(/%forloop%/gi,function(t){for(var e="",i=0;i<t;++i)0<i&&(e+="\nelse "),i<t-1&&(e+="if(test == "+i+".0){}");return e}(e));if(t.shaderSource(i,r),t.compileShader(i),t.getShaderParameter(i,t.COMPILE_STATUS))break;e=e/2|0}return e},parseFragmentShaderMaxTextures:function(t,e){if(!t)return"";for(var i="",n=0;n<e;n++)0<n&&(i+="\n\telse "),n<e-1&&(i+="if (outTexId < "+n+".5)"),i=(i+="\n\t{")+("\n\t\ttexture = texture2D(uMainSampler["+n+"], outTexCoord);")+"\n\t}";return(t=t.replace(/%count%/gi,e.toString())).replace(/%forloop%/gi,i)}}},function(t,e,i){var n=i(193),r=i(6);t.exports=function(t,e,i){t=r(t,e,null);if(null===t)return i;if(Array.isArray(t))return n.RND.pick(t);if("object"==typeof t){if(t.hasOwnProperty("randInt"))return n.RND.integerInRange(t.randInt[0],t.randInt[1]);if(t.hasOwnProperty("randFloat"))return n.RND.realInRange(t.randFloat[0],t.randFloat[1])}else if("function"==typeof t)return t(e);return t}},function(t,e){var i={PI2:2*Math.PI,TAU:.5*Math.PI,EPSILON:1e-6,DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,RND:null,MIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER||-9007199254740991,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991};t.exports=i},function(t,e,i){var n=i(0),r=i(176),s=i(101),o=i(9),a=i(75),h=i(20),l=new n({Extends:o,initialize:function(t,e){o.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.input=null,this.body=null,this.ignoreDestroy=!1,this.on(a.ADDED_TO_SCENE,this.addedToScene,this),this.on(a.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 s(this)),this},setData:function(t,e){return this.data||(this.data=new s(this)),this.data.set(t,e),this},incData:function(t,e){return this.data||(this.data=new s(this)),this.data.inc(t,e),this},toggleData:function(t){return this.data||(this.data=new s(this)),this.data.toggle(t),this},getData:function(t){return this.data||(this.data=new s(this)),this.data.get(t)},setInteractive:function(t,e,i){return this.scene.sys.input.enable(this,t,e,i),this},disableInteractive:function(){return this.input&&(this.input.enabled=!1),this},removeInteractive:function(){return this.scene.sys.input.clear(this),this.input=void 0,this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return r(this)},willRender:function(t){return!(l.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},getIndexList:function(){for(var t=this,e=this.parentContainer,i=[];e&&(i.unshift(e.getIndex(t)),(t=e).parentContainer);)e=e.parentContainer;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).add(this,!0),t.queueDepthSort(),this.emit(a.ADDED_TO_SCENE,this,this.scene),t.events.emit(h.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.exists(this)&&(t.remove(this,!0),t.queueDepthSort(),this.displayList=null,this.emit(a.REMOVED_FROM_SCENE,this,this.scene),t.events.emit(h.REMOVED_FROM_SCENE,this,this.scene)),this},removeFromUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.remove(this),this},destroy:function(t){this.scene&&!this.ignoreDestroy&&(void 0===t&&(t=!1),this.preDestroy&&this.preDestroy.call(this),this.emit(a.DESTROY,this,t),this.removeAllListeners(),this.postPipelines&&this.resetPostPipeline(!0),this.removeFromDisplayList(),this.removeFromUpdateList(),this.input&&(this.scene.sys.input.clear(this),this.input=void 0),this.data&&(this.data.destroy(),this.data=void 0),this.body&&(this.body.destroy(),this.body=void 0),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0)}});l.RENDER_MASK=15,t.exports=l},function(t,e,i){var n=i(0),r=i(24),s=i(20),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(s.BOOT,this.boot,this),this.events.on(s.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(s.DESTROY,this.destroy,this)},start:function(){this.events.once(s.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.events.off(s.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(s.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]},r.register("GameObjectCreator",o,"make"),t.exports=o},function(t,e,i){function l(){var t,e,i,n,r,s=arguments[0]||{},o=1,a=arguments.length,h=!1;for("boolean"==typeof s&&(h=s,s=arguments[1]||{},o=2),a===o&&(s=this,--o);o<a;o++)if(null!=(t=arguments[o]))for(e in t)r=s[e],s!==(i=t[e])&&(h&&i&&(c(i)||(n=Array.isArray(i)))?(r=n?(n=!1,r&&Array.isArray(r)?r:[]):r&&c(r)?r:{},s[e]=l(h,r,i)):void 0!==i&&(s[e]=i));return s}var c=i(7);t.exports=l},function(t,e){t.exports=function(t,e,i){return Math.max(e,Math.min(i,t))}},function(t,e,i){var i=i(25),o=new i,a=new i,h=new i,l={camera:o,sprite:a,calc:h};t.exports=function(t,e,i){var n=o,r=a,s=h;return r.applyITRS(t.x,t.y,t.rotation,t.scaleX,t.scaleY),n.copyFrom(e.matrix),i?(n.multiplyWithOffset(i,-e.scrollX*t.scrollFactorX,-e.scrollY*t.scrollFactorY),r.e=t.x,r.f=t.y):(r.e-=e.scrollX*t.scrollFactorX,r.f-=e.scrollY*t.scrollFactorY),n.multiply(r,s),l}},function(t,e,i){t.exports={ADDED_TO_SCENE:i(656),BOOT:i(657),CREATE:i(658),DESTROY:i(659),PAUSE:i(660),POST_UPDATE:i(661),PRE_RENDER:i(662),PRE_UPDATE:i(663),READY:i(664),REMOVED_FROM_SCENE:i(665),RENDER:i(666),RESUME:i(667),SHUTDOWN:i(668),SLEEP:i(669),START:i(670),TRANSITION_COMPLETE:i(671),TRANSITION_INIT:i(672),TRANSITION_OUT:i(673),TRANSITION_START:i(674),TRANSITION_WAKE:i(675),UPDATE:i(676),WAKE:i(677)}},function(t,e){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}},function(t,e,i){t.exports={BLUR:i(612),BOOT:i(613),CONTEXT_LOST:i(614),CONTEXT_RESTORED:i(615),DESTROY:i(616),FOCUS:i(617),HIDDEN:i(618),PAUSE:i(619),POST_RENDER:i(620),POST_STEP:i(621),PRE_RENDER:i(622),PRE_STEP:i(623),READY:i(624),RESUME:i(625),STEP:i(626),VISIBLE:i(627)}},function(t,e,i){var n=i(0),r=i(21),s=i(95),o=i(2),a=i(155),h=i(240),l=i(517),c=i(156),i=new n({initialize:function(t,e){this.loader=t,this.cache=o(e,"cache",!1),this.type=o(e,"type",!1),this.key=o(e,"key",!1);var i=this.key;if(t.prefix&&""!==t.prefix&&(this.key=t.prefix+i),!this.type||!this.key)throw new Error("Invalid Loader."+this.type+" key");var n=o(e,"url");void 0===n?n=t.path+i+"."+o(e,"extension",""):"string"!=typeof n||n.match(/^(?:blob:|data:|http:\/\/|https:\/\/|\/\/)/)||(n=t.path+n),this.url=n,this.src="",this.xhrSettings=c(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?r.FILE_POPULATED:r.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},setLink:function(t){(this.linkFile=t).linkFile=this},resetXHR:function(){this.xhrLoader&&(this.xhrLoader.onload=void 0,this.xhrLoader.onerror=void 0,this.xhrLoader.onprogress=void 0)},load:function(){this.state===r.FILE_POPULATED?this.loader.nextFile(this,!0):(this.state=r.FILE_LOADING,this.src=a(this,this.loader.baseURL),0!==this.src.indexOf("data:")&&(this.xhrLoader=l(this,this.loader.xhr)))},onLoad:function(t,e){var i=t.responseURL&&(0===t.responseURL.indexOf("file://")||0===t.responseURL.indexOf("capacitor://"))&&0===e.target.status,e=!(e.target&&200!==e.target.status)||i;4===t.readyState&&400<=t.status&&t.status<=599&&(e=!1),this.state=r.FILE_LOADED,this.resetXHR(),this.loader.nextFile(this,e)},onError:function(){this.resetXHR(),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(s.FILE_PROGRESS,this,this.percentComplete))},onProcess:function(){this.state=r.FILE_PROCESSING,this.onProcessComplete()},onProcessComplete:function(){this.state=r.FILE_COMPLETE,this.multiFile&&this.multiFile.onFileComplete(this),this.loader.fileProcessComplete(this)},onProcessError:function(){this.state=r.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.cache.add(this.key,this.data),this.pendingDestroy()},pendingDestroy:function(t){void 0===t&&(t=this.data);var e=this.key,i=this.type;this.loader.emit(s.FILE_COMPLETE,e,i,t),this.loader.emit(s.FILE_KEY_COMPLETE+i+"-"+e,e,i,t),this.loader.flagForRemoval(this)},destroy:function(){this.loader=null,this.cache=null,this.xhrSettings=null,this.multiFile=null,this.linkFile=null,this.data=null}});i.createObjectURL=function(t,e,i){var n;"function"==typeof URL?t.src=URL.createObjectURL(e):((n=new FileReader).onload=function(){t.removeAttribute("crossOrigin"),t.src="data:"+(e.type||i)+";base64,"+n.result.split(",")[1]},n.onerror=t.onerror,n.readAsDataURL(e))},i.revokeObjectURL=function(t){"function"==typeof URL&&URL.revokeObjectURL(t.src)},t.exports=i},function(t,e){var r={},s={};t.exports={register:function(t,e,i,n){r[t]={plugin:e,mapping:i,custom:n=void 0===n?!1:n}},registerCustom:function(t,e,i,n){s[t]={plugin:e,mapping:i,data:n}},hasCore:function(t){return r.hasOwnProperty(t)},hasCustom:function(t){return s.hasOwnProperty(t)},getCore:function(t){return r[t]},getCustom:function(t){return s[t]},getCustomClass:function(t){return s.hasOwnProperty(t)?s[t].plugin:null},remove:function(t){r.hasOwnProperty(t)&&delete r[t]},removeCustom:function(t){s.hasOwnProperty(t)&&delete s[t]},destroyCorePlugins:function(){for(var t in r)r.hasOwnProperty(t)&&delete r[t]},destroyCustomPlugins:function(){for(var t in s)s.hasOwnProperty(t)&&delete s[t]}}},function(t,e,i){var n=i(0),r=i(14),c=i(3),i=new n({initialize:function(t,e,i,n,r,s){void 0===t&&(t=1),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=1),void 0===r&&(r=0),void 0===s&&(s=0),this.matrix=new Float32Array([t,e,i,n,r,s,0,0,1]),this.decomposedMatrix={translateX:0,translateY:0,scaleX:1,scaleY:1,rotation:0}},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)*(Math.atan(-this.c/this.a)<0?-1:1)}},rotationNormalized:{get:function(){var t=this.matrix,e=t[0],i=t[1],n=t[2],t=t[3];return e||i?0<i?Math.acos(e/this.scaleX):-Math.acos(e/this.scaleX):n||t?r.TAU-(0<t?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),t=Math.cos(t),i=this.matrix,n=i[0],r=i[1],s=i[2],o=i[3];return i[0]=n*t+s*e,i[1]=r*t+o*e,i[2]=n*-e+s*t,i[3]=r*-e+o*t,this},multiply:function(t,e){var i=this.matrix,t=t.matrix,n=i[0],r=i[1],s=i[2],o=i[3],a=i[4],i=i[5],h=t[0],l=t[1],c=t[2],u=t[3],d=t[4],t=t[5],e=void 0===e?this:e;return e.a=h*n+l*s,e.b=h*r+l*o,e.c=c*n+u*s,e.d=c*r+u*o,e.e=d*n+t*s+a,e.f=d*r+t*o+i,e},multiplyWithOffset:function(t,e,i){var n=this.matrix,t=t.matrix,r=n[0],s=n[1],o=n[2],a=n[3],h=e*r+i*o+n[4],e=e*s+i*a+n[5],i=t[0],l=t[1],c=t[2],u=t[3],d=t[4],t=t[5];return n[0]=i*r+l*o,n[1]=i*s+l*a,n[2]=c*r+u*o,n[3]=c*s+u*a,n[4]=d*r+t*o+h,n[5]=d*s+t*a+e,this},transform:function(t,e,i,n,r,s){var o=this.matrix,a=o[0],h=o[1],l=o[2],c=o[3],u=o[4],d=o[5];return o[0]=t*a+e*l,o[1]=t*h+e*c,o[2]=i*a+n*l,o[3]=i*h+n*c,o[4]=r*a+s*l+u,o[5]=r*h+s*c+d,this},transformPoint:function(t,e,i){var n=this.matrix,r=n[0],s=n[1],o=n[2],a=n[3],h=n[4],n=n[5];return(i=void 0===i?{x:0,y:0}:i).x=t*r+e*o+h,i.y=t*s+e*a+n,i},invert:function(){var t=this.matrix,e=t[0],i=t[1],n=t[2],r=t[3],s=t[4],o=t[5],a=e*r-i*n;return t[0]=r/a,t[1]=-i/a,t[2]=-n/a,t[3]=e/a,t[4]=(n*o-r*s)/a,t[5]=-(e*o-i*s)/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},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){var e=this.matrix;return t.setTransform(e[0],e[1],e[2],e[3],e[4],e[5]),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,r,s){var o=this.matrix;return o[0]=t,o[1]=e,o[2]=i,o[3]=n,o[4]=r,o[5]=s,this},decomposeMatrix:function(){var t=this.decomposedMatrix,e=this.matrix,i=e[0],n=e[1],r=e[2],s=e[3],o=i*s-n*r;return t.translateX=e[4],t.translateY=e[5],i||n?(e=Math.sqrt(i*i+n*n),t.rotation=0<n?Math.acos(i/e):-Math.acos(i/e),t.scaleX=e,t.scaleY=o/e):r||s?(n=Math.sqrt(r*r+s*s),t.rotation=.5*Math.PI-(0<s?Math.acos(-r/n):-Math.acos(r/n)),t.scaleX=o/n,t.scaleY=n):(t.rotation=0,t.scaleX=0,t.scaleY=0),t},applyITRS:function(t,e,i,n,r){var s=this.matrix,o=Math.sin(i),i=Math.cos(i);return s[4]=t,s[5]=e,s[0]=i*n,s[1]=o*n,s[2]=-o*r,s[3]=i*r,this},applyInverse:function(t,e,i){void 0===i&&(i=new c);var n=this.matrix,r=n[0],s=n[1],o=n[2],a=n[3],h=n[4],n=n[5],l=1/(r*a+o*-s);return i.x=a*l*t+-o*l*e+(n*o-h*a)*l,i.y=r*l*e+-s*l*t+(-n*r+h*s)*l,i},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){t=this.getX(t,e);return t=i?Math.round(t):t},getYRound:function(t,e,i){t=this.getY(t,e);return t=i?Math.round(t):t},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.decomposedMatrix=null}});t.exports=i},function(t,e,i){var p=i(2);t.exports=function(t,e,i,n,r,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=s.width),void 0===n&&(n=s.height);var o=p(r=r||{},"isNotEmpty",!1),a=p(r,"isColliding",!1),h=p(r,"hasInterestingFace",!1);t<0&&(i+=t,t=0),e<0&&(n+=e,e=0),t+i>s.width&&(i=Math.max(s.width-t,0)),e+n>s.height&&(n=Math.max(s.height-e,0));for(var l=[],c=e;c<e+n;c++)for(var u=t;u<t+i;u++){var d=s.data[c][u];null===d||o&&-1===d.index||a&&!d.collides||h&&!d.hasInterestingFace||l.push(d)}return l}},function(t,e){t.exports=function(t,e,i,n,r,s){void 0===n&&(n=0),void 0===r&&(r=0);var o,a=0,h=t.length;if(1===(s=void 0===s?1:s))for(o=r;o<h;o++)t[o][e]=i+a*n,a++;else for(o=r;0<=o;o--)t[o][e]=i+a*n,a++;return t}},function(t,e,i){var s=i(35),o=i(13);t.exports=function(t,e,i){e.x=o(i,"x",0),e.y=o(i,"y",0),e.depth=o(i,"depth",0),e.flipX=o(i,"flipX",!1),e.flipY=o(i,"flipY",!1);var n=o(i,"scale",null),n=("number"==typeof n?e.setScale(n):null!==n&&(e.scaleX=o(n,"x",1),e.scaleY=o(n,"y",1)),o(i,"scrollFactor",null)),n=("number"==typeof n?e.setScrollFactor(n):null!==n&&(e.scrollFactorX=o(n,"x",1),e.scrollFactorY=o(n,"y",1)),e.rotation=o(i,"rotation",0),o(i,"angle",null));null!==n&&(e.angle=n),e.alpha=o(i,"alpha",1);var r,n=o(i,"origin",null);return"number"==typeof n?e.setOrigin(n):null!==n&&(r=o(n,"x",.5),n=o(n,"y",.5),e.setOrigin(r,n)),e.blendMode=o(i,"blendMode",s.NORMAL),e.visible=o(i,"visible",!0),o(i,"add",!0)&&t.sys.displayList.add(e),e.preUpdate&&t.sys.updateList.add(e),e}},function(t,e){t.exports={ORTHOGONAL:0,ISOMETRIC:1,STAGGERED:2,HEXAGONAL:3}},function(t,e,i){var o=i(19);t.exports=function(t,e,i,n,r){var s=n.alpha*i.alpha;return!(s<=0)&&(n=o(i,n,r).calc,e.globalCompositeOperation=t.blendModes[i.blendMode],e.globalAlpha=s,e.save(),n.setToContext(e),e.imageSmoothingEnabled=!(!t.antialias||i.frame&&i.frame.source.scaleMode),!0)}},function(t,e,i){var o,a=i(33),h=i(192),l=[],c=!1;function n(t,e,i,n,r){void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=a.CANVAS),void 0===r&&(r=!1);var s=o(n),t=(null===s?(s={parent:t,canvas:document.createElement("canvas"),type:n},n===a.CANVAS&&l.push(s)):s.parent=t,s.canvas);return r&&(s.parent=t),t.width=e,t.height=i,c&&n===a.CANVAS&&h.disable(t.getContext("2d")),t}function r(){var e=0;return l.forEach(function(t){t.parent&&e++}),e}t.exports={create2D:function(t,e,i){return n(t,e,i,a.CANVAS)},create:n,createWebGL:function(t,e,i){return n(t,e,i,a.WEBGL)},disableSmoothing:function(){c=!0},enableSmoothing:function(){c=!1},first:o=function(t){if((t=void 0===t?a.CANVAS:t)!==a.WEBGL)for(var e=0;e<l.length;e++){var i=l[e];if(!i.parent&&i.type===t)return i}return null},free:function(){return l.length-r()},pool:l,remove:function(e){var i=e instanceof HTMLCanvasElement;l.forEach(function(t){(i&&t.canvas===e||!i&&t.parent===e)&&(t.parent=null,t.canvas.width=1,t.canvas.height=1)})},total:r}},function(t,e){var i,h={};(t.exports=h)._nextId=0,h._seed=0,h._nowStartTime=+new Date,h.extend=function(t,e){for(var i,n="boolean"==typeof e?(i=2,e):(i=1,!0),r=i;r<arguments.length;r++){var s=arguments[r];if(s)for(var o in s)!n||!s[o]||s[o].constructor!==Object||t[o]&&t[o].constructor!==Object?t[o]=s[o]:(t[o]=t[o]||{},h.extend(t[o],n,s[o]))}return t},h.clone=function(t,e){return h.extend({},e,t)},h.keys=function(t){if(Object.keys)return Object.keys(t);var e,i=[];for(e in t)i.push(e);return i},h.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]]);else for(var r in t)e.push(t[r]);return e},h.get=function(t,e,i,n){e=e.split(".").slice(i,n);for(var r=0;r<e.length;r+=1)t=t[e[r]];return t},h.set=function(t,e,i,n,r){n=e.split(".").slice(n,r);return h.get(t,e,0,-1)[n[n.length-1]]=i},h.shuffle=function(t){for(var e=t.length-1;0<e;e--){var i=Math.floor(h.random()*(e+1)),n=t[e];t[e]=t[i],t[i]=n}return t},h.choose=function(t){return t[Math.floor(h.random()*t.length)]},h.isElement=function(t){return"undefined"!=typeof HTMLElement?t instanceof HTMLElement:!!(t&&t.nodeType&&t.nodeName)},h.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)},h.isFunction=function(t){return"function"==typeof t},h.isPlainObject=function(t){return"object"==typeof t&&t.constructor===Object},h.isString=function(t){return"[object String]"===Object.prototype.toString.call(t)},h.clamp=function(t,e,i){return t<e?e:i<t?i:t},h.sign=function(t){return t<0?-1:1},h.now=function(){if("undefined"!=typeof window&&window.performance){if(window.performance.now)return window.performance.now();if(window.performance.webkitNow)return window.performance.webkitNow()}return new Date-h._nowStartTime},h.random=function(t,e){return e=void 0!==e?e:1,(t=void 0!==t?t:0)+i()*(e-t)},i=function(){return h._seed=(9301*h._seed+49297)%233280,h._seed/233280},h.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)},h.logLevel=1,h.log=function(){console&&0<h.logLevel&&h.logLevel},h.info=function(){console&&0<h.logLevel&&h.logLevel},h.warn=function(){console&&0<h.logLevel&&h.logLevel},h.nextId=function(){return h._nextId++},h.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},h.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},h.topologicalSort=function(t){var e,i=[],n=[],r=[];for(e in t)n[e]||r[e]||h._topologicalSort(e,n,r,t,i);return i},h._topologicalSort=function(t,e,i,n,r){var s=n[t]||[];i[t]=!0;for(var o=0;o<s.length;o+=1){var a=s[o];i[a]||e[a]||h._topologicalSort(a,e,i,n,r)}i[t]=!1,e[t]=!0,r.push(t)},h.chain=function(){for(var s=[],t=0;t<arguments.length;t+=1){var e=arguments[t];e._chained?s.push.apply(s,e._chained):s.push(e)}function i(){for(var t,e=new Array(arguments.length),i=0,n=arguments.length;i<n;i++)e[i]=arguments[i];for(i=0;i<s.length;i+=1){var r=s[i].apply(t,e);void 0!==r&&(t=r)}return t}return i._chained=s,i},h.chainPathBefore=function(t,e,i){return h.set(t,e,h.chain(i,h.get(t,e)))},h.chainPathAfter=function(t,e,i){return h.set(t,e,h.chain(h.get(t,e),i))}},function(t,e,i){i={VERSION:"3.55.2",BlendModes:i(35),ScaleModes:i(168),AUTO:0,CANVAS:1,WEBGL:2,HEADLESS:3,FOREVER:-1,NONE:4,UP:5,DOWN:6,LEFT:7,RIGHT:8};t.exports=i},function(t,e,i){var n=i(0),r=i(11),s=i(15),o=i(47),i=new n({Extends:s,Mixins:[r.AlphaSingle,r.BlendMode,r.Depth,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Transform,r.Visible],initialize:function(t,e,i){s.call(this,t,e=void 0===e?"Shape":e),this.geom=i,this.pathData=[],this.pathIndexes=[],this.fillColor=16777215,this.fillAlpha=1,this.strokeColor=16777215,this.strokeAlpha=1,this.lineWidth=1,this.isFilled=!1,this.isStroked=!1,this.closePath=!0,this._tempLine=new o,this.width=0,this.height=0,this.initPipeline()},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}}});t.exports=i},function(t,e){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}},function(t,e,i){var n=i(14);t.exports=function(t){return t*n.DEG_TO_RAD}},function(t,e,i){t.exports={DESTROY:i(743),FADE_IN_COMPLETE:i(744),FADE_IN_START:i(745),FADE_OUT_COMPLETE:i(746),FADE_OUT_START:i(747),FLASH_COMPLETE:i(748),FLASH_START:i(749),FOLLOW_UPDATE:i(750),PAN_COMPLETE:i(751),PAN_START:i(752),POST_RENDER:i(753),PRE_RENDER:i(754),ROTATE_COMPLETE:i(755),ROTATE_START:i(756),SHAKE_COMPLETE:i(757),SHAKE_START:i(758),ZOOM_COMPLETE:i(759),ZOOM_START:i(760)}},function(t,e,i){var n=i(0),s=i(103),o=i(328),r=i(188),a=i(329),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,r){return void 0===n&&(n=255),void 0===r&&(r=!0),this._locked=!0,this.red=t,this.green=e,this.blue=i,this.alpha=n,this._locked=!1,this.update(r)},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 r(t,e,i,this)},update:function(t){var e,i,n,r;return void 0===t&&(t=!1),this._locked||(e=this.r,i=this.g,n=this.b,r=this.a,this._color=s(e,i,n),this._color32=o(e,i,n,r),this._rgba="rgba("+e+","+i+","+n+","+r/255+")",t&&a(e,i,n,this)),this},updateHSV:function(){var t=this.r,e=this.g,i=this.b;return a(t,e,i,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)),e=Math.floor(t+Math.random()*(e-t));return this.setTo(i,n,e)},randomGray:function(t,e){void 0===t&&(t=0),void 0===e&&(e=255);e=Math.floor(t+Math.random()*(e-t));return this.setTo(e,e,e)},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,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)));return 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,r(t,this._s,this._v,this)}},s:{get:function(){return this._s},set:function(t){this._s=t,r(this._h,t,this._v,this)}},v:{get:function(){return this._v},set:function(t){this._v=t,r(this._h,this._s,t,this)}}});t.exports=h},function(t,e,i){var n=new(i(0))({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},crossVectors:function(t,e){var i=t.x,n=t.y,t=t.z,r=e.x,s=e.y,e=e.z;return this.x=n*e-t*s,this.y=t*r-i*e,this.z=i*s-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 this.x=t[e=void 0===e?0: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,t=t.z-this.z||0;return Math.sqrt(e*e+i*i+t*t)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,t=t.z-this.z||0;return e*e+i*i+t*t},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 0<n&&(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,r=t.x,s=t.y,t=t.z;return this.x=i*t-n*s,this.y=n*r-e*t,this.z=e*s-i*r,this},lerp:function(t,e){var i=this.x,n=this.y,r=this.z;return this.x=i+(e=void 0===e?0:e)*(t.x-i),this.y=n+e*(t.y-n),this.z=r+e*(t.z-r),this},applyMatrix3:function(t){var e=this.x,i=this.y,n=this.z,t=t.val;return this.x=t[0]*e+t[3]*i+t[6]*n,this.y=t[1]*e+t[4]*i+t[7]*n,this.z=t[2]*e+t[5]*i+t[8]*n,this},applyMatrix4:function(t){var e=this.x,i=this.y,n=this.z,t=t.val,r=1/(t[3]*e+t[7]*i+t[11]*n+t[15]);return this.x=(t[0]*e+t[4]*i+t[8]*n+t[12])*r,this.y=(t[1]*e+t[5]*i+t[9]*n+t[13])*r,this.z=(t[2]*e+t[6]*i+t[10]*n+t[14])*r,this},transformMat3:function(t){var e=this.x,i=this.y,n=this.z,t=t.val;return this.x=e*t[0]+i*t[3]+n*t[6],this.y=e*t[1]+i*t[4]+n*t[7],this.z=e*t[2]+i*t[5]+n*t[8],this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,t=t.val;return this.x=t[0]*e+t[4]*i+t[8]*n+t[12],this.y=t[1]*e+t[5]*i+t[9]*n+t[13],this.z=t[2]*e+t[6]*i+t[10]*n+t[14],this},transformCoordinates:function(t){var e=this.x,i=this.y,n=this.z,t=t.val,r=e*t[0]+i*t[4]+n*t[8]+t[12],s=e*t[1]+i*t[5]+n*t[9]+t[13],o=e*t[2]+i*t[6]+n*t[10]+t[14],e=e*t[3]+i*t[7]+n*t[11]+t[15];return this.x=r/e,this.y=s/e,this.z=o/e,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,r=t.x,s=t.y,o=t.z,t=t.w,a=t*e+s*n-o*i,h=t*i+o*e-r*n,l=t*n+r*i-s*e,e=-r*e-s*i-o*n;return this.x=a*t+e*-r+h*-o-l*-s,this.y=h*t+e*-s+l*-r-a*-o,this.z=l*t+e*-o+a*-s-h*-r,this},project:function(t){var e=this.x,i=this.y,n=this.z,t=t.val,r=t[0],s=t[1],o=t[2],a=t[3],h=t[4],l=t[5],c=t[6],u=t[7],d=t[8],p=t[9],f=t[10],g=t[11],m=t[12],y=t[13],v=t[14],a=1/(e*a+i*u+n*g+t[15]);return this.x=(e*r+i*h+n*d+m)*a,this.y=(e*s+i*l+n*p+y)*a,this.z=(e*o+i*c+n*f+v)*a,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,r=t.z,t=t.w,i=this.x-i,n=t-this.y-1-n,s=this.z;return this.x=2*i/r-1,this.y=2*n/t-1,this.z=2*s-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},function(t,e){t.exports={CSV:0,TILED_JSON:1,ARRAY_2D:2,WELTMEISTER:3}},function(t,e,i){var n,u={},d=(t.exports=u,i(64)),h=i(83),r=i(165),s=i(32),p=i(84),l=i(271);u._inertiaScale=4,u._nextCollidingGroupId=1,u._nextNonCollidingGroupId=-1,u._nextCategory=1,u.create=function(t){var e={id:s.nextId(),type:"body",label:"Body",parts:[],plugin:{},angle:0,vertices:null,position:{x:0,y:0},force:{x:0,y:0},torque:0,positionImpulse:{x:0,y:0},previousPositionImpulse:{x:0,y:0},constraintImpulse:{x:0,y:0,angle:0},totalContacts:0,speed:0,angularSpeed:0,velocity:{x:0,y:0},angularVelocity:0,isSensor:!1,isStatic:!1,isSleeping:!1,motion:0,sleepThreshold:60,density:.001,restitution:0,friction:.1,frictionStatic:.5,frictionAir:.01,collisionFilter:{category:1,mask:4294967295,group:0},slop:.05,timeScale:1,events:null,bounds:null,chamfer:null,circleRadius:0,positionPrev:null,anglePrev:0,parent:null,axes:null,area:0,mass:0,inverseMass:0,inertia:0,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:{}},e=(!t.hasOwnProperty("position")&&t.hasOwnProperty("vertices")?t.position=d.centre(t.vertices):t.hasOwnProperty("vertices")||(e.vertices=d.fromPath("L 0 0 L 40 0 L 40 40 L 0 40")),s.extend(e,t));return n(e,t),e.setOnCollideWith=function(t,e){return e?this.onCollideWith[t.id]=e:delete this.onCollideWith[t.id],this},e},u.nextGroup=function(t){return t?u._nextNonCollidingGroupId--:u._nextCollidingGroupId++},u.nextCategory=function(){return u._nextCategory=u._nextCategory<<1,u._nextCategory},n=function(t,e){e=e||{},u.set(t,{bounds:t.bounds||p.create(t.vertices),positionPrev:t.positionPrev||h.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});var i,n,r,s=t.bounds;d.rotate(t.vertices,t.angle,t.position),l.rotate(t.axes,t.angle),p.update(s,t.vertices,t.velocity),u.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&&(e=t.centerOfMass,i=t.centerOffset,n=s.max.x-s.min.x,r=s.max.y-s.min.y,e.x=-(s.min.x-t.position.x)/n,e.y=-(s.min.y-t.position.y)/r,i.x=n*e.x,i.y=r*e.y)},u.set=function(t,e,i){for(var 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":u.setStatic(t,i);break;case"isSleeping":r.set(t,i);break;case"mass":u.setMass(t,i);break;case"density":u.setDensity(t,i);break;case"inertia":u.setInertia(t,i);break;case"vertices":u.setVertices(t,i);break;case"position":u.setPosition(t,i);break;case"angle":u.setAngle(t,i);break;case"velocity":u.setVelocity(t,i);break;case"angularVelocity":u.setAngularVelocity(t,i);break;case"parts":u.setParts(t,i);break;case"centre":u.setCentre(t,i);break;default:t[n]=i}},u.setStatic=function(t,e){for(var i=0;i<t.parts.length;i++){var n=t.parts[i];(n.isStatic=e)?(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)}},u.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},u.setDensity=function(t,e){u.setMass(t,e*t.area),t.density=e},u.setInertia=function(t,e){t.inertia=e,t.inverseInertia=1/t.inertia},u.setVertices=function(t,e){e[0].body===t?t.vertices=e:t.vertices=d.create(e,t),t.axes=l.fromVertices(t.vertices),t.area=d.area(t.vertices),u.setMass(t,t.density*t.area);e=d.centre(t.vertices);d.translate(t.vertices,e,-1),u.setInertia(t,u._inertiaScale*d.inertia(t.vertices,t.mass)),d.translate(t.vertices,t.position),p.update(t.bounds,t.vertices,t.velocity)},u.setParts=function(t,e,i){for(e=e.slice(0),t.parts.length=0,t.parts.push(t),t.parent=t,s=0;s<e.length;s++){var n=e[s];n!==t&&(n.parent=t).parts.push(n)}if(1!==t.parts.length){if(i=void 0===i||i){for(var r=[],s=0;s<e.length;s++)r=r.concat(e[s].vertices);d.clockwiseSort(r);var i=d.hull(r),o=d.centre(i);u.setVertices(t,i),d.translate(t.vertices,o)}var i=u._totalProperties(t),o=i.centre.x,a=i.centre.y,h=t.bounds,l=t.centerOfMass,c=t.centerOffset;p.update(h,t.vertices,t.velocity),l.x=-(h.min.x-o)/(h.max.x-h.min.x),l.y=-(h.min.y-a)/(h.max.y-h.min.y),c.x=o,c.y=a,t.area=i.area,(t.parent=t).position.x=o,t.position.y=a,t.positionPrev.x=o,t.positionPrev.y=a,u.setMass(t,i.mass),u.setInertia(t,i.inertia),u.setPosition(t,i.centre)}},u.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)},u.setPosition=function(t,e){var i=h.sub(e,t.position);t.positionPrev.x+=i.x,t.positionPrev.y+=i.y;for(var n=0;n<t.parts.length;n++){var r=t.parts[n];r.position.x+=i.x,r.position.y+=i.y,d.translate(r.vertices,i),p.update(r.bounds,r.vertices,t.velocity)}},u.setAngle=function(t,e){var i=e-t.angle;t.anglePrev+=i;for(var n=0;n<t.parts.length;n++){var r=t.parts[n];r.angle+=i,d.rotate(r.vertices,i,t.position),l.rotate(r.axes,i),p.update(r.bounds,r.vertices,t.velocity),0<n&&h.rotateAbout(r.position,i,t.position,r.position)}},u.setVelocity=function(t,e){t.positionPrev.x=t.position.x-e.x,t.positionPrev.y=t.position.y-e.y,t.velocity.x=e.x,t.velocity.y=e.y,t.speed=h.magnitude(t.velocity)},u.setAngularVelocity=function(t,e){t.anglePrev=t.angle-e,t.angularVelocity=e,t.angularSpeed=Math.abs(t.angularVelocity)},u.translate=function(t,e){u.setPosition(t,h.add(t.position,e))},u.rotate=function(t,e,i){var n,r,s,o;i&&(n=Math.cos(e),r=Math.sin(e),s=t.position.x-i.x,o=t.position.y-i.y,u.setPosition(t,{x:i.x+(s*n-o*r),y:i.y+(s*r+o*n)})),u.setAngle(t,t.angle+e)},u.scale=function(t,e,i,n){var r=0,s=0;n=n||t.position;for(var o=0;o<t.parts.length;o++){var a=t.parts[o];a.scale.x=e,a.scale.y=i,d.scale(a.vertices,e,i,n),a.axes=l.fromVertices(a.vertices),a.area=d.area(a.vertices),u.setMass(a,t.density*a.area),d.translate(a.vertices,{x:-a.position.x,y:-a.position.y}),u.setInertia(a,u._inertiaScale*d.inertia(a.vertices,a.mass)),d.translate(a.vertices,{x:a.position.x,y:a.position.y}),0<o&&(r+=a.area,s+=a.inertia),a.position.x=n.x+(a.position.x-n.x)*e,a.position.y=n.y+(a.position.y-n.y)*i,p.update(a.bounds,a.vertices,t.velocity)}1<t.parts.length&&(t.area=r,t.isStatic||(u.setMass(t,t.density*r),u.setInertia(t,s))),t.circleRadius&&(e===i?t.circleRadius*=e:t.circleRadius=null)},u.update=function(t,e,i,n){var e=Math.pow(e*i*t.timeScale,2),i=1-t.frictionAir*i*t.timeScale,r=t.position.x-t.positionPrev.x,s=t.position.y-t.positionPrev.y;t.velocity.x=r*i*n+t.force.x/t.mass*e,t.velocity.y=s*i*n+t.force.y/t.mass*e,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.angularVelocity=(t.angle-t.anglePrev)*i*n+t.torque/t.inertia*e,t.anglePrev=t.angle,t.angle+=t.angularVelocity,t.speed=h.magnitude(t.velocity),t.angularSpeed=Math.abs(t.angularVelocity);for(var o=0;o<t.parts.length;o++){var a=t.parts[o];d.translate(a.vertices,t.velocity),0<o&&(a.position.x+=t.velocity.x,a.position.y+=t.velocity.y),0!==t.angularVelocity&&(d.rotate(a.vertices,t.angularVelocity,t.position),l.rotate(a.axes,t.angularVelocity),0<o&&h.rotateAbout(a.position,t.angularVelocity,t.position,a.position)),p.update(a.bounds,a.vertices,t.velocity)}},u.applyForce=function(t,e,i){t.force.x+=i.x,t.force.y+=i.y;var n=e.x-t.position.x,e=e.y-t.position.y;t.torque+=n*i.y-e*i.x},u._totalProperties=function(t){for(var e={mass:0,area:0,inertia:0,centre:{x:0,y:0}},i=1===t.parts.length?0:1;i<t.parts.length;i++){var n=t.parts[i],r=n.mass!==1/0?n.mass:1;e.mass+=r,e.area+=n.area,e.inertia+=n.inertia,e.centre=h.add(e.centre,h.mult(n.position,r))}return e.centre=h.div(e.centre,e.mass),e}},function(t,e){t.exports=function(t){return t.y+t.height-t.height*t.originY}},function(t,e){t.exports=function(t){return t.x-t.width*t.originX}},function(t,e){t.exports=function(t){return t.x+t.width-t.width*t.originX}},function(t,e){t.exports=function(t){return t.y-t.height*t.originY}},function(t,e){t.exports=function(t,e,i,n,r,s){void 0===n&&(n=0),void 0===r&&(r=0);var o,a=0,h=t.length;if(1===(s=void 0===s?1:s))for(o=r;o<h;o++)t[o][e]+=i+a*n,a++;else for(o=r;0<=o;o--)t[o][e]+=i+a*n,a++;return t}},function(t,e,i){var n=i(0),r=i(307),s=i(172),o=i(56),a=i(173),h=i(3),i=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 r(this,t,e)},getPoints:function(t,e,i){return s(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i,n){return void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x1=t=void 0===t?0:t,this.y1=e,this.x2=i,this.y2=n,this},getPointA:function(t){return(t=void 0===t?new h:t).set(this.x1,this.y1),t},getPointB:function(t){return(t=void 0===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}}});t.exports=i},function(t,e){t.exports=function(t,e,i,n){i=i||e.fillColor,n=n||e.fillAlpha;t.fillStyle="rgba("+((16711680&i)>>>16)+","+((65280&i)>>>8)+","+(255&i)+","+n+")"}},function(t,e,i){i=new(i(0))({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,this.multiKeyIndex=t.multiKeyIndex++,this.files=r,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 s=0;s<r.length;s++)r[s].multiFile=this},isReadyToProcess:function(){return 0===this.pending&&0===this.failed&&!this.complete},addToMultiFile:function(t){return this.files.push(t),(t.multiFile=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++}});t.exports=i},function(t,e){t.exports=function(t,e,i,n){t-=i,i=e-n;return Math.sqrt(t*t+i*i)}},function(t,e,i){t.exports={BOOT:i(922),DESTROY:i(923),DRAG_END:i(924),DRAG_ENTER:i(925),DRAG:i(926),DRAG_LEAVE:i(927),DRAG_OVER:i(928),DRAG_START:i(929),DROP:i(930),GAME_OUT:i(931),GAME_OVER:i(932),GAMEOBJECT_DOWN:i(933),GAMEOBJECT_DRAG_END:i(934),GAMEOBJECT_DRAG_ENTER:i(935),GAMEOBJECT_DRAG:i(936),GAMEOBJECT_DRAG_LEAVE:i(937),GAMEOBJECT_DRAG_OVER:i(938),GAMEOBJECT_DRAG_START:i(939),GAMEOBJECT_DROP:i(940),GAMEOBJECT_MOVE:i(941),GAMEOBJECT_OUT:i(942),GAMEOBJECT_OVER:i(943),GAMEOBJECT_POINTER_DOWN:i(944),GAMEOBJECT_POINTER_MOVE:i(945),GAMEOBJECT_POINTER_OUT:i(946),GAMEOBJECT_POINTER_OVER:i(947),GAMEOBJECT_POINTER_UP:i(948),GAMEOBJECT_POINTER_WHEEL:i(949),GAMEOBJECT_UP:i(950),GAMEOBJECT_WHEEL:i(951),MANAGER_BOOT:i(952),MANAGER_PROCESS:i(953),MANAGER_UPDATE:i(954),POINTER_DOWN:i(955),POINTER_DOWN_OUTSIDE:i(956),POINTER_MOVE:i(957),POINTER_OUT:i(958),POINTER_OVER:i(959),POINTER_UP:i(960),POINTER_UP_OUTSIDE:i(961),POINTER_WHEEL:i(962),POINTERLOCK_CHANGE:i(963),PRE_UPDATE:i(964),SHUTDOWN:i(965),START:i(966),UPDATE:i(967)}},function(t,e){t.exports=function(t,e){return t.y=e+t.height*t.originY,t}},function(t,e){t.exports=function(t,e){return t.x=e+t.width*t.originX,t}},function(t,e){t.exports=function(t,e){return t.x=e-t.width+t.width*t.originX,t}},function(t,e){t.exports=function(t,e){return t.y=e-t.height+t.height*t.originY,t}},function(t,e){t.exports={CIRCLE:0,ELLIPSE:1,LINE:2,POINT:3,POLYGON:4,RECTANGLE:5,TRIANGLE:6}},function(t,e){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}},function(t,e,i){var n=i(0),y=i(175),r=i(9),f=i(374),v=i(2),g=i(69),m=i(91),x=i(141),b=i(12),w=i(375),i=new n({Extends:r,initialize:function(t){r.call(this);var e=t.game,i=e.renderer,n=i.gl;this.name=v(t,"name","WebGLPipeline"),this.game=e,this.renderer=i,this.manager,this.gl=n,this.view=e.canvas,this.width=0,this.height=0,this.vertexCount=0,this.vertexCapacity=0,this.vertexData,this.vertexBuffer,this.topology=v(t,"topology",n.TRIANGLES),this.bytes,this.vertexViewF32,this.vertexViewU32,this.active=!0,this.currentUnit=0,this.forceZero=v(t,"forceZero",!1),this.hasBooted=!1,this.isPostFX=!1,this.renderTargets=[],this.currentRenderTarget,this.shaders=[],this.currentShader,this.projectionMatrix,this.projectionWidth=0,this.projectionHeight=0,this.config=t,this.glReset=!1},boot:function(){var t=this.gl,e=this.config,i=this.renderer,n=(this.isPostFX||(this.projectionMatrix=(new g).identity()),this.renderTargets),r=v(e,"renderTarget",!1),s=i.width,o=i.height;if("number"==typeof(r="boolean"==typeof r&&r?1:r))for(d=0;d<r;d++)n.push(new x(i,s,o,1,0,!0));else if(Array.isArray(r))for(d=0;d<r.length;d++){var a=v(r[d],"scale",1),h=v(r[d],"minFilter",0),l=v(r[d],"autoClear",1);n.push(new x(i,s,o,a,h,l))}n.length&&(this.currentRenderTarget=n[0]),this.setShadersFromConfig(e);for(var c=this.shaders,u=0,d=0;d<c.length;d++)c[d].vertexSize>u&&(u=c[d].vertexSize);var p=v(e,"batchSize",i.config.batchSize),p=(this.vertexCapacity=6*p,new ArrayBuffer(this.vertexCapacity*u)),e=(this.vertexData=p,this.bytes=new Uint8Array(p),this.vertexViewF32=new Float32Array(p),this.vertexViewU32=new Uint32Array(p),v(e,"vertices",null));for(e?(this.vertexViewF32.set(e),this.vertexBuffer=i.createVertexBuffer(p,t.STATIC_DRAW)):this.vertexBuffer=i.createVertexBuffer(p.byteLength,t.DYNAMIC_DRAW),this.setVertexBuffer(),d=c.length-1;0<=d;d--)c[d].rebind();this.hasBooted=!0,i.on(m.RESIZE,this.resize,this),i.on(m.PRE_RENDER,this.onPreRender,this),i.on(m.RENDER,this.onRender,this),i.on(m.POST_RENDER,this.onPostRender,this),this.emit(f.BOOT,this),this.onBoot()},onBoot:function(){},onResize:function(){},setShader:function(t,e){var i=this.renderer;return t===this.currentShader&&i.currentProgram===this.currentShader.program||(this.flush(),i.resetTextures(),this.setVertexBuffer()&&!e&&(e=!0),t.bind(e,!1),this.currentShader=t),this},getShaderByName:function(t){for(var e=this.shaders,i=0;i<e.length;i++)if(e[i].name===t)return e[i]},setShadersFromConfig:function(t){for(var e=this.shaders,i=this.renderer,n=0;n<e.length;n++)e[n].destroy();var r="vertShader",s="fragShader",o="attributes",a=v(t,r,null),h=b.parseFragmentShaderMaxTextures(v(t,s,null),i.maxTextures),l=v(t,o,null),c=v(t,"shaders",[]),u=c.length;if(0===u)a&&h&&(this.shaders=[new w(this,"default",a,h,y(l))]);else{for(var d=[],n=0;n<u;n++){var p=c[n],f=v(p,"name","default"),g=v(p,r,a),m=b.parseFragmentShaderMaxTextures(v(p,s,h),i.maxTextures),p=v(p,o,l);g&&m&&d.push(new w(this,f,g,m,y(p)))}this.shaders=d}return 0!==this.shaders.length&&(this.currentShader=this.shaders[0]),this},setGameObject:function(t,e){return void 0===e&&(e=t.frame),this.currentUnit=this.renderer.setTextureSource(e.source),this.currentUnit},shouldFlush:function(t){return this.vertexCount+(t=void 0===t?0:t)>this.vertexCapacity},resize:function(t,e){t===this.width&&e===this.height||this.flush(),this.width=t,this.height=e;for(var i=this.renderTargets,n=0;n<i.length;n++)i[n].resize(t,e);return this.setProjectionMatrix(t,e),this.emit(f.RESIZE,t,e,this),this.onResize(t,e),this},setProjectionMatrix:function(t,e){var i=this.projectionMatrix;if(i){this.projectionWidth=t,this.projectionHeight=e,i.ortho(0,t,e,0,-1e3,1e3);for(var n=this.shaders,r="uProjectionMatrix",s=0;s<n.length;s++){var o=n[s];o.hasUniform(r)&&(o.resetUniform(r),o.setMatrix4fv(r,!1,i.val,o))}}return this},updateProjectionMatrix:function(){var t,e;this.projectionMatrix&&(t=this.renderer.projectionWidth,e=this.renderer.projectionHeight,this.projectionWidth===t&&this.projectionHeight===e||this.setProjectionMatrix(t,e))},bind:function(t){var e;return void 0===t&&(t=this.currentShader),this.glReset?this.rebind(t):(e=this.setVertexBuffer(),t.bind(e),this.currentShader=t,this.emit(f.BIND,this,t),this.onActive(t),this)},rebind:function(t){this.setVertexBuffer();for(var e=this.shaders,i=e.length-1;0<=i;i--){var n=e[i].rebind();t&&n!==t||(this.currentShader=n)}return this.emit(f.REBIND,this.currentShader),this.onActive(this.currentShader),this.onRebind(),this.glReset=!1,this},setVertexBuffer:function(){var t=this.gl,e=this.vertexBuffer;return t.getParameter(t.ARRAY_BUFFER_BINDING)!==e&&(t.bindBuffer(t.ARRAY_BUFFER,e),!0)},preBatch:function(t){return this.currentRenderTarget&&this.currentRenderTarget.bind(),this.onPreBatch(t),this},postBatch:function(t){return this.onDraw(this.currentRenderTarget),this.onPostBatch(t),this},onDraw:function(){},unbind:function(){this.currentRenderTarget&&this.currentRenderTarget.unbind()},flush:function(t){var e,i,n;return void 0===t&&(t=!1),0<this.vertexCount&&(this.emit(f.BEFORE_FLUSH,this,t),this.onBeforeFlush(t),e=this.gl,i=this.vertexCount,n=this.currentShader.vertexSize,this.active&&(this.setVertexBuffer(),i===this.vertexCapacity?e.bufferData(e.ARRAY_BUFFER,this.vertexData,e.DYNAMIC_DRAW):e.bufferSubData(e.ARRAY_BUFFER,0,this.bytes.subarray(0,i*n)),e.drawArrays(this.topology,0,i)),this.vertexCount=0,this.emit(f.AFTER_FLUSH,this,t),this.onAfterFlush(t)),this},onActive:function(){},onBind:function(){},onRebind:function(){},onBatch:function(){},onPreBatch:function(){},onPostBatch:function(){},onPreRender:function(){},onRender:function(){},onPostRender:function(){},onBeforeFlush:function(){},onAfterFlush:function(){},batchVert:function(t,e,i,n,r,s,o){var a=this.vertexViewF32,h=this.vertexViewU32,l=this.vertexCount*this.currentShader.vertexComponentCount-1;a[++l]=t,a[++l]=e,a[++l]=i,a[++l]=n,a[++l]=r,a[++l]=s,h[++l]=o,this.vertexCount++},batchQuad:function(t,e,i,n,r,s,o,a,h,l,c,u,d,p,f,g,m,y,v,x){void 0===x&&(x=this.currentUnit);var b=!1;return this.shouldFlush(6)&&(this.flush(),b=!0,x=this.setTexture2D(v)),this.batchVert(e,i,l,c,x,y,p),this.batchVert(n,r,l,d,x,y,g),this.batchVert(s,o,u,d,x,y,m),this.batchVert(e,i,l,c,x,y,p),this.batchVert(s,o,u,d,x,y,m),this.batchVert(a,h,u,c,x,y,f),this.onBatch(t),b},batchTri:function(t,e,i,n,r,s,o,a,h,l,c,u,d,p,f,g,m){void 0===m&&(m=this.currentUnit);var y=!1;return this.shouldFlush(3)&&(this.flush(),y=!0,m=this.setTexture2D(g)),this.batchVert(e,i,a,h,m,f,u),this.batchVert(n,r,a,c,m,f,d),this.batchVert(s,o,l,c,m,f,p),this.onBatch(t),y},drawFillRect:function(t,e,i,n,r,s,o,a){void 0===o&&(o=this.renderer.whiteTexture.glTexture),void 0===a&&(a=!0),t=Math.floor(t),e=Math.floor(e);var i=Math.floor(t+i),n=Math.floor(e+n),h=this.setTexture2D(o),r=b.getTintAppendFloatAlphaAndSwap(r,s),s=0,l=1;a&&(s=1,l=0),this.batchQuad(null,t,e,t,n,i,n,i,e,0,s,1,l,r,r,r,r,0,o,h)},setTexture2D:function(t){return void 0===t&&(t=this.renderer.whiteTexture.glTexture),this.currentUnit=this.renderer.setTexture2D(t),this.currentUnit},bindTexture:function(t,e){var i=this.gl;return i.activeTexture(i.TEXTURE0+(e=void 0===e?0:e)),i.bindTexture(i.TEXTURE_2D,t),this},bindRenderTarget:function(t,e){return this.bindTexture(t.texture,e)},setTime:function(t){return this.set1f(t,this.game.loop.getDuration()),this},set1f:function(t,e,i){return(i=void 0===i?this.currentShader:i).set1f(t,e),this},set2f:function(t,e,i,n){return(n=void 0===n?this.currentShader:n).set2f(t,e,i),this},set3f:function(t,e,i,n,r){return(r=void 0===r?this.currentShader:r).set3f(t,e,i,n),this},set4f:function(t,e,i,n,r,s){return(s=void 0===s?this.currentShader:s).set4f(t,e,i,n,r),this},set1fv:function(t,e,i){return(i=void 0===i?this.currentShader:i).set1fv(t,e),this},set2fv:function(t,e,i){return(i=void 0===i?this.currentShader:i).set2fv(t,e),this},set3fv:function(t,e,i){return(i=void 0===i?this.currentShader:i).set3fv(t,e),this},set4fv:function(t,e,i){return(i=void 0===i?this.currentShader:i).set4fv(t,e),this},set1iv:function(t,e,i){return(i=void 0===i?this.currentShader:i).set1iv(t,e),this},set2iv:function(t,e,i){return(i=void 0===i?this.currentShader:i).set2iv(t,e),this},set3iv:function(t,e,i){return(i=void 0===i?this.currentShader:i).set3iv(t,e),this},set4iv:function(t,e,i){return(i=void 0===i?this.currentShader:i).set4iv(t,e),this},set1i:function(t,e,i){return(i=void 0===i?this.currentShader:i).set1i(t,e),this},set2i:function(t,e,i,n){return(n=void 0===n?this.currentShader:n).set2i(t,e,i),this},set3i:function(t,e,i,n,r){return(r=void 0===r?this.currentShader:r).set3i(t,e,i,n),this},set4i:function(t,e,i,n,r,s){return(s=void 0===s?this.currentShader:s).set4i(t,e,i,n,r),this},setMatrix2fv:function(t,e,i,n){return(n=void 0===n?this.currentShader:n).setMatrix2fv(t,e,i),this},setMatrix3fv:function(t,e,i,n){return(n=void 0===n?this.currentShader:n).setMatrix3fv(t,e,i),this},setMatrix4fv:function(t,e,i,n){return(n=void 0===n?this.currentShader:n).setMatrix4fv(t,e,i),this},destroy:function(){this.emit(f.DESTROY,this);for(var t=this.shaders,e=0;e<t.length;e++)t[e].destroy();for(var i=this.renderTargets,e=0;e<i.length;e++)i[e].destroy();this.gl.deleteBuffer(this.vertexBuffer);var n=this.renderer;return n.off(m.RESIZE,this.resize,this),n.off(m.PRE_RENDER,this.onPreRender,this),n.off(m.RENDER,this.onRender,this),n.off(m.POST_RENDER,this.onPostRender,this),this.removeAllListeners(),this.game=null,this.renderer=null,this.manager=null,this.gl=null,this.view=null,this.shaders=null,this.renderTargets=null,this.bytes=null,this.vertexViewF32=null,this.vertexViewU32=null,this.vertexData=null,this.vertexBuffer=null,this.currentShader=null,this.currentRenderTarget=null,this}});t.exports=i},function(t,e,i){"use strict";function n(t,e,i){i=i||2;var n,r,s,o,a,h=e&&e.length,l=h?e[0]*i:t.length,c=g(t,0,l,i,!0),u=[];if(c&&c.next!==c.prev){if(h&&(c=function(t,e,i,n){for(var r,s,o,a=[],h=0,l=e.length;h<l;h++)(r=g(t,e[h]*n,h<l-1?e[h+1]*n:t.length,n,!1))===r.next&&(r.steiner=!0),a.push(function(t){for(var e=t,i=t;(e.x<i.x||e.x===i.x&&e.y<i.y)&&(i=e),(e=e.next)!==t;);return i}(r));for(a.sort(y),h=0;h<a.length;h++)s=a[h],(o=function(t,e){var i,n=e,r=t.x,s=t.y,o=-1/0;do{if(s<=n.y&&s>=n.next.y&&n.next.y!==n.y){var a=n.x+(s-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(a<=r&&o<a){if((o=a)===r){if(s===n.y)return n;if(s===n.next.y)return n.next}i=n.x<n.next.x?n:n.next}}}while((n=n.next)!==e);if(!i)return null;if(r!==o)for(var h,l,c,u=i,d=i.x,p=i.y,f=1/0,n=i;r>=n.x&&n.x>=d&&r!==n.x&&x(s<p?r:o,s,d,p,s<p?o:r,s,n.x,n.y)&&(h=Math.abs(s-n.y)/(r-n.x),S(n,t)&&(h<f||h===f&&(n.x>i.x||n.x===i.x&&(c=n,b((l=i).prev,l,c.prev)<0&&b(c.next,l,l.next)<0)))&&(i=n,f=h)),(n=n.next)!==u;);return i}(s,i))&&(s=P(o,s),m(o,o.next),m(s,s.next)),i=m(i,i.next);return i}(t,e,c,i)),t.length>80*i){for(var d=n=t[0],p=r=t[1],f=i;f<l;f+=i)(s=t[f])<d&&(d=s),(o=t[f+1])<p&&(p=o),n<s&&(n=s),r<o&&(r=o);a=0!==(a=Math.max(n-d,r-p))?1/a:0}(function l(t,e,i,n,r,s,o){if(t){!o&&s&&function(t,e,i,n){for(var r=t;null===r.z&&(r.z=v(r.x,r.y,e,i,n)),r.prevZ=r.prev,r.nextZ=r.next,(r=r.next)!==t;);r.prevZ.nextZ=null,r.prevZ=null;var s,o,a,h,l,c,u,d,p=r,f=1;do{for(o=p,l=p=null,c=0;o;){for(c++,a=o,s=u=0;s<f&&(u++,a=a.nextZ);s++);for(d=f;0<u||0<d&&a;)0!==u&&(0===d||!a||o.z<=a.z)?(o=(h=o).nextZ,u--):(a=(h=a).nextZ,d--),l?l.nextZ=h:p=h,h.prevZ=l,l=h;o=a}}while(l.nextZ=null,f*=2,1<c)}(t,n,r,s);for(var a,h,c=t;t.prev!==t.next;)if(a=t.prev,h=t.next,s?function(t,e,i,n){var r=t.prev,s=t,o=t.next;if(!(0<=b(r,s,o))){for(var a=(r.x<s.x?r.x<o.x?r:o:s.x<o.x?s:o).x,h=(r.y<s.y?r.y<o.y?r:o:s.y<o.y?s:o).y,l=(r.x>s.x?r.x>o.x?r:o:s.x>o.x?s:o).x,c=(r.y>s.y?r.y>o.y?r:o:s.y>o.y?s:o).y,u=v(a,h,e,i,n),d=v(l,c,e,i,n),p=t.prevZ,f=t.nextZ;p&&p.z>=u&&f&&f.z<=d;){if(p!==t.prev&&p!==t.next&&x(r.x,r.y,s.x,s.y,o.x,o.y,p.x,p.y)&&0<=b(p.prev,p,p.next))return;if(p=p.prevZ,f!==t.prev&&f!==t.next&&x(r.x,r.y,s.x,s.y,o.x,o.y,f.x,f.y)&&0<=b(f.prev,f,f.next))return;f=f.nextZ}for(;p&&p.z>=u;){if(p!==t.prev&&p!==t.next&&x(r.x,r.y,s.x,s.y,o.x,o.y,p.x,p.y)&&0<=b(p.prev,p,p.next))return;p=p.prevZ}for(;f&&f.z<=d;){if(f!==t.prev&&f!==t.next&&x(r.x,r.y,s.x,s.y,o.x,o.y,f.x,f.y)&&0<=b(f.prev,f,f.next))return;f=f.nextZ}return 1}}(t,n,r,s):function(t){var e=t.prev,i=t,n=t.next;if(!(0<=b(e,i,n))){for(var r=t.next.next;r!==t.prev;){if(x(e.x,e.y,i.x,i.y,n.x,n.y,r.x,r.y)&&0<=b(r.prev,r,r.next))return;r=r.next}return 1}}(t))e.push(a.i/i),e.push(t.i/i),e.push(h.i/i),_(t),t=h.next,c=h.next;else if((t=h)===c){o?1===o?l(t=function(t,e,i){var n=t;do{var r=n.prev,s=n.next.next}while(!w(r,s)&&T(r,n,n.next,s)&&S(r,s)&&S(s,r)&&(e.push(r.i/i),e.push(n.i/i),e.push(s.i/i),_(n),_(n.next),n=t=s),(n=n.next)!==t);return m(n)}(m(t),e,i),e,i,n,r,s,2):2===o&&function(t,e,i,n,r,s){var o=t;do{for(var a,h=o.next.next;h!==o.prev;){if(o.i!==h.i&&function(t,e){return t.next.i!==e.i&&t.prev.i!==e.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&&T(i,i.next,t,e))return 1}while((i=i.next)!==t)}(t,e)&&(S(t,e)&&S(e,t)&&function(t,e){for(var i=t,n=!1,r=(t.x+e.x)/2,s=(t.y+e.y)/2;i.y>s!=i.next.y>s&&i.next.y!==i.y&&r<(i.next.x-i.x)*(s-i.y)/(i.next.y-i.y)+i.x&&(n=!n),(i=i.next)!==t;);return n}(t,e)&&(b(t.prev,t,e.prev)||b(t,e.prev,e))||w(t,e)&&0<b(t.prev,t,t.next)&&0<b(e.prev,e,e.next))}(o,h))return a=P(o,h),o=m(o,o.next),a=m(a,a.next),l(o,e,i,n,r,s),l(a,e,i,n,r,s);h=h.next}}while((o=o.next)!==t)}(t,e,i,n,r,s):l(m(t),e,i,n,r,s,1);break}}})(c,u,i,d,p,a)}return u}function g(t,e,i,n,r){var s,o;if(r===0<E(t,e,i,n))for(s=e;s<i;s+=n)o=a(s,t[s],t[s+1],o);else for(s=i-n;e<=s;s-=n)o=a(s,t[s],t[s+1],o);return o&&w(o,o.next)&&(_(o),o=o.next),o}function m(t,e){if(!t)return t;e=e||t;var i,n=t;do{if(i=!1,n.steiner||!w(n,n.next)&&0!==b(n.prev,n,n.next))n=n.next;else{if(_(n),(n=e=n.prev)===n.next)break;i=!0}}while(i||n!==e);return e}function y(t,e){return t.x-e.x}function v(t,e,i,n,r){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-i)*r)|t<<8))|t<<4))|t<<2))|t<<1))|(1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*r)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function x(t,e,i,n,r,s,o,a){return 0<=(r-o)*(e-a)-(t-o)*(s-a)&&0<=(t-o)*(n-a)-(i-o)*(e-a)&&0<=(i-o)*(s-a)-(r-o)*(n-a)}function b(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function w(t,e){return t.x===e.x&&t.y===e.y}function T(t,e,i,n){var r=l(b(t,e,i)),s=l(b(t,e,n)),o=l(b(i,n,t)),a=l(b(i,n,e));return r!==s&&o!==a||0===r&&h(t,i,e)||0===s&&h(t,n,e)||0===o&&h(i,t,n)||!(0!==a||!h(i,e,n))}function h(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 l(t){return 0<t?1:t<0?-1:0}function S(t,e){return b(t.prev,t,t.next)<0?0<=b(t,e,t.next)&&0<=b(t,t.prev,e):b(t,e,t.prev)<0||b(t,t.next,e)<0}function P(t,e){var i=new o(t.i,t.x,t.y),n=new o(e.i,e.x,e.y),r=t.next,s=e.prev;return(t.next=e).prev=t,(i.next=r).prev=i,(n.next=i).prev=n,(s.next=n).prev=s,n}function a(t,e,i,n){t=new o(t,e,i);return n?(t.next=n.next,(t.prev=n).next.prev=t,n.next=t):(t.prev=t).next=t,t}function _(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 o(t,e,i){this.i=t,this.x=e,this.y=i,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function E(t,e,i,n){for(var r=0,s=e,o=i-n;s<i;s+=n)r+=(t[o]-t[s])*(t[s+1]+t[o+1]),o=s;return r}n.deviation=function(t,e,i,n){var r=e&&e.length,s=r?e[0]*i:t.length,o=Math.abs(E(t,0,s,i));if(r)for(var a=0,h=e.length;a<h;a++){var l=e[a]*i,c=a<h-1?e[a+1]*i:t.length;o-=Math.abs(E(t,l,c,i))}for(var u=0,a=0;a<n.length;a+=3){var d=n[a]*i,p=n[a+1]*i,f=n[a+2]*i;u+=Math.abs((t[d]-t[f])*(t[1+p]-t[1+d])-(t[d]-t[p])*(t[1+f]-t[1+d]))}return 0===o&&0===u?0:Math.abs((u-o)/o)},n.flatten=function(t){for(var e=t[0][0].length,i={vertices:[],holes:[],dimensions:e},n=0,r=0;r<t.length;r++){for(var s=0;s<t[r].length;s++)for(var o=0;o<e;o++)i.vertices.push(t[r][s][o]);0<r&&(n+=t[r-1].length,i.holes.push(n))}return i},t.exports=n},function(t,e){t.exports=function(t,e,i,n){i=i||e.strokeColor,n=n||e.strokeAlpha;t.strokeStyle="rgba("+((16711680&i)>>>16)+","+((65280&i)>>>8)+","+(255&i)+","+n+")",t.lineWidth=e.lineWidth}},function(t,e,i){var n=i(0),a=i(21),h=i(23),r=i(8),l=i(2),c=i(6),u=i(7),s=new n({Extends:h,initialize:function(t,e,i,n,r){var s="json",o=(u(e)&&(e=l(o=e,"key"),i=l(o,"url"),n=l(o,"xhrSettings"),s=l(o,"extension",s),r=l(o,"dataKey",r)),{type:"json",cache:t.cacheManager.json,extension:s,responseType:"text",key:e,url:i,xhrSettings:n,config:r});h.call(this,t,o),u(i)&&(this.data=r?c(i,r):i,this.state=a.FILE_POPULATED)},onProcess:function(){if(this.state!==a.FILE_POPULATED){this.state=a.FILE_PROCESSING;try{var t=JSON.parse(this.xhrLoader.responseText)}catch(t){throw this.onProcessError(),t}var e=this.config;this.data="string"==typeof e?c(t,e,t):t}this.onProcessComplete()}});r.register("json",function(t,e,i,n){if(Array.isArray(t))for(var r=0;r<t.length;r++)this.addFile(new s(this,t[r]));else this.addFile(new s(this,t,e,n,i));return this}),t.exports=s},function(t,e){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}},function(t,e,i){var d=i(158),p=i(26);t.exports=function(t,e,i,n,r){for(var s,o,a,h,l=p(t,e,i,n,null,r),c=0;c<l.length;c++){var u=l[c];u&&(u.collides?(s=d(u.x,u.y-1,!0,r),o=d(u.x,u.y+1,!0,r),a=d(u.x-1,u.y,!0,r),h=d(u.x+1,u.y,!0,r),u.faceTop=!s||!s.collides,u.faceBottom=!o||!o.collides,u.faceLeft=!a||!a.collides,u.faceRight=!h||!h.collides):u.resetFaces())}}},function(t,e,i){var o={},v=(t.exports=o,i(83)),x=i(32);o.create=function(t,e){for(var i=[],n=0;n<t.length;n++){var r=t[n],r={x:r.x,y:r.y,index:n,body:e,isInternal:!1,contact:null,offset:null};r.contact={vertex:r,normalImpulse:0,tangentImpulse:0},i.push(r)}return i},o.fromPath=function(t,e){var n=[];return t.replace(/L?\s*([-\d.e]+)[\s,]*([-\d.e]+)*/gi,function(t,e,i){n.push({x:parseFloat(e),y:parseFloat(i)})}),o.create(n,e)},o.centre=function(t){for(var e,i,n=o.area(t,!0),r={x:0,y:0},s=0;s<t.length;s++)i=(s+1)%t.length,e=v.cross(t[s],t[i]),i=v.mult(v.add(t[s],t[i]),e),r=v.add(r,i);return v.div(r,6*n)},o.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 v.div(e,t.length)},o.area=function(t,e){for(var i=0,n=t.length-1,r=0;r<t.length;r++)i+=(t[n].x-t[r].x)*(t[n].y+t[r].y),n=r;return e?i/2:Math.abs(i)/2},o.inertia=function(t,e){for(var i,n,r=0,s=0,o=t,a=0;a<o.length;a++)n=(a+1)%o.length,r+=(i=Math.abs(v.cross(o[n],o[a])))*(v.dot(o[n],o[n])+v.dot(o[n],o[a])+v.dot(o[a],o[a])),s+=i;return e/6*(r/s)},o.translate=function(t,e,i){var n;if(i)for(n=0;n<t.length;n++)t[n].x+=e.x*i,t[n].y+=e.y*i;else for(n=0;n<t.length;n++)t[n].x+=e.x,t[n].y+=e.y;return t},o.rotate=function(t,e,i){if(0!==e){for(var n=Math.cos(e),r=Math.sin(e),s=0;s<t.length;s++){var o=t[s],a=o.x-i.x,h=o.y-i.y;o.x=i.x+(a*n-h*r),o.y=i.y+(a*r+h*n)}return t}},o.contains=function(t,e){for(var i=0;i<t.length;i++){var n=t[i],r=t[(i+1)%t.length];if(0<(e.x-n.x)*(r.y-n.y)+(e.y-n.y)*(n.x-r.x))return!1}return!0},o.scale=function(t,e,i,n){if(1!==e||1!==i){var r;n=n||o.centre(t);for(var s=0;s<t.length;s++)r=t[s],r=v.sub(r,n),t[s].x=n.x+r.x*e,t[s].y=n.y+r.y*i}return t},o.chamfer=function(t,e,i,n,r){e="number"==typeof e?[e]:e||[8],i=void 0!==i?i:-1,n=n||2,r=r||14;for(var s=[],o=0;o<t.length;o++){var a=t[0<=o-1?o-1:t.length-1],h=t[o],l=t[(o+1)%t.length],c=e[o<e.length?o:e.length-1];if(0!==c){var a=v.normalise({x:h.y-a.y,y:a.x-h.x}),l=v.normalise({x:l.y-h.y,y:h.x-l.x}),u=Math.sqrt(2*Math.pow(c,2)),d=v.mult(x.clone(a),c),p=v.normalise(v.mult(v.add(a,l),.5)),f=v.sub(h,v.mult(p,u)),g=i;-1===i&&(g=1.75*Math.pow(c,.32)),(g=x.clamp(g,n,r))%2==1&&(g+=1);for(var m=Math.acos(v.dot(a,l))/g,y=0;y<g;y++)s.push(v.add(v.rotate(d,m*y),f))}else s.push(h)}return s},o.clockwiseSort=function(t){var i=o.mean(t);return t.sort(function(t,e){return v.angle(i,t)-v.angle(i,e)}),t},o.isConvex=function(t){var e,i,n,r,s=0,o=t.length;if(o<3)return null;for(e=0;e<o;e++)if(r=(t[i=(e+1)%o].x-t[e].x)*(t[n=(e+2)%o].y-t[i].y),(r-=(t[i].y-t[e].y)*(t[n].x-t[i].x))<0?s|=1:0<r&&(s|=2),3===s)return!1;return 0!==s||null},o.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];2<=r.length&&v.cross3(r[r.length-2],r[r.length-1],e)<=0;)r.pop();r.push(e)}for(i=t.length-1;0<=i;--i){for(e=t[i];2<=n.length&&v.cross3(n[n.length-2],n[n.length-1],e)<=0;)n.pop();n.push(e)}return n.pop(),r.pop(),n.concat(r)}},function(t,e,i){var n=i(0),r=i(66),s=i(300),o=i(301),a=i(56),h=i(170),i=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 r(this,t,e)},getPoint:function(t,e){return s(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}}});t.exports=i},function(t,e){t.exports=function(t,e,i){return 0<t.radius&&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}},function(t,e){t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},function(t,e){t.exports=function(t,e,i){i-=e;return e+((t-e)%i+i)%i}},function(t,e,i){var n=i(0),i=i(39),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,r,s,o,a,h,l,c,u,d,p,f,g){var m=this.val;return m[0]=t,m[1]=e,m[2]=i,m[3]=n,m[4]=r,m[5]=s,m[6]=o,m[7]=a,m[8]=h,m[9]=l,m[10]=c,m[11]=u,m[12]=d,m[13]=p,m[14]=f,m[15]=g,this},copy:function(t){t=t.val;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])},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 i=a.fromQuat(i).val,n=e.x,r=e.y,e=e.z;return this.setValues(i[0]*n,i[1]*n,i[2]*n,0,i[4]*r,i[5]*r,i[6]*r,0,i[8]*e,i[9]*e,i[10]*e,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],r=t[6],s=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]=r,t[11]=t[14],t[12]=n,t[13]=s,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],r=t[3],s=t[4],o=t[5],a=t[6],h=t[7],l=t[8],c=t[9],u=t[10],d=t[11],p=t[12],f=t[13],g=t[14],t=t[15],m=e*o-i*s,y=e*a-n*s,v=e*h-r*s,x=i*a-n*o,b=i*h-r*o,w=n*h-r*a,T=l*f-c*p,S=l*g-u*p,P=l*t-d*p,_=c*g-u*f,E=c*t-d*f,A=u*t-d*g,M=m*A-y*E+v*_+x*P-b*S+w*T;return M?this.setValues((o*A-a*E+h*_)*(M=1/M),(n*E-i*A-r*_)*M,(f*w-g*b+t*x)*M,(u*b-c*w-d*x)*M,(a*P-s*A-h*S)*M,(e*A-n*P+r*S)*M,(g*v-p*w-t*y)*M,(l*w-u*v+d*y)*M,(s*E-o*P+h*T)*M,(i*P-e*E-r*T)*M,(p*b-f*v+t*m)*M,(c*v-l*b-d*m)*M,(o*S-s*_-a*T)*M,(e*_-i*S+n*T)*M,(f*y-p*x-g*m)*M,(l*x-c*y+u*m)*M):this},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=t[2],r=t[3],s=t[4],o=t[5],a=t[6],h=t[7],l=t[8],c=t[9],u=t[10],d=t[11],p=t[12],f=t[13],g=t[14],t=t[15];return this.setValues(o*(u*t-d*g)-c*(a*t-h*g)+f*(a*d-h*u),-(i*(u*t-d*g)-c*(n*t-r*g)+f*(n*d-r*u)),i*(a*t-h*g)-o*(n*t-r*g)+f*(n*h-r*a),-(i*(a*d-h*u)-o*(n*d-r*u)+c*(n*h-r*a)),-(s*(u*t-d*g)-l*(a*t-h*g)+p*(a*d-h*u)),e*(u*t-d*g)-l*(n*t-r*g)+p*(n*d-r*u),-(e*(a*t-h*g)-s*(n*t-r*g)+p*(n*h-r*a)),e*(a*d-h*u)-s*(n*d-r*u)+l*(n*h-r*a),s*(c*t-d*f)-l*(o*t-h*f)+p*(o*d-h*c),-(e*(c*t-d*f)-l*(i*t-r*f)+p*(i*d-r*c)),e*(o*t-h*f)-s*(i*t-r*f)+p*(i*h-r*o),-(e*(o*d-h*c)-s*(i*d-r*c)+l*(i*h-r*o)),-(s*(c*g-u*f)-l*(o*g-a*f)+p*(o*u-a*c)),e*(c*g-u*f)-l*(i*g-n*f)+p*(i*u-n*c),-(e*(o*g-a*f)-s*(i*g-n*f)+p*(i*a-n*o)),e*(o*u-a*c)-s*(i*u-n*c)+l*(i*a-n*o))},determinant:function(){var t=this.val,e=t[0],i=t[1],n=t[2],r=t[3],s=t[4],o=t[5],a=t[6],h=t[7],l=t[8],c=t[9],u=t[10],d=t[11],p=t[12],f=t[13],g=t[14],t=t[15];return(e*o-i*s)*(u*t-d*g)-(e*a-n*s)*(c*t-d*f)+(e*h-r*s)*(c*g-u*f)+(i*a-n*o)*(l*t-d*p)-(i*h-r*o)*(l*g-u*p)+(n*h-r*a)*(l*f-c*p)},multiply:function(t){var e=this.val,i=e[0],n=e[1],r=e[2],s=e[3],o=e[4],a=e[5],h=e[6],l=e[7],c=e[8],u=e[9],d=e[10],p=e[11],f=e[12],g=e[13],m=e[14],y=e[15],t=t.val,v=t[0],x=t[1],b=t[2],w=t[3];return e[0]=v*i+x*o+b*c+w*f,e[1]=v*n+x*a+b*u+w*g,e[2]=v*r+x*h+b*d+w*m,e[3]=v*s+x*l+b*p+w*y,v=t[4],x=t[5],b=t[6],w=t[7],e[4]=v*i+x*o+b*c+w*f,e[5]=v*n+x*a+b*u+w*g,e[6]=v*r+x*h+b*d+w*m,e[7]=v*s+x*l+b*p+w*y,v=t[8],x=t[9],b=t[10],w=t[11],e[8]=v*i+x*o+b*c+w*f,e[9]=v*n+x*a+b*u+w*g,e[10]=v*r+x*h+b*d+w*m,e[11]=v*s+x*l+b*p+w*y,v=t[12],x=t[13],b=t[14],w=t[15],e[12]=v*i+x*o+b*c+w*f,e[13]=v*n+x*a+b*u+w*g,e[14]=v*r+x*h+b*d+w*m,e[15]=v*s+x*l+b*p+w*y,this},multiplyLocal:function(t){var e=this.val,t=t.val;return this.setValues(e[0]*t[0]+e[1]*t[4]+e[2]*t[8]+e[3]*t[12],e[0]*t[1]+e[1]*t[5]+e[2]*t[9]+e[3]*t[13],e[0]*t[2]+e[1]*t[6]+e[2]*t[10]+e[3]*t[14],e[0]*t[3]+e[1]*t[7]+e[2]*t[11]+e[3]*t[15],e[4]*t[0]+e[5]*t[4]+e[6]*t[8]+e[7]*t[12],e[4]*t[1]+e[5]*t[5]+e[6]*t[9]+e[7]*t[13],e[4]*t[2]+e[5]*t[6]+e[6]*t[10]+e[7]*t[14],e[4]*t[3]+e[5]*t[7]+e[6]*t[11]+e[7]*t[15],e[8]*t[0]+e[9]*t[4]+e[10]*t[8]+e[11]*t[12],e[8]*t[1]+e[9]*t[5]+e[10]*t[9]+e[11]*t[13],e[8]*t[2]+e[9]*t[6]+e[10]*t[10]+e[11]*t[14],e[8]*t[3]+e[9]*t[7]+e[10]*t[11]+e[11]*t[15],e[12]*t[0]+e[13]*t[4]+e[14]*t[8]+e[15]*t[12],e[12]*t[1]+e[13]*t[5]+e[14]*t[9]+e[15]*t[13],e[12]*t[2]+e[13]*t[6]+e[14]*t[10]+e[15]*t[14],e[12]*t[3]+e[13]*t[7]+e[14]*t[11]+e[15]*t[15])},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var t=t.val,e=e.val,i=t[0],n=t[4],r=t[8],s=t[12],o=t[1],a=t[5],h=t[9],l=t[13],c=t[2],u=t[6],d=t[10],p=t[14],f=t[3],g=t[7],m=t[11],t=t[15],y=e[0],v=e[4],x=e[8],b=e[12],w=e[1],T=e[5],S=e[9],P=e[13],_=e[2],E=e[6],A=e[10],M=e[14],k=e[3],C=e[7],O=e[11],e=e[15];return this.setValues(i*y+n*w+r*_+s*k,o*y+a*w+h*_+l*k,c*y+u*w+d*_+p*k,f*y+g*w+m*_+t*k,i*v+n*T+r*E+s*C,o*v+a*T+h*E+l*C,c*v+u*T+d*E+p*C,f*v+g*T+m*E+t*C,i*x+n*S+r*A+s*O,o*x+a*S+h*A+l*O,c*x+u*S+d*A+p*O,f*x+g*S+m*A+t*O,i*b+n*P+r*M+s*e,o*b+a*P+h*M+l*e,c*b+u*P+d*M+p*e,f*b+g*P+m*M+t*e)},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),e=Math.sin(e),n=1-i,r=t.x,s=t.y,t=t.z,o=n*r,a=n*s;return this.setValues(o*r+i,o*s-e*t,o*t+e*s,0,o*s+e*t,a*s+i,a*t-e*r,0,o*t-e*s,a*t+e*r,n*t*t+i,0,0,0,0,1)},rotate:function(t,e){var i=this.val,n=e.x,r=e.y,e=e.z,s=Math.sqrt(n*n+r*r+e*e);if(Math.abs(s)<1e-6)return this;n*=s=1/s,r*=s,e*=s;var s=Math.sin(t),t=Math.cos(t),o=1-t,a=i[0],h=i[1],l=i[2],c=i[3],u=i[4],d=i[5],p=i[6],f=i[7],g=i[8],m=i[9],y=i[10],v=i[11],x=i[12],b=i[13],w=i[14],i=i[15],T=n*n*o+t,S=r*n*o+e*s,P=e*n*o-r*s,_=n*r*o-e*s,E=r*r*o+t,A=e*r*o+n*s,M=n*e*o+r*s,r=r*e*o-n*s,n=e*e*o+t;return this.setValues(a*T+u*S+g*P,h*T+d*S+m*P,l*T+p*S+y*P,c*T+f*S+v*P,a*_+u*E+g*A,h*_+d*E+m*A,l*_+p*E+y*A,c*_+f*E+v*A,a*M+u*r+g*n,h*M+d*r+m*n,l*M+p*r+y*n,c*M+f*r+v*n,x,b,w,i)},rotateX:function(t){var e=this.val,i=Math.sin(t),t=Math.cos(t),n=e[4],r=e[5],s=e[6],o=e[7],a=e[8],h=e[9],l=e[10],c=e[11];return e[4]=n*t+a*i,e[5]=r*t+h*i,e[6]=s*t+l*i,e[7]=o*t+c*i,e[8]=a*t-n*i,e[9]=h*t-r*i,e[10]=l*t-s*i,e[11]=c*t-o*i,this},rotateY:function(t){var e=this.val,i=Math.sin(t),t=Math.cos(t),n=e[0],r=e[1],s=e[2],o=e[3],a=e[8],h=e[9],l=e[10],c=e[11];return e[0]=n*t-a*i,e[1]=r*t-h*i,e[2]=s*t-l*i,e[3]=o*t-c*i,e[8]=n*i+a*t,e[9]=r*i+h*t,e[10]=s*i+l*t,e[11]=o*i+c*t,this},rotateZ:function(t){var e=this.val,i=Math.sin(t),t=Math.cos(t),n=e[0],r=e[1],s=e[2],o=e[3],a=e[4],h=e[5],l=e[6],c=e[7];return e[0]=n*t+a*i,e[1]=r*t+h*i,e[2]=s*t+l*i,e[3]=o*t+c*i,e[4]=a*t-n*i,e[5]=h*t-r*i,e[6]=l*t-s*i,e[7]=c*t-o*i,this},fromRotationTranslation:function(t,e){var i=t.x,n=t.y,r=t.z,t=t.w,s=i+i,o=n+n,a=r+r,h=i*s,l=i*o,i=i*a,c=n*o,n=n*a,r=r*a,s=t*s,o=t*o,t=t*a;return this.setValues(1-(c+r),l+t,i-o,0,l-t,1-(h+r),n+s,0,i+o,n-s,1-(h+c),0,e.x,e.y,e.z,1)},fromQuat:function(t){var e=t.x,i=t.y,n=t.z,t=t.w,r=e+e,s=i+i,o=n+n,a=e*r,h=e*s,e=e*o,l=i*s,i=i*o,n=n*o,r=t*r,s=t*s,t=t*o;return this.setValues(1-(l+n),h+t,e-s,0,h-t,1-(a+n),i+r,0,e+s,i-r,1-(a+l),0,0,0,0,1)},frustum:function(t,e,i,n,r,s){var o=1/(e-t),a=1/(n-i),h=1/(r-s);return this.setValues(2*r*o,0,0,0,0,2*r*a,0,0,(e+t)*o,(n+i)*a,(s+r)*h,-1,0,0,s*r*2*h,0)},perspective:function(t,e,i,n){var t=1/Math.tan(t/2),r=1/(i-n);return this.setValues(t/e,0,0,0,0,t,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,r,s){var o=0==(o=t-e)?o:1/o,a=0==(a=i-n)?a:1/a,h=0==(h=r-s)?h:1/h;return this.setValues(-2*o,0,0,0,0,-2*a,0,0,0,0,2*h,0,(t+e)*o,(n+i)*a,(s+r)*h,1)},lookAtRH:function(t,e,i){var n=this.val;return l.subVectors(t,e),0===l.getLengthSquared()&&(l.z=1),l.normalize(),s.crossVectors(i,l),0===s.getLengthSquared()&&(1===Math.abs(i.z)?l.x+=1e-4:l.z+=1e-4,l.normalize(),s.crossVectors(i,l)),s.normalize(),o.crossVectors(l,s),n[0]=s.x,n[1]=s.y,n[2]=s.z,n[4]=o.x,n[5]=o.y,n[6]=o.z,n[8]=l.x,n[9]=l.y,n[10]=l.z,this},lookAt:function(t,e,i){var n,r,s,o,a=t.x,h=t.y,t=t.z,l=i.x,c=i.y,i=i.z,u=e.x,d=e.y,e=e.z;return Math.abs(a-u)<1e-6&&Math.abs(h-d)<1e-6&&Math.abs(t-e)<1e-6?this.identity():(u=a-u,d=h-d,e=t-e,r=c*(e*=n=1/Math.sqrt(u*u+d*d+e*e))-i*(d*=n),i=i*(u*=n)-l*e,l=l*d-c*u,(n=Math.sqrt(r*r+i*i+l*l))?(r*=n=1/n,i*=n,l*=n):l=i=r=0,c=d*l-e*i,s=e*r-u*l,o=u*i-d*r,(n=Math.sqrt(c*c+s*s+o*o))?(c*=n=1/n,s*=n,o*=n):o=s=c=0,this.setValues(r,c,u,0,i,s,d,0,l,o,e,0,-(r*a+i*h+l*t),-(c*a+s*h+o*t),-(u*a+d*h+e*t),1))},yawPitchRoll:function(t,e,i){this.zero(),a.zero(),h.zero();var n=this.val,r=a.val,s=h.val,o=Math.sin(i),i=Math.cos(i);return n[10]=1,n[15]=1,n[0]=i,n[1]=o,n[4]=-o,n[5]=i,o=Math.sin(e),i=Math.cos(e),r[0]=1,r[15]=1,r[5]=i,r[10]=i,r[9]=-o,r[6]=o,o=Math.sin(t),i=Math.cos(t),s[5]=1,s[15]=1,s[0]=i,s[2]=-o,s[8]=o,s[10]=i,this.multiplyLocal(a),this.multiplyLocal(h),this},setWorldMatrix:function(t,e,i,n,r){return this.yawPitchRoll(t.y,t.x,t.z),a.scaling(i.x,i.y,i.z),h.xyz(e.x,e.y,e.z),this.multiplyLocal(a),this.multiplyLocal(h),n&&this.multiplyLocal(n),r&&this.multiplyLocal(r),this},multiplyToMat4:function(t,e){var i=this.val,t=t.val,n=i[0],r=i[1],s=i[2],o=i[3],a=i[4],h=i[5],l=i[6],c=i[7],u=i[8],d=i[9],p=i[10],f=i[11],g=i[12],m=i[13],y=i[14],i=i[15],v=t[0],x=t[1],b=t[2],w=t[3],T=t[4],S=t[5],P=t[6],_=t[7],E=t[8],A=t[9],M=t[10],k=t[11],C=t[12],O=t[13],R=t[14],t=t[15];return e.setValues(v*n+x*a+b*u+w*g,x*r+x*h+b*d+w*m,b*s+x*l+b*p+w*y,w*o+x*c+b*f+w*i,T*n+S*a+P*u+_*g,T*r+S*h+P*d+_*m,T*s+S*l+P*p+_*y,T*o+S*c+P*f+_*i,E*n+A*a+M*u+k*g,E*r+A*h+M*d+k*m,E*s+A*l+M*p+k*y,E*o+A*c+M*f+k*i,C*n+O*a+R*u+t*g,C*r+O*h+R*d+t*m,C*s+O*l+R*p+t*y,C*o+O*c+R*f+t*i)},fromRotationXYTranslation:function(t,e,i){var n=e.x,r=e.y,e=e.z,s=Math.sin(t.x),o=Math.cos(t.x),a=Math.sin(t.y),t=Math.cos(t.y),h=n,l=r,c=e,u=-s,d=0-u*a,p=0-o*a,u=u*t,f=o*t;return i||(h=t*n+a*e,l=d*n+o*r+u*e,c=p*n+s*r+f*e),this.setValues(t,d,p,0,0,o,s,0,a,u,f,0,h,l,c,1)},getMaxScaleOnAxis:function(){var t=this.val,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],i=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],t=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,i,t))}}),a=new r,h=new r,s=new i,o=new i,l=new i;t.exports=r},function(t,e,i){t.exports={COMPLETE:i(987),DECODED:i(988),DECODED_ALL:i(989),DESTROY:i(990),DETUNE:i(991),GLOBAL_DETUNE:i(992),GLOBAL_MUTE:i(993),GLOBAL_RATE:i(994),GLOBAL_VOLUME:i(995),LOOP:i(996),LOOPED:i(997),MUTE:i(998),PAN:i(999),PAUSE_ALL:i(1e3),PAUSE:i(1001),PLAY:i(1002),RATE:i(1003),RESUME_ALL:i(1004),RESUME:i(1005),SEEK:i(1006),STOP_ALL:i(1007),STOP:i(1008),UNLOCKED:i(1009),VOLUME:i(1010)}},function(t,e,i){var n=i(0),r=i(21),l=i(23),s=i(8),c=i(2),u=i(7),o=new n({Extends:l,initialize:function t(e,i,n,r,s){var o,a="png";u(i)&&(i=c(h=i,"key"),n=c(h,"url"),o=c(h,"normalMap"),r=c(h,"xhrSettings"),a=c(h,"extension",a),s=c(h,"frameConfig")),Array.isArray(n)&&(o=n[1],n=n[0]);var h={type:"image",cache:e.textureManager,extension:a,responseType:"blob",key:i,url:n,xhrSettings:r,config:s};l.call(this,e,h),o&&((a=new t(e,this.key,o,r,s)).type="normalMap",this.setLink(a),e.addFile(a))},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){l.revokeObjectURL(t.data),t.onProcessComplete()},this.data.onerror=function(){l.revokeObjectURL(t.data),t.onProcessError()},l.createObjectURL(this.data,this.xhrLoader.response,"image/png")},addToCache:function(){var t,e=this.linkFile;e&&e.state===r.FILE_COMPLETE?(t="image"===this.type?this.cache.addImage(this.key,this.data,e.data):this.cache.addImage(e.key,e.data,this.data),this.pendingDestroy(t),e.pendingDestroy(t)):e||(t=this.cache.addImage(this.key,this.data),this.pendingDestroy(t))}});s.register("image",function(t,e,i){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new o(this,t[n]));else this.addFile(new o(this,t,e,i));return this}),t.exports=o},function(t,e){t.exports=function(t,e){e?t.setCollision(!0,!0,!0,!0,!1):t.resetCollision(!1)}},function(t,e,i){var s=i(164),n=i(0),r=i(11),o=i(15),i=i(1065),n=new n({Extends:o,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Flip,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Size,r.TextureCrop,r.Tint,r.Transform,r.Visible,i],initialize:function(t,e,i,n,r){o.call(this,t,"Sprite"),this._crop=this.resetCropObject(),this.anims=new s(this),this.setTexture(n,r),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline()},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 r.ToJSON(this)},preDestroy:function(){this.anims.destroy(),this.anims=void 0}});t.exports=n},function(t,e){t.exports=function(t,e){if(!(e>=t.length)){for(var i=t.length-1,n=t[e],r=e;r<i;r++)t[r]=t[r+1];return t.length=i,n}}},function(t,e,i){t.exports={ADDED_TO_SCENE:i(643),DESTROY:i(644),REMOVED_FROM_SCENE:i(645),VIDEO_COMPLETE:i(646),VIDEO_CREATED:i(647),VIDEO_ERROR:i(648),VIDEO_LOOP:i(649),VIDEO_PLAY:i(650),VIDEO_SEEKED:i(651),VIDEO_SEEKING:i(652),VIDEO_STOP:i(653),VIDEO_TIMEOUT:i(654),VIDEO_UNLOCKED:i(655)}},function(t,e){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)}},function(t,e){t.exports=function(t){var e,i={};for(e in t)Array.isArray(t[e])?i[e]=t[e].slice(0):i[e]=t[e];return i}},function(t,e){t.exports=function(t,e,i,n){t=t.length;if(e<0||t<e||i<=e||t<i||t<e+i){if(n)throw new Error("Range Error: Values outside acceptable range");return!1}return!0}},function(t,e){function i(t,e){return String(t).localeCompare(e)}function o(t,e,i,n){for(var r,s,o,a,h=t.length,l=0,c=2*i,u=0;u<h;u+=c)for(h<(s=(r=u+i)+i)&&(s=h),o=u,a=r=h<r?h:r;;)if(o<r&&a<s)e(t[o],t[a])<=0?n[l++]=t[o++]:n[l++]=t[a++];else if(o<r)n[l++]=t[o++];else{if(!(a<s))break;n[l++]=t[a++]}}t.exports=function(t,e){e=function(t,e){var i=t.length;if(!(i<=1))for(var n=new Array(i),r=1;r<i;r*=2){o(t,e,r,n);var s=t;t=n,n=s}return t}(t,e=void 0===e?i:e);return e!==t&&o(e,null,t.length,t),t}},function(t,e,i){var s=i(134),o=i(205);t.exports=function(t,e){var i,n,r=s.Power0;return"string"==typeof t?(s.hasOwnProperty(t)||(i="",t.indexOf(".")&&("in"===(i=t.substr(t.indexOf(".")+1)).toLowerCase()?i="easeIn":"out"===i.toLowerCase()?i="easeOut":"inout"===i.toLowerCase()&&(i="easeInOut")),t=o(t.substr(0,t.indexOf(".")+1)+i),s.hasOwnProperty(t)))&&(r=s[t]):"function"==typeof t?r=t:Array.isArray(t)&&t.length,e?((n=e.slice(0)).unshift(0),function(t){return n[0]=t,r.apply(this,n)}):r}},function(t,e,i){var g=i(12);t.exports=function(t,e,i,n,r){var s=t.strokeTint,i=g.getTintAppendFloatAlpha(e.strokeColor,e.strokeAlpha*i),o=(s.TL=i,s.TR=i,s.BL=i,s.BR=i,e.pathData),a=o.length-1,h=e.lineWidth,l=h/2,c=o[0]-n,u=o[1]-r;e.closePath||(a-=2);for(var d=2;d<a;d+=2){var p=o[d]-n,f=o[d+1]-r;t.batchLine(c,u,p,f,l,l,h,d-2,!!e.closePath&&d===a-1),c=p,u=f}}},function(t,e,i){var n=i(0),r=i(115),s=i(476),o=i(477),a=i(56),h=i(47),l=i(181),i=new n({initialize:function(t,e,i,n,r,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===r&&(r=0),void 0===s&&(s=0),this.type=a.TRIANGLE,this.x1=t,this.y1=e,this.x2=i,this.y2=n,this.x3=r,this.y3=s},contains:function(t,e){return r(this,t,e)},getPoint:function(t,e){return s(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,r,s){return void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===r&&(r=0),void 0===s&&(s=0),this.x1=t=void 0===t?0:t,this.y1=e,this.x2=i,this.y2=n,this.x3=r,this.y3=s,this},getLineA:function(t){return(t=void 0===t?new h:t).setTo(this.x1,this.y1,this.x2,this.y2),t},getLineB:function(t){return(t=void 0===t?new h:t).setTo(this.x2,this.y2,this.x3,this.y3),t},getLineC:function(t){return(t=void 0===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){t=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-=t,this.x2-=t,this.x3-=t}},right:{get:function(){return Math.max(this.x1,this.x2,this.x3)},set:function(t){t=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-=t,this.x2-=t,this.x3-=t}},top:{get:function(){return Math.min(this.y1,this.y2,this.y3)},set:function(t){t=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-=t,this.y2-=t,this.y3-=t}},bottom:{get:function(){return Math.max(this.y1,this.y2,this.y3)},set:function(t){t=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-=t,this.y2-=t,this.y3-=t}}});t.exports=i},function(t,e){var i={};(t.exports=i).create=function(t,e){return{x:t||0,y:e||0}},i.clone=function(t){return{x:t.x,y:t.y}},i.magnitude=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},i.magnitudeSquared=function(t){return t.x*t.x+t.y*t.y},i.rotate=function(t,e,i){var n=Math.cos(e),e=Math.sin(e),r=t.x*n-t.y*e;return(i=i||{}).y=t.x*e+t.y*n,i.x=r,i},i.rotateAbout=function(t,e,i,n){var r=Math.cos(e),e=Math.sin(e),s=i.x+((t.x-i.x)*r-(t.y-i.y)*e);return(n=n||{}).y=i.y+((t.x-i.x)*e+(t.y-i.y)*r),n.x=s,n},i.normalise=function(t){var e=i.magnitude(t);return 0===e?{x:0,y:0}:{x:t.x/e,y:t.y/e}},i.dot=function(t,e){return t.x*e.x+t.y*e.y},i.cross=function(t,e){return t.x*e.y-t.y*e.x},i.cross3=function(t,e,i){return(e.x-t.x)*(i.y-t.y)-(e.y-t.y)*(i.x-t.x)},i.add=function(t,e,i){return(i=i||{}).x=t.x+e.x,i.y=t.y+e.y,i},i.sub=function(t,e,i){return(i=i||{}).x=t.x-e.x,i.y=t.y-e.y,i},i.mult=function(t,e){return{x:t.x*e,y:t.y*e}},i.div=function(t,e){return{x:t.x/e,y:t.y/e}},i.perp=function(t,e){return{x:(e=!0===e?-1:1)*-t.y,y:e*t.x}},i.neg=function(t){return{x:-t.x,y:-t.y}},i.angle=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)},i._temp=[i.create(),i.create(),i.create(),i.create(),i.create(),i.create()]},function(t,e){var i={};(t.exports=i).create=function(t){var e={min:{x:0,y:0},max:{x:0,y:0}};return t&&i.update(e,t),e},i.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 r=e[n];r.x>t.max.x&&(t.max.x=r.x),r.x<t.min.x&&(t.min.x=r.x),r.y>t.max.y&&(t.max.y=r.y),r.y<t.min.y&&(t.min.y=r.y)}i&&(0<i.x?t.max.x+=i.x:t.min.x+=i.x,0<i.y?t.max.y+=i.y:t.min.y+=i.y)},i.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},i.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},i.translate=function(t,e){t.min.x+=e.x,t.max.x+=e.x,t.min.y+=e.y,t.max.y+=e.y},i.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}},function(t,e,i){var n=i(29),r=i(0),s=i(11),o=i(502),i=new r({Mixins:[s.Alpha,s.Flip,s.Visible],initialize:function(t,e,i,n,r,s,o,a){this.layer=t,this.index=e,this.x=i,this.y=n,this.width=r,this.height=s,this.right,this.bottom,this.baseWidth=void 0!==o?o:r,this.baseHeight=void 0!==a?a:s,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).tint=16777215,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=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.tileToWorldX(this.x,t):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.tileToWorldY(this.y,t)-(this.height-this.baseHeight)*e.scaleY:this.y*this.baseHeight-(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(e=void 0===e?new o:e).x=this.getLeft(),e.y=this.getTop(),e.width=this.getRight()-e.x,e.height=this.getBottom()-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,r){return void 0===e&&(e=t),void 0===i&&(i=t),void 0===n&&(n=t),void 0===r&&(r=!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,r&&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;return t===n.ORTHOGONAL?(this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight):t===n.ISOMETRIC?(this.pixelX=(this.x-this.y)*this.baseWidth*.5,this.pixelY=(this.x+this.y)*this.baseHeight*.5):t===n.STAGGERED?(this.pixelX=this.x*this.baseWidth+this.y%2*(this.baseWidth/2),this.pixelY=this.y*(this.baseHeight/2)):t===n.HEXAGONAL&&(t=this.layer.hexSideLength,t=(this.baseHeight-t)/2+t,this.pixelX=this.x*this.baseWidth+this.y%2*(this.baseWidth/2),this.pixelY=this.y*t),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){t=t.gidMap[this.index];if(t)return t}return null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var t=this.tilemapLayer;return t?t.tilemap:null}}});t.exports=i},function(t,e,i){var f={},g=(t.exports=f,i(64)),m=i(32),y=i(41),d=i(84),p=i(83),v=i(1393);f.rectangle=function(t,e,i,n,r){r=r||{};t={label:"Rectangle Body",position:{x:t,y:e},vertices:g.fromPath("L 0 0 L "+i+" 0 L "+i+" "+n+" L 0 "+n)};return r.chamfer&&(e=r.chamfer,t.vertices=g.chamfer(t.vertices,e.radius,e.quality,e.qualityMin,e.qualityMax),delete r.chamfer),y.create(m.extend({},t,r))},f.trapezoid=function(t,e,i,n,r,s){s=s||{};var o=i*(r*=.5),i=o+(1-2*r)*i,a=i+o,t={label:"Trapezoid Body",position:{x:t,y:e},vertices:g.fromPath(r<.5?"L 0 0 L "+o+" "+-n+" L "+i+" "+-n+" L "+a+" 0":"L 0 0 L "+i+" "+-n+" L "+a+" 0")};return s.chamfer&&(e=s.chamfer,t.vertices=g.chamfer(t.vertices,e.radius,e.quality,e.qualityMin,e.qualityMax),delete s.chamfer),y.create(m.extend({},t,s))},f.circle=function(t,e,i,n,r){n=n||{};var s={label:"Circle Body",circleRadius:i},r=(r=r||25,Math.ceil(Math.max(10,Math.min(r,i))));return r%2==1&&(r+=1),f.polygon(t,e,r,i,m.extend({},s,n))},f.polygon=function(t,e,i,n,r){if(r=r||{},i<3)return f.circle(t,e,n,r);for(var s=2*Math.PI/i,o="",a=.5*s,h=0;h<i;h+=1){var l=a+h*s,c=Math.cos(l)*n,l=Math.sin(l)*n;o+="L "+c.toFixed(3)+" "+l.toFixed(3)+" "}t={label:"Polygon Body",position:{x:t,y:e},vertices:g.fromPath(o)};return r.chamfer&&(e=r.chamfer,t.vertices=g.chamfer(t.vertices,e.radius,e.quality,e.qualityMin,e.qualityMax),delete r.chamfer),y.create(m.extend({},t,r))},f.fromVertices=function(t,e,i,n,r,s,o){var a,h,l;for(n=n||{},a=[],r=void 0!==r&&r,s=void 0!==s?s:.01,o=void 0!==o?o:10,v||m.warn("Bodies.fromVertices: poly-decomp.js required. Could not decompose vertices. Fallback to convex hull."),m.isArray(i[0])||(i=[i]),l=0;l<i.length;l+=1)if(h=i[l],(c=g.isConvex(h))||!v)h=c?g.clockwiseSort(h):g.hull(h),a.push({position:{x:t,y:e},vertices:h});else{var c=h.map(function(t){return[t.x,t.y]});v.makeCCW(c),!1!==s&&v.removeCollinearPoints(c,s);for(var u=v.quickDecomp(c),d=0;d<u.length;d++){var p=u[d].map(function(t){return{x:t[0],y:t[1]}});0<o&&g.area(p)<o||a.push({position:g.centre(p),vertices:p})}}for(d=0;d<a.length;d++)a[d]=y.create(m.extend(a[d],n));return r&&f.flagCoincidentParts(a,5),1<a.length?(r=y.create(m.extend({parts:a.slice(0)},n)),y.setPosition(r,{x:t,y:e}),r):a[0]},f.flagCoincidentParts=function(t,e){void 0===e&&(e=5);for(var i=0;i<t.length;i++)for(var n=t[i],r=i+1;r<t.length;r++){var s=t[r];if(d.overlaps(n.bounds,s.bounds))for(var o=n.vertices,a=s.vertices,h=0;h<n.vertices.length;h++)for(var l=0;l<s.vertices.length;l++){var c=p.magnitudeSquared(p.sub(o[(h+1)%o.length],a[l])),u=p.magnitudeSquared(p.sub(o[h],a[(l+1)%a.length]));c<e&&u<e&&(o[h].isInternal=!0,a[l].isInternal=!0)}}return t}},function(t,e){t.exports=function(t){return t.x-t.width*t.originX+.5*t.width}},function(t,e){t.exports=function(t,e){var i=t.width*t.originX;return t.x=e+i-.5*t.width,t}},function(t,e){t.exports=function(t){return t.y-t.height*t.originY+.5*t.height}},function(t,e){t.exports=function(t,e){var i=t.height*t.originY;return t.y=e+i-.5*t.height,t}},function(t,e,i){t.exports={POST_RENDER:i(628),PRE_RENDER:i(629),RENDER:i(630),RESIZE:i(631)}},function(t,e){t.exports={BITMAPMASK_PIPELINE:"BitmapMaskPipeline",LIGHT_PIPELINE:"Light2D",POINTLIGHT_PIPELINE:"PointLightPipeline",SINGLE_PIPELINE:"SinglePipeline",MULTI_PIPELINE:"MultiPipeline",ROPE_PIPELINE:"RopePipeline",GRAPHICS_PIPELINE:"GraphicsPipeline",POSTFX_PIPELINE:"PostFXPipeline",UTILITY_PIPELINE:"UtilityPipeline"}},function(t,e,i){var h=i(74);t.exports=function(t,e,i,n){if(void 0===n&&(n=t),!Array.isArray(e))return-1!==(o=t.indexOf(e))?(h(t,o),i&&i.call(n,e),e):null;for(var r=e.length-1,s=[];0<=r;){var o,a=e[r];-1!==(o=t.indexOf(a))&&(h(t,o),s.push(a),i&&i.call(n,a)),r--}return s}},function(t,e,i){var n=i(0),r=i(199),s=i(10),o=i(3),i=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 t.strokePoints(this.getPoints(e=void 0===e?32:e))},getBounds:function(t,e){t=t||new s,void 0===e&&(e=16);var i=this.getLength(),i=(i<e&&(e=i/2),Math.max(1,Math.round(i/e)));return r(this.getSpacedPoints(i),t)},getDistancePoints:function(t){var e=this.getLength(),e=Math.max(1,e/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),r=0;i.push(0);for(var s=1;s<=t;s++)r+=(e=this.getPoint(s/t,this._tmpVec2B)).distance(n),i.push(r),n.copy(e);return this.cacheArcLengths=i},getPointAt:function(t,e){t=this.getUtoTmapping(t);return this.getPoint(t,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 r=this.getUtoTmapping(n/t,null,t);i.push(this.getPoint(r))}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,t=t+1e-4;return 1<t&&(t=1),this.getPoint(i=i<0?0:i,this._tmpVec2A),this.getPoint(t,e),e.subtract(this._tmpVec2A).normalize()},getTangentAt:function(t,e){t=this.getUtoTmapping(t);return this.getTangent(t,e)},getTFromDistance:function(t,e){return t<=0?0:this.getUtoTmapping(0,t,e)},getUtoTmapping:function(t,e,i){for(var n,r=this.getLengths(i),s=0,i=r.length,o=e?Math.min(e,r[i-1]):t*r[i-1],a=0,h=i-1;a<=h;)if((n=r[s=Math.floor(a+(h-a)/2)]-o)<0)a=s+1;else{if(!(0<n)){h=s;break}h=s-1}return r[s=h]===o?s/(i-1):(s+(o-(e=r[s]))/(r[s+1]-e))/(i-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});t.exports=i},function(t,e,i){t.exports={ADD:i(968),COMPLETE:i(969),FILE_COMPLETE:i(970),FILE_KEY_COMPLETE:i(971),FILE_LOAD_ERROR:i(972),FILE_LOAD:i(973),FILE_PROGRESS:i(974),POST_PROCESS:i(975),PROGRESS:i(976),START:i(977)}},function(t,e,i){var u=i(4);t.exports=function(t,e,i){void 0===i&&(i=new u);var n,r=t.x1,s=t.y1,o=t.x2,t=t.y2,a=e.x1,h=e.y1,l=e.x2,e=e.y2,c=(e-h)*(o-r)-(l-a)*(t-s);return 0!=c&&(n=((o-r)*(s-h)-(t-s)*(r-a))/c,0<=(l=((l-a)*(s-h)-(e-h)*(r-a))/c)&&l<=1&&0<=n&&n<=1&&(i.x=r+l*(o-r),i.y=s+l*(t-s),!0))}},function(t,e){t.exports=function(t){return Math.atan2(t.y2-t.y1,t.x2-t.x1)}},function(t,e,i){var n=i(18);t.exports=function(t,e,i){return(i-e)*(t=n(t,0,1))+e}},function(t,e){t.exports=function(t,e,i){return t&&t.hasOwnProperty(e)?t[e]:i}},function(t,e){t.exports={CREATED:0,INIT:1,DELAY:2,OFFSET_DELAY:3,PENDING_RENDER:4,PLAYING_FORWARD:5,PLAYING_BACKWARD:6,HOLD_DELAY:7,REPEAT_DELAY:8,COMPLETE:9,PENDING_ADD:20,PAUSED:21,LOOP_DELAY:22,ACTIVE:23,COMPLETE_DELAY:24,PENDING_REMOVE:25,REMOVED:26}},function(t,e,i){var n=i(0),a=i(315),i=new n({initialize:function(t,e){this.parent=t,(this.events=e)||(this.events=t.events||t),this.list={},this.values={},this._frozen=!1,!t.hasOwnProperty("sys")&&this.events&&this.events.once(a.DESTROY,this.destroy,this)},get:function(t){var e=this.list;if(Array.isArray(t)){for(var i=[],n=0;n<t.length;n++)i.push(e[t[n]]);return i}return e[t]},getAll:function(){var t,e={};for(t in this.list)this.list.hasOwnProperty(t)&&(e[t]=this.list[t]);return e},query:function(t){var e,i={};for(e in this.list)this.list.hasOwnProperty(e)&&e.match(t)&&(i[e]=this.list[e]);return i},set:function(t,e){if(!this._frozen){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){var i;return this._frozen||(void 0===e&&(e=1),i=this.get(t),this.set(t,(i=void 0===i?0:i)+e)),this},toggle:function(t){return this._frozen||this.set(t,!this.get(t)),this},setValue:function(i,t){return this._frozen||(this.has(i)?this.values[i]=t:(r=(n=this).list,s=this.events,o=this.parent,Object.defineProperty(this.values,i,{enumerable:!0,configurable:!0,get:function(){return r[i]},set:function(t){var e;n._frozen||(e=r[i],r[i]=t,s.emit(a.CHANGE_DATA,o,i,t,e),s.emit(a.CHANGE_DATA_KEY+i,o,t,e))}}),r[i]=t,s.emit(a.SET_DATA,o,i,t))),this;var n,r,s,o},each:function(t,e){for(var i,n=[this.parent,null,void 0],r=1;r<arguments.length;r++)n.push(arguments[r]);for(i in this.list)n[1]=i,n[2]=this.list[i],t.apply(e,n);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){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){var e;return this.has(t)&&(e=this.list[t],delete this.list[t],delete this.values[t],this.events.emit(a.REMOVE_DATA,this.parent,t,e)),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(a.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(a.CHANGE_DATA),this.events.off(a.SET_DATA),this.events.off(a.REMOVE_DATA),this.parent=null},freeze:{get:function(){return this._frozen},set:function(t){this._frozen=!!t}},count:{get:function(){var t,e=0;for(t in this.list)void 0!==this.list[t]&&e++;return e}}});t.exports=i},function(t,e,i){i=new(i(0))({initialize:function(t){if(this.entries={},this.size=0,Array.isArray(t))for(var e=0;e<t.length;e++)this.set(t[e][0],t[e][1])},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=[],i=this.entries;for(t in i)e.push(i[t]);return e},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=[],i=this.entries;for(t in i)e.push(i[t]);return e},dump:function(){var t=this.entries},each:function(t){var e,i=this.entries;for(e in i)if(!1===t(e,i[e]))break;return this},contains:function(t){var e,i=this.entries;for(e in i)if(i[e]===t)return!0;return!1},merge:function(t,e){void 0===e&&(e=!1);var i,n=this.entries,r=t.entries;for(i in r)n.hasOwnProperty(i)&&e?n[i]=r[i]:this.set(i,r[i]);return this}});t.exports=i},function(t,e){t.exports=function(t,e,i){return t<<16|e<<8|i}},function(t,e,i){t.exports={ENTER_FULLSCREEN:i(800),FULLSCREEN_FAILED:i(801),FULLSCREEN_UNSUPPORTED:i(802),LEAVE_FULLSCREEN:i(803),ORIENTATION_CHANGE:i(804),RESIZE:i(805)}},function(r,t,e){!function(t){var e,i,n={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};r.exports=("function"!=typeof importScripts&&(e=navigator.userAgent,/Windows/.test(e)?n.windows=!0:/Mac OS/.test(e)&&!/like Mac OS/.test(e)?navigator.maxTouchPoints&&2<navigator.maxTouchPoints?(n.iOS=!0,n.iPad=!0,navigator.appVersion.match(/Version\/(\d+)/),n.iOSVersion=parseInt(RegExp.$1,10)):n.macOS=!0:/Android/.test(e)?n.android=!0:/Linux/.test(e)?n.linux=!0:/iP[ao]d|iPhone/i.test(e)?(n.iOS=!0,navigator.appVersion.match(/OS (\d+)/),n.iOSVersion=parseInt(RegExp.$1,10),n.iPhone=-1!==e.toLowerCase().indexOf("iphone"),n.iPad=-1!==e.toLowerCase().indexOf("ipad")):/Kindle/.test(e)||/\bKF[A-Z][A-Z]+/.test(e)||/Silk.*Mobile Safari/.test(e)?n.kindle=!0:/CrOS/.test(e)&&(n.chromeOS=!0),(/Windows Phone/i.test(e)||/IEMobile/i.test(e))&&(n.android=!1,n.iOS=!1,n.macOS=!1,n.windows=!0,n.windowsPhone=!0),i=/Silk/.test(e),(n.windows||n.macOS||n.linux&&!i||n.chromeOS)&&(n.desktop=!0),(n.windowsPhone||/Windows NT/i.test(e)&&/Touch/i.test(e))&&(n.desktop=!1),navigator.standalone&&(n.webApp=!0),"function"!=typeof importScripts&&(void 0!==window.cordova&&(n.cordova=!0),void 0!==window.ejecta&&(n.ejecta=!0)),void 0!==t&&t.versions&&t.versions.node&&(n.node=!0),n.node&&"object"==typeof t.versions&&(n.nodeWebkit=!!t.versions["node-webkit"],n.electron=!!t.versions.electron),/Crosswalk/.test(e)&&(n.crosswalk=!0),n.pixelRatio=window.devicePixelRatio||1),n)}.call(this,e(807))},function(t,e,i){t.exports={ADD:i(861),ERROR:i(862),LOAD:i(863),READY:i(864),REMOVE:i(865)}},function(t,e){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}}},function(t,e,i){var n=i(0),b=i(59),r=i(2),s=i(878),o=i(879),a=i(25),w=i(12),h=i(107),l=i(58),i=new n({Extends:l,initialize:function(t){var e=t.game.renderer,i=r(t,"fragShader",s);t.fragShader=w.parseFragmentShaderMaxTextures(i,e.maxTextures),t.vertShader=r(t,"vertShader",o),t.attributes=r(t,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:h.UNSIGNED_BYTE,normalized:!0}]),l.call(this,t),this._tempMatrix1=new a,this._tempMatrix2=new a,this._tempMatrix3=new a,this.calcMatrix=new a,this.tempTriangle=[{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0}],this.strokeTint={TL:0,TR:0,BL:0,BR:0},this.fillTint={TL:0,TR:0,BL:0,BR:0},this.currentFrame={u0:0,v0:0,u1:1,v1:1},this.firstQuad=[0,0,0,0,0],this.prevQuad=[0,0,0,0,0],this.polygonCache=[]},boot:function(){l.prototype.boot.call(this),this.currentShader.set1iv("uMainSampler",this.renderer.textureIndexes)},batchSprite:function(t,e,i){this.manager.set(this,t);var n=this._tempMatrix1,r=this._tempMatrix2,s=this._tempMatrix3,o=t.frame,a=o.glTexture,h=o.u0,l=o.v0,c=o.u1,u=o.v1,d=o.x,p=o.y,f=o.cutWidth,g=o.cutHeight,m=o.customPivot,y=t.displayOriginX,v=t.displayOriginY,d=-y+d,p=-v+p,x=(t.isCropped&&((x=t._crop).flipX===t.flipX&&x.flipY===t.flipY||o.updateCropUVs(x,t.flipX,t.flipY),h=x.u0,l=x.v0,c=x.u1,u=x.v1,f=x.width,g=x.height,d=-y+x.x,p=-v+x.y),1),b=1,y=(t.flipX&&(m||(d+=-o.realWidth+2*y),x=-1),(t.flipY||o.source.isGLTexture&&!a.flipY)&&(m||(p+=-o.realHeight+2*v),b=-1),r.applyITRS(t.x,t.y,t.rotation,t.scaleX*x,t.scaleY*b),n.copyFrom(e.matrix),i?(n.multiplyWithOffset(i,-e.scrollX*t.scrollFactorX,-e.scrollY*t.scrollFactorY),r.e=t.x,r.f=t.y):(r.e-=e.scrollX*t.scrollFactorX,r.f-=e.scrollY*t.scrollFactorY),n.multiply(r,s),d+f),m=p+g,v=e.roundPixels,x=s.getXRound(d,p,v),b=s.getYRound(d,p,v),i=s.getXRound(d,m,v),n=s.getYRound(d,m,v),r=s.getXRound(y,m,v),f=s.getYRound(y,m,v),g=s.getXRound(y,p,v),d=s.getYRound(y,p,v),m=w.getTintAppendFloatAlpha,s=e.alpha,y=m(t.tintTopLeft,s*t._alphaTL),p=m(t.tintTopRight,s*t._alphaTR),v=m(t.tintBottomLeft,s*t._alphaBL),e=m(t.tintBottomRight,s*t._alphaBR),m=(this.shouldFlush(6)&&this.flush(),this.setGameObject(t,o));this.manager.preBatch(t),this.batchQuad(t,x,b,i,n,r,f,g,d,h,l,c,u,y,p,v,e,t.tintFill,a,m),this.manager.postBatch(t)},batchTexture:function(t,e,i,n,r,s,o,a,B,F,N,h,l,c,u,d,p,f,g,m,y,z,Y,X,U,V,v,x,b,w,G,T){this.manager.set(this,t);var S=this._tempMatrix1,P=this._tempMatrix2,_=this._tempMatrix3,E=f/i+v,j=g/n+x,W=(f+m)/i+v,H=(g+y)/n+x,A=o,M=a,k=-d,C=-p,m=(t.isCropped&&(o=A=L=(O=t._crop).width,a=M=I=O.height,R=f=O.x,D=g=O.y,E=(R=h?m-O.x-L:R)/i+v,j=(D=l?y-O.y-I:D)/n+x,W=(R+L)/i+v,H=(D+I)/n+x,k=-d+f,C=-p+g),h&&(A*=-1,k+=o),(l^=!G&&e.isRenderTexture?1:0)&&(M*=-1,C+=a),k+A),y=C+M,O=(P.applyITRS(r,s,N,B,F),S.copyFrom(b.matrix),w?(S.multiplyWithOffset(w,-b.scrollX*c,-b.scrollY*u),P.e=r,P.f=s):(P.e-=b.scrollX*c,P.f-=b.scrollY*u),S.multiply(P,_),b.roundPixels),R=_.getXRound(k,C,O),L=_.getYRound(k,C,O),i=_.getXRound(k,y,O),v=_.getYRound(k,y,O),D=_.getXRound(m,y,O),I=_.getYRound(m,y,O),n=_.getXRound(m,C,O),x=_.getYRound(m,C,O);void 0===T&&(T=this.renderer.setTexture2D(e)),t&&this.manager.preBatch(t),this.batchQuad(t,R,L,i,v,D,I,n,x,E,j,W,H,z,Y,X,U,V,e,T),t&&this.manager.postBatch(t)},batchTextureFrame:function(t,e,i,n,r,s,o){this.manager.set(this);var s=this._tempMatrix1.copyFrom(s),a=this._tempMatrix2,h=e+t.width,l=i+t.height,o=(o?s.multiply(o,a):a=s,a.getX(e,i)),s=a.getY(e,i),c=a.getX(e,l),e=a.getY(e,l),u=a.getX(h,l),l=a.getY(h,l),d=a.getX(h,i),a=a.getY(h,i),h=this.renderer.setTextureSource(t.source);n=w.getTintAppendFloatAlpha(n,r),this.batchQuad(null,o,s,c,e,u,l,d,a,t.u0,t.v0,t.u1,t.v1,n,n,n,n,0,t.glTexture,h)},batchFillRect:function(t,e,i,n,r,s){this.renderer.pipelines.set(this);var o=this.calcMatrix,s=(s&&s.multiply(r,o),t+i),r=e+n,i=o.getX(t,e),n=o.getY(t,e),a=o.getX(t,r),t=o.getY(t,r),h=o.getX(s,r),r=o.getY(s,r),l=o.getX(s,e),o=o.getY(s,e),s=this.fillTint;this.batchQuad(null,i,n,a,t,h,r,l,o,0,0,1,1,s.TL,s.TR,s.BL,s.BR,2)},batchFillTriangle:function(t,e,i,n,r,s,o,a){this.renderer.pipelines.set(this);var h=this.calcMatrix,a=(a&&a.multiply(o,h),h.getX(t,e)),o=h.getY(t,e),t=h.getX(i,n),e=h.getY(i,n),i=h.getX(r,s),n=h.getY(r,s),h=this.fillTint;this.batchTri(null,a,o,t,e,i,n,0,0,1,1,h.TL,h.TR,h.BL,2)},batchStrokeTriangle:function(t,e,i,n,r,s,o,a,h){var l=this.tempTriangle;l[0].x=t,l[0].y=e,l[0].width=o,l[1].x=i,l[1].y=n,l[1].width=o,l[2].x=r,l[2].y=s,l[2].width=o,l[3].x=t,l[3].y=e,l[3].width=o,this.batchStrokePath(l,o,!1,a,h)},batchFillPath:function(t,e,i){this.renderer.pipelines.set(this);var n=this.calcMatrix;i&&i.multiply(e,n);for(var r,s,o=t.length,a=this.polygonCache,h=this.fillTint.TL,l=this.fillTint.TR,c=this.fillTint.BL,u=0;u<o;++u)s=t[u],a.push(s.x,s.y);for(var o=(r=b(a)).length,d=0;d<o;d+=3){var p=2*r[d+0],f=2*r[d+1],g=2*r[d+2],m=a[0+p],p=a[1+p],y=a[0+f],f=a[1+f],v=a[0+g],g=a[1+g],x=n.getX(m,p),m=n.getY(m,p),p=n.getX(y,f),y=n.getY(y,f),f=n.getX(v,g),v=n.getY(v,g);this.batchTri(null,x,m,p,y,f,v,0,0,1,1,h,l,c,2)}a.length=0},batchStrokePath:function(t,e,i,n,r){this.renderer.pipelines.set(this),this.prevQuad[4]=0,this.firstQuad[4]=0;for(var s=t.length-1,o=0;o<s;o++){var a=t[o],h=t[o+1];this.batchLine(a.x,a.y,h.x,h.y,a.width/2,h.width/2,e,o,!i&&o===s-1,n,r)}},batchLine:function(t,e,i,n,r,s,o,a,h,l,c){this.renderer.pipelines.set(this);var u=this.calcMatrix;c&&c.multiply(l,u);var c=i-t,l=n-e,c=Math.sqrt(c*c+l*l),l=r*(n-e)/c,r=r*(t-i)/c,d=s*(n-e)/c,s=s*(t-i)/c,c=i-d,p=n-s,f=t-l,g=e-r,i=i+d,d=n+s,n=t+l,s=e+r,t=u.getX(c,p),l=u.getY(c,p),e=u.getX(f,g),r=u.getY(f,g),c=u.getX(i,d),p=u.getY(i,d),f=u.getX(n,s),g=u.getY(n,s),i=this.strokeTint,d=i.TL,u=i.TR,n=i.BL,s=i.BR;this.batchQuad(null,f,g,e,r,t,l,c,p,0,0,1,1,d,u,n,s,2),o<=2||(i=this.prevQuad,o=this.firstQuad,0<a&&i[4]?this.batchQuad(null,f,g,e,r,i[0],i[1],i[2],i[3],0,0,1,1,d,u,n,s,2):(o[0]=f,o[1]=g,o[2]=e,o[3]=r,o[4]=1),h&&o[4]?this.batchQuad(null,t,l,c,p,o[0],o[1],o[2],o[3],0,0,1,1,d,u,n,s,2):(i[0]=t,i[1]=l,i[2]=c,i[3]=p,i[4]=1))}});t.exports=i},function(t,e,i){var n=i(0),b=i(18),r=i(17),s=new n({initialize:function(t,e,i,n,r,s,o){this.texture=t,this.name=e,this.source=t.source[i],this.sourceIndex=i,this.glTexture=this.source.glTexture,this.cutX,this.cutY,this.cutWidth,this.cutHeight,this.x=0,this.y=0,this.width,this.height,this.halfWidth,this.halfHeight,this.centerX,this.centerY,this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.u0=0,this.v0=0,this.u1=0,this.v1=0,this.data={cut:{x:0,y:0,w:0,h:0,r:0,b:0},trim:!1,sourceSize:{w:0,h:0},spriteSourceSize:{x:0,y:0,w:0,h:0,r:0,b:0},radius:0,drawImage:{x:0,y:0,width:0,height:0}},this.setSize(s,o,n,r)},setSize:function(t,e,i,n){void 0===n&&(n=0),this.cutX=i=void 0===i?0:i,this.cutY=n,this.cutWidth=t,this.cutHeight=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 r=this.data,s=r.cut,s=(s.x=i,s.y=n,s.w=t,s.h=e,s.r=i+t,s.b=n+e,r.sourceSize.w=t,r.sourceSize.h=e,r.spriteSourceSize.w=t,r.spriteSourceSize.h=e,r.radius=.5*Math.sqrt(t*t+e*e),r.drawImage);return s.x=i,s.y=n,s.width=t,s.height=e,this.updateUVs()},setTrim:function(t,e,i,n,r,s){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=r,a.h=s,a.r=i+r,a.b=n+s,this.x=i,this.y=n,this.width=r,this.height=s,this.halfWidth=.5*r,this.halfHeight=.5*s,this.centerX=Math.floor(r/2),this.centerY=Math.floor(s/2),this.updateUVs()},setCropUVs:function(t,e,i,n,r,s,o){var a,h,l,c=this.cutX,u=this.cutY,d=this.cutWidth,p=this.cutHeight,f=this.realWidth,g=this.realHeight,m=c+(e=b(e,0,f)),y=u+(i=b(i,0,g)),f=n=b(n,0,f-e),g=r=b(r,0,g-i),v=this.data,v=(v.trim?(v=v.spriteSourceSize,h=e+(n=b(n,0,d-e)),l=i+(r=b(r,0,p-i)),v.r<e||v.b<i||v.x>h||v.y>l?g=f=y=m=0:(x=Math.max(v.x,e),a=Math.max(v.y,i),f=h=Math.min(v.r,h)-x,g=l=Math.min(v.b,l)-a,m=s?c+(d-(x-v.x)-h):c+(x-v.x),y=o?u+(p-(a-v.y)-l):u+(a-v.y),e=x,i=a,n=h,r=l)):(s&&(m=c+(d-e-n)),o&&(y=u+(p-i-r))),this.source.width),x=this.source.height;return t.u0=Math.max(0,m/v),t.v0=Math.max(0,y/x),t.u1=Math.min(1,(m+f)/v),t.v1=Math.min(1,(y+g)/x),t.x=e,t.y=i,t.cx=m,t.cy=y,t.cw=f,t.ch=g,t.width=n,t.height=r,t.flipX=s,t.flipY=o,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,r,s){var o=this.data.drawImage;return o.width=t,o.height=e,this.u0=i,this.v0=n,this.u1=r,this.v1=s,this},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,n=this.cutHeight,r=this.data.drawImage,r=(r.width=i,r.height=n,this.source.width),s=this.source.height;return this.u0=t/r,this.v0=e/s,this.u1=(t+i)/r,this.v1=(e+n)/s,this},updateUVsInverted:function(){var t=this.source.width,e=this.source.height;return this.u0=(this.cutX+this.cutHeight)/t,this.v0=this.cutY/e,this.u1=this.cutX/t,this.v1=(this.cutY+this.cutWidth)/e,this},clone:function(){var t=new s(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.source=null,this.texture=null,this.glTexture=null,this.customData=null,this.data=null},realWidth:{get:function(){return this.data.sourceSize.w}},realHeight:{get:function(){return this.data.sourceSize.h}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},canvasData:{get:function(){return this.data.drawImage}}});t.exports=s},function(t,e,i){var r=i(208),n=i(0),s=i(1),o=i(79),i=new n({initialize:function(t){this.parent=t,this.list=[],this.position=0,this.addCallback=s,this.removeCallback=s,this._sortKey=""},add:function(t,e){return e?r.Add(this.list,t):r.Add(this.list,t,0,this.addCallback,this)},addAt:function(t,e,i){return i?r.AddAt(this.list,t,e):r.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(i,t){return i&&o(this.list,t=void 0===t?function(t,e){return t[i]-e[i]}:t),this},getByName:function(t){return r.GetFirst(this.list,"name",t)},getRandom:function(t,e){return r.GetRandom(this.list,t,e)},getFirst:function(t,e,i,n){return r.GetFirst(this.list,t,e,i,n)},getAll:function(t,e,i,n){return r.GetAll(this.list,t,e,i,n)},count:function(t,e){return r.CountAllMatching(this.list,t,e)},swap:function(t,e){r.Swap(this.list,t,e)},moveTo:function(t,e){return r.MoveTo(this.list,t,e)},moveAbove:function(t,e){return r.MoveAbove(this.list,t,e)},moveBelow:function(t,e){return r.MoveBelow(this.list,t,e)},remove:function(t,e){return e?r.Remove(this.list,t):r.Remove(this.list,t,this.removeCallback,this)},removeAt:function(t,e){return e?r.RemoveAt(this.list,t):r.RemoveAt(this.list,t,this.removeCallback,this)},removeBetween:function(t,e,i){return i?r.RemoveBetween(this.list,t,e):r.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 r.BringToTop(this.list,t)},sendToBack:function(t){return r.SendToBack(this.list,t)},moveUp:function(t){return r.MoveUp(this.list,t),t},moveDown:function(t){return r.MoveDown(this.list,t),t},reverse:function(){return this.list.reverse(),this},shuffle:function(){return r.Shuffle(this.list),this},replace:function(t,e){return r.Replace(this.list,t,e)},exists:function(t){return-1<this.list.indexOf(t)},setAll:function(t,e,i,n){return r.SetAll(this.list,t,e,i,n),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?this.list[0]:null}},last:{get:function(){return 0<this.list.length?(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 0<this.position?(this.position--,this.list[this.position]):null}}});t.exports=i},function(t,e,i){var n=i(0),r=i(112),s=i(445),o=i(446),a=i(56),h=i(180),i=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 r(this,t,e)},getPoint:function(t,e){return s(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}}});t.exports=i},function(t,e){t.exports=function(t,e,i){return!(t.width<=0||t.height<=0)&&(e=(e-t.x)/t.width,(e*=e)+(e=(i-t.y)/t.height)*e<.25)}},function(t,e,i){var m=i(275),n=i(0),s=i(75),r=i(9),o=i(207),y=i(2),v=i(6),a=i(7),x=i(437),h=i(149),l=i(73),i=new n({Extends:r,initialize:function(t,e,i){r.call(this),i?e&&!Array.isArray(e)&&(e=[e]):Array.isArray(e)?a(e[0])&&(i=e,e=null):a(e)&&(i=e,e=null),this.scene=t,this.children=new h,this.isParent=!0,this.type="Group",this.classType=y(i,"classType",l),this.name=y(i,"name",""),this.active=y(i,"active",!0),this.maxSize=y(i,"maxSize",-1),this.defaultKey=y(i,"defaultKey",null),this.defaultFrame=y(i,"defaultFrame",null),this.runChildUpdate=y(i,"runChildUpdate",!1),this.createCallback=y(i,"createCallback",null),this.removeCallback=y(i,"removeCallback",null),this.createMultipleCallback=y(i,"createMultipleCallback",null),this.internalCreateCallback=y(i,"internalCreateCallback",null),this.internalRemoveCallback=y(i,"internalRemoveCallback",null),e&&this.addMultiple(e),i&&this.createMultiple(i),this.on(s.ADDED_TO_SCENE,this.addedToScene,this),this.on(s.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,r,s){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.defaultKey),void 0===n&&(n=this.defaultFrame),void 0===r&&(r=!0),void 0===s&&(s=!0),this.isFull()?null:((t=new this.classType(this.scene,t,e,i,n)).addToDisplayList(this.scene.sys.displayList),t.addToUpdateList(),t.visible=r,t.setActive(s),this.add(t),t)},createMultiple:function(t){if(this.isFull())return[];var e=[];if((t=Array.isArray(t)?t:[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=y(t,"classType",this.classType);var e=y(t,"key",void 0),i=y(t,"frame",null),n=y(t,"visible",!0),r=y(t,"active",!0),s=[];if(void 0!==e){Array.isArray(e)||(e=[e]),Array.isArray(i)||(i=[i]);var o=y(t,"repeat",0),a=y(t,"randomKey",!1),h=y(t,"randomFrame",!1),l=y(t,"yoyo",!1),c=y(t,"quantity",!1),u=y(t,"frameQuantity",1),d=y(t,"max",0),p=x(e,i,{max:d,qty:c||u,random:a,randomB:h,repeat:o,yoyo:l});t.createCallback&&(this.createCallback=t.createCallback),t.removeCallback&&(this.removeCallback=t.removeCallback);for(var f=0;f<p.length;f++){var g=this.create(0,0,p[f].a,p[f].b,n,r);if(!g)break;s.push(g)}e=v(t,"setXY.x",0),i=v(t,"setXY.y",0),d=v(t,"setXY.stepX",0),c=v(t,"setXY.stepY",0),u=(m.SetXY(s,e,i,d,c),v(t,"setRotation.value",0)),a=v(t,"setRotation.step",0),h=(m.SetRotation(s,u,a),v(t,"setScale.x",1)),o=v(t,"setScale.y",h),l=v(t,"setScale.stepX",0),e=v(t,"setScale.stepY",0),i=(m.SetScale(s,h,o,l,e),v(t,"setOrigin.x",.5)),d=v(t,"setOrigin.y",i),c=v(t,"setOrigin.stepX",0),u=v(t,"setOrigin.stepY",0),a=(m.SetOrigin(s,i,d,c,u),v(t,"setAlpha.value",1)),h=v(t,"setAlpha.step",0),o=(m.SetAlpha(s,a,h),v(t,"setDepth.value",0)),l=v(t,"setDepth.step",0),e=(m.SetDepth(s,o,l),v(t,"setScrollFactor.x",1)),i=v(t,"setScrollFactor.y",e),d=v(t,"setScrollFactor.stepX",0),c=v(t,"setScrollFactor.stepY",0),u=(m.SetScrollFactor(s,e,i,d,c),y(t,"hitArea",null)),a=y(t,"hitAreaCallback",null),h=(u&&m.SetHitArea(s,u,a),y(t,"gridAlign",!1));h&&m.GridAlign(s,h),this.createMultipleCallback&&this.createMultipleCallback.call(this,s)}return s},preUpdate:function(t,e){if(this.runChildUpdate&&0!==this.children.size)for(var i=this.children.entries.slice(),n=0;n<i.length;n++){var r=i[n];r.active&&r.update(t,e)}},add:function(t,e){return void 0===e&&(e=!1),this.isFull()||(this.children.set(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(s.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.contains(t)&&(this.children.delete(t),this.internalRemoveCallback&&this.internalRemoveCallback.call(this,t),this.removeCallback&&this.removeCallback.call(this,t),t.off(s.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);for(var i=this.children,n=0;n<i.size;n++){var r=i.entries[n];r.off(s.DESTROY,this.remove,this),e?r.destroy():t&&(r.removeFromDisplayList(),r.removeFromUpdateList())}return this.children.clear(),this},contains:function(t){return this.children.contains(t)},getChildren:function(){return this.children.entries},getLength:function(){return this.children.size},getMatching:function(t,e,i,n){return o(this.children.entries,t,e,i,n)},getFirst:function(t,e,i,n,r,s,o){return this.getHandler(!0,1,t,e,i,n,r,s,o)},getFirstNth:function(t,e,i,n,r,s,o,a){return this.getHandler(!0,t,e,i,n,r,s,o,a)},getLast:function(t,e,i,n,r,s,o){return this.getHandler(!1,1,t,e,i,n,r,s,o)},getLastNth:function(t,e,i,n,r,s,o,a){return this.getHandler(!1,t,e,i,n,r,s,o,a)},getHandler:function(t,e,i,n,r,s,o,a,h){void 0===i&&(i=!1),void 0===n&&(n=!1);var l,c,u=0,d=this.children.entries;if(t)for(c=0;c<d.length;c++)if((l=d[c]).active===i){if(++u===e)break}else l=null;else for(c=d.length-1;0<=c;c--)if((l=d[c]).active===i){if(++u===e)break}else l=null;return l?("number"==typeof r&&(l.x=r),"number"==typeof s&&(l.y=s),l):n?this.create(r,s,o,a,h):null},get:function(t,e,i,n,r){return this.getFirst(!1,!0,t,e,i,n,r)},getFirstAlive:function(t,e,i,n,r,s){return this.getFirst(!0,t,e,i,n,r,s)},getFirstDead:function(t,e,i,n,r,s){return this.getFirst(!1,t,e,i,n,r,s)},playAnimation:function(t,e){return m.PlayAnimation(this.children.entries,t,e),this},isFull:function(){return-1!==this.maxSize&&this.children.size>=this.maxSize},countActive:function(t){void 0===t&&(t=!0);for(var e=0,i=0;i<this.children.size;i++)this.children.entries[i].active===t&&e++;return e},getTotalUsed:function(){return this.countActive()},getTotalFree:function(){var t=this.getTotalUsed();return(-1===this.maxSize?999999999999:this.maxSize)-t},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=t,this},propertyValueSet:function(t,e,i,n,r){return m.PropertyValueSet(this.children.entries,t,e,i,n,r),this},propertyValueInc:function(t,e,i,n,r){return m.PropertyValueInc(this.children.entries,t,e,i,n,r),this},setX:function(t,e){return m.SetX(this.children.entries,t,e),this},setY:function(t,e){return m.SetY(this.children.entries,t,e),this},setXY:function(t,e,i,n){return m.SetXY(this.children.entries,t,e,i,n),this},incX:function(t,e){return m.IncX(this.children.entries,t,e),this},incY:function(t,e){return m.IncY(this.children.entries,t,e),this},incXY:function(t,e,i,n){return m.IncXY(this.children.entries,t,e,i,n),this},shiftPosition:function(t,e,i){return m.ShiftPosition(this.children.entries,t,e,i),this},angle:function(t,e){return m.Angle(this.children.entries,t,e),this},rotate:function(t,e){return m.Rotate(this.children.entries,t,e),this},rotateAround:function(t,e){return m.RotateAround(this.children.entries,t,e),this},rotateAroundDistance:function(t,e,i){return m.RotateAroundDistance(this.children.entries,t,e,i),this},setAlpha:function(t,e){return m.SetAlpha(this.children.entries,t,e),this},setTint:function(t,e,i,n){return m.SetTint(this.children.entries,t,e,i,n),this},setOrigin:function(t,e,i,n){return m.SetOrigin(this.children.entries,t,e,i,n),this},scaleX:function(t,e){return m.ScaleX(this.children.entries,t,e),this},scaleY:function(t,e){return m.ScaleY(this.children.entries,t,e),this},scaleXY:function(t,e,i,n){return m.ScaleXY(this.children.entries,t,e,i,n),this},setDepth:function(t,e){return m.SetDepth(this.children.entries,t,e),this},setBlendMode:function(t){return m.SetBlendMode(this.children.entries,t),this},setHitArea:function(t,e){return m.SetHitArea(this.children.entries,t,e),this},shuffle:function(){return m.Shuffle(this.children.entries),this},kill:function(t){this.children.contains(t)&&t.setActive(!1)},killAndHide:function(t){this.children.contains(t)&&(t.setActive(!1),t.setVisible(!1))},setVisible:function(t,e,i){return m.SetVisible(this.children.entries,t,e,i),this},toggleVisible:function(){return m.ToggleVisible(this.children.entries),this},destroy:function(t,e){void 0===t&&(t=!1),void 0===e&&(e=!1),this.scene&&!this.ignoreDestroy&&(this.emit(s.DESTROY,this),this.removeAllListeners(),this.scene.sys.updateList.remove(this),this.clear(e,t),this.scene=void 0,this.children=void 0)}});t.exports=i},function(t,e,i){var y=i(12);t.exports=function(t,e,i,n,r,s){for(var o=y.getTintAppendFloatAlpha(i.fillColor,i.fillAlpha*n),a=i.pathData,h=i.pathIndexes,l=0;l<h.length;l+=3){var c=2*h[l],u=2*h[l+1],d=2*h[l+2],p=a[0+c]-r,c=a[1+c]-s,f=a[0+u]-r,u=a[1+u]-s,g=a[0+d]-r,d=a[1+d]-s,m=e.getX(p,c),p=e.getY(p,c),c=e.getX(f,u),f=e.getY(f,u),u=e.getX(g,d),g=e.getY(g,d);t.batchTri(i,m,p,c,f,u,g,0,0,1,1,o,o,o,2)}}},function(t,e){t.exports=function(t,e,i){var n=t.x3-t.x1,r=t.y3-t.y1,s=t.x2-t.x1,o=t.y2-t.y1,e=e-t.x1,i=i-t.y1,t=n*n+r*r,a=n*s+r*o,n=n*e+r*i,r=s*s+o*o,s=s*e+o*i,e=t*r-a*a,o=0==e?0:1/e,i=(r*n-a*s)*o,e=(t*s-a*n)*o;return 0<=i&&0<=e&&i+e<1}},function(t,e,i){var n=i(0),r=i(10),s=i(3);function c(t,e,i,n){t-=i,i=e-n;return Math.sqrt(t*t+i*i)}i=new n({initialize:function(t,e,i){this.vertex1=t,this.vertex2=e,this.vertex3=i,this.bounds=new r,this._inCenter=new s},getInCenter:function(t){var e,i,n,r,s,o=this.vertex1,a=this.vertex2,h=this.vertex3,t=(t=void 0===t?!0:t)?(e=o.x,i=o.y,n=a.x,r=a.y,s=h.x,h.y):(e=o.vx,i=o.vy,n=a.vx,r=a.vy,s=h.vx,h.vy),o=c(s,t,n,r),a=c(e,i,s,t),h=c(n,r,e,i),l=o+a+h;return this._inCenter.set((e*o+n*a+s*h)/l,(i*o+r*a+t*h)/l)},contains:function(t,e,i){var n=this.vertex1,r=this.vertex2,s=this.vertex3,o=n.vx,a=n.vy,h=r.vx,l=r.vy,c=s.vx,u=s.vy,n=(i&&(d=i.a,g=i.b,p=i.c,m=i.d,f=i.e,i=i.f,o=n.vx*d+n.vy*p+f,a=n.vx*g+n.vy*m+i,h=r.vx*d+r.vy*p+f,l=r.vx*g+r.vy*m+i,c=s.vx*d+s.vy*p+f,u=s.vx*g+s.vy*m+i),c-o),r=u-a,d=h-o,p=l-a,f=t-o,g=e-a,s=n*n+r*r,m=n*d+r*p,i=n*f+r*g,c=d*d+p*p,u=d*f+p*g,h=s*c-m*m,l=0==h?0:1/h,t=(c*i-m*u)*l,o=(s*u-m*i)*l;return 0<=t&&0<=o&&t+o<1},isCounterClockwise:function(t){var e=this.vertex1,i=this.vertex2,n=this.vertex3,i=(i.vx-e.vx)*(n.vy-e.vy)-(i.vy-e.vy)*(n.vx-e.vx);return t<=0?0<=i:i<0},load:function(t,e,i,n,r){return i=this.vertex1.load(t,e,i,n,r),i=this.vertex2.load(t,e,i,n,r),this.vertex3.load(t,e,i,n,r)},transformCoordinatesLocal:function(t,e,i,n){return this.vertex1.transformCoordinatesLocal(t,e,i,n),this.vertex2.transformCoordinatesLocal(t,e,i,n),this.vertex3.transformCoordinatesLocal(t,e,i,n),this},updateBounds:function(){var t=this.vertex1,e=this.vertex2,i=this.vertex3,n=this.bounds;return n.x=Math.min(t.vx,e.vx,i.vx),n.y=Math.min(t.vy,e.vy,i.vy),n.width=Math.max(t.vx,e.vx,i.vx)-n.x,n.height=Math.max(t.vy,e.vy,i.vy)-n.y,this},isInView:function(t,e,i,n,r,s,o,a,h,l,c){var u=this.vertex1.update(r,s,o,a,h,l,c,n),d=this.vertex2.update(r,s,o,a,h,l,c,n),r=this.vertex3.update(r,s,o,a,h,l,c,n);return!(u.ta<=0&&d.ta<=0&&r.ta<=0)&&(!(e&&!this.isCounterClockwise(i))&&((s=this.bounds).x=Math.min(u.tx,d.tx,r.tx),s.y=Math.min(u.ty,d.ty,r.ty),s.width=Math.max(u.tx,d.tx,r.tx)-s.x,s.height=Math.max(u.ty,d.ty,r.ty)-s.y,o=t.x+t.width,a=t.y+t.height,!(s.width<=0||s.height<=0||t.width<=0||t.height<=0||s.right<t.x||s.bottom<t.y||s.x>o||s.y>a)))},translate:function(t,e){void 0===e&&(e=0);var i=this.vertex1,n=this.vertex2,r=this.vertex3;return i.x+=t,i.y+=e,n.x+=t,n.y+=e,r.x+=t,r.y+=e,this},x:{get:function(){return this.getInCenter().x},set:function(t){var e=this.getInCenter();this.translate(t-e.x,0)}},y:{get:function(){return this.getInCenter().y},set:function(t){var e=this.getInCenter();this.translate(0,t-e.y)}},alpha:{get:function(){var t=this.vertex1,e=this.vertex2,i=this.vertex3;return(t.alpha+e.alpha+i.alpha)/3},set:function(t){this.vertex1.alpha=t,this.vertex2.alpha=t,this.vertex3.alpha=t}},depth:{get:function(){var t=this.vertex1,e=this.vertex2,i=this.vertex3;return(t.vz+e.vz+i.vz)/3}},destroy:function(){this.vertex1=null,this.vertex2=null,this.vertex3=null}});t.exports=i},function(t,e,i){var n=i(0),s=i(12),c=i(39),i=new n({Extends:c,initialize:function(t,e,i,n,r,s,o,a,h,l){void 0===s&&(s=16777215),void 0===o&&(o=1),void 0===a&&(a=0),void 0===h&&(h=0),void 0===l&&(l=0),c.call(this,t,e,i),this.vx=0,this.vy=0,this.vz=0,this.nx=a,this.ny=h,this.nz=l,this.u=n,this.v=r,this.color=s,this.alpha=o,this.tx=0,this.ty=0,this.ta=0},setUVs:function(t,e){return this.u=t,this.v=e,this},transformCoordinatesLocal:function(t,e,i,n){var r=this.x,s=this.y,o=this.z,t=t.val,a=r*t[0]+s*t[4]+o*t[8]+t[12],h=r*t[1]+s*t[5]+o*t[9]+t[13],l=r*t[2]+s*t[6]+o*t[10]+t[14],r=r*t[3]+s*t[7]+o*t[11]+t[15];this.vx=a/r*e,this.vy=-h/r*i,this.vz=n<=0?l/r:-l/r},update:function(t,e,i,n,r,s,o,a){t=this.vx*t+this.vy*i+r,i=this.vx*e+this.vy*n+s;return o&&(t=Math.round(t),i=Math.round(i)),this.tx=t,this.ty=i,this.ta=this.alpha*a,this},load:function(t,e,i,n,r){return t[++i]=this.tx,t[++i]=this.ty,t[++i]=this.u,t[++i]=this.v,t[++i]=n,t[++i]=r,e[++i]=s.getTintAppendFloatAlpha(this.color,this.ta),i}});t.exports=i},function(t,e,i){var u={},o=(t.exports=u,i(166)),s=i(32),a=i(84),d=i(41);u.create=function(t){return s.extend({id:s.nextId(),type:"composite",parent:null,isModified:!1,bodies:[],constraints:[],composites:[],label:"Composite",plugin:{}},t)},u.setModified=function(t,e,i,n){if(o.trigger(t,"compositeModified",t),t.isModified=e,i&&t.parent&&u.setModified(t.parent,e,i,n),n)for(var r=0;r<t.composites.length;r++){var s=t.composites[r];u.setModified(s,e,i,n)}},u.add=function(t,e){var i=[].concat(e);o.trigger(t,"beforeAdd",{object:e});for(var n=0;n<i.length;n++){var r=i[n];switch(r.type){case"body":r.parent!==r?s.warn("Composite.add: skipped adding a compound body part (you must add its parent instead)"):u.addBody(t,r);break;case"constraint":u.addConstraint(t,r);break;case"composite":u.addComposite(t,r);break;case"mouseConstraint":u.addConstraint(t,r.constraint)}}return o.trigger(t,"afterAdd",{object:e}),t},u.remove=function(t,e,i){var n=[].concat(e);o.trigger(t,"beforeRemove",{object:e});for(var r=0;r<n.length;r++){var s=n[r];switch(s.type){case"body":u.removeBody(t,s,i);break;case"constraint":u.removeConstraint(t,s,i);break;case"composite":u.removeComposite(t,s,i);break;case"mouseConstraint":u.removeConstraint(t,s.constraint)}}return o.trigger(t,"afterRemove",{object:e}),t},u.addComposite=function(t,e){return t.composites.push(e),e.parent=t,u.setModified(t,!0,!0,!1),t},u.removeComposite=function(t,e,i){var n=t.composites.indexOf(e);if(-1!==n&&(u.removeCompositeAt(t,n),u.setModified(t,!0,!0,!1)),i)for(var r=0;r<t.composites.length;r++)u.removeComposite(t.composites[r],e,!0);return t},u.removeCompositeAt=function(t,e){return t.composites.splice(e,1),u.setModified(t,!0,!0,!1),t},u.addBody=function(t,e){return t.bodies.push(e),u.setModified(t,!0,!0,!1),t},u.removeBody=function(t,e,i){var n=t.bodies.indexOf(e);if(-1!==n&&(u.removeBodyAt(t,n),u.setModified(t,!0,!0,!1)),i)for(var r=0;r<t.composites.length;r++)u.removeBody(t.composites[r],e,!0);return t},u.removeBodyAt=function(t,e){return t.bodies.splice(e,1),u.setModified(t,!0,!0,!1),t},u.addConstraint=function(t,e){return t.constraints.push(e),u.setModified(t,!0,!0,!1),t},u.removeConstraint=function(t,e,i){var n=t.constraints.indexOf(e);if(-1!==n&&u.removeConstraintAt(t,n),i)for(var r=0;r<t.composites.length;r++)u.removeConstraint(t.composites[r],e,!0);return t},u.removeConstraintAt=function(t,e){return t.constraints.splice(e,1),u.setModified(t,!0,!0,!1),t},u.clear=function(t,e,i){if(i)for(var n=0;n<t.composites.length;n++)u.clear(t.composites[n],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,u.setModified(t,!0,!0,!1),t},u.allBodies=function(t){for(var e=[].concat(t.bodies),i=0;i<t.composites.length;i++)e=e.concat(u.allBodies(t.composites[i]));return e},u.allConstraints=function(t){for(var e=[].concat(t.constraints),i=0;i<t.composites.length;i++)e=e.concat(u.allConstraints(t.composites[i]));return e},u.allComposites=function(t){for(var e=[].concat(t.composites),i=0;i<t.composites.length;i++)e=e.concat(u.allComposites(t.composites[i]));return e},u.get=function(t,e,i){var n;switch(i){case"body":n=u.allBodies(t);break;case"constraint":n=u.allConstraints(t);break;case"composite":n=u.allComposites(t).concat(t)}return n&&0!==(i=n.filter(function(t){return t.id.toString()===e.toString()})).length?i[0]:null},u.move=function(t,e,i){return u.remove(t,e),u.add(i,e),t},u.rebase=function(t){for(var e=u.allBodies(t).concat(u.allConstraints(t)).concat(u.allComposites(t)),i=0;i<e.length;i++)e[i].id=s.nextId();return u.setModified(t,!0,!0,!1),t},u.translate=function(t,e,i){for(var n=i?u.allBodies(t):t.bodies,r=0;r<n.length;r++)d.translate(n[r],e);return u.setModified(t,!0,!0,!1),t},u.rotate=function(t,e,i,n){for(var r=Math.cos(e),s=Math.sin(e),o=n?u.allBodies(t):t.bodies,a=0;a<o.length;a++){var h=o[a],l=h.position.x-i.x,c=h.position.y-i.y;d.setPosition(h,{x:i.x+(l*r-c*s),y:i.y+(l*s+c*r)}),d.rotate(h,e)}return u.setModified(t,!0,!0,!1),t},u.scale=function(t,e,i,n,r){for(var s=r?u.allBodies(t):t.bodies,o=0;o<s.length;o++){var a=s[o],h=a.position.x-n.x,l=a.position.y-n.y;d.setPosition(a,{x:n.x+h*e,y:n.y+l*i}),d.scale(a,e,i)}return u.setModified(t,!0,!0,!1),t},u.bounds=function(t){for(var e=u.allBodies(t),i=[],n=0;n<e.length;n+=1){var r=e[n];i.push(r.bounds.min,r.bounds.max)}return a.create(i)}},function(t,e){t.exports=function(t,e,i){return 0<=t&&t<i.width&&0<=e&&e<i.height}},function(t,e,i){var n=i(0),r=i(29),s=i(2),i=new n({initialize:function(t){this.name=s(t=void 0===t?{}:t,"name","layer"),this.x=s(t,"x",0),this.y=s(t,"y",0),this.width=s(t,"width",0),this.height=s(t,"height",0),this.tileWidth=s(t,"tileWidth",0),this.tileHeight=s(t,"tileHeight",0),this.baseTileWidth=s(t,"baseTileWidth",this.tileWidth),this.baseTileHeight=s(t,"baseTileHeight",this.tileHeight),this.orientation=s(t,"orientation",r.ORTHOGONAL),this.widthInPixels=s(t,"widthInPixels",this.width*this.baseTileWidth),this.heightInPixels=s(t,"heightInPixels",this.height*this.baseTileHeight),this.alpha=s(t,"alpha",1),this.visible=s(t,"visible",!0),this.properties=s(t,"properties",[]),this.indexes=s(t,"indexes",[]),this.collideIndexes=s(t,"collideIndexes",[]),this.callbacks=s(t,"callbacks",[]),this.bodies=s(t,"bodies",[]),this.data=s(t,"data",[]),this.tilemapLayer=s(t,"tilemapLayer",null),this.hexSideLength=s(t,"hexSideLength",0)}});t.exports=i},function(t,e,i){var n=i(0),r=i(29),s=i(2),i=new n({initialize:function(t){this.name=s(t=void 0===t?{}:t,"name","map"),this.width=s(t,"width",0),this.height=s(t,"height",0),this.infinite=s(t,"infinite",!1),this.tileWidth=s(t,"tileWidth",0),this.tileHeight=s(t,"tileHeight",0),this.widthInPixels=s(t,"widthInPixels",this.width*this.tileWidth),this.heightInPixels=s(t,"heightInPixels",this.height*this.tileHeight),this.format=s(t,"format",null),this.orientation=s(t,"orientation",r.ORTHOGONAL),this.renderOrder=s(t,"renderOrder","right-down"),this.version=s(t,"version","1"),this.properties=s(t,"properties",{}),this.layers=s(t,"layers",[]),this.images=s(t,"images",[]),this.objects=s(t,"objects",{}),this.collision=s(t,"collision",{}),this.tilesets=s(t,"tilesets",[]),this.imageCollections=s(t,"imageCollections",[]),this.tiles=s(t,"tiles",[]),this.hexSideLength=s(t,"hexSideLength",0)}});t.exports=i},function(t,e,i){i=new(i(0))({initialize:function(t,e,i,n,r,s,o,a){(void 0===i||i<=0)&&(i=32),(void 0===n||n<=0)&&(n=32),void 0===r&&(r=0),void 0===s&&(s=0),void 0===o&&(o={}),void 0===a&&(a={}),this.name=t,this.firstgid=e,this.tileWidth=i,this.tileHeight=n,this.tileMargin=r,this.tileSpacing=s,this.tileProperties=o,this.tileData=a,this.image=null,this.glTexture=null,this.rows=0,this.columns=0,this.total=0,this.texCoordinates=[]},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){t=this.getTileData(t);return t&&t.objectgroup?t.objectgroup:null},containsTileIndex:function(t){return t>=this.firstgid&&t<this.firstgid+this.total},getTileTextureCoordinates:function(t){return this.containsTileIndex(t)?this.texCoordinates[t-this.firstgid]:null},setImage:function(t){return this.image=t,this.glTexture=t.get().source.glTexture,this.updateTileData(this.image.source[0].width,this.image.source[0].height),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){e=(e-2*this.tileMargin+this.tileSpacing)/(this.tileHeight+this.tileSpacing),t=(t-2*this.tileMargin+this.tileSpacing)/(this.tileWidth+this.tileSpacing),e=Math.floor(e),t=Math.floor(t);this.rows=e,this.columns=t,this.total=e*t,this.texCoordinates.length=0;for(var i=this.tileMargin,n=this.tileMargin,r=0;r<this.rows;r++){for(var s=0;s<this.columns;s++)this.texCoordinates.push({x:i,y:n}),i+=this.tileWidth+this.tileSpacing;i=this.tileMargin,n+=this.tileHeight+this.tileSpacing}return this}});t.exports=i},function(t,e){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}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),Math.abs(t-e)<i}},function(t,e,i){var n=i(0),r=i(11),s=i(15),i=i(1068),n=new n({Extends:s,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Flip,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Size,r.TextureCrop,r.Tint,r.Transform,r.Visible,i],initialize:function(t,e,i,n,r){s.call(this,t,"Image"),this._crop=this.resetCropObject(),this.setTexture(n,r),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline()}});t.exports=n},function(t,e){t.exports=function(t,e){return t.hasOwnProperty(e)}},function(t,e,i){var r=i(77);t.exports=function(t,e){var i,n=r(t);for(i in e)n.hasOwnProperty(i)||(n[i]=e[i]);return n}},function(t,e,i){var f={},o=(t.exports=f,i(64)),g=i(83),a=i(165),h=i(84),l=i(271),n=i(32);f._warming=.4,f._torqueDampen=1,f._minLength=1e-6,f.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?g.add(t.bodyA.position,t.pointA):t.pointA,i=t.bodyB?g.add(t.bodyB.position,t.pointB):t.pointB,e=g.magnitude(g.sub(e,i)),i=(t.length=void 0!==t.length?t.length:e,t.id=t.id||n.nextId(),t.label=t.label||"Constraint",t.type="constraint",t.stiffness=t.stiffness||(0<t.length?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={},{visible:!0,type:"line",anchors:!0,lineColor:null,lineOpacity:null,lineThickness:null,pinSize:null,anchorColor:null,anchorSize:null});return 0===t.length&&.1<t.stiffness?(i.type="pin",i.anchors=!1):t.stiffness<.9&&(i.type="spring"),t.render=n.extend(i,t.render),t},f.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)}},f.solveAll=function(t,e){for(var i=0;i<t.length;i+=1){var n=t[i],r=!n.bodyA||n.bodyA&&n.bodyA.isStatic,s=!n.bodyB||n.bodyB&&n.bodyB.isStatic;(r||s)&&f.solve(t[i],e)}for(i=0;i<t.length;i+=1)r=!(n=t[i]).bodyA||n.bodyA&&n.bodyA.isStatic,s=!n.bodyB||n.bodyB&&n.bodyB.isStatic,r||s||f.solve(t[i],e)},f.solve=function(t,e){var i,n,r,s,o,a,h,l,c=t.bodyA,u=t.bodyB,d=t.pointA,p=t.pointB;(c||u)&&(c&&!c.isStatic&&(g.rotate(d,c.angle-t.angleA,d),t.angleA=c.angle),u&&!u.isStatic&&(g.rotate(p,u.angle-t.angleB,p),t.angleB=u.angle),h=d,i=p,c&&(h=g.add(c.position,d)),u&&(i=g.add(u.position,p)),h&&i&&(h=g.sub(h,i),n=((i=(i=g.magnitude(h))<f._minLength?f._minLength:i)-t.length)/i,e=t.stiffness<1?t.stiffness*e:t.stiffness,n=g.mult(h,n*e),r=(e=(c?c.inverseMass:0)+(u?u.inverseMass:0))+((c?c.inverseInertia:0)+(u?u.inverseInertia:0)),t.damping&&(l=g.create(),a=g.div(h,i),h=g.sub(u&&g.sub(u.position,u.positionPrev)||l,c&&g.sub(c.position,c.positionPrev)||l),l=g.dot(a,h)),c&&!c.isStatic&&(o=c.inverseMass/e,c.constraintImpulse.x-=n.x*o,c.constraintImpulse.y-=n.y*o,c.position.x-=n.x*o,c.position.y-=n.y*o,t.damping&&(c.positionPrev.x-=t.damping*a.x*l*o,c.positionPrev.y-=t.damping*a.y*l*o),s=g.cross(d,n)/r*f._torqueDampen*c.inverseInertia*(1-t.angularStiffness),c.constraintImpulse.angle-=s,c.angle-=s),u&&!u.isStatic&&(o=u.inverseMass/e,u.constraintImpulse.x+=n.x*o,u.constraintImpulse.y+=n.y*o,u.position.x+=n.x*o,u.position.y+=n.y*o,t.damping&&(u.positionPrev.x+=t.damping*a.x*l*o,u.positionPrev.y+=t.damping*a.y*l*o),s=g.cross(p,n)/r*f._torqueDampen*u.inverseInertia*(1-t.angularStiffness),u.constraintImpulse.angle+=s,u.angle+=s)))},f.postSolveAll=function(t){for(var e=0;e<t.length;e++){var i=t[e],n=i.constraintImpulse;if(!(i.isStatic||0===n.x&&0===n.y&&0===n.angle)){a.set(i,!1);for(var r=0;r<i.parts.length;r++){var s=i.parts[r];o.translate(s.vertices,n),0<r&&(s.position.x+=n.x,s.position.y+=n.y),0!==n.angle&&(o.rotate(s.vertices,n.angle,i.position),l.rotate(s.axes,n.angle),0<r&&g.rotateAbout(s.position,n.angle,i.position,s.position)),h.update(s.bounds,s.vertices,i.velocity)}n.angle*=f._warming,n.x*=f._warming,n.y*=f._warming}}},f.pointAWorld=function(t){return{x:(t.bodyA?t.bodyA.position.x:0)+t.pointA.x,y:(t.bodyA?t.bodyA.position.y:0)+t.pointA.y}},f.pointBWorld=function(t){return{x:(t.bodyB?t.bodyB.position.x:0)+t.pointB.x,y:(t.bodyB?t.bodyB.position.y:0)+t.pointB.y}}},function(t,e,i){var s=i(35),n=i(65),r=i(66),o=i(0),a=i(11),h=i(15),l=i(10),c=i(57),i=new o({Extends:h,Mixins:[a.Depth,a.GetBounds,a.Origin,a.Transform,a.ScrollFactor,a.Visible],initialize:function(t,e,i,n,r){void 0===n&&(n=1),void 0===r&&(r=n),h.call(this,t,"Zone"),this.setPosition(e,i),this.width=n,this.height=r,this.blendMode=s.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 n(0,0,t),r)},setRectangleDropZone:function(t,e){return this.setDropZone(new l(0,0,t,e),c)},setDropZone:function(t,e){return void 0===t?this.setRectangleDropZone(this.width,this.height):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.addToRenderList(e)}});t.exports=i},function(t,e){t.exports=function(t){return 2*(t.width+t.height)}},function(t,e){t.exports=function(t){for(var e=t.length-1;0<e;e--){var i=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[i],t[i]=n}return t}},function(t,e,i){t.exports={ADD_ANIMATION:i(724),ANIMATION_COMPLETE:i(725),ANIMATION_COMPLETE_KEY:i(726),ANIMATION_REPEAT:i(727),ANIMATION_RESTART:i(728),ANIMATION_START:i(729),ANIMATION_STOP:i(730),ANIMATION_UPDATE:i(731),PAUSE_ALL:i(732),REMOVE_ANIMATION:i(733),RESUME_ALL:i(734)}},function(t,e,i){var n=i(0),r=i(11),s=i(36),o=i(9),a=i(37),h=i(10),l=i(25),c=i(187),g=i(3),i=new n({Extends:o,Mixins:[r.Alpha,r.Visible],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),o.call(this),this.scene,this.sceneManager,this.scaleManager,this.cameraManager,this.id=0,this.name="",this.roundPixels=!1,this.useBounds=!1,this.worldView=new h,this.dirty=!0,this._x=t,this._y=e,this._width=i,this._height=n,this._bounds=new h,this._scrollX=0,this._scrollY=0,this._zoomX=1,this._zoomY=1,this._rotation=0,this.matrix=new l,this.transparent=!0,this.backgroundColor=c("rgba(0,0,0,0)"),this.disableCull=!1,this.culledObjects=[],this.midPoint=new g(i/2,n/2),this.originX=.5,this.originY=.5,this._customViewport=!1,this.mask=null,this._maskCamera=null,this.renderList=[]},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 g);var n=.5*this.width,r=.5*this.height;return i.x=t-n,i.y=e-r,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(){var t,e,i;return this.useBounds&&(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),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],r=e[2],s=e[3];if(!(i*s-n*r))return t;for(var o=e[4],a=e[5],h=this.scrollX,l=this.scrollY,e=this.width,c=this.height,u=this.y,d=u+c,p=this.x,f=p+e,g=this.culledObjects,m=t.length,y=g.length=0;y<m;++y){var v,x,b,w,T=t[y];(!T.hasOwnProperty("width")||T.parentContainer||(v=T.width,x=T.height,p<((b=T.x-h*T.scrollFactorX-v*T.originX)+v)*i+((w=T.y-l*T.scrollFactorY-x*T.originY)+x)*r+o&&b*i+w*r+o<f&&u<(b+v)*n+(w+x)*s+a&&b*n+w*s+a<d))&&g.push(T)}return g},getWorldPoint:function(t,e,i){void 0===i&&(i=new g);var n,r,s,o,a,h=this.matrix.matrix,l=h[0],c=h[1],u=h[2],d=h[3],p=h[4],h=h[5],f=l*d-c*u;return f?(a=d*(f=1/f),n=-c*f,r=-u*f,s=l*f,u=(u*h-d*p)*f,d=(c*p-l*h)*f,c=Math.cos(this.rotation),p=Math.sin(this.rotation),l=this.zoomX,h=this.zoomY,f=this.scrollX,o=this.scrollY,i.x=(l=t+(f*c-o*p)*l)*a+(a=e+(f*p+o*c)*h)*r+u,i.y=l*n+a*s+d):(i.x=t,i.y=e),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},preRender:function(){this.renderList.length=0;var t=this.width,e=this.height,i=.5*t,n=.5*e,r=this.zoomX,s=this.zoomY,o=this.matrix,a=t*this.originX,h=e*this.originY,l=this.scrollX,c=this.scrollY,l=(this.useBounds&&(l=this.clampX(l),c=this.clampY(c)),this.roundPixels&&(a=Math.round(a),h=Math.round(h)),(this.scrollX=l)+i),i=(this.scrollY=c)+n,c=(this.midPoint.set(l,i),t/r),n=e/s;this.worldView.setTo(l-c/2,i-n/2,c,n),o.applyITRS(this.x+a,this.y+h,this.rotation,r,s),o.translate(-a,-h)},clampX:function(t){var e=this._bounds,i=this.displayWidth,n=e.x+(i-this.width)/2,e=Math.max(n,n+e.width-i);return t<n?t=n:e<t&&(t=e),t},clampY:function(t){var e=this._bounds,i=this.displayHeight,n=e.y+(i-this.height)/2,e=Math.max(n,n+e.height-i);return t<n?t=n:e<t&&(t=e),t},removeBounds:function(){return this.useBounds=!1,this.dirty=!0,this._bounds.setEmpty(),this},setAngle:function(t){return this.rotation=s(t=void 0===t?0:t),this},setBackgroundColor:function(t){return this.backgroundColor=c(t=void 0===t?"rgba(0,0,0,0)":t),this.transparent=0===this.backgroundColor.alpha,this},setBounds:function(t,e,i,n,r){return void 0===r&&(r=!1),this._bounds.setTo(t,e,i,n),this.dirty=!0,this.useBounds=!0,r?this.centerToBounds():(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},getBounds:function(t){void 0===t&&(t=new h);var e=this._bounds;return t.setTo(e.x,e.y,e.width,e.height),t},setName:function(t){return this.name=t=void 0===t?"":t,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setRotation:function(t){return this.rotation=t=void 0===t?0:t,this},setRoundPixels:function(t){return this.roundPixels=t,this},setScene:function(t){this.scene&&this._customViewport&&this.sceneManager.customViewports--;t=(this.scene=t).sys;return this.sceneManager=t.game.scene,this.scaleManager=t.scale,this.cameraManager=t.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),0===(e=void 0===e?t:e)&&(e=.001),this.zoomX=t=0===t?.001: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(t=void 0===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(){},updateSystem:function(){var t,e;this.scaleManager&&(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(a.DESTROY,this),this.removeAllListeners(),this.matrix.destroy(),this.culledObjects=[],this._customViewport&&this.sceneManager.customViewports--,this.renderList=[],this._bounds=null,this.scene=null,this.scaleManager=null,this.sceneManager=null,this.cameraManager=null},x:{get:function(){return this._x},set:function(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){this._scrollX=t,this.dirty=!0}},scrollY:{get:function(){return this._scrollY},set:function(t){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}}});t.exports=i},function(t,e,i){var n=i(334),r=i(335),s=i(336),o=i(337),a=i(338),h=i(339),l=i(340),c=i(341),u=i(342),d=i(343),p=i(344),i=i(345);t.exports={Power0:l,Power1:c.Out,Power2:o.Out,Power3:u.Out,Power4:d.Out,Linear:l,Quad:c.Out,Cubic:o.Out,Quart:u.Out,Quint:d.Out,Sine:p.Out,Expo:h.Out,Circ:s.Out,Elastic:a.Out,Back:n.Out,Bounce:r.Out,Stepped:i,"Quad.easeIn":c.In,"Cubic.easeIn":o.In,"Quart.easeIn":u.In,"Quint.easeIn":d.In,"Sine.easeIn":p.In,"Expo.easeIn":h.In,"Circ.easeIn":s.In,"Elastic.easeIn":a.In,"Back.easeIn":n.In,"Bounce.easeIn":r.In,"Quad.easeOut":c.Out,"Cubic.easeOut":o.Out,"Quart.easeOut":u.Out,"Quint.easeOut":d.Out,"Sine.easeOut":p.Out,"Expo.easeOut":h.Out,"Circ.easeOut":s.Out,"Elastic.easeOut":a.Out,"Back.easeOut":n.Out,"Bounce.easeOut":r.Out,"Quad.easeInOut":c.InOut,"Cubic.easeInOut":o.InOut,"Quart.easeInOut":u.InOut,"Quint.easeInOut":d.InOut,"Sine.easeInOut":p.InOut,"Expo.easeInOut":h.InOut,"Circ.easeInOut":s.InOut,"Elastic.easeInOut":a.InOut,"Back.easeInOut":n.InOut,"Bounce.easeInOut":r.InOut}},function(t,e){t.exports=function(t,e,i){return(e-t)*i+t}},function(t,e,i){var i=i(105),n={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};t.exports=(t=navigator.userAgent,/Edge\/\d+/.test(t)?n.edge=!0:/Chrome\/(\d+)/.test(t)&&!i.windowsPhone?(n.chrome=!0,n.chromeVersion=parseInt(RegExp.$1,10)):/Firefox\D+(\d+)/.test(t)?(n.firefox=!0,n.firefoxVersion=parseInt(RegExp.$1,10)):/AppleWebKit/.test(t)&&i.iOS?n.mobileSafari=!0:/MSIE (\d+\.\d+);/.test(t)?(n.ie=!0,n.ieVersion=parseInt(RegExp.$1,10)):/Opera/.test(t)?n.opera=!0:/Safari/.test(t)&&!i.windowsPhone?n.safari=!0:/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(t)&&(n.ie=!0,n.trident=!0,n.tridentVersion=parseInt(RegExp.$1,10),n.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(t)&&(n.silk=!0),n)},function(t,e){t.exports=function(t,e){return Math.random()*(e-t)+t}},function(t,e){t.exports=function(t,e){return 0<t&&0==(t&t-1)&&0<e&&0==(e&e-1)}},function(t,e){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)}},function(t,e,i){var n=new(i(0))({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,r=t*t+e*e+i*i+n*n;return 0<r&&(r=1/Math.sqrt(r),this.x=t*r,this.y=e*r,this.z=i*r,this.w=n*r),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){var i=this.x,n=this.y,r=this.z,s=this.w;return this.x=i+(e=void 0===e?0:e)*(t.x-i),this.y=n+e*(t.y-n),this.z=r+e*(t.z-r),this.w=s+e*(t.w-s),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,t=t.w-this.w||0;return Math.sqrt(e*e+i*i+n*n+t*t)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,t=t.w-this.w||0;return e*e+i*i+n*n+t*t},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,r=this.w,t=t.val;return this.x=t[0]*e+t[4]*i+t[8]*n+t[12]*r,this.y=t[1]*e+t[5]*i+t[9]*n+t[13]*r,this.z=t[2]*e+t[6]*i+t[10]*n+t[14]*r,this.w=t[3]*e+t[7]*i+t[11]*n+t[15]*r,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,r=t.x,s=t.y,o=t.z,t=t.w,a=t*e+s*n-o*i,h=t*i+o*e-r*n,l=t*n+r*i-s*e,e=-r*e-s*i-o*n;return this.x=a*t+e*-r+h*-o-l*-s,this.y=h*t+e*-s+l*-r-a*-o,this.z=l*t+e*-o+a*-s-h*-r,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},function(t,e,i){var n=i(0),r=i(91),i=new n({initialize:function(t,e,i,n,r,s,o){void 0===n&&(n=1),void 0===r&&(r=0),void 0===s&&(s=!0),void 0===o&&(o=!1),this.renderer=t,this.framebuffer=null,this.texture=null,this.width=0,this.height=0,this.scale=n,this.minFilter=r,this.autoClear=s,this.autoResize=!1,this.resize(e,i),o&&this.setAutoResize(!0)},setAutoResize:function(t){return t&&!this.autoResize?(this.renderer.on(r.RESIZE,this.resize,this),this.autoResize=!0):!t&&this.autoResize&&(this.renderer.off(r.RESIZE,this.resize,this),this.autoResize=!1),this},resize:function(t,e){var i=t*this.scale,n=e*this.scale;return i===this.width&&n===this.height||((i=this.renderer).deleteFramebuffer(this.framebuffer),i.deleteTexture(this.texture),t*=this.scale,e*=this.scale,(t=Math.round(t))<=0&&(t=1),(e=Math.round(e))<=0&&(e=1),this.texture=i.createTextureFromSource(null,t,e,this.minFilter),this.framebuffer=i.createFramebuffer(t,e,this.texture,!1),this.width=t,this.height=e),this},bind:function(t,e,i){(t=void 0===t?!1:t)&&this.renderer.flush(),e&&i&&this.resize(e,i),this.renderer.pushFramebuffer(this.framebuffer,!1,!1,!1),t&&this.adjustViewport(),this.autoClear&&((e=this.renderer.gl).clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT))},adjustViewport:function(){var t=this.renderer.gl;t.viewport(0,0,this.width,this.height),t.disable(t.SCISSOR_TEST)},clear:function(){var t=this.renderer,e=t.gl;t.pushFramebuffer(this.framebuffer),e.disable(e.SCISSOR_TEST),e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),t.popFramebuffer(),t.resetScissor()},unbind:function(t){var e=this.renderer;return(t=void 0===t?!1:t)&&e.flush(),e.popFramebuffer()},destroy:function(){var t=this.renderer;t.deleteFramebuffer(this.framebuffer),t.deleteTexture(this.texture),t.off(r.RESIZE,this.resize,this),this.renderer=null,this.framebuffer=null,this.texture=null}});t.exports=i},function(t,e){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).appendChild(t),t}},function(t,e){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}},function(t,e){t.exports={PENDING:0,INIT:1,START:2,LOADING:3,CREATING:4,RUNNING:5,PAUSED:6,SLEEPING:7,SHUTDOWN:8,DESTROYED:9}},function(t,e,i){var n=i(0),o=i(77),r=i(9),s=i(70),a=i(22),h=i(1),l=i(207),c=i(428),i=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,t.events.on(a.BLUR,this.onGameBlur,this),t.events.on(a.FOCUS,this.onGameFocus,this),t.events.on(a.PRE_STEP,this.update,this),t.events.once(a.DESTROY,this.destroy,this)},add:h,addAudioSprite:function(t,e){var i,n,r,s=this.add(t,e=void 0===e?{}:e);for(r in s.spritemap=this.jsonCache.get(t).spritemap,s.spritemap)s.spritemap.hasOwnProperty(r)&&(i=o(e),n=s.spritemap[r],i.loop=!!n.hasOwnProperty("loop")&&n.loop,s.addMarker({name:r,start:n.start,duration:n.end-n.start,config:i}));return s},get:function(t){return c(this.sounds,"key",t)},getAll:function(t){return l(this.sounds,"key",t)},play:function(t,e){t=this.add(t);return t.once(s.COMPLETE,t.destroy,t),e?e.name?(t.addMarker(e),t.play(e.name)):t.play(e):t.play()},playAudioSprite:function(t,e,i){t=this.addAudioSprite(t);return t.once(s.COMPLETE,t.destroy,t),t.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;0<=i;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(s.PAUSE_ALL,this)},resumeAll:function(){this.forEachActiveSound(function(t){t.resume()}),this.emit(s.RESUME_ALL,this)},stopAll:function(){this.forEachActiveSound(function(t){t.stop()}),this.emit(s.STOP_ALL,this)},stopByKey:function(t){var e=0;return this.getAll(t).forEach(function(t){t.stop()&&e++}),e},unlock:h,onBlur:h,onFocus:h,onGameBlur:function(){this.pauseOnBlur&&this.onBlur()},onGameFocus:function(){this.pauseOnBlur&&this.onFocus()},update:function(e,i){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit(s.UNLOCKED,this));for(var t=this.sounds.length-1;0<=t;t--)this.sounds[t].pendingRemove&&this.sounds.splice(t,1);this.sounds.forEach(function(t){t.update(e,i)})},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.game=null},forEachActiveSound:function(i,n){var r=this;this.sounds.forEach(function(t,e){t&&!t.pendingRemove&&i.call(n||r,t,e,r.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(s.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(s.GLOBAL_DETUNE,this,t)}}});t.exports=i},function(t,e,i){var n=i(0),r=i(9),s=i(70),o=i(17),i=i(1),n=new n({Extends:r,initialize:function(t,e,i){r.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]||(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))},removeMarker:function(t){var e=this.markers[t];return e?(this.markers[t]=null,e):null},play:function(t,e){if("object"==typeof(t=void 0===t?"":t)&&(e=t,t=""),"string"!=typeof t)return!1;if(t){if(!this.markers[t])return!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)},pause:function(){return!(this.isPaused||!this.isPlaying)&&(this.isPlaying=!1,this.isPaused=!0)},resume:function(){return!(!this.isPaused||this.isPlaying||(this.isPlaying=!0,this.isPaused=!1))},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,calculateRate:function(){var t=this.currentConfig.detune+this.manager.detune,t=Math.pow(1.0005777895065548,t);this.totalRate=this.currentConfig.rate*this.manager.rate*t},destroy:function(){this.pendingRemove||(this.emit(s.DESTROY,this),this.pendingRemove=!0,this.manager=null,this.key="",this.removeAllListeners(),this.isPlaying=!1,this.isPaused=!1,this.config=null,this.currentConfig=null,this.markers=null,this.currentMarker=null)}});t.exports=n},function(t,e,i){var n=i(209),r=i(435);t.exports=function(t,e){if(void 0===e&&(e=90),!n(t))return null;if(90===(e="string"!=typeof e?(e%360+360)%360:e)||-270===e||"rotateLeft"===e)(t=r(t)).reverse();else if(-90===e||270===e||"rotateRight"===e)t.reverse(),t=r(t);else if(180===Math.abs(e)||"rotate180"===e){for(var i=0;i<t.length;i++)t[i].reverse();t.reverse()}return t}},function(t,e,i){var n=i(0),p=i(18),r=i(11),a=i(15),h=i(1043),s=i(1044),o=i(212),l=i(10),i=i(1045),c=new n({Extends:a,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Texture,r.Tint,r.Transform,r.Visible,i],initialize:function(t,e,i,n,r,s,o){void 0===r&&(r=""),void 0===o&&(o=0),a.call(this,t,"BitmapText"),this.font=n;t=this.scene.sys.cache.bitmapFont.get(n);this.fontData=t.data,this._text="",this._fontSize=s||this.fontData.size,this._letterSpacing=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=t.fromAtlas,this.setTexture(t.texture,t.frame),this.setPosition(e,i),this.setOrigin(0,0),this.initPipeline(),this.setText(r)},setLeftAlign:function(){return this._align=c.ALIGN_LEFT,this._dirty=!0,this},setCenterAlign:function(){return this._align=c.ALIGN_CENTER,this._dirty=!0,this},setRightAlign:function(){return this._align=c.ALIGN_RIGHT,this._dirty=!0,this},setFontSize:function(t){return this._fontSize=t,this._dirty=!0,this},setLetterSpacing:function(t){return this._letterSpacing=t=void 0===t?0:t,this._dirty=!0,this},setText:function(t){return t||0===t||(t=""),(t=Array.isArray(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===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=.5),this.dropShadowX=t=void 0===t?0:t,this.dropShadowY=e,this.dropShadowColor=i,this.dropShadowAlpha=n,this},setCharacterTint:function(t,e,i,n,r,s,o){void 0===i&&(i=!1),void 0===n&&(n=-1),void 0===r&&(o=s=r=n);var a=this.text.length;-1===(e=void 0===e?1:e)&&(e=a),t=p(t=(t=void 0===t?0:t)<0?a+t:t,0,a-1);for(var h=p(t+e,t,a),l=this.charColors,c=t;c<h;c++){var u,d=l[c];-1===n?l[c]=null:(u=i?1:0,d?(d.tintEffect=u,d.tintTL=n,d.tintTR=r,d.tintBL=s,d.tintBR=o):l[c]={tintEffect:u,tintTL:n,tintTR:r,tintBL:s,tintBR:o})}return this},setWordTint:function(t,e,i,n,r,s,o){void 0===e&&(e=1);for(var a=this.getTextBounds().words,h="number"==typeof t,l=0,c=0;c<a.length;c++){var u=a[c];if((h&&c===t||!h&&u.word===t)&&(this.setCharacterTint(u.i,u.word.length,i,n,r,s,o),++l===e))return this}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),r=this.getTextBounds().characters,s=new l,o=0;o<r.length;o++){var a=r[o];if(s.setTo(a.x,a.t,a.r-a.x,a.b),s.contains(n.x,n.y))return a}return null},updateDisplayOrigin:function(){return this._dirty=!0,this.getTextBounds(!1),this},setFont:function(t,e,i){var n;return void 0===e&&(e=this._fontSize),void 0===i&&(i=this._align),t!==this.font&&(n=this.scene.sys.cache.bitmapFont.get(t))&&(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},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}},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.height}},toJSON:function(){var t=r.ToJSON(this),e={font:this.font,text:this.text,fontSize:this.fontSize,letterSpacing:this.letterSpacing,align:this.align};return t.data=e,t},preDestroy:function(){this.charColors.length=0,this._bounds=null,this.fontData=null}});c.ALIGN_LEFT=0,c.ALIGN_CENTER=1,c.ALIGN_RIGHT=2,c.ParseFromAtlas=s,c.ParseXMLBitmapFont=o,t.exports=c},function(t,e,i){var n=new(i(0))({initialize:function(t){if(this.entries=[],Array.isArray(t))for(var e=0;e<t.length;e++)this.set(t[e])},set:function(t){return-1===this.entries.indexOf(t)&&this.entries.push(t),this},get:function(t,e){for(var i=0;i<this.entries.length;i++){var n=this.entries[i];if(n[t]===e)return n}},getArray:function(){return this.entries.slice(0)},delete:function(t){t=this.entries.indexOf(t);return-1<t&&this.entries.splice(t,1),this},dump:function(){for(var t=0;t<this.entries.length;t++)this.entries[t]},each:function(t,e){var i,n=this.entries.slice(),r=n.length;if(e)for(i=0;i<r&&!1!==t.call(e,n[i],i);i++);else for(i=0;i<r&&!1!==t(n[i],i);i++);return this},iterate:function(t,e){var i,n=this.entries.length;if(e)for(i=0;i<n&&!1!==t.call(e,this.entries[i],i);i++);else for(i=0;i<n&&!1!==t(this.entries[i],i);i++);return this},iterateLocal:function(t){for(var e=[],i=1;i<arguments.length;i++)e.push(arguments[i]);for(var n=this.entries.length,i=0;i<n;i++){var r=this.entries[i];r[t].apply(r,e)}return this},clear:function(){return this.entries.length=0,this},contains:function(t){return-1<this.entries.indexOf(t)},union:function(t){var e=new n;return t.entries.forEach(function(t){e.set(t)}),this.entries.forEach(function(t){e.set(t)}),e},intersect:function(e){var i=new n;return this.entries.forEach(function(t){e.contains(t)&&i.set(t)}),i},difference:function(e){var i=new n;return this.entries.forEach(function(t){e.contains(t)||i.set(t)}),i},size:{get:function(){return this.entries.length},set:function(t){return t<this.entries.length?this.entries.length=t:this.entries.length}}});t.exports=n},function(t,e,i){var n=i(0),r=i(11),a=i(15),h=i(189),l=i(92),i=i(1182),n=new n({Extends:a,Mixins:[r.AlphaSingle,r.BlendMode,r.Depth,r.GetBounds,r.Mask,r.Pipeline,r.ScrollFactor,r.Transform,r.Visible,i],initialize:function(t,e,i,n,r,s,o){void 0===n&&(n=16777215),void 0===r&&(r=128),void 0===s&&(s=1),void 0===o&&(o=.1),a.call(this,t,"PointLight"),this.initPipeline(l.POINTLIGHT_PIPELINE),this.setPosition(e,i),this.color=h(n),this.intensity=s,this.attenuation=o,this.width=2*r,this.height=2*r,this._radius=r},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}}});t.exports=n},function(t,e){t.exports=function(t,e){var i=e.width/2,n=e.height/2,r=Math.abs(t.x-e.x-i),e=Math.abs(t.y-e.y-n),s=i+t.radius,o=n+t.radius;return!(s<r||o<e)&&(r<=i||e<=n||(s=r-i)*s+(o=e-n)*o<=t.radius*t.radius)}},function(t,e){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)}},function(t,e,i){var l=i(6),c={};t.exports={register:function(t,e,i,n,r){c[t]={plugin:e,mapping:i,settingsKey:n,configKey:r}},getPlugin:function(t){return c[t]},install:function(t){var e,i=t.scene.sys,n=i.settings.input,r=i.game.config;for(e in c){var s=c[e].plugin,o=c[e].mapping,a=c[e].settingsKey,h=c[e].configKey;l(n,a,r[h])&&(t[o]=new s(t))}},remove:function(t){c.hasOwnProperty(t)&&delete c[t]}}},function(t,e,i){t.exports={ANY_KEY_DOWN:i(1323),ANY_KEY_UP:i(1324),COMBO_MATCH:i(1325),DOWN:i(1326),KEY_DOWN:i(1327),KEY_UP:i(1328),UP:i(1329)}},function(t,e){t.exports=function(t,e){return!!t.url&&(t.url.match(/^(?:blob:|data:|http:\/\/|https:\/\/|\/\/)/)?t.url:e+t.url)}},function(t,e){t.exports=function(t,e,i,n,r,s){return{responseType:t=void 0===t?"":t,async:e=void 0===e?!0:e,user:i=void 0===i?"":i,password:n=void 0===n?"":n,timeout:r=void 0===r?0:r,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:s=void 0===s?!1:s}}},function(t,e,i){var n=i(0),r=i(243),s=i(73),i=new n({Extends:s,Mixins:[r.Acceleration,r.Angular,r.Bounce,r.Debug,r.Drag,r.Enable,r.Friction,r.Gravity,r.Immovable,r.Mass,r.Pushable,r.Size,r.Velocity],initialize:function(t,e,i,n,r){s.call(this,t,e,i,n,r),this.body=null}});t.exports=i},function(t,e,i){var r=i(119);t.exports=function(t,e,i,n){return void 0===i&&(i=!1),r(t,e,n)&&(n=n.data[e][t]||null)&&(-1!==n.index||i)?n:null}},function(t,e){t.exports=function(t,e,i,n){var r,s,o,a=t.data,h=t.width,l=t.height,t=t.tilemapLayer,c=Math.max(0,e.left),u=Math.min(h,e.right),d=Math.max(0,e.top),p=Math.min(l,e.bottom);if(0===i)for(s=d;s<p;s++)for(r=c;a[s]&&r<u;r++)(o=a[s][r])&&-1!==o.index&&o.visible&&0!==o.alpha&&n.push(o);else if(1===i)for(s=d;s<p;s++)for(r=u;a[s]&&c<=r;r--)(o=a[s][r])&&-1!==o.index&&o.visible&&0!==o.alpha&&n.push(o);else if(2===i)for(s=p;d<=s;s--)for(r=c;a[s]&&r<u;r++)(o=a[s][r])&&-1!==o.index&&o.visible&&0!==o.alpha&&n.push(o);else if(3===i)for(s=p;d<=s;s--)for(r=u;a[s]&&c<=r;r--)(o=a[s][r])&&-1!==o.index&&o.visible&&0!==o.alpha&&n.push(o);return t.tilesDrawn=n.length,t.tilesTotal=h*l,n}},function(t,e){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)}},function(t,e,i){var s=i(2);t.exports=function(t,e,i){var n,r;return e?(n=e.x+s(e,"startx",0)*t.tilewidth+s(e,"offsetx",0),r=e.y+s(e,"starty",0)*t.tileheight+s(e,"offsety",0),{i:0,layers:e.layers,name:i.name+e.name+"/",opacity:i.opacity*e.opacity,visible:i.visible&&e.visible,x:i.x+n,y:i.y+r}):{i:0,layers:t.layers,name:"",opacity:1,visible:!0,x:0,y:0}}},function(t,e){t.exports=function(o,a,t){return o.hasOwnProperty(a)?"function"==typeof o[a]?function(t,e,i,n,r,s){return o[a](t,e,i,n,r,s)}:function(){return o[a]}:"function"==typeof t?t:function(){return t}}},function(t,e,i){var C=i(265),O=i(13),R=i(99),L=i(80),D=i(162),I=i(583),B=i(263),F=i(6),N=i(264),z=i(266),Y=i(268);t.exports=function(t,e,i){for(var n=(i=void 0===i?C:i).targets||B(e),r=I(e),s=D(e,"delay",i.delay),o=D(e,"duration",i.duration),a=F(e,"easeParams",i.easeParams),h=L(F(e,"ease",i.ease),a),l=D(e,"hold",i.hold),c=D(e,"repeat",i.repeat),u=D(e,"repeatDelay",i.repeatDelay),d=R(e,"yoyo",i.yoyo),p=R(e,"flipX",i.flipX),f=R(e,"flipY",i.flipY),g=[],m=0;m<r.length;m++)for(var y=r[m].key,v=r[m].value,x=0;x<n.length;x++){var b=N(y,v),b=Y(n[x],x,y,b.getEnd,b.getStart,b.getActive,L(F(v,"ease",h),F(v,"easeParams",a)),D(v,"delay",s),D(v,"duration",o),R(v,"yoyo",d),D(v,"hold",l),D(v,"repeat",c),D(v,"repeatDelay",u),R(v,"flipX",p),R(v,"flipY",f));g.push(b)}var w=new z(t,g,n);w.offset=O(e,"offset",null),w.completeDelay=O(e,"completeDelay",0),w.loop=Math.round(O(e,"loop",0)),w.loopDelay=Math.round(O(e,"loopDelay",0)),w.paused=R(e,"paused",!1),w.useFrames=R(e,"useFrames",!1);for(var T=F(e,"callbackScope",w),S=[w,null],P=z.TYPES,_=0;_<P.length;_++){var E,A,M=P[_],k=F(e,M,!1);k&&(E=F(e,M+"Scope",T),A=F(e,M+"Params",[]),w.setCallback(M,k,S.concat(A),E))}return w}},function(t,e,i){var n=i(0),r=i(102),s=i(2),o=i(132),a=i(185),i=new n({initialize:function(t){this.parent=t,this.animationManager=t.scene.sys.anims,this.animationManager.on(o.REMOVE_ANIMATION,this.globalRemove,this),this.textureManager=this.animationManager.textureManager,this.anims=null,this.isPlaying=!1,this.hasStarted=!1,this.currentAnim=null,this.currentFrame=null,this.nextAnim=null,this.nextAnimsQueue=[],this.timeScale=1,this.frameRate=0,this.duration=0,this.msPerFrame=0,this.skipMissedFrames=!0,this.delay=0,this.repeat=0,this.repeatDelay=0,this.yoyo=!1,this.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];null===this.nextAnim?this.nextAnim=n:this.nextAnimsQueue.push(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,i,n=this.animationManager,r="string"==typeof t?t:s(t,"key",null),n=(this.exists(r)?this:n).get(r);return n&&(r=(this.currentAnim=n).getTotalFrames(),e=s(t,"frameRate",n.frameRate),i=s(t,"duration",n.duration),n.calculateDuration(this,r,i,e),this.delay=s(t,"delay",n.delay),this.repeat=s(t,"repeat",n.repeat),this.repeatDelay=s(t,"repeatDelay",n.repeatDelay),this.yoyo=s(t,"yoyo",n.yoyo),this.showOnStart=s(t,"showOnStart",n.showOnStart),this.hideOnComplete=s(t,"hideOnComplete",n.hideOnComplete),this.skipMissedFrames=s(t,"skipMissedFrames",n.skipMissedFrames),this.timeScale=s(t,"timeScale",this.timeScale),(r=s(t,"startFrame",0))>n.getTotalFrames()&&(r=0),i=n.frames[r],0!==r||this.forward||(i=n.getLastFrame()),this.currentFrame=i),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){var i,n;return this.isPlaying?(i=this.nextAnim,n=this.nextAnimsQueue,i&&n.unshift(i),this.nextAnim=t,this._pendingStop=1,this._pendingStopValue=e):(this.delayCounter=e,this.play(t,!0)),this.parent},playAfterRepeat:function(t,e){var i,n;return void 0===e&&(e=1),this.isPlaying?(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):this.play(t),this.parent},play:function(t,e){var i=this.currentAnim,n=this.parent,r="string"==typeof t?t:t.key;if((e=void 0===e?!1:e)&&this.isPlaying&&i.key===r)return n;if(i&&this.isPlaying){e=this.animationManager.getMix(i.key,t);if(0<e)return this.playAfterDelay(t,e)}return this.forward=!0,this.inReverse=!1,this._paused=!1,this._wasPlaying=!0,this.startAnimation(t)},playReverse:function(t,e){var i="string"==typeof t?t:t.key;return(e=void 0===e?!1: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 t=this.currentAnim,e=this.parent;return t&&(this.repeatCounter=-1===this.repeat?Number.MAX_VALUE:this.repeat,t.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()),e},handleStart:function(){this.showOnStart&&this.parent.setVisible(!0),this.setCurrentFrame(this.currentFrame),this.hasStarted=!0,this.emitEvents(o.ANIMATION_START)},handleRepeat:function(){this.pendingRepeat=!1,this.emitEvents(o.ANIMATION_REPEAT)},handleStop:function(){this._pendingStop=0,this.isPlaying=!1,this.emitEvents(o.ANIMATION_STOP)},handleComplete:function(){this._pendingStop=0,this.isPlaying=!1,this.hideOnComplete&&this.parent.setVisible(!1),this.emitEvents(o.ANIMATION_COMPLETE,o.ANIMATION_COMPLETE_KEY)},emitEvents:function(t,e){var i=this.currentAnim,n=this.currentFrame,r=this.parent,s=n.textureFrame;r.emit(t,i,n,r,s),e&&r.emit(e+i.key,i,n,r,s)},reverse:function(){return this.isPlaying&&(this.inReverse=!this.inReverse,this.forward=!this.forward),this.parent},getProgress:function(){var t=this.currentFrame;return t?(t=t.progress,this.inReverse&&(t*=-1),t):0},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(o.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(){var t;return this._pendingStop=0,this.isPlaying=!1,this.currentAnim&&this.handleComplete(),this.nextAnim&&(t=this.nextAnim,this.nextAnim=0<this.nextAnimsQueue.length?this.nextAnimsQueue.shift():null,this.play(t)),this.parent},stop:function(){var t;return this._pendingStop=0,this.isPlaying=!1,this.currentAnim&&this.handleStop(),this.nextAnim&&(t=this.nextAnim,this.nextAnim=this.nextAnimsQueue.shift(),this.play(t)),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,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))for(var n=0;this.forward?i.nextFrame(this):i.previousFrame(this),n++,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(o.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))||(i=new a(this,e,t),this.anims||(this.anims=new r),this.anims.set(e,i)),i},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(o.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}}});t.exports=i},function(t,e,i){var a={},n=(t.exports=a,i(166));a._motionWakeThreshold=.18,a._motionSleepThreshold=.08,a._minBias=.9,a.update=function(t,e){for(var i=e*e*e,n=0;n<t.length;n++){var r,s=t[n],o=s.speed*s.speed+s.angularSpeed*s.angularSpeed;0===s.force.x&&0===s.force.y?(r=Math.min(s.motion,o),o=Math.max(s.motion,o),s.motion=a._minBias*r+(1-a._minBias)*o,0<s.sleepThreshold&&s.motion<a._motionSleepThreshold*i?(s.sleepCounter+=1,s.sleepCounter>=s.sleepThreshold&&a.set(s,!0)):0<s.sleepCounter&&--s.sleepCounter):a.set(s,!1)}},a.afterCollisions=function(t,e){for(var i=e*e*e,n=0;n<t.length;n++){var r,s,o=t[n];o.isActive&&(r=(o=o.collision).bodyA.parent,o=o.bodyB.parent,r.isSleeping&&o.isSleeping||r.isStatic||o.isStatic||(r.isSleeping||o.isSleeping)&&(o=(s=r.isSleeping&&!r.isStatic?r:o)===r?o:r,!s.isStatic&&o.motion>a._motionWakeThreshold*i&&a.set(s,!1)))}},a.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||n.trigger(t,"sleepStart")):(t.isSleeping=!1,t.sleepCounter=0,i&&n.trigger(t,"sleepEnd"))}},function(t,e,i){var n={},c=(t.exports=n,i(32));n.on=function(t,e,i){for(var n,r=e.split(" "),s=0;s<r.length;s++)n=r[s],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){"function"==typeof e&&(i=e,e=c.keys(t.events).join(" "));for(var n=e.split(" "),r=0;r<n.length;r++){var s=t.events[n[r]],o=[];if(i&&s)for(var a=0;a<s.length;a++)s[a]!==i&&o.push(s[a]);t.events[n[r]]=o}}else t.events={}},n.trigger=function(t,e,i){var n,r,s,o=t.events;if(o&&0<c.keys(o).length){i=i||{};for(var a=e.split(" "),h=0;h<a.length;h++)if(r=o[n=a[h]]){(s=c.clone(i,!1)).name=n,s.source=t;for(var l=0;l<r.length;l++)r[l].apply(t,[s])}}}},function(t,e,i){var a=i(175),n=i(92),r=i(74);t.exports={defaultPipeline:null,pipeline:null,hasPostPipeline:!1,postPipelines:null,pipelineData:null,initPipeline:function(t){void 0===t&&(t=n.MULTI_PIPELINE);var e=this.scene.sys.renderer;if(e){e=e.pipelines;if(this.postPipelines=[],this.pipelineData={},e){e=e.get(t);if(e)return this.defaultPipeline=e,this.pipeline=e,!0}}return!1},setPipeline:function(t,e,i){var n=this.scene.sys.renderer;return!n||(n=n.pipelines)&&((n=n.get(t))&&(this.pipeline=n),e&&(this.pipelineData=i?a(e):e)),this},setPostPipeline:function(t,e,i){var n=this.scene.sys.renderer;if(n){var r=n.pipelines;if(r){Array.isArray(t)||(t=[t]);for(var s=0;s<t.length;s++){var o=r.getPostPipeline(t[s],this);o&&this.postPipelines.push(o)}e&&(this.pipelineData=i?a(e):e)}this.hasPostPipeline=0<this.postPipelines.length}return this},setPipelineData:function(t,e){var i=this.pipelineData;return void 0===e?delete i[t]:i[t]=e,this},getPostPipeline:function(t){for(var e=this.postPipelines,i=[],n=0;n<e.length;n++){var r=e[n];("string"==typeof t&&r.name===t||r instanceof t)&&i.push(r)}return 1===i.length?i[0]:i},resetPipeline:function(t,e){return void 0===t&&(t=!1),void 0===e&&(e=!1),this.pipeline=this.defaultPipeline,t&&(this.postPipelines=[],this.hasPostPipeline=!1),e&&(this.pipelineData={}),null!==this.pipeline},resetPostPipeline:function(t){void 0===t&&(t=!1);for(var e=this.postPipelines,i=0;i<e.length;i++)e[i].destroy();this.postPipelines=[],this.hasPostPipeline=!1,t&&(this.pipelineData={})},removePostPipeline:function(t){for(var e=this.postPipelines,i=e.length-1;0<=i;i--){var n=e[i];("string"==typeof t&&n.name===t||"string"!=typeof t&&n instanceof t)&&(n.destroy(),r(e,i))}return this.hasPostPipeline=0<this.postPipelines.length,this},getPipelineName:function(){return this.pipeline.name}}},function(t,e){t.exports={DEFAULT:0,LINEAR:0,NEAREST:1}},function(t,e,i){var n=i(4);t.exports=function(t,e,i){return(i=void 0===i?new n:i).x=t.x+t.radius*Math.cos(e),i.y=t.y+t.radius*Math.sin(e),i}},function(t,e,i){var s=i(4);t.exports=function(t,e){void 0===e&&(e=new s);var i=2*Math.PI*Math.random(),n=Math.random()+Math.random(),n=1<n?2-n:n,r=n*Math.cos(i),n=n*Math.sin(i);return e.x=t.x+r*t.radius,e.y=t.y+n*t.radius,e}},function(t,e,i){var r=i(130),s=i(4);t.exports=function(t,e,i){var n;return(void 0===i&&(i=new s),e<=0||1<=e)?(i.x=t.x,i.y=t.y):(n=r(t)*e,.5<e?(n-=t.width+t.height)<=t.width?(i.x=t.right-n,i.y=t.bottom):(i.x=t.x,i.y=t.bottom-(n-t.width)):n<=t.width?(i.x=t.x+n,i.y=t.y):(i.x=t.right,i.y=t.y+(n-t.width))),i}},function(t,e,i){var c=i(67),u=i(4);t.exports=function(t,e,i,n){void 0===n&&(n=[]),!e&&0<i&&(e=c(t)/i);for(var r=t.x1,s=t.y1,o=t.x2,a=t.y2,h=0;h<e;h++){var l=h/e;n.push(new u(r+(o-r)*l,s+(a-s)*l))}return n}},function(t,e,i){var n=i(4);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}},function(t,e,i){var n=i(4);t.exports=function(t,e){return(e=void 0===e?new n:e).x=t.x+Math.random()*t.width,e.y=t.y+Math.random()*t.height,e}},function(t,e){function r(t){var e,i,n;if("object"!=typeof t||null===t)return t;for(n in e=Array.isArray(t)?[]:{},t)i=t[n],e[n]=r(i);return e}t.exports=r},function(t,e){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}},function(t,e,i){var c=i(3);t.exports=function(t,e,i,n,r,s,o,a){void 0===a&&(a=new c);var h=Math.sin(r),r=Math.cos(r),l=r*s,s=h*s,h=-h*o,r=r*o,o=1/(l*r+h*-s);return a.x=r*o*t+-h*o*e+(n*h-i*r)*o,a.y=l*o*e+-s*o*t+(-n*l+i*s)*o,a}},function(t,e){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}},function(t,e){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}},function(t,e,i){var r=i(4);t.exports=function(t,e){void 0===e&&(e=new r);var i=Math.random()*Math.PI*2,n=Math.sqrt(Math.random());return e.x=t.x+n*Math.cos(i)*t.width/2,e.y=t.y+n*Math.sin(i)*t.height/2,e}},function(t,e,i){var h=i(4);t.exports=function(t,e){void 0===e&&(e=new h);var i=t.x2-t.x1,n=t.y2-t.y1,r=t.x3-t.x1,s=t.y3-t.y1,o=Math.random(),a=Math.random();return 1<=o+a&&(o=1-o,a=1-a),e.x=t.x1+(i*o+r*a),e.y=t.y1+(n*o+s*a),e}},function(t,e){t.exports=function(t,e,i,n,r){n+=Math.atan2(t.y-i,t.x-e);return t.x=e+r*Math.cos(n),t.y=i+r*Math.sin(n),t}},function(t,e){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)}},function(t,e){t.exports=function(t,e,i){return t<=e?0:i<=t?1:(t=(t-e)/(i-e))*t*(3-2*t)}},function(t,e,i){var n=i(18),r=i(0),s=i(132),o=i(318),m=i(319),y=i(6),v=i(320),i=new r({initialize:function(t,e,i){this.manager=t,this.key=e,this.type="frame",this.frames=this.getFrames(t.textureManager,y(i,"frames",[]),y(i,"defaultTextureKey",null),y(i,"sortFrames",!0)),this.frameRate=y(i,"frameRate",null),this.duration=y(i,"duration",null),this.msPerFrame,this.skipMissedFrames=y(i,"skipMissedFrames",!0),this.delay=y(i,"delay",0),this.repeat=y(i,"repeat",0),this.repeatDelay=y(i,"repeatDelay",0),this.yoyo=y(i,"yoyo",!1),this.showOnStart=y(i,"showOnStart",!1),this.hideOnComplete=y(i,"hideOnComplete",!1),this.paused=!1,this.calculateDuration(this,this.getTotalFrames(),this.duration,this.frameRate),this.manager.on&&(this.manager.on(s.PAUSE_ALL,this.pause,this),this.manager.on(s.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,e=this.getFrames(this.manager.textureManager,e);return 0<e.length&&(0===t?this.frames=e.concat(this.frames):t===this.frames.length?this.frames=this.frames.concat(e):(i=this.frames.slice(0,t),t=this.frames.slice(t),this.frames=i.concat(e,t)),this.updateFrameSequence()),this},checkFrame:function(t){return 0<=t&&t<this.frames.length},getFirstTick:function(t){t.accumulator=0,t.nextTick=t.msPerFrame+t.currentFrame.duration},getFrameAt:function(t){return this.frames[t]},getFrames:function(t,e,i,n){void 0===n&&(n=!0);var r,s,o,a=[],h=1;if("string"==typeof e&&(s=e,o=t.get(s).getFrameNames(),n&&v(o),e=[],o.forEach(function(t){e.push({key:s,frame:t})})),Array.isArray(e)&&0!==e.length){for(g=0;g<e.length;g++){var l,c,u,d=e[g],p=y(d,"key",i);p&&(l=y(d,"frame",0),c=t.getFrame(p,l),(u=new m(p,l,h,c)).duration=y(d,"duration",0),u.isFirst=!r,r&&((r.nextFrame=u).prevFrame=r),a.push(u),r=u,h++)}if(0<a.length){u.isLast=!0,u.nextFrame=a[0],a[0].prevFrame=u;for(var f=1/(a.length-1),g=0;g<a.length;g++)a[g].progress=g*f}}return a},getNextTick:function(t){t.accumulator-=t.nextTick,t.nextTick=t.msPerFrame+t.currentFrame.duration},getFrameByProgress:function(t){return t=n(t,0,1),o(t,this.frames,"progress")},nextFrame:function(t){var e=t.currentFrame;e.isLast?t.yoyo?this.handleYoyoFrame(t,!1):0<t.repeatCounter?t.inReverse&&t.forward?t.forward=!1:this.repeatAnimation(t):t.complete():this.updateAndGetNextTick(t,e.nextFrame)},handleYoyoFrame:function(t,e){t.inReverse===!(e=e||!1)&&0<t.repeatCounter?(0!==t.repeatDelay&&!t.pendingRepeat||(t.forward=e),this.repeatAnimation(t)):t.inReverse===e||0!==t.repeatCounter?(e=(t.forward=e)?t.currentFrame.nextFrame:t.currentFrame.prevFrame,this.updateAndGetNextTick(t,e)):t.complete()},getLastFrame:function(){return this.frames[this.frames.length-1]},previousFrame:function(t){var e=t.currentFrame;e.isFirst?t.yoyo?this.handleYoyoFrame(t,!0):0<t.repeatCounter?(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){t=this.frames.indexOf(t);return-1!==t&&this.removeFrameAt(t),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();t._pendingStopValue--}0<t.repeatDelay&&!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()))},toJSON:function(){var e={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,showOnStart:this.showOnStart,hideOnComplete:this.hideOnComplete};return this.frames.forEach(function(t){e.frames.push(t.toJSON())}),e},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).prevFrame=t):(t.isLast=!1,t.prevFrame=this.frames[e-1],t.nextFrame=this.frames[n+1])):n===e-1&&1<e?(t.isLast=!0,t.prevFrame=this.frames[e-2],t.nextFrame=this.frames[0]):1<e&&(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(s.PAUSE_ALL,this.pause,this),this.manager.off(s.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}});t.exports=i},function(t,e){t.exports=function(t,e,i,n){var r;if(void 0===i&&(i=" "),void 0===n&&(n=3),(e=void 0===e?0:e)+1>=(t=t.toString()).length)switch(n){case 1:t=new Array(e+1-t.length).join(i)+t;break;case 3:var s=Math.ceil((r=e-t.length)/2);t=new Array(r-s+1).join(i)+t+new Array(s+1).join(i);break;default:t+=new Array(e+1-t.length).join(i)}return t}},function(t,e,i){var n=i(327),r=i(189),s=i(331),o=i(332);t.exports=function(t){switch(typeof t){case"string":return("rgb"===t.substr(0,3).toLowerCase()?o:n)(t);case"number":return r(t);case"object":return s(t)}}},function(t,e,i){var o=i(103);function a(t,e,i,n){t=(t+6*e)%6,e=Math.min(t,4-t,1);return Math.round(255*(n-n*i*Math.max(0,e)))}t.exports=function(t,e,i,n){var r=a(5,t,e=void 0===e?1:e,i=void 0===i?1:i),s=a(3,t,e,i),t=a(1,t,e,i);return n?n.setTo?n.setTo(r,s,t,n.alpha,!1):(n.r=r,n.g=s,n.b=t,n.color=o(r,s,t),n):{r:r,g:s,b:t,color:o(r,s,t)}}},function(t,e,i){var n=i(38),r=i(330);t.exports=function(t){t=r(t);return new n(t.r,t.g,t.b,t.a)}},function(t,e){t.exports=function(t,e,i){return t.x=e-t.width/2,t.y=i-t.height/2,t}},function(t,e,i){var n=i(105),s=i(136),o=i(31),a={canvas:!1,canvasBitBltShift:null,file:!1,fileSystem:!1,getUserMedia:!0,littleEndian:!1,localStorage:!1,pointerLock:!1,support32bit:!1,vibration:!1,webGL:!1,worker:!1};t.exports=function(){if("function"!=typeof importScripts){a.canvas=!!window.CanvasRenderingContext2D;try{a.localStorage=!!localStorage.getItem}catch(t){a.localStorage=!1}a.file=!!(window.File&&window.FileReader&&window.FileList&&window.Blob),a.fileSystem=!!window.requestFileSystem;var t,e,i,r=!1;a.webGL=function(){if(window.WebGLRenderingContext)try{var t=o.createWebGL(this),e=t.getContext("webgl")||t.getContext("experimental-webgl"),i=o.create2D(this),n=i.getContext("2d").createImageData(1,1);return r=n.data instanceof Uint8ClampedArray,o.remove(t),o.remove(i),!!e}catch(t){}return!1}(),a.worker=!!window.Worker,a.pointerLock="pointerLockElement"in document||"mozPointerLockElement"in document||"webkitPointerLockElement"in document,navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia||navigator.oGetUserMedia,window.URL=window.URL||window.webkitURL||window.mozURL||window.msURL,a.getUserMedia=a.getUserMedia&&!!navigator.getUserMedia&&!!window.URL,s.firefox&&s.firefoxVersion<21&&(a.getUserMedia=!1),!n.iOS&&(s.ie||s.firefox||s.chrome)&&(a.canvasBitBltShift=!0),(s.safari||s.mobileSafari)&&(a.canvasBitBltShift=!1),navigator.vibrate=navigator.vibrate||navigator.webkitVibrate||navigator.mozVibrate||navigator.msVibrate,navigator.vibrate&&(a.vibration=!0),"undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint32Array&&(a.littleEndian=(t=new ArrayBuffer(4),e=new Uint8Array(t),i=new Uint32Array(t),e[0]=161,e[1]=178,e[2]=195,e[3]=212,3569595041===i[0]||2712847316!==i[0]&&null)),a.support32bit="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof Int32Array&&null!==a.littleEndian&&r}return a}()},function(t,e){var i="";function n(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}t.exports={disable:function(t){return(i=""===i?n(t):i)&&(t[i]=!1),t},enable:function(t){return(i=""===i?n(t):i)&&(t[i]=!0),t},getPrefix:n,isEnabled:function(t){return null!==i?t[i]:null}}},function(t,e,i){var n=i(14),i=i(17)(!1,{Angle:i(812),Distance:i(821),Easing:i(826),Fuzzy:i(827),Interpolation:i(830),Pow2:i(835),Snap:i(837),RandomDataGenerator:i(839),Average:i(840),Bernstein:i(356),Between:i(195),CatmullRom:i(194),CeilTo:i(841),Clamp:i(18),DegToRad:i(36),Difference:i(842),Euler:i(843),Factorial:i(357),FloatBetween:i(137),FloorTo:i(844),FromPercent:i(98),GetSpeed:i(845),IsEven:i(846),IsEvenStrict:i(847),Linear:i(135),MaxAdd:i(848),Median:i(849),MinSub:i(850),Percent:i(851),RadToDeg:i(196),RandomXY:i(852),RandomXYZ:i(853),RandomXYZW:i(854),Rotate:i(362),RotateAround:i(308),RotateAroundDistance:i(182),RotateTo:i(855),RoundAwayFromZero:i(363),RoundTo:i(856),SinCosTableGenerator:i(857),SmootherStep:i(183),SmoothStep:i(184),ToXY:i(858),TransformXY:i(177),Within:i(859),Wrap:i(68),Vector2:i(3),Vector3:i(39),Vector4:i(140),Matrix3:i(364),Matrix4:i(69),Quaternion:i(365),RotateVec3:i(860)},n);t.exports=i},function(t,e){t.exports=function(t,e,i,n,r){var e=.5*(n-e),r=.5*(r-i),s=t*t;return t*s*(2*i-2*n+e+r)+(-3*i+3*n-2*e-r)*s+e*t+i}},function(t,e){t.exports=function(t,e){return Math.floor(Math.random()*(e-t+1)+t)}},function(t,e,i){var n=i(14);t.exports=function(t){return t*n.RAD_TO_DEG}},function(t,e,i){t.exports={Global:["game","anims","cache","plugins","registry","scale","sound","textures","renderer"],CoreScene:["EventEmitter","CameraManager","GameObjectCreator","GameObjectFactory","ScenePlugin","DisplayList","UpdateList"],DefaultScene:["Clock","DataManagerPlugin","InputPlugin","Loader","TweenManager","LightsPlugin"]}},function(t,e,i){i=new(i(0))({initialize:function(){this._matrix=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],this.alpha=1,this._dirty=!0,this._data},set:function(t){return this._matrix=t,this._dirty=!0,this},reset:function(){var t=this._matrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=0,t[6]=1,t[7]=0,t[8]=0,t[9]=0,t[10]=0,t[11]=0,t[12]=1,t[13]=0,t[14]=0,t[15]=0,t[16]=0,t[17]=0,t[18]=1,t[19]=0,this._dirty=!0,this},getData:function(){var t;return this._dirty&&((t=new Float32Array(this._matrix))[4]/=255,t[9]/=255,t[14]/=255,t[19]/=255,this._data=t,this._dirty=!1),this._data},brightness:function(t,e){return this.multiply([t=void 0===t?0:t,0,0,0,0,0,t,0,0,0,0,0,t,0,0,0,0,0,1,0],e=void 0===e?!1:e)},saturate:function(t,e){var t=2*(t=void 0===t?0:t)/3+1,i=-.5*(t-1);return this.multiply([t,i,i,0,0,i,t,i,0,0,i,i,t,0,0,0,0,0,1,0],e=void 0===e?!1:e)},desaturate:function(t){return this.saturate(-1,t=void 0===t?!1:t)},hue:function(t,e){void 0===e&&(e=!1),t=(t=void 0===t?0:t)/180*Math.PI;var i=Math.cos(t),t=Math.sin(t);return this.multiply([.213+.787*i+-.213*t,.715+-.715*i+-.715*t,.072+-.072*i+.928*t,0,0,.213+-.213*i+.143*t,.715+i*(1-.715)+.14*t,.072+-.072*i+-.283*t,0,0,.213+-.213*i+-.787*t,.715+-.715*i+.715*t,.072+.928*i+.072*t,0,0,0,0,0,1,0],e)},grayscale:function(t,e){return this.saturate(-(t=void 0===t?1:t),e=void 0===e?!1:e)},blackWhite:function(t){return this.multiply([.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0],t=void 0===t?!1:t)},contrast:function(t,e){var t=(t=void 0===t?0:t)+1,i=-.5*(t-1);return this.multiply([t,0,0,0,i,0,t,0,0,i,0,0,t,0,i,0,0,0,1,0],e=void 0===e?!1:e)},negative:function(t){return this.multiply([-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0],t=void 0===t?!1:t)},desaturateLuminance:function(t){return this.multiply([.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,0,0,0,1,0],t=void 0===t?!1:t)},sepia:function(t){return this.multiply([.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0],t=void 0===t?!1:t)},night:function(t,e){return this.multiply([-2*(t=void 0===t?.1:t),-t,0,0,0,-t,0,t,0,0,0,t,2*t,0,0,0,0,0,1,0],e=void 0===e?!1:e)},lsd:function(t){return this.multiply([2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],t=void 0===t?!1:t)},brown:function(t){return this.multiply([.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0],t=void 0===t?!1:t)},vintagePinhole:function(t){return this.multiply([.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0],t=void 0===t?!1:t)},kodachrome:function(t){return this.multiply([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],t=void 0===t?!1:t)},technicolor:function(t){return this.multiply([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],t=void 0===t?!1:t)},polaroid:function(t){return this.multiply([1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],t=void 0===t?!1:t)},shiftToBGR:function(t){return this.multiply([0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0],t=void 0===t?!1:t)},multiply:function(t,e){e||this.reset();for(var i=this._matrix,n=[],r=0;r<20;r++)n[r]=i[r];return i[0]=n[0]*t[0]+n[1]*t[5]+n[2]*t[10]+n[3]*t[15],i[1]=n[0]*t[1]+n[1]*t[6]+n[2]*t[11]+n[3]*t[16],i[2]=n[0]*t[2]+n[1]*t[7]+n[2]*t[12]+n[3]*t[17],i[3]=n[0]*t[3]+n[1]*t[8]+n[2]*t[13]+n[3]*t[18],i[4]=n[0]*t[4]+n[1]*t[9]+n[2]*t[14]+n[3]*t[19]+n[4],i[5]=n[5]*t[0]+n[6]*t[5]+n[7]*t[10]+n[8]*t[15],i[6]=n[5]*t[1]+n[6]*t[6]+n[7]*t[11]+n[8]*t[16],i[7]=n[5]*t[2]+n[6]*t[7]+n[7]*t[12]+n[8]*t[17],i[8]=n[5]*t[3]+n[6]*t[8]+n[7]*t[13]+n[8]*t[18],i[9]=n[5]*t[4]+n[6]*t[9]+n[7]*t[14]+n[8]*t[19]+n[9],i[10]=n[10]*t[0]+n[11]*t[5]+n[12]*t[10]+n[13]*t[15],i[11]=n[10]*t[1]+n[11]*t[6]+n[12]*t[11]+n[13]*t[16],i[12]=n[10]*t[2]+n[11]*t[7]+n[12]*t[12]+n[13]*t[17],i[13]=n[10]*t[3]+n[11]*t[8]+n[12]*t[13]+n[13]*t[18],i[14]=n[10]*t[4]+n[11]*t[9]+n[12]*t[14]+n[13]*t[19]+n[14],i[15]=n[15]*t[0]+n[16]*t[5]+n[17]*t[10]+n[18]*t[15],i[16]=n[15]*t[1]+n[16]*t[6]+n[17]*t[11]+n[18]*t[16],i[17]=n[15]*t[2]+n[16]*t[7]+n[17]*t[12]+n[18]*t[17],i[18]=n[15]*t[3]+n[16]*t[8]+n[17]*t[13]+n[18]*t[18],i[19]=n[15]*t[4]+n[16]*t[9]+n[17]*t[14]+n[18]*t[19]+n[19],this._dirty=!0,this}});t.exports=i},function(t,e,i){var l=i(10),c=i(14);t.exports=function(t,e){if(void 0===e&&(e=new l),0!==t.length){for(var i,n,r=Number.MAX_VALUE,s=Number.MAX_VALUE,o=c.MIN_SAFE_INTEGER,a=c.MIN_SAFE_INTEGER,h=0;h<t.length;h++)n=t[h],n=Array.isArray(n)?(i=n[0],n[1]):(i=n.x,n.y),r=Math.min(r,i),s=Math.min(s,n),o=Math.max(o,i),a=Math.max(a,n);e.x=r,e.y=s,e.width=o-r,e.height=a-s}return e}},function(t,e,i){var n=i(0),r=i(1),i=new n({initialize:function(t,e,i){this._rgb=[0,0,0],this.onChangeCallback=r,this.dirty=!1,this.set(t,e,i)},set:function(t,e,i){return this._rgb=[t=void 0===t?0:t,e=void 0===e?0:e,i=void 0===i?0:i],this.onChange(),this},equals:function(t,e,i){var n=this._rgb;return n.r===t&&n.g===e&&n.b===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}});t.exports=i},function(t,e,i){i={CENTER:i(403),ORIENTATION:i(404),SCALE_MODE:i(405),ZOOM:i(406)};t.exports=i},function(t,e){t.exports=function(t){t.parentNode&&t.parentNode.removeChild(t)}},function(t,e){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}},function(t,e,i){var n=i(0),r=i(144),s=i(197),o=i(20),a=i(419),h=i(420),l=i(33),c=i(1),u=i(421),i=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=c},init:function(t){this.settings.status=r.INIT,this.sceneUpdate=c,this.game=t,this.renderer=t.renderer,this.canvas=t.canvas,this.context=t.context;t=t.plugins;(this.plugins=t).addToScene(this,s.Global,[s.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.events,i=this.settings;return this.settings.active&&(i.status=r.PAUSED,i.active=!1,e.emit(o.PAUSE,this,t)),this},resume:function(t){var e=this.events,i=this.settings;return this.settings.active||(i.status=r.RUNNING,i.active=!0,e.emit(o.RESUME,this,t)),this},sleep:function(t){var e=this.events,i=this.settings;return i.status=r.SLEEPING,i.active=!1,i.visible=!1,e.emit(o.SLEEP,this,t),this},wake:function(t){var e=this.events,i=this.settings;return i.status=r.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},isSleeping:function(){return this.settings.status===r.SLEEPING},isActive:function(){return this.settings.status===r.RUNNING},isPaused:function(){return this.settings.status===r.PAUSED},isTransitioning:function(){return this.settings.isTransition||null!==this.scenePlugin._target},isTransitionOut:function(){return null!==this.scenePlugin._target&&0<this.scenePlugin._duration},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=r.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=r.SHUTDOWN,i.active=!1,i.visible=!1,this.renderer===l.WEBGL&&this.renderer.resetTextures(!0),e.emit(o.SHUTDOWN,this,t)},destroy:function(){var t=this.events,e=this.settings;e.status=r.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","camera","displayList","events","make","scenePlugin","updateList"],n=0;n<i.length;n++)this[i[n]]=null}});t.exports=i},function(t,e){t.exports=function(t){return t&&t[0].toUpperCase()+t.slice(1)}},function(t,e,i){var n=i(33),r=i(0),o=i(109),a=i(424),i=new r({initialize:function(t,e,i,n,r){Array.isArray(i)||(i=[i]),this.manager=t,this.key=e,this.source=[],this.dataSource=[],this.frames={},this.customData={},this.firstFrame="__BASE";for(var s=this.frameTotal=0;s<i.length;s++)this.source.push(new a(this,i[s],n,r))},add:function(t,e,i,n,r,s){return this.has(t)?null:(e=new o(this,t,e,i,n,r,s),this.frames[t]=e,"__BASE"===this.firstFrame&&(this.firstFrame=t),this.frameTotal++,e)},remove:function(t){return!!this.has(t)&&(this.get(t).destroy(),delete this.frames[t],!0)},has:function(t){return this.frames[t]},get:function(t){return t=t||this.firstFrame,this.frames[t]||this.frames[this.firstFrame]},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,n,r=[];for(n in this.frames)"__BASE"===n&&!e||(i=this.frames[n]).sourceIndex===t&&r.push(i);return r},getFrameNames:function(t){void 0===t&&(t=!1);var e=Object.keys(this.frames);return t||-1!==(t=e.indexOf("__BASE"))&&e.splice(t,1),e},getSourceImage:function(t){null!=t&&1!==this.frameTotal||(t="__BASE");t=this.frames[t];return(t||this.frames.__BASE).source.image},getDataSourceImage:function(t){null!=t&&1!==this.frameTotal||(t="__BASE");t=this.frames[t],t=(t||this.frames.__BASE).sourceIndex;return this.dataSource[t].image},setDataSource:function(t){Array.isArray(t)||(t=[t]);for(var e=0;e<t.length;e++){var i=this.source[e];this.dataSource.push(new a(this,t[e],i.width,i.height))}},setFilter:function(t){for(var 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)},destroy:function(){for(var t,e=0;e<this.source.length;e++)this.source[e].destroy();for(e=0;e<this.dataSource.length;e++)this.dataSource[e].destroy();for(t in this.frames)this.frames[t].destroy();this.source=[],this.dataSource=[],this.frames={},this.manager.removeKey(this.key);var i=this.manager.game.renderer;i&&i.type===n.WEBGL&&i.resetTextures(!0),this.manager=null}});t.exports=i},function(t,e,i){var h=i(78);t.exports=function(t,e,i,n,r){void 0===r&&(r=t.length);var s=[];if(h(t,n=void 0===n?0:n,r))for(var o=n;o<r;o++){var a=t[o];(!e||void 0===i&&a.hasOwnProperty(e)||e&&void 0!==i&&a[e]===i)&&s.push(a)}return s}},function(t,e,i){t.exports={Matrix:i(1013),Add:i(1021),AddAt:i(1022),BringToTop:i(1023),CountAllMatching:i(1024),Each:i(1025),EachInRange:i(1026),FindClosestInSorted:i(318),GetAll:i(207),GetFirst:i(428),GetRandom:i(210),MoveDown:i(1027),MoveTo:i(1028),MoveUp:i(1029),MoveAbove:i(1030),MoveBelow:i(1031),NumberArray:i(322),NumberArrayStep:i(1032),QuickSelect:i(436),Range:i(437),Remove:i(93),RemoveAt:i(1033),RemoveBetween:i(1034),RemoveRandomElement:i(1035),Replace:i(1036),RotateLeft:i(178),RotateRight:i(179),SafeRange:i(78),SendToBack:i(1037),SetAll:i(1038),Shuffle:i(131),SortByDigits:i(320),SpliceOne:i(74),StableSort:i(79),Swap:i(1039)}},function(t,e){t.exports=function(t){if(!Array.isArray(t)||t.length<2||!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}},function(t,e){t.exports=function(t,e,i){void 0===i&&(i=t.length);e=(e=void 0===e?0:e)+Math.floor(Math.random()*i);return void 0===t[e]?null:t[e]}},function(t,e,i){var n=i(0),r=i(9),s=i(438),i=new n({Extends:r,initialize:function(){r.call(this),this._pending=[],this._active=[],this._destroy=[],this._toProcess=0,this.checkQueue=!1},add:function(t){return this._pending.push(t),this._toProcess++,t},remove:function(t){return this._destroy.push(t),this._toProcess++,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;for(var t=this._destroy,e=this._active,i=0;i<t.length;i++){var n=t[i],r=e.indexOf(n);-1!==r&&(e.splice(r,1),this.emit(s.PROCESS_QUEUE_REMOVE,n))}for(t.length=0,t=this._pending,i=0;i<t.length;i++)n=t[i],(!this.checkQueue||this.checkQueue&&-1===e.indexOf(n))&&(e.push(n),this.emit(s.PROCESS_QUEUE_ADD,n));return t.length=0,this._toProcess=0,e},getActive:function(){return this._active},length:{get:function(){return this._active.length}},destroy:function(){this._toProcess=0,this._pending=[],this._active=[],this._destroy=[]}});t.exports=i},function(t,e){function L(t,e){return parseInt(t.getAttribute(e),10)}t.exports=function(t,e,i,n,r){void 0===i&&(i=0),void 0===n&&(n=0);var s=e.cutX,o=e.cutY,a=e.source.width,h=e.source.height,l=e.sourceIndex,c={},u=t.getElementsByTagName("info")[0],d=t.getElementsByTagName("common")[0];c.font=u.getAttribute("face"),c.size=L(u,"size"),c.lineHeight=L(d,"lineHeight")+n,c.chars={};var p,f,g=t.getElementsByTagName("char"),m=void 0!==e&&e.trimmed;m&&(p=e.height,f=e.width);for(var y=0;y<g.length;y++){var v=g[y],x=L(v,"id"),b=String.fromCharCode(x),w=L(v,"x"),T=L(v,"y"),S=L(v,"width"),P=L(v,"height");m&&(w<f&&(f=w),T<p&&(p=T)),m&&0!==p&&0!==f&&(w-=e.x,T-=e.y);var _=(s+w)/a,E=(o+T)/h,A=(s+w+S)/a,M=(o+T+P)/h;c.chars[x]={x:w,y:T,width:S,height:P,centerX:Math.floor(S/2),centerY:Math.floor(P/2),xOffset:L(v,"xoffset"),yOffset:L(v,"yoffset"),xAdvance:L(v,"xadvance")+i,data:{},kerning:{},u0:_,v0:E,u1:A,v1:M},r&&0!==S&&0!==P&&(x=r.add(b,l,w,T,S,P))&&x.setUVs(S,P,_,E,A,M)}for(var k=t.getElementsByTagName("kerning"),y=0;y<k.length;y++){var C=k[y],O=L(C,"first"),R=L(C,"second"),C=L(C,"amount");c.chars[R].kerning[O]=C}return c}},function(t,e,i){var n=i(1049),s=i(440),r=i(0),o=i(11),a=i(109),h=i(15),l=i(110),i=new r({Extends:h,Mixins:[o.Alpha,o.BlendMode,o.Depth,o.Mask,o.Pipeline,o.ScrollFactor,o.Size,o.Texture,o.Transform,o.Visible,n],initialize:function(t,e,i,n,r){h.call(this,t,"Blitter"),this.setTexture(n,r),this.setPosition(e,i),this.initPipeline(),this.children=new l,this.renderList=[],this.dirty=!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 a||(i=this.texture.get(i));t=new s(this,t,e,i,n);return this.children.addAt(t,r,!1),this.dirty=!0,t},createFromCallback:function(t,e,i,n){for(var r=this.createMultiple(e,i,n),s=0;s<r.length;s++){var o=r[s];t.call(this,o,s)}return r},createMultiple:function(i,t,n){void 0===t&&(t=this.frame.name),void 0===n&&(n=!0),Array.isArray(t)||(t=[t]);var r=[],s=this;return t.forEach(function(t){for(var e=0;e<i;e++)r.push(s.create(0,0,t,n))}),r},childCanRender:function(t){return t.visible&&0<t.alpha},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=[]}});t.exports=i},function(t,e,i){var s=i(208),r=i(35),n=i(0),o=i(11),a=i(75),h=i(15),l=i(10),c=i(1052),u=i(441),d=i(3),i=new n({Extends:h,Mixins:[o.AlphaSingle,o.BlendMode,o.ComputedSize,o.Depth,o.Mask,o.Pipeline,o.Transform,o.Visible,c],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.tempTransformMatrix=new o.TransformMatrix,this._sortKey="",this._sysEvents=t.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.initPipeline(),this.setPosition(e,i),this.clearAlpha(),this.setBlendMode(r.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 this.exclusive=t=void 0===t?!0:t,this},getBounds:function(t){var e;if((t=void 0===t?new l:t).setTo(this.x,this.y,0,0),this.parentContainer&&(e=this.parentContainer.getBoundsTransformMatrix().transformPoint(this.x,this.y),t.setTo(e.x,e.y,0,0)),0<this.list.length){var i=this.list,n=new l,r=!1;t.setEmpty();for(var s=0;s<i.length;s++){var o=i[s];o.getBounds&&(o.getBounds(n),r?u(n,t,t):(t.setTo(n.x,n.y,n.width,n.height),r=!0))}}return t},addHandler:function(t){t.once(a.DESTROY,this.remove,this),this.exclusive&&(t.parentContainer&&t.parentContainer.remove(t),t.removeFromDisplayList(),t.parentContainer=this)},removeHandler:function(t){t.off(a.DESTROY,this.remove),this.exclusive&&(t.parentContainer=null,t.addToDisplayList())},pointToContainer:function(t,e){void 0===e&&(e=new d),this.parentContainer?this.parentContainer.pointToContainer(t,e):e=new d(t.x,t.y);var i=this.tempTransformMatrix;return i.applyITRS(this.x,this.y,this.rotation,this.scaleX,this.scaleY),i.invert(),i.transformPoint(t.x,t.y,e),e},getBoundsTransformMatrix:function(){return this.getWorldTransformMatrix(this.tempTransformMatrix,this.localTransform)},add:function(t){return s.Add(this.list,t,this.maxSize,this.addHandler,this),this},addAt:function(t,e){return s.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(i,t){return i&&s.StableSort(this.list,t=void 0===t?function(t,e){return t[i]-e[i]}:t),this},getByName:function(t){return s.GetFirst(this.list,"name",t)},getRandom:function(t,e){return s.GetRandom(this.list,t,e)},getFirst:function(t,e,i,n){return s.GetFirst(this.list,t,e,i,n)},getAll:function(t,e,i,n){return s.GetAll(this.list,t,e,i,n)},count:function(t,e,i,n){return s.CountAllMatching(this.list,t,e,i,n)},swap:function(t,e){return s.Swap(this.list,t,e),this},moveTo:function(t,e){return s.MoveTo(this.list,t,e),this},moveAbove:function(t,e){return s.MoveAbove(this.list,t,e),this},moveBelow:function(t,e){return s.MoveBelow(this.list,t,e),this},remove:function(t,e){var i=s.Remove(this.list,t,this.removeHandler,this);if(e&&i){Array.isArray(i)||(i=[i]);for(var n=0;n<i.length;n++)i[n].destroy()}return this},removeAt:function(t,e){t=s.RemoveAt(this.list,t,this.removeHandler,this);return e&&t&&t.destroy(),this},removeBetween:function(t,e,i){var n=s.RemoveBetween(this.list,t,e,this.removeHandler,this);if(i)for(var r=0;r<n.length;r++)n[r].destroy();return this},removeAll:function(t){var e=s.RemoveBetween(this.list,0,this.list.length,this.removeHandler,this);if(t)for(var i=0;i<e.length;i++)e[i].destroy();return this},bringToTop:function(t){return s.BringToTop(this.list,t),this},sendToBack:function(t){return s.SendToBack(this.list,t),this},moveUp:function(t){return s.MoveUp(this.list,t),this},moveDown:function(t){return s.MoveDown(this.list,t),this},reverse:function(){return this.list.reverse(),this},shuffle:function(){return s.Shuffle(this.list),this},replace:function(t,e,i){return s.Replace(this.list,t,e)&&(this.addHandler(e),this.removeHandler(t),i&&t.destroy()),this},exists:function(t){return-1<this.list.indexOf(t)},setAll:function(t,e,i,n){return s.SetAll(this.list,t,e,i,n),this},each:function(t,e){for(var i=[null],n=this.list.slice(),r=n.length,s=2;s<arguments.length;s++)i.push(arguments[s]);for(s=0;s<r;s++)i[0]=n[s],t.apply(e,i);return this},iterate: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);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&&(s.SetAll(this.list,"scrollFactorX",t),s.SetAll(this.list,"scrollFactorY",e)),this},length:{get:function(){return this.list.length}},first:{get:function(){return(this.position=0)<this.list.length?this.list[0]:null}},last:{get:function(){return 0<this.list.length?(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 0<this.position?(this.position--,this.list[this.position]):null}},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[]}});t.exports=i},function(t,e,i){var a=i(148),n=i(0),i=i(1057),n=new n({Extends:a,Mixins:[i],initialize:function(t,e,i,n,r,s,o){a.call(this,t,e,i,n,r,s,o),this.type="DynamicBitmapText",this.scrollX=0,this.scrollY=0,this.cropWidth=0,this.cropHeight=0,this.displayCallback,this.callbackData={parent:this,color:0,tint:{topLeft:0,topRight:0,bottomLeft:0,bottomRight:0},index:0,charCode:0,x:0,y:0,scale:0,rotation:0,data:0}},setSize:function(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}});t.exports=n},function(t,e,i){var n=i(133),r=i(0),h=i(217),s=i(303),o=i(304),a=i(305),l=i(309),c=i(167),u=i(312),d=i(313),p=i(314),f=i(111),g=i(15),m=i(2),y=i(6),v=i(14),i=i(1063),x=new r({Extends:g,Mixins:[s,o,a,l,c,d,p,u,i],initialize:function(t,e){var i=y(e,"x",0),n=y(e,"y",0);g.call(this,t,"Graphics"),this.setPosition(i,n),this.initPipeline(),this.displayOriginX=0,this.displayOriginY=0,this.commandBuffer=[],this.defaultFillColor=-1,this.defaultFillAlpha=1,this.defaultStrokeWidth=1,this.defaultStrokeColor=-1,this.defaultStrokeAlpha=1,this._lineWidth=1,this.setDefaultStyles(e)},setDefaultStyles:function(t){return y(t,"lineStyle",null)&&(this.defaultStrokeWidth=y(t,"lineStyle.width",1),this.defaultStrokeColor=y(t,"lineStyle.color",16777215),this.defaultStrokeAlpha=y(t,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),y(t,"fillStyle",null)&&(this.defaultFillColor=y(t,"fillStyle.color",16777215),this.defaultFillAlpha=y(t,"fillStyle.alpha",1),this.fillStyle(this.defaultFillColor,this.defaultFillAlpha)),this},lineStyle:function(t,e,i){return this.commandBuffer.push(h.LINE_STYLE,t,e,i=void 0===i?1:i),this._lineWidth=t,this},fillStyle:function(t,e){return this.commandBuffer.push(h.FILL_STYLE,t,e=void 0===e?1:e),this},fillGradientStyle:function(t,e,i,n,r,s,o,a){return void 0===r&&(r=1),void 0===s&&(s=r),void 0===o&&(o=r),void 0===a&&(a=r),this.commandBuffer.push(h.GRADIENT_FILL_STYLE,r,s,o,a,t,e,i,n),this},lineGradientStyle:function(t,e,i,n,r,s){return this.commandBuffer.push(h.GRADIENT_LINE_STYLE,t,s=void 0===s?1:s,e,i,n,r),this},beginPath:function(){return this.commandBuffer.push(h.BEGIN_PATH),this},closePath:function(){return this.commandBuffer.push(h.CLOSE_PATH),this},fillPath:function(){return this.commandBuffer.push(h.FILL_PATH),this},fill:function(){return this.commandBuffer.push(h.FILL_PATH),this},strokePath:function(){return this.commandBuffer.push(h.STROKE_PATH),this},stroke:function(){return this.commandBuffer.push(h.STROKE_PATH),this},fillCircleShape:function(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,v.PI2),this.fillPath(),this},strokeCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,v.PI2),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(h.FILL_RECT,t,e,i,n),this},strokeRect:function(t,e,i,n){var r=this._lineWidth/2,s=t-r,r=t+r;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(s,e),this.lineTo(r+i,e),this.strokePath(),this.beginPath(),this.moveTo(s,e+n),this.lineTo(r+i,e+n),this.strokePath(),this},fillRoundedRect:function(t,e,i,n,r){var s=r=void 0===r?20:r,o=r,a=r,h=r;return"number"!=typeof r&&(s=m(r,"tl",20),o=m(r,"tr",20),a=m(r,"bl",20),h=m(r,"br",20)),this.beginPath(),this.moveTo(t+s,e),this.lineTo(t+i-o,e),this.arc(t+i-o,e+o,o,-v.TAU,0),this.lineTo(t+i,e+n-h),this.arc(t+i-h,e+n-h,h,0,v.TAU),this.lineTo(t+a,e+n),this.arc(t+a,e+n-a,a,v.TAU,Math.PI),this.lineTo(t,e+s),this.arc(t+s,e+s,s,-Math.PI,-v.TAU),this.fillPath(),this},strokeRoundedRect:function(t,e,i,n,r){var s=r=void 0===r?20:r,o=r,a=r,h=r;return"number"!=typeof r&&(s=m(r,"tl",20),o=m(r,"tr",20),a=m(r,"bl",20),h=m(r,"br",20)),this.beginPath(),this.moveTo(t+s,e),this.lineTo(t+i-o,e),this.moveTo(t+i-o,e),this.arc(t+i-o,e+o,o,-v.TAU,0),this.lineTo(t+i,e+n-h),this.moveTo(t+i,e+n-h),this.arc(t+i-h,e+n-h,h,0,v.TAU),this.lineTo(t+a,e+n),this.moveTo(t+a,e+n),this.arc(t+a,e+n-a,a,v.TAU,Math.PI),this.lineTo(t,e+s),this.moveTo(t,e+s),this.arc(t+s,e+s,s,-Math.PI,-v.TAU),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(h.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,r,s){return this.commandBuffer.push(h.FILL_TRIANGLE,t,e,i,n,r,s),this},strokeTriangle:function(t,e,i,n,r,s){return this.commandBuffer.push(h.STROKE_TRIANGLE,t,e,i,n,r,s),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(h.LINE_TO,t,e),this},moveTo:function(t,e){return this.commandBuffer.push(h.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 r=1;r<n;r++)this.lineTo(t[r].x,t[r].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 r=1;r<n;r++)this.lineTo(t[r].x,t[r].y);return e&&this.lineTo(t[0].x,t[0].y),i&&this.closePath(),this.fillPath(),this},strokeEllipseShape:function(t,e){t=t.getPoints(e=void 0===e?32:e);return this.strokePoints(t,!0)},strokeEllipse:function(t,e,i,n,r){void 0===r&&(r=32);t=new f(t,e,i,n).getPoints(r);return this.strokePoints(t,!0)},fillEllipseShape:function(t,e){t=t.getPoints(e=void 0===e?32:e);return this.fillPoints(t,!0)},fillEllipse:function(t,e,i,n,r){void 0===r&&(r=32);t=new f(t,e,i,n).getPoints(r);return this.fillPoints(t,!0)},arc:function(t,e,i,n,r,s,o){return this.commandBuffer.push(h.ARC,t,e,i,n,r,s=void 0===s?!1:s,o=void 0===o?0:o),this},slice:function(t,e,i,n,r,s,o){return void 0===s&&(s=!1),void 0===o&&(o=0),this.commandBuffer.push(h.BEGIN_PATH),this.commandBuffer.push(h.MOVE_TO,t,e),this.commandBuffer.push(h.ARC,t,e,i,n,r,s,o),this.commandBuffer.push(h.CLOSE_PATH),this},save:function(){return this.commandBuffer.push(h.SAVE),this},restore:function(){return this.commandBuffer.push(h.RESTORE),this},translateCanvas:function(t,e){return this.commandBuffer.push(h.TRANSLATE,t,e),this},scaleCanvas:function(t,e){return this.commandBuffer.push(h.SCALE,t,e),this},rotateCanvas:function(t){return this.commandBuffer.push(h.ROTATE,t),this},clear:function(){return this.commandBuffer.length=0,-1<this.defaultFillColor&&this.fillStyle(this.defaultFillColor,this.defaultFillAlpha),-1<this.defaultStrokeColor&&this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha),this},generateTexture:function(t,e,i){var n,r,s,o=this.scene.sys,a=o.game.renderer;return void 0===e&&(e=o.scale.width),void 0===i&&(i=o.scale.height),x.TargetCamera.setScene(this.scene),x.TargetCamera.setViewport(0,0,e,i),x.TargetCamera.scrollX=this.x,x.TargetCamera.scrollY=this.y,"string"==typeof t?o.textures.exists(t)?(s=(n=o.textures.get(t)).getSourceImage())instanceof HTMLCanvasElement&&(r=s.getContext("2d")):r=(n=o.textures.createCanvas(t,e,i)).getSourceImage().getContext("2d"):t instanceof HTMLCanvasElement&&(r=t.getContext("2d")),r&&(this.renderCanvas(a,this,x.TargetCamera,null,r,!1),n&&n.refresh()),this},preDestroy:function(){this.commandBuffer=[]}});x.TargetCamera=new n,t.exports=x},function(t,e){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}},function(t,e,i){var s=i(4);t.exports=function(t,e,i){void 0===i&&(i=new s);var n=t.width/2,r=t.height/2;return i.x=t.x+n*Math.cos(e),i.y=t.y+r*Math.sin(e),i}},function(t,e,i){var n=i(35),r=i(0),s=i(11),o=i(176),a=i(101),h=i(9),l=i(75),c=i(110),u=i(1071),d=i(20),p=i(79),i=new r({Extends:c,Mixins:[s.AlphaSingle,s.BlendMode,s.Depth,s.Mask,s.Pipeline,s.Visible,h,u],initialize:function(t,e){c.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.initPipeline(),this.clearAlpha(),this.setBlendMode(n.SKIP_CHECK),e&&this.add(e),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&&(i.unshift(e.getIndex(t)),(t=e).parentContainer);)e=e.parentContainer;return i.unshift(this.displayList.getIndex(t)),i},addChildCallback:function(t){t.displayList&&t.displayList!==this&&t.removeFromDisplayList(),t.displayList||(this.queueDepthSort(),t.displayList=this,t.emit(l.ADDED_TO_SCENE,t,this.scene),this.events.emit(d.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(d.REMOVED_FROM_SCENE,t,this.scene)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(p(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(t,e){return t._depth-e._depth},getChildren:function(){return this.list},destroy:function(){if(this.scene&&!this.ignoreDestroy){this.emit(l.DESTROY,this);for(var t=this.list.length;t--;)this.list[t].destroy();this.removeAllListeners(),this.resetPostPipeline(!0),this.displayList&&(this.displayList.remove(this,!0),this.displayList.queueDepthSort()),this.data&&(this.data.destroy(),this.data=void 0),this.active=!1,this.visible=!1,this.list=void 0,this.scene=void 0,this.displayList=void 0,this.systems=void 0,this.events=void 0}}});t.exports=i},function(t,e,i){var n=i(0),r=i(11),s=i(15),o=i(450),a=i(110),h=i(452),i=i(1075),n=new n({Extends:s,Mixins:[r.Depth,r.Mask,r.Pipeline,r.Transform,r.Visible,i],initialize:function(t,e,i,n){if(s.call(this,t,"ParticleEmitterManager"),this.blendMode=-1,this.timeScale=1,this.texture=null,this.frame=null,this.frameNames=[],null===i||"object"!=typeof i&&!Array.isArray(i)||(n=i,i=null),this.setTexture(e,i),this.initPipeline(),this.emitters=new a(this),this.wells=new a(this),n){Array.isArray(n)||(n=[n]);for(var r=0;r<n.length;r++)this.createEmitter(n[r])}},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t){this.frame=this.texture.get(t);var t=this.texture.getFramesFromTextureSource(this.frame.sourceIndex),e=[];return t.forEach(function(t){e.push(t.name)}),this.frameNames=e,this.defaultFrame=this.frame,this},setEmitterFrames:function(t,e){Array.isArray(t)||(t=[t]);for(var i=e.frames,n=i.length=0;n<t.length;n++){var r=t[n];-1!==this.frameNames.indexOf(r)&&i.push(this.texture.get(r))}return 0<i.length?e.defaultFrame=i[0]:e.defaultFrame=this.defaultFrame,this},addEmitter:function(t){return this.emitters.add(t)},createEmitter:function(t){return this.addEmitter(new h(this,t))},removeEmitter:function(t){return this.emitters.remove(t,!0)},addGravityWell:function(t){return this.wells.add(t)},createGravityWell:function(t){return this.addGravityWell(new o(t))},emitParticle:function(t,e,i){for(var n=this.emitters.list,r=0;r<n.length;r++){var s=n[r];s.active&&s.emitParticle(t,e,i)}return this},emitParticleAt:function(t,e,i){return this.emitParticle(i,t,e)},pause:function(){return this.active=!1,this},resume:function(){return this.active=!0,this},getProcessors:function(){return this.wells.getAll("active",!0)},preUpdate:function(t,e){e*=this.timeScale;for(var i=this.emitters.list,n=0;n<i.length;n++){var r=i[n];r.active&&r.preUpdate(t,e)}},setAlpha:function(){},setScrollFactor:function(){},setBlendMode:function(){}});t.exports=n},function(t,e,i){var o=i(35),a=i(133),h=i(31),n=i(0),r=i(11),l=i(33),c=i(109),u=i(15),d=i(1),p=i(92),s=i(1079),f=i(141),g=i(12),m=i(222),i=new n({Extends:u,Mixins:[r.Alpha,r.BlendMode,r.ComputedSize,r.Crop,r.Depth,r.Flip,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Tint,r.Transform,r.Visible,s],initialize:function(t,e,i,n,r,s,o){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=32),void 0===r&&(r=32),u.call(this,t,"RenderTexture"),this.renderer=t.sys.renderer,this.textureManager=t.sys.textures,this.globalTint=16777215,this.globalAlpha=1,this.canvas=null,this.dirty=!1,this._crop=this.resetCropObject(),this.texture=null,this.frame=null,this._saved=!1,void 0===s?(this.canvas=h.create2D(this,n,r),this.texture=t.sys.textures.addCanvas(m(),this.canvas),this.frame=this.texture.get()):(this.texture=t.sys.textures.get(s),this.frame=this.texture.get(o),this.canvas=this.frame.source.image,this._saved=!0,this.dirty=!0,this.width=this.frame.cutWidth,this.height=this.frame.cutHeight),this.context=this.canvas.getContext("2d"),this._eraseMode=!1,this.camera=new a(0,0,n,r),this.renderTarget=null;o=this.renderer;o?o.type===l.WEBGL?(this.drawGameObject=this.batchGameObjectWebGL,this.renderTarget=new f(o,n,r,1,0,!1)):o.type===l.CANVAS&&(this.drawGameObject=this.batchGameObjectCanvas):this.drawGameObject=d,this.camera.setScene(t),this.setPosition(e,i),void 0===s&&this.setSize(n,r),this.setOrigin(0,0),this.initPipeline(p.SINGLE_PIPELINE)},setSize:function(t,e){return this.resize(t,e)},resize:function(t,e){void 0===e&&(e=t);var i=this.frame,n=(t!==this.width||e!==this.height?"__BASE"===i.name&&(this.canvas.width=t,this.canvas.height=e,this.texture.width=t,this.texture.height=e,(n=this.renderTarget)&&(n.resize(t,e),i.glTexture=n.texture,i.source.isRenderTexture=!0,i.source.isGLTexture=!0,i.source.glTexture=n.texture),this.camera.setSize(t,e),i.source.width=t,i.source.height=e,i.setSize(t,e),this.width=t,this.height=e):(n=this.texture.getSourceImage(),i.cutX+t>n.width&&(t=n.width-i.cutX),i.cutY+e>n.height&&(e=n.height-i.cutY),i.setSize(t,e,i.cutX,i.cutY)),this.updateDisplayOrigin(),this.input);return n&&!n.customHitArea&&(n.hitArea.width=t,n.hitArea.height=e),this},setGlobalTint:function(t){return this.globalTint=t,this},setGlobalAlpha:function(t){return this.globalAlpha=t,this},saveTexture:function(t){return this.textureManager.renameTexture(this.texture.key,t),this._saved=!0,this.texture},fill:function(t,e,i,n,r,s){var o=this.frame,a=this.camera,h=this.renderer;void 0===e&&(e=1),void 0===i&&(i=0),void 0===n&&(n=0),void 0===r&&(r=o.cutWidth),void 0===s&&(s=o.cutHeight);var l,c,u=(t>>16&255)/255,d=(t>>8&255)/255,t=(255&t)/255,p=this.renderTarget;return a.preRender(),p?(p.bind(!0),(a=this.pipeline).manager.set(a),l=p.width,c=p.height,l=h.width/l,c=h.height/c,a.drawFillRect(i*l,n*c,r*l,s*c,g.getTintFromFloats(t,d,u,1),e),p.unbind(!0)):(a=this.context,h.setContext(a),a.fillStyle="rgba("+u+","+d+","+t+","+e+")",a.fillRect(i+o.cutX,n+o.cutY,r,s),h.setContext()),this.dirty=!0,this},clear:function(){var t;return this.dirty&&((t=this.renderTarget)?t.clear():((t=this.context).save(),t.setTransform(1,0,0,1,0,0),t.clearRect(this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight),t.restore()),this.dirty=!1),this},erase:function(t,e,i){return this._eraseMode=!0,this.draw(t,e,i,1,16777215),this._eraseMode=!1,this},draw:function(t,e,i,n,r){return this.beginDraw(),this.batchDraw(t,e,i,n,r),this.endDraw(),this},drawFrame:function(t,e,i,n,r,s){return this.beginDraw(),this.batchDrawFrame(t,e,i,n,r,s),this.endDraw(),this},beginDraw:function(){var t=this.camera,e=this.renderer,i=this.renderTarget;return t.preRender(),i?e.beginCapture(i.width,i.height):e.setContext(this.context),this},batchDraw:function(t,e,i,n,r){return void 0===n&&(n=this.globalAlpha),r=void 0===r?(this.globalTint>>16)+(65280&this.globalTint)+((255&this.globalTint)<<16):(r>>16)+(65280&r)+((255&r)<<16),Array.isArray(t)||(t=[t]),this.batchList(t,e,i,n,r),this},batchDrawFrame:function(t,e,i,n,r,s){void 0===i&&(i=0),void 0===n&&(n=0),void 0===r&&(r=this.globalAlpha),s=void 0===s?(this.globalTint>>16)+(65280&this.globalTint)+((255&this.globalTint)<<16):(s>>16)+(65280&s)+((255&s)<<16);t=this.textureManager.getFrame(t,e);return t&&(this.renderTarget?this.pipeline.batchTextureFrame(t,i,n,s,r,this.camera.matrix,null):this.batchTextureFrame(t,i+this.frame.cutX,n+this.frame.cutY,r,s)),this},endDraw:function(t){void 0===t&&(t=this._eraseMode);var e,i=this.renderer,n=this.renderTarget;return n?(e=i.endCapture(),i.pipelines.setUtility().blitFrame(e,n,1,!1,!1,t),i.resetScissor(),i.resetViewport()):i.setContext(),this.dirty=!0,this},batchList:function(t,e,i,n,r){for(var s=0;s<t.length;s++){var o=t[s];o&&o!==this&&(o.renderWebGL||o.renderCanvas?this.drawGameObject(o,e,i):o.isParent||o.list?this.batchGroup(o.getChildren(),e,i):"string"==typeof o?this.batchTextureFrameKey(o,null,e,i,n,r):o instanceof c?this.batchTextureFrame(o,e,i,n,r):Array.isArray(o)&&this.batchList(o,e,i,n,r))}},batchGroup:function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=0),e+=this.frame.cutX,i+=this.frame.cutY;for(var n=0;n<t.length;n++){var r,s,o=t[n];o.willRender(this.camera)&&(r=o.x+e,s=o.y+i,this.drawGameObject(o,r,s))}},batchGameObjectWebGL:function(t,e,i){void 0===e&&(e=t.x),void 0===i&&(i=t.y);var n=t.x,r=t.y;t.setPosition(e+this.frame.cutX,i+this.frame.cutY),t.renderDirect?t.renderDirect(this.renderer,t,this.camera):t.renderWebGL(this.renderer,t,this.camera),t.setPosition(n,r)},batchGameObjectCanvas:function(t,e,i){void 0===e&&(e=t.x),void 0===i&&(i=t.y);var n,r=t.x,s=t.y;this._eraseMode&&(n=t.blendMode,t.blendMode=o.ERASE),t.setPosition(e+this.frame.cutX,i+this.frame.cutY),t.renderCanvas(this.renderer,t,this.camera,null),t.setPosition(r,s),this._eraseMode&&(t.blendMode=n)},batchTextureFrameKey:function(t,e,i,n,r,s){t=this.textureManager.getFrame(t,e);t&&this.batchTextureFrame(t,i,n,r,s)},batchTextureFrame:function(t,e,i,n,r){var s,o;void 0===e&&(e=0),void 0===i&&(i=0),e+=this.frame.cutX,i+=this.frame.cutY,this.renderTarget?this.pipeline.batchTextureFrame(t,e,i,r,n,this.camera.matrix,null):(r=this.context,s=t.canvasData,t=t.source.image,o=this.camera.matrix,r.save(),r.globalCompositeOperation=this._eraseMode?"destination-out":"source-over",r.globalAlpha=n,o.setToContext(r),r.drawImage(t,s.x,s.y,s.width,s.height,e,i,s.width,s.height),r.restore())},snapshotArea:function(t,e,i,n,r,s,o){return this.renderTarget?this.renderer.snapshotFramebuffer(this.renderTarget.framebuffer,this.width,this.height,r,!1,t,e,i,n,s,o):this.renderer.snapshotCanvas(this.canvas,r,!1,t,e,i,n,s,o),this},snapshot:function(t,e,i){return this.renderTarget?this.renderer.snapshotFramebuffer(this.renderTarget.framebuffer,this.width,this.height,t,!1,0,0,this.width,this.height,e,i):this.renderer.snapshotCanvas(this.canvas,t,!1,0,0,this.width,this.height,e,i),this},snapshotPixel:function(t,e,i){return this.renderTarget?this.renderer.snapshotFramebuffer(this.renderTarget.framebuffer,this.width,this.height,i,!0,t,e):this.renderer.snapshotCanvas(this.canvas,i,!0,t,e),this},preDestroy:function(){this._saved||(h.remove(this.canvas),this.renderTarget&&this.renderTarget.destroy(),this.texture.destroy(),this.camera.destroy(),this.canvas=null,this.context=null,this.texture=null)}});t.exports=i},function(t,e){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)})}},function(t,e,i){var l=i(164),n=i(0),r=i(11),c=i(15),u=i(92),s=i(1085),d=i(3),i=new n({Extends:c,Mixins:[r.AlphaSingle,r.BlendMode,r.Depth,r.Flip,r.Mask,r.Pipeline,r.Size,r.Texture,r.Transform,r.Visible,r.ScrollFactor,s],initialize:function(t,e,i,n,r,s,o,a,h){void 0===n&&(n="__DEFAULT"),void 0===s&&(s=2),void 0===o&&(o=!0),c.call(this,t,"Rope"),this.anims=new l(this),this.points=s,this.vertices,this.uv,this.colors,this.alphas,this.tintFill="__DEFAULT"===n,this.dirty=!1,this.horizontal=o,this._flipX=!1,this._flipY=!1,this._perp=new d,this.debugCallback=null,this.debugGraphic=null,this.setTexture(n,r),this.setPosition(e,i),this.setSizeToFrame(),this.initPipeline(u.ROPE_PIPELINE),Array.isArray(s)&&this.resizeArrays(s.length),this.setPoints(s,a,h),this.updateVertices()},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},setTintFill:function(t){return this.tintFill=t=void 0===t?!1:t,this},setAlphas:function(t,e){var i=this.points.length;if(!(i<1)){var n=this.alphas,r=(void 0===t?t=[1]:Array.isArray(t)||void 0!==e||(t=[t]),0);if(void 0!==e)for(o=0;o<i;o++)n[r=2*o]=t,n[r+1]=e;else if(t.length===i)for(o=0;o<i;o++)n[r=2*o]=t[o],n[r+1]=t[o];else for(var s=t[0],o=0;o<i;o++)t.length>(r=2*o)&&(s=t[r]),n[r]=s,t.length>r+1&&(s=t[r+1]),n[r+1]=s}return this},setColors:function(t){var e=this.points.length;if(!(e<1)){var i=this.colors,n=(void 0===t?t=[16777215]:Array.isArray(t)||(t=[t]),0);if(t.length===e)for(s=0;s<e;s++)i[n=2*s]=t[s],i[n+1]=t[s];else for(var r=t[0],s=0;s<e;s++)t.length>(n=2*s)&&(r=t[n]),i[n]=r,t.length>n+1&&(r=t[n+1]),i[n+1]=r}return this},setPoints:function(t,e,i){if("number"==typeof(t=void 0===t?2:t)){var n,r,s,o=t;if(o<2&&(o=2),t=[],this.horizontal)for(s=-this.frame.halfWidth,r=this.frame.width/(o-1),n=0;n<o;n++)t.push({x:s+n*r,y:0});else for(s=-this.frame.halfHeight,r=this.frame.height/(o-1),n=0;n<o;n++)t.push({x:0,y:s+n*r})}var a=t.length,h=this.points.length;return a<1||(1===a&&(t.unshift({x:0,y:0}),a++),h!==a&&this.resizeArrays(a),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,r=this.frame.u1,s=this.frame.v1,o=(r-i)/(e-1),a=(s-n)/(e-1),h=0;h<e;h++){var l,c,u,d=4*h,p=this.horizontal?(u=l=this._flipX?r-h*o:i+h*o,this._flipY?(c=s,n):(c=n,s)):(u=this._flipX?(l=i,r):(l=r,i),c=this._flipY?s-h*a:n+h*a);t[0+d]=l,t[1+d]=c,t[2+d]=u,t[3+d]=p}return this},resizeArrays:function(t){var e=this.colors,i=this.alphas;this.vertices=new Float32Array(4*t),this.uv=new Float32Array(4*t);for(var e=new Uint32Array(2*t),i=new Float32Array(2*t),n=0;n<2*t;n++)e[n]=16777215,i[n]=1;return this.colors=e,this.alphas=i,this.dirty=!0,this},updateVertices:function(){var t=this._perp,e=this.points,i=this.vertices,n=e.length;if(this.dirty=!1,!(n<1)){for(var r=e[0],s=this.horizontal?this.frame.halfHeight:this.frame.halfWidth,o=0;o<n;o++){var a=e[o],h=4*o,l=o<n-1?e[o+1]:a,l=(t.x=l.y-r.y,t.y=-(l.x-r.x),t.length());t.x/=l,t.y/=l,t.x*=s,t.y*=s,i[h]=a.x+t.x,i[1+h]=a.y+t.y,i[2+h]=a.x-t.x,i[3+h]=a.y-t.y,r=a}return this}},setDebug:function(t,e){return this.debugGraphic=t,this.debugCallback=t||e?e||this.renderDebugVerts:null,this},renderDebugVerts:function(t,e,i){var n=t.debugGraphic,r=i[0],s=i[1],o=i[2],a=i[3];n.lineBetween(r,s,o,a);for(var h=4;h<e;h+=4){var l=i[h+0],c=i[h+1],u=i[h+2],d=i[h+3];n.lineBetween(r,s,l,c),n.lineBetween(o,a,u,d),n.lineBetween(o,a,l,c),n.lineBetween(l,c,u,d),r=l,s=c,o=u,a=d}},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()}}});t.exports=i},function(t,e,i){var n=i(142),s=i(31),r=i(0),o=i(11),a=i(22),h=i(15),b=i(458),l=i(6),c=i(202),u=i(1088),d=i(459),i=new r({Extends:h,Mixins:[o.Alpha,o.BlendMode,o.ComputedSize,o.Crop,o.Depth,o.Flip,o.GetBounds,o.Mask,o.Origin,o.Pipeline,o.ScrollFactor,o.Tint,o.Transform,o.Visible,u],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.initPipeline(),this.canvas=s.create(this),this.context=this.canvas.getContext("2d"),this.style=new d(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.dirty=!1,0===this.style.resolution&&(this.style.resolution=1),this._crop=this.resetCropObject(),this.texture=t.sys.textures.addCanvas(null,this.canvas,!0),this.frame=this.texture.get(),this.frame.source.resolution=this.style.resolution,this.renderer&&this.renderer.gl&&(this.renderer.deleteTexture(this.frame.source.glTexture),this.frame.source.glTexture=null),this.initRTL(),this.setText(n),r&&r.padding&&this.setPadding(r.padding),r&&r.lineSpacing&&this.setLineSpacing(r.lineSpacing),t.sys.game.events.on(a.CONTEXT_RESTORED,function(){this.dirty=!0},this)},initRTL:function(){this.style.rtl&&(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,i=this.style;return i.wordWrapCallback?(e=i.wordWrapCallback.call(i.wordWrapCallbackScope,t,this),Array.isArray(e)?e.join("\n"):e):i.wordWrapWidth?i.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="",r=t.replace(/ +/gi," ").split(this.splitRegExp),s=r.length,o=0;o<s;o++){var a="",h=(h=r[o]).replace(/^ *|\s*$/gi,"");if(e.measureText(h).width<i)n+=h+"\n";else{for(var l=i,c=h.split(" "),u=0;u<c.length;u++){var d=c[u],p=d+" ",f=e.measureText(p).width;if(l<f){if(0===u){for(var g=p;g.length&&(g=g.slice(0,-1),!((f=e.measureText(g).width)<=l)););if(!g.length)throw new Error("This text's wordWrapWidth setting is less than a single character!");d=d.substr(g.length);c[u]=d,a+=g}d=c[u].length?u:u+1,d=c.slice(d).join(" ").replace(/[ \n]*$/gi,"");r[o+1]=d+" "+(r[o+1]||""),s=r.length;break}a+=p,l-=f}n+=a.replace(/[ \n]*$/gi,"")+"\n"}}return n.replace(/[\s|\n]*$/gi,"")},basicWordWrap:function(t,e,i){for(var n="",r=t.split(this.splitRegExp),s=r.length-1,o=e.measureText(" ").width,a=0;a<=s;a++){for(var h=i,l=r[a].split(" "),c=l.length-1,u=0;u<=c;u++){var d=l[u],p=e.measureText(d).width,f=p;u<c&&(f+=o),h<f&&0<u&&(n+="\n",h=i),n+=d,u<c?(n+=" ",h-=f):h-=p}a<s&&(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=""),(t=Array.isArray(t)?t.join("\n"):t)!==this._text&&(this._text=t.toString(),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,r,s){return this.style.setShadow(t,e,i,n,r,s)},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()},setPadding:function(t,e,i,n){var r,s;return"object"==typeof t?(i=null!==(s=l(r=t,"x",null))?t=s:(t=l(r,"left",0),l(r,"right",t)),n=null!==(s=l(r,"y",null))?e=s:(e=l(r,"top",0),l(r,"bottom",e))):(void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=t),void 0===n&&(n=e)),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)},updateText:function(){var t,e=this.canvas,i=this.context,n=this.style,r=n.resolution,s=n.metrics,o=(n.syncFont(e,i),this._text),a=(o=n.wordWrapWidth||n.wordWrapCallback?this.runWordWrap(this._text):o).split(this.splitRegExp),h=b(this,s,a),o=this.padding;0===n.fixedWidth?(this.width=h.width+o.left+o.right,t=h.width):(this.width=n.fixedWidth,(t=this.width-o.left-o.right)<h.width&&(t=h.width)),0===n.fixedHeight?this.height=h.height+o.top+o.bottom:this.height=n.fixedHeight;var l,c,u=this.width,d=this.height;this.updateDisplayOrigin(),u*=r,d*=r,u=Math.max(u,1),d=Math.max(d,1),e.width!==u||e.height!==d?(e.width=u,e.height=d,this.frame.setSize(u,d),n.syncFont(e,i)):i.clearRect(0,0,u,d),i.save(),i.scale(r,r),n.backgroundColor&&(i.fillStyle=n.backgroundColor,i.fillRect(0,0,u,d)),n.syncStyle(e,i),i.textBaseline="alphabetic",i.translate(o.left,o.top);for(var p=0;p<h.lines;p++){if(l=n.strokeThickness/2,c=n.strokeThickness/2+p*h.lineHeight+s.ascent,0<p&&(c+=h.lineSpacing*p),n.rtl)l=u-l;else if("right"===n.align)l+=t-h.lineWidths[p];else if("center"===n.align)l+=(t-h.lineWidths[p])/2;else if("justify"===n.align&&.85<=h.lineWidths[p]/h.width){var f=h.width-h.lineWidths[p],g=i.measureText(" ").width,m=a[p].trim(),y=m.split(" ");f+=(a[p].length-m.length)*g;for(var v=Math.floor(f/g),x=0;0<v;)y[x]+=" ",x=(x+1)%(y.length-1||1),--v;a[p]=y.join(" ")}this.autoRound&&(l=Math.round(l),c=Math.round(c)),n.strokeThickness&&(this.style.syncShadow(i,n.shadowStroke),i.strokeText(a[p],l,c)),n.color&&(this.style.syncShadow(i,n.shadowFill),i.fillText(a[p],l,c))}i.restore(),this.renderer&&this.renderer.gl&&(this.frame.source.glTexture=this.renderer.canvasToTexture(e,this.frame.source.glTexture,!0),this.frame.glTexture=this.frame.source.glTexture),this.dirty=!0;r=this.input;return r&&!r.customHitArea&&(r.hitArea.width=this.width,r.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=o.ToJSON(this),e={autoRound:this.autoRound,text:this._text,style:this.style.toJSON(),padding:{left:this.padding.left,right:this.padding.right,top:this.padding.top,bottom:this.padding.bottom}};return t.data=e,t},preDestroy:function(){this.style.rtl&&c(this.canvas),s.remove(this.canvas),this.texture.destroy()}});t.exports=i},function(t,e,i){var l=i(31),n=i(0),r=i(11),c=i(22),u=i(15),d=i(361),s=i(192),o=i(1091),p=i(3),i=new n({Extends:u,Mixins:[r.Alpha,r.BlendMode,r.ComputedSize,r.Crop,r.Depth,r.Flip,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Tint,r.Transform,r.Visible,o],initialize:function(t,e,i,n,r,s,o){var a=t.sys.renderer,s=(u.call(this,t,"TileSprite"),t.sys.textures.get(s)),h=s.get(o);r=n&&r?(n=Math.floor(n),Math.floor(r)):(n=h.width,h.height),this._tilePosition=new p,this._tileScale=new p(1,1),this.dirty=!1,this.renderer=a,this.canvas=l.create(this,n,r),this.context=this.canvas.getContext("2d"),this.displayTexture=s,this.displayFrame=h,this._crop=this.resetCropObject(),this.texture=t.sys.textures.addCanvas(null,this.canvas,!0),this.frame=this.texture.get(),this.potWidth=d(h.width),this.potHeight=d(h.height),this.fillCanvas=l.create2D(this,this.potWidth,this.potHeight),this.fillContext=this.fillCanvas.getContext("2d"),this.fillPattern=null,this.setPosition(e,i),this.setSize(n,r),this.setFrame(o),this.setOriginFromFrame(),this.initPipeline(),t.sys.game.events.on(c.CONTEXT_RESTORED,function(t){var e;t&&(e=t.gl,this.dirty=!0,this.fillPattern=null,this.fillPattern=t.createTexture2D(0,e.LINEAR,e.LINEAR,e.REPEAT,e.REPEAT,e.RGBA,this.fillCanvas,this.potWidth,this.potHeight))},this)},setTexture:function(t,e){return this.displayTexture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t){t=this.displayTexture.get(t);return this.potWidth=d(t.width),this.potHeight=d(t.height),this.canvas.width=0,t.cutWidth&&t.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this.displayFrame=t,this.dirty=!0,this.updateTileTexture(),this},setTilePosition:function(t,e){return void 0!==t&&(this.tilePositionX=t),void 0!==e&&(this.tilePositionY=e),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(){var t,e,i,n,r;this.dirty&&this.renderer&&((t=this.displayFrame).source.isRenderTexture||t.source.isGLTexture||(e=this.fillContext,i=this.fillCanvas,n=this.potWidth,r=this.potHeight,this.renderer&&this.renderer.gl||(n=t.cutWidth,r=t.cutHeight),e.clearRect(0,0,n,r),i.width=n,i.height=r,e.drawImage(t.source.image,t.cutX,t.cutY,t.cutWidth,t.cutHeight,0,0,n,r),this.renderer&&this.renderer.gl?this.fillPattern=this.renderer.canvasToTexture(i,this.fillPattern):this.fillPattern=e.createPattern(i,"repeat"),this.updateCanvas()),this.dirty=!1)},updateCanvas:function(){var t,e,i,n,r=this.canvas;r.width===this.width&&r.height===this.height||(r.width=this.width,r.height=this.height,this.frame.setSize(this.width,this.height),this.updateDisplayOrigin(),this.dirty=!0),!this.dirty||this.renderer&&this.renderer.gl||(r=this.context,this.scene.sys.game.config.antialias||s.disable(r),t=this._tileScale.x,e=this._tileScale.y,i=this._tilePosition.x,n=this._tilePosition.y,r.clearRect(0,0,this.width,this.height),r.save(),r.scale(t,e),r.translate(-i,-n),r.fillStyle=this.fillPattern,r.fillRect(i,n,this.width/t,this.height/e),r.restore()),this.dirty=!1},preDestroy:function(){this.renderer&&this.renderer.gl&&this.renderer.deleteTexture(this.fillPattern),l.remove(this.canvas),l.remove(this.fillCanvas),this.fillPattern=null,this.fillContext=null,this.fillCanvas=null,this.displayTexture=null,this.displayFrame=null,this.texture.destroy(),this.renderer=null},tilePositionX:{get:function(){return this._tilePosition.x},set:function(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}},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}}});t.exports=i},function(t,e,i){var n=i(0),r=i(18),s=i(11),o=i(75),a=i(22),h=i(51),l=i(15),c=i(70),u=i(222),d=i(1094),p=i(14),i=new n({Extends:l,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Mask,s.Origin,s.Pipeline,s.ScrollFactor,s.Size,s.TextureCrop,s.Tint,s.Transform,s.Visible,d],initialize:function(t,e,i,n){l.call(this,t,"Video"),this.video=null,this.videoTexture=null,this.videoTextureSource=null,this.snapshotTexture=null,this.flipY=!1,this._key=u(),this.touchLocked=!0,this.playWhenUnlocked=!1,this.retryLimit=20,this.retry=0,this.retryInterval=500,this._retryID=null,this._systemMuted=!1,this._codeMuted=!1,this._systemPaused=!1,this._codePaused=!1,this._callbacks={play:this.playHandler.bind(this),error:this.loadErrorHandler.bind(this),end:this.completeHandler.bind(this),time:this.timeUpdateHandler.bind(this),seeking:this.seekingHandler.bind(this),seeked:this.seekedHandler.bind(this)},this._crop=this.resetCropObject(),this.markers={},this._markerIn=-1,this._markerOut=p.MAX_SAFE_INTEGER,this._lastUpdate=0,this._cacheKey="",this._isSeeking=!1,this.removeVideoElementOnDestroy=!1,this.setPosition(e,i),this.initPipeline(),n&&this.changeSource(n,!1);e=t.sys.game.events,e.on(a.PAUSE,this.globalPause,this),e.on(a.RESUME,this.globalResume,this),i=t.sys.sound;i&&i.on(c.GLOBAL_MUTE,this.globalMute,this)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},play:function(t,e,i){var n,r;return this.touchLocked&&this.playWhenUnlocked||this.isPlaying()||(n=this.video)&&(void 0===t&&(t=n.loop),(r=this.scene.sys.sound)&&r.mute&&this.setMute(!0),isNaN(e)||(this._markerIn=e),!isNaN(i)&&e<i&&(this._markerOut=i),n.loop=t,r=this._callbacks,void 0!==(e=n.play())?e.then(this.playPromiseSuccessHandler.bind(this)).catch(this.playPromiseErrorHandler.bind(this)):(n.addEventListener("playing",r.play,!0),n.readyState<2&&(this.retry=this.retryLimit,this._retryID=window.setTimeout(this.checkVideoProgress.bind(this),this.retryInterval))),n.addEventListener("ended",r.end,!0),n.addEventListener("timeupdate",r.time,!0),n.addEventListener("seeking",r.seeking,!0),n.addEventListener("seeked",r.seeked,!0)),this},changeSource:function(t,e,i,n,r){void 0===e&&(e=!0),this.video&&this.stop();var s=this.scene.sys.cache.video.get(t);return s?(this.video=s,this._cacheKey=t,this._codePaused=s.paused,this._codeMuted=s.muted,this.videoTexture?(this.scene.sys.textures.remove(this._key),this.videoTexture=this.scene.sys.textures.create(this._key,s,s.videoWidth,s.videoHeight),this.videoTextureSource=this.videoTexture.source[0],this.videoTexture.add("__BASE",0,0,0,s.videoWidth,s.videoHeight),this.setTexture(this.videoTexture),this.setSizeToFrame(),this.updateDisplayOrigin(),this.emit(o.VIDEO_CREATED,this,s.videoWidth,s.videoHeight)):this.updateTexture(),s.currentTime=0,this._lastUpdate=0,e&&this.play(i,n,r)):this.video=null,this},addMarker:function(t,e,i){return!isNaN(e)&&0<=e&&!isNaN(i)&&(this.markers[t]=[e,i]),this},playMarker:function(t,e){t=this.markers[t];return t&&this.play(e,t[0],t[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)},snapshotArea:function(t,e,i,n,r,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.width),void 0===n&&(n=this.height),void 0===r&&(r=i),void 0===s&&(s=n);var o=this.video,a=this.snapshotTexture;return a?a.setSize(r,s):(a=this.scene.sys.textures.createCanvas(u(),r,s),this.snapshotTexture=a),o&&a.context.drawImage(o,t,e,i,n,0,0,r,s),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},loadURL:function(t,e,i){void 0===e&&(e="loadeddata"),void 0===i&&(i=!1),this.video&&this.stop(),this.videoTexture&&this.scene.sys.textures.remove(this._key);e=document.createElement("video");return e.controls=!1,i&&(e.muted=!0,e.defaultMuted=!0,e.setAttribute("autoplay","autoplay")),e.setAttribute("playsinline","playsinline"),e.setAttribute("preload","auto"),e.addEventListener("error",this._callbacks.error,!0),e.src=t,e.load(),this.video=e,this},loadMediaStream:function(t,e,i){void 0===e&&(e="loadeddata"),void 0===i&&(i=!1),this.video&&this.stop(),this.videoTexture&&this.scene.sys.textures.remove(this._key);var n=document.createElement("video");n.controls=!1,i&&(n.muted=!0,n.defaultMuted=!0,n.setAttribute("autoplay","autoplay")),n.setAttribute("playsinline","playsinline"),n.setAttribute("preload","auto"),n.addEventListener("error",this._callbacks.error,!0);try{n.srcObject=t}catch(e){n.src=window.URL.createObjectURL(t)}return n.load(),this.video=n,this},playPromiseSuccessHandler:function(){this._codePaused=!1,this.touchLocked=!1,this.emit(o.VIDEO_PLAY,this),-1<this._markerIn&&(this.video.currentTime=this._markerIn)},playPromiseErrorHandler:function(t){this.scene.sys.input.once(h.POINTER_DOWN,this.unlockHandler,this),this.touchLocked=!0,this.playWhenUnlocked=!0,this.emit(o.VIDEO_ERROR,this,t)},playHandler:function(){this._codePaused=!1,this.touchLocked=!1,this.emit(o.VIDEO_PLAY,this),this.video.removeEventListener("playing",this._callbacks.play,!0)},loadErrorHandler:function(t){this.stop(),this.emit(o.VIDEO_ERROR,this,t)},unlockHandler:function(){this.touchLocked=!1,this.playWhenUnlocked=!1,this.emit(o.VIDEO_UNLOCKED,this),-1<this._markerIn&&(this.video.currentTime=this._markerIn),this.video.play(),this.emit(o.VIDEO_PLAY,this)},completeHandler:function(){this.emit(o.VIDEO_COMPLETE,this)},timeUpdateHandler:function(){this.video&&this.video.currentTime<this._lastUpdate&&(this.emit(o.VIDEO_LOOP,this),this._lastUpdate=0)},preUpdate:function(){var t,e=this.video;e&&(t=e.currentTime)!==this._lastUpdate&&(this._lastUpdate=t,this.updateTexture(),t>=this._markerOut&&(e.loop?(e.currentTime=this._markerIn,this.updateTexture(),this._lastUpdate=t,this.emit(o.VIDEO_LOOP,this)):(this.emit(o.VIDEO_COMPLETE,this),this.stop())))},checkVideoProgress:function(){2<=this.video.readyState?this.updateTexture():(this.retry--,0<this.retry?this._retryID=window.setTimeout(this.checkVideoProgress.bind(this),this.retryInterval):this.emit(o.VIDEO_TIMEOUT,this))},updateTexture:function(){var t,e=this.video,i=e.videoWidth,n=e.videoHeight;this.videoTexture?((t=this.videoTextureSource).source!==e&&(t.source=e,t.width=i,t.height=n),t.update()):(this.videoTexture=this.scene.sys.textures.create(this._key,e,i,n),this.videoTextureSource=this.videoTexture.source[0],this.videoTexture.add("__BASE",0,0,0,i,n),this.setTexture(this.videoTexture),this.setSizeToFrame(),this.updateDisplayOrigin(),this.emit(o.VIDEO_CREATED,this,i,n))},getVideoKey:function(){return this._cacheKey},seekTo:function(t){var e=this.video;return!e||(e=e.duration)===1/0||isNaN(e)||this.setCurrentTime(e*t),this},getCurrentTime:function(){return this.video?this.video.currentTime:0},setCurrentTime:function(t){var e,i,n=this.video;return n&&("string"==typeof t&&(e=t[0],i=parseFloat(t.substr(1)),"+"===e?t=n.currentTime+i:"-"===e&&(t=n.currentTime-i)),n.currentTime=t,this._lastUpdate=t),this},isSeeking:function(){return this._isSeeking},seekingHandler:function(){this._isSeeking=!0,this.emit(o.VIDEO_SEEKING,this)},seekedHandler:function(){this._isSeeking=!1,this.emit(o.VIDEO_SEEKED,this),this.video&&this.updateTexture()},getProgress:function(){var t=this.video;if(t){var e=t.currentTime,t=t.duration;if(t!==1/0&&!isNaN(t))return e/t}return 0},getDuration:function(){return this.video?this.video.duration:0},setMute:function(t){this._codeMuted=t=void 0===t?!0: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;i&&(i.muted=!!this._codeMuted||e)},globalPause:function(){this._systemPaused=!0,this.video&&this.video.pause()},globalResume:function(){this._systemPaused=!1,this.video&&!this._codePaused&&this.video.play()},setPaused:function(t){var e=this.video;return this._codePaused=t=void 0===t?!0:t,e&&(t?e.paused||e.pause():e.paused&&!this._systemPaused&&e.play()),this},getVolume:function(){return this.video?this.video.volume:1},setVolume:function(t){return void 0===t&&(t=1),this.video&&(this.video.volume=r(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.video.paused||this._codePaused||this._systemPaused},saveTexture:function(t,e){return void 0===e&&(e=!1),this.videoTexture&&this.scene.sys.textures.renameTexture(this._key,t),this._key=t,this.flipY=e,this.videoTextureSource&&this.videoTextureSource.setFlipY(e),this.videoTexture},stop:function(){var t=this.video;if(t){var e,i=this._callbacks;for(e in i)t.removeEventListener(e,i[e],!0);t.pause()}return this._retryID&&window.clearTimeout(this._retryID),this.emit(o.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(),this.removeVideoElementOnDestroy&&this.removeVideoElement();var t=this.scene.sys.game.events,t=(t.off(a.PAUSE,this.globalPause,this),t.off(a.RESUME,this.globalResume,this),this.scene.sys.sound);t&&t.off(c.GLOBAL_MUTE,this.globalMute,this),this._retryID&&window.clearTimeout(this._retryID)}});t.exports=i},function(t,e,i){var n=i(0),r=i(228),s=i(470),o=i(56),i=new n({initialize:function(t){this.type=o.POLYGON,this.area=0,this.points=[],t&&this.setTo(t)},contains:function(t,e){return r(this,t,e)},setTo:function(t){if(this.area=0,this.points=[],"string"==typeof t&&(t=t.split(" ")),Array.isArray(t)){for(var e,i=Number.MAX_VALUE,n=0;n<t.length;n++)e={x:0,y:0},"number"==typeof t[n]||"string"==typeof t[n]?(e.x=parseFloat(t[n]),e.y=parseFloat(t[n+1]),n++):Array.isArray(t[n])?(e.x=t[n][0],e.y=t[n][1]):(e.x=t[n].x,e.y=t[n].y),this.points.push(e),e.y<i&&(i=e.y);this.calculateArea(i)}return this},calculateArea:function(){if(this.points.length<3)this.area=0;else{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);t=this.points[0],e=this.points[this.points.length-1],i+=(t.x-e.x)*(e.y+t.y),this.area=.5*-i}return this.area},getPoints:function(t,e,i){return s(this,t,e,i)}});t.exports=i},function(t,e){t.exports=function(t,e,i){for(var n=!1,r=-1,s=t.points.length-1;++r<t.points.length;s=r){var o=t.points[r].x,a=t.points[r].y,h=t.points[s].x,l=t.points[s].y;(a<=i&&i<l||l<=i&&i<a)&&e<(h-o)*(i-a)/(l-a)+o&&(n=!n)}return n}},function(t,e,i){var n=i(0),r=i(11),h=i(15),c=i(2),s=i(17),o=i(478),a=i(1176),l=i(25),i=new n({Extends:h,Mixins:[r.ComputedSize,r.Depth,r.GetBounds,r.Mask,r.Origin,r.ScrollFactor,r.Transform,r.Visible,a],initialize:function(t,e,i,n,r,s,o,a){void 0===i&&(i=0),void 0===n&&(n=0),void 0===r&&(r=128),void 0===s&&(s=128),h.call(this,t,"Shader"),this.blendMode=-1,this.shader;t=t.sys.renderer;this.renderer=t,this.gl=t.gl,this.vertexData=new ArrayBuffer(2*Float32Array.BYTES_PER_ELEMENT*6),this.vertexBuffer=t.createVertexBuffer(this.vertexData.byteLength,this.gl.STREAM_DRAW),this.program=null,this.bytes=new Uint8Array(this.vertexData),this.vertexViewF32=new Float32Array(this.vertexData),this._tempMatrix1=new l,this._tempMatrix2=new l,this._tempMatrix3=new l,this.viewMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.projectionMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.uniforms={},this.pointer=null,this._rendererWidth=t.width,this._rendererHeight=t.height,this._textureCount=0,this.framebuffer=null,this.glTexture=null,this.renderToTexture=!1,this.texture=null,this.setPosition(i,n),this.setSize(r,s),this.setOrigin(.5,.5),this.setShader(e,o,a)},willRender:function(t){return!!this.renderToTexture||!(h.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},setRenderToTexture:function(t,e){var i,n,r;return void 0===e&&(e=!1),this.renderToTexture||(i=this.width,n=this.height,r=this.renderer,this.glTexture=r.createTextureFromSource(null,i,n,0),this.glTexture.flipY=e,this.framebuffer=r.createFramebuffer(i,n,this.glTexture,!1),this._rendererWidth=i,this._rendererHeight=n,this.renderToTexture=!0,this.projOrtho(0,this.width,this.height,0),t&&(this.texture=this.scene.sys.textures.addGLTexture(t,this.glTexture,i,n))),this.shader&&(r.pipelines.clear(),this.load(),this.flush(),r.pipelines.rebind()),this},setShader:function(t,e,i){if(void 0===e&&(e=[]),"string"==typeof t){var n=this.scene.sys.cache.shader;if(!n.has(t))return this;this.shader=n.get(t)}else this.shader=t;n=this.gl,t=this.renderer,this.program&&n.deleteProgram(this.program),t=t.createProgram(this.shader.vertexSrc,this.shader.fragmentSrc),n.uniformMatrix4fv(n.getUniformLocation(t,"uViewMatrix"),!1,this.viewMatrix),n.uniformMatrix4fv(n.getUniformLocation(t,"uProjectionMatrix"),!1,this.projectionMatrix),n.uniform2f(n.getUniformLocation(t,"uResolution"),this.width,this.height),this.program=t,n=new Date,t={resolution:{type:"2f",value:{x:this.width,y:this.height}},time:{type:"1f",value:0},mouse:{type:"2f",value:{x:this.width/2,y:this.height/2}},date:{type:"4fv",value:[n.getFullYear(),n.getMonth(),n.getDate(),60*n.getHours()*60+60*n.getMinutes()+n.getSeconds()]},sampleRate:{type:"1f",value:44100},iChannel0:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel1:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel2:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel3:{type:"sampler2D",value:null,textureData:{repeat:!0}}};this.shader.uniforms?this.uniforms=s(!0,{},this.shader.uniforms,t):this.uniforms=t;for(var r=0;r<4;r++)e[r]&&this.setSampler2D("iChannel"+r,e[r],r,i);return this.initUniforms(),this.projOrtho(0,this._rendererWidth,this._rendererHeight,0),this},setPointer:function(t){return this.pointer=t,this},projOrtho:function(t,e,i,n){var r=1/(t-e),s=1/(i-n),o=this.projectionMatrix,t=(o[0]=-2*r,o[5]=-2*s,o[10]=-.001,o[12]=(t+e)*r,o[13]=(n+i)*s,o[14]=-0,this.program),r=this.gl;this.renderer.setProgram(t),r.uniformMatrix4fv(r.getUniformLocation(t,"uProjectionMatrix"),!1,this.projectionMatrix),this._rendererWidth=e,this._rendererHeight=i},initUniforms:function(){var t,e=this.gl,i=this.renderer.glFuncMap,n=this.program;for(t in this._textureCount=0,this.uniforms){var r=this.uniforms[t],s=r.type,o=i[s];r.uniformLocation=e.getUniformLocation(n,t),"sampler2D"!==s&&(r.glMatrix=o.matrix,r.glValueLength=o.length,r.glFunc=o.func)}},setSampler2DBuffer:function(t,e,i,n,r,s){void 0===r&&(r=0),void 0===s&&(s={});t=this.uniforms[t];return t.value=e,s.width=i,s.height=n,t.textureData=s,this._textureCount=r,this.initSampler2D(t),this},setSampler2D:function(t,e,i,n){void 0===i&&(i=0);var r=this.scene.sys.textures;if(r.exists(e)){r=r.getFrame(e);if(r.glTexture&&r.glTexture.isRenderTexture)return this.setSampler2DBuffer(t,r.glTexture,r.width,r.height,i,n);var t=this.uniforms[t],s=r.source;t.textureKey=e,t.source=s.image,t.value=r.glTexture,s.isGLTexture&&((n=n||{}).width=s.width,n.height=s.height),n&&(t.textureData=n),this._textureCount=i,this.initSampler2D(t)}return this},setUniform:function(t,e){return o(this.uniforms,t,e),this},getUniform:function(t){return c(this.uniforms,t,null)},setChannel0:function(t,e){return this.setSampler2D("iChannel0",t,0,e)},setChannel1:function(t,e){return this.setSampler2D("iChannel1",t,1,e)},setChannel2:function(t,e){return this.setSampler2D("iChannel2",t,2,e)},setChannel3:function(t,e){return this.setSampler2D("iChannel3",t,3,e)},initSampler2D:function(t){var e,i,n,r,s,o,a,h,l;t.value&&((e=this.gl).activeTexture(e.TEXTURE0+this._textureCount),e.bindTexture(e.TEXTURE_2D,t.value),(l=t.textureData)&&!t.value.isRenderTexture&&(i=e[c(l,"magFilter","linear").toUpperCase()],n=e[c(l,"minFilter","linear").toUpperCase()],r=e[c(l,"wrapS","repeat").toUpperCase()],s=e[c(l,"wrapT","repeat").toUpperCase()],o=e[c(l,"format","rgba").toUpperCase()],l.repeat&&(r=e.REPEAT,s=e.REPEAT),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,!!l.flipY),l.width?(a=c(l,"width",512),h=c(l,"height",2),l=c(l,"border",0),e.texImage2D(e.TEXTURE_2D,0,o,a,h,l,o,e.UNSIGNED_BYTE,null)):e.texImage2D(e.TEXTURE_2D,0,o,e.RGBA,e.UNSIGNED_BYTE,t.source),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,i),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,n),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,r),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,s)),this.renderer.setProgram(this.program),e.uniform1i(t.uniformLocation,this._textureCount),this._textureCount++)},syncUniforms:function(){var t,e,i,n,r,s,o=this.gl,a=this.uniforms,h=0;for(s in a)i=(t=a[s]).glFunc,e=t.glValueLength,n=t.uniformLocation,null!==(r=t.value)&&(1===e?t.glMatrix?i.call(o,n,t.transpose,r):i.call(o,n,r):2===e?i.call(o,n,r.x,r.y):3===e?i.call(o,n,r.x,r.y,r.z):4===e?i.call(o,n,r.x,r.y,r.z,r.w):"sampler2D"===t.type&&(o.activeTexture(o.TEXTURE0+h),o.bindTexture(o.TEXTURE_2D,r),o.uniform1i(n,h),h++))},load:function(t){var e=this.gl,i=this.width,n=this.height,r=this.renderer,s=this.program,o=this.viewMatrix,t=(this.renderToTexture||(a=-this._displayOriginX,h=-this._displayOriginY,o[0]=t[0],o[1]=t[1],o[4]=t[2],o[5]=t[3],o[8]=t[4],o[9]=t[5],o[12]=o[0]*a+o[4]*h,o[13]=o[1]*a+o[5]*h),e.useProgram(s),e.uniformMatrix4fv(e.getUniformLocation(s,"uViewMatrix"),!1,o),e.uniform2f(e.getUniformLocation(s,"uResolution"),this.width,this.height),this.uniforms),a=t.resolution;a.value.x=i,a.value.y=n,t.time.value=r.game.loop.getDuration();var h=this.pointer;h&&(o=t.mouse,e=h.x/i,s=1-h.y/n,o.value.x=e.toFixed(2),o.value.y=s.toFixed(2)),this.syncUniforms()},flush:function(){var t=this.width,e=this.height,i=this.program,n=this.gl,r=this.vertexBuffer,s=this.renderer,o=2*Float32Array.BYTES_PER_ELEMENT,r=(this.renderToTexture&&(s.setFramebuffer(this.framebuffer),n.clearColor(0,0,0,0),n.clear(n.COLOR_BUFFER_BIT)),n.bindBuffer(n.ARRAY_BUFFER,r),n.getAttribLocation(i,"inPosition")),i=(-1!==r&&(n.enableVertexAttribArray(r),n.vertexAttribPointer(r,2,n.FLOAT,!1,o,0)),this.vertexViewF32);i[3]=e,i[4]=t,i[5]=e,i[8]=t,i[9]=e,i[10]=t,n.bufferSubData(n.ARRAY_BUFFER,0,this.bytes.subarray(0,6*o)),n.drawArrays(n.TRIANGLES,0,6),this.renderToTexture&&s.setFramebuffer(null,!1)},setAlpha:function(){},setBlendMode:function(){},preDestroy:function(){var t=this.gl;t.deleteProgram(this.program),t.deleteBuffer(this.vertexBuffer),this.renderToTexture&&(this.renderer.deleteFramebuffer(this.framebuffer),this.texture.destroy(),this.framebuffer=null,this.glTexture=null,this.texture=null)}});t.exports=i},function(t,e,i){var n=i(0),r=i(11),s=i(36),o=i(116),d=i(15),a=i(479),l=i(480),h=i(19),p=i(69),c=i(1179),u=i(79),f=i(39),g=i(117),i=new n({Extends:d,Mixins:[r.AlphaSingle,r.BlendMode,r.Depth,r.Mask,r.Pipeline,r.Size,r.Texture,r.Transform,r.Visible,r.ScrollFactor,c],initialize:function(t,e,i,n,r,s,o,a,h,l,c,u){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n="__WHITE"),d.call(this,t,"Mesh"),this.faces=[],this.vertices=[],this.tintFill=!1,this.debugCallback=null,this.debugGraphic=null,this.hideCCW=!0,this.modelPosition=new f,this.modelScale=new f(1,1,1),this.modelRotation=new f,this.dirtyCache=[0,0,0,0,0,0,0,0,0,0,0,0],this.transformMatrix=new p,this.viewPosition=new f,this.viewMatrix=new p,this.projectionMatrix=new p,this.totalRendered=0,this.totalFrame=0,this.ignoreDirtyCache=!1;t=t.sys.renderer;this.setPosition(e,i),this.setTexture(n,r),this.setSize(t.width,t.height),this.initPipeline(),this.setPerspective(t.width,t.height),s&&this.addVertices(s,o,a,h,l,c,u)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},panX:function(t){return this.viewPosition.addScale(f.LEFT,t),this.dirtyCache[10]=1,this},panY:function(t){return this.viewPosition.y+=f.DOWN.y*t,this.dirtyCache[10]=1,this},panZ:function(t){return this.viewPosition.z+=t,this.dirtyCache[10]=1,this},setPerspective:function(t,e,i,n,r){return void 0===n&&(n=.01),void 0===r&&(r=1e3),this.projectionMatrix.perspective(s(i=void 0===i?45:i),t/e,n,r),this.dirtyCache[10]=1,this.dirtyCache[11]=0,this},setOrtho:function(t,e,i,n){return void 0===t&&(t=this.scene.sys.renderer.getAspectRatio()),this.projectionMatrix.ortho(-t,t,-(e=void 0===e?1:e),e,i=void 0===i?-1e3:i,n=void 0===n?1e3:n),this.dirtyCache[10]=1,this.dirtyCache[11]=1,this},clear:function(){return this.faces.forEach(function(t){t.destroy()}),this.faces=[],this.vertices=[],this},addVerticesFromObj:function(t,e,i,n,r,s,o,a,h){t=this.scene.sys.cache.obj.get(t);return t&&l(t,this,e,i,n,r,s,o,a,h),this},sortByDepth:function(t,e){return t.depth-e.depth},depthSort:function(){return u(this.faces,this.sortByDepth),this},addVertex:function(t,e,i,n,r,s,o){t=new g(t,e,i,n,r,s,o);return this.vertices.push(t),t},addFace:function(t,e,i){t=new o(t,e,i);return this.faces.push(t),this.dirtyCache[9]=-1,t},addVertices:function(t,e,i,n,r,s,o){t=a(t,e,i,n,r,s,o);return t&&(this.faces=this.faces.concat(t.faces),this.vertices=this.vertices.concat(t.vertices)),this.dirtyCache[9]=-1,this},getFaceCount:function(){return this.faces.length},getVertexCount:function(){return this.vertices.length},getFace:function(t){return this.faces[t]},getFaceAt:function(t,e,i){void 0===i&&(i=this.scene.sys.cameras.main);for(var n=h(this,i).calc,r=this.faces,s=[],o=0;o<r.length;o++){var a=r[o];a.contains(t,e,n)&&s.push(a)}return u(s,this.sortByDepth)},setDebug:function(t,e){return this.debugGraphic=t,this.debugCallback=t||e?e||this.renderDebug:null,this},isDirty:function(){var t=this.modelPosition,e=this.modelRotation,i=this.modelScale,n=this.dirtyCache,r=t.x,s=t.y,t=t.z,o=e.x,a=e.y,e=e.z,h=i.x,l=i.y,i=i.z,c=this.getFaceCount(),u=n[0],d=n[1],p=n[2],f=n[3],g=n[4],m=n[5],y=n[6],v=n[7],x=n[8],b=n[9];return n[0]=r,n[1]=s,n[2]=t,n[3]=o,n[4]=a,n[5]=e,n[6]=h,n[7]=l,n[8]=i,n[9]=c,u!==r||d!==s||p!==t||f!==o||g!==a||m!==e||y!==h||v!==l||x!==i||b!==c},preUpdate:function(){this.totalRendered=this.totalFrame,this.totalFrame=0;var t=this.dirtyCache;if(this.ignoreDirtyCache||t[10]||this.isDirty()){var e=this.width,i=this.height,n=this.viewMatrix,r=this.viewPosition,s=(t[10]&&(n.identity(),n.translate(r),n.invert(),t[10]=0),this.transformMatrix);s.setWorldMatrix(this.modelRotation,this.modelPosition,this.modelScale,this.viewMatrix,this.projectionMatrix);for(var o=r.z,a=this.faces,h=0;h<a.length;h++)a[h].transformCoordinatesLocal(s,e,i,o);this.depthSort()}},renderDebug:function(t,e){for(var i=t.debugGraphic,n=0;n<e.length;n++){var r=e[n],s=r.vertex1.tx,o=r.vertex1.ty,a=r.vertex2.tx,h=r.vertex2.ty,l=r.vertex3.tx,r=r.vertex3.ty;i.strokeTriangle(s,o,a,h,l,r)}},preDestroy:function(){this.clear(),this.debugCallback=null,this.debugGraphic=null}});t.exports=i},function(t,e,i){var n=i(50);t.exports=function(t,e){return n(t.x,t.y,e.x,e.y)<=t.radius+e.radius}},function(t,e,i){var d=i(4),p=i(233);t.exports=function(t,e,i){var n,r,s,o,a,h,l,c,u;return void 0===i&&(i=[]),p(t,e)&&(n=t.x1,r=t.y1,s=t.x2,t=t.y2,0==(h=(a=2*((s=s-n)*(u=n-e.x)+(t=t-r)*(h=r-e.y)))*a-4*(o=s*s+t*t)*(u*u+h*h-(u=e.radius)*u))?(l=n+(e=-a/(2*o))*s,c=r+e*t,0<=e&&e<=1&&i.push(new d(l,c))):0<h&&(l=n+(u=(-a-Math.sqrt(h))/(2*o))*s,c=r+u*t,0<=u&&u<=1&&i.push(new d(l,c)),l=n+(e=(-a+Math.sqrt(h))/(2*o))*s,c=r+e*t,0<=e&&e<=1&&i.push(new d(l,c)))),i}},function(t,e,i){var c=i(66),u=new(i(4));t.exports=function(t,e,i){var n,r,s,o,a,h,l;return void 0===i&&(i=u),c(e,t.x1,t.y1)?(i.x=t.x1,i.y=t.y1,!0):c(e,t.x2,t.y2)?(i.x=t.x2,i.y=t.y2,!0):(n=t.x2-t.x1,r=t.y2-t.y1,s=e.x-t.x1,o=e.y-t.y1,0<(a=(h=n)*n+(l=r)*r)&&(h*=s=(s*n+o*r)/a,l*=s),i.x=t.x1+h,i.y=t.y1+l,h*h+l*l<=a&&0<=h*n+l*r&&c(e,i.x,i.y))}},function(t,e,i){var l=i(4),c=i(96),u=i(488);t.exports=function(t,e,i){if(void 0===i&&(i=[]),u(t,e))for(var n=e.getLineA(),r=e.getLineB(),s=e.getLineC(),e=e.getLineD(),o=[new l,new l,new l,new l],a=[c(n,t,o[0]),c(r,t,o[1]),c(s,t,o[2]),c(e,t,o[3])],h=0;h<4;h++)a[h]&&i.push(o[h]);return i}},function(t,e){t.exports=function(t,e,i,n){void 0===i&&(i=!1),void 0===n&&(n=[]);for(var r,s,o,a=t.x3-t.x1,h=t.y3-t.y1,l=t.x2-t.x1,c=t.y2-t.y1,u=a*a+h*h,d=a*l+h*c,p=l*l+c*c,f=u*p-d*d,g=0==f?0:1/f,m=t.x1,y=t.y1,v=0;v<e.length&&(r=(u*(o=l*(s=e[v].x-m)+c*(r=e[v].y-y))-d*(s=a*s+h*r))*g,!(0<=(s=(p*s-d*o)*g)&&0<=r&&s+r<1&&(n.push({x:e[v].x,y:e[v].y}),i)));v++);return n}},function(t,e){t.exports=function(t,e,i,n){var r=Math.cos(n),n=Math.sin(n),s=t.x1-e,o=t.y1-i;return t.x1=s*r-o*n+e,t.y1=s*n+o*r+i,s=t.x2-e,o=t.y2-i,t.x2=s*r-o*n+e,t.y2=s*n+o*r+i,t}},function(t,e){t.exports=function(t){return 0===t.height?NaN:t.width/t.height}},function(t,e){t.exports=function(t,e,i,n){var r=Math.cos(n),n=Math.sin(n),s=t.x1-e,o=t.y1-i;return t.x1=s*r-o*n+e,t.y1=s*n+o*r+i,s=t.x2-e,o=t.y2-i,t.x2=s*r-o*n+e,t.y2=s*n+o*r+i,s=t.x3-e,o=t.y3-i,t.x3=s*r-o*n+e,t.y3=s*n+o*r+i,t}},function(t,e,i){t.exports={BUTTON_DOWN:i(1310),BUTTON_UP:i(1311),CONNECTED:i(1312),DISCONNECTED:i(1313),GAMEPAD_BUTTON_DOWN:i(1314),GAMEPAD_BUTTON_UP:i(1315)}},function(t,e,i){var r=i(17),s=i(156);t.exports=function(t,e){var i=void 0===t?s():r({},t);if(e)for(var n in e)void 0!==e[n]&&(i[n]=e[n]);return i}},function(t,e,i){var n=i(0),r=i(21),o=i(23),s=i(8),a=i(2),h=i(7),l=i(408),c=new n({Extends:o,initialize:function(t,e,i,n){var r="xml",s=(h(e)&&(e=a(s=e,"key"),i=a(s,"url"),n=a(s,"xhrSettings"),r=a(s,"extension",r)),{type:"xml",cache:t.cacheManager.xml,extension:r,responseType:"text",key:e,url:i,xhrSettings:n});o.call(this,t,s)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=l(this.xhrLoader.responseText),this.data?this.onProcessComplete():this.onProcessError()}});s.register("xml",function(t,e,i){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new c(this,t[n]));else this.addFile(new c(this,t,e,i));return this}),t.exports=c},function(t,e,i){var n=i(0),r=i(21),h=i(23),s=i(8),l=i(2),c=i(7),o=new n({Extends:h,initialize:function(t,e,i,n){var r="text",s="txt",o=t.cacheManager.text,a=(c(e)&&(e=l(a=e,"key"),i=l(a,"url"),n=l(a,"xhrSettings"),s=l(a,"extension",s),r=l(a,"type",r),o=l(a,"cache",o)),{type:r,cache:o,extension:s,responseType:"text",key:e,url:i,xhrSettings:n});h.call(this,t,a)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});s.register("text",function(t,e,i){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new o(this,t[n]));else this.addFile(new o(this,t,e,i));return this}),t.exports=o},function(t,e,i){t.exports={Acceleration:i(1368),Angular:i(1369),Bounce:i(1370),Debug:i(1371),Drag:i(1372),Enable:i(1373),Friction:i(1374),Gravity:i(1375),Immovable:i(1376),Mass:i(1377),OverlapCirc:i(523),OverlapRect:i(244),Pushable:i(1378),Size:i(1379),Velocity:i(1380)}},function(t,e){t.exports=function(t,e,i,n,r,s,o){void 0===s&&(s=!0),void 0===o&&(o=!1);var a,h,l=[],c=[],u=t.treeMinMax;return u.minX=e,u.minY=i,u.maxX=e+n,u.maxY=i+r,o&&(c=t.staticTree.search(u)),s&&t.useTree?l=t.tree.search(u):s&&(o=t.bodies,a={position:{x:e,y:i},left:e,top:i,right:e+n,bottom:i+r,isCircle:!1},h=t.intersects,o.iterate(function(t){h(t,a)&&l.push(t)})),c.concat(l)}},function(t,e,i){t.exports={COLLIDE:i(1381),OVERLAP:i(1382),PAUSE:i(1383),RESUME:i(1384),TILE_COLLIDE:i(1385),TILE_OVERLAP:i(1386),WORLD_BOUNDS:i(1387),WORLD_STEP:i(1388)}},function(t,e,i){var s=i(62);t.exports=function(t,e,i,n){var r=0,n=t.deltaAbsX()+e.deltaAbsX()+n;return 0===t._dx&&0===e._dx?(t.embedded=!0,e.embedded=!0):t._dx>e._dx?n<(r=t.right-e.x)&&!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!==s.STATIC_BODY||i||(t.blocked.none=!1,t.blocked.right=!0),t.physicsType!==s.STATIC_BODY||i||(e.blocked.none=!1,e.blocked.left=!0)):t._dx<e._dx&&(n<-(r=t.x-e.width-e.x)&&!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!==s.STATIC_BODY||i||(t.blocked.none=!1,t.blocked.left=!0),t.physicsType!==s.STATIC_BODY||i||(e.blocked.none=!1,e.blocked.right=!0))),t.overlapX=r,e.overlapX=r}},function(t,e,i){var s=i(62);t.exports=function(t,e,i,n){var r=0,n=t.deltaAbsY()+e.deltaAbsY()+n;return 0===t._dy&&0===e._dy?(t.embedded=!0,e.embedded=!0):t._dy>e._dy?n<(r=t.bottom-e.y)&&!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!==s.STATIC_BODY||i||(t.blocked.none=!1,t.blocked.down=!0),t.physicsType!==s.STATIC_BODY||i||(e.blocked.none=!1,e.blocked.up=!0)):t._dy<e._dy&&(n<-(r=t.y-e.bottom)&&!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!==s.STATIC_BODY||i||(t.blocked.none=!1,t.blocked.up=!0),t.physicsType!==s.STATIC_BODY||i||(e.blocked.none=!1,e.blocked.down=!0))),t.overlapY=r,e.overlapY=r}},function(t,e){t.exports=function(t,e){return!(e.right<=t.left||e.bottom<=t.top||e.position.x>=t.right||e.position.y>=t.bottom)}},function(t,e,i){t.exports={Bounce:i(1495),Collision:i(1496),Force:i(1497),Friction:i(1498),Gravity:i(1499),Mass:i(1500),Sensor:i(1501),SetBody:i(1502),Sleep:i(1503),Static:i(1520),Transform:i(1521),Velocity:i(1522)}},function(t,e){var h={};(t.exports=h).create=function(t,e){var i=t.bodyA,n=t.bodyB,i={id:h.id(i,n),bodyA:i,bodyB:n,activeContacts:[],separation:0,isActive:!0,confirmedActive:!0,isSensor:i.isSensor||n.isSensor,timeCreated:e,timeUpdated:e,collision:null,inverseMass:0,friction:0,frictionStatic:0,restitution:0,slop:0};return h.update(i,t,e),i},h.update=function(t,e,i){if((t.collision=e).collided){var n=e.supports,r=t.activeContacts,s=e.parentA,o=e.parentB;t.inverseMass=s.inverseMass+o.inverseMass,t.friction=Math.min(s.friction,o.friction),t.frictionStatic=Math.max(s.frictionStatic,o.frictionStatic),t.restitution=Math.max(s.restitution,o.restitution),t.slop=Math.max(s.slop,o.slop);for(var a=0;a<n.length;a++)r[a]=n[a].contact;s=n.length;s<r.length&&(r.length=s),t.separation=e.depth,h.setActive(t,!0,i)}else!0===t.isActive&&h.setActive(t,!1,i)},h.setActive=function(t,e,i){e?(t.isActive=!0,t.timeUpdated=i):(t.isActive=!1,t.activeContacts.length=0)},h.id=function(t,e){return t.id<e.id?"A"+t.id+"B"+e.id:"A"+e.id+"B"+t.id}},function(t,e,i){t.exports={CalculateFacesAt:i(252),CalculateFacesWithin:i(63),CheckIsoBounds:i(541),Copy:i(1420),CreateFromTiles:i(1421),CullBounds:i(543),CullTiles:i(544),Fill:i(1422),FilterTiles:i(1423),FindByIndex:i(1424),FindTile:i(1425),ForEachTile:i(1426),GetCullTilesFunction:i(1427),GetTileAt:i(158),GetTileAtWorldXY:i(1428),GetTilesWithin:i(26),GetTilesWithinShape:i(1429),GetTilesWithinWorldXY:i(529),GetTileToWorldXFunction:i(1430),GetTileToWorldXYFunction:i(1431),GetTileToWorldYFunction:i(1432),GetWorldToTileXFunction:i(1433),GetWorldToTileXYFunction:i(1434),GetWorldToTileYFunction:i(1435),HasTileAt:i(562),HasTileAtWorldXY:i(1436),HexagonalCullBounds:i(546),HexagonalCullTiles:i(545),HexagonalTileToWorldXY:i(550),HexagonalTileToWorldY:i(554),HexagonalWorldToTileXY:i(556),HexagonalWorldToTileY:i(560),IsInLayerBounds:i(119),IsometricCullTiles:i(547),IsometricTileToWorldXY:i(551),IsometricWorldToTileXY:i(557),PutTileAt:i(257),PutTileAtWorldXY:i(1437),PutTilesAt:i(1438),Randomize:i(1439),RemoveTileAt:i(563),RemoveTileAtWorldXY:i(1440),RenderDebug:i(1441),ReplaceByIndex:i(542),RunCull:i(159),SetCollision:i(1442),SetCollisionBetween:i(1443),SetCollisionByExclusion:i(1444),SetCollisionByProperty:i(1445),SetCollisionFromCollisionGroup:i(1446),SetLayerCollisionIndex:i(160),SetTileCollision:i(72),SetTileIndexCallback:i(1447),SetTileLocationCallback:i(1448),Shuffle:i(1449),StaggeredCullBounds:i(549),StaggeredCullTiles:i(548),StaggeredTileToWorldXY:i(552),StaggeredTileToWorldY:i(555),StaggeredWorldToTileXY:i(558),StaggeredWorldToTileY:i(561),SwapByIndex:i(1450),TileToWorldX:i(253),TileToWorldXY:i(553),TileToWorldY:i(254),WeightedRandomize:i(1451),WorldToTileX:i(255),WorldToTileXY:i(559),WorldToTileY:i(256)}},function(t,e,i){var a=i(158);t.exports=function(t,e,i){var n=a(t,e,!0,i),r=a(t,e-1,!0,i),s=a(t,e+1,!0,i),o=a(t-1,e,!0,i),t=a(t+1,e,!0,i),e=n&&n.collides;return e&&(n.faceTop=!0,n.faceBottom=!0,n.faceLeft=!0,n.faceRight=!0),r&&r.collides&&(e&&(n.faceTop=!1),r.faceBottom=!e),s&&s.collides&&(e&&(n.faceBottom=!1),s.faceTop=!e),o&&o.collides&&(e&&(n.faceLeft=!1),o.faceRight=!e),t&&t.collides&&(e&&(n.faceRight=!1),t.faceLeft=!e),n&&!n.collides&&n.resetFaces(),n}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileWidth,i=i.tilemapLayer,r=0;return i&&(e=e||i.scene.cameras.main,r=i.x+e.scrollX*(1-i.scrollFactorX),n*=i.scaleX),r+t*n}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileHeight,i=i.tilemapLayer,r=0;return i&&(e=e||i.scene.cameras.main,r=i.y+e.scrollY*(1-i.scrollFactorY),n*=i.scaleY),r+t*n}},function(t,e){t.exports=function(t,e,i,n){var r=n.baseTileWidth,n=n.tilemapLayer;return n&&(i=i||n.scene.cameras.main,t-=n.x+i.scrollX*(1-n.scrollFactorX),r*=n.scaleX),(e=void 0===e?!0:e)?Math.floor(t/r):t/r}},function(t,e){t.exports=function(t,e,i,n){var r=n.baseTileHeight,n=n.tilemapLayer;return n&&(i=i||n.scene.cameras.main,t-=n.y+i.scrollY*(1-n.scrollFactorY),r*=n.scaleY),(e=void 0===e?!0:e)?Math.floor(t/r):t/r}},function(t,e,i){var a=i(85),h=i(119),l=i(252),c=i(72);t.exports=function(t,e,i,n,r){var s,o;return void 0===n&&(n=!0),h(e,i,r)?(s=(s=r.data[i][e])&&s.collides,t instanceof a?(null===r.data[i][e]&&(r.data[i][e]=new a(r,t.index,e,i,r.tileWidth,r.tileHeight)),r.data[i][e].copy(t)):(t=t,null===r.data[i][e]?r.data[i][e]=new a(r,t,e,i,r.tileWidth,r.tileHeight):r.data[i][e].index=t),t=r.data[i][e],o=-1!==r.collideIndexes.indexOf(t.index),c(t,o),n&&s!==t.collides&&l(e,i,r),t):null}},function(t,e,i){var n=i(29);t.exports=function(t){return"isometric"===(t=t.toLowerCase())?n.ISOMETRIC:"staggered"===t?n.STAGGERED:"hexagonal"===t?n.HEXAGONAL:n.ORTHOGONAL}},function(t,e,i){var p=i(40),f=i(120),g=i(121),m=i(85);t.exports=function(t,e,i,n,r){for(var s=new f({tileWidth:i,tileHeight:n}),t=new g({name:t,tileWidth:i,tileHeight:n,format:p.ARRAY_2D,layers:[s]}),o=[],a=e.length,h=0,l=0;l<e.length;l++){o[l]=[];for(var c=e[l],u=0;u<c.length;u++){var d=parseInt(c[u],10);isNaN(d)||-1===d?o[l][u]=r?null:new m(s,-1,u,l,i,n):o[l][u]=new m(s,d,u,l,i,n)}0===h&&(h=c.length)}return t.width=s.width=h,t.height=s.height=a,t.widthInPixels=s.widthInPixels=h*i,t.heightInPixels=s.heightInPixels=a*n,s.data=o,t}},function(t,e,i){function r(t){return{x:t.x,y:t.y}}var s=i(571),o=i(261),a=["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 n=s(t,a);return n.x+=e,n.y+=i,t.gid?(e=o(t.gid),n.gid=e.gid,n.flippedHorizontal=e.flippedHorizontal,n.flippedVertical=e.flippedVertical,n.flippedAntiDiagonal=e.flippedAntiDiagonal):t.polyline?n.polyline=t.polyline.map(r):t.polygon?n.polygon=t.polygon.map(r):t.ellipse?n.ellipse=t.ellipse:t.text?n.text=t.text:t.point?n.point=!0:n.rectangle=!0,n}},function(t,e){t.exports=function(t){var e=Boolean(2147483648&t),i=Boolean(1073741824&t),n=Boolean(536870912&t),r=(t&=536870911,0),s=!1;return e&&i&&n?(r=Math.PI/2,s=!0):e&&i&&!n?(r=Math.PI,s=!1):e&&!i&&n?(r=Math.PI/2,s=!1):!e||i||n?!e&&i&&n?(r=3*Math.PI/2,s=!1):e||!i||n?e||i||!n?e||i||n||(r=0,s=!1):(r=3*Math.PI/2,s=!0):(r=Math.PI,s=!0):s=!(r=0),{gid:t,flippedHorizontal:e,flippedVertical:i,flippedAntiDiagonal:n,rotation:r,flipped:s}}},function(t,e,i){var l=i(40),c=i(121),u=i(564),d=i(580);t.exports=function(t,e,i,n,r,s,o,a){void 0===i&&(i=32),void 0===n&&(n=32),void 0===r&&(r=10),void 0===s&&(s=10),void 0===a&&(a=!1);var h=null;return Array.isArray(o)?h=u(void 0!==e?e:"map",l.ARRAY_2D,o,i,n,a):void 0!==e&&(o=t.cache.tilemap.get(e))&&(h=u(e,o.format,o.data,i,n,a)),null===h&&(h=new c({tileWidth:i,tileHeight:n,width:r,height:s})),new d(t,h)}},function(t,e,i){var n=i(6);t.exports=function(t){t=n(t,"targets",null);return null!==t&&("function"==typeof t&&(t=t.call()),Array.isArray(t)||(t=[t])),t}},function(t,e){function c(t){return t.getActive&&"function"==typeof t.getActive}function u(t){return t.getStart&&"function"==typeof t.getStart}function d(t){return t.getEnd&&"function"==typeof t.getEnd}function p(t,e){var i,n,r=function(t,e,i){return i},s=function(t,e,i){return i},o=null,a=typeof e;if("number"==a)r=function(){return e};else if("string"==a){var h=e[0],l=parseFloat(e.substr(2));switch(h){case"+":r=function(t,e,i){return i+l};break;case"-":r=function(t,e,i){return i-l};break;case"*":r=function(t,e,i){return i*l};break;case"/":r=function(t,e,i){return i/l};break;default:r=function(){return parseFloat(e)}}}else"function"==a?r=e:"object"==a&&(u(h=e)||d(h)||c(h)?(c(e)&&(o=e.getActive),d(e)&&(r=e.getEnd),u(e)&&(s=e.getStart)):e.hasOwnProperty("value")?n=p(t,e.value):(a=e.hasOwnProperty("to"),h=e.hasOwnProperty("from"),i=e.hasOwnProperty("start"),a&&(h||i)&&(n=p(t,e.to),i&&(a=p(t,e.start),n.getActive=a.getEnd),h&&(i=p(t,e.from),n.getStart=i.getEnd))));return n||{getActive:o,getEnd:r,getStart:s}}t.exports=p},function(t,e){t.exports={targets:null,delay:0,duration:1e3,ease:"Power0",easeParams:null,hold:0,repeat:0,repeatDelay:0,yoyo:!1,flipX:!1,flipY:!1}},function(t,e,i){var n=i(0),r=i(9),h=i(267),s=i(16),o=i(5),u=i(100),a=i(14),i=new n({Extends:r,initialize:function(t,e,i){r.call(this),this.parent=t,this.parentIsTimeline=t.hasOwnProperty("isTimeline"),this.data=e,this.totalData=e.length,this.targets=i,this.totalTargets=i.length,this.useFrames=!1,this.timeScale=1,this.loop=0,this.loopDelay=0,this.loopCounter=0,this.startDelay=0,this.hasStarted=!1,this.isSeeking=!1,this.completeDelay=0,this.countdown=0,this.offset=0,this.calculatedOffset=0,this.state=u.PENDING_ADD,this._pausedState=u.INIT,this.paused=!1,this.elapsed=0,this.totalElapsed=0,this.duration=0,this.progress=0,this.totalDuration=0,this.totalProgress=0,this.callbacks={onActive:null,onComplete:null,onLoop:null,onRepeat:null,onStart:null,onStop:null,onUpdate:null,onYoyo:null},this.callbackScope},getValue:function(t){return this.data[t=void 0===t?0:t].current},setTimeScale:function(t){return this.timeScale=t,this},getTimeScale:function(){return this.timeScale},isPlaying:function(){return this.state===u.ACTIVE},isPaused:function(){return this.state===u.PAUSED},hasTarget:function(t){return-1!==this.targets.indexOf(t)},updateTo:function(t,e,i){void 0===i&&(i=!1);for(var n=0;n<this.totalData;n++){var r=this.data[n];r.key===t&&(r.end=e,i&&(r.start=r.current))}return this},restart:function(){return this.elapsed=0,this.progress=0,this.totalElapsed=0,this.totalProgress=0,this.state===u.ACTIVE?this.seek(0):this.state===u.REMOVED?(this.seek(0),this.parent.makeActive(this),this):this.state===u.PENDING_ADD?this:this.play()},calcDuration:function(){for(var t=0,e=a.MAX_SAFE_INTEGER,i=this.data,n=0;n<this.totalData;n++){var r=i[n];r.t1=r.duration+r.hold,r.yoyo&&(r.t1+=r.duration),r.t2=r.t1+r.repeatDelay,r.totalDuration=r.delay+r.t1,-1===r.repeat?r.totalDuration+=999999999999*r.t2:0<r.repeat&&(r.totalDuration+=r.t2*r.repeat),r.totalDuration>t&&(t=r.totalDuration),r.delay<e&&(e=r.delay)}this.duration=Math.max(t,.001),this.loopCounter=-1===this.loop?999999999999:this.loop,0<this.loopCounter?this.totalDuration=this.duration+this.completeDelay+(this.duration+this.loopDelay)*this.loopCounter:this.totalDuration=this.duration+this.completeDelay,this.startDelay=e},init:function(){if(this.paused&&!this.parentIsTimeline)return this.state=u.PENDING_ADD,this._pausedState=u.INIT,!1;for(var t=this.data,e=this.totalTargets,i=0;i<this.totalData;i++){var n=t[i],r=n.target,s=n.gen,o=n.key,a=n.index;n.delay=s.delay(r,o,0,a,e,this),n.duration=Math.max(s.duration(r,o,0,a,e,this),.001),n.hold=s.hold(r,o,0,a,e,this),n.repeat=s.repeat(r,o,0,a,e,this),n.repeatDelay=s.repeatDelay(r,o,0,a,e,this)}return this.calcDuration(),this.progress=0,this.totalProgress=0,this.elapsed=0,this.totalElapsed=0,this.state=u.INIT,!0},makeActive:function(){this.parent.makeActive(this),this.dispatchTweenEvent(h.TWEEN_ACTIVE,this.callbacks.onActive)},nextState:function(){0<this.loopCounter?(this.elapsed=0,this.progress=0,this.loopCounter--,this.resetTweenData(!0),0<this.loopDelay?(this.countdown=this.loopDelay,this.state=u.LOOP_DELAY):(this.state=u.ACTIVE,this.dispatchTweenEvent(h.TWEEN_LOOP,this.callbacks.onLoop))):0<this.completeDelay?(this.state=u.COMPLETE_DELAY,this.countdown=this.completeDelay):(this.state=u.PENDING_REMOVE,this.dispatchTweenEvent(h.TWEEN_COMPLETE,this.callbacks.onComplete))},pause:function(){return this.state!==u.PAUSED&&(this.paused=!0,this._pausedState=this.state,this.state=u.PAUSED),this},play:function(t){void 0===t&&(t=!1);var e=this.state;return e!==u.INIT||this.parentIsTimeline?e===u.ACTIVE||e===u.PENDING_ADD&&this._pausedState===u.PENDING_ADD||(this.parentIsTimeline||e!==u.PENDING_REMOVE&&e!==u.REMOVED?this.parentIsTimeline?(this.resetTweenData(t),0===this.calculatedOffset?this.state=u.ACTIVE:(this.countdown=this.calculatedOffset,this.state=u.OFFSET_DELAY)):(this.paused?this.paused=!1:(this.resetTweenData(t),this.state=u.ACTIVE),this.makeActive()):(this.seek(0),this.parent.makeActive(this))):(this.resetTweenData(!1),this.state=u.ACTIVE),this},resetTweenData:function(t){for(var e=this.data,i=this.totalData,n=this.totalTargets,r=0;r<i;r++){var s=e[r],o=s.target,a=s.key,h=s.index;s.progress=0,s.elapsed=0,s.repeatCounter=-1===s.repeat?999999999999:s.repeat,t?(s.start=s.getStartValue(o,a,s.start,h,n,this),s.end=s.getEndValue(o,a,s.end,h,n,this),s.current=s.start,s.state=u.PLAYING_FORWARD):s.state=u.PENDING_RENDER,0<s.delay&&(s.elapsed=s.delay,s.state=u.DELAY),s.getActiveValue&&(o[a]=s.getActiveValue(s.target,s.key,s.start))}},resume:function(){return this.state===u.PAUSED?(this.paused=!1,this.state=this._pausedState):this.play(),this},seek:function(t,e){void 0===e&&(e=16.6),this.state===u.REMOVED&&this.makeActive(),this.elapsed=0,this.progress=0,this.totalElapsed=0,this.totalProgress=0;for(var i=this.data,n=this.totalTargets,r=0;r<this.totalData;r++){var s=i[r],o=s.target,a=s.gen,h=s.key,l=s.index;s.progress=0,s.elapsed=0,s.repeatCounter=-1===s.repeat?999999999999:s.repeat,s.delay=a.delay(o,h,0,l,n,this),s.duration=Math.max(a.duration(o,h,0,l,n,this),.001),s.hold=a.hold(o,h,0,l,n,this),s.repeat=a.repeat(o,h,0,l,n,this),s.repeatDelay=a.repeatDelay(o,h,0,l,n,this),s.current=s.start,s.state=u.PLAYING_FORWARD,this.updateTweenData(this,s,0,l,n),0<s.delay&&(s.elapsed=s.delay,s.state=u.DELAY)}this.calcDuration();var c=!1;for(this.state===u.PAUSED&&(c=!0,this.state=u.ACTIVE),this.isSeeking=!0;this.update(0,e),this.totalProgress<t;);return this.isSeeking=!1,c&&(this.state=u.PAUSED),this},setCallback:function(t,e,i,n){return this.callbacks[t]={func:e,scope:n,params:i},this},complete:function(t){return(t=void 0===t?0:t)?(this.state=u.COMPLETE_DELAY,this.countdown=t):(this.state=u.PENDING_REMOVE,this.dispatchTweenEvent(h.TWEEN_COMPLETE,this.callbacks.onComplete)),this},remove:function(){return this.parent.remove(this),this},stop:function(t){return this.state===u.ACTIVE&&void 0!==t&&this.seek(t),this.state!==u.REMOVED&&(this.state!==u.PAUSED&&this.state!==u.PENDING_ADD||(this.parentIsTimeline?(this.parent.manager._destroy.push(this),this.parent.manager._toProcess++):(this.parent._destroy.push(this),this.parent._toProcess++)),this.dispatchTweenEvent(h.TWEEN_STOP,this.callbacks.onStop),this.removeAllListeners(),this.state=u.PENDING_REMOVE),this},update:function(t,e){if(this.state===u.PAUSED)return!1;switch(this.useFrames&&(e=+this.parent.timeScale),e*=this.timeScale,this.elapsed+=e,this.progress=Math.min(this.elapsed/this.duration,1),this.totalElapsed+=e,this.totalProgress=Math.min(this.totalElapsed/this.totalDuration,1),this.state){case u.ACTIVE:this.hasStarted||this.isSeeking||(this.startDelay-=e,this.startDelay<=0&&(this.hasStarted=!0,this.dispatchTweenEvent(h.TWEEN_START,this.callbacks.onStart)));for(var i=!1,n=0;n<this.totalData;n++){var r=this.data[n];this.updateTweenData(this,r,e)&&(i=!0)}i||this.nextState();break;case u.LOOP_DELAY:this.countdown-=e,this.countdown<=0&&(this.state=u.ACTIVE,this.dispatchTweenEvent(h.TWEEN_LOOP,this.callbacks.onLoop));break;case u.OFFSET_DELAY:this.countdown-=e,this.countdown<=0&&(this.state=u.ACTIVE);break;case u.COMPLETE_DELAY:this.countdown-=e,this.countdown<=0&&(this.state=u.PENDING_REMOVE,this.dispatchTweenEvent(h.TWEEN_COMPLETE,this.callbacks.onComplete))}return this.state===u.PENDING_REMOVE},dispatchTweenDataEvent:function(t,e,i){this.isSeeking||(this.emit(t,this,i.key,i.target,i.current,i.previous),e&&(e.params[1]=i.target,e.func.apply(e.scope,e.params)))},dispatchTweenEvent:function(t,e){this.isSeeking||(this.emit(t,this,this.targets),e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)))},setStateFromEnd:function(t,e,i){return e.yoyo?(e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY(),this.dispatchTweenDataEvent(h.TWEEN_YOYO,t.callbacks.onYoyo,e),e.start=e.getStartValue(e.target,e.key,e.start,e.index,t.totalTargets,t),u.PLAYING_BACKWARD):0<e.repeatCounter?(e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY(),e.start=e.getStartValue(e.target,e.key,e.start,e.index,t.totalTargets,t),e.end=e.getEndValue(e.target,e.key,e.start,e.index,t.totalTargets,t),0<e.repeatDelay?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,u.REPEAT_DELAY):(this.dispatchTweenDataEvent(h.TWEEN_REPEAT,t.callbacks.onRepeat,e),u.PLAYING_FORWARD)):u.COMPLETE},setStateFromStart:function(t,e,i){return 0<e.repeatCounter?(e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY(),e.end=e.getEndValue(e.target,e.key,e.start,e.index,t.totalTargets,t),0<e.repeatDelay?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,u.REPEAT_DELAY):(this.dispatchTweenDataEvent(h.TWEEN_REPEAT,t.callbacks.onRepeat,e),u.PLAYING_FORWARD)):u.COMPLETE},updateTweenData:function(t,e,i){var n,r,s,o,a=e.target;switch(e.state){case u.PLAYING_FORWARD:case u.PLAYING_BACKWARD:a?(r=e.elapsed,n=0,(o=e.duration)<(r+=i)&&(n=r-o,r=o),s=e.state===u.PLAYING_FORWARD,o=r/o,e.elapsed=r,e.progress=o,e.previous=e.current,1==o?s?(e.current=e.end,a[e.key]=e.end,0<e.hold?(e.elapsed=e.hold-n,e.state=u.HOLD_DELAY):e.state=this.setStateFromEnd(t,e,n)):(e.current=e.start,a[e.key]=e.start,e.state=this.setStateFromStart(t,e,n)):(r=s?e.ease(o):e.ease(1-o),e.current=e.start+(e.end-e.start)*r,a[e.key]=e.current),this.dispatchTweenDataEvent(h.TWEEN_UPDATE,t.callbacks.onUpdate,e)):e.state=u.COMPLETE;break;case u.DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=u.PENDING_RENDER);break;case u.REPEAT_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=u.PLAYING_FORWARD,this.dispatchTweenDataEvent(h.TWEEN_REPEAT,t.callbacks.onRepeat,e));break;case u.HOLD_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.state=this.setStateFromEnd(t,e,Math.abs(e.elapsed)));break;case u.PENDING_RENDER:a?(e.start=e.getStartValue(a,e.key,a[e.key],e.index,t.totalTargets,t),e.end=e.getEndValue(a,e.key,e.start,e.index,t.totalTargets,t),e.current=e.start,a[e.key]=e.start,e.state=u.PLAYING_FORWARD):e.state=u.COMPLETE}return e.state!==u.COMPLETE}});i.TYPES=["onActive","onComplete","onLoop","onRepeat","onStart","onStop","onUpdate","onYoyo"],o.register("tween",function(t){return this.scene.sys.tweens.add(t)}),s.register("tween",function(t){return this.scene.sys.tweens.create(t)}),t.exports=i},function(t,e,i){t.exports={TIMELINE_COMPLETE:i(1466),TIMELINE_LOOP:i(1467),TIMELINE_PAUSE:i(1468),TIMELINE_RESUME:i(1469),TIMELINE_START:i(1470),TIMELINE_UPDATE:i(1471),TWEEN_ACTIVE:i(1472),TWEEN_COMPLETE:i(1473),TWEEN_LOOP:i(1474),TWEEN_REPEAT:i(1475),TWEEN_START:i(1476),TWEEN_STOP:i(1477),TWEEN_UPDATE:i(1478),TWEEN_YOYO:i(1479)}},function(t,e){t.exports=function(t,e,i,n,r,s,o,a,h,l,c,u,d,p,f){return{target:t,index:e,key:i,getActiveValue:s,getEndValue:n,getStartValue:r,ease:o,duration:0,totalDuration:0,delay:0,yoyo:l,hold:0,repeat:0,repeatDelay:0,flipX:p,flipY:f,progress:0,elapsed:0,repeatCounter:0,start:0,previous:0,current:0,end:0,t1:0,t2:0,gen:{delay:a,duration:h,hold:c,repeat:u,repeatDelay:d},state:0}}},function(t,e,i){var n=i(68);t.exports=function(t){return n(t,-Math.PI,Math.PI)}},function(t,e,i){var n=i(68);t.exports=function(t){return n(t,-180,180)}},function(t,e,i){var n={},r=(t.exports=n,i(83)),s=i(32);n.fromVertices=function(t){for(var e={},i=0;i<t.length;i++){var n=(i+1)%t.length,n=r.normalise({x:t[n].y-t[i].y,y:t[i].x-t[n].x});e[(0===n.y?1/0:n.x/n.y).toFixed(3).toString()]=n}return s.values(e)},n.rotate=function(t,e){if(0!==e)for(var i=Math.cos(e),n=Math.sin(e),r=0;r<t.length;r++){var s=t[r],o=s.x*i-s.y*n;s.y=s.x*n+s.y*i,s.x=o}}},function(t,e,i){t.exports={AFTER_ADD:i(1504),AFTER_REMOVE:i(1505),AFTER_UPDATE:i(1506),BEFORE_ADD:i(1507),BEFORE_REMOVE:i(1508),BEFORE_UPDATE:i(1509),COLLISION_ACTIVE:i(1510),COLLISION_END:i(1511),COLLISION_START:i(1512),DRAG_END:i(1513),DRAG:i(1514),DRAG_START:i(1515),PAUSE:i(1516),RESUME:i(1517),SLEEP_END:i(1518),SLEEP_START:i(1519)}},function(t,e,i){var p={},f=(t.exports=p,i(274)),g=i(250),m=i(84);p.collisions=function(t,e){for(var i=[],n=e.pairs.table,r=e.metrics,s=0;s<t.length;s++){var o=t[s][0],a=t[s][1];if((!o.isStatic&&!o.isSleeping||!a.isStatic&&!a.isSleeping)&&p.canCollide(o.collisionFilter,a.collisionFilter)&&(r.midphaseTests+=1,m.overlaps(o.bounds,a.bounds)))for(var h=1<o.parts.length?1:0;h<o.parts.length;h++)for(var l=o.parts[h],c=1<a.parts.length?1:0;c<a.parts.length;c++){var u,d=a.parts[c];(l===o&&d===a||m.overlaps(l.bounds,d.bounds))&&(u=(u=n[g.id(l,d)])&&u.isActive?u.collision:null,d=f.collides(l,d,u),r.narrowphaseTests+=1,d.reused&&(r.narrowReuseCount+=1),d.collided&&(i.push(d),r.narrowDetections+=1))}}return i},p.canCollide=function(t,e){return t.group===e.group&&0!==t.group?0<t.group:0!=(t.mask&e.category)&&0!=(e.mask&t.category)}},function(t,e,i){var l={},a=(t.exports=l,i(64)),u=i(83);l.collides=function(t,e,i){var n=!1,r=i?(s=t.parent,r=e.parent,s=s.speed*s.speed+s.angularSpeed*s.angularSpeed+r.speed*r.speed+r.angularSpeed*r.angularSpeed,n=i&&i.collided&&s<.2,i):{collided:!1,bodyA:t,bodyB:e};if(i&&n){var s=r.axisBody,n=[s.axes[i.axisNumber]],o=l._overlapAxes(s.vertices,(s===t?e:t).vertices,n);if(r.reused=!0,o.overlap<=0)return r.collided=!1,r}else{if((i=l._overlapAxes(t.vertices,e.vertices,t.axes)).overlap<=0)return r.collided=!1,r;if((s=l._overlapAxes(e.vertices,t.vertices,e.axes)).overlap<=0)return r.collided=!1,r;i.overlap<s.overlap?(o=i,r.axisBody=t):(o=s,r.axisBody=e),r.axisNumber=o.axisNumber}r.bodyA=t.id<e.id?t:e,r.bodyB=t.id<e.id?e:t,r.collided=!0,r.depth=o.overlap,r.parentA=r.bodyA.parent,r.parentB=r.bodyB.parent,t=r.bodyA,e=r.bodyB,u.dot(o.axis,u.sub(e.position,t.position))<0?r.normal={x:o.axis.x,y:o.axis.y}:r.normal={x:-o.axis.x,y:-o.axis.y},r.tangent=u.perp(r.normal),r.penetration=r.penetration||{},r.penetration.x=r.normal.x*r.depth,r.penetration.y=r.normal.y*r.depth;n=l._findSupports(t,e,r.normal),i=[];return a.contains(t.vertices,n[0])&&i.push(n[0]),a.contains(t.vertices,n[1])&&i.push(n[1]),i.length<2&&(s=l._findSupports(e,t,u.neg(r.normal)),a.contains(e.vertices,s[0])&&i.push(s[0]),i.length<2&&a.contains(e.vertices,s[1])&&i.push(s[1])),i.length<1&&(i=[n[0]]),r.supports=i,r},l._overlapAxes=function(t,e,i){for(var n,r,s=u._temp[0],o=u._temp[1],a={overlap:Number.MAX_VALUE},h=0;h<i.length;h++){if(r=i[h],l._projectToAxis(s,t,r),l._projectToAxis(o,e,r),(n=Math.min(s.max-o.min,o.max-s.min))<=0)return a.overlap=n,a;n<a.overlap&&(a.overlap=n,a.axis=r,a.axisNumber=h)}return a},l._projectToAxis=function(t,e,i){for(var n=u.dot(e[0],i),r=n,s=1;s<e.length;s+=1){var o=u.dot(e[s],i);r<o?r=o:o<n&&(n=o)}t.min=n,t.max=r},l._findSupports=function(t,e,i){for(var n,r,s=Number.MAX_VALUE,o=u._temp[0],a=e.vertices,h=t.position,l=0;l<a.length;l++)c=a[l],o.x=c.x-h.x,o.y=c.y-h.y,(n=-u.dot(i,o))<s&&(s=n,r=c);var c=a[0<=r.index-1?r.index-1:a.length-1];return o.x=c.x-h.x,o.y=c.y-h.y,s=-u.dot(i,o),e=c,c=a[(r.index+1)%a.length],o.x=c.x-h.x,o.y=c.y-h.y,[r,e=(n=-u.dot(i,o))<s?c:e]}},function(t,e,i){t.exports={AlignTo:i(601),Angle:i(602),Call:i(603),GetFirst:i(604),GetLast:i(605),GridAlign:i(606),IncAlpha:i(678),IncX:i(679),IncXY:i(680),IncY:i(681),PlaceOnCircle:i(682),PlaceOnEllipse:i(683),PlaceOnLine:i(684),PlaceOnRectangle:i(685),PlaceOnTriangle:i(686),PlayAnimation:i(687),PropertyValueInc:i(46),PropertyValueSet:i(27),RandomCircle:i(688),RandomEllipse:i(689),RandomLine:i(690),RandomRectangle:i(691),RandomTriangle:i(692),Rotate:i(693),RotateAround:i(694),RotateAroundDistance:i(695),ScaleX:i(696),ScaleXY:i(697),ScaleY:i(698),SetAlpha:i(699),SetBlendMode:i(700),SetDepth:i(701),SetHitArea:i(702),SetOrigin:i(703),SetRotation:i(704),SetScale:i(705),SetScaleX:i(706),SetScaleY:i(707),SetScrollFactor:i(708),SetScrollFactorX:i(709),SetScrollFactorY:i(710),SetTint:i(711),SetVisible:i(712),SetX:i(713),SetXY:i(714),SetY:i(715),ShiftPosition:i(716),Shuffle:i(717),SmootherStep:i(718),SmoothStep:i(719),Spread:i(720),ToggleVisible:i(721),WrapInRectangle:i(722)}},function(t,e,i){var n=i(123),s=[];s[n.BOTTOM_CENTER]=i(277),s[n.BOTTOM_LEFT]=i(278),s[n.BOTTOM_RIGHT]=i(279),s[n.LEFT_BOTTOM]=i(280),s[n.LEFT_CENTER]=i(281),s[n.LEFT_TOP]=i(282),s[n.RIGHT_BOTTOM]=i(283),s[n.RIGHT_CENTER]=i(284),s[n.RIGHT_TOP]=i(285),s[n.TOP_CENTER]=i(286),s[n.TOP_LEFT]=i(287),s[n.TOP_RIGHT]=i(288),t.exports=function(t,e,i,n,r){return s[i](t,e,n,r)}},function(t,e,i){var r=i(42),s=i(87),o=i(88),a=i(52);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),o(t,s(e)+i),a(t,r(e)+n),t}},function(t,e,i){var r=i(42),s=i(43),o=i(53),a=i(52);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),o(t,s(e)-i),a(t,r(e)+n),t}},function(t,e,i){var r=i(42),s=i(44),o=i(54),a=i(52);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),o(t,s(e)+i),a(t,r(e)+n),t}},function(t,e,i){var r=i(42),s=i(43),o=i(55),a=i(54);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),a(t,s(e)-i),o(t,r(e)+n),t}},function(t,e,i){var r=i(89),s=i(43),o=i(90),a=i(54);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),a(t,s(e)-i),o(t,r(e)+n),t}},function(t,e,i){var r=i(43),s=i(45),o=i(54),a=i(52);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),o(t,r(e)-i),a(t,s(e)-n),t}},function(t,e,i){var r=i(42),s=i(44),o=i(55),a=i(53);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),a(t,s(e)+i),o(t,r(e)+n),t}},function(t,e,i){var r=i(89),s=i(44),o=i(90),a=i(53);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),a(t,s(e)+i),o(t,r(e)+n),t}},function(t,e,i){var r=i(44),s=i(45),o=i(53),a=i(52);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),o(t,r(e)+i),a(t,s(e)-n),t}},function(t,e,i){var r=i(87),s=i(45),o=i(55),a=i(88);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),a(t,r(e)+i),o(t,s(e)-n),t}},function(t,e,i){var r=i(43),s=i(45),o=i(55),a=i(53);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),a(t,r(e)-i),o(t,s(e)-n),t}},function(t,e,i){var r=i(44),s=i(45),o=i(55),a=i(54);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),a(t,r(e)+i),o(t,s(e)-n),t}},function(t,e,i){var n=i(123),s=[];s[n.BOTTOM_CENTER]=i(290),s[n.BOTTOM_LEFT]=i(291),s[n.BOTTOM_RIGHT]=i(292),s[n.CENTER]=i(293),s[n.LEFT_CENTER]=i(295),s[n.RIGHT_CENTER]=i(296),s[n.TOP_CENTER]=i(297),s[n.TOP_LEFT]=i(298),s[n.TOP_RIGHT]=i(299),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)}},function(t,e,i){var r=i(42),s=i(87),o=i(55),a=i(88);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),a(t,s(e)+i),o(t,r(e)+n),t}},function(t,e,i){var r=i(42),s=i(43),o=i(55),a=i(53);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),a(t,s(e)-i),o(t,r(e)+n),t}},function(t,e,i){var r=i(42),s=i(44),o=i(55),a=i(54);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),a(t,s(e)+i),o(t,r(e)+n),t}},function(t,e,i){var r=i(294),s=i(87),o=i(89);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),r(t,s(e)+i,o(e)+n),t}},function(t,e,i){var n=i(88),r=i(90);t.exports=function(t,e,i){return n(t,e),r(t,i)}},function(t,e,i){var r=i(89),s=i(43),o=i(90),a=i(53);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),a(t,s(e)-i),o(t,r(e)+n),t}},function(t,e,i){var r=i(89),s=i(44),o=i(90),a=i(54);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),a(t,s(e)+i),o(t,r(e)+n),t}},function(t,e,i){var r=i(87),s=i(45),o=i(88),a=i(52);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),o(t,r(e)+i),a(t,s(e)-n),t}},function(t,e,i){var r=i(43),s=i(45),o=i(53),a=i(52);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),o(t,r(e)-i),a(t,s(e)-n),t}},function(t,e,i){var r=i(44),s=i(45),o=i(54),a=i(52);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),o(t,r(e)+i),a(t,s(e)-n),t}},function(t,e,i){var n=i(169),r=i(98),s=i(14),o=i(4);t.exports=function(t,e,i){void 0===i&&(i=new o);e=r(e,0,s.PI2);return n(t,e,i)}},function(t,e,i){var o=i(302),a=i(169),h=i(98),l=i(14);t.exports=function(t,e,i,n){void 0===n&&(n=[]),!e&&0<i&&(e=o(t)/i);for(var r=0;r<e;r++){var s=h(r/e,0,l.PI2);n.push(a(t,s))}return n}},function(t,e){t.exports=function(t){return Math.PI*t.radius*2}},function(t,e,i){var n=i(18);t.exports={_alpha:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t){return this.alpha=t=void 0===t?1:t,this},alpha:{get:function(){return this._alpha},set:function(t){t=n(t,0,1);0===(this._alpha=t)?this.renderFlags&=-3:this.renderFlags|=2}}}},function(t,e,i){var n=i(35),i={_blendMode:n.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(t){"string"==typeof t&&(t=n[t]),-1<=(t|=0)&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=i},function(t,e){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 this.depth=t=void 0===t?0:t,this}}},function(t,e,i){var s=i(171),o=i(130);t.exports=function(t,e,i,n){void 0===n&&(n=[]),!e&&0<i&&(e=o(t)/i);for(var r=0;r<e;r++)n.push(s(t,r/e));return n}},function(t,e,i){var n=i(4);t.exports=function(t,e,i){return(i=void 0===i?new n:i).x=t.x1+(t.x2-t.x1)*e,i.y=t.y1+(t.y2-t.y1)*e,i}},function(t,e){t.exports=function(t,e,i,n){var r=Math.cos(n),n=Math.sin(n),s=t.x-e,o=t.y-i;return t.x=s*r-o*n+e,t.y=s*n+o*r+i,t}},function(t,e,i){var n=i(310),r=i(311);t.exports={mask:null,setMask:function(t){return this.mask=t,this},clearMask:function(t){return(t=void 0===t?!1:t)&&this.mask&&this.mask.destroy(),this.mask=null,this},createBitmapMask:function(t){return void 0===t&&(this.texture||this.shader)&&(t=this),new n(this.scene,t)},createGeometryMask:function(t){return void 0===t&&"Graphics"===this.type&&(t=this),new r(this.scene,t)}}},function(t,e,i){var n=i(0),r=i(22),s=i(91),i=new n({initialize:function(t,e){var i=t.sys.renderer;this.renderer=i,this.bitmapMask=e,this.maskTexture=null,this.mainTexture=null,this.dirty=!0,this.mainFramebuffer=null,this.maskFramebuffer=null,this.invertAlpha=!1,this.isStencil=!1,this.createMask(),t.sys.game.events.on(r.CONTEXT_RESTORED,this.createMask,this),i&&i.on(s.RESIZE,this.createMask,this)},createMask:function(){var t,e,i,n,r,s=this.renderer;s&&s.gl&&(this.mainTexture&&this.clearMask(),t=s.width,e=s.height,i=s.gl,n=0==(t&t-1)&&0==(e&e-1)?i.REPEAT:i.CLAMP_TO_EDGE,r=i.LINEAR,this.mainTexture=s.createTexture2D(0,r,r,n,n,i.RGBA,null,t,e),this.maskTexture=s.createTexture2D(0,r,r,n,n,i.RGBA,null,t,e),this.mainFramebuffer=s.createFramebuffer(t,e,this.mainTexture,!0),this.maskFramebuffer=s.createFramebuffer(t,e,this.maskTexture,!0))},clearMask:function(){var t=this.renderer;t&&t.gl&&this.mainTexture&&(t.deleteTexture(this.mainTexture),t.deleteTexture(this.maskTexture),t.deleteFramebuffer(this.mainFramebuffer),t.deleteFramebuffer(this.maskFramebuffer),this.mainTexture=null,this.maskTexture=null,this.mainFramebuffer=null,this.maskFramebuffer=null)},setBitmap:function(t){this.bitmapMask=t},preRenderWebGL:function(t,e,i){t.pipelines.BITMAPMASK_PIPELINE.beginMask(this,e,i)},postRenderWebGL:function(t,e){t.pipelines.BITMAPMASK_PIPELINE.endMask(this,e)},preRenderCanvas:function(){},postRenderCanvas:function(){},destroy:function(){this.clearMask(),this.renderer&&this.renderer.off(s.RESIZE,this.createMask,this),this.bitmapMask=null,this.prevFramebuffer=null,this.renderer=null}});t.exports=i},function(t,e,i){i=new(i(0))({initialize:function(t,e){this.geometryMask=e,this.invertAlpha=!1,this.isStencil=!0,this.level=0},setShape:function(t){return this.geometryMask=t,this},setInvertAlpha:function(t){return this.invertAlpha=t=void 0===t?!0:t,this},preRenderWebGL:function(t,e,i){var n=t.gl;t.flush(),0===t.maskStack.length&&(n.enable(n.STENCIL_TEST),n.clear(n.STENCIL_BUFFER_BIT),t.maskCount=0),t.currentCameraMask.mask!==this&&(t.currentMask.mask=this),t.maskStack.push({mask:this,camera:i}),this.applyStencil(t,i,!0),t.maskCount++},applyStencil:function(t,e,i){var n=t.gl,r=this.geometryMask,s=t.maskCount;n.colorMask(!1,!1,!1,!1),i?(n.stencilFunc(n.EQUAL,s,255),n.stencilOp(n.KEEP,n.KEEP,n.INCR)):(n.stencilFunc(n.EQUAL,s+1,255),n.stencilOp(n.KEEP,n.KEEP,n.DECR)),r.renderWebGL(t,r,e),t.flush(),n.colorMask(!0,!0,!0,!0),n.stencilOp(n.KEEP,n.KEEP,n.KEEP),i?this.invertAlpha?n.stencilFunc(n.NOTEQUAL,s+1,255):n.stencilFunc(n.EQUAL,s+1,255):this.invertAlpha?n.stencilFunc(n.NOTEQUAL,s,255):n.stencilFunc(n.EQUAL,s,255)},postRenderWebGL:function(t){var e=t.gl;t.maskStack.pop(),t.maskCount--,t.flush();var i=t.currentMask;0===t.maskStack.length?(i.mask=null,e.disable(e.STENCIL_TEST)):((e=t.maskStack[t.maskStack.length-1]).mask.applyStencil(t,e.camera,!1),t.currentCameraMask.mask!==e.mask?(i.mask=e.mask,i.camera=e.camera):i.mask=null)},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}});t.exports=i},function(t,e){t.exports={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,e){return void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this}}},function(t,e,i){var n=i(14),r=i(25),s=i(177),o=i(269),a=i(270),h=i(3);t.exports={_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,0===(this._scaleY=t)?this.renderFlags&=-5:this.renderFlags|=4}},scaleX:{get:function(){return this._scaleX},set:function(t){0===(this._scaleX=t)?this.renderFlags&=-5:this.renderFlags|=4}},scaleY:{get:function(){return this._scaleY},set:function(t){0===(this._scaleY=t)?this.renderFlags&=-5: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===e&&(e=0),void 0===i&&(i=this.scene.sys.scale.width),void 0===n&&(n=this.scene.sys.scale.height),this.x=(t=void 0===t?0:t)+Math.random()*i,this.y=e+Math.random()*n,this},setRotation:function(t){return this.rotation=t=void 0===t?0:t,this},setAngle:function(t){return this.angle=t=void 0===t?0: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 this.x=t=void 0===t?0:t,this},setY:function(t){return this.y=t=void 0===t?0:t,this},setZ:function(t){return this.z=t=void 0===t?0:t,this},setW:function(t){return this.w=t=void 0===t?0:t,this},getLocalTransformMatrix:function(t){return(t=void 0===t?new r:t).applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY)},getWorldTransformMatrix:function(t,e){void 0===t&&(t=new r),void 0===e&&(e=new r);var i=this.parentContainer;if(!i)return this.getLocalTransformMatrix(t);for(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 t},getLocalPoint:function(t,e,i,n){i=i||new h;var r=(n=n||this.scene.sys.cameras.main).scrollX,n=n.scrollY,t=t+r*this.scrollFactorX-r,r=e+n*this.scrollFactorY-n;return this.parentContainer?this.getWorldTransformMatrix().applyInverse(t,r,i):s(t,r,this.x,this.y,this.rotation,this.scaleX,this.scaleY,i),this._originComponent&&(i.x+=this._displayOriginX,i.y+=this._displayOriginY),i},getParentRotation:function(){for(var t=0,e=this.parentContainer;e;)t+=e.rotation,e=e.parentContainer;return t}}},function(t,e){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}}},function(t,e,i){t.exports={CHANGE_DATA:i(638),CHANGE_DATA_KEY:i(639),DESTROY:i(640),REMOVE_DATA:i(641),SET_DATA:i(642)}},function(t,e,i){var h=i(130),l=i(4);t.exports=function(t,e,i,n){if(void 0===n&&(n=[]),e||i){e?i=Math.round(h(t)/e):e=h(t)/i;for(var r=t.x,s=t.y,o=0,a=0;a<i;a++)switch(n.push(new l(r,s)),o){case 0:(r+=e)>=t.right&&(o=1,s+=r-t.right,r=t.right);break;case 1:(s+=e)>=t.bottom&&(o=2,r-=s-t.bottom,s=t.bottom);break;case 2:(r-=e)<=t.left&&(o=3,s-=t.left-r,r=t.left);break;case 3:(s-=e)<=t.top&&(o=0,s=t.top)}}return n}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=1),void 0===i&&(i=[]);var n=Math.round(t.x1),r=Math.round(t.y1),s=Math.round(t.x2),o=Math.round(t.y2),a=Math.abs(s-n),h=Math.abs(o-r),l=n<s?1:-1,c=r<o?1:-1,u=a-h;i.push({x:n,y:r});for(var d=1;n!==s||r!==o;){var p=u<<1;-h<p&&(u-=h,n+=l),p<a&&(u+=a,r+=c),d%e==0&&i.push({x:n,y:r}),d++}return i}},function(t,e){t.exports=function(t,e,i){if(!e.length)return NaN;if(1===e.length)return e[0];var n,r,s=1;if(i){if(t<e[0][i])return e[0];for(;e[s][i]<t;)s++}else for(;e[s]<t;)s++;return s>e.length&&(s=e.length),i?(n=e[s-1][i],(r=e[s][i])-t<=t-n?e[s]:e[s-1]):(n=e[s-1],(r=e[s])-t<=t-n?r:n)}},function(t,e,i){i=new(i(0))({initialize:function(t,e,i,n,r){void 0===r&&(r=!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=r},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration,keyframe:this.isKeyFrame}},destroy:function(){this.frame=void 0}});t.exports=i},function(t,e){t.exports=function(t){var i=/\D/g;return t.sort(function(t,e){return parseInt(t.replace(i,""),10)-parseInt(e.replace(i,""),10)}),t}},function(t,e,i){var n=i(185),r=i(0),s=i(102),o=i(9),a=i(132),h=i(22),g=i(2),m=i(6),d=i(186),p=i(322),i=new r({Extends:o,initialize:function(t){o.call(this),this.game=t,this.textureManager=null,this.globalTimeScale=1,this.anims=new s,this.mixes=new s,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,r=this.mixes,t="string"==typeof t?t:t.key,e="string"==typeof e?e:e.key;return n.has(t)&&n.has(e)&&((n=r.get(t)||{})[e]=i,r.set(t,n)),this},removeMix:function(t,e){var i=this.mixes,t="string"==typeof t?t:t.key,n=i.get(t);return n&&(e?(e="string"==typeof e?e:e.key,n.hasOwnProperty(e)&&delete n[e]):i.delete(t)),this},getMix:function(t,e){var i=this.mixes,t="string"==typeof t?t:t.key,e="string"==typeof e?e:e.key,i=i.get(t);return i&&i.hasOwnProperty(e)?i[e]:0},add:function(t,e){return this.anims.has(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(c,u){var d,t,p,f=[],e=this.game.cache.json.get(c);return e&&(d=this,t=m(e,"meta",null),p=m(e,"frames",null),t&&p&&m(t,"frameTags",[]).forEach(function(t){var e=[],i=g(t,"name",null),n=g(t,"from",0),r=g(t,"to",0),t=g(t,"direction","forward");if(i&&(!u||-1<u.indexOf(i))){for(var s=[],o=Number.MAX_SAFE_INTEGER,a=n;a<=r;a++){var h=a.toString(),l=p[h];l&&((l=g(l,"duration",Number.MAX_SAFE_INTEGER))<o&&(o=l),s.push({frame:h,duration:l}))}s.forEach(function(t){e.push({key:c,frame:t.frame,duration:o-t.duration})});n=o*e.length,i={key:i,frames:e="reverse"===t?e.reverse():e,duration:n,yoyo:"pingpong"===t},n=d.create(i);n&&f.push(n)}})),f},create:function(t){var e=t.key,i=!1;return!e||(i=this.get(e))||(i=new n(this,e,t),this.anims.set(e,i),this.emit(a.ADD_ANIMATION,e,i)),i},fromJSON:function(t,e){(e=void 0===e?!1:e)&&this.anims.clear();var i=[];if((t="string"==typeof t?JSON.parse(t):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=m(e,"prefix",""),r=m(e,"start",0),s=m(e,"end",0),o=m(e,"suffix",""),a=m(e,"zeroPad",0),h=m(e,"outputArray",[]),l=m(e,"frames",!1),c=this.textureManager.get(t);if(c)if(e)for(l=l||p(r,s),i=0;i<l.length;i++){var u=n+d(l[i],a,"0",1)+o;c.has(u)&&h.push({key:t,frame:u})}else for(l=c.getFrameNames(),i=0;i<l.length;i++)h.push({key:t,frame:l[i]});return h},generateFrameNumbers:function(t,e){var i=m(e,"start",0),n=m(e,"end",-1),r=m(e,"first",!1),s=m(e,"outputArray",[]),o=m(e,"frames",!1),a=this.textureManager.get(t);if(a){r&&a.has(r)&&s.push({key:t,frame:r}),o||(-1===n&&(n=a.frameTotal-2),o=p(i,n));for(var h=0;h<o.length;h++)a.has(o[h])&&s.push({key:t,frame:o[h]})}return s},get:function(t){return this.anims.get(t)},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);var r=(e=Array.isArray(e)?e:[e]).length;n||r--;for(var s=0;s<e.length;s++){var o=i<0?Math.abs(i)*(r-s):i*s;e[s].anims.playAfterDelay(t,o)}return this},remove:function(t){var e=this.get(t);return 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 i={anims:[],globalTimeScale:this.globalTimeScale};return void 0!==t&&""!==t?i.anims.push(this.anims.get(t).toJSON()):this.anims.each(function(t,e){i.anims.push(e.toJSON())}),i},destroy:function(){this.anims.clear(),this.mixes.clear(),this.textureManager=null,this.game=null}});t.exports=i},function(t,e){t.exports=function(t,e,i,n){var r,s=[],o=!1;if((i||n)&&(o=!0,i=i||"",n=n||""),e<t)for(r=t;e<=r;r--)o?s.push(i+r.toString()+n):s.push(r);else for(r=t;r<=e;r++)o?s.push(i+r.toString()+n):s.push(r);return s}},function(t,e,i){var n=i(0),r=i(102),s=i(9),o=i(324),i=new n({initialize:function(){this.entries=new r,this.events=new s},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}});t.exports=i},function(t,e,i){t.exports={ADD:i(736),REMOVE:i(737)}},function(t,e,i){var n=i(323),r=i(0),s=i(22),i=new r({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.obj=new n,this.tilemap=new n,this.xml=new n,this.custom={},this.game.events.once(s.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,e=["binary","bitmapFont","json","physics","shader","audio","video","text","html","obj","tilemap","xml"],i=0;i<e.length;i++)this[e[i]].destroy(),this[e[i]]=null;for(t in this.custom)this.custom[t].destroy();this.custom=null,this.game=null}});t.exports=i},function(t,e,i){var r=i(133),g=i(190),o=i(18),n=i(0),s=i(11),a=i(333),m=i(37),y=i(135),h=i(10),l=i(3),i=new n({Extends:r,Mixins:[s.Flip,s.Tint,s.Pipeline],initialize:function(t,e,i,n){r.call(this,t,e,i,n),this.postPipelines=[],this.pipelineData={},this.inputEnabled=!0,this.fadeEffect=new a.Fade(this),this.flashEffect=new a.Flash(this),this.shakeEffect=new a.Shake(this),this.panEffect=new a.Pan(this),this.rotateToEffect=new a.RotateTo(this),this.zoomEffect=new a.Zoom(this),this.lerp=new l(1,1),this.followOffset=new l,this.deadzone=null,this._follow=null},setDeadzone:function(t,e){var i,n;return void 0===t?this.deadzone=null:(this.deadzone?(this.deadzone.width=t,this.deadzone.height=e):this.deadzone=new h(0,0,t,e),this._follow&&(t=this.width/2,e=this.height/2,i=this._follow.x-this.followOffset.x,n=this._follow.y-this.followOffset.y,this.midPoint.set(i,n),this.scrollX=i-t,this.scrollY=n-e),g(this.deadzone,this.midPoint.x,this.midPoint.y)),this},fadeIn:function(t,e,i,n,r,s){return this.fadeEffect.start(!1,t,e,i,n,!0,r,s)},fadeOut:function(t,e,i,n,r,s){return this.fadeEffect.start(!0,t,e,i,n,!0,r,s)},fadeFrom:function(t,e,i,n,r,s,o){return this.fadeEffect.start(!1,t,e,i,n,r,s,o)},fade:function(t,e,i,n,r,s,o){return this.fadeEffect.start(!0,t,e,i,n,r,s,o)},flash:function(t,e,i,n,r,s,o){return this.flashEffect.start(t,e,i,n,r,s,o)},shake:function(t,e,i,n,r){return this.shakeEffect.start(t,e,i,n,r)},pan:function(t,e,i,n,r,s,o){return this.panEffect.start(t,e,i,n,r,s,o)},rotateTo:function(t,e,i,n,r,s,o){return this.rotateToEffect.start(t,e,i,n,r,s,o)},zoomTo:function(t,e,i,n,r,s){return this.zoomEffect.start(t,e,i,n,r,s)},preRender:function(){this.renderList.length=0;var t=this.width,e=this.height,i=.5*t,n=.5*e,r=this.zoom,s=this.matrix,o=t*this.originX,a=e*this.originY,h=this._follow,l=this.deadzone,c=this.scrollX,u=this.scrollY;l&&g(l,this.midPoint.x,this.midPoint.y);var d=!1,l=(h&&!this.panEffect.isRunning&&(p=h.x-this.followOffset.x,f=h.y-this.followOffset.y,l?(p<l.x?c=y(c,c-(l.x-p),this.lerp.x):p>l.right&&(c=y(c,c+(p-l.right),this.lerp.x)),f<l.y?u=y(u,u-(l.y-f),this.lerp.y):f>l.bottom&&(u=y(u,u+(f-l.bottom),this.lerp.y))):(c=y(c,p-o,this.lerp.x),u=y(u,f-a,this.lerp.y)),d=!0),this.useBounds&&(c=this.clampX(c),u=this.clampY(u)),this.roundPixels&&(o=Math.round(o),a=Math.round(a),c=Math.round(c),u=Math.round(u)),(this.scrollX=c)+i),p=(this.scrollY=u)+n,f=(this.midPoint.set(l,p),t/r),c=e/r,i=l-f/2,u=p-c/2;this.roundPixels&&(i=Math.round(i),u=Math.round(u)),this.worldView.setTo(i,u,f,c),s.applyITRS(this.x+o,this.y+a,this.rotation,r,r),s.translate(-o,-a),this.shakeEffect.preRender(),d&&this.emit(m.FOLLOW_UPDATE,this,h)},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 this.followOffset.set(t=void 0===t?0:t,e=void 0===e?0:e),this},startFollow:function(t,e,i,n,r,s){void 0===e&&(e=!1),void 0===i&&(i=1),void 0===n&&(n=i),void 0===r&&(r=0),void 0===s&&(s=r),this._follow=t,this.roundPixels=e,i=o(i,0,1),n=o(n,0,1),this.lerp.set(i,n),this.followOffset.set(r,s);e=this.width/2,i=this.height/2,n=t.x-r,r=t.y-s;return this.midPoint.set(n,r),this.scrollX=n-e,this.scrollY=r-i,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(),r.prototype.destroy.call(this),this._follow=null,this.deadzone=null}});t.exports=i},function(t,e,i){var r=i(38);t.exports=function(t){var e=new r;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,n,t=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return t&&(i=parseInt(t[1],16),n=parseInt(t[2],16),t=parseInt(t[3],16),e.setTo(i,n,t)),e}},function(t,e){t.exports=function(t,e,i,n){return n<<24|t<<16|e<<8|i}},function(t,e){t.exports=function(t,e,i,n){void 0===n&&(n={h:0,s:0,v:0}),t/=255,e/=255,i/=255;var r=Math.min(t,e,i),s=Math.max(t,e,i),o=s-r,a=0,h=0===s?0:o/s,l=s;return s!==r&&(s===t?a=(e-i)/o+(e<i?6:0):s===e?a=(i-t)/o+2:s===i&&(a=(t-e)/o+4),a/=6),n.hasOwnProperty("_h")?(n._h=a,n._s=h,n._v=l):(n.h=a,n.s=h,n.v=l),n}},function(t,e){t.exports=function(t){return 16777215<t?{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}}},function(t,e,i){var n=i(38);t.exports=function(t){return new n(t.r,t.g,t.b,t.a)}},function(t,e,i){var s=i(38);t.exports=function(t){var e,i,n,r=new s,t=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(t.toLowerCase());return t&&(e=parseInt(t[1],10),i=parseInt(t[2],10),n=parseInt(t[3],10),t=void 0!==t[4]?parseFloat(t[4]):1,r.setTo(e,i,n,255*t)),r}},function(t,e,i){t.exports={Fade:i(761),Flash:i(762),Pan:i(763),Shake:i(796),RotateTo:i(797),Zoom:i(798)}},function(t,e,i){t.exports={In:i(764),Out:i(765),InOut:i(766)}},function(t,e,i){t.exports={In:i(767),Out:i(768),InOut:i(769)}},function(t,e,i){t.exports={In:i(770),Out:i(771),InOut:i(772)}},function(t,e,i){t.exports={In:i(773),Out:i(774),InOut:i(775)}},function(t,e,i){t.exports={In:i(776),Out:i(777),InOut:i(778)}},function(t,e,i){t.exports={In:i(779),Out:i(780),InOut:i(781)}},function(t,e,i){t.exports=i(782)},function(t,e,i){t.exports={In:i(783),Out:i(784),InOut:i(785)}},function(t,e,i){t.exports={In:i(786),Out:i(787),InOut:i(788)}},function(t,e,i){t.exports={In:i(789),Out:i(790),InOut:i(791)}},function(t,e,i){t.exports={In:i(792),Out:i(793),InOut:i(794)}},function(t,e,i){t.exports=i(795)},function(t,e,i){var n=i(0),r=i(33),s=i(347),o=i(2),a=i(6),h=i(7),l=i(193),c=i(1),u=i(197),d=i(187),i=new n({initialize:function(t){this.width=a(t=void 0===t?{}:t,"width",1024),this.height=a(t,"height",768),this.zoom=a(t,"zoom",1),this.parent=a(t,"parent",void 0),this.scaleMode=a(t,"scaleMode",0),this.expandParent=a(t,"expandParent",!0),this.autoRound=a(t,"autoRound",!1),this.autoCenter=a(t,"autoCenter",0),this.resizeInterval=a(t,"resizeInterval",500),this.fullscreenTarget=a(t,"fullscreenTarget",null),this.minWidth=a(t,"minWidth",0),this.maxWidth=a(t,"maxWidth",0),this.minHeight=a(t,"minHeight",0),this.maxHeight=a(t,"maxHeight",0);var e=a(t,"scale",null),e=(e&&(this.width=a(e,"width",this.width),this.height=a(e,"height",this.height),this.zoom=a(e,"zoom",this.zoom),this.parent=a(e,"parent",this.parent),this.scaleMode=a(e,"mode",this.scaleMode),this.expandParent=a(e,"expandParent",this.expandParent),this.autoRound=a(e,"autoRound",this.autoRound),this.autoCenter=a(e,"autoCenter",this.autoCenter),this.resizeInterval=a(e,"resizeInterval",this.resizeInterval),this.fullscreenTarget=a(e,"fullscreenTarget",this.fullscreenTarget),this.minWidth=a(e,"min.width",this.minWidth),this.maxWidth=a(e,"max.width",this.maxWidth),this.minHeight=a(e,"min.height",this.minHeight),this.maxHeight=a(e,"max.height",this.maxHeight)),this.renderType=a(t,"type",r.AUTO),this.canvas=a(t,"canvas",null),this.context=a(t,"context",null),this.canvasStyle=a(t,"canvasStyle",null),this.customEnvironment=a(t,"customEnvironment",!1),this.sceneConfig=a(t,"scene",null),this.seed=a(t,"seed",[(Date.now()*Math.random()).toString()]),l.RND=new l.RandomDataGenerator(this.seed),this.gameTitle=a(t,"title",""),this.gameURL=a(t,"url","https://phaser.io"),this.gameVersion=a(t,"version",""),this.autoFocus=a(t,"autoFocus",!0),this.domCreateContainer=a(t,"dom.createContainer",!1),this.domBehindCanvas=a(t,"dom.behindCanvas",!1),this.domPointerEvents=a(t,"dom.pointerEvents","none"),this.inputKeyboard=a(t,"input.keyboard",!0),this.inputKeyboardEventTarget=a(t,"input.keyboard.target",window),this.inputKeyboardCapture=a(t,"input.keyboard.capture",[]),this.inputMouse=a(t,"input.mouse",!0),this.inputMouseEventTarget=a(t,"input.mouse.target",null),this.inputMousePreventDefaultDown=a(t,"input.mouse.preventDefaultDown",!0),this.inputMousePreventDefaultUp=a(t,"input.mouse.preventDefaultUp",!0),this.inputMousePreventDefaultMove=a(t,"input.mouse.preventDefaultMove",!0),this.inputMousePreventDefaultWheel=a(t,"input.mouse.preventDefaultWheel",!0),this.inputTouch=a(t,"input.touch",s.input.touch),this.inputTouchEventTarget=a(t,"input.touch.target",null),this.inputTouchCapture=a(t,"input.touch.capture",!0),this.inputActivePointers=a(t,"input.activePointers",1),this.inputSmoothFactor=a(t,"input.smoothFactor",0),this.inputWindowEvents=a(t,"input.windowEvents",!0),this.inputGamepad=a(t,"input.gamepad",!1),this.inputGamepadEventTarget=a(t,"input.gamepad.target",window),this.disableContextMenu=a(t,"disableContextMenu",!1),this.audio=a(t,"audio",{}),this.hideBanner=!1===a(t,"banner",null),this.hidePhaser=a(t,"banner.hidePhaser",!1),this.bannerTextColor=a(t,"banner.text","#ffffff"),this.bannerBackgroundColor=a(t,"banner.background",["#ff0000","#ffff00","#00ff00","#00ffff","#000000"]),""===this.gameTitle&&this.hidePhaser&&(this.hideBanner=!0),this.fps=a(t,"fps",null),a(t,"render",t)),e=(this.pipeline=a(e,"pipeline",null),this.antialias=a(e,"antialias",!0),this.antialiasGL=a(e,"antialiasGL",!0),this.mipmapFilter=a(e,"mipmapFilter","LINEAR"),this.desynchronized=a(e,"desynchronized",!1),this.roundPixels=a(e,"roundPixels",!1),this.pixelArt=a(e,"pixelArt",1!==this.zoom),this.pixelArt&&(this.antialias=!1,this.antialiasGL=!1,this.roundPixels=!0),this.transparent=a(e,"transparent",!1),this.clearBeforeRender=a(e,"clearBeforeRender",!0),this.preserveDrawingBuffer=a(e,"preserveDrawingBuffer",!1),this.premultipliedAlpha=a(e,"premultipliedAlpha",!0),this.failIfMajorPerformanceCaveat=a(e,"failIfMajorPerformanceCaveat",!1),this.powerPreference=a(e,"powerPreference","default"),this.batchSize=a(e,"batchSize",4096),this.maxTextures=a(e,"maxTextures",-1),this.maxLights=a(e,"maxLights",10),a(t,"backgroundColor",0)),e=(this.backgroundColor=d(e),this.transparent&&(this.backgroundColor=d(0),this.backgroundColor.alpha=0),this.preBoot=a(t,"callbacks.preBoot",c),this.postBoot=a(t,"callbacks.postBoot",c),this.physics=a(t,"physics",{}),this.defaultPhysicsSystem=a(this.physics,"default",!1),this.loaderBaseURL=a(t,"loader.baseURL",""),this.loaderPath=a(t,"loader.path",""),s.os.android?6:32),e=(this.loaderMaxParallelDownloads=a(t,"loader.maxParallelDownloads",e),this.loaderCrossOrigin=a(t,"loader.crossOrigin",void 0),this.loaderResponseType=a(t,"loader.responseType",""),this.loaderAsync=a(t,"loader.async",!0),this.loaderUser=a(t,"loader.user",""),this.loaderPassword=a(t,"loader.password",""),this.loaderTimeout=a(t,"loader.timeout",0),this.loaderWithCredentials=a(t,"loader.withCredentials",!1),this.installGlobalPlugins=[],this.installScenePlugins=[],a(t,"plugins",null)),i=u.DefaultScene,e=(e&&(Array.isArray(e)?this.defaultPlugins=e:h(e)&&(this.installGlobalPlugins=o(e,"global",[]),this.installScenePlugins=o(e,"scene",[]),Array.isArray(e.default)?i=e.default:Array.isArray(e.defaultMerge)&&(i=i.concat(e.defaultMerge)))),this.defaultPlugins=i,"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg");this.defaultImage=a(t,"images.default",e+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=a(t,"images.missing",e+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="),this.whiteImage=a(t,"images.white","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABdJREFUeNpi/P//PwMMMDEgAdwcgAADAJZuAwXJYZOzAAAAAElFTkSuQmCC"),window&&(window.FORCE_WEBGL?this.renderType=r.WEBGL:window.FORCE_CANVAS&&(this.renderType=r.CANVAS))}});t.exports=i},function(t,e,i){t.exports={os:i(105),browser:i(136),features:i(191),input:i(808),audio:i(809),video:i(810),fullscreen:i(811),canvasFeatures:i(348)}},function(t,e,i){var n,r,s,o=i(31),a={supportInverseAlpha:!1,supportNewBlendModes:!1};t.exports=("function"!=typeof importScripts&&void 0!==document&&(a.supportNewBlendModes=(n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",r="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",(s=new Image).onload=function(){var e=new Image;e.onload=function(){var t=o.create(e,6,1).getContext("2d");if(t.globalCompositeOperation="multiply",t.drawImage(s,0,0),t.drawImage(e,2,0),!t.getImageData(2,0,1,1))return!1;t=t.getImageData(2,0,1,1).data;o.remove(e),a.supportNewBlendModes=255===t[0]&&0===t[1]&&0===t[2]},e.src=n+"/wCKxvRF"+r},s.src=n+"AP804Oa6"+r,!1),a.supportInverseAlpha=function(){var t=o.create(this,2,1).getContext("2d"),e=(t.fillStyle="rgba(10, 20, 30, 0.5)",t.fillRect(0,0,1,1),t.getImageData(0,0,1,1));if(null===e)return!1;t.putImageData(e,1,0);t=t.getImageData(1,0,1,1);return t.data[0]===e.data[0]&&t.data[1]===e.data[1]&&t.data[2]===e.data[2]&&t.data[3]===e.data[3]}()),a)},function(t,e){t.exports=function(t,e,i,n){return Math.atan2(n-e,i-t)}},function(t,e){t.exports=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)}},function(t,e){t.exports=function(t){return 0<=(t%=2*Math.PI)?t:t+2*Math.PI}},function(t,e){t.exports=function(t,e){var i=t.x-e.x,t=t.y-e.y;return Math.sqrt(i*i+t*t)}},function(t,e){t.exports=function(t,e,i,n){t-=i,i=e-n;return t*t+i*i}},function(t,e){t.exports=function(t,e,i){return e-(i=void 0===i?1e-4:i)<t}},function(t,e){t.exports=function(t,e,i){return t<e+(i=void 0===i?1e-4:i)}},function(t,e,i){var n=i(357);t.exports=function(t,e){return n(t)/n(e)/n(t-e)}},function(t,e){t.exports=function(t){if(0===t)return 1;for(var e=t;--t;)e*=t;return e}},function(t,e){t.exports=function(t,e,i,n,r){return(s=1-t)*s*s*e+3*(s=1-t)*s*t*i+3*(1-t)*t*t*n+t*t*t*r;var s}},function(t,e){t.exports=function(t,e,i,n){return(r=1-t)*r*e+2*(1-t)*t*i+t*t*n;var r}},function(t,e,i){var n=i(184);t.exports=function(t,e,i){return e+(i-e)*n(t,0,1)}},function(t,e){t.exports=function(t){t=Math.log(t)/.6931471805599453;return 1<<Math.ceil(t)}},function(t,e){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}},function(t,e){t.exports=function(t){return 0<t?Math.ceil(t):Math.floor(t)}},function(t,e,i){var n=new(i(0))({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,t=t.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},fromMat4:function(t){var t=t.val,e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[4],e[4]=t[5],e[5]=t[6],e[6]=t[8],e[7]=t[9],e[8]=t[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],r=t[3],s=t[4],o=t[5],a=t[6],h=t[7],l=t[8],c=l*s-o*h,u=-l*r+o*a,d=h*r-s*a,p=e*c+i*u+n*d;return p?(t[0]=c*(p=1/p),t[1]=(-l*i+n*h)*p,t[2]=(o*i-n*s)*p,t[3]=u*p,t[4]=(l*e-n*a)*p,t[5]=(-o*e+n*r)*p,t[6]=d*p,t[7]=(-h*e+i*a)*p,t[8]=(s*e-i*r)*p,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=t[2],r=t[3],s=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return t[0]=s*l-o*h,t[1]=n*h-i*l,t[2]=i*o-n*s,t[3]=o*a-r*l,t[4]=e*l-n*a,t[5]=n*r-e*o,t[6]=r*h-s*a,t[7]=i*a-e*h,t[8]=e*s-i*r,this},determinant:function(){var t=this.val,e=t[0],i=t[1],n=t[2],r=t[3],s=t[4],o=t[5],a=t[6],h=t[7],t=t[8];return e*(t*s-o*h)+i*(-t*r+o*a)+n*(h*r-s*a)},multiply:function(t){var e=this.val,i=e[0],n=e[1],r=e[2],s=e[3],o=e[4],a=e[5],h=e[6],l=e[7],c=e[8],t=t.val,u=t[0],d=t[1],p=t[2],f=t[3],g=t[4],m=t[5],y=t[6],v=t[7],t=t[8];return e[0]=u*i+d*s+p*h,e[1]=u*n+d*o+p*l,e[2]=u*r+d*a+p*c,e[3]=f*i+g*s+m*h,e[4]=f*n+g*o+m*l,e[5]=f*r+g*a+m*c,e[6]=y*i+v*s+t*h,e[7]=y*n+v*o+t*l,e[8]=y*r+v*a+t*c,this},translate:function(t){var e=this.val,i=t.x,t=t.y;return e[6]=i*e[0]+t*e[3]+e[6],e[7]=i*e[1]+t*e[4]+e[7],e[8]=i*e[2]+t*e[5]+e[8],this},rotate:function(t){var e=this.val,i=e[0],n=e[1],r=e[2],s=e[3],o=e[4],a=e[5],h=Math.sin(t),t=Math.cos(t);return e[0]=t*i+h*s,e[1]=t*n+h*o,e[2]=t*r+h*a,e[3]=t*s-h*i,e[4]=t*o-h*n,e[5]=t*a-h*r,this},scale:function(t){var e=this.val,i=t.x,t=t.y;return e[0]=i*e[0],e[1]=i*e[1],e[2]=i*e[2],e[3]=t*e[3],e[4]=t*e[4],e[5]=t*e[5],this},fromQuat:function(t){var e=t.x,i=t.y,n=t.z,t=t.w,r=e+e,s=i+i,o=n+n,a=e*r,h=e*s,e=e*o,l=i*s,i=i*o,n=n*o,r=t*r,s=t*s,t=t*o,o=this.val;return o[0]=1-(l+n),o[3]=h+t,o[6]=e-s,o[1]=h-t,o[4]=1-(a+n),o[7]=i+r,o[2]=e+s,o[5]=i-r,o[8]=1-(a+l),this},normalFromMat4:function(t){var t=t.val,e=this.val,i=t[0],n=t[1],r=t[2],s=t[3],o=t[4],a=t[5],h=t[6],l=t[7],c=t[8],u=t[9],d=t[10],p=t[11],f=t[12],g=t[13],m=t[14],t=t[15],y=i*a-n*o,v=i*h-r*o,x=i*l-s*o,b=n*h-r*a,w=n*l-s*a,T=r*l-s*h,S=c*g-u*f,P=c*m-d*f,c=c*t-p*f,_=u*m-d*g,u=u*t-p*g,d=d*t-p*m,p=y*d-v*u+x*_+b*c-w*P+T*S;return p?(e[0]=(a*d-h*u+l*_)*(p=1/p),e[1]=(h*c-o*d-l*P)*p,e[2]=(o*u-a*c+l*S)*p,e[3]=(r*u-n*d-s*_)*p,e[4]=(i*d-r*c+s*P)*p,e[5]=(n*c-i*u-s*S)*p,e[6]=(g*T-m*w+t*b)*p,e[7]=(m*x-f*T-t*v)*p,e[8]=(f*w-g*x+t*y)*p,this):null}});t.exports=n},function(t,e,i){var n=i(0),r=i(364),s=i(1),i=i(39),o=new Int8Array([1,2,0]),a=new Float32Array([0,0,0]),h=new i(1,0,0),l=new i(0,1,0),c=new i,u=new r,i=new n({initialize:function(t,e,i,n){this.onChangeCallback=s,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,r){return void 0===r&&(r=!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),r&&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,r=t*t+e*e+i*i+n*n;return 0<r&&(r=1/Math.sqrt(r),this._x=t*r,this._y=e*r,this._z=i*r,this._w=n*r),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){var i=this.x,n=this.y,r=this.z,s=this.w;return this.set(i+(e=void 0===e?0:e)*(t.x-i),n+e*(t.y-n),r+e*(t.z-r),s+e*(t.w-s))},rotationTo:function(t,e){var i=t.x*e.x+t.y*e.y+t.z*e.z;return i<-.999999?(c.copy(h).cross(t).length()<1e-6&&c.copy(l).cross(t),c.normalize(),this.setAxisAngle(c,Math.PI)):.999999<i?this.set(0,0,0,1):(c.copy(t).cross(e),this._x=c.x,this._y=c.y,this._z=c.z,this._w=1+i,this.normalize())},setAxes:function(t,e,i){var n=u.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(u).normalize()},identity:function(){return this.set(0,0,0,1)},setAxisAngle:function(t,e){e*=.5;var i=Math.sin(e);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,r=this.w,s=t.x,o=t.y,a=t.z,t=t.w;return this.set(e*t+r*s+i*a-n*o,i*t+r*o+n*s-e*a,n*t+r*a+e*o-i*s,r*t-e*s-i*o-n*a)},slerp:function(t,e){var i=this.x,n=this.y,r=this.z,s=this.w,o=t.x,a=t.y,h=t.z,t=t.w,l=i*o+n*a+r*h+s*t;l<0&&(l=-l,o=-o,a=-a,h=-h,t=-t);var c,u=1-e,d=e;return 1e-6<1-l&&(l=Math.acos(l),c=Math.sin(l),u=Math.sin((1-e)*l)/c,d=Math.sin(e*l)/c),this.set(u*i+d*o,u*n+d*a,u*r+d*h,u*s+d*t)},invert:function(){var t=this.x,e=this.y,i=this.z,n=this.w,r=t*t+e*e+i*i+n*n,r=r?1/r: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,r=this.w,s=Math.sin(t),t=Math.cos(t);return this.set(e*t+r*s,i*t+n*s,n*t-i*s,r*t-e*s)},rotateY:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,r=this.w,s=Math.sin(t),t=Math.cos(t);return this.set(e*t-n*s,i*t+r*s,n*t+e*s,r*t-i*s)},rotateZ:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,r=this.w,s=Math.sin(t),t=Math.cos(t);return this.set(e*t+i*s,i*t-e*s,n*t+r*s,r*t-n*s)},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,r=t.z/2,s=Math.cos(i),o=Math.cos(n),a=Math.cos(r),h=Math.sin(i),l=Math.sin(n),c=Math.sin(r);switch(t.order){case"XYZ":this.set(h*o*a+s*l*c,s*l*a-h*o*c,s*o*c+h*l*a,s*o*a-h*l*c,e);break;case"YXZ":this.set(h*o*a+s*l*c,s*l*a-h*o*c,s*o*c-h*l*a,s*o*a+h*l*c,e);break;case"ZXY":this.set(h*o*a-s*l*c,s*l*a+h*o*c,s*o*c+h*l*a,s*o*a-h*l*c,e);break;case"ZYX":this.set(h*o*a-s*l*c,s*l*a+h*o*c,s*o*c-h*l*a,s*o*a+h*l*c,e);break;case"YZX":this.set(h*o*a+s*l*c,s*l*a+h*o*c,s*o*c-h*l*a,s*o*a-h*l*c,e);break;case"XZY":this.set(h*o*a-s*l*c,s*l*a-h*o*c,s*o*c+h*l*a,s*o*a+h*l*c,e)}return this},setFromRotationMatrix:function(t){var e,t=t.val,i=t[0],n=t[4],r=t[8],s=t[1],o=t[5],a=t[9],h=t[2],l=t[6],t=t[10],c=i+o+t;return 0<c?(e=.5/Math.sqrt(c+1),this.set((l-a)*e,(r-h)*e,(s-n)*e,.25/e)):o<i&&t<i?(e=2*Math.sqrt(1+i-o-t),this.set(.25*e,(n+s)/e,(r+h)/e,(l-a)/e)):t<o?(e=2*Math.sqrt(1+o-i-t),this.set((n+s)/e,.25*e,(a+l)/e,(r-h)/e)):(e=2*Math.sqrt(1+t-i-o),this.set((r+h)/e,(a+l)/e,.25*e,(s-n)/e)),this},fromMat3:function(t){var e,i,n,t=t.val,r=t[0]+t[4]+t[8];return 0<r?(n=Math.sqrt(r+1),this.w=.5*n,this._x=(t[7]-t[5])*(n=.5/n),this._y=(t[2]-t[6])*n,this._z=(t[3]-t[1])*n):(t[4]>t[r=0]&&(r=1),t[8]>t[3*r+r]&&(r=2),e=o[r],i=o[e],n=Math.sqrt(t[3*r+r]-t[3*e+e]-t[3*i+i]+1),a[r]=.5*n,a[e]=(t[3*e+r]+t[3*r+e])*(n=.5/n),a[i]=(t[3*i+r]+t[3*r+i])*n,this._x=a[0],this._y=a[1],this._z=a[2],this._w=(t[3*i+e]-t[3*e+i])*n),this.onChangeCallback(this),this}});t.exports=i},function(t,e,r){var s=r(367),o=r(31),a=r(33),h=r(191);t.exports=function(t){var e=t.config;if((e.customEnvironment||e.canvas)&&e.renderType===a.AUTO)throw new Error("Must set explicit renderType in custom environment");if(!e.customEnvironment&&!e.canvas&&e.renderType!==a.HEADLESS)if(e.renderType===a.CANVAS||e.renderType!==a.CANVAS&&!h.webGL){if(!h.canvas)throw new Error("Cannot create Canvas or WebGL context, aborting.");e.renderType=a.CANVAS}else e.renderType=a.WEBGL;e.antialias||o.disableSmoothing();var i=t.scale.baseSize,n=i.width,i=i.height;e.canvas?(t.canvas=e.canvas,t.canvas.width=n,t.canvas.height=i):t.canvas=o.create(t,n,i,e.renderType),e.canvasStyle&&(t.canvas.style=e.canvasStyle),e.antialias||s.setCrisp(t.canvas),e.renderType!==a.HEADLESS&&(n=r(368),i=r(371),e.renderType===a.WEBGL?t.renderer=new i(t):(t.renderer=new n(t),t.context=t.renderer.gameContext))}},function(t,e){t.exports={setCrisp:function(e){return["optimizeSpeed","-moz-crisp-edges","-o-crisp-edges","-webkit-optimize-contrast","optimize-contrast","crisp-edges","pixelated"].forEach(function(t){e.style["image-rendering"]=t}),e.style.msInterpolationMode="nearest-neighbor",e},setBicubic:function(t){return t.style["image-rendering"]="auto",t.style.msInterpolationMode="bicubic",t}}},function(t,e,i){var d=i(37),l=i(369),n=i(0),r=i(33),s=i(9),p=i(91),o=i(370),a=i(104),h=i(106),c=i(25),i=new n({Extends:s,initialize:function(t){s.call(this);var e=t.config,i=(this.config={clearBeforeRender:e.clearBeforeRender,backgroundColor:e.backgroundColor,antialias:e.antialias,roundPixels:e.roundPixels},this.game=t,this.type=r.CANVAS,this.drawCount=0,this.width=0,this.height=0,this.gameCanvas=t.canvas,{alpha:t.config.transparent,desynchronized:t.config.desynchronized});this.gameContext=e.context||this.gameCanvas.getContext("2d",i),this.currentContext=this.gameContext,this.antialias=t.config.antialias,this.blendModes=o(),this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92},this._tempMatrix1=new c,this._tempMatrix2=new c,this._tempMatrix3=new c,this.isBooted=!1,this.init()},init:function(){this.game.textures.once(h.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(a.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)},resize:function(t,e){this.width=t,this.height=e,this.emit(p.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),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(p.PRE_RENDER)},render:function(t,e,i){var n=e.length,r=(this.emit(p.RENDER,t,i),i.x),s=i.y,o=i.width,a=i.height,h=(i.renderToTexture?i:t.sys).context,l=(h.save(),this.game.scene.customViewports&&(h.beginPath(),h.rect(r,s,o,a),h.clip()),this.currentContext=h,i.mask);l&&l.preRenderCanvas(this,null,i._maskCamera),i.transparent||(h.fillStyle=i.backgroundColor.rgba,h.fillRect(r,s,o,a)),h.globalAlpha=i.alpha,h.globalCompositeOperation="source-over",this.drawCount+=n,i.renderToTexture&&i.emit(d.PRE_RENDER,i),i.matrix.copyToContext(h);for(var c=0;c<n;c++){var u=e[c];u.mask&&u.mask.preRenderCanvas(this,u,i),u.renderCanvas(this,u,i),u.mask&&u.mask.postRenderCanvas(this,u,i)}h.setTransform(1,0,0,1,0,0),h.globalCompositeOperation="source-over",h.globalAlpha=1,i.flashEffect.postRenderCanvas(h),i.fadeEffect.postRenderCanvas(h),i.dirty=!1,l&&l.postRenderCanvas(this),h.restore(),i.renderToTexture&&(i.emit(d.POST_RENDER,i),i.renderToGame&&t.sys.context.drawImage(i.canvas,r,s))},postRender:function(){this.gameContext.restore(),this.emit(p.POST_RENDER);var t=this.snapshotState;t.callback&&(l(this.gameCanvas,t),t.callback=null)},snapshotCanvas:function(t,e,i,n,r,s,o,a,h){void 0===i&&(i=!1),this.snapshotArea(n,r,s,o,e,a,h);n=this.snapshotState;return n.getPixel=i,l(this.canvas,n),n.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,r,s,o){var a=this.snapshotState;return a.callback=r,a.type=s,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 r,s,o,a,h,l,c,u,d,p,f,g,m,y,v,x=i.alpha*t.alpha;0!=x&&(r=this.currentContext,s=this._tempMatrix1,o=this._tempMatrix2,a=(h=e.canvasData).x,h=h.y,l=e.cutWidth,c=e.cutHeight,u=e.customPivot,d=e.source.resolution,p=t.displayOriginX,f=t.displayOriginY,g=-p+e.x,m=-f+e.y,t.isCropped&&((y=t._crop).flipX===t.flipX&&y.flipY===t.flipY||e.updateCropUVs(y,t.flipX,t.flipY),l=y.cw,c=y.ch,a=y.cx,h=y.cy,g=-p+y.x,m=-f+y.y,t.flipX&&(0<=g?g=-(g+l):g<0&&(g=Math.abs(g)-l)),t.flipY&&(0<=m?m=-(m+c):m<0&&(m=Math.abs(m)-c))),v=y=1,t.flipX&&(u||(g+=-e.realWidth+2*p),y=-1),t.flipY&&(u||(m+=-e.realHeight+2*f),v=-1),o.applyITRS(t.x,t.y,t.rotation,t.scaleX*y,t.scaleY*v),s.copyFrom(i.matrix),n?(s.multiplyWithOffset(n,-i.scrollX*t.scrollFactorX,-i.scrollY*t.scrollFactorY),o.e=t.x,o.f=t.y):(o.e-=i.scrollX*t.scrollFactorX,o.f-=i.scrollY*t.scrollFactorY),s.multiply(o),r.save(),s.setToContext(r),r.globalCompositeOperation=this.blendModes[t.blendMode],r.globalAlpha=x,r.imageSmoothingEnabled=!(!this.antialias||e.source.scaleMode),t.mask&&t.mask.preRenderCanvas(this,t,i),r.drawImage(e.source.image,a,h,l,c,g,m,l/d,c/d),t.mask&&t.mask.postRenderCanvas(this,t,i),r.restore())},destroy:function(){this.removeAllListeners(),this.game=null,this.gameCanvas=null,this.gameContext=null}});t.exports=i},function(t,e,i){var d=i(31),p=i(38),f=i(2);t.exports=function(t,e){var i,n,r,s=f(e,"callback"),o=f(e,"type","image/png"),a=f(e,"encoder",.92),h=Math.abs(Math.round(f(e,"x",0))),l=Math.abs(Math.round(f(e,"y",0))),c=f(e,"width",t.width),u=f(e,"height",t.height);f(e,"getPixel",!1)?(e=t.getContext("2d").getImageData(h,l,1,1).data,s.call(null,new p(e[0],e[1],e[2],e[3]/255))):0!==h||0!==l||c!==t.width||u!==t.height?((i=d.createWebGL(this,c,u)).getContext("2d").drawImage(t,h,l,c,u,0,0,c,u),(n=new Image).onerror=function(){s.call(null),d.remove(i)},n.onload=function(){s.call(null,n),d.remove(i)},n.src=i.toDataURL(o,a)):((r=new Image).onerror=function(){s.call(null)},r.onload=function(){s.call(null,r)},r.src=t.toDataURL(o,a))}},function(t,e,i){var n=i(35),r=i(348);t.exports=function(){var t=[],e=r.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}},function(t,e,i){var n=i(93),o=i(37),r=i(0),p=i(33),s=i(9),h=i(91),f=i(22),g=i(138),m=i(69),a=i(1),y=i(372),l=i(141),c=i(104),v=i(106),x=i(12),d=i(383),i=new r({Extends:s,initialize:function(t){s.call(this);var e=t.config,i={alpha:e.transparent,desynchronized:e.desynchronized,depth:!1,antialias:e.antialiasGL,premultipliedAlpha:e.premultipliedAlpha,stencil:!0,failIfMajorPerformanceCaveat:e.failIfMajorPerformanceCaveat,powerPreference:e.powerPreference,preserveDrawingBuffer:e.preserveDrawingBuffer};this.config={clearBeforeRender:e.clearBeforeRender,antialias:e.antialias,backgroundColor:e.backgroundColor,contextCreation:i,roundPixels:e.roundPixels,maxTextures:e.maxTextures,maxTextureSize:e.maxTextureSize,batchSize:e.batchSize,maxLights:e.maxLights,mipmapFilter:e.mipmapFilter},this.game=t,this.type=p.WEBGL,this.pipelines=null,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},this.currentActiveTexture=0,this.startActiveTexture=0,this.maxTextures=0,this.textureIndexes,this.tempTextures,this.textureZero,this.normalTexture,this.currentFramebuffer=null,this.fboStack=[],this.currentProgram=null,this.currentBlendMode=1/0,this.currentScissorEnabled=!1,this.currentScissor=null,this.scissorStack=[],this.contextLostHandler=a,this.contextRestoredHandler=a,this.gl=null,this.supportedExtensions=null,this.instancedArraysExtension=null,this.vaoExtension=null,this.extensions={},this.glFormats=[],this.compression={ETC1:!1,PVRTC:!1,S3TC:!1},this.drawingBufferHeight=0,this.blankTexture=null,this.whiteTexture=null,this.maskCount=0,this.maskStack=[],this.currentMask={mask:null,camera:null},this.currentCameraMask={mask:null,camera:null},this.glFuncMap=null,this.currentType="",this.newType=!1,this.nextTypeMatch=!1,this.finalType=!1,this.mipmapFilter=null,this.textureFlush=0,this.isTextureClean=!1,this.defaultScissor=[0,0,0,0],this.isBooted=!1,this.renderTarget=null,this.projectionMatrix,this.projectionWidth=0,this.projectionHeight=0,this.init(this.config)},init:function(t){var e=this.game,i=this.canvas,n=t.backgroundColor,r=e.config.context||i.getContext("webgl",t.contextCreation)||i.getContext("experimental-webgl",t.contextCreation);if(!r||r.isContextLost())throw this.contextLost=!0,new Error("WebGL unsupported");this.gl=r;var s=this;this.contextLostHandler=function(t){s.contextLost=!0,s.game.events.emit(f.CONTEXT_LOST,s),t.preventDefault()},this.contextRestoredHandler=function(){s.contextLost=!1,s.init(s.config),s.game.events.emit(f.CONTEXT_RESTORED,s)},i.addEventListener("webglcontextlost",this.contextLostHandler,!1),i.addEventListener("webglcontextrestored",this.contextRestoredHandler,!1),e.context=r;for(var o=0;o<=27;o++)this.blendModes.push({func:[r.ONE,r.ONE_MINUS_SRC_ALPHA],equation:r.FUNC_ADD});this.blendModes[1].func=[r.ONE,r.DST_ALPHA],this.blendModes[2].func=[r.DST_COLOR,r.ONE_MINUS_SRC_ALPHA],this.blendModes[3].func=[r.ONE,r.ONE_MINUS_SRC_COLOR],this.blendModes[17]={func:[r.ZERO,r.ONE_MINUS_SRC_ALPHA],equation:r.FUNC_REVERSE_SUBTRACT},this.glFormats[0]=r.BYTE,this.glFormats[1]=r.SHORT,this.glFormats[2]=r.UNSIGNED_BYTE,this.glFormats[3]=r.UNSIGNED_SHORT,this.glFormats[4]=r.FLOAT,this.glFuncMap={mat2:{func:r.uniformMatrix2fv,length:1,matrix:!0},mat3:{func:r.uniformMatrix3fv,length:1,matrix:!0},mat4:{func:r.uniformMatrix4fv,length:1,matrix:!0},"1f":{func:r.uniform1f,length:1},"1fv":{func:r.uniform1fv,length:1},"1i":{func:r.uniform1i,length:1},"1iv":{func:r.uniform1iv,length:1},"2f":{func:r.uniform2f,length:2},"2fv":{func:r.uniform2fv,length:1},"2i":{func:r.uniform2i,length:2},"2iv":{func:r.uniform2iv,length:1},"3f":{func:r.uniform3f,length:3},"3fv":{func:r.uniform3fv,length:1},"3i":{func:r.uniform3i,length:3},"3iv":{func:r.uniform3iv,length:1},"4f":{func:r.uniform4f,length:4},"4fv":{func:r.uniform4fv,length:1},"4i":{func:r.uniform4i,length:4},"4iv":{func:r.uniform4iv,length:1}};var i=r.getSupportedExtensions(),a=(t.maxTextures&&-1!==t.maxTextures||(t.maxTextures=r.getParameter(r.MAX_TEXTURE_IMAGE_UNITS)),t.maxTextureSize||(t.maxTextureSize=r.getParameter(r.MAX_TEXTURE_SIZE)),"WEBGL_compressed_texture_"),h="WEBKIT_"+a,a=(this.compression.ETC1=r.getExtension(a+"etc1")||r.getExtension(h+"etc1"),this.compression.PVRTC=r.getExtension(a+"pvrtc")||r.getExtension(h+"pvrtc"),this.compression.S3TC=r.getExtension(a+"s3tc")||r.getExtension(h+"s3tc"),this.supportedExtensions=i,"ANGLE_instanced_arrays"),h=(this.instancedArraysExtension=-1<i.indexOf(a)?r.getExtension(a):null,"OES_vertex_array_object"),l=(this.vaoExtension=-1<i.indexOf(h)?r.getExtension(h):null,r.disable(r.DEPTH_TEST),r.disable(r.CULL_FACE),r.enable(r.BLEND),r.clearColor(n.redGL,n.greenGL,n.blueGL,n.alphaGL),this.mipmapFilter=r[t.mipmapFilter],this.maxTextures=x.checkShaderMax(r,t.maxTextures),this.textureIndexes=[],this.tempTextures);if(Array.isArray(l))for(var c=0;o<this.maxTextures;c++)r.deleteTexture(l[c]);else l=new Array(this.maxTextures);for(var u=0;u<this.maxTextures;u++){var d=r.createTexture();r.activeTexture(r.TEXTURE0+u),r.bindTexture(r.TEXTURE_2D,d),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,1,1,0,r.RGBA,r.UNSIGNED_BYTE,new Uint8Array([0,0,255,255])),l[u]=d,this.textureIndexes.push(u)}return this.tempTextures=l,this.currentActiveTexture=1,this.startActiveTexture++,r.activeTexture(r.TEXTURE1),this.pipelines=new y(this),this.setBlendMode(p.BlendModes.NORMAL),this.projectionMatrix=(new m).identity(),e.textures.once(v.READY,this.boot,this),this},boot:function(){var t=this.game,e=this.pipelines,i=t.scale.baseSize,e=(this.width=i.width,this.height=i.height,this.isBooted=!0,this.renderTarget=new l(this,this.width,this.height,1,0,!0,!0),e.boot(t.config.pipeline),this.blankTexture=t.textures.getFrame("__DEFAULT"),this.whiteTexture=t.textures.getFrame("__WHITE"),this.gl);e.bindFramebuffer(e.FRAMEBUFFER,null),e.enable(e.SCISSOR_TEST),t.scale.on(c.RESIZE,this.onResize,this),this.resize(i.width,i.height)},onResize:function(t,e){e.width===this.width&&e.height===this.height||this.resize(e.width,e.height)},beginCapture:function(t,e){void 0===t&&(t=this.width),void 0===e&&(e=this.height),this.renderTarget.bind(!0,t,e),this.setProjectionMatrix(t,e),this.resetTextures()},endCapture:function(){return this.renderTarget.unbind(!0),this.resetProjectionMatrix(),this.renderTarget},resize:function(t,e){var i=this.gl;return this.width=t,this.height=e,this.setProjectionMatrix(t,e),i.viewport(0,0,t,e),this.drawingBufferHeight=i.drawingBufferHeight,i.scissor(0,i.drawingBufferHeight-e,t,e),this.defaultScissor[2]=t,this.defaultScissor[3]=e,this.emit(h.RESIZE,t,e),this},getAspectRatio:function(){return this.width/this.height},setProjectionMatrix:function(t,e){return t===this.projectionWidth&&e===this.projectionHeight||(this.projectionWidth=t,this.projectionHeight=e,this.projectionMatrix.ortho(0,t,e,0,-1e3,1e3)),this},resetProjectionMatrix:function(){this.projectionWidth=this.width,this.projectionHeight=this.height,this.projectionMatrix.ortho(0,this.width,this.height,0,-1e3,1e3)},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},flush:function(){this.pipelines.flush()},pushScissor:function(t,e,i,n,r){void 0===r&&(r=this.drawingBufferHeight);var s=[t,e,i,n];return this.scissorStack.push(s),this.setScissor(t,e,i,n,r),this.currentScissor=s},setScissor:function(t,e,i,n,r){void 0===r&&(r=this.drawingBufferHeight);var s,o,a,h=this.gl,l=this.currentScissor,c=0<i&&0<n;l&&c&&(s=l[0],o=l[1],a=l[2],l=l[3],c=s!==t||o!==e||a!==i||l!==n),c&&(this.flush(),h.scissor(t,r-e-n,i,n))},resetScissor:function(){var t=this.gl;t.enable(t.SCISSOR_TEST);var e,i,n,r=this.currentScissor;r&&(e=r[0],i=r[1],n=r[2],r=r[3],0<n&&0<r&&t.scissor(e,this.drawingBufferHeight-i-r,n,r))},popScissor:function(){var t=this.scissorStack,t=(t.pop(),t[t.length-1]);t&&this.setScissor(t[0],t[1],t[2],t[3]),this.currentScissor=t},hasActiveStencilMask:function(){var t=this.currentMask.mask,e=this.currentCameraMask.mask;return t&&t.isStencil||e&&e.isStencil},resetViewport:function(){var t=this.gl;t.viewport(0,0,this.width,this.height),this.drawingBufferHeight=t.drawingBufferHeight},setBlendMode:function(t,e){var i=this.gl,n=this.blendModes[t];return!!((e=void 0===e?!1:e)||t!==p.BlendModes.SKIP_CHECK&&this.currentBlendMode!==t)&&(this.flush(),i.enable(i.BLEND),i.blendEquation(n.equation),2<n.func.length?i.blendFuncSeparate(n.func[0],n.func[1],n.func[2],n.func[3]):i.blendFunc(n.func[0],n.func[1]),this.currentBlendMode=t,!0)},addBlendMode:function(t,e){return this.blendModes.push({func:t,equation:e})-1},updateBlendMode:function(t,e,i){return this.blendModes[t]&&(this.blendModes[t].func=e,i&&(this.blendModes[t].equation=i)),this},removeBlendMode:function(t){return 17<t&&this.blendModes[t]&&this.blendModes.splice(t,1),this},setBlankTexture:function(){this.setTexture2D(this.blankTexture.glTexture)},setTextureSource:function(t){var e,i;return this.pipelines.forceZero()?(this.setTextureZero(t.glTexture,!0),0):(e=this.gl,i=this.currentActiveTexture,t.glIndexCounter<this.startActiveTexture&&(t.glIndexCounter=this.startActiveTexture,i<this.maxTextures?(t.glIndex=i,e.activeTexture(e.TEXTURE0+i),e.bindTexture(e.TEXTURE_2D,t.glTexture),this.currentActiveTexture++):(this.flush(),this.startActiveTexture++,this.textureFlush++,t.glIndexCounter=this.startActiveTexture,t.glIndex=1,e.activeTexture(e.TEXTURE1),e.bindTexture(e.TEXTURE_2D,t.glTexture),this.currentActiveTexture=2)),this.isTextureClean=!1,t.glIndex)},isNewNormalMap:function(t,e){return this.textureZero!==t||this.normalTexture!==e},setTextureZero:function(t,e){this.textureZero!==t&&(e&&this.flush(),(e=this.gl).activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,t),this.textureZero=t)},clearTextureZero:function(){this.textureZero=null},setNormalMap:function(t){var e;this.normalTexture!==t&&((e=this.gl).activeTexture(e.TEXTURE1),e.bindTexture(e.TEXTURE_2D,t),this.normalTexture=t,1===this.currentActiveTexture&&(this.currentActiveTexture=2))},clearNormalMap:function(){this.normalTexture=null,this.startActiveTexture++,this.currentActiveTexture=1,this.textureFlush++},unbindTextures:function(){for(var t=this.gl,e=this.tempTextures,i=0;i<e.length;i++)t.activeTexture(t.TEXTURE0+i),t.bindTexture(t.TEXTURE_2D,null);this.normalTexture=null,this.textureZero=null,this.currentActiveTexture=1,this.startActiveTexture++,this.textureFlush++},resetTextures:function(t){if(void 0===t&&(t=!1),!this.isTextureClean){this.flush();var e=this.gl,i=this.tempTextures;if(t){for(var n=0;n<i.length;n++)e.activeTexture(e.TEXTURE0+n),e.bindTexture(e.TEXTURE_2D,i[n]);e.activeTexture(e.TEXTURE1),e.bindTexture(e.TEXTURE_2D,i[1]),this.isTextureClean=!0}else e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,i[0]),e.activeTexture(e.TEXTURE1),e.bindTexture(e.TEXTURE_2D,i[1]);this.normalTexture=null,this.textureZero=null,this.currentActiveTexture=1,this.startActiveTexture++,this.textureFlush++}},setTexture2D:function(t){var e,i;return this.pipelines.forceZero()?(this.setTextureZero(t,!0),0):(e=this.gl,i=this.currentActiveTexture,t.glIndexCounter<this.startActiveTexture&&(t.glIndexCounter=this.startActiveTexture,i<this.maxTextures?(t.glIndex=i,e.activeTexture(e.TEXTURE0+i),e.bindTexture(e.TEXTURE_2D,t),this.currentActiveTexture++):(this.flush(),this.startActiveTexture++,this.textureFlush++,t.glIndexCounter=this.startActiveTexture,t.glIndex=1,e.activeTexture(e.TEXTURE1),e.bindTexture(e.TEXTURE_2D,t),this.currentActiveTexture=2)),this.isTextureClean=!1,t.glIndex)},pushFramebuffer:function(t,e,i,n){return t===this.currentFramebuffer?this:(this.fboStack.push(t),this.setFramebuffer(t,e,i,n))},setFramebuffer:function(t,e,i,n){var r,s,o;return void 0===e&&(e=!1),void 0===i&&(i=!1),void 0===n&&(n=!0),t!==this.currentFramebuffer&&(r=this.gl,s=this.width,o=this.height,t&&t.renderTexture&&n?(s=t.renderTexture.width,o=t.renderTexture.height):this.flush(),r.bindFramebuffer(r.FRAMEBUFFER,t),n&&r.viewport(0,0,s,o),e&&(t?(this.drawingBufferHeight=o,this.pushScissor(0,0,s,o)):(this.drawingBufferHeight=this.height,this.popScissor())),this.currentFramebuffer=t,i&&this.resetTextures()),this},popFramebuffer:function(t,e,i){void 0===t&&(t=!1),void 0===e&&(e=!1),void 0===i&&(i=!0);var n=this.fboStack,n=(n.pop(),n[n.length-1]||null);return this.setFramebuffer(n,t,e,i),n},setProgram:function(t){return t!==this.currentProgram&&(this.flush(),this.gl.useProgram(t),this.currentProgram=t,!0)},resetProgram:function(){return this.gl.useProgram(this.currentProgram),this},createTextureFromSource:function(t,e,i,n){var r=this.gl,s=r.NEAREST,o=r.NEAREST,a=r.CLAMP_TO_EDGE,h=(e=t?t.width:e,i=t?t.height:i,g(e,i));return h&&(a=r.REPEAT),n===p.ScaleModes.LINEAR&&this.config.antialias&&(s=h?this.mipmapFilter:r.LINEAR,o=r.LINEAR),t||"number"!=typeof e||"number"!=typeof i?this.createTexture2D(0,s,o,a,a,r.RGBA,t):this.createTexture2D(0,s,o,a,a,r.RGBA,null,e,i)},createTexture2D:function(t,e,i,n,r,s,o,a,h,l,c,u){l=null==l||l,void 0===c&&(c=!1),void 0===u&&(u=!1);var d=this.gl,p=d.createTexture(),f=(d.activeTexture(d.TEXTURE0),d.getParameter(d.TEXTURE_BINDING_2D));return d.bindTexture(d.TEXTURE_2D,p),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MIN_FILTER,e),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MAG_FILTER,i),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_S,r),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_T,n),d.pixelStorei(d.UNPACK_PREMULTIPLY_ALPHA_WEBGL,l),d.pixelStorei(d.UNPACK_FLIP_Y_WEBGL,u),null==o?d.texImage2D(d.TEXTURE_2D,t,s,a,h,0,s,d.UNSIGNED_BYTE,null):(c||(a=o.width,h=o.height),d.texImage2D(d.TEXTURE_2D,t,s,s,d.UNSIGNED_BYTE,o)),g(a,h)&&d.generateMipmap(d.TEXTURE_2D),f&&d.bindTexture(d.TEXTURE_2D,f),p.isAlphaPremultiplied=l,p.isRenderTexture=!1,p.width=a,p.height=h,p.glIndex=0,p.glIndexCounter=-1,p},createFramebuffer:function(t,e,i,n){var r=this.gl,s=r.createFramebuffer();if(this.setFramebuffer(s),n&&(n=r.createRenderbuffer(),r.bindRenderbuffer(r.RENDERBUFFER,n),r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,t,e),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,n)),i.isRenderTexture=!0,i.isAlphaPremultiplied=!1,r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,i,0),(t=r.checkFramebufferStatus(r.FRAMEBUFFER))===r.FRAMEBUFFER_COMPLETE)return s.renderTexture=i,this.setFramebuffer(null),this.resetTextures(),s;throw new Error("Framebuffer status: "+{36054:"Incomplete Attachment",36055:"Missing Attachment",36057:"Incomplete Dimensions",36061:"Framebuffer Unsupported"}[t])},createProgram:function(t,e){var i=this.gl,n=i.createProgram(),r=i.createShader(i.VERTEX_SHADER),s=i.createShader(i.FRAGMENT_SHADER);if(i.shaderSource(r,t),i.shaderSource(s,e),i.compileShader(r),i.compileShader(s),!i.getShaderParameter(r,i.COMPILE_STATUS))throw new Error("Vertex Shader failed:\n"+i.getShaderInfoLog(r));if(!i.getShaderParameter(s,i.COMPILE_STATUS))throw new Error("Fragment Shader failed:\n"+i.getShaderInfoLog(s));if(i.attachShader(n,r),i.attachShader(n,s),i.linkProgram(n),i.getProgramParameter(n,i.LINK_STATUS))return i.useProgram(n),n;throw new Error("Link Program failed:\n"+i.getProgramInfoLog(n))},createVertexBuffer:function(t,e){var i=this.gl,n=i.createBuffer();return i.bindBuffer(i.ARRAY_BUFFER,n),i.bufferData(i.ARRAY_BUFFER,t,e),i.bindBuffer(i.ARRAY_BUFFER,null),n},createIndexBuffer:function(t,e){var i=this.gl,n=i.createBuffer();return i.bindBuffer(i.ELEMENT_ARRAY_BUFFER,n),i.bufferData(i.ELEMENT_ARRAY_BUFFER,t,e),i.bindBuffer(i.ELEMENT_ARRAY_BUFFER,null),n},deleteTexture:function(t,e){return e&&this.resetTextures(!0),t&&this.gl.deleteTexture(t),this},deleteFramebuffer:function(t){return t&&(this.gl.deleteFramebuffer(t),n(this.fboStack,t),this.currentFramebuffer===t&&(this.currentFramebuffer=null)),this},deleteProgram:function(t){return t&&this.gl.deleteProgram(t),this},deleteBuffer:function(t){return this.gl.deleteBuffer(t),this},preRenderCamera:function(t){var e=t.x,i=t.y,n=t.width,r=t.height,s=t.backgroundColor;t.emit(o.PRE_RENDER,t),this.pipelines.preBatchCamera(t),this.pushScissor(e,i,n,r),t.mask&&(this.currentCameraMask.mask=t.mask,this.currentCameraMask.camera=t._maskCamera,t.mask.preRenderWebGL(this,t,t._maskCamera)),0<s.alphaGL&&this.pipelines.setMulti().drawFillRect(e,i,n,r,x.getTintFromFloats(s.blueGL,s.greenGL,s.redGL,1),s.alphaGL)},getCurrentStencilMask:function(){var t=null,e=this.maskStack,i=this.currentCameraMask;return 0<e.length?t=e[e.length-1]:i.mask&&i.mask.isStencil&&(t=i),t},postRenderCamera:function(t){var e,i=t.flashEffect,n=t.fadeEffect;(i.isRunning||n.isRunning||n.isComplete)&&(e=this.pipelines.setMulti(),i.postRenderWebGL(e,x.getTintFromFloats),n.postRenderWebGL(e,x.getTintFromFloats)),t.dirty=!1,this.popScissor(),t.mask&&(this.currentCameraMask.mask=null,t.mask.postRenderWebGL(this,t._maskCamera)),this.pipelines.postBatchCamera(t),t.emit(o.POST_RENDER,t)},preRender:function(){var t,e;this.contextLost||((t=this.gl).bindFramebuffer(t.FRAMEBUFFER,null),this.config.clearBeforeRender&&(e=this.config.backgroundColor,t.clearColor(e.redGL,e.greenGL,e.blueGL,e.alphaGL),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT|t.STENCIL_BUFFER_BIT)),t.enable(t.SCISSOR_TEST),this.currentScissor=this.defaultScissor,this.scissorStack.length=0,this.scissorStack.push(this.currentScissor),this.game.scene.customViewports&&t.scissor(0,this.drawingBufferHeight-this.height,this.width,this.height),this.currentMask.mask=null,this.currentCameraMask.mask=null,this.maskStack.length=0,this.textureFlush=0,this.emit(h.PRE_RENDER))},render:function(t,e,i){if(!this.contextLost){var n=e.length;if(this.emit(h.RENDER,t,i),this.preRenderCamera(i),0===n);else{this.currentType="";for(var r=this.currentMask,s=0;s<n;s++){this.finalType=s===n-1;var o=e[s],a=o.mask,a=((r=this.currentMask).mask&&r.mask!==a&&r.mask.postRenderWebGL(this,r.camera),a&&r.mask!==a&&a.preRenderWebGL(this,o,i),o.blendMode!==this.currentBlendMode&&this.setBlendMode(o.blendMode),o.type);a!==this.currentType&&(this.newType=!0,this.currentType=a),this.finalType?this.nextTypeMatch=!1:this.nextTypeMatch=e[s+1].type===this.currentType,o.renderWebGL(this,o,i),this.newType=!1}(r=this.currentMask).mask&&r.mask.postRenderWebGL(this,r.camera)}this.setBlendMode(p.BlendModes.NORMAL),this.postRenderCamera(i)}},postRender:function(){var t;this.contextLost||(this.flush(),this.emit(h.POST_RENDER),(t=this.snapshotState).callback&&(d(this.canvas,t),t.callback=null),0<this.textureFlush&&(this.startActiveTexture++,this.currentActiveTexture=1))},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,r,s,o){var a=this.snapshotState;return a.callback=r,a.type=s,a.encoder=o,a.getPixel=!1,a.x=t,a.y=e,a.width=Math.min(i,this.gl.drawingBufferWidth),a.height=Math.min(n,this.gl.drawingBufferHeight),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,r,s,o,a,h,l,c){void 0===r&&(r=!1);var u=this.currentFramebuffer,s=(this.snapshotArea(s=void 0===s?0:s,o=void 0===o?0:o,a=void 0===a?e:a,h=void 0===h?i:h,n,l,c),this.snapshotState);return s.getPixel=r,s.isFramebuffer=!0,s.bufferWidth=e,s.bufferHeight=i,this.setFramebuffer(t),d(this.canvas,s),this.setFramebuffer(u),s.callback=null,s.isFramebuffer=!1,this},canvasToTexture:function(t,e,i,n){return void 0===i&&(i=!1),void 0===n&&(n=!1),e?this.updateCanvasTexture(t,e,n):this.createCanvasTexture(t,i,n)},createCanvasTexture:function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var n=this.gl,r=n.NEAREST,s=n.NEAREST,o=t.width,a=t.height,h=n.CLAMP_TO_EDGE,l=g(o,a);return!e&&l&&(h=n.REPEAT),this.config.antialias&&(r=l?this.mipmapFilter:n.LINEAR,s=n.LINEAR),this.createTexture2D(0,r,s,h,h,n.RGBA,t,o,a,!0,!1,i)},updateCanvasTexture:function(t,e,i){void 0===i&&(i=!1);var n,r=this.gl,s=t.width,o=t.height;return 0<s&&0<o&&(r.activeTexture(r.TEXTURE0),n=r.getParameter(r.TEXTURE_BINDING_2D),r.bindTexture(r.TEXTURE_2D,e),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,i),r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,t),e.width=s,e.height=o,n&&r.bindTexture(r.TEXTURE_2D,n)),e},createVideoTexture:function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var n=this.gl,r=n.NEAREST,s=n.NEAREST,o=t.videoWidth,a=t.videoHeight,h=n.CLAMP_TO_EDGE,l=g(o,a);return!e&&l&&(h=n.REPEAT),this.config.antialias&&(r=l?this.mipmapFilter:n.LINEAR,s=n.LINEAR),this.createTexture2D(0,r,s,h,h,n.RGBA,t,o,a,!0,!0,i)},updateVideoTexture:function(t,e,i){void 0===i&&(i=!1);var n,r=this.gl,s=t.videoWidth,o=t.videoHeight;return 0<s&&0<o&&(r.activeTexture(r.TEXTURE0),n=r.getParameter(r.TEXTURE_BINDING_2D),r.bindTexture(r.TEXTURE_2D,e),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,i),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,t),e.width=s,e.height=o,n&&r.bindTexture(r.TEXTURE_2D,n)),e},setTextureFilter:function(t,e){var i=this.gl,e=[i.LINEAR,i.NEAREST][e],n=(i.activeTexture(i.TEXTURE0),i.getParameter(i.TEXTURE_BINDING_2D));return i.bindTexture(i.TEXTURE_2D,t),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,e),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,e),n&&i.bindTexture(i.TEXTURE_2D,n),this},getMaxTextureSize:function(){return this.config.maxTextureSize},destroy:function(){this.canvas.removeEventListener("webglcontextlost",this.contextLostHandler,!1),this.canvas.removeEventListener("webglcontextrestored",this.contextRestoredHandler,!1);for(var t=this.gl,e=this.tempTextures,i=0;i<e.length;i++)t.deleteTexture(e[i]);this.pipelines.destroy(),this.removeAllListeners(),this.fboStack=[],this.maskStack=[],this.extensions={},this.textureIndexes=[],this.gl=null,this.game=null,this.canvas=null,this.contextLost=!0,this.currentMask=null,this.currentCameraMask=null}});t.exports=i},function(t,e,i){var n=i(0),o=i(92),r=i(102),s=i(373),a=i(376),h=i(377),l=i(108),c=i(378),u=i(379),d=i(380),p=i(381),i=new n({initialize:function(t){this.game=t.game,this.renderer=t,this.classes=new r([[o.UTILITY_PIPELINE,p],[o.MULTI_PIPELINE,l],[o.BITMAPMASK_PIPELINE,s],[o.SINGLE_PIPELINE,d],[o.ROPE_PIPELINE,u],[o.LIGHT_PIPELINE,h],[o.POINTLIGHT_PIPELINE,c],[o.GRAPHICS_PIPELINE,a]]),this.postPipelineClasses=new r,this.pipelines=new r,this.current=null,this.previous=null,this.MULTI_PIPELINE=null,this.BITMAPMASK_PIPELINE=null,this.UTILITY_PIPELINE=null,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2},boot:function(t){var e,i=this,n=this.game;if(this.classes.each(function(t,e){r=i.add(t,new e({game:n})),t===o.UTILITY_PIPELINE&&(i.UTILITY_PIPELINE=r,i.fullFrame1=r.fullFrame1,i.fullFrame2=r.fullFrame2,i.halfFrame1=r.halfFrame1,i.halfFrame2=r.halfFrame2)}),this.MULTI_PIPELINE=this.get(o.MULTI_PIPELINE),this.BITMAPMASK_PIPELINE=this.get(o.BITMAPMASK_PIPELINE),t)for(e in t){var r,s=t[e];(r=new s(n)).isPostFX?this.postPipelineClasses.set(e,s):this.has(e)||(this.classes.set(e,s),this.add(e,r))}},add:function(t,e){var i,n;if(!e.isPostFX)return i=this.pipelines,n=this.renderer,i.has(t)||(e.name=t,e.manager=this,i.set(t,e)),e.hasBooted||e.boot(),0!==n.width&&0!==n.height&&e.resize(n.width,n.height),e},addPostPipeline:function(t,e){this.postPipelineClasses.has(t)||this.postPipelineClasses.set(t,e)},flush:function(){this.current&&this.current.flush()},has:function(t){var e=this.pipelines;return"string"==typeof t?e.has(t):!!e.contains(t)},get:function(t){var e=this.pipelines;return"string"==typeof t?e.get(t):e.contains(t)?t:void 0},getPostPipeline:function(t,e){var i,n=this.postPipelineClasses;if("string"==typeof t?i=n.get(t):"function"==typeof t?n.contains(t)&&(i=t):"object"==typeof t&&(i=n.get(t.name)),i)return n=new i(this.game),e&&(n.gameObject=e),n},remove:function(t,e,i){void 0===e&&(e=!0),void 0===i&&(i=!0),this.pipelines.delete(t),e&&this.classes.delete(t),i&&this.postPipelineClasses.delete(t)},set:function(t,e,i){if(!t.isPostFX)return this.isCurrent(t,i)||(this.flush(),this.current&&this.current.unbind(),(this.current=t).bind(i)),t.updateProjectionMatrix(),t.onBind(e),t},preBatch:function(t){if(t.hasPostPipeline){this.flush();for(var e=t.postPipelines,i=e.length-1;0<=i;i--){var n=e[i];n.active&&n.preBatch(t)}}},postBatch:function(t){if(t.hasPostPipeline){this.flush();for(var e=t.postPipelines,i=0;i<e.length;i++){var n=e[i];n.active&&n.postBatch(t)}}},preBatchCamera:function(t){if(t.hasPostPipeline){this.flush();for(var e=t.postPipelines,i=e.length-1;0<=i;i--){var n=e[i];n.active&&n.preBatch(t)}}},postBatchCamera:function(t){if(t.hasPostPipeline){this.flush();for(var e=t.postPipelines,i=0;i<e.length;i++){var n=e[i];n.active&&n.postBatch(t)}}},isCurrent:function(t,e){var i=this.renderer,n=this.current;return n&&!e&&(e=n.currentShader),!(n!==t||e.program!==i.currentProgram)},copyFrame:function(t,e,i,n,r){return this.setUtility(this.UTILITY_PIPELINE.copyShader).copyFrame(t,e,i,n,r),this},copyToGame:function(t){return this.setUtility(this.UTILITY_PIPELINE.copyShader).copyToGame(t),this},drawFrame:function(t,e,i,n){return this.setUtility(this.UTILITY_PIPELINE.colorMatrixShader).drawFrame(t,e,i,n),this},blendFrames:function(t,e,i,n,r){return this.setUtility(this.UTILITY_PIPELINE.linearShader).blendFrames(t,e,i,n,r),this},blendFramesAdditive:function(t,e,i,n,r){return this.setUtility(this.UTILITY_PIPELINE.addShader).blendFramesAdditive(t,e,i,n,r),this},clearFrame:function(t,e){return this.UTILITY_PIPELINE.clearFrame(t,e),this},blitFrame:function(t,e,i,n,r,s){return this.setUtility(this.UTILITY_PIPELINE.copyShader).blitFrame(t,e,i,n,r,s),this},copyFrameRect:function(t,e,i,n,r,s,o,a){return this.UTILITY_PIPELINE.copyFrameRect(t,e,i,n,r,s,o,a),this},forceZero:function(){return this.current&&this.current.forceZero},setMulti:function(){return this.set(this.MULTI_PIPELINE)},setUtility:function(t){return this.UTILITY_PIPELINE.bind(t)},rebind:function(t){void 0===t&&this.previous&&(t=this.previous);var e,i=this.renderer,n=i.gl,r=(n.disable(n.DEPTH_TEST),n.disable(n.CULL_FACE),i.hasActiveStencilMask()?n.clear(n.DEPTH_BUFFER_BIT):(n.disable(n.STENCIL_TEST),n.clear(n.DEPTH_BUFFER_BIT|n.STENCIL_BUFFER_BIT)),n.viewport(0,0,i.width,i.height),i.currentProgram=null,i.setBlendMode(0,!0),this.pipelines.entries);for(e in r)r[e].glReset=!0;t&&(this.current=t).rebind(),i.resetTextures()},clear:function(){var t=this.renderer;this.flush(),this.current?(this.current.unbind(),this.previous=this.current,this.current=null):this.previous=null,t.currentProgram=null,t.setBlendMode(0,!0)},destroy:function(){this.flush(),this.classes.clear(),this.postPipelineClasses.clear(),this.pipelines.clear(),this.renderer=null,this.game=null,this.classes=null,this.postPipelineClasses=null,this.pipelines=null,this.current=null,this.previous=null}});t.exports=i},function(t,e,i){var n=i(0),r=i(2),s=i(866),o=i(867),a=i(107),h=i(58),i=new n({Extends:h,initialize:function(t){t.fragShader=r(t,"fragShader",s),t.vertShader=r(t,"vertShader",o),t.batchSize=r(t,"batchSize",1),t.vertices=r(t,"vertices",[-1,1,-1,-7,7,1]),t.attributes=r(t,"attributes",[{name:"inPosition",size:2,type:a.FLOAT}]),h.call(this,t)},boot:function(){h.prototype.boot.call(this),this.set1i("uMainSampler",0),this.set1i("uMaskSampler",1)},resize:function(t,e){h.prototype.resize.call(this,t,e),this.set2f("uResolution",t,e)},beginMask:function(t,e,i){var n,r=this.gl;t.bitmapMask&&r&&((n=this.renderer).flush(),n.pushFramebuffer(t.mainFramebuffer),r.disable(r.STENCIL_TEST),r.clearColor(0,0,0,0),r.clear(r.COLOR_BUFFER_BIT),n.currentCameraMask.mask!==t&&(n.currentMask.mask=t,n.currentMask.camera=i))},endMask:function(t,e){var i=this.gl,n=this.renderer,r=t.bitmapMask;r&&i&&(n.flush(),n.pushFramebuffer(t.maskFramebuffer),i.clearColor(0,0,0,0),i.clear(i.COLOR_BUFFER_BIT),n.setBlendMode(0,!0),r.renderWebGL(n,r,e),n.flush(),n.popFramebuffer(),n.popFramebuffer(),(r=n.getCurrentStencilMask())?(i.enable(i.STENCIL_TEST),r.mask.applyStencil(n,r.camera,!0)):n.currentMask.mask=null,n.pipelines.set(this),i.activeTexture(i.TEXTURE1),i.bindTexture(i.TEXTURE_2D,t.maskTexture),i.activeTexture(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,t.mainTexture),this.set1i("uInvertMaskAlpha",t.invertAlpha),i.drawArrays(this.topology,0,3),n.resetTextures())}});t.exports=i},function(t,e,i){t.exports={AFTER_FLUSH:i(868),BEFORE_FLUSH:i(869),BIND:i(870),BOOT:i(871),DESTROY:i(872),REBIND:i(873),RESIZE:i(874)}},function(t,e,i){var n=i(0),c=i(2),u=i(107),i=new n({initialize:function(t,e,i,n,r){this.pipeline=t,this.name=e,this.renderer=t.renderer,this.gl=this.renderer.gl,this.program=this.renderer.createProgram(i,n),this.attributes,this.vertexComponentCount=0,this.vertexSize=0,this.uniforms={},this.createAttributes(r),this.createUniforms()},createAttributes:function(t){for(var e=0,i=0,n=[],r=this.vertexComponentCount=0;r<t.length;r++){var s=t[r],o=s.name,a=c(s,"size",1),h=c(s,"type",u.FLOAT),l=h.enum,h=h.size,s=!!s.normalized;n.push({name:o,size:a,type:l,normalized:s,offset:i,enabled:!1,location:-1}),4===h?e+=a:e++,i+=a*h}this.vertexSize=i,this.vertexComponentCount=e,this.attributes=n},bind:function(t,e){return void 0===t&&(t=!1),(e=void 0===e?!1:e)&&this.pipeline.flush(),this.renderer.setProgram(this.program),t&&this.setAttribPointers(),this},rebind:function(){return this.renderer.setProgram(this.program),this.setAttribPointers(!0),this},setAttribPointers:function(t){void 0===t&&(t=!1);for(var e=this.gl,i=this.vertexSize,n=this.attributes,r=this.program,s=0;s<n.length;s++){var o,a=n[s],h=a.size,l=a.type,c=a.offset,u=a.enabled,d=a.location,p=!!a.normalized;t?0<=(o=e.getAttribLocation(r,a.name))?(e.enableVertexAttribArray(o),e.vertexAttribPointer(o,h,l,p,i,c),a.enabled=!0,a.location=o):-1!==o&&e.disableVertexAttribArray(o):u?e.vertexAttribPointer(d,h,l,p,i,c):!u&&-1<d&&(e.disableVertexAttribArray(d),a.location=-1)}return this},createUniforms:function(){for(var t,e=this.gl,i=this.program,n=this.uniforms,r=e.getProgramParameter(i,e.ACTIVE_UNIFORMS),s=0;s<r;s++){var o,a=e.getActiveUniform(i,s);a&&(a=a.name,null!==(t=e.getUniformLocation(i,a))&&(n[a]={name:a,location:t,value1:null,value2:null,value3:null,value4:null}),0<(o=a.indexOf("["))&&(a=a.substr(0,o),n.hasOwnProperty(a)||null!==(t=e.getUniformLocation(i,a))&&(n[a]={name:a,location:t,value1:null,value2:null,value3:null,value4:null})))}return this},hasUniform:function(t){return this.uniforms.hasOwnProperty(t)},resetUniform:function(t){t=this.uniforms[t];return t&&(t.value1=null,t.value2=null,t.value3=null,t.value4=null),this},setUniform1:function(t,e,i,n){e=this.uniforms[e];return!e||!n&&e.value1===i||(e.value1=i,this.renderer.setProgram(this.program),t.call(this.gl,e.location,i),this.pipeline.currentShader=this),this},setUniform2:function(t,e,i,n,r){e=this.uniforms[e];return!e||!r&&e.value1===i&&e.value2===n||(e.value1=i,e.value2=n,this.renderer.setProgram(this.program),t.call(this.gl,e.location,i,n),this.pipeline.currentShader=this),this},setUniform3:function(t,e,i,n,r,s){e=this.uniforms[e];return!e||!s&&e.value1===i&&e.value2===n&&e.value3===r||(e.value1=i,e.value2=n,e.value3=r,this.renderer.setProgram(this.program),t.call(this.gl,e.location,i,n,r),this.pipeline.currentShader=this),this},setUniform4:function(t,e,i,n,r,s,o){e=this.uniforms[e];return!e||!o&&e.value1===i&&e.value2===n&&e.value3===r&&e.value4===s||(e.value1=i,e.value2=n,e.value3=r,e.value4=s,this.renderer.setProgram(this.program),t.call(this.gl,e.location,i,n,r,s),this.pipeline.currentShader=this),this},set1f:function(t,e){return this.setUniform1(this.gl.uniform1f,t,e)},set2f:function(t,e,i){return this.setUniform2(this.gl.uniform2f,t,e,i)},set3f:function(t,e,i,n){return this.setUniform3(this.gl.uniform3f,t,e,i,n)},set4f:function(t,e,i,n,r){return this.setUniform4(this.gl.uniform4f,t,e,i,n,r)},set1fv:function(t,e){return this.setUniform1(this.gl.uniform1fv,t,e,!0)},set2fv:function(t,e){return this.setUniform1(this.gl.uniform2fv,t,e,!0)},set3fv:function(t,e){return this.setUniform1(this.gl.uniform3fv,t,e,!0)},set4fv:function(t,e){return this.setUniform1(this.gl.uniform4fv,t,e,!0)},set1iv:function(t,e){return this.setUniform1(this.gl.uniform1iv,t,e,!0)},set2iv:function(t,e){return this.setUniform1(this.gl.uniform2iv,t,e,!0)},set3iv:function(t,e){return this.setUniform1(this.gl.uniform3iv,t,e,!0)},set4iv:function(t,e){return this.setUniform1(this.gl.uniform4iv,t,e,!0)},set1i:function(t,e){return this.setUniform1(this.gl.uniform1i,t,e)},set2i:function(t,e,i){return this.setUniform2(this.gl.uniform2i,t,e,i)},set3i:function(t,e,i,n){return this.setUniform3(this.gl.uniform3i,t,e,i,n)},set4i:function(t,e,i,n,r){return this.setUniform4(this.gl.uniform4i,t,e,i,n,r)},setMatrix2fv:function(t,e,i){return this.setUniform2(this.gl.uniformMatrix2fv,t,e,i,!0)},setMatrix3fv:function(t,e,i){return this.setUniform2(this.gl.uniformMatrix3fv,t,e,i,!0)},setMatrix4fv:function(t,e,i){return this.setUniform2(this.gl.uniformMatrix4fv,t,e,i,!0)},destroy:function(){this.gl.deleteProgram(this.program),this.pipeline=null,this.renderer=null,this.gl=null,this.program=null,this.attributes=null,this.uniforms=null}});t.exports=i},function(t,e,i){var n=i(0),b=i(59),r=i(2),s=i(875),o=i(876),a=i(25),h=i(107),l=i(58),i=new n({Extends:l,initialize:function(t){t.fragShader=r(t,"fragShader",s),t.vertShader=r(t,"vertShader",o),t.attributes=r(t,"attributes",[{name:"inPosition",size:2},{name:"inColor",size:4,type:h.UNSIGNED_BYTE,normalized:!0}]),l.call(this,t),this.calcMatrix=new a,this.tempTriangle=[{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0}],this.strokeTint={TL:0,TR:0,BL:0,BR:0},this.fillTint={TL:0,TR:0,BL:0,BR:0},this.currentFrame={u0:0,v0:0,u1:1,v1:1},this.firstQuad=[0,0,0,0,0],this.prevQuad=[0,0,0,0,0],this.polygonCache=[]},batchFillRect:function(t,e,i,n,r,s){this.renderer.pipelines.set(this);var o=this.calcMatrix,s=(s&&s.multiply(r,o),t+i),r=e+n,i=o.getX(t,e),n=o.getY(t,e),a=o.getX(t,r),t=o.getY(t,r),h=o.getX(s,r),r=o.getY(s,r),l=o.getX(s,e),o=o.getY(s,e),s=this.fillTint;this.batchQuad(i,n,a,t,h,r,l,o,s.TL,s.TR,s.BL,s.BR)},batchFillTriangle:function(t,e,i,n,r,s,o,a){this.renderer.pipelines.set(this);var h=this.calcMatrix,a=(a&&a.multiply(o,h),h.getX(t,e)),o=h.getY(t,e),t=h.getX(i,n),e=h.getY(i,n),i=h.getX(r,s),n=h.getY(r,s),h=this.fillTint;this.batchTri(a,o,t,e,i,n,h.TL,h.TR,h.BL)},batchStrokeTriangle:function(t,e,i,n,r,s,o,a,h){var l=this.tempTriangle;l[0].x=t,l[0].y=e,l[0].width=o,l[1].x=i,l[1].y=n,l[1].width=o,l[2].x=r,l[2].y=s,l[2].width=o,l[3].x=t,l[3].y=e,l[3].width=o,this.batchStrokePath(l,o,!1,a,h)},batchFillPath:function(t,e,i){this.renderer.pipelines.set(this);var n=this.calcMatrix;i&&i.multiply(e,n);for(var r,s,o=t.length,a=this.polygonCache,h=this.fillTint.TL,l=this.fillTint.TR,c=this.fillTint.BL,u=0;u<o;++u)s=t[u],a.push(s.x,s.y);for(var o=(r=b(a)).length,d=0;d<o;d+=3){var p=2*r[d+0],f=2*r[d+1],g=2*r[d+2],m=a[0+p],p=a[1+p],y=a[0+f],f=a[1+f],v=a[0+g],g=a[1+g],x=n.getX(m,p),m=n.getY(m,p),p=n.getX(y,f),y=n.getY(y,f),f=n.getX(v,g),v=n.getY(v,g);this.batchTri(x,m,p,y,f,v,h,l,c)}a.length=0},batchStrokePath:function(t,e,i,n,r){this.renderer.pipelines.set(this),this.prevQuad[4]=0,this.firstQuad[4]=0;for(var s=t.length-1,o=0;o<s;o++){var a=t[o],h=t[o+1];this.batchLine(a.x,a.y,h.x,h.y,a.width/2,h.width/2,e,o,!i&&o===s-1,n,r)}},batchLine:function(t,e,i,n,r,s,o,a,h,l,c){this.renderer.pipelines.set(this);var u=this.calcMatrix;c&&c.multiply(l,u);var c=i-t,l=n-e,c=Math.sqrt(c*c+l*l),l=r*(n-e)/c,r=r*(t-i)/c,d=s*(n-e)/c,s=s*(t-i)/c,c=i-d,p=n-s,f=t-l,g=e-r,i=i+d,d=n+s,n=t+l,s=e+r,t=u.getX(c,p),l=u.getY(c,p),e=u.getX(f,g),r=u.getY(f,g),c=u.getX(i,d),p=u.getY(i,d),f=u.getX(n,s),g=u.getY(n,s),i=this.strokeTint,d=i.TL,u=i.TR,n=i.BL,s=i.BR;this.batchQuad(f,g,e,r,t,l,c,p,d,u,n,s),o<=2||(i=this.prevQuad,o=this.firstQuad,0<a&&i[4]?this.batchQuad(f,g,e,r,i[0],i[1],i[2],i[3],d,u,n,s):(o[0]=f,o[1]=g,o[2]=e,o[3]=r,o[4]=1),h&&o[4]?this.batchQuad(t,l,c,p,o[0],o[1],o[2],o[3],d,u,n,s):(i[0]=t,i[1]=l,i[2]=c,i[3]=p,i[4]=1))},batchVert:function(t,e,i){var n=this.vertexViewF32,r=this.vertexViewU32,s=this.vertexCount*this.currentShader.vertexComponentCount-1;n[++s]=t,n[++s]=e,r[++s]=i,this.vertexCount++},batchQuad:function(t,e,i,n,r,s,o,a,h,l,c,u){var d=!1;return this.shouldFlush(6)&&(this.flush(),d=!0),this.batchVert(t,e,h),this.batchVert(i,n,c),this.batchVert(r,s,u),this.batchVert(t,e,h),this.batchVert(r,s,u),this.batchVert(o,a,l),d},batchTri:function(t,e,i,n,r,s,o,a,h){var l=!1;return this.shouldFlush(3)&&(this.flush(),l=!0),this.batchVert(t,e,o),this.batchVert(i,n,a),this.batchVert(r,s,h),l},destroy:function(){return l.prototype.destroy.call(this),this.polygonCache=null,this}});t.exports=i},function(t,e,i){var n=i(0),r=i(2),s=i(877),R=i(108),o=i(3),a=i(58),h=10,c=new o,i=new n({Extends:R,initialize:function(t){h=t.game.renderer.config.maxLights;for(var e=r(t,"fragShader",s),i=[],n=1;n<=h;n++)i.push({name:"lights"+n,fragShader:e.replace("%LIGHT_COUNT%",n.toString())});t.shaders=i,R.call(this,t),this.inverseRotationMatrix=new Float32Array([1,0,0,0,1,0,0,0,1]),this.defaultNormalMap,this.lightsActive=!0},boot:function(){a.prototype.boot.call(this);var t=this.gl,e=t.createTexture();t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,e),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,new Uint8Array([127,127,255,255])),this.defaultNormalMap={glTexture:e};for(var i=0;i<this.shaders.length;i++)this["lightShader"+(i+1)]=this.shaders[i]},onRender:function(t,e){t=t.sys.lights;if(this.lightsActive=!1,t&&t.active){var i,n=t.getLights(e),r=n.length;if(0!==r){this.lightsActive=!0,this.setShader(this["lightShader"+r],!0);var s=this.renderer.height,o=e.matrix;for(this.set1i("uMainSampler",0),this.set1i("uNormSampler",1),this.set2f("uResolution",this.width/2,this.height/2),this.set4f("uCamera",e.x,e.y,e.rotation,e.zoom),this.set3f("uAmbientLightColor",t.ambientColor.r,t.ambientColor.g,t.ambientColor.b),i=0;i<r;i++){var a=n[i].light,h=a.color,l="uLights["+i+"].";o.transformPoint(a.x,a.y,c),this.set2f(l+"position",c.x-e.scrollX*a.scrollFactorX*e.zoom,s-(c.y-e.scrollY*a.scrollFactorY*e.zoom)),this.set3f(l+"color",h.r,h.g,h.b),this.set1f(l+"intensity",a.intensity),this.set1f(l+"radius",a.radius)}this.currentNormalMapRotation=null}}},setNormalMapRotation:function(t){var e,i,n;t===this.currentNormalMapRotation&&0!==this.vertexCount||(0<this.vertexCount&&this.flush(),e=this.inverseRotationMatrix,t?(n=-t,i=Math.cos(n),n=Math.sin(n),e[1]=n,e[3]=-n,e[0]=e[4]=i):(e[0]=e[4]=1,e[1]=e[3]=0),this.setMatrix3fv("uInverseRotationMatrix",!1,e),this.currentNormalMapRotation=t)},setTexture2D:function(t,e){var i=this.renderer,n=(void 0===t&&(t=i.tempTextures[0]),this.getNormalMap(e)),t=(i.isNewNormalMap(t,n)&&(this.flush(),i.setTextureZero(t),i.setNormalMap(n)),e?e.rotation:0);return this.setNormalMapRotation(t),this.currentUnit=0},setGameObject:function(t,e){void 0===e&&(e=t.frame);var i=this.renderer,e=e.glTexture,n=this.getNormalMap(t);return i.isNewNormalMap()&&(this.flush(),i.setTextureZero(e),i.setNormalMap(n)),this.setNormalMapRotation(t.rotation),this.currentUnit=0},getNormalMap:function(t){var e;return t?t.displayTexture?e=t.displayTexture.dataSource[t.displayFrame.sourceIndex]:t.texture?e=t.texture.dataSource[t.frame.sourceIndex]:t.tileset&&(e=(Array.isArray(t.tileset)?t.tileset[0]:t.tileset).image.dataSource[0]):e=this.defaultNormalMap,(e=e||this.defaultNormalMap).glTexture},batchSprite:function(t,e,i){this.lightsActive&&R.prototype.batchSprite.call(this,t,e,i)},batchTexture:function(t,e,i,n,r,s,o,a,h,l,c,u,d,p,f,g,m,y,v,x,b,w,T,S,P,_,E,A,M,k,C,O){this.lightsActive&&R.prototype.batchTexture.call(this,t,e,i,n,r,s,o,a,h,l,c,u,d,p,f,g,m,y,v,x,b,w,T,S,P,_,E,A,M,k,C,O)},batchTextureFrame:function(t,e,i,n,r,s,o){this.lightsActive&&R.prototype.batchTextureFrame.call(this,t,e,i,n,r,s,o)}});i.LIGHT_COUNT=h,t.exports=i},function(t,e,i){var n=i(0),r=i(2),s=i(880),o=i(881),a=i(58),i=new n({Extends:a,initialize:function(t){t.vertShader=r(t,"vertShader",o),t.fragShader=r(t,"fragShader",s),t.attributes=r(t,"attributes",[{name:"inPosition",size:2},{name:"inLightPosition",size:2},{name:"inLightRadius"},{name:"inLightAttenuation"},{name:"inLightColor",size:4}]),a.call(this,t)},onRender:function(t,e){this.set2f("uResolution",this.width,this.height),this.set1f("uCameraZoom",e.zoom)},batchPointLight:function(t,e,i,n,r,s,o,a,h,l,c,u){var d=t.color,p=t.intensity,f=t.radius,g=t.attenuation,m=d.r*p,y=d.g*p,d=d.b*p,p=e.alpha*t.alpha;this.shouldFlush(6)&&this.flush(),this.batchLightVert(i,n,c,u,f,g,m,y,d,p),this.batchLightVert(r,s,c,u,f,g,m,y,d,p),this.batchLightVert(o,a,c,u,f,g,m,y,d,p),this.batchLightVert(i,n,c,u,f,g,m,y,d,p),this.batchLightVert(o,a,c,u,f,g,m,y,d,p),this.batchLightVert(h,l,c,u,f,g,m,y,d,p)},batchLightVert:function(t,e,i,n,r,s,o,a,h,l){var c=this.vertexViewF32,u=this.vertexCount*this.currentShader.vertexComponentCount-1;c[++u]=t,c[++u]=e,c[++u]=i,c[++u]=n,c[++u]=r,c[++u]=s,c[++u]=o,c[++u]=a,c[++u]=h,c[++u]=l,this.vertexCount++}});t.exports=i},function(t,e,i){var n=i(0),r=i(2),s=i(108),i=new n({Extends:s,initialize:function(t){t.topology=5,t.batchSize=r(t,"batchSize",256),s.call(this,t)}});t.exports=i},function(t,e,i){var n=i(0),r=i(2),s=i(108),o=i(882),a=i(883),h=i(58),i=new n({Extends:s,initialize:function(t){t.fragShader=r(t,"fragShader",o),t.vertShader=r(t,"vertShader",a),t.forceZero=!0,s.call(this,t)},boot:function(){h.prototype.boot.call(this),this.set1i("uMainSampler",0)}});t.exports=i},function(t,e,i){var n=i(884),h=i(35),r=i(0),s=i(198),o=i(885),a=i(886),l=i(2),c=i(887),u=i(382),d=i(58),i=new r({Extends:d,initialize:function(t){t.renderTarget=l(t,"renderTarget",[{scale:1},{scale:1},{scale:.5},{scale:.5}]),t.vertShader=l(t,"vertShader",u),t.shaders=l(t,"shaders",[{name:"Copy",fragShader:a},{name:"AddBlend",fragShader:n},{name:"LinearBlend",fragShader:c},{name:"ColorMatrix",fragShader:o}]),t.attributes=l(t,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),t.vertices=[-1,-1,0,0,-1,1,0,1,1,1,1,1,-1,-1,0,0,1,1,1,1,1,-1,1,0],t.batchSize=1,d.call(this,t),this.colorMatrix=new s,this.copyShader,this.addShader,this.linearShader,this.colorMatrixShader,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2},boot:function(){d.prototype.boot.call(this);var t=this.shaders,e=this.renderTargets;this.copyShader=t[0],this.addShader=t[1],this.linearShader=t[2],this.colorMatrixShader=t[3],this.fullFrame1=e[0],this.fullFrame2=e[1],this.halfFrame1=e[2],this.halfFrame2=e[3]},copyFrame:function(t,e,i,n,r){void 0===i&&(i=1),void 0===n&&(n=!0),void 0===r&&(r=!0);var s=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",i),s.activeTexture(s.TEXTURE0),s.bindTexture(s.TEXTURE_2D,t.texture),e?(s.viewport(0,0,e.width,e.height),s.bindFramebuffer(s.FRAMEBUFFER,e.framebuffer),s.framebufferTexture2D(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,e.texture,0)):s.viewport(0,0,t.width,t.height),n&&(r?s.clearColor(0,0,0,0):s.clearColor(0,0,0,1),s.clear(s.COLOR_BUFFER_BIT)),s.bufferData(s.ARRAY_BUFFER,this.vertexData,s.STATIC_DRAW),s.drawArrays(s.TRIANGLES,0,6),s.bindFramebuffer(s.FRAMEBUFFER,null),s.bindTexture(s.TEXTURE_2D,null)},blitFrame:function(t,e,i,n,r,s){void 0===i&&(i=1),void 0===n&&(n=!0),void 0===r&&(r=!0),void 0===s&&(s=!1);var o,a=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",i),a.activeTexture(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,t.texture),t.height>e.height?(a.viewport(0,0,t.width,t.height),this.setTargetUVs(t,e)):(i=e.height-t.height,a.viewport(0,i,t.width,t.height)),a.bindFramebuffer(a.FRAMEBUFFER,e.framebuffer),a.framebufferTexture2D(a.FRAMEBUFFER,a.COLOR_ATTACHMENT0,a.TEXTURE_2D,e.texture,0),n&&(r?a.clearColor(0,0,0,0):a.clearColor(0,0,0,1),a.clear(a.COLOR_BUFFER_BIT)),s&&(o=this.renderer.currentBlendMode,this.renderer.setBlendMode(h.ERASE)),a.bufferData(a.ARRAY_BUFFER,this.vertexData,a.STATIC_DRAW),a.drawArrays(a.TRIANGLES,0,6),s&&this.renderer.setBlendMode(o),a.bindFramebuffer(a.FRAMEBUFFER,null),a.bindTexture(a.TEXTURE_2D,null),this.resetUVs()},copyFrameRect:function(t,e,i,n,r,s,o,a){void 0===o&&(o=!0),void 0===a&&(a=!0);var h=this.gl;h.bindFramebuffer(h.FRAMEBUFFER,t.framebuffer),h.framebufferTexture2D(h.FRAMEBUFFER,h.COLOR_ATTACHMENT0,h.TEXTURE_2D,t.texture,0),o&&(a?h.clearColor(0,0,0,0):h.clearColor(0,0,0,1),h.clear(h.COLOR_BUFFER_BIT)),h.activeTexture(h.TEXTURE0),h.bindTexture(h.TEXTURE_2D,e.texture),h.copyTexSubImage2D(h.TEXTURE_2D,0,0,0,i,n,r,s),h.bindFramebuffer(h.FRAMEBUFFER,null),h.bindTexture(h.TEXTURE_2D,null)},copyToGame:function(t){var e=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",1),this.renderer.popFramebuffer(),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,t.texture),e.bufferData(e.ARRAY_BUFFER,this.vertexData,e.STATIC_DRAW),e.drawArrays(e.TRIANGLES,0,6),this.renderer.resetTextures()},drawFrame:function(t,e,i,n){void 0===i&&(i=!0),void 0===n&&(n=this.colorMatrix);var r=this.gl;this.setShader(this.colorMatrixShader),this.set1i("uMainSampler",0),this.set1fv("uColorMatrix",n.getData()),this.set1f("uAlpha",n.alpha),r.activeTexture(r.TEXTURE0),r.bindTexture(r.TEXTURE_2D,t.texture),e?(r.viewport(0,0,e.width,e.height),r.bindFramebuffer(r.FRAMEBUFFER,e.framebuffer),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,e.texture,0)):r.viewport(0,0,t.width,t.height),i?r.clearColor(0,0,0,0):r.clearColor(0,0,0,1),r.clear(r.COLOR_BUFFER_BIT),r.bufferData(r.ARRAY_BUFFER,this.vertexData,r.STATIC_DRAW),r.drawArrays(r.TRIANGLES,0,6),r.bindFramebuffer(r.FRAMEBUFFER,null),r.bindTexture(r.TEXTURE_2D,null)},blendFrames:function(t,e,i,n,r,s){void 0===n&&(n=1),void 0===r&&(r=!0),void 0===s&&(s=this.linearShader);var o=this.gl;this.setShader(s),this.set1i("uMainSampler1",0),this.set1i("uMainSampler2",1),this.set1f("uStrength",n),o.activeTexture(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,t.texture),o.activeTexture(o.TEXTURE1),o.bindTexture(o.TEXTURE_2D,e.texture),i?(o.bindFramebuffer(o.FRAMEBUFFER,i.framebuffer),o.framebufferTexture2D(o.FRAMEBUFFER,o.COLOR_ATTACHMENT0,o.TEXTURE_2D,i.texture,0),o.viewport(0,0,i.width,i.height)):o.viewport(0,0,t.width,t.height),r?o.clearColor(0,0,0,0):o.clearColor(0,0,0,1),o.clear(o.COLOR_BUFFER_BIT),o.bufferData(o.ARRAY_BUFFER,this.vertexData,o.STATIC_DRAW),o.drawArrays(o.TRIANGLES,0,6),o.bindFramebuffer(o.FRAMEBUFFER,null),o.bindTexture(o.TEXTURE_2D,null)},blendFramesAdditive:function(t,e,i,n,r){this.blendFrames(t,e,i,n,r,this.addShader)},clearFrame:function(t,e){void 0===e&&(e=!0);var i=this.gl,t=(i.viewport(0,0,t.width,t.height),i.bindFramebuffer(i.FRAMEBUFFER,t.framebuffer),e?i.clearColor(0,0,0,0):i.clearColor(0,0,0,1),i.clear(i.COLOR_BUFFER_BIT),this.renderer.currentFramebuffer);i.bindFramebuffer(i.FRAMEBUFFER,t)},setUVs:function(t,e,i,n,r,s,o,a){var h=this.vertexViewF32;h[2]=t,h[3]=e,h[6]=i,h[7]=n,h[10]=r,h[11]=s,h[14]=t,h[15]=e,h[18]=r,h[19]=s,h[22]=o,h[23]=a},setTargetUVs:function(t,e){e=.5<(e=e.height/t.height)?.5-(e-.5):.5-e+.5;this.setUVs(0,e,0,1+e,1,1+e,1,e)},flipX:function(){this.setUVs(1,0,1,1,0,1,0,0)},flipY:function(){this.setUVs(0,1,0,0,1,0,1,1)},resetUVs:function(){this.setUVs(0,0,0,1,1,1,1,0)}});t.exports=i},function(t,e){t.exports=["#define SHADER_NAME PHASER_QUAD_VS","","precision mediump float;","","attribute vec2 inPosition;","attribute vec2 inTexCoord;","","varying vec2 outFragCoord;","varying vec2 outTexCoord;","","void main ()","{"," outFragCoord = inPosition.xy * 0.5 + 0.5;"," outTexCoord = inTexCoord;",""," gl_Position = vec4(inPosition, 0, 1);","}",""].join("\n")},function(t,e,i){var w=i(31),T=i(38),S=i(2);t.exports=function(t,e){var t=t.getContext("experimental-webgl"),i=S(e,"callback"),n=S(e,"type","image/png"),r=S(e,"encoder",.92),s=S(e,"x",0),o=S(e,"y",0),a=S(e,"getPixel",!1),h=S(e,"isFramebuffer",!1),l=h?S(e,"bufferWidth",1):t.drawingBufferWidth,c=h?S(e,"bufferHeight",1):t.drawingBufferHeight;if(a){a=new Uint8Array(4);t.readPixels(s,h?o:c-o,1,1,t.RGBA,t.UNSIGNED_BYTE,a),i.call(null,new T(a[0],a[1],a[2],a[3]/255))}else{var u=S(e,"width",l),d=S(e,"height",c),p=new Uint8Array(u*d*4);t.readPixels(s,c-o-d,u,d,t.RGBA,t.UNSIGNED_BYTE,p);for(var f=w.createWebGL(this,u,d),h=f.getContext("2d"),a=h.getImageData(0,0,u,d),g=a.data,m=0;m<d;m++)for(var y=0;y<u;y++){var v=4*((d-m-1)*u+y),x=4*(m*u+y);g[0+x]=p[0+v],g[1+x]=p[1+v],g[2+x]=p[2+v],g[3+x]=p[3+v]}h.putImageData(a,0,0);var b=new Image;b.onerror=function(){i.call(null),w.remove(f)},b.onload=function(){i.call(null,b),w.remove(f)},b.src=f.toDataURL(n,r)}}},function(t,e,i){var h=i(33);t.exports=function(t){var e,i,n,r,s,o,a=t.config;a.hideBanner||(e="WebGL",a.renderType===h.CANVAS?e="Canvas":a.renderType===h.HEADLESS&&(e="Headless"),o=a.audio,o=(i=t.device.audio).webAudio&&!o.disableWebAudio?"Web Audio":o.noAudio||!i.webAudio&&!i.audioData?"No Audio":"HTML5 Audio",t.device.browser.ie?window.console:(r=[n=""],Array.isArray(a.bannerBackgroundColor)?(a.bannerBackgroundColor.forEach(function(t){n=n.concat("%c "),r.push("background: "+t),s=t}),r[r.length-1]="color: "+a.bannerTextColor+"; background: "+s):(n=n.concat("%c "),r.push("color: "+a.bannerTextColor+"; background: "+a.bannerBackgroundColor)),r.push("background: transparent"),a.gameTitle&&(n=n.concat(a.gameTitle),a.gameVersion&&(n=n.concat(" v"+a.gameVersion)),a.hidePhaser||(n=n.concat(" / "))),n=(n=a.hidePhaser?n:n.concat("Phaser v"+h.VERSION+" ("+e+" | "+o+")")).concat(" %c "+a.gameURL),r[0]=n))}},function(t,e,i){var n=i(0),r=i(6),s=i(1),o=i(386),i=new n({initialize:function(t,e){this.game=t,this.raf=new o,this.started=!1,this.running=!1,this.minFps=r(e,"min",5),this.targetFps=r(e,"target",60),this._min=1e3/this.minFps,this._target=1e3/this.targetFps,this.actualFps=this.targetFps,this.nextFpsUpdate=0,this.framesThisSecond=0,this.callback=s,this.forceSetTimeOut=r(e,"forceSetTimeOut",!1),this.time=0,this.startTime=0,this.lastTime=0,this.frame=0,this.inFocus=!0,this._pauseTime=0,this._coolDown=0,this.delta=0,this.deltaIndex=0,this.deltaHistory=[],this.deltaSmoothingMax=r(e,"deltaHistory",10),this.panicMax=r(e,"panicMax",120),this.rawDelta=0,this.now=0,this.smoothStep=r(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.startTime+=this.time-this._pauseTime},resetDelta:function(){var t=window.performance.now();this.time=t,this.lastTime=t,this.nextFpsUpdate=t+1e3;for(var e=this.framesThisSecond=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,this.raf.start(this.step.bind(this),this.forceSetTimeOut,this._target)},step:function(){var t=window.performance.now(),e=(this.now=t)-this.lastTime,i=(this.rawDelta=e=e<0?0:e,this.deltaIndex),n=this.deltaHistory,r=this.deltaSmoothingMax,s=e,o=e;if(this.smoothStep){(0<this._coolDown||!this.inFocus)&&(this._coolDown--,s=Math.min(s,this._target)),s>this._min&&(s=n[i],s=Math.min(s,this._min)),n[i]=s,this.deltaIndex++,this.deltaIndex>r&&(this.deltaIndex=0);for(var a=o=0;a<r;a++)o+=n[a];o/=r}this.delta=o,this.time+=this.rawDelta,t>this.nextFpsUpdate&&(this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0),this.framesThisSecond++;e=o/this._target;this.callback(t,o,e),this.lastTime=t,this.frame++},tick:function(){this.step()},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(t){this.running||(t&&(this.startTime+=-this.lastTime+(this.lastTime+window.performance.now())),this.raf.start(this.step.bind(this),this.useRAF),this.running=!0,this.step())},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.callback=s,this.raf=null,this.game=null}});t.exports=i},function(t,e,i){var n=i(0),r=i(1),i=new n({initialize:function(){this.isRunning=!1,this.callback=r,this.tick=0,this.isSetTimeOut=!1,this.timeOutID=null,this.lastTime=0,this.target=0;var n=this;this.step=function t(){var e=window.performance.now();n.lastTime=n.tick,n.tick=e,n.callback(e),n.timeOutID=window.requestAnimationFrame(t)},this.stepTimeout=function t(){var e=Date.now(),i=Math.min(Math.max(2*n.target+n.tick-e,0),n.target);n.lastTime=n.tick,n.tick=e,n.callback(e),n.timeOutID=window.setTimeout(t,i)}},start:function(t,e,i){this.isRunning||(this.callback=t,this.isSetTimeOut=e,this.target=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=r}});t.exports=i},function(t,e,i){var n=i(22);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),window.onblur=function(){i.emit(n.BLUR)},window.onfocus=function(){i.emit(n.FOCUS)},window.focus&&t.config.autoFocus&&window.focus()}},function(t,e,i){var m=i(389),y=i(31),v=i(6);t.exports=function(t){var e=v(t,"data",[]),i=v(t,"canvas",null),n=v(t,"palette",m),r=v(t,"pixelWidth",1),s=v(t,"pixelHeight",r),o=v(t,"resizeCanvas",!0),a=v(t,"clearCanvas",!0),h=v(t,"preRender",null),t=v(t,"postRender",null),l=Math.floor(Math.abs(e[0].length*r)),c=Math.floor(Math.abs(e.length*s)),u=(i||(i=y.create2D(this,l,c),a=o=!1),o&&(i.width=l,i.height=c),i.getContext("2d"));a&&u.clearRect(0,0,l,c),h&&h(i,u);for(var d=0;d<e.length;d++)for(var p=e[d],f=0;f<p.length;f++){var g=p[f];"."!==g&&" "!==g&&(u.fillStyle=n[g],u.fillRect(f*r,d*s,r,s))}return t&&t(i,u),i}},function(t,e){t.exports={0:"#000",1:"#9D9D9D",2:"#FFF",3:"#BE2633",4:"#E06F8B",5:"#493C2B",6:"#A46422",7:"#EB8931",8:"#F7E26B",9:"#2F484E",A:"#44891A",B:"#A3CE27",C:"#1B2632",D:"#005784",E:"#31A2F2",F:"#B2DCEF"}},function(t,e,i){var n=i(0),o=i(358),r=i(94),a=i(3),s=new n({Extends:r,initialize:function(t,e,i,n){r.call(this,"CubicBezierCurve"),Array.isArray(t)&&(n=new a(t[6],t[7]),i=new a(t[4],t[5]),e=new a(t[2],t[3]),t=new a(t[0],t[1])),this.p0=t,this.p1=e,this.p2=i,this.p3=n},getStartPoint:function(t){return(t=void 0===t?new a:t).copy(this.p0)},getResolution:function(t){return t},getPoint:function(t,e){void 0===e&&(e=new a);var i=this.p0,n=this.p1,r=this.p2,s=this.p3;return e.set(o(t,i.x,n.x,r.x,s.x),o(t,i.y,n.y,r.y,s.y))},draw:function(t,e){var i=this.getPoints(e=void 0===e?32: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]}}});s.fromJSON=function(t){var t=t.points,e=new a(t[0],t[1]),i=new a(t[2],t[3]),n=new a(t[4],t[5]),t=new a(t[6],t[7]);return new s(e,i,n,t)},t.exports=s},function(t,e,i){var n=i(0),l=i(94),c=i(36),u=i(6),r=i(196),d=i(3),s=new n({Extends:l,initialize:function(t,e,i,n,r,s,o,a){var h;"object"==typeof t?(t=u(h=t,"x",0),e=u(h,"y",0),i=u(h,"xRadius",0),n=u(h,"yRadius",i),r=u(h,"startAngle",0),s=u(h,"endAngle",360),o=u(h,"clockwise",!1),a=u(h,"rotation",0)):(void 0===n&&(n=i),void 0===r&&(r=0),void 0===s&&(s=360),void 0===o&&(o=!1),void 0===a&&(a=0)),l.call(this,"EllipseCurve"),this.p0=new d(t,e),this._xRadius=i,this._yRadius=n,this._startAngle=c(r),this._endAngle=c(s),this._clockwise=o,this._rotation=c(a)},getStartPoint:function(t){return void 0===t&&(t=new d),this.getPoint(0,t)},getResolution:function(t){return 2*t},getPoint:function(t,e){void 0===e&&(e=new d);for(var i=2*Math.PI,n=this._endAngle-this._startAngle,r=Math.abs(n)<Number.EPSILON;n<0;)n+=i;for(;i<n;)n-=i;n<Number.EPSILON&&(n=r?0:i),this._clockwise&&!r&&(n===i?n=-i:n-=i);var s,o,a,h,r=this._startAngle+t*n,t=this.p0.x+this._xRadius*Math.cos(r),r=this.p0.y+this._yRadius*Math.sin(r);return 0!==this._rotation&&(s=Math.cos(this._rotation),o=Math.sin(this._rotation),t=(a=t-this.p0.x)*s-(h=r-this.p0.y)*o+this.p0.x,r=a*o+h*s+this.p0.y),e.set(t,r)},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 r(this._startAngle)},set:function(t){this._startAngle=c(t)}},endAngle:{get:function(){return r(this._endAngle)},set:function(t){this._endAngle=c(t)}},clockwise:{get:function(){return this._clockwise},set:function(t){this._clockwise=t}},angle:{get:function(){return r(this._rotation)},set:function(t){this._rotation=c(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:r(this._startAngle),endAngle:r(this._endAngle),clockwise:this._clockwise,rotation:r(this._rotation)}}});s.fromJSON=function(t){return new s(t)},t.exports=s},function(t,e,i){var n=i(0),r=i(94),s=i(199),o=i(10),a=i(3),h=new n({Extends:r,initialize:function(t,e){r.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),s([this.p0,this.p1],t)},getStartPoint:function(t){return(t=void 0===t?new a:t).copy(this.p0)},getResolution:function(t){return t=void 0===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(e=void 0===e?new a:e).copy(this.p1).subtract(this.p0).normalize(),e},getUtoTmapping:function(t,e,i){return e?(i=(i=this.getLengths(i))[i.length-1],Math.min(e,i)/i):t},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 t=t.points,e=new a(t[0],t[1]),t=new a(t[2],t[3]);return new h(e,t)},t.exports=h},function(t,e,i){var n=i(0),r=i(3),i=new n({initialize:function(t,e){this.active=!1,this.p0=new r(t,e)},getPoint:function(t,e){return(e=void 0===e?new r: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]}}});t.exports=i},function(t,e,i){var n=i(0),r=i(94),s=i(359),o=i(3),a=new n({Extends:r,initialize:function(t,e,i){r.call(this,"QuadraticBezier"),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(t=void 0===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;return e.set(s(t,i.x,n.x,r.x),s(t,i.y,n.y,r.y))},draw:function(t,e){var i=this.getPoints(e=void 0===e?32: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 t=t.points,e=new o(t[0],t[1]),i=new o(t[2],t[3]),t=new o(t[4],t[5]);return new a(e,i,t)},t.exports=a},function(t,e,i){var a=i(194),n=i(0),r=i(94),h=i(3),s=new n({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 h;"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){t=new h(t,e);return this.points.push(t),t},getStartPoint:function(t){return(t=void 0===t?new h:t).copy(this.points[0])},getResolution:function(t){return t*this.points.length},getPoint:function(t,e){void 0===e&&(e=new h);var i=this.points,t=(i.length-1)*t,n=Math.floor(t),t=t-n,r=i[0===n?n:n-1],s=i[n],o=i[n>i.length-2?i.length-1:n+1],i=i[n>i.length-3?i.length-1:n+2];return e.set(a(t,r.x,s.x,o.x,i.x),a(t,r.y,s.y,o.y,i.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}}});s.fromJSON=function(t){return new s(t.points)},t.exports=s},function(t,e,i){i=new(i(0))({initialize:function(t,e,i,n){e&&""!==e||(e=["precision mediump float;","uniform vec2 resolution;","varying vec2 fragCoord;","void main () {"," vec2 uv = fragCoord / resolution.xy;"," gl_FragColor = vec4(uv.xyx, 1.0);","}"].join("\n")),i&&""!==i||(i=["precision mediump float;","uniform mat4 uProjectionMatrix;","uniform mat4 uViewMatrix;","uniform vec2 uResolution;","attribute vec2 inPosition;","varying vec2 fragCoord;","varying vec2 outTexCoord;","void main () {"," gl_Position = uProjectionMatrix * uViewMatrix * vec4(inPosition, 1.0, 1.0);"," fragCoord = vec2(inPosition.x, uResolution.y - inPosition.y);"," outTexCoord = vec2(inPosition.x / uResolution.x, fragCoord.y / uResolution.y);","}"].join("\n")),void 0===n&&(n=null),this.key=t,this.fragmentSrc=e,this.vertexSrc=i,this.uniforms=n}});t.exports=i},function(t,e,i){var n=i(38);n.ColorSpectrum=i(909),n.ColorToRGBA=i(910),n.ComponentToHex=i(398),n.GetColor=i(103),n.GetColor32=i(328),n.HexStringToColor=i(327),n.HSLToColor=i(911),n.HSVColorWheel=i(912),n.HSVToRGB=i(188),n.HueToComponent=i(399),n.IntegerToColor=i(189),n.IntegerToRGB=i(330),n.Interpolate=i(913),n.ObjectToColor=i(331),n.RandomRGB=i(914),n.RGBStringToColor=i(332),n.RGBToHSV=i(329),n.RGBToString=i(915),n.ValueToColor=i(187),t.exports=n},function(t,e){t.exports=function(t){t=t.toString(16);return 1===t.length?"0"+t:t}},function(t,e){t.exports=function(t,e,i){return i<0&&(i+=1),1<i&&--i,i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}},function(t,e,i){var n=i(105);t.exports=function(t){var e;"complete"!==document.readyState&&"interactive"!==document.readyState?(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)):t()}},function(t,e){t.exports=function(t){var e,i;return t?(t=Math.abs(window.orientation),e={w:0,h:0},(i=document.createElement("div")).setAttribute("style","position: fixed; height: 100vh; width: 0; top: 0"),document.documentElement.appendChild(i),e.w=90===t?i.offsetHeight:window.innerWidth,e.h=90===t?window.innerWidth:i.offsetHeight,document.documentElement.removeChild(i),i=null,90!==Math.abs(window.orientation)?e.h:e.w):window.innerHeight}},function(t,e,i){var n=i(201);t.exports=function(t,e){var i=window.screen,i=!!i&&(i.orientation||i.mozOrientation||i.msOrientation);return i&&"string"==typeof i.type?i.type:"string"==typeof i?i:"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:t<e?n.ORIENTATION.PORTRAIT:n.ORIENTATION.LANDSCAPE}},function(t,e){t.exports={NO_CENTER:0,CENTER_BOTH:1,CENTER_HORIZONTALLY:2,CENTER_VERTICALLY:3}},function(t,e){t.exports={LANDSCAPE:"landscape-primary",PORTRAIT:"portrait-primary"}},function(t,e){t.exports={NONE:0,WIDTH_CONTROLS_HEIGHT:1,HEIGHT_CONTROLS_WIDTH:2,FIT:3,ENVELOP:4,RESIZE:5}},function(t,e){t.exports={NO_ZOOM:1,ZOOM_2X:2,ZOOM_4X:4,MAX_ZOOM:-1}},function(t,e){t.exports=function(t){var e;return""!==t&&("string"==typeof t?e=document.getElementById(t):t&&1===t.nodeType&&(e=t)),e||document.body}},function(t,e){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}},function(t,e,i){var n=i(0),a=i(203),r=i(9),s=i(51),o=i(22),h=i(410),l=i(411),c=i(412),u=i(413),d=i(25),m=i(177),i=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 u(this):null,this.pointers=[],this.pointersTotal=e.inputActivePointers,e.inputTouch&&1===this.pointersTotal&&(this.pointersTotal=2);for(var i=0;i<=this.pointersTotal;i++){var n=new c(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 d,this._tempMatrix2=new d,this._tempSkip=!1,this.mousePointerContainer=[this.mousePointer],t.events.once(o.BOOT,this.boot,this)},boot:function(){this.canvas=this.game.canvas,this.scaleManager=this.game.scale,this.events.emit(s.MANAGER_BOOT),this.game.events.on(o.PRE_RENDER,this.preRender,this),this.game.events.once(o.DESTROY,this.destroy,this)},setCanvasOver:function(t){this.isOver=!0,this.events.emit(s.GAME_OVER,t)},setCanvasOut:function(t){this.isOver=!1,this.events.emit(s.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(s.MANAGER_UPDATE);for(var n=0;n<i.length;n++){var r=i[n];if(r.sys.input&&r.sys.input.updatePoll(t,e)&&this.globalTopOnly)return}},setDefaultCursor:function(t){this.defaultCursor=t,this.canvas.style.cursor!==t&&(this.canvas.style.cursor=t)},setCursor:function(t){t.cursor&&(this.canvas.style.cursor=t.cursor)},resetCursor:function(t){t.cursor&&this.canvas&&(this.canvas.style.cursor=this.defaultCursor)},addPointer:function(t){var e=[];10<this.pointersTotal+(t=void 0===t?1:t)&&(t=10-this.pointersTotal);for(var i=0;i<t;i++){var n=this.pointers.length,n=new c(this,n);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(!0,!0);this._tempSkip=!1;for(var n=0;n<i.length;n++){var r=i[n];if(r.sys.input&&(r.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],s=1;s<this.pointersTotal;s++){var o=e[s];if(!o.active){o.touchstart(r,t),this.activePointer=o,i.push(o);break}}this.updateInputPlugins(a.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],s=1;s<this.pointersTotal;s++){var o=e[s];if(o.active&&o.identifier===r.identifier){o.touchmove(r,t),this.activePointer=o,i.push(o);break}}this.updateInputPlugins(a.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],s=1;s<this.pointersTotal;s++){var o=e[s];if(o.active&&o.identifier===r.identifier){o.touchend(r,t),i.push(o);break}}this.updateInputPlugins(a.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],s=1;s<this.pointersTotal;s++){var o=e[s];if(o.active&&o.identifier===r.identifier){o.touchcancel(r,t),i.push(o);break}}this.updateInputPlugins(a.TOUCH_CANCEL,i)},onMouseDown:function(t){var e=this.mousePointer;e.down(t),e.updateMotion(),this.activePointer=e,this.updateInputPlugins(a.MOUSE_DOWN,this.mousePointerContainer)},onMouseMove:function(t){var e=this.mousePointer;e.move(t),e.updateMotion(),this.activePointer=e,this.updateInputPlugins(a.MOUSE_MOVE,this.mousePointerContainer)},onMouseUp:function(t){var e=this.mousePointer;e.up(t),e.updateMotion(),this.activePointer=e,this.updateInputPlugins(a.MOUSE_UP,this.mousePointerContainer)},onMouseWheel:function(t){var e=this.mousePointer;e.wheel(t),this.activePointer=e,this.updateInputPlugins(a.MOUSE_WHEEL,this.mousePointerContainer)},onPointerLockChange:function(t){var e=this.mouse.locked;this.mousePointer.locked=e,this.events.emit(s.POINTERLOCK_CHANGE,t,e)},inputCandidate:function(t,e){var i=t.input;if(!i||!i.enabled||!i.alwaysEnabled&&!t.willRender(e))return!1;var n=!0,r=t.parentContainer;if(r)do{if(!r.willRender(e)){n=!1;break}}while(r=r.parentContainer);return n},hitTest:function(t,e,i,n){void 0===n&&(n=this._tempHitTest);var r=this._tempPoint,s=i.scrollX,o=i.scrollY,a=(n.length=0,t.x),h=t.y;i.getWorldPoint(a,h,r),t.worldX=r.x,t.worldY=r.y;for(var l={x:0,y:0},c=this._tempMatrix,u=this._tempMatrix2,d=0;d<e.length;d++){var p,f,g=e[d];this.inputCandidate(g,i)&&(p=r.x+s*g.scrollFactorX-s,f=r.y+o*g.scrollFactorY-o,g.parentContainer?(g.getWorldTransformMatrix(c,u),c.applyInverse(p,f,l)):m(p,f,g.x,g.y,g.rotation,g.scaleX,g.scaleY,l),this.pointWithinHitArea(g,l.x,l.y)&&n.push(g))}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 r=t.position,s=t.prevPosition,e=(s.x=r.x,s.y=r.y,this.scaleManager.transformX(e)),i=this.scaleManager.transformY(i),t=t.smoothFactor;n&&0!==t?(r.x=e*t+s.x*(1-t),r.y=i*t+s.y*(1-t)):(r.x=e,r.y=i)},destroy:function(){this.events.removeAllListeners(),this.game.events.off(o.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}});t.exports=i},function(t,e,i){var r=i(93),n=i(0),s=i(22),o=i(51),a=i(143),h=i(1),i=new n({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(s.POST_STEP,this.postUpdate,this)},startListeners:function(){var i=this,t=(this.onKeyDown=function(t){var e;!t.defaultPrevented&&i.enabled&&i.manager&&(i.queue.push(t),i.manager.events.emit(o.MANAGER_PROCESS),e=t.altKey||t.ctrlKey||t.shiftKey||t.metaKey,i.preventDefault&&!e&&-1<i.captures.indexOf(t.keyCode)&&t.preventDefault())},this.onKeyUp=function(t){var e;!t.defaultPrevented&&i.enabled&&i.manager&&(i.queue.push(t),i.manager.events.emit(o.MANAGER_PROCESS),e=t.altKey||t.ctrlKey||t.shiftKey||t.metaKey,i.preventDefault&&!e&&-1<i.captures.indexOf(t.keyCode)&&t.preventDefault())},this.target);t&&(t.addEventListener("keydown",this.onKeyDown,!1),t.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=0<e.length},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 n=t[i];"string"==typeof n&&(n=a[n.toUpperCase()]),r(e,n)}this.preventDefault=0<e.length},clearCaptures:function(){this.captures=[],this.preventDefault=!1},destroy:function(){this.stopListeners(),this.clearCaptures(),this.queue=[],this.manager.game.events.off(s.POST_RENDER,this.postUpdate,this),this.target=null,this.enabled=!1,this.manager=null}});t.exports=i},function(t,e,i){var n=i(0),o=i(191),r=i(51),s=i(1),i=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=s,this.onMouseDown=s,this.onMouseUp=s,this.onMouseDownWindow=s,this.onMouseUpWindow=s,this.onMouseOver=s,this.onMouseOut=s,this.onMouseWheel=s,this.pointerLockChange=s,this.isTop=!0,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 document.body.addEventListener("contextmenu",function(t){return t.preventDefault(),!1}),this},requestPointerLock:function(){var t;o.pointerLock&&((t=this.target).requestPointerLock=t.requestPointerLock||t.mozRequestPointerLock||t.webkitRequestPointerLock,t.requestPointerLock())},releasePointerLock:function(){o.pointerLock&&(document.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock,document.exitPointerLock())},startListeners:function(){var t=this.target;if(t){var i=this,n=this.manager,e=n.canvas,r=window&&window.focus&&n.game.config.autoFocus,s=(this.onMouseMove=function(t){!t.defaultPrevented&&i.enabled&&n&&n.enabled&&(n.onMouseMove(t),i.preventDefaultMove&&t.preventDefault())},this.onMouseDown=function(t){r&&window.focus(),!t.defaultPrevented&&i.enabled&&n&&n.enabled&&(n.onMouseDown(t),i.preventDefaultDown&&t.target===e&&t.preventDefault())},this.onMouseDownWindow=function(t){!t.defaultPrevented&&i.enabled&&n&&n.enabled&&t.target!==e&&n.onMouseDown(t)},this.onMouseUp=function(t){!t.defaultPrevented&&i.enabled&&n&&n.enabled&&(n.onMouseUp(t),i.preventDefaultUp&&t.target===e&&t.preventDefault())},this.onMouseUpWindow=function(t){!t.defaultPrevented&&i.enabled&&n&&n.enabled&&t.target!==e&&n.onMouseUp(t)},this.onMouseOver=function(t){!t.defaultPrevented&&i.enabled&&n&&n.enabled&&n.setCanvasOver(t)},this.onMouseOut=function(t){!t.defaultPrevented&&i.enabled&&n&&n.enabled&&n.setCanvasOut(t)},this.onMouseWheel=function(t){!t.defaultPrevented&&i.enabled&&n&&n.enabled&&n.onMouseWheel(t),i.preventDefaultWheel&&t.target===e&&t.preventDefault()},{passive:!0});if(t.addEventListener("mousemove",this.onMouseMove),t.addEventListener("mousedown",this.onMouseDown),t.addEventListener("mouseup",this.onMouseUp),t.addEventListener("mouseover",this.onMouseOver,s),t.addEventListener("mouseout",this.onMouseOut,s),this.preventDefaultWheel?t.addEventListener("wheel",this.onMouseWheel,{passive:!1}):t.addEventListener("wheel",this.onMouseWheel,s),window&&n.game.config.inputWindowEvents)try{window.top.addEventListener("mousedown",this.onMouseDownWindow,s),window.top.addEventListener("mouseup",this.onMouseUpWindow,s)}catch(t){window.addEventListener("mousedown",this.onMouseDownWindow,s),window.addEventListener("mouseup",this.onMouseUpWindow,s),this.isTop=!1}o.pointerLock&&(this.pointerLockChange=function(t){var e=i.target;i.locked=document.pointerLockElement===e||document.mozPointerLockElement===e||document.webkitPointerLockElement===e,n.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)),o.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}});t.exports=i},function(t,e,i){var o=i(349),n=i(0),r=i(50),a=i(124),h=i(360),s=i(3),l=i(105),i=new n({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 s,this.prevPosition=new s,this.midPoint=new s(-1,-1),this.velocity=new s,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){t=t.getWorldPoint(this.x,this.y);return this.worldX=t.x,this.worldY=t.y,this},positionToCamera:function(t,e){return t.getWorldPoint(this.x,this.y,e)},updateMotion:function(){var t,e,i=this.position.x,n=this.position.y,r=this.midPoint.x,s=this.midPoint.y;i===r&&n===s||(r=h(this.motionFactor,r,i),s=h(this.motionFactor,s,n),a(r,i,.1)&&(r=i),a(s,n,.1)&&(s=n),this.midPoint.set(r,s),this.velocity.set(t=i-r,e=n-s),this.angle=o(r,s,i,n),this.distance=Math.sqrt(t*t+e*e))},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.button&&!this.isDown},rightButtonReleased:function(){return 2===this.button&&!this.isDown},middleButtonReleased:function(){return 1===this.button&&!this.isDown},backButtonReleased:function(){return 3===this.button&&!this.isDown},forwardButtonReleased:function(){return 4===this.button&&!this.isDown},getDistance:function(){return this.isDown?r(this.downX,this.downY,this.x,this.y):r(this.downX,this.downY,this.upX,this.upY)},getDistanceX:function(){return this.isDown?Math.abs(this.downX-this.x):Math.abs(this.downX-this.upX)},getDistanceY:function(){return this.isDown?Math.abs(this.downY-this.y):Math.abs(this.downY-this.upY)},getDuration:function(){return this.isDown?this.manager.time-this.downTime:this.upTime-this.downTime},getAngle:function(){return this.isDown?o(this.downX,this.downY,this.x,this.y):o(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,r=this.position.x,s=this.position.y,o=0;o<t;o++){var a=1/t*o;e[o]={x:h(a,i,r),y:h(a,n,s)}}return e},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}}});t.exports=i},function(t,e,i){var n=i(0),r=i(51),s=i(1),i=new n({initialize:function(t){this.manager=t,this.capture=!0,this.enabled=!1,this.target,this.onTouchStart=s,this.onTouchStartWindow=s,this.onTouchMove=s,this.onTouchEnd=s,this.onTouchEndWindow=s,this.onTouchCancel=s,this.onTouchCancelWindow=s,this.onTouchOver=s,this.onTouchOut=s,t.events.once(r.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||(this.target=this.manager.game.canvas),t.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return document.body.addEventListener("contextmenu",function(t){return t.preventDefault(),!1}),this},startListeners:function(){var e=this,i=this.manager.canvas,n=window&&window.focus&&this.manager.game.config.autoFocus;this.onTouchStart=function(t){n&&window.focus(),!t.defaultPrevented&&e.enabled&&e.manager&&e.manager.enabled&&(e.manager.onTouchStart(t),e.capture&&t.cancelable&&t.target===i&&t.preventDefault())},this.onTouchStartWindow=function(t){!t.defaultPrevented&&e.enabled&&e.manager&&e.manager.enabled&&t.target!==i&&e.manager.onTouchStart(t)},this.onTouchMove=function(t){!t.defaultPrevented&&e.enabled&&e.manager&&e.manager.enabled&&(e.manager.onTouchMove(t),e.capture&&t.cancelable&&t.preventDefault())},this.onTouchEnd=function(t){!t.defaultPrevented&&e.enabled&&e.manager&&e.manager.enabled&&(e.manager.onTouchEnd(t),e.capture&&t.cancelable&&t.target===i&&t.preventDefault())},this.onTouchEndWindow=function(t){!t.defaultPrevented&&e.enabled&&e.manager&&e.manager.enabled&&t.target!==i&&e.manager.onTouchEnd(t)},this.onTouchCancel=function(t){!t.defaultPrevented&&e.enabled&&e.manager&&e.manager.enabled&&(e.manager.onTouchCancel(t),e.capture&&t.preventDefault())},this.onTouchCancelWindow=function(t){!t.defaultPrevented&&e.enabled&&e.manager&&e.manager.enabled&&e.manager.onTouchCancel(t)},this.onTouchOver=function(t){!t.defaultPrevented&&e.enabled&&e.manager&&e.manager.enabled&&e.manager.setCanvasOver(t)},this.onTouchOut=function(t){!t.defaultPrevented&&e.enabled&&e.manager&&e.manager.enabled&&e.manager.setCanvasOut(t)};var t,r,s=this.target;s&&(r={passive:!(t={passive:!0})},s.addEventListener("touchstart",this.onTouchStart,this.capture?r:t),s.addEventListener("touchmove",this.onTouchMove,this.capture?r:t),s.addEventListener("touchend",this.onTouchEnd,this.capture?r:t),s.addEventListener("touchcancel",this.onTouchCancel,this.capture?r:t),s.addEventListener("touchover",this.onTouchOver,this.capture?r:t),s.addEventListener("touchout",this.onTouchOut,this.capture?r:t),window&&this.manager.game.config.inputWindowEvents&&(window.addEventListener("touchstart",this.onTouchStartWindow,r),window.addEventListener("touchend",this.onTouchEndWindow,r),window.addEventListener("touchcancel",this.onTouchCancelWindow,r)),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),t.removeEventListener("touchover",this.onTouchOver),t.removeEventListener("touchout",this.onTouchOut),window&&(window.removeEventListener("touchstart",this.onTouchStartWindow),window.removeEventListener("touchend",this.onTouchEndWindow))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});t.exports=i},function(t,e,i){var n=i(0),l=i(22),r=i(9),s=i(8),o=i(16),a=i(5),c=i(2),g=i(24),h=i(93),i=new n({Extends:r,initialize:function(t){r.call(this),this.game=t,this.plugins=[],this.scenePlugins=[],this._pendingGlobal=[],this._pendingScene=[],t.isBooted?this.boot():t.events.once(l.BOOT,this.boot,this)},boot:function(){for(var t,e,i,n,r,s,o=this.game.config,a=(a=o.installGlobalPlugins).concat(this._pendingGlobal),h=0;h<a.length;h++)t=a[h],e=c(t,"key",null),i=c(t,"plugin",null),n=c(t,"start",!1),r=c(t,"mapping",null),s=c(t,"data",null),e&&i&&this.install(e,i,n,r,s);for(a=(a=o.installScenePlugins).concat(this._pendingScene),h=0;h<a.length;h++)t=a[h],e=c(t,"key",null),i=c(t,"plugin",null),r=c(t,"mapping",null),e&&i&&this.installScenePlugin(e,i,r);this._pendingGlobal=[],this._pendingScene=[],this.game.events.once(l.DESTROY,this.destroy,this)},addToScene:function(t,e,i){for(var n,r=this.game,s=t.scene,o=t.settings.map,a=t.settings.isBooted,h=0;h<e.length;h++)r[p=e[h]]?(t[p]=r[p],o.hasOwnProperty(p)&&(s[o[p]]=t[p])):"game"===p&&o.hasOwnProperty(p)&&(s[o[p]]=r);for(var l=0;l<i.length;l++)for(n=i[l],h=0;h<n.length;h++){var c,u,d,p=n[h];g.hasCore(p)&&(u=(c=g.getCore(p)).mapping,d=new c.plugin(s,this,u),t[u]=d,c.custom?s[u]=d:o.hasOwnProperty(u)&&(s[o[u]]=d),a&&d.boot())}for(n=this.plugins,h=0;h<n.length;h++){var f=n[h];f.mapping&&(s[f.mapping]=f.plugin)}},getDefaultScenePlugins:function(){return this.game.config.defaultPlugins.concat(this.scenePlugins)},installScenePlugin:function(t,e,i,n,r){if(void 0===r&&(r=!1),"function"==typeof e){if(g.hasCore(t)){if(!r&&g.hasCore(t))return}else g.register(t,e,i,!0),this.scenePlugins.push(t);n&&(r=new e(n,this,t),n.sys[t]=r,i&&""!==i&&(n[i]=r),r.boot())}},install:function(t,e,i,n,r){if(void 0===i&&(i=!1),void 0===n&&(n=null),void 0===r&&(r=null),"function"==typeof e&&!g.hasCustom(t))if(null!==n&&(i=!0),this.game.isBooted){if(g.registerCustom(t,e,n,r),i)return this.start(t)}else this._pendingGlobal.push({key:t,plugin:e,start:i,mapping:n,data:r});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){t=this.getIndex(t);if(-1!==t)return this.plugins[t]},isActive:function(t){t=this.getEntry(t);return t&&t.active},start:function(t,e){var i=this.getEntry(e=void 0===e?t: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){t=g.getCustom(t);return t&&(t={key:e,plugin:e=new t.plugin(this),active:!0,mapping:t.mapping,data:t.data},this.plugins.push(t),e.init(t.data),e.start()),t},stop:function(t){t=this.getEntry(t);return t&&t.active&&(t.active=!1,t.plugin.stop()),this},get:function(t,e){void 0===e&&(e=!0);var i,n=this.getEntry(t);return n?n.plugin:(i=this.getClass(t))&&e?(n=this.createEntry(t,t))?n.plugin:null:i||null},getClass:function(t){return g.getCustomClass(t)},removeGlobalPlugin:function(t){var e=this.getEntry(t);e&&h(this.plugins,e),g.removeCustom(t)},removeScenePlugin:function(t){h(this.scenePlugins,t),g.remove(t)},registerGameObject:function(t,e,i){return e&&a.register(t,e),i&&o.register(t,i),this},removeGameObject:function(t,e,i){return void 0===i&&(i=!0),(e=void 0===e?!0:e)&&a.remove(t),i&&o.remove(t),this},registerFileType:function(t,e,i){s.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();g.destroyCustomPlugins(),this.game.noReturn&&g.destroyCorePlugins(),this.game=null,this.plugins=[],this.scenePlugins=[]}});t.exports=i},function(t,e,i){var h=i(201),n=i(0),r=i(9),s=i(104),o=i(22),a=i(401),l=i(407),c=i(402),u=i(1),d=i(10),p=i(416),f=i(76),g=i(3),i=new n({Extends:r,initialize:function(t){r.call(this),this.game=t,this.canvas,this.canvasBounds=new d,this.parent=null,this.parentIsWindow=!1,this.parentSize=new p,this.gameSize=new p,this.baseSize=new p,this.displaySize=new p,this.scaleMode=h.SCALE_MODE.NONE,this.zoom=1,this._resetZoom=!1,this.displayScale=new g(1,1),this.autoRound=!1,this.autoCenter=h.CENTER.NO_CENTER,this.orientation=h.ORIENTATION.LANDSCAPE,this.fullscreen,this.fullscreenTarget=null,this._createdFullscreenTarget=!1,this.dirty=!1,this.resizeInterval=500,this._lastCheck=0,this._checkOrientation=!1,this.listeners={orientationChange:u,windowResize:u,fullScreenChange:u,fullScreenError:u}},preBoot:function(){this.parseConfig(this.game.config),this.game.events.once(o.BOOT,this.boot,this)},boot:function(){var t=this.game;this.canvas=t.canvas,this.fullscreen=t.device.fullscreen,this.scaleMode!==h.SCALE_MODE.RESIZE&&this.displaySize.setAspectMode(this.scaleMode),this.scaleMode===h.SCALE_MODE.NONE?this.resize(this.width,this.height):(this.getParentBounds(),0<this.parentSize.width&&0<this.parentSize.height&&this.displaySize.setParent(this.parentSize),this.refresh()),t.events.on(o.PRE_STEP,this.step,this),t.events.once(o.READY,this.refresh,this),t.events.once(o.DESTROY,this.destroy,this),this.startListeners()},parseConfig:function(t){this.getParent(t),this.getParentBounds();var e,i,n=t.width,r=t.height,s=t.scaleMode,o=t.zoom,a=t.autoRound;"string"==typeof n&&(0===(e=this.parentSize.width)&&(e=window.innerWidth),i=parseInt(n,10)/100,n=Math.floor(e*i)),"string"==typeof r&&(0===(e=this.parentSize.height)&&(e=window.innerHeight),i=parseInt(r,10)/100,r=Math.floor(e*i)),this.scaleMode=s,this.autoRound=a,this.autoCenter=t.autoCenter,this.resizeInterval=t.resizeInterval,a&&(n=Math.floor(n),r=Math.floor(r)),this.gameSize.setSize(n,r),o===h.ZOOM.MAX_ZOOM&&(o=this.getMaxZoom()),1!==(this.zoom=o)&&(this._resetZoom=!0),this.baseSize.setSize(n,r),a&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),0<t.minWidth&&this.displaySize.setMin(t.minWidth*o,t.minHeight*o),0<t.maxWidth&&this.displaySize.setMax(t.maxWidth*o,t.maxHeight*o),this.displaySize.setSize(n,r),this.orientation=c(n,r)},getParent:function(t){var e=t.parent;null!==e&&(this.parent=l(e),this.parentIsWindow=this.parent===document.body,t.expandParent&&t.scaleMode!==h.SCALE_MODE.NONE&&(e=this.parent.getBoundingClientRect(),!this.parentIsWindow&&0!==e.height||(document.documentElement.style.height="100%",document.body.style.height="100%",e=this.parent.getBoundingClientRect(),this.parentIsWindow||0!==e.height||(this.parent.style.overflow="hidden",this.parent.style.width="100%",this.parent.style.height="100%"))),t.fullscreenTarget&&!this.fullscreenTarget&&(this.fullscreenTarget=l(t.fullscreenTarget)))},getParentBounds:function(){var t,e,i;return!!this.parent&&(t=this.parentSize,i=this.parent.getBoundingClientRect(),this.parentIsWindow&&this.game.device.os.iOS&&(i.height=a(!0)),e=i.width,i=i.height,(t.width!==e||t.height!==i)&&(t.setSize(e,i),!0))},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,n=(i&&(t=Math.floor(t),e=Math.floor(e)),this.width),r=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,r)},resize:function(t,e){var i=this.zoom,n=this.autoRound,r=(n&&(t=Math.floor(t),e=Math.floor(e)),this.width),s=this.height,o=(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,this.canvas.style),a=t*i,i=e*i;return n&&(a=Math.floor(a),i=Math.floor(i)),a===t&&i===e||(o.width=a+"px",o.height=i+"px"),this.refresh(r,s)},setZoom:function(t){return this.zoom=t,this._resetZoom=!0,this.refresh()},setMaxZoom:function(){return this.zoom=this.getMaxZoom(),this._resetZoom=!0,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,n=this.game.domContainer;return n&&(this.baseSize.setCSS(n),i=this.canvas.style,(n=n.style).transform="scale("+this.displaySize.width/this.baseSize.width+","+this.displaySize.height/this.baseSize.height+")",n.marginLeft=i.marginLeft,n.marginTop=i.marginTop),this.emit(s.RESIZE,this.gameSize,this.baseSize,this.displaySize,t,e),this},updateOrientation:function(){var t;this._checkOrientation&&(this._checkOrientation=!1,(t=c(this.width,this.height))!==this.orientation&&(this.orientation=t,this.emit(s.ORIENTATION_CHANGE,t)))},updateScale:function(){var t,e,i=this.canvas.style,n=this.gameSize.width,r=this.gameSize.height,s=this.zoom,o=this.autoRound;this.scaleMode===h.SCALE_MODE.NONE?(this.displaySize.setSize(n*s,r*s),t=this.displaySize.width,e=this.displaySize.height,o&&(t=Math.floor(t),e=Math.floor(e)),this._resetZoom&&(i.width=t+"px",i.height=e+"px",this._resetZoom=!1)):this.scaleMode===h.SCALE_MODE.RESIZE?(this.displaySize.setSize(this.parentSize.width,this.parentSize.height),this.gameSize.setSize(this.displaySize.width,this.displaySize.height),this.baseSize.setSize(this.displaySize.width,this.displaySize.height),t=this.displaySize.width,e=this.displaySize.height,o&&(t=Math.floor(t),e=Math.floor(e)),this.canvas.width=t,this.canvas.height=e):(this.displaySize.setSize(this.parentSize.width,this.parentSize.height),t=this.displaySize.width,e=this.displaySize.height,o&&(t=Math.floor(t),e=Math.floor(e)),i.width=t+"px",i.height=e+"px"),this.getParentBounds(),this.updateCenter()},getMaxZoom:function(){var t=f(this.parentSize.width,this.gameSize.width,0,!0),e=f(this.parentSize.height,this.gameSize.height,0,!0);return Math.max(Math.min(t,e),1)},updateCenter:function(){var t,e,i,n=this.autoCenter;n!==h.CENTER.NO_CENTER&&(t=(i=this.canvas).style,e=(i=i.getBoundingClientRect()).width,i=i.height,e=Math.floor((this.parentSize.width-e)/2),i=Math.floor((this.parentSize.height-i)/2),n===h.CENTER.CENTER_HORIZONTALLY?i=0:n===h.CENTER.CENTER_VERTICALLY&&(e=0),t.marginLeft=e+"px",t.marginTop=i+"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,i=this.fullscreen;i.available?i.active||(e=this.getFullscreenTarget(),i.keyboard?e[i.request](Element.ALLOW_KEYBOARD_INPUT):e[i.request](t)):this.emit(s.FULLSCREEN_UNSUPPORTED)},fullscreenSuccessHandler:function(){this.getParentBounds(),this.refresh(),this.emit(s.ENTER_FULLSCREEN)},fullscreenErrorHandler:function(t){this.removeFullscreenTarget(),this.emit(s.FULLSCREEN_FAILED,t)},getFullscreenTarget:function(){var t;return this.fullscreenTarget||((t=document.createElement("div")).style.margin="0",t.style.padding="0",t.style.width="100%",t.style.height="100%",this.fullscreenTarget=t,this._createdFullscreenTarget=!0),this._createdFullscreenTarget&&(this.canvas.parentNode.insertBefore(this.fullscreenTarget,this.canvas),this.fullscreenTarget.appendChild(this.canvas)),this.fullscreenTarget},removeFullscreenTarget:function(){var t,e;this._createdFullscreenTarget&&(t=this.fullscreenTarget)&&t.parentNode&&((e=t.parentNode).insertBefore(this.canvas,t),e.removeChild(t))},stopFullscreen:function(){var t=this.fullscreen;if(!t.available)return this.emit(s.FULLSCREEN_UNSUPPORTED),!1;t.active&&document[t.cancel](),this.removeFullscreenTarget(),this.getParentBounds(),this.emit(s.LEAVE_FULLSCREEN),this.refresh()},toggleFullscreen:function(t){this.fullscreen.active?this.stopFullscreen():this.startFullscreen(t)},startListeners:function(){var e=this,i=this.listeners;i.orientationChange=function(){e.updateBounds(),e._checkOrientation=!0,e.dirty=!0},i.windowResize=function(){e.updateBounds(),e.dirty=!0},window.addEventListener("orientationchange",i.orientationChange,!1),window.addEventListener("resize",i.windowResize,!1),this.fullscreen.available&&(i.fullScreenChange=function(t){return e.onFullScreenChange(t)},i.fullScreenError=function(t){return e.onFullScreenError(t)},["webkit","moz",""].forEach(function(t){document.addEventListener(t+"fullscreenchange",i.fullScreenChange,!1),document.addEventListener(t+"fullscreenerror",i.fullScreenError,!1)}),document.addEventListener("MSFullscreenChange",i.fullScreenChange,!1),document.addEventListener("MSFullscreenError",i.fullScreenError,!1))},onFullScreenChange:function(){document.fullscreenElement||document.webkitFullscreenElement||document.msFullscreenElement||document.mozFullScreenElement?this.fullscreenSuccessHandler():this.stopFullscreen()},onFullScreenError:function(){this.removeFullscreenTarget()},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 e=this.listeners;window.removeEventListener("orientationchange",e.orientationChange,!1),window.removeEventListener("resize",e.windowResize,!1),["webkit","moz",""].forEach(function(t){document.removeEventListener(t+"fullscreenchange",e.fullScreenChange,!1),document.removeEventListener(t+"fullscreenerror",e.fullScreenError,!1)}),document.removeEventListener("MSFullscreenChange",e.fullScreenChange,!1),document.removeEventListener("MSFullscreenError",e.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===h.ORIENTATION.PORTRAIT}},isLandscape:{get:function(){return this.orientation===h.ORIENTATION.LANDSCAPE}},isGamePortrait:{get:function(){return this.height>this.width}},isGameLandscape:{get:function(){return this.width>this.height}}});t.exports=i},function(t,e,i){var n=i(18),r=i(0),s=i(76),o=i(3),a=new r({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 this.aspectMode=t=void 0===t?0: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(s(t,this.snapTo.x)),this._height=this.getNewHeight(s(e,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height;break;case a.WIDTH_CONTROLS_HEIGHT:this._width=this.getNewWidth(s(t,this.snapTo.x)),this._height=this.getNewHeight(this._width*(1/this.aspectRatio),!1);break;case a.HEIGHT_CONTROLS_WIDTH:this._height=this.getNewHeight(s(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(s(t,this.snapTo.x)),this._height=this.getNewHeight(s(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),t=e&&this._parent&&t>this._parent.width?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),t=e&&this._parent&&t>this._parent.height?Math.max(this.minHeight,this._parent.height):t},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,r=0===e?1:t/e;return i&&this.aspectRatio>r||!i&&this.aspectRatio<r?(e=(t=s(t,n.x))/this.aspectRatio,0<n.y&&(t=(e=s(e,n.y))*this.aspectRatio)):(i&&this.aspectRatio<r||!i&&this.aspectRatio>r)&&(t=(e=s(e,n.y))*this.aspectRatio,0<n.x&&(e=(t=s(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},function(t,e,i){var n=i(0),s=i(144),r=i(20),o=i(22),l=i(6),a=i(95),h=i(1),c=i(418),u=i(204),i=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,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(){if(!this.isBooted){for(var t=0;t<this._pending.length;t++){var e,i,n,r=(i=this._pending[t]).key;(n=i.scene)instanceof c?e=this.createSceneFromInstance(r,n):"object"==typeof n?e=this.createSceneFromObject(r,n):"function"==typeof n&&(e=this.createSceneFromFunction(r,n)),r=e.sys.settings.key,this.keys[r]=e,this.scenes.push(e),this._data[r]&&(e.sys.settings.data=this._data[r].data,this._data[r].autoStart&&(i.autoStart=!0)),(i.autoStart||e.sys.settings.active)&&this._start.push(r)}for(this._pending.length=0,this._data={},this.isBooted=!0,t=0;t<this._start.length;t++)i=this._start[t],this.start(i);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}else{for(t=0;t<this._queue.length;t++)this[(e=this._queue[t]).op](e.keyA,e.keyB);this._queue.length=0}},add:function(t,e,i,n){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 c?r=this.createSceneFromInstance(t,e):"object"==typeof e?(e.key=t,r=this.createSceneFromObject(t,e)):"function"==typeof e&&(r=this.createSceneFromFunction(t,e)),r.sys.settings.data=n,t=r.sys.settings.key,this.keys[t]=r,this.scenes.push(r),(i||r.sys.settings.active)&&(this._pending.length?this._start.push(t):this.start(t)),r);var r},remove:function(t){if(this.isProcessing)this._queue.push({op:"remove",keyA:t,keyB:null});else{t=this.getScene(t);if(!t||t.sys.isTransitioning())return this;var e=this.scenes.indexOf(t),i=t.sys.settings.key;-1<e&&(delete this.keys[i],this.scenes.splice(e,1),-1<this._start.indexOf(i)&&(e=this._start.indexOf(i),this._start.splice(e,1)),t.sys.destroy())}return this},bootScene:function(t){var e,i=t.sys,n=i.settings;i.sceneUpdate=h,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),0===e.list.size)?this.create(t):(n.status=s.LOADING,e.once(a.COMPLETE,this.loadComplete,this),e.start())},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;0<=i;i--){var n=this.scenes[i].sys;n.settings.status>s.START&&n.settings.status<=s.RUNNING&&n.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){e=new e;if(e instanceof c){var i=e.sys.settings.key;if(this.keys.hasOwnProperty(t=""!==i?i:t))throw new Error("Cannot add a Scene with duplicate key: "+t);return this.createSceneFromInstance(t,e)}return e.sys=new u(e),e.sys.settings.key=t,e.sys.init(this.game),e},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 c(e),n=i.sys.settings.key;""!==n?t=n:i.sys.settings.key=t,i.sys.init(this.game);for(var r,s=["init","preload","create","update","render"],o=0;o<s.length;o++){var a=l(e,s[o],null);a&&(i[s[o]]=a)}if(e.hasOwnProperty("extend"))for(var h in e.extend)e.extend.hasOwnProperty(h)&&(r=e.extend[h],"data"===h&&i.hasOwnProperty("data")&&"object"==typeof r?i.data.merge(r):"sys"!==h&&(i[h]=r));return i},getKey:function(t,e){if(t=t||"default","function"!=typeof e&&(e instanceof c?t=e.sys.settings.key:"object"==typeof e&&e.hasOwnProperty("key")&&(t=e.key),this.keys.hasOwnProperty(t)))throw new Error("Cannot add a Scene with duplicate key: "+t);return t},getScenes:function(t,e){void 0===t&&(t=!0),void 0===e&&(e=!1);for(var i=[],n=this.scenes,r=0;r<n.length;r++){var s=n[r];!s||t&&!s.sys.isActive()||i.push(s)}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){t=this.getScene(t);return t?t.sys.isActive():null},isPaused:function(t){t=this.getScene(t);return t?t.sys.isPaused():null},isVisible:function(t){t=this.getScene(t);return t?t.sys.isVisible():null},isSleeping:function(t){t=this.getScene(t);return t?t.sys.isSleeping():null},pause:function(t,e){t=this.getScene(t);return t&&t.sys.pause(e),this},resume:function(t,e){t=this.getScene(t);return t&&t.sys.resume(e),this},sleep:function(t,e){t=this.getScene(t);return t&&!t.sys.isTransitioning()&&t.sys.sleep(e),this},wake:function(t,e){t=this.getScene(t);return t&&t.sys.wake(e),this},run:function(t,e){var i=this.getScene(t);if(!i){for(var n=0;n<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){var i=this.getScene(t);if(i){var n,r=i.sys;if(r.isActive()||r.isPaused())r.shutdown(),r.sceneUpdate=h,r.start(e);else if(r.sceneUpdate=h,r.start(e),(n=r.load?r.load:n)&&r.settings.hasOwnProperty("pack")&&(n.reset(),n.addPack({payload:r.settings.pack})))return r.settings.status=s.LOADING,n.once(a.COMPLETE,this.payloadComplete,this),n.start(),this;this.bootScene(i)}}else this._data[t]={autoStart:!0,data:e};return this},stop:function(t,e){t=this.getScene(t);return t&&!t.sys.isTransitioning()&&t.sys.shutdown(e),this},switch:function(t,e){var i=this.getScene(t),n=this.getScene(e);return i&&n&&i!==n&&(this.sleep(t),this.isSleeping(e)?this.wake(e):this.start(e)),this},getAt:function(t){return this.scenes[t]},getIndex:function(t){t=this.getScene(t);return this.scenes.indexOf(t)},bringToTop:function(t){var e;return this.isProcessing?this._queue.push({op:"bringToTop",keyA:t,keyB:null}):-1!==(e=this.getIndex(t))&&e<this.scenes.length&&(t=this.getScene(t),this.scenes.splice(e,1),this.scenes.push(t)),this},sendToBack:function(t){var e;return this.isProcessing?this._queue.push({op:"sendToBack",keyA:t,keyB:null}):-1!==(e=this.getIndex(t))&&0<e&&(t=this.getScene(t),this.scenes.splice(e,1),this.scenes.unshift(t)),this},moveDown:function(t){var e,i,n;return this.isProcessing?this._queue.push({op:"moveDown",keyA:t,keyB:null}):0<(e=this.getIndex(t))&&(i=e-1,t=this.getScene(t),n=this.getAt(i),this.scenes[e]=n,this.scenes[i]=t),this},moveUp:function(t){var e,i,n;return this.isProcessing?this._queue.push({op:"moveUp",keyA:t,keyB:null}):(e=this.getIndex(t))<this.scenes.length-1&&(i=e+1,t=this.getScene(t),n=this.getAt(i),this.scenes[e]=n,this.scenes[i]=t),this},moveAbove:function(t,e){return t!==e&&(this.isProcessing?this._queue.push({op:"moveAbove",keyA:t,keyB:e}):(t=this.getIndex(t),e=this.getIndex(e),-1!==t&&-1!==e&&(i=this.getAt(e),this.scenes.splice(e,1),this.scenes.splice(t+1,0,i)))),this;var i},moveBelow:function(t,e){return t!==e&&(this.isProcessing?this._queue.push({op:"moveBelow",keyA:t,keyB:e}):(t=this.getIndex(t),e=this.getIndex(e),-1!==t&&-1!==e&&(i=this.getAt(e),this.scenes.splice(e,1),0===t?this.scenes.unshift(i):this.scenes.splice(t,0,i)))),this;var i},queueOp:function(t,e,i){return this._queue.push({op:t,keyA:e,keyB:i}),this},swapPosition:function(t,e){return t!==e&&(this.isProcessing?this._queue.push({op:"swapPosition",keyA:t,keyB:e}):(t=this.getIndex(t))!==(e=this.getIndex(e))&&-1!==t&&-1!==e&&(i=this.getAt(t),this.scenes[t]=this.scenes[e],this.scenes[e]=i)),this;var i},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)}},destroy:function(){for(var t=0;t<this.scenes.length;t++)this.scenes[t].sys.destroy();this.update=h,this.scenes=[],this._pending=[],this._start=[],this._queue=[],this.game=null}});t.exports=i},function(t,e,i){var n=i(0),r=i(204),i=new n({initialize:function(t){this.sys=new r(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(){}});t.exports=i},function(t,e,i){var r=i(2),s=i(205);t.exports=function(t){var e=t.game.config.defaultPhysicsSystem,t=r(t.settings,"physics",!1);if(e||t){var i=[];if(e&&i.push(s(e+"Physics")),t)for(var n in t)n=s(n.concat("Physics")),-1===i.indexOf(n)&&i.push(n);return i}}},function(t,e,i){var n=i(2);t.exports=function(t){var e=t.plugins.getDefaultScenePlugins(),t=n(t.settings,"plugins",!1);return Array.isArray(t)?t:e||[]}},function(t,e,i){var n=i(144),r=i(6),s=i(127),o=i(978);t.exports={create:function(t){return"string"==typeof t?t={key:t}:void 0===t&&(t={}),{status:n.PENDING,key:r(t,"key",""),active:r(t,"active",!1),visible:r(t,"visible",!0),isBooted:!1,isTransition:!1,transitionFrom:null,transitionDuration:0,transitionAllowInput:!0,data:{},pack:r(t,"pack",!1),cameras:r(t,"cameras",null),map:r(t,"map",s(o,r(t,"mapAdd",{}))),physics:r(t,"physics",{}),loader:r(t,"loader",{}),plugins:r(t,"plugins",!1),input:r(t,"input",{})}}}},function(t,e,i){var o=i(31),r=i(423),n=i(0),s=i(38),a=i(33),h=i(9),l=i(106),c=i(22),u=i(388),d=i(6),p=i(425),f=i(206),i=new n({Extends:h,initialize:function(t){h.call(this),this.game=t,this.name="TextureManager",this.list={},this._tempCanvas=o.create2D(this,1,1),this._tempContext=this._tempCanvas.getContext("2d"),this._pending=0,t.events.once(c.BOOT,this.boot,this)},boot:function(){this._pending=3,this.on(l.LOAD,this.updatePending,this),this.on(l.ERROR,this.updatePending,this);var t=this.game.config;this.addBase64("__DEFAULT",t.defaultImage),this.addBase64("__MISSING",t.missingImage),this.addBase64("__WHITE",t.whiteImage),this.game.events.once(c.DESTROY,this.destroy,this)},updatePending:function(){this._pending--,0===this._pending&&(this.off(l.LOAD),this.off(l.ERROR),this.emit(l.READY))},checkKey:function(t){return!this.exists(t)||!1},remove:function(t){if("string"==typeof t){if(!this.exists(t))return this;t=this.get(t)}return this.list.hasOwnProperty(t.key)&&(t.destroy(),this.emit(l.REMOVE,t.key)),this},removeKey:function(t){return this.list.hasOwnProperty(t)&&delete this.list[t],this},addBase64:function(e,t){var i,n;return this.checkKey(e)&&(i=this,(n=new Image).onerror=function(){i.emit(l.ERROR,e)},n.onload=function(){var t=i.create(e,n);p.Image(t,0),i.emit(l.ADD,e,t),i.emit(l.LOAD,e,t)},n.src=t),this},getBase64:function(t,e,i,n){void 0===i&&(i="image/png"),void 0===n&&(n=.92);var r,s="",t=this.getFrame(t,e);return t&&(t.source.isRenderTexture||t.source.isGLTexture)||t&&(e=t.canvasData,(r=o.create2D(this,e.width,e.height)).getContext("2d").drawImage(t.source.image,e.x,e.y,e.width,e.height,0,0,e.width,e.height),s=r.toDataURL(i,n),o.remove(r)),s},addImage:function(t,e,i){var n=null;return this.checkKey(t)&&(n=this.create(t,e),p.Image(n,0),i&&n.setDataSource(i),this.emit(l.ADD,t,n)),n},addGLTexture:function(t,e,i,n){var r=null;return this.checkKey(t)&&(void 0===i&&(i=e.width),void 0===n&&(n=e.height),(r=this.create(t,e,i,n)).add("__BASE",0,0,0,i,n),this.emit(l.ADD,t,r)),r},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(l.ADD,t,i)),i},generate:function(t,e){var i;return this.checkKey(t)?(i=o.create(this,1,1),e.canvas=i,u(e),this.addCanvas(t,i)):null},createCanvas:function(t,e,i){return void 0===e&&(e=256),void 0===i&&(i=256),this.checkKey(t)?(e=o.create(this,e,i,a.CANVAS,!0),this.addCanvas(t,e)):null},addCanvas:function(t,e,i){var n=null;return(i=void 0===i?!1:i)?n=new r(this,t,e,e.width,e.height):this.checkKey(t)&&(n=new r(this,t,e,e.width,e.height),this.list[t]=n,this.emit(l.ADD,t,n)),n},addAtlas:function(t,e,i,n){return 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 r=null;if(this.checkKey(t)){if(r=this.create(t,e),Array.isArray(i))for(var s=1===i.length,o=0;o<r.source.length;o++){var a=s?i[0]:i[o];p.JSONArray(r,o,a)}else p.JSONArray(r,0,i);n&&r.setDataSource(n),this.emit(l.ADD,t,r)}return r},addAtlasJSONHash:function(t,e,i,n){var r=null;if(this.checkKey(t)){if(r=this.create(t,e),Array.isArray(i))for(var s=0;s<i.length;s++)p.JSONHash(r,s,i[s]);else p.JSONHash(r,0,i);n&&r.setDataSource(n),this.emit(l.ADD,t,r)}return r},addAtlasXML:function(t,e,i,n){var r=null;return this.checkKey(t)&&(r=this.create(t,e),p.AtlasXML(r,0,i),n&&r.setDataSource(n),this.emit(l.ADD,t,r)),r},addUnityAtlas:function(t,e,i,n){var r=null;return this.checkKey(t)&&(r=this.create(t,e),p.UnityYAML(r,0,i),n&&r.setDataSource(n),this.emit(l.ADD,t,r)),r},addSpriteSheet:function(t,e,i){var n,r=null;return this.checkKey(t)&&(e=(r=this.create(t,e)).source[0].width,n=r.source[0].height,p.SpriteSheet(r,0,0,0,e,n,i),this.emit(l.ADD,t,r)),r},addSpriteSheetFromAtlas:function(t,e){if(!this.checkKey(t))return null;var i=d(e,"atlas",null),n=d(e,"frame",null);if(i&&n){i=this.get(i).get(n);if(i)return n=this.create(t,i.source.image),i.trimmed?p.SpriteSheetFromAtlas(n,i,e):p.SpriteSheet(n,0,i.cutX,i.cutY,i.cutWidth,i.cutHeight,e),this.emit(l.ADD,t,n),n}},create:function(t,e,i,n){var r=null;return this.checkKey(t)&&(r=new f(this,t,e,i,n),this.list[t]=r),r},exists:function(t){return this.list.hasOwnProperty(t)},get:function(t){return this.list[t=void 0===t?"__DEFAULT":t]||(t instanceof f?t: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)},getTextureKeys:function(){var t,e=[];for(t in this.list)"__DEFAULT"!==t&&"__MISSING"!==t&&e.push(t);return e},getPixel:function(t,e,i,n){i=this.getFrame(i,n);if(i){t-=i.x,e-=i.y;var n=i.data.cut;if(t+=n.x,e+=n.y,t>=n.x&&t<n.r&&e>=n.y&&e<n.b)return(n=this._tempContext).clearRect(0,0,1,1),n.drawImage(i.source.image,t,e,1,1,0,0,1,1),i=n.getImageData(0,0,1,1),new s(i.data[0],i.data[1],i.data[2],i.data[3])}return null},getPixelAlpha:function(t,e,i,n){i=this.getFrame(i,n);if(i){t-=i.x,e-=i.y;var n=i.data.cut;if(t+=n.x,e+=n.y,t>=n.x&&t<n.r&&e>=n.y&&e<n.b)return(n=this._tempContext).clearRect(0,0,1,1),n.drawImage(i.source.image,t,e,1,1,0,0,1,1),n.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,n=[null],r=1;r<arguments.length;r++)n.push(arguments[r]);for(i in this.list)n[0]=this.list[i],t.apply(e,n)},destroy:function(){for(var t in this.list)this.list[t].destroy();this.list={},this.game=null,o.remove(this._tempCanvas)}});t.exports=i},function(t,e,i){var n=i(0),d=i(18),p=i(38),r=i(33),s=i(138),o=i(206),i=new n({Extends:o,initialize:function(t,e,i,n,r){o.call(this,t,e,i,n,r),this.add("__BASE",0,0,0,n,r),this._source=this.frames.__BASE.source,this.canvas=this._source.image,this.context=this.canvas.getContext("2d"),this.width=n,this.height=r,this.imageData=this.context.getImageData(0,0,n,r),this.data=null,this.imageData&&(this.data=this.imageData.data),this.pixels=null,this.buffer,this.data&&(this.imageData.data.buffer?(this.buffer=this.imageData.data.buffer,this.pixels=new Uint32Array(this.buffer)):window.ArrayBuffer?(this.buffer=new ArrayBuffer(this.imageData.data.length),this.pixels=new Uint32Array(this.buffer)):this.pixels=this.imageData.data)},update:function(){return this.imageData=this.context.getImageData(0,0,this.width,this.height),this.data=this.imageData.data,this.imageData.data.buffer?(this.buffer=this.imageData.data.buffer,this.pixels=new Uint32Array(this.buffer)):window.ArrayBuffer?(this.buffer=new ArrayBuffer(this.imageData.data.length),this.pixels=new Uint32Array(this.buffer)):this.pixels=this.imageData.data,this.manager.game.config.renderType===r.WEBGL&&this.refresh(),this},draw:function(t,e,i){return this.context.drawImage(i,t,e),this.update()},drawFrame:function(t,e,i,n){void 0===i&&(i=0),void 0===n&&(n=0);var r,s,o,t=this.manager.getFrame(t,e);return t?(e=t.canvasData,r=t.cutWidth,s=t.cutHeight,o=t.source.resolution,this.context.drawImage(t.source.image,e.x,e.y,r,s,i,n,r/o,s/o),this.update()):this},setPixel:function(t,e,i,n,r,s){var o;return void 0===s&&(s=255),t=Math.abs(Math.floor(t)),e=Math.abs(Math.floor(e)),-1<this.getIndex(t,e)&&((o=this.context.getImageData(t,e,1,1)).data[0]=i,o.data[1]=n,o.data[2]=r,o.data[3]=s,this.context.putImageData(o,t,e)),this},putData:function(t,e,i,n,r,s,o){return void 0===s&&(s=t.width),void 0===o&&(o=t.height),this.context.putImageData(t,e,i,n=void 0===n?0:n,r=void 0===r?0:r,s,o),this},getData:function(t,e,i,n){return t=d(Math.floor(t),0,this.width-1),e=d(Math.floor(e),0,this.height-1),i=d(i,1,this.width-t),n=d(n,1,this.height-e),this.context.getImageData(t,e,i,n)},getPixel:function(t,e,i){i=i||new p;var n,r,s,t=this.getIndex(t,e);return-1<t&&(n=(e=this.data)[t+0],r=e[t+1],s=e[t+2],e=e[t+3],i.setTo(n,r,s,e)),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 r=d(t,0,this.width),s=d(t+i,0,this.width),t=d(e,0,this.height),o=d(e+n,0,this.height),a=new p,h=[],l=t;l<o;l++){for(var c=[],u=r;u<s;u++)a=this.getPixel(u,l,a),c.push({x:u,y:l,color:a.color,alpha:a.alphaGL});h.push(c)}return h},getIndex:function(t,e){return t=Math.abs(Math.round(t)),e=Math.abs(Math.round(e)),t<this.width&&e<this.height?4*(t+e*this.width):-1},refresh:function(){return this._source.update(),this},getCanvas:function(){return this.canvas},getContext:function(){return this.context},clear:function(t,e,i,n){return void 0===i&&(i=this.width),void 0===n&&(n=this.height),this.context.clearRect(t=void 0===t?0:t,e=void 0===e?0:e,i,n),this.update()},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=s(t,e),this.frames.__BASE.setSize(t,e,0,0),this.width=t,this.height=e,this.refresh()),this},destroy:function(){o.prototype.destroy.call(this),this._source=null,this.canvas=null,this.context=null,this.imageData=null,this.data=null,this.pixels=null,this.buffer=null}});t.exports=i},function(t,e,i){var n=i(31),r=i(0),o=i(138),a=i(168),i=new r({initialize:function(t,e,i,n,r){void 0===r&&(r=!1);var s=t.manager.game;this.renderer=s.renderer,this.texture=t,this.source=e,this.image=e,this.compressionAlgorithm=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=a.DEFAULT,this.isCanvas=e instanceof HTMLCanvasElement,this.isVideo=window.hasOwnProperty("HTMLVideoElement")&&e instanceof HTMLVideoElement,this.isRenderTexture="RenderTexture"===e.type,this.isGLTexture=window.hasOwnProperty("WebGLTexture")&&e instanceof WebGLTexture,this.isPowerOf2=o(this.width,this.height),this.glTexture=null,this.glIndex=0,this.glIndexCounter=-1,this.flipY=r,this.init(s)},init:function(t){var e=this.renderer;e&&(e.gl?this.isCanvas?this.glTexture=e.createCanvasTexture(this.image,!1,this.flipY):this.isVideo?this.glTexture=e.createVideoTexture(this.image,!1,this.flipY):this.isRenderTexture?(this.image=this.source.canvas,this.glTexture=e.createTextureFromSource(null,this.width,this.height,this.scaleMode)):this.isGLTexture?this.glTexture=this.source:this.glTexture=e.createTextureFromSource(this.image,this.width,this.height,this.scaleMode):this.isRenderTexture&&(this.image=this.source.canvas)),t.config.antialias||this.setFilter(1)},setFilter:function(t){this.renderer.gl&&this.renderer.setTextureFilter(this.glTexture,t),this.scaleMode=t},setFlipY:function(t){return this.flipY=t=void 0===t?!0:t,this},update:function(){var t=this.renderer.gl;t&&this.isCanvas?this.glTexture=this.renderer.updateCanvasTexture(this.image,this.glTexture,this.flipY):t&&this.isVideo&&(this.glTexture=this.renderer.updateVideoTexture(this.image,this.glTexture,this.flipY))},destroy:function(){this.glTexture&&this.renderer.deleteTexture(this.glTexture,!0),this.isCanvas&&n.remove(this.image),this.renderer=null,this.texture=null,this.source=null,this.image=null,this.glTexture=null}});t.exports=i},function(t,e,i){t.exports={AtlasXML:i(979),Canvas:i(980),Image:i(981),JSONArray:i(982),JSONHash:i(983),SpriteSheet:i(984),SpriteSheetFromAtlas:i(985),UnityYAML:i(986)}},function(t,e,i){var n=i(427),r=i(430),s=i(432);t.exports={create:function(t){var e=t.config.audio,i=t.device.audio;return new(e.noAudio||!i.webAudio&&!i.audioData?r:i.webAudio&&!e.disableWebAudio?s:n)(t)}}},function(t,e,i){var n=i(145),r=i(0),o=i(70),s=i(429),i=new r({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){t=new s(this,t,e);return this.sounds.push(t),t},unlock:function(){this.locked=!1;var e,i,n,s=this;this.game.cache.audio.entries.each(function(t,e){for(var i=0;i<e.length;i++)if("true"===e[i].dataset.locked)return!(s.locked=!0);return!0}),this.locked&&(e=!1,i=function(){e=!0},n=function(){var r,t;e?e=!1:(document.body.removeEventListener("touchmove",i),document.body.removeEventListener("touchend",n),r=[],s.game.cache.audio.entries.each(function(t,e){for(var i=0;i<e.length;i++){var n=e[i];"true"===n.dataset.locked&&r.push(n)}return!0}),0!==r.length&&((t=r[r.length-1]).oncanplaythrough=function(){t.oncanplaythrough=null,r.forEach(function(t){t.dataset.locked="false"}),s.unlocked=!0},r.forEach(function(t){t.load()})))},this.once(o.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(o.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(o.GLOBAL_VOLUME,this,t)}}});t.exports=i},function(t,e,i){var a=i(78);t.exports=function(t,e,i,n,r){if(void 0===r&&(r=t.length),a(t,n=void 0===n?0:n,r))for(var s=n;s<r;s++){var o=t[s];if(!e||void 0===i&&o.hasOwnProperty(e)||e&&void 0!==i&&o[e]===i)return o}return null}},function(t,e,i){var n=i(146),r=i(0),s=i(70),o=i(18),i=new r({Extends:n,initialize:function(t,e,i){if(void 0===i&&(i={}),this.tags=t.game.cache.audio.get(e),!this.tags)throw new Error('There is no audio asset with key "'+e+'" in the audio cache');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(s.PLAY,this),0))},pause:function(){return!(this.manager.isLocked(this,"pause")||0<this.startTime||!n.prototype.pause.call(this)||(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit(s.PAUSE,this),0))},resume:function(){return!(this.manager.isLocked(this,"resume")||0<this.startTime||!n.prototype.resume.call(this)||!this.pickAndPlayAudioTag()||(this.emit(s.RESUME,this),0))},stop:function(){return!this.manager.isLocked(this,"stop")&&!!n.prototype.stop.call(this)&&(this.stopAndReleaseAudioTag(),this.emit(s.STOP,this),!0)},pickAndPlayAudioTag:function(){var t,e;return this.pickAudioTag()?(e=this.currentConfig.seek,t=this.currentConfig.delay,e=(this.currentMarker?this.currentMarker.start:0)+e,this.previousTime=e,this.audio.currentTime=e,this.applyConfig(),0===t?(this.startTime=0,this.audio.paused&&this.playCatchPromise()):(this.startTime=window.performance.now()+1e3*t,this.audio.paused||this.audio.pause()),this.resetConfig(),!0):(this.reset(),!1)},pickAudioTag:function(){if(this.audio)return!0;for(var e,t,i=0;i<this.tags.length;i++){var n=this.tags[i];if("false"===n.dataset.used)return n.dataset.used="true",this.audio=n,!0}return!!this.manager.override&&(e=[],this.manager.forEachActiveSound(function(t){t.key===this.key&&t.audio&&e.push(t)},this),e.sort(function(t,e){return t.loop===e.loop?e.seek/e.duration-t.seek/t.duration:t.loop?1:-1}),t=e[0],this.audio=t.audio,t.reset(),t.audio=null,t.startTime=0,!(t.previousTime=0))},playCatchPromise:function(){var t=this.audio.play();t&&t.catch(function(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(0<this.startTime)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());else{var t=this.currentMarker?this.currentMarker.start:0,e=t+this.duration,i=this.audio.currentTime;if(this.currentConfig.loop)i>=e-this.manager.loopEndOffset?(this.audio.currentTime=t+Math.max(0,i-e),i=this.audio.currentTime):i<t&&(this.audio.currentTime+=t,i=this.audio.currentTime),i<this.previousTime&&this.emit(s.LOOPED,this);else if(e<=i)return this.reset(),this.stopAndReleaseAudioTag(),void this.emit(s.COMPLETE,this);this.previousTime=i}},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(s.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(s.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,s.RATE,t)||(this.calculateRate(),this.emit(s.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,s.DETUNE,t)||(this.calculateRate(),this.emit(s.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)||0<this.startTime||(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(s.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(s.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(s.PAN,this,t)}},setPan:function(t){return this.pan=t,this}});t.exports=i},function(t,e,i){var n=i(145),r=i(0),s=i(9),o=i(431),i=i(1),r=new r({Extends:s,initialize:function(t){s.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){t=new o(this,t,e);return this.sounds.push(t),t},addAudioSprite:function(t,e){t=this.add(t,e);return t.spritemap={},t},play:function(t,e){return!1},playAudioSprite:function(t,e,i){return!1},remove:function(t){return n.prototype.remove.call(this,t)},removeByKey:function(t){return n.prototype.removeByKey.call(this,t)},pauseAll:i,resumeAll:i,stopAll:i,update:i,setRate:i,setDetune:i,setMute:i,setVolume:i,forEachActiveSound:function(t,e){n.prototype.forEachActiveSound.call(this,t,e)},destroy:function(){n.prototype.destroy.call(this)}});t.exports=r},function(t,e,i){function n(){return!1}function r(){return this}var s=i(146),o=i(0),a=i(9),h=i(17),i=new o({Extends:a,initialize:function(t,e,i){void 0===i&&(i={}),a.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=h({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:n,updateMarker:n,removeMarker:function(){return null},play:n,pause:n,resume:n,stop:n,destroy:function(){s.prototype.destroy.call(this)},setMute:r,setVolume:r,setRate:r,setDetune:r,setSeek:r,setLoop:r,setPan:r});t.exports=i},function(t,e,i){var l=i(433),n=i(145),r=i(0),c=i(70),s=i(22),o=i(434),i=new r({Extends:n,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&&("ontouchstart"in window||"onclick"in window),n.call(this,t),this.locked&&t.isBooted?this.unlock():t.events.once(s.BOOT,this.unlock,this)},createAudioContext:function(t){t=t.config.audio;return t.context?(t.context.resume(),t.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){t=new o(this,t,e);return this.sounds.push(t),t},decodeAudio:function(t,e){for(var i=Array.isArray(t)?t:[{key:t,data:e}],n=this.game.cache.audio,r=i.length,s=0;s<i.length;s++){var o=i[s],a=o.key,o=o.data,h=("string"==typeof o&&(o=l(o)),function(t,e){n.add(t,e),this.emit(c.DECODED,t),0==--r&&this.emit(c.DECODED_ALL)}.bind(this,a)),a=function(t,e){0==--r&&this.emit(c.DECODED_ALL)}.bind(this,a);this.context.decodeAudioData(o,h,a)}},unlock:function(){function e(){var t;i.context&&n&&(t=n.removeEventListener,i.context.resume().then(function(){t("touchstart",e),t("touchend",e),t("click",e),t("keydown",e),i.unlocked=!0},function(){t("touchstart",e),t("touchend",e),t("click",e),t("keydown",e)}))}var i=this,n=document.body;n&&(n.addEventListener("touchstart",e,!1),n.addEventListener("touchend",e,!1),n.addEventListener("click",e,!1),n.addEventListener("keydown",e,!1))},onBlur:function(){this.locked||this.context.suspend()},onFocus:function(){var t=this.context;"suspended"!==t.state&&"interrupted"!==t.state||this.locked||t.resume()},update:function(t,e){n.prototype.update.call(this,t,e);t=this.context;t&&"interrupted"===t.state&&t.resume()},destroy:function(){var t;this.destination=null,this.masterVolumeNode.disconnect(),this.masterVolumeNode=null,this.masterMuteNode.disconnect(),this.masterMuteNode=null,this.game.config.audio.context?this.context.suspend():(t=this).context.close().then(function(){t.context=null}),n.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:1,0),this.emit(c.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(c.GLOBAL_VOLUME,this,t)}}});t.exports=i},function(t,e){for(var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=new Uint8Array(256),n=0;n<i.length;n++)c[i.charCodeAt(n)]=n;t.exports=function(t){var e,i,n,r,s=(t=t.substr(t.indexOf(",")+1)).length,o=.75*s,a=0;"="===t[s-1]&&(o--,"="===t[s-2]&&o--);for(var o=new ArrayBuffer(o),h=new Uint8Array(o),l=0;l<s;l+=4)e=c[t.charCodeAt(l)],i=c[t.charCodeAt(l+1)],n=c[t.charCodeAt(l+2)],r=c[t.charCodeAt(l+3)],h[a++]=e<<2|i>>4,h[a++]=(15&i)<<4|n>>2,h[a++]=(3&n)<<6|63&r;return o}},function(t,e,i){var n=i(146),r=i(0),s=i(70),i=new r({Extends:n,initialize:function(t,e,i){if(void 0===i&&(i={}),this.audioBuffer=t.game.cache.audio.get(e),!this.audioBuffer)throw new Error('Audio key "'+e+'" missing from cache');this.source=null,this.loopSource=null,this.muteNode=t.context.createGain(),this.volumeNode=t.context.createGain(),this.pannerNode=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.createStereoPanner?(this.pannerNode=t.context.createStereoPanner(),this.volumeNode.connect(this.pannerNode),this.pannerNode):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(s.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(s.PAUSE,this),0))},resume:function(){return!(this.manager.context.currentTime<this.startTime||!n.prototype.resume.call(this)||(this.createAndStartBufferSource(),this.emit(s.RESUME,this),0))},stop:function(){return!!n.prototype.stop.call(this)&&(this.stopAndRemoveBufferSource(),this.emit(s.STOP,this),!0)},createAndStartBufferSource:function(){var t=this.currentConfig.seek,e=this.currentConfig.delay,e=this.manager.context.currentTime+e,i=(this.currentMarker?this.currentMarker.start:0)+t,n=this.duration-t;this.playTime=e-t,this.startTime=e,this.source=this.createBufferSource(),this.applyConfig(),this.source.start(Math.max(0,e),Math.max(0,i),Math.max(0,n)),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 e=this,t=this.manager.context.createBufferSource();return t.buffer=this.audioBuffer,t.connect(this.muteNode),t.onended=function(t){t.target===e.source&&(e.currentConfig.loop?e.hasLooped=!0:e.hasEnded=!0)},t},stopAndRemoveBufferSource:function(){this.source&&(this.source.stop(),this.source.disconnect(),this.source=null),this.playTime=0,this.startTime=0,this.stopAndRemoveLoopBufferSource()},stopAndRemoveLoopBufferSource:function(){this.loopSource&&(this.loopSource.stop(),this.loopSource.disconnect(),this.loopSource=null),this.loopTime=0},applyConfig:function(){this.rateUpdates.length=0,this.rateUpdates.push({time:0,rate:1}),n.prototype.applyConfig.call(this)},update:function(){this.hasEnded?(this.hasEnded=!1,n.prototype.stop.call(this),this.stopAndRemoveBufferSource(),this.emit(s.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(s.LOOPED,this))},destroy:function(){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.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(s.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(s.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:1,0),this.emit(s.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(s.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(s.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(s.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(s.PAN,this,t)}},setPan:function(t){return this.pan=t,this}});t.exports=i},function(t,e){t.exports=function(t){for(var e=t.length,i=t[0].length,n=new Array(i),r=0;r<i;r++){n[r]=new Array(e);for(var s=e-1;-1<s;s--)n[r][s]=t[s][r]}return n}},function(t,e){function p(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function f(t,e){return t<e?-1:e<t?1:0}function g(t,e,i,n,r){for(void 0===i&&(i=0),void 0===n&&(n=t.length-1),void 0===r&&(r=f);i<n;){600<n-i&&(s=n-i+1,l=e-i+1,a=Math.log(s),o=.5*Math.exp(2*a/3),a=.5*Math.sqrt(a*o*(s-o)/s)*(l-s/2<0?-1:1),h=Math.max(i,Math.floor(e-l*o/s+a)),l=Math.min(n,Math.floor(e+(s-l)*o/s+a)),g(t,e,h,l,r));var s,o,a,h,l,c=t[e],u=i,d=n;for(p(t,i,e),0<r(t[n],c)&&p(t,i,n);u<d;){for(p(t,u,d),u++,d--;r(t[u],c)<0;)u++;for(;0<r(t[d],c);)d--}0===r(t[i],c)?p(t,i,d):p(t,++d,n),d<=e&&(i=d+1),e<=d&&(n=d-1)}}t.exports=g},function(t,e,i){var d=i(6),p=i(131);t.exports=function(t,e,i){var n=d(i,"max",0),r=d(i,"qty",1),s=d(i,"random",!1),o=d(i,"randomB",!1),a=d(i,"repeat",0),h=d(i,"yoyo",!1),l=[];o&&p(e),-1===a&&(a=0===n?0:(i=t.length*e.length*r,h&&(i*=2),Math.ceil(n/i)));for(var c=0;c<=a;c++){var u=function(t,e,i){for(var n=[],r=0;r<t.length;r++)for(var s=0;s<e.length;s++)for(var o=0;o<i;o++)n.push({a:t[r],b:e[s]});return n}(t,e,r);s&&p(u),l=l.concat(u),h&&(u.reverse(),l=l.concat(u))}return n&&l.splice(n),l}},function(t,e,i){t.exports={PROCESS_QUEUE_ADD:i(1041),PROCESS_QUEUE_REMOVE:i(1042)}},function(t,e,i){var c=i(13);t.exports=function(t,e){var i,n,r,s,o,a,h,l,e=c(e,"anims",null);return null!==e&&("string"==typeof e?t.anims.play(e):"object"==typeof e&&(i=t.anims,(l=c(e,"key",void 0))&&(n=c(e,"startFrame",void 0),r=c(e,"delay",0),s=c(e,"repeat",0),o=c(e,"repeatDelay",0),a=c(e,"yoyo",!1),h=c(e,"play",!1),e=c(e,"delayedPlay",0),l={key:l,delay:r,repeat:s,repeatDelay:o,yoyo:a,startFrame:n},h?i.play(l):0<e?i.playAfterDelay(l,e):i.load(l)))),t}},function(t,e,i){var n=i(0),r=i(109),i=new n({initialize:function(t,e,i,n,r){this.parent=t,this.x=e,this.y=i,this.frame=n,this.data={},this.tint=16777215,this._visible=r,this._alpha=1,this.flipX=!1,this.flipY=!1},setFrame:function(t){return void 0===t?this.frame=this.parent.frame:t instanceof r&&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|=0<this._alpha!=0<t,this._alpha=t}}});t.exports=i},function(t,e,i){var o=i(10);t.exports=function(t,e,i){void 0===i&&(i=new o);var n=Math.min(t.x,e.x),r=Math.min(t.y,e.y),s=Math.max(t.right,e.right)-n,t=Math.max(t.bottom,e.bottom)-r;return i.setTo(n,r,s,t)}},function(t,e,i){var n=i(0),r=i(11),s=i(1055),o=i(15),a=i(7),h=i(202),l=i(20),c=i(140),i=new n({Extends:o,Mixins:[r.AlphaSingle,r.BlendMode,r.Depth,r.Origin,r.ScrollFactor,r.Transform,r.Visible,s],initialize:function(t,e,i,n,r,s){o.call(this,t,"DOMElement"),this.parent=t.sys.game.domContainer,this.cache=t.sys.cache.html,this.node,this.transformOnly=!1,this.skewX=0,this.skewY=0,this.rotate3d=new c,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),r,s):this.createElement(n,r,s):n&&this.setElement(n,r,s),t.sys.events.on(l.SLEEP,this.handleSceneEvent,this),t.sys.events.on(l.WAKE,this.handleSceneEvent,this)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(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 r in e)n.style[r]=e[r];else"string"==typeof e&&(n.style=e);return n.style.zIndex="0",n.style.display="inline",n.style.position="absolute",(n.phaser=this).parent&&this.parent.appendChild(n),i&&(n.innerText=i),this.updateSize()},createFromCache:function(t,e){t=this.cache.get(t);return t&&this.createFromHTML(t,e),this},createFromHTML:function(t,e){void 0===e&&(e="div"),this.removeElement();e=document.createElement(e);return(this.node=e).style.zIndex="0",e.style.display="inline",e.style.position="absolute",(e.phaser=this).parent&&this.parent.appendChild(e),e.innerHTML=t,this.updateSize()},removeElement:function(){return this.node&&(h(this.node),this.node=null),this},updateSize:function(){var t=this.node,e=t.getBoundingClientRect();return this.width=t.clientWidth,this.height=t.clientHeight,this.displayWidth=e.width||0,this.displayHeight=e.height||0,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},preUpdate: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)}});t.exports=i},function(t,e,i){var p=i(1056),f=i(15),i=i(25),g=new i,m=new i,y=new i;t.exports=function(t,e,i,n){var r,s,o,a,h,l,c,u,d;e.node&&(r=e.node.style,o=e.scene.sys.settings,!r||!o.visible||f.RENDER_MASK!==e.renderFlags||0!==e.cameraFilter&&e.cameraFilter&i.id||e.parentContainer&&!e.parentContainer.willRender()?r.display="none":(o=e.parentContainer,s=i.alpha*e.alpha,o&&(s*=o.alpha),o=g,a=m,h=y,c=l=0,d=u="0%",n?(l=e.width*e.scaleX*e.originX,c=e.height*e.scaleY*e.originY,a.applyITRS(e.x-l,e.y-c,e.rotation,e.scaleX,e.scaleY),o.copyFrom(i.matrix),o.multiplyWithOffset(n,-i.scrollX*e.scrollFactorX,-i.scrollY*e.scrollFactorY),a.e=e.x-l,a.f=e.y-c):(l=e.width*e.originX,c=e.height*e.originY,a.applyITRS(e.x-l,e.y-c,e.rotation,e.scaleX,e.scaleY),o.copyFrom(i.matrix),u=100*e.originX+"%",d=100*e.originY+"%",a.e-=i.scrollX*e.scrollFactorX,a.f-=i.scrollY*e.scrollFactorY),o.multiply(a,h),e.transformOnly||(r.display="block",r.opacity=s,r.zIndex=e._depth,r.pointerEvents=e.pointerEvents,r.mixBlendMode=p[e._blendMode]),r.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+")",r.transformOrigin=u+" "+d))}},function(t,e,i){var n=i(0),r=i(11),s=i(15),i=i(1060),n=new n({Extends:s,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Flip,r.Origin,r.ScrollFactor,r.Size,r.Texture,r.Tint,r.Transform,r.Visible,i],initialize:function(t){s.call(this,t,"Extern")},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(){},render:function(){}});t.exports=n},function(t,e,i){var n=i(218),r=i(98),s=i(14),o=i(4);t.exports=function(t,e,i){void 0===i&&(i=new o);e=r(e,0,s.PI2);return n(t,e,i)}},function(t,e,i){var o=i(447),a=i(218),h=i(98),l=i(14);t.exports=function(t,e,i,n){void 0===n&&(n=[]),!e&&0<i&&(e=o(t)/i);for(var r=0;r<e;r++){var s=h(r/e,0,l.PI2);n.push(a(t,s))}return n}},function(t,e){t.exports=function(t){var e=t.width/2,t=t.height/2,i=Math.pow(e-t,2)/Math.pow(e+t,2);return Math.PI*(e+t)*(1+3*i/(10+Math.sqrt(4-3*i)))}},function(t,e,i){var p=i(217),f=i(30);t.exports=function(t,e,i,n,r,s){var o=e.commandBuffer,a=o.length,h=r||t.currentContext;if(0!==a&&f(t,h,e,i,n)){i.addToRenderList(e);var l,c,u;h.beginPath();for(var d=0;d<a;++d)switch(o[d]){case p.ARC:h.arc(o[d+1],o[d+2],o[d+3],o[d+4],o[d+5],o[d+6]),d+=7;break;case p.LINE_STYLE:u=o[d+1],c=o[d+2],l=o[d+3],h.strokeStyle="rgba("+((16711680&c)>>>16)+","+((65280&c)>>>8)+","+(255&c)+","+l+")",h.lineWidth=u,d+=3;break;case p.FILL_STYLE:c=o[d+1],l=o[d+2],h.fillStyle="rgba("+((16711680&c)>>>16)+","+((65280&c)>>>8)+","+(255&c)+","+l+")",d+=2;break;case p.BEGIN_PATH:h.beginPath();break;case p.CLOSE_PATH:h.closePath();break;case p.FILL_PATH:s||h.fill();break;case p.STROKE_PATH:s||h.stroke();break;case p.FILL_RECT:s?h.rect(o[d+1],o[d+2],o[d+3],o[d+4]):h.fillRect(o[d+1],o[d+2],o[d+3],o[d+4]),d+=4;break;case p.FILL_TRIANGLE:h.beginPath(),h.moveTo(o[d+1],o[d+2]),h.lineTo(o[d+3],o[d+4]),h.lineTo(o[d+5],o[d+6]),h.closePath(),s||h.fill(),d+=6;break;case p.STROKE_TRIANGLE:h.beginPath(),h.moveTo(o[d+1],o[d+2]),h.lineTo(o[d+3],o[d+4]),h.lineTo(o[d+5],o[d+6]),h.closePath(),s||h.stroke(),d+=6;break;case p.LINE_TO:h.lineTo(o[d+1],o[d+2]),d+=2;break;case p.MOVE_TO:h.moveTo(o[d+1],o[d+2]),d+=2;break;case p.LINE_FX_TO:h.lineTo(o[d+1],o[d+2]),d+=5;break;case p.MOVE_FX_TO:h.moveTo(o[d+1],o[d+2]),d+=5;break;case p.SAVE:h.save();break;case p.RESTORE:h.restore();break;case p.TRANSLATE:h.translate(o[d+1],o[d+2]),d+=2;break;case p.SCALE:h.scale(o[d+1],o[d+2]),d+=2;break;case p.ROTATE:h.rotate(o[d+1]),d+=1;break;case p.GRADIENT_FILL_STYLE:d+=5;break;case p.GRADIENT_LINE_STYLE:d+=6}h.restore()}}},function(t,e,i){var n=i(0),r=i(137),s=i(80),o=i(2),a=i(68),i=new n({initialize:function(t,e,i,n){void 0===n&&(n=!1),this.propertyKey=e,this.propertyValue=i,this.defaultValue=i,this.steps=0,this.counter=0,this.start=0,this.end=0,this.ease,this.emitOnly=n,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.loadConfig(t)},loadConfig:function(t,e){void 0===t&&(t={}),e&&(this.propertyKey=e),this.propertyValue=o(t,this.propertyKey,this.defaultValue),this.setMethods(),this.emitOnly&&(this.onUpdate=this.defaultUpdate)},toJSON:function(){return this.propertyValue},onChange:function(t){return this.propertyValue=t,this.setMethods()},setMethods:function(){var t,e,i=this.propertyValue,n=typeof i;return this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,"number"==n?(this.onEmit=this.staticValueEmit,this.onUpdate=this.staticValueUpdate):Array.isArray(i)?this.onEmit=this.randomStaticValueEmit:"function"==n?this.emitOnly?this.onEmit=i:this.onUpdate=i:"object"==n&&this.hasBoth(i,"start","end")?(this.start=i.start,this.end=i.end,(t=this.has(i,"random"))&&(this.onEmit=this.randomRangedValueEmit),this.has(i,"steps")?(this.steps=i.steps,this.counter=this.start,this.onEmit=this.steppedEmit):(e=this.has(i,"ease")?i.ease:"Linear",this.ease=s(e,i.easeParams),t||(this.onEmit=this.easedValueEmit),this.onUpdate=this.easeValueUpdate)):"object"==n&&this.hasBoth(i,"min","max")?(this.start=i.min,this.end=i.max,this.onEmit=this.randomRangedValueEmit):"object"==n&&this.has(i,"random")?(e=i.random,Array.isArray(e)&&(this.start=e[0],this.end=e[1]),this.onEmit=this.randomRangedValueEmit):"object"==n&&this.hasEither(i,"onEmit","onUpdate")&&(this.has(i,"onEmit")&&(this.onEmit=i.onEmit),this.has(i,"onUpdate")&&(this.onUpdate=i.onUpdate)),this},has:function(t,e){return t.hasOwnProperty(e)},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(t,e,i){return i},defaultUpdate:function(t,e,i,n){return n},staticValueEmit:function(){return this.propertyValue},staticValueUpdate:function(){return this.propertyValue},randomStaticValueEmit:function(){var t=Math.floor(Math.random()*this.propertyValue.length);return this.propertyValue[t]},randomRangedValueEmit:function(t,e){var i=r(this.start,this.end);return t&&t.data[e]&&(t.data[e].min=i),i},steppedEmit:function(){var t=this.counter,e=this.counter+(this.end-this.start)/this.steps;return this.counter=a(e,this.start,this.end),t},easedValueEmit:function(t,e){return t&&t.data[e]&&((t=t.data[e]).min=this.start,t.max=this.end),this.start},easeValueUpdate:function(t,e,i){t=t.data[e];return(t.max-t.min)*this.ease(i)+t.min}});t.exports=i},function(t,e,i){var n=i(0),o=i(2),i=new n({initialize:function(t,e,i,n,r){var s;"object"==typeof t?(t=o(s=t,"x",0),e=o(s,"y",0),i=o(s,"power",0),n=o(s,"epsilon",100),r=o(s,"gravity",50)):(void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=100),void 0===r&&(r=50)),this.x=t,this.y=e,this.active=!0,this._gravity=r,this._power=0,this._epsilon=0,this.power=i,this.epsilon=n},update:function(t,e){var i,n=this.x-t.x,r=this.y-t.y,s=n*n+r*r;0!==s&&(i=Math.sqrt(s),s<this._epsilon&&(s=this._epsilon),e=this._power*e/(s*i)*100,t.velocityX+=n*e,t.velocityY+=r*e)},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}}});t.exports=i},function(t,e,i){var n=i(0),o=i(36),a=i(50),i=new n({initialize:function(t){this.emitter=t,this.frame=null,this.x=0,this.y=0,this.velocityX=0,this.velocityY=0,this.accelerationX=0,this.accelerationY=0,this.maxVelocityX=1e4,this.maxVelocityY=1e4,this.bounce=0,this.scaleX=1,this.scaleY=1,this.alpha=1,this.angle=0,this.rotation=0,this.tint=16777215,this.life=1e3,this.lifeCurrent=1e3,this.delayCurrent=0,this.lifeT=0,this.data={tint:{min:16777215,max:16777215,current:16777215},alpha:{min:1,max:1},rotate:{min:0,max:0},scaleX:{min:1,max:1},scaleY:{min:1,max:1}}},isAlive:function(){return 0<this.lifeCurrent},resetPosition:function(){this.x=0,this.y=0},fire:function(t,e){var i=this.emitter;this.frame=i.getFrame(),i.emitZone&&i.emitZone.getPoint(this),this.x+=void 0===t?i.x.onEmit(this,"x"):t,this.y+=void 0===e?i.y.onEmit(this,"y"):e,this.life=i.lifespan.onEmit(this,"lifespan"),this.lifeCurrent=this.life,this.lifeT=0;var n,r,s,t=i.speedX.onEmit(this,"speedX"),e=i.speedY?i.speedY.onEmit(this,"speedY"):t;i.radial?(s=o(i.angle.onEmit(this,"angle")),this.velocityX=Math.cos(s)*Math.abs(t),this.velocityY=Math.sin(s)*Math.abs(e)):i.moveTo?(s=i.moveToX.onEmit(this,"moveToX"),n=i.moveToY?i.moveToY.onEmit(this,"moveToY"):s,r=Math.atan2(n-this.y,s-this.x),s=a(this.x,this.y,s,n)/(this.life/1e3),this.velocityX=Math.cos(r)*s,this.velocityY=Math.sin(r)*s):(this.velocityX=t,this.velocityY=e),i.acceleration&&(this.accelerationX=i.accelerationX.onEmit(this,"accelerationX"),this.accelerationY=i.accelerationY.onEmit(this,"accelerationY")),this.maxVelocityX=i.maxVelocityX.onEmit(this,"maxVelocityX"),this.maxVelocityY=i.maxVelocityY.onEmit(this,"maxVelocityY"),this.delayCurrent=i.delay.onEmit(this,"delay"),this.scaleX=i.scaleX.onEmit(this,"scaleX"),this.scaleY=i.scaleY?i.scaleY.onEmit(this,"scaleY"):this.scaleX,this.angle=i.rotate.onEmit(this,"rotate"),this.rotation=o(this.angle),this.bounce=i.bounce.onEmit(this,"bounce"),this.alpha=i.alpha.onEmit(this,"alpha"),this.tint=i.tint.onEmit(this,"tint")},computeVelocity:function(t,e,i,n){var r=this.velocityX,s=this.velocityY,o=this.accelerationX,a=this.accelerationY,h=this.maxVelocityX,l=this.maxVelocityY;r+=t.gravityX*i,s+=t.gravityY*i,o&&(r+=o*i),a&&(s+=a*i),h<r?r=h:r<-h&&(r=-h),l<s?s=l:s<-l&&(s=-l),this.velocityX=r,this.velocityY=s;for(var c=0;c<n.length;c++)n[c].update(this,e,i)},checkBounds:function(t){var e=t.bounds,i=-this.bounce;this.x<e.x&&t.collideLeft?(this.x=e.x,this.velocityX*=i):this.x>e.right&&t.collideRight&&(this.x=e.right,this.velocityX*=i),this.y<e.y&&t.collideTop?(this.y=e.y,this.velocityY*=i):this.y>e.bottom&&t.collideBottom&&(this.y=e.bottom,this.velocityY*=i)},update:function(t,e,i){var n,r;return 0<this.delayCurrent?(this.delayCurrent-=t,!1):(n=this.emitter,r=1-this.lifeCurrent/this.life,this.lifeT=r,this.computeVelocity(n,t,e,i),this.x+=this.velocityX*e,this.y+=this.velocityY*e,n.bounds&&this.checkBounds(n),n.deathZone&&n.deathZone.willKill(this)?!(this.lifeCurrent=0):(this.scaleX=n.scaleX.onUpdate(this,"scaleX",r,this.scaleX),n.scaleY?this.scaleY=n.scaleY.onUpdate(this,"scaleY",r,this.scaleY):this.scaleY=this.scaleX,this.angle=n.rotate.onUpdate(this,"rotate",r,this.angle),this.rotation=o(this.angle),this.alpha=n.alpha.onUpdate(this,"alpha",r,this.alpha),this.tint=n.tint.onUpdate(this,"tint",r,this.tint),this.lifeCurrent-=t,this.lifeCurrent<=0))}});t.exports=i},function(t,e,i){var n=i(35),r=i(0),s=i(11),o=i(453),a=i(454),h=i(449),l=i(2),c=i(210),u=i(455),d=i(126),p=i(451),f=i(456),g=i(10),m=i(79),y=i(3),v=i(68),i=new r({Mixins:[s.BlendMode,s.Mask,s.ScrollFactor,s.Visible],initialize:function(t,e){this.manager=t,this.texture=t.texture,this.frames=[t.defaultFrame],this.defaultFrame=t.defaultFrame,this.configFastMap=["active","blendMode","collideBottom","collideLeft","collideRight","collideTop","deathCallback","deathCallbackScope","emitCallback","emitCallbackScope","follow","frequency","gravityX","gravityY","maxParticles","name","on","particleBringToTop","particleClass","radial","timeScale","trackVisible","visible"],this.configOpMap=["accelerationX","accelerationY","angle","alpha","bounce","delay","lifespan","maxVelocityX","maxVelocityY","moveToX","moveToY","quantity","rotate","scaleX","scaleY","speedX","speedY","tint","x","y"],this.name="",this.particleClass=p,this.x=new h(e,"x",0,!0),this.y=new h(e,"y",0,!0),this.radial=!0,this.gravityX=0,this.gravityY=0,this.acceleration=!1,this.accelerationX=new h(e,"accelerationX",0,!0),this.accelerationY=new h(e,"accelerationY",0,!0),this.maxVelocityX=new h(e,"maxVelocityX",1e4,!0),this.maxVelocityY=new h(e,"maxVelocityY",1e4,!0),this.speedX=new h(e,"speedX",0,!0),this.speedY=new h(e,"speedY",0,!0),this.moveTo=!1,this.moveToX=new h(e,"moveToX",0,!0),this.moveToY=new h(e,"moveToY",0,!0),this.bounce=new h(e,"bounce",0,!0),this.scaleX=new h(e,"scaleX",1),this.scaleY=new h(e,"scaleY",1),this.tint=new h(e,"tint",16777215),this.alpha=new h(e,"alpha",1),this.lifespan=new h(e,"lifespan",1e3,!0),this.angle=new h(e,"angle",{min:0,max:360},!0),this.rotate=new h(e,"rotate",0),this.emitCallback=null,this.emitCallbackScope=null,this.deathCallback=null,this.deathCallbackScope=null,this.maxParticles=0,this.quantity=new h(e,"quantity",1,!0),this.delay=new h(e,"delay",0,!0),this.frequency=0,this.on=!0,this.particleBringToTop=!0,this.timeScale=1,this.emitZone=null,this.deathZone=null,this.bounds=null,this.collideLeft=!0,this.collideRight=!0,this.collideTop=!0,this.collideBottom=!0,this.active=!0,this.visible=!0,this.blendMode=n.NORMAL,this.follow=null,this.followOffset=new y,this.trackVisible=!1,this.currentFrame=0,this.randomFrame=!0,this.frameQuantity=1,this.dead=[],this.alive=[],this._counter=0,this._frameCounter=0,e&&this.fromJSON(e)},fromJSON:function(t){if(t){for(var e,i=0,n="",i=0;i<this.configFastMap.length;i++)n=this.configFastMap[i],d(t,n)&&(this[n]=l(t,n));for(i=0;i<this.configOpMap.length;i++)n=this.configOpMap[i],d(t,n)&&this[n].loadConfig(t);this.acceleration=0!==this.accelerationX.propertyValue||0!==this.accelerationY.propertyValue,this.moveTo=0!==this.moveToX.propertyValue||0!==this.moveToY.propertyValue,d(t,"speed")&&(this.speedX.loadConfig(t,"speed"),this.speedY=null),(u(t,["speedX","speedY"])||this.moveTo)&&(this.radial=!1),d(t,"scale")&&(this.scaleX.loadConfig(t,"scale"),this.scaleY=null),d(t,"callbackScope")&&(e=l(t,"callbackScope",null),this.emitCallbackScope=e,this.deathCallbackScope=e),d(t,"emitZone")&&this.setEmitZone(t.emitZone),d(t,"deathZone")&&this.setDeathZone(t.deathZone),d(t,"bounds")&&this.setBounds(t.bounds),d(t,"followOffset")&&this.followOffset.setFromObject(l(t,"followOffset",0)),d(t,"frame")&&this.setFrame(t.frame),d(t,"reserve")&&this.reserve(t.reserve)}return this},toJSON:function(t){void 0===t&&(t={});for(var e=0,i="",e=0;e<this.configFastMap.length;e++)t[i=this.configFastMap[e]]=this[i];for(e=0;e<this.configOpMap.length;e++)this[i=this.configOpMap[e]]&&(t[i]=this[i].toJSON());return this.speedY||(delete t.speedX,t.speed=this.speedX.toJSON()),this.scaleY||(delete t.scaleX,t.scale=this.scaleX.toJSON()),t},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;return 1===this.frames.length?this.defaultFrame:this.randomFrame?c(this.frames):(t=this.frames[this.currentFrame],this._frameCounter++,this._frameCounter===this.frameQuantity&&(this._frameCounter=0,this.currentFrame=v(this.currentFrame+1,0,this._frameLength)),t)},setFrame:function(t,e,i){void 0===i&&(i=1),this.randomFrame=e=void 0===e?!0:e,this.frameQuantity=i,this.currentFrame=0,this._frameCounter=0;var e=typeof t;return Array.isArray(t)||"string"==e||"number"==e?this.manager.setEmitterFrames(t,this):"object"==e&&((t=l(e=t,"frames",null))&&this.manager.setEmitterFrames(t,this),t=l(e,"cycle",!1),this.randomFrame=!t,this.frameQuantity=l(e,"quantity",i)),this._frameLength=this.frames.length,1===this._frameLength&&(this.frameQuantity=1,this.randomFrame=!1),this},setRadial:function(t){return this.radial=t=void 0===t?!0:t,this},setPosition:function(t,e){return this.x.onChange(t),this.y.onChange(e),this},setBounds:function(t,e,i,n){var r;return"object"==typeof t&&(t=(r=t).x,e=r.y,i=d(r,"w")?r.w:r.width,n=d(r,"h")?r.h:r.height),this.bounds?this.bounds.setTo(t,e,i,n):this.bounds=new g(t,e,i,n),this},setSpeedX:function(t){return this.speedX.onChange(t),this.radial=!1,this},setSpeedY:function(t){return this.speedY&&(this.speedY.onChange(t),this.radial=!1),this},setSpeed:function(t){return this.speedX.onChange(t),this.speedY=null,this.radial=!0,this},setScaleX:function(t){return this.scaleX.onChange(t),this},setScaleY:function(t){return this.scaleY.onChange(t),this},setScale:function(t){return this.scaleX.onChange(t),this.scaleY=null,this},setGravityX:function(t){return this.gravityX=t,this},setGravityY:function(t){return this.gravityY=t,this},setGravity:function(t,e){return this.gravityX=t,this.gravityY=e,this},setAlpha:function(t){return this.alpha.onChange(t),this},setTint:function(t){return this.tint.onChange(t),this},setEmitterAngle:function(t){return this.angle.onChange(t),this},setAngle:function(t){return this.angle.onChange(t),this},setLifespan:function(t){return this.lifespan.onChange(t),this},setQuantity:function(t){return this.quantity.onChange(t),this},setFrequency:function(t,e){return this.frequency=t,this._counter=0,e&&this.quantity.onChange(e),this},setEmitZone:function(t){if(void 0===t)this.emitZone=null;else{var e=l(t,"type","random"),i=l(t,"source",null);switch(e){case"random":this.emitZone=new f(i);break;case"edge":var n=l(t,"quantity",1),r=l(t,"stepRate",0),s=l(t,"yoyo",!1),o=l(t,"seamless",!0);this.emitZone=new a(i,n,r,s,o)}}return this},setDeathZone:function(t){var e;return void 0===t?this.deathZone=null:(e=l(t,"type","onEnter"),(t=l(t,"source",null))&&"function"==typeof t.contains&&(this.deathZone=new o(t,"onEnter"===e))),this},reserve:function(t){for(var e=this.dead,i=0;i<t;i++)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 0<this.maxParticles&&this.getParticleCount()===this.maxParticles},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;0<e.length;)t.push(e.pop());return this},forEachAlive:function(t,e){for(var i=this.alive,n=i.length,r=0;r<n;++r)t.call(e,i[r],this);return this},forEachDead:function(t,e){for(var i=this.dead,n=i.length,r=0;r<n;++r)t.call(e,i[r],this);return this},start:function(){return this.on=!0,this._counter=0,this},stop:function(){return this.on=!1,this},pause:function(){return this.active=!1,this},resume:function(){return this.active=!0,this},remove:function(){return this.manager.removeEmitter(this),this},depthSort:function(){return m(this.alive,this.depthSortCallback),this},flow:function(t,e){return void 0===e&&(e=1),this.frequency=t,this.quantity.onChange(e),this.start()},explode:function(t,e,i){return this.frequency=-1,this.emitParticle(t,e,i)},emitParticleAt:function(t,e,i){return this.emitParticle(i,t,e)},emitParticle:function(t,e,i){if(!this.atLimit()){void 0===t&&(t=this.quantity.onEmit());for(var n=this.dead,r=this.follow?this.follow.x+this.followOffset.x:e,s=this.follow?this.follow.y+this.followOffset.y:i,o=0;o<t;o++){var a=n.pop();if((a=a||new this.particleClass(this)).fire(r,s),this.particleBringToTop?this.alive.push(a):this.alive.unshift(a),this.emitCallback&&this.emitCallback.call(this.emitCallbackScope,a,this),this.atLimit())break}return a}},preUpdate:function(t,e){var i=(e*=this.timeScale)/1e3,n=(this.trackVisible&&(this.visible=this.follow.visible),this.manager.getProcessors()),r=this.alive,s=this.dead,o=0,a=[],h=r.length;for(o=0;o<h;o++){var l=r[o];l.update(e,i,n)&&a.push({index:o,particle:l})}if(0<(h=a.length))for(var c=this.deathCallback,u=this.deathCallbackScope,o=h-1;0<=o;o--){var d=a[o];r.splice(d.index,1),s.push(d.particle),c&&c.call(u,d.particle),d.particle.resetPosition()}this.on&&(0===this.frequency?this.emitParticle():0<this.frequency&&(this._counter-=e,this._counter<=0&&(this.emitParticle(),this._counter=this.frequency-Math.abs(this._counter))))},depthSortCallback:function(t,e){return t.y-e.y}});t.exports=i},function(t,e,i){i=new(i(0))({initialize:function(t,e){this.source=t,this.killOnEnter=e},willKill:function(t){t=this.source.contains(t.x,t.y);return t&&this.killOnEnter||!t&&!this.killOnEnter}});t.exports=i},function(t,e,i){i=new(i(0))({initialize:function(t,e,i,n,r){void 0===n&&(n=!1),void 0===r&&(r=!0),this.source=t,this.points=[],this.quantity=e,this.stepRate=i,this.yoyo=n,this.counter=-1,this.seamless=r,this._length=0,this._direction=0,this.updateSource()},updateSource:function(){this.points=this.source.getPoints(this.quantity,this.stepRate),this.seamless&&(e=this.points[0],t=this.points[this.points.length-1],e.x===t.x&&e.y===t.y&&this.points.pop());var t,e=this._length;return this._length=this.points.length,this._length<e&&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)}});t.exports=i},function(t,e){t.exports=function(t,e){for(var i=0;i<e.length;i++)if(t.hasOwnProperty(e[i]))return!0;return!1}},function(t,e,i){var n=i(0),r=i(3),i=new n({initialize:function(t){this.source=t,this._tempVec=new r},getPoint:function(t){var e=this._tempVec;this.source.getRandomPoint(e),t.x=e.x,t.y=e.y}});t.exports=i},function(t,e,i){var n=i(0),r=i(11),o=i(73),i=new n({Extends:o,Mixins:[r.PathFollower],initialize:function(t,e,i,n,r,s){o.call(this,t,i,n,r,s),this.path=e},preUpdate:function(t,e){this.anims.update(t,e),this.pathUpdate(t)}});t.exports=i},function(t,e){t.exports=function(t,e,i){var n=t.canvas,r=t.context,s=t.style,o=[],a=0,h=i.length;0<s.maxLines&&s.maxLines<i.length&&(h=s.maxLines),s.syncFont(n,r);for(var l=0;l<h;l++){var c=s.strokeThickness;c+=r.measureText(i[l]).width,s.wordWrap&&(c-=r.measureText(" ").width),o[l]=Math.ceil(c),a=Math.max(a,o[l])}n=e.fontSize+s.strokeThickness,e=n*h,t=t.lineSpacing;return 1<h&&(e+=t*(h-1)),{width:a,height:e,lines:h,lineWidths:o,lineSpacing:t,lineHeight:n}}},function(t,e,i){var n=i(0),o=i(13),a=i(6),r=i(460),h={fontFamily:["fontFamily","Courier"],fontSize:["fontSize","16px"],fontStyle:["fontStyle",""],backgroundColor:["backgroundColor",null],color:["color","#fff"],stroke:["stroke","#fff"],strokeThickness:["strokeThickness",0],shadowOffsetX:["shadow.offsetX",0],shadowOffsetY:["shadow.offsetY",0],shadowColor:["shadow.color","#000"],shadowBlur:["shadow.blur",0],shadowStroke:["shadow.stroke",!1],shadowFill:["shadow.fill",!1],align:["align","left"],maxLines:["maxLines",0],fixedWidth:["fixedWidth",0],fixedHeight:["fixedHeight",0],resolution:["resolution",0],rtl:["rtl",!1],testString:["testString","|MÉqgy"],baselineX:["baselineX",1.2],baselineY:["baselineY",1.4],wordWrapWidth:["wordWrap.width",null],wordWrapCallback:["wordWrap.callback",null],wordWrapCallbackScope:["wordWrap.callbackScope",null],wordWrapUseAdvanced:["wordWrap.useAdvancedWrap",!1]},i=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);t=a(e,"metrics",!1);this.metrics=t?{ascent:a(t,"ascent",0),descent:a(t,"descent",0),fontSize:a(t,"fontSize",0)}:r(this)},setStyle:function(t,e,i){for(var n in void 0===e&&(e=!0),void 0===i&&(i=!1),t&&t.hasOwnProperty("fontSize")&&"number"==typeof t.fontSize&&(t.fontSize=t.fontSize.toString()+"px"),h){var r=i?h[n][1]:this[n];this[n]=("wordWrapCallback"===n||"wordWrapCallbackScope"===n?a:o)(t,h[n][0],r)}var s=a(t,"font",null),s=(null!==s&&this.setFont(s,!1),this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim(),a(t,"fill",null));return null!==s&&(this.color=s),e?this.update(!0):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=r(this)),this.parent.updateText()},setFont:function(t,e){void 0===e&&(e=!0);var i,n=t,r="",s="";return"string"!=typeof t?(n=a(t,"fontFamily","Courier"),r=a(t,"fontSize","16px"),s=a(t,"fontStyle","")):(i=0,s=2<(t=t.split(" ")).length?t[i++]:"",r=t[i++]||"16px",n=t[i++]||"Courier"),n===this.fontFamily&&r===this.fontSize&&s===this.fontStyle||(this.fontFamily=n,this.fontSize=r,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)},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,r,s){return void 0===e&&(e=0),void 0===i&&(i="#000"),void 0===n&&(n=0),void 0===r&&(r=!1),void 0===s&&(s=!0),this.shadowOffsetX=t=void 0===t?0:t,this.shadowOffsetY=e,this.shadowColor=i,this.shadowBlur=n,this.shadowStroke=r,this.shadowFill=s,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 this.shadowColor=t=void 0===t?"#000":t,this.update(!1)},setShadowBlur:function(t){return this.shadowBlur=t=void 0===t?0: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 this.align=t=void 0===t?"left":t,this.update(!1)},setMaxLines:function(t){return this.maxLines=t=void 0===t?0:t,this.update(!1)},getTextMetrics:function(){var t=this.metrics;return{ascent:t.ascent,descent:t.descent,fontSize:t.fontSize}},toJSON:function(){var t,e={};for(t in h)e[t]=this[t];return e.metrics=this.getTextMetrics(),e},destroy:function(){this.parent=void 0}});t.exports=i},function(t,e,i){var p=i(31);t.exports=function(t){var e=p.create(this),i=e.getContext("2d"),n=(t.syncFont(e,i),i.measureText(t.testString));if("actualBoundingBoxAscent"in n)return r=n.actualBoundingBoxAscent,s=n.actualBoundingBoxDescent,p.remove(e),{ascent:r,descent:s,fontSize:r+s};var r=Math.ceil(n.width*t.baselineX),s=2*r,o=r*t.baselineY|0,n=(e.width=r,e.height=s,i.fillStyle="#f00",i.fillRect(0,0,r,s),i.font=t._font,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(t.testString,0,o),{ascent:0,descent:0,fontSize:0}),t=i.getImageData(0,0,r,s);if(t){for(var a,h=t.data,i=h.length,l=4*r,c=0,u=!1,d=0;d<o;d++){for(a=0;a<l;a+=4)if(255!==h[c+a]){u=!0;break}if(u)break;c+=l}for(n.ascent=o-d,c=i-l,u=!1,d=s;o<d;d--){for(a=0;a<l;a+=4)if(255!==h[c+a]){u=!0;break}if(u)break;c-=l}n.descent=d-o}else n.ascent=o,n.descent=6+o;return n.fontSize=n.ascent+n.descent,p.remove(e),n}},function(t,e,i){var n=i(1097),r=i(0),l=i(36),c=i(59),u=i(65),d=i(14),p=i(34),i=new r({Extends:p,Mixins:[n],initialize:function(t,e,i,n,r,s,o,a,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===r&&(r=0),void 0===s&&(s=360),void 0===o&&(o=!1),p.call(this,t,"Arc",new u(0,0,n=void 0===n?128:n)),this._startAngle=r,this._endAngle=s,this._anticlockwise=o,this._iterations=.01,this.setPosition(e,i);t=2*this.geom.radius;this.setSize(t,t),void 0!==a&&this.setFillStyle(a,h),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){t=2*(this.geom.radius=t);this.setSize(t,t),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 this.iterations=t=void 0===t?.01: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=this._iterations,e=t,i=this.geom.radius,n=l(this._startAngle),r=l(this._endAngle),s=i,o=i;r-=n,this._anticlockwise?r<-d.PI2?r=-d.PI2:0<r&&(r=-d.PI2+r%d.PI2):r>d.PI2?r=d.PI2:r<0&&(r=d.PI2+r%d.PI2);for(var a,h=[s+Math.cos(n)*i,o+Math.sin(n)*i];e<1;)a=r*e+n,h.push(s+Math.cos(a)*i,o+Math.sin(a)*i),e+=t;return a=r+n,h.push(s+Math.cos(a)*i,o+Math.sin(a)*i),h.push(s+Math.cos(n)*i,o+Math.sin(n)*i),this.pathIndexes=c(h),this.pathData=h,this}});t.exports=i},function(t,e,i){var n=i(0),r=i(1100),s=i(59),o=i(10),a=i(34),i=new n({Extends:a,Mixins:[r],initialize:function(t,e,i,n,r,s){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!==r&&this.setFillStyle(r,s),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),r=0;r<n.length;r++)i.push(n[r].x,n[r].y);return i.push(n[0].x,n[0].y),this.pathIndexes=s(i),this.pathData=i,this}});t.exports=i},function(t,e,i){var n=i(0),r=i(59),s=i(1103),a=i(111),h=i(34),i=new n({Extends:h,Mixins:[s],initialize:function(t,e,i,n,r,s,o){void 0===e&&(e=0),void 0===i&&(i=0),h.call(this,t,"Ellipse",new a((n=void 0===n?128:n)/2,(r=void 0===r?128:r)/2,n,r)),this._smoothness=64,this.setPosition(e,i),this.width=n,this.height=r,void 0!==s&&this.setFillStyle(s,o),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.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=r(t),this.pathData=t,this}});t.exports=i},function(t,e,i){var n=i(0),u=i(34),i=i(1106),n=new n({Extends:u,Mixins:[i],initialize:function(t,e,i,n,r,s,o,a,h,l,c){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=128),void 0===r&&(r=128),void 0===s&&(s=32),void 0===o&&(o=32),u.call(this,t,"Grid",null),this.cellWidth=s,this.cellHeight=o,this.showCells=!0,this.outlineFillColor=0,this.outlineFillAlpha=0,this.showOutline=!0,this.showAltCells=!1,this.altFillColor,this.altFillAlpha,this.setPosition(e,i),this.setSize(n,r),this.setFillStyle(a,h),void 0!==l&&this.setOutlineStyle(l,c),this.updateDisplayOrigin()},setFillStyle:function(t,e){return void 0===e&&(e=1),void 0===t?this.showCells=!1:(this.fillColor=t,this.fillAlpha=e,this.showCells=!0),this},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},setOutlineStyle:function(t,e){return void 0===e&&(e=1),void 0===t?this.showOutline=!1:(this.outlineFillColor=t,this.outlineFillAlpha=e,this.showOutline=!0),this}});t.exports=n},function(t,e,i){var n=i(1109),r=i(0),h=i(34),i=new r({Extends:h,Mixins:[n],initialize:function(t,e,i,n,r,s,o,a){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=48),void 0===r&&(r=32),void 0===s&&(s=15658734),void 0===o&&(o=10066329),void 0===a&&(a=13421772),h.call(this,t,"IsoBox",null),this.projection=4,this.fillTop=s,this.fillLeft=o,this.fillRight=a,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isFilled=!0,this.setPosition(e,i),this.setSize(n,r),this.updateDisplayOrigin()},setProjection:function(t){return this.projection=t,this},setFaces:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),this.showTop=t=void 0===t?!0: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}});t.exports=i},function(t,e,i){var n=i(0),r=i(1112),l=i(34),i=new n({Extends:l,Mixins:[r],initialize:function(t,e,i,n,r,s,o,a,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=48),void 0===r&&(r=32),void 0===s&&(s=!1),void 0===o&&(o=15658734),void 0===a&&(a=10066329),void 0===h&&(h=13421772),l.call(this,t,"IsoTriangle",null),this.projection=4,this.fillTop=o,this.fillLeft=a,this.fillRight=h,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isReversed=s,this.isFilled=!0,this.setPosition(e,i),this.setSize(n,r),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===e&&(e=!0),void 0===i&&(i=!0),this.showTop=t=void 0===t?!0: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}});t.exports=i},function(t,e,i){var n=i(0),l=i(34),c=i(47),i=i(1115),n=new n({Extends:l,Mixins:[i],initialize:function(t,e,i,n,r,s,o,a,h){void 0===e&&(e=0),void 0===i&&(i=0),l.call(this,t,"Line",new c(n=void 0===n?0:n,r=void 0===r?0:r,s=void 0===s?128:s,o=void 0===o?0:o));t=Math.max(1,this.geom.right-this.geom.left),n=Math.max(1,this.geom.bottom-this.geom.top);this.lineWidth=1,this._startWidth=1,this._endWidth=1,this.setPosition(e,i),this.setSize(t,n),void 0!==a&&this.setStrokeStyle(1,a,h),this.updateDisplayOrigin()},setLineWidth:function(t,e){return void 0===e&&(e=t),this._startWidth=t,this._endWidth=e,this.lineWidth=t,this},setTo:function(t,e,i,n){return this.geom.setTo(t,e,i,n),this}});t.exports=n},function(t,e,i){var n=i(1118),r=i(0),s=i(59),o=i(469),a=i(227),h=i(34),l=i(472),i=new r({Extends:h,Mixins:[n],initialize:function(t,e,i,n,r,s){void 0===e&&(e=0),void 0===i&&(i=0),h.call(this,t,"Polygon",new a(n));t=o(this.geom);this.setPosition(e,i),this.setSize(t.width,t.height),void 0!==r&&this.setFillStyle(r,s),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()},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=s(t),this.pathData=t,this}});t.exports=i},function(t,e,i){var h=i(10);t.exports=function(t,e){void 0===e&&(e=new h);for(var i,n=1/0,r=1/0,s=-n,o=-r,a=0;a<t.points.length;a++)i=t.points[a],n=Math.min(n,i.x),r=Math.min(r,i.y),s=Math.max(s,i.x),o=Math.max(o,i.y);return e.x=n,e.y=r,e.width=s-n,e.height=o-r,e}},function(t,e,i){var d=i(67),p=i(47),f=i(471);t.exports=function(t,e,i,n){void 0===n&&(n=[]);var r=t.points,s=f(t);!e&&0<i&&(e=s/i);for(var o=0;o<e;o++)for(var a=s*(o/e),h=0,l=0;l<r.length;l++){var c=r[l],u=r[(l+1)%r.length],c=new p(c.x,c.y,u.x,u.y),u=d(c);if(!(a<h||h+u<a)){c=c.getPoint((a-h)/u);n.push(c);break}h+=u}return n}},function(t,e,i){var o=i(67),a=i(47);t.exports=function(t){for(var e=t.points,i=0,n=0;n<e.length;n++){var r=e[n],s=e[(n+1)%e.length],r=new a(r.x,r.y,s.x,s.y);i+=o(r)}return i}},function(t,e){function l(t,e){return t[0]=e[0],t[1]=e[1],t}t.exports=function(t){for(var e=[],i=t.points,n=0;n<i.length;n++)e.push([i[n].x,i[n].y]);var r=[];for(0<e.length&&r.push(l([0,0],e[0])),n=0;n<e.length-1;n++){var s=e[n],o=e[n+1],a=s[0],s=s[1],h=o[0],o=o[1];r.push([.85*a+.15*h,.85*s+.15*o]),r.push([.15*a+.85*h,.15*s+.85*o])}return 1<e.length&&r.push(l([0,0],e[e.length-1])),t.setTo(r)}},function(t,e,i){var n=i(0),a=i(10),h=i(34),i=i(1121),n=new n({Extends:h,Mixins:[i],initialize:function(t,e,i,n,r,s,o){void 0===e&&(e=0),void 0===i&&(i=0),h.call(this,t,"Rectangle",new a(0,0,n=void 0===n?128:n,r=void 0===r?128:r)),this.setPosition(e,i),this.setSize(n,r),void 0!==s&&this.setFillStyle(s,o),this.updateDisplayOrigin(),this.updateData()},setSize:function(t,e){return this.width=t,this.height=e,this.geom.setSize(t,e),this.updateData(),this},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),e.getLineD(i),t.push(i.x2,i.y2),this.pathData=t,this}});t.exports=n},function(t,e,i){var n=i(1124),r=i(0),l=i(59),h=i(34),i=new r({Extends:h,Mixins:[n],initialize:function(t,e,i,n,r,s,o,a){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=5),void 0===r&&(r=32),void 0===s&&(s=64),h.call(this,t,"Star",null),this._points=n,this._innerRadius=r,this._outerRadius=s,this.setPosition(e,i),this.setSize(2*s,2*s),void 0!==o&&this.setFillStyle(o,a),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,r=Math.PI/2*3,s=Math.PI/e,o=n,a=n;t.push(o,a+-n);for(var h=0;h<e;h++)t.push(o+Math.cos(r)*n,a+Math.sin(r)*n),r+=s,t.push(o+Math.cos(r)*i,a+Math.sin(r)*i),r+=s;return t.push(o,a+-n),this.pathIndexes=l(t),this.pathData=t,this}});t.exports=i},function(t,e,i){var n=i(0),u=i(34),d=i(82),i=i(1127),n=new n({Extends:u,Mixins:[i],initialize:function(t,e,i,n,r,s,o,a,h,l,c){void 0===e&&(e=0),void 0===i&&(i=0),u.call(this,t,"Triangle",new d(n=void 0===n?0:n,r=void 0===r?128:r,s=void 0===s?64:s,o=void 0===o?0:o,a=void 0===a?128:a,h=void 0===h?128:h));t=this.geom.right-this.geom.left,n=this.geom.bottom-this.geom.top;this.setPosition(e,i),this.setSize(t,n),void 0!==l&&this.setFillStyle(l,c),this.updateDisplayOrigin(),this.updateData()},setTo:function(t,e,i,n,r,s){return this.geom.setTo(t,e,i,n,r,s),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}});t.exports=n},function(t,e,i){var l=i(4),c=i(67);t.exports=function(t,e,i){void 0===i&&(i=new l);var n,r,s,o,a=t.getLineA(),h=t.getLineB(),t=t.getLineC();return e<=0||1<=e?(i.x=a.x1,i.y=a.y1):(o=0,(e=((n=c(a))+(r=c(h))+(s=c(t)))*e)<n?(i.x=a.x1+(a.x2-a.x1)*(o=e/n),i.y=a.y1+(a.y2-a.y1)*o):n+r<e?(o=(e-=n+r)/s,i.x=t.x1+(t.x2-t.x1)*o,i.y=t.y1+(t.y2-t.y1)*o):(o=(e-=n)/r,i.x=h.x1+(h.x2-h.x1)*o,i.y=h.y1+(h.y2-h.y1)*o)),i}},function(t,e,i){var g=i(67),m=i(4);t.exports=function(t,e,i,n){void 0===n&&(n=[]);var r=t.getLineA(),s=t.getLineB(),o=t.getLineC(),a=g(r),h=g(s),l=g(o),c=a+h+l;!e&&0<i&&(e=c/i);for(var u=0;u<e;u++){var d=c*(u/e),p=0,f=new m;d<a?(f.x=r.x1+(r.x2-r.x1)*(p=d/a),f.y=r.y1+(r.y2-r.y1)*p):a+h<d?(p=(d-=a+h)/l,f.x=o.x1+(o.x2-o.x1)*p,f.y=o.y1+(o.y2-o.y1)*p):(p=(d-=a)/h,f.x=s.x1+(s.x2-s.x1)*p,f.y=s.y1+(s.y2-s.y1)*p),n.push(f)}return n}},function(t,e){t.exports=function(t,e,i){if(!t||"number"==typeof t)return!1;if(t.hasOwnProperty(e))t[e]=i;else{if(-1===e.indexOf("."))return!1;for(var n=e.split("."),r=t,s=t,o=0;o<n.length;o++){if(!r.hasOwnProperty(n[o]))return!1;r=(s=r)[n[o]]}s[n[n.length-1]]=i}return!0}},function(t,e,i){var C=i(116),O=i(117);t.exports=function(t,e,i,n,r,s,o){if(void 0===n&&(n=!1),void 0===s&&(s=16777215),void 0===o&&(o=1),t.length===e.length){var a={faces:[],vertices:[]},h=n?3:2,l=Array.isArray(s),c=Array.isArray(o);if(Array.isArray(i)&&0<i.length)for(E=0;E<i.length;E++){var u=i[E],d=2*i[E],p=i[E]*h,f=t[p],g=t[1+p],m=n?t[2+p]:0,y=e[d],v=e[1+d],x=l?s[u]:s,b=c?o[u]:o,w=0,T=0,S=0;r&&(w=r[p],T=r[1+p],S=n?r[2+p]:0),a.vertices.push(new O(f,g,m,y,v,x,b,w,T,S))}else for(var P=0,_=0,E=0;E<t.length;E+=h)f=t[E],g=t[E+1],m=n?t[E+2]:0,y=e[P],v=e[P+1],x=l?s[_]:s,b=c?o[_]:o,S=T=w=0,r&&(w=r[E],T=r[E+1],S=n?r[E+2]:0),a.vertices.push(new O(f,g,m,y,v,x,b,w,T,S)),P+=2,_++;for(E=0;E<a.vertices.length;E+=3){var A=a.vertices[E],M=a.vertices[E+1],k=a.vertices[E+2];a.faces.push(new C(A,M,k))}return a}}},function(t,e,i){var E=i(116),n=i(69),r=i(39),A=i(117),M=new r,k=new r,C=new n;t.exports=function(t,e,i,n,r,s,o,a,h,l){void 0===i&&(i=1),void 0===o&&(o=0),void 0===a&&(a=0),void 0===h&&(h=0),void 0===l&&(l=!0);var c={faces:[],verts:[]},u=t.materials;M.set(n=void 0===n?0:n,r=void 0===r?0:r,s=void 0===s?0:s),k.set(o,a,h),C.fromRotationXYTranslation(k,M,l);for(var d=0;d<t.models.length;d++)for(var p=t.models[d],f=p.vertices,g=p.textureCoords,m=p.faces,y=0;y<m.length;y++){var v=m[y],x=v.vertices[0],b=v.vertices[1],w=v.vertices[2],T=f[x.vertexIndex],S=f[b.vertexIndex],P=f[w.vertexIndex],x=x.textureCoordsIndex,b=b.textureCoordsIndex,w=w.textureCoordsIndex,x=-1===x?{u:0,v:1}:g[x],b=-1===b?{u:0,v:0}:g[b],w=-1===w?{u:1,v:1}:g[w],_=16777215,v=(""!==v.material&&u[v.material]&&(_=u[v.material]),new A(T.x*i,T.y*i,T.z*i,x.u,x.v,_).transformMat4(C)),T=new A(S.x*i,S.y*i,S.z*i,b.u,b.v,_).transformMat4(C),x=new A(P.x*i,P.y*i,P.z*i,w.u,w.v,_).transformMat4(C);c.verts.push(v,T,x),c.faces.push(new E(v,T,x))}return e&&(e.faces=e.faces.concat(c.faces),e.vertices=e.vertices.concat(c.verts)),c}},function(t,e,i){var a=i(65),n=i(0),r=i(11),h=i(200),s=i(12),o=new n({Extends:a,Mixins:[r.ScrollFactor,r.Visible],initialize:function(t,e,i,n,r,s,o){a.call(this,t,e,i),this.color=new h(n,r,s),this.intensity=o,this.renderFlags=15,this.cameraFilter=0,this.setScrollFactor(1,1)},willRender:function(t){return!(o.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},setColor:function(t){t=s.getFloatsFromUintRGB(t);return this.color.set(t[0],t[1],t[2]),this},setIntensity:function(t){return this.intensity=t,this},setRadius:function(t){return this.radius=t,this}});o.RENDER_MASK=15,t.exports=o},function(t,e,i){var o=i(151),n=i(0),a=i(50),s=i(481),h=i(150),r=i(200),l=i(74),c=i(79),u=i(12),i=new n({initialize:function(){this.lights=[],this.ambientColor=new r(.1,.1,.1),this.active=!1,this.maxLights=-1,this.visibleLights=0},addPointLight:function(t,e,i,n,r,s){return this.systems.displayList.add(new h(this.scene,t,e,i,n,r,s))},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,n=[],r=0;r<e.length;r++){var s=e[r];s.willRender(t)&&o(s,i)&&n.push({light:s,distance:a(s.x,s.y,i.centerX,i.centerY)})}return n.length>this.maxLights&&(c(n,this.sortByDistance),n=n.slice(0,this.maxLights)),this.visibleLights=n.length,n},sortByDistance:function(t,e){return t.distance>=e.distance},setAmbientColor:function(t){t=u.getFloatsFromUintRGB(t);return this.ambientColor.set(t[0],t[1],t[2]),this},getMaxVisibleLights:function(){return this.maxLights},getLightCount:function(){return this.lights.length},addLight:function(t,e,i,n,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=128),void 0===r&&(r=1);n=u.getFloatsFromUintRGB(n=void 0===n?16777215:n),t=new s(t,e,i,n[0],n[1],n[2],r);return this.lights.push(t),t},removeLight:function(t){t=this.lights.indexOf(t);return 0<=t&&l(this.lights,t),this},shutdown:function(){this.lights.length=0},destroy:function(){this.shutdown()}});t.exports=i},function(t,e,i){var n=i(56),i=i(17)(!1,{Circle:i(1191),Ellipse:i(1201),Intersects:i(484),Line:i(1221),Mesh:i(1243),Point:i(1246),Polygon:i(1260),Rectangle:i(502),Triangle:i(1293)},n);t.exports=i},function(t,e,i){t.exports={CircleToCircle:i(231),CircleToRectangle:i(151),GetCircleToCircle:i(1211),GetCircleToRectangle:i(1212),GetLineToCircle:i(232),GetLineToLine:i(485),GetLineToPoints:i(486),GetLineToPolygon:i(487),GetLineToRectangle:i(234),GetRaysFromPointToPolygon:i(1213),GetRectangleIntersection:i(1214),GetRectangleToRectangle:i(1215),GetRectangleToTriangle:i(1216),GetTriangleToCircle:i(1217),GetTriangleToLine:i(492),GetTriangleToTriangle:i(1218),LineToCircle:i(233),LineToLine:i(96),LineToRectangle:i(488),PointToLine:i(496),PointToLineSegment:i(1219),RectangleToRectangle:i(152),RectangleToTriangle:i(489),RectangleToValues:i(1220),TriangleToCircle:i(491),TriangleToLine:i(493),TriangleToTriangle:i(494)}},function(t,e,i){var l=i(39);t.exports=function(t,e,i){var n=t.x1,r=t.y1,s=t.x2,t=t.y2,o=e.x1,a=e.y1,s=s-n,t=t-r,h=e.x2-o,e=e.y2-a;return 0!=s&&0!=e*s-h*t&&((o=(o+h*(a=(s*(a-r)+t*(n-o))/(h*t-e*s))-n)/s)<0||a<0||1<a?null:(i=void 0===i?new l:i).set(n+s*o,r+t*o,o))}},function(t,e,i){var a=i(39),h=i(485),l=new(i(47)),c=new a;t.exports=function(t,e,i){var n=!1;(i=void 0===i?new a:i).set(),c.set();for(var r=e[0],s=1;s<e.length;s++){var o=e[s];l.setTo(r.x,r.y,o.x,o.y),r=o,h(t,l,c)&&(!n||c.z<i.z)&&(i.copy(c),n=!0)}return n?i:null}},function(t,e,i){var n=i(39),s=i(140),o=i(486),a=new n;t.exports=function(t,e,i){void 0===i&&(i=new s),Array.isArray(e)||(e=[e]);var n=!1;i.set(),a.set();for(var r=0;r<e.length;r++)o(t,e[r].points,a)&&(!n||a.z<i.z)&&(i.set(a.x,a.y,a.z,r),n=!0);return n?i:null}},function(t,e){t.exports=function(t,e){var i=t.x1,n=t.y1,r=t.x2,t=t.y2,s=e.x,o=e.y,a=e.right,e=e.bottom,h=0;if(s<=i&&i<=a&&o<=n&&n<=e||s<=r&&r<=a&&o<=t&&t<=e)return!0;if(i<s&&s<=r){if(o<(h=n+(t-n)*(s-i)/(r-i))&&h<=e)return!0}else if(a<i&&r<=a&&o<=(h=n+(t-n)*(a-i)/(r-i))&&h<=e)return!0;if(n<o&&o<=t){if(s<=(h=i+(r-i)*(o-n)/(t-n))&&h<=a)return!0}else if(e<n&&t<=e&&s<=(h=i+(r-i)*(e-n)/(t-n))&&h<=a)return!0;return!1}},function(t,e,i){var l=i(96),c=i(57),u=i(235),d=i(490);t.exports=function(t,e){var i,n,r,s,o,a,h;return!(e.left>t.right||e.right<t.left||e.top>t.bottom||e.bottom<t.top)&&(h=e.getLineA(),i=e.getLineB(),n=e.getLineC(),!(!c(t,h.x1,h.y1)&&!c(t,h.x2,h.y2))||(!(!c(t,i.x1,i.y1)&&!c(t,i.x2,i.y2))||(!(!c(t,n.x1,n.y1)&&!c(t,n.x2,n.y2))||(r=t.getLineA(),s=t.getLineB(),o=t.getLineC(),a=t.getLineD(),!!(l(h,r)||l(h,s)||l(h,o)||l(h,a))||(!!(l(i,r)||l(i,s)||l(i,o)||l(i,a))||(!!(l(n,r)||l(n,s)||l(n,o)||l(n,a))||(h=d(t),0<u(e,h,!0).length)))))))}},function(t,e){t.exports=function(t,e){return(e=void 0===e?[]:e).push({x:t.x,y:t.y}),e.push({x:t.right,y:t.y}),e.push({x:t.right,y:t.bottom}),e.push({x:t.x,y:t.bottom}),e}},function(t,e,i){var n=i(233),r=i(115);t.exports=function(t,e){return!(t.left>e.right||t.right<e.left||t.top>e.bottom||t.bottom<e.top||!r(t,e.x,e.y)&&!n(t.getLineA(),e)&&!n(t.getLineB(),e)&&!n(t.getLineC(),e))}},function(t,e,i){var h=i(4),l=i(493),c=i(96);t.exports=function(t,e,i){if(void 0===i&&(i=[]),l(t,e))for(var n=t.getLineA(),r=t.getLineB(),t=t.getLineC(),s=[new h,new h,new h],o=[c(n,e,s[0]),c(r,e,s[1]),c(t,e,s[2])],a=0;a<3;a++)o[a]&&i.push(s[a]);return i}},function(t,e,i){var n=i(96);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))}},function(t,e,i){var h=i(235),l=i(495),c=i(96);t.exports=function(t,e){var i,n,r,s,o,a;return!(t.left>e.right||t.right<e.left||t.top>e.bottom||t.bottom<e.top)&&(a=t.getLineA(),i=t.getLineB(),n=t.getLineC(),r=e.getLineA(),s=e.getLineB(),o=e.getLineC(),!!(c(a,r)||c(a,s)||c(a,o))||(!!(c(i,r)||c(i,s)||c(i,o))||(!!(c(n,r)||c(n,s)||c(n,o))||(a=l(t),0<h(e,a,!0).length||(a=l(e),0<h(t,a,!0).length)))))}},function(t,e){t.exports=function(t,e){return(e=void 0===e?[]:e).push({x:t.x1,y:t.y1}),e.push({x:t.x2,y:t.y2}),e.push({x:t.x3,y:t.y3}),e}},function(t,e){t.exports=function(t,e,i){void 0===i&&(i=1);var n,r=e.x1,s=e.y1,o=e.x2,e=e.y2,a=t.x,t=t.y,h=(o-r)*(o-r)+(e-s)*(e-s);return 0!=h&&((n=((a-r)*(o-r)+(t-s)*(e-s))/h)<0?Math.sqrt((r-a)*(r-a)+(s-t)*(s-t))<=i:0<=n&&n<=1?Math.abs(((s-t)*(o-r)-(r-a)*(e-s))/h)*Math.sqrt(h)<=i:Math.sqrt((o-a)*(o-a)+(e-t)*(e-t))<=i)}},function(t,e,i){var n=i(14),r=i(68),s=i(97);t.exports=function(t){t=s(t)-n.TAU;return r(t,-Math.PI,Math.PI)}},function(t,e){var M,k="",C="";function O(t){return 0===t.models.length&&t.models.push({faces:[],name:"untitled",textureCoords:[],vertexNormals:[],vertices:[]}),k="",t.models[t.models.length-1]}t.exports=function(t,e){M=e=void 0===e?!0:e;var i={materials:{},materialLibraries:[],models:[]};C=k="";for(var n,r,s,o,a,h,l,c,u,d,p,f,g=t.split("\n"),m=0;m<g.length;m++){var y=(-1<(f=(p=g[m]).indexOf("#"))?p.substring(0,f):p).replace(/\s\s+/g," ").trim().split(" ");switch(y[0].toLowerCase()){case"o":d=2<=y.length?y[1]:"untitled",i.models.push({faces:[],name:d,textureCoords:[],vertexNormals:[],vertices:[]}),k="";break;case"g":2===y.length&&(k=y[1]);break;case"v":d=i,l=2<=(u=(h=y).length)?parseFloat(h[1]):0,c=3<=u?parseFloat(h[2]):0,u=4<=u?parseFloat(h[3]):0,O(d).vertices.push({x:l,y:c,z:u});break;case"vt":h=i,u=c=l=void 0,l=2<=(a=(o=y).length)?parseFloat(o[1]):0,c=3<=a?parseFloat(o[2]):0,u=4<=a?parseFloat(o[3]):0,isNaN(l)&&(l=0),isNaN(c)&&(c=0),isNaN(u)&&(u=0),M&&(c=1-c),O(h).textureCoords.push({u:l,v:c,w:u});break;case"vn":a=i,n=2<=(s=(o=y).length)?parseFloat(o[1]):0,r=3<=s?parseFloat(o[2]):0,s=4<=s?parseFloat(o[3]):0,O(a).vertexNormals.push({x:n,y:r,z:s});break;case"f":A=E=_=P=S=T=w=b=void 0;var v=y,x=i,b=v.length-1;if(!(b<3)){for(var w={group:k,material:C,vertices:[]},T=0;T<b;T++){var S,P,_,E=v[T+1].split("/"),A=E.length;A<1||3<A||(P=S=_=0,_=parseInt(E[0],10),1<A&&""!==E[1]&&(S=parseInt(E[1],10)),2<A&&(P=parseInt(E[2],10)),0!==_&&(_<0&&(_=O(x).vertices.length+1+_),--S,--_,--P,w.vertices.push({textureCoordsIndex:S,vertexIndex:_,vertexNormalIndex:P})))}O(x).faces.push(w)}break;case"mtllib":2<=y.length&&i.materialLibraries.push(y[1]);break;case"usemtl":2<=y.length&&(C=y[1])}}return i}},function(t,e,i){var c=i(103);t.exports=function(t){for(var e={},i=t.split("\n"),n="",r=0;r<i.length;r++){var s=i[r].trim();if(0!==s.indexOf("#")&&""!==s){var o=s.replace(/\s\s+/g," ").trim().split(" ");switch(o[0].toLowerCase()){case"newmtl":n=o[1];break;case"kd":var a=Math.floor(255*o[1]),h=2<=o.length?Math.floor(255*o[2]):a,l=3<=o.length?Math.floor(255*o[3]):a;e[n]=c(a,h,l)}}}return e}},function(t,e){t.exports=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)}},function(t,e){t.exports=function(t){return t.x*t.x+t.y*t.y}},function(t,e,i){var n=i(10);n.Area=i(1267),n.Ceil=i(1268),n.CeilAll=i(1269),n.CenterOn=i(190),n.Clone=i(1270),n.Contains=i(57),n.ContainsPoint=i(1271),n.ContainsRect=i(503),n.CopyFrom=i(1272),n.Decompose=i(490),n.Equals=i(1273),n.FitInside=i(1274),n.FitOutside=i(1275),n.Floor=i(1276),n.FloorAll=i(1277),n.FromPoints=i(199),n.FromXY=i(1278),n.GetAspectRatio=i(237),n.GetCenter=i(1279),n.GetPoint=i(171),n.GetPoints=i(306),n.GetSize=i(1280),n.Inflate=i(1281),n.Intersection=i(1282),n.MarchingAnts=i(316),n.MergePoints=i(1283),n.MergeRect=i(1284),n.MergeXY=i(1285),n.Offset=i(1286),n.OffsetPoint=i(1287),n.Overlaps=i(1288),n.Perimeter=i(130),n.PerimeterPoint=i(1289),n.Random=i(174),n.RandomOutside=i(1290),n.SameDimensions=i(1291),n.Scale=i(1292),n.Union=i(441),t.exports=n},function(t,e){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}},function(t,e,i){var n=i(4);t.exports=function(t,e){return(e=void 0===e?new n:e).x=(t.x1+t.x2+t.x3)/3,e.y=(t.y1+t.y2+t.y3)/3,e}},function(t,e){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}},function(t,e,i){var u=i(4);function d(t,e,i,n){t-=i,i=e-n;return Math.sqrt(t*t+i*i)}t.exports=function(t,e){void 0===e&&(e=new u);var i=t.x1,n=t.y1,r=t.x2,s=t.y2,o=t.x3,t=t.y3,a=d(o,t,r,s),h=d(i,n,o,t),l=d(r,s,i,n),c=a+h+l;return e.x=(i*a+r*h+o*l)/c,e.y=(n*a+s*h+t*l)/c,e}},function(t,e){t.exports=function(r,s){return function(t,e,i,n){e=r.getPixelAlpha(e,i,n.texture.key,n.frame.name);return e&&s<=e}}},function(t,e){t.exports=function(t,e,i){return{gameObject:t,enabled:!0,alwaysEnabled:!1,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,dragX:0,dragY:0}}},function(t,e,i){i=new(i(0))({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}});t.exports=i},function(t,e,i){var n=i(0),r=i(239),i=new n({initialize:function(t,e){this.pad=t,this.events=t.manager,this.index=e,this.value=0,this.threshold=1,this.pressed=!1},update:function(t){this.value=t;var e=this.pad,i=this.index;t>=this.threshold?this.pressed||(this.pressed=!0,this.events.emit(r.BUTTON_DOWN,e,this,t),this.pad.emit(r.GAMEPAD_BUTTON_DOWN,i,t,this)):this.pressed&&(this.pressed=!1,this.events.emit(r.BUTTON_UP,e,this,t),this.pad.emit(r.GAMEPAD_BUTTON_UP,i,t,this))},destroy:function(){this.pad=null,this.events=null}});t.exports=i},function(t,e,i){var s=i(509),o=i(510),n=i(0),a=i(9),h=i(3),i=new n({Extends:a,initialize:function(t,e){a.call(this),this.manager=t,this.pad=e,this.id=e.id,this.index=e.index;for(var i=[],n=0;n<e.buttons.length;n++)i.push(new o(this,n));this.buttons=i;for(var r=[],n=0;n<e.axes.length;n++)r.push(new s(this,n));this.axes=r,this.vibration=e.vibrationActuator;t={value:0,pressed:!1},this._LCLeft=i[14]||t,this._LCRight=i[15]||t,this._LCTop=i[12]||t,this._LCBottom=i[13]||t,this._RCLeft=i[2]||t,this._RCRight=i[1]||t,this._RCTop=i[3]||t,this._RCBottom=i[0]||t,this._FBLeftTop=i[4]||t,this._FBLeftBottom=i[6]||t,this._FBRightTop=i[5]||t,this._FBRightBottom=i[7]||t,t={value:0};this._HAxisLeft=r[0]||t,this._VAxisLeft=r[1]||t,this._HAxisRight=r[2]||t,this._VAxisRight=r[3]||t,this.leftStick=new h,this.rightStick=new h,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)){for(var e=this.buttons,i=t.buttons,n=e.length,r=0;r<n;r++)e[r].update(i[r].value);for(var s=this.axes,o=t.axes,n=s.length,r=0;r<n;r++)s[r].update(o[r]);2<=n&&(this.leftStick.set(s[0].getValue(),s[1].getValue()),4<=n&&this.rightStick.set(s[2].getValue(),s[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}}});t.exports=i},function(t,e,i){var n=i(0),r=i(9),s=i(154),i=new n({Extends:r,initialize:function(t,e){r.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(s.DOWN,this,t):(this.isDown=!0,this.isUp=!1,this.timeDown=t.timeStamp,this.duration=0,this._justDown=!0,this._justUp=!1,this.emit(s.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(s.UP,this,t))},reset:function(){return this.preventDefault=!0,this.enabled=!0,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}});t.exports=i},function(t,e,i){var n=i(0),o=i(154),a=i(2),h=i(514),l=i(516),i=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 r=e[n];"string"==typeof r?this.keyCodes.push(r.toUpperCase().charCodeAt(0)):"number"==typeof r?this.keyCodes.push(r):r.hasOwnProperty("keyCode")&&this.keyCodes.push(r.keyCode)}this.current=this.keyCodes[0],this.index=0,this.size=this.keyCodes.length,this.timeLastMatched=0,this.matched=!1,this.timeMatched=0,this.resetOnWrongKey=a(i,"resetOnWrongKey",!0),this.maxKeyDelay=a(i,"maxKeyDelay",0),this.resetOnMatch=a(i,"resetOnMatch",!1),this.deleteOnMatch=a(i,"deleteOnMatch",!1);var s=this;this.onKeyDown=function(t){!s.matched&&s.enabled&&h(t,s)&&(s.manager.emit(o.COMBO_MATCH,s,t),s.resetOnMatch?l(s):s.deleteOnMatch&&s.destroy())},this.manager.on(o.ANY_KEY_DOWN,this.onKeyDown)},progress:{get:function(){return this.index/this.size}},destroy:function(){this.enabled=!1,this.keyCodes=[],this.manager.off(o.ANY_KEY_DOWN,this.onKeyDown),this.manager=null}});t.exports=i},function(t,e,i){var s=i(515);t.exports=function(t,e){var i,n,r;return!!e.matched||(r=n=!1,t.keyCode!==e.current||0<e.index&&0<e.maxKeyDelay&&(i=e.timeLastMatched+e.maxKeyDelay,!(t.timeStamp<=i))||(r=!0,n=s(t,e)),!r&&e.resetOnWrongKey&&(e.index=0,e.current=e.keyCodes[0]),n&&(e.timeLastMatched=t.timeStamp,e.matched=!0,e.timeMatched=t.timeStamp),n)}},function(t,e){t.exports=function(t,e){return e.timeLastMatched=t.timeStamp,e.index++,e.index===e.size||(e.current=e.keyCodes[e.index],!1)}},function(t,e){t.exports=function(t){return t.current=t.keyCodes[0],t.index=0,t.timeLastMatched=0,t.matched=!1,t.timeMatched=0,t}},function(t,e,i){var s=i(240);t.exports=function(t,e){var i=s(e,t.xhrSettings),n=new XMLHttpRequest;if(n.open("GET",t.src,i.async,i.user,i.password),n.responseType=t.xhrSettings.responseType,n.timeout=i.timeout,i.headers)for(var r in i.headers)n.setRequestHeader(r,i.headers[r]);return i.header&&i.headerValue&&n.setRequestHeader(i.header,i.headerValue),i.requestedWith&&n.setRequestHeader("X-Requested-With",i.requestedWith),i.overrideMimeType&&n.overrideMimeType(i.overrideMimeType),i.withCredentials&&(n.withCredentials=!0),n.onload=t.onLoad.bind(t,n),n.onerror=t.onError.bind(t,n),n.onprogress=t.onProgress.bind(t),n.send(),n}},function(t,e,i){var n=i(0),r=i(21),o=i(23),s=i(8),h=i(2),l=i(519),c=i(7),u=new n({Extends:o,initialize:function(t,e,i,n,r){c(e)&&(e=h(s=e,"key"),n=h(s,"xhrSettings"),r=h(s,"context",r));var s={type:"audio",cache:t.cacheManager.audio,extension:i.type,responseType:"arraybuffer",key:e,url:i.url,xhrSettings:n,config:{context:r}};o.call(this,t,s)},onProcess:function(){this.state=r.FILE_PROCESSING;var e=this;this.config.context.decodeAudioData(this.xhrLoader.response,function(t){e.data=t,e.onProcessComplete()},function(t){e.onProcessError()}),this.config.context=null}});u.create=function(t,e,i,n,r){var s=t.systems.game,o=s.config.audio,a=s.device.audio,i=(c(e)&&(i=h(e,"url",[]),n=h(e,"config",{})),u.getAudioURL(s,i));return i?a.webAudio&&!o.disableWebAudio?new u(t,e,i,r,s.sound.context):new l(t,e,i,n):null},u.getAudioURL=function(t,e){Array.isArray(e)||(e=[e]);for(var i=0;i<e.length;i++){var n=h(e[i],"url",e[i]);if(0===n.indexOf("blob:")||0===n.indexOf("data:"))return{url:n,type:""};var r=n.match(/\.([a-zA-Z0-9]+)($|\?)/),r=h(e[i],"type",r?r[1]:"").toLowerCase();if(t.device.audio[r])return{url:n,type:r}}return null},s.register("audio",function(t,e,i,n){var r,s=this.systems.game,o=s.config.audio,s=s.device.audio;if(!o.noAudio&&(s.webAudio||s.audioData))if(Array.isArray(t))for(var a=0;a<t.length;a++)(r=u.create(this,t[a]))&&this.addFile(r);else(r=u.create(this,t,e,i,n))&&this.addFile(r);return this}),t.exports=u},function(t,e,i){var n=i(0),r=i(95),s=i(23),o=i(2),a=i(155),h=i(7),i=new n({Extends:s,initialize:function(t,e,i,n){h(e)&&(e=o(r=e,"key"),n=o(r,"config",n));var r={type:"audio",cache:t.cacheManager.audio,extension:i.type,key:e,url:i.url,config:n};s.call(this,t,r),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){t=t.target;t.oncanplaythrough=null,t.onerror=null,this.filesLoaded++,this.percentComplete=Math.min(this.filesLoaded/this.filesTotal,1),this.loader.emit(r.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;for(var e=this.percentComplete=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))}});t.exports=i},function(t,e,i){var n=i(0),r=i(21),o=i(23),s=i(8),a=i(2),h=i(7),l=new n({Extends:o,initialize:function(t,e,i,n){var r="js",s=(h(e)&&(e=a(s=e,"key"),i=a(s,"url"),n=a(s,"xhrSettings"),r=a(s,"extension",r)),{type:"script",cache:!1,extension:r,responseType:"text",key:e,url:i,xhrSettings:n});o.call(this,t,s)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data),this.onProcessComplete()}});s.register("script",function(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},function(t,e,i){var r=i(522),s=i(157),n=i(0),o=i(62),a=i(524),h=i(525),i=new n({initialize:function(t){this.world=t,this.scene=t.scene,this.sys=t.scene.sys},collider:function(t,e,i,n,r){return this.world.addCollider(t,e,i,n,r)},overlap:function(t,e,i,n,r){return this.world.addOverlap(t,e,i,n,r)},existing:function(t,e){e=e?o.STATIC_BODY:o.DYNAMIC_BODY;return this.world.enableBody(t,e),t},staticImage:function(t,e,i,n){t=new r(this.scene,t,e,i,n);return this.sys.displayList.add(t),this.world.enableBody(t,o.STATIC_BODY),t},image:function(t,e,i,n){t=new r(this.scene,t,e,i,n);return this.sys.displayList.add(t),this.world.enableBody(t,o.DYNAMIC_BODY),t},staticSprite:function(t,e,i,n){t=new s(this.scene,t,e,i,n);return this.sys.displayList.add(t),this.sys.updateList.add(t),this.world.enableBody(t,o.STATIC_BODY),t},sprite:function(t,e,i,n){t=new s(this.scene,t,e,i,n);return this.sys.displayList.add(t),this.sys.updateList.add(t),this.world.enableBody(t,o.DYNAMIC_BODY),t},staticGroup:function(t,e){return this.sys.updateList.add(new h(this.world,this.world.scene,t,e))},group:function(t,e){return this.sys.updateList.add(new a(this.world,this.world.scene,t,e))},destroy:function(){this.world=null,this.scene=null,this.sys=null}});t.exports=i},function(t,e,i){var n=i(0),r=i(243),s=i(125),i=new n({Extends:s,Mixins:[r.Acceleration,r.Angular,r.Bounce,r.Debug,r.Drag,r.Enable,r.Friction,r.Gravity,r.Immovable,r.Mass,r.Pushable,r.Size,r.Velocity],initialize:function(t,e,i,n,r){s.call(this,t,e,i,n,r),this.body=null}});t.exports=i},function(t,e,i){var d=i(244),p=i(65),f=i(231),g=i(151);t.exports=function(t,e,i,n,r,s){var o=d(t,e-n,i-n,2*n,2*n,r,s);if(0===o.length)return o;for(var a=new p(e,i,n),h=new p,l=[],c=0;c<o.length;c++){var u=o[c];u.isCircle?(h.setTo(u.center.x,u.center.y,u.halfWidth),f(a,h)&&l.push(u)):g(a,u)&&l.push(u)}return l}},function(t,e,i){var s=i(157),n=i(0),o=i(62),a=i(2),h=i(113),l=i(7),i=new n({Extends:h,initialize:function(t,e,i,n){var r;i||n?l(i)?(n=i,i=null,n.internalCreateCallback=this.createCallbackHandler,n.internalRemoveCallback=this.removeCallbackHandler):Array.isArray(i)&&l(i[0])?(n=i[0],r=this,i.forEach(function(t){t.internalCreateCallback=r.createCallbackHandler,t.internalRemoveCallback=r.removeCallbackHandler}),i=null):n={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler}:n={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler},this.world=t,n.classType=a(n,"classType",s),this.physicsType=o.DYNAMIC_BODY,this.defaults={setCollideWorldBounds:a(n,"collideWorldBounds",!1),setBoundsRectangle:a(n,"customBoundsRectangle",null),setAccelerationX:a(n,"accelerationX",0),setAccelerationY:a(n,"accelerationY",0),setAllowDrag:a(n,"allowDrag",!0),setAllowGravity:a(n,"allowGravity",!0),setAllowRotation:a(n,"allowRotation",!0),setBounceX:a(n,"bounceX",0),setBounceY:a(n,"bounceY",0),setDragX:a(n,"dragX",0),setDragY:a(n,"dragY",0),setEnable:a(n,"enable",!0),setGravityX:a(n,"gravityX",0),setGravityY:a(n,"gravityY",0),setFrictionX:a(n,"frictionX",0),setFrictionY:a(n,"frictionY",0),setMaxVelocityX:a(n,"maxVelocityX",1e4),setMaxVelocityY:a(n,"maxVelocityY",1e4),setVelocityX:a(n,"velocityX",0),setVelocityY:a(n,"velocityY",0),setAngularVelocity:a(n,"angularVelocity",0),setAngularAcceleration:a(n,"angularAcceleration",0),setAngularDrag:a(n,"angularDrag",0),setMass:a(n,"mass",1),setImmovable:a(n,"immovable",!1)},h.call(this,e,i,n),this.type="PhysicsGroup"},createCallbackHandler:function(t){t.body||this.world.enableBody(t,o.DYNAMIC_BODY);var e,i=t.body;for(e in this.defaults)i[e](this.defaults[e])},removeCallbackHandler:function(t){t.body&&this.world.disableBody(t)},setVelocity:function(t,e,i){void 0===i&&(i=0);for(var n=this.getChildren(),r=0;r<n.length;r++)n[r].body.velocity.set(t+r*i,e+r*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}});t.exports=i},function(t,e,i){var r=i(157),n=i(0),s=i(62),o=i(2),a=i(113),h=i(7),i=new n({Extends:a,initialize:function(t,e,i,n){i||n?h(i)?(n=i,i=null,n.internalCreateCallback=this.createCallbackHandler,n.internalRemoveCallback=this.removeCallbackHandler,n.createMultipleCallback=this.createMultipleCallbackHandler,n.classType=o(n,"classType",r)):Array.isArray(i)&&h(i[0])?(n=i,i=null,n.forEach(function(t){t.internalCreateCallback=this.createCallbackHandler,t.internalRemoveCallback=this.removeCallbackHandler,t.createMultipleCallback=this.createMultipleCallbackHandler,t.classType=o(t,"classType",r)})):n={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler}:n={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler,createMultipleCallback:this.createMultipleCallbackHandler,classType:r},this.world=t,this.physicsType=s.STATIC_BODY,a.call(this,e,i,n),this.type="StaticPhysicsGroup"},createCallbackHandler:function(t){t.body||this.world.enableBody(t,s.STATIC_BODY)},removeCallbackHandler:function(t){t.body&&this.world.disableBody(t)},createMultipleCallbackHandler:function(){this.refresh()},refresh:function(){for(var t=this.children.entries,e=0;e<t.length;e++)t[e].body.reset();return this}});t.exports=i},function(t,e,i){var o=i(350),n=i(527),f=i(18),r=i(0),s=i(528),g=i(62),a=i(50),h=i(9),m=i(245),y=i(124),v=i(354),x=i(355),l=i(246),c=i(247),d=i(529),u=i(6),p=i(14),b=i(211),w=i(530),T=i(10),S=i(531),P=i(532),_=i(537),E=i(538),A=i(149),M=i(539),k=i(248),C=i(25),O=i(3),R=i(68),i=new r({Extends:h,initialize:function(t,e){h.call(this),this.scene=t,this.bodies=new A,this.staticBodies=new A,this.pendingDestroy=new A,this.colliders=new b,this.gravity=new O(u(e,"gravity.x",0),u(e,"gravity.y",0)),this.bounds=new T(u(e,"x",0),u(e,"y",0),u(e,"width",t.sys.scale.width),u(e,"height",t.sys.scale.height)),this.checkCollision={up:u(e,"checkCollision.up",!0),down:u(e,"checkCollision.down",!0),left:u(e,"checkCollision.left",!0),right:u(e,"checkCollision.right",!0)},this.fps=u(e,"fps",60),this.fixedStep=u(e,"fixedStep",!0),this._elapsed=0,this._frameTime=1/this.fps,this._frameTimeMS=1e3*this._frameTime,this.stepsLastFrame=0,this.timeScale=u(e,"timeScale",1),this.OVERLAP_BIAS=u(e,"overlapBias",4),this.TILE_BIAS=u(e,"tileBias",16),this.forceX=u(e,"forceX",!1),this.isPaused=u(e,"isPaused",!1),this._total=0,this.drawDebug=u(e,"debug",!1),this.debugGraphic,this.defaults={debugShowBody:u(e,"debugShowBody",!0),debugShowStaticBody:u(e,"debugShowStaticBody",!0),debugShowVelocity:u(e,"debugShowVelocity",!0),bodyDebugColor:u(e,"debugBodyColor",16711935),staticBodyDebugColor:u(e,"debugStaticBodyColor",255),velocityDebugColor:u(e,"debugVelocityColor",65280)},this.maxEntries=u(e,"maxEntries",16),this.useTree=u(e,"useTree",!0),this.tree=new S(this.maxEntries),this.staticTree=new S(this.maxEntries),this.treeMinMax={minX:0,minY:0,maxX:0,maxY:0},this._tempMatrix=new C,this._tempMatrix2=new C,this.drawDebug&&this.createDebugGraphic()},enable:function(t,e){void 0===e&&(e=g.DYNAMIC_BODY),Array.isArray(t)||(t=[t]);for(var i=0;i<t.length;i++){var n=t[i];if(n.isParent)for(var r=n.getChildren(),s=0;s<r.length;s++){var o=r[s];o.isParent?this.enable(o,e):this.enableBody(o,e)}else this.enableBody(n,e)}},enableBody:function(t,e){return void 0===e&&(e=g.DYNAMIC_BODY),t.body||(e===g.DYNAMIC_BODY?t.body=new n(this,t):e===g.STATIC_BODY&&(t.body=new M(this,t))),this.add(t.body),t},add:function(t){return t.physicsType===g.DYNAMIC_BODY?this.bodies.set(t):t.physicsType===g.STATIC_BODY&&(this.staticBodies.set(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(),r=0;r<n.length;r++){var s=n[r];s.isParent?this.disable(s):this.disableBody(s.body)}else this.disableBody(i.body)}},disableBody:function(t){this.remove(t),t.enable=!1},remove:function(t){t.physicsType===g.DYNAMIC_BODY?(this.tree.remove(t),this.bodies.delete(t)):t.physicsType===g.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,r,s,o,a){return this.bounds.setTo(t,e,i,n),void 0!==r&&this.setBoundsCollision(r,s,o,a),this},setBoundsCollision:function(t,e,i,n){return void 0===e&&(e=!0),void 0===i&&(i=!0),void 0===n&&(n=!0),this.checkCollision.left=t=void 0===t?!0:t,this.checkCollision.right=e,this.checkCollision.up=i,this.checkCollision.down=n,this},pause:function(){return this.isPaused=!0,this.emit(m.PAUSE),this},resume:function(){return this.isPaused=!1,this.emit(m.RESUME),this},addCollider:function(t,e,i,n,r){t=new s(this,!1,t,e,i=void 0===i?null:i,n=void 0===n?null:n,r=void 0===r?i:r);return this.colliders.add(t),t},addOverlap:function(t,e,i,n,r){t=new s(this,!0,t,e,i=void 0===i?null:i,n=void 0===n?null:n,r=void 0===r?i:r);return this.colliders.add(t),t},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,n=this._frameTime,r=this._frameTimeMS*this.timeScale,s=(this._elapsed+=e,this.bodies.entries),o=this._elapsed>=r;for(this.fixedStep||(n=.001*e,o=!0,this._elapsed=0),h=0;h<s.length;h++)(i=s[h]).enable&&i.preUpdate(o,n);if(o){this._elapsed-=r,this.stepsLastFrame=1,this.useTree&&(this.tree.clear(),this.tree.load(s));for(var a=this.colliders.update(),h=0;h<a.length;h++){var l=a[h];l.active&&l.update()}this.emit(m.WORLD_STEP,n)}for(;this._elapsed>=r;)this._elapsed-=r,this.step(n)}},step:function(t){for(var e,i=this.bodies.entries,n=i.length,r=0;r<n;r++)(e=i[r]).enable&&e.update(t);this.useTree&&(this.tree.clear(),this.tree.load(i));for(var s=this.colliders.update(),r=0;r<s.length;r++){var o=s[r];o.active&&o.update()}this.emit(m.WORLD_STEP,t),this.stepsLastFrame++},postUpdate:function(){var t,e=(o=this.bodies.entries).length,i=this.bodies,n=this.staticBodies;if(this.stepsLastFrame)for(l=this.stepsLastFrame=0;l<e;l++)(t=o[l]).enable&&t.postUpdate();if(this.drawDebug){var r=this.debugGraphic;for(r.clear(),l=0;l<e;l++)(t=o[l]).willDrawDebug()&&t.drawDebug(r);for(e=(o=n.entries).length,l=0;l<e;l++)(t=o[l]).willDrawDebug()&&t.drawDebug(r)}var s=this.pendingDestroy;if(0<s.size){for(var o,a=this.tree,h=this.staticTree,l=(e=(o=s.entries).length,0);l<e;l++)(t=o[l]).physicsType===g.DYNAMIC_BODY?(a.remove(t),i.delete(t)):t.physicsType===g.STATIC_BODY&&(h.remove(t),n.delete(t)),t.world=void 0,t.gameObject=void 0;s.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,r=t.angularDrag,s=t.maxAngular,n=(n?i+=n*e:t.allowDrag&&r&&(v(i-(r*=e),0,.1)?i-=r:x(i+r,0,.1)?i+=r:i=0),(i=f(i,-s,s))-t.angularVelocity);t.angularVelocity+=n,t.rotation+=t.angularVelocity*e},computeVelocity:function(t,e){var i=t.velocity.x,n=t.acceleration.x,r=t.drag.x,s=t.maxVelocity.x,o=t.velocity.y,a=t.acceleration.y,h=t.drag.y,l=t.maxVelocity.y,c=t.speed,u=t.maxSpeed,d=t.allowDrag,p=t.useDamping;t.allowGravity&&(i+=(this.gravity.x+t.gravity.x)*e,o+=(this.gravity.y+t.gravity.y)*e),n?i+=n*e:d&&r&&(p?(i*=r=Math.pow(r,e),c=Math.sqrt(i*i+o*o),y(c,0,.001)&&(i=0)):v(i-(r*=e),0,.01)?i-=r:x(i+r,0,.01)?i+=r:i=0),a?o+=a*e:d&&h&&(p?(o*=h=Math.pow(h,e),c=Math.sqrt(i*i+o*o),y(c,0,.001)&&(o=0)):v(o-(h*=e),0,.01)?o-=h:x(o+h,0,.01)?o+=h:o=0),i=f(i,-s,s),o=f(o,-l,l),t.velocity.set(i,o),-1<u&&u<c&&(t.velocity.normalize().scale(u),c=u),t.speed=c},separate:function(t,e,i,n,r,s){if(!s&&!t.enable||!e.enable||t.checkCollision.none||e.checkCollision.none||!this.intersects(t,e))return!1;if(i&&!1===i.call(n,t.gameObject,e.gameObject))return!1;if(t.isCircle&&e.isCircle)return this.separateCircle(t,e,r);if(t.isCircle!==e.isCircle){var s=t.isCircle?e:t,i=t.isCircle?t:e,n=s.x,o=s.y,a=s.right,s=s.bottom,i=i.center;if((i.y<o||i.y>s)&&(i.x<n||i.x>a))return this.separateCircle(t,e,r)}o=!1,s=!1,r?(o=_(t,e,r,this.OVERLAP_BIAS),s=E(t,e,r,this.OVERLAP_BIAS)):this.forceX||Math.abs(this.gravity.y+t.gravity.y)<Math.abs(this.gravity.x+t.gravity.x)?(o=_(t,e,r,this.OVERLAP_BIAS),this.intersects(t,e)&&(s=E(t,e,r,this.OVERLAP_BIAS))):(s=E(t,e,r,this.OVERLAP_BIAS),this.intersects(t,e)&&(o=_(t,e,r,this.OVERLAP_BIAS))),n=o||s;return n&&(r?(t.onOverlap||e.onOverlap)&&this.emit(m.OVERLAP,t.gameObject,e.gameObject,t,e):(t.onCollide||e.onCollide)&&this.emit(m.COLLIDE,t.gameObject,e.gameObject,t,e)),n},separateCircle:function(t,e,i,n){l(t,e,!1,n),c(t,e,!1,n);var r,s,n=0;return t.isCircle!==e.isCircle?(r={x:(e.isCircle?t:e).position.x,y:(e.isCircle?t:e).position.y,right:(e.isCircle?t:e).right,bottom:(e.isCircle?t:e).bottom},(s={x:(t.isCircle?t:e).center.x,y:(t.isCircle?t:e).center.y,radius:(t.isCircle?t:e).halfWidth}).y<r.y?s.x<r.x?n=a(s.x,s.y,r.x,r.y)-s.radius:r.right<s.x&&(n=a(s.x,s.y,r.right,r.y)-s.radius):r.bottom<s.y&&(s.x<r.x?n=a(s.x,s.y,r.x,r.bottom)-s.radius:r.right<s.x&&(n=a(s.x,s.y,r.right,r.bottom)-s.radius)),n*=-1):n=t.halfWidth+e.halfWidth-a(t.center.x,t.center.y,e.center.x,e.center.y),t.overlapR=n,e.overlapR=n,i||0===n||t.immovable&&e.immovable||t.customSeparateX||e.customSeparateX?(0!==n&&(t.onOverlap||e.onOverlap)&&this.emit(m.OVERLAP,t.gameObject,e.gameObject,t,e),0!==n):(r=t.center.x-e.center.x,s=t.center.y-e.center.y,i=Math.sqrt(Math.pow(r,2)+Math.pow(s,2)),r=(e.center.x-t.center.x)/i||0,s=(e.center.y-t.center.y)/i||0,i=2*(t.velocity.x*r+t.velocity.y*s-e.velocity.x*r-e.velocity.y*s)/(t.mass+e.mass),(t.immovable||e.immovable)&&(i*=2),t.immovable||(t.velocity.x=t.velocity.x-i/t.mass*r,t.velocity.y=t.velocity.y-i/t.mass*s),e.immovable||(e.velocity.x=e.velocity.x+i/e.mass*r,e.velocity.y=e.velocity.y+i/e.mass*s),t.immovable||e.immovable||(n/=2),r=o(t.center,e.center),i=(n+p.EPSILON)*Math.cos(r),s=(n+p.EPSILON)*Math.sin(r),t.immovable||(t.x-=i,t.y-=s,t.updateCenter()),e.immovable||(e.x+=i,e.y+=s,e.updateCenter()),t.velocity.x*=t.bounce.x,t.velocity.y*=t.bounce.y,e.velocity.x*=e.bounce.x,e.velocity.y*=e.bounce.y,(t.onCollide||e.onCollide)&&this.emit(m.COLLIDE,t.gameObject,e.gameObject,t,e),!0)},intersects:function(t,e){return t!==e&&(t.isCircle||e.isCircle?t.isCircle?e.isCircle?a(t.center.x,t.center.y,e.center.x,e.center.y)<=t.halfWidth+e.halfWidth:this.circleBodyIntersects(t,e):this.circleBodyIntersects(e,t):!(t.right<=e.position.x||t.bottom<=e.position.y||t.position.x>=e.right||t.position.y>=e.bottom))},circleBodyIntersects:function(t,e){var i=f(t.center.x,e.left,e.right),e=f(t.center.y,e.top,e.bottom);return(t.center.x-i)*(t.center.x-i)+(t.center.y-e)*(t.center.y-e)<=t.halfWidth*t.halfWidth},overlap:function(t,e,i,n,r){return void 0===i&&(i=null),void 0===r&&(r=i),this.collideObjects(t,e,i,n=void 0===n?null:n,r,!0)},collide:function(t,e,i,n,r){return void 0===i&&(i=null),void 0===r&&(r=i),this.collideObjects(t,e,i,n=void 0===n?null:n,r,!1)},collideObjects:function(t,e,i,n,r,s){t.isParent&&void 0===t.physicsType&&(t=t.children.entries),e&&e.isParent&&void 0===e.physicsType&&(e=e.children.entries);var o,a=Array.isArray(t),h=Array.isArray(e);if(this._total=0,a||h)if(!a&&h)for(o=0;o<e.length;o++)this.collideHandler(t,e[o],i,n,r,s);else if(a&&!h)if(e)for(o=0;o<t.length;o++)this.collideHandler(t[o],e,i,n,r,s);else for(o=0;o<t.length;o++)for(var l=t[o],c=o+1;c<t.length;c++)o!==c&&this.collideHandler(l,t[c],i,n,r,s);else for(o=0;o<t.length;o++)for(c=0;c<e.length;c++)this.collideHandler(t[o],e[c],i,n,r,s);else this.collideHandler(t,e,i,n,r,s);return 0<this._total},collideHandler:function(t,e,i,n,r,s){return void 0===e&&t.isParent?this.collideGroupVsGroup(t,t,i,n,r,s):!(!t||!e)&&(t.body?e.body?this.collideSpriteVsSprite(t,e,i,n,r,s):e.isParent?this.collideSpriteVsGroup(t,e,i,n,r,s):e.isTilemap?this.collideSpriteVsTilemapLayer(t,e,i,n,r,s):void 0:t.isParent?e.body?this.collideSpriteVsGroup(e,t,i,n,r,s):e.isParent?this.collideGroupVsGroup(t,e,i,n,r,s):e.isTilemap?this.collideGroupVsTilemapLayer(t,e,i,n,r,s):void 0:t.isTilemap?e.body?this.collideSpriteVsTilemapLayer(e,t,i,n,r,s):e.isParent?this.collideGroupVsTilemapLayer(e,t,i,n,r,s):void 0:void 0)},collideSpriteVsSprite:function(t,e,i,n,r,s){return!(!t.body||!e.body||(this.separate(t.body,e.body,n,r,s)&&(i&&i.call(r,t,e),this._total++),0))},collideSpriteVsGroup:function(t,e,i,n,r,s){var o,a=t.body;if(0!==e.length&&a&&a.enable&&!a.checkCollision.none)if(this.useTree||e.physicsType===g.STATIC_BODY){var h=this.treeMinMax;h.minX=a.left,h.minY=a.top,h.maxX=a.right,h.maxY=a.bottom;for(var l=(e.physicsType===g.DYNAMIC_BODY?this.tree:this.staticTree).search(h),c=l.length,u=0;u<c;u++)a!==(o=l[u])&&o.enable&&!o.checkCollision.none&&e.contains(o.gameObject)&&this.separate(a,o,n,r,s,!0)&&(i&&i.call(r,a.gameObject,o.gameObject),this._total++)}else for(var d=e.getChildren(),p=e.children.entries.indexOf(t),c=d.length,u=0;u<c;u++)(o=d[u].body)&&u!==p&&o.enable&&this.separate(a,o,n,r,s)&&(i&&i.call(r,a.gameObject,o.gameObject),this._total++)},collideGroupVsTilemapLayer:function(t,e,i,n,r,s){var o=t.getChildren();if(0===o.length)return!1;for(var a=!1,h=0;h<o.length;h++)o[h].body&&this.collideSpriteVsTilemapLayer(o[h],e,i,n,r,s)&&(a=!0);return a},collideTiles:function(t,e,i,n,r){return!(!t.body.enable||0===e.length)&&this.collideSpriteVsTilesHandler(t,e,i,n,r,!1,!1)},overlapTiles:function(t,e,i,n,r){return!(!t.body.enable||0===e.length)&&this.collideSpriteVsTilesHandler(t,e,i,n,r,!0,!1)},collideSpriteVsTilemapLayer:function(t,e,i,n,r,s){var o,a,h,l,c,u=t.body;return!(!u.enable||u.checkCollision.none)&&(o=u.position.x,a=u.position.y,h=u.width,u=u.height,(l=e.layer).tileWidth>l.baseTileWidth&&(o-=c=(l.tileWidth-l.baseTileWidth)*e.scaleX,h+=c),l.tileHeight>l.baseTileHeight&&(u+=(l.tileHeight-l.baseTileHeight)*e.scaleY),0!==(c=d(o,a,h,u,null,e.scene.cameras.main,e.layer)).length&&this.collideSpriteVsTilesHandler(t,c,i,n,r,s,!0))},collideSpriteVsTilesHandler:function(t,e,i,n,r,s,o){for(var a,h,l=t.body,c={left:0,right:0,top:0,bottom:0},u=!1,d=0;d<e.length;d++){var p=(h=(a=e[d]).tilemapLayer).tileToWorldXY(a.x,a.y);c.left=p.x,c.top=p.y,a.baseHeight!==a.height&&(c.top-=(a.height-a.baseHeight)*h.scaleY),c.right=c.left+a.width*h.scaleX,c.bottom=c.top+a.height*h.scaleY,k(c,l)&&(!n||n.call(r,t,a))&&w(a,t)&&(s||P(d,l,a,c,h,this.TILE_BIAS,o))&&(this._total++,u=!0,i&&i.call(r,t,a),s&&l.onOverlap?this.emit(m.TILE_OVERLAP,t,a,l):l.onCollide&&this.emit(m.TILE_COLLIDE,t,a,l))}return u},collideGroupVsGroup:function(t,e,i,n,r,s){if(0!==t.length&&0!==e.length)for(var o=t.getChildren(),a=0;a<o.length;a++)this.collideSpriteVsGroup(o[a],e,i,n,r,s)},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){t.x=R(t.x,this.bounds.left-(e=void 0===e?0:e),this.bounds.right+e),t.y=R(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}});t.exports=i},function(t,e,i){var n=i(0),r=i(62),s=i(245),o=i(196),a=i(10),h=i(57),l=i(3),i=new n({initialize:function(t,e){var i=e.displayWidth||64,n=e.displayHeight||64;this.world=t,this.gameObject=e,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 l,this.position=new l(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 l(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=new l,this.newVelocity=new l,this.deltaMax=new l,this.acceleration=new l,this.allowDrag=!0,this.drag=new l,this.allowGravity=!0,this.gravity=new l,this.bounce=new l,this.worldBounce=null,this.customBoundsRectangle=t.bounds,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.maxVelocity=new l(1e4,1e4),this.maxSpeed=-1,this.friction=new l(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.moves=!0,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision={none:!1,up:!0,down:!0,left:!0,right:!0},this.touching={none:!0,up:!1,down:!1,left:!1,right:!1},this.wasTouching={none:!0,up:!1,down:!1,left:!1,right:!1},this.blocked={none:!0,up:!1,down:!1,left:!1,right:!1},this.syncBounds=!1,this.physicsType=r.DYNAMIC_BODY,this._sx=e.scaleX,this._sy=e.scaleY,this._dx=0,this._dy=0,this._tx=0,this._ty=0,this._bounds=new a},updateBounds:function(){var t=this.gameObject,e=this.transform;t.parentContainer?(i=t.getWorldTransformMatrix(this.world._tempMatrix,this.world._tempMatrix2),e.x=i.tx,e.y=i.ty,e.rotation=o(i.rotation),e.scaleX=i.scaleX,e.scaleY=i.scaleY):(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 i=!1;this.syncBounds?(t=t.getBounds(this._bounds),this.width=t.width,this.height=t.height,i=!0):(t=Math.abs(e.scaleX),e=Math.abs(e.scaleY),this._sx===t&&this._sy===e||(this.width=this.sourceWidth*t,this.height=this.sourceHeight*e,this._sx=t,this._sy=e,i=!0)),i&&(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){var e=this.wasTouching,i=this.touching,n=this.blocked;(t=void 0===t?!1:t)?(e.none=!0,e.up=!1,e.down=!1,e.left=!1,e.right=!1):(e.none=i.none,e.up=i.up,e.down=i.down,e.left=i.left,e.right=i.right),i.none=!0,i.up=!1,i.down=!1,i.left=!1,i.right=!1,n.none=!0,n.up=!1,n.down=!1,n.left=!1,n.right=!1,this.overlapR=0,this.overlapX=0,this.overlapY=0,this.embedded=!1},preUpdate:function(t,e){t&&this.resetFlags(),this.updateFromGameObject(),this.rotation=this.transform.rotation,this.preRotation=this.rotation,this.moves&&(this.prev.x=this.position.x,this.prev.y=this.position.y,this.prevFrame.x=this.position.x,this.prevFrame.y=this.position.y),t&&this.update(e)},update:function(t){var e,i;this.prev.x=this.position.x,this.prev.y=this.position.y,this.moves&&(this.world.updateMotion(this,t),e=this.velocity.x,i=this.velocity.y,this.newVelocity.set(e*t,i*t),this.position.add(this.newVelocity),this.updateCenter(),this.angle=Math.atan2(i,e),this.speed=Math.sqrt(e*e+i*i),this.collideWorldBounds&&this.checkWorldBounds()&&this.onWorldBounds&&this.world.emit(s.WORLD_BOUNDS,this,this.blocked.up,this.blocked.down,this.blocked.left,this.blocked.right)),this._dx=this.position.x-this.prev.x,this._dy=this.position.y-this.prev.y},postUpdate:function(){var t,e=this.position.x-this.prevFrame.x,i=this.position.y-this.prevFrame.y;this.moves&&(0!==(t=this.deltaMax.x)&&0!==e&&(e<0&&e<-t?e=-t:0<e&&t<e&&(e=t)),0!==(t=this.deltaMax.y)&&0!==i&&(i<0&&i<-t?i=-t:0<i&&t<i&&(i=t)),this.gameObject.x+=e,this.gameObject.y+=i),e<0?this.facing=r.FACING_LEFT:0<e&&(this.facing=r.FACING_RIGHT),i<0?this.facing=r.FACING_UP:0<i&&(this.facing=r.FACING_DOWN),this.allowRotation&&(this.gameObject.angle+=this.deltaZ()),this._tx=e,this._ty=i},setBoundsRectangle:function(t){return this.customBoundsRectangle=t||this.world.bounds,this},checkWorldBounds:function(){var t=this.position,e=this.customBoundsRectangle,i=this.world.checkCollision,n=this.worldBounce?-this.worldBounce.x:-this.bounce.x,r=this.worldBounce?-this.worldBounce.y:-this.bounce.y,s=!1;return t.x<e.x&&i.left?(t.x=e.x,this.velocity.x*=n,s=this.blocked.left=!0):this.right>e.right&&i.right&&(t.x=e.right-this.width,this.velocity.x*=n,s=this.blocked.right=!0),t.y<e.y&&i.up?(t.y=e.y,this.velocity.y*=r,s=this.blocked.up=!0):this.bottom>e.bottom&&i.down&&(t.y=e.bottom-this.height,this.velocity.y*=r,s=this.blocked.down=!0),s&&(this.blocked.none=!1,this.updateCenter()),s},setOffset:function(t,e){return this.offset.set(t,e=void 0===e?t:e),this},setSize:function(t,e,i){void 0===i&&(i=!0);var n=this.gameObject;return!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.getCenter&&(i=(n.width-t)/2,t=(n.height-e)/2,this.offset.set(i,t)),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),0<t?(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.setPosition(t,e),i.getTopLeft?i.getTopLeft(this.position):this.position.set(t,e),this.prev.copy(this.position),this.prevFrame.copy(this.position),this.rotation=i.angle,this.preRotation=i.angle,this.updateBounds(),this.updateCenter(),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?0<this.radius&&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:h(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 0<this._dx?this._dx:-this._dx},deltaAbsY:function(){return 0<this._dy?this._dy:-this._dy},deltaX:function(){return this._dx},deltaY:function(){return this._dy},deltaXFinal:function(){return this._tx},deltaYFinal:function(){return this._ty},deltaZ:function(){return this.rotation-this.preRotation},destroy:function(){this.enable=!1,this.world&&this.world.pendingDestroy.set(this)},drawDebug:function(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},setCollideWorldBounds:function(t,e,i,n){this.collideWorldBounds=t=void 0===t?!0:t;var t=void 0!==e,r=void 0!==i;return(t||r)&&(this.worldBounce||(this.worldBounce=new l),t&&(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){this.velocity.x=t;var e=this.velocity.y;return this.speed=Math.sqrt(t*t+e*e),this},setVelocityY:function(t){this.velocity.y=t;var e=this.velocity.x;return this.speed=Math.sqrt(e*e+t*t),this},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},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 this.allowDrag=t=void 0===t?!0:t,this},setAllowGravity:function(t){return this.allowGravity=t=void 0===t?!0:t,this},setAllowRotation:function(t){return this.allowRotation=t=void 0===t?!0: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 this.immovable=t=void 0===t?!0:t,this},setEnable:function(t){return this.enable=t=void 0===t?!0:t,this},processX:function(t,e,i,n){this.x+=t,this.updateCenter(),null!==e&&(this.velocity.x=e);t=this.blocked;i&&(t.left=!0),n&&(t.right=!0)},processY:function(t,e,i,n){this.y+=t,this.updateCenter(),null!==e&&(this.velocity.y=e);t=this.blocked;i&&(t.up=!0),n&&(t.down=!0)},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}}});t.exports=i},function(t,e,i){i=new(i(0))({initialize:function(t,e,i,n,r,s,o){this.world=t,this.name="",this.active=!0,this.overlapOnly=e,this.object1=i,this.object2=n,this.collideCallback=r,this.processCallback=s,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}});t.exports=i},function(t,e,i){var c=i(26),i=i(3),u=new i,d=new i;t.exports=function(t,e,i,n,r,s,o){var a=o.tilemapLayer.tilemap._convert.WorldToTileXY,h=(a(t,e,!0,u,s,o),u.x),l=u.y,a=(a(t+i,e+n,!1,d,s,o),Math.ceil(d.x)),t=Math.ceil(d.y);return c(h,l,a-h,t-l,r,o)}},function(t,e){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)}},function(t,e,i){var a=i(436);function n(t){if(!(this instanceof n))return new n(t);this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}function p(t,e){f(t,0,t.children.length,e,t)}function f(t,e,i,n,r){(r=r||m(null)).minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(var s,o=e;o<i;o++)s=t.children[o],c(r,t.leaf?n(s):s);return r}function c(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 s(t,e){return t.minX-e.minX}function o(t,e){return t.minY-e.minY}function g(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function u(t){return t.maxX-t.minX+(t.maxY-t.minY)}function d(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function l(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function m(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function y(t,e,i,n,r){for(var s,o=[e,i];o.length;)(i=o.pop())-(e=o.pop())<=n||(s=e+Math.ceil((i-e)/n/2)*n,a(t,s,e,i,r),o.push(e,s,s,i))}n.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,i=[],n=this.toBBox;if(l(t,e))for(var r,s,o,a,h=[];e;){for(r=0,s=e.children.length;r<s;r++)o=e.children[r],l(t,a=e.leaf?n(o):o)&&(e.leaf?i.push(o):d(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(l(t,e))for(var n,r,s,o,a=[];e;){for(n=0,r=e.children.length;n<r;n++)if(s=e.children[n],l(t,o=e.leaf?i(s):s)){if(e.leaf||d(t,o))return!0;a.push(s)}e=a.pop()}return!1},load:function(t){if(t&&t.length)if(t.length<this._minEntries)for(var e=0,i=t.length;e<i;e++)this.insert(t[e]);else{var n,r=this._build(t.slice(),0,t.length-1,0);this.data.children.length?this.data.height===r.height?this._splitRoot(this.data,r):(this.data.height<r.height&&(n=this.data,this.data=r,r=n),this._insert(r,this.data.height-r.height-1,!0)):this.data=r}return this},insert:function(t){return t&&this._insert(t,this.data.height-1),this},clear:function(){return this.data=m([]),this},remove:function(t,e){if(t)for(var i,n,r,s,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(),s=!0),o.leaf&&-1!==(r=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)))return o.children.splice(r,1),h.push(o),this._condense(h),this;s||o.leaf||!d(o,a)?n?(i++,o=n.children[i],s=!1):o=null:(h.push(o),l.push(i),o=(n=o).children[i=0])}return this},toBBox:function(t){return{minX:t.left,minY:t.top,maxX:t.right,maxY:t.bottom}},compareMinX:function(t,e){return t.left-e.left},compareMinY:function(t,e){return t.top-e.top},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 r,s=i-e+1,o=this._maxEntries;if(s<=o)p(r=m(t.slice(e,i+1)),this.toBBox);else{n||(n=Math.ceil(Math.log(s)/Math.log(o)),o=Math.ceil(s/Math.pow(o,n-1))),(r=m([])).leaf=!1,r.height=n;var a,h,l,c,u=Math.ceil(s/o),d=u*Math.ceil(Math.sqrt(o));for(y(t,e,i,d,this.compareMinX),a=e;a<=i;a+=d)for(y(t,a,l=Math.min(a+d-1,i),u,this.compareMinY),h=a;h<=l;h+=u)c=Math.min(h+u-1,l),r.children.push(this._build(t,h,c,n-1));p(r,this.toBBox)}return r},_chooseSubtree:function(t,e,i,n){for(var r,s,o,a,h,l,c,u,d;n.push(e),!e.leaf&&n.length-1!==i;){for(l=c=1/0,r=0,s=e.children.length;r<s;r++)h=g(o=e.children[r]),u=t,d=o,(d=(Math.max(d.maxX,u.maxX)-Math.min(d.minX,u.minX))*(Math.max(d.maxY,u.maxY)-Math.min(d.minY,u.minY))-h)<c?(c=d,l=h<l?h:l,a=o):d===c&&h<l&&(l=h,a=o);e=a||e.children[0]}return e},_insert:function(t,e,i){var n=this.toBBox,i=i?t:n(t),r=[],n=this._chooseSubtree(i,this.data,e,r);for(n.children.push(t),c(n,i);0<=e&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(i,r,e)},_split:function(t,e){var i=t[e],n=i.children.length,r=this._minEntries,r=(this._chooseSplitAxis(i,r,n),this._chooseSplitIndex(i,r,n)),n=m(i.children.splice(r,i.children.length-r));n.height=i.height,n.leaf=i.leaf,p(i,this.toBBox),p(n,this.toBBox),e?t[e-1].children.push(n):this._splitRoot(i,n)},_splitRoot:function(t,e){this.data=m([t,e]),this.data.height=t.height+1,this.data.leaf=!1,p(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,i){for(var n,r,s,o,a,h,l,c,u,d=s=1/0,p=e;p<=i-e;p++)u=n=f(t,0,p,this.toBBox),a=r=f(t,p,i,this.toBBox),h=Math.max(u.minX,a.minX),l=Math.max(u.minY,a.minY),c=Math.min(u.maxX,a.maxX),u=Math.min(u.maxY,a.maxY),a=Math.max(0,c-h)*Math.max(0,u-l),c=g(n)+g(r),a<d?(d=a,o=p,s=c<s?c:s):a===d&&c<s&&(s=c,o=p);return o},_chooseSplitAxis:function(t,e,i){var n=t.leaf?this.compareMinX:s,r=t.leaf?this.compareMinY:o;this._allDistMargin(t,e,i,n)<this._allDistMargin(t,e,i,r)&&t.children.sort(n)},_allDistMargin:function(t,e,i,n){t.children.sort(n);for(var r,s=this.toBBox,o=f(t,0,e,s),a=f(t,i-e,i,s),h=u(o)+u(a),l=e;l<i-e;l++)r=t.children[l],c(o,t.leaf?s(r):r),h+=u(o);for(l=i-e-1;e<=l;l--)r=t.children[l],c(a,t.leaf?s(r):r),h+=u(a);return h},_adjustParentBBoxes:function(t,e,i){for(var n=i;0<=n;n--)c(e[n],t)},_condense:function(t){for(var e,i=t.length-1;0<=i;i--)0===t[i].children.length?0<i?(e=t[i-1].children).splice(e.indexOf(t[i]),1):this.clear():p(t[i],this.toBBox)}},t.exports=n},function(t,e,i){var y=i(533),v=i(535),x=i(248);t.exports=function(t,e,i,n,r,s,o){var a=n.left,h=n.top,l=n.right,c=n.bottom,u=i.faceLeft||i.faceRight,d=i.faceTop||i.faceBottom;if(o||(d=u=!0),!u&&!d)return!1;var p=0,f=0,g=0,m=1;if(e.deltaAbsX()>e.deltaAbsY()?g=-1:e.deltaAbsX()<e.deltaAbsY()&&(m=-1),0!==e.deltaX()&&0!==e.deltaY()&&u&&d&&(g=Math.min(Math.abs(e.position.x-l),Math.abs(e.right-a)),m=Math.min(Math.abs(e.position.y-c),Math.abs(e.bottom-h))),g<m){if(u&&0!==(p=y(e,i,a,l,s,o))&&!x(n,e))return!0;d&&(f=v(e,i,h,c,s,o))}else{if(d&&0!==(f=v(e,i,h,c,s,o))&&!x(n,e))return!0;u&&(p=y(e,i,a,l,s,o))}return 0!==p||0!==f}},function(t,e,i){var c=i(534);t.exports=function(t,e,i,n,r,s){var o=0,a=e.faceLeft,h=e.faceRight,l=e.collideLeft,e=e.collideRight;return s||(e=l=h=a=!0),t.deltaX()<0&&e&&t.checkCollision.left?h&&t.x<n&&(o=t.x-n)<-r&&(o=0):0<t.deltaX()&&l&&t.checkCollision.right&&a&&t.right>i&&r<(o=t.right-i)&&(o=0),0!==o&&(t.customSeparateX?t.overlapX=o:c(t,o)),o}},function(t,e){t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.left=!0):0<e&&(t.blocked.none=!1,t.blocked.right=!0),t.position.x-=e,0===t.bounce.x?t.velocity.x=0:t.velocity.x=-t.velocity.x*t.bounce.x}},function(t,e,i){var c=i(536);t.exports=function(t,e,i,n,r,s){var o=0,a=e.faceTop,h=e.faceBottom,l=e.collideUp,e=e.collideDown;return s||(e=l=h=a=!0),t.deltaY()<0&&e&&t.checkCollision.up?h&&t.y<n&&(o=t.y-n)<-r&&(o=0):0<t.deltaY()&&l&&t.checkCollision.down&&a&&t.bottom>i&&r<(o=t.bottom-i)&&(o=0),0!==o&&(t.customSeparateY?t.overlapY=o:c(t,o)),o}},function(t,e){t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.up=!0):0<e&&(t.blocked.none=!1,t.blocked.down=!0),t.position.y-=e,0===t.bounce.y?t.velocity.y=0:t.velocity.y=-t.velocity.y*t.bounce.y}},function(t,e,i){var o=i(246),a=i(1389);t.exports=function(t,e,i,n){var n=o(t,e,i,n),r=t.immovable,s=e.immovable;return i||0===n||r&&s||t.customSeparateX||e.customSeparateX?0!==n||t.embedded&&e.embedded:(i=a.Set(t,e,n),r||s?(r?a.RunImmovableBody1(i):s&&a.RunImmovableBody2(i),!0):0<i||a.Check())}},function(t,e,i){var o=i(247),a=i(1390);t.exports=function(t,e,i,n){var n=o(t,e,i,n),r=t.immovable,s=e.immovable;return i||0===n||r&&s||t.customSeparateY||e.customSeparateY?0!==n||t.embedded&&e.embedded:(i=a.Set(t,e,n),r||s?(r?a.RunImmovableBody1(i):s&&a.RunImmovableBody2(i),!0):0<i||a.Check())}},function(t,e,i){var n=i(66),r=i(0),s=i(62),o=i(57),a=i(3),i=new r({initialize:function(t,e){var i=e.displayWidth||64,n=e.displayHeight||64;this.world=t,this.gameObject=e,this.debugShowBody=t.defaults.debugShowStaticBody,this.debugBodyColor=t.defaults.staticBodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new a,this.position=new a(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 a(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=a.ZERO,this.allowGravity=!1,this.gravity=a.ZERO,this.bounce=a.ZERO,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.mass=1,this.immovable=!0,this.pushable=!1,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision={none:!1,up:!0,down:!0,left:!0,right:!0},this.touching={none:!0,up:!1,down:!1,left:!1,right:!1},this.wasTouching={none:!0,up:!1,down:!1,left:!1,right:!1},this.blocked={none:!0,up:!1,down:!1,left:!1,right:!1},this.physicsType=s.STATIC_BODY,this._dx=0,this._dy=0},setGameObject:function(t,e){return t&&t!==this.gameObject&&(this.gameObject.body=null,(t.body=this).gameObject=t),e&&this.updateFromGameObject(),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;return!t&&n.frame&&(t=n.frame.realWidth),!e&&n.frame&&(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.getCenter&&(t=n.displayWidth/2,e=n.displayHeight/2,this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(t-this.halfWidth,e-this.halfHeight),this.position.x+=this.offset.x,this.position.y+=this.offset.y),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),0<t?(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.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:o)(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.set(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 this.mass=t=t<=0?.1: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}}});t.exports=i},function(t,e,i){i=new(i(0))({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}});t.exports=i},function(t,e,i){var a=new(i(3));t.exports=function(t,e,i,n){var r=i.tilemapLayer,s=r.cullPaddingX,o=r.cullPaddingY,t=r.tilemap.tileToWorldXY(t,e,a,n,r);return t.x>n.worldView.x+r.scaleX*i.tileWidth*(-s-.5)&&t.x<n.worldView.right+r.scaleX*i.tileWidth*(s-.5)&&t.y>n.worldView.y+r.scaleY*i.tileHeight*(-o-1)&&t.y<n.worldView.bottom+r.scaleY*i.tileHeight*(o-.5)}},function(t,e,i){var l=i(26);t.exports=function(t,e,i,n,r,s,o){for(var a=l(i,n,r,s,null,o),h=0;h<a.length;h++)a[h]&&a[h].index===t&&(a[h].index=e)}},function(t,e,i){var n=i(10),o=i(139),a=i(76),h=new n;t.exports=function(t,e){var i=t.tilemapLayer.tilemap,t=t.tilemapLayer,n=Math.floor(i.tileWidth*t.scaleX),i=Math.floor(i.tileHeight*t.scaleY),r=a(e.worldView.x-t.x,n,0,!0)-t.cullPaddingX,n=o(e.worldView.right-t.x,n,0,!0)+t.cullPaddingX,s=a(e.worldView.y-t.y,i,0,!0)-t.cullPaddingY,e=o(e.worldView.bottom-t.y,i,0,!0)+t.cullPaddingY;return h.setTo(r,s,n-r,e-s)}},function(t,e,i){var s=i(543),o=i(159);t.exports=function(t,e,i,n){void 0===n&&(n=0),(i=void 0===i?[]:i).length=0;var r=t.tilemapLayer,e=s(t,e);return!r.skipCull&&1===r.scrollFactorX&&1===r.scrollFactorY||(e.left=0,e.right=t.width,e.top=0,e.bottom=t.height),o(t,e,n,i),i}},function(t,e,i){var s=i(546),o=i(159);t.exports=function(t,e,i,n){void 0===n&&(n=0),(i=void 0===i?[]:i).length=0;var r=t.tilemapLayer;return r.skipCull||1!==r.scrollFactorX||1!==r.scrollFactorY||(r=s(t,e),o(t,r,n,i)),i}},function(t,e,i){var s=i(139),o=i(76);t.exports=function(t,e){var i=t.tilemapLayer.tilemap,n=t.tilemapLayer,r=Math.floor(i.tileWidth*n.scaleX),i=Math.floor(i.tileHeight*n.scaleY),t=t.hexSideLength,i=(i-t)/2+t;return{left:o(e.worldView.x-n.x,r,0,!0)-n.cullPaddingX,right:s(e.worldView.right-n.x,r,0,!0)+n.cullPaddingX,top:o(e.worldView.y-n.y,i,0,!0)-n.cullPaddingY,bottom:s(e.worldView.bottom-n.y,i,0,!0)+n.cullPaddingY}}},function(t,e,i){var p=i(541);t.exports=function(t,e,i,n){void 0===n&&(n=0),(i=void 0===i?[]:i).length=0;var r,s,o,a=t.tilemapLayer,h=t.data,l=t.width,c=t.height,u=l,d=c;if(!a.skipCull)if(0===n){for(s=0;s<d;s++)for(r=0;h[s]&&r<u;r++)if(p(r,s,t,e)){if(!(o=h[s][r])||-1===o.index||!o.visible||0===o.alpha)continue;i.push(o)}}else if(1===n){for(s=0;s<d;s++)for(r=u;h[s]&&0<=r;r--)if(p(r,s,t,e)){if(!(o=h[s][r])||-1===o.index||!o.visible||0===o.alpha)continue;i.push(o)}}else if(2===n){for(s=d;0<=s;s--)for(r=0;h[s]&&r<u;r++)if(p(r,s,t,e)){if(!(o=h[s][r])||-1===o.index||!o.visible||0===o.alpha)continue;i.push(o)}}else if(3===n)for(s=d;0<=s;s--)for(r=u;h[s]&&0<=r;r--)if(p(r,s,t,e)){if(!(o=h[s][r])||-1===o.index||!o.visible||0===o.alpha)continue;i.push(o)}return a.tilesDrawn=i.length,a.tilesTotal=l*c,i}},function(t,e,i){var s=i(549),o=i(159);t.exports=function(t,e,i,n){void 0===n&&(n=0),(i=void 0===i?[]:i).length=0;var r=t.tilemapLayer;return r.skipCull||1!==r.scrollFactorX||1!==r.scrollFactorY||(r=s(t,e),o(t,r,n,i)),i}},function(t,e,i){var r=i(139),s=i(76);t.exports=function(t,e){var i=t.tilemapLayer.tilemap,t=t.tilemapLayer,n=Math.floor(i.tileWidth*t.scaleX),i=Math.floor(i.tileHeight*t.scaleY);return{left:s(e.worldView.x-t.x,n,0,!0)-t.cullPaddingX,right:r(e.worldView.right-t.x,n,0,!0)+t.cullPaddingX,top:s(e.worldView.y-t.y,i/2,0,!0)-t.cullPaddingY,bottom:r(e.worldView.bottom-t.y,i/2,0,!0)+t.cullPaddingY}}},function(t,e,i){var c=i(3);t.exports=function(t,e,i,n,r){i=i||new c;var s=r.baseTileWidth,o=r.baseTileHeight,a=r.tilemapLayer,h=0,l=0,n=(a&&(n=n||a.scene.cameras.main,h=a.x+n.scrollX*(1-a.scrollFactorX),s*=a.scaleX,l=a.y+n.scrollY*(1-a.scrollFactorY),o*=a.scaleY),r.hexSideLength);return i.set(h+t*s+e%2*(s/2),l+e*((o-n)/2+n))}},function(t,e,i){var l=i(3);t.exports=function(t,e,i,n,r){i=i||new l;var s=r.baseTileWidth,o=r.baseTileHeight,r=r.tilemapLayer,a=0,h=0;return r&&(n=n||r.scene.cameras.main,a=r.x+n.scrollX*(1-r.scrollFactorX),s*=r.scaleX,h=r.y+n.scrollY*(1-r.scrollFactorY),o*=r.scaleY),i.set(a+s/2*(t-e),h+(t+e)*(o/2))}},function(t,e,i){var l=i(3);t.exports=function(t,e,i,n,r){i=i||new l;var s=r.baseTileWidth,o=r.baseTileHeight,r=r.tilemapLayer,a=0,h=0;return r&&(n=n||r.scene.cameras.main,a=r.x+n.scrollX*(1-r.scrollFactorX),s*=r.scaleX,h=r.y+n.scrollY*(1-r.scrollFactorY),o*=r.scaleY),i.set(a+t*s+e%2*(s/2),h+e*(o/2))}},function(t,e,i){var s=i(253),o=i(254),a=i(3);t.exports=function(t,e,i,n,r){return(i=i||new a(0,0)).x=s(t,n,r),i.y=o(e,n,r),i}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileHeight,i=i.tilemapLayer,r=0,e=(i&&(void 0===e&&(e=i.scene.cameras.main),r=i.y+e.scrollY*(1-i.scrollFactorY),n*=i.scaleY),i.tilemap.hexSideLength);return r+t*((n-e)/2+e)}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileHeight,i=i.tilemapLayer,r=0;return i&&(void 0===e&&(e=i.scene.cameras.main),r=i.y+e.scrollY*(1-i.scrollFactorY),n*=i.scaleY),r+t*(n/2)}},function(t,e,i){var l=i(3);t.exports=function(t,e,i,n,r,s){n=n||new l;var o=s.baseTileWidth,a=s.baseTileHeight,h=s.tilemapLayer,r=(h&&(r=r||h.scene.cameras.main,e-=h.y+r.scrollY*(1-h.scrollFactorY),a*=h.scaleY,t-=h.x+r.scrollX*(1-h.scrollFactorX),o*=h.scaleX),s.hexSideLength),h=(a-r)/2+r,s=i?Math.floor(e/h):e/h,a=i?Math.floor((t-s%2*.5*o)/o):(t-s%2*.5*o)/o;return n.set(a,s)}},function(t,e,i){var h=i(3);t.exports=function(t,e,i,n,r,s){n=n||new h;var o=s.baseTileWidth,a=s.baseTileHeight,s=s.tilemapLayer,r=(s&&(r=r||s.scene.cameras.main,e-=s.y+r.scrollY*(1-s.scrollFactorY),a*=s.scaleY,t-=s.x+r.scrollX*(1-s.scrollFactorX),o*=s.scaleX),i?Math.floor((t/(o/2)+e/(a/2))/2):(t/(o/2)+e/(a/2))/2),s=i?Math.floor((e/(a/2)-t/(o/2))/2):(e/(a/2)-t/(o/2))/2;return n.set(r,s)}},function(t,e,i){var h=i(3);t.exports=function(t,e,i,n,r,s){n=n||new h;var o=s.baseTileWidth,a=s.baseTileHeight,s=s.tilemapLayer,r=(s&&(r=r||s.scene.cameras.main,e-=s.y+r.scrollY*(1-s.scrollFactorY),a*=s.scaleY,t-=s.x+r.scrollX*(1-s.scrollFactorX),o*=s.scaleX),i?Math.floor(e/(a/2)):e/(a/2)),s=i?Math.floor((t+r%2*.5*o)/o):(t+r%2*.5*o)/o;return n.set(s,r)}},function(t,e,i){var o=i(255),a=i(256),h=i(3);t.exports=function(t,e,i,n,r,s){return void 0===i&&(i=!0),(n=n||new h(0,0)).x=o(t,i,r,s),n.y=a(e,i,r,s),n}},function(t,e){t.exports=function(t,e,i,n){var r=n.baseTileHeight,s=n.tilemapLayer,i=(s&&(i=i||s.scene.cameras.main,t-=s.y+i.scrollY*(1-s.scrollFactorY),r*=s.scaleY),n.hexSideLength),s=(r-i)/2+i;return e?Math.floor(t/s):t/s}},function(t,e){t.exports=function(t,e,i,n){var r=n.baseTileHeight,n=n.tilemapLayer;return n&&(i=i||n.scene.cameras.main,t-=n.y+i.scrollY*(1-n.scrollFactorY),r*=n.scaleY),e?Math.floor(t/(r/2)):t/(r/2)}},function(t,e,i){var n=i(119);t.exports=function(t,e,i){return!!n(t,e,i)&&(null!==(i=i.data[e][t])&&-1<i.index)}},function(t,e,i){var o=i(85),a=i(119),h=i(252);t.exports=function(t,e,i,n,r){var s;return void 0===i&&(i=!0),void 0===n&&(n=!0),a(t,e,r)&&(s=r.data[e][t])?(r.data[e][t]=i?null:new o(r,-1,t,e,r.tileWidth,r.tileHeight),n&&s&&s.collides&&h(t,e,r),s):null}},function(t,e,i){var a=i(40),h=i(259),l=i(565),c=i(566),u=i(577);t.exports=function(t,e,i,n,r,s){var o;switch(e){case a.ARRAY_2D:o=h(t,i,n,r,s);break;case a.CSV:o=l(t,i,n,r,s);break;case a.TILED_JSON:o=c(t,i,s);break;case a.WELTMEISTER:o=u(t,i,s);break;default:o=null}return o}},function(t,e,i){var s=i(40),o=i(259);t.exports=function(t,e,i,n,r){e=e.trim().split("\n").map(function(t){return t.split(",")}),t=o(t,e,i,n,r);return t.format=s.CSV,t}},function(t,e,i){var n=i(567),r=i(568),s=i(29),o=i(40),a=i(258),h=i(121),l=i(569),c=i(570),u=i(573),d=i(575);t.exports=function(t,e,i){t=new h({width:e.width,height:e.height,name:t,tileWidth:e.tilewidth,tileHeight:e.tileheight,orientation:a(e.orientation),format:o.TILED_JSON,version:e.version,properties:e.properties,renderOrder:e.renderorder,infinite:e.infinite}),t.orientation===s.HEXAGONAL&&(t.hexSideLength=e.hexsidelength),t.layers=u(e,i),t.images=l(e),i=d(e);return t.tilesets=i.tilesets,t.imageCollections=i.imageCollections,t.objects=c(e),t.tiles=r(t),n(t),t}},function(t,e,i){var h=i(17);t.exports=function(t){for(var e,i,n=0;n<t.layers.length;n++)for(var r=t.layers[n],s=0;s<r.data.length;s++)for(var o=r.data[s],a=0;a<o.length;a++)null===(e=o[a])||e.index<0||(i=t.tiles[e.index][2],i=t.tilesets[i],e.width=i.tileWidth,e.height=i.tileHeight,i.tileProperties&&i.tileProperties[e.index-i.firstgid]&&(e.properties=h(e.properties,i.tileProperties[e.index-i.firstgid])))}},function(t,e,i){var f=i(122);t.exports=function(t){for(var e=[],i=0;i<t.imageCollections.length;i++)for(var n=t.imageCollections[i],r=n.images,s=0;s<r.length;s++){var o,a=r[s];(o=new f(a.image,a.gid,n.imageWidth,n.imageHeight,0,0)).updateTileData(n.imageWidth,n.imageHeight),t.tilesets.push(o)}for(i=0;i<t.tilesets.length;i++)for(var h=(o=t.tilesets[i]).tileMargin,l=o.tileMargin,c=0,u=0,d=0,p=o.firstgid;p<o.firstgid+o.total&&(e[p]=[h,l,i],h+=o.tileWidth+o.tileSpacing,++c!==o.total)&&(++u!==o.columns||(h=o.tileMargin,l+=o.tileHeight+o.tileSpacing,u=0,++d!==o.rows));p++);return e}},function(t,e,i){var a=i(2),h=i(161);t.exports=function(t){for(var e=[],i=[],n=h(t);n.i<n.layers.length||0<i.length;)if(n.i>=n.layers.length){if(i.length<1)break;n=i.pop()}else{var r,s,o=n.layers[n.i];n.i++,"imagelayer"===o.type?(s=a(o,"offsetx",0)+a(o,"startx",0),r=a(o,"offsety",0)+a(o,"starty",0),e.push({name:n.name+o.name,image:o.image,x:n.x+s+o.x,y:n.y+r+o.y,alpha:n.opacity*o.opacity,visible:n.visible&&o.visible,properties:a(o,"properties",{})})):"group"===o.type&&(s=h(t,o,n),i.push(n),n=s)}return e}},function(t,e,i){var u=i(2),d=i(260),p=i(572),f=i(161);t.exports=function(t){for(var e=[],i=[],n=f(t);n.i<n.layers.length||0<i.length;)if(n.i>=n.layers.length){if(i.length<1)break;n=i.pop()}else{var r=n.layers[n.i];if(n.i++,r.opacity*=n.opacity,r.visible=n.visible&&r.visible,"objectgroup"===r.type){r.name=n.name+r.name;for(var s=n.x+u(r,"startx",0)+u(r,"offsetx",0),o=n.y+u(r,"starty",0)+u(r,"offsety",0),a=[],h=0;h<r.objects.length;h++){var l=d(r.objects[h],s,o);a.push(l)}var c=new p(r);c.objects=a,e.push(c)}else"group"===r.type&&(c=f(t,r,n),i.push(n),n=c)}return e}},function(t,e,i){var s=i(126);t.exports=function(t,e){for(var i={},n=0;n<e.length;n++){var r=e[n];s(t,r)&&(i[r]=t[r])}return i}},function(t,e,i){var n=i(0),r=i(2),i=new n({initialize:function(t){this.name=r(t=void 0===t?{}:t,"name","object layer"),this.opacity=r(t,"opacity",1),this.properties=r(t,"properties",{}),this.propertyTypes=r(t,"propertytypes",{}),this.type=r(t,"type","objectgroup"),this.visible=r(t,"visible",!0),this.objects=r(t,"objects",[])}});t.exports=i},function(t,e,i){var C=i(574),O=i(29),R=i(161),L=i(258),D=i(2),I=i(120),B=i(261),F=i(85);t.exports=function(t,e){for(var i=D(t,"infinite",!1),n=[],r=[],s=R(t);s.i<s.layers.length||0<r.length;)if(s.i>=s.layers.length){if(r.length<1)break;s=r.pop()}else{var o,a=s.layers[s.i];if(s.i++,"tilelayer"===a.type){if(!a.compression){if(a.encoding&&"base64"===a.encoding){if(a.chunks)for(var h=0;h<a.chunks.length;h++)a.chunks[h].data=C(a.chunks[h].data);a.data&&(a.data=C(a.data)),delete a.encoding}var l,c,u=[],d=0;if(i){var p,f=D(a,"startx",0)+a.x,g=D(a,"starty",0)+a.y;(p=new I({name:s.name+a.name,x:s.x+D(a,"offsetx",0)+f*t.tilewidth,y:s.y+D(a,"offsety",0)+g*t.tileheight,width:a.width,height:a.height,tileWidth:t.tilewidth,tileHeight:t.tileheight,alpha:s.opacity*a.opacity,visible:s.visible&&a.visible,properties:D(a,"properties",[]),orientation:L(t.orientation)})).orientation===O.HEXAGONAL&&(p.hexSideLength=t.hexsidelength);for(var m=0;m<a.height;m++){u.push([null]);for(var y=0;y<a.width;y++)u[m][y]=null}for(m=0,k=a.chunks.length;m<k;m++)for(var v=a.chunks[m],x=v.x-f,b=v.y-g,w=0,T=0,S=v.data.length;T<S;T++){var P,_=d+x,E=w+b;0<(P=B(v.data[T])).gid?((l=new F(p,P.gid,_,E,t.tilewidth,t.tileheight)).rotation=P.rotation,l.flipX=P.flipped,u[E][_]=l):(c=e?null:new F(p,-1,_,E,t.tilewidth,t.tileheight),u[E][_]=c),++d===v.width&&(w++,d=0)}}else{(p=new I({name:s.name+a.name,x:s.x+D(a,"offsetx",0)+a.x,y:s.y+D(a,"offsety",0)+a.y,width:a.width,height:a.height,tileWidth:t.tilewidth,tileHeight:t.tileheight,alpha:s.opacity*a.opacity,visible:s.visible&&a.visible,properties:D(a,"properties",[]),orientation:L(t.orientation)})).orientation===O.HEXAGONAL&&(p.hexSideLength=t.hexsidelength);for(var A=[],M=0,k=a.data.length;M<k;M++)0<(P=B(a.data[M])).gid?((l=new F(p,P.gid,d,u.length,t.tilewidth,t.tileheight)).rotation=P.rotation,l.flipX=P.flipped,A.push(l)):(c=e?null:new F(p,-1,d,u.length,t.tilewidth,t.tileheight),A.push(c)),++d===a.width&&(u.push(A),d=0,A=[])}p.data=u,n.push(p)}}else"group"===a.type&&(o=R(t,a,s),r.push(s),s=o)}return n}},function(t,e){t.exports=function(t){for(var e=window.atob(t),i=e.length,n=new Array(i/4),r=0;r<i;r+=4)n[r/4]=(e.charCodeAt(r)|e.charCodeAt(r+1)<<8|e.charCodeAt(r+2)<<16|e.charCodeAt(r+3)<<24)>>>0;return n}},function(t,e,i){var b=i(122),w=i(576),T=i(260),S=i(1453);t.exports=function(t){for(var e,i=[],n=[],r=null,s=0;s<t.tilesets.length;s++){var o=t.tilesets[s];if(!o.source)if(o.image){var a=new b(o.name,o.firstgid,o.tilewidth,o.tileheight,o.margin,o.spacing);if(1<t.version){var h=void 0,l=void 0;if(Array.isArray(o.tiles))for(var h=h||{},l=l||{},c=0;c<o.tiles.length;c++){var u,d,p=o.tiles[c];p.properties&&(u={},p.properties.forEach(function(t){u[t.name]=t.value}),l[p.id]=u),p.objectgroup&&((h[p.id]||(h[p.id]={})).objectgroup=p.objectgroup,p.objectgroup.objects&&(d=p.objectgroup.objects.map(function(t){return T(t)}),h[p.id].objectgroup.objects=d)),p.animation&&((h[p.id]||(h[p.id]={})).animation=p.animation),p.type&&((h[p.id]||(h[p.id]={})).type=p.type)}Array.isArray(o.wangsets)&&(l=l||{},S(o.wangsets,h=h||{})),h&&(a.tileData=h,a.tileProperties=l)}else if(o.tileproperties&&(a.tileProperties=o.tileproperties),o.tiles)for(e in a.tileData=o.tiles,a.tileData){var f=a.tileData[e].objectgroup;f&&f.objects&&(f=f.objects.map(function(t){return T(t)}),a.tileData[e].objectgroup.objects=f)}a.updateTileData(o.imagewidth,o.imageheight),i.push(a)}else{for(var g=new w(o.name,o.firstgid,o.tilewidth,o.tileheight,o.margin,o.spacing,o.properties),m=0,c=0;c<o.tiles.length;c++){var y=(p=o.tiles[c]).image,v=parseInt(p.id,10),x=o.firstgid+v;g.addImage(x,y),m=Math.max(v,m)}g.maxId=m,n.push(g)}r&&(r.lastgid=o.firstgid-1),r=o}return{tilesets:i,imageCollections:n}}},function(t,e,i){i=new(i(0))({initialize:function(t,e,i,n,r,s,o){(void 0===i||i<=0)&&(i=32),(void 0===n||n<=0)&&(n=32),void 0===r&&(r=0),void 0===s&&(s=0),this.name=t,this.firstgid=0|e,this.imageWidth=0|i,this.imageHeight=0|n,this.imageMargin=0|r,this.imageSpacing=0|s,this.properties=o||{},this.images=[],this.total=0},containsImageIndex:function(t){return t>=this.firstgid&&t<this.firstgid+this.total},addImage:function(t,e){return this.images.push({gid:t,image:e}),this.total++,this}});t.exports=i},function(t,e,i){var o=i(40),a=i(121),h=i(578),l=i(579);t.exports=function(t,e,i){if(0===e.layer.length)return null;for(var n=0,r=0,s=0;s<e.layer.length;s++)e.layer[s].width>n&&(n=e.layer[s].width),e.layer[s].height>r&&(r=e.layer[s].height);t=new a({width:n,height:r,name:t,tileWidth:e.layer[0].tilesize,tileHeight:e.layer[0].tilesize,format:o.WELTMEISTER});return t.layers=h(e,i),t.tilesets=l(e),t}},function(t,e,i){var u=i(120),d=i(85);t.exports=function(t,e){for(var i=[],n=0;n<t.layer.length;n++){for(var r=t.layer[n],s=new u({name:r.name,width:r.width,height:r.height,tileWidth:r.tilesize,tileHeight:r.tilesize,visible:1===r.visible}),o=[],a=[],h=0;h<r.data.length;h++){for(var l=0;l<r.data[h].length;l++){var c=r.data[h][l]-1,c=-1<c?new d(s,c,l,h,r.tilesize,r.tilesize):e?null:new d(s,-1,l,h,r.tilesize,r.tilesize);o.push(c)}a.push(o),o=[]}s.data=a,i.push(s)}return i}},function(t,e,i){var o=i(122);t.exports=function(t){for(var e=[],i=[],n=0;n<t.layer.length;n++){var r=t.layer[n],s=r.tilesetName;""!==s&&-1===i.indexOf(s)&&(i.push(s),e.push(new o(s,0,r.tilesize,r.tilesize,0,0)))}return e}},function(t,e,i){var n=i(0),T=i(36),h=i(40),S=i(2),d=i(120),r=i(29),P=i(362),s=i(74),_=i(73),p=i(85),l=i(251),f=i(581),c=i(122),i=new n({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.tilesets=e.tilesets,this.objects=e.objects,this.currentLayerIndex=0,this.hexSideLength=e.hexSideLength;t=this.orientation;this._convert={WorldToTileXY:l.GetWorldToTileXYFunction(t),WorldToTileX:l.GetWorldToTileXFunction(t),WorldToTileY:l.GetWorldToTileYFunction(t),TileToWorldXY:l.GetTileToWorldXYFunction(t),TileToWorldX:l.GetTileToWorldXFunction(t),TileToWorldY:l.GetTileToWorldYFunction(t)}},createBlankDynamicLayer:function(t,e,i,n,r,s,o,a){return this.createBlankLayer(t,e,i,n,r,s,o,a)},createDynamicLayer:function(t,e,i,n){return this.createLayer(t,e,i,n)},createStaticLayer:function(t,e,i,n){return this.createLayer(t,e,i,n)},setRenderOrder:function(t){var e=["right-down","left-down","right-up","left-up"];return"number"==typeof t&&(t=e[t]),-1<e.indexOf(t)&&(this.renderOrder=t),this},addTilesetImage:function(t,e,i,n,r,s,o){var a;return void 0===t||!this.scene.sys.textures.exists(e=null==e?t:e)||(e=this.scene.sys.textures.get(e),null===(a=this.getTilesetIndex(t))&&this.format===h.TILED_JSON)?null:((a=this.tilesets[a])?(a.setTileSize(i,n),a.setSpacing(r,s),a.setImage(e)):(void 0===i&&(i=this.tileWidth),void 0===n&&(n=this.tileHeight),(a=new c(t,o=void 0===o?0:o,i,n,r=void 0===r?0:r,s=void 0===s?0:s)).setImage(e),this.tilesets.push(a)),a)},copy:function(t,e,i,n,r,s,o,a){return null!==(a=this.getLayer(a))?(l.Copy(t,e,i,n,r,s,o,a),this):null},createBlankLayer:function(t,e,i,n,r,s,o,a){if(void 0===i&&(i=0),void 0===n&&(n=0),void 0===r&&(r=this.width),void 0===s&&(s=this.height),void 0===o&&(o=this.tileWidth),void 0===a&&(a=this.tileHeight),null!==this.getLayerIndex(t))return null;for(var h=new d({name:t,tileWidth:o,tileHeight:a,width:r,height:s,orientation:this.orientation}),l=0;l<s;l++){for(var c=[],u=0;u<r;u++)c.push(new p(h,-1,u,l,o,a,this.tileWidth,this.tileHeight));h.data.push(c)}this.layers.push(h),this.currentLayerIndex=this.layers.length-1;t=new f(this.scene,this,this.currentLayerIndex,e,i,n);return t.setRenderOrder(this.renderOrder),this.scene.sys.displayList.add(t),t},createLayer:function(t,e,i,n){t=this.getLayerIndex(t);if(null===t)return null;var r=this.layers[t];if(r.tilemapLayer)return null;this.currentLayerIndex=t,void 0===i&&(i=r.x),void 0===n&&(n=r.y);r=new f(this.scene,this,t,e,i,n);return r.setRenderOrder(this.renderOrder),this.scene.sys.displayList.add(r),r},createFromObjects:function(t,e){var i=[],t=this.getObjectLayer(t);if(t){Array.isArray(e)||(e=[e]);for(var n=t.objects,r=0;r<e.length;r++){for(var s=e[r],o=S(s,"id",null),a=S(s,"gid",null),h=S(s,"name",null),l=[],c=0;c<n.length;c++)y=n[c],(null===o&&null===a&&null===h||null!==o&&y.id===o||null!==a&&y.gid===a||null!==h&&y.name===h)&&l.push(y);for(var u=S(s,"classType",_),d=S(s,"scene",this.scene),p=S(s,"container",null),f=S(s,"key",null),g=S(s,"frame",null),m=0;m<l.length;m++){var y=l[m],v=new u(d);v.setName(y.name),v.setPosition(y.x,y.y),v.setTexture(f,g),y.width&&(v.displayWidth=y.width),y.height&&(v.displayHeight=y.height);var x,b={x:v.originX*y.width,y:(v.originY-1)*y.height};if(y.rotation&&(x=T(y.rotation),P(b,x),v.rotation=x),v.x+=b.x,v.y+=b.y,void 0===y.flippedHorizontal&&void 0===y.flippedVertical||v.setFlip(y.flippedHorizontal,y.flippedVertical),y.visible||(v.visible=!1),Array.isArray(y.properties))y.properties.forEach(function(t){var e=t.name;void 0!==v[e]?v[e]=t.value:v.setData(e,t.value)});else for(var w in y.properties)void 0!==v[w]?v[w]=y.properties[w]:v.setData(w,y.properties[w]);p?p.add(v):d.add.existing(v),i.push(v)}}}return i},createFromTiles:function(t,e,i,n,r,s){return null===(s=this.getLayer(s))?null:l.CreateFromTiles(t,e,i,n,r,s)},fill:function(t,e,i,n,r,s,o){return void 0===s&&(s=!0),null===(o=this.getLayer(o))?null:(l.Fill(t,e,i,n,r,s,o),this)},filterObjects:function(t,e,i){if("string"==typeof t)if(!(t=this.getObjectLayer(t)))return null;return t.objects.filter(e,i)},filterTiles:function(t,e,i,n,r,s,o,a){return null===(a=this.getLayer(a))?null:l.FilterTiles(t,e,i,n,r,s,o,a)},findByIndex:function(t,e,i,n){return null===(n=this.getLayer(n))?null:l.FindByIndex(t,e,i,n)},findObject:function(t,e,i){if("string"==typeof t)if(!(t=this.getObjectLayer(t)))return null;return t.objects.find(e,i)||null},findTile:function(t,e,i,n,r,s,o,a){return null===(a=this.getLayer(a))?null:l.FindTile(t,e,i,n,r,s,o,a)},forEachTile:function(t,e,i,n,r,s,o,a){return null===(a=this.getLayer(a))?null:(l.ForEachTile(t,e,i,n,r,s,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){t=this.getLayerIndex(t);return null!==t?this.layers[t]:null},getObjectLayer:function(t){t=this.getIndex(this.objects,t);return null!==t?this.objects[t]: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 f?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:l.GetTileAt(t,e,i,n)},getTileAtWorldXY:function(t,e,i,n,r){return null===(r=this.getLayer(r))?null:l.GetTileAtWorldXY(t,e,i,n,r)},getTileLayerNames:function(){return this.layers&&Array.isArray(this.layers)?this.layers.map(function(t){return t.name}):[]},getTilesWithin:function(t,e,i,n,r,s){return null===(s=this.getLayer(s))?null:l.GetTilesWithin(t,e,i,n,r,s)},getTilesWithinShape:function(t,e,i,n){return null===(n=this.getLayer(n))?null:l.GetTilesWithinShape(t,e,i,n)},getTilesWithinWorldXY:function(t,e,i,n,r,s,o){return null===(o=this.getLayer(o))?null:l.GetTilesWithinWorldXY(t,e,i,n,r,s,o)},getTileset:function(t){t=this.getIndex(this.tilesets,t);return null!==t?this.tilesets[t]:null},getTilesetIndex:function(t){return this.getIndex(this.tilesets,t)},hasTileAt:function(t,e,i){return null===(i=this.getLayer(i))?null:l.HasTileAt(t,e,i)},hasTileAtWorldXY:function(t,e,i,n){return null===(n=this.getLayer(n))?null:l.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,r){return void 0===n&&(n=!0),null===(r=this.getLayer(r))?null:l.PutTileAt(t,e,i,n,r)},putTileAtWorldXY:function(t,e,i,n,r,s){return void 0===n&&(n=!0),null===(s=this.getLayer(s))?null:l.PutTileAtWorldXY(t,e,i,n,r,s)},putTilesAt:function(t,e,i,n,r){return void 0===n&&(n=!0),null===(r=this.getLayer(r))?null:(l.PutTilesAt(t,e,i,n,r),this)},randomize:function(t,e,i,n,r,s){return null===(s=this.getLayer(s))?null:(l.Randomize(t,e,i,n,r,s),this)},calculateFacesAt:function(t,e,i){return null===(i=this.getLayer(i))?null:(l.CalculateFacesAt(t,e,i),this)},calculateFacesWithin:function(t,e,i,n,r){return null===(r=this.getLayer(r))?null:(l.CalculateFacesWithin(t,e,i,n,r),this)},removeLayer:function(t){t=this.getLayerIndex(t);if(null===t)return null;s(this.layers,t);for(var e=t;e<this.layers.length;e++)this.layers[e].tilemapLayer&&this.layers[e].tilemapLayer.layerIndex--;return this.currentLayerIndex===t&&(this.currentLayerIndex=0),this},destroyLayer:function(t){var e=this.getLayerIndex(t);return null!==e?((t=this.layers[e]).destroy(),s(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 r=0;r<t.length;r++){var s=t[r];n.push(this.removeTileAt(s.x,s.y,!0,i,s.tilemapLayer)),-1<e&&this.putTileAt(e,s.x,s.y,i,s.tilemapLayer)}return n},removeTileAt:function(t,e,i,n,r){return void 0===i&&(i=!0),void 0===n&&(n=!0),null===(r=this.getLayer(r))?null:l.RemoveTileAt(t,e,i,n,r)},removeTileAtWorldXY:function(t,e,i,n,r,s){return void 0===i&&(i=!0),void 0===n&&(n=!0),null===(s=this.getLayer(s))?null:l.RemoveTileAtWorldXY(t,e,i,n,r,s)},renderDebug:function(t,e,i){return null===(i=this.getLayer(i))?null:(this.orientation===r.ORTHOGONAL&&l.RenderDebug(t,e,i),this)},renderDebugFull:function(t,e){for(var i=this.layers,n=0;n<i.length;n++)l.RenderDebug(t,e,i[n]);return this},replaceByIndex:function(t,e,i,n,r,s,o){return null===(o=this.getLayer(o))?null:(l.ReplaceByIndex(t,e,i,n,r,s,o),this)},setCollision:function(t,e,i,n,r){return void 0===e&&(e=!0),void 0===i&&(i=!0),void 0===r&&(r=!0),null===(n=this.getLayer(n))?null:(l.SetCollision(t,e,i,n,r),this)},setCollisionBetween:function(t,e,i,n,r){return void 0===i&&(i=!0),void 0===n&&(n=!0),null===(r=this.getLayer(r))?null:(l.SetCollisionBetween(t,e,i,n,r),this)},setCollisionByProperty:function(t,e,i,n){return void 0===e&&(e=!0),void 0===i&&(i=!0),null===(n=this.getLayer(n))?null:(l.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:(l.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:(l.SetCollisionFromCollisionGroup(t,e,i),this)},setTileIndexCallback:function(t,e,i,n){return null===(n=this.getLayer(n))?null:(l.SetTileIndexCallback(t,e,i,n),this)},setTileLocationCallback:function(t,e,i,n,r,s,o){return null===(o=this.getLayer(o))?null:(l.SetTileLocationCallback(t,e,i,n,r,s,o),this)},setLayer:function(t){t=this.getLayerIndex(t);return null!==t&&(this.currentLayerIndex=t),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,r=this.layers[i].width,s=this.layers[i].height,o=0;o<s;o++)for(var a=0;a<r;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))){i.tileWidth=t,i.tileHeight=e;for(var n=i.data,r=i.width,s=i.height,o=0;o<s;o++)for(var a=0;a<r;a++){var h=n[o][a];null!==h&&h.setSize(t,e)}}return this},shuffle:function(t,e,i,n,r){return null===(r=this.getLayer(r))?null:(l.Shuffle(t,e,i,n,r),this)},swapByIndex:function(t,e,i,n,r,s,o){return null===(o=this.getLayer(o))?null:(l.SwapByIndex(t,e,i,n,r,s,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,r){return null===(r=this.getLayer(r))?null:this._convert.TileToWorldXY(t,e,i,n,r)},weightedRandomize:function(t,e,i,n,r,s){return null===(s=this.getLayer(s))?null:(l.WeightedRandomize(e,i,n,r,t,s),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,r,s){return null===(s=this.getLayer(s))?null:this._convert.WorldToTileXY(t,e,i,n,r,s)},destroy:function(){this.removeAllLayers(),this.tilesets.length=0,this.objects.length=0,this.scene=null}});t.exports=i},function(t,e,i){var n=i(0),r=i(11),o=i(15),a=i(251),i=i(1456),n=new n({Extends:o,Mixins:[r.Alpha,r.BlendMode,r.ComputedSize,r.Depth,r.Flip,r.GetBounds,r.Origin,r.Pipeline,r.Transform,r.Visible,r.ScrollFactor,i],initialize:function(t,e,i,n,r,s){o.call(this,t,"TilemapLayer"),this.isTilemap=!0,this.tilemap=e,this.layerIndex=i,this.layer=e.layers[i],(this.layer.tilemapLayer=this).tileset=[],this.tilesDrawn=0,this.tilesTotal=this.layer.width*this.layer.height,this.culledTiles=[],this.skipCull=!1,this.cullPaddingX=1,this.cullPaddingY=1,this.cullCallback=a.GetCullTilesFunction(this.layer.orientation),this._renderOrder=0,this.gidMap=[],this.setTilesets(n),this.setAlpha(this.layer.alpha),this.setPosition(r,s),this.setOrigin(),this.setSize(e.tileWidth*this.layer.width,e.tileHeight*this.layer.height),this.initPipeline()},setTilesets:function(t){var e=[],i=[],n=this.tilemap;Array.isArray(t)||(t=[t]);for(var r=0;r<t.length;r++){var s=t[r];if(s="string"==typeof s?n.getTileset(s):s){i.push(s);for(var o=s.firstgid,a=0;a<s.total;a++)e[o+a]=s}}this.gidMap=e,this.tileset=i},setRenderOrder:function(t){return 0<=(t="string"==typeof t?["right-down","left-down","right-up","left-up"].indexOf(t):t)&&t<4&&(this._renderOrder=t),this},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,r){return a.CreateFromTiles(t,e,i,n,r,this.layer)},cull:function(t){return this.cullCallback(this.layer,t,this.culledTiles,this._renderOrder)},copy:function(t,e,i,n,r,s,o){return a.Copy(t,e,i,n,r,s,o,this.layer),this},fill:function(t,e,i,n,r,s){return a.Fill(t,e,i,n,r,s,this.layer),this},filterTiles:function(t,e,i,n,r,s,o){return a.FilterTiles(t,e,i,n,r,s,o,this.layer)},findByIndex:function(t,e,i){return a.FindByIndex(t,e,i,this.layer)},findTile:function(t,e,i,n,r,s,o){return a.FindTile(t,e,i,n,r,s,o,this.layer)},forEachTile:function(t,e,i,n,r,s,o){return a.ForEachTile(t,e,i,n,r,s,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)},getTilesWithin:function(t,e,i,n,r){return a.GetTilesWithin(t,e,i,n,r,this.layer)},getTilesWithinShape:function(t,e,i){return a.GetTilesWithinShape(t,e,i,this.layer)},getTilesWithinWorldXY:function(t,e,i,n,r,s){return a.GetTilesWithinWorldXY(t,e,i,n,r,s,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,r){return a.PutTileAtWorldXY(t,e,i,n,r,this.layer)},putTilesAt:function(t,e,i,n){return a.PutTilesAt(t,e,i,n,this.layer),this},randomize:function(t,e,i,n,r){return a.Randomize(t,e,i,n,r,this.layer),this},removeTileAt:function(t,e,i,n){return a.RemoveTileAt(t,e,i,n,this.layer)},removeTileAtWorldXY:function(t,e,i,n,r){return a.RemoveTileAtWorldXY(t,e,i,n,r,this.layer)},renderDebug:function(t,e){return a.RenderDebug(t,e,this.layer),this},replaceByIndex:function(t,e,i,n,r,s){return a.ReplaceByIndex(t,e,i,n,r,s,this.layer),this},setSkipCull:function(t){return this.skipCull=t=void 0===t?!0:t,this},setCullPadding:function(t,e){return void 0===e&&(e=1),this.cullPaddingX=t=void 0===t?1:t,this.cullPaddingY=e,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,r,s){return a.SetTileLocationCallback(t,e,i,n,r,s,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,r,s){return a.SwapByIndex(t,e,i,n,r,s,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)},tileToWorldXY:function(t,e,i,n){return this.tilemap.tileToWorldXY(t,e,i,n,this)},weightedRandomize:function(t,e,i,n,r){return a.WeightedRandomize(e,i,n,r,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,r){return this.tilemap.worldToTileXY(t,e,i,n,r,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.culledTiles.length=0,this.cullCallback=null,this.gidMap=[],this.tileset=[],o.prototype.destroy.call(this))}});t.exports=n},function(t,e,i){var n=i(0),r=i(2),i=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){return this.delay=r(t,"delay",0),this.repeat=r(t,"repeat",0),this.loop=r(t,"loop",!1),this.callback=r(t,"callback",void 0),this.callbackScope=r(t,"callbackScope",this.callback),this.args=r(t,"args",[]),this.timeScale=r(t,"timeScale",1),this.startAt=r(t,"startAt",0),this.paused=r(t,"paused",!1),this.elapsed=this.startAt,this.hasDispatched=!1,this.repeatCount=-1===this.repeat||this.loop?999999999999:this.repeat,this},getProgress:function(){return this.elapsed/this.delay},getOverallProgress:function(){var t;return 0<this.repeat?(t=this.delay+this.delay*this.repeat,(this.elapsed+this.delay*(this.repeat-this.repeatCount))/t):this.getProgress()},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=[]}});t.exports=i},function(t,e,i){var n=i(1465);t.exports=function(t){var e,i=[];if(t.hasOwnProperty("props"))for(e in t.props)"_"!==e.substr(0,1)&&i.push({key:e,value:t.props[e]});else for(e in t)-1===n.indexOf(e)&&"_"!==e.substr(0,1)&&i.push({key:e,value:t[e]});return i}},function(t,e,i){var n=i(6);t.exports=function(t){t=n(t,"tweens",null);return null===t?[]:("function"==typeof t&&(t=t.call()),t=Array.isArray(t)?t:[t])}},function(t,e,i){var S=i(265),P=i(13),_=i(99),E=i(80),A=i(162),M=i(6),k=i(264),C=i(266),O=i(268);t.exports=function(t,e,i){void 0===i&&(i=S);var n=M(e,"from",0),r=M(e,"to",1),s=[{value:n}],o=A(e,"delay",i.delay),a=A(e,"duration",i.duration),h=M(e,"easeParams",i.easeParams),h=E(M(e,"ease",i.ease),h),l=A(e,"hold",i.hold),c=A(e,"repeat",i.repeat),u=A(e,"repeatDelay",i.repeatDelay),i=_(e,"yoyo",i.yoyo),d=[],p=k("value",r),p=O(s[0],0,"value",p.getEnd,p.getStart,p.getActive,h,o,a,i,l,c,u,!1,!1),f=(p.start=n,p.current=n,p.to=r,d.push(p),new C(t,d,s));f.offset=P(e,"offset",null),f.completeDelay=P(e,"completeDelay",0),f.loop=Math.round(P(e,"loop",0)),f.loopDelay=Math.round(P(e,"loopDelay",0)),f.paused=_(e,"paused",!1),f.useFrames=_(e,"useFrames",!1);for(var g=M(e,"callbackScope",f),m=[f,null],y=C.TYPES,v=0;v<y.length;v++){var x,b,w=y[v],T=M(e,w,!1);T&&(x=M(e,w+"Scope",g),b=M(e,w+"Params",[]),f.setCallback(w,T,m.concat(b),x))}return f}},function(t,e,i){var _=i(80),E=i(6),A=i(14);t.exports=function(t,e){var o=E(e=void 0===e?{}:e,"start",0),i=E(e,"ease",null),n=E(e,"grid",null),a=E(e,"from",0),h="first"===a,l="center"===a,c="last"===a,u="number"==typeof a,d=Array.isArray(t),p=d?parseFloat(t[0]):parseFloat(t),f=d?parseFloat(t[1]):0,g=Math.max(p,f);if(d&&(o+=p),n){var m=n[0],y=n[1],r=0,s=0,v=[];c?(r=m-1,s=y-1):u?(r=a%m,s=Math.floor(a/m)):l&&(r=(m-1)/2,s=(y-1)/2);for(var x=A.MIN_SAFE_INTEGER,b=0;b<y;b++){v[b]=[];for(var w=0;w<m;w++){var T=r-w,S=s-b,T=Math.sqrt(T*T+S*S);x<T&&(x=T),v[b][w]=T}}}var P=i?_(i):null;return n?function(t,e,i,n){var r=0,s=n%m,n=Math.floor(n/m);return 0<=s&&s<m&&0<=n&&n<y&&(r=v[n][s]),(d?(n=f-p,P?r/x*n*P(r/x):r/x*n):P?r*p*P(r/x):r*p)+o}:function(t,e,i,n,r){var s;return r--,h?s=n:l?s=Math.abs(r/2-n):c?s=r-n:u&&(s=Math.abs(a-n)),(d?(n=l?(f-p)/r*(2*s):(f-p)/r*s,P?n*P(s/r):n):P?r*g*P(s/r):s*p)+o}}},function(t,e,i){var c=i(77),u=i(265),d=i(13),p=i(99),f=i(80),g=i(162),m=i(263),y=i(584),v=i(6),x=i(588),b=i(163);t.exports=function(t,e){var i=new x(t);i.completeDelay=d(e,"completeDelay",0),i.loop=Math.round(d(e,"loop",0)),i.loopDelay=Math.round(d(e,"loopDelay",0)),i.paused=p(e,"paused",!1),i.useFrames=p(e,"useFrames",!1);var t=v(e,"callbackScope",i),n=[i],r=v(e,"onStart",!1);r&&(s=v(e,"onStartScope",t),o=v(e,"onStartParams",[]),i.setCallback("onStart",r,n.concat(o),s));r=v(e,"onUpdate",!1);r&&(o=v(e,"onUpdateScope",t),s=v(e,"onUpdateParams",[]),i.setCallback("onUpdate",r,n.concat(s),o));r=v(e,"onLoop",!1);r&&(s=v(e,"onLoopScope",t),o=v(e,"onLoopParams",[]),i.setCallback("onLoop",r,n.concat(o),s));r=v(e,"onYoyo",!1);r&&(o=v(e,"onYoyoScope",t),s=v(e,"onYoyoParams",[]),i.setCallback("onYoyo",r,n.concat(null,s),o));var s,o,r=v(e,"onComplete",!1),a=(r&&(s=v(e,"onCompleteScope",t),o=v(e,"onCompleteParams",[]),i.setCallback("onComplete",r,n.concat(o),s)),y(e));if(0===a.length)i.paused=!0;else{var h=c(u),t=(h.targets=m(e),d(e,"totalDuration",0));h.duration=0<t?Math.floor(t/a.length):g(e,"duration",h.duration),h.delay=g(e,"delay",h.delay),h.easeParams=v(e,"easeParams",h.easeParams),h.ease=f(v(e,"ease",h.ease),h.easeParams),h.hold=g(e,"hold",h.hold),h.repeat=g(e,"repeat",h.repeat),h.repeatDelay=g(e,"repeatDelay",h.repeatDelay),h.yoyo=p(e,"yoyo",h.yoyo),h.flipX=p(e,"flipX",h.flipX),h.flipY=p(e,"flipY",h.flipY);for(var l=0;l<a.length;l++)i.queue(b(i,a[l],h))}return i}},function(t,e,i){var n=i(0),r=i(9),s=i(267),o=i(163),a=i(100),h=new n({Extends:r,initialize:function(t){r.call(this),this.manager=t,this.isTimeline=!0,this.data=[],this.totalData=0,this.useFrames=!1,this.timeScale=1,this.loop=0,this.loopDelay=0,this.loopCounter=0,this.completeDelay=0,this.countdown=0,this.state=a.PENDING_ADD,this._pausedState=a.PENDING_ADD,this.paused=!1,this.elapsed=0,this.totalElapsed=0,this.duration=0,this.progress=0,this.totalDuration=0,this.totalProgress=0,this.callbacks={onComplete:null,onLoop:null,onStart:null,onUpdate:null,onYoyo:null},this.callbackScope},dispatchTimelineEvent:function(t,e){this.emit(t,this),e&&e.func.apply(e.scope,e.params)},setTimeScale:function(t){return this.timeScale=t,this},getTimeScale:function(){return this.timeScale},isPlaying:function(){return this.state===a.ACTIVE},add:function(t){return this.queue(o(this,t))},queue:function(t){return this.isPlaying()||(t.parent=this,t.parentIsTimeline=!0,this.data.push(t),this.totalData=this.data.length),this},hasOffset:function(t){return null!==t.offset},isOffsetAbsolute:function(t){return"number"==typeof t},isOffsetRelative:function(t){if("string"==typeof t){t=t[0];if("-"===t||"+"===t)return!0}return!1},getRelativeOffset:function(t,e){var i=t[0],n=parseFloat(t.substr(2)),r=e;switch(i){case"+":r+=n;break;case"-":r-=n}return Math.max(0,r)},calcDuration:function(){for(var t=0,e=0,i=0,n=0;n<this.totalData;n++){var r=this.data[n];r.init(),this.hasOffset(r)?this.isOffsetAbsolute(r.offset)?(r.calculatedOffset=r.offset,0===r.offset&&(i=0)):this.isOffsetRelative(r.offset)&&(r.calculatedOffset=this.getRelativeOffset(r.offset,t)):r.calculatedOffset=i,t=r.totalDuration+r.calculatedOffset,e+=r.totalDuration,i+=r.totalDuration}this.duration=e,this.loopCounter=-1===this.loop?999999999999:this.loop,0<this.loopCounter?this.totalDuration=this.duration+this.completeDelay+(this.duration+this.loopDelay)*this.loopCounter:this.totalDuration=this.duration+this.completeDelay},init:function(){return this.calcDuration(),this.progress=0,this.totalProgress=0,!this.paused||(this.state=a.PAUSED,!1)},resetTweens:function(t){for(var e=0;e<this.totalData;e++)this.data[e].play(t)},setCallback:function(t,e,i,n){return-1!==h.TYPES.indexOf(t)&&(this.callbacks[t]={func:e,scope:n,params:i}),this},makeActive:function(t){return this.manager.makeActive(t)},play:function(){this.state!==a.ACTIVE&&(this.paused?(this.paused=!1,this.manager.makeActive(this)):(this.resetTweens(!1),this.state=a.ACTIVE,this.dispatchTimelineEvent(s.TIMELINE_START,this.callbacks.onStart)))},nextState:function(){0<this.loopCounter?(this.elapsed=0,this.progress=0,this.loopCounter--,this.resetTweens(!0),0<this.loopDelay?(this.countdown=this.loopDelay,this.state=a.LOOP_DELAY):(this.state=a.ACTIVE,this.dispatchTimelineEvent(s.TIMELINE_LOOP,this.callbacks.onLoop))):0<this.completeDelay?(this.state=a.COMPLETE_DELAY,this.countdown=this.completeDelay):(this.state=a.PENDING_REMOVE,this.dispatchTimelineEvent(s.TIMELINE_COMPLETE,this.callbacks.onComplete))},update:function(t,e){if(this.state!==a.PAUSED){switch(this.useFrames&&(e=+this.manager.timeScale),e*=this.timeScale,this.elapsed+=e,this.progress=Math.min(this.elapsed/this.duration,1),this.totalElapsed+=e,this.totalProgress=Math.min(this.totalElapsed/this.totalDuration,1),this.state){case a.ACTIVE:for(var i=this.totalData,n=0;n<this.totalData;n++)this.data[n].update(t,e)&&i--;this.dispatchTimelineEvent(s.TIMELINE_UPDATE,this.callbacks.onUpdate),0===i&&this.nextState();break;case a.LOOP_DELAY:this.countdown-=e,this.countdown<=0&&(this.state=a.ACTIVE,this.dispatchTimelineEvent(s.TIMELINE_LOOP,this.callbacks.onLoop));break;case a.COMPLETE_DELAY:this.countdown-=e,this.countdown<=0&&(this.state=a.PENDING_REMOVE,this.dispatchTimelineEvent(s.TIMELINE_COMPLETE,this.callbacks.onComplete))}return this.state===a.PENDING_REMOVE}},stop:function(){this.state=a.PENDING_REMOVE},pause:function(){if(this.state!==a.PAUSED)return this.paused=!0,this._pausedState=this.state,this.state=a.PAUSED,this.emit(s.TIMELINE_PAUSE,this),this},resume:function(){return this.state===a.PAUSED&&(this.paused=!1,this.state=this._pausedState,this.emit(s.TIMELINE_RESUME,this)),this},hasTarget:function(t){for(var e=0;e<this.data.length;e++)if(this.data[e].hasTarget(t))return!0;return!1},destroy:function(){for(var t=0;t<this.data.length;t++)this.data[t].stop()}});h.TYPES=["onStart","onUpdate","onLoop","onComplete","onYoyo"],t.exports=h},function(t,e,i){var s=i(86),l=i(41),c=i(32),u=i(2),r=i(64);t.exports={parseBody:function(t,e,i,n){void 0===n&&(n={});for(var r=u(i,"fixtures",[]),s=[],o=0;o<r.length;o++)for(var a=this.parseFixture(r[o]),h=0;h<a.length;h++)s.push(a[h]);i=c.clone(i,!0),c.extend(i,n,!0),delete i.fixtures,delete i.type,n=l.create(i);return l.setParts(n,s),l.setPosition(n,{x:t,y:e}),n},parseFixture:function(t){var e,i,n,r=c.extend({},!1,t);return delete r.circle,delete r.vertices,t.circle?(n=u(t.circle,"x"),e=u(t.circle,"y"),i=u(t.circle,"radius"),n=[s.circle(n,e,i,r)]):t.vertices&&(n=this.parseVertices(t.vertices,r)),n},parseVertices:function(t,e){void 0===e&&(e={});for(var i=[],n=0;n<t.length;n++)r.clockwiseSort(t[n]),i.push(l.create(c.extend({position:r.centre(t[n]),vertices:t[n]},e)));return s.flagCoincidentParts(i)}}},function(t,e,i){var l=i(86),c=i(41);t.exports={parseBody:function(t,e,i,n){void 0===n&&(n={});var r,s=i.vertices;if(1===s.length)n.vertices=s[0],r=c.create(n),l.flagCoincidentParts(r.parts);else{for(var o=[],a=0;a<s.length;a++){var h=c.create({vertices:s[a]});o.push(h)}l.flagCoincidentParts(o),n.parts=o,r=c.create(n)}return r.label=i.label,c.setPosition(r,{x:t,y:e}),r}}},function(t,e,i){var p={},v=(t.exports=p,i(118)),f=i(128),g=i(32),x=i(41),c=i(86);p.stack=function(t,e,i,n,r,s,o){for(var a,h=v.create({label:"Stack"}),l=t,c=e,u=0,d=0;d<n;d++){for(var p=0,f=0;f<i;f++){var g,m,y=o(l,c,f,d,a,u);y?(g=y.bounds.max.y-y.bounds.min.y,m=y.bounds.max.x-y.bounds.min.x,p<g&&(p=g),x.translate(y,{x:.5*m,y:.5*g}),l=y.bounds.max.x+r,v.addBody(h,y),a=y,u+=1):l+=r}c+=p+s,l=t}return h},p.chain=function(t,e,i,n,r,s){for(var o=t.bodies,a=1;a<o.length;a++){var h=o[a-1],l=o[a],c=h.bounds.max.y-h.bounds.min.y,u=h.bounds.max.x-h.bounds.min.x,d=l.bounds.max.y-l.bounds.min.y,h={bodyA:h,pointA:{x:u*e,y:c*i},bodyB:l,pointB:{x:(l.bounds.max.x-l.bounds.min.x)*n,y:d*r}},u=g.extend(h,s);v.addConstraint(t,f.create(u))}return t.label+=" Chain",t},p.mesh=function(t,e,i,n,r){for(var s,o,a,h,l=t.bodies,c=0;c<i;c++){for(s=1;s<e;s++)o=l[s-1+c*e],a=l[s+c*e],v.addConstraint(t,f.create(g.extend({bodyA:o,bodyB:a},r)));if(0<c)for(s=0;s<e;s++)o=l[s+(c-1)*e],a=l[s+c*e],v.addConstraint(t,f.create(g.extend({bodyA:o,bodyB:a},r))),n&&0<s&&(h=l[s-1+(c-1)*e],v.addConstraint(t,f.create(g.extend({bodyA:h,bodyB:a},r)))),n&&s<e-1&&(h=l[s+1+(c-1)*e],v.addConstraint(t,f.create(g.extend({bodyA:h,bodyB:a},r))))}return t.label+=" Mesh",t},p.pyramid=function(h,t,l,c,u,e,d){return p.stack(h,t,l,c,u,e,function(t,e,i,n,r,s){var o=Math.min(c,Math.ceil(l/2)),a=r?r.bounds.max.x-r.bounds.min.x:0;if(!(o<n||i<(n=o-n)||l-1-n<i))return 1===s&&x.translate(r,{x:(i+(l%2==1?1:-1))*a,y:0}),d(h+(r?i*a:0)+i*u,e,i,n,r,s)})},p.newtonsCradle=function(t,e,i,n,r){for(var s=v.create({label:"Newtons Cradle"}),o=0;o<i;o++){var a=c.circle(t+o*(1.9*n),e+r,n,{inertia:1/0,restitution:1,friction:0,frictionAir:1e-4,slop:1}),h=f.create({pointA:{x:t+o*(1.9*n),y:e},bodyB:a});v.addBody(s,a),v.addConstraint(s,h)}return s},p.car=function(t,e,i,n,r){var s=x.nextGroup(!0),o=.5*-i+20,a=.5*i-20,h=v.create({label:"Car"}),i=c.rectangle(t,e,i,n,{collisionFilter:{group:s},chamfer:{radius:.5*n},density:2e-4}),n=c.circle(t+o,e+0,r,{collisionFilter:{group:s},friction:.8}),t=c.circle(t+a,e+0,r,{collisionFilter:{group:s},friction:.8}),e=f.create({bodyB:i,pointB:{x:o,y:0},bodyA:n,stiffness:1,length:0}),r=f.create({bodyB:i,pointB:{x:a,y:0},bodyA:t,stiffness:1,length:0});return v.addBody(h,i),v.addBody(h,n),v.addBody(h,t),v.addConstraint(h,e),v.addConstraint(h,r),h},p.softBody=function(t,e,i,n,r,s,o,a,h,l){h=g.extend({inertia:1/0},h),l=g.extend({stiffness:.2,render:{type:"line",anchors:!1}},l);t=p.stack(t,e,i,n,r,s,function(t,e){return c.circle(t,e,a,h)});return p.mesh(t,i,n,o,l),t.label="Soft Body",t}},function(t,e,i){var x={},b=(t.exports=x,i(84),i(32));x.pathToVertices=function(t,e){"undefined"==typeof window||"SVGPathSeg"in window||b.warn("Svg.pathToVertices: SVGPathSeg not defined, a polyfill is required.");var i,n,r,s,o,a,h,l,c,u,d,p=[],f=0,g=0,m=0;function y(t,e,i){var n,i=i%2==1&&1<i;c&&t==c.x&&e==c.y||(d=c&&i?(u=c.x,c.y):u=0,n={x:u+t,y:d+e},!i&&c||(c=n),p.push(n),g=u+t,m=d+e)}function v(t){var e=t.pathSegTypeAsLetter.toUpperCase();if("Z"!==e){switch(e){case"M":case"L":case"T":case"C":case"S":case"Q":g=t.x,m=t.y;break;case"H":g=t.x;break;case"V":m=t.y}y(g,m,t.pathSegType)}}for(e=e||15,x._svgPathToAbsolute(t),r=t.getTotalLength(),a=[],i=0;i<t.pathSegList.numberOfItems;i+=1)a.push(t.pathSegList.getItem(i));for(h=a.concat();f<r;){if((o=a[t.getPathSegAtLength(f)])!=l){for(;h.length&&h[0]!=o;)v(h.shift());l=o}switch(o.pathSegTypeAsLetter.toUpperCase()){case"C":case"T":case"S":case"Q":case"A":y((s=t.getPointAtLength(f)).x,s.y,0)}f+=e}for(i=0,n=h.length;i<n;++i)v(h[i]);return p},x._svgPathToAbsolute=function(t){for(var e,i,n,r,s,o,a=t.pathSegList,h=0,l=0,c=a.numberOfItems,u=0;u<c;++u){var d=a.getItem(u),p=d.pathSegTypeAsLetter;if(/[MLHVCSQTA]/.test(p))"x"in d&&(h=d.x),"y"in d&&(l=d.y);else switch("x1"in d&&(n=h+d.x1),"x2"in d&&(s=h+d.x2),"y1"in d&&(r=l+d.y1),"y2"in d&&(o=l+d.y2),"x"in d&&(h+=d.x),"y"in d&&(l+=d.y),p){case"m":a.replaceItem(t.createSVGPathSegMovetoAbs(h,l),u);break;case"l":a.replaceItem(t.createSVGPathSegLinetoAbs(h,l),u);break;case"h":a.replaceItem(t.createSVGPathSegLinetoHorizontalAbs(h),u);break;case"v":a.replaceItem(t.createSVGPathSegLinetoVerticalAbs(l),u);break;case"c":a.replaceItem(t.createSVGPathSegCurvetoCubicAbs(h,l,n,r,s,o),u);break;case"s":a.replaceItem(t.createSVGPathSegCurvetoCubicSmoothAbs(h,l,s,o),u);break;case"q":a.replaceItem(t.createSVGPathSegCurvetoQuadraticAbs(h,l,n,r),u);break;case"t":a.replaceItem(t.createSVGPathSegCurvetoQuadraticSmoothAbs(h,l),u);break;case"a":a.replaceItem(t.createSVGPathSegArcAbs(h,l,d.r1,d.r2,d.angle,d.largeArcFlag,d.sweepFlag),u);break;case"z":case"Z":h=e,l=i}"M"!=p&&"m"!=p||(e=h,i=l)}}},function(t,e,i){var g=i(86),m=i(41),n=i(0),r=i(249),s=i(9),y=i(2),v=i(126),x=i(64),i=new n({Extends:s,Mixins:[r.Bounce,r.Collision,r.Friction,r.Gravity,r.Mass,r.Sensor,r.Sleep,r.Static],initialize:function(t,e,i){s.call(this),this.tile=e,this.world=t,e.physics.matterBody&&e.physics.matterBody.destroy(),e.physics.matterBody=this;var t=y(i,"body",null),n=y(i,"addToWorld",!0);t?this.setBody(t,n):(t=e.getCollisionGroup(),0<y(t,"objects",[]).length?this.setFromTileCollision(i):this.setFromTileRectangle(i))},setFromTileRectangle:function(t){v(t=void 0===t?{}:t,"isStatic")||(t.isStatic=!0),v(t,"addToWorld")||(t.addToWorld=!0);var e=this.tile.getBounds(),i=e.x+e.width/2,n=e.y+e.height/2,i=g.rectangle(i,n,e.width,e.height,t);return this.setBody(i,t.addToWorld),this},setFromTileCollision:function(t){v(t=void 0===t?{}:t,"isStatic")||(t.isStatic=!0),v(t,"addToWorld")||(t.addToWorld=!0);for(var e=this.tile.tilemapLayer.scaleX,i=this.tile.tilemapLayer.scaleY,n=this.tile.getLeft(),r=this.tile.getTop(),s=this.tile.getCollisionGroup(),o=y(s,"objects",[]),a=[],h=0;h<o.length;h++){var l=o[h],c=n+l.x*e,u=r+l.y*i,d=l.width*e,p=l.height*i,f=null;l.rectangle?f=g.rectangle(c+d/2,u+p/2,d,p,t):l.ellipse?f=g.circle(c+d/2,u+p/2,d/2,t):(l.polygon||l.polyline)&&(p=(l.polygon||l.polyline).map(function(t){return{x:t.x*e,y:t.y*i}}),d=x.create(p),c+=(l=x.centre(d)).x,u+=l.y,f=g.fromVertices(c,u,d,t)),f&&a.push(f)}return 1===a.length?this.setBody(a[0],t.addToWorld):1<a.length&&(t.parts=a,this.setBody(m.create(t),t.addToWorld)),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()}});t.exports=i},function(t,e,i){var n=i(1399);n.Body=i(41),n.Composite=i(118),n.World=i(596),n.Detector=i(273),n.Grid=i(597),n.Pairs=i(598),n.Pair=i(250),n.Query=i(1400),n.Resolver=i(599),n.SAT=i(274),n.Constraint=i(128),n.Common=i(32),n.Engine=i(1401),n.Events=i(166),n.Sleeping=i(165),n.Plugin=i(595),n.Bodies=i(86),n.Composites=i(591),n.Axes=i(271),n.Bounds=i(84),n.Svg=i(592),n.Vector=i(83),n.Vertices=i(64),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},function(t,e,i){var o={},a=(t.exports=o,i(32));o._registry={},o.register=function(t){var e,i,n;return o.isPlugin(t)||a.warn("Plugin.register:",o.toString(t),"does not implement all required fields."),t.name in o._registry?(e=o._registry[t.name],i=o.versionParse(t.version).number,(n=o.versionParse(e.version).number)<i?(a.warn("Plugin.register:",o.toString(e),"was upgraded to",o.toString(t)),o._registry[t.name]=t):i<n?a.warn("Plugin.register:",o.toString(e),"can not be downgraded to",o.toString(t)):t!==e&&a.warn("Plugin.register:",o.toString(t),"is already registered to different plugin object")):o._registry[t.name]=t,t},o.resolve=function(t){return o._registry[o.dependencyParse(t).name]},o.toString=function(t){return"string"==typeof t?t:(t.name||"anonymous")+"@"+(t.version||t.range||"0.0.0")},o.isPlugin=function(t){return t&&t.name&&t.version&&t.install},o.isUsed=function(t,e){return-1<t.used.indexOf(e)},o.isFor=function(t,e){var i=t.for&&o.dependencyParse(t.for);return!t.for||e.name===i.name&&o.versionSatisfies(e.version,i.range)},o.use=function(t,e){if(t.uses=(t.uses||[]).concat(e||[]),0!==t.uses.length){for(var i,e=o.dependencies(t),n=a.topologicalSort(e),r=[],s=0;s<n.length;s+=1)n[s]!==t.name&&((i=o.resolve(n[s]))?o.isUsed(t,i.name)||(o.isFor(i,t)||(a.warn("Plugin.use:",o.toString(i),"is for",i.for,"but installed on",o.toString(t)+"."),i._warned=!0),i.install?i.install(t):(a.warn("Plugin.use:",o.toString(i),"does not specify an install function."),i._warned=!0),i._warned?(r.push("🔶 "+o.toString(i)),delete i._warned):r.push("✅ "+o.toString(i)),t.used.push(i.name)):r.push("❌ "+n[s]));0<r.length&&!i.silent&&a.info(r.join(" "))}else a.warn("Plugin.use:",o.toString(t),"does not specify any dependencies to install.")},o.dependencies=function(n,t){var r=o.dependencyParse(n),e=r.name;if(!(e in(t=t||{}))){n=o.resolve(n)||n,t[e]=a.map(n.uses||[],function(t){o.isPlugin(t)&&o.register(t);var e=o.dependencyParse(t),i=o.resolve(t);return i&&!o.versionSatisfies(i.version,e.range)?(a.warn("Plugin.dependencies:",o.toString(i),"does not satisfy",o.toString(e),"used by",o.toString(r)+"."),i._warned=!0,n._warned=!0):i||(a.warn("Plugin.dependencies:",o.toString(t),"used by",o.toString(r),"could not be resolved."),n._warned=!0),e.name});for(var i=0;i<t[e].length;i+=1)o.dependencies(t[e][i],t);return t}},o.dependencyParse=function(t){return a.isString(t)?(/^[\w-]+(@(\*|[\^~]?\d+\.\d+\.\d+(-[0-9A-Za-z-]+)?))?$/.test(t)||a.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}},o.versionParse=function(t){/^\*|[\^~]?\d+\.\d+\.\d+(-[0-9A-Za-z-]+)?$/.test(t)||a.warn("Plugin.versionParse:",t,"is not a valid version or range.");var e=t.split("-"),i=(t=e[0],isNaN(Number(t[0]))),n=i?t.substr(1):t,r=a.map(n.split("."),function(t){return Number(t)});return{isRange:i,version:n,range:t,operator:i?t[0]:"",parts:r,prerelease:e[1],number:1e8*r[0]+1e4*r[1]+r[2]}},o.versionSatisfies=function(t,e){var i=o.versionParse(e=e||"*"),n=i.parts,r=o.versionParse(t),s=r.parts;if(i.isRange){if("*"===i.operator||"*"===t)return!0;if("~"===i.operator)return s[0]===n[0]&&s[1]===n[1]&&s[2]>=n[2];if("^"===i.operator)return 0<n[0]?s[0]===n[0]&&r.number>=i.number:0<n[1]?s[1]===n[1]&&s[2]>=n[2]:s[2]===n[2]}return t===e||"*"===t}},function(t,e,i){var n={},r=(t.exports=n,i(118)),s=(i(128),i(32));n.create=function(t){var e=r.create();return s.extend(e,{label:"World",gravity:{x:0,y:1,scale:.001},bounds:{min:{x:-1/0,y:-1/0},max:{x:1/0,y:1/0}}},t)}},function(t,e,i){var v={},a=(t.exports=v,i(250)),n=i(273),s=i(32);v.create=function(t){var e={controller:v,detector:n.collisions,buckets:{},pairs:{},pairsList:[],bucketWidth:48,bucketHeight:48};return s.extend(e,t)},v.update=function(t,e,i,n){for(var r,s,o=i.world,a=t.buckets,h=!1,l=i.metrics,c=l.broadphaseTests=0;c<e.length;c++){var u=e[c];if((!u.isSleeping||n)&&!(u.bounds.max.x<o.bounds.min.x||u.bounds.min.x>o.bounds.max.x||u.bounds.max.y<o.bounds.min.y||u.bounds.min.y>o.bounds.max.y)){var d=v._getRegion(t,u);if(!u.region||d.id!==u.region.id||n){l.broadphaseTests+=1,u.region&&!n||(u.region=d);for(var p=v._regionUnion(d,u.region),f=p.startCol;f<=p.endCol;f++)for(r=p.startRow;r<=p.endRow;r++){var g=a[s=v._getBucketId(f,r)],m=f>=d.startCol&&f<=d.endCol&&r>=d.startRow&&r<=d.endRow,y=f>=u.region.startCol&&f<=u.region.endCol&&r>=u.region.startRow&&r<=u.region.endRow;!m&&y&&y&&g&&v._bucketRemoveBody(t,g,u),(u.region===d||m&&!y||n)&&(g=g||v._createBucket(a,s),v._bucketAddBody(t,g,u))}u.region=d,h=!0}}}h&&(t.pairsList=v._createActivePairsList(t))},v.clear=function(t){t.buckets={},t.pairs={},t.pairsList=[]},v._regionUnion=function(t,e){var i=Math.min(t.startCol,e.startCol),n=Math.max(t.endCol,e.endCol),r=Math.min(t.startRow,e.startRow),t=Math.max(t.endRow,e.endRow);return v._createRegion(i,n,r,t)},v._getRegion=function(t,e){var e=e.bounds,i=Math.floor(e.min.x/t.bucketWidth),n=Math.floor(e.max.x/t.bucketWidth),r=Math.floor(e.min.y/t.bucketHeight),e=Math.floor(e.max.y/t.bucketHeight);return v._createRegion(i,n,r,e)},v._createRegion=function(t,e,i,n){return{id:t+","+e+","+i+","+n,startCol:t,endCol:e,startRow:i,endRow:n}},v._getBucketId=function(t,e){return"C"+t+"R"+e},v._createBucket=function(t,e){return t[e]=[]},v._bucketAddBody=function(t,e,i){for(var n=0;n<e.length;n++){var r,s,o=e[n];i.id===o.id||i.isStatic&&o.isStatic||(r=a.id(i,o),(s=t.pairs[r])?s[2]+=1:t.pairs[r]=[i,o,1])}e.push(i)},v._bucketRemoveBody=function(t,e,i){e.splice(e.indexOf(i),1);for(var n=0;n<e.length;n++){var r=e[n],r=a.id(i,r),r=t.pairs[r];r&&--r[2]}},v._createActivePairsList=function(t){for(var e,i=[],n=s.keys(t.pairs),r=0;r<n.length;r++)0<(e=t.pairs[n[r]])[2]?i.push(e):delete t.pairs[n[r]];return i}},function(t,e,i){var l={},d=(t.exports=l,i(250)),n=i(32);l._pairMaxIdleLife=1e3,l.create=function(t){return n.extend({table:{},list:[],collisionStart:[],collisionActive:[],collisionEnd:[]},t)},l.update=function(t,e,i){var n,r,s,o,a=t.list,h=t.table,l=t.collisionStart,c=t.collisionEnd,u=t.collisionActive;for(l.length=0,c.length=0,o=u.length=0;o<a.length;o++)a[o].confirmedActive=!1;for(o=0;o<e.length;o++)(n=e[o]).collided&&((s=h[r=d.id(n.bodyA,n.bodyB)])?((s.isActive?u:l).push(s),d.update(s,n,i),s.confirmedActive=!0):(s=d.create(n,i),h[r]=s,l.push(s),a.push(s)));for(o=0;o<a.length;o++)(s=a[o]).isActive&&!s.confirmedActive&&(d.setActive(s,!1,i),c.push(s))},l.removeOld=function(t,e){for(var i,n,r,s=t.list,o=t.table,a=[],h=0;h<s.length;h++)(n=(i=s[h]).collision).bodyA.isSleeping||n.bodyB.isSleeping?i.timeUpdated=e:e-i.timeUpdated>l._pairMaxIdleLife&&a.push(h);for(h=0;h<a.length;h++)delete o[(i=s[r=a[h]-h]).id],s.splice(r,1)},l.clear=function(t){return t.table={},t.list.length=0,t.collisionStart.length=0,t.collisionActive.length=0,t.collisionEnd.length=0,t}},function(t,e,i){var C={},s=(t.exports=C,i(64)),O=i(83),R=i(32),o=i(84);C._restingThresh=4,C._restingThreshTangent=6,C._positionDampen=.9,C._positionWarming=.8,C._frictionNormalMultiplier=5,C.preSolvePosition=function(t){for(var e,i,n=0;n<t.length;n++)(e=t[n]).isActive&&(i=e.activeContacts.length,e.collision.parentA.totalContacts+=i,e.collision.parentB.totalContacts+=i)},C.solvePosition=function(t,e,i){for(var n,r,s,o,a,h,l,c,u,d=i*C._positionDampen,p=0;p<e.length;p++){var f=e[p];f.previousPositionImpulse.x=f.positionImpulse.x,f.previousPositionImpulse.y=f.positionImpulse.y}for(p=0;p<t.length;p++)(n=t[p]).isActive&&!n.isSensor&&(r=(o=n.collision).parentA,s=o.parentB,u=o.normal,a=r.previousPositionImpulse,c=s.previousPositionImpulse,o=o.penetration,l=c.x-a.x+o.x,c=c.y-a.y+o.y,l=(a=u.x)*l+(o=u.y)*c,u=((n.separation=l)-n.slop)*d,(r.isStatic||s.isStatic)&&(u*=2),r.isStatic||r.isSleeping||(h=u/r.totalContacts,r.positionImpulse.x+=a*h,r.positionImpulse.y+=o*h),s.isStatic||s.isSleeping||(h=u/s.totalContacts,s.positionImpulse.x-=a*h,s.positionImpulse.y-=o*h))},C.postSolvePosition=function(t){for(var e=0;e<t.length;e++){var i=t[e];if((i.totalContacts=0)!==i.positionImpulse.x||0!==i.positionImpulse.y){for(var n=0;n<i.parts.length;n++){var r=i.parts[n];s.translate(r.vertices,i.positionImpulse),o.update(r.bounds,r.vertices,i.velocity),r.position.x+=i.positionImpulse.x,r.position.y+=i.positionImpulse.y}i.positionPrev.x+=i.positionImpulse.x,i.positionPrev.y+=i.positionImpulse.y,O.dot(i.positionImpulse,i.velocity)<0?(i.positionImpulse.x=0,i.positionImpulse.y=0):(i.positionImpulse.x*=C._positionWarming,i.positionImpulse.y*=C._positionWarming)}}},C.preSolveVelocity=function(t){for(var e,i,n,r,s,o,a,h,l,c,u,d=O._temp[0],p=O._temp[1],f=0;f<t.length;f++)if((n=t[f]).isActive&&!n.isSensor)for(i=n.activeContacts,r=(n=n.collision).parentA,s=n.parentB,o=n.normal,a=n.tangent,e=0;e<i.length;e++)h=(c=i[e]).vertex,l=c.normalImpulse,c=c.tangentImpulse,0===l&&0===c||(d.x=o.x*l+a.x*c,d.y=o.y*l+a.y*c,r.isStatic||r.isSleeping||(u=O.sub(h,r.position,p),r.positionPrev.x+=d.x*r.inverseMass,r.positionPrev.y+=d.y*r.inverseMass,r.anglePrev+=O.cross(u,d)*r.inverseInertia),s.isStatic||s.isSleeping||(u=O.sub(h,s.position,p),s.positionPrev.x-=d.x*s.inverseMass,s.positionPrev.y-=d.y*s.inverseMass,s.anglePrev-=O.cross(u,d)*s.inverseInertia))},C.solveVelocity=function(t,e){for(var i=e*e,n=O._temp[0],r=O._temp[1],s=O._temp[2],o=O._temp[3],a=O._temp[4],h=O._temp[5],l=0;l<t.length;l++){var c=t[l];if(c.isActive&&!c.isSensor){var u=c.collision,d=u.parentA,p=u.parentB,f=u.normal,g=u.tangent,m=c.activeContacts,y=1/m.length;d.velocity.x=d.position.x-d.positionPrev.x,d.velocity.y=d.position.y-d.positionPrev.y,p.velocity.x=p.position.x-p.positionPrev.x,p.velocity.y=p.position.y-p.positionPrev.y,d.angularVelocity=d.angle-d.anglePrev,p.angularVelocity=p.angle-p.anglePrev;for(var v=0;v<m.length;v++){var x=m[v],b=x.vertex,w=O.sub(b,d.position,r),b=O.sub(b,p.position,s),T=O.add(d.velocity,O.mult(O.perp(w),d.angularVelocity),o),S=O.add(p.velocity,O.mult(O.perp(b),p.angularVelocity),a),T=O.sub(T,S,h),S=O.dot(f,T),T=O.dot(g,T),P=Math.abs(T),_=R.sign(T),E=(1+c.restitution)*S,A=R.clamp(c.separation+S,0,1)*C._frictionNormalMultiplier,M=T,k=1/0;P>c.friction*c.frictionStatic*A*i&&(M=R.clamp(c.friction*_*i,-(k=P),k));var A=O.cross(w,f),_=O.cross(b,f),P=y/(d.inverseMass+p.inverseMass+d.inverseInertia*A*A+p.inverseInertia*_*_);E*=P,M*=P,S<0&&S*S>C._restingThresh*i?x.normalImpulse=0:(A=x.normalImpulse,x.normalImpulse=Math.min(x.normalImpulse+E,0),E=x.normalImpulse-A),T*T>C._restingThreshTangent*i?x.tangentImpulse=0:(_=x.tangentImpulse,x.tangentImpulse=R.clamp(x.tangentImpulse+M,-k,k),M=x.tangentImpulse-_),n.x=f.x*E+g.x*M,n.y=f.y*E+g.y*M,d.isStatic||d.isSleeping||(d.positionPrev.x+=n.x*d.inverseMass,d.positionPrev.y+=n.y*d.inverseMass,d.anglePrev+=O.cross(w,n)*d.inverseInertia),p.isStatic||p.isSleeping||(p.positionPrev.x-=n.x*p.inverseMass,p.positionPrev.y-=n.y*p.inverseMass,p.anglePrev-=O.cross(b,n)*p.inverseInertia)}}}}},function(t,e){var i=function(){return this}();try{i=i||new Function("return this")()}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e,i){var a=i(276);t.exports=function(t,e,i,n){for(var r=t[0],s=1;s<t.length;s++){var o=t[s];a(o,r,e,i,n),r=o}return t}},function(t,e,i){var s=i(46);t.exports=function(t,e,i,n,r){return s(t,"angle",e,i,n,r)}},function(t,e){t.exports=function(t,e,i){for(var n=0;n<t.length;n++){var r=t[n];e.call(i,r)}return t}},function(t,e){t.exports=function(t,e,i){for(var n=i=void 0===i?0:i;n<t.length;n++){var r,s=t[n],o=!0;for(r in e)s[r]!==e[r]&&(o=!1);if(o)return s}return null}},function(t,e){t.exports=function(t,e,i){for(var n=i=void 0===i?0:i;n<t.length;n++){var r,s=t[n],o=!0;for(r in e)s[r]!==e[r]&&(o=!1);if(o)return s}return null}},function(t,e,i){var m=i(289),y=i(123),v=i(2),n=i(1),x=new(i(129))({sys:{queueDepthSort:n,events:{once:n}}},0,0,1,1);t.exports=function(t,e){var i=(e=void 0===e?{}:e).hasOwnProperty("width"),n=e.hasOwnProperty("height"),r=v(e,"width",-1),s=v(e,"height",-1),o=v(e,"cellWidth",1),a=v(e,"cellHeight",o),h=v(e,"position",y.TOP_LEFT),l=v(e,"x",0),c=v(e,"y",0),u=0,d=0,p=r*o,f=s*a;x.setPosition(l,c),x.setSize(o,a);for(var g=0;g<t.length;g++)if(m(t[g],x,h),i&&-1===r)x.x+=o;else if(n&&-1===s)x.y+=a;else if(n&&!i){if(d+=a,x.y+=a,d===f&&(d=0,u+=o,x.y=c,x.x+=o,u===p))break}else if(u+=o,x.x+=o,u===p&&(u=0,d+=a,x.x=l,x.y+=a,d===f))break;return t}},function(t,e,i){var r=i(18);t.exports={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t,e,i,n){return void 0===t&&(t=1),void 0===e?this.alpha=t:(this._alphaTL=r(t,0,1),this._alphaTR=r(e,0,1),this._alphaBL=r(i,0,1),this._alphaBR=r(n,0,1)),this},alpha:{get:function(){return this._alpha},set:function(t){t=r(t,0,1);this._alpha=t,this._alphaTL=t,this._alphaTR=t,this._alphaBL=t,0===(this._alphaBR=t)?this.renderFlags&=-3:this.renderFlags|=2}},alphaTopLeft:{get:function(){return this._alphaTL},set:function(t){t=r(t,0,1);0!==(this._alphaTL=t)&&(this.renderFlags|=2)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(t){t=r(t,0,1);0!==(this._alphaTR=t)&&(this.renderFlags|=2)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(t){t=r(t,0,1);0!==(this._alphaBL=t)&&(this.renderFlags|=2)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(t){t=r(t,0,1);0!==(this._alphaBR=t)&&(this.renderFlags|=2)}}}},function(t,e){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}}},function(t,e){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},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}}}},function(t,e){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}}},function(t,e,i){var l=i(10),n=i(308),r=i(3);t.exports={prepareBoundsOutput:function(t,e){return void 0===e&&(e=!1),0!==this.rotation&&n(t,this.x,this.y,this.rotation),e&&this.parentContainer&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t),t},getCenter:function(t){return(t=void 0===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,t},getTopLeft:function(t,e){return(t=t||new r).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).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).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).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).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).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).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).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){var e,i,n,r,s,o,a,h;return void 0===t&&(t=new l),this.parentContainer?(h=this.parentContainer.getBoundsTransformMatrix(),this.getTopLeft(t),h.transformPoint(t.x,t.y,t),e=t.x,i=t.y,this.getTopRight(t),h.transformPoint(t.x,t.y,t),n=t.x,r=t.y,this.getBottomLeft(t),h.transformPoint(t.x,t.y,t),s=t.x,o=t.y,this.getBottomRight(t),h.transformPoint(t.x,t.y,t)):(this.getTopLeft(t),e=t.x,i=t.y,this.getTopRight(t),n=t.x,r=t.y,this.getBottomLeft(t),s=t.x,o=t.y,this.getBottomRight(t)),h=t.x,a=t.y,t.x=Math.min(e,n,s,h),t.y=Math.min(i,r,o,a),t.width=Math.max(e,n,s,h)-t.x,t.height=Math.max(i,r,o,a)-t.y,t}}},function(t,e){t.exports="blur"},function(t,e){t.exports="boot"},function(t,e){t.exports="contextlost"},function(t,e){t.exports="contextrestored"},function(t,e){t.exports="destroy"},function(t,e){t.exports="focus"},function(t,e){t.exports="hidden"},function(t,e){t.exports="pause"},function(t,e){t.exports="postrender"},function(t,e){t.exports="poststep"},function(t,e){t.exports="prerender"},function(t,e){t.exports="prestep"},function(t,e){t.exports="ready"},function(t,e){t.exports="resume"},function(t,e){t.exports="step"},function(t,e){t.exports="visible"},function(t,e){t.exports="postrender"},function(t,e){t.exports="prerender"},function(t,e){t.exports="render"},function(t,e){t.exports="resize"},function(t,e){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}}},function(t,e,i){var r=i(36),s=i(99),o=i(6),a=i(100),h=i(3),i={path:null,rotateToPath:!1,pathRotationOffset:0,pathOffset:null,pathVector:null,pathDelta:null,pathTween:null,pathConfig:null,_prevDirection:a.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&&i.isPlaying()&&i.stop(),(t="number"==typeof t?{duration:t}:t).from=o(t,"from",0),t.to=o(t,"to",1),s(t,"positionOnPath",!1));this.rotateToPath=s(t,"rotateToPath",!1),this.pathRotationOffset=o(t,"rotationOffset",0);var n=o(t,"startAt",e);return n&&(t.onStart=function(t){var t=t.data[0],e=(t.progress=n,t.elapsed=t.duration*n,t.ease(t.progress));t.current=t.start+(t.end-t.start)*e,t.target[t.key]=t.current}),this.pathOffset||(this.pathOffset=new h(this.x,this.y)),this.pathVector||(this.pathVector=new h),this.pathDelta||(this.pathDelta=new h),this.pathDelta.reset(),this.pathTween=this.scene.sys.tweens.addCounter(t),this.path.getStartPoint(this.pathOffset),i&&(this.x=this.pathOffset.x,this.y=this.pathOffset.y),this.pathOffset.x=this.x-this.pathOffset.x,this.pathOffset.y=this.y-this.pathOffset.y,this._prevDirection=a.PLAYING_FORWARD,this.rotateToPath&&(e=this.path.getPoint(.1),this.rotation=Math.atan2(e.y-this.y,e.x-this.x)+r(this.pathRotationOffset)),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,e,i,n=this.pathTween;n&&(t=n.data[0],e=this.pathDelta,i=this.pathVector,e.copy(i).negate(),t.state===a.COMPLETE?(this.path.getPoint(1,i),e.add(i),i.add(this.pathOffset),this.setPosition(i.x,i.y)):t.state!==a.PLAYING_FORWARD&&t.state!==a.PLAYING_BACKWARD||(this.path.getPoint(n.getValue(),i),e.add(i),i.add(this.pathOffset),n=this.x,e=this.y,this.setPosition(i.x,i.y),i=this.x-n,n=this.y-e,0==i&&0==n||(t.state!==this._prevDirection?this._prevDirection=t.state:this.rotateToPath&&(this.rotation=Math.atan2(n,i)+r(this.pathRotationOffset)))))}};t.exports=i},function(t,e){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){return void 0===t&&(t=this.frame),this.width=t.realWidth,this.height=t.realHeight,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}}},function(t,e){t.exports={texture:null,frame:null,isCropped:!1,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),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}}},function(t,e){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),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,ch:0}}}},function(t,e){t.exports={tintTopLeft:16777215,tintTopRight:16777215,tintBottomLeft:16777215,tintBottomRight:16777215,tintFill:!1,clearTint:function(){return this.setTint(16777215),this},setTint:function(t,e,i,n){return void 0===t&&(t=16777215),void 0===e&&(n=i=e=t),this.tintTopLeft=t,this.tintTopRight=e,this.tintBottomLeft=i,this.tintBottomRight=n,this.tintFill=!1,this},setTintFill:function(t,e,i,n){return this.setTint(t,e,i,n),this.tintFill=!0,this},tint:{set:function(t){this.setTint(t,t,t,t)}},isTinted:{get:function(){var t=16777215;return this.tintFill||this.tintTopLeft!==t||this.tintTopRight!==t||this.tintBottomLeft!==t||this.tintBottomRight!==t}}}},function(t,e){t.exports="changedata"},function(t,e){t.exports="changedata-"},function(t,e){t.exports="destroy"},function(t,e){t.exports="removedata"},function(t,e){t.exports="setdata"},function(t,e){t.exports="addedtoscene"},function(t,e){t.exports="destroy"},function(t,e){t.exports="removedfromscene"},function(t,e){t.exports="complete"},function(t,e){t.exports="created"},function(t,e){t.exports="error"},function(t,e){t.exports="loop"},function(t,e){t.exports="play"},function(t,e){t.exports="seeked"},function(t,e){t.exports="seeking"},function(t,e){t.exports="stop"},function(t,e){t.exports="timeout"},function(t,e){t.exports="unlocked"},function(t,e){t.exports="addedtoscene"},function(t,e){t.exports="boot"},function(t,e){t.exports="create"},function(t,e){t.exports="destroy"},function(t,e){t.exports="pause"},function(t,e){t.exports="postupdate"},function(t,e){t.exports="prerender"},function(t,e){t.exports="preupdate"},function(t,e){t.exports="ready"},function(t,e){t.exports="removedfromscene"},function(t,e){t.exports="render"},function(t,e){t.exports="resume"},function(t,e){t.exports="shutdown"},function(t,e){t.exports="sleep"},function(t,e){t.exports="start"},function(t,e){t.exports="transitioncomplete"},function(t,e){t.exports="transitioninit"},function(t,e){t.exports="transitionout"},function(t,e){t.exports="transitionstart"},function(t,e){t.exports="transitionwake"},function(t,e){t.exports="update"},function(t,e){t.exports="wake"},function(t,e,i){var s=i(46);t.exports=function(t,e,i,n,r){return s(t,"alpha",e,i,n,r)}},function(t,e,i){var s=i(46);t.exports=function(t,e,i,n,r){return s(t,"x",e,i,n,r)}},function(t,e,i){var a=i(46);t.exports=function(t,e,i,n,r,s,o){return null==i&&(i=e),a(t,"x",e,n,s,o),a(t,"y",i,r,s,o)}},function(t,e,i){var s=i(46);t.exports=function(t,e,i,n,r){return s(t,"y",e,i,n,r)}},function(t,e){t.exports=function(t,e,i,n){for(var r=i=void 0===i?0:i,s=((n=void 0===n?6.28:n)-i)/t.length,o=0;o<t.length;o++)t[o].x=e.x+e.radius*Math.cos(r),t[o].y=e.y+e.radius*Math.sin(r),r+=s;return t}},function(t,e){t.exports=function(t,e,i,n){for(var r=i=void 0===i?0:i,s=((n=void 0===n?6.28: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(r),t[h].y=e.y+a*Math.sin(r),r+=s;return t}},function(t,e,i){var o=i(172);t.exports=function(t,e){for(var i=o(e,t.length),n=0;n<t.length;n++){var r=t[n],s=i[n];r.x=s.x,r.y=s.y}return t}},function(t,e,i){var s=i(316),o=i(178),a=i(179);t.exports=function(t,e,i){void 0===i&&(i=0);var n=s(e,!1,t.length);0<i?o(n,i):i<0&&a(n,Math.abs(i));for(var r=0;r<t.length;r++)t[r].x=n[r].x,t[r].y=n[r].y;return t}},function(t,e,i){var c=i(317);t.exports=function(t,e,i){var n=c({x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},i),r=c({x1:e.x2,y1:e.y2,x2:e.x3,y2:e.y3},i),e=c({x1:e.x3,y1:e.y3,x2:e.x1,y2:e.y1},i);n.pop(),r.pop(),e.pop();for(var s=(n=n.concat(r,e)).length/t.length,o=0,a=0;a<t.length;a++){var h=t[a],l=n[Math.floor(o)];h.x=l.x,h.y=l.y,o+=s}return t}},function(t,e){t.exports=function(t,e,i){for(var n=0;n<t.length;n++){var r=t[n];r.anims&&r.anims.play(e,i)}return t}},function(t,e,i){var n=i(170);t.exports=function(t,e){for(var i=0;i<t.length;i++)n(e,t[i]);return t}},function(t,e,i){var n=i(180);t.exports=function(t,e){for(var i=0;i<t.length;i++)n(e,t[i]);return t}},function(t,e,i){var n=i(173);t.exports=function(t,e){for(var i=0;i<t.length;i++)n(e,t[i]);return t}},function(t,e,i){var n=i(174);t.exports=function(t,e){for(var i=0;i<t.length;i++)n(e,t[i]);return t}},function(t,e,i){var n=i(181);t.exports=function(t,e){for(var i=0;i<t.length;i++)n(e,t[i]);return t}},function(t,e,i){var s=i(46);t.exports=function(t,e,i,n,r){return s(t,"rotation",e,i,n,r)}},function(t,e,i){var a=i(182),h=i(50);t.exports=function(t,e,i){for(var n=e.x,r=e.y,s=0;s<t.length;s++){var o=t[s];a(o,n,r,i,Math.max(1,h(o.x,o.y,n,r)))}return t}},function(t,e,i){var a=i(182);t.exports=function(t,e,i,n){var r=e.x,s=e.y;if(0!==n)for(var o=0;o<t.length;o++)a(t[o],r,s,i,n);return t}},function(t,e,i){var s=i(46);t.exports=function(t,e,i,n,r){return s(t,"scaleX",e,i,n,r)}},function(t,e,i){var a=i(46);t.exports=function(t,e,i,n,r,s,o){return null==i&&(i=e),a(t,"scaleX",e,n,s,o),a(t,"scaleY",i,r,s,o)}},function(t,e,i){var s=i(46);t.exports=function(t,e,i,n,r){return s(t,"scaleY",e,i,n,r)}},function(t,e,i){var s=i(27);t.exports=function(t,e,i,n,r){return s(t,"alpha",e,i,n,r)}},function(t,e,i){var r=i(27);t.exports=function(t,e,i,n){return r(t,"blendMode",e,0,i,n)}},function(t,e,i){var s=i(27);t.exports=function(t,e,i,n,r){return s(t,"depth",e,i,n,r)}},function(t,e){t.exports=function(t,e,i){for(var n=0;n<t.length;n++)t[n].setInteractive(e,i);return t}},function(t,e,i){var a=i(27);t.exports=function(t,e,i,n,r,s,o){return null==i&&(i=e),a(t,"originX",e,n,s,o),a(t,"originY",i,r,s,o),t.forEach(function(t){t.updateDisplayOrigin()}),t}},function(t,e,i){var s=i(27);t.exports=function(t,e,i,n,r){return s(t,"rotation",e,i,n,r)}},function(t,e,i){var a=i(27);t.exports=function(t,e,i,n,r,s,o){return null==i&&(i=e),a(t,"scaleX",e,n,s,o),a(t,"scaleY",i,r,s,o)}},function(t,e,i){var s=i(27);t.exports=function(t,e,i,n,r){return s(t,"scaleX",e,i,n,r)}},function(t,e,i){var s=i(27);t.exports=function(t,e,i,n,r){return s(t,"scaleY",e,i,n,r)}},function(t,e,i){var a=i(27);t.exports=function(t,e,i,n,r,s,o){return null==i&&(i=e),a(t,"scrollFactorX",e,n,s,o),a(t,"scrollFactorY",i,r,s,o)}},function(t,e,i){var s=i(27);t.exports=function(t,e,i,n,r){return s(t,"scrollFactorX",e,i,n,r)}},function(t,e,i){var s=i(27);t.exports=function(t,e,i,n,r){return s(t,"scrollFactorY",e,i,n,r)}},function(t,e){t.exports=function(t,e,i,n,r){for(var s=0;s<t.length;s++)t[s].setTint(e,i,n,r);return t}},function(t,e,i){var r=i(27);t.exports=function(t,e,i,n){return r(t,"visible",e,0,i,n)}},function(t,e,i){var s=i(27);t.exports=function(t,e,i,n,r){return s(t,"x",e,i,n,r)}},function(t,e,i){var a=i(27);t.exports=function(t,e,i,n,r,s,o){return null==i&&(i=e),a(t,"x",e,n,s,o),a(t,"y",i,r,s,o)}},function(t,e,i){var s=i(27);t.exports=function(t,e,i,n,r){return s(t,"y",e,i,n,r)}},function(t,e,i){var u=i(3);t.exports=function(t,e,i,n,r){var s,o,a;if(void 0===n&&(n=0),void 0===r&&(r=new u),1<t.length)if(0===n){for(var n=t.length-1,h=t[n].x,l=t[n].y,c=n-1;0<=c;c--)s=(a=t[c]).x,o=a.y,a.x=h,a.y=l,h=s,l=o;t[n].x=e,t[n].y=i}else{for(h=t[0].x,l=t[0].y,c=1;c<t.length;c++)s=(a=t[c]).x,o=a.y,a.x=h,a.y=l,h=s,l=o;t[0].x=e,t[0].y=i}else h=t[0].x,l=t[0].y,t[0].x=e,t[0].y=i;return r.x=h,r.y=l,r}},function(t,e,i){var n=i(131);t.exports=function(t){return n(t)}},function(t,e,i){var a=i(183);t.exports=function(t,e,i,n,r){void 0===r&&(r=!1);var s,o=Math.abs(n-i)/t.length;if(r)for(s=0;s<t.length;s++)t[s][e]+=a(s*o,i,n);else for(s=0;s<t.length;s++)t[s][e]=a(s*o,i,n);return t}},function(t,e,i){var a=i(184);t.exports=function(t,e,i,n,r){void 0===r&&(r=!1);var s,o=Math.abs(n-i)/t.length;if(r)for(s=0;s<t.length;s++)t[s][e]+=a(s*o,i,n);else for(s=0;s<t.length;s++)t[s][e]=a(s*o,i,n);return t}},function(t,e){t.exports=function(t,e,i,n,r){void 0===r&&(r=!1);var s,o=Math.abs(n-i)/t.length;if(r)for(s=0;s<t.length;s++)t[s][e]+=s*o+i;else for(s=0;s<t.length;s++)t[s][e]=s*o+i;return t}},function(t,e){t.exports=function(t){for(var e=0;e<t.length;e++)t[e].visible=!t[e].visible;return t}},function(t,e,i){var s=i(68);t.exports=function(t,e,i){void 0===i&&(i=0);for(var n=0;n<t.length;n++){var r=t[n];r.x=s(r.x,e.left-i,e.right+i),r.y=s(r.y,e.top-i,e.bottom+i)}return t}},function(t,e,i){t.exports={Animation:i(185),AnimationFrame:i(319),AnimationManager:i(321),AnimationState:i(164),Events:i(132)}},function(t,e){t.exports="add"},function(t,e){t.exports="animationcomplete"},function(t,e){t.exports="animationcomplete-"},function(t,e){t.exports="animationrepeat"},function(t,e){t.exports="animationrestart"},function(t,e){t.exports="animationstart"},function(t,e){t.exports="animationstop"},function(t,e){t.exports="animationupdate"},function(t,e){t.exports="pauseall"},function(t,e){t.exports="remove"},function(t,e){t.exports="resumeall"},function(t,e,i){t.exports={BaseCache:i(323),CacheManager:i(325),Events:i(324)}},function(t,e){t.exports="add"},function(t,e){t.exports="remove"},function(t,e,i){t.exports={Controls:i(739),Scene2D:i(742)}},function(t,e,i){t.exports={FixedKeyControl:i(740),SmoothedKeyControl:i(741)}},function(t,e,i){var n=i(0),r=i(6),i=new n({initialize:function(t){this.camera=r(t,"camera",null),this.left=r(t,"left",null),this.right=r(t,"right",null),this.up=r(t,"up",null),this.down=r(t,"down",null),this.zoomIn=r(t,"zoomIn",null),this.zoomOut=r(t,"zoomOut",null),this.zoomSpeed=r(t,"zoomSpeed",.01),this.minZoom=r(t,"minZoom",.001),this.maxZoom=r(t,"maxZoom",1e3),this.speedX=0,this.speedY=0;var e=r(t,"speed",null);"number"==typeof e?(this.speedX=e,this.speedY=e):(this.speedX=r(t,"speed.x",0),this.speedY=r(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){var e;this.active&&(void 0===t&&(t=1),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}});t.exports=i},function(t,e,i){var n=i(0),r=i(6),i=new n({initialize:function(t){this.camera=r(t,"camera",null),this.left=r(t,"left",null),this.right=r(t,"right",null),this.up=r(t,"up",null),this.down=r(t,"down",null),this.zoomIn=r(t,"zoomIn",null),this.zoomOut=r(t,"zoomOut",null),this.zoomSpeed=r(t,"zoomSpeed",.01),this.minZoom=r(t,"minZoom",.001),this.maxZoom=r(t,"maxZoom",1e3),this.accelX=0,this.accelY=0;var e=r(t,"acceleration",null),e=("number"==typeof e?(this.accelX=e,this.accelY=e):(this.accelX=r(t,"acceleration.x",0),this.accelY=r(t,"acceleration.y",0)),this.dragX=0,this.dragY=0,r(t,"drag",null)),e=("number"==typeof e?(this.dragX=e,this.dragY=e):(this.dragX=r(t,"drag.x",0),this.dragY=r(t,"drag.y",0)),this.maxSpeedX=0,this.maxSpeedY=0,r(t,"maxSpeed",null));"number"==typeof e?(this.maxSpeedX=e,this.maxSpeedY=e):(this.maxSpeedX=r(t,"maxSpeed.x",0),this.maxSpeedY=r(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){var e;this.active&&(void 0===t&&(t=1),e=this.camera,0<this._speedX?(this._speedX-=this.dragX*t,this._speedX<0&&(this._speedX=0)):this._speedX<0&&(this._speedX+=this.dragX*t,0<this._speedX&&(this._speedX=0)),0<this._speedY?(this._speedY-=this.dragY*t,this._speedY<0&&(this._speedY=0)):this._speedY<0&&(this._speedY+=this.dragY*t,0<this._speedY&&(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}});t.exports=i},function(t,e,i){t.exports={Camera:i(326),BaseCamera:i(133),CameraManager:i(799),Effects:i(333),Events:i(37)}},function(t,e){t.exports="cameradestroy"},function(t,e){t.exports="camerafadeincomplete"},function(t,e){t.exports="camerafadeinstart"},function(t,e){t.exports="camerafadeoutcomplete"},function(t,e){t.exports="camerafadeoutstart"},function(t,e){t.exports="cameraflashcomplete"},function(t,e){t.exports="cameraflashstart"},function(t,e){t.exports="followupdate"},function(t,e){t.exports="camerapancomplete"},function(t,e){t.exports="camerapanstart"},function(t,e){t.exports="postrender"},function(t,e){t.exports="prerender"},function(t,e){t.exports="camerarotatecomplete"},function(t,e){t.exports="camerarotatestart"},function(t,e){t.exports="camerashakecomplete"},function(t,e){t.exports="camerashakestart"},function(t,e){t.exports="camerazoomcomplete"},function(t,e){t.exports="camerazoomstart"},function(t,e,i){var n=i(18),r=i(0),h=i(37),i=new r({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,r,s,o,a){return void 0===t&&(t=!0),void 0===e&&(e=1e3),void 0===i&&(i=0),void 0===n&&(n=0),void 0===r&&(r=0),void 0===o&&(o=null),void 0===a&&(a=this.camera.scene),!(s=void 0===s?!1:s)&&this.isRunning||(this.isRunning=!0,this.isComplete=!1,this.duration=e,this.direction=t,this.progress=0,this.red=i,this.green=n,this.blue=r,this.alpha=t?Number.MIN_VALUE:1,this._elapsed=0,this._onUpdate=o,this._onUpdateScope=a,s=t?h.FADE_OUT_START:h.FADE_IN_START,this.camera.emit(s,this.camera,this,e,i,n,r)),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?1:0,this.effectComplete()))},postRenderCanvas:function(t){var e;return!(!this.isRunning&&!this.isComplete)&&(e=this.camera,t.fillStyle="rgba("+this.red+","+this.green+","+this.blue+","+this.alpha+")",t.fillRect(e.x,e.y,e.width,e.height),!0)},postRenderWebGL:function(t,e){var i,n,r,s;return!(!this.isRunning&&!this.isComplete)&&(i=this.camera,n=this.red/255,r=this.green/255,s=this.blue/255,t.drawFillRect(i.x,i.y,i.width,i.height,e(s,r,n,1),this.alpha),!0)},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.isComplete=!0;var t=this.direction?h.FADE_OUT_COMPLETE:h.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}});t.exports=i},function(t,e,i){var n=i(18),r=i(0),a=i(37),i=new r({initialize:function(t){this.camera=t,this.isRunning=!1,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,r,s,o){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=null),void 0===o&&(o=this.camera.scene),!(r=void 0===r?!1:r)&&this.isRunning||(this.isRunning=!0,this.duration=t,this.progress=0,this.red=e,this.green=i,this.blue=n,this.alpha=1,this._elapsed=0,this._onUpdate=s,this._onUpdateScope=o,this.camera.emit(a.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=1-this.progress:this.effectComplete())},postRenderCanvas:function(t){var e;return!!this.isRunning&&(e=this.camera,t.fillStyle="rgba("+this.red+","+this.green+","+this.blue+","+this.alpha+")",t.fillRect(e.x,e.y,e.width,e.height),!0)},postRenderWebGL:function(t,e){var i,n,r,s;return!!this.isRunning&&(i=this.camera,n=this.red/255,r=this.green/255,s=this.blue/255,t.drawFillRect(i.x,i.y,i.width,i.height,e(s,r,n,1),this.alpha),!0)},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(a.FLASH_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null}});t.exports=i},function(t,e,i){var s=i(18),n=i(0),h=i(134),l=i(37),r=i(3),i=new n({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.source=new r,this.current=new r,this.destination=new r,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,n,r,s,o){void 0===i&&(i=1e3),void 0===n&&(n=h.Linear),void 0===s&&(s=null),void 0===o&&(o=this.camera.scene);var a=this.camera;return!(r=void 0===r?!1:r)&&this.isRunning||(this.isRunning=!0,this.duration=i,this.progress=0,this.source.set(a.scrollX,a.scrollY),this.destination.set(t,e),a.getScroll(t,e,this.current),"string"==typeof n&&h.hasOwnProperty(n)?this.ease=h[n]:"function"==typeof n&&(this.ease=n),this._elapsed=0,this._onUpdate=s,this._onUpdateScope=o,this.camera.emit(l.PAN_START,this.camera,this,i,t,e)),a},update:function(t,e){var i,n,r;this.isRunning&&(this._elapsed+=e,e=s(this._elapsed/this.duration,0,1),this.progress=e,i=this.camera,this._elapsed<this.duration?(r=this.ease(e),i.getScroll(this.destination.x,this.destination.y,this.current),n=this.source.x+(this.current.x-this.source.x)*r,r=this.source.y+(this.current.y-this.source.y)*r,i.setScroll(n,r),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,i,e,n,r)):(i.centerOn(this.destination.x,this.destination.y),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,i,e,i.scrollX,i.scrollY),this.effectComplete()))},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(l.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}});t.exports=i},function(t,e){t.exports=function(t,e){return t*t*(((e=void 0===e?1.70158:e)+1)*t-e)}},function(t,e){t.exports=function(t,e){return--t*t*(((e=void 0===e?1.70158:e)+1)*t+e)+1}},function(t,e){t.exports=function(t,e){e=1.525*(e=void 0===e?1.70158:e);return(t*=2)<1?t*t*((1+e)*t-e)*.5:.5*((t-=2)*t*((1+e)*t+e)+2)}},function(t,e){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)}},function(t,e){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}},function(t,e){t.exports=function(t){var e=!1;return t<.5?(t=1-2*t,e=!0):t=2*t-1,t<1/2.75?t*=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?.5*(1-t):.5*t+.5}},function(t,e){t.exports=function(t){return 1-Math.sqrt(1-t*t)}},function(t,e){t.exports=function(t){return Math.sqrt(1- --t*t)}},function(t,e){t.exports=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},function(t,e){t.exports=function(t){return t*t*t}},function(t,e){t.exports=function(t){return--t*t*t+1}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},function(t,e){t.exports=function(t,e,i){var n;return void 0===e&&(e=.1),void 0===i&&(i=.1),0===t?0:1===t?1:(n=i/4,e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),-e*Math.pow(2,10*--t)*Math.sin((t-n)*(2*Math.PI)/i))}},function(t,e){t.exports=function(t,e,i){var n;return void 0===e&&(e=.1),void 0===i&&(i=.1),0===t?0:1===t?1:(n=i/4,e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*t)*Math.sin((t-n)*(2*Math.PI)/i)+1)}},function(t,e){t.exports=function(t,e,i){var n;return void 0===e&&(e=.1),void 0===i&&(i=.1),0===t?0:1===t?1:(n=i/4,e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),(t*=2)<1?e*Math.pow(2,10*--t)*Math.sin((t-n)*(2*Math.PI)/i)*-.5:e*Math.pow(2,-10*--t)*Math.sin((t-n)*(2*Math.PI)/i)*.5+1)}},function(t,e){t.exports=function(t){return Math.pow(2,10*(t-1))-.001}},function(t,e){t.exports=function(t){return 1-Math.pow(2,-10*t)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))}},function(t,e){t.exports=function(t){return t}},function(t,e){t.exports=function(t){return t*t}},function(t,e){t.exports=function(t){return t*(2-t)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},function(t,e){t.exports=function(t){return t*t*t*t}},function(t,e){t.exports=function(t){return 1- --t*t*t*t}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},function(t,e){t.exports=function(t){return t*t*t*t*t}},function(t,e){t.exports=function(t){return--t*t*t*t*t+1}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:1-Math.cos(t*Math.PI/2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:Math.sin(t*Math.PI/2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:.5*(1-Math.cos(Math.PI*t))}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1),t<=0?0:1<=t?1:1/e*(1+(e*t|0))}},function(t,e,i){var s=i(18),n=i(0),o=i(37),r=i(3),i=new n({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.intensity=new r,this.progress=0,this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,n,r){return void 0===t&&(t=100),void 0===e&&(e=.05),void 0===n&&(n=null),void 0===r&&(r=this.camera.scene),!(i=void 0===i?!1: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=r,this.camera.emit(o.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){var i,n,r;this.isRunning&&(this._elapsed+=e,this.progress=s(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed<this.duration?(e=this.intensity,i=this.camera.width,n=this.camera.height,r=this.camera.zoom,this._offsetX=(Math.random()*e.x*i*2-e.x*i)*r,this._offsetY=(Math.random()*e.y*n*2-e.y*n)*r,this.camera.roundPixels&&(this._offsetX=Math.round(this._offsetX),this._offsetY=Math.round(this._offsetY))):this.effectComplete())},effectComplete:function(){this._offsetX=0,this._offsetY=0,this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(o.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}});t.exports=i},function(t,e,i){var a=i(18),n=i(0),h=i(37),l=i(134),i=new n({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,r,s,o){void 0===i&&(i=1e3),void 0===n&&(n=l.Linear),void 0===r&&(r=!1),void 0===s&&(s=null),void 0===o&&(o=this.camera.scene),this.shortestPath=e=void 0===e?!1:e;e=t,t<0?(e=-1*t,this.clockwise=!1):this.clockwise=!0,t=360*Math.PI/180;e-=Math.floor(e/t)*t;var a=this.camera;return!r&&this.isRunning||(this.isRunning=!0,this.duration=i,this.progress=0,this.source=a.rotation,this.destination=e,"string"==typeof n&&l.hasOwnProperty(n)?this.ease=l[n]:"function"==typeof n&&(this.ease=n),this._elapsed=0,this._onUpdate=s,this._onUpdateScope=o,this.shortestPath&&((r=this.destination>this.source?Math.abs(this.destination-this.source):Math.abs(this.destination+t)-this.source)<(n=this.source>this.destination?Math.abs(this.source-this.destination):Math.abs(this.source+t)-this.destination)?this.clockwise=!0:n<r&&(this.clockwise=!1)),this.camera.emit(h.ROTATE_START,this.camera,this,i,e)),a},update:function(t,e){var i,n,r,s,o;this.isRunning&&(this._elapsed+=e,e=a(this._elapsed/this.duration,0,1),this.progress=e,i=this.camera,this._elapsed<this.duration?(n=this.ease(e),this.current=i.rotation,o=360*Math.PI/180,r=this.destination,s=this.current,!1===this.clockwise&&(r=this.current,s=this.destination),r=s<=r?Math.abs(r-s):Math.abs(r+o)-s,o=this.clockwise?i.rotation+r*n:i.rotation-r*n,i.rotation=o,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,i,e,o)):(i.rotation=this.destination,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,i,e,this.destination),this.effectComplete()))},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(h.ROTATE_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null,this.source=null,this.destination=null}});t.exports=i},function(t,e,i){var n=i(18),r=i(0),a=i(134),h=i(37),i=new r({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,r,s){void 0===e&&(e=1e3),void 0===i&&(i=a.Linear),void 0===r&&(r=null),void 0===s&&(s=this.camera.scene);var o=this.camera;return!(n=void 0===n?!1:n)&&this.isRunning||(this.isRunning=!0,this.duration=e,this.progress=0,this.source=o.zoom,this.destination=t,"string"==typeof i&&a.hasOwnProperty(i)?this.ease=a[i]:"function"==typeof i&&(this.ease=i),this._elapsed=0,this._onUpdate=r,this._onUpdateScope=s,this.camera.emit(h.ZOOM_START,this.camera,this,e,t)),o},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(h.ZOOM_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null}});t.exports=i},function(t,e,i){var o=i(326),n=i(0),l=i(2),r=i(24),a=i(57),s=i(104),h=i(20),i=new n({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(h.BOOT,this.boot,this),t.sys.events.on(h.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 o(0,0,t.scale.width,t.scale.height).setScene(this.scene),t.game.scale.on(s.RESIZE,this.onResize,this),this.systems.events.once(h.DESTROY,this.destroy,this)},start:function(){this.main||((t=this.systems).settings.cameras?this.fromJSON(t.settings.cameras):this.add(),this.main=this.cameras[0]);var t=this.systems.events;t.on(h.UPDATE,this.update,this),t.once(h.SHUTDOWN,this.shutdown,this)},add:function(t,e,i,n,r,s){void 0===i&&(i=this.scene.sys.scale.width),void 0===n&&(n=this.scene.sys.scale.height),void 0===r&&(r=!1),void 0===s&&(s="");t=new o(t=void 0===t?0:t,e=void 0===e?0:e,i,n);return t.setName(s),t.setScene(this.scene),t.setRoundPixels(this.roundPixels),t.id=this.getNextID(),this.cameras.push(t),r&&(this.main=t),t},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,r=0;r<t.length;r++){var s=t[r];s&&s.id===e&&(n=!0)}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 r=i[n];t&&!r.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 r=t[n],s=l(r,"x",0),o=l(r,"y",0),a=l(r,"width",e),h=l(r,"height",i),s=this.add(s,o,a,h),o=(s.name=l(r,"name",""),s.zoom=l(r,"zoom",1),s.rotation=l(r,"rotation",0),s.scrollX=l(r,"scrollX",0),s.scrollY=l(r,"scrollY",0),s.roundPixels=l(r,"roundPixels",!1),s.visible=l(r,"visible",!0),l(r,"backgroundColor",!1));o&&s.setBackgroundColor(o);var a=l(r,"bounds",null);a&&(h=l(a,"x",0),o=l(a,"y",0),r=l(a,"width",e),a=l(a,"height",i),s.setBounds(h,o,r,a))}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,r=[],s=0;s<e.length;s++){var o=e[s];o.visible&&o.inputEnabled&&a(o,i,n)&&r.unshift(o)}return r},remove:function(t,e){void 0===e&&(e=!0),Array.isArray(t)||(t=[t]);for(var i=0,n=this.cameras,r=0;r<t.length;r++){var s=n.indexOf(t[r]);-1!==s&&(e?n[s].destroy():n[s].renderList=[],n.splice(s,1),i++)}return!this.main&&n[0]&&(this.main=n[0]),i},render:function(t,e){for(var i=this.scene,n=this.cameras,r=0;r<this.cameras.length;r++){var s,o=n[r];o.visible&&0<o.alpha&&(o.preRender(),s=this.getVisibleChildren(e.getChildren(),o),t.render(i,s,o))}},getVisibleChildren:function(t,e){for(var i=[],n=0;n<t.length;n++){var r=t[n];r.willRender(e)&&i.push(r)}return i},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)},onResize:function(t,e,i,n,r){for(var s=0;s<this.cameras.length;s++){var o=this.cameras[s];0===o._x&&0===o._y&&o._width===n&&o._height===r&&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(h.UPDATE,this.update,this),e.off(h.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.default.destroy(),this.scene.sys.events.off(h.START,this.start,this),this.scene=null,this.systems=null}});r.register("CameraManager",i,"cameras"),t.exports=i},function(t,e){t.exports="enterfullscreen"},function(t,e){t.exports="fullscreenfailed"},function(t,e){t.exports="fullscreenunsupported"},function(t,e){t.exports="leavefullscreen"},function(t,e){t.exports="orientationchange"},function(t,e){t.exports="resize"},function(t,e,i){t.exports={Config:i(346),CreateRenderer:i(366),DebugHeader:i(384),Events:i(22),TimeStep:i(385),VisibilityHandler:i(387)}},function(t,e){var i,n,t=t.exports={};function r(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function o(e){if(i===setTimeout)return setTimeout(e,0);if((i===r||!i)&&setTimeout)return(i=setTimeout)(e,0);try{return i(e,0)}catch(t){try{return i.call(null,e,0)}catch(t){return i.call(this,e,0)}}}try{i="function"==typeof setTimeout?setTimeout:r}catch(t){i=r}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(t){n=s}var a,h=[],l=!1,c=-1;function u(){l&&a&&(l=!1,a.length?h=a.concat(h):c=-1,h.length&&d())}function d(){if(!l){var t=o(u);l=!0;for(var e=h.length;e;){for(a=h,h=[];++c<e;)a&&a[c].run();c=-1,e=h.length}a=null,l=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===s||!n)&&clearTimeout)return(n=clearTimeout)(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function f(){}t.nextTick=function(t){var e=new Array(arguments.length-1);if(1<arguments.length)for(var i=1;i<arguments.length;i++)e[i-1]=arguments[i];h.push(new p(t,e)),1!==h.length||l||o(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},t.title="browser",t.browser=!0,t.env={},t.argv=[],t.version="",t.versions={},t.on=f,t.addListener=f,t.once=f,t.off=f,t.removeListener=f,t.removeAllListeners=f,t.emit=f,t.prependListener=f,t.prependOnceListener=f,t.listeners=function(t){return[]},t.binding=function(t){throw new Error("process.binding is not supported")},t.cwd=function(){return"/"},t.chdir=function(t){throw new Error("process.chdir is not supported")},t.umask=function(){return 0}},function(t,e,i){var i=i(136),n={gamepads:!1,mspointer:!1,touch:!1,wheelEvent:null};t.exports=("function"!=typeof importScripts&&(("ontouchstart"in document.documentElement||navigator.maxTouchPoints&&1<=navigator.maxTouchPoints)&&(n.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(n.mspointer=!0),navigator.getGamepads&&(n.gamepads=!0),"onwheel"in window||i.ie&&"WheelEvent"in window?n.wheelEvent="wheel":"onmousewheel"in window?n.wheelEvent="mousewheel":i.firefox&&"MouseScrollEvent"in window&&(n.wheelEvent="DOMMouseScroll")),n)},function(t,e,i){var r=i(136),s={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){s.audioData=!!window.Audio,s.webAudio=!(!window.AudioContext&&!window.webkitAudioContext);var t,e,i=document.createElement("audio"),n=!!i.canPlayType;try{n&&(i.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,"")&&(s.ogg=!0),(i.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,"")||i.canPlayType("audio/opus;").replace(/^no$/,""))&&(s.opus=!0),i.canPlayType("audio/mpeg;").replace(/^no$/,"")&&(s.mp3=!0),i.canPlayType("audio/wav").replace(/^no$/,"")&&(s.wav=!0),(i.canPlayType("audio/x-m4a;")||i.canPlayType("audio/aac;").replace(/^no$/,""))&&(s.m4a=!0),i.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")&&(s.webm=!0),""!==i.canPlayType('audio/mp4;codecs="ec-3"')&&(r.edge?s.dolby=!0:r.safari&&9<=r.safariVersion&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)&&(t=parseInt(RegExp.$1,10),e=parseInt(RegExp.$2,10),(10===t&&11<=e||10<t)&&(s.dolby=!0))))}catch(t){}}return s}()},function(t,e){var i={h264:!1,hls:!1,mp4:!1,ogg:!1,vp9:!1,webm:!1};t.exports=function(){if("function"!=typeof importScripts){var t=document.createElement("video"),e=!!t.canPlayType;try{e&&(t.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,"")&&(i.ogg=!0),t.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,"")&&(i.h264=!0,i.mp4=!0),t.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")&&(i.webm=!0),t.canPlayType('video/webm; codecs="vp9"').replace(/^no$/,"")&&(i.vp9=!0),t.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(/^no$/,"")&&(i.hls=!0))}catch(t){}}return i}()},function(t,e){var s={available:!1,cancel:"",keyboard:!1,request:""};t.exports=function(){if("function"!=typeof importScripts){for(var t="Fullscreen",e="FullScreen",i=["request"+t,"request"+e,"webkitRequest"+t,"webkitRequest"+e,"msRequest"+t,"msRequest"+e,"mozRequest"+e,"mozRequest"+t],n=0;n<i.length;n++)if(document.documentElement[i[n]]){s.available=!0,s.request=i[n];break}var r=["cancel"+e,"exit"+t,"webkitCancel"+e,"webkitExit"+t,"msCancel"+e,"msExit"+t,"mozCancel"+e,"mozExit"+t];if(s.available)for(n=0;n<r.length;n++)if(document[r[n]]){s.cancel=r[n];break}window.Element&&Element.ALLOW_KEYBOARD_INPUT&&!/ Version\/5\.1(?:\.\d+)? Safari\//.test(navigator.userAgent)&&(s.keyboard=!0),Object.defineProperty(s,"active",{get:function(){return!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)}})}return s}()},function(t,e,i){t.exports={Between:i(349),BetweenPoints:i(350),BetweenPointsY:i(813),BetweenY:i(814),CounterClockwise:i(815),Normalize:i(351),Random:i(816),RandomDegrees:i(817),Reverse:i(818),RotateTo:i(819),ShortestBetween:i(820),Wrap:i(269),WrapDegrees:i(270)}},function(t,e){t.exports=function(t,e){return Math.atan2(e.x-t.x,e.y-t.y)}},function(t,e){t.exports=function(t,e,i,n){return Math.atan2(i-t,n-e)}},function(t,e,i){var n=i(14);t.exports=function(t){return t>Math.PI&&(t-=n.PI2),Math.abs(((t+n.TAU)%n.PI2-n.PI2)%n.PI2)}},function(t,e,i){var n=i(137);t.exports=function(){return n(-Math.PI,Math.PI)}},function(t,e,i){var n=i(137);t.exports=function(){return n(-180,180)}},function(t,e,i){var n=i(351);t.exports=function(t){return n(t+Math.PI)}},function(t,e,i){var n=i(14);t.exports=function(t,e,i){return void 0===i&&(i=.05),t!==e&&(Math.abs(e-t)<=i||Math.abs(e-t)>=n.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(e<t?e+=n.PI2:e-=n.PI2),t<e?t+=i:e<t&&(t-=i))),t}},function(t,e){t.exports=function(t,e){e-=t;return 0==e?0:e-360*Math.floor((180+e)/360)}},function(t,e,i){t.exports={Between:i(50),BetweenPoints:i(352),BetweenPointsSquared:i(822),Chebyshev:i(823),Power:i(824),Snake:i(825),Squared:i(353)}},function(t,e){t.exports=function(t,e){var i=t.x-e.x,t=t.y-e.y;return i*i+t*t}},function(t,e){t.exports=function(t,e,i,n){return Math.max(Math.abs(t-i),Math.abs(e-n))}},function(t,e){t.exports=function(t,e,i,n,r){return void 0===r&&(r=2),Math.sqrt(Math.pow(i-t,r)+Math.pow(n-e,r))}},function(t,e){t.exports=function(t,e,i,n){return Math.abs(t-i)+Math.abs(e-n)}},function(t,e,i){t.exports={Back:i(334),Bounce:i(335),Circular:i(336),Cubic:i(337),Elastic:i(338),Expo:i(339),Linear:i(340),Quadratic:i(341),Quartic:i(342),Quintic:i(343),Sine:i(344),Stepped:i(345)}},function(t,e,i){t.exports={Ceil:i(828),Equal:i(124),Floor:i(829),GreaterThan:i(354),LessThan:i(355)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.ceil(t-e)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.floor(t+e)}},function(t,e,i){t.exports={Bezier:i(831),CatmullRom:i(832),CubicBezier:i(358),Linear:i(833),QuadraticBezier:i(359),SmoothStep:i(360),SmootherStep:i(834)}},function(t,e,i){var s=i(356);t.exports=function(t,e){for(var i=0,n=t.length-1,r=0;r<=n;r++)i+=Math.pow(1-e,n-r)*Math.pow(e,r)*t[r]*s(n,r);return i}},function(t,e,i){var s=i(194);t.exports=function(t,e){var i=t.length-1,n=i*e,r=Math.floor(n);return t[0]===t[i]?(e<0&&(r=Math.floor(n=i*(1+e))),s(n-r,t[(r-1+i)%i],t[r],t[(r+1)%i],t[(r+2)%i])):e<0?t[0]-(s(-n,t[0],t[0],t[1],t[1])-t[0]):1<e?t[i]-(s(n-i,t[i],t[i],t[i-1],t[i-1])-t[i]):s(n-r,t[r?r-1:0],t[r],t[i<r+1?i:r+1],t[i<r+2?i:r+2])}},function(t,e,i){var s=i(135);t.exports=function(t,e){var i=t.length-1,n=i*e,r=Math.floor(n);return e<0?s(t[0],t[1],n):1<e?s(t[i],t[i-1],i-n):s(t[r],t[i<r+1?i:r+1],n-r)}},function(t,e,i){var n=i(183);t.exports=function(t,e,i){return e+(i-e)*n(t,0,1)}},function(t,e,i){t.exports={GetNext:i(361),IsSize:i(138),IsValue:i(836)}},function(t,e){t.exports=function(t){return 0<t&&0==(t&t-1)}},function(t,e,i){t.exports={Ceil:i(139),Floor:i(76),To:i(838)}},function(t,e){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)}},function(t,e,i){i=new(i(0))({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+2.3283064365386963e-10*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=(e=((e=.02519603282416938*(i+=t.charCodeAt(n)))-(i=e>>>0))*i)>>>0,i+=4294967296*(e-=i);return 2.3283064365386963e-10*((this.n=i)>>>0)},init:function(t){"string"==typeof t?this.state(t):this.sow(t)},sow:function(t){if(this.n=4022871197,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 4294967296*this.rnd()},frac:function(){return this.rnd()+11102230246251565e-32*(2097152*this.rnd()|0)},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(){for(var t="",e="",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-1)+.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;0<e;e--){var i=Math.floor(this.frac()*(e+1)),n=t[i];t[i]=t[e],t[e]=n}return t}});t.exports=i},function(t,e){t.exports=function(t){for(var e=0,i=0;i<t.length;i++)e+=+t[i];return e/t.length}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);i=Math.pow(i,-e);return Math.ceil(t*i)/i}},function(t,e){t.exports=function(t,e){return Math.abs(t-e)}},function(t,e,i){var m=i(18),n=i(0),r=i(69),s=i(1),o=new r,i=new n({initialize:function t(e,i,n,r){void 0===i&&(i=0),void 0===n&&(n=0),void 0===r&&(r=t.DefaultOrder),this._x=e=void 0===e?0:e,this._y=i,this._z=n,this._order=r,this.onChangeCallback=s},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)}},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),o.fromQuat(t),this.setFromRotationMatrix(o,e,i)},setFromRotationMatrix:function(t,e,i){void 0===e&&(e=this._order),void 0===i&&(i=!1);var t=t.val,n=t[0],r=t[4],s=t[8],o=t[1],a=t[5],h=t[9],l=t[2],c=t[6],u=t[10],d=0,p=0,f=0,g=.99999;switch(e){case"XYZ":p=Math.asin(m(s,-1,1)),Math.abs(s)<g?(d=Math.atan2(-h,u),f=Math.atan2(-r,n)):d=Math.atan2(c,a);break;case"YXZ":d=Math.asin(-m(h,-1,1)),Math.abs(h)<g?(p=Math.atan2(s,u),f=Math.atan2(o,a)):p=Math.atan2(-l,n);break;case"ZXY":d=Math.asin(m(c,-1,1)),f=Math.abs(c)<g?(p=Math.atan2(-l,u),Math.atan2(-r,a)):Math.atan2(o,n);break;case"ZYX":p=Math.asin(-m(l,-1,1)),f=Math.abs(l)<g?(d=Math.atan2(c,u),Math.atan2(o,n)):Math.atan2(-r,a);break;case"YZX":f=Math.asin(m(o,-1,1)),p=Math.abs(o)<g?(d=Math.atan2(-h,a),Math.atan2(-l,n)):Math.atan2(s,u);break;case"XZY":f=Math.asin(-m(r,-1,1)),Math.abs(r)<g?(d=Math.atan2(c,a),p=Math.atan2(s,n)):d=Math.atan2(-h,u)}return this._x=d,this._y=p,this._z=f,this._order=e,i&&this.onChangeCallback(this),this}});i.RotationOrders=["XYZ","YXZ","ZXY","ZYX","YZX","XZY"],i.DefaultOrder="XYZ",t.exports=i},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);i=Math.pow(i,-e);return Math.floor(t*i)/i}},function(t,e){t.exports=function(t,e){return t/e/1e3}},function(t,e){t.exports=function(t){return t==parseFloat(t)?!(t%2):void 0}},function(t,e){t.exports=function(t){return t===parseFloat(t)?!(t%2):void 0}},function(t,e){t.exports=function(t,e,i){return Math.min(t+e,i)}},function(t,e){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]}},function(t,e){t.exports=function(t,e,i){return Math.max(t-e,i)}},function(t,e){t.exports=function(t,e,i,n){e=(t-e)/((i=void 0===i?e+1:i)-e);return 1<e?void 0!==n?(e=(n-t)/(n-i))<0&&(e=0):e=1:e<0&&(e=0),e}},function(t,e){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}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI,n=2*Math.random()-1,r=Math.sqrt(1-n*n)*e;return t.x=Math.cos(i)*r,t.y=Math.sin(i)*r,t.z=n*e,t}},function(t,e){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}},function(t,e){t.exports=function(t,e,i,n,r){return t.x=e+r*Math.cos(n),t.y=i+r*Math.sin(n),t}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);i=Math.pow(i,-e);return Math.round(t*i)/i}},function(t,e){t.exports=function(t,e,i,n){void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=1),n*=Math.PI/t;for(var r=[],s=[],o=0;o<t;o++)e+=(i-=e*n)*n,r[o]=i,s[o]=e;return{sin:s,cos:r,length:t}}},function(t,e,i){var o=i(3);t.exports=function(t,e,i,n){void 0===n&&(n=new o);var r=0,s=0;return 0<t&&t<=e*i&&(r=e-1<t?t-(s=Math.floor(t/e))*e:t),n.set(r,s)}},function(t,e){t.exports=function(t,e,i){return Math.abs(t-e)<=i}},function(t,e,i){var n=i(39),r=i(69),i=i(365),s=new r,o=new i,a=new n;t.exports=function(t,e,i){return o.setAxisAngle(e,i),s.fromRotationTranslation(o,a.set(0,0,0)),t.transformMat4(s)}},function(t,e){t.exports="addtexture"},function(t,e){t.exports="onerror"},function(t,e){t.exports="onload"},function(t,e){t.exports="ready"},function(t,e){t.exports="removetexture"},function(t,e){t.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_FS","","precision mediump float;","","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uMaskSampler;","uniform bool uInvertMaskAlpha;","","void main ()","{"," vec2 uv = gl_FragCoord.xy / uResolution;"," vec4 mainColor = texture2D(uMainSampler, uv);"," vec4 maskColor = texture2D(uMaskSampler, uv);"," float alpha = mainColor.a;",""," if (!uInvertMaskAlpha)"," {"," alpha *= (maskColor.a);"," }"," else"," {"," alpha *= (1.0 - maskColor.a);"," }",""," gl_FragColor = vec4(mainColor.rgb * alpha, alpha);","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_VS","","precision mediump float;","","attribute vec2 inPosition;","","void main ()","{"," gl_Position = vec4(inPosition, 0.0, 1.0);","}",""].join("\n")},function(t,e){t.exports="pipelineafterflush"},function(t,e){t.exports="pipelinebeforeflush"},function(t,e){t.exports="pipelinebind"},function(t,e){t.exports="pipelineboot"},function(t,e){t.exports="pipelinedestroy"},function(t,e){t.exports="pipelinerebind"},function(t,e){t.exports="pipelineresize"},function(t,e){t.exports=["#define SHADER_NAME PHASER_GRAPHICS_FS","","precision mediump float;","","varying vec4 outColor;","","void main ()","{"," gl_FragColor = vec4(outColor.bgr * outColor.a, outColor.a);","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_GRAPHICS_VS","","precision mediump float;","","uniform mat4 uProjectionMatrix;","","attribute vec2 inPosition;","attribute vec4 inColor;","","varying vec4 outColor;","","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);",""," outColor = inColor;","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_LIGHT_FS","","precision mediump float;","","struct Light","{"," vec2 position;"," vec3 color;"," float intensity;"," float radius;","};","","const int kMaxLights = %LIGHT_COUNT%;","","uniform vec4 uCamera; /* x, y, rotation, zoom */","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uNormSampler;","uniform vec3 uAmbientLightColor;","uniform Light uLights[kMaxLights];","uniform mat3 uInverseRotationMatrix;","","varying vec2 outTexCoord;","varying vec4 outTint;","","void main()","{"," vec3 finalColor = vec3(0.0, 0.0, 0.0);"," vec4 color = texture2D(uMainSampler, outTexCoord) * vec4(outTint.bgr * outTint.a, outTint.a);"," vec3 normalMap = texture2D(uNormSampler, outTexCoord).rgb;"," vec3 normal = normalize(uInverseRotationMatrix * vec3(normalMap * 2.0 - 1.0));"," vec2 res = vec2(min(uResolution.x, uResolution.y)) * uCamera.w;",""," for (int index = 0; index < kMaxLights; ++index)"," {"," Light light = uLights[index];"," vec3 lightDir = vec3((light.position.xy / res) - (gl_FragCoord.xy / res), 0.1);"," vec3 lightNormal = normalize(lightDir);"," float distToSurf = length(lightDir) * uCamera.w;"," float diffuseFactor = max(dot(normal, lightNormal), 0.0);"," float radius = (light.radius / res.x * uCamera.w) * uCamera.w;"," float attenuation = clamp(1.0 - distToSurf * distToSurf / (radius * radius), 0.0, 1.0);"," vec3 diffuse = light.color * diffuseFactor;"," finalColor += (attenuation * diffuse) * light.intensity;"," }",""," vec4 colorOutput = vec4(uAmbientLightColor + finalColor, 1.0);",""," gl_FragColor = color * vec4(colorOutput.rgb * colorOutput.a, colorOutput.a);","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_MULTI_FS","","precision mediump float;","","uniform sampler2D uMainSampler[%count%];","","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{"," vec4 texture;",""," %forloop%",""," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);",""," // Multiply texture tint"," vec4 color = texture * texel;",""," if (outTintEffect == 1.0)"," {"," // Solid color + texture alpha"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," // Solid color, no texture"," color = texel;"," }",""," gl_FragColor = color;","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_MULTI_VS","","precision mediump float;","","uniform mat4 uProjectionMatrix;","","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTexId;","attribute float inTintEffect;","attribute vec4 inTint;","","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);",""," outTexCoord = inTexCoord;"," outTexId = inTexId;"," outTint = inTint;"," outTintEffect = inTintEffect;","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_POINTLIGHT_FS","","precision mediump float;","","uniform vec2 uResolution;","uniform float uCameraZoom;","","varying vec4 lightPosition;","varying vec4 lightColor;","varying float lightRadius;","varying float lightAttenuation;","","void main ()","{"," vec2 center = (lightPosition.xy + 1.0) * (uResolution.xy * 0.5);",""," float distToSurf = length(center - gl_FragCoord.xy);",""," float radius = 1.0 - distToSurf / (lightRadius * uCameraZoom);",""," float intensity = smoothstep(0.0, 1.0, radius * lightAttenuation);",""," vec4 color = vec4(intensity, intensity, intensity, 0.0) * lightColor;",""," gl_FragColor = vec4(color.rgb * lightColor.a, color.a);","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_POINTLIGHT_VS","","precision mediump float;","","uniform mat4 uProjectionMatrix;","","attribute vec2 inPosition;","attribute vec2 inLightPosition;","attribute vec4 inLightColor;","attribute float inLightRadius;","attribute float inLightAttenuation;","","varying vec4 lightPosition;","varying vec4 lightColor;","varying float lightRadius;","varying float lightAttenuation;","","void main ()","{"," lightColor = inLightColor;"," lightRadius = inLightRadius;"," lightAttenuation = inLightAttenuation;"," lightPosition = uProjectionMatrix * vec4(inLightPosition, 1.0, 1.0);",""," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_SINGLE_FS","","precision mediump float;","","uniform sampler2D uMainSampler;","","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);",""," // Multiply texture tint"," vec4 color = texture * texel;",""," if (outTintEffect == 1.0)"," {"," // Solid color + texture alpha"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," // Solid color, no texture"," color = texel;"," }",""," gl_FragColor = color;","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_SINGLE_VS","","precision mediump float;","","uniform mat4 uProjectionMatrix;","","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTexId;","attribute float inTintEffect;","attribute vec4 inTint;","","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);",""," outTexCoord = inTexCoord;"," outTint = inTint;"," outTintEffect = inTintEffect;","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_ADD_BLEND_FS","","precision mediump float;","","uniform sampler2D uMainSampler1;","uniform sampler2D uMainSampler2;","uniform float uStrength;","","varying vec2 outTexCoord;","","void main ()","{"," vec4 frame1 = texture2D(uMainSampler1, outTexCoord);"," vec4 frame2 = texture2D(uMainSampler2, outTexCoord);",""," gl_FragColor = frame1 + frame2 * uStrength;","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_COLORMATRIX_FS","","precision mediump float;","","uniform sampler2D uMainSampler;","uniform float uColorMatrix[20];","uniform float uAlpha;","","varying vec2 outTexCoord;","","void main ()","{"," vec4 c = texture2D(uMainSampler, outTexCoord);",""," if (uAlpha == 0.0)"," {"," gl_FragColor = c;",""," return;"," }",""," if (c.a > 0.0)"," {"," c.rgb /= c.a;"," }",""," vec4 result;",""," result.r = (uColorMatrix[0] * c.r) + (uColorMatrix[1] * c.g) + (uColorMatrix[2] * c.b) + (uColorMatrix[3] * c.a) + uColorMatrix[4];"," result.g = (uColorMatrix[5] * c.r) + (uColorMatrix[6] * c.g) + (uColorMatrix[7] * c.b) + (uColorMatrix[8] * c.a) + uColorMatrix[9];"," result.b = (uColorMatrix[10] * c.r) + (uColorMatrix[11] * c.g) + (uColorMatrix[12] * c.b) + (uColorMatrix[13] * c.a) + uColorMatrix[14];"," result.a = (uColorMatrix[15] * c.r) + (uColorMatrix[16] * c.g) + (uColorMatrix[17] * c.b) + (uColorMatrix[18] * c.a) + uColorMatrix[19];",""," vec3 rgb = mix(c.rgb, result.rgb, uAlpha);",""," rgb *= result.a;",""," gl_FragColor = vec4(rgb, result.a);","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_COPY_FS","","precision mediump float;","","uniform sampler2D uMainSampler;","uniform float uBrightness;","","varying vec2 outTexCoord;","","void main ()","{"," gl_FragColor = texture2D(uMainSampler, outTexCoord) * uBrightness;","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_LINEAR_BLEND_FS","","precision mediump float;","","uniform sampler2D uMainSampler1;","uniform sampler2D uMainSampler2;","uniform float uStrength;","","varying vec2 outTexCoord;","","void main ()","{"," vec4 frame1 = texture2D(uMainSampler1, outTexCoord);"," vec4 frame2 = texture2D(uMainSampler2, outTexCoord);",""," gl_FragColor = mix(frame1, frame2 * uStrength, 0.5);","}",""].join("\n")},function(t,e,i){t.exports={GenerateTexture:i(388),Palettes:i(889)}},function(t,e,i){t.exports={ARNE16:i(389),C64:i(890),CGA:i(891),JMP:i(892),MSX:i(893)}},function(t,e){t.exports={0:"#000",1:"#fff",2:"#8b4131",3:"#7bbdc5",4:"#8b41ac",5:"#6aac41",6:"#3931a4",7:"#d5de73",8:"#945a20",9:"#5a4100",A:"#bd736a",B:"#525252",C:"#838383",D:"#acee8b",E:"#7b73de",F:"#acacac"}},function(t,e){t.exports={0:"#000",1:"#2234d1",2:"#0c7e45",3:"#44aacc",4:"#8a3622",5:"#5c2e78",6:"#aa5c3d",7:"#b5b5b5",8:"#5e606e",9:"#4c81fb",A:"#6cd947",B:"#7be2f9",C:"#eb8a60",D:"#e23d69",E:"#ffd93f",F:"#fff"}},function(t,e){t.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#f5f4eb"}},function(t,e){t.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#fff"}},function(t,e,i){t.exports={Path:i(895),MoveTo:i(393),CubicBezier:i(390),Curve:i(94),Ellipse:i(391),Line:i(392),QuadraticBezier:i(394),Spline:i(395)}},function(t,e,i){var n=i(0),l=i(390),o=i(391),r=i(5),s=i(392),a=i(393),h=i(394),c=i(10),u=i(395),d=i(3),p=i(14),f=new n({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.name="",this.curves=[],this.cacheLengths=[],this.autoClose=!1,this.startPoint=new d,this._tmpVec2A=new d,this._tmpVec2B=new d,"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 this.ellipseTo(t,t,0,360,e=void 0===e?!1: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 s(e,t)),this},cubicBezierTo:function(t,e,i,n,r,s){var o,a,h=this.getEndPoint(),i=t instanceof d?(o=t,a=e,i):(o=new d(i,n),a=new d(r,s),new d(t,e));return this.add(new l(h,o,a,i))},quadraticBezierTo:function(t,e,i,n){var r,s=this.getEndPoint(),i=t instanceof d?(r=t,e):(r=new d(i,n),new d(t,e));return this.add(new h(s,r,i))},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,r,s){t=new o(0,0,t,e,i,n,r,s),e=this.getEndPoint(this._tmpVec2A),i=t.getStartPoint(this._tmpVec2B);return e.subtract(i),t.x=e.x,t.y=e.y,this.add(t)},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(s.fromJSON(i));break;case"EllipseCurve":this.add(o.fromJSON(i));break;case"SplineCurve":this.add(u.fromJSON(i));break;case"CubicBezierCurve":this.add(l.fromJSON(i));break;case"QuadraticBezierCurve":this.add(h.fromJSON(i))}}return this},getBounds:function(t,e){void 0===e&&(e=16),(t=void 0===t?new c:t).x=Number.MAX_VALUE,t.y=Number.MAX_VALUE;for(var i=new c,n=p.MIN_SAFE_INTEGER,r=p.MIN_SAFE_INTEGER,s=0;s<this.curves.length;s++){var o=this.curves[s];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),r=Math.max(r,i.bottom))}return t.right=n,t.bottom=r,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++)e+=this.curves[i].getLength(),t.push(e);return this.cacheLengths=t},getEndPoint:function(t){return void 0===t&&(t=new d),0<this.curves.length?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 d);for(var i,n,r,s=t*this.getLength(),o=this.getCurveLengths(),a=0;a<o.length;){if(o[a]>=s)return i=o[a]-s,r=(n=this.curves[a]).getLength(),n.getPointAt(0===r?0:1-i/r,e);a++}return null},getPoints:function(t){void 0===t&&(t=12);for(var e,i=[],n=0;n<this.curves.length;n++){var r=this.curves[n];if(r.active)for(var s=r.getResolution(t),o=r.getPoints(s),a=0;a<o.length;a++){var h=o[a];e&&e.equals(h)||(i.push(h),e=h)}}return this.autoClose&&1<i.length&&!i[i.length-1].equals(i[0])&&i.push(i[0]),i},getRandomPoint:function(t){return void 0===t&&(t=new d),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(t=void 0===t?new d:t).copy(this.startPoint)},getTangent:function(t,e){void 0===e&&(e=new d);for(var i,n,r,s=t*this.getLength(),o=this.getCurveLengths(),a=0;a<o.length;){if(o[a]>=s)return i=o[a]-s,r=(n=this.curves[a]).getLength(),n.getTangentAt(0===r?0:1-i/r,e);a++}return null},lineTo:function(t,e){t instanceof d?this._tmpVec2B.copy(t):this._tmpVec2B.set(t,e);t=this.getEndPoint(this._tmpVec2A);return this.add(new s([t.x,t.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(t){return t.unshift(this.getEndPoint()),this.add(new u(t))},moveTo:function(t,e){return t instanceof d?this.add(new a(t.x,t.y)):this.add(new a(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}});r.register("path",function(t,e){return new f(t,e)}),t.exports=f},function(t,e,i){t.exports={DataManager:i(101),DataManagerPlugin:i(897),Events:i(315)}},function(t,e,i){var n=i(0),r=i(101),s=i(24),o=i(20),i=new n({Extends:r,initialize:function(t){r.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(){r.prototype.destroy.call(this),this.events.off(o.START,this.start,this),this.scene=null,this.systems=null}});s.register("DataManagerPlugin",i,"data"),t.exports=i},function(t,e,i){t.exports={Align:i(899),BaseShader:i(396),Bounds:i(902),Canvas:i(906),Color:i(397),ColorMatrix:i(198),Masks:i(916),RGB:i(200)}},function(t,e,i){var n=i(123),i=i(17)(!1,{In:i(900),To:i(901)},n);t.exports=i},function(t,e,i){t.exports={BottomCenter:i(290),BottomLeft:i(291),BottomRight:i(292),Center:i(293),LeftCenter:i(295),QuickSet:i(289),RightCenter:i(296),TopCenter:i(297),TopLeft:i(298),TopRight:i(299)}},function(t,e,i){t.exports={BottomCenter:i(277),BottomLeft:i(278),BottomRight:i(279),LeftBottom:i(280),LeftCenter:i(281),LeftTop:i(282),QuickSet:i(276),RightBottom:i(283),RightCenter:i(284),RightTop:i(285),TopCenter:i(286),TopLeft:i(287),TopRight:i(288)}},function(t,e,i){t.exports={CenterOn:i(294),GetBottom:i(42),GetBounds:i(903),GetCenterX:i(87),GetCenterY:i(89),GetLeft:i(43),GetOffsetX:i(904),GetOffsetY:i(905),GetRight:i(44),GetTop:i(45),SetBottom:i(55),SetCenterX:i(88),SetCenterY:i(90),SetLeft:i(53),SetRight:i(54),SetTop:i(52)}},function(t,e,i){var r=i(42),s=i(43),o=i(44),a=i(45);t.exports=function(t,e){void 0===e&&(e={});var i=s(t),n=a(t);return e.x=i,e.y=n,e.width=o(t)-i,e.height=r(t)-n,e}},function(t,e){t.exports=function(t){return t.width*t.originX}},function(t,e){t.exports=function(t){return t.height*t.originY}},function(t,e,i){t.exports={CanvasInterpolation:i(367),CanvasPool:i(31),Smoothing:i(192),TouchAction:i(907),UserSelect:i(908)}},function(t,e){t.exports=function(t,e){return t.style.msTouchAction=e=void 0===e?"none":e,t.style["ms-touch-action"]=e,t.style["touch-action"]=e,t}},function(t,e){t.exports=function(e,i){return void 0===i&&(i="none"),["-webkit-","-khtml-","-moz-","-ms-",""].forEach(function(t){e.style[t+"user-select"]=i}),e.style["-webkit-touch-callout"]=i,e.style["-webkit-tap-highlight-color"]="rgba(0, 0, 0, 0)",e}},function(t,e,i){var l=i(103);t.exports=function(t){void 0===t&&(t=1024);for(var e=[],i=255,n=0,r=0,s=0;s<=255;s++)e.push({r:i,g:s,b:r,color:l(i,s,r)});for(s=n=255;0<=s;s--)e.push({r:s,g:n,b:r,color:l(s,n,r)});for(s=i=0;s<=255;s++,n--)e.push({r:i,g:n,b:s,color:l(i,n,s)});for(r=255,s=n=0;s<=255;s++,r--,i++)e.push({r:i,g:n,b:r,color:l(i,n,r)});if(1024===t)return e;for(var o=[],a=0,h=1024/t,s=0;s<t;s++)o.push(e[Math.floor(a)]),a+=h;return o}},function(t,e){t.exports=function(t){var e={r:t>>16&255,g:t>>8&255,b:255&t,a:255};return 16777215<t&&(e.a=t>>>24),e}},function(t,e,i){var o=i(38),a=i(399);t.exports=function(t,e,i){var n=i,r=i,s=i;return 0!==e&&(n=a(e=2*i-(i=i<.5?i*(1+e):i+e-i*e),i,t+1/3),r=a(e,i,t),s=a(e,i,t-1/3)),(new o).setGLTo(n,r,s,1)}},function(t,e,i){var r=i(188);t.exports=function(t,e){void 0===t&&(t=1),void 0===e&&(e=1);for(var i=[],n=0;n<=359;n++)i.push(r(n/359,t,e));return i}},function(t,e,i){function o(t,e,i,n,r,s,o,a){a=(a=void 0===a?0:a)/(o=void 0===o?100:o);return{r:h(t,n,a),g:h(e,r,a),b:h(i,s,a)}}var h=i(135);t.exports={RGBWithRGB:o,ColorWithRGB:function(t,e,i,n,r,s){return o(t.r,t.g,t.b,e,i,n,r=void 0===r?100:r,s=void 0===s?0:s)},ColorWithColor:function(t,e,i,n){return o(t.r,t.g,t.b,e.r,e.g,e.b,i=void 0===i?100:i,n=void 0===n?0:n)}}},function(t,e,i){var n=i(195),r=i(38);t.exports=function(t,e){return new r(n(t=void 0===t?0:t,e=void 0===e?255:e),n(t,e),n(t,e))}},function(t,e,i){var s=i(398);t.exports=function(t,e,i,n,r){return void 0===n&&(n=255),"#"===(r=void 0===r?"#":r)?"#"+((1<<24)+(t<<16)+(e<<8)+i).toString(16).slice(1,7):"0x"+s(n)+s(t)+s(e)+s(i)}},function(t,e,i){t.exports={BitmapMask:i(310),GeometryMask:i(311)}},function(t,e,i){i={AddToDOM:i(142),DOMContentLoaded:i(400),GetInnerHeight:i(401),GetScreenOrientation:i(402),GetTarget:i(407),ParseXML:i(408),RemoveFromDOM:i(202),RequestAnimationFrame:i(386)};t.exports=i},function(t,e,i){t.exports={EventEmitter:i(919)}},function(t,e,i){var n=i(0),r=i(9),i=i(24),n=new n({Extends:r,initialize:function(){r.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});i.register("EventEmitter",n,"events"),t.exports=n},function(t,e,i){var n=i(142),r=i(321),s=i(325),o=i(31),a=i(0),h=i(346),l=i(921),c=i(366),u=i(101),d=i(384),p=i(347),f=i(400),g=i(9),m=i(22),y=i(409),v=i(24),x=i(414),b=i(415),w=i(417),T=i(106),S=i(422),P=i(385),_=i(387),E=i(426),i=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 r(this),this.textures=new S(this),this.cache=new s(this),this.registry=new u(this),this.input=new y(this,this.config),this.scene=new w(this,this.config.sceneConfig),this.device=p,this.scale=new b(this,this.config),this.sound=null,this.sound=E.create(this),this.loop=new P(this,this.config.fps),this.plugins=new x(this,this.config),this.pendingDestroy=!1,this.removeCanvas=!1,this.noReturn=!1,this.hasFocus=!1,f(this.boot.bind(this))},boot:function(){v.hasCore("EventEmitter")&&(this.isBooted=!0,this.config.preBoot(this),this.scale.preBoot(),c(this),l(this),d(this),n(this.canvas,this.config.parent),this.textures.once(T.READY,this.texturesReady,this),this.events.emit(m.BOOT))},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)),_(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();var i=this.events,n=(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.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();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),i.emit(m.PRE_RENDER),i.emit(m.POST_RENDER)},onHidden:function(){this.loop.pause(),this.events.emit(m.PAUSE)},onVisible:function(){this.loop.resume(),this.events.emit(m.RESUME)},onBlur:function(){this.hasFocus=!1,this.loop.blur()},onFocus:function(){this.hasFocus=!0,this.loop.focus()},getFrame:function(){return this.loop.frame},getTime:function(){return this.loop.now},destroy:function(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.removeChild(this.domContainer),this.loop.destroy(),this.pendingDestroy=!1}});t.exports=i},function(t,e,i){var n=i(142);t.exports=function(t){var e,i=t.config;i.parent&&i.domCreateContainer&&((e=document.createElement("div")).style.cssText=["display: block;","width: "+t.scale.width+"px;","height: "+t.scale.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: "+i.domPointerEvents+";","transform: scale(1);","transform-origin: left top;"].join(" "),t.domContainer=e,n(e,i.parent))}},function(t,e){t.exports="boot"},function(t,e){t.exports="destroy"},function(t,e){t.exports="dragend"},function(t,e){t.exports="dragenter"},function(t,e){t.exports="drag"},function(t,e){t.exports="dragleave"},function(t,e){t.exports="dragover"},function(t,e){t.exports="dragstart"},function(t,e){t.exports="drop"},function(t,e){t.exports="gameout"},function(t,e){t.exports="gameover"},function(t,e){t.exports="gameobjectdown"},function(t,e){t.exports="dragend"},function(t,e){t.exports="dragenter"},function(t,e){t.exports="drag"},function(t,e){t.exports="dragleave"},function(t,e){t.exports="dragover"},function(t,e){t.exports="dragstart"},function(t,e){t.exports="drop"},function(t,e){t.exports="gameobjectmove"},function(t,e){t.exports="gameobjectout"},function(t,e){t.exports="gameobjectover"},function(t,e){t.exports="pointerdown"},function(t,e){t.exports="pointermove"},function(t,e){t.exports="pointerout"},function(t,e){t.exports="pointerover"},function(t,e){t.exports="pointerup"},function(t,e){t.exports="wheel"},function(t,e){t.exports="gameobjectup"},function(t,e){t.exports="gameobjectwheel"},function(t,e){t.exports="boot"},function(t,e){t.exports="process"},function(t,e){t.exports="update"},function(t,e){t.exports="pointerdown"},function(t,e){t.exports="pointerdownoutside"},function(t,e){t.exports="pointermove"},function(t,e){t.exports="pointerout"},function(t,e){t.exports="pointerover"},function(t,e){t.exports="pointerup"},function(t,e){t.exports="pointerupoutside"},function(t,e){t.exports="wheel"},function(t,e){t.exports="pointerlockchange"},function(t,e){t.exports="preupdate"},function(t,e){t.exports="shutdown"},function(t,e){t.exports="start"},function(t,e){t.exports="update"},function(t,e){t.exports="addfile"},function(t,e){t.exports="complete"},function(t,e){t.exports="filecomplete"},function(t,e){t.exports="filecomplete-"},function(t,e){t.exports="loaderror"},function(t,e){t.exports="load"},function(t,e){t.exports="fileprogress"},function(t,e){t.exports="postprocess"},function(t,e){t.exports="progress"},function(t,e){t.exports="start"},function(t,e,i){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",impactPhysics:"impact",matterPhysics:"matter"}},function(t,e){t.exports=function(t,e,i){if(i.getElementsByTagName("TextureAtlas")){var n=t.source[e];t.add("__BASE",e,0,0,n.width,n.height);for(var r=i.getElementsByTagName("SubTexture"),s=0;s<r.length;s++){var o,a=r[s].attributes,h=a.name.value,l=parseInt(a.x.value,10),c=parseInt(a.y.value,10),u=parseInt(a.width.value,10),d=parseInt(a.height.value,10),h=t.add(h,e,l,c,u,d);a.frameX&&(l=Math.abs(parseInt(a.frameX.value,10)),c=Math.abs(parseInt(a.frameY.value,10)),o=parseInt(a.frameWidth.value,10),a=parseInt(a.frameHeight.value,10),h.setTrim(u,d,l,c,o,a))}return t}}},function(t,e){t.exports=function(t,e){var i=t.source[e];return t.add("__BASE",e,0,0,i.width,i.height),t}},function(t,e){t.exports=function(t,e){var i=t.source[e];return t.add("__BASE",e,0,0,i.width,i.height),t}},function(t,e,i){var c=i(77);t.exports=function(t,e,i){if(i.frames||i.textures){var n=t.source[e];t.add("__BASE",e,0,0,n.width,n.height);for(var r,s=(Array.isArray(i.textures)?i.textures[e]:i).frames,o=0;o<s.length;o++){var a=s[o],h=t.add(a.filename,e,a.frame.x,a.frame.y,a.frame.w,a.frame.h),l=(a.trimmed&&h.setTrim(a.sourceSize.w,a.sourceSize.h,a.spriteSourceSize.x,a.spriteSourceSize.y,a.spriteSourceSize.w,a.spriteSourceSize.h),a.rotated&&(h.rotated=!0,h.updateUVsInverted()),a.anchor||a.pivot);l&&(h.customPivot=!0,h.pivotX=l.x,h.pivotY=l.y),h.customData=c(a)}for(r in i)"frames"!==r&&(Array.isArray(i[r])?t.customData[r]=i[r].slice(0):t.customData[r]=i[r]);return t}}},function(t,e,i){var c=i(77);t.exports=function(t,e,i){if(i.frames){var n=t.source[e];t.add("__BASE",e,0,0,n.width,n.height);var r,s,o,a,h,l=i.frames;for(a in l)l.hasOwnProperty(a)&&(r=l[a],s=t.add(a,e,r.frame.x,r.frame.y,r.frame.w,r.frame.h),r.trimmed&&s.setTrim(r.sourceSize.w,r.sourceSize.h,r.spriteSourceSize.x,r.spriteSourceSize.y,r.spriteSourceSize.w,r.spriteSourceSize.h),r.rotated&&(s.rotated=!0,s.updateUVsInverted()),(o=r.anchor||r.pivot)&&(s.customPivot=!0,s.pivotX=o.x,s.pivotY=o.y),s.customData=c(r));for(h in i)"frames"!==h&&(Array.isArray(i[h])?t.customData[h]=i[h].slice(0):t.customData[h]=i[h]);return t}}},function(t,e,i){var w=i(2);t.exports=function(t,e,i,n,r,s,o){var a=w(o,"frameWidth",null),h=w(o,"frameHeight",a);if(null===a)throw new Error("TextureManager.SpriteSheet: Invalid frameWidth given.");var l=t.source[e],l=(t.add("__BASE",e,0,0,l.width,l.height),w(o,"startFrame",0)),c=w(o,"endFrame",-1),u=w(o,"margin",0),d=w(o,"spacing",0),p=Math.floor((r-u+d)/(a+d))*Math.floor((s-u+d)/(h+d));(l=p<l||l<-p?0:l)<0&&(l=p+l),-1!==c&&(p=l+(c+1));for(var f=u,g=u,m=0,y=0,v=0;v<p;v++){var y=m=0,x=f+a,b=g+h;t.add(v,e,i+f,n+g,a-(m=r<x?x-r:m),h-(y=s<b?b-s:y)),r<(f+=a+d)+a&&(f=u,g+=h+d)}return t}},function(t,e,i){var N=i(2);t.exports=function(t,e,i){var n=N(i,"frameWidth",null),r=N(i,"frameHeight",n);if(!n)throw new Error("TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.");var s=t.source[0],s=(t.add("__BASE",0,0,0,s.width,s.height),N(i,"startFrame",0)),o=N(i,"endFrame",-1),a=N(i,"margin",0),h=N(i,"spacing",0),l=e.cutX,c=e.cutY,i=e.cutWidth,B=e.cutHeight,u=e.realWidth,d=e.realHeight,p=Math.floor((u-a+h)/(n+h)),f=Math.floor((d-a+h)/(r+h)),g=p*f,m=e.x,y=n-m,v=n-(u-i-m),x=e.y,b=r-x,w=r-(d-B-x);(s=g<s||s<-g?0:s)<0&&(s=g+s),-1!==o&&(g=s+(o+1));for(var T=a,S=a,P=0,F=e.sourceIndex,_=0;_<f;_++){for(var E=0===_,A=_===f-1,M=0;M<p;M++){var k,C,O,R,L=0===M,D=M===p-1,I=t.add(P,F,l+T,c+S,n,r);(L||E||D||A)&&(k=L?m:0,C=E?x:0,R=O=0,L&&(O+=n-y),D&&(O+=n-v),E&&(R+=r-b),A&&(R+=r-w),R=r-R,I.cutWidth=O=n-O,I.cutHeight=R,I.setTrim(n,r,k,C,O,R)),T=T+h+(L?y:D?v:n),P++}T=a,S=S+h+(E?b:A?w:r)}return t}},function(t,e){function f(t,e,i,n){var r=g-n.y-n.height;t.add(i,e,n.x,r,n.width,n.height)}var g;t.exports=function(t,e,i){var n=t.source[e];t.add("__BASE",e,0,0,n.width,n.height),g=n.height;for(var r=i.split("\n"),s=/^[ ]*(- )*(\w+)+[: ]+(.*)/,o="",a="",h={x:0,y:0,width:0,height:0},l=0;l<r.length;l++){var c=r[l].match(s);if(c){var u="- "===c[1],d=c[2],p=c[3];if(u&&(a!==o&&(f(t,e,a,h),o=a),h={x:0,y:0,width:0,height:0}),"name"!==d)switch(d){case"x":case"y":case"width":case"height":h[d]=parseInt(p,10)}else a=p}}return a!==o&&f(t,e,a,h),t}},function(t,e){t.exports="complete"},function(t,e){t.exports="decoded"},function(t,e){t.exports="decodedall"},function(t,e){t.exports="destroy"},function(t,e){t.exports="detune"},function(t,e){t.exports="detune"},function(t,e){t.exports="mute"},function(t,e){t.exports="rate"},function(t,e){t.exports="volume"},function(t,e){t.exports="loop"},function(t,e){t.exports="looped"},function(t,e){t.exports="mute"},function(t,e){t.exports="pan"},function(t,e){t.exports="pauseall"},function(t,e){t.exports="pause"},function(t,e){t.exports="play"},function(t,e){t.exports="rate"},function(t,e){t.exports="resumeall"},function(t,e){t.exports="resume"},function(t,e){t.exports="seek"},function(t,e){t.exports="stopall"},function(t,e){t.exports="stop"},function(t,e){t.exports="unlocked"},function(t,e){t.exports="volume"},function(t,e,i){var n={Events:i(75),DisplayList:i(1012),GameObjectCreator:i(16),GameObjectFactory:i(5),UpdateList:i(1040),Components:i(11),GetCalcMatrix:i(19),BuildGameObject:i(28),BuildGameObjectAnimation:i(439),GameObject:i(15),BitmapText:i(148),Blitter:i(213),Bob:i(440),Container:i(214),DOMElement:i(442),DynamicBitmapText:i(215),Extern:i(444),Graphics:i(216),Group:i(113),Image:i(125),Layer:i(219),Particles:i(1074),PathFollower:i(457),RenderTexture:i(221),RetroFont:i(1082),Rope:i(223),Sprite:i(73),Text:i(224),GetTextSize:i(458),MeasureText:i(460),TextStyle:i(459),TileSprite:i(225),Zone:i(129),Video:i(226),Shape:i(34),Arc:i(461),Curve:i(462),Ellipse:i(463),Grid:i(464),IsoBox:i(465),IsoTriangle:i(466),Line:i(467),Polygon:i(468),Rectangle:i(473),Star:i(474),Triangle:i(475),Factories:{Blitter:i(1130),Container:i(1131),DOMElement:i(1132),DynamicBitmapText:i(1133),Extern:i(1134),Graphics:i(1135),Group:i(1136),Image:i(1137),Layer:i(1138),Particles:i(1139),PathFollower:i(1140),RenderTexture:i(1141),Rope:i(1142),Sprite:i(1143),StaticBitmapText:i(1144),Text:i(1145),TileSprite:i(1146),Zone:i(1147),Video:i(1148),Arc:i(1149),Curve:i(1150),Ellipse:i(1151),Grid:i(1152),IsoBox:i(1153),IsoTriangle:i(1154),Line:i(1155),Polygon:i(1156),Rectangle:i(1157),Star:i(1158),Triangle:i(1159)},Creators:{Blitter:i(1160),Container:i(1161),DynamicBitmapText:i(1162),Graphics:i(1163),Group:i(1164),Image:i(1165),Layer:i(1166),Particles:i(1167),RenderTexture:i(1168),Rope:i(1169),Sprite:i(1170),StaticBitmapText:i(1171),Text:i(1172),TileSprite:i(1173),Zone:i(1174),Video:i(1175)}};n.Shader=i(229),n.Mesh=i(230),n.PointLight=i(150),n.Factories.Shader=i(1184),n.Factories.Mesh=i(1185),n.Factories.PointLight=i(1186),n.Creators.Shader=i(1187),n.Creators.Mesh=i(1188),n.Creators.PointLight=i(1189),n.Light=i(481),n.LightsManager=i(482),n.LightsPlugin=i(1190),t.exports=n},function(t,e,i){var n=i(0),r=i(110),s=i(24),o=i(75),a=i(20),h=i(79),i=new n({Extends:r,initialize:function(t){r.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.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].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}});s.register("DisplayList",i,"displayList"),t.exports=i},function(t,e,i){t.exports={CheckMatrix:i(209),MatrixToString:i(1014),ReverseColumns:i(1015),ReverseRows:i(1016),Rotate180:i(1017),RotateLeft:i(1018),RotateMatrix:i(147),RotateRight:i(1019),Translate:i(1020),TransposeMatrix:i(435)}},function(t,e,i){var o=i(186),a=i(209);t.exports=function(t){var e="";if(a(t))for(var i=0;i<t.length;i++){for(var n=0;n<t[i].length;n++){var r=t[i][n].toString();e+="undefined"!==r?o(r,2):"?",n<t[i].length-1&&(e+=" |")}if(i<t.length-1){e+="\n";for(var s=0;s<t[i].length;s++)e+="---",s<t[i].length-1&&(e+="+");e+="\n"}}return e}},function(t,e){t.exports=function(t){return t.reverse()}},function(t,e){t.exports=function(t){for(var e=0;e<t.length;e++)t[e].reverse();return t}},function(t,e,i){var n=i(147);t.exports=function(t){return n(t,180)}},function(t,e,i){var n=i(147);t.exports=function(t){return n(t,90)}},function(t,e,i){var n=i(147);t.exports=function(t){return n(t,-90)}},function(t,e,i){var s=i(178),o=i(179);t.exports=function(t,e,i){if(void 0===e&&(e=0),0!==(i=void 0===i?0:i)&&(i<0?s(t,Math.abs(i)):o(t,i)),0!==e)for(var n=0;n<t.length;n++){var r=t[n];e<0?s(r,Math.abs(e)):o(r,e)}return t}},function(t,e){t.exports=function(t,e,i,n,r){if(void 0===r&&(r=t),0<i){var s=i-t.length;if(s<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.push(e),n&&n.call(r,e),e):null;for(var o=e.length-1;0<=o;)-1!==t.indexOf(e[o])&&e.splice(o,1),o--;if(0===(o=e.length))return null;0<i&&s<o&&(e.splice(s),o=s);for(var a=0;a<o;a++){var h=e[a];t.push(h),n&&n.call(r,h)}return e}},function(t,e){t.exports=function(t,e,i,n,r,s){if(void 0===i&&(i=0),void 0===s&&(s=t),0<n){var o=n-t.length;if(o<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.splice(i,0,e),r&&r.call(s,e),e):null;for(var a=e.length-1;0<=a;)-1!==t.indexOf(e[a])&&e.pop(),a--;if(0===(a=e.length))return null;0<n&&o<a&&(e.splice(o),a=o);for(var h=a-1;0<=h;h--){var l=e[h];t.splice(i,0,l),r&&r.call(s,l)}return e}},function(t,e){t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i<t.length&&(t.splice(i,1),t.push(e)),e}},function(t,e,i){var a=i(78);t.exports=function(t,e,i,n,r){void 0===r&&(r=t.length);var s=0;if(a(t,n=void 0===n?0:n,r))for(var o=n;o<r;o++)t[o][e]===i&&s++;return s}},function(t,e){t.exports=function(t,e,i){for(var n=[null],r=3;r<arguments.length;r++)n.push(arguments[r]);for(r=0;r<t.length;r++)n[0]=t[r],e.apply(i,n);return t}},function(t,e,i){var a=i(78);t.exports=function(t,e,i,n,r){if(void 0===r&&(r=t.length),a(t,n=void 0===n?0:n,r)){for(var s=[null],o=5;o<arguments.length;o++)s.push(arguments[o]);for(o=n;o<r;o++)s[0]=t[o],e.apply(i,s)}return t}},function(t,e){t.exports=function(t,e){var i,n,r=t.indexOf(e);return 0<r&&(i=t[r-1],n=t.indexOf(i),t[r]=i,t[n]=e),t}},function(t,e){t.exports=function(t,e,i){var n=t.indexOf(e);if(-1===n||i<0||i>=t.length)throw new Error("Supplied index out of bounds");return n!==i&&(t.splice(n,1),t.splice(i,0,e)),e}},function(t,e){t.exports=function(t,e){var i,n,r=t.indexOf(e);return-1!==r&&r<t.length-1&&(i=t[r+1],n=t.indexOf(i),t[r]=i,t[n]=e),t}},function(t,e){t.exports=function(t,e,i){if(e!==i){var n=t.indexOf(e),i=t.indexOf(i);if(n<0||i<0)throw new Error("Supplied items must be elements of the same array");i<n||(t.splice(n,1),i===t.length-1?t.push(e):t.splice(i,0,e))}return t}},function(t,e){t.exports=function(t,e,i){if(e!==i){var n=t.indexOf(e),i=t.indexOf(i);if(n<0||i<0)throw new Error("Supplied items must be elements of the same array");n<i||(t.splice(n,1),0===i?t.unshift(e):t.splice(i,0,e))}return t}},function(t,e,i){var o=i(363);t.exports=function(t,e,i){void 0===t&&(t=0),void 0===i&&(i=1),null===(e=void 0===e?null:e)&&(e=t,t=0);for(var n=[],r=Math.max(o((e-t)/(i||1)),0),s=0;s<r;s++)n.push(t),t+=i;return n}},function(t,e,i){var r=i(74);t.exports=function(t,e,i,n){if(void 0===n&&(n=t),e<0||e>t.length-1)throw new Error("Index out of bounds");t=r(t,e);return i&&i.call(n,t),t}},function(t,e,i){var h=i(78);t.exports=function(t,e,i,n,r){if(void 0===i&&(i=t.length),void 0===r&&(r=t),h(t,e=void 0===e?0:e,i)){var s=t.splice(e,i-e);if(n)for(var o=0;o<s.length;o++){var a=s[o];n.call(r,a)}return s}return[]}},function(t,e,i){var n=i(74);t.exports=function(t,e,i){void 0===i&&(i=t.length);e=(e=void 0===e?0:e)+Math.floor(Math.random()*i);return n(t,e)}},function(t,e){t.exports=function(t,e,i){var e=t.indexOf(e),n=t.indexOf(i);return-1!==e&&-1===n&&(t[e]=i,!0)}},function(t,e){t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&0<i&&(t.splice(i,1),t.unshift(e)),e}},function(t,e,i){var a=i(78);t.exports=function(t,e,i,n,r){if(void 0===r&&(r=t.length),a(t,n=void 0===n?0:n,r))for(var s=n;s<r;s++){var o=t[s];o.hasOwnProperty(e)&&(o[e]=i)}return t}},function(t,e){t.exports=function(t,e,i){if(e!==i){var n=t.indexOf(e),r=t.indexOf(i);if(n<0||r<0)throw new Error("Supplied items must be elements of the same array");t[n]=i,t[r]=e}return t}},function(t,e,i){var n=i(0),r=i(211),s=i(24),o=i(20),i=new n({Extends:r,initialize:function(t){r.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,r=0;r<n;r++){var s=i[r];s.active&&s.preUpdate.call(s,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}});s.register("UpdateList",i,"updateList"),t.exports=i},function(t,e){t.exports="add"},function(t,e){t.exports="remove"},function(t,e){t.exports=function(t,B,F,e){if(void 0===F&&(F=!1),void 0===e)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 N,z,Y,i=t.text,X=i.length,U=t.maxWidth,V=t.wordWrapCharCode,n=Number.MAX_VALUE,r=Number.MAX_VALUE,s=0,o=0,G=t.fontData.chars,a=t.fontData.lineHeight,j=t.letterSpacing,h=0,l=0,c=0,u=null,W=t._align,d=0,p=t.fontSize/t.fontData.size,f=p*t.scaleX,g=p*t.scaleY,m=null,y=0,v=[],x=Number.MAX_VALUE,b=0,w=0,T=0,S=[],P=[],_=null;if(0<U){for(M=0;M<X;M++)10!==(c=i.charCodeAt(M))?(u=G[c])&&(null!==m&&(N=u.kerning[y]),c===V?null!==_&&(S.push({word:_.word,i:_.i,x:_.x*f,y:_.y*g,w:_.w*f,h:_.h*g,cr:!1}),_=null):((_=null===_?{word:"",i:M,x:h,y:l,w:0,h:a,cr:!1}:_).word=_.word.concat(i[M]),_.w+=u.xOffset+u.xAdvance+(void 0!==N?N:0)),h+=u.xAdvance+j,m=u,y=c):(null!==_&&(S.push({word:_.word,i:_.i,x:_.x*f,y:_.y*g,w:_.w*f,h:_.h*g,cr:!0}),_=null),h=0,l+=a,m=null);null!==_&&S.push({word:_.word,i:_.i,x:_.x*f,y:_.y*g,w:_.w*f,h:_.h*g,cr:!1});for(var m=null,E=y=l=h=0,A=[],M=0;M<S.length;M++){var k,C=S[M],H=C.x,K=C.x+C.w;k&&(E=H-(H-(k.x+k.w)+k.w),k=null),U<H-E||U<K-E?(A.push(C.i-1),k=C.cr?(A.push(C.i+C.word.length),E=0,null):C):C.cr&&(A.push(C.i+C.word.length),E=0,k=null)}for(M=A.length-1;0<=M;M--)z=i,Y=A[M],i=z.substr(0,Y)+"\n"+z.substr(Y+1);X=(e.wrappedText=i).length,S=[],_=null}for(var q,J,Z,Q=0,M=0;M<X;M++)10!==(c=i.charCodeAt(M))?(u=G[c])&&(d=h,null!==m&&(d+=void 0!==(q=u.kerning[y])?q:0),d<n&&(n=d),l<r&&(r=l),s<(J=d+u.xAdvance)&&(s=J),o<(Z=l+a)&&(o=Z),Z=u.xOffset+u.xAdvance+(void 0!==q?q:0),c===V?null!==_&&(S.push({word:_.word,i:_.i,x:_.x*f,y:_.y*g,w:_.w*f,h:_.h*g}),_=null):((_=null===_?{word:"",i:Q,x:h,y:l,w:0,h:a}:_).word=_.word.concat(i[M]),_.w+=Z),P.push({i:Q,char:i[M],code:c,x:(u.xOffset+h)*p,y:(u.yOffset+l)*p,w:u.width*p,h:u.height*p,t:l*p,r:J*p,b:a*p,line:w,glyph:u}),h+=u.xAdvance+j,m=u,y=c,T=J*p,Q++):(null!==_&&(S.push({word:_.word,i:_.i,x:_.x*f,y:_.y*g,w:_.w*f,h:_.h*g}),_=null),h=0,l+=a,m=null,b<(v[w]=T)&&(b=T),T<x&&(x=T),w++,T=0);if(null!==_&&S.push({word:_.word,i:_.i,x:_.x*f,y:_.y*g,w:_.w*f,h:_.h*g}),b<(v[w]=T)&&(b=T),T<x&&(x=T),0<W)for(var $=0;$<P.length;$++){var O,R=P[$];1===W?(O=(b-v[R.line])/2,R.x+=O,R.r+=O):2===W&&(O=b-v[R.line],R.x+=O,R.r+=O)}var L=e.local,D=e.global,I=e.lines;return L.x=n*p,L.y=r*p,L.width=s*p,L.height=o*p,D.x=t.x-t._displayOriginX+n*f,D.y=t.y-t._displayOriginY+r*g,D.width=s*f,D.height=o*g,I.shortest=x,I.longest=b,I.lengths=v,B&&(L.x=Math.ceil(L.x),L.y=Math.ceil(L.y),L.width=Math.ceil(L.width),L.height=Math.ceil(L.height),D.x=Math.ceil(D.x),D.y=Math.ceil(D.y),D.width=Math.ceil(D.width),D.height=Math.ceil(D.height),I.shortest=Math.ceil(x),I.longest=Math.ceil(b)),F&&(t._displayOriginX=t.originX*L.width,t._displayOriginY=t.originY*L.height,D.x=t.x-t._displayOriginX*t.scaleX,D.y=t.y-t._displayOriginY*t.scaleY,B&&(D.x=Math.ceil(D.x),D.y=Math.ceil(D.y))),e.words=S,e.characters=P,e.lines.height=a,e.scale=p,e.scaleX=t.scaleX,e.scaleY=t.scaleY,e}},function(t,e,i){var l=i(212);t.exports=function(t,e,i,n,r,s,o){var a=t.sys.textures.get(i),h=a.get(n),r=t.sys.cache.xml.get(r);return!(!h||!r)&&(r=l(r,h,s,o,a),t.sys.cache.bitmapFont.add(e,{data:r,texture:i,frame:n,fromAtlas:!0}),!0)}},function(t,e,i){i(1),i(1);var n=i(1046),i=i(1048);t.exports={renderWebGL:n,renderCanvas:i}},function(t,e,i){var R=i(1047),L=i(19),D=i(12);t.exports=function(t,e,i,n){if(0!==e._text.length){i.addToRenderList(e);var r,s=t.pipelines.set(e.pipeline,e),o=L(e,i,n).calc,a=i.roundPixels,h=i.alpha,l=e.charColors,c=e.tintFill,u=D.getTintAppendFloatAlpha,d=u(e.tintTopLeft,h*e._alphaTL),p=u(e.tintTopRight,h*e._alphaTR),f=u(e.tintBottomLeft,h*e._alphaBL),g=u(e.tintBottomRight,h*e._alphaBR),m=e.frame.glTexture,y=s.setGameObject(e),v=e.getTextBounds(!1).characters,x=e.dropShadowX,b=e.dropShadowY,n=0!==x||0!==b;if(t.pipelines.preBatch(e),n)for(var i=e.dropShadowColor,n=e.dropShadowAlpha,w=u(i,h*n*e._alphaTL),T=u(i,h*n*e._alphaTR),S=u(i,h*n*e._alphaBL),P=u(i,h*n*e._alphaBR),_=0;_<v.length;_++)O=(r=v[_]).glyph,32!==r.code&&0!==O.width&&0!==O.height&&R(s,e,r,O,x,b,o,a,w,T,S,P,1,m,y);for(_=0;_<v.length;_++){var E,A,M,k,C,O=(r=v[_]).glyph;32!==r.code&&0!==O.width&&0!==O.height&&(l[r.i]?(E=(C=l[r.i]).tintEffect,A=u(C.tintTL,h*e._alphaTL),M=u(C.tintTR,h*e._alphaTR),k=u(C.tintBL,h*e._alphaBL),C=u(C.tintBR,h*e._alphaBR),R(s,e,r,O,0,0,o,a,A,M,k,C,E,m,y)):R(s,e,r,O,0,0,o,a,d,p,f,g,c,m,y))}t.pipelines.postBatch(e)}}},function(t,e){t.exports=function(t,e,i,n,r,s,o,a,h,l,c,u,d,p,f){var r=i.x-e.displayOriginX+r,s=i.y-e.displayOriginY+s,g=r+i.w,i=s+i.h,m=o.getXRound(r,s,a),y=o.getYRound(r,s,a),v=o.getXRound(r,i,a),r=o.getYRound(r,i,a),x=o.getXRound(g,i,a),i=o.getYRound(g,i,a),b=o.getXRound(g,s,a),o=o.getYRound(g,s,a);t.batchQuad(e,m,y,v,r,x,i,b,o,n.u0,n.v0,n.u1,n.v1,h,l,c,u,d,p,f)}},function(t,e,i){var L=i(30);t.exports=function(t,e,i,n){var r=e._text,s=r.length,o=t.currentContext;if(0!==s&&L(t,o,e,i,n)){i.addToRenderList(e);var a,h,l,c,u,d,t=e.fromAtlas?e.frame:e.texture.frames.__BASE,p=e.fontData.chars,f=e.fontData.lineHeight,g=e._letterSpacing,m=0,y=0,v=0,x=0,b=null,w=0,T=t.source.image,S=t.cutX,P=t.cutY,_=e._fontSize/e.fontData.size,E=e._align,A=0,M=0,n=e.getTextBounds(!1),k=(0<e.maxWidth&&(s=(r=n.wrappedText).length),e._bounds.lines);1===E?M=(k.longest-k.lengths[0])/2:2===E&&(M=k.longest-k.lengths[0]),o.translate(-e.displayOriginX,-e.displayOriginY);for(var C,O=i.roundPixels,R=0;R<s;R++)10!==(a=r.charCodeAt(R))?(h=p[a])&&(l=S+h.x,c=P+h.y,u=h.width,d=h.height,v=h.xOffset+m,x=h.yOffset+y,null!==b&&(v+=void 0!==(C=h.kerning[w])?C:0),x*=_,v=v*_+M,m+=h.xAdvance+g,b=h,w=a,0!==u&&0!==d&&32!==a&&(O&&(v=Math.round(v),x=Math.round(x)),o.save(),o.translate(v,x),o.scale(_,_),o.drawImage(T,l,c,u,d,0,0,u,d),o.restore())):(A++,1===E?M=(k.longest-k.lengths[A])/2:2===E&&(M=k.longest-k.lengths[A]),m=0,y+=f,b=null);o.restore()}}},function(t,e,i){i(1),i(1);var n=i(1050),i=i(1051);t.exports={renderWebGL:n,renderCanvas:i}},function(t,e,i){var n=i(25),P=i(12),_=new n;t.exports=function(t,e,i,n){var r=e.getRenderList();if(0!==r.length){var s=i.alpha*e.alpha;if(0!=s){i.addToRenderList(e);var o=t.pipelines.set(this.pipeline,e),a=i.scrollX*e.scrollFactorX,h=i.scrollY*e.scrollFactorY,l=_.copyFrom(i.matrix),c=(n&&(l.multiplyWithOffset(n,-a,-h),h=a=0),e.x-a),u=e.y-h,d=-1,p=i.roundPixels;t.pipelines.preBatch(e);for(var f=0;f<r.length;f++){var g,m,y,v,x,b,w=r[f],T=w.frame,S=w.alpha*s;0!=S&&(v=T.width,x=T.height,m=c+w.x+T.x,y=u+w.y+T.y,w.flipX&&(v*=-1,m+=T.width),w.flipY&&(x*=-1,y+=T.height),v=m+v,x=y+x,g=l.getX(m,y),m=l.getY(m,y),y=l.getX(v,x),v=l.getY(v,x),x=P.getTintAppendFloatAlpha(w.tint,S),T.sourceIndex!==d&&(b=o.setGameObject(e,T),d=T.sourceIndex),p&&(g=Math.round(g),m=Math.round(m),y=Math.round(y),v=Math.round(v)),o.batchQuad(e,g,m,g,v,y,v,y,m,T.u0,T.v0,T.u1,T.v1,x,x,x,x,!1,T.glTexture,b)&&(d=-1))}t.pipelines.postBatch(e)}}}},function(t,e){t.exports=function(t,e,i,n){var r=e.getRenderList();if(0!==r.length){var s=t.currentContext,o=i.alpha*e.alpha;if(0!=o){i.addToRenderList(e),s.globalCompositeOperation=t.blendModes[e.blendMode],s.imageSmoothingEnabled=!(!t.antialias||e.frame.source.scaleMode);var a=e.x-i.scrollX*e.scrollFactorX,h=e.y-i.scrollY*e.scrollFactorY;s.save(),n&&n.copyToContext(s);for(var l=i.roundPixels,c=0;c<r.length;c++){var u=r[c],d=u.flipX||u.flipY,p=u.frame,f=p.canvasData,g=p.x,m=p.y,y=1,v=1,x=u.alpha*o;0!=x&&(s.globalAlpha=x,d?(u.flipX&&(y=-1,g-=f.width),u.flipY&&(v=-1,m-=f.height),s.save(),s.translate(u.x+a,u.y+h),s.scale(y,v),s.drawImage(p.source.image,f.x,f.y,f.width,f.height,g,m,f.width,f.height),s.restore()):(l&&(g=Math.round(g),m=Math.round(m)),s.drawImage(p.source.image,f.x,f.y,f.width,f.height,g+u.x+a,m+u.y+h,f.width,f.height)))}s.restore()}}}},function(t,e,i){i(1),i(1);var n=i(1053),i=i(1054);t.exports={renderWebGL:n,renderCanvas:i}},function(t,e){t.exports=function(t,e,i,n){i.addToRenderList(e);var r=e.list,s=r.length;if(0!==s){var o=e.localTransform,a=(n?(o.loadIdentity(),o.multiply(n),o.translate(e.x,e.y),o.rotate(e.rotation),o.scale(e.scaleX,e.scaleY)):o.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),t.pipelines.preBatch(e),-1!==e.blendMode);a||t.setBlendMode(0);for(var h=e.alpha,l=e.scrollFactorX,c=e.scrollFactorY,u=0;u<s;u++){var d,p,f,g,m,y,v,x,b=r[u];b.willRender(i)&&(g=void 0!==b.alphaTopLeft?(d=b.alphaTopLeft,p=b.alphaTopRight,f=b.alphaBottomLeft,b.alphaBottomRight):f=p=d=b.alpha,m=b.scrollFactorX,y=b.scrollFactorY,a||b.blendMode===t.currentBlendMode||t.setBlendMode(b.blendMode),(v=b.mask)&&v.preRenderWebGL(t,b,i),(x=b.type)!==t.currentType&&(t.newType=!0,t.currentType=x),t.nextTypeMatch=u<s-1&&r[u+1].type===t.currentType,b.setScrollFactor(m*l,y*c),b.setAlpha(d*h,p*h,f*h,g*h),b.renderWebGL(t,b,i,o),b.setAlpha(d,p,f,g),b.setScrollFactor(m,y),v&&v.postRenderWebGL(t,i),t.newType=!1)}t.pipelines.postBatch(e)}}},function(t,e){t.exports=function(t,e,i,n){i.addToRenderList(e);var r=e.list;if(0!==r.length){var s=e.localTransform,o=(n?(s.loadIdentity(),s.multiply(n),s.translate(e.x,e.y),s.rotate(e.rotation),s.scale(e.scaleX,e.scaleY)):s.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),-1!==e.blendMode),a=(o||t.setBlendMode(0),e._alpha),h=e.scrollFactorX,l=e.scrollFactorY;e.mask&&e.mask.preRenderCanvas(t,null,i);for(var c=0;c<r.length;c++){var u,d,p,f=r[c];f.willRender(i)&&(u=f.alpha,d=f.scrollFactorX,p=f.scrollFactorY,o||f.blendMode===t.currentBlendMode||t.setBlendMode(f.blendMode),f.setScrollFactor(d*h,p*l),f.setAlpha(u*a),f.renderCanvas(t,f,i,s),f.setAlpha(u),f.setScrollFactor(d,p))}e.mask&&e.mask.postRenderCanvas(t)}}},function(t,e,i){i(1),i(1);var n=i(443),i=i(443);t.exports={renderWebGL:n,renderCanvas:i}},function(t,e){t.exports=["normal","multiply","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]},function(t,e,i){i(1),i(1);var n=i(1058),i=i(1059);t.exports={renderWebGL:n,renderCanvas:i}},function(t,e,i){var J=i(19),n=i(25),Z=i(12),Q=new n;t.exports=function(t,e,i,n){var r=e.text,s=r.length;if(0!==s){i.addToRenderList(e);var o=t.pipelines.set(e.pipeline,e),n=J(e,i,n),a=n.sprite,h=n.calc,B=Q,n=0<e.cropWidth||0<e.cropHeight;n&&(o.flush(),t.pushScissor(h.tx,h.ty,e.cropWidth*h.scaleX,e.cropHeight*h.scaleY));var l,F=e.frame.glTexture,N=e.tintFill,c=Z.getTintAppendFloatAlpha(e.tintTopLeft,i.alpha*e._alphaTL),u=Z.getTintAppendFloatAlpha(e.tintTopRight,i.alpha*e._alphaTR),d=Z.getTintAppendFloatAlpha(e.tintBottomLeft,i.alpha*e._alphaBL),p=Z.getTintAppendFloatAlpha(e.tintBottomRight,i.alpha*e._alphaBR),z=o.setGameObject(e),f=0,Y=0,X=0,U=e.letterSpacing,V=e.scrollX,G=e.scrollY,g=e.fontData,j=g.chars,W=g.lineHeight,m=e.fontSize/g.size,y=0,v=e._align,H=0,x=0,g=e.getTextBounds(!1),b=(0<e.maxWidth&&(s=(r=g.wrappedText).length),e._bounds.lines),K=(1===v?x=(b.longest-b.lengths[0])/2:2===v&&(x=b.longest-b.lengths[0]),i.roundPixels),q=e.displayCallback,w=e.callbackData;t.pipelines.preBatch(e);for(var T,S,P,_,E,A,M,k,C,O,R,L,D,I=0;I<s;I++)10!==(S=r.charCodeAt(I))?(D=j[S])&&(L=D.width,O=D.height,P=D.xOffset+f-V,_=D.yOffset+Y-G,null!==l&&(P+=void 0!==(T=D.kerning[X])?T:0),f+=D.xAdvance+U,l=D,X=S,0!==L&&0!==O&&32!==S&&(m=e.fontSize/e.fontData.size,y=0,q&&(w.color=0,w.tint.topLeft=c,w.tint.topRight=u,w.tint.bottomLeft=d,w.tint.bottomRight=p,w.index=I,w.charCode=S,w.x=P,w.y=_,w.scale=m,w.rotation=y,w.data=D.data,P=(T=q(w)).x,_=T.y,m=T.scale,y=T.rotation,p=T.color?(c=T.color,u=T.color,d=T.color,T.color):(c=T.tint.topLeft,u=T.tint.topRight,d=T.tint.bottomLeft,T.tint.bottomRight),c=Z.getTintAppendFloatAlpha(c,i.alpha*e._alphaTL),u=Z.getTintAppendFloatAlpha(u,i.alpha*e._alphaTR),d=Z.getTintAppendFloatAlpha(d,i.alpha*e._alphaBL),p=Z.getTintAppendFloatAlpha(p,i.alpha*e._alphaBR)),P=P*m-e.displayOriginX,_=_*m-e.displayOriginY,B.applyITRS(P+=x,_,y,m,m),h.multiply(B,a),S=D.u0,P=D.v0,_=D.u1,D=D.v1,E=a.e,A=a.f,M=O*a.c+a.e,k=O*a.d+a.f,C=L*a.a+O*a.c+a.e,O=L*a.b+O*a.d+a.f,R=L*a.a+a.e,L=L*a.b+a.f,K&&(E=Math.round(E),A=Math.round(A),M=Math.round(M),k=Math.round(k),C=Math.round(C),O=Math.round(O),R=Math.round(R),L=Math.round(L)),o.batchQuad(e,E,A,M,k,C,O,R,L,S,P,_,D,c,u,d,p,N,F,z))):(H++,1===v?x=(b.longest-b.lengths[H])/2:2===v&&(x=b.longest-b.lengths[H]),f=0,Y+=W,l=null);n&&(o.flush(),t.popScissor()),t.pipelines.postBatch(e)}}},function(t,e,i){var F=i(30);t.exports=function(t,e,i,n){var r=e._text,s=r.length,o=t.currentContext;if(0!==s&&F(t,o,e,i,n)){i.addToRenderList(e);var a,h,l,c,u,d,t=e.fromAtlas?e.frame:e.texture.frames.__BASE,p=e.displayCallback,f=e.callbackData,g=e.fontData.chars,m=e.fontData.lineHeight,y=e._letterSpacing,v=0,x=0,b=0,w=0,T=null,S=0,P=e.frame.source.image,_=t.cutX,E=t.cutY,A=0,M=0,k=e._fontSize/e.fontData.size,C=e._align,O=0,R=0,L=(e.getTextBounds(!1),e._bounds.lines),B=(1===C?R=(L.longest-L.lengths[0])/2:2===C&&(R=L.longest-L.lengths[0]),o.translate(-e.displayOriginX,-e.displayOriginY),i.roundPixels);0<e.cropWidth&&0<e.cropHeight&&(o.beginPath(),o.rect(0,0,e.cropWidth,e.cropHeight),o.clip());for(var D,I=0;I<s;I++)M=k,A=0,10!==(a=r.charCodeAt(I))?(h=g[a])&&(l=_+h.x,c=E+h.y,u=h.width,d=h.height,b=h.xOffset+v-e.scrollX,w=h.yOffset+x-e.scrollY,null!==T&&(b+=void 0!==(D=h.kerning[S])?D:0),p&&(f.index=I,f.charCode=a,f.x=b,f.y=w,f.scale=M,f.rotation=A,f.data=h.data,b=(D=p(f)).x,w=D.y,M=D.scale,A=D.rotation),w*=M,b=b*M+R,v+=h.xAdvance+y,T=h,S=a,0!==u&&0!==d&&32!==a&&(B&&(b=Math.round(b),w=Math.round(w)),o.save(),o.translate(b,w),o.rotate(A),o.scale(M,M),o.drawImage(P,l,c,u,d,0,0,u,d),o.restore())):(O++,1===C?R=(L.longest-L.lengths[O])/2:2===C&&(R=L.longest-L.lengths[O]),v=0,x+=m,T=null);o.restore()}}},function(t,e,i){i(1),i(1);var n=i(1061),i=i(1062);t.exports={renderWebGL:n,renderCanvas:i}},function(t,e,i){var r=i(19);t.exports=function(t,e,i,n){t.pipelines.clear();n=r(e,i,n).calc;e.render.call(e,t,i,n),t.pipelines.rebind()}},function(t,e){},function(t,e,i){i(1),i(1);var n=i(1064);i(448),i=i(448),t.exports={renderWebGL:n,renderCanvas:i}},function(t,e,i){function D(t,e,i){this.x=t,this.y=e,this.width=i}function I(t,e,i){this.points=[],this.pointsLength=1,this.points[0]=new D(t,e,i)}var B=i(217),F=i(19),n=i(25),N=i(12),z=[],Y=new n;t.exports=function(t,e,i,n){if(0!==e.commandBuffer.length){i.addToRenderList(e);var r=t.pipelines.set(e.pipeline,e);t.pipelines.preBatch(e);for(var s=F(e,i,n).calc,o=Y.loadIdentity(),a=e.commandBuffer,h=i.alpha*e.alpha,l=1,c=r.fillTint,u=r.strokeTint,d=0,p=0,f=0,g=2*Math.PI,m=[],y=0,v=!0,x=null,b=N.getTintAppendFloatAlpha,w=0;w<a.length;w++)switch(a[w]){case B.BEGIN_PATH:m.length=0,v=!(x=null);break;case B.CLOSE_PATH:v=!1,x&&x.points.length&&x.points.push(x.points[0]);break;case B.FILL_PATH:for(y=0;y<m.length;y++)r.batchFillPath(m[y].points,o,s);break;case B.STROKE_PATH:for(y=0;y<m.length;y++)r.batchStrokePath(m[y].points,l,v,o,s);break;case B.LINE_STYLE:var l=a[++w],T=b(a[++w],a[++w]*h);u.TL=T,u.TR=T,u.BL=T,u.BR=T;break;case B.FILL_STYLE:T=b(a[++w],a[++w]*h);c.TL=T,c.TR=T,c.BL=T,c.BR=T;break;case B.GRADIENT_FILL_STYLE:var S=a[++w]*h,P=a[++w]*h,_=a[++w]*h,E=a[++w]*h;c.TL=b(a[++w],S),c.TR=b(a[++w],P),c.BL=b(a[++w],_),c.BR=b(a[++w],E);break;case B.GRADIENT_LINE_STYLE:l=a[++w];S=a[++w]*h;u.TL=b(a[++w],S),u.TR=b(a[++w],S),u.BL=b(a[++w],S),u.BR=b(a[++w],S);break;case B.ARC:var A=0,M=a[++w],k=a[++w],C=a[++w],O=a[++w],R=a[++w],P=a[++w],L=a[++w];for(R-=O,P?R<-g?R=-g:0<R&&(R=R%g-g):g<R?R=g:R<0&&(R=g+R%g),null===x&&(x=new I(M+Math.cos(O)*C,k+Math.sin(O)*C,l),m.push(x),A+=.01);A<1+L;)f=R*A+O,d=M+Math.cos(f)*C,p=k+Math.sin(f)*C,x.points.push(new D(d,p,l)),A+=.01;f=R+O,d=M+Math.cos(f)*C,p=k+Math.sin(f)*C,x.points.push(new D(d,p,l));break;case B.FILL_RECT:r.batchFillRect(a[++w],a[++w],a[++w],a[++w],o,s);break;case B.FILL_TRIANGLE:r.batchFillTriangle(a[++w],a[++w],a[++w],a[++w],a[++w],a[++w],o,s);break;case B.STROKE_TRIANGLE:r.batchStrokeTriangle(a[++w],a[++w],a[++w],a[++w],a[++w],a[++w],l,o,s);break;case B.LINE_TO:null!==x?x.points.push(new D(a[++w],a[++w],l)):(x=new I(a[++w],a[++w],l),m.push(x));break;case B.MOVE_TO:x=new I(a[++w],a[++w],l),m.push(x);break;case B.SAVE:z.push(o.copyToArray());break;case B.RESTORE:o.copyFromArray(z.pop());break;case B.TRANSLATE:M=a[++w],k=a[++w],o.translate(M,k);break;case B.SCALE:M=a[++w],k=a[++w],o.scale(M,k);break;case B.ROTATE:o.rotate(a[++w])}t.pipelines.postBatch(e)}}},function(t,e,i){i(1),i(1);var n=i(1066),i=i(1067);t.exports={renderWebGL:n,renderCanvas:i}},function(t,e){t.exports=function(t,e,i,n){i.addToRenderList(e),e.pipeline.batchSprite(e,i,n)}},function(t,e){t.exports=function(t,e,i,n){i.addToRenderList(e),t.batchSprite(e,e.frame,i,n)}},function(t,e,i){i(1),i(1);var n=i(1069),i=i(1070);t.exports={renderWebGL:n,renderCanvas:i}},function(t,e){t.exports=function(t,e,i,n){i.addToRenderList(e),this.pipeline.batchSprite(e,i,n)}},function(t,e){t.exports=function(t,e,i,n){i.addToRenderList(e),t.batchSprite(e,e.frame,i,n)}},function(t,e,i){i(1),i(1);var n=i(1072),i=i(1073);t.exports={renderWebGL:n,renderCanvas:i}},function(t,e){t.exports=function(t,e,i){var n=e.list,r=n.length;if(0!==r){e.depthSort(),t.pipelines.preBatch(e);var s=-1!==e.blendMode;s||t.setBlendMode(0);for(var o=e.alpha,a=0;a<r;a++){var h,l,c,u,d,p,f=n[a];f.willRender(i)&&(u=void 0!==f.alphaTopLeft?(h=f.alphaTopLeft,l=f.alphaTopRight,c=f.alphaBottomLeft,f.alphaBottomRight):c=l=h=f.alpha,s||f.blendMode===t.currentBlendMode||t.setBlendMode(f.blendMode),(d=f.mask)&&d.preRenderWebGL(t,f,i),(p=f.type)!==t.currentType&&(t.newType=!0,t.currentType=p),t.nextTypeMatch=a<r-1&&n[a+1].type===t.currentType,f.setAlpha(h*o,l*o,c*o,u*o),f.renderWebGL(t,f,i),f.setAlpha(h,l,c,u),d&&d.postRenderWebGL(t,i),t.newType=!1)}t.pipelines.postBatch(e)}}},function(t,e){t.exports=function(t,e,i){var n=e.list;if(0!==n.length){e.depthSort();var r=-1!==e.blendMode,s=(r||t.setBlendMode(0),e._alpha);e.mask&&e.mask.preRenderCanvas(t,null,i);for(var o=0;o<n.length;o++){var a,h=n[o];h.willRender(i)&&(a=h.alpha,r||h.blendMode===t.currentBlendMode||t.setBlendMode(h.blendMode),h.setAlpha(a*s),h.renderCanvas(t,h,i),h.setAlpha(a))}e.mask&&e.mask.postRenderCanvas(t)}}},function(t,e,i){t.exports={EmitterOp:i(449),GravityWell:i(450),Particle:i(451),ParticleEmitter:i(452),ParticleEmitterManager:i(220),Zones:i(1078)}},function(t,e,i){i(1),i(1);var n=i(1076),i=i(1077);t.exports={renderWebGL:n,renderCanvas:i}},function(t,e,i){var n=i(25),D=i(12),I=new n,B=new n,F=new n,N=new n;t.exports=function(t,e,i,n){var r=e.emitters.list,s=r.length;if(0!==s){var o=t.pipelines.set(e.pipeline),a=I,h=B,l=F,c=N,u=(n?(c.loadIdentity(),c.multiply(n),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),i.roundPixels),d=e.defaultFrame.glTexture,p=D.getTintAppendFloatAlpha,f=o.setGameObject(e,e.defaultFrame);t.pipelines.preBatch(e);for(var g=0;g<s;g++){var m=r[g],y=m.alive,v=y.length;if(m.visible&&0!==v){i.addToRenderList(m);var x=m.scrollFactorX,b=m.scrollFactorY;t.setBlendMode(m.blendMode),m.mask&&(m.mask.preRenderWebGL(t,m,i),t.pipelines.set(e.pipeline));for(var w=0;w<v;w++){var T,S,P,_,E,A,M,k,C,O,R=y[w],L=R.alpha*i.alpha;L<=0||(l.applyITRS(R.x,R.y,R.rotation,R.scaleX,R.scaleY),a.copyFrom(i.matrix),a.multiplyWithOffset(c,-i.scrollX*x,-i.scrollY*b),l.e=R.x,l.f=R.y,a.multiply(l,h),E=-(T=R.frame).halfWidth,O=-T.halfHeight,C=E+T.width,M=O+T.height,S=h.getXRound(E,O,u),P=h.getYRound(E,O,u),_=h.getXRound(E,M,u),E=h.getYRound(E,M,u),A=h.getXRound(C,M,u),M=h.getYRound(C,M,u),k=h.getXRound(C,O,u),C=h.getYRound(C,O,u),O=p(R.tint,L),o.batchQuad(m,S,P,_,E,A,M,k,C,T.u0,T.v0,T.u1,T.v1,O,O,O,O,0,d,f))}m.mask&&m.mask.postRenderWebGL(t,i)}}t.pipelines.postBatch(e)}}},function(t,e,i){var i=i(25),P=new i,_=new i,E=new i,A=new i;t.exports=function(t,e,i,n){var r=e.emitters.list,s=r.length;if(0!==s){var o=P.copyFrom(i.matrix),a=_,h=E,l=A;n?(l.loadIdentity(),l.multiply(n),l.translate(e.x,e.y),l.rotate(e.rotation),l.scale(e.scaleX,e.scaleY)):l.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);for(var c=t.currentContext,u=i.roundPixels,d=0;d<s;d++){var p=r[d],f=p.alive,g=f.length;if(p.visible&&0!==g){i.addToRenderList(p);var m=p.scrollFactorX,y=p.scrollFactorY;c.save(),c.globalCompositeOperation=t.blendModes[p.blendMode];for(var v=0;v<g;v++){var x,b,w,T=f[v],S=T.alpha*i.alpha;S<=0||(h.applyITRS(T.x,T.y,T.rotation,T.scaleX,T.scaleY),o.copyFrom(i.matrix),o.multiplyWithOffset(l,-i.scrollX*m,-i.scrollY*y),h.e=T.x,h.f=T.y,o.multiply(h,a),x=(T=T.frame).canvasData,b=-T.halfWidth,w=-T.halfHeight,c.globalAlpha=S,c.save(),a.setToContext(c),u&&(b=Math.round(b),w=Math.round(w)),c.imageSmoothingEnabled=!(!t.antialias||T.source.scaleMode),c.drawImage(T.source.image,x.x,x.y,x.width,x.height,b,w,x.width,x.height),c.restore())}c.restore()}}}}},function(t,e,i){t.exports={DeathZone:i(453),EdgeZone:i(454),RandomZone:i(456)}},function(t,e,i){i(1),i(1);var n=i(1080),i=i(1081);t.exports={renderWebGL:n,renderCanvas:i}},function(t,e,i){var u=i(12);t.exports=function(t,e,i,n){i.addToRenderList(e);var r=i.alpha,s=e.renderTarget,o=s.width,a=s.height,h=u.getTintAppendFloatAlpha,l=t.pipelines.set(e.pipeline),c=l.setTexture2D(s.texture);t.pipelines.preBatch(e),l.batchTexture(e,s.texture,o,a,e.x,e.y,o,a,e.scaleX,e.scaleY,e.rotation,e.flipX,!e.flipY,e.scrollFactorX,e.scrollFactorY,e.displayOriginX,e.displayOriginY,0,0,o,a,h(e.tintTopLeft,r*e._alphaTL),h(e.tintTopRight,r*e._alphaTR),h(e.tintBottomLeft,r*e._alphaBL),h(e.tintBottomRight,r*e._alphaBR),e.tintFill,0,0,i,n,!0,c),t.resetTextures(),t.pipelines.postBatch(e)}},function(t,e){t.exports=function(t,e,i,n){i.addToRenderList(e),t.batchSprite(e,e.frame,i,n)}},function(t,e,i){var n=i(1083),i=i(17)(!1,{Parse:i(1084)},n);t.exports=i},function(t,e){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"}},function(t,e,i){var S=i(6);t.exports=function(t,e){var i=e.width,n=e.height,r=Math.floor(i/2),s=Math.floor(n/2),o=S(e,"chars","");if(""!==o){var a=S(e,"image",""),t=t.sys.textures.getFrame(a),h=t.cutX,l=t.cutY,c=t.source.width,u=t.source.height,d=S(e,"offset.x",0),t=S(e,"offset.y",0),p=S(e,"spacing.x",0),f=S(e,"spacing.y",0),g=S(e,"lineSpacing",0),m=S(e,"charsPerRow",null);null===m&&(m=c/i)>o.length&&(m=o.length);for(var y=d,v=t,x={retroFont:!0,font:a,size:i,lineHeight:n+g,chars:{}},b=0,w=0;w<o.length;w++){var T=o.charCodeAt(w);x.chars[T]={x:y,y:v,width:i,height:n,centerX:r,centerY:s,xOffset:0,yOffset:0,xAdvance:i,data:{},kerning:{},u0:(h+y)/c,v0:(l+v)/u,u1:(h+y+i)/c,v1:(l+v+n)/u},++b===m?(b=0,y=d,v+=n+f):y+=i+p}return{data:x,frame:null,texture:a}}}},function(t,e,i){i(1),i(1);var n=i(1086),i=i(1087);t.exports={renderWebGL:n,renderCanvas:i}},function(t,e,i){var E=i(19),A=i(12);t.exports=function(t,e,i,n){i.addToRenderList(e);var r=t.pipelines.set(e.pipeline,e),s=E(e,i,n).calc,o=e.vertices,a=e.uv,h=e.colors,l=e.alphas,c=e.alpha,u=A.getTintAppendFloatAlpha,d=i.roundPixels,p=o.length,n=Math.floor(.5*p),f=(r.flush(),t.pipelines.preBatch(e),r.setGameObject(e)),g=r.vertexViewF32,m=r.vertexViewU32,y=r.vertexCount*r.currentShader.vertexComponentCount-1,v=0,x=e.tintFill;e.dirty&&e.updateVertices();for(var b=e.debugCallback,w=[],T=0;T<p;T+=2){var S=o[T+0],P=o[T+1],_=S*s.a+P*s.c+s.e,S=S*s.b+P*s.d+s.f;d&&(_=Math.round(_),S=Math.round(S)),g[++y]=_,g[++y]=S,g[++y]=a[T+0],g[++y]=a[T+1],g[++y]=f,g[++y]=x,m[++y]=u(h[v],i.alpha*(l[v]*c)),v++,b&&(w[T+0]=_,w[T+1]=S)}b&&b.call(e,e,p,w),r.vertexCount+=n,t.pipelines.postBatch(e)}},function(t,e){t.exports=function(){}},function(t,e,i){i(1),i(1);var n=i(1089),i=i(1090);t.exports={renderWebGL:n,renderCanvas:i}},function(t,e,i){var c=i(12);t.exports=function(t,e,i,n){var r,s,o,a,h,l;0!==e.width&&0!==e.height&&(i.addToRenderList(e),s=(r=e.frame).width,o=r.height,a=c.getTintAppendFloatAlpha,l=(h=t.pipelines.set(e.pipeline,e)).setTexture2D(r.glTexture,e),t.pipelines.preBatch(e),h.batchTexture(e,r.glTexture,s,o,e.x,e.y,s/e.style.resolution,o/e.style.resolution,e.scaleX,e.scaleY,e.rotation,e.flipX,e.flipY,e.scrollFactorX,e.scrollFactorY,e.displayOriginX,e.displayOriginY,0,0,s,o,a(e.tintTopLeft,i.alpha*e._alphaTL),a(e.tintTopRight,i.alpha*e._alphaTR),a(e.tintBottomLeft,i.alpha*e._alphaBL),a(e.tintBottomRight,i.alpha*e._alphaBR),e.tintFill,0,0,i,n,!1,l),t.pipelines.postBatch(e))}},function(t,e){t.exports=function(t,e,i,n){0!==e.width&&0!==e.height&&(i.addToRenderList(e),t.batchSprite(e,e.frame,i,n))}},function(t,e,i){i(1),i(1);var n=i(1092),i=i(1093);t.exports={renderWebGL:n,renderCanvas:i}},function(t,e,i){var l=i(12);t.exports=function(t,e,i,n){e.updateCanvas();var r,s,o,a=e.width,h=e.height;0!==a&&0!==h&&(i.addToRenderList(e),t.pipelines.preBatch(e),r=l.getTintAppendFloatAlpha,o=(s=t.pipelines.set(e.pipeline,e)).setTexture2D(e.fillPattern,e),s.batchTexture(e,e.fillPattern,e.displayFrame.width*e.tileScaleX,e.displayFrame.height*e.tileScaleY,e.x,e.y,a,h,e.scaleX,e.scaleY,e.rotation,e.flipX,e.flipY,e.scrollFactorX,e.scrollFactorY,e.originX*a,e.originY*h,0,0,a,h,r(e.tintTopLeft,i.alpha*e._alphaTL),r(e.tintTopRight,i.alpha*e._alphaTR),r(e.tintBottomLeft,i.alpha*e._alphaBL),r(e.tintBottomRight,i.alpha*e._alphaBR),e.tintFill,e.tilePositionX%e.displayFrame.width/e.displayFrame.width,e.tilePositionY%e.displayFrame.height/e.displayFrame.height,i,n,!1,o),t.pipelines.postBatch(e))}},function(t,e){t.exports=function(t,e,i,n){e.updateCanvas(),i.addToRenderList(e),t.batchSprite(e,e.frame,i,n)}},function(t,e,i){i(1),i(1);var n=i(1095),i=i(1096);t.exports={renderWebGL:n,renderCanvas:i}},function(t,e){t.exports=function(t,e,i,n){e.videoTexture&&(i.addToRenderList(e),e.pipeline.batchSprite(e,i,n))}},function(t,e){t.exports=function(t,e,i,n){e.videoTexture&&(i.addToRenderList(e),t.batchSprite(e,e.frame,i,n))}},function(t,e,i){i(1),i(1);var n=i(1098),i=i(1099);t.exports={renderWebGL:n,renderCanvas:i}},function(t,e,i){var a=i(19),h=i(114),l=i(81);t.exports=function(t,e,i,n){i.addToRenderList(e);var r=t.pipelines.set(e.pipeline),n=a(e,i,n),n=r.calcMatrix.copyFrom(n.calc),s=e._displayOriginX,o=e._displayOriginY,i=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&h(r,n,e,i,s,o),e.isStroked&&l(r,e,i,s,o),t.pipelines.postBatch(e)}},function(t,e,i){var s=i(36),o=i(48),a=i(60),h=i(30);t.exports=function(t,e,i,n){i.addToRenderList(e);var r=t.currentContext;h(t,r,e,i,n)&&(t=e.radius,r.beginPath(),r.arc(t-e.originX*(2*t),t-e.originY*(2*t),t,s(e._startAngle),s(e._endAngle),e.anticlockwise),e.closePath&&r.closePath(),e.isFilled&&(o(r,e),r.fill()),e.isStroked&&(a(r,e),r.stroke()),r.restore())}},function(t,e,i){i(1),i(1);var n=i(1101),i=i(1102);t.exports={renderWebGL:n,renderCanvas:i}},function(t,e,i){var a=i(114),h=i(19),l=i(81);t.exports=function(t,e,i,n){i.addToRenderList(e);var r=t.pipelines.set(e.pipeline),n=h(e,i,n),n=r.calcMatrix.copyFrom(n.calc),s=e._displayOriginX+e._curveBounds.x,o=e._displayOriginY+e._curveBounds.y,i=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&a(r,n,e,i,s,o),e.isStroked&&l(r,e,i,s,o),t.pipelines.postBatch(e)}},function(t,e,i){var d=i(48),p=i(60),f=i(30);t.exports=function(t,e,i,n){i.addToRenderList(e);var r=t.currentContext;if(f(t,r,e,i,n)){var s=e._displayOriginX+e._curveBounds.x,o=e._displayOriginY+e._curveBounds.y,a=e.pathData,h=a.length-1,t=a[0]-s,i=a[1]-o;r.beginPath(),r.moveTo(t,i),e.closePath||(h-=2);for(var l=2;l<h;l+=2){var c=a[l]-s,u=a[l+1]-o;r.lineTo(c,u)}e.closePath&&r.closePath(),e.isFilled&&(d(r,e),r.fill()),e.isStroked&&(p(r,e),r.stroke()),r.restore()}}},function(t,e,i){i(1),i(1);var n=i(1104),i=i(1105);t.exports={renderWebGL:n,renderCanvas:i}},function(t,e,i){var a=i(114),h=i(19),l=i(81);t.exports=function(t,e,i,n){i.addToRenderList(e);var r=t.pipelines.set(e.pipeline),n=h(e,i,n),n=r.calcMatrix.copyFrom(n.calc),s=e._displayOriginX,o=e._displayOriginY,i=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&a(r,n,e,i,s,o),e.isStroked&&l(r,e,i,s,o),t.pipelines.postBatch(e)}},function(t,e,i){var d=i(48),p=i(60),f=i(30);t.exports=function(t,e,i,n){i.addToRenderList(e);var r=t.currentContext;if(f(t,r,e,i,n)){var s=e._displayOriginX,o=e._displayOriginY,a=e.pathData,h=a.length-1,t=a[0]-s,i=a[1]-o;r.beginPath(),r.moveTo(t,i),e.closePath||(h-=2);for(var l=2;l<h;l+=2){var c=a[l]-s,u=a[l+1]-o;r.lineTo(c,u)}r.closePath(),e.isFilled&&(d(r,e),r.fill()),e.isStroked&&(p(r,e),r.stroke()),r.restore()}}},function(t,e,i){i(1),i(1);var n=i(1107),i=i(1108);t.exports={renderWebGL:n,renderCanvas:i}},function(t,e,i){var P=i(19),_=i(12);t.exports=function(t,e,i,n){i.addToRenderList(e);var r=t.pipelines.set(e.pipeline),n=P(e,i,n);r.calcMatrix.copyFrom(n.calc).translate(-e._displayOriginX,-e._displayOriginY);var s,n=i.alpha*e.alpha,o=e.width,a=e.height,h=e.cellWidth,l=e.cellHeight,c=Math.ceil(o/h),u=Math.ceil(a/l),d=h,p=l,f=h-(c*h-o),g=l-(u*l-a),i=e.showCells,m=e.showAltCells,y=e.showOutline,v=0,x=0,b=0;if(y&&(d--,p--,f===h&&f--,g===l&&g--),t.pipelines.preBatch(e),i&&0<e.fillAlpha)for(w=r.fillTint,s=_.getTintAppendFloatAlpha(e.fillColor,e.fillAlpha*n),w.TL=s,w.TR=s,w.BL=s,w.BR=s,x=0;x<u;x++)for(m&&(b=x%2),v=0;v<c;v++)m&&b?b=0:(b++,r.batchFillRect(v*h,x*l,v<c-1?d:f,x<u-1?p:g));if(m&&0<e.altFillAlpha)for(w=r.fillTint,s=_.getTintAppendFloatAlpha(e.altFillColor,e.altFillAlpha*n),w.TL=s,w.TR=s,w.BL=s,w.BR=s,x=0;x<u;x++)for(m&&(b=x%2),v=0;v<c;v++)!m||b?(b=0,r.batchFillRect(v*h,x*l,v<c-1?d:f,x<u-1?p:g)):b=1;if(y&&0<e.outlineFillAlpha){var i=r.strokeTint,w=_.getTintAppendFloatAlpha(e.outlineFillColor,e.outlineFillAlpha*n);for(i.TL=w,i.TR=w,i.BL=w,i.BR=w,v=1;v<c;v++){var T=v*h;r.batchLine(T,0,T,a,1,1,1,0,!1)}for(x=1;x<u;x++){var S=x*l;r.batchLine(0,S,o,S,1,1,1,0,!1)}}t.pipelines.postBatch(e)}},function(t,e,i){var S=i(48),P=i(60),_=i(30);t.exports=function(t,e,i,n){i.addToRenderList(e);var r=t.currentContext;if(_(t,r,e,i,n)){var s=-e._displayOriginX,o=-e._displayOriginY,t=i.alpha*e.alpha,a=e.width,h=e.height,l=e.cellWidth,c=e.cellHeight,u=Math.ceil(a/l),d=Math.ceil(h/c),p=l,f=c,g=l-(u*l-a),m=c-(d*c-h),n=e.showCells,y=e.showAltCells,i=e.showOutline,v=0,x=0,b=0;if(i&&(p--,f--,g===l&&g--,m===c&&m--),n&&0<e.fillAlpha)for(S(r,e),x=0;x<d;x++)for(y&&(b=x%2),v=0;v<u;v++)y&&b?b=0:(b++,r.fillRect(s+v*l,o+x*c,v<u-1?p:g,x<d-1?f:m));if(y&&0<e.altFillAlpha)for(S(r,e,e.altFillColor,e.altFillAlpha*t),x=0;x<d;x++)for(y&&(b=x%2),v=0;v<u;v++)!y||b?(b=0,r.fillRect(s+v*l,o+x*c,v<u-1?p:g,x<d-1?f:m)):b=1;if(i&&0<e.outlineFillAlpha){for(P(r,e,e.outlineFillColor,e.outlineFillAlpha*t),v=1;v<u;v++){var w=v*l;r.beginPath(),r.moveTo(w+s,o),r.lineTo(w+s,h+o),r.stroke()}for(x=1;x<d;x++){var T=x*c;r.beginPath(),r.moveTo(s,T+o),r.lineTo(s+a,T+o),r.stroke()}}r.restore()}}},function(t,e,i){i(1),i(1);var n=i(1110),i=i(1111);t.exports={renderWebGL:n,renderCanvas:i}},function(t,e,i){var y=i(19),v=i(12);t.exports=function(t,e,i,n){i.addToRenderList(e);var r,s,o,a,h,l,c,u,d,p=t.pipelines.set(e.pipeline),n=y(e,i,n),n=p.calcMatrix.copyFrom(n.calc),f=e.width,g=e.height,m=f/2,f=f/e.projection,i=i.alpha*e.alpha;e.isFilled&&(t.pipelines.preBatch(e),e.showTop&&(r=v.getTintAppendFloatAlpha(e.fillTop,i),s=n.getX(-m,-g),o=n.getY(-m,-g),a=n.getX(0,-f-g),h=n.getY(0,-f-g),l=n.getX(m,-g),c=n.getY(m,-g),u=n.getX(0,f-g),d=n.getY(0,f-g),p.batchQuad(e,s,o,a,h,l,c,u,d,0,0,1,1,r,r,r,r,2)),e.showLeft&&(r=v.getTintAppendFloatAlpha(e.fillLeft,i),s=n.getX(-m,0),o=n.getY(-m,0),a=n.getX(0,f),h=n.getY(0,f),l=n.getX(0,f-g),c=n.getY(0,f-g),u=n.getX(-m,-g),d=n.getY(-m,-g),p.batchQuad(e,s,o,a,h,l,c,u,d,0,0,1,1,r,r,r,r,2)),e.showRight&&(r=v.getTintAppendFloatAlpha(e.fillRight,i),s=n.getX(m,0),o=n.getY(m,0),a=n.getX(0,f),h=n.getY(0,f),l=n.getX(0,f-g),c=n.getY(0,f-g),u=n.getX(m,-g),d=n.getY(m,-g),p.batchQuad(e,s,o,a,h,l,c,u,d,0,0,1,1,r,r,r,r,2)),t.pipelines.postBatch(e))}},function(t,e,i){var s=i(48),o=i(30);t.exports=function(t,e,i,n){i.addToRenderList(e);var r=t.currentContext;o(t,r,e,i,n)&&e.isFilled&&(t=e.width,i=e.height,n=t/2,t=t/e.projection,e.showTop&&(s(r,e,e.fillTop),r.beginPath(),r.moveTo(-n,-i),r.lineTo(0,-t-i),r.lineTo(n,-i),r.lineTo(n,-1),r.lineTo(0,t-1),r.lineTo(-n,-1),r.lineTo(-n,-i),r.fill()),e.showLeft&&(s(r,e,e.fillLeft),r.beginPath(),r.moveTo(-n,0),r.lineTo(0,t),r.lineTo(0,t-i),r.lineTo(-n,-i),r.lineTo(-n,0),r.fill()),e.showRight&&(s(r,e,e.fillRight),r.beginPath(),r.moveTo(n,0),r.lineTo(0,t),r.lineTo(0,t-i),r.lineTo(n,-i),r.lineTo(n,0),r.fill()),r.restore())}},function(t,e,i){i(1),i(1);var n=i(1113),i=i(1114);t.exports={renderWebGL:n,renderCanvas:i}},function(t,e,i){var v=i(19),x=i(12);t.exports=function(t,e,i,n){i.addToRenderList(e);var r,s,o,a,h,l,c,u,d,p=t.pipelines.set(e.pipeline),n=v(e,i,n),n=p.calcMatrix.copyFrom(n.calc),f=e.width,g=e.height,m=f/2,f=f/e.projection,y=e.isReversed,i=i.alpha*e.alpha;e.isFilled&&(t.pipelines.preBatch(e),e.showTop&&y&&(r=x.getTintAppendFloatAlpha(e.fillTop,i),s=n.getX(-m,-g),o=n.getY(-m,-g),a=n.getX(0,-f-g),h=n.getY(0,-f-g),l=n.getX(m,-g),c=n.getY(m,-g),u=n.getX(0,f-g),d=n.getY(0,f-g),p.batchQuad(e,s,o,a,h,l,c,u,d,0,0,1,1,r,r,r,r,2)),e.showLeft&&(r=x.getTintAppendFloatAlpha(e.fillLeft,i),o=y?(s=n.getX(-m,-g),n.getY(-m,-g)):(s=n.getX(-m,0),n.getY(-m,0)),a=n.getX(0,f),h=n.getY(0,f),l=n.getX(0,f-g),c=n.getY(0,f-g),p.batchTri(e,s,o,a,h,l,c,0,0,1,1,r,r,r,2)),e.showRight&&(r=x.getTintAppendFloatAlpha(e.fillRight,i),o=y?(s=n.getX(m,-g),n.getY(m,-g)):(s=n.getX(m,0),n.getY(m,0)),a=n.getX(0,f),h=n.getY(0,f),l=n.getX(0,f-g),c=n.getY(0,f-g),p.batchTri(e,s,o,a,h,l,c,0,0,1,1,r,r,r,2)),t.pipelines.postBatch(e))}},function(t,e,i){var o=i(48),a=i(30);t.exports=function(t,e,i,n){i.addToRenderList(e);var r,s=t.currentContext;a(t,s,e,i,n)&&e.isFilled&&(t=e.width,i=e.height,n=t/2,t=t/e.projection,r=e.isReversed,e.showTop&&r&&(o(s,e,e.fillTop),s.beginPath(),s.moveTo(-n,-i),s.lineTo(0,-t-i),s.lineTo(n,-i),s.lineTo(0,t-i),s.fill()),e.showLeft&&(o(s,e,e.fillLeft),s.beginPath(),r?s.moveTo(-n,-i):s.moveTo(-n,0),s.lineTo(0,t),s.lineTo(0,t-i),s.fill()),e.showRight&&(o(s,e,e.fillRight),s.beginPath(),r?s.moveTo(n,-i):s.moveTo(n,0),s.lineTo(0,t),s.lineTo(0,t-i),s.fill()),s.restore())}},function(t,e,i){i(1),i(1);var n=i(1116),i=i(1117);t.exports={renderWebGL:n,renderCanvas:i}},function(t,e,i){var h=i(19),l=i(12);t.exports=function(t,e,i,n){i.addToRenderList(e);var r=t.pipelines.set(e.pipeline),n=h(e,i,n);r.calcMatrix.copyFrom(n.calc);var s,o=e._displayOriginX,a=e._displayOriginY,i=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isStroked&&(s=r.strokeTint,i=l.getTintAppendFloatAlpha(e.strokeColor,e.strokeAlpha*i),s.TL=i,s.TR=i,s.BL=i,s.BR=i,s=e._startWidth,i=e._endWidth,r.batchLine(e.geom.x1-o,e.geom.y1-a,e.geom.x2-o,e.geom.y2-a,s,i,1,0,!1,n.sprite,n.camera)),t.pipelines.postBatch(e)}},function(t,e,i){var s=i(60),o=i(30);t.exports=function(t,e,i,n){i.addToRenderList(e);var r=t.currentContext;o(t,r,e,i,n)&&(t=e._displayOriginX,i=e._displayOriginY,e.isStroked&&(s(r,e),r.beginPath(),r.moveTo(e.geom.x1-t,e.geom.y1-i),r.lineTo(e.geom.x2-t,e.geom.y2-i),r.stroke()),r.restore())}},function(t,e,i){i(1),i(1);var n=i(1119),i=i(1120);t.exports={renderWebGL:n,renderCanvas:i}},function(t,e,i){var a=i(114),h=i(19),l=i(81);t.exports=function(t,e,i,n){i.addToRenderList(e);var r=t.pipelines.set(e.pipeline),n=h(e,i,n),n=r.calcMatrix.copyFrom(n.calc),s=e._displayOriginX,o=e._displayOriginY,i=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&a(r,n,e,i,s,o),e.isStroked&&l(r,e,i,s,o),t.pipelines.postBatch(e)}},function(t,e,i){var d=i(48),p=i(60),f=i(30);t.exports=function(t,e,i,n){i.addToRenderList(e);var r=t.currentContext;if(f(t,r,e,i,n)){var s=e._displayOriginX,o=e._displayOriginY,a=e.pathData,h=a.length-1,t=a[0]-s,i=a[1]-o;r.beginPath(),r.moveTo(t,i),e.closePath||(h-=2);for(var l=2;l<h;l+=2){var c=a[l]-s,u=a[l+1]-o;r.lineTo(c,u)}r.closePath(),e.isFilled&&(d(r,e),r.fill()),e.isStroked&&(p(r,e),r.stroke()),r.restore()}}},function(t,e,i){i(1),i(1);var n=i(1122),i=i(1123);t.exports={renderWebGL:n,renderCanvas:i}},function(t,e,i){var h=i(19),l=i(81),c=i(12);t.exports=function(t,e,i,n){i.addToRenderList(e);var r=t.pipelines.set(e.pipeline),n=h(e,i,n);r.calcMatrix.copyFrom(n.calc);var s,o,n=e._displayOriginX,a=e._displayOriginY,i=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&(s=r.fillTint,o=c.getTintAppendFloatAlpha(e.fillColor,e.fillAlpha*i),s.TL=o,s.TR=o,s.BL=o,s.BR=o,r.batchFillRect(-n,-a,e.width,e.height)),e.isStroked&&l(r,e,i,n,a),t.pipelines.postBatch(e)}},function(t,e,i){var s=i(48),o=i(60),a=i(30);t.exports=function(t,e,i,n){i.addToRenderList(e);var r=t.currentContext;a(t,r,e,i,n)&&(t=e._displayOriginX,i=e._displayOriginY,e.isFilled&&(s(r,e),r.fillRect(-t,-i,e.width,e.height)),e.isStroked&&(o(r,e),r.beginPath(),r.rect(-t,-i,e.width,e.height),r.stroke()),r.restore())}},function(t,e,i){i(1),i(1);var n=i(1125),i=i(1126);t.exports={renderWebGL:n,renderCanvas:i}},function(t,e,i){var a=i(114),h=i(19),l=i(81);t.exports=function(t,e,i,n){i.addToRenderList(e);var r=t.pipelines.set(e.pipeline),n=h(e,i,n),n=r.calcMatrix.copyFrom(n.calc),s=e._displayOriginX,o=e._displayOriginY,i=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&a(r,n,e,i,s,o),e.isStroked&&l(r,e,i,s,o),t.pipelines.postBatch(e)}},function(t,e,i){var d=i(48),p=i(60),f=i(30);t.exports=function(t,e,i,n){i.addToRenderList(e);var r=t.currentContext;if(f(t,r,e,i,n)){var s=e._displayOriginX,o=e._displayOriginY,a=e.pathData,h=a.length-1,t=a[0]-s,i=a[1]-o;r.beginPath(),r.moveTo(t,i),e.closePath||(h-=2);for(var l=2;l<h;l+=2){var c=a[l]-s,u=a[l+1]-o;r.lineTo(c,u)}r.closePath(),e.isFilled&&(d(r,e),r.fill()),e.isStroked&&(p(r,e),r.stroke()),r.restore()}}},function(t,e,i){i(1),i(1);var n=i(1128),i=i(1129);t.exports={renderWebGL:n,renderCanvas:i}},function(t,e,i){var p=i(19),f=i(81),g=i(12);t.exports=function(t,e,i,n){i.addToRenderList(e);var r=t.pipelines.set(e.pipeline),n=p(e,i,n);r.calcMatrix.copyFrom(n.calc);var s,o,a,h,l,c,u=e._displayOriginX,d=e._displayOriginY,i=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&(s=r.fillTint,o=g.getTintAppendFloatAlpha(e.fillColor,e.fillAlpha*i),s.TL=o,s.TR=o,s.BL=o,s.BR=o,s=e.geom.x1-u,o=e.geom.y1-d,a=e.geom.x2-u,h=e.geom.y2-d,l=e.geom.x3-u,c=e.geom.y3-d,r.batchFillTriangle(s,o,a,h,l,c,n.sprite,n.camera)),e.isStroked&&f(r,e,i,u,d),t.pipelines.postBatch(e)}},function(t,e,i){var h=i(48),l=i(60),c=i(30);t.exports=function(t,e,i,n){i.addToRenderList(e);var r,s,o,a=t.currentContext;c(t,a,e,i,n)&&(t=e._displayOriginX,i=e._displayOriginY,n=e.geom.x1-t,r=e.geom.y1-i,s=e.geom.x2-t,o=e.geom.y2-i,t=e.geom.x3-t,i=e.geom.y3-i,a.beginPath(),a.moveTo(n,r),a.lineTo(s,o),a.lineTo(t,i),a.closePath(),e.isFilled&&(h(a,e),a.fill()),e.isStroked&&(l(a,e),a.stroke()),a.restore())}},function(t,e,i){var r=i(213);i(5).register("blitter",function(t,e,i,n){return this.displayList.add(new r(this.scene,t,e,i,n))})},function(t,e,i){var n=i(214);i(5).register("container",function(t,e,i){return this.displayList.add(new n(this.scene,t,e,i))})},function(t,e,i){var s=i(442);i(5).register("dom",function(t,e,i,n,r){t=new s(this.scene,t,e,i,n,r);return this.displayList.add(t),t})},function(t,e,i){var s=i(215);i(5).register("dynamicBitmapText",function(t,e,i,n,r){return this.displayList.add(new s(this.scene,t,e,i,n,r))})},function(t,e,i){var n=i(444);i(5).register("extern",function(){var t=new n(this.scene);return this.displayList.add(t),t})},function(t,e,i){var n=i(216);i(5).register("graphics",function(t){return this.displayList.add(new n(this.scene,t))})},function(t,e,i){var n=i(113);i(5).register("group",function(t,e){return this.updateList.add(new n(this.scene,t,e))})},function(t,e,i){var r=i(125);i(5).register("image",function(t,e,i,n){return this.displayList.add(new r(this.scene,t,e,i,n))})},function(t,e,i){var n=i(219);i(5).register("layer",function(t){return this.displayList.add(new n(this.scene,t))})},function(t,e,i){var n=i(5),r=i(220);n.register("particles",function(t,e,i){return this.displayList.add(new r(this.scene,t,e,i))})},function(t,e,i){var n=i(5),s=i(457);n.register("follower",function(t,e,i,n,r){t=new s(this.scene,t,e,i,n,r);return this.displayList.add(t),this.updateList.add(t),t})},function(t,e,i){var n=i(5),o=i(221);n.register("renderTexture",function(t,e,i,n,r,s){return this.displayList.add(new o(this.scene,t,e,i,n,r,s))})},function(t,e,i){var h=i(223);i(5).register("rope",function(t,e,i,n,r,s,o,a){return this.displayList.add(new h(this.scene,t,e,i,n,r,s,o,a))})},function(t,e,i){var n=i(5),r=i(73);n.register("sprite",function(t,e,i,n){t=new r(this.scene,t,e,i,n);return this.displayList.add(t),t})},function(t,e,i){var o=i(148);i(5).register("bitmapText",function(t,e,i,n,r,s){return this.displayList.add(new o(this.scene,t,e,i,n,r,s))})},function(t,e,i){var r=i(224);i(5).register("text",function(t,e,i,n){return this.displayList.add(new r(this.scene,t,e,i,n))})},function(t,e,i){var o=i(225);i(5).register("tileSprite",function(t,e,i,n,r,s){return this.displayList.add(new o(this.scene,t,e,i,n,r,s))})},function(t,e,i){var r=i(129);i(5).register("zone",function(t,e,i,n){return this.displayList.add(new r(this.scene,t,e,i,n))})},function(t,e,i){var n=i(226);i(5).register("video",function(t,e,i){return this.displayList.add(new n(this.scene,t,e,i))})},function(t,e,i){var h=i(461),i=i(5);i.register("arc",function(t,e,i,n,r,s,o,a){return this.displayList.add(new h(this.scene,t,e,i,n,r,s,o,a))}),i.register("circle",function(t,e,i,n,r){return this.displayList.add(new h(this.scene,t,e,i,0,360,!1,n,r))})},function(t,e,i){var n=i(5),s=i(462);n.register("curve",function(t,e,i,n,r){return this.displayList.add(new s(this.scene,t,e,i,n,r))})},function(t,e,i){var o=i(463);i(5).register("ellipse",function(t,e,i,n,r,s){return this.displayList.add(new o(this.scene,t,e,i,n,r,s))})},function(t,e,i){var n=i(5),c=i(464);n.register("grid",function(t,e,i,n,r,s,o,a,h,l){return this.displayList.add(new c(this.scene,t,e,i,n,r,s,o,a,h,l))})},function(t,e,i){var n=i(5),a=i(465);n.register("isobox",function(t,e,i,n,r,s,o){return this.displayList.add(new a(this.scene,t,e,i,n,r,s,o))})},function(t,e,i){var n=i(5),h=i(466);n.register("isotriangle",function(t,e,i,n,r,s,o,a){return this.displayList.add(new h(this.scene,t,e,i,n,r,s,o,a))})},function(t,e,i){var n=i(5),h=i(467);n.register("line",function(t,e,i,n,r,s,o,a){return this.displayList.add(new h(this.scene,t,e,i,n,r,s,o,a))})},function(t,e,i){var n=i(5),s=i(468);n.register("polygon",function(t,e,i,n,r){return this.displayList.add(new s(this.scene,t,e,i,n,r))})},function(t,e,i){var n=i(5),o=i(473);n.register("rectangle",function(t,e,i,n,r,s){return this.displayList.add(new o(this.scene,t,e,i,n,r,s))})},function(t,e,i){var a=i(474);i(5).register("star",function(t,e,i,n,r,s,o){return this.displayList.add(new a(this.scene,t,e,i,n,r,s,o))})},function(t,e,i){var n=i(5),c=i(475);n.register("triangle",function(t,e,i,n,r,s,o,a,h,l){return this.displayList.add(new c(this.scene,t,e,i,n,r,s,o,a,h,l))})},function(t,e,i){var r=i(213),s=i(28),n=i(16),o=i(13);n.register("blitter",function(t,e){var i=o(t=void 0===t?{}:t,"key",null),n=o(t,"frame",null),i=new r(this.scene,0,0,i,n);return void 0!==e&&(t.add=e),s(this.scene,i,t),i})},function(t,e,i){var s=i(28),o=i(214),n=i(16),a=i(13);n.register("container",function(t,e){var i=a(t=void 0===t?{}:t,"x",0),n=a(t,"y",0),r=a(t,"children",null),i=new o(this.scene,i,n,r);return void 0!==e&&(t.add=e),s(this.scene,i,t),i})},function(t,e,i){var s=i(215),o=i(28),n=i(16),a=i(13);n.register("dynamicBitmapText",function(t,e){var i=a(t=void 0===t?{}:t,"font",""),n=a(t,"text",""),r=a(t,"size",!1),i=new s(this.scene,0,0,i,n,r);return void 0!==e&&(t.add=e),o(this.scene,i,t),i})},function(t,e,i){var n=i(16),r=i(216);n.register("graphics",function(t,e){void 0===t&&(t={}),void 0!==e&&(t.add=e);e=new r(this.scene,t);return t.add&&this.scene.sys.displayList.add(e),e})},function(t,e,i){var n=i(16),r=i(113);n.register("group",function(t){return new r(this.scene,null,t)})},function(t,e,i){var r=i(28),n=i(16),s=i(13),o=i(125);n.register("image",function(t,e){var i=s(t=void 0===t?{}:t,"key",null),n=s(t,"frame",null),i=new o(this.scene,0,0,i,n);return void 0!==e&&(t.add=e),r(this.scene,i,t),i})},function(t,e,i){var n=i(28),r=i(219),s=i(16),o=i(13);s.register("layer",function(t,e){var i=o(t=void 0===t?{}:t,"children",null),i=new r(this.scene,i);return void 0!==e&&(t.add=e),n(this.scene,i,t),i})},function(t,e,i){var n=i(16),s=i(13),o=i(2),a=i(220);n.register("particles",function(t,e){var i=s(t=void 0===t?{}:t,"key",null),n=s(t,"frame",null),r=o(t,"emitters",null),i=new a(this.scene,i,n,r);return void 0!==e&&(t.add=e),(o(t,"add",!1)?this.displayList:this.updateList).add(i),i})},function(t,e,i){var h=i(28),n=i(16),l=i(13),c=i(221);n.register("renderTexture",function(t,e){var i=l(t=void 0===t?{}:t,"x",0),n=l(t,"y",0),r=l(t,"width",32),s=l(t,"height",32),o=l(t,"key",void 0),a=l(t,"frame",void 0),i=new c(this.scene,i,n,r,s,o,a);return void 0!==e&&(t.add=e),h(this.scene,i,t),i})},function(t,e,i){var h=i(28),n=i(16),l=i(13),c=i(6),u=i(223);n.register("rope",function(t,e){var i=l(t=void 0===t?{}:t,"key",null),n=l(t,"frame",null),r=l(t,"horizontal",!0),s=c(t,"points",void 0),o=c(t,"colors",void 0),a=c(t,"alphas",void 0),i=new u(this.scene,0,0,i,n,s,r,o,a);return void 0!==e&&(t.add=e),h(this.scene,i,t),t.add||this.updateList.add(i),i})},function(t,e,i){var r=i(28),s=i(439),n=i(16),o=i(13),a=i(73);n.register("sprite",function(t,e){var i=o(t=void 0===t?{}:t,"key",null),n=o(t,"frame",null),i=new a(this.scene,0,0,i,n);return void 0!==e&&(t.add=e),r(this.scene,i,t),s(i,t),i})},function(t,e,i){var o=i(148),a=i(28),n=i(16),h=i(13),l=i(6);n.register("bitmapText",function(t,e){var i=l(t=void 0===t?{}:t,"font",""),n=h(t,"text",""),r=h(t,"size",!1),s=l(t,"align",0),i=new o(this.scene,0,0,i,n,r,s);return void 0!==e&&(t.add=e),a(this.scene,i,t),i})},function(t,e,i){var s=i(28),n=i(16),o=i(13),a=i(224);n.register("text",function(t,e){var i=o(t=void 0===t?{}:t,"text",""),n=o(t,"style",null),r=o(t,"padding",null),r=(null!==r&&(n.padding=r),new a(this.scene,0,0,i,n));return void 0!==e&&(t.add=e),s(this.scene,r,t),r.autoRound=o(t,"autoRound",!0),r.resolution=o(t,"resolution",1),r})},function(t,e,i){var h=i(28),n=i(16),l=i(13),c=i(225);n.register("tileSprite",function(t,e){var i=l(t=void 0===t?{}:t,"x",0),n=l(t,"y",0),r=l(t,"width",512),s=l(t,"height",512),o=l(t,"key",""),a=l(t,"frame",""),i=new c(this.scene,i,n,r,s,o,a);return void 0!==e&&(t.add=e),h(this.scene,i,t),i})},function(t,e,i){var n=i(16),r=i(13),s=i(129);n.register("zone",function(t){var e=r(t,"x",0),i=r(t,"y",0),n=r(t,"width",1),t=r(t,"height",n);return new s(this.scene,e,i,n,t)})},function(t,e,i){var n=i(28),r=i(16),s=i(13),o=i(226);r.register("video",function(t,e){var i=s(t=void 0===t?{}:t,"key",null),i=new o(this.scene,0,0,i);return void 0!==e&&(t.add=e),n(this.scene,i,t),t.add||this.updateList.add(i),i})},function(t,e,i){i(1),i(1);var n=i(1177),i=i(1178);t.exports={renderWebGL:n,renderCanvas:i}},function(t,e,i){var r=i(19);t.exports=function(t,e,i,n){e.shader&&(i.addToRenderList(e),t.pipelines.clear(),e.renderToTexture?e.load():(i=r(e,i,n).calc,t.width===e._rendererWidth&&t.height===e._rendererHeight||e.projOrtho(0,t.width,t.height,0),e.load(i.matrix)),e.flush(),t.pipelines.rebind())}},function(t,e){t.exports=function(){}},function(t,e,i){i(1),i(1);var n=i(1180),i=i(1181);t.exports={renderWebGL:n,renderCanvas:i}},function(t,e,i){var A=i(19);t.exports=function(t,e,i,n){var r=e.faces,s=r.length;if(0!==s){i.addToRenderList(e);var o=t.pipelines.set(e.pipeline,e),n=A(e,i,n).calc,a=o.setGameObject(e),h=o.vertexViewF32,l=o.vertexViewU32,c=o.vertexCount*o.currentShader.vertexComponentCount-1,u=e.tintFill,d=[],p=e.debugCallback,f=n.a,g=n.b,m=n.c,y=n.d,v=n.e,x=n.f,b=e.viewPosition.z,w=e.hideCCW,T=i.roundPixels,S=i.alpha*e.alpha,P=0;t.pipelines.preBatch(e);for(var _=0;_<s;_++){var E=r[_];E.isInView(i,w,b,S,f,g,m,y,v,x,T)&&(o.shouldFlush(3)&&(o.flush(),c=0),c=E.load(h,l,c,a,u),P++,o.vertexCount+=3,p&&d.push(E))}e.totalFrame+=P,p&&p.call(e,e,d),t.pipelines.postBatch(e)}}},function(t,e){t.exports=function(){}},function(t,e,i){i(1);var n=i(1),i=i(1183);t.exports={renderWebGL:i,renderCanvas:n}},function(t,e,i){var m=i(19);t.exports=function(t,e,i,n){i.addToRenderList(e);var r=t.pipelines.set(e.pipeline),n=m(e,i,n).calc,s=e.width,o=e.height,a=-e._radius,h=-e._radius,s=a+s,o=h+o,l=n.getX(0,0),c=n.getY(0,0),u=n.getX(a,h),d=n.getY(a,h),p=n.getX(a,o),a=n.getY(a,o),f=n.getX(s,o),o=n.getY(s,o),g=n.getX(s,h),n=n.getY(s,h);t.pipelines.preBatch(e),r.batchPointLight(e,i,u,d,p,a,f,o,g,n,l,c),t.pipelines.postBatch(e)}},function(t,e,i){var a=i(229);i(5).register("shader",function(t,e,i,n,r,s,o){return this.displayList.add(new a(this.scene,t,e,i,n,r,s,o))})},function(t,e,i){var u=i(230);i(5).register("mesh",function(t,e,i,n,r,s,o,a,h,l,c){return this.displayList.add(new u(this.scene,t,e,i,n,r,s,o,a,h,l,c))})},function(t,e,i){var n=i(5),o=i(150);n.register("pointlight",function(t,e,i,n,r,s){return this.displayList.add(new o(this.scene,t,e,i,n,r,s))})},function(t,e,i){var a=i(28),n=i(16),h=i(13),l=i(229);n.register("shader",function(t,e){var i=h(t=void 0===t?{}:t,"key",null),n=h(t,"x",0),r=h(t,"y",0),s=h(t,"width",128),o=h(t,"height",128),i=new l(this.scene,i,n,r,s,o);return void 0!==e&&(t.add=e),a(this.scene,i,t),i})},function(t,e,i){var u=i(28),n=i(16),d=i(13),p=i(6),f=i(230);n.register("mesh",function(t,e){var i=d(t=void 0===t?{}:t,"key",null),n=d(t,"frame",null),r=p(t,"vertices",[]),s=p(t,"uvs",[]),o=p(t,"indicies",[]),a=p(t,"containsZ",!1),h=p(t,"normals",[]),l=p(t,"colors",16777215),c=p(t,"alphas",1),i=new f(this.scene,0,0,i,n,r,s,o,a,h,l,c);return void 0!==e&&(t.add=e),u(this.scene,i,t),i})},function(t,e,i){var o=i(28),n=i(16),a=i(13),h=i(150);n.register("pointlight",function(t,e){var i=a(t=void 0===t?{}:t,"color",16777215),n=a(t,"radius",128),r=a(t,"intensity",1),s=a(t,"attenuation",.1),i=new h(this.scene,0,0,i,n,r,s);return void 0!==e&&(t.add=e),o(this.scene,i,t),i})},function(t,e,i){var n=i(0),r=i(482),s=i(24),o=i(20),i=new n({Extends:r,initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once(o.BOOT,this.boot,this),r.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}});s.register("LightsPlugin",i,"lights"),t.exports=i},function(t,e,i){var n=i(65);n.Area=i(1192),n.Circumference=i(302),n.CircumferencePoint=i(169),n.Clone=i(1193),n.Contains=i(66),n.ContainsPoint=i(1194),n.ContainsRect=i(1195),n.CopyFrom=i(1196),n.Equals=i(1197),n.GetBounds=i(1198),n.GetPoint=i(300),n.GetPoints=i(301),n.Offset=i(1199),n.OffsetPoint=i(1200),n.Random=i(170),t.exports=n},function(t,e){t.exports=function(t){return 0<t.radius?Math.PI*t.radius*t.radius:0}},function(t,e,i){var n=i(65);t.exports=function(t){return new n(t.x,t.y,t.radius)}},function(t,e,i){var n=i(66);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(66);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)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.radius)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.radius===e.radius}},function(t,e,i){var n=i(10);t.exports=function(t,e){return(e=void 0===e?new n:e).x=t.left,e.y=t.top,e.width=t.diameter,e.height=t.diameter,e}},function(t,e){t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},function(t,e,i){var n=i(111);n.Area=i(1202),n.Circumference=i(447),n.CircumferencePoint=i(218),n.Clone=i(1203),n.Contains=i(112),n.ContainsPoint=i(1204),n.ContainsRect=i(1205),n.CopyFrom=i(1206),n.Equals=i(1207),n.GetBounds=i(1208),n.GetPoint=i(445),n.GetPoints=i(446),n.Offset=i(1209),n.OffsetPoint=i(1210),n.Random=i(180),t.exports=n},function(t,e){t.exports=function(t){return t.isEmpty()?0:t.getMajorRadius()*t.getMinorRadius()*Math.PI}},function(t,e,i){var n=i(111);t.exports=function(t){return new n(t.x,t.y,t.width,t.height)}},function(t,e,i){var n=i(112);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(112);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)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.width,t.height)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}},function(t,e,i){var n=i(10);t.exports=function(t,e){return(e=void 0===e?new n:e).x=t.left,e.y=t.top,e.width=t.width,e.height=t.height,e}},function(t,e){t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},function(t,e,i){var d=i(4),p=i(231);t.exports=function(t,e,i){var n,r,s,o,a,h,l,c,u;return void 0===i&&(i=[]),p(t,e)&&(n=t.x,r=t.y,t=t.radius,s=e.x,o=e.y,e=e.radius,r===o?0==(u=(c=-2*o)*c-4*(l=1)*(s*s+(a=(e*e-t*t-s*s+n*n)/(2*(n-s)))*a-2*s*a+o*o-e*e))?i.push(new d(a,-c/(2*l))):0<u&&(i.push(new d(a,(-c+Math.sqrt(u))/(2*l))),i.push(new d(a,(-c-Math.sqrt(u))/(2*l)))):0==(u=(c=2*r*(h=(n-s)/(r-o))-2*(e=(e*e-t*t-s*s+n*n-o*o+r*r)/(2*(r-o)))*h-2*n)*c-4*(l=h*h+1)*(n*n+r*r+e*e-t*t-2*r*e))?i.push(new d(a=-c/(2*l),e-a*h)):0<u&&(a=(-c+Math.sqrt(u))/(2*l),i.push(new d(a,e-a*h)),a=(-c-Math.sqrt(u))/(2*l),i.push(new d(a,e-a*h)))),i}},function(t,e,i){var o=i(232),a=i(151);t.exports=function(t,e,i){var n,r,s;return void 0===i&&(i=[]),a(t,e)&&(n=e.getLineA(),r=e.getLineB(),s=e.getLineC(),e=e.getLineD(),o(n,t,i),o(r,t,i),o(s,t,i),o(e,t,i)),i}},function(t,e,i){var a=i(140),h=i(487),l=new(i(47));function c(t,e,i,n,r){var s=Math.cos(t),o=Math.sin(t),e=(l.setTo(e,i,e+s,i+o),h(l,n));e&&r.push(new a(e.x,e.y,t,e.w))}function u(t,e){return t.z-e.z}t.exports=function(t,e,i){Array.isArray(i)||(i=[i]);for(var n=[],r=[],s=0;s<i.length;s++)for(var o=i[s].points,a=0;a<o.length;a++){var h=Math.atan2(o[a].y-e,o[a].x-t);-1===r.indexOf(h)&&(c(h,t,e,i,n),c(h-1e-5,t,e,i,n),c(h+1e-5,t,e,i,n),r.push(h))}return n.sort(u)}},function(t,e,i){var n=i(10),r=i(152);t.exports=function(t,e,i){return void 0===i&&(i=new n),r(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}},function(t,e,i){var o=i(234),a=i(152);t.exports=function(t,e,i){var n,r,s;return void 0===i&&(i=[]),a(t,e)&&(n=t.getLineA(),r=t.getLineB(),s=t.getLineC(),t=t.getLineD(),o(n,e,i),o(r,e,i),o(s,e,i),o(t,e,i)),i}},function(t,e,i){var s=i(489),o=i(234);t.exports=function(t,e,i){var n,r;return void 0===i&&(i=[]),s(t,e)&&(n=e.getLineA(),r=e.getLineB(),e=e.getLineC(),o(n,t,i),o(r,t,i),o(e,t,i)),i}},function(t,e,i){var s=i(232),o=i(491);t.exports=function(t,e,i){var n,r;return void 0===i&&(i=[]),o(t,e)&&(n=t.getLineA(),r=t.getLineB(),t=t.getLineC(),s(n,e,i),s(r,e,i),s(t,e,i)),i}},function(t,e,i){var s=i(494),o=i(492);t.exports=function(t,e,i){var n,r;return void 0===i&&(i=[]),s(t,e)&&(n=e.getLineA(),r=e.getLineB(),e=e.getLineC(),o(t,n,i),o(t,r,i),o(t,e,i)),i}},function(t,e,i){var s=i(496);t.exports=function(t,e){var i,n,r;return!!s(t,e)&&(i=Math.min(e.x1,e.x2),n=Math.max(e.x1,e.x2),r=Math.min(e.y1,e.y2),e=Math.max(e.y1,e.y2),t.x>=i&&t.x<=n&&t.y>=r&&t.y<=e)}},function(t,e){t.exports=function(t,e,i,n,r,s){return!(e>t.right+(s=void 0===s?0:s)||i<t.left-s||n>t.bottom+s||r<t.top-s)}},function(t,e,i){var n=i(47);n.Angle=i(97),n.BresenhamPoints=i(317),n.CenterOn=i(1222),n.Clone=i(1223),n.CopyFrom=i(1224),n.Equals=i(1225),n.Extend=i(1226),n.GetEasedPoints=i(1227),n.GetMidPoint=i(1228),n.GetNearestPoint=i(1229),n.GetNormal=i(1230),n.GetPoint=i(307),n.GetPoints=i(172),n.GetShortestDistance=i(1231),n.Height=i(1232),n.Length=i(67),n.NormalAngle=i(497),n.NormalX=i(1233),n.NormalY=i(1234),n.Offset=i(1235),n.PerpSlope=i(1236),n.Random=i(173),n.ReflectAngle=i(1237),n.Rotate=i(1238),n.RotateAroundPoint=i(1239),n.RotateAroundXY=i(236),n.SetToAngle=i(1240),n.Slope=i(1241),n.Width=i(1242),t.exports=n},function(t,e){t.exports=function(t,e,i){e-=(t.x1+t.x2)/2,i-=(t.y1+t.y2)/2;return t.x1+=e,t.y1+=i,t.x2+=e,t.y2+=i,t}},function(t,e,i){var n=i(47);t.exports=function(t){return new n(t.x1,t.y1,t.x2,t.y2)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x1,t.y1,t.x2,t.y2)}},function(t,e){t.exports=function(t,e){return t.x1===e.x1&&t.y1===e.y1&&t.x2===e.x2&&t.y2===e.y2}},function(t,e,i){var o=i(67);t.exports=function(t,e,i){void 0===i&&(i=e);var n=o(t),r=t.x2-t.x1,s=t.y2-t.y1;return e&&(t.x1=t.x1-r/n*e,t.y1=t.y1-s/n*e),i&&(t.x2=t.x2+r/n*i,t.y2=t.y2+s/n*i),t}},function(t,e,i){var y=i(352),v=i(80),x=i(4);t.exports=function(t,e,i,n,r){void 0===n&&(n=0);for(var s,o=[],a=t.x1,h=t.y1,l=t.x2-a,c=t.y2-h,u=v(e,r=void 0===r?[]:r),d=i-1,p=0;p<d;p++)s=u(p/d),o.push(new x(a+l*s,h+c*s));if(s=u(1),o.push(new x(a+l*s,h+c*s)),0<n){for(var f=o[0],g=[f],p=1;p<o.length-1;p++){var m=o[p];y(f,m)>=n&&(g.push(m),f=m)}t=o[o.length-1];return y(f,t)<n&&g.pop(),g.push(t),g}return o}},function(t,e,i){var n=i(4);t.exports=function(t,e){return(e=void 0===e?new n:e).x=(t.x1+t.x2)/2,e.y=(t.y1+t.y2)/2,e}},function(t,e,i){var a=i(4);t.exports=function(t,e,i){void 0===i&&(i=new a);var n=t.x1,r=t.y1,s=t.x2,t=t.y2,o=(s-n)*(s-n)+(t-r)*(t-r);return 0!=o&&(e=((e.x-n)*(s-n)+(e.y-r)*(t-r))/o,i.x=n+e*(s-n),i.y=r+e*(t-r)),i}},function(t,e,i){var n=i(14),r=i(97),s=i(4);t.exports=function(t,e){void 0===e&&(e=new s);t=r(t)-n.TAU;return e.x=Math.cos(t),e.y=Math.sin(t),e}},function(t,e){t.exports=function(t,e){var i=t.x1,n=t.y1,r=t.x2,t=t.y2,s=(r-i)*(r-i)+(t-n)*(t-n);return 0!=s&&(r=((n-e.y)*(r-i)-(i-e.x)*(t-n))/s,Math.abs(r)*Math.sqrt(s))}},function(t,e){t.exports=function(t){return Math.abs(t.y1-t.y2)}},function(t,e,i){var n=i(14),r=i(97);t.exports=function(t){return Math.cos(r(t)-n.TAU)}},function(t,e,i){var n=i(14),r=i(97);t.exports=function(t){return Math.sin(r(t)-n.TAU)}},function(t,e){t.exports=function(t,e,i){return t.x1+=e,t.y1+=i,t.x2+=e,t.y2+=i,t}},function(t,e){t.exports=function(t){return-(t.x2-t.x1)/(t.y2-t.y1)}},function(t,e,i){var n=i(97),r=i(497);t.exports=function(t,e){return 2*r(e)-Math.PI-n(t)}},function(t,e,i){var r=i(236);t.exports=function(t,e){var i=(t.x1+t.x2)/2,n=(t.y1+t.y2)/2;return r(t,i,n,e)}},function(t,e,i){var n=i(236);t.exports=function(t,e,i){return n(t,e.x,e.y,i)}},function(t,e){t.exports=function(t,e,i,n,r){return t.x1=e,t.y1=i,t.x2=e+Math.cos(n)*r,t.y2=i+Math.sin(n)*r,t}},function(t,e){t.exports=function(t){return(t.y2-t.y1)/(t.x2-t.x1)}},function(t,e){t.exports=function(t){return Math.abs(t.x1-t.x2)}},function(t,e,i){i={Face:i(116),GenerateGridVerts:i(1244),GenerateObjVerts:i(480),GenerateVerts:i(479),ParseObj:i(498),ParseObjMaterial:i(499),RotateFace:i(1245),Vertex:i(117)};t.exports=i},function(t,e,i){var J=i(116),Z=i(2),n=i(69),r=i(39),Q=i(117),$=new r,tt=new r,et=new n;t.exports=function(t){var e=Z(t,"mesh"),i=Z(t,"texture",null),n=Z(t,"frame"),r=Z(t,"width",1),s=Z(t,"height",r),o=Z(t,"widthSegments",1),a=Z(t,"heightSegments",o),h=Z(t,"x",0),l=Z(t,"y",0),c=Z(t,"z",0),u=Z(t,"rotateX",0),B=Z(t,"rotateY",0),F=Z(t,"rotateZ",0),N=Z(t,"zIsUp",!0),z=Z(t,"isOrtho",!!e&&e.dirtyCache[11]),d=Z(t,"colors",[16777215]),p=Z(t,"alphas",[1]),Y=Z(t,"tile",!1),X=Z(t,"flipY",!1),t=Z(t,"width",null),f={faces:[],verts:[]};if($.set(h,l,c),tt.set(u,B,F),et.fromRotationXYTranslation(tt,$,N),!i&&e)i=e.texture;else{if(!e||"string"!=typeof i)return f;i=e.scene.sys.textures.get(i)}var h=i.get(n),U=(!t&&z&&i&&e&&(r=h.width/e.height,s=h.height/e.height),r/2),V=s/2,g=Math.floor(o),m=Math.floor(a),y=g+1,G=m+1,j=r/g,W=s/m,v=[],x=[],b=0,w=1,T=0,S=1;h&&(b=h.u0,w=h.u1,S=X?(T=h.v1,h.v0):(T=h.v0,h.v1));for(var H=w-b,K=S-T,P=0;P<G;P++)for(var q=P*W-V,_=0;_<y;_++)x.push(_*j-U,-q),v.push(b+_/g*H,T+P/m*K);Array.isArray(d)||(d=[d]),Array.isArray(p)||(p=[p]);for(var E=0,A=0,P=0;P<m;P++)for(_=0;_<g;_++){var M=2*(_+y*P),k=2*(_+y*(P+1)),C=2*(_+1+y*(P+1)),O=2*(_+1+y*P),R=d[A],L=p[E],M=new Q(x[M],x[1+M],0,v[M],v[1+M],R,L).transformMat4(et),D=new Q(x[k],x[1+k],0,v[k],v[1+k],R,L).transformMat4(et),I=new Q(x[O],x[1+O],0,v[O],v[1+O],R,L).transformMat4(et),k=new Q(x[k],x[1+k],0,v[k],v[1+k],R,L).transformMat4(et),C=new Q(x[C],x[1+C],0,v[C],v[1+C],R,L).transformMat4(et),O=new Q(x[O],x[1+O],0,v[O],v[1+O],R,L).transformMat4(et);Y&&(M.setUVs(b,S),D.setUVs(b,T),I.setUVs(w,S),k.setUVs(b,T),C.setUVs(w,T),O.setUVs(w,S)),++A===d.length&&(A=0),++E===p.length&&(E=0),f.verts.push(M,D,I,k,C,O),f.faces.push(new J(M,D,I),new J(k,C,O))}return e&&(e.faces=e.faces.concat(f.faces),e.vertices=e.vertices.concat(f.verts)),f}},function(t,e){t.exports=function(t,e,i,n){void 0===i&&void 0===n&&(r=(i=t.getInCenter()).x,s=i.y);var r,s,n=Math.cos(e),i=Math.sin(e),e=t.vertex1,o=t.vertex2,t=t.vertex3,a=e.x-r,h=e.y-s;e.set(a*n-h*i+r,a*i+h*n+s),a=o.x-r,h=o.y-s,o.set(a*n-h*i+r,a*i+h*n+s),a=t.x-r,h=t.y-s,t.set(a*n-h*i+r,a*i+h*n+s)}},function(t,e,i){var n=i(4);n.Ceil=i(1247),n.Clone=i(1248),n.CopyFrom=i(1249),n.Equals=i(1250),n.Floor=i(1251),n.GetCentroid=i(1252),n.GetMagnitude=i(500),n.GetMagnitudeSq=i(501),n.GetRectangleFromPoints=i(1253),n.Interpolate=i(1254),n.Invert=i(1255),n.Negative=i(1256),n.Project=i(1257),n.ProjectUnit=i(1258),n.SetMagnitude=i(1259),t.exports=n},function(t,e){t.exports=function(t){return t.setTo(Math.ceil(t.x),Math.ceil(t.y))}},function(t,e,i){var n=i(4);t.exports=function(t){return new n(t.x,t.y)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y}},function(t,e){t.exports=function(t){return t.setTo(Math.floor(t.x),Math.floor(t.y))}},function(t,e,i){var r=i(4);t.exports=function(t,e){if(void 0===e&&(e=new r),!Array.isArray(t))throw new Error("GetCentroid points argument must be an array");var i=t.length;if(i<1)throw new Error("GetCentroid points array must not be empty");if(1===i)e.x=t[0].x,e.y=t[0].y;else{for(var n=0;n<i;n++)e.x+=t[n].x,e.y+=t[n].y;e.x/=i,e.y/=i}return e}},function(t,e,i){var h=i(10);t.exports=function(t,e){void 0===e&&(e=new h);for(var i=Number.NEGATIVE_INFINITY,n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY,s=Number.POSITIVE_INFINITY,o=0;o<t.length;o++){var a=t[o];a.x>i&&(i=a.x),a.x<n&&(n=a.x),a.y>r&&(r=a.y),a.y<s&&(s=a.y)}return e.x=n,e.y=s,e.width=i-n,e.height=r-s,e}},function(t,e,i){var r=i(4);t.exports=function(t,e,i,n){return void 0===i&&(i=0),(n=void 0===n?new r:n).x=t.x+(e.x-t.x)*i,n.y=t.y+(e.y-t.y)*i,n}},function(t,e){t.exports=function(t){return t.setTo(t.y,t.x)}},function(t,e,i){var n=i(4);t.exports=function(t,e){return(e=void 0===e?new n:e).setTo(-t.x,-t.y)}},function(t,e,i){var n=i(4),r=i(501);t.exports=function(t,e,i){void 0===i&&(i=new n);t=(t.x*e.x+t.y*e.y)/r(e);return 0!=t&&(i.x=t*e.x,i.y=t*e.y),i}},function(t,e,i){var n=i(4);t.exports=function(t,e,i){void 0===i&&(i=new n);t=t.x*e.x+t.y*e.y;return 0!=t&&(i.x=t*e.x,i.y=t*e.y),i}},function(t,e,i){var n=i(500);t.exports=function(t,e){var i;return 0===t.x&&0===t.y||(i=n(t),t.x/=i,t.y/=i),t.x*=e,t.y*=e,t}},function(t,e,i){var n=i(227);n.Clone=i(1261),n.Contains=i(228),n.ContainsPoint=i(1262),n.Earcut=i(59),n.GetAABB=i(469),n.GetNumberArray=i(1263),n.GetPoints=i(470),n.Perimeter=i(471),n.Reverse=i(1264),n.Simplify=i(1265),n.Smooth=i(472),n.Translate=i(1266),t.exports=n},function(t,e,i){var n=i(227);t.exports=function(t){return new n(t.points)}},function(t,e,i){var n=i(228);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e){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}},function(t,e){t.exports=function(t){return t.points.reverse(),t}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=1),void 0===i&&(i=!1);var n,r=t.points;return 2<r.length&&(e=e*e,i||(r=function(t,e){for(var i,n,r,s,o=t[0],a=[o],h=1,l=t.length;h<l;h++)r=o,e<(s=(n=i=t[h]).x-r.x)*s+(s=n.y-r.y)*s&&(a.push(i),o=i);return o!==i&&a.push(i),a}(r,e)),t.setTo((r=(i=r).length-1,n=[i[0]],function t(e,i,n,r,s){for(var o,a,h,l,c,u,d,p=r,f=i+1;f<n;f++){a=e[f],h=e[i],g=e[n],d=u=c=l=void 0,l=h.x,c=h.y,u=g.x-l,d=g.y-c,0===u&&0===d||(1<(h=((a.x-l)*u+(a.y-c)*d)/(u*u+d*d))?(l=g.x,c=g.y):0<h&&(l+=u*h,c+=d*h));var g=(u=a.x-l)*u+(d=a.y-c)*d;p<g&&(o=f,p=g)}r<p&&(1<o-i&&t(e,i,o,r,s),s.push(e[o]),1<n-o&&t(e,o,n,r,s))}(i,0,r,e,n),n.push(i[r]),n))),t}},function(t,e){t.exports=function(t,e,i){for(var n=t.points,r=0;r<n.length;r++)n[r].x+=e,n[r].y+=i;return t}},function(t,e){t.exports=function(t){return t.width*t.height}},function(t,e){t.exports=function(t){return t.x=Math.ceil(t.x),t.y=Math.ceil(t.y),t}},function(t,e){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}},function(t,e,i){var n=i(10);t.exports=function(t){return new n(t.x,t.y,t.width,t.height)}},function(t,e,i){var n=i(57);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.width,t.height)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}},function(t,e,i){var n=i(237);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)}},function(t,e,i){var n=i(237);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)}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t}},function(t,e){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}},function(t,e,i){var s=i(10);t.exports=function(t,e,i,n,r){return(r=void 0===r?new s:r).setTo(Math.min(t,i),Math.min(e,n),Math.abs(t-i),Math.abs(e-n))}},function(t,e,i){var n=i(4);t.exports=function(t,e){return(e=void 0===e?new n:e).x=t.centerX,e.y=t.centerY,e}},function(t,e,i){var n=i(4);t.exports=function(t,e){return(e=void 0===e?new n:e).x=t.width,e.y=t.height,e}},function(t,e,i){var s=i(190);t.exports=function(t,e,i){var n=t.centerX,r=t.centerY;return t.setSize(t.width+2*e,t.height+2*i),s(t,n,r)}},function(t,e,i){var n=i(10),r=i(152);t.exports=function(t,e,i){return void 0===i&&(i=new n),r(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}},function(t,e){t.exports=function(t,e){for(var i=t.x,n=t.right,r=t.y,s=t.bottom,o=0;o<e.length;o++)i=Math.min(i,e[o].x),n=Math.max(n,e[o].x),r=Math.min(r,e[o].y),s=Math.max(s,e[o].y);return t.x=i,t.y=r,t.width=n-i,t.height=s-r,t}},function(t,e){t.exports=function(t,e){var i=Math.min(t.x,e.x),n=Math.max(t.right,e.right),n=(t.x=i,t.width=n-i,Math.min(t.y,e.y)),i=Math.max(t.bottom,e.bottom);return t.y=n,t.height=i-n,t}},function(t,e){t.exports=function(t,e,i){var n=Math.min(t.x,e),e=Math.max(t.right,e),e=(t.x=n,t.width=e-n,Math.min(t.y,i)),n=Math.max(t.bottom,i);return t.y=e,t.height=n-e,t}},function(t,e){t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},function(t,e){t.exports=function(t,e){return t.x<e.right&&t.right>e.x&&t.y<e.bottom&&t.bottom>e.y}},function(t,e,i){var o=i(4),a=i(36);t.exports=function(t,e,i){void 0===i&&(i=new o),e=a(e);var n=Math.sin(e),e=Math.cos(e),r=0<e?t.width/2:t.width/-2,s=0<n?t.height/2:t.height/-2;return Math.abs(r*n)<Math.abs(s*e)?s=r*n/e:r=s*e/n,i.x=r+t.centerX,i.y=s+t.centerY,i}},function(t,e,i){var n=i(195),r=i(503),s=i(4);t.exports=function(t,e,i){if(void 0===i&&(i=new s),r(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}},function(t,e){t.exports=function(t,e){return t.width===e.width&&t.height===e.height}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=e),t.width*=e,t.height*=i,t}},function(t,e,i){var n=i(82);n.Area=i(1294),n.BuildEquilateral=i(1295),n.BuildFromPolygon=i(1296),n.BuildRight=i(1297),n.CenterOn=i(1298),n.Centroid=i(504),n.CircumCenter=i(1299),n.CircumCircle=i(1300),n.Clone=i(1301),n.Contains=i(115),n.ContainsArray=i(235),n.ContainsPoint=i(1302),n.CopyFrom=i(1303),n.Decompose=i(495),n.Equals=i(1304),n.GetPoint=i(476),n.GetPoints=i(477),n.InCenter=i(506),n.Perimeter=i(1305),n.Offset=i(505),n.Random=i(181),n.Rotate=i(1306),n.RotateAroundPoint=i(1307),n.RotateAroundXY=i(238),t.exports=n},function(t,e){t.exports=function(t){var e=t.x1,i=t.y1,n=t.x2,r=t.y2,s=t.x3,t=t.y3;return Math.abs(((s-e)*(r-i)-(n-e)*(t-i))/2)}},function(t,e,i){var r=i(82);t.exports=function(t,e,i){var n=i*(Math.sqrt(3)/2);return new r(t,e,t+i/2,e+n,t-i/2,e+n)}},function(t,e,i){var p=i(59),f=i(82);t.exports=function(t,e,i,n,r){void 0===i&&(i=1),void 0===n&&(n=1),void 0===r&&(r=[]);for(var s,o,a,h,l,c,u=p(t,e=void 0===e?null:e),d=0;d<u.length;d+=3)o=u[d],h=u[d+1],c=u[d+2],s=t[2*o]*i,o=t[2*o+1]*n,a=t[2*h]*i,h=t[2*h+1]*n,l=t[2*c]*i,c=t[2*c+1]*n,r.push(new f(s,o,a,h,l,c));return r}},function(t,e,i){var r=i(82);t.exports=function(t,e,i,n){return new r(t,e,t,e-(n=void 0===n?i:n),t+i,e)}},function(t,e,i){var r=i(504),s=i(505);t.exports=function(t,e,i,n){n=(n=void 0===n?r:n)(t),e-=n.x,i-=n.y;return s(t,e,i)}},function(t,e,i){var l=i(3);t.exports=function(t,e){void 0===e&&(e=new l);var i=t.x3,n=t.y3,r=t.x1-i,s=t.y1-n,o=t.x2-i,t=t.y2-n,a=2*(r*t-s*o),h=r*(o*o+t*t)-(r*r+s*s)*o;return e.x=i-(s*(o*o+t*t)-(r*r+s*s)*t)/a,e.y=n+h/a,e}},function(t,e,i){var v=i(65);t.exports=function(t,e){void 0===e&&(e=new v);var i,n,r,s,o=t.x1,a=t.y1,h=t.x2,l=t.y2,c=t.x3,t=t.y3,u=h-o,d=l-a,p=c-o,f=t-a,g=u*(o+h)+d*(a+l),m=p*(o+c)+f*(a+t),y=2*(u*(t-l)-d*(c-h));return Math.abs(y)<1e-6?(i=Math.min(o,h,c),n=Math.min(a,l,t),r=.5*(Math.max(o,h,c)-i),s=.5*(Math.max(a,l,t)-n),e.x=i+r,e.y=n+s):(e.x=(f*g-d*m)/y,e.y=(u*m-p*g)/y,r=e.x-o,s=e.y-a),e.radius=Math.sqrt(r*r+s*s),e}},function(t,e,i){var n=i(82);t.exports=function(t){return new n(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)}},function(t,e,i){var n=i(115);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)}},function(t,e){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}},function(t,e,i){var n=i(67);t.exports=function(t){var e=t.getLineA(),i=t.getLineB(),t=t.getLineC();return n(e)+n(i)+n(t)}},function(t,e,i){var n=i(238),r=i(506);t.exports=function(t,e){var i=r(t);return n(t,i.x,i.y,e)}},function(t,e,i){var n=i(238);t.exports=function(t,e,i){return n(t,e.x,e.y,i)}},function(t,e,i){var n=i(203),i=i(17)(!1,{CreatePixelPerfectHandler:i(507),CreateInteractiveObject:i(508),Events:i(51),Gamepad:i(1309),InputManager:i(409),InputPlugin:i(1321),InputPluginCache:i(153),Keyboard:i(1322),Mouse:i(1336),Pointer:i(412),Touch:i(1337)},n);t.exports=i},function(t,e,i){t.exports={Axis:i(509),Button:i(510),Events:i(239),Gamepad:i(511),GamepadPlugin:i(1316),Configs:i(1317)}},function(t,e){t.exports="down"},function(t,e){t.exports="up"},function(t,e){t.exports="connected"},function(t,e){t.exports="disconnected"},function(t,e){t.exports="down"},function(t,e){t.exports="up"},function(t,e,i){var n=i(0),r=i(9),s=i(239),a=i(511),o=i(6),h=i(153),l=i(51),i=new n({Extends:r,initialize:function(t){r.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=o(e,"gamepad",i.inputGamepad)&&t.device.input.gamepads,this.target=o(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(){function t(t){!t.defaultPrevented&&e.isActive()&&(e.refreshPads(),e.queue.push(t))}var e=this,i=this.target;this.onGamepadHandler=t,i.addEventListener("gamepadconnected",t,!1),i.addEventListener("gamepaddisconnected",t,!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=0;t<this.gamepads.length;t++)this.gamepads[t].removeAllListeners()},disconnectAll:function(){for(var t=0;t<this.gamepads.length;t++)this.gamepads[t].pad.connected=!1},refreshPads:function(){var t=navigator.getGamepads();if(t)for(var e=this.gamepads,i=0;i<t.length;i++){var n,r,s,o=t[i];o&&(s=o.id,(r=e[n=o.index])?r.id!==s?(r.destroy(),e[n]=new a(this,o)):r.update(o):(s=new a(this,o),e[n]=s,this._pad1?this._pad2?this._pad3?this._pad4||(this._pad4=s):this._pad3=s:this._pad2=s:this._pad1=s))}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],r=this.getPad(n.gamepad.index);"gamepadconnected"===n.type?this.emit(s.CONNECTED,r,n):"gamepaddisconnected"===n.type&&this.emit(s.DISCONNECTED,r,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",i,"gamepad","gamepad","inputGamepad"),t.exports=i},function(t,e,i){t.exports={DUALSHOCK_4:i(1318),SNES_USB:i(1319),XBOX_360:i(1320)}},function(t,e){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}},function(t,e){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}},function(t,e){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}},function(t,e,i){var s=i(65),o=i(66),n=i(0),a=i(203),p=i(508),r=i(507),h=i(50),l=i(111),c=i(112),g=i(51),u=i(9),f=i(2),d=i(56),m=i(153),y=i(7),v=i(24),x=i(10),b=i(57),w=i(20),T=i(82),S=i(115),i=new n({Extends:u,initialize:function(t){u.call(this),this.scene=t,this.systems=t.sys,this.settings=t.sys.settings,this.manager=t.sys.game.input,this.pluginEvents=new u,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(g.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(g.GAME_OUT,this.onGameOut,this),this.manager.events.on(g.GAME_OVER,this.onGameOver,this),this.enabled=!0,this._dragState=[0,0,0,0,0,0,0,0,0,0],this.pluginEvents.emit(g.START)},onGameOver:function(t){this.isActive()&&this.emit(g.GAME_OVER,t.timeStamp,t)},onGameOut:function(t){this.isActive()&&this.emit(g.GAME_OUT,t.timeStamp,t)},preUpdate:function(){this.pluginEvents.emit(g.PRE_UPDATE);var t=this._pendingRemoval,e=this._pendingInsertion,i=t.length,n=e.length;if(0!==i||0!==n){for(var r=this._list,s=0;s<i;s++){var o=t[s],a=r.indexOf(o);-1<a&&(r.splice(a,1),this.clear(o,!0))}t.length=0,this._pendingRemoval.length=0,this._list=r.concat(e.splice(0))}},isActive:function(){return this.enabled&&this.scene.sys.isActive()},updatePoll:function(t,e){if(!this.isActive())return!1;if(this.pluginEvents.emit(g.UPDATE,t,e),this._updatedThisFrame)return this._updatedThisFrame=!1;for(var i=this.manager,n=i.pointers,r=i.pointersTotal,s=0;s<r;s++)n[s].updateMotion();if(0===this._list.length)return!1;i=this.pollRate;if(-1===i)return!1;if(0<i){if(this._pollTimer-=e,!(this._pollTimer<0))return!1;this._pollTimer=this.pollRate}for(var o=!1,s=0;s<r;s++){var a=0,h=n[s];this._tempZones=[],this._temp=this.hitTestPointer(h),this.sortGameObjects(this._temp,h),this.sortDropZones(this._tempZones),this.topOnly&&(this._temp.length&&this._temp.splice(1),this._tempZones.length&&this._tempZones.splice(1)),a+=this.processOverOutEvents(h),2===this.getDragState(h)&&this.processDragThresholdEvent(h,t),0<a&&(o=!0)}return o},update:function(t,e){if(!this.isActive())return!1;for(var i=e.length,n=!1,r=0;r<i;r++){var s=0,o=e[r];switch(this._tempZones=[],this._temp=this.hitTestPointer(o),this.sortGameObjects(this._temp,o),this.sortDropZones(this._tempZones),this.topOnly&&(this._temp.length&&this._temp.splice(1),this._tempZones.length&&this._tempZones.splice(1)),t){case a.MOUSE_DOWN:s=(s=(s+=this.processDragDownEvent(o))+this.processDownEvents(o))+this.processOverOutEvents(o);break;case a.MOUSE_UP:s=(s=(s+=this.processDragUpEvent(o))+this.processUpEvents(o))+this.processOverOutEvents(o);break;case a.TOUCH_START:s=(s=(s+=this.processDragDownEvent(o))+this.processDownEvents(o))+this.processOverEvents(o);break;case a.TOUCH_END:case a.TOUCH_CANCEL:s=(s=(s+=this.processDragUpEvent(o))+this.processUpEvents(o))+this.processOutEvents(o);break;case a.MOUSE_MOVE:case a.TOUCH_MOVE:s=(s=(s+=this.processDragMoveEvent(o))+this.processMoveEvents(o))+this.processOverOutEvents(o);break;case a.MOUSE_WHEEL:s+=this.processWheelEvent(o)}0<s&&(n=!0)}return this._updatedThisFrame=!0,n},clear:function(t,e){void 0===e&&(e=!1);var i=t.input;if(i)return e||this.queueForRemoval(t),i.gameObject=void 0,i.target=void 0,i.hitArea=void 0,i.hitAreaCallback=void 0,i.callbackContext=void 0,t.input=null,-1<(e=this._draggable.indexOf(t))&&this._draggable.splice(e,1),-1<(e=this._drag[0].indexOf(t))&&this._drag[0].splice(e,1),-1<(e=this._over[0].indexOf(t))&&(this._over[0].splice(e,1),this.manager.resetCursor(i)),t},disable:function(t){t.input.enabled=!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],r=this.manager.hitTest(t,this._list,n),s=0;s<r.length;s++){var o=r[s];o.input.dropZone&&this._tempZones.push(o)}if(0<r.length)return t.camera=n,r}return t.camera=e[0],[]},processDownEvents:function(t){for(var e=0,i=this._temp,n=this._eventData,r=this._eventContainer,s=n.cancelled=!1,o=0;o<i.length;o++){var a=i[o];if(a.input){if(e++,a.emit(g.GAMEOBJECT_POINTER_DOWN,t,a.input.localX,a.input.localY,r),n.cancelled||!a.input){s=!0;break}if(this.emit(g.GAMEOBJECT_DOWN,t,a,r),n.cancelled||!a.input){s=!0;break}}}return!s&&this.manager&&(t.downElement===this.manager.game.canvas?this.emit(g.POINTER_DOWN,t,i):this.emit(g.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,r=this.dragDistanceThreshold;if(i=0<r&&h(t.x,t.y,t.downX,t.downY)>=r||0<n&&e>=t.downTime+n?!0:i)return this.setDragState(t,3),this.processDragStartList(t)},processDragStartList:function(t){if(3!==this.getDragState(t))return 0;for(var e=this._drag[t.id],i=0;i<e.length;i++){var n=e[i],r=n.input;r.dragState=2,r.dragStartX=n.x,r.dragStartY=n.y,r.dragStartXGlobal=t.worldX,r.dragStartYGlobal=t.worldY,r.dragX=r.dragStartXGlobal-r.dragStartX,r.dragY=r.dragStartYGlobal-r.dragStartY,n.emit(g.GAMEOBJECT_DRAG_START,t,r.dragX,r.dragY),this.emit(g.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 r=e[n];r.input.draggable&&0===r.input.dragState&&i.push(r)}return 0===i.length?(this.setDragState(t,0),0):(1<i.length&&(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;for(var e=this._tempZones,i=this._drag[t.id],n=0;n<i.length;n++){var r,s,o,a=i[n],h=a.input,l=h.target;l?0===(r=e.indexOf(l))?(a.emit(g.GAMEOBJECT_DRAG_OVER,t,l),this.emit(g.DRAG_OVER,t,a,l)):0<r?(a.emit(g.GAMEOBJECT_DRAG_LEAVE,t,l),this.emit(g.DRAG_LEAVE,t,a,l),h.target=e[0],l=h.target,a.emit(g.GAMEOBJECT_DRAG_ENTER,t,l),this.emit(g.DRAG_ENTER,t,a,l)):(a.emit(g.GAMEOBJECT_DRAG_LEAVE,t,l),this.emit(g.DRAG_LEAVE,t,a,l),e[0]?(h.target=e[0],l=h.target,a.emit(g.GAMEOBJECT_DRAG_ENTER,t,l),this.emit(g.DRAG_ENTER,t,a,l)):h.target=null):!l&&e[0]&&(h.target=e[0],l=h.target,a.emit(g.GAMEOBJECT_DRAG_ENTER,t,l),this.emit(g.DRAG_ENTER,t,a,l)),o=a.parentContainer?(r=t.worldX-h.dragStartXGlobal,l=t.worldY-h.dragStartYGlobal,s=a.getParentRotation(),o=r*Math.cos(s)+l*Math.sin(s),l=l*Math.cos(s)-r*Math.sin(s),o*=1/a.parentContainer.scaleX,l*=1/a.parentContainer.scaleY,s=o+h.dragStartX,l+h.dragStartY):(s=t.worldX-h.dragX,t.worldY-h.dragY),a.emit(g.GAMEOBJECT_DRAG,t,s,o),this.emit(g.DRAG,t,a,s,o)}return i.length},processDragUpEvent:function(t){for(var e=this._drag[t.id],i=0;i<e.length;i++){var n,r,s=e[i],o=s.input;o&&2===o.dragState&&(o.dragState=0,o.dragX=o.localX-s.displayOriginX,o.dragY=o.localY-s.displayOriginY,n=!1,(r=o.target)&&(s.emit(g.GAMEOBJECT_DROP,t,r),this.emit(g.DROP,t,s,r),n=!(o.target=null)),s.input&&(s.emit(g.GAMEOBJECT_DRAG_END,t,o.dragX,o.dragY,n),this.emit(g.DRAG_END,t,s,n)))}return this.setDragState(t,0),e.splice(0),0},processMoveEvents:function(t){for(var e=0,i=this._temp,n=this._eventData,r=this._eventContainer,s=n.cancelled=!1,o=0;o<i.length;o++){var a=i[o];if(a.input){if(e++,a.emit(g.GAMEOBJECT_POINTER_MOVE,t,a.input.localX,a.input.localY,r),n.cancelled||!a.input){s=!0;break}if(this.emit(g.GAMEOBJECT_MOVE,t,a,r),n.cancelled||!a.input){s=!0;break}if(this.topOnly)break}}return s||this.emit(g.POINTER_MOVE,t,i),e},processWheelEvent:function(t){for(var e=0,i=this._temp,n=this._eventData,r=this._eventContainer,s=n.cancelled=!1,o=t.deltaX,a=t.deltaY,h=t.deltaZ,l=0;l<i.length;l++){var c=i[l];if(c.input){if(e++,c.emit(g.GAMEOBJECT_POINTER_WHEEL,t,o,a,h,r),n.cancelled||!c.input){s=!0;break}if(this.emit(g.GAMEOBJECT_WHEEL,t,c,o,a,h,r),n.cancelled||!c.input){s=!0;break}}}return s||this.emit(g.POINTER_WHEEL,t,i,o,a,h),e},processOverEvents:function(t){var e=this._temp,i=0,n=e.length,r=[];if(0<n){for(var s=this.manager,o=this._eventData,a=this._eventContainer,h=o.cancelled=!1,l=0;l<n;l++){var c=e[l];if(c.input){if(r.push(c),s.setCursor(c.input),c.emit(g.GAMEOBJECT_POINTER_OVER,t,c.input.localX,c.input.localY,a),i++,o.cancelled||!c.input){h=!0;break}if(this.emit(g.GAMEOBJECT_OVER,t,c,a),o.cancelled||!c.input){h=!0;break}}}h||this.emit(g.POINTER_OVER,t,r)}return this._over[t.id]=r,i},processOutEvents:function(t){var e=this._over[t.id],i=0,n=e.length;if(0<n){var r=this.manager,s=this._eventData,o=this._eventContainer,a=s.cancelled=!1;this.sortGameObjects(e,t);for(var h=0;h<n;h++){var l=e[h];if((l=e[h]).input){if(r.resetCursor(l.input),l.emit(g.GAMEOBJECT_POINTER_OUT,t,o),i++,s.cancelled||!l.input){a=!0;break}if(this.emit(g.GAMEOBJECT_OUT,t,l,o),s.cancelled||!l.input){a=!0;break}a||this.emit(g.POINTER_OUT,t,e)}}this._over[t.id]=[]}return i},processOverOutEvents:function(t){for(var e,i=this._temp,n=[],r=[],s=[],o=this._over[t.id],a=this._drag[t.id],h=this.manager,l=0;l<o.length;l++)e=o[l],(-1===i.indexOf(e)&&-1===a.indexOf(e)?n:s).push(e);for(l=0;l<i.length;l++)e=i[l],-1===o.indexOf(e)&&r.push(e);var c=n.length,u=0,d=this._eventData,p=this._eventContainer,f=d.cancelled=!1;if(0<c){for(this.sortGameObjects(n,t),l=0;l<c;l++)if((e=n[l]).input){if(h.resetCursor(e.input),e.emit(g.GAMEOBJECT_POINTER_OUT,t,p),u++,d.cancelled||!e.input){f=!0;break}if(this.emit(g.GAMEOBJECT_OUT,t,e,p),d.cancelled||!e.input){f=!0;break}}f||this.emit(g.POINTER_OUT,t,n)}if(c=r.length,f=d.cancelled=!1,0<c){for(this.sortGameObjects(r,t),l=0;l<c;l++)if((e=r[l]).input){if(h.setCursor(e.input),e.emit(g.GAMEOBJECT_POINTER_OVER,t,e.input.localX,e.input.localY,p),u++,d.cancelled||!e.input){f=!0;break}if(this.emit(g.GAMEOBJECT_OVER,t,e,p),d.cancelled||!e.input){f=!0;break}}f||this.emit(g.POINTER_OVER,t,r)}return o=s.concat(r),this._over[t.id]=this.sortGameObjects(o,t),u},processUpEvents:function(t){for(var e=this._temp,i=this._eventData,n=this._eventContainer,r=i.cancelled=!1,s=0;s<e.length;s++){var o=e[s];if(o.input){if(o.emit(g.GAMEOBJECT_POINTER_UP,t,o.input.localX,o.input.localY,n),i.cancelled||!o.input){r=!0;break}if(this.emit(g.GAMEOBJECT_UP,t,o,n),i.cancelled||!o.input){r=!0;break}}}return!r&&this.manager&&(t.upElement===this.manager.game.canvas?this.emit(g.POINTER_UP,t,e):this.emit(g.POINTER_UP_OUTSIDE,t)),e.length},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],r=(n.input.draggable=e,this._draggable.indexOf(n));e&&-1===r?this._draggable.push(n):!e&&-1<r&&this._draggable.splice(r,1)}return this},makePixelPerfect:function(t){var e=this.systems.textures;return r(e,t=void 0===t?1:t)},setHitArea:function(t,e,i){if(void 0===e)return this.setHitAreaFromTexture(t);Array.isArray(t)||(t=[t]);var n,r=!1,s=!1,o=!1,a=!1,h=!1,l=!0;y(e)?(e=f(n=e,"hitArea",null),i=f(n,"hitAreaCallback",null),r=f(n,"draggable",!1),s=f(n,"dropZone",!1),o=f(n,"cursor",!1),a=f(n,"useHandCursor",!1),h=f(n,"pixelPerfect",!1),n=f(n,"alphaTolerance",1),h&&(e={},i=this.makePixelPerfect(n)),e&&i||(this.setHitAreaFromTexture(t),l=!1)):"function"!=typeof e||i||(i=e,e={});for(var c=0;c<t.length;c++){var u,d=t[c];h&&"Container"===d.type||((u=d.input||p(d,e,i)).customHitArea=l,u.dropZone=s,u.cursor=a?"pointer":o,d.input=u,r&&this.setDraggable(d),this.queueForInsertion(d))}return this},setHitAreaCircle:function(t,e,i,n,r){void 0===r&&(r=o);e=new s(e,i,n);return this.setHitArea(t,e,r)},setHitAreaEllipse:function(t,e,i,n,r,s){void 0===s&&(s=c);e=new l(e,i,n,r);return this.setHitArea(t,e,s)},setHitAreaFromTexture:function(t,e){void 0===e&&(e=b),Array.isArray(t)||(t=[t]);for(var i=0;i<t.length;i++){var n=t[i],r=n.frame,s=0,o=0;n.width?(s=n.width,o=n.height):r&&(s=r.realWidth,o=r.realHeight),"Container"===n.type&&(0===s||0===o)||0!==s&&0!==o&&(n.input=p(n,new x(0,0,s,o),e),this.queueForInsertion(n))}return this},setHitAreaRectangle:function(t,e,i,n,r,s){void 0===s&&(s=b);e=new x(e,i,n,r);return this.setHitArea(t,e,s)},setHitAreaTriangle:function(t,e,i,n,r,s,o,a){void 0===a&&(a=S);e=new T(e,i,n,r,s,o);return this.setHitArea(t,e,a)},enableDebug:function(o,a){void 0===a&&(a=65280);var t=o.input;if(t&&t.hitArea){var e=t.hitArea,i=e.type,h=t.hitAreaDebug,n=this.systems.add,r=this.systems.updateList,l=(h&&(r.remove(h),h.destroy(),h=null),0),c=0;switch(i){case d.CIRCLE:h=n.arc(0,0,e.radius),l=e.x-e.radius,c=e.y-e.radius;break;case d.ELLIPSE:h=n.ellipse(0,0,e.width,e.height),l=e.x-e.width/2,c=e.y-e.height/2;break;case d.LINE:h=n.line(0,0,e.x1,e.y1,e.x2,e.y2);break;case d.POLYGON:h=n.polygon(0,0,e.points);break;case d.RECTANGLE:h=n.rectangle(0,0,e.width,e.height),l=e.x,c=e.y;break;case d.TRIANGLE:h=n.triangle(0,0,e.x1,e.y1,e.x2,e.y2,e.x3,e.y3)}h&&(h.isFilled=!1,h.preUpdate=function(){h.setStrokeStyle(1/o.scale,a),h.setDisplayOrigin(o.displayOriginX,o.displayOriginY);var t,e=o.x,i=o.y,n=o.rotation,r=o.scaleX,s=o.scaleY;o.parentContainer&&(e=(t=o.getWorldTransformMatrix()).tx,i=t.ty,n=t.rotation,r=t.scaleX,s=t.scaleY),h.setRotation(n),h.setScale(r,s),h.setPosition(e+l,i+c),h.setScrollFactor(o.scrollFactorX,o.scrollFactorY),h.setDepth(o.depth)},r.add(h),t.hitAreaDebug=h)}return this},removeDebug:function(t){var e,t=t.input;return t&&t.hitAreaDebug&&(e=t.hitAreaDebug,this.systems.updateList.remove(e),e.destroy(),t.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){var i;return t.length<2?t:(i=e.camera.renderList,t.sort(function(t,e){return i.indexOf(e)-i.indexOf(t)}))},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){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(),r=Math.min(i.length,n.length),s=0;s<r;s++){var o=i[s],a=n[s];if(o!==a)return a-o}return n.length-i.length}return this.displayList.getIndex(e)-this.displayList.getIndex(t)},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(g.SHUTDOWN),this._temp.length=0,this._list.length=0,this._draggable.length=0,this._pendingRemoval.length=0,this._pendingInsertion.length=0;for(var t=this._dragState.length=0;t<10;t++)this._drag[t]=[],this._over[t]=[];this.removeAllListeners();var e=this.manager,i=(e.canvas.style.cursor=e.defaultCursor,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(g.GAME_OUT,this.onGameOut,this),e.events.off(g.GAME_OVER,this.onGameOver,this),i.off(w.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.pluginEvents.emit(g.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]}}});v.register("InputPlugin",i,"input"),t.exports=i},function(t,e,i){t.exports={Events:i(154),KeyboardManager:i(410),KeyboardPlugin:i(1330),Key:i(512),KeyCodes:i(143),KeyCombo:i(513),AdvanceKeyCombo:i(515),ProcessKeyCombo:i(514),ResetKeyCombo:i(516),JustDown:i(1332),JustUp:i(1333),DownDuration:i(1334),UpDuration:i(1335)}},function(t,e){t.exports="keydown"},function(t,e){t.exports="keyup"},function(t,e){t.exports="keycombomatch"},function(t,e){t.exports="down"},function(t,e){t.exports="keydown-"},function(t,e){t.exports="keyup-"},function(t,e){t.exports="up"},function(t,e,i){var n=i(0),r=i(9),h=i(154),s=i(22),o=i(6),a=i(51),l=i(153),c=i(512),u=i(143),d=i(513),p=i(1331),f=i(20),g=i(76),i=new n({Extends:r,initialize:function(t){r.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(a.BOOT,this.boot,this),t.pluginEvents.on(a.START,this.start,this)},boot:function(){var t=this.settings.input,t=(this.enabled=o(t,"keyboard",!0),o(t,"keyboard.capture",null));t&&this.addCaptures(t),this.sceneInputPlugin.pluginEvents.once(a.DESTROY,this.destroy,this)},start:function(){this.sceneInputPlugin.manager.events.on(a.MANAGER_PROCESS,this.update,this),this.sceneInputPlugin.pluginEvents.once(a.SHUTDOWN,this.shutdown,this),this.game.events.on(s.BLUR,this.resetKeys,this),this.scene.sys.events.on(f.PAUSE,this.resetKeys,this),this.scene.sys.events.on(f.SLEEP,this.resetKeys,this)},isActive:function(){return this.enabled&&this.scene.sys.isActive()},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:u.UP,down:u.DOWN,left:u.LEFT,right:u.RIGHT,space:u.SPACE,shift:u.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 r=0;r<t.length;r++){var s=t[r].trim();s&&(n[s]=this.addKey(s,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,r=this.keys;return t instanceof c?(-1<(n=r.indexOf(t))?r[n]=t:r[t.keyCode]=t,e&&this.addCapture(t.keyCode),t.setEmitOnRepeat(i),t):(r[t="string"==typeof t?u[t.toUpperCase()]:t]||(r[t]=new c(this,t),e&&this.addCapture(t),r[t].setEmitOnRepeat(i)),r[t])},removeKey:function(t,e){void 0===e&&(e=!1);var i,n,r=this.keys;return t instanceof c?-1<(n=r.indexOf(t))&&(i=this.keys[n],this.keys[n]=void 0):"string"==typeof t&&(t=u[t.toUpperCase()]),r[t]&&(i=r[t],r[t]=void 0),i&&(i.plugin=null,e&&i.destroy()),this},removeAllKeys:function(t){for(var e=this.keys,i=0;i<e.length;i++){var n=e[i];n&&(e[i]=void 0,t&&n.destroy())}return this},createCombo:function(t,e){return new d(this,t,e)},checkDown:function(t,e){if(void 0===e&&(e=0),this.enabled&&t.isDown){e=g(this.time-t.timeDown,e);if(e>t._tick)return t._tick=e,!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 r=t[n],s=r.keyCode,o=i[s],a=!1;void 0===r.cancelled&&(r.cancelled=0,r.stopImmediatePropagation=function(){r.cancelled=1},r.stopPropagation=function(){r.cancelled=-1}),-1===r.cancelled||s===this.prevCode&&r.timeStamp===this.prevTime&&r.type===this.prevType||(this.prevCode=s,this.prevTime=r.timeStamp,this.prevType=r.type,"keydown"===r.type?(o&&(a=o.isDown,o.onDown(r)),r.cancelled||o&&a||(p[s]&&this.emit(h.KEY_DOWN+p[s],r),r.cancelled||this.emit(h.ANY_KEY_DOWN,r))):(o&&o.onUp(r),r.cancelled||(p[s]&&this.emit(h.KEY_UP+p[s],r),r.cancelled||this.emit(h.ANY_KEY_UP,r))),1===r.cancelled&&(r.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(a.MANAGER_PROCESS,this.update,this),this.game.events.off(s.BLUR,this.resetKeys),this.scene.sys.events.off(f.PAUSE,this.resetKeys,this),this.scene.sys.events.off(f.SLEEP,this.resetKeys,this),this.queue=[]},destroy:function(){this.shutdown();for(var 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",i,"keyboard","keyboard","inputKeyboard"),t.exports=i},function(t,e,i){var n,r=i(143),s={};for(n in r)s[r[n]]=n;t.exports=s},function(t,e){t.exports=function(t){return!!t._justDown&&!(t._justDown=!1)}},function(t,e){t.exports=function(t){return!!t._justUp&&!(t._justUp=!1)}},function(t,e){t.exports=function(t,e){void 0===e&&(e=50);var i=t.plugin.game.loop.time-t.timeDown;return t.isDown&&i<e}},function(t,e){t.exports=function(t,e){void 0===e&&(e=50);var i=t.plugin.game.loop.time-t.timeUp;return t.isUp&&i<e}},function(t,e,i){t.exports={MouseManager:i(411)}},function(t,e,i){t.exports={TouchManager:i(413)}},function(t,e,i){var n=i(21),i=i(17)(!1,{Events:i(95),FileTypes:i(1339),File:i(23),FileTypesManager:i(8),GetURL:i(155),LoaderPlugin:i(1365),MergeXHRSettings:i(240),MultiFile:i(49),XHRLoader:i(517),XHRSettings:i(156)},n);t.exports=i},function(t,e,i){t.exports={AnimationJSONFile:i(1340),AsepriteFile:i(1341),AtlasJSONFile:i(1342),AtlasXMLFile:i(1343),AudioFile:i(518),AudioSpriteFile:i(1344),BinaryFile:i(1345),BitmapFontFile:i(1346),CSSFile:i(1347),GLSLFile:i(1348),HTML5AudioFile:i(519),HTMLFile:i(1349),HTMLTextureFile:i(1350),ImageFile:i(71),JSONFile:i(61),MultiAtlasFile:i(1351),MultiScriptFile:i(1352),OBJFile:i(1353),PackFile:i(1354),PluginFile:i(1355),SceneFile:i(1356),ScenePluginFile:i(1357),ScriptFile:i(520),SpriteSheetFile:i(1358),SVGFile:i(1359),TextFile:i(242),TilemapCSVFile:i(1360),TilemapImpactFile:i(1361),TilemapJSONFile:i(1362),UnityAtlasFile:i(1363),VideoFile:i(1364),XMLFile:i(241)}},function(t,e,i){var n=i(0),r=i(8),s=i(61),o=i(95),a=new n({Extends:s,initialize:function(t,e,i,n,r){s.call(this,t,e,i,n,r),this.type="animationJSON"},onProcess:function(){this.loader.once(o.POST_PROCESS,this.onLoadComplete,this),s.prototype.onProcess.call(this)},onLoadComplete:function(){this.loader.systems.anims.fromJSON(this.data)}});r.register("animation",function(t,e,i,n){if(Array.isArray(t))for(var r=0;r<t.length;r++)this.addFile(new a(this,t[r]));else this.addFile(new a(this,t,e,n,i));return this}),t.exports=a},function(t,e,i){var n=i(0),r=i(8),h=i(2),l=i(71),c=i(7),u=i(61),d=i(49),a=new n({Extends:d,initialize:function(t,e,i,n,r,s){var o,a=c(e)?(e=h(a=e,"key"),o=new l(t,{key:e,url:h(a,"textureURL"),extension:h(a,"textureExtension","png"),normalMap:h(a,"normalMap"),xhrSettings:h(a,"textureXhrSettings")}),new u(t,{key:e,url:h(a,"atlasURL"),extension:h(a,"atlasExtension","json"),xhrSettings:h(a,"atlasXhrSettings")})):(o=new l(t,e,i,r),new u(t,e,n,s));o.linkFile?d.call(this,t,"atlasjson",e,[o,a,o.linkFile]):d.call(this,t,"atlasjson",e,[o,a])},addToCache:function(){var t,e,i;this.isReadyToProcess()&&(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)}});r.register("aseprite",function(t,e,i,n,r){var s;if(Array.isArray(t))for(var o=0;o<t.length;o++)s=new a(this,t[o]),this.addFile(s.files);else s=new a(this,t,e,i,n,r),this.addFile(s.files);return this}),t.exports=a},function(t,e,i){var n=i(0),r=i(8),h=i(2),l=i(71),c=i(7),u=i(61),d=i(49),a=new n({Extends:d,initialize:function(t,e,i,n,r,s){var o,a=c(e)?(e=h(a=e,"key"),o=new l(t,{key:e,url:h(a,"textureURL"),extension:h(a,"textureExtension","png"),normalMap:h(a,"normalMap"),xhrSettings:h(a,"textureXhrSettings")}),new u(t,{key:e,url:h(a,"atlasURL"),extension:h(a,"atlasExtension","json"),xhrSettings:h(a,"atlasXhrSettings")})):(o=new l(t,e,i,r),new u(t,e,n,s));o.linkFile?d.call(this,t,"atlasjson",e,[o,a,o.linkFile]):d.call(this,t,"atlasjson",e,[o,a])},addToCache:function(){var t,e,i;this.isReadyToProcess()&&(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.pendingDestroy(),this.complete=!0)}});r.register("atlas",function(t,e,i,n,r){var s;if(Array.isArray(t))for(var o=0;o<t.length;o++)s=new a(this,t[o]),this.addFile(s.files);else s=new a(this,t,e,i,n,r),this.addFile(s.files);return this}),t.exports=a},function(t,e,i){var n=i(0),r=i(8),h=i(2),l=i(71),c=i(7),u=i(49),d=i(241),a=new n({Extends:u,initialize:function(t,e,i,n,r,s){var o,a=c(e)?(e=h(a=e,"key"),o=new l(t,{key:e,url:h(a,"textureURL"),extension:h(a,"textureExtension","png"),normalMap:h(a,"normalMap"),xhrSettings:h(a,"textureXhrSettings")}),new d(t,{key:e,url:h(a,"atlasURL"),extension:h(a,"atlasExtension","xml"),xhrSettings:h(a,"atlasXhrSettings")})):(o=new l(t,e,i,r),new d(t,e,n,s));o.linkFile?u.call(this,t,"atlasxml",e,[o,a,o.linkFile]):u.call(this,t,"atlasxml",e,[o,a])},addToCache:function(){var t,e,i;this.isReadyToProcess()&&(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),e.pendingDestroy(),this.complete=!0)}});r.register("atlasXML",function(t,e,i,n,r){var s;if(Array.isArray(t))for(var o=0;o<t.length;o++)s=new a(this,t[o]),this.addFile(s.files);else s=new a(this,t,e,i,n,r),this.addFile(s.files);return this}),t.exports=a},function(t,e,i){var l=i(518),n=i(0),r=i(8),c=i(2),u=i(7),d=i(61),p=i(49),f=new n({Extends:p,initialize:function(t,e,i,n,r,s,o){var a,h;u(e)&&(e=c(h=e,"key"),i=c(h,"jsonURL"),n=c(h,"audioURL"),r=c(h,"audioConfig"),s=c(h,"audioXhrSettings"),o=c(h,"jsonXhrSettings")),n?(h=l.create(t,e,n,r,s))&&(a=new d(t,e,i,o),p.call(this,t,"audiosprite",e,[h,a]),this.config.resourceLoad=!1):(a=new d(t,e,i,o),p.call(this,t,"audiosprite",e,[a]),this.config.resourceLoad=!0,this.config.audioConfig=r,this.config.audioXhrSettings=s)},onFileComplete:function(t){var e,i,n;-1!==this.files.indexOf(t)&&(this.pending--,this.config.resourceLoad&&"json"===t.type&&t.data.hasOwnProperty("resources")&&(e=t.data.resources,i=c(this.config,"audioConfig"),n=c(this.config,"audioXhrSettings"),(t=l.create(this.loader,t.key,e,i,n))&&(this.addToMultiFile(t),this.loader.addFile(t))))},addToCache:function(){var t,e;this.isReadyToProcess()&&(t=this.files[0],e=this.files[1],t.addToCache(),e.addToCache(),this.complete=!0)}});r.register("audioSprite",function(t,e,i,n,r,s){var o,a=this.systems.game,h=a.config.audio,a=a.device.audio;if(!(h&&h.noAudio||!a.webAudio&&!a.audioData))if(Array.isArray(t))for(var l=0;l<t.length;l++)(o=new f(this,t[l])).files&&this.addFile(o.files);else(o=new f(this,t,e,i,n,r,s)).files&&this.addFile(o.files);return this})},function(t,e,i){var n=i(0),r=i(21),a=i(23),s=i(8),h=i(2),l=i(7),o=new n({Extends:a,initialize:function(t,e,i,n,r){var s="bin",o=(l(e)&&(e=h(o=e,"key"),i=h(o,"url"),n=h(o,"xhrSettings"),s=h(o,"extension",s),r=h(o,"dataType",r)),{type:"binary",cache:t.cacheManager.binary,extension:s,responseType:"arraybuffer",key:e,url:i,xhrSettings:n,config:{dataType:r}});a.call(this,t,o)},onProcess:function(){this.state=r.FILE_PROCESSING;var t=this.config.dataType;this.data=t?new t(this.xhrLoader.response):this.xhrLoader.response,this.onProcessComplete()}});s.register("binary",function(t,e,i,n){if(Array.isArray(t))for(var r=0;r<t.length;r++)this.addFile(new o(this,t[r]));else this.addFile(new o(this,t,e,n,i));return this}),t.exports=o},function(t,e,i){var n=i(0),r=i(8),h=i(2),l=i(71),c=i(7),u=i(49),s=i(212),d=i(241),a=new n({Extends:u,initialize:function(t,e,i,n,r,s){var o,a=c(e)?(e=h(a=e,"key"),o=new l(t,{key:e,url:h(a,"textureURL"),extension:h(a,"textureExtension","png"),normalMap:h(a,"normalMap"),xhrSettings:h(a,"textureXhrSettings")}),new d(t,{key:e,url:h(a,"fontDataURL"),extension:h(a,"fontDataExtension","xml"),xhrSettings:h(a,"fontDataXhrSettings")})):(o=new l(t,e,i,r),new d(t,e,n,s));o.linkFile?u.call(this,t,"bitmapfont",e,[o,a,o.linkFile]):u.call(this,t,"bitmapfont",e,[o,a])},addToCache:function(){var t,e,i;this.isReadyToProcess()&&(t=this.files[0],i=this.files[1],t.addToCache(),i.pendingDestroy(),e=t.cache.get(t.key),i=s(i.data,t.cache.getFrame(t.key),0,0,e),this.loader.cacheManager.bitmapFont.add(t.key,{data:i,texture:t.key,frame:null}),this.complete=!0)}});r.register("bitmapFont",function(t,e,i,n,r){var s;if(Array.isArray(t))for(var o=0;o<t.length;o++)s=new a(this,t[o]),this.addFile(s.files);else s=new a(this,t,e,i,n,r),this.addFile(s.files);return this}),t.exports=a},function(t,e,i){var n=i(0),r=i(21),o=i(23),s=i(8),a=i(2),h=i(7),l=new n({Extends:o,initialize:function(t,e,i,n){var r="css",s=(h(e)&&(e=a(s=e,"key"),i=a(s,"url"),n=a(s,"xhrSettings"),r=a(s,"extension",r)),{type:"script",cache:!1,extension:r,responseType:"text",key:e,url:i,xhrSettings:n});o.call(this,t,s)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=document.createElement("style"),this.data.defer=!1,this.data.innerHTML=this.xhrLoader.responseText,document.head.appendChild(this.data),this.onProcessComplete()}});s.register("css",function(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},function(t,e,i){var n=i(0),r=i(21),a=i(23),s=i(8),h=i(2),l=i(7),c=i(396),o=new n({Extends:a,initialize:function(t,e,i,n,r){var s="glsl",o=(l(e)?(e=h(o=e,"key"),i=h(o,"url"),n=h(o,"shaderType","fragment"),r=h(o,"xhrSettings"),s=h(o,"extension",s)):void 0===n&&(n="fragment"),{type:"glsl",cache:t.cacheManager.shader,extension:s,responseType:"text",key:e,url:i,config:{shaderType:n},xhrSettings:r});a.call(this,t,o)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var t=this.data.split("\n"),e=this.extractBlock(t,0);if(e)for(;e;){var i,n=this.getShaderName(e.header),r=this.getShaderType(e.header),s=this.getShaderUniforms(e.header),o=e.shader;this.cache.has(n)?(i=this.cache.get(n),"fragment"===r?i.fragmentSrc=o:i.vertexSrc=o,i.uniforms||(i.uniforms=s)):"fragment"===r?this.cache.add(n,new c(n,o,"",s)):this.cache.add(n,new c(n,"",o,s)),e=this.extractBlock(t,e.offset)}else"fragment"===this.config.shaderType?this.cache.add(this.key,new c(this.key,this.data)):this.cache.add(this.key,new c(this.key,"",this.data));this.pendingDestroy()},getShaderName:function(t){for(var e=0;e<t.length;e++){var i=t[e].trim();if("name:"===i.substring(0,5))return i.substring(5).trim()}return this.key},getShaderType:function(t){for(var e=0;e<t.length;e++){var i=t[e].trim();if("type:"===i.substring(0,5))return i.substring(5).trim()}return this.config.shaderType},getShaderUniforms:function(t){for(var e={},i=0;i<t.length;i++){var n=t[i].trim();if("uniform."===n.substring(0,8)){var r=n.indexOf(":");if(r){var s=n.substring(8,r);try{e[s]=JSON.parse(n.substring(r+1))}catch(t){}}}}return e},extractBlock:function(t,e){for(var i=-1,n=-1,r=-1,s=!1,o=!1,a=[],h=[],l=e;l<t.length;l++){var c=t[l].trim();if("---"===c)if(-1===i)i=l,s=!0;else{if(!s){o=!1;break}n=l,o=!(s=!1)}else s?a.push(c):o&&(h.push(c),r=l)}return s||-1===n?null:{header:a,shader:h.join("\n"),offset:r}}});s.register("glsl",function(t,e,i,n){if(Array.isArray(t))for(var r=0;r<t.length;r++)this.addFile(new o(this,t[r]));else this.addFile(new o(this,t,e,i,n));return this}),t.exports=o},function(t,e,i){var n=i(0),r=i(21),o=i(23),s=i(8),a=i(2),h=i(7),l=new n({Extends:o,initialize:function(t,e,i,n){var r="html",s=(h(e)&&(e=a(s=e,"key"),i=a(s,"url"),n=a(s,"xhrSettings"),r=a(s,"extension",r)),{type:"text",cache:t.cacheManager.html,extension:r,responseType:"text",key:e,url:i,xhrSettings:n});o.call(this,t,s)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});s.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},function(t,e,i){var n=i(0),s=i(21),h=i(23),r=i(8),l=i(2),c=i(7),o=new n({Extends:h,initialize:function(t,e,i,n,r,s){void 0===n&&(n=512),void 0===r&&(r=512);var o="html",a=(c(e)&&(e=l(a=e,"key"),i=l(a,"url"),s=l(a,"xhrSettings"),o=l(a,"extension",o),n=l(a,"width",n),r=l(a,"height",r)),{type:"html",cache:t.textureManager,extension:o,responseType:"text",key:e,url:i,xhrSettings:s,config:{width:n,height:r}});h.call(this,t,a)},onProcess:function(){this.state=s.FILE_PROCESSING;var t=this.config.width,e=this.config.height,i=[],e=(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>"),[i.join("\n")]),n=this;try{var r=new window.Blob(e,{type:"image/svg+xml;charset=utf-8"})}catch(t){return n.state=s.FILE_ERRORED,void n.onProcessComplete()}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){h.revokeObjectURL(n.data),n.onProcessComplete()},this.data.onerror=function(){h.revokeObjectURL(n.data),n.onProcessError()},h.createObjectURL(this.data,r,"image/svg+xml")},addToCache:function(){var t=this.cache.addImage(this.key,this.data);this.pendingDestroy(t)}});r.register("htmlTexture",function(t,e,i,n,r){if(Array.isArray(t))for(var s=0;s<t.length;s++)this.addFile(new o(this,t[s]));else this.addFile(new o(this,t,e,i,n,r));return this}),t.exports=o},function(t,e,i){var n=i(0),r=i(8),p=i(2),f=i(71),h=i(7),l=i(61),c=i(49),a=new n({Extends:c,initialize:function(t,e,i,n,r,s,o){h(e)&&(e=p(a=e,"key"),i=p(a,"url",!1)?p(a,"url"):p(a,"atlasURL"),s=p(a,"xhrSettings"),n=p(a,"path"),r=p(a,"baseURL"),o=p(a,"textureXhrSettings"));var a=new l(t,e,i,s);c.call(this,t,"multiatlas",e,[a]),this.config.path=n,this.config.baseURL=r,this.config.textureXhrSettings=o},onFileComplete:function(t){if(-1!==this.files.indexOf(t)&&(this.pending--,"json"===t.type&&t.data.hasOwnProperty("textures"))){var e=t.data.textures,t=this.config,i=this.loader,n=i.baseURL,r=i.path,s=i.prefix,o=p(t,"baseURL",this.baseURL),a=p(t,"path",this.path),h=p(t,"prefix",this.prefix),l=p(t,"textureXhrSettings");i.setBaseURL(o),i.setPath(a),i.setPrefix(h);for(var c=0;c<e.length;c++){var u=e[c].image,d="MA"+this.multiKeyIndex+"_"+u,u=new f(i,d,u,l);this.addToMultiFile(u),i.addFile(u),e[c].normalMap&&((d=new f(i,d,e[c].normalMap,l)).type="normalMap",u.setLink(d),this.addToMultiFile(d),i.addFile(d))}i.setBaseURL(n),i.setPath(r),i.setPrefix(s)}},addToCache:function(){if(this.isReadyToProcess()){for(var t=this.files[0],e=[],i=[],n=[],r=1;r<this.files.length;r++){var s=this.files[r];if("normalMap"!==s.type)for(var o=s.key.indexOf("_"),a=s.key.substr(o+1),h=s.data,l=0;l<t.data.textures.length;l++){var c=t.data.textures[l];if(c.image===a){i.push(h),e.push(c),s.linkFile&&n.push(s.linkFile.data);break}}}for(0===n.length&&(n=void 0),this.loader.textureManager.addAtlasJSONArray(this.key,i,e,n),this.complete=!0,r=0;r<this.files.length;r++)this.files[r].pendingDestroy()}}});r.register("multiatlas",function(t,e,i,n,r){var s;if(Array.isArray(t))for(var o=0;o<t.length;o++)s=new a(this,t[o]),this.addFile(s.files);else s=new a(this,t,e,i,n,r),this.addFile(s.files);return this}),t.exports=a},function(t,e,i){var n=i(0),r=i(8),l=i(2),c=i(7),u=i(49),d=i(520),s=new n({Extends:u,initialize:function(t,e,i,n){var r,s="js",o=[];c(e)&&(e=l(r=e,"key"),i=l(r,"url"),n=l(r,"xhrSettings"),s=l(r,"extension",s)),Array.isArray(i)||(i=[i]);for(var a=0;a<i.length;a++){var h=new d(t,{key:e+"_"+a.toString(),url:i[a],extension:s,xhrSettings:n});h.onProcess=function(){this.onProcessComplete()},o.push(h)}u.call(this,t,"scripts",e,o)},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}}});r.register("scripts",function(t,e,i){var n;if(Array.isArray(t))for(var r=0;r<t.length;r++)n=new s(this,t[r]),this.addFile(n.files);else n=new s(this,t,e,i),this.addFile(n.files);return this}),t.exports=s},function(t,e,i){var n=i(0),r=i(8),c=i(2),u=i(7),d=i(49),s=i(498),o=i(499),p=i(242),a=new n({Extends:d,initialize:function(t,e,i,n,r,s){var o,a,h,l=t.cacheManager.obj;u(e)?(e=c(h=e,"key"),o=new p(t,{key:e,type:"obj",cache:l,url:c(h,"url"),extension:c(h,"extension","obj"),xhrSettings:c(h,"xhrSettings"),config:{flipUV:c(h,"flipUV",r)}}),(n=c(h,"matURL"))&&(a=new p(t,{key:e,type:"mat",cache:l,url:n,extension:c(h,"matExtension","mat"),xhrSettings:c(h,"xhrSettings")}))):(o=new p(t,{key:e,url:i,type:"obj",cache:l,extension:"obj",xhrSettings:s,config:{flipUV:r}}),n&&(a=new p(t,{key:e,url:n,type:"mat",cache:l,extension:"mat",xhrSettings:s}))),d.call(this,t,"obj",e,[o,a])},addToCache:function(){var t,e,i;this.isReadyToProcess()&&(t=this.files[0],e=this.files[1],i=s(t.data,t.config.flipUV),e&&(i.materials=o(e.data)),t.cache.add(t.key,i),this.complete=!0)}});r.register("obj",function(t,e,i,n,r){var s;if(Array.isArray(t))for(var o=0;o<t.length;o++)s=new a(this,t[o]),this.addFile(s.files);else s=new a(this,t,e,i,n,r),this.addFile(s.files);return this}),t.exports=a},function(t,e,i){var n=i(0),r=i(21),s=i(8),o=i(61),a=new n({Extends:o,initialize:function(t,e,i,n,r){o.call(this,t,e,i,n,r),this.type="packfile"},onProcess:function(){this.state!==r.FILE_POPULATED&&(this.state=r.FILE_PROCESSING,this.data=JSON.parse(this.xhrLoader.responseText)),this.loader.addPack(this.data,this.config),this.onProcessComplete()}});s.register("pack",function(t,e,i,n){if(Array.isArray(t))for(var r=0;r<t.length;r++)this.addFile(new a(this,t[r]));else this.addFile(new a(this,t,e,n,i));return this}),t.exports=a},function(t,e,i){var n=i(0),h=i(21),l=i(23),r=i(8),c=i(2),u=i(7),o=new n({Extends:l,initialize:function(t,e,i,n,r,s){var o="js",a=(u(e)&&(e=c(a=e,"key"),i=c(a,"url"),s=c(a,"xhrSettings"),o=c(a,"extension",o),n=c(a,"start"),r=c(a,"mapping")),{type:"plugin",cache:!1,extension:o,responseType:"text",key:e,url:i,xhrSettings:s,config:{start:n,mapping:r}});l.call(this,t,a),"function"==typeof i&&(this.data=i,this.state=h.FILE_POPULATED)},onProcess:function(){var t=this.loader.systems.plugins,e=this.config,i=c(e,"start",!1),e=c(e,"mapping",null);this.state===h.FILE_POPULATED?t.install(this.key,this.data,i,e):(this.state=h.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=t.install(this.key,window[this.key],i,e),(i||e)&&(this.loader.systems[e]=t,this.loader.scene[e]=t)),this.onProcessComplete()}});r.register("plugin",function(t,e,i,n,r){if(Array.isArray(t))for(var s=0;s<t.length;s++)this.addFile(new o(this,t[s]));else this.addFile(new o(this,t,e,i,n,r));return this}),t.exports=o},function(t,e,i){var n=i(0),r=i(21),o=i(23),s=i(8),a=i(2),h=i(7),l=new n({Extends:o,initialize:function(t,e,i,n){var r="js",s=(h(e)&&(e=a(s=e,"key"),i=a(s,"url"),n=a(s,"xhrSettings"),r=a(s,"extension",r)),{type:"text",extension:r,responseType:"text",key:e,url:i,xhrSettings:n});o.call(this,t,s)},onProcess:function(){this.state=r.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}});s.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},function(t,e,i){var n=i(0),h=i(21),l=i(23),r=i(8),c=i(2),u=i(7),o=new n({Extends:l,initialize:function(t,e,i,n,r,s){var o="js",a=(u(e)&&(e=c(a=e,"key"),i=c(a,"url"),s=c(a,"xhrSettings"),o=c(a,"extension",o),n=c(a,"systemKey"),r=c(a,"sceneKey")),{type:"scenePlugin",cache:!1,extension:o,responseType:"text",key:e,url:i,xhrSettings:s,config:{systemKey:n,sceneKey:r}});l.call(this,t,a),"function"==typeof i&&(this.data=i,this.state=h.FILE_POPULATED)},onProcess:function(){var t=this.loader.systems.plugins,e=this.config,i=this.key,n=c(e,"systemKey",i),e=c(e,"sceneKey",i);this.state===h.FILE_POPULATED?t.installScenePlugin(n,this.data,e,this.loader.scene,!0):(this.state=h.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],e,this.loader.scene,!0)),this.onProcessComplete()}});r.register("scenePlugin",function(t,e,i,n,r){if(Array.isArray(t))for(var s=0;s<t.length;s++)this.addFile(new o(this,t[s]));else this.addFile(new o(this,t,e,i,n,r));return this}),t.exports=o},function(t,e,i){var n=i(0),r=i(8),s=i(71),o=new n({Extends:s,initialize:function(t,e,i,n,r){s.call(this,t,e,i,r,n),this.type="spritesheet"},addToCache:function(){var t=this.cache.addSpriteSheet(this.key,this.data,this.config);this.pendingDestroy(t)}});r.register("spritesheet",function(t,e,i,n){if(Array.isArray(t))for(var r=0;r<t.length;r++)this.addFile(new o(this,t[r]));else this.addFile(new o(this,t,e,i,n));return this}),t.exports=o},function(t,e,i){var n=i(0),d=i(21),p=i(23),r=i(8),a=i(2),h=i(7),s=new n({Extends:p,initialize:function(t,e,i,n,r){var s="svg",o=(h(e)&&(e=a(o=e,"key"),i=a(o,"url"),n=a(o,"svgConfig",{}),r=a(o,"xhrSettings"),s=a(o,"extension",s)),{type:"svg",cache:t.textureManager,extension:s,responseType:"text",key:e,url:i,xhrSettings:r,config:{width:a(n,"width"),height:a(n,"height"),scale:a(n,"scale")}});p.call(this,t,o)},onProcess:function(){this.state=d.FILE_PROCESSING;var t=this.xhrLoader.responseText,e=[t],i=this.config.width,n=this.config.height,r=this.config.scale;t:if(i&&n||r){var s=(new DOMParser).parseFromString(t,"text/xml").getElementsByTagName("svg")[0],o=s.hasAttribute("viewBox"),a=parseFloat(s.getAttribute("width")),h=parseFloat(s.getAttribute("height"));if(!o&&a&&h?s.setAttribute("viewBox","0 0 "+a+" "+h):!o||a||h||(a=(o=s.getAttribute("viewBox").split(/\s+|,/))[2],h=o[3]),r){if(!a||!h)break t;i=a*r,n=h*r}s.setAttribute("width",i.toString()+"px"),s.setAttribute("height",n.toString()+"px"),e=[(new XMLSerializer).serializeToString(s)]}try{var l=new window.Blob(e,{type:"image/svg+xml;charset=utf-8"})}catch(t){return void this.onProcessError()}this.data=new Image,this.data.crossOrigin=this.crossOrigin;var c=this,u=!1;this.data.onload=function(){u||p.revokeObjectURL(c.data),c.onProcessComplete()},this.data.onerror=function(){u?c.onProcessError():(u=!0,p.revokeObjectURL(c.data),c.data.src="data:image/svg+xml,"+encodeURIComponent(e.join("")))},p.createObjectURL(this.data,l,"image/svg+xml")},addToCache:function(){var t=this.cache.addImage(this.key,this.data);this.pendingDestroy(t)}});r.register("svg",function(t,e,i,n){if(Array.isArray(t))for(var r=0;r<t.length;r++)this.addFile(new s(this,t[r]));else this.addFile(new s(this,t,e,i,n));return this}),t.exports=s},function(t,e,i){var n=i(0),r=i(21),o=i(23),s=i(8),a=i(2),h=i(7),l=i(40),c=new n({Extends:o,initialize:function(t,e,i,n){var r="csv",s=(h(e)&&(e=a(s=e,"key"),i=a(s,"url"),n=a(s,"xhrSettings"),r=a(s,"extension",r)),{type:"tilemapCSV",cache:t.cacheManager.tilemap,extension:r,responseType:"text",key:e,url:i,xhrSettings:n});o.call(this,t,s),this.tilemapFormat=l.CSV},onProcess:function(){this.state=r.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),this.pendingDestroy(t)}});s.register("tilemapCSV",function(t,e,i){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new c(this,t[n]));else this.addFile(new c(this,t,e,i));return this}),t.exports=c},function(t,e,i){var n=i(0),r=i(8),s=i(61),o=i(40),a=new n({Extends:s,initialize:function(t,e,i,n){s.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),this.pendingDestroy(t)}});r.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},function(t,e,i){var n=i(0),r=i(8),s=i(61),o=i(40),a=new n({Extends:s,initialize:function(t,e,i,n){s.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),this.pendingDestroy(t)}});r.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},function(t,e,i){var n=i(0),r=i(8),h=i(2),l=i(71),c=i(7),u=i(49),d=i(242),a=new n({Extends:u,initialize:function(t,e,i,n,r,s){var o,a=c(e)?(e=h(a=e,"key"),o=new l(t,{key:e,url:h(a,"textureURL"),extension:h(a,"textureExtension","png"),normalMap:h(a,"normalMap"),xhrSettings:h(a,"textureXhrSettings")}),new d(t,{key:e,url:h(a,"atlasURL"),extension:h(a,"atlasExtension","txt"),xhrSettings:h(a,"atlasXhrSettings")})):(o=new l(t,e,i,r),new d(t,e,n,s));o.linkFile?u.call(this,t,"unityatlas",e,[o,a,o.linkFile]):u.call(this,t,"unityatlas",e,[o,a])},addToCache:function(){var t,e,i;this.isReadyToProcess()&&(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),e.pendingDestroy(),this.complete=!0)}});r.register("unityAtlas",function(t,e,i,n,r){var s;if(Array.isArray(t))for(var o=0;o<t.length;o++)s=new a(this,t[o]),this.addFile(s.files);else s=new a(this,t,e,i,n,r),this.addFile(s.files);return this}),t.exports=a},function(t,e,i){var n=i(0),r=i(21),a=i(23),s=i(8),o=i(155),h=i(2),l=i(7),c=new n({Extends:a,initialize:function(t,e,i,n,r,s,o){e={type:"video",cache:t.cacheManager.video,extension:i.type,responseType:"blob",key:e,url:i.url,xhrSettings:o,config:{loadEvent:n="loadeddata"!==(n=void 0===n?"loadeddata":n)&&"canplay"!==n&&"canplaythrough"!==n?"loadeddata":n,asBlob:r=void 0===r?!1:r,noAudio:s=void 0===s?!1:s}};this.onLoadCallback=this.onVideoLoadHandler.bind(this),this.onErrorCallback=this.onVideoErrorHandler.bind(this),a.call(this,t,e)},onProcess:function(){var t,e;this.state=r.FILE_PROCESSING,this.config.asBlob?(t=this.createVideoElement(),this.data=t,(e=this).data.onloadeddata=function(){e.onProcessComplete()},this.data.onerror=function(){a.revokeObjectURL(e.data),e.onProcessError()},a.createObjectURL(t,this.xhrLoader.response,""),t.load()):this.onProcessComplete()},createVideoElement:function(){var t=document.createElement("video");return t.controls=!1,t.crossOrigin=this.loader.crossOrigin,this.config.noAudio&&(t.muted=!0,t.defaultMuted=!0,t.setAttribute("autoplay","autoplay")),t.setAttribute("playsinline","playsinline"),t.setAttribute("preload","auto"),t},onVideoLoadHandler:function(t){t=t.target;t.removeEventListener(this.config.loadEvent,this.onLoadCallback,!0),t.removeEventListener("error",this.onErrorCallback,!0),this.data=t,this.resetXHR(),this.loader.nextFile(this,!0)},onVideoErrorHandler:function(t){t=t.target;t&&(t.removeEventListener(this.config.loadEvent,this.onLoadCallback,!0),t.removeEventListener("error",this.onErrorCallback,!0)),this.resetXHR(),this.loader.nextFile(this,!1)},load:function(){var t,e=this.config.loadEvent;this.config.asBlob?a.prototype.load.call(this):(this.percentComplete=0,(t=this.createVideoElement()).addEventListener(e,this.onLoadCallback,!0),t.addEventListener("error",this.onErrorCallback,!0),t.src=o(this,this.loader.baseURL),t.load())}});c.create=function(t,e,i,n,r,s,o){var a=t.systems.game,a=(l(e)&&(i=h(e,"url",[]),n=h(e,"loadEvent","loadeddata"),r=h(e,"asBlob",!1),s=h(e,"noAudio",!1),o=h(e,"xhrSettings"),e=h(e,"key")),c.getVideoURL(a,i));if(a)return new c(t,e,a,n,r,s,o)},c.getVideoURL=function(t,e){Array.isArray(e)||(e=[e]);for(var i=0;i<e.length;i++){var n,r=h(e[i],"url",e[i]);if(0===r.indexOf("blob:"))return{url:r,type:""};if(n=0===r.indexOf("data:")?r.split(",")[0].match(/\/(.*?);/):r.match(/\.([a-zA-Z0-9]+)($|\?)/),n=h(e[i],"type",n?n[1]:"").toLowerCase(),t.device.video[n])return{url:r,type:n}}return null},s.register("video",function(t,e,i,n,r,s){var o;if(Array.isArray(t))for(var a=0;a<t.length;a++)(o=c.create(this,t[a]))&&this.addFile(o);else(o=c.create(this,t,e,i,n,r,s))&&this.addFile(o);return this}),t.exports=c},function(t,e,i){var n=i(0),r=i(21),s=i(149),o=i(9),a=i(95),h=i(8),m=i(2),l=i(24),c=i(20),u=i(156),i=new n({Extends:o,initialize:function(t){o.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,h.install(this),this.prefix="",this.path="",this.baseURL="",this.setBaseURL(m(i,"baseURL",e.loaderBaseURL)),this.setPath(m(i,"path",e.loaderPath)),this.setPrefix(m(i,"prefix",e.loaderPrefix)),this.maxParallelDownloads=m(i,"maxParallelDownloads",e.loaderMaxParallelDownloads),this.xhr=u(m(i,"responseType",e.loaderResponseType),m(i,"async",e.loaderAsync),m(i,"user",e.loaderUser),m(i,"password",e.loaderPassword),m(i,"timeout",e.loaderTimeout),m(i,"withCredentials",e.loaderWithCredentials)),this.crossOrigin=m(i,"crossOrigin",e.loaderCrossOrigin),this.totalToLoad=0,this.progress=0,this.list=new s,this.inflight=new s,this.queue=new s,this._deleteQueue=new s,this.totalFailed=0,this.totalComplete=0,this.state=r.LOADER_IDLE,this.multiKeyIndex=0,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""!==(t=void 0===t?"":t)&&"/"!==t.substr(-1)&&(t=t.concat("/")),this.baseURL=t,this},setPath:function(t){return""!==(t=void 0===t?"":t)&&"/"!==t.substr(-1)&&(t=t.concat("/")),this.path=t,this},setPrefix:function(t){return this.prefix=t=void 0===t?"":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.set(i),this.emit(a.ADD,i.key,i.type,this,i),this.isLoading()&&(this.totalToLoad++,this.updateProgress()))}},keyExists:function(e){var i=e.hasCacheConflict();return i||this.list.iterate(function(t){if(t.type===e.type&&t.key===e.key)return!(i=!0)}),!i&&this.isLoading()&&(this.inflight.iterate(function(t){if(t.type===e.type&&t.key===e.key)return!(i=!0)}),this.queue.iterate(function(t){if(t.type===e.type&&t.key===e.key)return!(i=!0)})),i},addPack:function(t,e){e&&t.hasOwnProperty(e)&&(t={packKey:t[e]});var i,n=0,r=this.baseURL,s=this.path,o=this.prefix;for(i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var a=t[i],h=m(a,"baseURL",r),l=m(a,"path",s),c=m(a,"prefix",o),u=m(a,"files",null),d=m(a,"defaultType","void");if(Array.isArray(u)){this.setBaseURL(h),this.setPath(l),this.setPrefix(c);for(var p=0;p<u.length;p++){var f=u[p],g=f.hasOwnProperty("type")?f.type:d;this[g]&&(this[g](f),n++)}}}return this.setBaseURL(r),this.setPath(s),this.setPrefix(o),0<n},isLoading:function(){return this.state===r.LOADER_LOADING||this.state===r.LOADER_PROCESSING},isReady:function(){return this.state===r.LOADER_IDLE||this.state===r.LOADER_COMPLETE},start:function(){this.isReady()&&(this.progress=0,this.totalFailed=0,this.totalComplete=0,this.totalToLoad=this.list.size,this.emit(a.START,this),0===this.list.size?this.loadComplete():(this.state=r.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(a.PROGRESS,this.progress)},update:function(){this.state===r.LOADER_LOADING&&0<this.list.size&&this.inflight.size<this.maxParallelDownloads&&this.checkLoadQueue()},checkLoadQueue:function(){this.list.each(function(t){if((t.state===r.FILE_POPULATED||t.state===r.FILE_PENDING&&this.inflight.size<this.maxParallelDownloads)&&(this.inflight.set(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.set(t),this.emit(a.FILE_LOAD,t),t.onProcess()):(this.totalFailed++,this._deleteQueue.set(t),this.emit(a.FILE_LOAD_ERROR,t),this.fileProcessComplete(t)))},fileProcessComplete:function(t){this.scene&&this.systems&&this.systems.game&&!this.systems.game.pendingDestroy&&(t.state===r.FILE_ERRORED?t.multiFile&&t.multiFile.onFileFailed(t):t.state===r.FILE_COMPLETE&&(t.multiFile?t.multiFile.isReadyToProcess()&&t.multiFile.addToCache():t.addToCache()),this.queue.delete(t),0===this.list.size&&0===this.inflight.size&&0===this.queue.size&&this.loadComplete())},loadComplete:function(){this.emit(a.POST_PROCESS,this),this.list.clear(),this.inflight.clear(),this.queue.clear(),this.progress=1,this.state=r.LOADER_COMPLETE,this.systems.events.off(c.UPDATE,this.update,this),this._deleteQueue.iterateLocal("destroy"),this._deleteQueue.clear(),this.emit(a.COMPLETE,this,this.totalComplete,this.totalFailed)},flagForRemoval:function(t){this._deleteQueue.set(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");t=new Blob([t],{type:i}),i=URL.createObjectURL(t),t=document.createElement("a");return t.download=e,t.textContent="Download "+e,t.href=i,t.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(m(e,"baseURL",t.loaderBaseURL)),this.setPath(m(e,"path",t.loaderPath)),this.setPrefix(m(e,"prefix",t.loaderPrefix)),this.state=r.LOADER_IDLE},shutdown:function(){this.reset(),this.state=r.LOADER_SHUTDOWN,this.systems.events.off(c.UPDATE,this.update,this),this.systems.events.off(c.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.state=r.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}});l.register("Loader",i,"load"),t.exports=i},function(t,e,i){var n=i(62),i=i(17)(!1,{ArcadePhysics:i(1367),Body:i(527),Collider:i(528),Components:i(243),Events:i(245),Factory:i(521),GetOverlapX:i(246),GetOverlapY:i(247),SeparateX:i(537),SeparateY:i(538),Group:i(524),Image:i(522),Sprite:i(157),StaticBody:i(539),StaticGroup:i(525),Tilemap:i(1391),World:i(526)},n);t.exports=i},function(t,e,i){var n=i(0),r=i(36),o=i(50),c=i(353),s=i(521),a=i(2),h=i(127),l=i(523),u=i(244),d=i(24),p=i(20),f=i(3),g=i(526),i=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.config=this.getConfig(),this.world,this.add,t.sys.events.once(p.BOOT,this.boot,this),t.sys.events.on(p.START,this.start,this)},boot:function(){this.world=new g(this.scene,this.config),this.add=new s(this.world),this.systems.events.once(p.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new g(this.scene,this.config),this.add=new s(this.world));var t=this.systems.events;a(this.config,"customUpdate",!1)||t.on(p.UPDATE,this.world.update,this.world),t.on(p.POST_UPDATE,this.world.postUpdate,this.world),t.once(p.SHUTDOWN,this.shutdown,this)},enableUpdate:function(){this.systems.events.on(p.UPDATE,this.world.update,this.world)},disableUpdate:function(){this.systems.events.off(p.UPDATE,this.world.update,this.world)},getConfig:function(){var t=this.systems.game.config.physics,e=this.systems.settings.physics;return h(a(e,"arcade",{}),a(t,"arcade",{}))},overlap:function(t,e,i,n,r){return void 0===i&&(i=null),void 0===r&&(r=i),this.world.collideObjects(t,e,i,n=void 0===n?null:n,r,!0)},collide:function(t,e,i,n,r){return void 0===i&&(i=null),void 0===r&&(r=i),this.world.collideObjects(t,e,i,n=void 0===n?null:n,r,!1)},collideTiles:function(t,e,i,n,r){return this.world.collideTiles(t,e,i,n,r)},overlapTiles:function(t,e,i,n,r){return this.world.overlapTiles(t,e,i,n,r)},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},accelerateTo:function(t,e,i,n,r,s){void 0===n&&(n=60);i=Math.atan2(i-t.y,e-t.x);return t.body.acceleration.setToPolar(i,n),void 0!==r&&void 0!==s&&t.body.maxVelocity.set(r,s),i},accelerateToObject:function(t,e,i,n,r){return this.accelerateTo(t,e.x,e.y,i,n,r)},closest:function(t,e){e=e||this.world.bodies.entries;for(var i=Number.MAX_VALUE,n=null,r=t.x,s=t.y,o=e.length,a=0;a<o;a++){var h=e[a],l=h.body||h;t!==h&&t!==l&&t!==l.gameObject&&t!==l.center&&(l=c(r,s,l.center.x,l.center.y))<i&&(n=h,i=l)}return n},furthest:function(t,e){e=e||this.world.bodies.entries;for(var i=-1,n=null,r=t.x,s=t.y,o=e.length,a=0;a<o;a++){var h=e[a],l=h.body||h;t!==h&&t!==l&&t!==l.gameObject&&t!==l.center&&i<(l=c(r,s,l.center.x,l.center.y))&&(n=h,i=l)}return n},moveTo:function(t,e,i,n,r){void 0===n&&(n=60),void 0===r&&(r=0);var s=Math.atan2(i-t.y,e-t.x);return 0<r&&(n=o(t.x,t.y,e,i)/(r/1e3)),t.body.velocity.setToPolar(s,n),s},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),(i=void 0===i?new f:i).setToPolar(r(t),e)},velocityFromRotation:function(t,e,i){return void 0===e&&(e=60),(i=void 0===i?new f:i).setToPolar(t,e)},overlapRect:function(t,e,i,n,r,s){return u(this.world,t,e,i,n,r,s)},overlapCirc:function(t,e,i,n,r){return l(this.world,t,e,i,n,r)},shutdown:function(){var t;this.world&&((t=this.systems.events).off(p.UPDATE,this.world.update,this.world),t.off(p.POST_UPDATE,this.world.postUpdate,this.world),t.off(p.SHUTDOWN,this.shutdown,this),this.add.destroy(),this.world.destroy(),this.add=null,this.world=null)},destroy:function(){this.shutdown(),this.scene.sys.events.off(p.START,this.start,this),this.scene=null,this.systems=null}});d.register("ArcadePhysics",i,"arcadePhysics"),t.exports=i},function(t,e){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}}},function(t,e){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}}},function(t,e){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){return this.body.setCollideWorldBounds(t,e,i),this}}},function(t,e){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}}}},function(t,e){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}}},function(t,e){t.exports={enableBody:function(t,e,i,n,r){return t&&this.body.reset(e,i),n&&(this.body.gameObject.active=!0),r&&(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}}},function(t,e){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}}},function(t,e){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}}},function(t,e){t.exports={setImmovable:function(t){return this.body.immovable=t=void 0===t?!0:t,this}}},function(t,e){t.exports={setMass:function(t){return this.body.mass=t,this}}},function(t,e){t.exports={setPushable:function(t){return this.body.pushable=t=void 0===t?!0:t,this}}},function(t,e){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}}},function(t,e){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}}},function(t,e){t.exports="collide"},function(t,e){t.exports="overlap"},function(t,e){t.exports="pause"},function(t,e){t.exports="resume"},function(t,e){t.exports="tilecollide"},function(t,e){t.exports="tileoverlap"},function(t,e){t.exports="worldbounds"},function(t,e){t.exports="worldstep"},function(t,e){function n(){return f&&x&&o.blocked.right?(s.processX(-w,u,!1,!0),1):p&&b&&o.blocked.left?(s.processX(w,u,!0),1):y&&b&&s.blocked.right?(o.processX(-w,d,!1,!0),2):m&&x&&s.blocked.left?(o.processX(w,d,!0),2):0}function r(t){var e;return a&&h?(w*=.5,0===t||3===t?(s.processX(w,l),o.processX(-w,c)):(s.processX(-w,l),o.processX(w,c))):a&&!h?0===t||3===t?s.processX(w,u,!0):s.processX(-w,u,!1,!0):!a&&h?0===t||3===t?o.processX(-w,d,!1,!0):o.processX(w,d,!0):(e=.5*w,0===t?v?(s.processX(w,0,!0),o.processX(0,null,!1,!0)):y?(s.processX(e,0,!0),o.processX(-e,0,!1,!0)):(s.processX(e,o.velocity.x,!0),o.processX(-e,null,!1,!0)):1===t?g?(s.processX(0,null,!1,!0),o.processX(w,0,!0)):f?(s.processX(-e,0,!1,!0),o.processX(e,0,!0)):(s.processX(-e,null,!1,!0),o.processX(e,s.velocity.x,!0)):2===t?v?(s.processX(-w,0,!1,!0),o.processX(0,null,!0)):m?(s.processX(-e,0,!1,!0),o.processX(e,0,!0)):(s.processX(-e,o.velocity.x,!1,!0),o.processX(e,null,!0)):3===t&&(g?(s.processX(0,null,!0),o.processX(-w,0,!1,!0)):p?(s.processX(e,0,!0),o.processX(-e,0,!1,!0)):(s.processX(e,o.velocity.y,!0),o.processX(-e,null,!1,!0)))),!0}var s,o,a,h,l,c,u,d,p,f,g,m,y,v,x,b,w;t.exports={BlockCheck:n,Check:function(){var t=s.velocity.x,e=o.velocity.x,e=Math.sqrt(e*e*o.mass/s.mass)*(0<e?1:-1),t=Math.sqrt(t*t*s.mass/o.mass)*(0<t?1:-1),i=.5*(e+t);return l=i+(e-=i)*s.bounce.x,c=i+(t-=i)*o.bounce.x,p&&b?r(0):m&&x?r(1):f&&x?r(2):!(!y||!b)&&r(3)},Set:function(t,e,i){o=e;e=(s=t).velocity.x,t=o.velocity.x;return a=s.pushable,p=s._dx<0,f=0<s._dx,g=0===s._dx,x=Math.abs(s.right-o.x)<=Math.abs(o.right-s.x),u=t-e*s.bounce.x,h=o.pushable,m=o._dx<0,y=0<o._dx,v=0===o._dx,b=!x,d=e-t*o.bounce.x,w=Math.abs(i),n()},Run:r,RunImmovableBody1:function(t){1===t?o.velocity.x=0:x?o.processX(w,d,!0):o.processX(-w,d,!1,!0),s.moves&&(o.y+=(s.y-s.prev.y)*s.friction.y,o._dy=o.y-o.prev.y)},RunImmovableBody2:function(t){2===t?s.velocity.x=0:b?s.processX(w,u,!0):s.processX(-w,u,!1,!0),o.moves&&(s.y+=(o.y-o.prev.y)*o.friction.y,s._dy=s.y-s.prev.y)}}},function(t,e){function n(){return f&&x&&o.blocked.down?(s.processY(-w,u,!1,!0),1):p&&b&&o.blocked.up?(s.processY(w,u,!0),1):y&&b&&s.blocked.down?(o.processY(-w,d,!1,!0),2):m&&x&&s.blocked.up?(o.processY(w,d,!0),2):0}function r(t){var e;return a&&h?(w*=.5,0===t||3===t?(s.processY(w,l),o.processY(-w,c)):(s.processY(-w,l),o.processY(w,c))):a&&!h?0===t||3===t?s.processY(w,u,!0):s.processY(-w,u,!1,!0):!a&&h?0===t||3===t?o.processY(-w,d,!1,!0):o.processY(w,d,!0):(e=.5*w,0===t?v?(s.processY(w,0,!0),o.processY(0,null,!1,!0)):y?(s.processY(e,0,!0),o.processY(-e,0,!1,!0)):(s.processY(e,o.velocity.y,!0),o.processY(-e,null,!1,!0)):1===t?g?(s.processY(0,null,!1,!0),o.processY(w,0,!0)):f?(s.processY(-e,0,!1,!0),o.processY(e,0,!0)):(s.processY(-e,null,!1,!0),o.processY(e,s.velocity.y,!0)):2===t?v?(s.processY(-w,0,!1,!0),o.processY(0,null,!0)):m?(s.processY(-e,0,!1,!0),o.processY(e,0,!0)):(s.processY(-e,o.velocity.y,!1,!0),o.processY(e,null,!0)):3===t&&(g?(s.processY(0,null,!0),o.processY(-w,0,!1,!0)):p?(s.processY(e,0,!0),o.processY(-e,0,!1,!0)):(s.processY(e,o.velocity.y,!0),o.processY(-e,null,!1,!0)))),!0}var s,o,a,h,l,c,u,d,p,f,g,m,y,v,x,b,w;t.exports={BlockCheck:n,Check:function(){var t=s.velocity.y,e=o.velocity.y,e=Math.sqrt(e*e*o.mass/s.mass)*(0<e?1:-1),t=Math.sqrt(t*t*s.mass/o.mass)*(0<t?1:-1),i=.5*(e+t);return l=i+(e-=i)*s.bounce.y,c=i+(t-=i)*o.bounce.y,p&&b?r(0):m&&x?r(1):f&&x?r(2):!(!y||!b)&&r(3)},Set:function(t,e,i){o=e;e=(s=t).velocity.y,t=o.velocity.y;return a=s.pushable,p=s._dy<0,f=0<s._dy,g=0===s._dy,x=Math.abs(s.bottom-o.y)<=Math.abs(o.bottom-s.y),u=t-e*s.bounce.y,h=o.pushable,m=o._dy<0,y=0<o._dy,v=0===o._dy,b=!x,d=e-t*o.bounce.y,w=Math.abs(i),n()},Run:r,RunImmovableBody1:function(t){1===t?o.velocity.y=0:x?o.processY(w,d,!0):o.processY(-w,d,!1,!0),s.moves&&(o.x+=(s.x-s.prev.x)*s.friction.x,o._dx=o.x-o.prev.x)},RunImmovableBody2:function(t){2===t?s.velocity.y=0:b?s.processY(w,u,!0):s.processY(-w,u,!1,!0),o.moves&&(s.x+=(o.x-o.prev.x)*o.friction.x,s._dx=s.x-s.prev.x)}}},function(t,e,i){i={ProcessTileCallbacks:i(530),ProcessTileSeparationX:i(534),ProcessTileSeparationY:i(536),SeparateTile:i(532),TileCheckX:i(533),TileCheckY:i(535),TileIntersectsBody:i(248)};t.exports=i},function(t,e,i){var n=i(0),r=i(3),i=new n({initialize:function(){this.boundsCenter=new r,this.centerDiff=new r},parseBody:function(t){var e,i,n,r,s;return!(!(t=t.hasOwnProperty("body")?t.body:t).hasOwnProperty("bounds")||!t.hasOwnProperty("centerOfMass"))&&(e=this.boundsCenter,i=this.centerDiff,n=t.bounds.max.x-t.bounds.min.x,r=t.bounds.max.y-t.bounds.min.y,s=n*t.centerOfMass.x,t=r*t.centerOfMass.y,e.set(n/2,r/2),i.set(s-e.x,t-e.y),!0)},getTopLeft:function(t,e,i){var n;return void 0===e&&(e=0),void 0===i&&(i=0),!!this.parseBody(t)&&(t=this.boundsCenter,n=this.centerDiff,new r(e+t.x+n.x,i+t.y+n.y))},getTopCenter:function(t,e,i){var n;return void 0===e&&(e=0),void 0===i&&(i=0),!!this.parseBody(t)&&(t=this.boundsCenter,n=this.centerDiff,new r(e+n.x,i+t.y+n.y))},getTopRight:function(t,e,i){var n;return void 0===e&&(e=0),void 0===i&&(i=0),!!this.parseBody(t)&&(t=this.boundsCenter,n=this.centerDiff,new r(e-(t.x-n.x),i+t.y+n.y))},getLeftCenter:function(t,e,i){var n;return void 0===e&&(e=0),void 0===i&&(i=0),!!this.parseBody(t)&&(t=this.boundsCenter,n=this.centerDiff,new r(e+t.x+n.x,i+n.y))},getCenter:function(t,e,i){return void 0===e&&(e=0),void 0===i&&(i=0),!!this.parseBody(t)&&(t=this.centerDiff,new r(e+t.x,i+t.y))},getRightCenter:function(t,e,i){var n;return void 0===e&&(e=0),void 0===i&&(i=0),!!this.parseBody(t)&&(t=this.boundsCenter,n=this.centerDiff,new r(e-(t.x-n.x),i+n.y))},getBottomLeft:function(t,e,i){var n;return void 0===e&&(e=0),void 0===i&&(i=0),!!this.parseBody(t)&&(t=this.boundsCenter,n=this.centerDiff,new r(e+t.x+n.x,i-(t.y-n.y)))},getBottomCenter:function(t,e,i){var n;return void 0===e&&(e=0),void 0===i&&(i=0),!!this.parseBody(t)&&(t=this.boundsCenter,n=this.centerDiff,new r(e+n.x,i-(t.y-n.y)))},getBottomRight:function(t,e,i){var n;return void 0===e&&(e=0),void 0===i&&(i=0),!!this.parseBody(t)&&(t=this.boundsCenter,n=this.centerDiff,new r(e-(t.x-n.x),i-(t.y-n.y)))}});t.exports=i},function(t,e){function P(t,e,i,n){var r,s=e[0]-t[0],e=e[1]-t[1],o=n[0]-i[0],n=n[1]-i[1];if(o*e-n*s!=0)return r=(s*(i[1]-t[1])+e*(t[0]-i[0]))/(o*e-n*s),i=(o*(t[1]-i[1])+n*(i[0]-t[0]))/(n*s-o*e),0<=r&&r<=1&&0<=i&&i<=1}function u(t,e,i){return(e[0]-t[0])*(i[1]-t[1])-(i[0]-t[0])*(e[1]-t[1])}function _(t,e,i){return 0<u(t,e,i)}function E(t,e,i){return 0<=u(t,e,i)}function A(t,e,i){return u(t,e,i)<0}function M(t,e,i){return u(t,e,i)<=0}t.exports={decomp:function(t){var e=function t(e){for(var i=[],n=[],r=[],s=Number.MAX_VALUE,o=0;o<e.length;++o)if(R(e,o))for(var a=0;a<e.length;++a)if(function(t,e,i){var n,r,h=c,l=f;if(!E(C(t,e+1),C(t,e),C(t,i))||!M(C(t,e-1),C(t,e),C(t,i))){r=k(C(t,e),C(t,i));for(var s=0;s!==t.length;++s)if((s+1)%t.length!==e&&s!==e&&E(C(t,e),C(t,i),C(t,s+1))&&M(C(t,e),C(t,i),C(t,s))&&(h[0]=C(t,e),h[1]=C(t,i),l[0]=C(t,s),l[1]=C(t,s+1),n=function(){var t=[0,0],e=h[1][1]-h[0][1],i=h[0][0]-h[1][0],n=e*h[0][0]+i*h[0][1],r=l[1][1]-l[0][1],s=l[0][0]-l[1][0],o=r*l[0][0]+s*l[0][1],a=e*s-r*i;return m(a,0,0)||(t[0]=(s*n-i*o)/a,t[1]=(e*o-r*n)/a),t}(),k(C(t,e),n)<r))return;return 1}}(e,o,a)){for(var n=t(g(e,o,a,r)),h=t(g(e,a,o,r)),l=0;l<h.length;l++)n.push(h[l]);n.length<s&&(s=(i=n).length,i.push([C(e,o),C(e,a)]))}return i}(t);return 0<e.length?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],r=0;r<i.length;r++)for(var s=i[r],o=0;o<n.length;o++){var a=t(n[o],s);if(a){n.splice(o,1),n.push(a[0],a[1]);break}}return n}return r=e.indexOf((s=i)[0]),o=e.indexOf(s[1]),-1!==r&&-1!==o&&[g(e,r,o),g(e,o,r)]}(t,e):[t]},quickDecomp:function t(e,i,n,r,s,o,a){o=o||100,a=a||0,s=s||25,i=void 0!==i?i:[],n=n||[],r=r||[];var h=[0,0],l=[0,0],c=[0,0],u=0,d=0,p=0,f=0,g=0,m=0,y=0,v=[],x=[],b=e,w=e;if(!(w.length<3||o<++a)){for(var T=0;T<e.length;++T)if(R(b,T)){n.push(b[T]);for(var u=d=Number.MAX_VALUE,S=0;S<e.length;++S)_(C(b,T-1),C(b,T),C(b,S))&&M(C(b,T-1),C(b,T),C(b,S-1))&&(c=L(C(b,T-1),C(b,T),C(b,S),C(b,S-1)),A(C(b,T+1),C(b,T),c)&&(p=k(b[T],c))<d&&(d=p,l=c,m=S)),_(C(b,T+1),C(b,T),C(b,S+1))&&M(C(b,T+1),C(b,T),C(b,S))&&(c=L(C(b,T+1),C(b,T),C(b,S),C(b,S+1)),_(C(b,T-1),C(b,T),c)&&(p=k(b[T],c))<u&&(u=p,h=c,g=S));if(m===(g+1)%e.length)c[0]=(l[0]+h[0])/2,c[1]=(l[1]+h[1])/2,r.push(c),T<g?(O(v,b,T,g+1),v.push(c),x.push(c),0!==m&&O(x,b,m,b.length),O(x,b,0,T+1)):(0!==T&&O(v,b,T,b.length),O(v,b,0,g+1),v.push(c),x.push(c),O(x,b,m,T+1));else{if(g<m&&(g+=e.length),f=Number.MAX_VALUE,g<m)return i;for(S=m;S<=g;++S)E(C(b,T-1),C(b,T),C(b,S))&&M(C(b,T+1),C(b,T),C(b,S))&&(p=k(C(b,T),C(b,S)))<f&&function(t,e,i){for(var n=0;n!==t.length;++n)if(n!==e&&n!==i&&(n+1)%t.length!==e&&(n+1)%t.length!==i&&P(C(t,e),C(t,i),C(t,n),C(t,n+1)))return;return 1}(b,T,S)&&(f=p,y=S%e.length);T<y?(O(v,b,T,y+1),0!==y&&O(x,b,y,w.length),O(x,b,0,T+1)):(0!==T&&O(v,b,T,w.length),O(v,b,0,y+1),O(x,b,y,T+1))}return v.length<x.length?(t(v,i,n,r,s,o,a),t(x,i,n,r,s,o,a)):(t(x,i,n,r,s,o,a),t(v,i,n,r,s,o,a)),i}i.push(e)}return i},isSimple:function(t){for(var e=t,i=0;i<e.length-1;i++)for(var n=0;n<i-1;n++)if(P(e[i],e[i+1],e[n],e[n+1]))return!1;for(i=1;i<e.length-2;i++)if(P(e[0],e[e.length-1],e[i],e[i+1]))return!1;return!0},removeCollinearPoints:function(t,e){for(var i,n,r,s,o,a,h,l=0,c=t.length-1;3<t.length&&0<=c;--c)i=C(t,c-1),n=C(t,c),r=C(t,c+1),h=a=o=void 0,((s=e)?(h=p,(a=d)[0]=n[0]-i[0],a[1]=n[1]-i[1],h[0]=r[0]-n[0],h[1]=r[1]-n[1],o=a[0]*h[0]+a[1]*h[1],a=Math.sqrt(a[0]*a[0]+a[1]*a[1]),h=Math.sqrt(h[0]*h[0]+h[1]*h[1]),Math.acos(o/(a*h))<s):0===u(i,n,r))&&(t.splice(c%t.length,1),l++);return l},removeDuplicatePoints:function(t,e){for(var i,n,r,s=t.length-1;1<=s;--s)for(var o=t[s],a=s-1;0<=a;--a)i=o,n=t[a],r=e,m(i[0],n[0],r)&&m(i[1],n[1],r)&&t.splice(s,1)},makeCCW:function(t){for(var e=0,i=t,n=1;n<t.length;++n)(i[n][1]<i[e][1]||i[n][1]===i[e][1]&&i[n][0]>i[e][0])&&(e=n);return!_(C(t,e-1),C(t,e),C(t,e+1))&&(function(t){for(var e=[],i=t.length,n=0;n!==i;n++)e.push(t.pop());for(n=0;n!==i;n++)t[n]=e[n]}(t),!0)}};var d=[],p=[];function k(t,e){var i=e[0]-t[0],e=e[1]-t[1];return i*i+e*e}function C(t,e){var i=t.length;return t[e<0?e%i+i:e%i]}function O(t,e,i,n){for(var r=i;r<n;r++)t.push(e[r])}function R(t,e){return A(C(t,e-1),C(t,e),C(t,e+1))}var c=[],f=[];function g(t,e,i,n){var r=n||[];if(r.length=0,e<i)for(var s=e;s<=i;s++)r.push(t[s]);else{for(s=0;s<=i;s++)r.push(t[s]);for(s=e;s<t.length;s++)r.push(t[s])}return r}function L(t,e,i,n,r){var s=e[1]-t[1],e=t[0]-e[0],t=s*t[0]+e*t[1],o=n[1]-i[1],n=i[0]-n[0],i=o*i[0]+n*i[1],a=s*n-o*e;return m(a,0,r=r||0)?[0,0]:[(n*t-e*i)/a,(s*i-o*t)/a]}function m(t,e,i){return i=i||0,Math.abs(t-e)<=i}},function(t,e,i){var c=i(86),n=i(0),u=i(591),s=i(128),d=i(592),r=i(1395),p=i(1396),o=i(1397),a=i(593),h=i(589),l=i(590),f=i(1398),g=i(64),i=new n({initialize:function(t){this.world=t,this.scene=t.scene,this.sys=t.scene.sys},rectangle:function(t,e,i,n,r){t=c.rectangle(t,e,i,n,r);return this.world.add(t),t},trapezoid:function(t,e,i,n,r,s){t=c.trapezoid(t,e,i,n,r,s);return this.world.add(t),t},circle:function(t,e,i,n,r){t=c.circle(t,e,i,n,r);return this.world.add(t),t},polygon:function(t,e,i,n,r){t=c.polygon(t,e,i,n,r);return this.world.add(t),t},fromVertices:function(t,e,i,n,r,s,o){"string"==typeof i&&(i=g.fromPath(i));t=c.fromVertices(t,e,i,n,r,s,o);return this.world.add(t),t},fromPhysicsEditor:function(t,e,i,n,r){void 0===r&&(r=!0);t=h.parseBody(t,e,i,n);return r&&!this.world.has(t)&&this.world.add(t),t},fromSVG:function(t,e,i,n,r,s){void 0===n&&(n=1),void 0===r&&(r={}),void 0===s&&(s=!0);for(var o=i.getElementsByTagName("path"),a=[],h=0;h<o.length;h++){var l=d.pathToVertices(o[h],30);1!==n&&g.scale(l,n,n),a.push(l)}i=c.fromVertices(t,e,a,r);return s&&this.world.add(i),i},fromJSON:function(t,e,i,n,r){void 0===r&&(r=!0);t=l.parseBody(t,e,i,n=void 0===n?{}:n);return t&&r&&this.world.add(t),t},imageStack:function(i,n,t,e,r,s,o,a,h){void 0===o&&(o=0),void 0===a&&(a=0),void 0===h&&(h={});var l=this.world,c=this.sys.displayList,t=(h.addToWorld=!1,u.stack(t,e,r,s,o,a,function(t,e){t=new p(l,t,e,i,n,h);return c.add(t),t.body}));return l.add(t),t},stack:function(t,e,i,n,r,s,o){t=u.stack(t,e,i,n,r,s,o);return this.world.add(t),t},pyramid:function(t,e,i,n,r,s,o){t=u.pyramid(t,e,i,n,r,s,o);return this.world.add(t),t},chain:function(t,e,i,n,r,s){return u.chain(t,e,i,n,r,s)},mesh:function(t,e,i,n,r){return u.mesh(t,e,i,n,r)},newtonsCradle:function(t,e,i,n,r){t=u.newtonsCradle(t,e,i,n,r);return this.world.add(t),t},car:function(t,e,i,n,r){t=u.car(t,e,i,n,r);return this.world.add(t),t},softBody:function(t,e,i,n,r,s,o,a,h,l){t=u.softBody(t,e,i,n,r,s,o,a,h,l);return this.world.add(t),t},joint:function(t,e,i,n,r){return this.constraint(t,e,i,n,r)},spring:function(t,e,i,n,r){return this.constraint(t,e,i,n,r)},constraint:function(t,e,i,n,r){void 0===n&&(n=1),(r=void 0===r?{}:r).bodyA="body"===t.type?t:t.body,r.bodyB="body"===e.type?e:e.body,isNaN(i)||(r.length=i),r.stiffness=n;t=s.create(r);return this.world.add(t),t},worldConstraint:function(t,e,i,n){void 0===i&&(i=1),(n=void 0===n?{}:n).bodyB="body"===t.type?t:t.body,isNaN(e)||(n.length=e),n.stiffness=i;t=s.create(n);return this.world.add(t),t},mouseSpring:function(t){return this.pointerConstraint(t)},pointerConstraint:function(t){(t=void 0===t?{}:t).hasOwnProperty("render")||(t.render={visible:!1});t=new f(this.scene,this.world,t);return this.world.add(t.constraint),t},image:function(t,e,i,n,r){t=new p(this.world,t,e,i,n,r);return this.sys.displayList.add(t),t},tileBody:function(t,e){return new a(this.world,t,e)},sprite:function(t,e,i,n,r){t=new o(this.world,t,e,i,n,r);return this.sys.displayList.add(t),this.sys.updateList.add(t),t},gameObject:function(t,e,i){return r(this.world,t,e,i)},destroy:function(){this.world=null,this.scene=null,this.sys=null}});t.exports=i},function(t,e,i){var o=i(249),a=i(2),h=i(3);t.exports=function(t,n,e,i){void 0===e&&(e={}),void 0===i&&(i=!0);var r=n.x,s=n.y;return n.body={temp:!0,position:{x:r,y:s}},[o.Bounce,o.Collision,o.Force,o.Friction,o.Gravity,o.Mass,o.Sensor,o.SetBody,o.Sleep,o.Static,o.Transform,o.Velocity].forEach(function(t){for(var e in t)(i=t[e]).get&&"function"==typeof i.get||i.set&&"function"==typeof i.set?Object.defineProperty(n,e,{get:t[e].get,set:t[e].set}):Object.defineProperty(n,e,{value:t[e]});var i}),n.world=t,n._tempVec2=new h(r,s),e.hasOwnProperty("type")&&"body"===e.type?n.setExistingBody(e,i):(t=a(e,"shape",null)||"rectangle",e.addToWorld=i,n.setBody(t,e)),n}},function(t,e,i){var n=i(0),r=i(249),o=i(15),a=i(2),s=i(125),h=i(167),l=i(3),i=new n({Extends:s,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,h],initialize:function(t,e,i,n,r,s){o.call(this,t.scene,"Image"),this._crop=this.resetCropObject(),this.setTexture(n,r),this.setSizeToFrame(),this.setOrigin(),this.world=t,this._tempVec2=new l(e,i);n=a(s,"shape",null);n?this.setBody(n,s):this.setRectangle(this.width,this.height,s),this.setPosition(e,i),this.initPipeline()}});t.exports=i},function(t,e,i){var o=i(164),n=i(0),r=i(249),a=i(15),h=i(2),s=i(167),l=i(73),c=i(3),i=new n({Extends:l,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,s],initialize:function(t,e,i,n,r,s){a.call(this,t.scene,"Sprite"),this._crop=this.resetCropObject(),this.anims=new o(this),this.setTexture(n,r),this.setSizeToFrame(),this.setOrigin(),this.world=t,this._tempVec2=new c(e,i);n=h(s,"shape",null);n?this.setBody(n,s):this.setRectangle(this.width,this.height,s),this.setPosition(e,i),this.initPipeline()}});t.exports=i},function(t,e,i){var o=i(84),n=i(0),a=i(118),r=i(128),h=i(273),l=i(272),s=i(51),c=i(127),u=i(165),d=i(3),p=i(64),i=new n({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 d,this.body=null,this.part=null,this.constraint=r.create(c(i,{label:"Pointer Constraint",pointA:{x:0,y:0},pointB:{x:0,y:0},length:.01,stiffness:.1,angularStiffness:1,collisionFilter:{category:1,mask:4294967295,group:0}})),this.world.on(l.BEFORE_UPDATE,this.update,this),t.sys.input.on(s.POINTER_DOWN,this.onDown,this),t.sys.input.on(s.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 n=a.allBodies(this.world.localWorld),r=0;r<n.length;r++){var s=n[r];if(!s.ignorePointer&&o.contains(s.bounds,e)&&h.canCollide(s.collisionFilter,i.collisionFilter)&&this.hitTestBody(s,e))return this.world.emit(l.DRAG_START,s,this.part,this),!0}return!1},hitTestBody:function(t,e){for(var i=this.constraint,n=t.parts.length,r=1<n?1:0;r<n;r++){var s=t.parts[r];if(p.contains(s.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,u.set(t,!1),this.part=s,this.body=t,!0}return!1},update:function(){var t,e,i=this.pointer,n=this.body;this.active&&i?i.isDown||!n?i.isDown&&(n||this.getBody(i))&&(n=this.body,t=this.position,e=this.constraint,this.camera.getWorldPoint(i.x,i.y,t),e.pointA.x=t.x,e.pointA.y=t.y,u.set(n,!1),this.world.emit(l.DRAG,n,this)):this.stopDrag():n&&this.stopDrag()},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(l.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(l.BEFORE_UPDATE,this.update),this.scene.sys.input.off(s.POINTER_DOWN,this.onDown,this),this.scene.sys.input.off(s.POINTER_UP,this.onUp,this)}});t.exports=i},function(t,e,i){var n={},r=(t.exports=n,i(595)),s=i(32);n.name="matter-js",n.version="0.14.2",n.uses=[],n.used=[],n.use=function(){r.use(n,Array.prototype.slice.call(arguments))},n.before=function(t,e){return t=t.replace(/^Matter./,""),s.chainPathBefore(n,t,e)},n.after=function(t,e){return t=t.replace(/^Matter./,""),s.chainPathAfter(n,t,e)}},function(t,e,i){var c={},u=(t.exports=c,i(83)),a=i(274),h=i(84),d=i(86),l=i(64);c.collides=function(t,e){for(var i=[],n=0;n<e.length;n++){var r=e[n];if(t!==r&&h.overlaps(r.bounds,t.bounds))for(var s=1===r.parts.length?0:1;s<r.parts.length;s++){var o=r.parts[s];if(h.overlaps(o.bounds,t.bounds)){o=a.collides(o,t);if(o.collided){i.push(o);break}}}}return i},c.ray=function(t,e,i,n){n=n||1e-100;for(var r=u.angle(e,i),s=u.magnitude(u.sub(e,i)),o=.5*(i.x+e.x),i=.5*(i.y+e.y),e=d.rectangle(o,i,s,n,{angle:r}),a=c.collides(e,t),h=0;h<a.length;h+=1){var l=a[h];l.body=l.bodyB=l.bodyA}return a},c.region=function(t,e,i){for(var n=[],r=0;r<t.length;r++){var s=t[r],o=h.overlaps(s.bounds,e);(o&&!i||!o&&i)&&n.push(s)}return n},c.point=function(t,e){for(var i=[],n=0;n<t.length;n++){var r=t[n];if(h.contains(r.bounds,e))for(var s=1===r.parts.length?0:1;s<r.parts.length;s++){var o=r.parts[s];if(h.contains(o.bounds,e)&&l.contains(o.vertices,e)){i.push(r);break}}}return i}},function(t,e,i){var u={},n=(t.exports=u,i(596)),d=i(165),p=i(599),f=i(598),g=i(1523),r=i(597),m=i(166),y=i(118),v=i(128),s=i(32),a=i(41);u.create=function(t,e){e=(s.isElement(t)?e:t)||{},((t=s.isElement(t)?t:null)||e.render)&&s.warn("Engine.create: engine.render is deprecated (see docs)");t=s.extend({positionIterations:6,velocityIterations:4,constraintIterations:2,enableSleeping:!1,events:[],plugin:{},timing:{timestamp:0,timeScale:1},broadphase:{controller:r}},e);return t.world=e.world||n.create(t.world),t.pairs=f.create(),t.broadphase=t.broadphase.controller.create(t.broadphase),t.metrics=t.metrics||{extended:!1},t.metrics=g.create(t.metrics),t},u.update=function(t,e,i){i=i||1;var n,r=t.world,s=t.timing,o=t.broadphase,a=(s.timestamp+=(e=e||1e3/60)*s.timeScale,{timestamp:s.timestamp}),h=(m.trigger(t,"beforeUpdate",a),y.allBodies(r)),l=y.allConstraints(r);for(g.reset(t.metrics),t.enableSleeping&&d.update(h,s.timeScale),u._bodiesApplyGravity(h,r.gravity),u._bodiesUpdate(h,e,s.timeScale,i,r.bounds),v.preSolveAll(h),n=0;n<t.constraintIterations;n++)v.solveAll(l,s.timeScale);v.postSolveAll(h),e=o.controller?(r.isModified&&o.controller.clear(o),o.controller.update(o,h,t,r.isModified),o.pairsList):h,r.isModified&&y.setModified(r,!1,!1,!0);var i=o.detector(e,t),c=t.pairs,r=s.timestamp;for(f.update(c,i,r),f.removeOld(c,r),t.enableSleeping&&d.afterCollisions(c.list,s.timeScale),0<c.collisionStart.length&&m.trigger(t,"collisionStart",{pairs:c.collisionStart}),p.preSolvePosition(c.list),n=0;n<t.positionIterations;n++)p.solvePosition(c.list,h,s.timeScale);for(p.postSolvePosition(h),v.preSolveAll(h),n=0;n<t.constraintIterations;n++)v.solveAll(l,s.timeScale);for(v.postSolveAll(h),p.preSolveVelocity(c.list),n=0;n<t.velocityIterations;n++)p.solveVelocity(c.list,s.timeScale);return 0<c.collisionActive.length&&m.trigger(t,"collisionActive",{pairs:c.collisionActive}),0<c.collisionEnd.length&&m.trigger(t,"collisionEnd",{pairs:c.collisionEnd}),g.update(t.metrics,t),u._bodiesClearForces(h),m.trigger(t,"afterUpdate",a),t},u.merge=function(t,e){if(s.extend(t,e),e.world){t.world=e.world,u.clear(t);for(var i=y.allBodies(t.world),n=0;n<i.length;n++){var r=i[n];d.set(r,!1),r.id=s.nextId()}}},u.clear=function(t){var e=t.world;f.clear(t.pairs);var i=t.broadphase;i.controller&&(e=y.allBodies(e),i.controller.clear(i),i.controller.update(i,e,t,!0))},u._bodiesClearForces=function(t){for(var e=0;e<t.length;e++){var i=t[e];i.force.x=0,i.force.y=0,i.torque=0}},u._bodiesApplyGravity=function(t,e){var i=void 0!==e.scale?e.scale:.001;if((0!==e.x||0!==e.y)&&0!==i)for(var n=0;n<t.length;n++){var r=t[n];r.ignoreGravity||r.isStatic||r.isSleeping||(r.force.x+=r.mass*e.x*i*r.gravityScale.x,r.force.y+=r.mass*e.y*i*r.gravityScale.y)}},u._bodiesUpdate=function(t,e,i,n,r){for(var s=0;s<t.length;s++){var o=t[s];o.isStatic||o.isSleeping||a.update(o,e,i,n)}}},function(t,e,i){var s=i(86),n=i(41),r=i(0),m=i(32),l=i(118),c=i(1401),u=i(9),o=i(272),d=i(2),p=i(6),a=i(41),h=i(166),f=i(593),g=i(596),y=i(83),i=new r({Extends:u,initialize:function(t,e){u.call(this),this.scene=t,this.engine=c.create(e),this.localWorld=this.engine.world;var i=p(e,"gravity",null),i=(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=p(e,"enabled",!0),this.correction=p(e,"correction",1),this.getDelta=p(e,"getDelta",this.update60Hz),d(e,"runner",{})),n=d(i,"fps",!1),r=d(i,"fps",60),s=d(i,"delta",1e3/r),o=d(i,"deltaMin",1e3/r),a=d(i,"deltaMax",1e3/(.5*r));this.runner={fps:r=n?r:1e3/s,correction:d(i,"correction",1),deltaSampleSize:d(i,"deltaSampleSize",60),counterTimestamp:0,frameCounter:0,deltaHistory:[],timePrev:null,timeScalePrev:1,frameRequestId:null,isFixed:d(i,"isFixed",!1),delta:s,deltaMin:o,deltaMax:a},this.autoUpdate=p(e,"autoUpdate",!0);var h,n=p(e,"debug",!1);this.drawDebug="object"==typeof n||n,this.debugGraphic,this.debugConfig={showAxes:d(n,"showAxes",!1),showAngleIndicator:d(n,"showAngleIndicator",!1),angleColor:d(n,"angleColor",15208787),showBroadphase:d(n,"showBroadphase",!1),broadphaseColor:d(n,"broadphaseColor",16757760),showBounds:d(n,"showBounds",!1),boundsColor:d(n,"boundsColor",16777215),showVelocity:d(n,"showVelocity",!1),velocityColor:d(n,"velocityColor",44783),showCollisions:d(n,"showCollisions",!1),collisionColor:d(n,"collisionColor",16094476),showSeparations:d(n,"showSeparations",!1),separationColor:d(n,"separationColor",16753920),showBody:d(n,"showBody",!0),showStaticBody:d(n,"showStaticBody",!0),showInternalEdges:d(n,"showInternalEdges",!1),renderFill:d(n,"renderFill",!1),renderLine:d(n,"renderLine",!0),fillColor:d(n,"fillColor",1075465),fillOpacity:d(n,"fillOpacity",1),lineColor:d(n,"lineColor",2678297),lineOpacity:d(n,"lineOpacity",1),lineThickness:d(n,"lineThickness",1),staticFillColor:d(n,"staticFillColor",857979),staticLineColor:d(n,"staticLineColor",1255396),showSleeping:d(n,"showSleeping",!1),staticBodySleepOpacity:d(n,"staticBodySleepOpacity",.7),sleepFillColor:d(n,"sleepFillColor",4605510),sleepLineColor:d(n,"sleepLineColor",10066585),showSensors:d(n,"showSensors",!0),sensorFillColor:d(n,"sensorFillColor",857979),sensorLineColor:d(n,"sensorLineColor",1255396),showPositions:d(n,"showPositions",!0),positionSize:d(n,"positionSize",4),positionColor:d(n,"positionColor",14697178),showJoint:d(n,"showJoint",!0),jointColor:d(n,"jointColor",14737474),jointLineOpacity:d(n,"jointLineOpacity",1),jointLineThickness:d(n,"jointLineThickness",2),pinSize:d(n,"pinSize",4),pinColor:d(n,"pinColor",4382944),springColor:d(n,"springColor",14697184),anchorColor:d(n,"anchorColor",15724527),anchorSize:d(n,"anchorSize",4),showConvexHulls:d(n,"showConvexHulls",!1),hullColor:d(n,"hullColor",14091216)},this.drawDebug&&this.createDebugGraphic(),this.setEventsProxy(),d(e,"setBounds",!1)&&("boolean"==typeof(r=e.setBounds)?this.setBounds():(i=d(r,"x",0),s=d(r,"y",0),o=d(r,"width",t.sys.scale.width),a=d(r,"height",t.sys.scale.height),n=d(r,"thickness",64),e=d(r,"left",!0),t=d(r,"right",!0),h=d(r,"top",!0),r=d(r,"bottom",!0),this.setBounds(i,s,o,a,n,e,t,h,r)))},setCompositeRenderStyle:function(t){for(var e,i,n=t.bodies,r=t.constraints,s=t.composites,o=0;o<n.length;o++)i=(e=n[o]).render,this.setBodyRenderStyle(e,i.lineColor,i.lineOpacity,i.lineThickness,i.fillColor,i.fillOpacity);for(o=0;o<r.length;o++)i=(e=r[o]).render,this.setConstraintRenderStyle(e,i.lineColor,i.lineOpacity,i.lineThickness,i.pinSize,i.anchorColor,i.anchorSize);for(o=0;o<s.length;o++)e=s[o],this.setCompositeRenderStyle(e);return this},setBodyRenderStyle:function(t,e,i,n,r,s){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==r&&(r=t.isStatic?a.staticFillColor:a.fillColor),null==s&&(s=a.fillOpacity),!1!==e&&(o.lineColor=e),!1!==i&&(o.lineOpacity=i),!1!==n&&(o.lineThickness=n),!1!==r&&(o.fillColor=r),!1!==s&&(o.fillOpacity=s)),this},setConstraintRenderStyle:function(t,e,i,n,r,s,o){var a,t=t.render,h=this.debugConfig;return t&&(null==e&&("line"===(a=t.type)?e=h.jointColor:"pin"===a?e=h.pinColor:"spring"===a&&(e=h.springColor)),null==i&&(i=h.jointLineOpacity),null==n&&(n=h.jointLineThickness),null==r&&(r=h.pinSize),null==s&&(s=h.anchorColor),null==o&&(o=h.anchorSize),!1!==e&&(t.lineColor=e),!1!==i&&(t.lineOpacity=i),!1!==n&&(t.lineThickness=n),!1!==r&&(t.pinSize=r),!1!==s&&(t.anchorColor=s),!1!==o&&(t.anchorSize=o)),this},setEventsProxy:function(){var s=this,t=this.engine,e=this.localWorld;this.drawDebug&&(h.on(e,"compositeModified",function(t){s.setCompositeRenderStyle(t)}),h.on(e,"beforeAdd",function(t){for(var e=[].concat(t.object),i=0;i<e.length;i++){var n=e[i],r=n.render;"body"===n.type?s.setBodyRenderStyle(n,r.lineColor,r.lineOpacity,r.lineThickness,r.fillColor,r.fillOpacity):"composite"===n.type?s.setCompositeRenderStyle(n):"constraint"===n.type&&s.setConstraintRenderStyle(n,r.lineColor,r.lineOpacity,r.lineThickness,r.pinSize,r.anchorColor,r.anchorSize)}})),h.on(e,"beforeAdd",function(t){s.emit(o.BEFORE_ADD,t)}),h.on(e,"afterAdd",function(t){s.emit(o.AFTER_ADD,t)}),h.on(e,"beforeRemove",function(t){s.emit(o.BEFORE_REMOVE,t)}),h.on(e,"afterRemove",function(t){s.emit(o.AFTER_REMOVE,t)}),h.on(t,"beforeUpdate",function(t){s.emit(o.BEFORE_UPDATE,t)}),h.on(t,"afterUpdate",function(t){s.emit(o.AFTER_UPDATE,t)}),h.on(t,"collisionStart",function(t){var e,i,n=t.pairs;0<n.length&&(e=n[0].bodyA,i=n[0].bodyB),s.emit(o.COLLISION_START,t,e,i)}),h.on(t,"collisionActive",function(t){var e,i,n=t.pairs;0<n.length&&(e=n[0].bodyA,i=n[0].bodyB),s.emit(o.COLLISION_ACTIVE,t,e,i)}),h.on(t,"collisionEnd",function(t){var e,i,n=t.pairs;0<n.length&&(e=n[0].bodyA,i=n[0].bodyB),s.emit(o.COLLISION_END,t,e,i)})},setBounds:function(t,e,i,n,r,s,o,a,h){return void 0===i&&(i=this.scene.sys.scale.width),void 0===n&&(n=this.scene.sys.scale.height),void 0===o&&(o=!0),void 0===a&&(a=!0),void 0===h&&(h=!0),this.updateWall(s=void 0===s?!0:s,"left",(t=void 0===t?0:t)-(r=void 0===r?64:r),(e=void 0===e?0:e)-r,r,n+2*r),this.updateWall(o,"right",t+i,e-r,r,n+2*r),this.updateWall(a,"top",t,e-r,i,r),this.updateWall(h,"bottom",t,e+n,i,r),this},updateWall:function(t,e,i,n,r,s){var o=this.walls[e];t?(o&&g.remove(this.localWorld,o),this.walls[e]=this.create(i+=r/2,n+=s/2,r,s,{isStatic:!0,friction:0,frictionStatic:0})):(o&&g.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===e&&(e=1),this.localWorld.gravity.x=t=void 0===t?0:t,this.localWorld.gravity.y=e,void 0!==i&&(this.localWorld.gravity.scale=i),this},create:function(t,e,i,n,r){t=s.rectangle(t,e,i,n,r);return g.add(this.localWorld,t),t},add:function(t){return g.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],n=n.body||n;l.remove(this.localWorld,n,e)}return this},removeConstraint:function(t,e){return l.remove(this.localWorld,t,e),this},convertTilemapLayer:function(t,e){var i=t.layer,t=t.getTilesWithin(0,0,i.width,i.height,{isColliding:!0});return this.convertTiles(t,e),this},convertTiles:function(t,e){if(0!==t.length)for(var i=0;i<t.length;i++)new f(this,t[i],e);return this},nextGroup:function(t){return a.nextGroup(t)},nextCategory:function(){return a.nextCategory()},pause:function(){return this.enabled=!1,this.emit(o.PAUSE),this},resume:function(){return this.enabled=!0,this.emit(o.RESUME),this},update:function(t,e){var i,n,r,s;this.enabled&&this.autoUpdate&&(i=this.engine,n=this.runner,r=i.timing,s=this.correction,n.isFixed?e=this.getDelta(t,e):(e=t-n.timePrev||n.delta,n.timePrev=t,n.deltaHistory.push(e),n.deltaHistory=n.deltaHistory.slice(-n.deltaSampleSize),s=(e=(e=(e=Math.min.apply(null,n.deltaHistory))<n.deltaMin?n.deltaMin:e)>n.deltaMax?n.deltaMax:e)/n.delta,n.delta=e),0!==n.timeScalePrev&&(s*=r.timeScale/n.timeScalePrev),0===r.timeScale&&(s=0),n.timeScalePrev=r.timeScale,n.correction=s,n.frameCounter+=1,1e3<=t-n.counterTimestamp&&(n.fps=n.frameCounter*((t-n.counterTimestamp)/1e3),n.counterTimestamp=t,n.frameCounter=0),c.update(i,e,s))},step:function(t,e){c.update(this.engine,t,e)},update60Hz:function(){return 1e3/60},update30Hz:function(){return 1e3/30},has:function(t){t=t.hasOwnProperty("body")?t.body:t;return null!==l.get(this.localWorld,t.id,t.type)},getAllBodies:function(){return l.allBodies(this.localWorld)},getAllConstraints:function(){return l.allConstraints(this.localWorld)},getAllComposites:function(){return l.allComposites(this.localWorld)},postUpdate:function(){var t,e,i,n;this.drawDebug&&(t=this.debugConfig,e=this.engine,i=this.debugGraphic,n=l.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 r=m.keys(t.buckets),s=0;s<r.length;s++){var o=r[s];t.buckets[o].length<2||(o=o.split(/C|R/),e.strokeRect(parseInt(o[1],10)*t.bucketWidth,parseInt(o[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 r,s,o,a,h,l=t[n];l.isActive&&(r=(l=l.collision).bodyA,s=l.bodyB,o=r.position,a=s.position,l=l.penetration,h=r.isStatic||s.isStatic?1:4,s.isStatic&&(h=0),e.lineBetween(a.x,a.y,a.x-l.x*h,a.y-l.y*h),h=r.isStatic||s.isStatic?1:4,r.isStatic&&(h=0),e.lineBetween(o.x,o.y,o.x-l.x*h,o.y-l.y*h))}return this},renderCollisions:function(t,e,i){var n,r,s,o,a,h;for(e.lineStyle(1,i,.5),e.fillStyle(i,1),n=0;n<t.length;n++)if((r=t[n]).isActive)for(var l=0;l<r.activeContacts.length;l++){var c=r.activeContacts[l].vertex;e.fillRect(c.x-2,c.y-2,5,5)}for(n=0;n<t.length;n++)(r=t[n]).isActive&&(s=r.collision,0<(o=r.activeContacts).length&&(a=o[0].vertex.x,h=o[0].vertex.y,2===o.length&&(a=(o[0].vertex.x+o[1].vertex.x)/2,h=(o[0].vertex.y+o[1].vertex.y)/2),s.bodyB===s.supports[0].body||s.bodyA.isStatic?e.lineBetween(a-8*s.normal.x,h-8*s.normal.y,a,h):e.lineBetween(a+8*s.normal.x,h+8*s.normal.y,a,h)));return this},renderBodyBounds:function(t,e,i,n){e.lineStyle(1,i,n);for(var r=0;r<t.length;r++){var s=t[r];if(s.render.visible){var o=s.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=s.parts,h=1<a.length?1:0;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,r){e.lineStyle(1,n,r);for(var s=0;s<t.length;s++){var o,a,h,l=t[s],c=l.parts;if(l.render.visible)if(i)for(a=1<c.length?1:0;a<c.length;a++)for(o=c[a],h=0;h<o.axes.length;h++){var u=o.axes[h];e.lineBetween(o.position.x,o.position.y,o.position.x+20*u.x,o.position.y+20*u.y)}else for(a=1<c.length?1:0;a<c.length;a++)for(o=c[a],h=0;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,r){e.lineStyle(r,i,n);for(var s=0;s<t.length;s++){var o=t[s];o.render.visible&&e.lineBetween(o.position.x,o.position.y,o.position.x+2*(o.position.x-o.positionPrev.x),o.position.y+2*(o.position.y-o.positionPrev.y))}return this},renderBodies:function(t){for(var e=this.debugGraphic,i=this.debugConfig,n=i.showBody,r=i.showStaticBody,s=i.showSleeping,o=i.showInternalEdges,a=i.showConvexHulls,h=i.renderFill,l=i.renderLine,c=i.staticBodySleepOpacity,u=i.sleepFillColor,d=i.sleepLineColor,p=i.hullColor,f=0;f<t.length;f++){var g,m,y,v,x,b=t[f];!b.render.visible||!r&&b.isStatic||!n&&!b.isStatic||(x=b.render.lineColor,g=b.render.lineOpacity,m=b.render.lineThickness,y=b.render.fillColor,v=b.render.fillOpacity,s&&b.isSleeping&&(b.isStatic?(g*=c,v*=c):(x=d,y=u)),this.renderBody(b,e,o,x=l?x:null,g,m,y=h?y:null,v),x=b.parts.length,a&&1<x&&this.renderConvexHull(b,e,p,m))}},renderBody:function(t,e,i,n,r,s,o,a){void 0===n&&(n=null),void 0===r&&(r=null),void 0===s&&(s=1),void 0===o&&(o=null),void 0===a&&(a=null);for(var h,l,c=this.debugConfig,u=c.sensorFillColor,d=c.sensorLineColor,p=t.parts,f=p.length,g=1<f?1:0;g<f;g++){var m=p[g],y=m.render,v=y.opacity;if(y.visible&&0!==v&&(!m.isSensor||c.showSensors)){y=m.circleRadius;if(e.beginPath(),m.isSensor?(null!==o&&e.fillStyle(u,a*v),null!==n&&e.lineStyle(s,d,r*v)):(null!==o&&e.fillStyle(o,a*v),null!==n&&e.lineStyle(s,n,r*v)),y)e.arc(m.position.x,m.position.y,y,0,2*Math.PI);else{var x=m.vertices,b=x.length;e.moveTo(x[0].x,x[0].y);for(var w=1;w<b;w++){var T=x[w];!x[w-1].isInternal||i?e.lineTo(T.x,T.y):e.moveTo(T.x,T.y),w<b&&T.isInternal&&!i&&e.moveTo(x[T=(w+1)%b].x,x[T].y)}e.closePath()}null!==o&&e.fillPath(),null!==n&&e.strokePath()}}return c.showPositions&&!t.isStatic&&(h=t.position.x,t=t.position.y,l=Math.ceil(c.positionSize/2),e.fillStyle(c.positionColor,1),e.fillRect(h-l,t-l,c.positionSize,c.positionSize)),this},renderConvexHull:function(t,e,i,n){if(void 0===n&&(n=1),1<t.parts.length){var r=t.vertices;e.lineStyle(n,i),e.beginPath(),e.moveTo(r[0].x,r[0].y);for(var s=1;s<r.length;s++)e.lineTo(r[s].x,r[s].y);e.lineTo(r[0].x,r[0].y),e.strokePath()}return this},renderJoints:function(){for(var t=this.debugGraphic,e=l.allConstraints(this.localWorld),i=0;i<e.length;i++){var n=e[i].render,r=n.lineColor,s=n.lineOpacity,o=n.lineThickness,a=n.pinSize,h=n.anchorColor,n=n.anchorSize;this.renderConstraint(e[i],t,r,s,o,a,h,n)}},renderConstraint:function(t,e,i,n,r,s,o,a){var h=t.render;if(h.visible&&t.pointA&&t.pointB){e.lineStyle(r,i,n);var l,r=t.bodyA,i=t.bodyB,c=r?y.add(r.position,t.pointA):t.pointA;if("pin"===h.type)e.strokeCircle(c.x,c.y,s);else{if(l=i?y.add(i.position,t.pointB):t.pointB,e.beginPath(),e.moveTo(c.x,c.y),"spring"===h.type)for(var u,d=y.sub(l,c),p=y.perp(y.normalise(d)),f=Math.ceil(m.clamp(t.length/5,12,20)),g=1;g<f;g+=1)e.lineTo(c.x+d.x*(g/f)+p.x*(u=g%2==0?1:-1)*4,c.y+d.y*(g/f)+p.y*u*4);e.lineTo(l.x,l.y)}e.strokePath(),h.anchors&&0<a&&(e.fillStyle(o),e.fillCircle(c.x,c.y,a),e.fillCircle(l.x,l.y,a))}return this},resetCollisionIDs:function(){return n._nextCollidingGroupId=1,n._nextNonCollidingGroupId=-1,n._nextCategory=1,this},shutdown:function(){h.off(this.engine),this.removeAllListeners(),g.clear(this.localWorld,!1),c.clear(this.engine),this.drawDebug&&this.debugGraphic.destroy()},destroy:function(){this.shutdown()}});t.exports=i},function(t,e,i){t.exports={BasePlugin:i(540),DefaultPlugins:i(197),PluginCache:i(24),PluginManager:i(414),ScenePlugin:i(1404)}},function(t,e,i){var n=i(540),r=i(0),s=i(20),i=new r({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(s.BOOT,this.boot,this)},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=i},function(t,e,i){t.exports={Canvas:i(1406),Events:i(91),Snapshot:i(1407),WebGL:i(1408)}},function(t,e,i){t.exports={CanvasRenderer:i(368),GetBlendModes:i(370),SetTransform:i(30)}},function(t,e,i){t.exports={Canvas:i(369),WebGL:i(383)}},function(t,e,i){var n=i(107),i=i(17)(!1,{PipelineManager:i(372),Pipelines:i(1409),RenderTarget:i(141),Utils:i(12),WebGLPipeline:i(58),WebGLRenderer:i(371),WebGLShader:i(375)},n);t.exports=i},function(t,e,i){var n=i(92),i=i(17)(!1,{BitmapMaskPipeline:i(373),Events:i(374),GraphicsPipeline:i(376),LightPipeline:i(377),MultiPipeline:i(108),PointLightPipeline:i(378),PostFXPipeline:i(1410),RopePipeline:i(379),SinglePipeline:i(380),UtilityPipeline:i(381)},n);t.exports=i},function(t,e,i){var n=i(0),r=i(198),s=i(2),o=i(1411),a=i(382),h=i(58),i=new n({Extends:h,initialize:function(t){t.renderTarget=s(t,"renderTarget",1),t.fragShader=s(t,"fragShader",o),t.vertShader=s(t,"vertShader",a),t.attributes=s(t,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),t.batchSize=1,t.vertices=[-1,-1,0,0,-1,1,0,1,1,1,1,1,-1,-1,0,0,1,1,1,1,1,-1,1,0],h.call(this,t),this.isPostFX=!0,this.gameObject,this.colorMatrix=new r,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2,this.renderer.isBooted&&(this.manager=this.renderer.pipelines,this.boot())},boot:function(){h.prototype.boot.call(this);var t=this.manager.UTILITY_PIPELINE;this.fullFrame1=t.fullFrame1,this.fullFrame2=t.fullFrame2,this.halfFrame1=t.halfFrame1,this.halfFrame2=t.halfFrame2,this.set1i("uMainSampler",0)},onDraw:function(t){this.bindAndDraw(t)},copyFrame:function(t,e,i,n,r){this.manager.copyFrame(t,e,i,n,r)},copyToGame:function(t){this.manager.copyToGame(t)},drawFrame:function(t,e,i){this.manager.drawFrame(t,e,i,this.colorMatrix)},blendFrames:function(t,e,i,n,r){this.manager.blendFrames(t,e,i,n,r)},blendFramesAdditive:function(t,e,i,n,r){this.manager.blendFramesAdditive(t,e,i,n,r)},clearFrame:function(t,e){this.manager.clearFrame(t,e)},blitFrame:function(t,e,i,n,r,s){this.manager.blitFrame(t,e,i,n,r,s)},copyFrameRect:function(t,e,i,n,r,s,o,a){this.manager.copyFrameRect(t,e,i,n,r,s,o,a)},bindAndDraw:function(t,e,i,n,r){void 0===i&&(i=!0),void 0===n&&(n=!0);var s=this.gl,o=this.renderer;this.bind(r),this.set1i("uMainSampler",0),e?(s.viewport(0,0,e.width,e.height),s.bindFramebuffer(s.FRAMEBUFFER,e.framebuffer),s.framebufferTexture2D(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,e.texture,0),i&&(n?s.clearColor(0,0,0,0):s.clearColor(0,0,0,1),s.clear(s.COLOR_BUFFER_BIT))):(o.popFramebuffer(!1,!1,!1),o.currentFramebuffer||s.viewport(0,0,o.width,o.height)),s.activeTexture(s.TEXTURE0),s.bindTexture(s.TEXTURE_2D,t.texture),s.bufferData(s.ARRAY_BUFFER,this.vertexData,s.STATIC_DRAW),s.drawArrays(s.TRIANGLES,0,6),e?(s.bindTexture(s.TEXTURE_2D,null),s.bindFramebuffer(s.FRAMEBUFFER,null)):o.resetTextures()}});t.exports=i},function(t,e){t.exports=["#define SHADER_NAME PHASER_POSTFX_FS","","precision mediump float;","","uniform sampler2D uMainSampler;","","varying vec2 outTexCoord;","","void main ()","{"," gl_FragColor = texture2D(uMainSampler, outTexCoord);","}",""].join("\n")},function(t,e,i){var n=i(17),r=i(201),i=n(!1,{Center:i(403),Events:i(104),Orientation:i(404),ScaleManager:i(415),ScaleModes:i(405),Zoom:i(406)},r.CENTER),i=n(!1,i,r.ORIENTATION);i=n(!1,i,r.SCALE_MODE),i=n(!1,i,r.ZOOM),t.exports=i},function(t,e,i){var n=i(144),i=i(17)(!1,{Events:i(20),GetPhysicsPlugins:i(419),GetScenePlugins:i(420),SceneManager:i(417),ScenePlugin:i(1414),Settings:i(421),Systems:i(204)},n);t.exports=i},function(t,e,i){var n=i(18),r=i(0),o=i(20),a=i(2),i=i(24),r=new r({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(o.BOOT,this.boot,this),t.sys.events.on(o.START,this.pluginStart,this)},boot:function(){this.systems.events.once(o.DESTROY,this.destroy,this)},pluginStart:function(){this._target=null,this.systems.events.once(o.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){var e,i,n,r=a(t=void 0===t?{}:t,"target",!1),s=this.manager.getScene(r);return!(!r||!this.checkValidTransition(s))&&(e=a(t,"duration",1e3),this._elapsed=0,this._target=s,this._duration=e,this._willSleep=a(t,"sleep",!1),this._willRemove=a(t,"remove",!1),(i=a(t,"onUpdate",null))&&(this._onUpdate=i,this._onUpdateScope=a(t,"onUpdateScope",this.scene)),i=a(t,"allowInput",!1),this.settings.transitionAllowInput=i,(n=s.sys.settings).isTransition=!0,n.transitionFrom=this.scene,n.transitionDuration=e,n.transitionAllowInput=i,a(t,"moveAbove",!1)?this.manager.moveAbove(this.key,r):a(t,"moveBelow",!1)&&this.manager.moveBelow(this.key,r),s.sys.isSleeping()?s.sys.wake(a(t,"data")):this.manager.start(r,a(t,"data")),this.systems.events.emit(o.TRANSITION_OUT,s,e),this.systems.events.on(o.UPDATE,this.step,this),!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;this.systems.events.off(o.UPDATE,this.step,this),t.events.emit(o.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){return t!==this.key&&this.manager.queueOp("switch",this.key,t),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);e=this.manager.getScene(e);return e&&e.sys.setActive(t,i),this},setVisible:function(t,e){void 0===e&&(e=this.key);e=this.manager.getScene(e);return e&&e.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 t!==(e=void 0===e?this.key:e)&&this.manager.swapPosition(t,e),this},moveAbove:function(t,e){return t!==(e=void 0===e?this.key:e)&&this.manager.moveAbove(t,e),this},moveBelow:function(t,e){return t!==(e=void 0===e?this.key: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)},getIndex:function(t){return void 0===t&&(t=this.key),this.manager.getIndex(t)},shutdown:function(){var t=this.systems.events;t.off(o.SHUTDOWN,this.shutdown,this),t.off(o.POST_UPDATE,this.step,this),t.off(o.TRANSITION_OUT)},destroy:function(){this.shutdown(),this.scene.sys.events.off(o.START,this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});i.register("ScenePlugin",r,"scenePlugin"),t.exports=r},function(t,e,i){t.exports={Events:i(438),List:i(110),Map:i(102),ProcessQueue:i(211),RTree:i(531),Set:i(149),Size:i(416)}},function(t,e,i){var n=i(17),r=i(1417),n=n(!1,{CanvasTexture:i(423),Events:i(106),FilterMode:r,Frame:i(109),Parsers:i(425),Texture:i(206),TextureManager:i(422),TextureSource:i(424)},r);t.exports=n},function(t,e){t.exports={LINEAR:0,NEAREST:1}},function(t,e,i){var n=i(17),r=i(1419),n=n(!1,{Components:i(251),Parsers:i(1452),Formats:i(40),ImageCollection:i(576),ParseToTilemap:i(262),Tile:i(85),Tilemap:i(580),TilemapCreator:i(1459),TilemapFactory:i(1460),Tileset:i(122),TilemapLayer:i(581),Orientation:i(29),LayerData:i(120),MapData:i(121),ObjectLayer:i(572)},r.ORIENTATION);t.exports=n},function(t,e,i){i={ORIENTATION:i(29)};t.exports=i},function(t,e,i){var f=i(26),g=i(63);t.exports=function(t,e,i,n,r,s,o,a){void 0===o&&(o=!0);for(var h=f(t=t<0?0:t,e=e<0?0:e,i,n,null,a),l=r-t,c=s-e,u=0;u<h.length;u++){var d=h[u].x+l,p=h[u].y+c;0<=d&&d<a.width&&0<=p&&p<a.height&&a.data[p][d]&&a.data[p][d].copy(h[u])}o&&g(r-1,s-1,i+2,n+2,a)}},function(t,e,i){var u=i(26),d=i(542);t.exports=function(t,e,i,n,r,s){i=i||{},Array.isArray(t)||(t=[t]);var o=s.tilemapLayer;n=n||o.scene,r=r||n.cameras.main;for(var a=u(0,0,s.width,s.height,null,s),h=[],l=0;l<a.length;l++){var c=a[l];-1!==t.indexOf(c.index)&&(c=o.tileToWorldXY(c.x,c.y,void 0,r,s),i.x=c.x,i.y=c.y,h.push(n.make.sprite(i)))}if("number"==typeof e)for(l=0;l<t.length;l++)d(t[l],e,0,0,s.width,s.height,s);else if(Array.isArray(e))for(l=0;l<t.length;l++)d(t[l],e[l],0,0,s.width,s.height,s);return h}},function(t,e,i){var c=i(26),u=i(63),d=i(72);t.exports=function(t,e,i,n,r,s,o){for(var a=-1!==o.collideIndexes.indexOf(t),h=c(e,i,n,r,null,o),l=0;l<h.length;l++)h[l].index=t,d(h[l],a);s&&u(e-1,i-1,n+2,r+2,o)}},function(t,e,i){var h=i(26);t.exports=function(t,e,i,n,r,s,o,a){return h(i,n,r,s,o,a).filter(t,e)}},function(t,e){t.exports=function(t,e,i,n){void 0===e&&(e=0);var r,s,o,a=0;if(i=void 0===i?!1:i){for(s=n.height-1;0<=s;s--)for(r=n.width-1;0<=r;r--)if((o=n.data[s][r])&&o.index===t){if(a===e)return o;a+=1}}else for(s=0;s<n.height;s++)for(r=0;r<n.width;r++)if((o=n.data[s][r])&&o.index===t){if(a===e)return o;a+=1}return null}},function(t,e,i){var h=i(26);t.exports=function(t,e,i,n,r,s,o,a){return h(i,n,r,s,o,a).find(t,e)||null}},function(t,e,i){var h=i(26);t.exports=function(t,e,i,n,r,s,o,a){h(i,n,r,s,o,a).forEach(t,e)}},function(t,e,i){var n=i(29),r=i(544),s=i(545),o=i(547),a=i(1),h=i(548);t.exports=function(t){return t===n.ORTHOGONAL?r:t===n.HEXAGONAL?s:t===n.STAGGERED?h:t===n.ISOMETRIC?o:a}},function(t,e,i){var s=i(158),o=new(i(3));t.exports=function(t,e,i,n,r){return r.tilemapLayer.worldToTileXY(t,e,!0,o,n),s(o.x,o.y,i,r)}},function(t,e,i){function f(t,e){return y.RectangleToTriangle(e,t)}var g=i(483),m=i(26),y=i(484),v=i(1),i=i(3),x=new i,b=new i,w=new i;t.exports=function(t,e,i,n){if(void 0===t)return[];var r=v,s=(t instanceof g.Circle?r=y.CircleToRectangle:t instanceof g.Rectangle?r=y.RectangleToRectangle:t instanceof g.Triangle?r=f:t instanceof g.Line&&(r=y.LineToRectangle),n.tilemapLayer.worldToTileXY(t.left,t.top,!0,b,i),b.x),o=b.y,a=(n.tilemapLayer.worldToTileXY(t.right,t.bottom,!0,w,i),Math.ceil(w.x)),h=Math.ceil(w.y),a=Math.max(a-s,1),h=Math.max(h-o,1),l=m(s,o,a,h,e,n),s=n.tileWidth,o=n.tileHeight;n.tilemapLayer&&(s*=n.tilemapLayer.scaleX,o*=n.tilemapLayer.scaleY);for(var c=[],u=new g.Rectangle(0,0,s,o),d=0;d<l.length;d++){var p=l[d];n.tilemapLayer.tileToWorldXY(p.x,p.y,x,i),u.x=x.x,u.y=x.y,r(t,u)&&c.push(p)}return c}},function(t,e,i){var n=i(29),r=i(1),s=i(253);t.exports=function(t){return t===n.ORTHOGONAL?s:r}},function(t,e,i){var n=i(29),r=i(550),s=i(551),o=i(1),a=i(552),h=i(553);t.exports=function(t){return t===n.ORTHOGONAL?h:t===n.ISOMETRIC?s:t===n.HEXAGONAL?r:t===n.STAGGERED?a:o}},function(t,e,i){var n=i(29),r=i(554),s=i(1),o=i(555),a=i(254);t.exports=function(t){return t===n.ORTHOGONAL?a:t===n.HEXAGONAL?r:t===n.STAGGERED?o:s}},function(t,e,i){var n=i(29),r=i(1),s=i(255);t.exports=function(t){return t===n.ORTHOGONAL?s:r}},function(t,e,i){var n=i(29),r=i(556),s=i(557),o=i(1),a=i(558),h=i(559);t.exports=function(t){return t===n.ORTHOGONAL?h:t===n.ISOMETRIC?s:t===n.HEXAGONAL?r:t===n.STAGGERED?a:o}},function(t,e,i){var n=i(29),r=i(560),s=i(1),o=i(561),a=i(256);t.exports=function(t){return t===n.ORTHOGONAL?a:t===n.HEXAGONAL?r:t===n.STAGGERED?o:s}},function(t,e,i){var r=i(562),s=new(i(3));t.exports=function(t,e,i,n){n.tilemapLayer.worldToTileXY(t,e,!0,s,i);t=s.x,e=s.y;return r(t,e,n)}},function(t,e,i){var o=i(257),a=new(i(3));t.exports=function(t,e,i,n,r,s){return s.tilemapLayer.worldToTileXY(e,i,!0,a,r,s),o(t,a.x,a.y,n,s)}},function(t,e,i){var c=i(63),u=i(257);t.exports=function(t,e,i,n,r){if(void 0===n&&(n=!0),!Array.isArray(t))return null;for(var s=(t=Array.isArray(t[0])?t:[t]).length,o=t[0].length,a=0;a<s;a++)for(var h=0;h<o;h++){var l=t[a][h];u(l,e+h,i+a,!1,r)}n&&c(e-1,i-1,o+2,s+2,r)}},function(t,e,i){var h=i(26),l=i(210);t.exports=function(t,e,i,n,r,s){var o,a=h(t,e,i,n,{},s);if(!r)for(r=[],o=0;o<a.length;o++)-1===r.indexOf(a[o].index)&&r.push(a[o].index);for(o=0;o<a.length;o++)a[o].index=l(r)}},function(t,e,i){var o=i(563),a=new(i(3));t.exports=function(t,e,i,n,r,s){return s.tilemapLayer.worldToTileXY(t,e,!0,a,r,s),o(a.x,a.y,i,n,s)}},function(t,e,i){var f=i(26),i=i(397),g=new i(105,210,231,150),m=new i(243,134,48,200),y=new i(40,39,37,150);t.exports=function(t,e,i){var n=void 0!==(e=void 0===e?{}:e).tileColor?e.tileColor:g,r=void 0!==e.collidingTileColor?e.collidingTileColor:m,s=void 0!==e.faceColor?e.faceColor:y,o=f(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 a=0;a<o.length;a++){var h=o[a],l=h.width,c=h.height,u=h.pixelX,d=h.pixelY,p=h.collides?r:n;null!==p&&(t.fillStyle(p.color,p.alpha/255),t.fillRect(u,d,l,c)),u+=1,d+=1,l-=2,c-=2,null!==s&&(t.lineStyle(1,s.color,s.alpha/255),h.faceTop&&t.lineBetween(u,d,u+l,d),h.faceRight&&t.lineBetween(u+l,d,u+l,d+c),h.faceBottom&&t.lineBetween(u,d+c,u+l,d+c),h.faceLeft&&t.lineBetween(u,d,u,d+c))}}},function(t,e,i){var l=i(72),c=i(63),u=i(160);t.exports=function(t,e,i,n,r){void 0===e&&(e=!0),void 0===i&&(i=!0),void 0===r&&(r=!0),Array.isArray(t)||(t=[t]);for(var s=0;s<t.length;s++)u(t[s],e,n);if(r)for(var o=0;o<n.height;o++)for(var a=0;a<n.width;a++){var h=n.data[o][a];h&&-1!==t.indexOf(h.index)&&l(h,e)}i&&c(0,0,n.width,n.height,n)}},function(t,e,i){var c=i(72),u=i(63),d=i(160);t.exports=function(t,e,i,n,r,s){if(void 0===i&&(i=!0),void 0===n&&(n=!0),void 0===s&&(s=!0),!(e<t)){for(var o=t;o<=e;o++)d(o,i,r);if(s)for(var a=0;a<r.height;a++)for(var h=0;h<r.width;h++){var l=r.data[a][h];l&&l.index>=t&&l.index<=e&&c(l,i)}n&&u(0,0,r.width,r.height,r)}}},function(t,e,i){var a=i(72),h=i(63),l=i(160);t.exports=function(t,e,i,n){void 0===e&&(e=!0),void 0===i&&(i=!0),Array.isArray(t)||(t=[t]);for(var r=0;r<n.height;r++)for(var s=0;s<n.width;s++){var o=n.data[r][s];o&&-1===t.indexOf(o.index)&&(a(o,e),l(o.index,e,n))}i&&h(0,0,n.width,n.height,n)}},function(t,e,i){var c=i(72),u=i(63),d=i(126);t.exports=function(t,e,i,n){void 0===e&&(e=!0),void 0===i&&(i=!0);for(var r=0;r<n.height;r++)for(var s=0;s<n.width;s++){var o=n.data[r][s];if(o)for(var a in t)if(d(o.properties,a)){var h=t[a];Array.isArray(h)||(h=[h]);for(var l=0;l<h.length;l++)o.properties[a]===h[l]&&c(o,e)}}i&&u(0,0,n.width,n.height,n)}},function(t,e,i){var a=i(72),h=i(63);t.exports=function(t,e,i){void 0===t&&(t=!0),void 0===e&&(e=!0);for(var n=0;n<i.height;n++)for(var r=0;r<i.width;r++){var s,o=i.data[n][r];o&&(s=o.getCollisionGroup())&&s.objects&&0<s.objects.length&&a(o,t)}e&&h(0,0,i.width,i.height,i)}},function(t,e){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 r=0,s=t.length;r<s;r++)n.callbacks[t[r]]=null!==e?{callback:e,callbackContext:i}:void 0}},function(t,e,i){var l=i(26);t.exports=function(t,e,i,n,r,s,o){for(var a=l(t,e,i,n,null,o),h=0;h<a.length;h++)a[h].setCollisionCallback(r,s)}},function(t,e,i){var h=i(26),l=i(131);t.exports=function(t,e,i,n,r){var s=h(t,e,i,n,null,r),o=s.map(function(t){return t.index});l(o);for(var a=0;a<s.length;a++)s[a].index=o[a]}},function(t,e,i){var l=i(26);t.exports=function(t,e,i,n,r,s,o){for(var a=l(i,n,r,s,null,o),h=0;h<a.length;h++)a[h]&&(a[h].index===t?a[h].index=e:a[h].index===e&&(a[h].index=t))}},function(t,e,i){var f=i(26);t.exports=function(t,e,i,n,r,s){if(r){for(var o=f(t,e,i,n,null,s),a=0,h=0;h<r.length;h++)a+=r[h].weight;if(!(a<=0))for(h=0;h<o.length;h++){for(var l=Math.random()*a,c=0,u=-1,d=0;d<r.length;d++)if(l<=(c+=r[d].weight)){var p=r[d].index,u=Array.isArray(p)?p[Math.floor(Math.random()*p.length)]:p;break}o[h].index=u}}}},function(t,e,i){t.exports={FromOrientationString:i(258),Parse:i(564),Parse2DArray:i(259),ParseCSV:i(565),Impact:i(1454),Tiled:i(1455)}},function(t,e){t.exports=function(t,e){for(var i=0;i<t.length;i++){var n=t[i],r=i;if(n.name&&""!==n.name&&(r=n.name),Array.isArray(n.wangtiles)&&0<n.wangtiles.length){var s,o,a,h={},l={};if(Array.isArray(n.edgecolors))for(s=0;s<n.edgecolors.length;s++)a=1+s,""!==(o=n.edgecolors[s]).name&&(h[a]=o.name);if(Array.isArray(n.cornercolors))for(s=0;s<n.cornercolors.length;s++)a=1+s,""!==(o=n.cornercolors[s]).name&&(l[a]=o.name);if(Array.isArray(n.colors))for(s=0;s<n.colors.length;s++)a=1+s,""!==(o=n.colors[s]).name&&(h[a]=l[a]=o.name);for(var c=[h,l,h,l,h,l,h,l],u=0;u<n.wangtiles.length;u++){for(var d,p=n.wangtiles[u],f=(f=e[p.tileid]||(e[p.tileid]={})).wangid||(f.wangid={}),g=[],m=0;m<Math.min(c.length,p.wangid.length);m++)0!==(o=p.wangid[m])?void 0===(d=c[m][o])?g.push(o):g.push(d):g.push(void 0);f[r]=g}}}}},function(t,e,i){t.exports={ParseTileLayers:i(578),ParseTilesets:i(579),ParseWeltmeister:i(577)}},function(t,e,i){t.exports={AssignTileProperties:i(567),Base64Decode:i(574),BuildTilesetIndex:i(568),CreateGroupLayer:i(161),ParseGID:i(261),ParseImageLayers:i(569),ParseJSONTiled:i(566),ParseObject:i(260),ParseObjectLayers:i(570),ParseTileLayers:i(573),ParseTilesets:i(575)}},function(t,e,i){i(1),i(1);var n=i(1457),i=i(1458);t.exports={renderWebGL:n,renderCanvas:i}},function(t,e,i){var E=i(12);t.exports=function(t,e,i){var n=e.cull(i),r=n.length,s=i.alpha*e.alpha;if(!(0===r||s<=0)){var o=e.gidMap,a=t.pipelines.set(e.pipeline,e),h=E.getTintAppendFloatAlpha,l=e.scrollFactorX,c=e.scrollFactorY,u=e.x,d=e.y,p=e.scaleX,f=e.scaleY;t.pipelines.preBatch(e);for(var g=0;g<r;g++){var m,y,v,x,b,w,T,S,P=n[g],_=o[P.index];_&&null!==(w=_.getTileTextureCoordinates(P.index))&&(m=_.glTexture,y=a.setTexture2D(m,e),v=_.tileWidth,x=_.tileHeight,b=w.x,w=w.y,T=.5*_.tileWidth,_=.5*_.tileHeight,S=h(P.tint,s*P.alpha),a.batchTexture(e,m,m.width,m.height,u+(T+P.pixelX)*p,d+(_+P.pixelY)*f,P.width,P.height,p,f,P.rotation,P.flipX,P.flipY,l,c,T,_,b,w,v,x,S,S,S,S,!1,0,0,i,null,!0,y))}t.pipelines.postBatch(e)}}},function(t,e,i){var i=i(25),b=new i,w=new i,T=new i;t.exports=function(t,e,i,n){var r=e.cull(i),s=r.length,o=i.alpha*e.alpha;if(!(0===s||o<=0)){var a=b,h=w,l=T,c=(h.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),a.copyFrom(i.matrix),t.currentContext),u=e.gidMap;c.save(),(n?(a.multiplyWithOffset(n,-i.scrollX*e.scrollFactorX,-i.scrollY*e.scrollFactorY),h.e=e.x,h.f=e.y,a.multiply(h,l),l):(h.e-=i.scrollX*e.scrollFactorX,h.f-=i.scrollY*e.scrollFactorY,h)).copyToContext(c),(!t.antialias||1<e.scaleX||1<e.scaleY)&&(c.imageSmoothingEnabled=!1);for(var d=0;d<s;d++){var p,f,g,m,y,v=r[d],x=u[v.index];x&&(p=x.image.getSourceImage(),null!==(f=x.getTileTextureCoordinates(v.index))&&(m=.5*(g=x.tileWidth),y=.5*(x=x.tileHeight),c.save(),c.translate(v.pixelX+m,v.pixelY+y),0!==v.rotation&&c.rotate(v.rotation),(v.flipX||v.flipY)&&c.scale(v.flipX?-1:1,v.flipY?-1:1),c.globalAlpha=o*v.alpha,c.drawImage(p,f.x,f.y,g,x,-m,-y,g,x),c.restore()))}c.restore()}}},function(t,e,i){var n=i(16),r=i(262);n.register("tilemap",function(t){t=void 0!==t?t:{};return r(this.scene,t.key,t.tileWidth,t.tileHeight,t.width,t.height,t.data,t.insertNull)})},function(t,e,i){var n=i(5),a=i(262);n.register("tilemap",function(t,e,i,n,r,s,o){return a(this.scene,t=null===t?void 0:t,e=null===e?void 0:e,i=null===i?void 0:i,n=null===n?void 0:n,r=null===r?void 0:r,s,o)})},function(t,e,i){t.exports={Clock:i(1462),TimerEvent:i(582)}},function(t,e,i){var n=i(0),r=i(24),s=i(20),o=i(582),a=i(93),i=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.now=0,this.timeScale=1,this.paused=!1,this._active=[],this._pendingInsertion=[],this._pendingRemoval=[],t.sys.events.once(s.BOOT,this.boot,this),t.sys.events.on(s.START,this.start,this)},boot:function(){this.now=this.systems.game.loop.time,this.systems.events.once(s.DESTROY,this.destroy,this)},start:function(){var t=this.systems.events;t.on(s.PRE_UPDATE,this.preUpdate,this),t.on(s.UPDATE,this.update,this),t.once(s.SHUTDOWN,this.shutdown,this)},addEvent:function(t){var e;return t instanceof o?(this.removeEvent(e=t),e.elapsed=e.startAt,e.hasDispatched=!1,e.repeatCount=-1===e.repeat||e.loop?999999999999:e.repeat):e=new o(t),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=this._pendingRemoval.length,e=this._pendingInsertion.length;if(0!==t||0!==e){for(var i=0;i<t;i++){var n=this._pendingRemoval[i],r=this._active.indexOf(n);-1<r&&this._active.splice(r,1),n.destroy()}for(i=0;i<e;i++)n=this._pendingInsertion[i],this._active.push(n);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,r=this._active[i];r.paused||(r.elapsed+=e*r.timeScale,r.elapsed>=r.delay&&(n=r.elapsed-r.delay,r.elapsed=r.delay,!r.hasDispatched&&r.callback&&(r.hasDispatched=!0,r.callback.apply(r.callbackScope,r.args)),0<r.repeatCount?(r.repeatCount--,r.elapsed=n,r.hasDispatched=!1):this._pendingRemoval.push(r)))}}},shutdown:function(){for(var 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 e=this.systems.events;e.off(s.PRE_UPDATE,this.preUpdate,this),e.off(s.UPDATE,this.update,this),e.off(s.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.scene.sys.events.off(s.START,this.start,this),this.scene=null,this.systems=null}});r.register("Clock",i,"time"),t.exports=i},function(t,e,i){var n=i(100),i=i(17)(!1,{Builders:i(1464),Events:i(267),TweenManager:i(1480),Tween:i(266),TweenData:i(268),Timeline:i(588)},n);t.exports=i},function(t,e,i){t.exports={GetBoolean:i(99),GetEaseFunction:i(80),GetNewValue:i(162),GetProps:i(583),GetTargets:i(263),GetTweens:i(584),GetValueOp:i(264),NumberTweenBuilder:i(585),StaggerBuilder:i(586),TimelineBuilder:i(587),TweenBuilder:i(163)}},function(t,e){t.exports=["callbackScope","completeDelay","delay","duration","ease","easeParams","flipX","flipY","hold","loop","loopDelay","offset","onActive","onActiveParams","onActiveScope","onComplete","onCompleteParams","onCompleteScope","onLoop","onLoopParams","onLoopScope","onRepeat","onRepeatParams","onRepeatScope","onStart","onStartParams","onStartScope","onStop","onStopParams","onStopScope","onUpdate","onUpdateParams","onUpdateScope","onYoyo","onYoyoParams","onYoyoScope","paused","props","repeat","repeatDelay","targets","useFrames","yoyo"]},function(t,e){t.exports="complete"},function(t,e){t.exports="loop"},function(t,e){t.exports="pause"},function(t,e){t.exports="resume"},function(t,e){t.exports="start"},function(t,e){t.exports="update"},function(t,e){t.exports="active"},function(t,e){t.exports="complete"},function(t,e){t.exports="loop"},function(t,e){t.exports="repeat"},function(t,e){t.exports="start"},function(t,e){t.exports="stop"},function(t,e){t.exports="update"},function(t,e){t.exports="yoyo"},function(t,e,i){var n=i(93),r=i(0),s=i(585),o=i(24),a=i(20),h=i(586),l=i(587),c=i(100),u=i(163),i=new r({initialize:function(t){this.scene=t,this.systems=t.sys,this.timeScale=1,this._add=[],this._pending=[],this._active=[],this._destroy=[],this._toProcess=0,t.sys.events.once(a.BOOT,this.boot,this),t.sys.events.on(a.START,this.start,this)},boot:function(){this.systems.events.once(a.DESTROY,this.destroy,this)},start:function(){var t=this.systems.events;t.on(a.PRE_UPDATE,this.preUpdate,this),t.on(a.UPDATE,this.update,this),t.once(a.SHUTDOWN,this.shutdown,this),this.timeScale=1},createTimeline:function(t){return l(this,t)},timeline:function(t){t=l(this,t);return t.paused||(this._add.push(t),this._toProcess++),t},create:function(t){return u(this,t)},add:function(t){t=u(this,t);return this._add.push(t),this._toProcess++,t},existing:function(t){return this._add.push(t),this._toProcess++,this},addCounter:function(t){t=s(this,t);return this._add.push(t),this._toProcess++,t},stagger:function(t,e){return h(t,e)},preUpdate:function(){if(0!==this._toProcess){for(var t=this._destroy,e=this._active,i=this._pending,n=0;n<t.length;n++){var r=t[n],s=e.indexOf(r);-1===s?-1<(s=i.indexOf(r))&&(r.state=c.REMOVED,i.splice(s,1)):(r.state=c.REMOVED,e.splice(s,1))}for(t.length=0,t=this._add,n=0;n<t.length;n++)(r=t[n]).state===c.PENDING_ADD&&(r.init()?(r.play(),this._active):this._pending).push(r);t.length=0,this._toProcess=0}},update:function(t,e){var i,n=this._active;e*=this.timeScale;for(var r=0;r<n.length;r++)(i=n[r]).update(t,e)&&(this._destroy.push(i),this._toProcess++)},remove:function(t){return n(this._add,t),n(this._pending,t),n(this._active,t),n(this._destroy,t),t.state=c.REMOVED,this},makeActive:function(t){var e;return-1===this._add.indexOf(t)&&-1===this._active.indexOf(t)&&(-1!==(e=this._pending.indexOf(t))&&this._pending.splice(e,1),this._add.push(t),t.state=c.PENDING_ADD,this._toProcess++),this},each:function(t,e){for(var i,n=[null],r=1;r<arguments.length;r++)n.push(arguments[r]);for(i in this.list)n[0]=this.list[i],t.apply(e,n)},getAllTweens:function(){for(var t=this._active,e=[],i=0;i<t.length;i++)e.push(t[i]);return e},getGlobalTimeScale:function(){return this.timeScale},getTweensOf:function(t,e){void 0===e&&(e=!1);var i,n,r,s=this._active,o=[];for(Array.isArray(t)||(t=[t]),n=0;n<s.length;n++)for(i=s[n],r=0;r<t.length;r++)i.hasTarget(t[r])&&o.push(i);if(e)for(s=this._pending,n=0;n<s.length;n++)for(i=s[n],r=0;r<t.length;r++)i.hasTarget(t[r])&&o.push(i);return o},isTweening:function(t){for(var e,i=this._active,n=0;n<i.length;n++)if((e=i[n]).hasTarget(t)&&e.isPlaying())return!0;return!1},killAll:function(){for(var t=this.getAllTweens(),e=0;e<t.length;e++)t[e].stop();return this},killTweensOf:function(t){for(var e=this.getTweensOf(t),i=0;i<e.length;i++)e[i].stop();return this},pauseAll:function(){for(var t=this._active,e=0;e<t.length;e++)t[e].pause();return this},resumeAll:function(){for(var t=this._active,e=0;e<t.length;e++)t[e].resume();return this},setGlobalTimeScale:function(t){return this.timeScale=t,this},shutdown:function(){this.killAll(),this._add=[],this._pending=[],this._active=[],this._destroy=[],this._toProcess=0;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.shutdown,this)},destroy:function(){this.shutdown(),this.scene.sys.events.off(a.START,this.start,this),this.scene=null,this.systems=null}});o.register("TweenManager",i,"tweens"),t.exports=i},function(t,e,i){t.exports={Array:i(208),Base64:i(1482),Objects:i(1484),String:i(1488),NOOP:i(1)}},function(t,e,i){t.exports={ArrayBufferToBase64:i(1483),Base64ToArrayBuffer:i(433)}},function(t,e){var o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";t.exports=function(t,e){for(var i=new Uint8Array(t),n=i.length,r=e?"data:"+e+";base64,":"",s=0;s<n;s+=3)r=(r=(r=(r+=o[i[s]>>2])+o[(3&i[s])<<4|i[s+1]>>4])+o[(15&i[s+1])<<2|i[s+2]>>6])+o[63&i[s+2]];return n%3==2?r=r.substring(0,r.length-1)+"=":n%3==1&&(r=r.substring(0,r.length-2)+"=="),r}},function(t,e,i){t.exports={Clone:i(77),DeepCopy:i(175),Extend:i(17),GetAdvancedValue:i(13),GetFastValue:i(2),GetMinMaxValue:i(1485),GetValue:i(6),HasAll:i(1486),HasAny:i(455),HasValue:i(126),IsPlainObject:i(7),Merge:i(127),MergeRight:i(1487),Pick:i(571),SetValue:i(478)}},function(t,e,i){var s=i(6),o=i(18);t.exports=function(t,e,i,n,r){t=s(t,e,r=void 0===r?i:r);return o(t,i,n)}},function(t,e){t.exports=function(t,e){for(var i=0;i<e.length;i++)if(!t.hasOwnProperty(e[i]))return!1;return!0}},function(t,e,i){var r=i(77);t.exports=function(t,e){var i,n=r(t);for(i in e)n.hasOwnProperty(i)&&(n[i]=e[i]);return n}},function(t,e,i){t.exports={Format:i(1489),Pad:i(186),RemoveAt:i(1490),Reverse:i(1491),UppercaseFirst:i(205),UUID:i(222)}},function(t,e){t.exports=function(t,i){return t.replace(/%([0-9]+)/g,function(t,e){return i[Number(e)-1]})}},function(t,e){t.exports=function(t,e){return 0===e?t.slice(1):t.slice(0,e-1)+t.slice(e)}},function(t,e){t.exports=function(t){return t.split("").reverse().join("")}},function(t,e,i){t.exports={SoundManagerCreator:i(426),Events:i(70),BaseSound:i(146),BaseSoundManager:i(145),WebAudioSound:i(434),WebAudioSoundManager:i(432),HTML5AudioSound:i(429),HTML5AudioSoundManager:i(427),NoAudioSound:i(431),NoAudioSoundManager:i(430)}},function(t,e,i){t.exports={Arcade:i(1366),Matter:i(1494)}},function(t,e,i){t.exports={BodyBounds:i(1392),Components:i(249),Events:i(272),Factory:i(1394),MatterGameObject:i(1395),Image:i(1396),Matter:i(594),MatterPhysics:i(1524),PolyDecomp:i(1393),Sprite:i(1397),TileBody:i(593),PhysicsEditorParser:i(589),PhysicsJSONParser:i(590),PointerConstraint:i(1398),World:i(1402)}},function(t,e){t.exports={setBounce:function(t){return this.body.restitution=t,this}}},function(t,e){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}}},function(t,e,i){var n=i(41);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}}},function(t,e){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}}},function(t,e){t.exports={setIgnoreGravity:function(t){return this.body.ignoreGravity=t,this}}},function(t,e,i){var n=i(41),r=i(3);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 r(this.body.centerOfMass.x,this.body.centerOfMass.y)}}}},function(t,e){t.exports={setSensor:function(t){return this.body.isSensor=t,this},isSensor:function(){return this.body.isSensor}}},function(t,e,i){var d=i(86),p=i(41),a=i(124),f=i(2),g=i(589),m=i(590),y=i(64);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,r,s,o=this;return t.destroy=function(){o.world.remove(o.body,!0),o.body.gameObject=null},e&&(this.world.has(t)&&this.world.remove(t,!0),this.world.add(t)),this._originComponent&&(e=t.render.sprite.xOffset,n=t.render.sprite.yOffset,r=t.centerOfMass.x,s=t.centerOfMass.y,a(r,.5)&&a(s,.5)?this.setOrigin(e+.5,n+.5):(r=t.centerOffset.x,s=t.centerOffset.y,this.setOrigin(e+r/this.displayWidth,n+s/this.displayHeight))),this},setBody:function(t,e){if(t){var i=f(t="string"==typeof t?{type:t}:t,"type","rectangle"),n=f(t,"x",this._tempVec2.x),r=f(t,"y",this._tempVec2.y),s=f(t,"width",this.width),o=f(t,"height",this.height);switch(i){case"rectangle":l=d.rectangle(n,r,s,o,e);break;case"circle":var a=f(t,"radius",Math.max(s,o)/2),h=f(t,"maxSides",25),l=d.circle(n,r,a,e,h);break;case"trapezoid":a=f(t,"slope",.5),l=d.trapezoid(n,r,s,o,a,e);break;case"polygon":h=f(t,"sides",5),a=f(t,"radius",Math.max(s,o)/2);l=d.polygon(n,r,h,a,e);break;case"fromVertices":case"fromVerts":var c,u,h=f(t,"verts",null);h&&("string"==typeof h&&(h=y.fromPath(h)),l=this.body&&!this.body.hasOwnProperty("temp")?(p.setVertices(this.body,h),this.body):(a=f(t,"flagInternal",!1),c=f(t,"removeCollinear",.01),u=f(t,"minimumArea",10),d.fromVertices(n,r,h,e,a,c,u)));break;case"fromPhysicsEditor":l=g.parseBody(n,r,t,e);break;case"fromPhysicsTracer":l=m.parseBody(n,r,t,e)}l&&this.setExistingBody(l,t.addToWorld)}return this}}},function(t,e,i){var n=i(272),r=i(165),s=i(166);t.exports={setToSleep:function(){return r.set(this.body,!0),this},setAwake:function(){return r.set(this.body,!1),this},setSleepThreshold:function(t){return this.body.sleepThreshold=t=void 0===t?60:t,this},setSleepEvents:function(t,e){return this.setSleepStartEvent(t),this.setSleepEndEvent(e),this},setSleepStartEvent:function(t){var e;return t?(e=this.world,s.on(this.body,"sleepStart",function(t){e.emit(n.SLEEP_START,t,this)})):s.off(this.body,"sleepStart"),this},setSleepEndEvent:function(t){var e;return t?(e=this.world,s.on(this.body,"sleepEnd",function(t){e.emit(n.SLEEP_END,t,this)})):s.off(this.body,"sleepEnd"),this}}},function(t,e){t.exports="afteradd"},function(t,e){t.exports="afterremove"},function(t,e){t.exports="afterupdate"},function(t,e){t.exports="beforeadd"},function(t,e){t.exports="beforeremove"},function(t,e){t.exports="beforeupdate"},function(t,e){t.exports="collisionactive"},function(t,e){t.exports="collisionend"},function(t,e){t.exports="collisionstart"},function(t,e){t.exports="dragend"},function(t,e){t.exports="drag"},function(t,e){t.exports="dragstart"},function(t,e){t.exports="pause"},function(t,e){t.exports="resume"},function(t,e){t.exports="sleepend"},function(t,e){t.exports="sleepstart"},function(t,e,i){var n=i(41);t.exports={setStatic:function(t){return n.setStatic(this.body,t),this},isStatic:function(){return this.body.isStatic}}},function(t,e,i){var s=i(41),n=i(14),r=i(269),o=i(270);t.exports={x:{get:function(){return this.body.position.x},set:function(t){this._tempVec2.set(t,this.y),s.setPosition(this.body,this._tempVec2)}},y:{get:function(){return this.body.position.y},set:function(t){this._tempVec2.set(this.x,t),s.setPosition(this.body,this._tempVec2)}},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,s.scale(this.body,e,i),s.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,s.scale(this.body,e,i),s.scale(this.body,this._scaleX,t)}},angle:{get:function(){return o(this.body.angle*n.RAD_TO_DEG)},set:function(t){this.rotation=o(t)*n.DEG_TO_RAD}},rotation:{get:function(){return this.body.angle},set:function(t){this._rotation=r(t),s.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),s.setPosition(this.body,this._tempVec2),this},setRotation:function(t){return this._rotation=r(t=void 0===t?0:t),s.setAngle(this.body,t),this},setFixedRotation:function(){return s.setInertia(this.body,1/0),this},setAngle:function(t){return this.angle=t=void 0===t?0:t,s.setAngle(this.body,this.rotation),this},setScale:function(t,e,i){void 0===t&&(t=1),void 0===e&&(e=t);var n=1/this._scaleX,r=1/this._scaleY;return this._scaleX=t,this._scaleY=e,s.scale(this.body,n,r,i),s.scale(this.body,t,e,i),this}}},function(t,e,i){var n=i(41);t.exports={setAngularVelocity:function(t){return n.setAngularVelocity(this.body,t),this},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}}},function(t,e,i){var n={},r=(t.exports=n,i(118)),s=i(32);n.create=function(t){return s.extend({extended:!1,narrowDetections:0,narrowphaseTests:0,narrowReuse:0,narrowReuseCount:0,midphaseTests:0,broadphaseTests:0,narrowEff:1e-4,midEff:1e-4,broadEff:1e-4,collisions:0,buckets:0,bodies:0,pairs:0},!1,t)},n.reset=function(t){t.extended&&(t.narrowDetections=0,t.narrowphaseTests=0,t.narrowReuse=0,t.narrowReuseCount=0,t.midphaseTests=0,t.broadphaseTests=0,t.narrowEff=0,t.midEff=0,t.broadEff=0,t.collisions=0,t.buckets=0,t.pairs=0,t.bodies=0)},n.update=function(t,e){var i;t.extended&&(i=e.world,i=r.allBodies(i),t.collisions=t.narrowDetections,t.pairs=e.pairs.list.length,t.bodies=i.length,t.midEff=(t.narrowDetections/(t.midphaseTests||1)).toFixed(2),t.narrowEff=(t.narrowDetections/(t.narrowphaseTests||1)).toFixed(2),t.broadEff=(1-t.broadphaseTests/(i.length||1)).toFixed(2),t.narrowReuse=(t.narrowReuseCount/(t.narrowphaseTests||1)).toFixed(2))}},function(t,I,e){var s=e(123),i=e(271),n=e(86),o=e(41),r=e(1392),a=e(84),h=e(0),l=e(118),c=e(591),u=e(128),d=e(273),p=e(50),f=e(1394),g=e(2),m=e(6),y=e(597),v=e(1525),x=e(1526),b=e(1399),w=e(1527),T=e(127),S=e(250),P=e(598),_=e(595),E=e(24),A=e(1400),M=e(599),k=e(274),C=e(20),O=e(592),R=e(83),L=e(64),D=e(1402),e=new h({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=l,this.detector=d,this.grid=y,this.pair=S,this.pairs=P,this.query=A,this.resolver=M,this.sat=k,this.constraint=u,this.bodies=n,this.composites=c,this.axes=i,this.bounds=a,this.svg=O,this.vector=R,this.vertices=L,this.verts=L,this._tempVec2=R.create(),m(this.config,"plugins.collisionevents",!0)&&this.enableCollisionEventsPlugin(),m(this.config,"plugins.attractors",!1)&&this.enableAttractorPlugin(),m(this.config,"plugins.wrap",!1)&&this.enableWrapPlugin(),M._restingThresh=m(this.config,"restingThresh",4),M._restingThreshTangent=m(this.config,"restingThreshTangent",6),M._positionDampen=m(this.config,"positionDampen",.9),M._positionWarming=m(this.config,"positionWarming",.8),M._frictionNormalMultiplier=m(this.config,"frictionNormalMultiplier",5),t.sys.events.once(C.BOOT,this.boot,this),t.sys.events.on(C.START,this.start,this)},boot:function(){this.world=new D(this.scene,this.config),this.add=new f(this.world),this.bodyBounds=new r,this.systems.events.once(C.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new D(this.scene,this.config),this.add=new f(this.world));var t=this.systems.events;t.on(C.UPDATE,this.world.update,this.world),t.on(C.POST_UPDATE,this.world.postUpdate,this.world),t.once(C.SHUTDOWN,this.shutdown,this)},getConfig:function(){var t=this.systems.game.config.physics,e=this.systems.settings.physics;return T(g(e,"matter",{}),g(t,"matter",{}))},enableAttractorPlugin:function(){return _.register(v),_.use(b,v),this},enableWrapPlugin:function(){return _.register(w),_.use(b,w),this},enableCollisionEventsPlugin:function(){return _.register(x),_.use(b,x),this},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},set60Hz:function(){return this.world.getDelta=this.world.update60Hz,this.world.autoUpdate=!0,this},set30Hz:function(){return this.world.getDelta=this.world.update30Hz,this.world.autoUpdate=!0,this},step:function(t,e){this.world.step(t,e)},containsPoint:function(t,e,i){t=this.getMatterBodies(t);e=R.create(e,i);return 0<A.point(t,e).length},intersectPoint:function(t,e,i){i=this.getMatterBodies(i);var t=R.create(t,e),n=[];return A.point(i,t).forEach(function(t){-1===n.indexOf(t)&&n.push(t)}),n},intersectRect:function(t,e,i,n,r,s){void 0===r&&(r=!1),s=this.getMatterBodies(s);var o=[];return A.region(s,{min:{x:t,y:e},max:{x:t+i,y:e+n}},r).forEach(function(t){-1===o.indexOf(t)&&o.push(t)}),o},intersectRay:function(t,e,i,n,r,s){void 0===r&&(r=1),s=this.getMatterBodies(s);for(var o=[],a=A.ray(s,R.create(t,e),R.create(i,n),r),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=A.collides(t,e),r=0;r<n.length;r++){var s=n[r];s.bodyA===t?i.push(s.bodyB):i.push(s.bodyA)}return i},overlap:function(t,e,i,n,r){void 0===i&&(i=null),void 0===n&&(n=null),void 0===r&&(r=i),Array.isArray(t)||(t=[t]),t=this.getMatterBodies(t),e=this.getMatterBodies(e);for(var s=!1,o=0;o<t.length;o++)for(var a=t[o],h=A.collides(a,e),l=0;l<h.length;l++){var c=h[l],u=c.bodyA.id===a.id?c.bodyB:c.bodyA;if(!n||n.call(r,a,u,c))if(s=!0,i)i.call(r,a,u,c);else if(!n)return!0}return s},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 r=this._tempVec2;return t.forEach(function(t){void 0===n&&(n=t.angle),r.x=i*Math.cos(n),r.y=i*Math.sin(n),o.applyForce(t,e,r)}),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,r=t.pointB.y;return t.bodyA&&(e+=t.bodyA.position.x,i+=t.bodyA.position.y),t.bodyB&&(n+=t.bodyB.position.x,r+=t.bodyB.position.y),p(e,i,n,r)},alignBody:function(t,e,i,n){var r;switch(t=t.hasOwnProperty("body")?t.body:t,n){case s.TOP_LEFT:case s.LEFT_TOP:r=this.bodyBounds.getTopLeft(t,e,i);break;case s.TOP_CENTER:r=this.bodyBounds.getTopCenter(t,e,i);break;case s.TOP_RIGHT:case s.RIGHT_TOP:r=this.bodyBounds.getTopRight(t,e,i);break;case s.LEFT_CENTER:r=this.bodyBounds.getLeftCenter(t,e,i);break;case s.CENTER:r=this.bodyBounds.getCenter(t,e,i);break;case s.RIGHT_CENTER:r=this.bodyBounds.getRightCenter(t,e,i);break;case s.LEFT_BOTTOM:case s.BOTTOM_LEFT:r=this.bodyBounds.getBottomLeft(t,e,i);break;case s.BOTTOM_CENTER:r=this.bodyBounds.getBottomCenter(t,e,i);break;case s.BOTTOM_RIGHT:case s.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(C.UPDATE,this.world.update,this.world),t.off(C.POST_UPDATE,this.world.postUpdate,this.world)),t.off(C.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(C.START,this.start,this),this.scene=null,this.systems=null}});E.register("MatterPhysics",e,"matterPhysics"),t.exports=e},function(t,e,i){var c=i(594),r={name:"matter-attractors",version:"0.1.7",for:"matter-js@^0.14.2",silent:!0,install:function(t){t.after("Body.create",function(){r.Body.init(this)}),t.before("Engine.update",function(t){r.Engine.update(t)})},Body:{init:function(t){t.plugin.attractors=t.plugin.attractors||[]}},Engine:{update:function(t){for(var e=c.Composite.allBodies(t.world),i=0;i<e.length;i++){var n=e[i],r=n.plugin.attractors;if(r&&0<r.length)for(var s=0;s<e.length;s++){var o=e[s];if(i!==s)for(var a=0;a<r.length;a++){var h=r[a],l=h;(l=c.Common.isFunction(h)?h(n,o):l)&&c.Body.applyForce(o,o.position,l)}}}}},Attractors:{gravityConstant:.001,gravity:function(t,e){var i=c.Vector.sub(e.position,t.position),n=c.Vector.magnitudeSquared(i)||1e-4,i=c.Vector.normalise(i),n=-r.Attractors.gravityConstant*(t.mass*e.mass/n),i=c.Vector.mult(i,n);c.Body.applyForce(t,t.position,c.Vector.neg(i)),c.Body.applyForce(e,e.position,i)}}};t.exports=r},function(t,e){t.exports={name:"matter-collision-events",version:"0.1.6",for:"matter-js@^0.14.2",silent:!0,install:function(n){n.after("Engine.create",function(){n.Events.on(this,"collisionStart",function(t){t.pairs.map(function(t){var e=t.bodyA,i=t.bodyB;e.gameObject&&e.gameObject.emit("collide",e,i,t),i.gameObject&&i.gameObject.emit("collide",i,e,t),n.Events.trigger(e,"onCollide",{pair:t}),n.Events.trigger(i,"onCollide",{pair:t}),e.onCollideCallback&&e.onCollideCallback(t),i.onCollideCallback&&i.onCollideCallback(t),e.onCollideWith[i.id]&&e.onCollideWith[i.id](i,t),i.onCollideWith[e.id]&&i.onCollideWith[e.id](e,t)})}),n.Events.on(this,"collisionActive",function(t){t.pairs.map(function(t){var e=t.bodyA,i=t.bodyB;e.gameObject&&e.gameObject.emit("collideActive",e,i,t),i.gameObject&&i.gameObject.emit("collideActive",i,e,t),n.Events.trigger(e,"onCollideActive",{pair:t}),n.Events.trigger(i,"onCollideActive",{pair:t}),e.onCollideActiveCallback&&e.onCollideActiveCallback(t),i.onCollideActiveCallback&&i.onCollideActiveCallback(t)})}),n.Events.on(this,"collisionEnd",function(t){t.pairs.map(function(t){var e=t.bodyA,i=t.bodyB;e.gameObject&&e.gameObject.emit("collideEnd",e,i,t),i.gameObject&&i.gameObject.emit("collideEnd",i,e,t),n.Events.trigger(e,"onCollideEnd",{pair:t}),n.Events.trigger(i,"onCollideEnd",{pair:t}),e.onCollideEndCallback&&e.onCollideEndCallback(t),i.onCollideEndCallback&&i.onCollideEndCallback(t)})})})}}},function(t,e,i){var o=i(594),a={name:"matter-wrap",version:"0.1.4",for:"matter-js@^0.14.2",silent:!0,install:function(t){t.after("Engine.update",function(){a.Engine.update(this)})},Engine:{update:function(t){for(var t=t.world,e=o.Composite.allBodies(t),i=o.Composite.allComposites(t),n=0;n<e.length;n+=1){var r=e[n];r.plugin.wrap&&a.Body.wrap(r,r.plugin.wrap)}for(n=0;n<i.length;n+=1){var s=i[n];s.plugin.wrap&&a.Composite.wrap(s,s.plugin.wrap)}}},Bounds:{wrap:function(t,e){var i=null,n=null;if(void 0!==e.min.x&&void 0!==e.max.x&&(t.min.x>e.max.x?i=e.min.x-t.max.x:t.max.x<e.min.x&&(i=e.max.x-t.min.x)),void 0!==e.min.y&&void 0!==e.max.y&&(t.min.y>e.max.y?n=e.min.y-t.max.y:t.max.y<e.min.y&&(n=e.max.y-t.min.y)),null!==i||null!==n)return{x:i||0,y:n||0}}},Body:{wrap:function(t,e){e=a.Bounds.wrap(t.bounds,e);return e&&o.Body.translate(t,e),e}},Composite:{bounds:function(t){for(var e=o.Composite.allBodies(t),i=[],n=0;n<e.length;n+=1){var r=e[n];i.push(r.bounds.min,r.bounds.max)}return o.Bounds.create(i)},wrap:function(t,e){e=a.Bounds.wrap(a.Composite.bounds(t),e);return e&&o.Composite.translate(t,e),e}}};t.exports=a},function(r,t,s){!function(t){var e=s(33),i=s(17),n={Actions:s(275),Animations:s(723),BlendModes:s(35),Cache:s(735),Cameras:s(738),Core:s(806),Class:s(0),Create:s(888),Curves:s(894),Data:s(896),Display:s(898),DOM:s(917),Events:s(918),Game:s(920),GameObjects:s(1011),Geom:s(483),Input:s(1308),Loader:s(1338),Math:s(193),Physics:s(1493),Plugins:s(1403),Renderer:s(1405),Scale:s(1412),ScaleModes:s(168),Scene:s(418),Scenes:s(1413),Structs:s(1415),Textures:s(1416),Tilemaps:s(1418),Time:s(1461),Tweens:s(1463),Utils:s(1481)};n.Sound=s(1492),n=i(!1,n,e),r.exports=n,t.Phaser=n}.call(this,s(600))}],r.c=s,r.d=function(t,e,i){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(i,n,function(t){return e[t]}.bind(null,n));return i},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=1528))},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.Boot=void 0,i(35)),a=i(0),h=i(51),l=i(16),c=i(17),u=i(9),d=i(3),i=(r=o.BasicScene,s(p,r),p.prototype.preload=function(){this.load.on(Phaser.Loader.Events.PROGRESS,this.onLoadProgress,this),this.preBoot(),this.prePreloader()},p.prototype.preBoot=function(){var e=this;a.Jsons.initLocales(),a.Jsons.preloadList.forEach(function(t){e.load.json(t,"assets/jsons/"+t+".json")}),a.Images.preloadList.forEach(function(t){e.load.image(t,"assets/images/"+t+".png")}),a.Atlases.preloadList.forEach(function(t){e.load.atlas(t,"assets/atlases/"+t+".png","assets/atlases/"+t+".json")}),a.Sounds.preloadList.forEach(function(t){e.game.device.os.iOS?e.load.audio(t,["assets/sounds/"+t+".m4a"]):e.load.audio(t,["assets/sounds/"+t+".ogg","assets/sounds/"+t+".mp3"])})},p.prototype.prePreloader=function(){var e=this;a.Fonts.list.forEach(function(t){e.load.bitmapFont(t,"assets/fonts/"+t+".png","assets/fonts/"+t+".fnt")}),a.Jsons.list.forEach(function(t){e.load.json(t,"assets/jsons/"+t+".json")}),a.Images.list.forEach(function(t){e.load.image(t,"assets/images/"+t+".png")}),a.Atlases.list.forEach(function(t){e.load.atlas(t,"assets/atlases/"+t+".png","assets/atlases/"+t+".json")}),a.Spines.list.forEach(function(t){e.load.spine(t,"assets/spine/"+t+".json","assets/spine/"+t+".atlas",!0)}),a.Sounds.list.forEach(function(t){e.game.device.os.iOS?e.load.audio(t,["assets/sounds/"+t+".m4a"]):e.load.audio(t,["assets/sounds/"+t+".ogg","assets/sounds/"+t+".mp3"])})},p.prototype.create=function(){var t=this;u.AzerionSDK.removeSplashLoader(function(){return t.startGame()})},p.prototype.onLoadProgress=function(t){u.AzerionSDK.onLoadProgress(t)},p.prototype.startGame=function(){var e=this;c.SaveGame.getInstance(),l.Localization.load(),a.Constants.AVAILABLE_LANGUAGES.forEach(function(t){l.Localization.add(t,a.Jsons.getJson(e,"locale_"+t))}),l.Localization.add("en_no_blood",a.Jsons.getJson(this,"locale_en_no_blood")),this.showPreloader()},p.prototype.showPreloader=function(){d.DetectNoBlood.detect(this),d.TexturesEdit.init(this),d.SoundManager.init(this.game),this.scene.start(h.World.Name)},p.Name="boot",p);function p(){return null!==r&&r.apply(this,arguments)||this}e.Boot=i},function(t,e,i){"use strict";function n(){}Object.defineProperty(e,"__esModule",{value:!0}),e.Images=void 0,n.preloadList=[],n.list=["darkOverlay","logo"],e.Images=n},function(t,e,i){"use strict";function n(){}Object.defineProperty(e,"__esModule",{value:!0}),e.Constants=void 0,n.GAME_TITLE="vex-7",n.GAME_SPLASH_TITLE="Vex 7",n.GAME_DISTRIBUTION_ID="0c454c9562d249d28ba3a2b50564042c",n.DIV_ID="content",n.DIV_ID_ORIENTATION="orientation",n.GW=1920,n.GH=1080,n.ORIENTATION_LANDSCAPE=!0,n.userRatio=1,n.UI_WIDTH=n.GW,n.UI_HEIGHT=n.GH,n.UI_SCALE_FIT_X=1,n.UI_SCALE_FIT_Y=1,n.UI_SCALE=1,n.UI_SHIFT_X=0,n.UI_SHIFT_Y=0,n.UI_ADDITIONAL_TOP_PANELS_SCALE=1,n.UI_ADDITIONAL_PANELS_SCALE=1,n.IS_EDITOR=!1,n.AVAILABLE_LANGUAGES=["ar","de","en","es","fr","hi","in","it","ja","nl","pt","tr","ru"],n.GAME_NAME="Vex 7",n.STORAGE_KEY="vex7_sg",n.SFX_BTN_ON_DOWN="buttonClick",n.SFX_BTN_ON_UP=null,n.IS_AD_AVAILABLE=!0,n.IS_AD_REWARD_AVAILABLE=!0,n.SHOW_PANEL_LANGUAGE=!0,e.Constants=n},function(t,e,i){"use strict";function n(){}Object.defineProperty(e,"__esModule",{value:!0}),e.Atlases=void 0,n.gameplay="gameplay",n.ui="ui",n.editor="editor",n.preloadList=[],n.list=[n.gameplay,n.ui],e.Atlases=n},function(t,e,i){"use strict";function n(){}Object.defineProperty(e,"__esModule",{value:!0}),e.Sounds=void 0,n.preloadList=[],n.list=["slot_random","slot_unlock","achievementUnlocked","blockDestroy","bounce1","buttonClick","cannonEnter","cannonFire","connect","connectHang","death1","death2","ding","downgrade","electricity","fall","fallingBlock","footstep1","footstep2","footstep3","footstep4","footstep5","footstep6","glassSmash","kickBlock","land","laserFire","poleSwing","poleWoosh","slide","splash1","starPickup","wallSlide","ziplineFull","torch","explosion","kite","mus_menu","mus_hub","mus_tower","mus_vex","mus_act1","mus_act1hard","mus_act2","mus_act2hard","mus_act3","mus_act3hard","mus_act4","mus_act4hard","mus_act5","mus_act5hard","mus_act6","mus_act6hard","mus_act7","mus_act7hard","mus_act8","mus_act8hard","mus_act9","mus_act9hard"],e.Sounds=n},function(t,e,i){"use strict";function n(){}Object.defineProperty(e,"__esModule",{value:!0}),e.Fonts=void 0,n.setFont=function(t){this.Main="ar"===t||"hi"===t||"ja"===t?n.Arial:n.Garet,this.TutDeath=this.Main},n.setTextMetrics=function(t,e){this.metricsData[t]=e},n.getTextMetrics=function(t){return this.metricsData[t]},n.Main="arial",n.TutDeath="arial",n.BigNumbers="bigNumbers",n.list=[n.Arial="arial",n.Garet="garetHeavy",n.BigNumbers],n.metricsData={},e.Fonts=n},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Jsons=void 0;var n=i(0);function r(){}r.initLocales=function(){n.Constants.AVAILABLE_LANGUAGES.forEach(function(t){r.preloadList.push("locale_"+t)}),r.preloadList.push("locale_en_no_blood")},r.getJson=function(t,e){return t.cache.json.get(e)},r.preloadList=[],r.list=["balance","levels","domains_no_blood"],e.Jsons=r},function(t,e,i){"use strict";function n(){}Object.defineProperty(e,"__esModule",{value:!0}),e.Spines=void 0,n.list=["player","Enemy1","Enemy2"],e.Spines=n},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PauseHandler=void 0;var n=i(9);function r(t){var e=this;this.game=t,this.focused=!0,this.game.device.os.iOS?this.game.sound.pauseOnBlur=!1:this.game.sound.pauseOnBlur=!0,this.game.events.off(Phaser.Core.Events.HIDDEN),this.game.events.off(Phaser.Core.Events.VISIBLE),h5branding.Utils.isOnDevice()&&(this.game.device.os.iOS?(window.addEventListener("blur",function(){return e.onBlur()}),window.addEventListener("focus",function(){return e.onFocus()})):(document.addEventListener("pause",function(){return e.onPause()}),document.addEventListener("resume",function(){return e.onResume()}))),this.game.events.on(Phaser.Core.Events.BLUR,this.onBlur,this),this.game.events.on(Phaser.Core.Events.FOCUS,this.onFocus,this),this.game.events.on(Phaser.Core.Events.PAUSE,this.onPause,this),this.game.events.on(Phaser.Core.Events.RESUME,this.onResume,this)}r.getInstance=function(t){return r.instance=r.instance?r.instance:new r(t)},r.prototype.onBlur=function(){this.focused=!1,this.game.events.emit(Phaser.Core.Events.PAUSE)},r.prototype.onFocus=function(){this.focused=!0,n.AzerionSDK.isAdPlaying()||this.game.events.emit(Phaser.Core.Events.RESUME)},r.prototype.onPause=function(){this.game.sound.mute=!0,this.game.sound.context.suspend()},r.prototype.onResume=function(){this.game.sound.mute=!1,this.game.sound.context.resume()},r.prototype.pause=function(){this.game.events.emit(Phaser.Core.Events.PAUSE)},r.prototype.resume=function(){this.hasFocus&&this.game.events.emit(Phaser.Core.Events.RESUME)},Object.defineProperty(r.prototype,"hasFocus",{get:function(){return this.focused},enumerable:!1,configurable:!0}),e.PauseHandler=r},function(t,e,i){"use strict";var n,s,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),r=(Object.defineProperty(e,"__esModule",{value:!0}),e.JDSprite=void 0,s=Phaser.GameObjects.Sprite,r(o,s),o.prototype.setFrameNumber=function(t){this.anims.setCurrentFrame(this.anims.currentAnim.frames[t])},o.prototype.setTexture=function(t,e){return s.prototype.setTexture.call(this,t,e),this.refreshDrawTint=!0,this},o.prototype.setFrame=function(t,e,i){return s.prototype.setFrame.call(this,t,e,i),this.refreshDrawTint=!0,this},o.prototype.destroy=function(){Phaser.GameObjects.GameObject.prototype.destroy.call(this)},o);function o(t,e,i,n,r){t=s.call(this,t,e,i,n,r)||this;return t.refreshDrawTint=!1,t.addToUpdateList(),t}e.JDSprite=r},function(t,e,i){"use strict";var n,o,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),i=(Object.defineProperty(e,"__esModule",{value:!0}),e.JDImageAnim=void 0,o=i(36).JDImage,r(s,o),s.prototype.setFrameName=function(t,e){void 0===e&&(e=0),this.currFrame=-1,this.frameName=t,this.setAnimFrame(e)},s.prototype.start=function(){this.isPlaying=!0},s.prototype.stop=function(){this.isPlaying=!1},s.prototype.gotoAndPlay=function(t,e,i,n,r){this.playFrames(t,e,n=void 0===n?0:n,r=void 0===r?0:r),this.counterAnim=i,this.setAnimFrame(this.counterAnim)},s.prototype.gotoAndStop=function(t){this.stop(),this.counterAnim=t,this.setAnimFrame(this.counterAnim)},s.prototype.playFrames=function(t,e,i,n){void 0===i&&(i=0),void 0===n&&(n=.6),this.isPlaying=!0,t<e?this.dir=n:e<t?this.dir=-n:t===e&&(this.isPlaying=!1),this.startFrame=t,this.endFrame=e,this.loop=i,this.counterAnim=this.startFrame,this.setAnimFrame(this.counterAnim)},s.prototype.reverse=function(){var t;this.dir=-this.dir,(0<this.dir&&this.endFrame<this.startFrame||this.dir<0&&this.endFrame>this.startFrame)&&(t=this.startFrame,this.startFrame=this.endFrame,this.endFrame=t),!1===this.isPlaying&&this.playFrames(this.startFrame,this.endFrame,this.loop,Math.abs(this.dir))},s.prototype.setAnimFrame=function(t){t=Math.floor(t);this.currFrame!==t&&(this.currFrame=t,this.setFrame(this.frameName+(1e4+this.currFrame)))},s.prototype.update=function(){!0===this.isPlaying&&(this.counterAnim+=this.dir,(0<this.dir&&this.counterAnim>this.endFrame||this.dir<0&&this.counterAnim<this.endFrame)&&(0===this.loop?(this.isPlaying=!1,this.counterAnim=this.endFrame,this.visible=!this.hideOnComplete):0<this.loop?(this.counterAnim=this.startFrame,--this.loop):this.loop<0&&(this.counterAnim=this.startFrame),this.emit(s.EVENT_COMPLETE,this)),this.setAnimFrame(this.counterAnim))},s.EVENT_COMPLETE="jdimageanimcomplete",s);function s(t,e,i,n,r,s){void 0===s&&(s=0);t=o.call(this,t,e,i,n)||this;return t.isPlaying=!1,t.currFrame=-1,t.loop=0,t.hideOnComplete=!1,t.setFrameName(r,s),t}e.JDImageAnim=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.JDBmpdTextTranslated=void 0,i(16)),i=(r=i(53).JDBmpdTextFit,s(a,r),a.prototype.setText=function(t,e){return void 0===e&&(e=""),r.prototype.setText.call(this,o.Localization.getText(t)+e),this},a.prototype.setTextPref=function(t,e){return r.prototype.setText.call(this,t+o.Localization.getText(e)),this},a);function a(){return null!==r&&r.apply(this,arguments)||this}e.JDBmpdTextTranslated=i},function(t,e,i){"use strict";var n,l,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),c=(Object.defineProperty(e,"__esModule",{value:!0}),e.JDBmpdTextStroke=void 0,i(1)),s=i(10),i=(l=Phaser.GameObjects.Container,r(o,l),o.prototype.setStrokeScale=function(t,e,i){this.txtStroke.scale=t,this.txt.x=e,this.txt.y=i},o.prototype.setOrigin=function(t,e){this.txtStroke.setOrigin(t,e),this.txt.setOrigin(t,e)},o.prototype.setColor=function(t,e){this.txtStroke.setColor(e),this.txt.setColor(t)},Object.defineProperty(o.prototype,"text",{get:function(){return this.txtStroke.text},set:function(t){this.txtStroke.text=t,this.updateTxt()},enumerable:!1,configurable:!0}),o.prototype.setFitSize=function(t,e,i){void 0===e&&(e=s.JDTextFitParam.size),this.txtStroke.setFitSize(t,e,i=void 0===i?0:i),this.updateTxt()},o.prototype.updateTxt=function(){this.txt.fontSize=this.txtStroke.fontSize,""===this.txtStroke.getTextBounds().wrappedText?this.txt.text=this.txtStroke.text:this.txt.text=this.txtStroke.getTextBounds().wrappedText},o.prototype.destroy=function(t){l.prototype.destroy.call(this,t),this.txtStroke=null,this.txt=null},o);function o(t,e,i,n,r,s,o,a,h){void 0===o&&(o=16777215),void 0===a&&(a=16777215),void 0===h&&(h=1);e=l.call(this,t,e,i)||this;return e.txtStroke=new c.JDBmpdTextTranslated(t,0,0,n+"Stroke",r,s,a,h),e.add(e.txtStroke),e.txt=new c.JDBmpdTextTranslated(t,s/20,s/8,n,r,s,o,h),e.add(e.txt),e}e.JDBmpdTextStroke=i},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.JDRender=void 0;var n=i(26),w=i(55);function F(){}F.init=function(t){n.PipelineManager.init(t),t.renderer.type===Phaser.CANVAS&&(this.canvasGameObjectDestroy(),this.canvasRenderImages(),this.canvas=document.createElement("canvas"),Phaser.GameObjects.BitmapText.prototype.renderCanvas=this.canvasRenderBitmapText)},F.canvasGameObjectDestroy=function(){Phaser.GameObjects.GameObject.prototype.destroy=function(){this.scene&&!this.ignoreDestroy&&(this.cachedTintedTexture&&(Phaser.Display.Canvas.CanvasPool.remove(this),this.cachedTintedTexture=void 0),this.preDestroy&&this.preDestroy.call(this),this.emit(Phaser.Core.Events.DESTROY,this),this.removeAllListeners(),this.postPipelines&&this.resetPostPipeline(!0),this.displayList&&(this.displayList.queueDepthSort(),this.displayList.remove(this)),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.active=!1,this.visible=!1,this.scene=void 0,this.displayList=void 0,this.parentContainer=void 0)}},F.canvasRenderImages=function(){Phaser.Renderer.Canvas.CanvasRenderer.prototype.batchSprite=function(t,e,i,n){var r,s,o,a,h,l,c,u,d,p,f,g,m,y,v,x,b=i.alpha*t.alpha;0!=b&&(r=this.currentContext,s=this._tempMatrix1,o=this._tempMatrix2,a=this._tempMatrix3,h=(l=e.canvasData).x,l=l.y,c=e.cutWidth,u=e.cutHeight,v=e.customPivot,d=e.source.resolution,y=t.displayOriginX,x=t.displayOriginY,p=-y+e.x,f=-x+e.y,t.isCropped&&((g=t._crop).flipX===t.flipX&&g.flipY===t.flipY||e.updateCropUVs(g,t.flipX,t.flipY),c=g.cw,u=g.ch,h=g.cx,l=g.cy,p=-y+g.x,f=-x+g.y,t.flipX&&(0<=p?p=-(p+c):p<0&&(p=Math.abs(p)-c)),t.flipY&&(0<=f?f=-(f+u):f<0&&(f=Math.abs(f)-u))),m=g=1,t.flipX&&(v||(p+=-e.realWidth+2*y),g=-1),t.flipY&&(v||(f+=-e.realHeight+2*x),m=-1),w.PLPivotSkew.calculateMatrix(t,g,m,s,o,a,i,n),r.save(),a.setToContext(r),r.globalAlpha=b,r.imageSmoothingEnabled=!(!this.antialias||e.source.scaleMode),r.globalCompositeOperation=this.blendModes[t.blendMode],16777215!==(y=t.tintTopLeft)?(v=F.getGameObjectTintCanvas(t),t.cachedTint===y&&!0!==t.refreshDrawTint||(x=v.getContext("2d"),v.width===c&&v.height===u||(v.width=c,v.height=u),x.clearRect(0,0,c,u),x.fillStyle="#"+("00000"+(0|y).toString(16)).substr(-6),x.fillRect(0,0,c,u),x.globalCompositeOperation="multiply",x.drawImage(e.source.image,h,l,c,u,0,0,c,u),x.globalCompositeOperation="destination-atop",x.drawImage(e.source.image,h,l,c,u,0,0,c,u),t.cachedTint=y,t.refreshDrawTint=!1),r.drawImage(v,0,0,c,u,p,f,c/d,u/d)):r.drawImage(e.source.image,h,l,c,u,p,f,c/d,u/d),r.restore())}},F.canvasRenderBitmapText=function(t,e,i,n){var r=e._text,s=r.length,o=t.currentContext;if(0!==s&&Phaser.Renderer.Canvas.SetTransform(t,o,e,i,n)){i.addToRenderList(e);var a,h,t=e.texture.frames.__BASE,l=e.fontData.chars,c=e.fontData.lineHeight,u=e._letterSpacing,d=0,p=0,f=0,g=0,m=0,y=0,v=0,x=0,b=null,w=0,T=t.source.image,S=t.cutX,P=t.cutY,_=e._fontSize/e.fontData.size,E=e._align,A=0,M=0,n=e.getTextBounds(!1),t=n.local.width,k=n.local.height,C=(0<e.maxWidth&&(s=(r=n.wrappedText).length),e._bounds.lines),B=(1===E?M=(C.longest-C.lengths[0])/2:2===E&&(M=C.longest-C.lengths[0]),o.translate(-e.displayOriginX,-e.displayOriginY),i.roundPixels);e.cachedTint||(e.cachedTint=16777215);var O,n=e.tintTopLeft,i=16777215!==n,R=e.cachedTint!==n,L=o;!0==i&&((O=F.canvas).width===t&&O.height===k||(O.width=t,O.height=k),(L=O.getContext("2d")).clearRect(0,0,t,k));for(var D,I=0;I<s;I++)10!==(a=r.charCodeAt(I))?(h=l[a])&&(f=S+h.x,g=P+h.y,m=h.width,y=h.height,v=h.xOffset+d,x=h.yOffset+p,null!==b&&(v+=void 0!==(D=h.kerning[w])?D:0),x*=_,v=v*_+M,d+=h.xAdvance+u,b=h,w=a,0!==m&&0!==y&&32!==a&&(B&&(v=Math.round(v),x=Math.round(x)),L.save(),L.translate(v,x),L.scale(_,_),L.drawImage(T,f,g,m,y,0,0,m,y),L.restore())):(A++,1===E?M=(C.longest-C.lengths[A])/2:2===E&&(M=C.longest-C.lengths[A]),d=0,p+=c,b=null);!0==i&&(i=F.getGameObjectTintCanvas(e),!0!=R&&!0!==e.refreshDrawTint||(R=i.getContext("2d"),i.width===t&&i.height===k||(i.width=t,i.height=k),R.clearRect(0,0,t,k),R.fillStyle="#"+("00000"+(0|n).toString(16)).substr(-6),R.fillRect(0,0,t,k),R.globalCompositeOperation="multiply",R.drawImage(O,0,0,t,k),R.globalCompositeOperation="destination-atop",R.drawImage(O,0,0,t,k),e.cachedTint=n,e.refreshDrawTint=!1),o.drawImage(i,0,0,t,k)),o.restore()}},F.getGameObjectTintCanvas=function(t){var e=t.cachedTintedTexture;return e||(e=t.cachedTintedTexture=Phaser.Display.Canvas.CanvasPool.create(t),t.cachedTint=16777215),e},e.JDRender=F},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),s=(Object.defineProperty(e,"__esModule",{value:!0}),e.PLBlur=void 0,r=Phaser.Renderer.WebGL.Pipelines.SinglePipeline,s(o,r),o.prototype.onBind=function(t){r.prototype.onBind.call(this);t=t.pipelineData;this.set1f("blurX",t.blurX),this.set1f("blurY",t.blurY)},o.prototype.onBatch=function(t){t&&this.flush()},o.setBlur=function(t,e,i){t.pipelineData.blurX=e*o.blurCoef,t.pipelineData.blurY=i*o.blurCoef},o.blurCoef=1/7e3,o);function o(t){return r.call(this,{game:t,fragShader:"precision mediump float;\n varying vec2 outTexCoord;\n varying vec4 vColor;\n uniform float blurX;\n uniform float blurY;\n uniform sampler2D uSampler;\n\n void main(void) {\n vec4 sum = vec4(0.0);\n\n sum += texture2D(uSampler, vec2(outTexCoord.x - 4.0*blurX, outTexCoord.y - 4.0*blurY)) * 0.05;\n sum += texture2D(uSampler, vec2(outTexCoord.x - 3.0*blurX, outTexCoord.y - 3.0*blurY)) * 0.09;\n sum += texture2D(uSampler, vec2(outTexCoord.x - 2.0*blurX, outTexCoord.y - 2.0*blurY)) * 0.12;\n sum += texture2D(uSampler, vec2(outTexCoord.x - blurX, outTexCoord.y - blurY)) * 0.15;\n\n sum += texture2D(uSampler, vec2(outTexCoord.x, outTexCoord.y)) * 0.16;\n\n sum += texture2D(uSampler, vec2(outTexCoord.x + blurX, outTexCoord.y + blurY)) * 0.15;\n sum += texture2D(uSampler, vec2(outTexCoord.x + 2.0*blurX, outTexCoord.y + 2.0*blurY)) * 0.12;\n sum += texture2D(uSampler, vec2(outTexCoord.x + 3.0*blurX, outTexCoord.y + 3.0*blurY)) * 0.09;\n sum += texture2D(uSampler, vec2(outTexCoord.x + 4.0*blurX, outTexCoord.y + 4.0*blurY)) * 0.05;\n\n gl_FragColor = sum;\n }",uniforms:["blurX","blurY"]})||this}e.PLBlur=s},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),s=(Object.defineProperty(e,"__esModule",{value:!0}),e.PLColorMatrix=void 0,r=Phaser.Renderer.WebGL.Pipelines.SinglePipeline,s(o,r),o.prototype.onBoot=function(){this.set1fv("m",o.getDefaultColorMatrix())},o.prototype.onBind=function(t){r.prototype.onBind.call(this);t=t.pipelineData;t&&t.colorMatrix&&this.set1fv("m",t.colorMatrix)},o.prototype.onBatch=function(t){t&&this.flush()},o.brightness=function(t,e,i){this._loadMatrix(t,[e,0,0,0,0,0,e,0,0,0,0,0,e,0,0,0,0,0,1,0],i)},o.greyscale=function(t,e,i){this._loadMatrix(t,[e,e,e,0,0,e,e,e,0,0,e,e,e,0,0,0,0,0,1,0],i)},o.blackAndWhite=function(t,e){this._loadMatrix(t,[.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0],e)},o.hue=function(t,e,i){e=(e||0)/180*Math.PI;var n=Math.cos(e),e=Math.sin(e);this._loadMatrix(t,[.213+.787*n+-.213*e,.715+-.715*n+-.715*e,.072+-.072*n+.928*e,0,0,.213+-.213*n+.143*e,.715+n*(1-.715)+.14*e,.072+-.072*n+-.283*e,0,0,.213+-.213*n+-.787*e,.715+-.715*n+.715*e,.072+.928*n+.072*e,0,0,0,0,0,1,0],i)},o.contrast=function(t,e,i){var e=(e||0)+1,n=-128*(e-1);this._loadMatrix(t,[e,0,0,0,n,0,e,0,0,n,0,0,e,0,n,0,0,0,1,0],i)},o.saturate=function(t,e,i){var e=2*(e||0)/3+1,n=-.5*(e-1);this._loadMatrix(t,[e,n,n,0,0,n,e,n,0,0,n,n,e,0,0,0,0,0,1,0],i)},o.desaturate=function(t,e){this.saturate(t,-1,e)},o.negative=function(t,e){this._loadMatrix(t,[0,1,1,0,0,1,0,1,0,0,1,1,0,0,0,0,0,0,1,0],e)},o.sepia=function(t,e){this._loadMatrix(t,[.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0],e)},o.technicolor=function(t,e){this._loadMatrix(t,[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],e)},o.polaroid=function(t,e){this._loadMatrix(t,[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],e)},o.toBGR=function(t,e){this._loadMatrix(t,[0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0],e)},o.kodachrome=function(t,e){this._loadMatrix(t,[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],e)},o.browni=function(t,e){this._loadMatrix(t,[.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0],e)},o.vintage=function(t,e){this._loadMatrix(t,[.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0],e)},o.colorTone=function(t,e,i,n,r,s){var o=((n=n||16770432)>>16&255)/255,a=(n>>8&255)/255,n=(255&n)/255,h=((r=r||3375104)>>16&255)/255,l=(r>>8&255)/255,r=(255&r)/255,e=[.3,.59,.11,0,0,o,a,n,e=e||.2,0,h,l,r,i=i||.15,0,o-h,a-l,n-r,0,0];this._loadMatrix(t,e,s)},o.night=function(t,e,i){e=[-2*(e=e||.1),-e,0,0,0,-e,0,e,0,0,0,e,2*e,0,0,0,0,0,1,0];this._loadMatrix(t,e,i)},o.predator=function(t,e,i){this._loadMatrix(t,[11.224130630493164*e,-4.794486999511719*e,-2.8746118545532227*e,0*e,.40342438220977783*e,-3.6330697536468506*e,9.193157196044922*e,-2.951810836791992*e,0*e,-1.316135048866272*e,-3.2184197902679443*e,-4.2375030517578125*e,7.476448059082031*e,0*e,.8044459223747253*e,0,0,0,1,0],i)},o.lsd=function(t,e){this._loadMatrix(t,[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],e)},o.reset=function(t){this._loadMatrix(t,this.getDefaultColorMatrix(),!1)},o.kill=function(t,e,i){t.resetPipeline(e,i)},o._loadMatrix=function(t,e,i){var n=e;(i=!!i)&&(i=(i=t.pipelineData.colorMatrix)||o.getDefaultColorMatrix(),this._multiply(n,i,e),n=this._colorMatrix(n)),t.pipelineData.colorMatrix=n},o._multiply=function(t,e,i){return t[0]=e[0]*i[0]+e[1]*i[5]+e[2]*i[10]+e[3]*i[15],t[1]=e[0]*i[1]+e[1]*i[6]+e[2]*i[11]+e[3]*i[16],t[2]=e[0]*i[2]+e[1]*i[7]+e[2]*i[12]+e[3]*i[17],t[3]=e[0]*i[3]+e[1]*i[8]+e[2]*i[13]+e[3]*i[18],t[4]=e[0]*i[4]+e[1]*i[9]+e[2]*i[14]+e[3]*i[19],t[5]=e[5]*i[0]+e[6]*i[5]+e[7]*i[10]+e[8]*i[15],t[6]=e[5]*i[1]+e[6]*i[6]+e[7]*i[11]+e[8]*i[16],t[7]=e[5]*i[2]+e[6]*i[7]+e[7]*i[12]+e[8]*i[17],t[8]=e[5]*i[3]+e[6]*i[8]+e[7]*i[13]+e[8]*i[18],t[9]=e[5]*i[4]+e[6]*i[9]+e[7]*i[14]+e[8]*i[19],t[10]=e[10]*i[0]+e[11]*i[5]+e[12]*i[10]+e[13]*i[15],t[11]=e[10]*i[1]+e[11]*i[6]+e[12]*i[11]+e[13]*i[16],t[12]=e[10]*i[2]+e[11]*i[7]+e[12]*i[12]+e[13]*i[17],t[13]=e[10]*i[3]+e[11]*i[8]+e[12]*i[13]+e[13]*i[18],t[14]=e[10]*i[4]+e[11]*i[9]+e[12]*i[14]+e[13]*i[19],t[15]=e[15]*i[0]+e[16]*i[5]+e[17]*i[10]+e[18]*i[15],t[16]=e[15]*i[1]+e[16]*i[6]+e[17]*i[11]+e[18]*i[16],t[17]=e[15]*i[2]+e[16]*i[7]+e[17]*i[12]+e[18]*i[17],t[18]=e[15]*i[3]+e[16]*i[8]+e[17]*i[13]+e[18]*i[18],t[19]=e[15]*i[4]+e[16]*i[9]+e[17]*i[14]+e[18]*i[19],t},o._colorMatrix=function(t){t=new Float32Array(t);return t[4]/=255,t[9]/=255,t[14]/=255,t[19]/=255,t},o.getDefaultColorMatrix=function(){return[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0]},o);function o(t){return r.call(this,{game:t,vertShader:"\n precision mediump float;\n uniform mat4 uProjectionMatrix;\n\n attribute vec2 inPosition;\n attribute vec2 inTexCoord;\n attribute vec4 inTint;\n\n varying vec2 outTexCoord;\n varying vec4 outTint;\n\n void main () {\n gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);\n\n outTexCoord = inTexCoord;\n outTint = inTint;\n }\n ",fragShader:"precision mediump float;\n varying vec2 outTexCoord;\n uniform float m[20];\n uniform sampler2D uSampler;\n\n varying vec4 outTint;\n\n void main(void){\n vec4 c = texture2D(uSampler, outTexCoord) * vec4(outTint.rgb * outTint.a, outTint.a);\n\n gl_FragColor.r = (m[0] * c.r);\n gl_FragColor.r += (m[1] * c.g);\n gl_FragColor.r += (m[2] * c.b);\n gl_FragColor.r += (m[3] * c.a);\n gl_FragColor.r += m[4];\n gl_FragColor.g = (m[5] * c.r);\n gl_FragColor.g += (m[6] * c.g);\n gl_FragColor.g += (m[7] * c.b);\n gl_FragColor.g += (m[8] * c.a);\n gl_FragColor.g += m[9];\n gl_FragColor.b = (m[10] * c.r);\n gl_FragColor.b += (m[11] * c.g);\n gl_FragColor.b += (m[12] * c.b);\n gl_FragColor.b += (m[13] * c.a);\n gl_FragColor.b += m[14];\n gl_FragColor.a = (m[15] * c.r);\n gl_FragColor.a += (m[16] * c.g);\n gl_FragColor.a += (m[17] * c.b);\n gl_FragColor.a += (m[18] * c.a);\n gl_FragColor.a += m[19];\n }",uniforms:["m"]})||this}e.PLColorMatrix=s},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.PLMIXBlurColorMatrix=void 0,i(27)),i=(r=Phaser.Renderer.WebGL.Pipelines.SinglePipeline,s(a,r),a.prototype.onBoot=function(){this.set1fv("m",o.PLColorMatrix.getDefaultColorMatrix())},a.prototype.onBind=function(t){r.prototype.onBind.call(this);t=t.pipelineData;t.blurX&&this.set1f("blurX",t.blurX),t.blurY&&this.set1f("blurY",t.blurY),t.colorMatrix&&this.set1fv("m",t.colorMatrix)},a.prototype.onBatch=function(t){t&&this.flush()},a);function a(t){return r.call(this,{game:t,vertShader:"\n precision mediump float;\n uniform mat4 uProjectionMatrix;\n\n attribute vec2 inPosition;\n attribute vec2 inTexCoord;\n attribute vec4 inTint;\n\n varying vec2 outTexCoord;\n varying vec4 outTint;\n\n void main () {\n gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);\n\n outTexCoord = inTexCoord;\n outTint = inTint;\n }\n ",fragShader:"precision mediump float;\n varying vec2 outTexCoord;\n varying vec4 vColor;\n uniform float blurX;\n uniform float blurY;\n uniform sampler2D uSampler;\n\n uniform float m[20];\n varying vec4 outTint;\n\n void main(void) {\n //blur\n vec4 sum = vec4(0.0);\n sum += texture2D(uSampler, vec2(outTexCoord.x - 4.0*blurX, outTexCoord.y - 4.0*blurY)) * 0.05;\n sum += texture2D(uSampler, vec2(outTexCoord.x - 3.0*blurX, outTexCoord.y - 3.0*blurY)) * 0.09;\n sum += texture2D(uSampler, vec2(outTexCoord.x - 2.0*blurX, outTexCoord.y - 2.0*blurY)) * 0.12;\n sum += texture2D(uSampler, vec2(outTexCoord.x - blurX, outTexCoord.y - blurY)) * 0.15;\n\n sum += texture2D(uSampler, vec2(outTexCoord.x, outTexCoord.y)) * 0.16;\n\n sum += texture2D(uSampler, vec2(outTexCoord.x + blurX, outTexCoord.y + blurY)) * 0.15;\n sum += texture2D(uSampler, vec2(outTexCoord.x + 2.0*blurX, outTexCoord.y + 2.0*blurY)) * 0.12;\n sum += texture2D(uSampler, vec2(outTexCoord.x + 3.0*blurX, outTexCoord.y + 3.0*blurY)) * 0.09;\n sum += texture2D(uSampler, vec2(outTexCoord.x + 4.0*blurX, outTexCoord.y + 4.0*blurY)) * 0.05;\n\n //color matrix\n vec4 c = sum * vec4(outTint.rgb * outTint.a, outTint.a);\n\n gl_FragColor.r = (m[0] * c.r);\n gl_FragColor.r += (m[1] * c.g);\n gl_FragColor.r += (m[2] * c.b);\n gl_FragColor.r += (m[3] * c.a);\n gl_FragColor.r += m[4];\n gl_FragColor.g = (m[5] * c.r);\n gl_FragColor.g += (m[6] * c.g);\n gl_FragColor.g += (m[7] * c.b);\n gl_FragColor.g += (m[8] * c.a);\n gl_FragColor.g += m[9];\n gl_FragColor.b = (m[10] * c.r);\n gl_FragColor.b += (m[11] * c.g);\n gl_FragColor.b += (m[12] * c.b);\n gl_FragColor.b += (m[13] * c.a);\n gl_FragColor.b += m[14];\n gl_FragColor.a = (m[15] * c.r);\n gl_FragColor.a += (m[16] * c.g);\n gl_FragColor.a += (m[17] * c.b);\n gl_FragColor.a += (m[18] * c.a);\n gl_FragColor.a += m[19];\n }",uniforms:["blurX","blurY","m"]})||this}e.PLMIXBlurColorMatrix=i},function(t,e,i){"use strict";var n,s,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),i=(Object.defineProperty(e,"__esModule",{value:!0}),e.JDImageSkew=void 0,s=i(54).JDImagePivot,r(o,s),o.prototype.setSkew=function(t,e){this.skewX=t,this.skewY=e},Object.defineProperty(o.prototype,"skewX",{get:function(){return this._skewX},set:function(t){this._skewX=this.checkSkewValue(t)},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"skewY",{get:function(){return this._skewY},set:function(t){this._skewY=this.checkSkewValue(t)},enumerable:!1,configurable:!0}),o.prototype.checkSkewValue=function(t){return t>Math.PI?t=-(Math.PI-(t-Math.PI)):t<-Math.PI&&(t=Math.PI+(t+Math.PI)),t},o);function o(t,e,i,n,r){t=s.call(this,t,e,i,n,r)||this;return t._skewX=0,t._skewY=0,t._srB=0,t._srC=0,t._crA=1,t._crD=1,t._cachedRotX=0,t._cachedRotY=0,t}e.JDImageSkew=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.JDTextTranslated=void 0,i(10)),a=i(16),i=(r=o.JDTextFit,s(h,r),h.prototype.setText=function(t,e){return void 0===e&&(e=""),this.setKey(t),this.updateTranslate(e),this},h.prototype.setKey=function(t){this.key=t},h.prototype.getLocale=function(){return a.Localization.getText(this.key)},h.prototype.updateTranslate=function(t){void 0===t&&(t=""),r.prototype.setText.call(this,this.getLocale()+t)},h.prototype.setTextNoLocale=function(t){r.prototype.setText.call(this,t)},h);function h(){return null!==r&&r.apply(this,arguments)||this}e.JDTextTranslated=i},function(t,e,i){"use strict";function n(t,e,i,n,r,s){this.currTimeScale=1,this.isPaused=!1,this.isPlaying=!1,this.scene=t,this.spine=t.make.spine({key:n,animationName:r,loop:s},!1),this.x=e,this.y=i}Object.defineProperty(e,"__esModule",{value:!0}),e.JDSpineGameObject=void 0,n.prototype.pause=function(){this.isPaused=!0,this.spine.timeScale=0},n.prototype.resume=function(){this.isPaused=!1,this.spine.timeScale=this.currTimeScale},n.prototype.stop=function(){this.spine.timeScale=0,this.isPlaying=!1},n.prototype.getView=function(){return this.spine},n.prototype.updateAnim=function(){this.spine.preUpdate(0,0)},n.prototype.setSkin=function(t){this.spine.setSkinByName(t)},n.prototype.play=function(t,e,i,n){this.currTimeScale=i=void 0===i?1:i,this.spine.timeScale=this.currTimeScale,this.spine.play(t,e,n),this.isPlaying=!0,this.currAnimationName=t},n.prototype.playFromProgress=function(t,e,i,n,r){this.play(t,i,n=void 0===n?1:n,r),this.spine.state.getCurrent(0)&&(this.spine.state.getCurrent(0).trackTime=this.getCurrentAnimationDuration()*e)},n.prototype.getCurrentAnimationName=function(){return this.currAnimationName},n.prototype.getCurrentAnimationDuration=function(){return this.spine.getCurrentAnimation()?this.spine.getCurrentAnimation().duration:0},n.prototype.getAnimationDuration=function(t){return this.spine.findAnimation(t).duration},n.prototype.getAnimationProgress=function(){var t;return this.spine.state.getCurrent(0)?(t=this.getCurrentAnimationDuration(),this.spine.state.getCurrent(0).trackTime%t/t):0},Object.defineProperty(n.prototype,"x",{get:function(){return this.spine.x},set:function(t){this.spine.x=t},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"y",{get:function(){return this.spine.y},set:function(t){this.spine.y=t},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"rotation",{get:function(){return this.spine.rotation},set:function(t){this.spine.rotation=t},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"scaleX",{get:function(){return this.spine.scaleX},set:function(t){this.spine.scaleX=t},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"scaleY",{get:function(){return this.spine.scaleY},set:function(t){this.spine.scaleY=t},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"visible",{get:function(){return this.spine.visible},set:function(t){this.spine.visible=t},enumerable:!1,configurable:!0}),n.prototype.destroy=function(){this.scene=null,this.spine=null},n.EVENT_COMPLETE="complete",n.EVENT_DISPOSE="dispose",n.EVENT_END="end",n.EVENT_EVENT="event",n.EVENT_INTERRUPTED="interrupted",n.EVENT_START="start",e.JDSpineGameObject=n},function(t,e,i){"use strict";var n,h,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),r=(Object.defineProperty(e,"__esModule",{value:!0}),e.JDImageNineSlice=void 0,h=Phaser.GameObjects.RenderTexture,r(c,h),c.defaultSliceConfig=function(t){"number"==typeof t.sourceLayout.width&&(i=(n=t.sourceLayout).width,n=n.height,t.sourceLayout={topLeft:{width:i,height:n}});var e,i=t.sourceLayout,n=(i.topRight=i.topRight||i.topLeft,i.bottomRight=i.bottomRight||i.topLeft,i.bottomLeft=i.bottomLeft||i.topLeft,Math.max(i.topLeft.height,i.topRight.height)),r=Math.max(i.topRight.width,i.bottomRight.width),s=Math.max(i.bottomLeft.height,i.bottomRight.height),i=Math.max(i.topLeft.width,i.bottomLeft.width);return t.safeOffsets||(t.safeOffsets={top:n,right:r,bottom:s,left:i}),void 0===t.minSizing||!1!==t.minSizing?(e=t.safeOffsets,t.minSizing={width:e?Math.max(e.left+e.right,i+r):i+r,height:e?Math.max(e.top+e.bottom,n+s):n+s}):t.minSizing=!1,t},c.shortSliceLayout=function(t){return{tl:{x:t.topLeft.width,y:t.topLeft.height},tr:{x:t.topRight.width,y:t.topRight.height},bl:{x:t.bottomLeft.width,y:t.bottomLeft.height},br:{x:t.bottomRight.width,y:t.bottomRight.height}}},c.prototype.changeFrame=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=0),this.sourceFrame=this.sourceTex.get(t),this.initFrames(),0===e&&0===i?this.drawFrames():this.resize(e,i)},c.prototype.resize=function(t,e){var i,n;this.sliceConfig&&(i=(n=this.sliceConfig.minSizing)?Math.max(n.height,e):e,n=n?Math.max(n.width,t):t,(e<i||t<n)&&"Attempted to set NineSlice size less than minimum (".concat(t,"x").concat(e,")."),h.prototype.resize.call(this,n,i),this.drawFrames())},c.prototype.initFrames=function(){function t(t,e,i,n,r){var s=(s="__BASE"===(s=o.sourceFrame.name)?o.sourceTex.key:s)+t;a.has(s)?o._frameCache[t]=a.frames[s]:o._frameCache[t]=a.add(s,0,h+e,l+i,n,r)}var o=this,a=this.sourceTex,e=this.sourceFrame.width,i=this.sourceFrame.height,h=this.sourceFrame.cutX,l=this.sourceFrame.cutY,n=c.shortSliceLayout(this.sliceConfig.sourceLayout),r=(t("topLeft",0,0,n.tl.x,n.tl.y),t("topRight",e-n.tr.x,0,n.tr.x,n.tr.y),t("bottomRight",e-n.br.x,i-n.br.y,n.br.x,n.br.y),t("bottomLeft",0,i-n.bl.y,n.bl.x,n.bl.y),t("topMiddle",n.tl.x,0,e-(n.tl.x+n.tr.x),Math.max(n.tl.y,n.tr.y)),t("bottomMiddle",n.bl.x,i-Math.max(n.bl.y,n.br.y),e-(n.bl.x+n.br.x),Math.max(n.bl.y,n.br.y)),t("leftMiddle",0,n.tl.y,Math.max(n.tl.x,n.bl.x),i-(n.tl.y+n.bl.y)),t("rightMiddle",e-Math.max(n.tr.x,n.br.x),n.tr.y,Math.max(n.tr.x,n.br.x),i-n.tr.y-n.br.y),Math.min(n.tl.x,n.bl.x)),s=Math.min(n.tl.y,n.tr.y);t("center",r,s,e-r-Math.min(n.tr.x,n.br.x),i-s-Math.min(n.br.y,n.bl.y))},c.prototype.drawFrames=function(){function t(t,e,i,n,r){s?s.setFrame(t.name):(s=new Phaser.GameObjects.Image(o.scene,0,0,o.sourceTex.key,t.name)).setOrigin(0),s.setScale(n/t.width,r/t.height),o.draw(s,e,i)}var s,o=this,e=c.shortSliceLayout(this.sliceConfig.sourceLayout),i=this._frameCache,n=Math.min(e.tl.x,e.bl.x),r=Math.min(e.tr.x,e.br.x),a=Math.min(e.tl.y,e.tr.y),h=Math.min(e.bl.y,e.br.y);this.clear(),t(i.center,n,a,this.width-n-r,this.height-a-h),t(i.topMiddle,e.tl.x,0,this.width-e.tl.x-e.tr.x,i.topMiddle.height),t(i.bottomMiddle,e.bl.x,this.height-i.bottomMiddle.height,this.width-e.bl.x-e.br.x,i.bottomMiddle.height),t(i.leftMiddle,0,e.tl.y,i.leftMiddle.width,this.height-e.tl.y-e.bl.y),t(i.rightMiddle,this.width-e.tr.x,e.tr.y,i.rightMiddle.width,this.height-e.tr.y-e.br.y),t(i.topLeft,0,0,e.tl.x,e.tl.y),t(i.topRight,this.width-e.tr.x,0,e.tr.x,e.tr.y),t(i.bottomRight,this.width-e.br.x,this.height-e.br.y,e.br.x,e.br.y),t(i.bottomLeft,0,this.height-e.bl.y,e.bl.x,e.bl.y),s.destroy()},c);function c(t,e,i,n,r,s,o,a){e=h.call(this,t,e,i,n,r)||this,i={sourceKey:s.key,sourceFrame:s.frame,sourceLayout:{width:o,height:o}},a&&(i.safeOffsets={top:a,right:a,bottom:a,left:a}),e.sliceConfig=c.defaultSliceConfig(i),e.sourceTex=t.sys.textures.get(s.key),e._frameCache={},n="string"==typeof s.frame||"number"==typeof s.frame?s.frame:"__BASE";return e.sourceFrame=e.sourceTex.get(n),e.initFrames(),e.setOrigin(.5,.5),e}e.JDImageNineSlice=r},function(t,e,i){"use strict";function r(t,e,i,n){void 0===i&&(i=0),void 0===n&&(n=0),this.x=0,this.y=0,this.scaleX=1,this.scaleY=1,this.rotation=0,this.graphics=new Phaser.GameObjects.Graphics(t),this.graphics.parentContainer=e,r.tempMatrix||(r.tempMatrix=new Phaser.GameObjects.Components.TransformMatrix,r.parentMatrix=new Phaser.GameObjects.Components.TransformMatrix),this.x=i,this.y=n}Object.defineProperty(e,"__esModule",{value:!0}),e.JDMaskParent=void 0,r.prototype.addUpdateTransformEvents=function(){this.graphics.scene.events.on(Phaser.Scenes.Events.PRE_RENDER,this.updateParentTransform,this)},r.prototype.setXY=function(t,e){this.x=t,this.y=e},r.prototype.updateParentTransform=function(){this.graphics.parentContainer.getWorldTransformMatrix(r.tempMatrix,r.parentMatrix),this.graphics.x=r.tempMatrix.getX(this.x,this.y),this.graphics.y=r.tempMatrix.getY(this.x,this.y),this.graphics.scaleX=r.tempMatrix.scaleX*this.scaleX,this.graphics.scaleY=r.tempMatrix.scaleY*this.scaleY,this.graphics.rotation=r.tempMatrix.rotation+this.rotation},r.prototype.updateParentScale=function(){this.graphics.parentContainer.getWorldTransformMatrix(r.tempMatrix,r.parentMatrix),this.graphics.scaleX=r.tempMatrix.scaleX*this.scaleX,this.graphics.scaleY=r.tempMatrix.scaleY*this.scaleY},r.prototype.destroy=function(){this.graphics.scene.events.off(Phaser.Scenes.Events.POST_UPDATE,this.updateParentTransform,this),this.graphics.destroy(),this.graphics=null},e.JDMaskParent=r},function(t,e,i){"use strict";var n,a,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),h=(Object.defineProperty(e,"__esModule",{value:!0}),e.InputBox=void 0,i(38)),i=(a=Phaser.GameObjects.Graphics,r(s,a),s.prototype.drawBg=function(t,e,i,n,r,s,o){this.fillStyle(t,o=void 0===o?1:o),0<s?this.fillRoundedRect(e,i,n,r,s):this.fillRect(e,i,n,r)},s.prototype.drawBorder=function(t,e,i,n,r,s,o){this.lineStyle(t,e,1),0<o?this.strokeRoundedRect(i,n,r,s,o):this.strokeRect(i,n,r,s)},s);function s(t,e,i,n){var t=a.call(this,t)||this,r=e.bgWidth,s=e.bgHeight,o=e.bgRadius,i=-r*i,n=-s*n;return e.bgShow===h.JDTextInputBg.none?t.drawBg(e.bgColor,i,n,r,s,o=0,0):e.bgShow===h.JDTextInputBg.both?(t.drawBg(e.bgColor,i,n,r,s,o),t.drawBorder(e.bgBorderThickness,e.bgBorderColor,i,n,r,s,o)):e.bgShow===h.JDTextInputBg.bg?t.drawBg(e.bgColor,i,n,r,s,o):e.bgShow===h.JDTextInputBg.border&&t.drawBorder(e.bgBorderThickness,e.bgBorderColor,i,n,r,s,o),t.setInteractive(new Phaser.Geom.Rectangle(i,n,r,s),Phaser.Geom.Rectangle.Contains),t.input.cursor="text",t}e.InputBox=i},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InputDom=void 0;var n=i(56),r=i(38);function s(t){var e=this,t=(this.srcMatrix=new Phaser.GameObjects.Components.TransformMatrix,this.camMatrix=new Phaser.GameObjects.Components.TransformMatrix,this.calcMatrix=new Phaser.GameObjects.Components.TransformMatrix,this.domInput=document.createElement("input"),t.domContainer.appendChild(this.domInput),this.domInput.style);t.position="absolute",t.background="none",t.border="none",t.outline="none",t.display="none",t.pointerEvents="auto",this.domInput.addEventListener("keydown",function(t){return e.onKeyDown(t)})}s.prototype.onKeyDown=function(t){"Enter"!==t.key&&"Escape"!==t.key||n.InputField.endFocus(),!0===n.InputField.blockInput&&t.stopPropagation&&t.stopPropagation(),!0!==this.isNumber||"Backspace"===t.key||"Delete"===t.key||!0!==isNaN(Number(this.domInput.value+t.key))||"ArrowLeft"!==t.key&&"ArrowRight"!==t.key&&"-"!==t.key&&t.preventDefault()},s.prototype.focus=function(t,e){var i=this.domInput.style;i.fontSize=t.fontSize+"px",i.fontFamily=t.fontFamily,i.color=t.inputTextColor,i.textAlign=t.textAlign,this.domWidth=t.bgWidth-2*t.textBorderOffX,this.domHeight=t.bgHeight-2*t.textBorderOffY,i.width=this.domWidth+"px",i.height=this.domHeight+"px",i.display="block",t.type===r.JDTextInputType.number?(this.domInput.type=r.JDTextInputType.text,this.isNumber=!0):(this.domInput.type=t.type,this.isNumber=!1),this.domInput.value=e,this.domInput.focus()},s.prototype.blur=function(){this.domInput.style.display="none",this.domInput.blur(),this.domInput.value=""},s.prototype.getValue=function(){return this.domInput.value},s.prototype.render=function(t,e,i){var n=t.parentContainer,r=e.alpha*t.alpha,n=(n&&(r*=n.alpha),t.inputText),s=this.domInput.style,o=e.scrollX*t.scrollFactorX,a=e.scrollY*t.scrollFactorY,e=(this.camMatrix.copyFrom(e.matrix),this.domWidth*n.originX),h=this.domHeight*n.originY,e=t.x-e+(n.x-1)*t.scaleX,h=t.y-h+n.y*t.scaleY;this.srcMatrix.applyITRS(e,h,t.rotation,t.scaleX,t.scaleY),i?(this.camMatrix.multiplyWithOffset(i,-o,-a),s.transformOrigin="0% 0%"):(this.camMatrix.translate(-o,-a),s.transformOrigin=100*n.originX+"% "+100*n.originY+"%"),this.camMatrix.multiply(this.srcMatrix,this.calcMatrix),s.opacity=""+r,s.transform=this.calcMatrix.getCSSMatrix()},e.InputDom=s},function(t,e,i){"use strict";var n,a,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),i=(Object.defineProperty(e,"__esModule",{value:!0}),e.JD9SliceContainer=void 0,a=i(57).JD9SliceBase,r(s,a),s.prototype.setInteractive=function(){this.view.setInteractive(new Phaser.Geom.Rectangle(-this.originOffX,-this.originOffY,this.width,this.height),Phaser.Geom.Rectangle.Contains)},s.prototype.drawFrame=function(t,e,i,n,r,s){var o;this.view.getAt(this.imgID)?((o=this.view.getAt(this.imgID)).texture.key!==t.tKey&&o.setTexture(t.tKey),o.setFrame(e.name)):((o=new Phaser.GameObjects.Image(this.scene,0,0,t.tKey,e.name)).setOrigin(0),this.view.add(o)),o.setScale(r/e.width,s/e.height),o.x=t.x+i-this.originOffX,o.y=t.y+n-this.originOffY,this.tintFragments(o,e.name),this.imgID+=1},s.prototype.clear=function(){a.prototype.clear.call(this),this.view.removeAll()},s.prototype.drawFrames=function(t){this.imgID=9*t,a.prototype.drawFrames.call(this,t)},s.prototype.addGameObject=function(t){this.view.add(t)},s.prototype.destroyInternal=function(){a.prototype.destroyInternal.call(this),this.view=null},s);function s(t,e,i,n,r,s,o){n=a.call(this,t,n,r,s=void 0===s?0:s,o=void 0===o?0:o)||this;return n.addView(new Phaser.GameObjects.Container(t,e,i)),n.originOffX=n.width*n.originX,n.originOffY=n.height*n.originY,n}e.JD9SliceContainer=i},function(t,e,i){"use strict";var n,h,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),i=(Object.defineProperty(e,"__esModule",{value:!0}),e.JD9SliceRenderTexture=void 0,h=i(57).JD9SliceBase,r(s,h),s.prototype.setInteractive=function(){this.view.setInteractive()},s.prototype.drawFrame=function(t,e,i,n,r,s){this.frameImage?(this.frameImage.texture.key!==t.tKey&&this.frameImage.setTexture(t.tKey),this.frameImage.setFrame(e.name)):(this.frameImage=new Phaser.GameObjects.Image(this.scene,0,0,t.tKey,e.name),this.frameImage.setOrigin(0)),this.frameImage.setScale(r/e.width,s/e.height),this.tintFragments(this.frameImage,e.name),this.drawGameObject(this.frameImage,t.x+i,t.y+n)},s.prototype.drawGameObject=function(t,e,i){this.view.draw(t,e=void 0===e?0:e,i=void 0===i?0:i)},s.prototype.saveAsTexture=function(t){this.view.saveTexture(t)},s.prototype.clear=function(){h.prototype.clear.call(this),this.view.clear()},s.prototype.resize=function(t,e){this.width=t,this.height=e,this.view.resize(t,e)},s.prototype.draw=function(){this.view.clear(),h.prototype.draw.call(this),this.frameImage.destroy(),this.frameImage=null},s.prototype.destroyInternal=function(){h.prototype.destroyInternal.call(this),this.frameImage=null,this.view=null},s);function s(t,e,i,n,r,s,o){var a=h.call(this,t,n,r,s=void 0===s?0:s,o=void 0===o?0:o)||this;return a.addView(new Phaser.GameObjects.RenderTexture(t,e,i,n,r)),a.view.setOrigin(s,o),a}e.JD9SliceRenderTexture=i},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TexturesEdit=void 0;var n=i(0),r=i(2);function s(){}s.init=function(t){for(var e=0;e<r.BalanceData.basicBlockColorFrames;e++)this.changeFrameSize(t.textures.getFrame(n.Atlases.gameplay,"basicBlockColors "+(1e4+e)),100,100,2,2),this.changeFrameSize(t.textures.getFrame(n.Atlases.gameplay,"leftSlopeColors "+(1e4+e)),100,100,2,2);for(this.changeFrameSize(t.textures.getFrame(n.Atlases.gameplay,"swimmingPool 10000"),100,100,2,2),this.changeFrameSize(t.textures.getFrame(n.Atlases.gameplay,"swimmingPool 10001"),100,100,2,2),this.changeFrameSize(t.textures.getFrame(n.Atlases.gameplay,"whiteBlock 10000"),100,100,2,2),this.changeFrameSize(t.textures.getFrame(n.Atlases.gameplay,"whiteLine 10000"),100,2,2,0),this.changeFrameSize(t.textures.getFrame(n.Atlases.ui,"top_bar 10000"),62,64,2,0),e=0;e<60;e++)this.changeFrameSize(t.textures.getFrame(n.Atlases.gameplay,"finish "+(1e4+e)),44,52,2,2);var i=new Phaser.GameObjects.Graphics(t);i.fillStyle(16777215),i.fillRoundedRect(0,0,390,70,{tl:20,tr:20,bl:0,br:0}),i.generateTexture("texTrophieTab",390,70),i.destroy()},s.changeFrameSize=function(t,e,i,n,r){t.setSize(e,i,t.cutX+n,t.cutY+r)},s.getPanelBgTexture=function(t,e,i,n){n="panelBg"+e+i+(n=void 0===n?"":n);return!1===t.textures.exists(n)&&((t=new Phaser.GameObjects.Graphics(t)).fillStyle(19660),t.fillRect(0,0,e,i),t.lineStyle(4,9823743),t.strokeRect(5,5,e-10,i-10),t.generateTexture(n,e,i),t.destroy(),t=null),n},e.TexturesEdit=s},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DetectNoBlood=void 0;var n=i(0),r=i(2);function s(){}s.detect=function(t){var e=n.Jsons.getJson(t,"domains_no_blood"),i=window.location!==window.parent.location?document.referrer:document.location.href;!0===this.isUrl(i,e)&&(r.BalanceData.noBlood=!0),t.cache.json.remove("domains_no_blood")},s.isUrl=function(t,e){for(var i=0;i<e.length;i++)if(-1<t.indexOf(e[i]))return!0;return!1},e.DetectNoBlood=s},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.WorldCreator=void 0,i(108)),v=i(2),a=i(17),h=i(64),x=i(29),b=i(214),l=i(232),w=i(20),c=i(39),u=i(19),T=i(72),S=i(241),i=(r=o.WorldLayers,s(d,r),d.prototype.portalGetColorHue=function(){return this.portalColors[this.portalColorsCount]},d.prototype.portalCalcNextColor=function(){this.portalColorsCount+=1,this.portalColorsCount===this.portalColors.length&&--this.portalColorsCount},d.prototype.create=function(){this.testLine=new SAT.Polygon(new SAT.Vector(0,0),[new SAT.Vector(0,0),new SAT.Vector(0,0)]),this.testLine2=new SAT.Polygon(new SAT.Vector(0,0),[new SAT.Vector(0,0),new SAT.Vector(0,0)]),this.player=new h.Player(this),this.levels=new l.Levels,this.loadLevels(),this.input.on(Phaser.Input.Events.POINTER_MOVE,this.onPointerMove,this)},d.prototype.loadLevels=function(){this.levels.loadLevels(this)},d.prototype.setBackgrounColor=function(){this.currentLevel?this.background.tint=this.currentLevel.bgColor:this.background.tint=10999295},d.prototype.resetVars=function(){this.effectsOverlay.hideDark(),this.blocks=[],this.solarBlocks=[],this.slopes=[],this.obstacles=[],this.ziplines=[],this.ropes=[],this.poles=[],this.pools=[],this.items=[],this.wires=[],this.elevatorEliminator=[],this.elevators=[],this.misc=[],this.actBlocks={},this.wireTrail=null,this.vexTNT=null,this.particleManager.reset()},d.prototype.createLevelPlayerSpawn=function(t){var e,i;this.createLevel(t),this.currLevelID===v.BalanceData.hubID?this.prevLevelID===v.BalanceData.towerID&&!0===this.playerEnterTowerBlock||this.prevLevelID&&this.prevLevelID!==v.BalanceData.mainmenuID&&this.prevLevelID!==v.BalanceData.towerID?(i=(!0===this.isCurrLevelHard?(e=this.actBlocks[this.prevLevelID+"true"].xPos,this.actBlocks[this.prevLevelID+"true"]):(e=this.actBlocks[this.prevLevelID+"false"].xPos,this.actBlocks[this.prevLevelID+"false"])).topEdge,this.playerEnterTowerBlock=!1):i=0<v.BalanceData.levelsCompleted?null===(t=a.SaveGame.getInstance().getCheckPoint())?(e=this.actBlocks[v.BalanceData.levelsCompleted+"false"].xPos,this.actBlocks[v.BalanceData.levelsCompleted+"false"].topEdge):(e=t.x,t.y):(e=this.spawnX,this.spawnY):(this.currLevelID===v.BalanceData.vexID&&(this.wireTrail=new w.WireTrail(this),this.wireTrail.addWires(this.wires)),i=-1!==this.prevLevelID.indexOf("skin")?(e=this.actBlocks[this.prevLevelID+"false"].xPos,this.actBlocks[this.prevLevelID+"false"].topEdge):(e=this.spawnX,this.spawnY)),this.player.spawn({x:e,y:i}),this.state=c.GameStates.Playing,this.cameraZoom=1.5},d.prototype.createLevel=function(t){for(var e=this.towerEndY,i=null,n=null,r=null,s=0,o=0;o<t.length;o++){var a=t[o];if(this.currLevelID!==v.BalanceData.hubID||!(a.delActNum&&a.delActNum<=v.BalanceData.levelsCompleted||a.createActNum&&a.createActNum>v.BalanceData.levelsCompleted)){var h=a.id,l=(a.y+=e,void 0),c=void 0;switch(h){case"spawnPoint":this.spawnX=a.x,this.spawnY=a.y;break;case"actTower":(l=new x.ActTower(this,this.layerTopObstacle)).spawn(a),this.blocks.push(l),this.actBlocks[v.BalanceData.towerID+"false"]=l;break;case"basicBlock":(l=new x.BasicBlock(this,this.layerBlocks)).spawn(a),this.blocks.push(l);break;case"verticalBlock":(l=new x.VerticalBlock(this,this.layerBlocks)).spawn(a),this.blocks.push(l);break;case"horizontalBlock":(l=new x.HorizontalBlock(this,this.layerBlocks)).spawn(a),this.blocks.push(l);break;case"fallingBlock":(l=new x.FallingBlock(this,this.layerBlocks)).spawn(a),this.blocks.push(l);break;case"bounceBlock":(l=new x.BounceBlock(this,this.layerBlocks)).spawn(a),this.blocks.push(l);break;case"pushBlock":(l=new x.PushBlock(this,this.layerBlocks)).spawn(a),this.blocks.push(l);break;case"iceBlock":(l=new x.IceBlock(this,this.layerBlocks)).spawn(a),this.blocks.push(l);break;case"glassBlock":(l=new x.GlassBlock(this,this.layerBlocks)).spawn(a),this.blocks.push(l);break;case"speedBlock":(l=new x.SpeedBlock(this,this.layerBlocks,1)).spawn(a),this.blocks.push(l);break;case"speedBlockLeft":(l=new x.SpeedBlock(this,this.layerBlocks,-1)).spawn(a),this.blocks.push(l);break;case"sparkBlock":(l=new x.SparkBlock(this,this.layerBlocks)).spawn(a),this.blocks.push(l);break;case"solarBlock":(l=new x.SolarBlock(this,this.layerBlocks)).spawn(a),this.blocks.push(l),this.solarBlocks.push(l);break;case"invisBlock":(l=new x.InvisBlock(this,this.layerBlocks)).spawn(a),this.blocks.push(l);break;case"invisBlockUp":(l=new x.InvisBlockUp(this,this.layerBlocks)).spawn(a),this.blocks.push(l);break;case"invisBlockDown":(l=new x.InvisBlockDown(this,this.layerBlocks)).spawn(a),this.blocks.push(l);break;case"explosiveBlock":(l=new x.ExplosiveBlock(this,this.layerBlocks)).spawn(a),this.blocks.push(l);break;case"blockedWall":(l=new x.BlockedWall(this,this.layerObstacle)).spawn(a),this.blocks.push(l);break;case"actBlock":(l=new x.ActBlock(this,this.layerTopObstacle,a.actNum,!1)).spawn(a),this.blocks.push(l),this.actBlocks[a.actNum+"false"]=l;break;case"actBlockHard":(l=new x.ActBlock(this,this.layerTopObstacle,a.actNum,!0)).spawn(a),this.blocks.push(l),!1===(this.actBlocks[a.actNum+"true"]=l).hardEnabled&&((c=new w.SpikeActBlockHard(this,this.layerTopObstacle)).spawn({x:a.x,y:a.y-78,rotation:0}),this.obstacles.push(c));break;case"skinsBlock":(l=new x.SkinsBlock(this,this.layerTopObstacle,s)).spawn(a),this.blocks.push(l),(this.actBlocks["skin"+s+"false"]=l).levelStart(),s+=1;break;case"swimmingPool":(l=new x.SwimmingPool(this,this.layerPool)).spawn(a),this.pools.push(l);break;case"leftSlope":(l=new x.Slope(this,this.layerBlocks,-1)).spawn(a),this.slopes.push(l);break;case"rightSlope":(l=new x.Slope(this,this.layerBlocks,1)).spawn(a),this.slopes.push(l);break;case"ziplinePole":(l=new T.ZiplinePole(this,this.layerObstacle)).spawn(a),i=i?(this.ziplines.push(i.attach(l)),null):l,this.misc.push(l);break;case"pole":(l=new T.Pole(this,this.layerTopObstacle)).spawn(a),this.poles.push(l);break;case"checkpoint":(l=new b.Checkpoint(this,this.layerObstacle,!1)).spawn(a),this.items.push(l);break;case"checkpointSwimming":var u=new b.Checkpoint(this,this.layerObstacle,!0);u.spawn(a),this.items.push(u);break;case"checkpointHome":(l=new b.CheckpointHome(this,this.layerObstacle,!1)).spawn(a),this.items.push(l);break;case"coin":(l=new b.Coin(this,this.layerTopObstacle)).spawn(a),this.items.push(l);break;case"skinSpin":(l=new b.SkinSpin(this,this.layerTopObstacle,a.rarity)).spawn(a),this.items.push(l);break;case"windBlaster":(l=new b.WindBlaster(this,this.layerObstacle)).spawn(a),this.items.push(l);break;case"finishPortal":(l=new b.FinishPortal(this,this.layerObstacle)).spawn(a),this.items.push(l);break;case"lockBlock":(l=new x.LockBlock(this,this.layerBlocks)).spawn(a),this.blocks.push(l);break;case"key":(l=new b.Key(this,this.layerObstacle)).spawn(a),this.items.push(l);break;case"timedKey":(l=new b.TimedKey(this,this.layerObstacle)).spawn(a),this.items.push(l);break;case"torch":(l=new b.Torch(this,this.layerObstacle)).spawn(a),this.items.push(l);break;case"circularCannon":(l=new b.CircularCannon(this,this.layerTopObstacle)).spawn(a),this.items.push(l);break;case"lightSwitch":(l=new b.LightSwitch(this,this.layerTopObstacle)).spawn(a),this.items.push(l);break;case"wire":(l=new T.Wire(this,this.layerTopObstacle)).spawn(a),this.wires.push(l);break;case"buzzsaw":(l=new w.Buzzsaw(this,this.layerObstacle)).spawn(a),this.obstacles.push(l);break;case"buzzsawVertical":(l=new w.BuzzsawVertical(this,this.layerObstacle)).spawn(a),this.obstacles.push(l);break;case"buzzsawHorizontal":(l=new w.BuzzsawHorizontal(this,this.layerObstacle)).spawn(a),this.obstacles.push(l);break;case"buzzsawBouncing":(l=new w.BuzzsawBouncing(this,this.layerObstacle)).spawn(a),this.obstacles.push(l);break;case"buzzsawEnlarging":(l=new w.BuzzsawEnlarging(this,this.layerObstacle)).spawn(a),this.obstacles.push(l);break;case"buzzsawOnStick":(l=new w.BuzzsawOnStick(this,this.layerTopObstacle)).spawn(a),this.obstacles.push(l);break;case"spike":(l=new w.Spike(this,this.layerObstacle)).spawn(a),this.obstacles.push(l);break;case"spike5x":(l=new w.Spike5x(this,this.layerObstacle)).spawn(a),this.obstacles.push(l);break;case"spike10x":(l=new w.Spike10x(this,this.layerObstacle)).spawn(a),this.obstacles.push(l);break;case"spike15x":(l=new w.Spike15x(this,this.layerObstacle)).spawn(a),this.obstacles.push(l);break;case"spike20x":(l=new w.Spike20x(this,this.layerObstacle)).spawn(a),this.obstacles.push(l);break;case"spike25x":(l=new w.Spike25x(this,this.layerObstacle)).spawn(a),this.obstacles.push(l);break;case"spike30x":(l=new w.Spike30x(this,this.layerObstacle)).spawn(a),this.obstacles.push(l);break;case"fallingSpike":(l=new w.FallingSpike(this,this.layerObstacle)).spawn(a),this.obstacles.push(l);break;case"shurikanSpawner":(l=new w.ShurikanSpawner(this,this.layerObstacle)).spawn(a),this.obstacles.push(l);break;case"classicLaser":(l=new w.ClassicLaser(this,this.layerTopObstacle)).spawn(a),this.obstacles.push(l);break;case"classicLaserStatic":(l=new w.ClassicLaserStatic(this,this.layerTopObstacle)).spawn(a),this.obstacles.push(l);break;case"quadrantRight":(l=new w.Quadrant(this,this.layerObstacle,2)).spawn(a),this.obstacles.push(l);break;case"quadrantLeft":(l=new w.Quadrant(this,this.layerObstacle,-2)).spawn(a),this.obstacles.push(l);break;case"laserPoint":n=n?((l=new w.LaserPoint(this,this.layerObstacle)).spawn(n.x,n.y,a.x,a.y),this.obstacles.push(l),null):new Phaser.Geom.Point(a.x,a.y);break;case"reaper":(l=new w.Reaper(this,this.layerObstacle)).spawn(a),this.obstacles.push(l);break;case"shurikanDispenser":(l=new w.ShurikanDispenser(this,this.layerObstacle)).spawn(a),this.obstacles.push(l);break;case"hazardStrips":(l=new T.HazardStrips(this,this.layerTopObstacle)).spawn(a),this.misc.push(l);break;case"breatheBlaster":(l=new b.BreatheBlaster(this,this.layerObstacle)).spawn(a),this.items.push(l);break;case"textFade":(l=new b.FadeText(this,this.layerText)).spawn(a),this.items.push(l);break;case"arrowFade":(l=new b.FadeArrow(this,this.layerText)).spawn(a),this.items.push(l);break;case"portal":(l=new b.Portal(this,this.layerTopObstacle,this.portalGetColorHue())).spawn(a),r?(l.attachPortal(r),r.attachPortal(l),r=null,this.portalCalcNextColor()):r=l,this.items.push(l);break;case"elevatorGeneratorUp":l=new x.ElevatorGenerator(this,this.layerTopObstacle),c=new w.Spike15x(this,this.layerObstacle),this.obstacles.push(c),l.addSpikes(c,!0),l.spawn(a),this.blocks.push(l);break;case"elevatorGeneratorDown":l=new x.ElevatorGenerator(this,this.layerTopObstacle),c=new w.Spike15x(this,this.layerObstacle),this.obstacles.push(c),l.addSpikes(c,!1),l.spawn(a),this.blocks.push(l);break;case"elevatorEliminatorUp":l=new x.ElevatorEliminator(this,this.layerTopObstacle),c=new w.Spike15x(this,this.layerObstacle),this.obstacles.push(c),l.addSpikes(c,!1),l.spawn(a),this.blocks.push(l),this.elevatorEliminator.push(l);break;case"elevatorEliminatorDown":l=new x.ElevatorEliminator(this,this.layerTopObstacle),c=new w.Spike15x(this,this.layerObstacle),this.obstacles.push(c),l.addSpikes(c,!0),l.spawn(a),this.blocks.push(l),this.elevatorEliminator.push(l);break;case"appearingBlock":(l=new x.AppearingBlock(this,this.layerTopObstacle)).spawn(a),this.blocks.push(l);break;case"rope":(l=new T.Rope(this,this.layerUnderPool)).spawn(a),this.ropes.push(l);break;case"blockSpike":(l=new x.BlockSpike(this,this.layerBlocks)).spawn(a),this.blocks.push(l);break;case"kite":(l=new b.Kite(this,this.layerTopObstacle)).spawn(a),this.items.push(l);break;case"vexTNT":(l=new x.VexTNT(this,this.layerBlocks)).spawn(a),this.blocks.push(l),this.vexTNT=l;break;case"grapplePad":(l=new b.GrapplePad(this,this.layerTopObstacle)).spawn(a),this.items.push(l);break;case"grapplePointA":(l=new b.GrapplePoint(this,this.layerText,!1)).spawn(a),this.items.push(l);break;case"grapplePointB":(l=new b.GrapplePoint(this,this.layerText,!0)).spawn(a),this.items.push(l);break;case"pulseBlock":(l=new x.PulseBlock(this,this.layerBlocks)).spawn(a),this.blocks.push(l);break;case"hoverPlatform":(l=new x.HoverPlatform(this,this.layerBlocks)).spawn(a),this.blocks.push(l);break;case"leverPulse":(l=new b.LeverPulse(this,this.layerObstacle)).spawn(a),this.items.push(l);break;case"jumpPotion":(l=new b.JumpPotion(this,this.layerObstacle)).spawn(a),this.items.push(l);break;case"surveillanceCamera":(l=new w.SurveillanceCamera(this,this.layerObstacle)).spawn(a),this.obstacles.push(l);break;case"classicLaserCamera":(l=new w.ClassicLaserCamera(this,this.layerObstacle)).spawn(a),this.obstacles.push(l);break;case"missileLauncher":(l=new w.MissileLauncher(this,this.layerTopObstacle)).spawn(a),this.obstacles.push(l);break;case"breakableBlock":(l=new S.BreakableBlock(this,this.layerBlocks)).spawn(a),this.blocks.push(l);break;case"autoBreakableBlock":(l=new S.AutoBreakableBlock(this,this.layerBlocks)).spawn(a),this.blocks.push(l);break;case"gate":(l=new S.Gate(this,this.layerBlocks)).spawn(a),this.blocks.push(l),this.setNextTowerY(l.yPos);break;case"enemyAndroid":(l=new S.EnemyAndroid(this,this.layerSpine)).spawn(a),this.obstacles.push(l);break;case"enemyAndroidAdvanced":(l=new S.EnemyAndroidAdvanced(this,this.layerSpine)).spawn(a),this.obstacles.push(l);break;case"enemyDrone":(l=new S.EnemyDrone(this,this.layerTopObstacle)).spawn(a),this.obstacles.push(l);break;case"enemyBatteringRam":(l=new S.EnemyBatteringRam(this,this.layerTopObstacle)).spawn(a),this.obstacles.push(l)}c=l=null}}for(var d=0,p=this.blocks;d<p.length;d++)(l=p[d]).levelStart();for(var f=0,g=this.obstacles;f<g.length;f++)g[f].levelStart();for(var m=0,y=this.items;m<y.length;m++)y[m].levelStart()},d.prototype.getGrapplePoint=function(t){for(var e=0,i=this.items;e<i.length;e++){var n=i[e];if(n instanceof b.GrapplePoint&&n.currID===t)return n}return null},d.prototype.createTowerWalls=function(){var t=new S.TowerWall(this,this.layerBlocks);t.spawn(-1),this.blocks.push(t),(t=new S.TowerWall(this,this.layerBlocks)).spawn(1),this.blocks.push(t)},d.prototype.setNextTowerY=function(t){this.towerEndY=Math.floor((t+this.getGameHeight())/v.BalanceData.towerCellSize)*v.BalanceData.towerCellSize-v.BalanceData.towerCellSize},d.prototype.updateLogic=function(){this.player.update();for(var t=0,e=this.blocks;t<e.length;t++)e[t].update();this.wireTrail&&this.wireTrail.update();for(var i=0,n=this.obstacles;i<n.length;i++)n[i].update();this.particleManager.update();for(var r=0,s=this.items;r<s.length;r++)s[r].update()},d.prototype.getLevel=function(t){return this.levels.getLevel(t)},d.prototype.destroyLevel=function(t){if(void 0===t&&(t=!0),this.blocks){for(var e=0,i=this.blocks;e<i.length;e++)i[e].destroy();this.blocks=null;for(var n=0,r=this.obstacles;n<r.length;n++)r[n].destroy();this.obstacles=null;for(var s=0,o=this.ziplines;s<o.length;s++)o[s].destroy();this.ziplines=null;for(var a=0,h=this.pools;a<h.length;a++)h[a].destroy();this.pools=null;for(var l=0,c=this.poles;l<c.length;l++)c[l].destroy();this.poles=null;for(var u=0,d=this.items;u<d.length;u++)d[u].destroy();this.items=null;for(var p=0,f=this.slopes;p<f.length;p++)f[p].destroy();this.slopes=null;for(var g=0,m=this.wires;g<m.length;g++)m[g].destroy();this.wires=null;for(var y=0,v=this.ropes;y<v.length;y++)v[y].destroy();this.ropes=null,this.portalColorsCount=0,this.elevatorEliminator=null,this.elevators=null;for(var x=0,b=this.misc;x<b.length;x++)b[x].destroy();this.misc=null,this.wireTrail&&this.wireTrail.destroy(),!(this.wireTrail=null)===t&&this.player.hide(),this.particleManager.destroy(),this.effectsOverlay.reset()}},d.prototype.onPointerMove=function(){!0!==this.keys.isScreenButtonDown()&&(this.lookingAround=this.player.canCameraLookAround())},d.prototype.zoomTo=function(t,e){!0===(e=void 0===e?!1:e)?(this.cameraZoom=t,this.zoomData.c=this.zoomDuration,this.zoomData.e=t):this.zoomData.e!==t&&this.currSubScene!==u.SubSceneList.Menu&&(this.zoomData.s=this.cameraZoom,this.zoomData.e=t,this.zoomData.c=0,this.zoomData.t=t-this.cameraZoom)},d.prototype.setCameraOnPlayer=function(){this.cameraX=this.player.xPos,this.cameraY=this.player.yPos},d.prototype.cameraLogic=function(){this.zoomData.c<this.zoomDuration&&(this.zoomData.c+=1,this.cameraZoom=this.zoomData.s+this.zoomData.t*Phaser.Math.Easing.Sine.InOut(this.zoomData.c/this.zoomDuration));var t,e,i=.125,n=this.player.xPos,r=this.player.yPos;!1===this.lookingAround?!0===this.player.canDieByFalling&&10<this.player.yVelocity&&(n+=t=Math.random()*this.player.yVelocity*2,r+=t):!1===this.player.canCameraLookAround()||!0===this.keys.isScreenButtonDown()?this.lookingAround=!1:(t=this.getGameHalfWidth(),e=this.getGameHalfHeight(),n+=(this.input.activePointer.x-t)/t*200,r+=(this.input.activePointer.y-e)/e*200,i=.03),this.cameraX+=(n-this.cameraX)*i,this.cameraY+=(r-this.cameraY)*i},d.prototype.removeBlockFrom=function(t,e){e=t.indexOf(e);0<=e&&t.splice(e,1)},d.prototype.startElevator=function(t,e,i){for(var n=0;n<this.elevators.length;n++)if(!1===this.elevators[n].alive)return void this.elevators[n].activate(t,e,i);var r=new x.Elevator(this,this.layerObstacle);r.spawn(t,e,i),this.blocks.push(r),this.elevators.push(r)},d.prototype.raycastToPlayerTwoLines=function(t,e,i){this.testLine.points[0].x=e,this.testLine.points[0].y=i,this.testLine.points[1].x=this.player.xPos,this.testLine.points[1].y=this.player.yPos,this.testLine.setAngle(0),this.testLine2.points[0].x=e,this.testLine2.points[0].y=i,this.testLine2.points[1].x=this.player.xPos,this.testLine2.points[1].y=this.player.yPos-this.player.height+10,this.testLine2.setAngle(0);for(var n=0,r=t;n<r.length;n++){var s=r[n];if(s&&s.totalPolygon&&!0===SAT.testPolygonPolygon(this.testLine,s.totalPolygon)&&!0===SAT.testPolygonPolygon(this.testLine2,s.totalPolygon))return!1}return!0},d.prototype.raycastToPlayerOneLine=function(t,e,i){return this.raycastTo(t,e,i,this.player.xPos,this.player.yPos-this.player.halfHeight)},d.prototype.raycastTo=function(t,e,i,n,r){this.testLine.points[0].x=e,this.testLine.points[0].y=i,this.testLine.points[1].x=n,this.testLine.points[1].y=r,this.testLine.setAngle(0);for(var s=0,o=t;s<o.length;s++){var a=o[s];if(a&&a.totalPolygon&&!0===SAT.testPolygonPolygon(this.testLine,a.totalPolygon))return!1}return!0},d.prototype.raycastToBlock=function(t,e,i,n,r){return this.testLine.points[0].x=e,this.testLine.points[0].y=i,this.testLine.points[1].x=n,this.testLine.points[1].y=r,this.testLine.setAngle(0),!(!t||!t.totalPolygon)&&SAT.testPolygonPolygon(this.testLine,t.totalPolygon)},d.prototype.raycastToClosestBlock=function(t,e,i,n,r){for(var s,o,a=0,h=r,l=new SAT.Response;a<r;){s=t+i*(a+=50),o=e+n*a,this.testLine.points[0].x=t,this.testLine.points[0].y=e,this.testLine.points[1].x=s,this.testLine.points[1].y=o,this.testLine.setAngle(0);for(var c=0,u=this.blocks;c<u.length;c++){var d=u[c];if(d&&d.totalPolygon&&!1!==d.alive&&!0===SAT.testPolygonPolygon(this.testLine,d.totalPolygon,l))return a-l.overlap}}return h},d.prototype.checkPlayerDeathByPolygon=function(t,e){return!0===SAT.testPolygonPolygon(this.player.totalPolygon,t)&&(this.player.kill(e),!0)},d.prototype.checkPlayerDeathByPolygons=function(t,e){for(var i=0,n=t;i<n.length;i++){var r=n[i];if(!0===SAT.testPolygonPolygon(this.player.totalPolygon,r))return this.player.kill(e),!0}return!1},d.prototype.checkPlayerDeathByCircle=function(t,e){return!0===SAT.testCirclePolygon(t,this.player.totalPolygon)&&(this.player.kill(e),!0)},d.prototype.applyForceByCircle=function(t,e){void 0===e&&(e=1);for(var i=0,n=this.blocks;i<n.length;i++){var r=n[i];r instanceof x.BlockBehavior&&!0===SAT.testCirclePolygon(t,r.totalPolygon)&&this.applyForce(r,t.pos.x,t.pos.y,e)}},d.prototype.applyForceByPolygon=function(t,e){void 0===e&&(e=1);for(var i=0,n=this.blocks;i<n.length;i++){var r=n[i];r instanceof x.BlockBehavior&&!0===SAT.testPolygonPolygon(t,r.totalPolygon)&&this.applyForce(r,t.pos.x,t.pos.y,e)}},d.prototype.applyForce=function(t,e,i,n){e=new SAT.Vector(t.xPos-e,t.yPos-i);e.normalize(),e.scale(n,n),t.applyForce(e.x,e.y)},d);function d(){var t=null!==r&&r.apply(this,arguments)||this;return t.portalColors=[0,180,80,630],t.gravity=.25,t.zoomStart=1.5,t.zoomDefault=1.2,t.zoomAct=1.7,t.zoomDuration=40,t.zoomData={s:0,e:0,t:0,c:0},t}e.WorldCreator=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.WorldLayers=void 0,i(35)),a=i(0),h=i(28),l=i(109),c=i(41),u=i(21),d=i(25),p=i(23),f=i(24),g=i(2),m=i(19),y=i(3),v=i(145),x=i(18),b=i(148),i=(r=o.BasicScene,s(w,r),w.prototype.init=function(){var t=a.Jsons.getJson(this,"balance");p.DailyTask.init(this,t.dailyRewardCoins,t.dailyTaskCollectCoins),f.SkinsData.init(t.skinsPrice,t.skinRareIDs,t.skinIDs),f.SkinsData.checkFreeSkin(t.skinsFree),y.Achievements.init(this),this.cameras.main.setBackgroundColor(16777215),this.canShowPanel=!0,this.countDeath=0,this.input.addPointer(2),this.background=new Phaser.GameObjects.TileSprite(this,0,0,h.CustomResize.MaxCanvasW,h.CustomResize.MaxCanvasH,a.Atlases.gameplay,"bgPattern 10000"),this.background.setOrigin(0,0),this.add.existing(this.background),this.setBackgrounColor(),this.cameraGroup=this.add.container(),this.layerUnderPool=new Phaser.GameObjects.Container(this),this.cameraGroup.add(this.layerUnderPool),this.layerPool=new Phaser.GameObjects.Container(this),this.cameraGroup.add(this.layerPool),this.layerObstacle=new Phaser.GameObjects.Container(this),this.cameraGroup.add(this.layerObstacle),this.layerBlocks=new Phaser.GameObjects.Container(this),this.cameraGroup.add(this.layerBlocks),this.layerTopObstacle=new Phaser.GameObjects.Container(this),this.cameraGroup.add(this.layerTopObstacle),this.particleManager=new v.ParticleManager(this),this.cameraGroup.add(this.particleManager),this.layerText=new Phaser.GameObjects.Container(this),this.cameraGroup.add(this.layerText),this.layerSpine=this.make.spineContainer({}),this.cameraGroup.add(this.layerSpine),this.layerPlayer=new Phaser.GameObjects.Container(this),this.cameraGroup.add(this.layerPlayer),this.effectsOverlay=new l.Overlays(this,this.cameraGroup),this.guiLayer=this.add.container(),this.guiLayer.depth=5,this.keys=new c.GameKeys(this,this.guiLayer),this.keys.hide(),this.achievements=new d.PAchievement(this),this.guiLayer.add(this.achievements),this.panelManager=new u.PanelManager(this),this.guiLayer.add(this.panelManager),this.transition=new l.Transition(this),this.guiLayer.add(this.transition),this.initResize()},w.prototype.setBackgrounColor=function(){},w.prototype.showSubScene=function(t,e){p.DailyTask.stopTimer(),this.panelManager.reset(),this.tweens.killAll(),this.currSubScene=t,this.subScene&&(this.subScene.destroy(),this.subScene=null),t===m.SubSceneList.Menu?this.subScene=new b.SubMenu(this):t===m.SubSceneList.Hub?this.subScene=new b.SubHub(this):t===m.SubSceneList.Act?this.subScene=new b.SubAct(this):t===m.SubSceneList.Vex?this.subScene=new b.SubVex(this):t===m.SubSceneList.Tower?this.subScene=new b.SubTower(this):t===m.SubSceneList.SkinsRarity?this.subScene=new b.SubSkinsRarity(this):t===m.SubSceneList.SkinsSelect&&(this.subScene=new b.SubSkinsSelect(this)),this.subScene.init(e),this.guiLayer.addAt(this.subScene,0),this.subScene.resize()},w.prototype.isTower=function(){return this.currSubScene===m.SubSceneList.Tower},w.prototype.update=function(){this.subScene&&this.subScene.update(),this.panelManager.update(),this.transition.update(),!1===this.transition.visible&&this.achievements.update()},w.prototype.updateParallax=function(){!0===g.BalanceData.parallax?(this.background.tilePositionX=-this.cameraX/10,this.background.tilePositionY=-this.cameraY/10):(this.background.tilePositionX=0,this.background.tilePositionY=0)},w.prototype.moveBackground=function(t,e){this.background.tilePositionX+=t,this.background.tilePositionY+=e},w.prototype.backgroundStaticPos=function(){this.background.tilePositionX=-this.cameraX,this.background.tilePositionY=-this.cameraY},w.prototype.resize=function(){h.CustomResize.resizeContainer(this.guiLayer),this.subScene&&this.subScene.resize(),this.panelManager.resize(),this.transition.resize(),this.achievements.resize(),this.keys.resize()},w.prototype.resetLevel=function(t){},w.prototype.playerDeath=function(t,e,i,n){if(this.currSubScene!==m.SubSceneList.Menu)if(this.currentDeaths+=1,!0===g.BalanceData.autoRestart&&this.currentDeaths>=this.currentLevel.getTargetDeath(this.isCurrLevelHard))this.resetLevel();else{if(g.BalanceData.totalDeaths+=1,100<=g.BalanceData.totalDeaths&&y.Achievements.saveAchive(x.TrophieAchieves.death),this.currSubScene===m.SubSceneList.Hub?this.subScene.updateDeaths(g.BalanceData.totalDeaths):this.subScene.updateDeaths(this.currentDeaths),y.SaveGame.getInstance().saveProgress(),!1===t?y.SoundManager.playSFX("death"+(Math.random()<.5?1:2)):y.SoundManager.playSFX("electricity"),!1===g.BalanceData.noBlood)for(var r=0;r<5;r++)this.particleManager.createColorParticle(e+10*Math.random()-5,i-n*Math.random(),10*Math.random()-5,-10*Math.random(),16711680);this.particleManager.createPlayerGib(e+10*Math.random()-5,i-n*Math.random(),10*Math.random()-5,-10*Math.random(),"player-head 10000"),this.particleManager.createPlayerGib(e+10*Math.random()-5,i-n*Math.random(),10*Math.random()-5,-10*Math.random(),"player-body 10000",2*Math.random()*Math.PI,8*Math.random()-4),this.particleManager.createPlayerGib(e+10*Math.random()-5,i-n*Math.random(),10*Math.random()-5,-10*Math.random(),"player-arm 10000",2*Math.random()*Math.PI,8*Math.random()-4),this.particleManager.createPlayerGib(e+10*Math.random()-5,i-n*Math.random(),10*Math.random()-5,-10*Math.random(),"player-arm 10000",2*Math.random()*Math.PI,8*Math.random()-4),this.particleManager.createPlayerGib(e+10*Math.random()-5,i-n*Math.random(),10*Math.random()-5,-10*Math.random(),"player-leg 10000",2*Math.random()*Math.PI,8*Math.random()-4),this.particleManager.createPlayerGib(e+10*Math.random()-5,i-n*Math.random(),10*Math.random()-5,-10*Math.random(),"player-leg 10000",2*Math.random()*Math.PI,8*Math.random()-4),this.reset(),!0===this.canShowPanel&&(this.countDeath+=1,3===this.countDeath&&(this.countDeath=0,this.showPanelAreYouOK()))}},w.prototype.reset=function(){},w.prototype.setCanShowPanelAreYouOK=function(){this.canShowPanel=!0},w.prototype.showPanelAreYouOK=function(){var t=this;this.panelManager.show(u.PanelList.PanelAreYouOk),this.canShowPanel=!1,setTimeout(function(){return t.setCanShowPanelAreYouOK()},6e4)},Object.defineProperty(w.prototype,"cameraZoom",{get:function(){return this._cameraZoom},set:function(t){this._cameraZoom!==t&&(this._cameraZoom=t,this.cameraGroup.scale=this._cameraZoom)},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"cameraX",{get:function(){return this._cameraX},set:function(t){this._cameraX=t,this.cameraGroup.x=-this._cameraX*this._cameraZoom+this.getGameHalfWidth()},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"cameraY",{get:function(){return this._cameraY},set:function(t){this._cameraY=t,this.cameraGroup.y=-this._cameraY*this._cameraZoom+this.getGameHalfHeight()},enumerable:!1,configurable:!0}),w.prototype.setCameraZero=function(){this._cameraX=0,this._cameraY=0,this.cameraGroup.x=0,this.cameraGroup.y=0},w.prototype.inCameraView=function(t,e,i,n){var r=this.getGameHalfWidth()/this._cameraZoom,s=this.getGameHalfHeight()/this._cameraZoom,o=this._cameraX-r,r=this._cameraX+r,a=this._cameraY-s,s=this._cameraY+s;return!(e<o||r<t||n<a||s<i)},w.prototype.getGameWidth=function(){return h.CustomResize.CanvasW},w.prototype.getGameHeight=function(){return h.CustomResize.CanvasH},w.prototype.getGameHalfWidth=function(){return h.CustomResize.CanvasHalfW},w.prototype.getGameHalfHeight=function(){return h.CustomResize.CanvasHalfH},w);function w(){var t=null!==r&&r.apply(this,arguments)||this;return t._cameraZoom=1,t}e.WorldLayers=i},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorParticle=e.Particle=e.Overlays=e.Transition=void 0;var n=i(110),r=(Object.defineProperty(e,"Transition",{enumerable:!0,get:function(){return n.Transition}}),i(111)),s=(Object.defineProperty(e,"Overlays",{enumerable:!0,get:function(){return r.Overlays}}),i(40)),o=(Object.defineProperty(e,"Particle",{enumerable:!0,get:function(){return s.Particle}}),i(62));Object.defineProperty(e,"ColorParticle",{enumerable:!0,get:function(){return o.ColorParticle}})},function(t,e,i){"use strict";var n,o,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),a=(Object.defineProperty(e,"__esModule",{value:!0}),e.Transition=void 0,i(0)),s=i(19),h=i(4),i=(o=Phaser.GameObjects.Container,r(l,o),l.prototype.beginTransition=function(t,e){for(var i=[],n=2;n<arguments.length;n++)i[n-2]=arguments[n];this.callback=t,this.context=e,this.argums=i,this.visible=!0,this.counter=0,this.anim="in",this.logo.showIn()},l.prototype.onInComplete=function(){this.anim="stand",this.counter=0,this.callback.apply(this.context,this.argums),this.endTransition()},l.prototype.endTransition=function(){this.logo.showOut(),this.anim="out",this.counter=this.maxDur},l.prototype.update=function(){!1!==this.visible&&("in"===this.anim?(this.counter+=1,this.updateElements(),this.counter>=this.maxDur&&(this.anim="none")):"out"===this.anim&&(--this.counter,this.updateElements(),0===this.counter&&(this.visible=!1)),this.logo.update())},l.prototype.updateElements=function(){for(var t=0;t<this.elements.length;t++)this.elements[t].update(this.counter)},l.prototype.resize=function(){this.scale=2*(a.Constants.UI_SCALE_FIT_X>a.Constants.UI_SCALE_FIT_Y?a.Constants.UI_SCALE_FIT_X:a.Constants.UI_SCALE_FIT_Y)},l);function l(t){var e,i=o.call(this,t,a.Constants.GHW,a.Constants.GHH)||this;i.elementsStart=[0,1,2,3,4,5,4,1,2,3,4,5,4,3,2,3,4,5,4,3,2,3,4,5,4,3,2,1,4,5,4,3,2,1,0],i.countStep=6,i.elements=new Array,i.maxDur=Math.ceil(6*i.countStep);for(var n=-296,r=-444,s=0;s<35;s++)e=new d(t,r,n,i.elementsStart[s],i.countStep),i.add(e),i.elements.push(e),(s+1)%7==0?(r=-444,n+=148):r+=148;return e=null,i.logo=new p(t,i.countStep),i.logo.on("animInComp",i.onInComplete,i),i.add(i.logo),i.visible=!1,i}e.Transition=i;u=Phaser.GameObjects.Image,r(g,u),g.prototype.update=function(t){t>=this.start&&t<=this.duration&&(this.scaleX=(t-this.start)/(this.duration-this.start))};var c,u,d=g,p=(c=Phaser.GameObjects.Image,r(f,c),f.prototype.showIn=function(){this.start(),this.durationID=0,this.angle=-10,this.scale=0,this.duration=this.durationIn[this.durationID].d,this.updateAnim=s.Bool3.true},f.prototype.showOut=function(){this.start(),this.duration=1,this.durationID=-1,this.updateAnim=s.Bool3.false},f.prototype.start=function(){this.counter=0,this.visible=!0,this.stepScale=0,this.stepAngle=0},f.prototype.update=function(){var t,e;this.updateAnim===s.Bool3.true?(this.counter+=1,this.scale+=this.stepScale,this.angle+=this.stepAngle,this.counter===this.duration&&(this.durationID+=1,this.durationID===this.durationIn.length?(this.updateAnim=s.Bool3.none,this.emit("animInComp")):(t=this.durationIn[this.durationID],this.duration=t.d,e=this.duration-this.counter,this.stepScale=(t.sc-this.scale)/e,this.stepAngle=(t.a-this.angle)/e))):this.updateAnim===s.Bool3.false&&(this.counter+=1,this.scale+=this.stepScale,this.counter===this.duration)&&(this.durationID+=1,this.durationID===this.durationOut.length?this.updateAnim=s.Bool3.none:(t=this.durationOut[this.durationID],this.duration=t.d,e=this.duration-this.counter,this.stepScale=(t.sc-this.scale)/e))},f);function f(t,e){t=c.call(this,t,0,0,"logo")||this;function i(t){return Math.ceil(t/125*e)}return t.durationIn=new Array,t.durationIn.push({d:i(700),sc:0,a:-10}),t.durationIn.push({d:i(850),sc:.6,a:6}),t.durationIn.push({d:i(975),sc:.45,a:-3}),t.durationIn.push({d:i(1100),sc:.5,a:0}),t.durationOut=new Array,t.durationOut.push({d:i(50),sc:.6}),t.durationOut.push({d:i(175),sc:0}),t.visible=!1,t.updateAnim=s.Bool3.none,t}function g(t,e,i,n,r){t=u.call(this,t,e,i,a.Atlases.ui,"transition_romb 10000")||this;return t.rotation=h.Tools.PI025,t.start=n*r,t.duration=t.start+r,t.scaleX=0,t}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Overlays=void 0;var r=i(0),s=i(28);function n(t,e){this.scene=t;var i=s.CustomResize.MaxCanvasW,n=s.CustomResize.MaxCanvasH;this.dark=new Phaser.GameObjects.Image(t,0,0,r.Atlases.gameplay,"blackPixel 10000"),e.add(this.dark),this.dark.scale=10,this.darkBackground=new Phaser.GameObjects.Image(t,0,0,"darkOverlay"),this.darkBackground.scale=2,e.add(this.darkBackground),this.flash=new Phaser.GameObjects.Image(t,i/2,n/2,r.Atlases.gameplay,"whiteBlock 10000"),this.flash.setScale(i/100,n/100),t.add.existing(this.flash),this.reset()}n.prototype.hideDark=function(){this.isDark=!1,this.dark.visible=!1,this.darkBackground.visible=!1},n.prototype.hideFlash=function(){this.flash.visible=!1},n.prototype.reset=function(){this.hideDark(),this.hideFlash(),this.isExploding=!1},n.prototype.checkPoint=function(){!0===this.isDark&&this.goLight()},n.prototype.goDark=function(){if(!0!==this.isDark){this.isDark=!0,this.darkDelay=6,this.dark.visible=!0,this.dark.alpha=1,this.darkBackground.visible=!0,this.hideFlash();for(var t=0,e=this.scene.solarBlocks;t<e.length;t++)e[t].goDark()}},n.prototype.goLight=function(){if(!1!==this.isDark){this.flash.visible=!0,this.flash.alpha=1,this.hideDark();for(var t=0,e=this.scene.solarBlocks;t<e.length;t++)e[t].goLight()}},n.prototype.explode=function(t,e){!0!==this.isExploding&&(this.isExploding=!0,this.flash.visible=!0,this.flash.alpha=0,this.explodeCallback=t,this.explodeContext=e)},n.prototype.update=function(){!0===this.flash.visible&&(!0===this.isExploding?(this.flash.alpha+=.1,1<=this.flash.alpha&&(this.isExploding=!1,this.explodeCallback?this.explodeCallback.apply(this.explodeContext):this.scene.vexTNT&&!0===this.scene.vexTNT.used&&this.scene.explodeComplete())):(this.flash.alpha-=.03,this.flash.alpha<=0&&(this.flash.visible=!1))),!0===this.isDark&&(0===this.darkDelay?0<this.dark.alpha&&(this.dark.alpha-=.025):--this.darkDelay,this.dark.x=this.darkBackground.x=this.scene.player.xPos,this.dark.y=this.darkBackground.y=this.scene.player.yPos)},e.Overlays=n},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ControllerButton=void 0;var n=i(0);function r(t,e,i){this.currPointerID=-1,this.isDown=!1,this.keys=t,this.key=i,this.sprite=new Phaser.GameObjects.Image(t.scene,0,0,n.Atlases.ui,e),this.sprite.alpha=.8,this.sprite.scale=1.6;i=this.sprite.width/2,e=1.1*i;this.sprite.setInteractive(new Phaser.Geom.Circle(e,e,1.3*i),Phaser.Geom.Circle.Contains),this.sprite.on(Phaser.Input.Events.POINTER_DOWN,this.inputDown,this),t.scene.input.on(Phaser.Input.Events.POINTER_UP,this.inputUp,this)}r.prototype.inputDown=function(t){this.currPointerID=t.id,this.isDown=!0,this.keys.setPressed(this.key,!0)},r.prototype.inputUp=function(t){!1!==this.isDown&&this.currPointerID===t.id&&(this.currPointerID=-1,this.isDown=!1,this.keys.setPressed(this.key,!1))},r.prototype.hide=function(){this.sprite.visible=!1},r.prototype.show=function(){this.sprite.visible=!0},e.ControllerButton=r},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ControllerStick=void 0;var s=i(0),n=i(41);function r(t){this.currPointerID=-1,this.isDown=!1,this.keys=t,this.sprite=new Phaser.GameObjects.Image(t.scene,0,0,s.Atlases.ui,"btnStick 10000"),this.sprite.alpha=.8,this.sprite.scale=2.4,this.sprite.setInteractive();var e=1.2*this.sprite.width,i=1.35*this.sprite.height,n=(this.sprite.width-e)/2,r=(this.sprite.height-i)/2;this.sprite.input.hitArea.setTo(n,r,e,i),this.sprite.on(Phaser.Input.Events.POINTER_DOWN,this.inputDown,this),t.scene.input.on(Phaser.Input.Events.POINTER_UP,this.inputUp,this),t.scene.input.on(Phaser.Input.Events.POINTER_MOVE,this.inputMove,this)}r.prototype.inputDown=function(t){this.currPointerID=t.id,this.pointer=t,this.isDown=!0,this.inputMove()},r.prototype.inputUp=function(t){!1!==this.isDown&&this.currPointerID===t.id&&(this.currPointerID=-1,this.isDown=!1,this.setSpriteFrame("btnStick 10000"),this.keys.setPressed(n.KeyPressed.left,!1),this.keys.setPressed(n.KeyPressed.right,!1))},r.prototype.hide=function(){this.sprite.visible=!1},r.prototype.show=function(){this.sprite.visible=!0},r.prototype.setSpriteFrame=function(t){this.sprite.frame.name!==t&&this.sprite.setFrame(t)},r.prototype.inputMove=function(){var t;!0===this.isDown&&(t=(this.sprite.x+s.Constants.UI_SHIFT_X)*s.Constants.UI_SCALE,this.pointer.x<t?(this.setSpriteFrame("btnStick 10001"),this.keys.setPressed(n.KeyPressed.left,!0),this.keys.setPressed(n.KeyPressed.right,!1)):(this.setSpriteFrame("btnStick 10002"),this.keys.setPressed(n.KeyPressed.left,!1),this.keys.setPressed(n.KeyPressed.right,!0)))},e.ControllerStick=r},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.ButtonMenu=void 0,i(0)),a=i(6),h=i(1),i=(r=Phaser.GameObjects.Container,s(l,r),l.prototype.addTxtDop=function(t,e,i,n,r,s,o){this.txtDop=new h.JDBmpdTextTranslated(this.scene,s=void 0===s?0:s,o=void 0===o?0:o,e,t,i,n=void 0===n?16777215:n,r=void 0===r?1:r),this.add(this.txtDop)},l.prototype.addTxtReset=function(t,e,i,n,r,s,o){this.txtReset=new h.JDBmpdTextFit(this.scene,s=void 0===s?0:s,o=void 0===o?0:o,e,t,i,n=void 0===n?16777215:n,r=void 0===r?1:r),this.add(this.txtReset)},l.prototype.destroy=function(t){r.prototype.destroy.call(this,t),this.btn=null,this.txtDop=null,this.txtReset=null},l);function l(t,e,i,n){e=r.call(this,t,e,i)||this;return e.btn=new a.ButtonScale(t,0,0),e.btn.addImageEvents(o.Atlases.ui,n),e.add(e.btn.getView()),e}e.ButtonMenu=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),i=(Object.defineProperty(e,"__esModule",{value:!0}),e.ButtonScale=void 0,r=i(43).ButtonContainer,s(o,r),o.prototype.downState=function(){this.view.scale=1.1},o.prototype.upState=function(){this.view&&(this.view.scale=1)},o);function o(){return null!==r&&r.apply(this,arguments)||this}e.ButtonScale=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),i=(Object.defineProperty(e,"__esModule",{value:!0}),e.ButtonScaleImage=void 0,r=i(44).ButtonImage,s(o,r),o.prototype.downState=function(){this.view.scale=1.1},o.prototype.upState=function(){this.view.scale=1},o);function o(){return null!==r&&r.apply(this,arguments)||this}e.ButtonScaleImage=i},function(t,e,i){"use strict";var n,o,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),i=(Object.defineProperty(e,"__esModule",{value:!0}),e.ButtonFrame=void 0,o=i(44).ButtonImage,r(s,o),s.prototype.downState=function(){this.view.setFrame(this.frameDown)},s.prototype.upState=function(){this.view.setFrame(this.frameUp)},s);function s(t,e,i,n,r,s){t=o.call(this,t,e,i,n,r)||this;return t.frameUp=r,t.frameDown=s,t}e.ButtonFrame=i},function(t,e,i){"use strict";var n,o,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),i=(Object.defineProperty(e,"__esModule",{value:!0}),e.ButtonContainerFrame=void 0,o=i(43).ButtonContainer,r(s,o),s.prototype.setFrames=function(t,e){this.frameUp=t,this.frameDown=e,this.upState()},s.prototype.downState=function(){this.image.setFrame(this.frameDown)},s.prototype.upState=function(){this.image.setFrame(this.frameUp)},s);function s(t,e,i,n,r,s){t=o.call(this,t,e,i)||this;return t.addImageEvents(n,r),t.frameUp=r,t.frameDown=s,t}e.ButtonContainerFrame=i},function(t,e,i){"use strict";var n,a,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),s=(Object.defineProperty(e,"__esModule",{value:!0}),e.DailyTaskPanel=void 0,i(63)),h=i(0),l=i(6),c=i(10),u=i(23),o=i(1),d=i(9),i=(a=s.BasicDailyTask,r(p,a),p.prototype.createBtnReward=function(t,e,i,n,r){var s=this;this.btnReward=new l.ButtonScale(this.parent.scene,t,e),this.btnReward.addImageEvents(h.Atlases.ui,"btn_green 10000",0,3,i,n),this.btnReward.addTxtTranslated(this.rewardLocalize,h.Fonts.Main,40,4737096),this.btnReward.onUp=function(){return s.reward()},this.btnReward.txtTranslated.setFitSize(200),this.parent.add(this.btnReward.getView()),r<=0?this.disableRewardBtn():2===r&&this.rewarded()},p.prototype.createDes=function(t,e,i,n,r){this.txtDes=new o.JDBmpdTextFit(this.parent.scene,t,e,h.Fonts.Main,n,i,16777215,0),this.txtDes.setFitSize(r,c.JDTextFitParam.wordWrap),this.parent.add(this.txtDes)},p.prototype.createProgress=function(t,e,i,n){this.txtProgress=new o.JDBmpdText(this.parent.scene,t,e+12,h.Fonts.Main,i+"/"+n,30),this.parent.add(this.txtProgress),a.prototype.createProgress.call(this,t,e,i,n)},p.prototype.changeLang=function(){this.btnAD&&(this.btnAD.txtTranslated.setFont(h.Fonts.Main),null===this.btnAD.onUp?this.btnAD.txtTranslated.text="unavailable":this.btnAD.txtTranslated.text="watchAD"),this.btnReward.txtTranslated.setFont(h.Fonts.Main),this.btnReward.txtTranslated.text=this.rewardLocalize,this.txtTitle.setFont(h.Fonts.Main),this.txtTitle.text="dailyTaskTitle"+this.id,this.txtDes.setFont(h.Fonts.Main),this.txtDes.text=u.DailyTask.getData(this.id).des},p.prototype.reset=function(){a.prototype.reset.call(this);var t=u.DailyTask.getData(this.id);this.txtTitle.text="dailyTaskTitle"+this.id,this.txtProgress.text=t.curr+"/"+t.target,this.txtDes.text=t.des,this.disableRewardBtn(),this.rewardLocalize="reward",this.btnReward.txtTranslated.text=this.rewardLocalize,this.btnAD&&(this.btnAD.visible=!0),this.btnReward.x=this.x+135},p.prototype.rewarded=function(){a.prototype.rewarded.call(this);var t=u.DailyTask.getData(this.id);this.txtProgress.text=t.curr+"/"+t.target,this.setProgress(1),this.rewardLocalize="rewarded",this.btnReward.txtTranslated.text=this.rewardLocalize,this.disableRewardBtn(.7)},p.prototype.enableRewardBtn=function(){this.btnReward.alpha=1,this.btnReward.image.input.enabled=!0},p.prototype.disableRewardBtn=function(t){this.btnReward.alpha=t=void 0===t?.5:t,this.btnReward.image.input.enabled=!1},p.prototype.adComplete=function(t){!0===t?(this.reward(),this.btnReward.x=this.x,this.btnAD&&(this.btnAD.visible=!1)):(this.btnAD.txtTranslated.text="unavailable",this.btnAD.onUp=null)},p.prototype.destroy=function(){a.prototype.destroy.call(this),this.btnReward=null,this.btnAD=null,this.txtProgress=null,this.txtDes=null},p);function p(t,e,i,n){var r=a.call(this,t,e)||this,s=(r.rewardLocalize="reward",new Phaser.GameObjects.Image(t.scene,i,n,h.Atlases.gameplay,"whiteBlock 10000")),s=(s.setTint(29409,33507,29409,33507),s.setDisplaySize(570,300),t.add(s),(s=new Phaser.GameObjects.Image(t.scene,i,n-150,h.Atlases.gameplay,"whiteBlock 10000")).setOrigin(.5,0),s.setTint(37870,44785,37870,44785),s.setDisplaySize(570,80),t.add(s),s=null,r.x=i,u.DailyTask.getData(e)),e=0,o=n+90;return!0===h.Constants.IS_AD_REWARD_AVAILABLE&&(r.btnAD=new l.ButtonScale(t.scene,i-135,o),r.btnAD.addImageEvents(h.Atlases.ui,"btn_yellow 10000",0,3),r.btnAD.addIcon(h.Atlases.ui,"watch_icon 10000",-90),r.btnAD.addTxtTranslated("watchAD",h.Fonts.Main,40,4737096,1,25),r.btnAD.txtTranslated.setFitSize(155,c.JDTextFitParam.both,65),r.btnAD.onUp=function(){return d.AzerionSDK.showADRewarded(function(t){return r.adComplete(t)})},t.add(r.btnAD.getView()),s.rewarded<=0?e=135:r.btnAD.visible=!1),r.createTittle(i-260,n-125,32),r.createDes(i-260,n-95,26,s.des,500),r.createProgress(i,n,s.curr,s.target),r.createBtnReward(i+e,o,1,1,s.rewarded),s=null,r}e.DailyTaskPanel=i},function(t,e,i){"use strict";var n,o,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),s=(Object.defineProperty(e,"__esModule",{value:!0}),e.DailyTaskPause=void 0,i(63)),a=i(23),h=i(0),l=i(6),i=(o=s.BasicDailyTask,r(c,o),c.prototype.onRewarded=function(t){this.id===t&&(this.btnI.visible=!1)},c.prototype.updateProgress=function(){var t=a.DailyTask.getData(this.id);this.setProgress(t.curr/t.target),1===t.rewarded&&(this.btnI.visible=!0,this.parent.scene.events.on(a.DailyTask.EVENT_REWARDED,this.onRewarded,this))},c.prototype.destroy=function(){this.parent.scene.events.off(a.DailyTask.EVENT_REWARDED,this.onRewarded,this),o.prototype.destroy.call(this),this.btnI=null},c);function c(t,e,i,n){var r=o.call(this,t,e)||this,s=new Phaser.GameObjects.Image(t.scene,i,n,h.Atlases.ui,"pause_side 10000"),t=(t.add(s),a.DailyTask.getData(e));return r.createTittle(i-240,n-18,34),r.txtTitle.setFitSize(290),r.createProgress(i-95,n+45,t.curr,t.target,"2"),r.btnI=new l.ButtonScaleImage(r.parent.scene,i+100,n+5,h.Atlases.ui,"icon_alert 10000"),r.btnI.onUp=function(){return r.parent.scene.showPanelDailyTask()},r.parent.add(r.btnI.getView()),r.btnI.visible=!1,0,r}e.DailyTaskPause=i},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PanelPowerUp=e.PanelTowerDefeat=e.PanelTowerComplete=e.PanelFreeSkin=e.PanelLanguages=e.PanelAreYouOk=e.PanelDailyTasks=e.PanelLevelObjectives=e.PanelLevelComplete=e.PanelActSelect=e.PanelPause=e.PanelTrophies=e.PanelOptionsHub=e.PanelOptionsMenu=void 0;var n=i(122),r=(Object.defineProperty(e,"PanelOptionsMenu",{enumerable:!0,get:function(){return n.PanelOptionsMenu}}),i(123)),s=(Object.defineProperty(e,"PanelOptionsHub",{enumerable:!0,get:function(){return r.PanelOptionsHub}}),i(124)),o=(Object.defineProperty(e,"PanelTrophies",{enumerable:!0,get:function(){return s.PanelTrophies}}),i(125)),a=(Object.defineProperty(e,"PanelPause",{enumerable:!0,get:function(){return o.PanelPause}}),i(126)),h=(Object.defineProperty(e,"PanelActSelect",{enumerable:!0,get:function(){return a.PanelActSelect}}),i(127)),l=(Object.defineProperty(e,"PanelLevelComplete",{enumerable:!0,get:function(){return h.PanelLevelComplete}}),i(128)),c=(Object.defineProperty(e,"PanelLevelObjectives",{enumerable:!0,get:function(){return l.PanelLevelObjectives}}),i(129)),u=(Object.defineProperty(e,"PanelDailyTasks",{enumerable:!0,get:function(){return c.PanelDailyTasks}}),i(130)),d=(Object.defineProperty(e,"PanelAreYouOk",{enumerable:!0,get:function(){return u.PanelAreYouOk}}),i(131)),p=(Object.defineProperty(e,"PanelLanguages",{enumerable:!0,get:function(){return d.PanelLanguages}}),i(132)),f=(Object.defineProperty(e,"PanelFreeSkin",{enumerable:!0,get:function(){return p.PanelFreeSkin}}),i(133)),g=(Object.defineProperty(e,"PanelTowerComplete",{enumerable:!0,get:function(){return f.PanelTowerComplete}}),i(134)),m=(Object.defineProperty(e,"PanelTowerDefeat",{enumerable:!0,get:function(){return g.PanelTowerDefeat}}),i(135));Object.defineProperty(e,"PanelPowerUp",{enumerable:!0,get:function(){return m.PanelPowerUp}})},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.PanelOptionsMenu=void 0,i(15)),a=i(0),h=i(6),l=i(1),c=i(10),u=i(2),d=i(16),p=i(17),f=i(11),i=(r=o.BasicPanel,s(g,r),g.prototype.init=function(){var t=this;this.addBgTitleBtn(640,560,"settings",!0,"close_settings_in_maimenu"),this.btnSfx=new h.ButtonScale(this.scene,-160,-105),this.btnSfx.addImageEvents(a.Atlases.ui,"btnPanelSmall 10000",0,5),this.btnSfx.addIcon(a.Atlases.ui,"iconSFX 10000"),this.btnSfx.addIcon(a.Atlases.ui,"panelOnOff 10000"),this.btnSfx.onUp=function(){return t.switchSfx()},this.add(this.btnSfx.getView()),this.btnMusic=new h.ButtonScale(this.scene,100,-105),this.btnMusic.addImageEvents(a.Atlases.ui,"btnPanelSmall 10000",0,5),this.btnMusic.addIcon(a.Atlases.ui,"iconMusic 10000"),this.btnMusic.addIcon(a.Atlases.ui,"panelOnOff 10000"),this.btnMusic.onUp=function(){return t.switchMusic()},this.add(this.btnMusic.getView()),this.txtSfx=new l.JDBmpdTextTranslated(this.scene,this.btnSfx.x+60,this.btnSfx.y,a.Fonts.Main,"",34,15196527,0),this.txtSfx.setFitSize(130),this.add(this.txtSfx),this.txtMusic=new l.JDBmpdTextTranslated(this.scene,this.btnMusic.x+60,this.btnMusic.y,a.Fonts.Main,"",34,15196527,0),this.txtMusic.setFitSize(130),this.add(this.txtMusic),this.txtAutoReset=new l.JDBmpdTextTranslated(this.scene,-180,115,a.Fonts.Main,"autoReset",32,16777215,0),this.txtAutoReset.setFitSize(460,c.JDTextFitParam.both,80),this.txtAutoReset.toUpperCase(),this.add(this.txtAutoReset),this.btnCheckReset=new h.ButtonScale(this.scene,this.txtAutoReset.x-50,this.txtAutoReset.y),this.btnCheckReset.addImageEvents(a.Atlases.ui,"checkbox 10000"),this.btnCheckReset.onUp=function(){return t.switchAutoReset()},this.add(this.btnCheckReset.getView()),this.txtAutoRestart=new l.JDBmpdTextTranslated(this.scene,-180,15,a.Fonts.Main,"autoRestart",32,16777215,0),this.txtAutoRestart.setFitSize(460,c.JDTextFitParam.both,80),this.add(this.txtAutoRestart),this.btnCheckRestart=new h.ButtonScale(this.scene,this.txtAutoRestart.x-50,this.txtAutoRestart.y),this.btnCheckRestart.addImageEvents(a.Atlases.ui,"checkbox 10000"),this.btnCheckRestart.onUp=function(){return t.switchAutoRestart()},this.add(this.btnCheckRestart.getView()),this.txtNoBlood=new l.JDBmpdTextTranslated(this.scene,-180,215,a.Fonts.Main,"noBlood",32,16777215,0),this.txtNoBlood.setFitSize(500,c.JDTextFitParam.wordWrap),this.add(this.txtNoBlood),this.btnNoBlood=new h.ButtonScale(this.scene,this.txtNoBlood.x-50,this.txtNoBlood.y),this.btnNoBlood.addImageEvents(a.Atlases.ui,"checkbox 10000"),this.btnNoBlood.onUp=function(){return t.switchNoBlood()},this.add(this.btnNoBlood.getView()),this.scene.events.on(d.Localization.EVENT_CHANGE_LANG,this.changeLang,this)},g.prototype.changeLang=function(){this.txtTitle.setFont(a.Fonts.Main),this.txtTitle.text="settings",this.txtAutoReset.setFont(a.Fonts.Main),this.txtAutoReset.text="autoReset",this.txtAutoReset.toUpperCase(),this.txtAutoRestart.setFont(a.Fonts.Main),this.txtAutoRestart.text="autoRestart",this.txtNoBlood.setFont(a.Fonts.Main),this.txtNoBlood.text="noBlood",this.txtMusic.setFont(a.Fonts.Main),this.txtSfx.setFont(a.Fonts.Main)},g.prototype.show=function(){r.prototype.show.call(this),this.setFrameSfx(),this.setFrameMusic(),this.setFrameAutoReset(),this.setFrameAutoRestart(),this.setFrameNoBlood(),this.scene.pauseWorld()},g.prototype.hide=function(){r.prototype.hide.call(this),this.scene.resumeMenu()},g.prototype.switchSfx=function(){f.SoundManager.setEnabled(f.SoundType.SFX),this.setFrameSfx()},g.prototype.setFrameSfx=function(){!0===u.BalanceData.mutedSfx?(this.btnSfx.icon.setFrame("panelOnOff 10001"),this.txtSfx.text="off"):(this.btnSfx.icon.setFrame("panelOnOff 10000"),this.txtSfx.text="on")},g.prototype.switchMusic=function(){f.SoundManager.setEnabled(f.SoundType.Music),this.setFrameMusic()},g.prototype.setFrameMusic=function(){!0===u.BalanceData.mutedMusic?(this.btnMusic.icon.setFrame("panelOnOff 10001"),this.txtMusic.text="off"):(this.btnMusic.icon.setFrame("panelOnOff 10000"),this.txtMusic.text="on")},g.prototype.switchAutoRestart=function(){u.BalanceData.autoRestart=!u.BalanceData.autoRestart,this.setFrameAutoRestart(),p.SaveGame.getInstance().saveProgress()},g.prototype.setFrameAutoRestart=function(){this.btnCheckRestart.image.setFrame(!1===u.BalanceData.autoRestart?"checkbox 10000":"checkbox 10001")},g.prototype.switchAutoReset=function(){u.BalanceData.autoReset=!u.BalanceData.autoReset,this.setFrameAutoReset(),p.SaveGame.getInstance().saveProgress()},g.prototype.setFrameAutoReset=function(){this.btnCheckReset.image.setFrame(!1===u.BalanceData.autoReset?"checkbox 10000":"checkbox 10001")},g.prototype.switchNoBlood=function(){u.BalanceData.noBlood=!u.BalanceData.noBlood,this.setFrameNoBlood(),p.SaveGame.getInstance().saveProgress(),this.txtAutoRestart.setFont(a.Fonts.Main),this.txtAutoRestart.text="autoRestart"},g.prototype.setFrameNoBlood=function(){this.btnNoBlood.image.setFrame(!1===u.BalanceData.noBlood?"checkbox 10000":"checkbox 10001")},g.prototype.destroy=function(){this.scene.events.off(d.Localization.EVENT_CHANGE_LANG,this.changeLang,this),r.prototype.destroy.call(this),this.btnMusic=null,this.btnSfx=null,this.txtMusic=null,this.txtSfx=null,this.btnCheckReset=null,this.txtAutoReset=null,this.btnCheckRestart=null,this.txtAutoRestart=null,this.btnNoBlood=null,this.txtNoBlood=null},g);function g(){return null!==r&&r.apply(this,arguments)||this}e.PanelOptionsMenu=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.PanelOptionsHub=void 0,i(15)),a=i(0),h=i(19),l=i(6),c=i(1),u=i(10),d=i(2),p=i(17),f=i(11),g=i(21),m=i(9),i=(r=o.BasicPanel,s(y,r),y.prototype.init=function(){var t=this;this.addBgTitleBtn(680,740,"settings",!0,"close_hub_settings"),this.btnMenu=new l.ButtonScale(this.scene,-120,-220),this.btnMenu.addImageEvents(a.Atlases.ui,"btnPanelMain 10000",0,3),this.btnMenu.addIcon(a.Atlases.ui,"iconPlay 10000",-130),this.btnMenu.addTxtTranslated("mainmenu",a.Fonts.Main,34,16777215,1,-80),this.btnMenu.txtTranslated.setOrigin(0,.5),this.btnMenu.txtTranslated.setFitSize(230,u.JDTextFitParam.both,70),this.btnMenu.onUp=function(){return m.AzerionSDK.showAD("mainmenu_from_hub_settings",function(){return t.goBack()})},this.add(this.btnMenu.getView()),this.btnTrophies=new l.ButtonScale(this.scene,-120,this.btnMenu.y+110),this.btnTrophies.addImageEvents(a.Atlases.ui,"btnPanelMain 10000",0,3),this.btnTrophies.addIcon(a.Atlases.ui,"iconTrophie 10000",-130),this.btnTrophies.addTxtTranslated("trophies",a.Fonts.Main,34,16777215,1,-80),this.btnTrophies.txtTranslated.setOrigin(0,.5),this.btnTrophies.txtTranslated.setFitSize(230,u.JDTextFitParam.both,70),this.btnTrophies.onUp=function(){return t.scene.panelManager.show(g.PanelList.PanelTrophies)},this.add(this.btnTrophies.getView()),this.btnActSelect=new l.ButtonScale(this.scene,-120,this.btnTrophies.y+110),this.btnActSelect.addImageEvents(a.Atlases.ui,"btnPanelMain 10000",0,3),this.btnActSelect.addIcon(a.Atlases.ui,"iconAct 10000",-130),this.btnActSelect.addTxtTranslated("actSelect",a.Fonts.Main,34,16777215,1,-80),this.btnActSelect.txtTranslated.setOrigin(0,.5),this.btnActSelect.txtTranslated.setFitSize(230,u.JDTextFitParam.both,70),this.btnActSelect.onUp=function(){return t.scene.panelManager.show(g.PanelList.PanelActSelect)},this.add(this.btnActSelect.getView()),this.btnSfx=new l.ButtonScale(this.scene,120,this.btnActSelect.y-55),this.btnSfx.addImageEvents(a.Atlases.ui,"btnPanelSmall 10000",0,5),this.btnSfx.addIcon(a.Atlases.ui,"iconSFX 10000"),this.btnSfx.addIcon(a.Atlases.ui,"panelOnOff 10000"),this.btnSfx.onUp=function(){return t.switchSfx()},this.add(this.btnSfx.getView()),this.btnMusic=new l.ButtonScale(this.scene,120,this.btnSfx.y-110),this.btnMusic.addImageEvents(a.Atlases.ui,"btnPanelSmall 10000",0,5),this.btnMusic.addIcon(a.Atlases.ui,"iconMusic 10000"),this.btnMusic.addIcon(a.Atlases.ui,"panelOnOff 10000"),this.btnMusic.onUp=function(){return t.switchMusic()},this.add(this.btnMusic.getView()),this.txtSfx=new c.JDBmpdTextTranslated(this.scene,this.btnSfx.x+60,this.btnSfx.y,a.Fonts.Main,"",34,15196527,0),this.txtSfx.setFitSize(130),this.add(this.txtSfx),this.txtMusic=new c.JDBmpdTextTranslated(this.scene,this.btnMusic.x+60,this.btnMusic.y,a.Fonts.Main,"",34,15196527,0),this.txtMusic.setFitSize(130),this.add(this.txtMusic),this.txtAutoReset=new c.JDBmpdTextTranslated(this.scene,-180,210,a.Fonts.Main,"autoReset",32,16777215,0),this.txtAutoReset.setFitSize(460,u.JDTextFitParam.both,80),this.txtAutoReset.toUpperCase(),this.add(this.txtAutoReset),this.btnCheckReset=new l.ButtonScale(this.scene,this.txtAutoReset.x-50,this.txtAutoReset.y),this.btnCheckReset.addImageEvents(a.Atlases.ui,"checkbox 10000"),this.btnCheckReset.onUp=function(){return t.switchAutoReset()},this.add(this.btnCheckReset.getView()),this.txtAutoRestart=new c.JDBmpdTextTranslated(this.scene,-180,110,a.Fonts.Main,"autoRestart",32,16777215,0),this.txtAutoRestart.setFitSize(460,u.JDTextFitParam.both,80),this.add(this.txtAutoRestart),this.btnCheckRestart=new l.ButtonScale(this.scene,this.txtAutoRestart.x-50,this.txtAutoRestart.y),this.btnCheckRestart.addImageEvents(a.Atlases.ui,"checkbox 10000"),this.btnCheckRestart.onUp=function(){return t.switchAutoRestart()},this.add(this.btnCheckRestart.getView()),this.txtNoBlood=new c.JDBmpdTextTranslated(this.scene,-180,310,a.Fonts.Main,"noBlood",32,16777215,0),this.txtNoBlood.setFitSize(500,u.JDTextFitParam.wordWrap),this.add(this.txtNoBlood),this.btnNoBlood=new l.ButtonScale(this.scene,this.txtNoBlood.x-50,this.txtNoBlood.y),this.btnNoBlood.addImageEvents(a.Atlases.ui,"checkbox 10000"),this.btnNoBlood.onUp=function(){return t.switchNoBlood()},this.add(this.btnNoBlood.getView())},y.prototype.clikcOnBlack=function(){r.prototype.clikcOnBlack.call(this),this.scene.resumeWorld()},y.prototype.goBack=function(){this.scene.showSubSceneTransition(h.SubSceneList.Menu)},y.prototype.show=function(){r.prototype.show.call(this),this.setFrameSfx(),this.setFrameMusic(),this.setFrameAutoReset(),this.setFrameAutoRestart(),this.setFrameNoBlood(),this.scene.pauseWorld()},y.prototype.switchSfx=function(){f.SoundManager.setEnabled(f.SoundType.SFX),this.setFrameSfx()},y.prototype.setFrameSfx=function(){!0===d.BalanceData.mutedSfx?(this.btnSfx.icon.setFrame("panelOnOff 10001"),this.txtSfx.text="off"):(this.btnSfx.icon.setFrame("panelOnOff 10000"),this.txtSfx.text="on")},y.prototype.switchMusic=function(){f.SoundManager.setEnabled(f.SoundType.Music),this.setFrameMusic()},y.prototype.setFrameMusic=function(){!0===d.BalanceData.mutedMusic?(this.btnMusic.icon.setFrame("panelOnOff 10001"),this.txtMusic.text="off"):(this.btnMusic.icon.setFrame("panelOnOff 10000"),this.txtMusic.text="on")},y.prototype.switchAutoRestart=function(){d.BalanceData.autoRestart=!d.BalanceData.autoRestart,this.setFrameAutoRestart(),p.SaveGame.getInstance().saveProgress()},y.prototype.setFrameAutoRestart=function(){this.btnCheckRestart.image.setFrame(!1===d.BalanceData.autoRestart?"checkbox 10000":"checkbox 10001")},y.prototype.switchAutoReset=function(){d.BalanceData.autoReset=!d.BalanceData.autoReset,this.setFrameAutoReset(),p.SaveGame.getInstance().saveProgress()},y.prototype.setFrameAutoReset=function(){this.btnCheckReset.image.setFrame(!1===d.BalanceData.autoReset?"checkbox 10000":"checkbox 10001")},y.prototype.switchNoBlood=function(){d.BalanceData.noBlood=!d.BalanceData.noBlood,this.setFrameNoBlood(),p.SaveGame.getInstance().saveProgress(),this.txtAutoRestart.setFont(a.Fonts.Main),this.txtAutoRestart.text="autoRestart"},y.prototype.setFrameNoBlood=function(){this.btnNoBlood.image.setFrame(!1===d.BalanceData.noBlood?"checkbox 10000":"checkbox 10001")},y.prototype.destroy=function(){r.prototype.destroy.call(this),this.btnMusic=null,this.btnSfx=null,this.txtMusic=null,this.txtSfx=null,this.btnMenu=null,this.btnTrophies=null,this.btnActSelect=null,this.btnCheckReset=null,this.txtAutoReset=null,this.btnCheckRestart=null,this.txtAutoRestart=null,this.btnNoBlood=null,this.txtNoBlood=null},y);function y(){return null!==r&&r.apply(this,arguments)||this}e.PanelOptionsHub=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.PanelTrophies=void 0,i(15)),l=i(0),c=i(3),a=i(1),h=i(6),u=i(18),i=(r=o.BasicPanel,s(d,r),d.prototype.init=function(){this.addBgTitleBtn(1200,800,"trophies",!0,"close_trophies");var t=new Phaser.GameObjects.Graphics(this.scene);this.add(t),t.fillStyle(3441150),t.fillRoundedRect(-585,-200,1170,585,{tl:0,tr:0,bl:15,br:15}),this.buttonsTab=new Array(3),this.titleActs=this.createTabTitle(0,-390,"trophieActs"),this.titleTower=this.createTabTitle(1,0,"trophieTower"),this.titleAchive=this.createTabTitle(2,390,"trophieAchive"),this.tabs=new Array,this.createTabActs(),this.createTabTower(),this.createTabAchive(),this.txtDescription=new a.JDBmpdTextFit(this.scene,0,345,l.Fonts.Main,"",40),this.txtDescription.setFitSize(1050),this.add(this.txtDescription),this.hideDescription(),this.scene.events.on(c.Localization.EVENT_CHANGE_LANG,this.changeLang,this)},d.prototype.showTab=function(t){for(var e=0;e<this.buttonsTab.length;e++)e===t?(this.buttonsTab[e].getView().tint=3441150,this.buttonsTab[e].setInteraction(!1),this.tabs[e].visible=!0):(this.buttonsTab[e].setInteraction(!0),this.buttonsTab[e].inputOut(),this.tabs[e].visible=!1)},d.prototype.createTabTitle=function(t,e,i){var n=this,e=new h.ButtonImage(this.scene,e,-230,"texTrophieTab"),e=(e.setTintInteractive(1926874,1461670),this.add(e.getView()),e.onUp=function(){return n.showTab(t)},this.buttonsTab[t]=e,new a.JDBmpdTextTranslated(this.scene,e.x,e.y,l.Fonts.Main,i,40));return this.add(e),e},d.prototype.createTabActs=function(){var i=this,n=new Phaser.GameObjects.Container(this.scene);this.add(n),this.tabs.push(n);var r,s=-480;this.txtActStandarts=new a.JDBmpdTextTranslated(this.scene,-520,-110,l.Fonts.Main,"trophieStandart",40,16777215,0),n.add(this.txtActStandarts),this.txtActHard=new a.JDBmpdTextTranslated(this.scene,-520,145,l.Fonts.Main,"trophieHard",40,16777215,0),n.add(this.txtActHard);for(var o=this,t=1;t<c.BalanceData.totalActs;t++)!function(t){var e=0;!0===c.Achievements.isCompletedAct(t,!1)&&(e=t),r=new Phaser.GameObjects.Image(o.scene,s,0,l.Atlases.ui,"trophieAct "+(1e4+e)),n.add(r),r.setInteractive(),r.on(Phaser.Input.Events.POINTER_OVER,function(){return i.showDescriptionActs("Act",t)},o),r.on(Phaser.Input.Events.POINTER_OUT,o.hideDescription,o),!(e=0)===c.Achievements.isCompletedAct(t,!0)&&(e=t),r=new Phaser.GameObjects.Image(o.scene,s,250,l.Atlases.ui,"trophieActHard "+(1e4+e)),n.add(r),r.setInteractive(),r.on(Phaser.Input.Events.POINTER_OVER,function(){return i.showDescriptionActs("ActHard",t)},o),r.on(Phaser.Input.Events.POINTER_OUT,o.hideDescription,o),s+=120}(t);n=r=null},d.prototype.createTabTower=function(){var i=this,n=new Phaser.GameObjects.Container(this.scene);this.add(n),this.tabs.push(n);for(var r,s=-200,o=0,a=Object.keys(u.TrophieTower),h=this,t=0;t<a.length;t++)!function(t){var e=u.TrophieTower[a[t]];r=!1===c.Achievements.isAchieveCompleted(e)?new Phaser.GameObjects.Image(h.scene,s,o,l.Atlases.ui,"trophieAct 10000"):new Phaser.GameObjects.Image(h.scene,s,o,l.Atlases.ui,"trophie_"+e+" 10000"),n.add(r),r.setInteractive(),r.on(Phaser.Input.Events.POINTER_OVER,function(){return i.showDescription(e)},h),r.on(Phaser.Input.Events.POINTER_OUT,h.hideDescription,h),s+=200,(t+1)%3==0&&(s=-200,o+=230)}(t);n=r=null},d.prototype.createTabAchive=function(){var i=this,n=new Phaser.GameObjects.Container(this.scene);this.add(n),this.tabs.push(n);for(var r,s=-360,o=0,a=Object.keys(u.TrophieAchieves),h=this,t=0;t<a.length;t++)!function(t){var e=u.TrophieAchieves[a[t]];r=!1===c.Achievements.isAchieveCompleted(e)?new Phaser.GameObjects.Image(h.scene,s,o,l.Atlases.ui,"trophieAct 10000"):new Phaser.GameObjects.Image(h.scene,s,o,l.Atlases.ui,"trophie_"+e+" 10000"),n.add(r),r.setInteractive(),r.on(Phaser.Input.Events.POINTER_OVER,function(){return i.showDescription(e)},h),r.on(Phaser.Input.Events.POINTER_OUT,h.hideDescription,h),s+=180,(t+1)%5==0&&(s=-360,o+=230)}(t);n=r=null},d.prototype.changeLang=function(){this.txtTitle.setFont(l.Fonts.Main),this.txtTitle.text="trophies",this.titleActs.setFont(l.Fonts.Main),this.titleActs.text="trophieActs",this.txtActStandarts.setFont(l.Fonts.Main),this.txtActStandarts.text="trophieStandart",this.txtActHard.setFont(l.Fonts.Main),this.txtActHard.text="trophieHard",this.titleTower.setFont(l.Fonts.Main),this.titleTower.text="trophieTower",this.titleAchive.setFont(l.Fonts.Main),this.titleAchive.text="trophieAchive",this.txtDescription.setFont(l.Fonts.Main)},d.prototype.showDescriptionActs=function(t,e){this.txtDescription.visible=!0,this.txtDescription.text=c.Localization.getText("trophieDes"+t).replace("<x>",""+e)},d.prototype.showDescription=function(t){this.txtDescription.visible=!0,this.txtDescription.text=c.Localization.getText("trophieDes_"+t)},d.prototype.hideDescription=function(){this.txtDescription.visible=!1},d.prototype.show=function(){r.prototype.show.call(this),this.showTab(0)},d.prototype.hide=function(){r.prototype.hide.call(this),this.scene.resumeMenu()},d.prototype.destroy=function(){this.scene.events.off(c.Localization.EVENT_CHANGE_LANG,this.changeLang,this),r.prototype.destroy.call(this),this.buttonsTab=null,this.tabs=null,this.titleActs=null,this.txtActStandarts=null,this.txtActHard=null,this.titleTower=null,this.titleAchive=null,this.txtDescription=null},d);function d(){return null!==r&&r.apply(this,arguments)||this}e.PanelTrophies=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.PanelPause=void 0,i(15)),a=i(32),h=i(0),l=i(6),c=i(1),u=i(10),d=i(3),p=i(7),f=i(9),i=(r=o.BasicPanel,s(g,r),g.prototype.init=function(){var t=this;this.stars=new Array,this.scene.currLevelID!==d.BalanceData.towerID&&(this.addBgTitleBtn(740,580,"lvlObj",!1),this.addTarget(-300,-100,p.Helpers.getLevelTargetText(1,0)),this.addTarget(-300,45,p.Helpers.getLevelTargetText(2,this.scene.getTargetCoins())),this.addTarget(-300,190,p.Helpers.getLevelTargetText(3,this.scene.getTargetDeath())),this.btnRetry=new l.ButtonScale(this.scene,0,0),this.btnRetry.addImageEvents(h.Atlases.ui,"btn_yellow 10000",0,5,1.1,1.3),this.btnRetry.addTxtTranslated("retry",h.Fonts.Main,40,4737096),this.btnRetry.txtTranslated.setFitSize(220,u.JDTextFitParam.both,80),this.btnRetry.onUp=function(){return f.AzerionSDK.showAD("click_retry_pause_popup",function(){return t.resetlevel()})},this.add(this.btnRetry.getView())),this.imgPaused=new Phaser.GameObjects.Image(this.scene,0,0,h.Atlases.ui,"pause_bar 10000"),this.add(this.imgPaused),this.txtPaused=new c.JDBmpdTextTranslated(this.scene,0,0,h.Fonts.Main,"paused",100),this.add(this.txtPaused),this.btnExit=new l.ButtonScale(this.scene,-310,0),this.btnExit.addImageEvents(h.Atlases.ui,"btn_red 10000",0,5,1.1,1.3),this.btnExit.addTxtTranslated("exit",h.Fonts.Main,40,4737096),this.btnExit.txtTranslated.setFitSize(220,u.JDTextFitParam.both,80),this.btnExit.onUp=function(){return f.AzerionSDK.showAD("click_exit_pause_popup",function(){return t.goBack()})},this.add(this.btnExit.getView()),this.btnContinue=new l.ButtonScale(this.scene,310,0),this.btnContinue.addImageEvents(h.Atlases.ui,"btn_green 10000",0,5,1.1,1.3),this.btnContinue.addTxtTranslated("continue",h.Fonts.Main,40,4737096),this.btnContinue.txtTranslated.setFitSize(220,u.JDTextFitParam.both,80),this.btnContinue.onUp=function(){return f.AzerionSDK.showAD("click_continue_pause_popup",function(){return t.close()})},this.add(this.btnContinue.getView()),this.dailyContainer=new Phaser.GameObjects.Container(this.scene),this.scene.panelManager.add(this.dailyContainer),this.dailyTasks=new Array(4),this.dailyTasks[0]=new a.DailyTaskPause(this.dailyContainer,0,265,h.Constants.GHH-180),this.dailyTasks[1]=new a.DailyTaskPause(this.dailyContainer,1,265,h.Constants.GHH-60),this.dailyTasks[2]=new a.DailyTaskPause(this.dailyContainer,2,265,h.Constants.GHH+60),this.dailyTasks[3]=new a.DailyTaskPause(this.dailyContainer,3,265,h.Constants.GHH+180),this.scene.events.on(d.DailyTask.EVENT_TIMER_RESET,this.reset,this)},g.prototype.reset=function(){for(var t=0;t<this.dailyTasks.length;t++)this.dailyTasks[t].reset()},g.prototype.addTarget=function(t,e,i){var n=new Phaser.GameObjects.Image(this.scene,0,e,h.Atlases.gameplay,"whiteBlock 10000"),t=(n.tint=3441150,n.setDisplaySize(650,100),this.add(n),n=new Phaser.GameObjects.Image(this.scene,-t-25,e,h.Atlases.ui,"checkbox 10000"),this.add(n),this.stars.push(n),new c.JDBmpdTextFit(this.scene,t,e,h.Fonts.Main,i,40,16777215,0));t.setFitSize(450,u.JDTextFitParam.both,100),this.add(t),n=null},g.prototype.addBgTitleBtn=function(t,e,i,n){var r=this,s=(void 0===n&&(n=!0),t/2),e=e/2,o=(this.addBg(0,0,t,760).setInteractive().scaleY=.76,40-e+7);this.addBgTitle(0,o,t,80),this.txtTitle=new c.JDBmpdTextTranslated(this.scene,0,o-3,h.Fonts.Main,i,58),this.txtTitle.setFitSize(t-100),this.add(this.txtTitle),!0===n&&((o=new l.ButtonScaleImage(this.scene,s-15,15-e,h.Atlases.ui,"btnX 10000")).onUp=function(){return r.clikcOnBlack()},this.add(o.getView()))},g.prototype.show=function(){r.prototype.show.call(this),this.dailyContainer.visible=!0,d.DailyTask.startTimer(),this.scene.pauseWorld(),this.scene.currLevelID!==d.BalanceData.towerID&&(1===this.scene.isTargetLevelComplete()&&this.stars[0].setFrame("checkbox 10001"),1===this.scene.isTargetCoinsComplete()&&this.stars[1].setFrame("checkbox 10001"),1===this.scene.isTargetDeathComplete()&&this.stars[2].setFrame("checkbox 10001"));for(var t=0;t<this.dailyTasks.length;t++)this.dailyTasks[t].updateProgress()},g.prototype.hide=function(){r.prototype.hide.call(this),this.dailyContainer.visible=!1,d.DailyTask.stopTimer()},g.prototype.goBack=function(){this.scene.panelManager.hideCurrent(),this.scene.backFromSubSkin()},g.prototype.resetlevel=function(){this.close(),this.scene.resetLevel()},g.prototype.clikcOnBlack=function(){this.close()},g.prototype.close=function(){this.scene.panelManager.hideCurrent(),this.scene.resumeWorld()},g.prototype.resize=function(){r.prototype.resize.call(this),this.btnExit.y=this.btnContinue.y=410*h.Constants.UI_SCALE/this.scaleY+h.Constants.UI_SHIFT_Y,this.btnRetry&&(this.btnRetry.y=this.btnExit.y),this.imgPaused.y=-410*h.Constants.UI_SCALE/this.scaleY-h.Constants.UI_SHIFT_Y,this.txtPaused.y=this.imgPaused.y,this.dailyContainer.x=-h.Constants.UI_SHIFT_X},g.prototype.destroy=function(){this.scene.events.off(d.DailyTask.EVENT_TIMER_RESET,this.reset,this);for(var t=0;t<this.dailyTasks.length;t++)this.dailyTasks[t].destroy();r.prototype.destroy.call(this),this.btnRetry=null,this.btnExit=null,this.btnContinue=null,this.txtPaused=null,this.imgPaused=null,this.dailyContainer.destroy(),this.dailyContainer=null,this.dailyTasks=null,this.stars=null},g);function g(){return null!==r&&r.apply(this,arguments)||this}e.PanelPause=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.PanelActSelect=void 0,i(15)),a=i(0),h=i(6),l=i(18),c=i(2),i=(r=o.BasicPanel,s(u,r),u.prototype.init=function(){this.addBgTitleBtn(640,400,"actSelect",!0,"close_act_select");for(var t=-230,e=-30,i=1;i<c.BalanceData.totalActs;i++)this.addBtn(t,e,i,a.Atlases.ui,"trophieAct "+(1e4+i)),t+=115,i%5==0&&(t=-230,e+=140);this.addBtn(t,e,Number(c.BalanceData.vexID),a.Atlases.ui,"actVex 10000")},u.prototype.addBtn=function(t,e,i,n,r){var s=this,t=new h.ButtonScale(this.scene,t,e);t.addImageEvents(n,r),t.onUp=function(){return s.scene.portToActBlock(i)},this.add(t.getView()),!1===l.Achievements.isCompletedAct(i,!1)&&(t.alpha=.5,t.getInteractiveElement().input.enabled=!1)},u);function u(){return null!==r&&r.apply(this,arguments)||this}e.PanelActSelect=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.PanelLevelComplete=void 0,i(15)),a=i(0),h=i(6),l=i(1),c=i(10),u=i(7),d=i(9),i=(r=o.BasicPanel,s(p,r),p.prototype.init=function(){var t=this,e=(this.checkMark=new Array,this.addBgTitleBtn(740,760,"lvlComplete",!1),new h.ButtonScale(this.scene,-190,300)),i=(e.addImageEvents(a.Atlases.ui,"btn_yellow 10000",0,5,1.1,1.3),e.addTxtTranslated("retry",a.Fonts.Main,40,4737096),e.txtTranslated.setFitSize(220,c.JDTextFitParam.both,80),e.onUp=function(){return d.AzerionSDK.showAD("click_retry_level_complete",function(){return t.close(!0)})},this.add(e.getView()),(e=new h.ButtonScale(this.scene,190,300)).addImageEvents(a.Atlases.ui,"btn_green 10000",0,5,1.1,1.3),e.addTxtTranslated("continue",a.Fonts.Main,40,4737096),e.txtTranslated.setFitSize(220,c.JDTextFitParam.both,80),e.onUp=function(){return d.AzerionSDK.showAD("click_continue_level_complete",function(){return t.close()})},this.add(e.getView()),this.addTarget(-300,-130,u.Helpers.getLevelTargetText(1,0),1),this.addTarget(-300,10,u.Helpers.getLevelTargetText(2,this.scene.getTargetCoins())),this.addTarget(-300,150,u.Helpers.getLevelTargetText(3,this.scene.getTargetDeath())),new Phaser.GameObjects.Image(this.scene,-210,-240,a.Atlases.ui,"iconSkull 10000"));this.add(i),this.txtCurrDeath=new l.JDBmpdText(this.scene,i.x+60,i.y-2,a.Fonts.Main,"25",60,16777215,0),this.add(this.txtCurrDeath),i=new Phaser.GameObjects.Image(this.scene,50,-240,a.Atlases.ui,"coin 10000"),this.add(i),this.txtCurrCoins=new l.JDBmpdText(this.scene,i.x+60,i.y-2,a.Fonts.Main,"207",60,16777215,0),this.add(this.txtCurrCoins),e=null},p.prototype.addTarget=function(t,e,i,n){void 0===n&&(n=0);var r=new Phaser.GameObjects.Image(this.scene,0,e,a.Atlases.gameplay,"whiteBlock 10000"),n=(r.tint=3441150,r.setDisplaySize(650,100),this.add(r),r=new Phaser.GameObjects.Image(this.scene,-t-25,e,a.Atlases.ui,"checkbox 1000"+n),this.add(r),this.checkMark.push(r),new l.JDBmpdTextFit(this.scene,t,e,a.Fonts.Main,i,40,16777215,0));n.setFitSize(450,c.JDTextFitParam.both,100),this.add(n),r=null},p.prototype.show=function(){r.prototype.show.call(this),this.txtCurrDeath.text=""+this.scene.currentDeaths,this.txtCurrCoins.text=""+this.scene.currentMoney,this.checkMark[0].setFrame("checkbox 10001"),1===this.scene.isTargetCoinsComplete()?this.checkMark[1].setFrame("checkbox 10001"):this.scene.currentMoney>=this.scene.getTargetCoins()&&(this.scene.completeTargetCoins(),this.checkMark[1].setFrame("checkbox 10001")),1===this.scene.isTargetDeathComplete()?this.checkMark[2].setFrame("checkbox 10001"):(0===this.scene.currentDeaths||this.scene.currentDeaths<this.scene.getTargetDeath())&&(this.scene.completeTargetDeath(),this.checkMark[2].setFrame("checkbox 10001"))},p.prototype.clikcOnBlack=function(){this.close()},p.prototype.close=function(t){void 0===t&&(t=!1),this.scene.panelManager.hideCurrent(),this.scene.resumeWorld(),!0===t?(this.scene.player.spawn(),this.scene.firstSpawn=!0,this.scene.reset(),this.scene.resetLevel()):this.scene.resumeOnFinish()},p.prototype.destroy=function(){r.prototype.destroy.call(this),this.checkMark=null,this.txtCurrCoins=null,this.txtCurrDeath=null},p);function p(){return null!==r&&r.apply(this,arguments)||this}e.PanelLevelComplete=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.PanelLevelObjectives=void 0,i(15)),a=i(0),h=i(6),l=i(1),c=i(7),u=i(10),i=(r=o.BasicPanel,s(d,r),d.prototype.init=function(){var t=this,e=(this.addBgTitleBtn(740,700,"lvlObj",!1),new h.ButtonScale(this.scene,0,270));e.addImageEvents(a.Atlases.ui,"btn_green 10000",0,5,1.1,1.3),e.addTxtTranslated("play",a.Fonts.Main,40,4737096),e.onUp=function(){return t.play()},this.add(e.getView()),this.addTarget(-300,-170,c.Helpers.getLevelTargetText(1,0),this.scene.isTargetLevelComplete()),this.addTarget(-300,-30,c.Helpers.getLevelTargetText(2,this.scene.getTargetCoins()),this.scene.isTargetCoinsComplete()),this.addTarget(-300,110,c.Helpers.getLevelTargetText(3,this.scene.getTargetDeath()),this.scene.isTargetDeathComplete()),e=null,!1===a.Constants.IS_MOBILE&&this.scene.input.keyboard.on("keydown",this.onKeyDown,this)},d.prototype.onKeyDown=function(t){!1===this.visible||(t=t.keyCode)!==Phaser.Input.Keyboard.KeyCodes.A&&t!==Phaser.Input.Keyboard.KeyCodes.LEFT&&t!==Phaser.Input.Keyboard.KeyCodes.D&&t!==Phaser.Input.Keyboard.KeyCodes.RIGHT&&t!==Phaser.Input.Keyboard.KeyCodes.W&&t!==Phaser.Input.Keyboard.KeyCodes.UP&&t!==Phaser.Input.Keyboard.KeyCodes.S&&t!==Phaser.Input.Keyboard.KeyCodes.DOWN&&t!==Phaser.Input.Keyboard.KeyCodes.SPACE&&t!==Phaser.Input.Keyboard.KeyCodes.ENTER||this.play()},d.prototype.addTarget=function(t,e,i,n){var r=new Phaser.GameObjects.Image(this.scene,0,e,a.Atlases.gameplay,"whiteBlock 10000"),n=(r.tint=3441150,r.setDisplaySize(650,100),this.add(r),r=new Phaser.GameObjects.Image(this.scene,-t-25,e,a.Atlases.ui,"checkbox 1000"+n),this.add(r),new l.JDBmpdTextFit(this.scene,t,e,a.Fonts.Main,i,40,16777215,0));n.setFitSize(450,u.JDTextFitParam.both,100),this.add(n),r=null},d.prototype.show=function(){r.prototype.show.call(this),this.scene.pauseWorld()},d.prototype.play=function(){this.scene.panelManager.hideCurrent(),this.scene.resumeWorld()},d.prototype.clikcOnBlack=function(){this.play()},d.prototype.destroy=function(){this.scene.input.keyboard.off("keydown",this.onKeyDown,this),r.prototype.destroy.call(this)},d.prototype.addBgTitleBtn=function(t,e,i,n){var r=this,s=(void 0===n&&(n=!0),t/2),e=e/2,o=(this.addBg(0,0,t,760).setInteractive().scaleY=.92,40-e+7);this.addBgTitle(0,o,t,80),this.txtTitle=new l.JDBmpdTextTranslated(this.scene,0,o-3,a.Fonts.Main,i,58),this.add(this.txtTitle),!0===n&&((t=new h.ButtonScaleImage(this.scene,s-15,15-e,a.Atlases.ui,"btnX 10000")).onUp=function(){return r.clikcOnBlack()},this.add(t.getView()))},d);function d(){return null!==r&&r.apply(this,arguments)||this}e.PanelLevelObjectives=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.PanelDailyTasks=void 0,i(15)),a=i(9),h=i(0),l=i(19),c=i(6),u=i(1),d=i(3),p=i(32),i=(r=o.BasicPanel,s(f,r),f.prototype.init=function(){var e=this;this.addBgTitleBtn(1200,800,"dailyTasks",!0,"close_daily_tasks"),this.resetInLocale=d.Localization.getText("resetsIn"),this.txtResetIn=new u.JDBmpdText(this.scene,0,-275,h.Fonts.Main,"",40),this.add(this.txtResetIn),!0===h.Constants.IS_AD_REWARD_AVAILABLE&&(this.btnAD=new c.ButtonScale(this.scene,0,this.txtResetIn.y),this.btnAD.addImageEvents(h.Atlases.ui,"btn_yellow 10000",0,3,.5,.95),this.btnAD.addIcon(h.Atlases.ui,"watch_icon 10000"),this.btnAD.onUp=function(){return a.AzerionSDK.showADRewarded(function(t){return e.adComplete(t)})},this.add(this.btnAD.getView())),this.dailyTasks=new Array(4),this.dailyTasks[0]=new p.DailyTaskPanel(this,0,-290,-85),this.dailyTasks[1]=new p.DailyTaskPanel(this,1,290,-85),this.dailyTasks[2]=new p.DailyTaskPanel(this,2,-290,225),this.dailyTasks[3]=new p.DailyTaskPanel(this,3,290,225),this.scene.events.on(d.DailyTask.EVENT_TIMER_RESET,this.reset,this),this.scene.events.on(d.DailyTask.EVENT_TIMER_TICK,this.tickTimer,this),d.DailyTask.startTimer(),this.scene.events.on(d.Localization.EVENT_CHANGE_LANG,this.changeLang,this)},f.prototype.adComplete=function(t){!0===t?d.DailyTask.resetByAD():this.btnAD.onUp=null},f.prototype.changeLang=function(){this.txtTitle.setFont(h.Fonts.Main),this.txtTitle.text="dailyTasks",this.resetInLocale=d.Localization.getText("resetsIn"),this.txtResetIn.setFont(h.Fonts.Main),this.txtResetIn.text=this.resetInLocale+": "+this.decoratedTime;for(var t=0;t<this.dailyTasks.length;t++)this.dailyTasks[t].changeLang()},f.prototype.reset=function(){for(var t=0;t<this.dailyTasks.length;t++)this.dailyTasks[t].reset()},f.prototype.tickTimer=function(t){this.txtResetIn.text=this.resetInLocale+": "+t,this.decoratedTime=t},f.prototype.show=function(){r.prototype.show.call(this),this.scene.pauseWorld(),this.btnAD&&(this.btnAD.x=this.txtResetIn.x+this.txtResetIn.width/2+100)},f.prototype.hide=function(){r.prototype.hide.call(this),this.scene.currSubScene===l.SubSceneList.Menu?this.scene.resumeMenu():this.scene.resumeWorld()},f.prototype.destroy=function(){this.scene.events.off(d.Localization.EVENT_CHANGE_LANG,this.changeLang,this),this.scene.events.off(d.DailyTask.EVENT_TIMER_RESET,this.reset,this),this.scene.events.off(d.DailyTask.EVENT_TIMER_TICK,this.tickTimer,this),r.prototype.destroy.call(this);for(var t=0;t<this.dailyTasks.length;t++)this.dailyTasks[t].destroy();this.dailyTasks=null,this.txtResetIn=null},f);function f(){return null!==r&&r.apply(this,arguments)||this}e.PanelDailyTasks=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.PanelAreYouOk=void 0,i(15)),a=i(0),h=i(6),l=i(9),i=(r=o.BasicPanel,s(c,r),c.prototype.init=function(){var t=this,e=(this.addBgTitleBtn(740,220,"youOk",!1),new h.ButtonScale(this.scene,-170,40));e.addImageEvents(a.Atlases.ui,"btn_red 10000",0,5,1.1,1.3),e.addTxtTranslated("no",a.Fonts.Main,40,4737096),e.onUp=function(){return l.AzerionSDK.showAD("click_no_death_popup",function(){return t.sayNo()})},this.add(e.getView()),(e=new h.ButtonScale(this.scene,170,e.y)).addImageEvents(a.Atlases.ui,"btn_green 10000",0,5,1.1,1.3),e.addTxtTranslated("yes",a.Fonts.Main,40,4737096),e.onUp=function(){return l.AzerionSDK.showAD("click_yes_death_popup",function(){return t.close()})},this.add(e.getView())},c.prototype.show=function(){r.prototype.show.call(this),this.scene.pauseWorld()},c.prototype.sayNo=function(){this.scene.player.addShield(),this.close()},c.prototype.close=function(){this.scene.panelManager.hideCurrent(),this.scene.resumeWorld()},c.prototype.clikcOnBlack=function(){},c);function c(){return null!==r&&r.apply(this,arguments)||this}e.PanelAreYouOk=i},function(t,e,i){"use strict";var n,a,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),s=(Object.defineProperty(e,"__esModule",{value:!0}),e.PanelLanguages=void 0,i(15)),h=i(0),o=i(6),l=i(3),i=(a=s.BasicPanel,r(c,a),c.prototype.init=function(){var i,n=this;this.addBgTitleBtn(640,640,"lang"),this.langs={};for(var r=this,t=0;t<h.Constants.AVAILABLE_LANGUAGES.length;t++)!function(t){var e=h.Constants.AVAILABLE_LANGUAGES[t];(i=new o.ButtonScaleImage(r.scene,0,0,h.Atlases.ui,"flag_"+e+" 10000")).onUp=function(){return n.changeLang(e)},r.add(i.getView()),r.langs[e]=i}(t);i=null},c.prototype.changeLang=function(t){l.Localization.setLng(t),this.txtTitle.setFont(h.Fonts.Main),this.scene.events.emit(l.Localization.EVENT_CHANGE_LANG),this.scene.panelManager.hideCurrent()},c.prototype.show=function(){a.prototype.show.call(this);for(var t=-180,e=-130,i=l.Localization.getLang(),n=1,r=0,s=h.Constants.AVAILABLE_LANGUAGES;r<s.length;r++){var o=s[r];o!==i?(this.langs[o].visible=!0,this.langs[o].x=t,this.langs[o].y=e,e+=115,n%4==0&&(e=-130,t+=180),n+=1):this.langs[o].visible=!1}this.txtTitle.text="language"},c.prototype.destroy=function(){a.prototype.destroy.call(this),this.langs=null,this.txtTitle=null},c);function c(){return null!==a&&a.apply(this,arguments)||this}e.PanelLanguages=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.PanelFreeSkin=void 0,i(0)),a=i(6),h=i(1),l=i(3),c=i(7),i=(r=i(15).BasicPanel,s(u,r),u.prototype.init=function(){var t=this,e=(this.addBgTitleBtn(640,560,"newAchiveSkin",!1),new h.JDSpineGameObject(this.scene,0,0,"player","stand")),e=(this.add(e.getView()),e.play("run",!0),e.setSkin(c.Helpers.formatNumberZeroLess10(l.SkinsData.freeSkinData.skinID)),e.scaleX=e.scaleY=6.5,e.y=90+e.getView().height/2,new a.ButtonScale(this.scene,-145,210));e.addImageEvents(o.Atlases.ui,"btn_green 10000",0,3),e.addTxtTranslated("equip",o.Fonts.Main,34,4737096),e.txtTranslated.setFitSize(200),e.onUp=function(){return t.equip()},this.add(e.getView()),(e=new a.ButtonScale(this.scene,145,210)).addImageEvents(o.Atlases.ui,"btn_yellow 10000",0,3),e.addTxtTranslated("continue",o.Fonts.Main,34,4737096),e.txtTranslated.setFitSize(200),e.onUp=function(){return t.close()},this.add(e.getView())},u.prototype.show=function(){r.prototype.show.call(this),this.scene.pauseWorld()},u.prototype.hide=function(){r.prototype.hide.call(this),this.scene.resumeMenu()},u.prototype.equip=function(){l.BalanceData.currSkin=l.SkinsData.freeSkinData.skinID,this.scene.player.setSkin(l.BalanceData.currSkin),l.SkinsData.setSkinStatus2(l.SkinsData.freeSkinData.rare,l.SkinsData.freeSkinData.id),this.close()},u.prototype.close=function(){this.scene.panelManager.hideCurrent(),l.SkinsData.freeSkinData=null},u.prototype.clikcOnBlack=function(){},u);function u(){return null!==r&&r.apply(this,arguments)||this}e.PanelFreeSkin=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.PanelTowerComplete=void 0,i(15)),a=i(0),h=i(6),l=i(1),i=(r=o.BasicPanel,s(c,r),c.prototype.init=function(){var t=this,e=(this.addBgTitleBtn(740,760,"towerComplete",!1),new l.JDBmpdTextTranslated(this.scene,0,-170,a.Fonts.Main,"towerCreditsCollect",50)),i=(e.setFitSize(680),this.add(e),new Phaser.GameObjects.Image(this.scene,-60,e.y+100,a.Atlases.ui,"coinTower 10000")),i=(this.add(i),this.txtCurrCoins=new l.JDBmpdText(this.scene,i.x+60,i.y-5,a.Fonts.Main,"207",70),this.txtCurrCoins.setOrigin(0,.5),this.add(this.txtCurrCoins),(e=new l.JDBmpdTextTranslated(this.scene,0,i.y+120,a.Fonts.Main,"floorsPassed",50)).setFitSize(680),this.add(e),i=new Phaser.GameObjects.Image(this.scene,i.x,e.y+100,a.Atlases.ui,"floors 10000"),this.add(i),this.txtCurrFloors=new l.JDBmpdText(this.scene,i.x+60,i.y-5,a.Fonts.Main,"207",70),this.txtCurrFloors.setOrigin(0,.5),this.add(this.txtCurrFloors),new h.ButtonScale(this.scene,0,300));i.addImageEvents(a.Atlases.ui,"btn_green 10000",0,5,1.1,1.3),i.addTxtTranslated("continue",a.Fonts.Main,40,4737096),i.txtTranslated.setFitSize(220),i.onUp=function(){return t.close()},this.add(i.getView()),e=null},c.prototype.show=function(){r.prototype.show.call(this),this.txtCurrCoins.text=""+this.scene.currentMoney,this.txtCurrFloors.text=""+this.scene.currHeroFloor},c.prototype.clikcOnBlack=function(){this.close()},c.prototype.close=function(){this.closeCurr(),this.scene.backFromSubSkin()},c.prototype.closeCurr=function(){this.scene.panelManager.hideCurrent(),this.scene.resumeWorld()},c.prototype.destroy=function(){r.prototype.destroy.call(this),this.txtCurrCoins=null,this.txtCurrFloors=null},c);function c(){return null!==r&&r.apply(this,arguments)||this}e.PanelTowerComplete=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.PanelTowerDefeat=void 0,i(15)),a=i(9),h=i(0),l=i(6),c=i(1),u=i(10),i=(r=o.BasicPanel,s(d,r),d.prototype.init=function(){var e=this,t=(this.addBgTitleBtn(640,460,"towerDeteated",!1),new c.JDBmpdTextTranslated(this.scene,0,-20,h.Fonts.Main,"continueDes",36));t.setFitSize(560,u.JDTextFitParam.both),this.add(t),this.btnAD=new l.ButtonContainer(this.scene,0,150),this.btnAD.addImageEvents(h.Atlases.ui,"btn_yellow 10000",0,5,1.1,1.3),this.btnAD.addIcon(h.Atlases.ui,"watch_icon 10000",-90),this.btnAD.addTxtTranslated("watchAD",h.Fonts.Main,40,4737096,1,25),this.btnAD.txtTranslated.setFitSize(155,u.JDTextFitParam.both,65),this.btnAD.onUp=function(){return a.AzerionSDK.showADRewarded(function(t){return e.adComplete(t)})},this.add(this.btnAD.getView()),this.scene.tweens.add({targets:this.btnAD,scale:1.1,loop:-1,yoyo:!0,duration:400}),this.btnNoTHX=new l.ButtonScale(this.scene,0,this.btnAD.y+160),this.btnNoTHX.addImageEvents(h.Atlases.ui,"btn_red 10000",0,5,1.1,1.3),this.btnNoTHX.addTxtTranslated("noThanks",h.Fonts.Main,40,4737096),this.btnNoTHX.txtTranslated.setFitSize(220,u.JDTextFitParam.both,65),this.btnNoTHX.onUp=function(){return e.close()},this.add(this.btnNoTHX.getView()),this.btnNoTHX.visible=!1},d.prototype.update=function(){!1===this.visible||this.counter<=0||(--this.counter,0===this.counter&&(this.btnNoTHX.visible=!0))},d.prototype.adComplete=function(t){!0===t?(this.closeCurr(),this.scene.restartTowerStage()):(this.btnAD.txtTranslated.text="unavailable",this.btnAD.onUp=null,this.scene.tweens.killTweensOf(this.btnAD))},d.prototype.clikcOnBlack=function(){},d.prototype.close=function(){this.scene.tweens.killTweensOf(this.btnAD),this.closeCurr(),this.scene.showTowerCompletePanel()},d.prototype.closeCurr=function(){this.scene.panelManager.hideCurrent()},d.prototype.destroy=function(){r.prototype.destroy.call(this),this.btnAD=null,this.btnNoTHX=null},d);function d(){var t=null!==r&&r.apply(this,arguments)||this;return t.counter=120,t}e.PanelTowerDefeat=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.PanelPowerUp=void 0,i(15)),a=i(9),h=i(0),l=i(6),c=i(1),u=i(10),i=(r=o.BasicPanel,s(d,r),d.prototype.init=function(){var e=this,t=(this.addBgTitleBtn(640,460,"powerUpTitle",!1),new c.JDBmpdTextTranslated(this.scene,0,-20,h.Fonts.Main,"powerUpDes",36));t.setFitSize(560,u.JDTextFitParam.both),this.add(t),this.btnAD=new l.ButtonContainer(this.scene,0,150),this.btnAD.addImageEvents(h.Atlases.ui,"btn_yellow 10000",0,5,1.1,1.3),this.btnAD.addIcon(h.Atlases.ui,"watch_icon 10000",-90),this.btnAD.addTxtTranslated("watchAD",h.Fonts.Main,40,4737096,1,25),this.btnAD.txtTranslated.setFitSize(155,u.JDTextFitParam.both,65),this.btnAD.onUp=function(){return a.AzerionSDK.showADRewarded(function(t){return e.adComplete(t)})},this.add(this.btnAD.getView()),this.scene.tweens.add({targets:this.btnAD,scale:1.1,loop:-1,yoyo:!0,duration:400}),this.btnNoTHX=new l.ButtonScale(this.scene,0,this.btnAD.y+160),this.btnNoTHX.addImageEvents(h.Atlases.ui,"btn_red 10000",0,5,1.1,1.3),this.btnNoTHX.addTxtTranslated("noThanks",h.Fonts.Main,40,4737096),this.btnNoTHX.txtTranslated.setFitSize(220,u.JDTextFitParam.both,65),this.btnNoTHX.onUp=function(){return e.close()},this.add(this.btnNoTHX.getView()),this.btnNoTHX.visible=!1},d.prototype.show=function(){r.prototype.show.call(this),this.scene.pauseWorld()},d.prototype.update=function(){!1===this.visible||this.counter<=0||(--this.counter,0===this.counter&&(this.btnNoTHX.visible=!0))},d.prototype.adComplete=function(t){!0===t?(this.close(),this.scene.player.addShield()):(this.btnAD.txtTranslated.text="unavailable",this.btnAD.onUp=null,this.scene.tweens.killTweensOf(this.btnAD))},d.prototype.clikcOnBlack=function(){},d.prototype.close=function(){this.scene.tweens.killTweensOf(this.btnAD),this.scene.panelManager.hideCurrent(),this.scene.resumeWorld()},d.prototype.destroy=function(){r.prototype.destroy.call(this),this.btnAD=null,this.btnNoTHX=null},d);function d(){var t=null!==r&&r.apply(this,arguments)||this;return t.counter=120,t}e.PanelPowerUp=i},function(t,e,i){"use strict";var n,s,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.PTimeAct=void 0,i(0)),a=i(6),h=i(1),l=i(21),i=(s=Phaser.GameObjects.Container,r(c,s),c.prototype.getTime=function(){return this.txtTime.text},c.prototype.updateTime=function(t){this.txtTime.text=t},c.prototype.setCoins=function(t){this.txtCoins.text=""+t},c.prototype.resize=function(){this.scale=o.Constants.UI_ADDITIONAL_TOP_PANELS_SCALE,this.x=o.Constants.GW+o.Constants.UI_SHIFT_X,this.y=-o.Constants.UI_SHIFT_Y},c.prototype.destroy=function(){s.prototype.destroy.call(this),this.txtTime=null,this.txtCoins=null},c);function c(t){var e=s.call(this,t)||this,i=new Phaser.GameObjects.Image(e.scene,0,31,o.Atlases.ui,"top_bar 10000"),n=(i.setOrigin(1,.5),e.add(i),new Phaser.GameObjects.Image(e.scene,0,31,o.Atlases.ui,"top_corner 10000")),r=(n.setOrigin(1,.5),e.add(n),e.txtCoins=new h.JDBmpdText(e.scene,-25,31,o.Fonts.Main,"0",40,16777215,2),e.add(e.txtCoins),new Phaser.GameObjects.Image(e.scene,e.txtCoins.x-70,31,o.Atlases.ui,"coin 10000")),r=(r.scale=.9,e.add(r),r=new Phaser.GameObjects.Image(e.scene,r.x-40,31,o.Atlases.ui,"top_separator 10000"),e.add(r),e.txtTime=new h.JDBmpdText(e.scene,r.x-100,31,o.Fonts.Main,"00:00:00",40),e.add(e.txtTime),i.displayWidth=-e.txtTime.x+e.txtTime.width-70,n.x=i.x-i.displayWidth+2,n=i=r=null,new a.ButtonContainerFrame(e.scene,-65,140,o.Atlases.ui,"buttonBlue 10000","buttonBlue 10001"));return r.addIcon(o.Atlases.ui,"iconPause 10000"),r.onUp=function(){return t.panelManager.show(l.PanelList.PanelPause)},e.add(r.getView()),r=null,e}e.PTimeAct=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.PTimeHub=void 0,i(0)),a=i(19),h=i(6),l=i(1),c=i(3),u=i(23),d=i(7),p=i(21),i=(r=Phaser.GameObjects.Container,s(f,r),f.prototype.createButtons=function(){var t=this,e=new h.ButtonContainerFrame(this.scene,-65,140,o.Atlases.ui,"buttonBlue 10000","buttonBlue 10001");e.addIcon(o.Atlases.ui,"iconSetting 10000"),e.onUp=function(){return t.scene.panelManager.show(p.PanelList.PanelOptionsHub)},this.add(e.getView()),(e=new h.ButtonContainerFrame(this.scene,-65,e.y+110,o.Atlases.ui,"buttonBlue 10000","buttonBlue 10001")).addIcon(o.Atlases.ui,"iconDailyTask 10000"),e.onUp=function(){return t.scene.panelManager.show(p.PanelList.PanelDailyTasks)},this.add(e.getView()),!0===u.DailyTask.canShowTaskI()&&(this.Idaily=new Phaser.GameObjects.Image(this.scene,40,-40,o.Atlases.ui,"icon_alert 10000"),this.Idaily.scale=.7,e.add(this.Idaily),this.scene.events.on(u.DailyTask.EVENT_REWARDED,this.checkDailyI,this)),this.btnBonusStage=new h.ButtonContainerFrame(this.scene,-65,e.y+110,o.Atlases.ui,"buttonBlue 10000","buttonBlue 10001"),this.btnBonusStage.addIcon(o.Atlases.ui,"iconTower 10000"),this.btnBonusStage.onUp=function(){return t.scene.showSubSceneTransition(a.SubSceneList.Tower)},this.add(this.btnBonusStage.getView())},f.prototype.checkDailyI=function(){this.Idaily.visible=u.DailyTask.canShowTaskI(),this.updateCoins()},f.prototype.updateTime=function(t){this.txtTime.text=t},f.prototype.updateCoins=function(){this.txtCoins.text=d.Helpers.moneyDecorator(c.BalanceData.totalMoney)},f.prototype.resize=function(){this.scale=o.Constants.UI_ADDITIONAL_TOP_PANELS_SCALE,this.x=o.Constants.GW+o.Constants.UI_SHIFT_X,this.y=-o.Constants.UI_SHIFT_Y},f.prototype.destroy=function(){this.scene.events.off(u.DailyTask.EVENT_REWARDED,this.checkDailyI,this),r.prototype.destroy.call(this),this.scene=null,this.txtTime=null,this.txtProgress=null,this.txtCoins=null,this.Idaily=null,this.btnBonusStage=null},f);function f(t){var t=r.call(this,t)||this,e=new Phaser.GameObjects.Image(t.scene,0,31,o.Atlases.ui,"top_bar 10000"),i=(e.setOrigin(1,.5),t.add(e),new Phaser.GameObjects.Image(t.scene,0,31,o.Atlases.ui,"top_corner 10000")),n=(i.setOrigin(1,.5),t.add(i),t.txtCoins=new l.JDBmpdText(t.scene,-25,31,o.Fonts.Main,"0",40,16777215,2),t.add(t.txtCoins),t.updateCoins(),new Phaser.GameObjects.Image(t.scene,t.txtCoins.x-t.txtCoins.width-40,31,o.Atlases.ui,"coin 10000"));return n.scale=.9,t.add(n),n=new Phaser.GameObjects.Image(t.scene,n.x-40,31,o.Atlases.ui,"top_separator 10000"),t.add(n),t.txtTime=new l.JDBmpdText(t.scene,n.x-100,31,o.Fonts.Main,"00:00:00",40),t.add(t.txtTime),n=new Phaser.GameObjects.Image(t.scene,t.txtTime.x-95,31,o.Atlases.ui,"top_separator 10000"),t.add(n),t.txtProgress=new l.JDBmpdTextTranslated(t.scene,n.x-20,31,o.Fonts.Main,"",40),t.txtProgress.setOrigin(1,.5),t.txtProgress.setTextPref("100% ","complete"),t.add(t.txtProgress),t.txtProgress.setTextPref(Math.floor(100*c.Achievements.getTotalProgress())+"% ","complete"),e.displayWidth=-t.txtProgress.x+t.txtProgress.width+10,i.x=e.x-e.displayWidth+2,i=e=n=null,t.createButtons(),t}e.PTimeHub=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.PTimeTower=void 0,i(0)),a=i(6),h=i(28),l=i(1),c=i(3),u=i(21),i=(r=Phaser.GameObjects.Container,s(d,r),d.prototype.addBtn=function(){var t=this,e=new a.ButtonContainerFrame(this.scene,-65,140,o.Atlases.ui,"buttonBlue 10000","buttonBlue 10001");e.addIcon(o.Atlases.ui,"iconPause 10000"),e.onUp=function(){return t.scene.panelManager.show(u.PanelList.PanelPause)},this.add(e.getView())},d.prototype.getTime=function(){return this.txtTime.text},d.prototype.updateTime=function(t){this.txtTime.text=t,this.scene.currHeroFloor>this.currFlor&&(this.currFlor=this.scene.currHeroFloor,this.txtFloor.text=""+this.currFlor,this.txtFloorBig.text=this.txtFloor.text,c.BalanceData.towerFloor=this.scene.currHeroFloor,this.updateBg())},d.prototype.updateBg=function(){this.iconFloor.x=this.txtFloor.x-15*this.txtFloor.text.length-50,this.separator.x=this.iconFloor.x-40,this.txtTime.x=this.separator.x-100,this.bg.displayWidth=-this.txtTime.x+this.txtTime.width-70,this.bgCorner.x=this.bg.x-this.bg.displayWidth+2},d.prototype.setCoins=function(t){this.txtCoins.text=""+t},d.prototype.resize=function(){this.scale=o.Constants.UI_ADDITIONAL_TOP_PANELS_SCALE,this.x=o.Constants.GW+o.Constants.UI_SHIFT_X,this.y=-o.Constants.UI_SHIFT_Y,this.txtFloorBig.x=h.CustomResize.CanvasHalfW},d.prototype.destroy=function(){r.prototype.destroy.call(this),this.txtFloorBig.destroy(),this.txtFloorBig=null,this.scene=null,this.bg=null,this.bgCorner=null,this.separator=null,this.txtTime=null,this.txtCoins=null,this.txtFloor=null,this.iconFloor=null},d);function d(t){var t=r.call(this,t)||this,e=(t.bg=new Phaser.GameObjects.Image(t.scene,0,31,o.Atlases.ui,"top_bar 10000"),t.bg.setOrigin(1,.5),t.add(t.bg),t.bgCorner=new Phaser.GameObjects.Image(t.scene,0,31,o.Atlases.ui,"top_corner 10000"),t.bgCorner.setOrigin(1,.5),t.add(t.bgCorner),t.txtCoins=new l.JDBmpdText(t.scene,-25,31,o.Fonts.Main,"0",40,16777215,2),t.add(t.txtCoins),new Phaser.GameObjects.Image(t.scene,t.txtCoins.x-70,31,o.Atlases.ui,"coinTower 10000"));return e.scale=.9,t.add(e),e=new Phaser.GameObjects.Image(t.scene,e.x-40,31,o.Atlases.ui,"top_separator 10000"),t.add(e),t.txtFloor=new l.JDBmpdText(t.scene,e.x-20,31,o.Fonts.Main,"0",40,16777215,2),t.add(t.txtFloor),t.iconFloor=new Phaser.GameObjects.Image(t.scene,0,31,o.Atlases.ui,"floors 10000"),t.add(t.iconFloor),t.separator=new Phaser.GameObjects.Image(t.scene,0,31,o.Atlases.ui,"top_separator 10000"),t.add(t.separator),t.txtTime=new l.JDBmpdText(t.scene,0,31,o.Fonts.Main,"00:00:00",40),t.add(t.txtTime),t.txtFloorBig=new l.JDBmpdText(t.scene,0,170,o.Fonts.BigNumbers,"0",250,8947848),t.txtFloorBig.alpha=.5,t.scene.add.existing(t.txtFloorBig),t.scene.sys.displayList.moveTo(t.txtFloorBig,t.scene.sys.displayList.getIndex(t.scene.background)+1),t.addBtn(),e=null,t.currFlor=0,t.updateBg(),t}e.PTimeTower=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.PLevel=void 0,i(0)),a=i(1),i=(r=Phaser.GameObjects.Container,s(h,r),h.prototype.setDeath=function(t){this.txtTotalDeath.text=""+t,this.bgBar.displayWidth=this.txtTotalDeath.x+this.txtTotalDeath.width+10,this.bgCorner.x=this.bgBar.x+this.bgBar.displayWidth-3},h.prototype.resize=function(){this.scale=o.Constants.UI_ADDITIONAL_TOP_PANELS_SCALE,this.x=-o.Constants.UI_SHIFT_X,this.y=-o.Constants.UI_SHIFT_Y},h.prototype.destroy=function(){r.prototype.destroy.call(this),this.txtLevel=null,this.txtTotalDeath=null,this.bgBar=null,this.bgCorner=null},h);function h(t,e){t=r.call(this,t)||this,t.bgBar=new Phaser.GameObjects.Image(t.scene,0,31,o.Atlases.ui,"top_bar 10000"),t.bgBar.setOrigin(0,.5),t.add(t.bgBar),t.bgCorner=new Phaser.GameObjects.Image(t.scene,0,30.5,o.Atlases.ui,"top_corner 10000"),t.bgCorner.setOrigin(0,.5),t.bgCorner.flipX=!0,t.add(t.bgCorner),t.txtLevel=new a.JDBmpdText(t.scene,30,31,o.Fonts.Main,e,40),t.txtLevel.setOrigin(0,.5),t.add(t.txtLevel),e=new Phaser.GameObjects.Image(t.scene,t.txtLevel.x+t.txtLevel.width+30,31,o.Atlases.ui,"top_separator 10000");return t.add(e),e=new Phaser.GameObjects.Image(t.scene,e.x+50,31,o.Atlases.ui,"iconSkull 10000"),t.add(e),t.txtTotalDeath=new a.JDBmpdText(t.scene,e.x+50,31,o.Fonts.Main,"",40),t.txtTotalDeath.setOrigin(0,.5),t.add(t.txtTotalDeath),t}e.PLevel=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.PLevelTower=void 0,i(0)),a=i(1),i=(r=Phaser.GameObjects.Container,s(h,r),h.prototype.resize=function(){this.scale=o.Constants.UI_ADDITIONAL_TOP_PANELS_SCALE,this.x=-o.Constants.UI_SHIFT_X,this.y=-o.Constants.UI_SHIFT_Y},h.prototype.destroy=function(){r.prototype.destroy.call(this),this.txtLevel=null,this.bgBar=null,this.bgCorner=null},h);function h(t,e){t=r.call(this,t)||this;return t.bgBar=new Phaser.GameObjects.Image(t.scene,0,31,o.Atlases.ui,"top_bar 10000"),t.bgBar.setOrigin(0,.5),t.add(t.bgBar),t.bgCorner=new Phaser.GameObjects.Image(t.scene,0,30.5,o.Atlases.ui,"top_corner 10000"),t.bgCorner.setOrigin(0,.5),t.bgCorner.flipX=!0,t.add(t.bgCorner),t.txtLevel=new a.JDBmpdText(t.scene,30,31,o.Fonts.Main,e,40),t.txtLevel.setOrigin(0,.5),t.add(t.txtLevel),t.bgBar.displayWidth=t.txtLevel.x+t.txtLevel.width+25,t.bgCorner.x=t.bgBar.x+t.bgBar.displayWidth-3,t}e.PLevelTower=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.PAchievement=void 0,i(0)),a=i(19),h=i(1),l=i(10),c=i(3),u=i(18),d=i(16),p=i(11),f=i(7),i=(r=Phaser.GameObjects.Container,s(g,r),g.prototype.changeLang=function(){this.txtNewAchive.setFont(o.Fonts.Main),this.txtNewAchive.text=this.currTxtTitle},g.prototype.showAchievement=function(t,e){this.achiList.push({type:t,id:e}),1===this.achiList.length&&this.checkNext()},g.prototype.hide=function(){this.visible=!1,this.show=a.Bool3.false},g.prototype.update=function(){var t;!1!==this.visible&&(this.show===a.Bool3.true?(t=this.showY-this.y,this.y+=t/10,t<1&&(this.show=a.Bool3.none)):this.show===a.Bool3.none?(this.counterWait+=1,this.counterWait>=this.durationWait&&(this.show=a.Bool3.false)):this.show===a.Bool3.false&&(t=this.hideY-this.y,this.y+=t/10,-1<t&&(this.achiList.shift(),0===this.achiList.length?this.hide():this.checkNext())))},g.prototype.checkNext=function(){this.counterWait=0,this.visible=!0,this.show=a.Bool3.true;var t=this.achiList[0];this.imgSkinBg.visible=!1,this.imgSkin.visible=!1,this.imgTrophy.visible=!0,"Act"===t.type||"ActHard"===t.type?(this.imgTrophy.setTexture(o.Atlases.ui,"trophie"+t.type+" "+(1e4+t.id)),this.currTxtTitle="newAchive"):"Skin"===t.type?(this.imgTrophy.visible=!1,this.imgSkinBg.visible=!0,this.imgSkin.visible=!0,this.imgSkin.setSkin(f.Helpers.formatNumberZeroLess10(t.id)),this.currTxtTitle="newAchiveSkin"):"award"===t.type&&(this.imgTrophy.setTexture(o.Atlases.ui,"trophie_"+t.id+" 10000"),this.currTxtTitle="trophieDes_"+t.id),this.txtNewAchive.text=this.currTxtTitle,p.SoundManager.playSFX("achievementUnlocked")},g.prototype.resize=function(){var t=85*this.scaleY;this.showY=-o.Constants.UI_SHIFT_Y+t,this.hideY=-o.Constants.UI_SHIFT_Y-t,this.y=this.hideY},g);function g(t){t=r.call(this,t,o.Constants.GHW-50,0)||this;return t.durationWait=240,t.currTxtTitle="",t.achiList=new Array,t.add(new Phaser.GameObjects.Image(t.scene,0,0,c.TexturesEdit.getPanelBgTexture(t.scene,560,140))),t.txtNewAchive=new h.JDBmpdTextTranslated(t.scene,47,0,o.Fonts.Main,"newAchive",30),t.txtNewAchive.setFitSize(420,l.JDTextFitParam.wordWrap),t.add(t.txtNewAchive),t.imgSkinBg=new Phaser.GameObjects.Image(t.scene,-210,0,o.Atlases.ui,"box_round 10000"),t.imgSkinBg.scale=.7,t.add(t.imgSkinBg),t.imgSkinBg.visible=!1,t.imgSkin=new h.JDSpineGameObject(t.scene,-210,0,"player","stand"),t.add(t.imgSkin.getView()),t.imgSkin.scaleX=t.imgSkin.scaleY=2,t.imgSkin.y=10+t.imgSkin.getView().height/2,t.imgTrophy=new Phaser.GameObjects.Image(t.scene,-210,0,o.Atlases.ui,"trophieAct 10000"),t.add(t.imgTrophy),t.hide(),t.scale=o.Constants.UI_ADDITIONAL_TOP_PANELS_SCALE,t.scene.events.on(u.Achievements.EVENT_ACHIEVEMENT_COMPLETE,t.showAchievement,t),t.scene.events.on(d.Localization.EVENT_CHANGE_LANG,t.changeLang,t),t}e.PAchievement=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.PTNT=void 0,i(0)),a=i(1),i=(r=Phaser.GameObjects.Container,s(h,r),h.prototype.setTnt=function(t){this.txtTnt.setText(Math.floor(100*t)+"%");t=this.progressBar.width*(1-t);this.progressBar.setCrop(t,0,this.progressBar.width,this.progressBar.height),this.sparkSprite.x=this.progressBar.x-this.progressBar.width+t,Math.random()<.2&&this.scene.particleManager.createColorParticleUI(this.sparkSprite.x,this.sparkSprite.y,this,5*Math.random()-2.5,5*Math.random()-2.5,16763904,4,!1,!1,20,!0)},h.prototype.destroy=function(){r.prototype.destroy.call(this),this.scene=null,this.txtTnt=null,this.sparkSprite=null,this.progressBar=null},h);function h(t){var e=r.call(this,t,o.Constants.GHW)||this,i=new Phaser.GameObjects.Image(e.scene,0,0,o.Atlases.ui,"vexTntPanel 10000"),n=(i.setOrigin(.5,0),e.add(i),new a.JDBmpdText(e.scene,0,42,o.Fonts.Main,"TNT",50));return e.add(n),e.txtTnt=new a.JDBmpdText(e.scene,75,116,o.Fonts.Main,"100%",30),e.add(e.txtTnt),(i=new Phaser.GameObjects.Image(e.scene,40,120,o.Atlases.ui,"tntBarBg 10000")).setOrigin(1,.5),e.add(i),e.progressBar=new Phaser.GameObjects.Image(e.scene,40,120,o.Atlases.ui,"tntBarProgress 10000"),e.progressBar.setOrigin(1,.5),e.add(e.progressBar),e.sparkSprite=new Phaser.GameObjects.Image(t,e.progressBar.x-e.progressBar.displayWidth,e.progressBar.y,o.Atlases.ui,"spark 10000"),e.add(e.sparkSprite),i=null,e}e.PTNT=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.PSkinTitle=void 0,i(0)),a=i(1),i=(r=Phaser.GameObjects.Container,s(h,r),h.prototype.resize=function(){this.scale=o.Constants.UI_ADDITIONAL_TOP_PANELS_SCALE,this.x=-o.Constants.UI_SHIFT_X,this.y=-o.Constants.UI_SHIFT_Y},h.prototype.destroy=function(){r.prototype.destroy.call(this),this.txtLevel=null,this.bgBar=null,this.bgCorner=null},h);function h(t){t=r.call(this,t)||this;return t.bgBar=new Phaser.GameObjects.Image(t.scene,0,31,o.Atlases.ui,"top_bar 10000"),t.bgBar.setOrigin(0,.5),t.add(t.bgBar),t.bgCorner=new Phaser.GameObjects.Image(t.scene,0,30.5,o.Atlases.ui,"top_corner 10000"),t.bgCorner.setOrigin(0,.5),t.bgCorner.flipX=!0,t.add(t.bgCorner),t.txtLevel=new a.JDBmpdTextTranslated(t.scene,30,31,o.Fonts.Main,"skins",40),t.txtLevel.setOrigin(0,.5),t.add(t.txtLevel),t.bgBar.displayWidth=t.txtLevel.x+t.txtLevel.width+20,t.bgCorner.x=t.bgBar.x+t.bgBar.displayWidth-3,t}e.PSkinTitle=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.PSkinMoney=void 0,i(9)),a=i(0),h=i(6),l=i(1),c=i(3),u=i(7),i=(r=Phaser.GameObjects.Container,s(d,r),d.prototype.updateCoins=function(){this.txtCoins.text=u.Helpers.moneyDecorator(c.BalanceData.totalMoney),this.txtCoinTower.text=u.Helpers.moneyDecorator(c.BalanceData.totalTowerMoney),this.coin.x=-(this.txtCoins.width+60),this.bgSeparator.x=this.coin.x-40,this.txtCoinTower.x=this.bgSeparator.x-25,this.coinTower.x=this.txtCoinTower.x-(this.txtCoinTower.width+35),this.bgBar.displayWidth=500,this.bgBar.displayWidth=-(this.coinTower.x-30),this.bgCorner.x=this.bgBar.x-this.bgBar.displayWidth+2},d.prototype.resize=function(){this.scale=a.Constants.UI_ADDITIONAL_TOP_PANELS_SCALE,this.x=a.Constants.GW+a.Constants.UI_SHIFT_X,this.y=-a.Constants.UI_SHIFT_Y},d.prototype.destroy=function(){r.prototype.destroy.call(this),this.txtCoins=null,this.bgBar=null,this.bgCorner=null,this.coin=null,this.bgSeparator=null,this.coinTower=null,this.txtCoinTower=null},d);function d(t){var e=r.call(this,t)||this,i=(e.bgBar=new Phaser.GameObjects.Image(e.scene,0,31,a.Atlases.ui,"top_bar 10000"),e.bgBar.setOrigin(1,.5),e.add(e.bgBar),e.bgCorner=new Phaser.GameObjects.Image(e.scene,0,31,a.Atlases.ui,"top_corner 10000"),e.bgCorner.setOrigin(1,.5),e.add(e.bgCorner),e.txtCoins=new l.JDBmpdText(e.scene,-25,31,a.Fonts.Main,"0",40,16777215,2),e.add(e.txtCoins),e.coin=new Phaser.GameObjects.Image(e.scene,0,31,a.Atlases.ui,"coin 10000"),e.coin.scale=.9,e.add(e.coin),e.bgSeparator=new Phaser.GameObjects.Image(e.scene,0,31,a.Atlases.ui,"top_separator 10000"),e.add(e.bgSeparator),e.txtCoinTower=new l.JDBmpdText(e.scene,-25,31,a.Fonts.Main,"0",40,16777215,2),e.add(e.txtCoinTower),e.coinTower=new Phaser.GameObjects.Image(e.scene,0,31,a.Atlases.ui,"coinTower 10000"),e.coinTower.scale=.85,e.add(e.coinTower),new h.ButtonContainerFrame(e.scene,-65,140,a.Atlases.ui,"buttonBlue 10000","buttonBlue 10001"));return i.addIcon(a.Atlases.ui,"iconDoor 10000",0,3),i.onUp=function(){return o.AzerionSDK.showAD("exit_skins",function(){return t.subScene.back()})},e.add(i.getView()),i=null,e.updateCoins(),e}e.PSkinMoney=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.ParticleManager=void 0,i(0)),a=i(1),h=i(4),f=i(3),d=i(64),g=i(62),i=(r=Phaser.GameObjects.Container,s(l,r),l.prototype.reset=function(){this.particles=[],this.particlesUI=[],this.particleNum=0,this.particleUINum=0,this.expolsions=[]},l.prototype.createPlayerGib=function(t,e,i,n,r,s,o,a,h){if(void 0===s&&(s=0),void 0===o&&(o=0),void 0===a&&(a=4),void 0===h&&(h=!0),0!==f.BalanceData.particleLimit){r=new d.PlayerGib(this.scene,this,r,a,h);if(r.spawn(t,e,i/2,n/2,s,o/2),this.particleNum++,this.particles.push(r),this.particleNum>=f.BalanceData.particleLimit)for(var l=0,c=this.particles;l<c.length;l++){var u=c[l];if(u.alive){u.destroy();break}}}},l.prototype.createColorParticle=function(t,e,i,n,r,s,o,a,h,l){if(void 0===r&&(r=0),void 0===s&&(s=4),void 0===o&&(o=!0),void 0===a&&(a=!1),void 0===h&&(h=140),void 0===l&&(l=!1),0!==f.BalanceData.particleLimit){r=new g.ColorParticle(this.scene,this,r,s,o,a,2*h,l);if(r.spawn(t,e,i/2,n/2),this.particleNum+=1,this.particles.push(r),this.particleNum>=f.BalanceData.particleLimit)for(var c=0,u=this.particles;c<u.length;c++){var d=u[c];if(d.alive){d.destroy();break}}}},l.prototype.createColorParticleUI=function(t,e,i,n,r,s,o,a,h,l,c){if(void 0===s&&(s=0),void 0===o&&(o=4),void 0===a&&(a=!0),void 0===h&&(h=!1),void 0===l&&(l=140),void 0===c&&(c=!1),0!==f.BalanceData.particleLimit){i=new g.ColorParticle(this.scene,i,s,o,a,h,2*l,c);if(i.spawn(t,e,n/2,r/2),i.isUI=!0,this.particleUINum+=1,this.particlesUI.push(i),this.particleUINum>=f.BalanceData.particleLimit)for(var u=0,d=this.particlesUI;u<d.length;u++){var p=d[u];if(p.alive){p.destroy(!0);break}}}},l.prototype.update=function(){for(var t,e=0;e<this.particles.length;e++)(t=this.particles[e]).alive?t.update():(this.particles.splice(e,1),e--);for(e=0;e<this.particlesUI.length;e++)(t=this.particlesUI[e]).alive?t.update():(this.particlesUI.splice(e,1),e--);for(var i=0,n=this.expolsions;i<n.length;i++)n[i].update()},l.prototype.magnetTo=function(t,e,i,n){for(var r=0,s=this.particles;r<s.length;r++){var o=s[r];if(!1===o.alive)return;var a=h.Tools.distance(t,e,o.xPos,o.yPos);a<i&&(a<n&&(o.fadeTime=150,o.multAlpha(.5)),o.yPos<e?o.yVelocity+=.3:o.yPos>e&&(o.yVelocity-=.3),o.xPos<t?o.xVelocity+=.3:o.xPos>t&&(o.xVelocity-=.3))}},l.prototype.showExplosion=function(t,e){for(var i,n=0,r=this.expolsions;n<r.length;n++)if(!1===(i=r[n]).visible)return i.visible=!0,i.x=t,i.y=e,void i.playFrames(0,15,0,.8);(i=new a.JDImageAnim(this.scene,t,e,o.Atlases.gameplay,"enemyExpolison ")).hideOnComplete=!0,this.scene.layerPlayer.add(i),i.playFrames(0,15,0,.8),this.expolsions.push(i)},l.prototype.destroy=function(){for(var t=0,e=this.particles;t<e.length;t++)e[t].destroy();for(var i=0,n=this.particlesUI;i<n.length;i++)n[i].destroy(!0);for(var r=0,s=this.expolsions;r<s.length;r++)s[r].destroy()},l);function l(){return null!==r&&r.apply(this,arguments)||this}e.ParticleManager=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),d=(Object.defineProperty(e,"__esModule",{value:!0}),e.Player=void 0,i(8)),o=i(4),p=i(41),l=i(11),a=i(7),h=i(2),i=(r=d.PlayerBase,s(c,r),c.prototype.spawn=function(t){this.canDieByFalling=!this.main.isTower(),t?(this.xPos=t.x,this.yPos=t.y,this.checkpoint=new Phaser.Geom.Point(this.xPos,this.yPos)):(l.SoundManager.stopSFXLoop("ziplineFull"),l.SoundManager.stopSFXLoop("kite"),this.resume(),this.xPos=this.checkpoint.x,this.yPos=this.checkpoint.y),this.container.visible=!0,this.setSpawn(),this.faceRight(),this.addToNewLayer(this.main.layerPlayer),this.keysObtained=0,this.heldKeys=[],this.xVelocity=this.forcedXVelocity=0,this.yVelocity=0,this.spine.scaleX=this.spine.scaleY=1,this.rPos=0,this.rPosDest=0,this.disableControls=!0,this.falling=!1,this.hanging=!1,this.scaling=!1,this.crouching=!1,this.swimming=!1,this.kicking=!1,this.pushing=!1,this.climb=!1,this.grapplingHook=!1,this.grappleRope.visible=!1,this.grapplePoint=null,this.onIce=!1,this.onSpeedBlock=!1,this.showPressDown=!1,this.hangTime=10,this.scaleHistory=void 0,this.scaleTime=0,this.poolCoolDown=0,this.currentHang=null,this.lastPool=null,this.currentPole=null,this.currentCannon=null,this.currentZipline=null,this.lastZipline=null,this.currentTorch=null,this.currentKite=null,this.currentLandBlock=null,this.disableCollision=!1,this.breatheGroup.reset(),this.poleRedSection.alpha=0,this.jumpPotion.stop(),this.alive=!1,this.updatePositions()},c.prototype.hideSprite=function(t){void 0===t&&(t=!0),this.prevAnimProgress=0,this.setSpineOffX(0),this.setSpineOffY(0),!0===t&&this.currentKite&&(l.SoundManager.stopSFXLoop("kite"),this.currentKite.reset(),this.currentKite=null),this.canPlaySFXFall=!0},c.prototype.setState=function(t,e){this.hideSprite(e=void 0===e?!0:e),this.state=t,this.animationFinished=!1,this.scaleTime=0},c.prototype.onAnimationComplete=function(){this.animationFinished=!0;var t=this.spine.getCurrentAnimationName();"spawn"===t?(this.state=d.PlayerState.Stand,this.alive=!0,this.disableControls=!1,this.main.startGamePlay()):"punch_01"===t&&(this.setStand(),this.disableControls=!1)},c.prototype.isSpriteAnimFinished=function(){return this.animationFinished},c.prototype.setStand=function(){this.state===d.PlayerState.Jumping||this.state===d.PlayerState.Kite?(this.setState(d.PlayerState.Land),this.spine.play("land")):(this.setState(d.PlayerState.Stand),this.spine.play("stand")),this.setStateInfos(),this.resetHitBoxes()},c.prototype.setRun=function(){this.setState(d.PlayerState.Running),this.spine.play("run",!0),this.setStateInfos(),this.resetHitBoxes()},c.prototype.setJump=function(t,e){var i;void 0===t&&(t=!0),void 0===e&&(e=null),this.state===d.PlayerState.Jumping&&!e||(this.state=d.PlayerState.Jumping,!0===t&&(this.hideSprite(),t="jump",i=1,e?(this.jumpState=e)===d.PlayerState.JumpDown?t="jump_down":e===d.PlayerState.JumpFrontFlip?(t="jump_front_flip",i=this.timeScale_jumpFrontBackFlip,this.setSpineOffY(-5)):e===d.PlayerState.JumpBackFlip&&(t="jump_back_flip",i=this.timeScale_jumpFrontBackFlip,this.setSpineOffY(-5)):this.jumpState=d.PlayerState.Jumping,this.spine.play(t,!1,i)),this.setStateInfos(),this.height=this.stateInfos[this.state].height,this.halfHeight=this.height/2,this.resetHitBoxes())},c.prototype.setSlide=function(){this.state!==d.PlayerState.Sliding&&(this.setState(d.PlayerState.Sliding),this.spine.play("slide_down",!1,this.timeScale_slide),this.setStateInfos(),this.resetHitBoxes())},c.prototype.setCrouch=function(){this.setState(d.PlayerState.Crouching),this.spine.play("crouch",!1,this.timeScale_crouch),this.setStateInfos(),this.resetHitBoxes()},c.prototype.setClimb=function(){this.state!==d.PlayerState.Climb&&(this.setState(d.PlayerState.Climb),this.spine.play("rope_down"),this.setStateInfos(),this.resetHitBoxes())},c.prototype.setScale=function(){this.state!==d.PlayerState.Scaling&&(this.setState(d.PlayerState.Scaling),this.spine.play("hang"),this.setStateInfos(),this.resetHitBoxes())},c.prototype.setHang=function(){this.setState(d.PlayerState.Hanging),this.spine.play("hang"),this.setStateInfos(),this.resetHitBoxes()},c.prototype.setZip=function(){this.setState(d.PlayerState.Zipping),this.spine.play("pulley"),this.setStateInfos(),this.resetHitBoxes()},c.prototype.setSwing=function(){this.setState(d.PlayerState.Swinging),this.spine.play("swing",!0),this.setSpineOffY(this.offY_swing),this.setStateInfos(),this.resetHitBoxes()},c.prototype.setPush=function(){this.setState(d.PlayerState.Pushing),this.spine.play("push",!0),this.setStateInfos(),this.resetHitBoxes()},c.prototype.setKick=function(){this.setState(d.PlayerState.Kicking),this.spine.play("kick",!1,this.timeScale_kick),this.setStateInfos(),this.resetHitBoxes()},c.prototype.setFall=function(){this.setState(d.PlayerState.Falling),this.spine.play("fall"),this.setStateInfos(),this.resetHitBoxes()},c.prototype.setSwim=function(){this.setState(d.PlayerState.Swimming),this.playSwimAnim("swim"),this.isSwimingStop=!1,this.setStateInfos(),this.resetHitBoxes()},c.prototype.playSwimAnim=function(t){this.spine.play(t,!0),this.setSpineOffY(this.spineHeight/4)},c.prototype.setSpawn=function(){this.setState(d.PlayerState.Spawning),this.spine.play("spawn",!1,this.timeScale_spawn),this.setStateInfos(),this.resetHitBoxes(),this.spine.updateAnim()},c.prototype.setKite=function(){this.setState(d.PlayerState.Kite,!1),this.spine.playFromProgress("jump",1),this.setStateInfos(),this.resetHitBoxes(),this.falling=!0,this.scaling=!1},c.prototype.setAttack=function(){this.setState(d.PlayerState.Attack),this.spine.play("punch_01"),this.setStateInfos(),this.resetHitBoxes()},c.prototype.portToActBlock=function(t,e){this.disableControls=!1,this.alive=!0,this.xPos=t,this.yPos=e,this.yVelocity=0,this.xVelocity=0,this.forcedXVelocity=0,this.setStand(),this.updateHitBoxesPos(),this.updatePositions()},c.prototype.jump=function(t,e,i){void 0===e&&(e=!0),void 0===i&&(i=null),this.yVelocity=t,this.falling=!0,this.scaling=!1,!(this.swimming=!1)===this.hanging&&(this.hanging=!1,this.hangTime=0,this.currentHang=null),this.currentPole&&(0<=this.currAnimProgress&&this.currAnimProgress<=.45?(this.currentPole=null,this.setJump(!0,d.PlayerState.JumpBackFlip),this.facing===d.FacingDir.Right?(this.xVelocity=2.5,this.xPos+=10):(this.xVelocity=-2.5,this.xPos-=10),.12<=this.currAnimProgress&&this.currAnimProgress<=.3&&(this.facing===d.FacingDir.Right?this.xVelocity=4.5:this.xVelocity=-4.5),l.SoundManager.playSFX("poleSwing"),this.yVelocity-=.2,this.updatePositions()):(this.currentPole=null,this.yVelocity=0)),this.currentZipline=null,l.SoundManager.stopSFXLoop("ziplineFull"),this.setJump(e,i),this.updateHitBoxesPos()},c.prototype.land=function(t){if(this.yVelocity=0,this.forcedXVelocity*=.8,this.yPos=t.yPos-t.halfHeight+t.yVelocity,this.onIce=!1,this.onSpeedBlock=!1,"ice"===t.type?this.onIce=!0:"speed"===t.type&&(this.onSpeedBlock=!0),this.rPosDest=0,this.falling=!1,this.scaling=!1,this.hanging=!1,this.scaleHistory=void 0,this.currentHang=null,this.lastPool=null,this.landOn(t,new Phaser.Geom.Point(this.xPos-t.xPos,this.yPos-t.xPos)),"push"===t.type&&!0===this.crouching&&!1===this.kicking){if("not trapped"===t.checkTrapped())return;this.kicking=!0,this.kickBlock=t,this.xVelocity=this.forcedXVelocity=0,this.setKick(),this.spine.pause(),this.stateTime=10,t.stuckRight?(this.faceLeft(),this.tarKickX=t.rightEdge-this.halfWidth):(this.tarKickX=t.leftEdge+this.halfWidth,this.faceRight())}else"act"!==t.type&&"dailyTask"!==t.type&&"dailyStage"!==t.type&&"play"!==t.type&&"skins"!==t.type&&"throphie"!==t.type&&"gate"!==t.type||(this.landActiveBlock(t,this.crouching),this.crouching=!1,this.showPressDown=!0);this.state!==d.PlayerState.Jumping&&this.state!==d.PlayerState.Scaling&&this.state!==d.PlayerState.Hanging&&this.state!==d.PlayerState.Kite||(l.SoundManager.playSFX("land"),!0===this.keys.isKeyPressed(p.KeyPressed.left)||!0===this.keys.isKeyPressed(p.KeyPressed.right)?this.setRun():this.setStand())},c.prototype.landOn=function(t,e){t.landOn(e),this.currentLandBlock=null,e&&(this.currentLandBlock=t)},c.prototype.scale=function(t,e){var i;void 0===e&&(e=!0),this.state!==d.PlayerState.Kite&&this.state!==d.PlayerState.Grapple&&(this.scaleTime>=this.maxScaleTime?(i=void 0,!1===e?(i=t.leftEdge-this.bodyInfo.width/2-this.offX_scale_hang)<this.xPos&&(this.xPos=i):(i=t.rightEdge+this.bodyInfo.width/2+this.offX_scale_hang)>this.xPos&&(this.xPos=i)):(!0===this.scaling?(this.lastPool=null,1<this.yVelocity&&(this.yVelocity*=.8),this.scaleTime+=1,this.scaleTime>this.maxScaleTime&&(this.scaling=!1,this.falling=!0,this.setJump()),this.xVelocity=this.forcedXVelocity=0):(e&&this.scaleHistory!==t.rightEdge||!e&&this.scaleHistory!==t.leftEdge)&&(this.unGrapple(!1),this.scaleTime=0,this.scaling=!0,this.falling=!1,this.rPos=0,this.rPosDest=0,5<this.yVelocity?l.SoundManager.playSFX("wallSlide"):l.SoundManager.playSFX("connect"),this.yVelocity<0&&(this.yVelocity=0),this.scaleHistory=!0===e?t.rightEdge:t.leftEdge,this.scaleHistoryTime=90,this.setScale(),this.xVelocity=this.forcedXVelocity=0),this.xPos=!1===e?t.leftEdge-this.bodyInfo.width/2-this.offX_scale_hang:t.rightEdge+this.bodyInfo.width/2+this.offX_scale_hang))},c.prototype.hang=function(t,e){void 0===e&&(e=!0),this.yVelocity=0,this.yPos=t.topEdge-this.handsInfo.yOff-4,this.xPos=!0===e?t.leftEdge-this.bodyInfo.width/2-this.offX_scale_hang:t.rightEdge+this.bodyInfo.width/2+this.offX_scale_hang,!0!==this.hanging&&(this.setHang(),l.SoundManager.playSFX("connectHang"),this.rPos=0,this.rPosDest=0,this.hanging=!0,this.falling=!1,this.currentHang=t,this.lastPool=null,this.scaleHistory=void 0,this.lastZipline=null,this.unGrapple(!1))},c.prototype.unHang=function(){this.hanging=!1,this.falling=!0,this.hangTime=0,this.currentHang=null},c.prototype.unGrapple=function(t){this.disableControls=!1,this.grappleRope.visible=!1,this.grapplingHook=!1,this.forcedXVelocity*=.5,this.grapplePoint&&this.grapplePoint.onContact(!1,0),this.grapplePoint=null,this.yVelocity=0,!(this.xVelocity=0)===t&&this.setJump()},c.prototype.checkForBlock=function(t,e){for(var i=0;i<this.main.blocks.length;i++){var n=this.main.blocks[i];if(n.alive&&SAT.pointInPolygon(new SAT.Vector(t,e),n.totalPolygon))return!0}return!1},c.prototype.checkBlocks=function(){if(!0!==this.disableCollision){var t=!1,e=!1,i=!1,n=!1,r=!1,s=0,o=0;this.showPressDown=!1;for(var a=0,h=this.main.blocks;a<h.length;a++){var l,c=h[a];if(!1!==c.alive){if("appearingBlock"===c.type&&!0===c.isIgnore){if(SAT.testPolygonPolygon(this.totalPolygon,c.totalPolygon))continue;c.isIgnore=!1}if(c.rightEdge<this.xPos-10||c.leftEdge>this.xPos+10||c.topEdge>this.yPos||c.bottomEdge<this.yPos-this.height)c.landOn(null);else{if(this.yVelocity>this.fallingMax&&SAT.testPolygonPolygon(this.totalPolygon,c.topPolygon)){if("bounce"===c.type){this.land(c);continue}if(!0===this.canDieByFalling)return void this.kill(d.DeathType.hardLanding)}if(0<this.keysObtained&&"lock"===c.type){var u=c;if(!1===u.unlocked&&SAT.testPolygonPolygon(this.totalPolygon,c.totalPolygon)){u.unlock(),this.heldKeys.pop().useKey(),--this.keysObtained;continue}}if(this.currentTorch&&"explosive"===c.type){u=c;if(!1===u.used&&SAT.testPolygonPolygon(this.totalPolygon,c.totalPolygon)){u.explode(),this.currentTorch.useKey(),this.currentTorch=null;continue}}if((0<=this.yVelocity||c.yVelocity<0)&&("hoverPlatform"===c.type||-2<=this.yVelocity-c.yVelocity)&&SAT.testPolygonPolygon(this.feetPolygon,c.topPolygon))!0===this.keys.isKeyPressed(p.KeyPressed.down)&&(!0===this.falling&&"glass"===c.type||!1===this.falling&&"breakableBlock"===c.type)?(c.smash(),this.yVelocity>=this.fallingMax/2&&(this.yVelocity=this.fallingMax/2)):(this.xPos>c.leftEdge&&this.xPos<c.rightEdge&&this.land(c),t=e=!0);else{if(this.landOn(c,null),!0===SAT.testPolygonPolygon(this.headPolygon,c.bottomPolygon)){if(this.xPos<c.leftEdge||this.xPos>c.rightEdge)continue;if(!0===this.hanging||this.yVelocity-c.yVelocity<=.5){this.scaling||this.hanging?(this.setJump(),this.scaling=!1,this.scaleTime=0,this.hanging=!1,this.hangTime=0,this.currentHang=null,this.yVelocity=1,this.falling=!0,this.scaleHistory=void 0,this.lastZipline=null):this.yVelocity*=-.5,"ice"===c.type?this.yPos=c.yPos+c.halfHeight+c.yVelocity+this.height+2:this.yPos=c.yPos+c.halfHeight+4*c.yVelocity+this.height+1,0!==c.yVelocity&&(this.yPos+=20,this.yVelocity=0),t=i=!0;continue}}if(!this.currentHang&&this.poolCoolDown<=0&&!1===this.swimming){if(this.hangTime>=this.maxHangCoolDown&&(!0===c.hangable&&!0===this.falling&&(0<=this.yVelocity||c.yVelocity<0)||!0===this.grapplingHook)){if(SAT.testPolygonPolygon(this.handsPolygon,c.lhPolygon)&&!this.checkForBlock(c.leftEdge+3,c.topEdge-5)&&!this.checkForBlock(c.leftEdge-3,c.topEdge-5)){this.hang(c),r=t=!0,o=c.xVelocity;continue}if(SAT.testPolygonPolygon(this.handsPolygon,c.rhPolygon)&&!this.checkForBlock(c.rightEdge+3,c.topEdge-5)&&!this.checkForBlock(c.rightEdge+-3,c.topEdge-5)){this.hang(c,!1),n=t=!0,s=c.xVelocity;continue}}}else{if(this.currentHang&&!1===this.currentHang.alive){this.unHang(),this.setRun(),this.xVelocity=0;continue}if(this.facing===d.FacingDir.Right&&this.currentHang===c){this.hang(this.currentHang),t=r=!0,o=c.xVelocity;continue}if(this.facing===d.FacingDir.Left&&this.currentHang===c){this.hang(this.currentHang,!1),t=n=!0,s=c.xVelocity;continue}}if((this.xPos>c.rightEdge||this.xPos<c.leftEdge)&&c.scalable)if(this.facing===d.FacingDir.Right){if(((this.falling||this.scaling)&&-3<=this.yVelocity||!0===this.grapplingHook)&&SAT.testPolygonPolygon(this.handsPolygon,c.leftPolygon)){this.scale(c,!1),r=t=!0,o=c.xVelocity;continue}}else if(((this.falling||this.scaling)&&-3<=this.yVelocity||!0===this.grapplingHook)&&SAT.testPolygonPolygon(this.handsPolygon,c.rightPolygon)){this.scale(c,!0),n=t=!0,s=c.xVelocity;continue}!0!==SAT.testPolygonPolygon(this.bodyPolygon,c.leftPolygon)?!0===SAT.testPolygonPolygon(this.bodyPolygon,c.rightPolygon)&&(!0===this.hanging&&this.facing===d.FacingDir.Left&&this.unHang(),"push"===c.type&&!1===this.falling&&!1===this.crouching&&this.facing===d.FacingDir.Left?(c.xVelocity>this.xVelocity&&(c.xVelocity=this.xVelocity),this.xPos=(l=c).rightEdge+this.halfWidth+this.xVelocity,l.pushingLeft=!0,l.pushed=!0,this.state!==d.PlayerState.Pushing&&this.setPush()):(this.xVelocity=this.forcedXVelocity=0,this.xPos=c.rightEdge+this.bodyInfo.width/2-1,t=n=!0,s=c.xVelocity)):(!0===this.hanging&&this.facing===d.FacingDir.Right&&this.unHang(),"push"===c.type&&!1===this.falling&&!1===this.crouching&&this.facing===d.FacingDir.Right?(c.xVelocity<this.xVelocity&&(c.xVelocity=this.xVelocity),this.xPos=(l=c).leftEdge-this.halfWidth+this.xVelocity,l.pushingRight=!0,l.pushed=!0,this.state!==d.PlayerState.Pushing&&this.setPush()):(this.xVelocity=this.forcedXVelocity=0,this.xPos=c.leftEdge-this.bodyInfo.width/2+1,t=r=!0,o=c.xVelocity))}}}else"appearingBlock"===c.type&&!1===c.isIgnore&&(c.isIgnore=!0)}!0!==this.grapplingHook||!0!==i&&!0!==n&&!0!==r&&!0!==e||this.unGrapple(!0),!0===e&&!0===i||!0===n&&!0===r&&(0!==s||0!==o)?this.kill(d.DeathType.squashed):t||e&&this.state!==d.PlayerState.Pushing||this.currentSlope||this.currentHang||(this.falling=!0,this.yVelocity<=this.fallingMax&&(this.rPosDest=0),this.state===d.PlayerState.Running||this.state===d.PlayerState.Stand||this.state===d.PlayerState.Pushing?this.setJump():this.crouching?(this.setJump(),this.crouching=!1):!0!==this.scaling&&!0!==this.hanging||(this.setJump(),this.scaling=!1,this.scaleTime=0,this.hanging=!1,this.hangTime=0))}},c.prototype.checkSlopeCollisions=function(){this.currentSlope=null;for(var t=0,e=this.main.slopes;t<e.length;t++){var i=e[t];if(!1!==i.alive){if(this.facing===d.FacingDir.Left&&-1===i.side){if((this.falling||this.scaling)&&this.yPos-this.halfHeight<i.bottomEdge&&0<this.yVelocity&&SAT.testPolygonPolygon(this.handsPolygon,i.wallPoly)){this.currentSlope=i,this.xPos=i.rightEdge+this.halfWidth+1;continue}}else if(this.facing===d.FacingDir.Right&&1===i.side&&(this.falling||this.scaling)&&this.yPos-this.halfHeight<i.bottomEdge&&0<this.yVelocity&&SAT.testPolygonPolygon(this.handsPolygon,i.wallPoly)){this.currentSlope=i,this.xPos=i.leftEdge-this.halfWidth-1;continue}if(!1===this.hanging&&!1===this.scaling)if(-1===i.side&&this.xVelocity<0){if(SAT.testPolygonPolygon(this.bodyPolygon,i.wallPoly)){this.xPos=i.rightEdge+this.halfWidth,this.xVelocity=this.forcedXVelocity=0;continue}}else if(1===i.side&&0<this.xVelocity&&SAT.testPolygonPolygon(this.bodyPolygon,i.wallPoly)){this.xPos=i.leftEdge-this.halfWidth,this.xVelocity=this.forcedXVelocity=0;continue}if(this.xPos>i.leftEdge&&this.xPos<i.rightEdge&&SAT.testPolygonPolygon(this.headPolygon,i.bottomPoly)&&this.yPos>=i.bottomEdge+this.halfHeight&&this.yVelocity<0&&(this.yPos=i.bottomEdge+this.height,this.yVelocity*=-.5,this.yPos+=this.yVelocity,this.updatePositions(),this.scaleHistory=void 0,this.currentZipline=null),this.xPos>i.leftEdge&&this.xPos<i.rightEdge&&this.yPos>i.topEdge&&this.yPos<i.bottomEdge){var n=void 0,r=void 0,r=-1===i.side?(n=(this.xPos-i.leftEdge)/i.width,-o.Tools.PI025):(n=1-(this.xPos-i.leftEdge)/i.width,o.Tools.PI025);if(this.yPos>=i.bottomEdge-i.height*n&&-3.5<this.yVelocity){if(10<=this.yVelocity)return void this.kill(d.DeathType.squashed);this.state!==d.PlayerState.Crouching&&(.5<Math.abs(this.xVelocity)?this.state!==d.PlayerState.Running&&this.setRun():this.setStand()),this.yVelocity=0,this.hitBoxForSlope=+r,this.yPos=i.bottomEdge-i.height*n+2,this.currentSlope=i,this.scaleHistory=void 0,this.currentZipline=null,this.falling=!1,this.scaling=!1,this.hanging=!1}}}}},c.prototype.checkKeyboard=function(){this.disableControls||(this.currentZipline||this.crouching||this.scaling||this.hanging||(!0===this.keys.isKeyPressed(p.KeyPressed.left)?(this.xVelocity>-this.maxVelocity?(this.xVelocity-=this.acc,0<this.xVelocity&&(this.xVelocity*=.5)):this.onIce?this.xVelocity+=.025*this.acc:this.xVelocity+=.2*this.acc,this.state===d.PlayerState.Pushing&&this.xVelocity<-this.maxVelocityPush&&(this.xVelocity=-this.maxVelocityPush),this.facing===d.FacingDir.Right&&(this.state===d.PlayerState.Pushing&&this.setRun(),this.faceLeft()),this.state!==d.PlayerState.Stand&&this.state!==d.PlayerState.Land||this.setRun()):!0===this.keys.isKeyPressed(p.KeyPressed.right)?(this.xVelocity<this.maxVelocity&&(this.xVelocity+=this.acc,this.xVelocity<0?this.xVelocity*=.5:this.onIce?this.xVelocity-=.025*this.acc:this.xVelocity-=.2*this.acc),this.state===d.PlayerState.Pushing&&this.xVelocity>this.maxVelocityPush&&(this.xVelocity=this.maxVelocityPush),this.facing===d.FacingDir.Left&&(this.state===d.PlayerState.Pushing&&this.setRun(),this.faceRight()),this.state!==d.PlayerState.Stand&&this.state!==d.PlayerState.Land||this.setRun()):(this.state!==d.PlayerState.Running&&this.state!==d.PlayerState.Pushing||this.setStand(),this.calcXvelocityDamp())),this.forcedXVelocity*=.98)},c.prototype.calcXvelocityDamp=function(){!0===this.falling?this.xVelocity*=.75:!0===this.onIce?this.xVelocity*=.9:0<this.xVelocity?(this.xVelocity-=2*this.acc,this.xVelocity<1&&(this.xVelocity=this.forcedXVelocity=0)):this.xVelocity<0&&(this.xVelocity+=2*this.acc,-1<this.xVelocity&&(this.xVelocity=this.forcedXVelocity=0))},c.prototype.calcXvelocityDampSliding=function(){this.state===d.PlayerState.Sliding?(Math.abs(this.xVelocity)>this.maxVelocity&&(this.xVelocity*=.94),this.onIce?this.xVelocity*=.993:this.xVelocity*=.982):this.calcXvelocityDamp()},c.prototype.checkCrouch=function(){if(!0!==this.disableControls){var t=this.keys.isKeyPressed(p.KeyPressed.down);if(this.state!==d.PlayerState.Kite){if(!1===this.swimming&&!1===this.falling&&!1===this.scaling&&!1===this.hanging&&!1===this.kicking)if(!0===t){if(this.currentZipline)return this.falling=!0,this.setJump(),this.lastZipline=this.currentZipline,this.currentZipline=null,void l.SoundManager.stopSFXLoop("ziplineFull");if(this.currentPole)return this.setJump(),void(this.currentPole=null);!1===this.crouching?this.xVelocity<.5&&-.5<this.xVelocity?(this.setCrouch(),this.crouching=!0,this.xVelocity=this.forcedXVelocity=0):(this.currentSlope?(this.setCrouch(),this.xVelocity=this.forcedXVelocity=0):this.state!==d.PlayerState.Sliding&&(l.SoundManager.playSFX("slide"),this.setSlide()),this.crouching=!0):-.5<this.xVelocity&&this.xVelocity<.5?(this.state===d.PlayerState.Sliding&&("slide_down"===this.spine.getCurrentAnimationName()?(this.spine.play("slide_up"),this.animationFinished=!1):!0===this.isSpriteAnimFinished()&&this.setCrouch()),this.crouching=!0,this.xVelocity=this.forcedXVelocity=0):this.onSpeedBlock&&!1===this.keys.isKeyPressed(p.KeyPressed.left)&&!1===this.keys.isKeyPressed(p.KeyPressed.right)?(this.state!==d.PlayerState.Crouching&&this.setCrouch(),this.crouching=!0,this.xVelocity=this.forcedXVelocity=0):this.calcXvelocityDampSliding()}else if((this.state===d.PlayerState.Sliding||this.state===d.PlayerState.Crouching)&&(this.calcXvelocityDampSliding(),!0===this.isSpriteAnimFinished())){var e=this.spine.getCurrentAnimationName();if("crouch"===e)return this.spine.play("crouch_up",!1,this.timeScale_crouch),void(this.animationFinished=!1);if("slide_down"===e)return this.spine.play("slide_up",!1,this.timeScale_slide),void(this.animationFinished=!1);this.setStand(),this.crouching=!1,this.updateHitBoxesPos();for(var i=0,n=this.main.blocks;i<n.length;i++){var r=n[i];!1!==r.alive&&(SAT.testPolygonPolygon(this.bodyPolygon,r.rightPolygon)?this.xPos=r.rightEdge+7:SAT.testPolygonPolygon(this.bodyPolygon,r.leftPolygon)&&(this.xPos=r.leftEdge-7))}}(this.scaling||this.hanging)&&!0===t&&(this.scaling=!1,this.scaleHistoryTime=90,this.scaleTime=this.maxScaleTime,this.unHang(),this.setJump())}else!1===t&&this.yVelocity>this.fallingMaxKite?this.yVelocity-=2*this.main.gravity:!0===t&&this.yVelocity>this.fallingMaxKiteFast&&(this.yVelocity=this.fallingMaxKiteFast)}},c.prototype.checkZipline=function(){this.currentZipline=null;for(var t=0,e=this.main.ziplines;t<e.length;t++){var i,n=e[t];n===this.lastZipline||this.xPos-40>n.rightEdge||this.xPos+40<n.leftEdge||this.yPos-80>n.bottomEdge||this.yPos+80<n.topEdge||!0!==SAT.testPolygonPolygon(this.handsPolygon,n.hitPolygon)||(this.yVelocity=.5,n.direction===d.FacingDir.Left?(i=(n.startPosX-this.xPos)*n.scope+n.startPosY+n.yOff,-4<this.xVelocity&&(this.xVelocity-=.4*n.scope),this.xVelocity<0&&this.facing===d.FacingDir.Right&&this.faceLeft(),this.yPos=i+12):(i=(this.xPos-n.startPosX)*n.scope+n.startPosY+this.height,this.xVelocity<4&&(this.xVelocity+=.4*n.scope),0<this.xVelocity&&this.facing===d.FacingDir.Left&&this.faceRight(),this.yPos=i-2),this.state!==d.PlayerState.Zipping&&(this.setZip(),l.SoundManager.playSFX("ziplineFull",3,!0)),this.currentZipline=n,this.scaleHistory=void 0,this.lastZipline=null,this.falling=!1)}this.state!==d.PlayerState.Zipping||this.currentZipline||(this.setJump(),this.falling=!0,l.SoundManager.stopSFXLoop("ziplineFull"))},c.prototype.checkPoleCollisions=function(){if(this.currentPole)this.xPos=this.currentPole.xPos,this.yPos=this.currentPole.yPos+30,this.xVelocity=this.forcedXVelocity=0,this.yVelocity=0,this.rPosDest=0,this.falling=!1,this.state!==d.PlayerState.Swinging&&(this.setSwing(),this.poleRedSection.x=this.currentPole.xPos,this.poleRedSection.y=this.currentPole.yPos),this.poleRedSection.alpha-=.5*(this.poleRedSection.alpha-1),this.facing===d.FacingDir.Right?(this.poleRedSection.rotation=o.Tools.toRad(30),this.setSpineOffX(-this.offX_swing)):(this.poleRedSection.rotation=o.Tools.toRad(150),this.setSpineOffX(this.offX_swing)),this.scaleHistory=void 0,this.lastZipline=null;else{for(var t=0,e=this.main.poles;t<e.length;t++){var i=e[t];!0===SAT.testPolygonPolygon(this.handsPolygon,i.hitBoxPolygon)?this.currentPole||(this.xVelocity=this.forcedXVelocity=0,this.yVelocity=0,this.currentPole=i,this.falling=!1,this.rPos=0,this.xPos=this.currentPole.xPos-2,this.yPos=this.currentPole.yPos+30):!0===SAT.testPolygonPolygon(this.bodyPolygon,i.hitBoxPolygon)&&(0<this.xVelocity?(this.xVelocity=this.forcedXVelocity=0,this.xPos=i.xPos-5):this.xVelocity<0&&(this.xVelocity=this.forcedXVelocity=0,this.xPos=i.xPos+5))}0<this.poleRedSection.alpha&&(this.poleRedSection.alpha-=.25*this.poleRedSection.alpha)}},c.prototype.performKick=function(){this.kickBlock.stuckRight?(this.kickBlock.xVelocity=-15,this.xPos-=10):(this.kickBlock.xVelocity=15,this.xPos+=10),this.kickBlock.stuckLeft=this.kickBlock.stuckRight=!1,this.kickBlock.xPos+=this.kickBlock.xVelocity,this.kicking=!1,this.kickBlock=null,this.tarKickX=0,this.crouching=!1,l.SoundManager.playSFX("kickBlock"),this.jump(-3.84,!1)},c.prototype.checkPoolCollisions=function(){for(var t=!1,e=0,i=this.main.pools;e<i.length;e++){var n=i[e];if(SAT.testPolygonPolygon(this.bodyPolygon,n.totalPolygon)){if(this.currentTorch&&(this.currentTorch.reset(),this.currentTorch=null),(t=!0)===n.electric)return void this.kill(d.DeathType.poolElectric,!0);this.state!==d.PlayerState.Swimming&&0<=this.yVelocity&&(l.SoundManager.playSFX("splash1"),this.swimming=!0,this.swimminBack=!0,this.lastSwimmingBack=!1,this.scaling=!1,this.hanging=!1,this.falling=!1,this.crouching=!1,this.faceRight(),this.setSwim(),this.addToNewLayer(this.main.layerUnderPool),this.rPos=0,this.scaleHistory=void 0,this.lastZipline=null,this.rPosDest=0)}this.yVelocity<0&&SAT.testPolygonPolygon(this.feetPolygon,n.topPolygon)&&(l.SoundManager.playSFX("splash1"),this.lastPool=n,this.state===d.PlayerState.Swimming&&(this.jump(-5),this.poolCoolDown=30,this.addToNewLayer(this.main.layerPlayer)),this.rPos=0)}!1===t&&(this.swimming=!1,this.state===d.PlayerState.Swimming&&(this.setJump(),this.falling=!0),0<this.poolCoolDown&&--this.poolCoolDown)},c.prototype.getSwim=function(){var t,e,i,n,r;this.state===d.PlayerState.Swimming&&(!1===this.keys.isKeyPressed(p.KeyPressed.up)&&!1===this.keys.isKeyPressed(p.KeyPressed.down)&&(this.xVelocity*=.88,this.yVelocity*=.88,this.xVelocity<.5&&-.5<this.xVelocity&&(this.xVelocity=this.forcedXVelocity=0),this.yVelocity<.5&&-.5<this.yVelocity&&(this.yVelocity=0)),this.currentCannon||(!0===this.keys.isKeyPressed(p.KeyPressed.left)?(this.rPos=(this.rPos-o.Tools.toRad(3.5))%o.Tools.PI2,this.resetHitBoxes()):!0===this.keys.isKeyPressed(p.KeyPressed.right)&&(this.rPos=(this.rPos+o.Tools.toRad(3.5))%o.Tools.PI2,this.resetHitBoxes()),t=this.rPos,this.facing===d.FacingDir.Left&&(0<t&&t<Math.PI||t>-o.Tools.PI2&&t<-Math.PI)?this.faceRight():this.facing===d.FacingDir.Right&&(t<0&&t>-Math.PI||t>Math.PI&&t<o.Tools.PI2)&&this.faceLeft(),!0===this.keys.isKeyPressed(p.KeyPressed.up)?(this.swimminBack=!1,e=this.rPos-o.Tools.PI05,i=Math.cos(e)/2,n=Math.sin(e)/2,r=3,this.xVelocity+=i,this.yVelocity+=n,(0<i&&this.xVelocity>i*r||i<0&&this.xVelocity<i*r)&&(this.xVelocity=i*r),(0<n&&this.yVelocity>n*r||n<0&&this.yVelocity<n*r)&&(this.yVelocity=n*r),Math.random()<.1&&this.main.particleManager.createColorParticle(this.xPos+10*Math.random()-5,this.yPos-.5*this.height+10*Math.random()-5,-this.xVelocity/2+Math.random(),-this.yVelocity/2+Math.random(),56814,4,!0,!0)):!0===this.keys.isKeyPressed(p.KeyPressed.down)&&(this.swimminBack=!0,e=this.rPos-o.Tools.PI05,i=-Math.cos(e)/2,n=-Math.sin(e)/2,r=2,this.xVelocity+=i,this.yVelocity+=n,(0<i&&this.xVelocity>i*r||i<0&&this.xVelocity<i*r)&&(this.xVelocity=i*r),(0<n&&this.yVelocity>n*r||n<0&&this.yVelocity<n*r)&&(this.yVelocity=n*r))),this.xPos+=this.xVelocity,this.yPos+=this.yVelocity)},c.prototype.checkSwimBlockCollisions=function(){for(var t=0;t<this.main.blocks.length;t++){var e=this.main.blocks[t];if(!(!1===e.alive||e.rightEdge<this.xPos-40||e.leftEdge>this.xPos+40||e.topEdge>this.yPos+80||e.bottomEdge<this.yPos-80)){if(0<this.keysObtained&&"lock"===e.type){var i=e;if(!i.unlocked&&SAT.testPolygonPolygon(this.totalPolygon,e.totalPolygon)){i.unlock(),this.heldKeys.pop().useKey(),--this.keysObtained;continue}}SAT.testPolygonPolygon(this.totalPolygon,e.topPolygon)?(this.yPos=e.topEdge-20,this.yVelocity*=-1):SAT.testPolygonPolygon(this.totalPolygon,e.bottomPolygon)?(this.yVelocity*=-1,this.yPos=e.bottomEdge+20):SAT.testPolygonPolygon(this.totalPolygon,e.leftPolygon)?(this.xVelocity*=-1,this.xPos=e.leftEdge-20):SAT.testPolygonPolygon(this.totalPolygon,e.rightPolygon)&&(this.xVelocity*=-1,this.xPos=e.rightEdge+20)}}},c.prototype.kill=function(t,e){void 0===e&&(e=!1),!0!==this.isShield&&!1!==this.alive?this.main.currLevelID!==h.BalanceData.towerID?(this.breatheGroup.visible=!1,this.main.playerDeath(e,this.xPos,this.yPos,this.height),this.spawn(),this.appearText.show(this.xPos,this.yPos,a.Helpers.getDeathText(t))):this.main.finishTowerStage():this.shield&&this.shieldCounter<0&&(this.shieldCounter=0)},c.prototype.getRotation=function(){var t=o.Tools.toRad(5+Math.abs(this.xVelocity));this.rPosDest=this.rPosDest%o.Tools.PI2,this.rPos=this.rPos%o.Tools.PI2,Math.abs(this.rPosDest-this.rPos)<=t&&(this.rPos=this.rPosDest),Math.abs(this.rPosDest-this.rPos)>Math.PI&&(this.rPosDest<this.rPos?this.rPosDest+=o.Tools.PI2:this.rPosDest-=o.Tools.PI2),this.rPosDest>this.rPos?this.rPos+=t+(this.rPosDest-this.rPos)/6:this.rPosDest<this.rPos&&(this.rPos-=t-(this.rPosDest-this.rPos)/6)},c.prototype.loseKey=function(t){t=this.heldKeys.indexOf(t);this.heldKeys.splice(t,1),--this.keysObtained},c.prototype.applyForce=function(t,e){this.currentLandBlock&&"hoverPlatform"===this.currentLandBlock.type||(this.xVelocity+=t,(!this.currentLandBlock||e<0)&&(this.yVelocity+=e),this.setDirToVel())},c.prototype.keyPressed=function(t,e){!1!==this.alive&&!1!==e&&(!0!==this.disableControls?t===p.KeyPressed.left?this.state===d.PlayerState.Climb&&this.facing===d.FacingDir.Left&&this.climbFaceRight():t===p.KeyPressed.right?this.state===d.PlayerState.Climb&&this.facing===d.FacingDir.Right&&this.climbFaceLeft():t===p.KeyPressed.up?this.state!==d.PlayerState.Swimming&&(this.state===d.PlayerState.Climb?!0===this.keys.isKeyPressed(p.KeyPressed.left)?this.climbJumpOut(-this.offX_climb_left,-4.5):!0===this.keys.isKeyPressed(p.KeyPressed.right)&&this.climbJumpOut(this.offX_climb_right,4.5):this.state===d.PlayerState.Kite?this.jump(-3.84):this.grapplePoint?(this.grapplingHook=!1,this.disableControls=!0,this.state=d.PlayerState.Grapple,this.grappleRope.visible=!0,this.grappleRope.displayWidth=0,!1===this.hanging&&!1===this.scaling?(this.setDirTo(this.grapplePoint.xPos),this.setStateInfos(),this.resetHitBoxes(),this.setSpineOffX(0),this.setSpineOffY(0),this.spine.play("grappling_hang")):this.spine.play("grappling_wall"),this.xVelocity=this.forcedXVelocity=0,this.yVelocity=0):this.currentCannon?this.currentCannon.firing=!0:!1===this.crouching&&(!1===this.falling?this.jump(-6.15):this.jumpState===d.PlayerState.Jumping&&this.setJump(!0,d.PlayerState.JumpFrontFlip))):t===p.KeyPressed.down?this.state===d.PlayerState.Climb||this.state===d.PlayerState.Kite||!0!==this.falling||this.lastPool||this.currentPole||this.state!==d.PlayerState.Falling&&(this.setJump(!0,d.PlayerState.JumpDown),this.yVelocity<0&&(this.yVelocity*=.5),this.yPos+=.75*this.yVelocity):t!==p.KeyPressed.punch||this.state!==d.PlayerState.Stand&&this.state!==d.PlayerState.Running&&this.state!==d.PlayerState.Jumping&&this.state!==d.PlayerState.JumpBackFlip&&this.state!==d.PlayerState.JumpDown&&this.state!==d.PlayerState.JumpFrontFlip&&this.state!==d.PlayerState.Crouching&&this.state!==d.PlayerState.Falling&&this.state!==d.PlayerState.Land||(this.xVelocity=0,this.yVelocity=0,this.forcedXVelocity=0,this.setAttack(),this.disableControls=!0,this.crouching=!1):this.state===d.PlayerState.Grapple&&(t===p.KeyPressed.down?this.unGrapple(!0):t===p.KeyPressed.up&&!1===this.grappleFlyTo&&(this.unGrapple(!1),this.jump(-6.15-50*Math.abs(this.ropeAngleVel)))))},c.prototype.update=function(){if(!0===this.alive){if(this.currAnimProgress=this.spine.getAnimationProgress(),this.state===d.PlayerState.Spawning||this.state===d.PlayerState.Finish)return;var t;this.state===d.PlayerState.Climb?this.updateStateClimb():this.state===d.PlayerState.Running?(.3<=this.currAnimProgress&&this.prevAnimProgress<.3||.8<=this.currAnimProgress&&this.prevAnimProgress<.8)&&l.SoundManager.playSFX("footstep"+o.Tools.random(1,6),2):this.state===d.PlayerState.Kicking?this.stateTime<=0?(this.performKick(),this.spine.resume()):(t=this.tarKickX-this.xPos,this.xPos+=t/5,Math.abs(t)<.5&&(this.xPos=this.tarKickX),--this.stateTime):this.state===d.PlayerState.Swinging?.12<=this.currAnimProgress&&this.prevAnimProgress<.12&&l.SoundManager.playSFX("poleWoosh"):this.state===d.PlayerState.Swimming?(t=0===this.xVelocity&&0===this.yVelocity,!this.isSwimingStop&&t?(this.isSwimingStop=!0,this.hideSprite(),this.playSwimAnim("stop_swim")):this.isSwimingStop&&!t?(this.isSwimingStop=!1,this.hideSprite(),!0===this.swimminBack?this.playSwimAnim("swim_down"):this.playSwimAnim("swim")):this.isSwimingStop||t||this.lastSwimmingBack!==this.swimminBack&&(this.lastSwimmingBack=this.swimminBack,!0===this.swimminBack?this.playSwimAnim("swim_down"):this.playSwimAnim("swim"))):this.state===d.PlayerState.Attack?.7<=this.currAnimProgress&&this.prevAnimProgress<.7&&this.attackWindGust.start(this.xPos,this.yPos-this.halfHeight,this.facing):this.state===d.PlayerState.Jumping&&0<this.yVelocity&&!0===this.jumpPotion.visible&&(this.jump(-6.15,!0,d.PlayerState.JumpFrontFlip),this.jumpPotion.stop()),this.currentCannon?(this.rPos=this.currentCannon.rad+o.Tools.PI05,this.rPosDest=this.rPos,this.rPos>o.Tools.PI2&&(this.rPos-=o.Tools.PI2,this.rPosDest-=o.Tools.PI2),this.falling=!1,this.yVelocity=this.xVelocity=this.forcedXVelocity=0,this.xPos=this.currentCannon.xPos+50*Math.cos(this.currentCannon.rad),this.yPos=this.currentCannon.yPos+50*Math.sin(this.currentCannon.rad)):(!1===this.swimming&&!1===this.kicking&&!1===this.climb&&(this.checkKeyboard(),this.checkCrouch(),this.state!==d.PlayerState.Grapple&&this.state!==d.PlayerState.Attack&&(this.yVelocity+=this.main.gravity,this.yVelocity>this.fallingMax)&&(!0===this.canDieByFalling?(this.state!==d.PlayerState.Falling&&this.setFall(),this.rPosDest+=o.Tools.toRad(-this.spine.scaleX*this.yVelocity*.25),(t=Math.abs(this.rPos))>o.Tools.PI05&&!0===this.canPlaySFXFall?(l.SoundManager.playSFX("fall"),this.canPlaySFXFall=!1):t>Math.PI&&this.kill(d.DeathType.fall)):this.yVelocity=this.fallingMax),this.checkRopeCollisions()),this.xPos+=this.xVelocity+this.forcedXVelocity,this.yPos+=this.yVelocity,this.currentSlope&&(this.yPos+=this.xVelocity*this.currentSlope.side),this.hangTime<this.maxHangCoolDown&&(this.hangTime+=1),this.state!==d.PlayerState.Scaling&&void 0!==this.scaleHistory&&0<this.scaleHistoryTime&&(--this.scaleHistoryTime,0===this.scaleHistoryTime&&(this.scaleHistory=void 0,this.scaleTime=0)),this.checkPoolCollisions(),!0===this.swimming?(this.getSwim(),this.checkSwimBlockCollisions(),this.breatheGroup.show(this.rPos)<=0&&this.kill(d.DeathType.drowned)):(!1===this.climb&&(this.state===d.PlayerState.Grapple&&this.updateStateGrapple(),this.checkBlocks(),this.checkSlopeCollisions(),this.checkPoleCollisions()),(!0===this.falling||this.currentZipline)&&0<this.yVelocity&&this.checkZipline(),this.getRotation(),this.breatheGroup.addBreath(2),this.breatheGroup.hide(),this.jumpPotion.update(this.scaleX,this.state))),this.updatePositions(),this.prevAnimProgress=this.currAnimProgress}r.prototype.update.call(this)},c.prototype.checkRopeCollisions=function(){for(var t=0,e=this.main.ropes;t<e.length;t++){var i=e[t];if(SAT.testPolygonPolygon(this.totalPolygon,i.totalBoundPolygon)){if(i.yPos-this.yPos>i.halfHeight-40)return;this.rPosDest=0,this.rPos=0,this.setClimb(),this.currentRope=i,this.climb=!0,this.falling=!1,this.yVelocity=0,this.xVelocity=0,this.facing===d.FacingDir.Right?this.climbFaceRight():this.climbFaceLeft()}}},c.prototype.climbFaceLeft=function(){this.xPos=this.currentRope.xPos,this.faceLeft(),this.setSpineOffX(this.offX_climb_right)},c.prototype.climbFaceRight=function(){this.xPos=this.currentRope.xPos,this.faceRight(),this.setSpineOffX(-this.offX_climb_left)},c.prototype.climbJumpOut=function(t,e){this.climb=!1,this.currentRope=null,this.xPos+=t,this.xVelocity=e,this.yVelocity-=4,this.setJump(),this.falling=!0},c.prototype.updateStateClimb=function(){!0===this.keys.isKeyPressed(p.KeyPressed.up)?(("rope"!==this.spine.currAnimationName||!1===this.spine.isPlaying&&"rope"===this.spine.currAnimationName)&&this.spine.play("rope",!0),this.yPos>this.currentRope.yPos-this.currentRope.halfHeight+40&&(this.yPos-=h.BalanceData.config_RopeUpVelY,this.checkSwimBlockCollisions())):!0===this.keys.isKeyPressed(p.KeyPressed.down)?("rope_down"!==this.spine.currAnimationName&&this.spine.play("rope_down"),this.yPos+=h.BalanceData.config_RopeDownVelY,this.checkSwimBlockCollisions(),this.yPos>this.currentRope.yPos+this.currentRope.halfHeight+10&&(this.climb=!1,this.currentRope=null)):this.spine.stop()},c.prototype.updateStateGrapple=function(){var t=+this.scaleX,e=this.height-11,i=this.xPos-t,n=this.yPos-e;this.ropeAngle=o.Tools.angleOfPoints(i,n,this.grapplePoint.xPos,this.grapplePoint.yPos);var r,s=o.Tools.distance(i,n,this.grapplePoint.xPos,this.grapplePoint.yPos)-16;!1===this.grapplingHook?(s<=(r=this.grappleRope.displayWidth+30)&&(r=s,this.spine.play("grappling_hang"),this.setStateInfos(),this.resetHitBoxes(),this.setSpineOffX(0),this.setSpineOffY(0),this.grapplingHook=!0,this.grappleFlyTo=!0,this.falling=!0,this.xVelocity=0,this.forcedXVelocity=2*Math.cos(this.grappleRope.rotation),this.yVelocity=2*Math.sin(this.grappleRope.rotation),!0!==this.hanging&&!0!==this.scaling||(this.setDirTo(this.grapplePoint.xPos),this.unHang(),this.scaling=!1,this.scaleHistory=void 0,this.scaleTime=0)),this.grappleRope.displayWidth=r):(!0===this.grappleFlyTo?(o.Tools.vec2Length(this.forcedXVelocity,this.yVelocity)<13&&(this.forcedXVelocity*=1.12,this.yVelocity*=1.12),!0===this.grapplePoint.isB&&s<=100&&(this.ropeAngleVel=0,this.xVelocity=0,this.yVelocity=0,this.forcedXVelocity=0,this.grappleFlyTo=!1)):(s=100,r=-o.Tools.toRad(.2)*Math.cos(this.ropeAngle),!0===this.keys.isKeyPressed(p.KeyPressed.left)?(r+=.001,this.faceLeft()):!0===this.keys.isKeyPressed(p.KeyPressed.right)&&(r-=.001,this.faceRight()),this.ropeAngleVel+=r,this.ropeAngle+=this.ropeAngleVel,this.ropeAngleVel*=.987,i=this.grapplePoint.xPos-Math.cos(this.ropeAngle)*s,n=this.grapplePoint.yPos-Math.sin(this.ropeAngle)*s,this.xPos+=i-this.xPos+t,this.yPos+=n-this.yPos+e,s-=16),this.grappleRope.displayWidth=s),r=this.facing===d.FacingDir.Right?o.Tools.toDeg(-this.ropeAngle-o.Tools.PI05):o.Tools.toDeg(this.ropeAngle+o.Tools.PI05),"grappling_hang"===this.spine.currAnimationName?this.spine.getView().findBone("L_arm").rotation=r-34:this.spine.getView().findBone("L_arm").rotation=r+5,this.spine.getView().findBone("R_arm").rotation=this.spine.getView().findBone("L_arm").rotation,this.grappleRope.x=i+16*Math.cos(this.ropeAngle),this.grappleRope.y=n+16*Math.sin(this.ropeAngle),this.grappleRope.rotation=this.ropeAngle},c.prototype.checkCollideWithCannon=function(t){!0!==this.alive||this.currentCannon||o.Tools.distance(this.xPos,this.yPos,t.xPos,t.yPos)<85&&(this.addToNewLayer(this.main.layerUnderPool),l.SoundManager.playSFX("cannonEnter"),this.currentCannon=t,!1===this.swimming&&this.setStand())},c.prototype.cannonFire=function(t,e,i,n,r,s){var o=i*r,a=n*r;!(this.currentCannon=null)===this.swimming?this.xVelocity=o:this.forcedXVelocity=o,this.yVelocity=a,this.xPos=t+i*s,this.yPos=e+n*s,this.rPosDest=0,l.SoundManager.playSFX("cannonFire");for(var h=0;h<10;h++)this.main.particleManager.createColorParticle(this.xPos,this.yPos,o*(Math.random()+.25),a*(Math.random()+.25),16759552,4);!1===this.swimming&&(this.falling=!0,this.setJump()),this.addToNewLayer(this.main.layerPlayer),this.updateHitBoxesPos()},c.prototype.checkCollideWithFinish=function(t){this.state===d.PlayerState.Finish?(this.xPos+=(t.xPos-this.xPos)/20,this.yPos+=(t.yPos-this.yPos)/20,this.container.rotation+=.07*this.spine.scaleX,this.spine.scaleX*=.97,this.spine.scaleY=Math.abs(this.spine.scaleX),this.spine.scaleY<.3&&this.main.finishLevel(),this.updatePositions()):SAT.testPolygonPolygon(this.totalPolygon,t.hitBoxPolygon)&&(this.alive=!1,this.spine.play("fall"),this.state=d.PlayerState.Finish,this.main.timerLive=!1,h.BalanceData.actFinishTime=Date.now()-h.BalanceData.actStartTime)},c.prototype.collideWithKey=function(t){this.heldKeys.push(t),this.keysObtained+=1},c.prototype.collideWithTorch=function(t){this.currentTorch=t},c.prototype.collideWithKite=function(t){this.currentKite=t,this.setKite(),l.SoundManager.playSFX("kite",.7,!0)},c.prototype.collideWithJumpPotion=function(){this.jumpPotion.start()},c.prototype.collideWithCheckPoint=function(t){this.checkpoint.setTo(t.xPos,t.yPos),this.appearText.show(t.xPos,t.yPos-30,"checkpoint")},c.prototype.collideWithBreatheBlaster=function(){this.breatheGroup.addBreath(2.5)},c);function c(t){t=r.call(this,t)||this;return t.timeScale_spawn=1.5,t.timeScale_crouch=1.5,t.timeScale_slide=1.3,t.timeScale_jumpFrontBackFlip=1.3,t.timeScale_kick=1.6,t.offX_climb_left=15,t.offX_climb_right=10,t.offX_swing=5,t.offY_swing=7,t.offX_scale_hang=1,t.maxVelocity=3.5,t.maxVelocityPush=2.5,t.acc=.5,t.fallingMax=16,t.fallingMaxKite=1.5,t.fallingMaxKiteFast=5,t.scaleHistoryTime=0,t.maxScaleTime=90,t.maxHangCoolDown=20,t.alive=!1,t.deaths=0,t}e.Player=i},function(t,e,i){"use strict";var n,o,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),s=(Object.defineProperty(e,"__esModule",{value:!0}),e.PlayerGib=void 0,i(40)),a=i(0),i=(o=s.Particle,r(h,o),h.prototype.spawn=function(t,e,i,n,r,s){o.prototype.spawnBase.call(this,t,e,i,n),this.rotation=r,this.rotSpeed=s,this.sprite.x=t,this.sprite.y=e,this.sprite.rotation=r},h.prototype.update=function(){if(this.alive){if(this.fadeTime>=this.fadeAfter){if(this.sprite.alpha-=.1,this.sprite.alpha<=0)return void this.destroy()}else this.fadeTime++;var t=this.xPos,e=this.yPos;o.prototype.update.call(this),this.alive&&(this.rotation+=this.rotSpeed,0<this.rotSpeed?this.rotSpeed-=.5:this.rotSpeed<0&&(this.rotSpeed+=.5),Math.abs(this.rotSpeed)<.6&&(this.rotSpeed=0),t===this.xPos&&e===this.yPos||(this.sprite.x=this.xPos,this.sprite.y=this.yPos,this.sprite.rotation=this.rotation,this.hitBox.pos.x=this.xPos-.5*this.size,this.hitBox.pos.y=this.yPos-.5*this.size,this.hitBoxPolygon=this.hitBox.toPolygon()))}},h.prototype.destroy=function(){this.alive&&(this.sprite&&(this.sprite.destroy(),this.sprite=null),o.prototype.destroy.call(this))},h);function h(t,e,i,n,r){n=o.call(this,t,n,r,!1,150)||this;return n.sprite=new Phaser.GameObjects.Image(t,0,0,a.Atlases.gameplay,i),e.add(n.sprite),n}e.PlayerGib=i},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SubSkinsSelect=e.SubSkinsRarity=e.BasicSubSkins=e.SubVex=e.SubTower=e.SubAct=e.SubHub=e.BasicSubGamePlay=e.SubMenu=e.BasicSubScene=void 0;var n=i(33),r=(Object.defineProperty(e,"BasicSubScene",{enumerable:!0,get:function(){return n.BasicSubScene}}),i(149)),s=(Object.defineProperty(e,"SubMenu",{enumerable:!0,get:function(){return r.SubMenu}}),i(31)),o=(Object.defineProperty(e,"BasicSubGamePlay",{enumerable:!0,get:function(){return s.BasicSubGamePlay}}),i(203)),a=(Object.defineProperty(e,"SubHub",{enumerable:!0,get:function(){return o.SubHub}}),i(204)),h=(Object.defineProperty(e,"SubAct",{enumerable:!0,get:function(){return a.SubAct}}),i(205)),l=(Object.defineProperty(e,"SubTower",{enumerable:!0,get:function(){return h.SubTower}}),i(206)),c=(Object.defineProperty(e,"SubVex",{enumerable:!0,get:function(){return l.SubVex}}),i(47)),u=(Object.defineProperty(e,"BasicSubSkins",{enumerable:!0,get:function(){return c.BasicSubSkins}}),i(207)),d=(Object.defineProperty(e,"SubSkinsRarity",{enumerable:!0,get:function(){return u.SubSkinsRarity}}),i(213));Object.defineProperty(e,"SubSkinsSelect",{enumerable:!0,get:function(){return d.SubSkinsSelect}})},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.SubMenu=void 0,i(33)),a=i(0),h=i(6),l=i(21),c=i(32),u=i(18),d=i(23),p=i(24),f=i(16),g=i(10),m=i(19),y=i(29),v=i(3),x=i(9),i=(r=o.BasicSubScene,s(b,r),b.prototype.init=function(){var e=this;r.prototype.init.call(this),this.scene.createSceneMainMenu(),!0===this.scene.game.device.os.desktop&&this.scene.zoomTo(1.5,!0),this.logo=new Phaser.GameObjects.Image(this.scene,a.Constants.GHW,0,"logo"),this.logo.setOrigin(.5,0),this.add(this.logo),this.btnDailyTask=new c.ButtonMenu(this.scene,a.Constants.GHW-640,0,"btn_daily 10000"),this.btnDailyTask.btn.addTxtTranslated("dailyTasks",a.Fonts.Main,48,16777215,1,0,-10),this.btnDailyTask.btn.txtTranslated.setFitSize(220,g.JDTextFitParam.both,150),this.btnDailyTask.addTxtDop("resetsIn",a.Fonts.Main,40,4737096,1,0,120),this.btnDailyTask.txtDop.setFitSize(250),this.btnDailyTask.addTxtReset("04:23:11",a.Fonts.Main,36,4737096,1,0,160),this.btnDailyTask.btn.onUp=function(){return e.scene.showPanelDailyTask()},this.add(this.btnDailyTask),!0===a.Constants.IS_AD_REWARD_AVAILABLE&&(this.btnAD=new h.ButtonScale(this.scene,0,0),this.btnAD.addImageEvents(a.Atlases.ui,"btn_yellow 10000",0,3,.5,.95),this.btnAD.addIcon(a.Atlases.ui,"watch_icon 10000"),this.btnAD.onUp=function(){return x.AzerionSDK.showADRewarded(function(t){return e.adComplete(t)})},this.add(this.btnAD.getView())),!0===d.DailyTask.canShowTaskI()&&(this.Idaily=new Phaser.GameObjects.Image(this.scene,110,-80,a.Atlases.ui,"icon_alert 10000"),this.btnDailyTask.add(this.Idaily),this.scene.events.on(d.DailyTask.EVENT_REWARDED,this.checkDailyI,this)),this.btnDailyStage=new c.ButtonMenu(this.scene,a.Constants.GHW-340,0,"btn_tower 10000"),this.btnDailyStage.btn.addTxtTranslated("tower",a.Fonts.Main,48,16777215,1,0,-10),this.btnDailyStage.btn.txtTranslated.setFitSize(220,g.JDTextFitParam.both,150),this.btnDailyStage.addTxtDop("highScore",a.Fonts.Main,40,4737096,1,0,120),this.btnDailyStage.txtDop.setFitSize(250),this.btnDailyStage.addTxtReset(f.Localization.getText("floor")+" "+v.BalanceData.towerFloor,a.Fonts.Main,36,4737096,1,0,160),this.btnDailyStage.txtReset.setFitSize(250),this.btnDailyStage.btn.onUp=function(){return e.scene.showSubSceneTransition(m.SubSceneList.Tower)},this.add(this.btnDailyStage),this.btnPlay=new h.ButtonScale(this.scene,a.Constants.GHW,0),this.btnPlay.addImageEvents(a.Atlases.ui,"btn_play 10000"),this.btnPlay.addTxtTranslated("play",a.Fonts.Main,80,16777215,1,0,-10),this.btnPlay.txtTranslated.setFitSize(290),this.btnPlay.onUp=function(){return e.scene.showSubSceneTransition(m.SubSceneList.Hub)},this.add(this.btnPlay.getView()),this.btnSkins=new c.ButtonMenu(this.scene,a.Constants.GHW+340,0,"btn_skins 10000"),this.btnSkins.btn.addTxtTranslated("skins",a.Fonts.Main,48,16777215,1,0,-10),this.btnSkins.btn.txtTranslated.setFitSize(220,g.JDTextFitParam.both,150),this.btnSkins.addTxtReset(p.SkinsData.totalSkinsOpened+"/"+p.SkinsData.totalSkins,a.Fonts.Main,40,4737096,1,0,120),this.btnSkins.btn.onUp=function(){return e.scene.showSubSceneTransition(m.SubSceneList.SkinsRarity)},this.add(this.btnSkins),!0===p.SkinsData.canShowI()&&this.btnSkins.btn.add(new Phaser.GameObjects.Image(this.scene,110,-80,a.Atlases.ui,"icon_alert 10000")),this.btnTrophies=new c.ButtonMenu(this.scene,a.Constants.GHW+640,0,"btn_trophies 10000"),this.btnTrophies.btn.addTxtTranslated("trophies",a.Fonts.Main,48,16777215,1,0,-10),this.btnTrophies.btn.txtTranslated.setFitSize(220,g.JDTextFitParam.both,150),this.btnTrophies.addTxtReset(u.Achievements.totalComplete+"/"+u.Achievements.totalAchives,a.Fonts.Main,40,4737096,1,0,120),this.btnTrophies.btn.onUp=function(){return e.scene.showPanelTrophies()},this.add(this.btnTrophies),this.btnSetting=new h.ButtonContainerFrame(this.scene,-100,180,a.Atlases.ui,"buttonBlue 10000","buttonBlue 10001"),this.btnSetting.addIcon(a.Atlases.ui,"iconSetting 10000"),this.btnSetting.onUp=function(){return e.scene.panelManager.show(l.PanelList.PanelOptionsMenu)},this.add(this.btnSetting.getView()),this.blockDailyTask=this.getBlock("dailyTask"),this.blockDailyStage=this.getBlock("dailyStage"),this.blockPlay=this.getBlock("play"),this.blockSkins=this.getBlock("skins"),this.blockTrophie=this.getBlock("throphie"),this.scene.events.on(d.DailyTask.EVENT_TIMER_RESET,this.reset,this),this.scene.events.on(d.DailyTask.EVENT_TIMER_TICK,this.tickTimer,this),d.DailyTask.startTimer(),this.btnLang=new h.ButtonScaleImage(this.scene,0,0,a.Atlases.ui,"flag_"+f.Localization.getLang()+" 10000"),this.btnLang.onUp=function(){return e.scene.panelManager.show(l.PanelList.PanelLanguages)},!0===a.Constants.SHOW_PANEL_LANGUAGE&&this.add(this.btnLang.getView()),this.scene.events.on(f.Localization.EVENT_CHANGE_LANG,this.changeLang,this),p.SkinsData.freeSkinData&&this.scene.panelManager.show(l.PanelList.PanelFreeSkin)},b.prototype.reset=function(){this.Idaily&&(this.Idaily.visible=!1)},b.prototype.adComplete=function(t){!0===t?d.DailyTask.resetByAD():this.btnAD.onUp=null},b.prototype.getBlock=function(t){var e=new y.BasicBlock(this.scene,this.scene.layerBlocks);return e.type=t,this.scene.blocks.push(e),e},b.prototype.changeLang=function(){d.DailyTask.resetTxt(),this.scene.player.appearText.changeLang(),this.scene.achievements.changeLang(),this.btnDailyTask.btn.txtTranslated.setFont(a.Fonts.Main),this.btnDailyTask.btn.txtTranslated.text="dailyTasks",this.btnDailyTask.txtDop.setFont(a.Fonts.Main),this.btnDailyTask.txtDop.text="resetsIn",this.btnDailyTask.txtReset.setFont(a.Fonts.Main),this.btnDailyStage.btn.txtTranslated.setFont(a.Fonts.Main),this.btnDailyStage.btn.txtTranslated.text="tower",this.btnDailyStage.txtDop.setFont(a.Fonts.Main),this.btnDailyStage.txtDop.text="highScore",this.btnDailyStage.txtReset.setFont(a.Fonts.Main),this.btnDailyStage.txtReset.text=f.Localization.getText("floor")+" "+v.BalanceData.towerFloor,this.btnPlay.txtTranslated.setFont(a.Fonts.Main),this.btnPlay.txtTranslated.text="play",this.btnSkins.btn.txtTranslated.setFont(a.Fonts.Main),this.btnSkins.btn.txtTranslated.text="skins",this.btnTrophies.btn.txtTranslated.setFont(a.Fonts.Main),this.btnTrophies.btn.txtTranslated.text="trophies",this.btnLang.getInteractiveElement().setFrame("flag_"+f.Localization.getLang()+" 10000")},b.prototype.tickTimer=function(t){this.btnDailyTask.txtReset.text=t},b.prototype.checkDailyI=function(){this.Idaily.visible=d.DailyTask.canShowTaskI()},b.prototype.resize=function(){this.logo.y=100-a.Constants.UI_SHIFT_Y;var t=a.Constants.GH+a.Constants.UI_SHIFT_Y;this.btnPlay.y=t-210,this.btnDailyTask.y=this.btnPlay.y-80,this.btnAD&&(this.btnAD.x=this.btnDailyTask.x,this.btnAD.y=this.btnDailyTask.y+225),this.btnDailyStage.y=this.btnPlay.y-40,this.btnSkins.y=this.btnDailyStage.y,this.btnTrophies.y=this.btnDailyTask.y,this.btnSetting.scale=a.Constants.UI_ADDITIONAL_TOP_PANELS_SCALE,this.btnSetting.x=a.Constants.GW+a.Constants.UI_SHIFT_X-65*a.Constants.UI_ADDITIONAL_TOP_PANELS_SCALE,this.btnSetting.y=65*a.Constants.UI_ADDITIONAL_TOP_PANELS_SCALE-a.Constants.UI_SHIFT_Y,this.btnLang.x=90-a.Constants.UI_SHIFT_X,this.btnLang.y=this.btnSetting.y+15,this.resizeBlocks()},b.prototype.resizeBlocks=function(){this.uiScale=a.Constants.UI_SCALE/this.scene.cameraZoom,this.setBlockByButtonMenu(this.btnDailyTask,this.blockDailyTask),this.setBlockByButtonMenu(this.btnDailyStage,this.blockDailyStage),this.setBlockByButton(this.btnPlay,this.blockPlay),this.setBlockByButtonMenu(this.btnSkins,this.blockSkins),this.setBlockByButtonMenu(this.btnTrophies,this.blockTrophie);var t=this.blockPlay.xPos,e=this.blockPlay.yPos-this.blockPlay.height/2;this.scene.spawnX===t&&this.scene.spawnY===e||(this.scene.spawnX=t,this.scene.spawnY=e,this.scene.player.spawn({x:t,y:e}))},b.prototype.setBlockByButtonMenu=function(t,e){this.updateBlock(t.x,t.y,t.btn.image.width,t.btn.image.height,e)},b.prototype.setBlockByButton=function(t,e){this.updateBlock(t.x,t.y,t.image.width,t.image.height,e)},b.prototype.updateBlock=function(t,e,i,n,r){t=(t+a.Constants.UI_SHIFT_X)*this.uiScale,e=(e+a.Constants.UI_SHIFT_Y)*this.uiScale;r.spawn({x:t,y:e,width:i*this.uiScale,height:(n-6)*this.uiScale}),r.sprite.visible=!1},b.prototype.destroy=function(){this.scene.events.off(d.DailyTask.EVENT_TIMER_RESET,this.reset,this),this.scene.events.off(d.DailyTask.EVENT_REWARDED,this.checkDailyI,this),this.scene.events.off(d.DailyTask.EVENT_TIMER_TICK,this.tickTimer,this),this.scene.events.off(f.Localization.EVENT_CHANGE_LANG,this.changeLang,this),r.prototype.destroy.call(this),this.logo=null,this.btnDailyTask=null,this.btnAD=null,this.btnDailyStage=null,this.btnPlay=null,this.btnSkins=null,this.btnTrophies=null,this.btnSetting=null,this.Idaily=null,this.blockDailyTask=null,this.blockDailyStage=null,this.blockPlay=null,this.blockSkins=null,this.blockTrophie=null,this.btnLang=null},b);function b(){return null!==r&&r.apply(this,arguments)||this}e.SubMenu=i},function(t,e,i){"use strict";var n,h,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),s=(Object.defineProperty(e,"__esModule",{value:!0}),e.ActBlock=void 0,i(5)),l=i(0),c=i(1),u=i(2),d=i(7),i=(h=s.Block,r(o,h),o.prototype.spawn=function(t){this.init(t.x,t.y,140,140),this.updateGraphicPosition(),(this.container.visible=!0)===this.level.isTargetLevelComplete(!1)&&(u.BalanceData.actFinishTime=-1)},o.prototype.updateGraphicPosition=function(){this.container.x=this.xPos,this.container.y=this.yPos},o.prototype.update=function(){this.landed?this.txtMyTime.visible=!0:this.txtMyTime.visible=!1},o.prototype.destroy=function(){this.sprite=null,this.title=null,this.titleNum=null,this.txtMyTime=null,this.container.destroy(),this.container=null,this.level=null,h.prototype.destroy.call(this)},o);function o(t,e,i,n){var r=h.call(this,t,e)||this,s=(r.hardEnabled=!1,r.level=r.main.getLevel(""+i),r.levelNum=i,r.isHard=n,r.levelNum-1);s<0&&(s=0);var o=!0===n?"actBlockHard ":"actBlock ",a=(r.container=new Phaser.GameObjects.Container(t),e.add(r.container),r.container.name="container"+i,r.sprite=new Phaser.GameObjects.Image(t,0,1,l.Atlases.gameplay,o+(1e4+s)),r.sprite.scale=1.01,r.container.add(r.sprite),r.title=new c.JDBmpdTextTranslated(t,0,-48,l.Fonts.Main,"actNorm",22),r.container.add(r.title),r.titleNum=new c.JDBmpdText(t,0,-5,l.Fonts.Main,""+i,50),r.container.add(r.titleNum),i===u.BalanceData.totalActs&&(r.titleNum.visible=!1,r.title.text="actVex"),!0===r.level.isTargetLevelComplete(n)&&(a=new Phaser.GameObjects.Image(t,-39,46,l.Atlases.gameplay,"actStar 10000"),r.container.add(a)),1===r.level.isTargetCoinsComplete(n)&&(a=new Phaser.GameObjects.Image(t,-1,46,l.Atlases.gameplay,"actStar 10000"),r.container.add(a)),1===r.level.isTargetDeathComplete(n)&&(a=new Phaser.GameObjects.Image(t,38,46,l.Atlases.gameplay,"actStar 10000"),r.container.add(a)),null),e=r.level.getTopTime(n);return r.txtMyTime=new c.JDBmpdTextTranslated(t,0,100,l.Fonts.Main,"",26),r.txtMyTime.setText("bestTime","\n"+d.Helpers.timeDecoratorActBlock(-1<e?e:0)),r.container.add(r.txtMyTime),(r.txtMyTime.visible=!1)===r.isHard?r.hardEnabled=!0:r.hardEnabled=r.level.act3Star(),r.type="act",r}e.ActBlock=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.AppearingBlock=void 0,i(5)),a=i(0),h=i(2),i=(r=o.Block,s(l,r),l.prototype.spawn=function(t){this.init(t.x,t.y,t.width,t.height),this.actTime=0,this.timeShow=t.timeShow,this.timeHide=t.timeHide,this.alive=t.initVisible,this.initVisible=this.alive,this.sprite.alpha=this.alive?1:0,this.sprite.visible=!0,this.updateGraphicPosition(),this.sprite.setScale(this.width/this.sprite.width,this.height/this.sprite.height)},l.prototype.updateGraphicPosition=function(){this.sprite.x=this.xPos,this.sprite.y=this.yPos},l.prototype.update=function(){this.xPos===this.prevX&&this.yPos===this.prevY||this.updatePosition(),this.actTime+=.5,this.alive&&this.actTime>=this.timeHide?this.hide():!this.alive&&this.actTime>=this.timeShow&&this.show(),this.alive&&this.actTime>=this.timeHide*(1-h.BalanceData.config_AppearingBlockDisapper)?this.sprite.tint=30583:!this.alive&&this.actTime>=this.timeShow*(1-h.BalanceData.config_AppearingBlockApper)&&(this.sprite.alpha=.2,this.sprite.tint=16777215)},l.prototype.show=function(){this.actTime=0,this.alive=!0,this.sprite.alpha=1},l.prototype.hide=function(){this.actTime=0,this.alive=!1,this.sprite.alpha=0},l.prototype.destroy=function(){this.sprite.destroy(),this.sprite=null,r.prototype.destroy.call(this)},l.prototype.resetLevel=function(){r.prototype.resetLevel.call(this),this.actTime=0,this.alive=this.initVisible,this.sprite.alpha=this.initVisible?1:0},l);function l(t,e){var i=r.call(this,t,e)||this;return i.sprite=new Phaser.GameObjects.Image(t,0,0,a.Atlases.gameplay,"appearingBlock 10000"),e.add(i.sprite),i.sprite.visible=!1,i.type="appearingBlock",i.isIgnore=!1,i}e.AppearingBlock=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.BlockedWall=void 0,i(5)),a=i(0),h=i(4),i=(r=o.Block,s(l,r),l.prototype.spawn=function(t){var e=h.Tools.toRad(t.rotation);Math.abs(e)===h.Tools.PI05?this.init(t.x,t.y,444,65):this.init(t.x,t.y,65,444),this.sprite.rotation=e,this.sprite.visible=!0,this.updateGraphicPosition()},l.prototype.updateGraphicPosition=function(){this.sprite.x=this.xPos,this.sprite.y=this.yPos},l.prototype.update=function(){this.xPos===this.prevX&&this.yPos===this.prevY||this.updatePosition()},l.prototype.destroy=function(){this.sprite.destroy(),this.sprite=null,r.prototype.destroy.call(this)},l.prototype.reset=function(){},l);function l(t,e){var i=r.call(this,t,e)||this;return i.sprite=new Phaser.GameObjects.Image(t,0,0,a.Atlases.gameplay,"blockedWall 10000"),e.add(i.sprite),i.sprite.visible=!1,i.hangable=!1,i.scalable=!1,i.type="wall",i}e.BlockedWall=i},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.BlockSpike=e.SpikeDirection=void 0;var s,o,a=i(5),h=i(0),l=i(2),c=i(20),i=((i=s=e.SpikeDirection||(e.SpikeDirection={}))[i.up=0]="up",i[i.down=1]="down",i[i.left=2]="left",i[i.right=3]="right",o=a.Block,r(u,o),u.prototype.spawn=function(t){this.init(t.x,t.y,100,100),this.spikeMove=0,this.isSpikeUp=t.spikeUp,this.startSpikeUp=t.spikeUp,this.timeDown=t.timeDown,this.timeUp=t.timeUp,this.actTime=this.isSpikeUp?this.timeDown:this.timeUp,this.isDelay=!0,t.upEnable&&this.enableSpike(s.up),t.downEnable&&this.enableSpike(s.down),t.leftEnable&&this.enableSpike(s.left),t.rightEnable&&this.enableSpike(s.right);t=this.isSpikeUp?this.spikeBlockUp:this.spikeBlockDown;this.spikesUp&&this.spikesUp.spawn({x:this.xPos,y:this.yPos-(49.5+this.spikesUp.height/2)-t,rotation:0}),this.spikesDown&&this.spikesDown.spawn({x:this.xPos,y:this.yPos+(49.5+this.spikesDown.height/2)+t,rotation:180}),this.spikesLeft&&this.spikesLeft.spawn({x:this.xPos-(49.5+this.spikesLeft.height/2)-t,y:this.yPos,rotation:-90}),this.spikesRight&&this.spikesRight.spawn({x:this.xPos+(49.5+this.spikesRight.height/2)+t,y:this.yPos,rotation:90}),this.updateGraphicPosition(),this.sprite.setFrame(l.BalanceData.getBasicBlockFrame(this.main.currLevelID)),this.sprite.setScale(this.width/this.sprite.width,this.height/this.sprite.height),this.sprite.visible=!0},u.prototype.updateGraphicPosition=function(){this.sprite.x=this.xPos,this.sprite.y=this.yPos},u.prototype.enableSpike=function(t){var e;t===s.up?this.spikesUp||(e=new c.Spike10xHigh(this.main,this.main.layerObstacle),this.main.obstacles.push(e),this.spikesUp=e):t===s.down?this.spikesDown||(e=new c.Spike10xHigh(this.main,this.main.layerObstacle),this.main.obstacles.push(e),this.spikesDown=e):t===s.left?this.spikesLeft||(e=new c.Spike10xHigh(this.main,this.main.layerObstacle),this.main.obstacles.push(e),this.spikesLeft=e):t!==s.right||this.spikesRight||(e=new c.Spike10xHigh(this.main,this.main.layerObstacle),this.main.obstacles.push(e),this.spikesRight=e)},u.prototype.disableSpike=function(t){t===s.up?(this.destroySpike(this.spikesUp),this.spikesUp=null):t===s.down?(this.destroySpike(this.spikesDown),this.spikesDown=null):t===s.left?(this.destroySpike(this.spikesLeft),this.spikesLeft=null):t===s.right&&(this.destroySpike(this.spikesRight),this.spikesRight=null)},u.prototype.update=function(){var t,e,i,n;this.isDelay?(this.actTime-=.5,this.actTime<=0&&(this.isDelay=!1)):(t=l.BalanceData.config_SpikeBlockVelocity,this.spikeMove=this.spikeMove+t,n=Math.abs(this.spikeBlockDown-this.spikeBlockUp),this.spikeMove>=n&&(t=n-(this.spikeMove-t),this.spikeMove=0),this.isSpikeUp&&(t*=-1),this.spikesUp&&(e=this.spikesUp.yPos-t,this.spikesUp.movePosition(this.spikesUp.xPos,e)),this.spikesDown&&(e=this.spikesDown.yPos+t,this.spikesDown.movePosition(this.spikesDown.xPos,e)),this.spikesLeft&&(i=this.spikesLeft.xPos-t,this.spikesLeft.movePosition(i,this.spikesLeft.yPos)),this.spikesRight&&(i=this.spikesRight.xPos+t,this.spikesRight.movePosition(i,this.spikesRight.yPos)),0===this.spikeMove&&(this.isSpikeUp=!this.isSpikeUp,this.isDelay=!0,this.actTime=this.isSpikeUp?this.timeUp:this.timeDown),this.xPos===this.prevX&&this.yPos===this.prevY||this.updatePosition())},u.prototype.destroySpike=function(t){var e;t&&(e=this.main.obstacles.indexOf(t),this.main.obstacles.splice(e,1),t.destroy())},u.prototype.destroy=function(){this.destroySpike(this.spikesUp),this.spikesUp=null,this.destroySpike(this.spikesDown),this.spikesDown=null,this.destroySpike(this.spikesLeft),this.spikesLeft=null,this.destroySpike(this.spikesRight),this.spikesRight=null,this.sprite.destroy(),this.sprite=null,o.prototype.destroy.call(this)},u.prototype.resetLevel=function(){this.spikeMove=0,this.isSpikeUp=this.startSpikeUp;var t=this.isSpikeUp?this.spikeBlockUp:this.spikeBlockDown;this.spikesUp&&this.spikesUp.movePosition(this.xPos,this.yPos-(49.5+this.spikesUp.halfHeight)-t),this.spikesDown&&this.spikesDown.movePosition(this.xPos,this.yPos+(49.5+this.spikesDown.halfHeight)+t),this.spikesLeft&&this.spikesLeft.movePosition(this.xPos-(49.5+this.spikesLeft.halfHeight)-t,this.yPos),this.spikesRight&&this.spikesRight.movePosition(this.xPos+(49.5+this.spikesRight.halfHeight)+t,this.yPos)},u);function u(t,e){var i=o.call(this,t,e)||this;return i.spikeBlockUp=-10,i.spikeBlockDown=-96,i.sprite=new Phaser.GameObjects.Image(t,0,0,h.Atlases.gameplay),e.add(i.sprite),i.sprite.visible=!1,i.spikesUp=null,i.spikesDown=null,i.spikesLeft=null,i.spikesRight=null,i}e.BlockSpike=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),i=(Object.defineProperty(e,"__esModule",{value:!0}),e.BuzzsawHorizontal=void 0,r=i(30).Buzzsaw,s(o,r),o.prototype.spawn=function(t){r.prototype.spawn.call(this,t),this.xVelocity=t.speed,this.startSpeed=t.speed,this.moveDist=t.moveDist},o.prototype.update=function(){0<this.xVelocity?this.xPos>this.startX+this.moveDist&&(this.xVelocity=-this.xVelocity):this.xPos<this.startX-this.moveDist&&(this.xVelocity=-this.xVelocity),this.xPos+=this.xVelocity,this.updatePosition(),r.prototype.update.call(this)},o.prototype.reset=function(){this.xVelocity=this.startSpeed,this.xPos=this.startX,this.yPos=this.startY,this.updatePosition()},o.prototype.resetLevel=function(){this.reset()},o);function o(){var t=null!==r&&r.apply(this,arguments)||this;return t.moveDist=100,t}e.BuzzsawHorizontal=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.BuzzsawOnStick=void 0,i(14)),a=i(20),h=i(0),l=i(4),i=(r=o.Obstacle,s(c,r),c.prototype.spawn=function(t){this.xPos=t.x,this.yPos=t.y,this.startRotation=l.Tools.toRad(t.rotation),this.resetLevel(),this.sprite.visible=!0,this.alive=!0,this.buzzsaw.spawn({x:this.xPos+130*Math.cos(this.startRotation),y:this.yPos+130*Math.sin(this.startRotation),size:50}),this.sprite.x=this.xPos,this.sprite.y=this.yPos},c.prototype.update=function(){this.sprite.rotation+=this.rotationSpeed,this.updatePosition()},c.prototype.updatePosition=function(){this.buzzsaw.xPos=this.xPos+130*Math.cos(this.sprite.rotation),this.buzzsaw.yPos=this.yPos+130*Math.sin(this.sprite.rotation),this.buzzsaw.updatePosition()},c.prototype.destroy=function(){r.prototype.destroy.call(this),this.sprite.destroy(),this.sprite=null,this.buzzsaw=null},c.prototype.resetLevel=function(){this.sprite.rotation=this.startRotation,this.updatePosition()},c);function c(t,e){var i=r.call(this,t,e)||this;return i.sprite=new Phaser.GameObjects.Image(t,0,0,h.Atlases.gameplay,"buzzsawOnStick 10000"),e.add(i.sprite),i.sprite.setOrigin(.1,.5),i.sprite.visible=!1,i.buzzsaw=new a.Buzzsaw(i.main,e),i.buzzsaw.checkUnderPool=!1,i.main.obstacles.push(i.buzzsaw),i.rotationSpeed=l.Tools.toRad(4),i}e.BuzzsawOnStick=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),i=(Object.defineProperty(e,"__esModule",{value:!0}),e.BuzzsawVertical=void 0,r=i(30).Buzzsaw,s(o,r),o.prototype.spawn=function(t){r.prototype.spawn.call(this,t),this.moveDist=t.moveDist,this.startSpeed=t.speed,this.yVelocity=this.startSpeed},o.prototype.update=function(){this.yVelocity<0?this.yPos<this.startY-this.moveDist&&(this.yVelocity=-this.yVelocity):this.yPos>this.startY+this.moveDist&&(this.yVelocity=-this.yVelocity),this.yPos+=this.yVelocity,this.updatePosition(),r.prototype.update.call(this)},o.prototype.reset=function(){this.yVelocity=this.startSpeed,this.xPos=this.startX,this.yPos=this.startY,this.updatePosition()},o.prototype.resetLevel=function(){this.reset()},o);function o(){var t=null!==r&&r.apply(this,arguments)||this;return t.moveDist=100,t}e.BuzzsawVertical=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),i=(Object.defineProperty(e,"__esModule",{value:!0}),e.BuzzsawBouncing=void 0,r=i(30).Buzzsaw,s(o,r),o.prototype.spawn=function(t){r.prototype.spawn.call(this,t),this.yVelocity=0,this.speedUp=-1},o.prototype.update=function(){!1!==this.alive&&(this.yVelocity+=this.main.gravity,this.yPos+=this.yVelocity,this.updatePosition(),this.checkBlockCollisions(),r.prototype.update.call(this))},o.prototype.checkBlockCollisions=function(){for(var t=0,e=this.main.blocks;t<e.length;t++){var i=e[t];if(!1!==i.alive&&0<this.yVelocity&&!0===SAT.testPolygonCircle(i.topPolygon,this.deathCircle)){this.checkUnderPool=!1,-1===this.speedUp?this.speedUp=Math.abs(this.yVelocity):this.yVelocity=this.speedUp,this.yVelocity*=-1,this.yPos=i.yPos-i.halfHeight-this.deathCircle.r;break}}r.prototype.levelStart.call(this)},o.prototype.reset=function(){this.yPos=this.startY,this.yVelocity=0,this.updatePosition()},o.prototype.resetLevel=function(){this.reset(),r.prototype.resetLevel.call(this)},o);function o(){return null!==r&&r.apply(this,arguments)||this}e.BuzzsawBouncing=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.MissileLauncher=void 0,i(0)),a=i(3),h=i(67),i=(r=i(45).ClassicLaser,s(l,r),l.prototype.initGraphic=function(){this.sprite=new Phaser.GameObjects.Image(this.main,0,0,o.Atlases.gameplay,"missileLauncher 10000"),this.sprite.setOrigin(.18,.5),this.layer.add(this.sprite),this.bullet=new h.BulletMissile(this.main,this.main.layerObstacle),this.main.obstacles.push(this.bullet),this.fireDistance=a.BalanceData.config_MissileLauncherFireDistance,this.shootPower=a.BalanceData.config_MissileSpeed},l);function l(){return null!==r&&r.apply(this,arguments)||this}e.MissileLauncher=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),i=(Object.defineProperty(e,"__esModule",{value:!0}),e.BuzzsawEnlarging=void 0,r=i(30).Buzzsaw,s(o,r),o.prototype.spawn=function(t){this.xPos=t.x,this.yPos=t.y,this.sprite.visible=!0,this.enlarging=!0,this.scaleXStart=t.size/100,this.scale=this.scaleXStart,this.alive=!0,this.updatePosition()},o.prototype.update=function(){this.enlarging?(this.scale+=.01*this.scaleXStart,this.scale>2.5*this.scaleXStart&&(this.scale=2.5*this.scaleXStart,this.enlarging=!1)):(this.scale-=.01*this.scaleXStart,this.scale<.5*this.scaleXStart&&(this.scale=.5*this.scaleXStart,this.enlarging=!0)),this.updatePosition(),r.prototype.update.call(this)},o.prototype.updatePosition=function(){this.sprite.setScale(this.scale,this.scale),this.sprite.x=this.xPos,this.sprite.y=this.yPos,this.deathCircle.pos.x=this.xPos,this.deathCircle.pos.y=this.yPos,this.deathCircle.r=42*this.scale},o.prototype.resetLevel=function(){},o);function o(){return null!==r&&r.apply(this,arguments)||this}e.BuzzsawEnlarging=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.FallingSpike=void 0,i(14)),a=i(0),h=i(4),l=i(8),i=(r=o.Obstacle,s(c,r),c.prototype.spawn=function(t){this.xPos=t.x,this.yPos=t.y,this.startX=this.xPos,this.startY=this.yPos,this.xVelocity=0,this.yVelocity=0,this.sprite.rotation=h.Tools.toRad(t.rotation),this.sprite.visible=!1,(this.alive=!1)===this.dispenser&&(this.sprite.visible=!0,this.alive=!0),this.deathBoxPolygon.setAngle(this.sprite.rotation),this.updatePosition(),this.falling=!1,this.fallDist=0,this.speed=0},c.prototype.levelStart=function(){var t=this.sprite.rotation+h.Tools.PI05;this.radCos=Math.cos(t),this.radSin=Math.sin(t),this.hitDist=this.main.raycastToClosestBlock(this.startX,this.startY,this.radCos,this.radSin,350),!1===this.dispenser&&(this.searchHitBox=new SAT.Box(new SAT.Vector(this.startX,this.startY),this.hitDist,16).toPolygon(),this.searchHitBox.setOffset(new SAT.Vector(0,-8)),this.searchHitBox.setAngle(t))},c.prototype.update=function(){var t,e;!1!==this.alive&&(!0===this.falling?(this.xVelocity+=this.radCos*this.gravity,this.yVelocity+=this.radSin*this.gravity,this.speed+=this.gravity,this.xPos+=this.xVelocity,this.yPos+=this.yVelocity,this.fallDist+=this.speed,this.updatePosition(),this.fallDist>this.hitDist&&this.reset(),this.main.checkPlayerDeathByPolygon(this.deathBoxPolygon,l.DeathType.spike)):(this.xPos===this.startX&&this.yPos===this.startY||(t=this.startX-this.xPos,e=this.startY-this.yPos,Math.abs(t)<1?this.xPos=this.startX:this.xPos+=t/10,Math.abs(e)<1?this.yPos=this.startY:this.yPos+=(this.startY-this.yPos)/10,this.updatePosition()),this.falling=SAT.testPolygonPolygon(this.searchHitBox,this.main.player.totalPolygon)))},c.prototype.updatePosition=function(){this.sprite.x=this.xPos,this.sprite.y=this.yPos,this.deathBoxPolygon.pos.x=this.xPos,this.deathBoxPolygon.pos.y=this.yPos},c.prototype.reset=function(){!1===this.dispenser?(this.falling=!1,this.xPos=this.startX-this.radCos*this.height,this.yPos=this.startY-this.radSin*this.height,this.xVelocity=0,this.yVelocity=0,this.sprite.x=this.xPos,this.sprite.y=this.yPos,this.deathBoxPolygon.pos.x=this.xPos,this.deathBoxPolygon.pos.y=this.yPos,this.fallDist=0,this.speed=0):this.die()},c.prototype.dispenserFire=function(){this.falling=!0,this.alive=!0,this.xPos=this.startX+this.radCos*this.height,this.yPos=this.startY+this.radSin*this.height,this.xVelocity=0,this.yVelocity=0,this.sprite.x=this.xPos,this.sprite.y=this.yPos,this.sprite.visible=!0,this.deathBoxPolygon.pos.x=this.xPos,this.deathBoxPolygon.pos.y=this.yPos,this.fallDist=0,this.speed=0},c.prototype.die=function(){this.sprite.visible=!1,this.alive=!1},c.prototype.destroy=function(){this.sprite&&this.sprite.destroy(),this.sprite=null,this.searchHitBox=null,this.deathBoxPolygon=null,r.prototype.destroy.call(this)},c.prototype.resetLevel=function(){this.reset()},c);function c(t,e,i){void 0===i&&(i=!1);var n=r.call(this,t,e)||this,e=(n.sprite=new Phaser.GameObjects.Image(t,0,0,a.Atlases.gameplay,"fallingSpike 10000"),e.add(n.sprite),n.sprite.visible=!1,n.dispenser=i,n.width=12,n.height=18,n.width/2),i=n.height/2;return n.deathBoxPolygon=new SAT.Polygon(new SAT.Vector(0,0),[new SAT.Vector(-e,-i),new SAT.Vector(e,-i),new SAT.Vector(e,i),new SAT.Vector(-e,i)]),n.gravity=.6*t.gravity,n}e.FallingSpike=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.LaserPoint=void 0,i(14)),a=i(0),h=i(4),l=i(8),i=(r=o.Obstacle,s(c,r),c.prototype.spawn=function(t,e,i,n){this.xPos=t,this.yPos=e,this.xLength=i-t,this.yLength=n-e,this.alive=!0,this.deathHitBoxPolygon=new SAT.Polygon(new SAT.Vector(this.xPos,this.yPos),[new SAT.Vector(0,0),new SAT.Vector(i-t,n-e)]),this.laserGraphic.x=this.xPos,this.laserGraphic.y=this.yPos,this.laserGraphic.displayWidth=h.Tools.distance(t,e,i,n),this.laserGraphic.rotation=h.Tools.angleOfPoints(t,e,i,n),this.point1.x=t,this.point1.y=e,this.point2.x=i,this.point2.y=n},c.prototype.update=function(){var t,e;Math.random()<.05&&(e=Math.random(),t=this.xPos+this.xLength*e,e=this.yPos+this.yLength*e,this.main.particleManager.createColorParticle(t,e,10*Math.random()-5,-5*Math.random(),16711680,4,!1,!1,10,!0)),this.main.checkPlayerDeathByPolygon(this.deathHitBoxPolygon,l.DeathType.laser)},c.prototype.destroy=function(){this.laserGraphic.destroy(),this.laserGraphic=null,this.point1.destroy(),this.point1=null,this.point2.destroy(),this.point2=null,r.prototype.destroy.call(this)},c);function c(t,e){var i=r.call(this,t,e)||this;return i.laserGraphic=new Phaser.GameObjects.Image(t,0,0,a.Atlases.gameplay,"whiteLine 10000"),i.laserGraphic.setOrigin(0,.5),i.laserGraphic.tint=16724787,e.add(i.laserGraphic),i.point1=new Phaser.GameObjects.Image(t,0,0,a.Atlases.gameplay,"laserPoint 10000"),e.add(i.point1),i.point2=new Phaser.GameObjects.Image(t,0,0,a.Atlases.gameplay,"laserPoint 10000"),e.add(i.point2),i}e.LaserPoint=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.Quadrant=void 0,i(14)),a=i(0),h=i(4),l=i(8),i=(r=o.Obstacle,s(c,r),c.prototype.spawn=function(t){this.xPos=t.x,this.yPos=t.y,this.startX=this.xPos,this.startY=this.yPos,this.startRad=h.Tools.toRad(t.rotation),this.sprite.visible=!0;var t=t.size/this.sprite.width,e=(this.sprite.setScale(t,t),this.alive=!0,new SAT.Box(new SAT.Vector(0,0),10*t,10*t).toPolygon());e.setOffset(new SAT.Vector(75*t,0)),this.deathHitBoxPolygons.push(e),(e=new SAT.Box(new SAT.Vector(0,0),10*t,10*t).toPolygon()).setOffset(new SAT.Vector(0,75*t)),this.deathHitBoxPolygons.push(e),(e=new SAT.Box(new SAT.Vector(0,0),10*t,10*t).toPolygon()).setOffset(new SAT.Vector(-75*t,0)),this.deathHitBoxPolygons.push(e),(e=new SAT.Box(new SAT.Vector(0,0),10*t,10*t).toPolygon()).setOffset(new SAT.Vector(0,-75*t)),this.deathHitBoxPolygons.push(e),this.updatePosition()},c.prototype.update=function(){this.sprite.rotation+=this.rotSpeed,this.updatePosition(),this.main.checkPlayerDeathByPolygons(this.deathHitBoxPolygons,l.DeathType.quadrant)},c.prototype.updatePosition=function(){this.sprite.x=this.xPos,this.sprite.y=this.yPos;for(var t=0,e=this.deathHitBoxPolygons;t<e.length;t++){var i=e[t];i.pos.x=this.xPos,i.pos.y=this.yPos,i.setAngle(this.sprite.rotation)}},c.prototype.destroy=function(){this.sprite.destroy(),this.sprite=null,this.deathHitBoxPolygons=null,r.prototype.destroy.call(this)},c.prototype.resetLevel=function(){this.sprite.rotation=this.startRad,this.updatePosition()},c);function c(t,e,i){var n=r.call(this,t,e)||this;return n.sprite=new Phaser.GameObjects.Image(t,0,0,a.Atlases.gameplay,"quadrant 10000"),e.add(n.sprite),n.sprite.visible=!1,n.deathHitBoxPolygons=[],n.rotSpeed=h.Tools.toRad(i),n}e.Quadrant=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.Reaper=void 0,i(14)),a=i(0),h=i(4),l=i(8),i=(r=o.Obstacle,s(c,r),c.prototype.spawn=function(t){this.xPos=t.x,this.yPos=t.y,this.startX=this.xPos,this.startY=this.yPos,this.startRad=h.Tools.toRad(t.rotation);var t=t.size/this.sprite.width,e=(this.sprite.setScale(t,t),this.sprite.visible=!0,this.alive=!0,this.deathHitBoxes=[],new SAT.Box(new SAT.Vector(this.xPos,this.yPos),27*t,17*t).toPolygon());e.setOffset(new SAT.Vector(-27*t,-150*t)),this.deathHitBoxes.push(e),(e=new SAT.Box(new SAT.Vector(this.xPos,this.yPos),13*t,13*t).toPolygon()).setOffset(new SAT.Vector(-84*t,-130*t)),this.deathHitBoxes.push(e),(e=new SAT.Box(new SAT.Vector(this.xPos,this.yPos),6*t,6*t).toPolygon()).setOffset(new SAT.Vector(-118*t,-92*t)),this.deathHitBoxes.push(e),(e=new SAT.Box(new SAT.Vector(this.xPos,this.yPos),3*t,3*t).toPolygon()).setOffset(new SAT.Vector(-132*t,-52*t)),this.deathHitBoxes.push(e),(e=new SAT.Box(new SAT.Vector(this.xPos,this.yPos),27*t,17*t).toPolygon()).setOffset(new SAT.Vector(-27*t,-150*t)),e.setAngle(Math.PI),this.deathHitBoxes.push(e),(e=new SAT.Box(new SAT.Vector(this.xPos,this.yPos),13*t,13*t).toPolygon()).setOffset(new SAT.Vector(-84*t,-130*t)),e.setAngle(Math.PI),this.deathHitBoxes.push(e),(e=new SAT.Box(new SAT.Vector(this.xPos,this.yPos),6*t,6*t).toPolygon()).setOffset(new SAT.Vector(-118*t,-92*t)),e.setAngle(Math.PI),this.deathHitBoxes.push(e),(e=new SAT.Box(new SAT.Vector(this.xPos,this.yPos),3*t,3*t).toPolygon()).setOffset(new SAT.Vector(-132*t,-52*t)),e.setAngle(Math.PI),this.deathHitBoxes.push(e),this.updatePosition()},c.prototype.update=function(){this.sprite.rotation-=this.rotSpeed,this.updatePosition(),this.main.checkPlayerDeathByPolygons(this.deathHitBoxes,l.DeathType.reaper)},c.prototype.updatePosition=function(){this.sprite.x=this.xPos,this.sprite.y=this.yPos;for(var t=0;t<this.deathHitBoxes.length;t++){var e=this.deathHitBoxes[t];t<4?e.setAngle(this.sprite.rotation):e.setAngle(this.sprite.rotation+Math.PI)}},c.prototype.destroy=function(){this.sprite.destroy(),this.sprite=null,this.deathHitBoxes=null,r.prototype.destroy.call(this)},c.prototype.resetLevel=function(){this.sprite.rotation=this.startRad,this.updatePosition()},c);function c(t,e){var i=r.call(this,t,e)||this;return i.sprite=new Phaser.GameObjects.Image(t,0,0,a.Atlases.gameplay,"reaper 10000"),e.add(i.sprite),i.sprite.visible=!1,i.deathHitBoxes=[],i.rotSpeed=h.Tools.toRad(2.5),i}e.Reaper=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.ShurikanDispenser=void 0,i(20)),a=i(0),h=i(1),l=i(4),c=i(8),i=(r=i(14).Obstacle,s(u,r),u.prototype.spawn=function(t){this.xPos=t.x,this.yPos=t.y,this.sprite.x=this.xPos,this.sprite.y=this.yPos,this.sprite.setScale(1,1),this.sprite.visible=!0,this.alive=!0,this.charge=u.CHARGE_TIME;for(var e=0;e<4;e++)this.spikes[e].spawn({x:this.xPos,y:this.yPos,rotation:90*e});this.hitBoxPoly.pos.x=this.xPos,this.hitBoxPoly.pos.y=this.yPos,this.rad=0,this.sprite.rotation=0,this.sprite.gotoAndStop(24)},u.prototype.levelStart=function(){this.platforms=[];for(var t=new SAT.Circle(new SAT.Vector(this.xPos,this.yPos),250),e=0,i=this.main.blocks;e<i.length;e++){var n=i[e];SAT.testCirclePolygon(t,n.totalPolygon)&&this.platforms.push(n)}for(var r=0;r<4;r++)this.spikes[r].levelStart()},u.prototype.fireSpikes=function(){for(var t=0;t<4;t++)this.spikes[t].dispenserFire();this.sprite.playFrames(0,24,0,.5)},u.prototype.update=function(){this.sprite.update();var t=this.main.player;!0===t.alive&&l.Tools.distance(this.xPos,this.yPos,t.xPos,t.yPos)<=250&&!0===this.main.raycastToPlayerOneLine(this.platforms,this.xPos,this.yPos)&&this.charge>=u.CHARGE_TIME&&(this.fireSpikes(),this.charge=0,this.rad=0),this.charge<u.CHARGE_TIME&&(this.charge+=1,this.rad+=Math.PI/u.CHARGE_TIME),this.sprite.rotation=this.rad,this.main.checkPlayerDeathByPolygon(this.hitBoxPoly,c.DeathType.shurikan);for(var e=0;e<4;e++)this.spikes[e].update()},u.prototype.destroy=function(){for(var t=0;t<4;t++)this.spikes[t].destroy();this.spikes=null,this.sprite.destroy(),this.sprite=null,this.platforms=null,this.hitBoxPoly=null,r.prototype.destroy.call(this)},u.prototype.resetLevel=function(){for(var t=this.charge=0;t<4;t++)this.spikes[t].resetLevel()},u.CHARGE_TIME=70,u);function u(t,e){var i=r.call(this,t,e)||this;i.sprite=new h.JDImageAnim(t,0,0,a.Atlases.gameplay,"shurikanDispenser ",24),e.add(i.sprite),i.sprite.visible=!1,i.hitBoxPoly=new SAT.Box(new SAT.Vector(0,0),20,20).toPolygon(),i.hitBoxPoly.setOffset(new SAT.Vector(-10,-10)),i.spikes=[];for(var n=0;n<4;n++)i.spikes[n]=new o.FallingSpike(t,e,!0);return i}e.ShurikanDispenser=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.ShurikanHorizontal=void 0,i(14)),a=i(0),h=i(8),i=(r=o.Obstacle,s(l,r),l.prototype.spawn=function(t,e,i,n,r){void 0===r&&(r=0),this.xPos=t,this.yPos=e,this.xVelocity=i,this.yVelocity=n,this.speed=Math.sqrt(i*i+n*n),this.dist=0,this.sprite.setScale(1,1),this.sprite.setFrame("shurikanHorizontal 1000"+r),this.sprite.visible=!0,this.alive=!0,this.sprite.rotation=0,this.updatePosition()},l.prototype.update=function(){this.alive&&(this.sprite.rotation+=.122173,200<this.dist?(this.sprite.scaleX-=.05,this.sprite.scaleY=this.sprite.scaleX,this.sprite.scaleX<=.1&&(this.alive=!1,this.resetLevel(),--this.spawner.spawned)):(this.xPos+=this.xVelocity,this.yPos+=this.yVelocity,this.dist+=this.speed),this.updatePosition(),this.main.checkPlayerDeathByPolygon(this.hitBoxPoly,h.DeathType.shurikan))},l.prototype.updatePosition=function(){this.sprite.x=this.xPos,this.sprite.y=this.yPos,this.hitBoxPoly.pos.x=this.xPos,this.hitBoxPoly.pos.y=this.yPos},l.prototype.resetLevel=function(){this.sprite.visible=!1,this.alive=!1},l.prototype.destroy=function(){this.alive=!1,this.sprite.destroy(),this.sprite=null,this.hitBoxPoly=null,this.spawner=null,r.prototype.destroy.call(this)},l);function l(t,e,i){var n=r.call(this,t,e)||this;return n.spawner=i,n.sprite=new Phaser.GameObjects.Image(t,0,0,a.Atlases.gameplay,"shurikanHorizontal 10000"),e.add(n.sprite),n.sprite.visible=!1,n.hitBoxPoly=new SAT.Box(new SAT.Vector(-3001,0),20,20).toPolygon(),n.hitBoxPoly.setOffset(new SAT.Vector(-10,-10)),n}e.ShurikanHorizontal=i},function(t,e,i){"use strict";var n,s,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.ShurikanSpawner=void 0,i(14)),a=i(20),h=i(0),l=i(4),i=(s=o.Obstacle,r(c,s),c.prototype.spawn=function(t){this.xPos=t.x,this.yPos=t.y,this.sprite.x=this.xPos,this.sprite.y=this.yPos,this.sprite.rotation=l.Tools.toRad(t.rotation),this.cooldown=0,this.spawned=0,this.alive=!0;for(var e=0;e<this.shurikanPool.length;e++)this.shurikanPool[e].resetLevel()},c.prototype.update=function(){var t,e,i,n;!0===this.alive&&this.spawned<3&&(this.cooldown+=1,this.cooldown>this.fireTimer)&&(this.cooldown=0,t=this.shurikanPool[this.spawned],e=1.3*Math.cos(this.sprite.rotation),i=1.3*Math.sin(this.sprite.rotation),n=0,this.sprite.rotation===l.Tools.PI05||this.sprite.rotation===-l.Tools.PI05?n=1:0!==this.sprite.rotation&&this.sprite.rotation!==-Math.PI&&this.sprite.rotation!==Math.PI&&(n=2),t.spawn(this.xPos,this.yPos,e/2,i/2,n),this.spawned+=1,3===this.spawned&&(this.cooldown=-120))},c.prototype.resetLevel=function(){this.spawned=0,this.cooldown=0},c.prototype.destroy=function(){this.sprite.destroy(),this.sprite=null,this.shurikanPool=null,s.prototype.destroy.call(this)},c.prototype.destroySelf=function(){for(;0<this.shurikanPool.length;)this.shurikanPool.shift().destroySelf();s.prototype.destroySelf.call(this)},c);function c(t,e){var i=s.call(this,t,e)||this;i.fireTimer=60,i.sprite=new Phaser.GameObjects.Image(t,0,0,h.Atlases.gameplay,"shurikanSpawner 10000"),e.add(i.sprite),i.shurikanPool=[];for(var n=0;n<3;n++){var r=new a.ShurikanHorizontal(i.main,e,i);i.shurikanPool.push(r),i.main.obstacles.push(r)}return i}e.ShurikanSpawner=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.Spark=void 0,i(14)),a=i(0),h=i(8),i=(r=o.Obstacle,s(l,r),l.prototype.spawn=function(t,e){this.sparkBlock&&(t=this.sparkBlock.leftEdge,e=this.sparkBlock.topEdge,this.direction="right"),this.alive=!0,this.sprite.visible=!0,this.setXY(t,e)},l.prototype.hide=function(){this.sprite.visible=!1,this.alive=!1},l.prototype.update=function(){if(!1!==this.alive){if(this.sparkBlock&&("right"===this.direction?(this.xPos+=2.5,this.xPos>this.sparkBlock.rightEdge&&(this.xPos=this.sparkBlock.rightEdge,this.direction="down")):"down"===this.direction?(this.yPos+=2.5,this.yPos>this.sparkBlock.bottomEdge&&(this.yPos=this.sparkBlock.bottomEdge,this.direction="left")):"left"===this.direction?(this.xPos-=2.5,this.xPos<this.sparkBlock.leftEdge&&(this.xPos=this.sparkBlock.leftEdge,this.direction="up")):"up"===this.direction&&(this.yPos-=2.5,this.yPos<this.sparkBlock.topEdge&&(this.yPos=this.sparkBlock.topEdge,this.direction="right"))),Math.random()<.2&&this.main.particleManager.createColorParticle(this.xPos,this.yPos,10*Math.random()-5,5*Math.random()-2.5,16763904,4,!1,!1,10,!0),this.updatePosition(),this.sparkBlock)for(var t=0,e=this.main.pools;t<e.length;t++){var i=e[t];i.setElectric(SAT.testPolygonPolygon(this.deathBoxPolygon,i.totalPolygon))}this.main.checkPlayerDeathByPolygon(this.deathBoxPolygon,h.DeathType.sparkElectric)}},l.prototype.setXY=function(t,e){this.xPos=t,this.yPos=e,this.updatePosition()},l.prototype.updatePosition=function(){this.sprite.x=this.xPos,this.sprite.y=this.yPos,this.deathBoxPolygon.pos.x=this.xPos,this.deathBoxPolygon.pos.y=this.yPos},l.prototype.resetLevel=function(){var t,e;this.sparkBlock&&(t=this.sparkBlock.leftEdge,e=this.sparkBlock.topEdge,this.direction="right",this.xPos=t,this.yPos=e),this.updatePosition()},l.prototype.destroy=function(){null!==this.sprite&&(this.sprite.destroy(),this.sprite=null,this.deathBoxPolygon=null)},l);function l(t,e,i){var n=r.call(this,t,e)||this;return n.sparkBlock=i,n.sprite=new Phaser.GameObjects.Image(t,0,0,a.Atlases.gameplay,"spark 10000"),e.add(n.sprite),n.sprite.visible=!1,n.deathBoxPolygon=new SAT.Box(new SAT.Vector(0,0),16,16).toPolygon(),n.deathBoxPolygon.setOffset(new SAT.Vector(-8,-8)),n}e.Spark=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),i=(Object.defineProperty(e,"__esModule",{value:!0}),e.Spike5x=void 0,r=i(22).Spike,s(o,r),o.prototype.init=function(){r.prototype.init.call(this,"spike5x 10000",5)},o);function o(){return null!==r&&r.apply(this,arguments)||this}e.Spike5x=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),i=(Object.defineProperty(e,"__esModule",{value:!0}),e.Spike10x=void 0,r=i(22).Spike,s(o,r),o.prototype.init=function(){r.prototype.init.call(this,"spike10x 10000",10)},o);function o(){return null!==r&&r.apply(this,arguments)||this}e.Spike10x=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.Spike10xHigh=void 0,i(22)),a=i(0),i=(r=o.Spike,s(h,r),h.prototype.init=function(){this.sprite=new Phaser.GameObjects.Image(this.main,0,0,a.Atlases.gameplay,"spike10xHigh 10000"),this.layer.add(this.sprite),this.sprite.visible=!1,this.width=83,this.height=48,this.halfWidth=.5*this.width,this.halfHeight=.5*this.height},h);function h(){return null!==r&&r.apply(this,arguments)||this}e.Spike10xHigh=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),i=(Object.defineProperty(e,"__esModule",{value:!0}),e.Spike15x=void 0,r=i(22).Spike,s(o,r),o.prototype.init=function(){r.prototype.init.call(this,"spike15x 10000",15)},o);function o(){return null!==r&&r.apply(this,arguments)||this}e.Spike15x=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),i=(Object.defineProperty(e,"__esModule",{value:!0}),e.Spike20x=void 0,r=i(22).Spike,s(o,r),o.prototype.init=function(){r.prototype.init.call(this,"spike20x 10000",20)},o);function o(){return null!==r&&r.apply(this,arguments)||this}e.Spike20x=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),i=(Object.defineProperty(e,"__esModule",{value:!0}),e.Spike25x=void 0,r=i(22).Spike,s(o,r),o.prototype.init=function(){r.prototype.init.call(this,"spike25x 10000",25)},o);function o(){return null!==r&&r.apply(this,arguments)||this}e.Spike25x=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),i=(Object.defineProperty(e,"__esModule",{value:!0}),e.Spike30x=void 0,r=i(22).Spike,s(o,r),o.prototype.init=function(){r.prototype.init.call(this,"spike30x 10000",30)},o);function o(){return null!==r&&r.apply(this,arguments)||this}e.Spike30x=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),i=(Object.defineProperty(e,"__esModule",{value:!0}),e.SpikeActBlockHard=void 0,r=i(22).Spike,s(o,r),o.prototype.init=function(){r.prototype.init.call(this,"spikeActBlockHard 10000",12)},o);function o(){return null!==r&&r.apply(this,arguments)||this}e.SpikeActBlockHard=i},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WireTrail=void 0;var n=i(20),r=i(2);function s(t){this.sparkSpeed=r.BalanceData.config_WireSparkSpeed,this.wireWidth=50,this.main=t,this.spark=new n.Spark(t,t.layerTopObstacle,null),this.main.obstacles.push(this.spark),this.burning=!1}s.prototype.addWires=function(t){this.wires=t,this.start()},s.prototype.start=function(){this.burning=!0,this.currentInd=this.wires.length,this.nextWire()},s.prototype.nextWire=function(){0===this.currentInd?(this.burning=!1,this.main.vexTNT&&(this.main.vexTNT.exploding=!0),this.spark.hide()):(--this.currentInd,this.currentWire=this.wires[this.currentInd],this.spark.spawn(this.currentWire.xPos+Math.cos(this.currentWire.sprite.rotation)*this.wireWidth,this.currentWire.yPos+Math.sin(this.currentWire.sprite.rotation)*this.wireWidth))},s.prototype.updateSpark=function(){var t=this.currentWire.sprite.scaleX*this.wireWidth;this.spark.setXY(this.currentWire.xPos+Math.cos(this.currentWire.sprite.rotation)*t,this.currentWire.yPos+Math.sin(this.currentWire.sprite.rotation)*t)},s.prototype.update=function(){!1!==this.burning&&(this.currentWire.sprite.scaleX-=this.sparkSpeed/50,this.currentWire.sprite.scaleX<=0&&(this.currentWire.sprite.scaleX=0,this.nextWire()),this.updateSpark(),this.main.updateProgressTnt(this.getpercent()))},s.prototype.getpercent=function(){for(var t=0,e=this.wires.length,i=0,n=this.wires;i<n.length;i++)t+=n[i].sprite.scaleX;return t/e},s.prototype.destroy=function(){this.burning=!1,this.main=null,this.wires=null,this.spark=null},s.prototype.resetLevel=function(){for(var t=0,e=this.wires;t<e.length;t++)e[t].resetLevel();this.start()},e.WireTrail=s},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.SurveillanceCamera=void 0,i(14)),a=i(0),h=i(20),l=i(4),c=i(3),i=(r=o.Obstacle,s(u,r),u.prototype.spawn=function(t){this.alive=!0,this.sprite.visible=!0,this.scanGraphic.visible=!0,this.xPos=t.x,this.yPos=t.y,this.startR=l.Tools.toRad(t.rotation),this.minR=this.startR+l.Tools.toRad(t.rotationMin),this.maxR=this.startR+l.Tools.toRad(t.rotationMax),this.isScanMoving=!0,this.minR===this.maxR&&(this.isScanMoving=!1),this.scanSpeed=this.startSpeed,this.rPos=this.startR,this.currID=t.currID,this.isHeroFound=!1,this.scanDistance=t.distance;t=t.range;this.scanGraphic.geom.setTo([0,0,this.scanDistance,-t,this.scanDistance,t]),this.scanGraphic.setFillStyle(65280,.3),this.scanGraphic.updateData(),this.scanBoxPolygon=new SAT.Polygon(new SAT.Vector(this.xPos,this.yPos),[new SAT.Vector(0,0),new SAT.Vector(this.scanDistance,-t),new SAT.Vector(this.scanDistance,t)]),this.updatePosition()},u.prototype.hide=function(){this.sprite.visible=!1,this.scanGraphic.visible=!1,this.alive=!1},u.prototype.levelStart=function(){this.lasers=[];for(var t=0,e=this.main.obstacles;t<e.length;t++){var i=e[t];i instanceof h.ClassicLaserCamera&&i.currID===this.currID&&this.lasers.push(i)}this.platforms=[];for(var n=new SAT.Circle(new SAT.Vector(this.xPos,this.yPos),this.scanDistance),r=0,s=this.main.blocks;r<s.length;r++){var o=s[r];SAT.testCirclePolygon(n,o.totalPolygon)&&this.platforms.push(o)}},u.prototype.update=function(){if(!1!==this.alive)if(!0===SAT.testPolygonPolygon(this.scanBoxPolygon,this.main.player.totalPolygon))if(!1===this.main.raycastToPlayerTwoLines(this.platforms,this.xPos,this.yPos))this.targetlost();else{if(!1===this.isHeroFound){this.scanGraphic.setFillStyle(16711680,.3),this.isHeroFound=!0;for(var t=0,e=this.lasers;t<e.length;t++)e[t].startFollow=this.isHeroFound}var i;!0===this.isScanMoving&&(i=this.main.player,(i=l.Tools.angleOfPoints(this.xPos,this.yPos,i.xPos,i.yPos-i.halfHeight))<0&&(this.minR>Math.PI||this.maxR>Math.PI)&&(i=l.Tools.PI2+i),this.rPos=this.getFollowRotation(this.rPos,i,c.BalanceData.config_SurveillanceCameraFollowSpeed),this.rPos<this.minR?this.rPos=this.minR:this.rPos>this.maxR&&(this.rPos=this.maxR),this.updatePosition())}else this.targetlost()},u.prototype.getFollowRotation=function(t,e,i){var n=l.Tools.smartRotation(e-t);return i<n?t+i:n<-i?t-i:e},u.prototype.targetlost=function(){if(!0===this.isScanMoving&&(this.rPos+=this.scanSpeed,this.rPos<this.minR?this.scanSpeed=this.startSpeed:this.rPos>this.maxR&&(this.scanSpeed=-this.startSpeed),this.updatePosition()),!0===this.isHeroFound){this.scanGraphic.setFillStyle(65280,.3),this.isHeroFound=!1;for(var t=0,e=this.lasers;t<e.length;t++)e[t].startFollow=this.isHeroFound}},u.prototype.updatePosition=function(){this.sprite.x=this.xPos,this.sprite.y=this.yPos,this.sprite.rotation=this.rPos,this.scanGraphic.x=this.xPos,this.scanGraphic.y=this.yPos,this.scanGraphic.rotation=this.sprite.rotation,this.scanBoxPolygon.setAngle(this.sprite.rotation)},u.prototype.resetLevel=function(){this.rPos=this.startR,this.scanSpeed=this.startSpeed,this.updatePosition()},u.prototype.destroy=function(){r.prototype.destroy.call(this),this.sprite.destroy(),this.sprite=null,this.scanGraphic.destroy(),this.scanGraphic=null,this.scanBoxPolygon=null,this.lasers=null,this.platforms=null},u);function u(t,e){var i=r.call(this,t,e)||this;return i.sprite=new Phaser.GameObjects.Image(t,0,0,a.Atlases.gameplay,"surveillanceCamera 10000"),i.sprite.setOrigin(.95,.45),e.add(i.sprite),i.scanGraphic=new Phaser.GameObjects.Polygon(t,0,0,[0,0]),i.scanGraphic.setOrigin(0,0),e.add(i.scanGraphic),i.startSpeed=c.BalanceData.config_SurveillanceCameraRotaionSpeed,i.hide(),i}e.SurveillanceCamera=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.ClassicLaserCamera=void 0,i(45)),a=i(3),i=(r=o.ClassicLaser,s(h,r),h.prototype.initGraphic=function(){r.prototype.initGraphic.call(this),this.fireRate=a.BalanceData.config_ClassicLaserCameraFireTime},h.prototype.spawn=function(t){r.prototype.spawn.call(this,t),this.currID=t.currID},h.prototype.update=function(){var t=this.main.player;!0===t.alive&&this.lookAtHero(t,this.startFollow)},h);function h(){var t=null!==r&&r.apply(this,arguments)||this;return t.startFollow=!1,t}e.ClassicLaserCamera=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.BounceBlock=void 0,i(0)),a=i(1),h=i(2),l=i(11),i=(r=i(5).Block,s(c,r),c.prototype.spawn=function(t){this.init(t.x,t.y,t.width,t.height),this.offScale=0,this.startScaleX=this.width/100,this.startScaleY=this.height/100,this.updateGraphicPosition(),this.container.setScale(this.startScaleX,this.startScaleY),!0===h.BalanceData.blend&&this.arrowAnimation.playFrames(0,23,-1,.5),this.bouncing=!1},c.prototype.updateGraphicPosition=function(){this.container.x=this.xPos,this.container.y=this.yPos},c.prototype.update=function(){this.arrowAnimation.update(),this.landed?this.specificLand():1===this.container.scaleX&&1===this.container.scaleY||(this.container.scaleY-=.075*(this.container.scaleY-this.startScaleY),this.container.scaleX-=.075*(this.container.scaleX-this.startScaleX),this.offScale=1-this.container.scaleY/this.startScaleY),this.container.y=this.yPos+this.halfHeight*this.offScale},c.prototype.specificLand=function(){this.container.scaleX+=.02,this.container.scaleY-=.02,this.offScale=1-this.container.scaleY/this.startScaleY;var t=this.main.player;!1===this.bouncing?(this.lockX=t.xPos,t.setCrouch(),t.disableControls=!0,t.disableCollision=!0,this.bouncing=!0):(t.yVelocity=0,t.xPos=this.lockX,t.yPos=this.yPos-this.halfHeight,t.setSpineOffY(this.height*this.offScale),t.updatePositions()),this.container.scaleY<.25&&(t.jump(-.26*this.height),t.disableControls=!1,t.disableCollision=!1,t.setSpineOffY(0),this.bouncing=!1,l.SoundManager.playSFX("bounce1"))},c.prototype.destroy=function(){this.sprite.destroy(),this.sprite=null,this.arrowAnimation.destroy(),this.arrowAnimation=null,this.container.destroy(),this.container=null,r.prototype.destroy.call(this)},c);function c(t,e){var i=r.call(this,t,e)||this;return i.container=new Phaser.GameObjects.Container(t),e.add(i.container),i.sprite=new Phaser.GameObjects.Image(t,0,0,o.Atlases.gameplay,"bounceBlock 10000"),i.container.add(i.sprite),i.arrowAnimation=new a.JDImageAnim(t,0,0,o.Atlases.gameplay,"bounceBlockArrow "),i.container.add(i.arrowAnimation),i.type="bounce",i}e.BounceBlock=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.Elevator=void 0,i(5)),a=i(0),h=i(3),i=(r=o.Block,s(l,r),l.prototype.spawn=function(t,e,i){this.init(t,e,100,50),this.activate(t,e,i)},l.prototype.updateGraphicPosition=function(){this.sprite.x=this.xPos,this.sprite.y=this.yPos},l.prototype.update=function(){!1!==this.alive&&(this.yPos+=this.yVelocity,this.updatePosition(),(this.yVelocity<0&&this.yPos<this.eliminatorY||0<this.yVelocity&&this.yPos>this.eliminatorY)&&(this.sprite.visible=!1,this.alive=!1))},l.prototype.activate=function(t,e,i){e<i?(!0!==this.isMovingDown&&(this.yVelocity=h.BalanceData.config_ElevatorSpeed,this.sprite.setFrame("elevatorDown 10000")),this.isMovingDown=!0):(!1!==this.isMovingDown&&(this.yVelocity=-h.BalanceData.config_ElevatorSpeed,this.sprite.setFrame("elevatorUp 10000")),this.isMovingDown=!1),this.eliminatorY=i,this.sprite.x=this.xPos=t,this.sprite.y=this.yPos=e,this.sprite.visible=!0,this.alive=!0},l.prototype.destroy=function(){this.sprite.destroy(),this.sprite=null,r.prototype.destroy.call(this)},l.prototype.reset=function(){},l);function l(t,e){var i=r.call(this,t,e)||this;return i.sprite=new Phaser.GameObjects.Image(t,0,0,a.Atlases.gameplay),e.add(i.sprite),i.sprite.visible=!1,i}e.Elevator=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.ElevatorEliminator=void 0,i(5)),a=i(0),h=i(2),i=(r=o.Block,s(l,r),l.prototype.destroySelf=function(){this.main.removeBlockFrom(this.main.elevatorEliminator,this),r.prototype.destroySelf.call(this)},l.prototype.addSpikes=function(t,e){this.spikes=t,this.isSpikeUp=e},l.prototype.spawn=function(t){this.init(t.x,t.y,150,60),this.updatePosition(),this.sprite.setFrame(h.BalanceData.getBasicBlockFrame(this.main.currLevelID)),this.sprite.setScale(this.width/this.sprite.width,this.height/this.sprite.height),(this.sprite.visible=!0)===this.isSpikeUp?this.spikes.spawn({x:this.xPos,y:this.yPos-34.5,rotation:0}):this.spikes.spawn({x:this.xPos,y:this.yPos+34.5,rotation:180})},l.prototype.destroy=function(){this.spikes=null,this.sprite.destroy(),this.sprite=null,r.prototype.destroy.call(this)},l.prototype.updateGraphicPosition=function(){this.sprite.x=this.xPos,this.sprite.y=this.yPos},l);function l(t,e){var i=r.call(this,t,e)||this;return i.sprite=new Phaser.GameObjects.Image(t,0,0,a.Atlases.gameplay),e.add(i.sprite),i}e.ElevatorEliminator=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.ElevatorGenerator=void 0,i(5)),a=i(0),h=i(2),i=(r=o.Block,s(l,r),l.prototype.addSpikes=function(t,e){this.spikes=t,this.isSpikeUp=e},l.prototype.levelStart=function(){this.cable.x=this.xPos,this.cable.visible=!0;for(var t=0,e=this.main.elevatorEliminator;t<e.length;t++){var i=e[t];if(i.xPos+i.width/2>=this.xPos&&i.xPos-i.width/2<=this.xPos){if(i.yPos>this.yPos)return this.cable.y=this.yPos,this.cable.setCrop(0,0,6,i.yPos-this.yPos),void(this.eliminatorY=i.yPos);if(i.yPos<this.yPos)return this.cable.y=i.yPos,this.cable.setCrop(0,0,6,this.yPos-i.yPos),void(this.eliminatorY=i.yPos)}}this.cable.visible=!1},l.prototype.spawn=function(t){this.init(t.x,t.y,150,60),this.updatePosition(),this.sprite.setFrame(h.BalanceData.getBasicBlockFrame(this.main.currLevelID)),this.sprite.setScale(this.width/this.sprite.width,this.height/this.sprite.height),(this.sprite.visible=!0)===this.isSpikeUp?this.spikes.spawn({x:this.xPos,y:this.yPos-35,rotation:0}):this.spikes.spawn({x:this.xPos,y:this.yPos+35,rotation:180})},l.prototype.update=function(){--this.timeNextPlatform,this.timeNextPlatform<=0&&(this.main.startElevator(this.xPos,this.yPos,this.eliminatorY),this.timeNextPlatform=this.delayNextPlatform)},l.prototype.updateGraphicPosition=function(){this.sprite.x=this.xPos,this.sprite.y=this.yPos},l.prototype.destroy=function(){this.cable.destroy(),this.cable=null,this.sprite.destroy(),this.sprite=null,this.spikes=null,this.hitBoxPolygon=null,r.prototype.destroy.call(this)},l);function l(t,e){var i=r.call(this,t,e)||this;return i.sprite=new Phaser.GameObjects.Image(t,0,0,a.Atlases.gameplay),e.add(i.sprite),i.timeNextPlatform=h.BalanceData.config_ElevatorTimeNew,i.delayNextPlatform=h.BalanceData.config_ElevatorTimeNew,i.cable=new Phaser.GameObjects.Image(i.main,0,0,a.Atlases.gameplay,"cable 10000"),i.cable.setOrigin(.5,0),i.main.layerUnderPool.add(i.cable),i}e.ElevatorGenerator=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.ExplosiveBlock=void 0,i(0)),a=i(11),i=(r=i(5).Block,s(h,r),h.prototype.spawn=function(t){this.init(t.x,t.y,t.width,t.height),this.used=!1,this.updateGraphicPosition(),this.sprite.setScale(this.width/100,this.height/100),this.sprite.visible=!0},h.prototype.updateGraphicPosition=function(){this.sprite.x=this.xPos,this.sprite.y=this.yPos},h.prototype.update=function(){!1===this.alive||this.xPos===this.prevX&&this.yPos===this.prevY||this.updatePosition()},h.prototype.explode=function(){this.used=!0,this.alive=!1,this.sprite.visible=!1,this.main.effectsOverlay.explode(),a.SoundManager.playSFX("explosion")},h.prototype.resetLevel=function(){this.used=!1,this.alive=!0,this.sprite.visible=!0},h.prototype.reset=function(){},h.prototype.destroy=function(){this.sprite.destroy(),this.sprite=null,r.prototype.destroy.call(this)},h);function h(t,e){e=r.call(this,t,e)||this;return e.sprite=new Phaser.GameObjects.Image(t,0,0,o.Atlases.gameplay,"explosiveBlock 10000"),e.layer.add(e.sprite),e.sprite.visible=!1,e.used=!1,e.type="explosive",e}e.ExplosiveBlock=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.FallingBlock=void 0,i(0)),a=i(1),h=i(2),l=i(11),i=(r=i(5).Block,s(c,r),c.prototype.spawn=function(t){this.init(t.x,t.y,t.width,t.height),this.updateGraphicPosition(),this.container.setScale(this.width/100,this.height/100),!0===h.BalanceData.blend&&this.arrowAnimation.playFrames(0,23,-1,.5),this.container.visible=!0,this.falling=!1},c.prototype.updateGraphicPosition=function(){this.container.x=this.xPos,this.container.y=this.yPos},c.prototype.update=function(){if(this.arrowAnimation.update(),!1===this.alive){if(SAT.testPolygonPolygon(this.totalPolygon,this.main.player.bodyPolygon))return;this.alive=!0}this.prevY=this.yPos,!1===this.falling?this.landed?(this.falling=!0,this.yVelocity=-1.5,l.SoundManager.playSFX("fallingBlock",.4)):this.container.alpha<1&&(this.container.alpha+=.02):(this.yVelocity+=this.main.gravity,this.container.alpha-=.01,15<=this.yVelocity&&(l.SoundManager.playSFX("blockDestroy"),this.alive=!1,this.container.alpha=0,this.yPos=this.startY,this.yVelocity=0,this.falling=!1)),this.yPos+=this.yVelocity,this.xPos===this.prevX&&this.yPos===this.prevY||this.updatePosition()},c.prototype.reset=function(){this.yPos=this.startY,this.yVelocity=0,this.falling=!1,this.alive=!0,this.container.alpha=1,this.updatePosition(),r.prototype.reset.call(this)},c.prototype.destroy=function(){this.sprite.destroy(),this.sprite=null,this.arrowAnimation.destroy(),this.arrowAnimation=null,this.container.destroy(),this.container=null,r.prototype.destroy.call(this)},c);function c(t,e){var i=r.call(this,t,e)||this;return i.container=new Phaser.GameObjects.Container(t),e.add(i.container),i.sprite=new Phaser.GameObjects.Image(t,0,0,o.Atlases.gameplay,"fallingBlock 10000"),i.container.add(i.sprite),i.arrowAnimation=new a.JDImageAnim(t,0,0,o.Atlases.gameplay,"fallingBlockArrow "),i.container.add(i.arrowAnimation),i.container.visible=!1,i}e.FallingBlock=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.GlassBlock=void 0,i(0)),a=i(11),i=(r=i(5).Block,s(h,r),h.prototype.spawn=function(t){this.init(t.x,t.y,t.width,t.height),this.updateGraphicPosition(),this.sprite.setScale(this.width/100,this.height/100),this.sprite.visible=!0},h.prototype.updateGraphicPosition=function(){this.sprite.x=this.xPos,this.sprite.y=this.yPos},h.prototype.smash=function(){this.sprite.visible=!1,a.SoundManager.playSFX("glassSmash");for(var t=.25*this.width,e=0;e<t;e++){var i=this.xPos-this.halfWidth+Math.random()*this.width,n=this.yPos-this.halfHeight+Math.random()*this.height;this.main.particleManager.createColorParticle(i,n,5*Math.random()-2.5,this.main.player.yVelocity*Math.random(),12185594,8),this.alive=!1,10<this.main.player.yVelocity&&(this.main.player.yVelocity=10)}},h.prototype.resetLevel=function(){this.reset()},h.prototype.reset=function(){this.alive=!0,this.sprite.visible=!0,r.prototype.reset.call(this)},h.prototype.destroy=function(){this.sprite.destroy(),this.sprite=null},h);function h(t,e){var i=r.call(this,t,e)||this;return i.sprite=new Phaser.GameObjects.Image(t,0,0,o.Atlases.gameplay,"glassBlock 10000"),e.add(i.sprite),i.sprite.visible=!1,i.type="glass",i}e.GlassBlock=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.HorizontalBlock=void 0,i(5)),a=i(0),i=(r=o.Block,s(h,r),h.prototype.spawn=function(t){this.init(t.x,t.y,t.width,t.height),this.updateGraphicPosition(),this.sprite.setScale(this.width/100,this.height/100),this.moveDist=t.moveDist,this.startSpeed=t.speed,this.xVelocity=this.startSpeed},h.prototype.updateGraphicPosition=function(){this.sprite.x=this.xPos,this.sprite.y=this.yPos},h.prototype.update=function(){var t=this.xPos;0<this.xVelocity?this.xPos>this.startX+this.moveDist&&(this.xVelocity=-this.xVelocity):this.xPos<this.startX-this.moveDist&&(this.xVelocity=-this.xVelocity),this.xPos+=this.xVelocity,this.xPos!==t&&this.updatePosition(),this.landed&&(t=this.main.player.xPos-t-this.landed.x,this.landed.x+=t,this.main.player.xPos=this.xPos+this.landed.x,this.main.player.updatePositions())},h.prototype.reset=function(){r.prototype.reset.call(this),this.xPos=this.startX,this.xVelocity=this.startSpeed,this.updatePosition()},h.prototype.resetLevel=function(){this.reset()},h.prototype.destroy=function(){this.sprite.destroy(),this.sprite=null,r.prototype.destroy.call(this)},h);function h(t,e){var i=r.call(this,t,e)||this;return i.sprite=new Phaser.GameObjects.Image(t,0,0,a.Atlases.gameplay,"horizontalBlock 10000"),e.add(i.sprite),i}e.HorizontalBlock=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.IceBlock=void 0,i(5)),a=i(0),h=i(2),i=(r=o.Block,s(l,r),l.prototype.spawn=function(t){this.init(t.x,t.y,t.width,t.height),this.updateGraphicPosition(),this.startXScale=this.width/100,this.startYScale=this.height/100,this.sprite.setScale(this.startXScale,this.startYScale),this.sprite.visible=!0,this.depletionRate=5e-4,this.meltScale=1,!0===h.BalanceData.blend&&this.setCrop()},l.prototype.updateGraphicPosition=function(){this.sprite.x=this.xPos,this.sprite.y=this.yPos},l.prototype.update=function(){!0===this.alive&&!0===this.main.inCameraView(this.leftEdge,this.rightEdge,this.topEdge,this.bottomEdge)&&(this.meltScale-=this.depletionRate,this.meltScale<=0?(this.melted=!0,this.alive=!1,this.sprite.visible=!1):(!0===h.BalanceData.blend?this.setCrop():(this.sprite.scaleY=this.height/100*this.meltScale,this.sprite.y=this.yPos-this.halfHeight*(1-this.meltScale)),this.totalPolygon=this.getPolygon(this.width,this.height*this.meltScale),this.totalPolygon.setOffset(new SAT.Vector(-this.halfWidth,-this.halfHeight)),this.leftPolygon=this.getPolygon(o.Block.TOP_BOUND_WIDTH,this.height*this.meltScale),this.leftPolygon.setOffset(new SAT.Vector(-this.halfWidth,-this.halfHeight)),this.rightPolygon=this.getPolygon(o.Block.TOP_BOUND_WIDTH,this.height*this.meltScale),this.rightPolygon.setOffset(new SAT.Vector(this.halfWidth-o.Block.TOP_BOUND_WIDTH,-this.halfHeight)),this.bottomEdge=this.topEdge+this.height*this.meltScale,this.bottomPolygon.setOffset(new SAT.Vector(-this.halfWidth,this.bottomEdge))))},l.prototype.destroy=function(){this.sprite.destroy(),this.sprite=null,r.prototype.destroy.call(this)},l.prototype.resetLevel=function(){this.reset()},l.prototype.reset=function(){this.meltScale=1,!0===h.BalanceData.blend&&this.setCrop(),this.sprite.setScale(this.startXScale,this.startYScale),this.sprite.visible=!0,this.alive=!0,this.melted=!1,r.prototype.reset.call(this)},l.prototype.setCrop=function(){this.sprite.setCrop(0,0,this.sprite.width,this.sprite.height*this.meltScale)},l);function l(t,e){var i=r.call(this,t,e)||this;return i.sprite=new Phaser.GameObjects.Image(t,0,0,a.Atlases.gameplay,"iceBlock 10000"),e.add(i.sprite),i.sprite.visible=!1,i.type="ice",i}e.IceBlock=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.InvisBlockDown=void 0,i(0)),a=i(1),h=i(2),i=(r=i(46).InvisBlock,s(l,r),l.prototype.initGraphics=function(){r.prototype.initGraphics.call(this),this.arrowAnimation=new a.JDImageAnim(this.main,0,0,o.Atlases.gameplay,"invisBlockDownArrow "),this.container.add(this.arrowAnimation)},l.prototype.spawn=function(t){r.prototype.spawn.call(this,t),!0===h.BalanceData.blend&&this.arrowAnimation.playFrames(0,23,-1,.5),this.yVelocity=1},l.prototype.update=function(){this.arrowAnimation.update(),this.yVelocity<0?this.yPos<this.startY-this.maxMoveDist&&(this.yVelocity=-this.yVelocity,this.landed&&(this.main.player.yPos+=2*this.yVelocity),this.main.player.updatePositions()):this.yPos>this.startY+this.maxMoveDist&&(this.yVelocity=-this.yVelocity,this.landed&&(this.main.player.yPos+=2*this.yVelocity),this.main.player.updatePositions()),this.yPos+=this.yVelocity,r.prototype.update.call(this)},l.prototype.reset=function(){r.prototype.reset.call(this),this.yVelocity=1,this.yPos=this.startY,this.updatePosition()},l.prototype.destroy=function(){this.arrowAnimation.destroy(),this.arrowAnimation=null,r.prototype.destroy.call(this)},l);function l(){var t=null!==r&&r.apply(this,arguments)||this;return t.maxMoveDist=100,t}e.InvisBlockDown=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.InvisBlockUp=void 0,i(0)),a=i(1),h=i(2),i=(r=i(46).InvisBlock,s(l,r),l.prototype.initGraphics=function(){r.prototype.initGraphics.call(this),this.arrowAnimation=new a.JDImageAnim(this.main,0,0,o.Atlases.gameplay,"invisBlockUpArrow "),this.container.add(this.arrowAnimation)},l.prototype.spawn=function(t){r.prototype.spawn.call(this,t),!0===h.BalanceData.blend&&this.arrowAnimation.playFrames(0,23,-1,.5),this.yVelocity=-1},l.prototype.update=function(){this.arrowAnimation.update(),this.yVelocity<0?this.yPos<this.startY-this.maxMoveDist&&(this.yVelocity=-this.yVelocity,this.landed&&(this.main.player.yPos+=2*this.yVelocity),this.main.player.updatePositions()):this.yPos>this.startY+this.maxMoveDist&&(this.yVelocity=-this.yVelocity,this.landed&&(this.main.player.yPos+=2*this.yVelocity),this.main.player.updatePositions()),this.yPos+=this.yVelocity,r.prototype.update.call(this)},l.prototype.reset=function(){r.prototype.reset.call(this),this.yVelocity=-1,this.yPos=this.startY,this.updatePosition()},l.prototype.destroy=function(){this.arrowAnimation.destroy(),this.arrowAnimation=null,r.prototype.destroy.call(this)},l);function l(){var t=null!==r&&r.apply(this,arguments)||this;return t.maxMoveDist=100,t}e.InvisBlockUp=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.LockBlock=void 0,i(5)),a=i(0),i=(r=o.Block,s(h,r),h.prototype.spawn=function(t){this.init(t.x,t.y,t.width,t.height),this.updateGraphicPosition(),this.sprite.setScale(this.width/100,this.height/100)},h.prototype.unlock=function(){this.unlocked=!0,this.alive=!1,this.sprite.visible=!1},h.prototype.update=function(){},h.prototype.updateGraphicPosition=function(){this.sprite.x=this.xPos,this.sprite.y=this.yPos},h.prototype.reset=function(){},h.prototype.resetLevel=function(){this.alive=!0,this.unlocked=!1,this.sprite.visible=!0},h.prototype.destroy=function(){this.sprite.destroy(),this.sprite=null,r.prototype.destroy.call(this)},h);function h(t,e){var i=r.call(this,t,e)||this;return i.unlocked=!1,i.sprite=new Phaser.GameObjects.Image(t,0,0,a.Atlases.gameplay,"lockBlock 10000"),e.add(i.sprite),i.type="lock",i}e.LockBlock=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.Slope=void 0,i(13)),a=i(0),h=i(2),i=(r=o.Entity,s(l,r),l.prototype.destroySelf=function(){this.main.removeBlockFrom(this.main.slopes,this),r.prototype.destroySelf.call(this)},l.prototype.spawn=function(t){this.xPos=t.x,this.yPos=t.y,this.width=t.size,this.height=t.size,this.sprite.x=this.xPos,this.sprite.y=this.yPos,this.sprite.setFrame(h.BalanceData.getSlopeFrame(this.main.currLevelID)),this.sprite.scaleY=this.width/100,this.sprite.scaleX=this.sprite.scaleY*-this.side,this.alive=!0;var t=this.width/2,e=this.height/2;this.topEdge=this.yPos-e,this.bottomEdge=this.yPos+e,this.leftEdge=this.xPos-t,this.rightEdge=this.xPos+t,this.wallPoly=new SAT.Box(new SAT.Vector(this.xPos,this.yPos),10,this.height-20).toPolygon(),1===this.side?this.wallPoly.setOffset(new SAT.Vector(-t,20-e)):this.wallPoly.setOffset(new SAT.Vector(t-10,20-e)),this.bottomPoly=new SAT.Box(new SAT.Vector(this.xPos,this.yPos),this.width,10).toPolygon(),this.bottomPoly.setOffset(new SAT.Vector(-t,e-10))},l.prototype.destroy=function(){this.sprite.destroy(),this.sprite=null,r.prototype.destroy.call(this)},l);function l(t,e,i){var n=r.call(this,t)||this;return n.side=i,n.sprite=new Phaser.GameObjects.Image(t,0,0,a.Atlases.gameplay),e.add(n.sprite),n}e.Slope=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.PushBlock=void 0,i(0)),i=(r=i(34).BlockBehavior,s(a,r),a.prototype.spawn=function(t){this.init(t.x,t.y,t.width,t.height),this.updateGraphicPosition(),this.sprite.setScale(this.width/100,this.height/100),this.pushingRight=!1,this.pushingLeft=!1,this.pushed=!1,this.inWater=!1,this.onIce=!1,this.stuckLeft=!1,this.stuckRight=!1,this.land=!1},a.prototype.checkBlockCollisions=function(){this.land=!1,this.onIce=!1;for(var t=0,e=this.main.blocks;t<e.length;t++){var i=e[t];!1!==i.alive&&(!0!==SAT.testPolygonPolygon(i.topPolygon,this.bottomPolygon)?(this.yVelocity<0||0<i.yVelocity)&&SAT.testPolygonPolygon(this.topPolygon,i.bottomPolygon)?(this.yVelocity<0&&(this.yVelocity*=.5),this.yPos=i.bottomEdge+this.halfHeight):this.xVelocity-i.xVelocity<0&&SAT.testPolygonPolygon(this.leftPolygon,i.rightPolygon)?(this.xVelocity=0,this.xPos=i.rightEdge+this.halfWidth):0<this.xVelocity-i.xVelocity&&SAT.testPolygonPolygon(this.rightPolygon,i.leftPolygon)&&(this.xVelocity=0,this.xPos=i.leftEdge-this.halfWidth):("ice"===i.type&&(this.onIce=!0),this.yVelocity=i.yVelocity,this.inWater?(this.yVelocity*=-1,this.yPos=i.topEdge-this.halfHeight):0<this.yVelocity?this.yPos=i.topEdge-this.halfHeight+this.yVelocity:this.yPos=i.topEdge-this.halfHeight+1,this.land=!0,this.updatePosition(),"speed"===i.type?this.xVelocity+=.4*i.speedInc:"falling"!==i.type||(i=i).falling||(i.falling=!0,i.yVelocity=-2)))}},a.prototype.checkWaterCollisions=function(){var t=this.inWater;this.inWater=!1;for(var e=0;e<this.main.pools.length;e++){var i=this.main.pools[e];SAT.testPolygonPolygon(this.totalPolygon,i.totalPolygon)&&(this.layer.remove(this.sprite),this.main.layerUnderPool.add(this.sprite),this.yPos>i.yPos-.5*i.height&&(t||this.yVelocity,--this.yVelocity,this.yVelocity<-3&&(this.yVelocity=-3),this.inWater=!0))}},a.prototype.checkTrapped=function(){for(var t=new SAT.Vector(this.leftEdge-5,this.topEdge+10),e=new SAT.Vector(this.rightEdge+5,this.topEdge+10),i=0,n=this.main.blocks;i<n.length;i++){var r=n[i];if(!1!==r.alive){if(SAT.pointInPolygon(t,r.totalPolygon))return this.stuckLeft=!0,"left";if(SAT.pointInPolygon(e,r.totalPolygon))return this.stuckRight=!0,"right"}}return"not trapped"},a.prototype.update=function(){this.land||(this.yVelocity+=this.main.gravity),this.xPos+=this.xVelocity,this.yPos+=this.yVelocity,this.landed&&(this.main.player.xPos+=this.xVelocity,this.main.player.updatePositions()),this.onIce?this.xVelocity-=.01*this.xVelocity:this.xVelocity-=.25*this.xVelocity,this.checkBlockCollisions(),this.checkWaterCollisions(),this.updatePosition()},a.prototype.updateGraphicPosition=function(){this.sprite.x=this.xPos,this.sprite.y=this.yPos},a.prototype.reset=function(){this.layer.add(this.sprite),this.xPos=this.startX,this.yPos=this.startY,this.xVelocity=0,this.yVelocity=0,this.pushed=!1,this.pushingLeft=!1,this.pushingRight=!1,this.updatePosition(),r.prototype.reset.call(this)},a.prototype.resetLevel=function(){this.reset()},a.prototype.destroy=function(){this.sprite.destroy(),this.sprite=null,r.prototype.destroy.call(this)},a);function a(t,e){var i=r.call(this,t,e)||this;return i.sprite=new Phaser.GameObjects.Image(t,0,0,o.Atlases.gameplay,"pushBlock 10000"),e.add(i.sprite),i.type="push",i}e.PushBlock=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.SolarBlock=void 0,i(5)),a=i(0),i=(r=o.Block,s(h,r),h.prototype.spawn=function(t){this.init(t.x,t.y,t.width,t.height),this.updateGraphicPosition(),this.sprite.setScale(this.width/100,this.height/100)},h.prototype.updateGraphicPosition=function(){this.sprite.x=this.xPos,this.sprite.y=this.yPos},h.prototype.update=function(){this.xPos===this.prevX&&this.yPos===this.prevY||this.updatePosition()},h.prototype.goDark=function(){this.alive=!1,this.sprite.visible=!1},h.prototype.goLight=function(){this.alive=!0,this.sprite.visible=!0},h.prototype.reset=function(){},h.prototype.destroy=function(){this.sprite.destroy(),this.sprite=null,r.prototype.destroy.call(this)},h);function h(t,e){var i=r.call(this,t,e)||this;return i.sprite=new Phaser.GameObjects.Image(t,0,0,a.Atlases.gameplay,"solarBlock 10000"),e.add(i.sprite),i}e.SolarBlock=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.SparkBlock=void 0,i(5)),a=i(0),h=i(20),i=(r=o.Block,s(l,r),l.prototype.spawn=function(t){this.init(t.x,t.y,t.width,t.height),this.updateGraphicPosition(),this.sprite.setScale(t.width/100,t.height/100),this.spark.spawn()},l.prototype.updateGraphicPosition=function(){this.sprite.x=this.xPos,this.sprite.y=this.yPos},l.prototype.update=function(){this.xPos===this.prevX&&this.yPos===this.prevY||this.updatePosition()},l.prototype.destroy=function(){this.sprite.destroy(),this.sprite=null,this.spark=null,r.prototype.destroy.call(this)},l);function l(t,e){var i=r.call(this,t,e)||this;return i.sprite=new Phaser.GameObjects.Image(t,0,0,a.Atlases.gameplay,"sparkBlock 10000"),e.add(i.sprite),i.spark=new h.Spark(t,e,i),i.main.obstacles.push(i.spark),i}e.SparkBlock=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.SpeedBlock=void 0,i(5)),a=i(0),h=i(1),l=i(2),i=(r=o.Block,s(c,r),c.prototype.spawn=function(t){this.init(t.x,t.y,t.width,t.height),this.updateGraphicPosition(),this.container.setScale(this.width/100,this.height/100),!0===l.BalanceData.blend&&this.arrowAnimation.playFrames(0,23,-1,.5)},c.prototype.updateGraphicPosition=function(){this.container.x=this.xPos,this.container.y=this.yPos},c.prototype.update=function(){this.arrowAnimation.update(),this.landed&&this.land(),this.xPos===this.prevX&&this.yPos===this.prevY||this.updatePosition()},c.prototype.land=function(){(0<this.speedInc&&this.main.player.xVelocity<this.maxSpeed||this.speedInc<0&&this.main.player.xVelocity>this.maxSpeed)&&(this.main.player.xVelocity+=this.speedInc,this.main.player.xVelocity===this.speedInc&&(this.main.player.xVelocity+=this.addSpeed))},c.prototype.destroy=function(){this.sprite.destroy(),this.sprite=null,this.container.destroy(),this.container=null,this.arrowAnimation=null,r.prototype.destroy.call(this)},c);function c(t,e,i){var n=r.call(this,t,e)||this;return n.container=new Phaser.GameObjects.Container(t),e.add(n.container),n.speedInc=1.6*i,n.maxSpeed=5*n.speedInc,n.addSpeed=.75*n.speedInc,n.sprite=new Phaser.GameObjects.Image(t,0,0,a.Atlases.gameplay,"speedBlock 10000"),n.container.add(n.sprite),n.arrowAnimation=new h.JDImageAnim(t,0,0,a.Atlases.gameplay,"speedBlockArrow "),n.container.add(n.arrowAnimation),0<n.speedInc?(n.sprite.scaleX=1,n.arrowAnimation.scaleX=1):(n.sprite.scaleX=-1,n.arrowAnimation.scaleX=-1),n.type="speed",n}e.SpeedBlock=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.SwimmingPool=void 0,i(13)),a=i(0),i=(r=o.Entity,s(h,r),h.prototype.destroySelf=function(){this.main.removeBlockFrom(this.main.pools,this),r.prototype.destroySelf.call(this)},h.prototype.spawn=function(t){this.xPos=t.x,this.yPos=t.y,this.width=t.width,this.height=t.height,this.updateGraphicPosition(),this.sprite.setScale(this.width/100,this.height/100),this.changeSpriteFrame(0),this.electric=!1,this.totalPolygon=new SAT.Box(new SAT.Vector(this.xPos-this.width/2,this.yPos-this.height/2),this.width,this.height).toPolygon(),this.topPolygon=new SAT.Box(new SAT.Vector(this.xPos-this.width/2,this.yPos-this.height/2),this.width,12).toPolygon()},h.prototype.updateGraphicPosition=function(){this.sprite.x=this.xPos,this.sprite.y=this.yPos},h.prototype.changeSpriteFrame=function(t){this.sprite.setFrame("swimmingPool 1000"+t)},h.prototype.setElectric=function(t){this.electric!==t&&(!0===t?this.changeSpriteFrame(1):this.changeSpriteFrame(0),this.electric=t)},h.prototype.destroy=function(){this.sprite.destroy(),this.sprite=null,this.totalPolygon=null,this.topPolygon=null,r.prototype.destroy.call(this)},h);function h(t,e){var i=r.call(this,t)||this;return i.sprite=new Phaser.GameObjects.Image(t,0,0,a.Atlases.gameplay,"swimmingPool 10000"),e.add(i.sprite),i}e.SwimmingPool=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.VerticalBlock=void 0,i(5)),a=i(0),i=(r=o.Block,s(h,r),h.prototype.spawn=function(t){this.init(t.x,t.y,t.width,t.height),this.updateGraphicPosition(),this.sprite.setScale(this.width/100,this.height/100),this.moveDist=t.moveDist,this.startSpeed=t.speed,this.yVelocity=this.startSpeed,0<t.speed?this.sprite.setFrame("verticalDownBlock 10000"):this.sprite.setFrame("verticalUpBlock 10000")},h.prototype.reset=function(){r.prototype.reset.call(this),this.yPos=this.startY,this.yVelocity=this.startSpeed,this.updatePosition()},h.prototype.resetLevel=function(){this.reset()},h.prototype.updateGraphicPosition=function(){this.sprite.x=this.xPos,this.sprite.y=this.yPos},h.prototype.update=function(){this.yVelocity<0?this.yPos<this.startY-this.moveDist&&(this.yVelocity=-this.yVelocity,this.landed&&(this.main.player.yPos+=2*this.yVelocity,this.main.player.updatePositions())):this.yPos>this.startY+this.moveDist&&(this.yVelocity=-this.yVelocity,this.landed&&(this.main.player.yPos+=2*this.yVelocity,this.main.player.updatePositions())),this.yPos+=this.yVelocity,this.updatePosition()},h.prototype.destroy=function(){this.sprite.destroy(),this.sprite=null,r.prototype.destroy.call(this)},h);function h(t,e){var i=r.call(this,t,e)||this;return i.sprite=new Phaser.GameObjects.Image(t,0,0,a.Atlases.gameplay,"verticalUpBlock 10000"),e.add(i.sprite),i}e.VerticalBlock=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.SkinsBlock=void 0,i(5)),a=i(0),h=i(1),i=(r=o.Block,s(l,r),l.prototype.toggleTickBox=function(){},l.prototype.spawn=function(t){this.init(t.x,t.y,120,10),this.sprite.visible=!0,this.sprite.x=this.xPos,this.sprite.y=this.yPos-5,this.txt.x=this.xPos,this.txt.y=this.sprite.y+7},l.prototype.destroy=function(){this.sprite.destroy(),this.sprite=null,this.txt.destroy(),this.txt=null,r.prototype.destroy.call(this)},l);function l(t,e,i){void 0===i&&(i=0);e=r.call(this,t,e)||this;return e.id=i,e.sprite=new Phaser.GameObjects.Image(t,0,0,a.Atlases.gameplay,"charactersBlock 10000"),e.sprite.setOrigin(.5,1),e.layer.add(e.sprite),e.txt=new h.JDBmpdTextTranslated(t,0,0,a.Fonts.Main,"actSkin",28),e.txt.setOrigin(.5,0),e.layer.add(e.txt),e.type="skins",e.hangable=!1,e.scalable=!1,e}e.SkinsBlock=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.VexTNT=void 0,i(0)),a=i(11),i=(r=i(5).Block,s(h,r),h.prototype.spawn=function(t){this.init(t.x,t.y,t.width,t.height),this.used=!1,this.updateGraphicPosition(),this.container.setScale(this.width/100,this.height/100),this.container.visible=!0,this.explodingOverlay.visible=!0,this.explodingOverlay.alpha=0},h.prototype.updateGraphicPosition=function(){this.container.x=this.xPos,this.container.y=this.yPos},h.prototype.update=function(){!1!==this.alive&&(!0===this.exploding&&(this.container.scaleX-=.1*(this.container.scaleX-1.5),this.container.scaleY=this.container.scaleX,this.explodingOverlay.alpha+=.05,1<=this.explodingOverlay.alpha&&(this.exploding=!1,this.alive=!1,this.used=!0,a.SoundManager.playSFX("explosion"),this.main.effectsOverlay.explode())),this.xPos===this.prevX&&this.yPos===this.prevY||this.updatePosition())},h.prototype.resetLevel=function(){this.used=!1,this.alive=!0,this.exploding=!1,this.explodingOverlay.alpha=0,this.container.setScale(1,1),this.container.visible=!0},h.prototype.reset=function(){},h.prototype.destroy=function(){this.sprite.destroy(),this.sprite=null,this.explodingOverlay.destroy(),this.explodingOverlay=null,this.container.destroy(),this.container=null,r.prototype.destroy.call(this)},h);function h(t,e){var i=r.call(this,t,e)||this;return i.container=new Phaser.GameObjects.Container(t),e.add(i.container),i.container.visible=!1,i.sprite=new Phaser.GameObjects.Image(t,0,0,o.Atlases.gameplay,"bigTNT 10000"),i.container.add(i.sprite),i.explodingOverlay=new Phaser.GameObjects.Image(t,0,0,o.Atlases.gameplay,"whiteBlock 10000"),i.container.add(i.explodingOverlay),i.used=!1,i.type="explosive",i}e.VexTNT=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.PulseBlock=void 0,i(0)),a=i(3),h=i(5),l=i(34),i=(r=h.Block,s(c,r),c.prototype.spawn=function(t){this.init(t.x,t.y,100,100),this.horizontal.pos.x=this.xPos,this.horizontal.pos.y=this.yPos,this.vertical.pos.x=this.xPos,this.vertical.pos.y=this.yPos,this.pulseTime=t.time,this.currID=t.currID,this.reset(),this.updateGraphicPosition(),this.sprite.visible=!0},c.prototype.enablePulsing=function(t,e){void 0===e&&(e=this.pulseTime),this.canPulse=t,this.pulseCount=e,!0===this.canPulse?this.sprite.setFrame("pulseBlock 10001"):this.sprite.setFrame("pulseBlock 10000")},c.prototype.update=function(){if(!0===this.canPulse&&(this.pulseCount+=1,this.pulseCount>=this.pulseTime)){for(var t=this.pulseCount=0,e=this.main.blocks;t<e.length;t++){var i=e[t];i instanceof l.BlockBehavior&&this.checkCollision(i,a.BalanceData.config_PulseBlockPushOther)}this.checkCollision(this.main.player,a.BalanceData.config_PulseBlockPushPlayer)}},c.prototype.checkCollision=function(t,e){!0===SAT.testPolygonPolygon(this.horizontal,t.totalPolygon)?t.applyForce(this.xPos<t.xPos?e:-e,0):!0===SAT.testPolygonPolygon(this.vertical,t.totalPolygon)&&t.applyForce(0,this.yPos<t.yPos?e:-e)},c.prototype.updateGraphicPosition=function(){this.sprite.x=this.xPos,this.sprite.y=this.yPos},c.prototype.destroy=function(){this.sprite.destroy(),this.sprite=null,r.prototype.destroy.call(this)},c.prototype.reset=function(){r.prototype.reset.call(this),-1===this.currID?this.enablePulsing(!0,0):this.enablePulsing(!1),this.pulseCount=0},c.prototype.resetLevel=function(){this.reset()},c);function c(t,e){e=r.call(this,t,e)||this,e.sprite=new Phaser.GameObjects.Image(t,0,0,o.Atlases.gameplay,"pulseBlock 10000"),e.layer.add(e.sprite),e.sprite.visible=!1,t=a.BalanceData.config_PulseBlockDistanceEmit;return e.horizontal=new SAT.Polygon(new SAT.Vector(0,0),[new SAT.Vector(-t,-50),new SAT.Vector(t,-50),new SAT.Vector(t,50),new SAT.Vector(-t,50)]),e.vertical=new SAT.Polygon(new SAT.Vector(0,0),[new SAT.Vector(-50,-t),new SAT.Vector(50,-t),new SAT.Vector(50,t),new SAT.Vector(-50,t)]),e}e.PulseBlock=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.HoverPlatform=void 0,i(34)),a=i(0),i=(r=o.BlockBehavior,s(h,r),h.prototype.landOn=function(t){this.landed=t,this.landed?!1===this.isActive&&this.activate():!0===this.isActive&&this.deactivate()},h.prototype.spawn=function(t){this.init(t.x,t.y,t.width,t.height),this.deactivate(),this.updateGraphicPosition(),this.sprite.setScale(this.width/60,this.height/10),this.sprite.visible=!0},h.prototype.applyForce=function(t,e){this.landed&&r.prototype.applyForce.call(this,t,e)},h.prototype.update=function(){var t=this.xPos;r.prototype.update.call(this),this.landed&&(t=this.main.player.xPos-t-this.landed.x,this.landed.x+=t,this.main.player.xPos=this.xPos+this.landed.x,this.main.player.yPos=this.yPos-4,this.main.player.updatePositions())},h.prototype.updateGraphicPosition=function(){this.sprite.x=this.xPos,this.sprite.y=this.yPos},h.prototype.destroy=function(){this.sprite.destroy(),this.sprite=null,r.prototype.destroy.call(this)},h.prototype.reset=function(){r.prototype.reset.call(this),this.xVelocity=0,this.yVelocity=0,this.xPos=this.startX,this.yPos=this.startY,this.deactivate(),this.updatePosition()},h.prototype.resetLevel=function(){this.reset()},h.prototype.activate=function(){this.isActive=!0,this.sprite.setFrame("hoverPlatform 10001")},h.prototype.deactivate=function(){this.isActive=!1,this.sprite.setFrame("hoverPlatform 10000")},h);function h(t,e){e=r.call(this,t,e)||this;return e.sprite=new Phaser.GameObjects.Image(t,0,0,a.Atlases.gameplay,"hoverPlatform 10000"),e.layer.add(e.sprite),e.sprite.visible=!1,e.hangable=!1,e.scalable=!1,e.type="hoverPlatform",e}e.HoverPlatform=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.ActTower=void 0,i(5)),a=i(0),i=(r=o.Block,s(h,r),h.prototype.spawn=function(t){this.init(t.x,t.y,140,140),this.updateGraphicPosition(),this.container.visible=!0},h.prototype.updateGraphicPosition=function(){this.container.x=this.xPos,this.container.y=this.yPos},h.prototype.destroy=function(){this.sprite=null,this.container.destroy(),this.container=null,r.prototype.destroy.call(this)},h);function h(t,e){var i=r.call(this,t,e)||this;return i.container=new Phaser.GameObjects.Container(t),e.add(i.container),i.sprite=new Phaser.GameObjects.Image(t,0,1,a.Atlases.gameplay,"actBlockTower 10000"),i.sprite.scale=1.01,i.container.add(i.sprite),i.type="dailyStage",i}e.ActTower=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.SubHub=void 0,i(31)),a=i(3),h=i(7),l=i(25),i=(r=o.BasicSubGamePlay,s(c,r),c.prototype.init=function(){r.prototype.init.call(this),this.level=new l.PLevel(this.scene,this.scene.currentLevel.getName()),this.add(this.level),this.time=new l.PTimeHub(this.scene),this.add(this.time)},c.prototype.updateDeaths=function(t){this.level.setDeath(t)},c.prototype.updateTime=function(){this.time.updateTime(h.Helpers.timeDecoratorHub(Date.now()-a.BalanceData.levelMapStartTime))},c.prototype.updateMoney=function(t){this.time.updateCoins()},c.prototype.resize=function(){r.prototype.resize.call(this),this.level.resize(),this.time.resize()},c.prototype.destroy=function(){r.prototype.destroy.call(this),this.level=null,this.time=null},c);function c(){return null!==r&&r.apply(this,arguments)||this}e.SubHub=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.SubAct=void 0,i(31)),a=i(2),h=i(7),l=i(21),c=i(25),i=(r=o.BasicSubGamePlay,s(u,r),u.prototype.init=function(){r.prototype.init.call(this);var t=this.scene.currentLevel.getName();!0===this.scene.isCurrLevelHard&&(t+=" "+this.scene.currentLevel.getNameHard()),this.level=new c.PLevel(this.scene,t),this.add(this.level),this.time=new c.PTimeAct(this.scene),this.add(this.time)},u.prototype.enterLevel=function(t){this.resetLevel(),!0===t?this.time.updateTime(h.Helpers.timeDecorator(Date.now()-a.BalanceData.actStartTime)):this.time.updateTime("00:00:00"),this.updateDeaths(0),this.scene.panelManager.show(l.PanelList.PanelLevelObjectives)},u.prototype.updateDeaths=function(t){this.level.setDeath(t)},u.prototype.updateTime=function(){var t=Date.now()-a.BalanceData.actStartTime;this.time.updateTime(h.Helpers.timeDecorator(t))},u.prototype.updateMoney=function(t){this.time.setCoins(t)},u.prototype.getTime=function(){return this.time.getTime()},u.prototype.resize=function(){r.prototype.resize.call(this),this.level.resize(),this.time.resize()},u.prototype.destroy=function(){r.prototype.destroy.call(this),this.level=null,this.time=null},u);function u(){return null!==r&&r.apply(this,arguments)||this}e.SubAct=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.SubTower=void 0,i(31)),a=i(2),h=i(7),l=i(25),c=i(9),i=(r=o.BasicSubGamePlay,s(u,r),u.prototype.init=function(){r.prototype.init.call(this),this.level=new l.PLevelTower(this.scene,"Tower"),this.add(this.level),this.time=new l.PTimeTower(this.scene),this.add(this.time)},u.prototype.enterLevel=function(t){this.resetLevel(),!0===t?this.time.updateTime(h.Helpers.timeDecorator(Date.now()-a.BalanceData.actStartTime)):this.time.updateTime("00:00:00"),this.updateDeaths(0),c.AzerionSDK.analyticsSendEvent("play_tower_of_terror")},u.prototype.updateTime=function(){var t=Date.now()-a.BalanceData.actStartTime;this.time.updateTime(h.Helpers.timeDecorator(t))},u.prototype.updateMoney=function(t){this.time.setCoins(t)},u.prototype.getTime=function(){return this.time.getTime()},u.prototype.resize=function(){r.prototype.resize.call(this),this.level.resize(),this.time.resize()},u.prototype.destroy=function(){r.prototype.destroy.call(this),this.level=null,this.time=null},u);function u(){return null!==r&&r.apply(this,arguments)||this}e.SubTower=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.SubVex=void 0,i(31)),a=i(0),h=i(2),l=i(7),c=i(21),u=i(25),i=(r=o.BasicSubGamePlay,s(d,r),d.prototype.init=function(){r.prototype.init.call(this),this.level=new u.PLevel(this.scene,this.scene.currentLevel.getName()),this.add(this.level),this.time=new u.PTimeAct(this.scene),this.add(this.time),this.tnt=new u.PTNT(this.scene),this.add(this.tnt)},d.prototype.enterLevel=function(t){this.resetLevel(),!0===t?this.time.updateTime(l.Helpers.timeDecorator(Date.now()-h.BalanceData.actStartTime)):this.time.updateTime("00:00:00"),this.updateDeaths(0),this.scene.panelManager.show(c.PanelList.PanelLevelObjectives)},d.prototype.updateDeaths=function(t){this.level.setDeath(t)},d.prototype.updateTime=function(){var t=Date.now()-h.BalanceData.actStartTime;this.time.updateTime(l.Helpers.timeDecorator(t))},d.prototype.updateMoney=function(t){this.time.setCoins(t)},d.prototype.getTime=function(){return this.time.getTime()},d.prototype.updateProgressTnt=function(t){this.tnt.setTnt(t)},d.prototype.resize=function(){r.prototype.resize.call(this),this.level.x=-a.Constants.UI_SHIFT_X,this.level.y=-a.Constants.UI_SHIFT_Y,this.time.x=a.Constants.GW+a.Constants.UI_SHIFT_X,this.time.y=-a.Constants.UI_SHIFT_Y,this.tnt.y=this.time.y},d.prototype.destroy=function(){r.prototype.destroy.call(this),this.level=null,this.time=null,this.tnt=null},d);function d(){return null!==r&&r.apply(this,arguments)||this}e.SubVex=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.SubSkinsRarity=void 0,i(47)),a=i(0),h=i(69),i=(r=o.BasicSubSkins,s(l,r),l.prototype.init=function(){r.prototype.init.call(this),this.raritys=new Array(5);var t=a.Constants.GHH+20;this.raritys[0]=new h.SkinRarity(this,0,a.Constants.GHW-760,t,"btn_yellow 10000",16777215),this.raritys[1]=new h.SkinRarity(this,1,a.Constants.GHW-380,t,"btn_yellow 10000",65280),this.raritys[2]=new h.SkinRarity(this,2,a.Constants.GHW,t,"btn_yellow 10000",7996071),this.raritys[3]=new h.SkinRarity(this,3,a.Constants.GHW+380,t,"btn_yellow 10000",16707329),this.raritys[4]=new h.SkinRarity(this,4,a.Constants.GHW+760,t,"btn_yellow 10000",16711680),this.moveSpineContainerTop()},l.prototype.destroy=function(){for(var t=0;t<this.raritys.length;t++)this.raritys[t].destroy();this.raritys=null,r.prototype.destroy.call(this)},l);function l(){return null!==r&&r.apply(this,arguments)||this}e.SubSkinsRarity=i},function(t,e,i){"use strict";var n,c,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),u=(Object.defineProperty(e,"__esModule",{value:!0}),e.SkinRarity=void 0,i(0)),d=i(19),p=i(6),f=i(1),g=i(10),m=i(3),y=i(24),i=(c=i(48).BasicSkinRarity,r(s,c),s.prototype.spin=function(t){this.subscene.scene.showSubScene(d.SubSceneList.SkinsSelect,{id:this.rarity,spinFrame:this.spinFrame,tittleColor:this.titleColor,spin:t})},s.prototype.destroy=function(){this.subscene.scene.tweens.killTweensOf(this.btnSpin),c.prototype.destroy.call(this),this.btnSpin=null,this.txtEquipped=null},s);function s(t,e,i,n,r,s){var o,a,h=c.call(this,t,e)||this,t=(h.spinFrame=r,h.titleColor=s,y.SkinsData.skinRareIDs[e]),l=y.SkinsData.getSkinIndex(e,m.BalanceData.currSkin),t=(0<=l&&(t=m.BalanceData.currSkin),h.create(i,n,n+10,600,t,"skinRarity"+e,s),0<=l&&(h.imgSkin.play("run",!0),h.txtEquipped=new f.JDBmpdTextTranslated(h.subscene.scene,i,n-200,u.Fonts.Main,"equipped",30,9823743),h.txtEquipped.setFitSize(280),h.subscene.add(h.txtEquipped)),(t=new p.ButtonScale(h.subscene.scene,i,n+180)).addImageEvents(u.Atlases.ui,"btn_yellow 10000",0,3),t.addTxtTranslated("chooseSkin",u.Fonts.Main,34,4737096),t.txtTranslated.setFitSize(200,g.JDTextFitParam.both,60),t.onUp=function(){return h.subscene.scene.showSubScene(d.SubSceneList.SkinsSelect,{id:e,spinFrame:r,titleColor:s})},h.subscene.add(t.getView()),null),l=y.SkinsData.getRaritySkinsAmount(e);return 1!=y.SkinsData.getSkinOpened(e)/l&&(h.btnSpin=new p.ButtonScale(h.subscene.scene,i,n+380),h.btnSpin.addImageEvents(u.Atlases.ui,r,0,3),h.btnSpin.addTxtTranslated("spin",u.Fonts.Main,34,4737096),h.btnSpin.txtTranslated.setFitSize(200),h.subscene.add(h.btnSpin.getView()),t=h.btnSpin.y+70,!1===y.SkinsData.hasSpinTokens(e)?(!1===y.SkinsData.enouthMoney(e)&&(h.btnSpin.alpha=.5,h.btnSpin.image.input.enabled=!1),(o=new Phaser.GameObjects.Image(h.subscene.scene,0,t,u.Atlases.ui,!1===y.SkinsData.isTowerRarity(e)?"coin 10000":"coinTower 10000")).scale=.9,h.subscene.add(o),a=new f.JDBmpdText(h.subscene.scene,0,o.y,u.Fonts.Main,""+y.SkinsData.getPrice(e),40,4737096,0),h.subscene.add(a),h.btnSpin.onUp=function(){return h.spin(!0)}):(o=new Phaser.GameObjects.Image(h.subscene.scene,0,t,u.Atlases.ui,"star 1000"+e),h.subscene.add(o),a=new f.JDBmpdText(h.subscene.scene,0,o.y,u.Fonts.Main,""+y.SkinsData.getSpinTokensAmount(e),40,4737096,0),h.subscene.add(a),h.btnSpin.onUp=function(){return h.spin(!1)}),!0===h.btnSpin.image.input.enabled&&h.subscene.scene.add.tween({targets:h.btnSpin,duration:400,scale:1.05,loop:-1,yoyo:!0}),o.x=i-a.width/2-15,a.x=o.x+40),!0===y.SkinsData.canShowIRarity(h.rarity)&&(o=new Phaser.GameObjects.Image(h.subscene.scene,i+150,n-288,u.Atlases.ui,"icon_alert 10000"),h.subscene.add(o)),a=new f.JDBmpdText(h.subscene.scene,i,n+250,u.Fonts.Main,y.SkinsData.getSkinOpened(e)+"/"+l,40),h.subscene.add(a),a=o=null,h}e.SkinRarity=i},function(t,e,i){"use strict";var n,l,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),c=(Object.defineProperty(e,"__esModule",{value:!0}),e.SkinRaritySpin=void 0,i(0)),u=i(6),d=i(1),p=i(24),i=(l=i(48).BasicSkinRarity,r(s,l),s.prototype.updateProgress=function(){var t=p.SkinsData.getRaritySkinsAmount(this.rarity),e=p.SkinsData.getSkinOpened(this.rarity);this.progressMaskSc=e/t},s.prototype.checkSpinAgain=function(){this.updateProgress(),1===this.progressMaskSc||!0===this.isSpinByMoney&&!0!==p.SkinsData.enouthMoney(this.rarity)||(this.enableBtnSpin(!0,1),this.subscene.scene.add.tween({targets:this.btnSpin,duration:400,scale:1.05,loop:-1,yoyo:!0}))},s.prototype.spin=function(t){this.subscene.startChoosing(this.isSpinByMoney),this.updateSpinValues()},s.prototype.updateSpinValues=function(){this.enableBtnSpin(!1,.5),!1===this.isSpinByMoney&&(!1===p.SkinsData.hasSpinTokens(this.rarity)?(this.isSpinByMoney=!0,this.btnSpin.icon.setFrame("coinSmall 10000"),this.btnSpin.icon.y=0,this.btnSpin.txt.text=""+p.SkinsData.getPrice(this.rarity)):this.btnSpin.txt.text=""+p.SkinsData.getSpinTokensAmount(this.rarity))},s.prototype.select=function(t){this.setImgSkin(t)},s.prototype.enableBtnSpin=function(t,e){this.btnSpin&&(this.subscene.scene.tweens.killTweensOf(this.btnSpin),this.btnSpin.alpha=e,this.btnSpin.image.input.enabled=t,this.btnSpin.scale=1,this.btnSpin.image.tint=this.btnSpin.tintOut,!0===t&&!0===this.btnSpin.image.getBounds().contains(this.subscene.scene.input.activePointer.x,this.subscene.scene.input.activePointer.y)&&(this.btnSpin.image.tint=this.btnSpin.tintOver))},s.prototype.destroy=function(){this.subscene.scene.tweens.killTweensOf(this.btnSpin),l.prototype.destroy.call(this),this.btnSpin=null},s);function s(t,e,i,n,r,s,o){var a,h=l.call(this,t,e)||this,t=p.SkinsData.getRaritySkinsAmount(e);return h.progressMaskSc=p.SkinsData.getSkinOpened(e)/t,1!==h.progressMaskSc?(h.create(n,r,r,600,i,"skinRarity"+e,o),h.btnSpin=new u.ButtonScale(h.subscene.scene,n,r+185),h.btnSpin.addImageEvents(c.Atlases.ui,s,0,3),h.btnSpin.addTxtTranslated("spin",c.Fonts.Main,34,4737096),h.btnSpin.txtTranslated.setFitSize(200),t=void 0,s=h.btnSpin.y+70,!1===p.SkinsData.hasSpinTokens(e)?(!1===p.SkinsData.enouthMoney(e)&&h.enableBtnSpin(!1,.5),(a=new Phaser.GameObjects.Image(h.subscene.scene,0,s,c.Atlases.ui,!1===p.SkinsData.isTowerRarity(e)?"coin 10000":"coinTower 10000")).scale=.9,h.subscene.add(a),t=new d.JDBmpdText(h.subscene.scene,0,a.y,c.Fonts.Main,""+p.SkinsData.getPrice(e),40,16777215,0),h.subscene.add(t),h.btnSpin.onUp=function(){return h.spin(!0)},h.isSpinByMoney=!0):(a=new Phaser.GameObjects.Image(h.subscene.scene,0,s,c.Atlases.ui,"star 1000"+e),h.subscene.add(a),t=new d.JDBmpdText(h.subscene.scene,0,a.y,c.Fonts.Main,""+p.SkinsData.getSpinTokensAmount(e),40,16777215,0),h.subscene.add(t),h.btnSpin.onUp=function(){return h.spin(!1)},h.isSpinByMoney=!1),h.subscene.add(h.btnSpin.getView()),a.x=n-t.width/2-15,t.x=a.x+40):h.create(n,r-45,r,550,i,"skinRarity"+e,o),a=null,h}e.SkinRaritySpin=i},function(t,e,i){"use strict";var n,a,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),h=(Object.defineProperty(e,"__esModule",{value:!0}),e.SkinRarityEquip=void 0,i(0)),l=i(6),c=i(2),i=(a=i(48).BasicSkinRarity,r(s,a),s.prototype.select=function(t){this.setActivityBtn(!0,1),this.setImgSkin(t)},s.prototype.setActivityBtn=function(t,e){this.imgSkin.visible=t,this.btnEquip.image.input.enabled=t,this.btnEquip.alpha=e},s.prototype.destroy=function(){a.prototype.destroy.call(this),this.btnEquip=null},s);function s(t,e,i,n,r,s){var o=a.call(this,t,0)||this;return o.create(i,n,n,600,c.BalanceData.currSkin,"preview",s),o.imgSkin.x-=5,o.imgSkin.play("run",!0),o.btnEquip=new l.ButtonScale(o.subscene.scene,i,n+225),o.btnEquip.addImageEvents(h.Atlases.ui,"btn_green 10000",0,3),o.btnEquip.addTxtTranslated("equip",h.Fonts.Main,34,4737096),o.btnEquip.txtTranslated.setFitSize(200),o.btnEquip.onUp=function(){return t.equip()},o.subscene.add(o.btnEquip.getView()),-1===e&&o.setActivityBtn(!1,.5),o}e.SkinRarityEquip=i},function(t,e,i){"use strict";var n,a,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),h=(Object.defineProperty(e,"__esModule",{value:!0}),e.SkinSlot=void 0,i(0)),l=i(1),c=i(7),i=(a=Phaser.GameObjects.Container,r(s,a),s.prototype.addInteraction=function(){this.imgBg.setInteractive(new Phaser.Geom.Circle(68,68,68),Phaser.Geom.Circle.Contains),this.imgBg.input.cursor="pointer",this.imgBg.on(Phaser.Input.Events.POINTER_DOWN,this.onDown,this)},s.prototype.addImgCauntion=function(){this.imgCaution||(this.imgCaution=new Phaser.GameObjects.Image(this.subscene.scene,60,-55,h.Atlases.ui,"icon_alert 10000"),this.imgCaution.scale=.8,this.add(this.imgCaution))},s.prototype.onDown=function(){this.subscene.select(this.id)},s.prototype.open=function(){this.status=1,this.imgBg.alpha=1,this.imgSkin.visible=!0,this.imgLock.visible=!1,this.addImgCauntion(),this.addInteraction()},s.prototype.equiped=function(){this.imgCaution&&(this.imgCaution.visible=!1)},s.prototype.destroy=function(){a.prototype.destroy.call(this),this.subscene=null,this.imgBg=null,this.imgCaution=null,this.imgSkin=null,this.imgLock=null},s);function s(t,e,i,n,r,s){var o=a.call(this,t.scene,r,s)||this;return o.subscene=t,o.id=e,o.status=n,o.imgBg=new Phaser.GameObjects.Image(t.scene,0,0,h.Atlases.ui,"box_round 10000"),o.add(o.imgBg),o.imgSkin=new l.JDSpineGameObject(t.scene,r,s,"player","stand"),o.imgSkin.scaleX=o.imgSkin.scaleY=2.8,o.imgSkin.setSkin(c.Helpers.formatNumberZeroLess10(i)),t.spineContainer.add(o.imgSkin.getView()),o.imgSkin.y+=o.imgSkin.getView().displayHeight/3,0===n?(o.imgLock=new Phaser.GameObjects.Image(t.scene,0,0,h.Atlases.ui,"iconLock 10000"),o.imgBg.alpha=o.imgLock.alpha=.4,o.add(o.imgLock),o.imgSkin.visible=!1):o.addInteraction(),1===n&&o.addImgCauntion(),o}e.SkinSlot=i},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),s=(Object.defineProperty(e,"__esModule",{value:!0}),e.Star=e.EffectStars=void 0,i(0)),o=i(4);function a(t){this.stars=new Array(10);for(var e=0;e<this.stars.length;e++)this.stars[e]=new l(t)}a.prototype.show=function(t,e){for(var i=0;i<this.stars.length;i++)this.stars[i].show(t,e,o.Tools.PI2*Math.random())},a.prototype.update=function(){for(var t=0,e=this.stars;t<e.length;t++)e[t].update()},a.prototype.destroy=function(){this.stars=null},e.EffectStars=a;h=Phaser.GameObjects.Image,r(c,h),c.prototype.show=function(t,e,i){this.visible=!0,this.alpha=1;var n=Math.cos(i),i=Math.sin(i);this.x=t+40*n,this.y=e+40*i,this.velX=5*n,this.velY=5*i,this.velR=.2*Math.random()-.1,this.scale=.6+.4*Math.random()},c.prototype.update=function(){!1!==this.visible&&(this.x+=this.velX,this.y+=this.velY,this.rotation+=this.velR,this.alpha-=this.velA,this.alpha<=.3&&(this.visible=!1))};var h,l=c;function c(t){var e=h.call(this,t.scene,0,0,s.Atlases.ui,"star 10000")||this;return e.velA=.02,t.add(e),e.visible=!1,e}e.Star=l},function(t,e,i){"use strict";var n,l,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),s=(Object.defineProperty(e,"__esModule",{value:!0}),e.SubSkinsSelect=void 0,i(47)),c=i(0),o=i(19),u=i(1),a=i(4),d=i(3),h=i(18),p=i(2),f=i(24),g=i(11),m=i(69),i=(l=s.BasicSubSkins,r(y,l),y.prototype.init=function(t){l.prototype.init.call(this),this.currRarity=t.id,this.currSelected=f.SkinsData.getSkinIndex(this.currRarity,p.BalanceData.currSkin);var e=c.Constants.GHH+100,i=(this.panSpin=new m.SkinRaritySpin(this,this.currRarity,p.BalanceData.currSkin,c.Constants.GHW-760,e,t.spinFrame,t.titleColor),this.panEquip=new m.SkinRarityEquip(this,this.currSelected,c.Constants.GHW+760,e,"btnGreen 10000",t.titleColor),e-=30,new Phaser.GameObjects.Image(this.scene,c.Constants.GHW,e,d.TexturesEdit.getPanelBgTexture(this.scene,1100,780)));this.add(i),(i=new Phaser.GameObjects.Image(this.scene,i.x,i.y-348,c.Atlases.gameplay,"whiteBlock 10000")).displayWidth=1086,i.displayHeight=70,i.setTint(4950515,180474,4950515,180474),this.add(i),this.txtProgress=new u.JDBmpdText(this.scene,i.x,i.y,c.Fonts.Main,"",40),this.add(this.txtProgress),this.stars=new m.EffectStars(this),this.imgSelected=new Phaser.GameObjects.Image(this.scene,0,0,c.Atlases.ui,"skinSelecte 10000"),this.add(this.imgSelected),this.slots=new Array;for(var n=c.Constants.GHW-430,r=n,s=e-215,o=0;o<f.SkinsData.skinIDs[this.currRarity].length;o++){var a=f.SkinsData.getSlotStatus(this.currRarity,o),h=new m.SkinSlot(this,o,f.SkinsData.skinIDs[this.currRarity][o],a,r,s);this.add(h),this.slots.push(h),r+=170,(o+1)%6==0&&(r=n,s+=170)}i=h=null,this.updateProgress(),-1===this.currSelected?this.imgSelected.visible=!1:this.select(this.currSelected,!1),void 0!==t.spin?(this.startChoosing(t.spin),this.panSpin.updateSpinValues()):this.panSpin.checkSpinAgain(),this.moveSpineContainerTop()},y.prototype.updateProgress=function(){var t=f.SkinsData.getRaritySkinsAmount(this.currRarity),e=f.SkinsData.getSkinOpened(this.currRarity);this.txtProgress.text=e+"/"+t},y.prototype.select=function(t,e){void 0===e&&(e=!0),this.currSelected=t,this.scene.tweens.killTweensOf(this.imgSelected),this.imgSelected.visible=!0,this.imgSelected.scale=1,this.imgSelected.x=this.slots[this.currSelected].x,this.imgSelected.y=this.slots[this.currSelected].y,!0===e&&this.panEquip.select(f.SkinsData.skinIDs[this.currRarity][this.currSelected])},y.prototype.equip=function(){p.BalanceData.currSkin=f.SkinsData.skinIDs[this.currRarity][this.currSelected],this.panSpin.select(p.BalanceData.currSkin),this.scene.player.setSkin(p.BalanceData.currSkin),this.slots[this.currSelected].equiped(),f.SkinsData.setSkinStatus2(this.currRarity,this.currSelected),this.back()},y.prototype.back=function(){this.scene.showSubScene(o.SubSceneList.SkinsRarity)},y.prototype.update=function(){l.prototype.update.call(this),this.stars.update()},y.prototype.destroy=function(){this.panSpin.destroy(),this.panEquip.destroy(),this.slots=null,this.imgSelected=null,this.openArray=null,this.stars.destroy(),this.stars=null,this.txtProgress=null,l.prototype.destroy.call(this)},y.prototype.startChoosing=function(t){!0===t?this.addMoney(-f.SkinsData.getPrice(this.currRarity),this.currRarity):f.SkinsData.addSpinToken(this.currRarity,-1),this.openArray=new Array;for(var e=0;e<this.slots.length;e++)0===this.slots[e].status&&this.openArray.push(e);if(this.currChoosingID=0,1===this.openArray.length)f.SkinsData.openSkin(this.currRarity,this.openArray[this.currChoosingID]),this.applyPrize();else{a.Tools.shuffle(this.openArray),this.step=a.Tools.random(12,15);for(var i=0;i<this.step-1;i++)this.currChoosingID+=1,this.currChoosingID===this.openArray.length&&(this.currChoosingID=0);f.SkinsData.openSkin(this.currRarity,this.openArray[this.currChoosingID]),this.currChoosingID=0,this.setNextPrizeID(),this.scene.input.enabled=!1,this.scene.game.canvas.style.cursor="default"}},y.prototype.setNextPrizeID=function(){var t=this.openArray[this.currChoosingID];this.unselectItem(t),this.currChoosingID+=1,this.currChoosingID===this.openArray.length&&(this.currChoosingID=0),t=this.openArray[this.currChoosingID],this.selectItem(t),g.SoundManager.playSFX("slot_random")},y.prototype.applyPrize=function(){this.scene.input.enabled=!0;var t=this.openArray[this.currChoosingID];this.select(t),this.scene.add.tween({targets:this.imgSelected,scale:1.2,duration:250,yoyo:!0,loop:2}),this.scene.add.tween({targets:this.slots[t],scale:1.2,duration:250,yoyo:!0,loop:2}),g.SoundManager.playSFX("slot_unlock"),this.slots[t].open(),this.panSpin.checkSpinAgain(),this.stars.show(this.imgSelected.x,this.imgSelected.y),this.scene.events.emit(h.Achievements.EVENT_ACHIEVEMENT_COMPLETE,"Skin",f.SkinsData.getSkinCell(this.currRarity,t)),this.updateProgress(),f.SkinsData.totalSkinsOpened===f.SkinsData.totalSkins&&h.Achievements.saveAchive(h.TrophieAchieves.allSkins)},y.prototype.unselectItem=function(t){1!==this.slots[t].scaleX&&this.scene.add.tween({targets:this.slots[t],scale:1,duration:150})},y.prototype.selectItem=function(t){--this.step,1!==this.step?(this.select(t,!1),this.scene.add.tween({targets:this.imgSelected,scale:1.2,duration:150}),this.scene.add.tween({targets:this.slots[t],scale:1.2,duration:150,onComplete:this.setNextPrizeID,onCompleteScope:this})):this.applyPrize()},y);function y(){return null!==l&&l.apply(this,arguments)||this}e.SubSkinsSelect=i},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CheckpointHome=e.GrapplePoint=e.GrapplePad=e.LeverPulse=e.JumpPotion=e.FadeArrow=e.FadeText=e.BasicFade=e.FinishPortal=e.Portal=e.SkinSpin=e.Coin=e.Kite=e.Torch=e.WindBlaster=e.TimedKey=e.LightSwitch=e.Key=e.CircularCannon=e.Checkpoint=e.BreatheBlaster=e.Item=void 0;var n=i(12),r=(Object.defineProperty(e,"Item",{enumerable:!0,get:function(){return n.Item}}),i(215)),s=(Object.defineProperty(e,"BreatheBlaster",{enumerable:!0,get:function(){return r.BreatheBlaster}}),i(70)),o=(Object.defineProperty(e,"Checkpoint",{enumerable:!0,get:function(){return s.Checkpoint}}),i(216)),a=(Object.defineProperty(e,"CircularCannon",{enumerable:!0,get:function(){return o.CircularCannon}}),i(49)),h=(Object.defineProperty(e,"Key",{enumerable:!0,get:function(){return a.Key}}),i(217)),l=(Object.defineProperty(e,"LightSwitch",{enumerable:!0,get:function(){return h.LightSwitch}}),i(218)),c=(Object.defineProperty(e,"TimedKey",{enumerable:!0,get:function(){return l.TimedKey}}),i(219)),u=(Object.defineProperty(e,"WindBlaster",{enumerable:!0,get:function(){return c.WindBlaster}}),i(220)),d=(Object.defineProperty(e,"Torch",{enumerable:!0,get:function(){return u.Torch}}),i(221)),p=(Object.defineProperty(e,"Kite",{enumerable:!0,get:function(){return d.Kite}}),i(71)),f=(Object.defineProperty(e,"Coin",{enumerable:!0,get:function(){return p.Coin}}),i(222)),g=(Object.defineProperty(e,"SkinSpin",{enumerable:!0,get:function(){return f.SkinSpin}}),i(223)),m=(Object.defineProperty(e,"Portal",{enumerable:!0,get:function(){return g.Portal}}),i(224)),y=(Object.defineProperty(e,"FinishPortal",{enumerable:!0,get:function(){return m.FinishPortal}}),i(50)),v=(Object.defineProperty(e,"BasicFade",{enumerable:!0,get:function(){return y.BasicFade}}),i(225)),x=(Object.defineProperty(e,"FadeText",{enumerable:!0,get:function(){return v.FadeText}}),i(226)),b=(Object.defineProperty(e,"FadeArrow",{enumerable:!0,get:function(){return x.FadeArrow}}),i(227)),w=(Object.defineProperty(e,"JumpPotion",{enumerable:!0,get:function(){return b.JumpPotion}}),i(228)),T=(Object.defineProperty(e,"LeverPulse",{enumerable:!0,get:function(){return w.LeverPulse}}),i(229)),S=(Object.defineProperty(e,"GrapplePad",{enumerable:!0,get:function(){return T.GrapplePad}}),i(230)),P=(Object.defineProperty(e,"GrapplePoint",{enumerable:!0,get:function(){return S.GrapplePoint}}),i(231));Object.defineProperty(e,"CheckpointHome",{enumerable:!0,get:function(){return P.CheckpointHome}})},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.BreatheBlaster=void 0,i(12)),a=i(0),h=i(4),i=(r=o.Item,s(l,r),l.prototype.spawn=function(t){this.xPos=t.x,this.yPos=t.y,this.sprite.x=this.xPos,this.sprite.y=this.yPos,this.sprite.rotation=h.Tools.toRad(t.rotation),this.sprite.visible=!0,this.alive=!0,this.hitBoxPolygon.pos.x=this.xPos,this.hitBoxPolygon.pos.y=this.yPos,this.hitBoxPolygon.setAngle(this.sprite.rotation)},l.prototype.update=function(){var t,e;!0===SAT.testPolygonPolygon(this.main.player.totalPolygon,this.hitBoxPolygon)&&this.main.player.collideWithBreatheBlaster(),Math.random()<.15&&(t=4*Math.random(),e=this.sprite.rotation+h.Tools.toRad(4*Math.random()-2),this.main.particleManager.createColorParticle(this.xPos,this.yPos,Math.cos(e)*t,Math.sin(e)*t,3394815,4,!0,!0,100))},l.prototype.destroy=function(){this.sprite.destroy(),this.sprite=null,r.prototype.destroy.call(this)},l);function l(t,e){var i=r.call(this,t)||this;return i.sprite=new Phaser.GameObjects.Image(t,0,0,a.Atlases.gameplay,"breatheBlaster 10000"),i.sprite.setOrigin(1,.5),e.add(i.sprite),i.sprite.visible=!1,i.sprite.setScale(1,.5),i.hitBoxPolygon=new SAT.Box(new SAT.Vector(0,0),100,50).toPolygon(),i.type="breatheBlaster",i}e.BreatheBlaster=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.CircularCannon=void 0,i(0)),a=i(4),i=(r=i(12).Item,s(h,r),h.prototype.spawn=function(t){this.xPos=t.x,this.yPos=t.y,this.container.x=this.xPos,this.container.y=this.yPos,this.alive=!0,this.rad=0,this.cannonSpeed=a.Tools.toRad(2),this.firing=!1,this.power=13},h.prototype.update=function(){var t=this.main.player;t.checkCollideWithCannon(this),!0===this.firing?(this.tubeSprite.scaleX-=.075*(this.tubeSprite.scaleX-.75),this.tubeSprite.scaleY-=.075*(this.tubeSprite.scaleY-1.35),this.tubeSprite.scaleX<.9&&(this.main.player.cannonFire(this.xPos,this.yPos,Math.cos(this.rad),Math.sin(this.rad),this.power,80),this.firing=!1)):(this.tubeSprite.scaleX-=.15*(this.tubeSprite.scaleX-1),this.tubeSprite.scaleY=this.tubeSprite.scaleX,t.currentCannon!==this?this.rad=Math.atan2(t.yPos-this.yPos,t.xPos-this.xPos):this.rad=(this.rad+this.cannonSpeed)%a.Tools.PI2,this.tubeSprite.rotation=this.rad)},h.prototype.reset=function(){r.prototype.reset.call(this),this.firing=!1},h.prototype.resetLevel=function(){this.reset()},h.prototype.destroy=function(){this.sprite.destroy(),this.sprite=null,this.tubeSprite.destroy(),this.tubeSprite=null,this.container.destroy(),this.container=null,r.prototype.destroy.call(this)},h);function h(t,e){var i=r.call(this,t)||this;return i.container=new Phaser.GameObjects.Container(t),e.add(i.container),i.sprite=new Phaser.GameObjects.Image(t,0,0,o.Atlases.gameplay,"cannonBase 10000"),i.container.add(i.sprite),i.tubeSprite=new Phaser.GameObjects.Image(t,0,0,o.Atlases.gameplay,"cannonTube 10000"),i.container.add(i.tubeSprite),i.tubeSprite.setOrigin(3/37,.5),i}e.CircularCannon=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.LightSwitch=void 0,i(0)),i=(r=i(12).Item,s(a,r),a.prototype.spawn=function(t){this.xPos=t.x,this.yPos=t.y,this.sprite.x=this.xPos,this.sprite.y=this.yPos,this.hitBoxPolygon.pos.x=this.xPos,this.hitBoxPolygon.pos.y=this.yPos,this.alive=!0},a.prototype.update=function(){!1===this.main.effectsOverlay.isDark&&!0===SAT.testPolygonPolygon(this.main.player.bodyPolygon,this.hitBoxPolygon)&&this.main.effectsOverlay.goDark()},a.prototype.destroy=function(){this.sprite.destroy(),this.sprite=null,r.prototype.destroy.call(this)},a);function a(t,e){var i=r.call(this,t)||this;return i.sprite=new Phaser.GameObjects.Image(t,0,0,o.Atlases.gameplay,"lightSwitch 10000"),e.add(i.sprite),i.hitBoxPolygon=new SAT.Box(new SAT.Vector(0,0),20,20).toPolygon(),i.hitBoxPolygon.setOffset(new SAT.Vector(-10,-10)),i}e.LightSwitch=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),i=(Object.defineProperty(e,"__esModule",{value:!0}),e.TimedKey=void 0,r=i(49).Key,s(o,r),o.prototype.spawn=function(t){r.prototype.spawn.call(this,t),this.timer=0},o.prototype.init=function(t){r.prototype.init.call(this,t,"timedKey 10000",16711680)},o.prototype.collideWithHero=function(){r.prototype.collideWithHero.call(this),this.timer=300},o.prototype.update=function(){!0===this.following&&!1===this.used&&0<this.timer&&(--this.timer,0===this.timer&&(this.main.player.loseKey(this),this.reset())),r.prototype.update.call(this)},o);function o(){return null!==r&&r.apply(this,arguments)||this}e.TimedKey=i},function(t,e,i){"use strict";var n,s,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.WindBlaster=void 0,i(0)),a=i(1),h=i(4),l=i(29),i=(s=i(12).Item,r(c,s),c.prototype.spawn=function(t){this.xPos=t.x,this.yPos=t.y,this.container.x=this.xPos,this.container.y=this.yPos,this.fanPolygon.pos.x=this.xPos,this.fanPolygon.pos.y=this.yPos,this.fanPolygon.setAngle(-h.Tools.PI05),this.alive=!0,this.inc=0,this.sin=Math.sin(this.fanPolygon.angle);for(var e=0,i=this.windGraphics;e<i.length;e++){var n=i[e];n.x=46*Math.random()-23,n.y=-130*Math.random(),n.visible=!0}},c.prototype.update=function(){this.fanSprite.update();var t,e,i=this.main.player;if(!0===i.alive){SAT.testPolygonPolygon(this.fanPolygon,i.totalPolygon)?(t=0,(e=.15*this.sin)<-.12&&(this.inc=Math.max(2,this.inc)),t+=.13*this.sin*this.inc,e<-.12&&i.yPos>this.yPos-5&&(t=-2,i.yPos=this.yPos-5,i.falling=!0,i.updatePositions()),this.inc<2.5?this.inc+=.25:this.inc=2.5,i.applyForce(0,t)):(this.inc-=.25,this.inc<0&&(this.inc=0));for(var n=0,r=this.main.blocks;n<r.length;n++){var s=r[n];s instanceof l.BlockBehavior&&!0===SAT.testPolygonPolygon(this.fanPolygon,s.totalPolygon)&&s.applyForce(0,-.2)}}for(var o=0,a=this.windGraphics;o<a.length;o++){var h=a[o];h.y-=3,h.alpha-=.03,h.y<-130&&(h.y=0,h.x=46*Math.random()-23,h.alpha=1)}},c.prototype.die=function(){this.alive=!1,this.container.visible=!1},c.prototype.destroy=function(){this.container.destroy(),this.container=null,this.fanSprite.destroy(),this.fanSprite=null;for(var t=0,e=this.windGraphics;t<e.length;t++)e[t].destroy();s.prototype.destroy.call(this)},c);function c(t,e){var i=s.call(this,t)||this;i.container=new Phaser.GameObjects.Container(t),e.add(i.container),i.windGraphics=[];for(var n=0;n<6;n++){var r=new Phaser.GameObjects.Image(t,0,0,o.Atlases.gameplay,"windWind 10000");i.container.add(r),r.visible=!1,i.windGraphics.push(r)}return i.sprite=new Phaser.GameObjects.Image(t,0,0,o.Atlases.gameplay,"windBlaster 10000"),i.container.add(i.sprite),i.fanSprite=new a.JDImageAnim(t,0,0,o.Atlases.gameplay,"windFan "),i.fanSprite.playFrames(0,5,-1,.5),i.container.add(i.fanSprite),i.fanPolygon=new SAT.Box(new SAT.Vector(0,0),180,50).toPolygon(),i.fanPolygon.setOffset(new SAT.Vector(0,-25)),i}e.WindBlaster=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.Torch=void 0,i(0)),a=i(1),h=i(11),i=(r=i(49).Key,s(l,r),l.prototype.init=function(t){this.sprite=new a.JDImageAnim(this.main,0,0,o.Atlases.gameplay,"torch "),t.add(this.sprite),this.lineGraphic=new Phaser.GameObjects.Image(this.main,0,0,o.Atlases.gameplay,"whiteLine 10000"),this.lineGraphic.setOrigin(0,.5),this.lineGraphic.tint=65280,t.add(this.lineGraphic)},l.prototype.spawn=function(t){r.prototype.spawn.call(this,t),this.sprite.playFrames(0,6,-1,.5)},l.prototype.update=function(){!1!==this.alive&&(this.sprite.update(),r.prototype.update.call(this))},l.prototype.destroySelf=function(){this.main.removeBlockFrom(this.main.items,this),r.prototype.destroySelf.call(this)},l.prototype.collideWithHero=function(){this.player.collideWithTorch(this),h.SoundManager.playSFX("torch")},l);function l(t,e){return r.call(this,t,e)||this}e.Torch=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.Kite=void 0,i(0)),i=(r=i(12).Item,s(a,r),a.prototype.spawn=function(t){this.xPos=t.x,this.yPos=t.y,this.startX=this.xPos,this.startY=this.yPos,this.updatePositions(),this.hitBoxPolygon.pos.x=this.xPos,this.hitBoxPolygon.pos.y=this.yPos,this.alive=!0,this.following=!1},a.prototype.update=function(){!1!==this.following?(this.xPos=this.player.xPos+8*this.player.scaleX,this.yPos=this.player.yPos-30,this.sprite.scaleX=this.player.scaleX,this.updatePositions()):!0===SAT.testPolygonPolygon(this.player.bodyPolygon,this.hitBoxPolygon)&&(this.following=!0,this.player.collideWithKite(this))},a.prototype.reset=function(){this.sprite&&(this.following=!1,this.xPos=this.startX,this.yPos=this.startY,this.sprite.scaleX=1,this.updatePositions())},a.prototype.resetLevel=function(){this.reset(),this.alive=!0},a.prototype.updatePositions=function(){this.sprite.x=this.xPos,this.sprite.y=this.yPos},a.prototype.destroy=function(){this.sprite.destroy(),this.sprite=null,this.hitBoxPolygon=null,this.player=null,r.prototype.destroy.call(this)},a);function a(t,e){var i=r.call(this,t)||this;return i.sprite=new Phaser.GameObjects.Image(t,0,0,o.Atlases.gameplay,"kite 10000"),e.add(i.sprite),i.hitBoxPolygon=new SAT.Box(new SAT.Vector(0,0),76,16).toPolygon(),i.hitBoxPolygon.setOffset(new SAT.Vector(-38,-8)),i.player=i.main.player,i}e.Kite=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.SkinSpin=void 0,i(0)),a=i(3),h=i(11),i=(r=i(71).Coin,s(l,r),l.prototype.init=function(t,e,i){this.rarity=i,this.sprite=new Phaser.GameObjects.Image(t,0,0,o.Atlases.gameplay,"skinSpin 1000"+i),e.add(this.sprite),this.sprite.visible=!1},l.prototype.collect=function(){a.SkinsData.addSpinToken(this.rarity),h.SoundManager.playSFX("starPickup"),this.die()},l.prototype.resetLevel=function(){},l);function l(){return null!==r&&r.apply(this,arguments)||this}e.SkinSpin=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.Portal=void 0,i(0)),a=i(1),h=i(27),l=i(26),c=i(2),i=(r=i(12).Item,s(u,r),u.prototype.attachPortal=function(t){this.portalAttached=t},u.prototype.disablePortal=function(){this.isEnable=!1,this.sprite.gotoAndPlay(14,27,14+this.sprite.currFrame,-1,.5),this.cooldown=c.BalanceData.config_PortalTimeCooldown,h.PLColorMatrix.blackAndWhite(this.sprite,!0)},u.prototype.update=function(){!0===this.isEnable?this.portalAttached&&!0===SAT.testPolygonPolygon(this.main.player.totalPolygon,this.hitBoxPolygon)&&(this.portalAttached.disablePortal(),this.disablePortal(),this.main.player.setPosition(this.portalAttached.xPos,this.portalAttached.yPos+20)):(--this.cooldown,this.cooldown<=0&&(this.isEnable=!0,this.sprite.gotoAndPlay(0,13,this.sprite.currFrame-14,-1,.5),h.PLColorMatrix.hue(this.sprite,this.color))),this.sprite.update()},u.prototype.spawn=function(t){this.xPos=t.x,this.yPos=t.y,this.sprite.x=this.xPos,this.sprite.y=this.yPos,this.hitBoxPolygon.pos.x=this.xPos,this.hitBoxPolygon.pos.y=this.yPos,this.alive=!0},u.prototype.destroy=function(){this.sprite.destroy(),this.sprite=null,this.portalAttached=null,r.prototype.destroy.call(this)},u);function u(t,e,i){var n=r.call(this,t)||this;return n.color=i,n.sprite=new a.JDImageAnim(t,0,0,o.Atlases.gameplay,"portal_blueAnim "),n.sprite.scale=1.12,e.add(n.sprite),n.sprite.playFrames(0,13,-1,.5),!0===c.BalanceData.blend&&(n.sprite.setPipeline(h.PipelineManager.getPipeline(l.PipelineList.MIXBlurColorMatrix)),h.PLColorMatrix.hue(n.sprite,n.color),h.PLBlur.setBlur(n.sprite,2,2)),n.isEnable=!0,n.cooldown=0,n.hitBoxPolygon=new SAT.Box(new SAT.Vector(0,0),10,32).toPolygon(),n.hitBoxPolygon.setOffset(new SAT.Vector(-5,-16)),n}e.Portal=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.FinishPortal=void 0,i(0)),a=i(1),h=i(27),l=i(26),c=i(3),i=(r=i(12).Item,s(u,r),u.prototype.spawn=function(t){this.xPos=t.x,this.yPos=t.y,this.sprite.x=this.xPos,this.sprite.y=this.yPos,this.hitBoxPolygon.pos.x=this.xPos,this.hitBoxPolygon.pos.y=this.yPos,this.particleTimer=0,this.alive=!0},u.prototype.update=function(){this.sprite.update(),this.particleTimer+=1,this.particleTimer>this.particleSpawnRate&&(this.main.particleManager.createColorParticle(this.xPos-80+160*Math.random(),this.yPos-80+160*Math.random(),0,0,4649252,4,!1),this.particleTimer=0),this.main.particleManager.magnetTo(this.xPos,this.yPos,250,50),this.main.player.checkCollideWithFinish(this)},u.prototype.destroy=function(){this.sprite.destroy(),this.sprite=null,this.hitBoxPolygon=null,r.prototype.destroy.call(this)},u);function u(t,e){var i=r.call(this,t)||this;return i.particleSpawnRate=3,i.sprite=new a.JDImageAnim(t,0,0,o.Atlases.gameplay,"finish "),i.sprite.scale=1.18,i.sprite.playFrames(0,59,-1,.3),e.add(i.sprite),!0===c.BalanceData.blend&&(i.sprite.setPipeline(h.PipelineManager.getPipeline(l.PipelineList.Blur)),h.PLBlur.setBlur(i.sprite,4,4)),i.hitBoxPolygon=new SAT.Box(new SAT.Vector(0,0),60,60).toPolygon(),i.hitBoxPolygon.setOffset(new SAT.Vector(-30,-30)),i}e.FinishPortal=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.FadeText=void 0,i(0)),a=i(1),h=i(10),l=i(16),i=(r=i(50).BasicFade,s(c,r),c.prototype.spawn=function(t){r.prototype.spawn.call(this,t),this.sprite.setColor(Number("0x"+t.color));var e="tf"+this.id;!0!==o.Constants.IS_MOBILE||13!==this.id&&44!==this.id&&47!==this.id||(e+="Mob"),this.sprite.charColors=[],this.sprite.setText(l.Localization.getText(e)),this.sprite.setFitSize(t.width,h.JDTextFitParam.both,t.height)},c.prototype.destroy=function(){r.prototype.destroy.call(this),this.sprite=null},c);function c(t,e){var i=r.call(this,t)||this;return i.sprite=new a.JDBmpdTextFit(t,0,0,o.Fonts.TutDeath,"",20),e.add(i.sprite),i.sprite.visible=!1,i}e.FadeText=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.FadeArrow=void 0,i(50)),a=i(0),i=(r=o.BasicFade,s(h,r),h.prototype.spawn=function(t){this.startScale=t.size/100,r.prototype.spawn.call(this,t),this.sprite.setFrame("gamearrow"+this.id+" 10000")},h);function h(t,e){var i=r.call(this,t)||this;return i.sprite=new Phaser.GameObjects.Image(t,0,0,a.Atlases.gameplay),e.add(i.sprite),i.sprite.visible=!1,i}e.FadeArrow=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.JumpPotion=void 0,i(0)),i=(r=i(12).Item,s(a,r),a.prototype.spawn=function(t){this.xPos=t.x,this.yPos=t.y,this.sprite.x=this.xPos,this.sprite.y=this.yPos,this.sprite.visible=!0,this.hitBoxPolygon.pos.x=this.xPos,this.hitBoxPolygon.pos.y=this.yPos,this.alive=!0},a.prototype.update=function(){!0===this.alive?!0===SAT.testPolygonPolygon(this.main.player.bodyPolygon,this.hitBoxPolygon)&&(this.alive=!1,this.sprite.visible=!1,this.counter=0,this.main.player.collideWithJumpPotion()):!1===this.sprite.visible&&(this.counter+=1,180<=this.counter&&this.resetLevel())},a.prototype.resetLevel=function(){this.alive=!0,this.sprite.visible=!0},a.prototype.destroy=function(){this.sprite.destroy(),this.sprite=null,this.hitBoxPolygon=null,r.prototype.destroy.call(this)},a);function a(t,e){var i=r.call(this,t)||this;return i.sprite=new Phaser.GameObjects.Image(t,0,0,o.Atlases.gameplay,"jumpPotion 10000"),e.add(i.sprite),i.sprite.visible=!1,i.hitBoxPolygon=new SAT.Box(new SAT.Vector(0,0),24,30).toPolygon(),i.hitBoxPolygon.setOffset(new SAT.Vector(-12,-15)),i}e.JumpPotion=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.LeverPulse=void 0,i(0)),a=i(8),h=i(29),i=(r=i(12).Item,s(l,r),l.prototype.spawn=function(t){this.xPos=t.x,this.yPos=t.y,this.currID=t.currID,this.startX=this.xPos,this.startY=this.yPos,this.updatePositions(),this.hitBoxPolygon.pos.x=this.xPos,this.hitBoxPolygon.pos.y=this.yPos,this.alive=!0,this.isContacted=!1,this.isActive=!1},l.prototype.levelStart=function(){this.pulseBlocks=[];for(var t=0,e=this.main.blocks;t<e.length;t++){var i=e[t];i instanceof h.PulseBlock&&i.currID===this.currID&&this.pulseBlocks.push(i)}},l.prototype.update=function(){if(!1===this.isActive&&this.main.player.state===a.PlayerState.Crouching&&!0===SAT.testPolygonPolygon(this.hitBoxPolygon,this.main.player.totalPolygon)){if(!1===this.isContacted){!1===this.isActive?this.sprite.flipX=!0:!0===this.isActive&&(this.sprite.flipX=!1),this.isActive=!this.isActive;for(var t=0,e=this.pulseBlocks;t<e.length;t++)e[t].enablePulsing(this.isActive)}this.isContacted=!0}else this.isContacted=!1},l.prototype.reset=function(){!0===this.isActive&&(this.sprite.flipX=!1),this.isActive=!1,this.xPos=this.startX,this.yPos=this.startY,this.updatePositions()},l.prototype.resetLevel=function(){this.reset(),this.alive=!0},l.prototype.updatePositions=function(){this.sprite.x=this.xPos,this.sprite.y=this.yPos},l.prototype.destroy=function(){this.sprite.destroy(),this.sprite=null,this.hitBoxPolygon=null,this.pulseBlocks=null,r.prototype.destroy.call(this)},l);function l(t,e){var i=r.call(this,t)||this;return i.sprite=new Phaser.GameObjects.Image(t,0,0,o.Atlases.gameplay,"lever 10000"),e.add(i.sprite),i.hitBoxPolygon=new SAT.Box(new SAT.Vector(0,0),46,26).toPolygon(),i.hitBoxPolygon.setOffset(new SAT.Vector(-23,-13)),i}e.LeverPulse=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.GrapplePad=void 0,i(0)),a=i(4),i=(r=i(12).Item,s(h,r),h.prototype.spawn=function(t){this.xPos=t.x,this.yPos=t.y,this.currID=t.currID,this.sprite.x=this.xPos,this.sprite.y=this.yPos,this.sprite.rotation=a.Tools.toRad(t.rotation),this.hitBoxPolygon.pos.x=this.xPos,this.hitBoxPolygon.pos.y=this.yPos,this.hitBoxPolygon.setAngle(this.sprite.rotation),this.onContact=!1,this.alive=!0},h.prototype.levelStart=function(){this.grapplePoint=this.main.getGrapplePoint(this.currID)},h.prototype.update=function(){this.grapplePoint&&(!1===this.onContact?!0===SAT.testPolygonPolygon(this.hitBoxPolygon,this.main.player.totalPolygon)&&(this.onContact=!0,this.main.player.showGrappleTarget(!0,this.grapplePoint)):!0===this.onContact&&(!1===SAT.testPolygonPolygon(this.hitBoxPolygon,this.main.player.totalPolygon)?(this.onContact=!1,this.main.player.showGrappleTarget(!1,this.grapplePoint)):this.main.player.grapplePoint!==this.grapplePoint&&this.main.player.showGrappleTarget(!0,this.grapplePoint)))},h.prototype.reset=function(){},h.prototype.resetLevel=function(){this.reset(),this.alive=!0},h.prototype.destroy=function(){this.sprite.destroy(),this.sprite=null,this.hitBoxPolygon=null,this.grapplePoint=null,r.prototype.destroy.call(this)},h);function h(t,e){var i=r.call(this,t)||this;return i.sprite=new Phaser.GameObjects.Image(t,0,0,o.Atlases.gameplay,"grapplePlatform 10000"),e.add(i.sprite),i.hitBoxPolygon=new SAT.Box(new SAT.Vector(0,0),80,40).toPolygon(),i.hitBoxPolygon.setOffset(new SAT.Vector(-40,-30)),i}e.GrapplePad=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.GrapplePoint=void 0,i(0)),i=(r=i(12).Item,s(a,r),a.prototype.spawn=function(t){this.xPos=t.x,this.yPos=t.y,this.currID=t.currID,this.sprite.x=this.xPos,this.sprite.y=this.yPos,this.alive=!1},a.prototype.onContact=function(t,e){this.alive=t,this.sprite.setFrame("grappleHook 1000"+e),this.sprite.rotation=0},a.prototype.update=function(){!0===this.alive&&(this.sprite.rotation+=.1)},a.prototype.reset=function(){},a.prototype.resetLevel=function(){this.reset(),this.alive=!1},a.prototype.destroy=function(){this.sprite.destroy(),this.sprite=null,r.prototype.destroy.call(this)},a);function a(t,e,i){var n=r.call(this,t)||this;return n.isB=i,n.sprite=new Phaser.GameObjects.Image(t,0,0,o.Atlases.gameplay,"grappleHook 10000"),e.add(n.sprite),n}e.GrapplePoint=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),i=(Object.defineProperty(e,"__esModule",{value:!0}),e.CheckpointHome=void 0,r=i(70).Checkpoint,s(o,r),o.prototype.updateState=function(){0===this.state&&SAT.testPolygonPolygon(this.main.player.bodyPolygon,this.hitBoxPolygon)?(this.main.checkpointTriggered(this),this.setSpriteFrame(1),this.state=1):1!==this.state||this.xPos===this.main.player.checkpoint.x&&this.yPos===this.main.player.checkpoint.y||(this.setSpriteFrame(0),this.state=0)},o);function o(){return null!==r&&r.apply(this,arguments)||this}e.CheckpointHome=i},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Levels=void 0;var n=i(233),s=i(2),o=i(0);function r(){this.levels={},s.BalanceData.init()}r.prototype.loadLevels=function(t){for(var e=o.Jsons.getJson(t,"levels"),i=0,n=Object.keys(e);i<n.length;i++){var r=n[i];"config"!==r?this.loadLevel(r,e[r]):s.BalanceData.initConfig(e[r])}},r.prototype.loadLevelEdit=function(){this.loadLevel(s.BalanceData.editID,{})},r.prototype.loadLevel=function(t,e){this.levels[t]=new n.Level(t,e)},r.prototype.getLevel=function(t){var e=this.levels[t];return e||"0"===t||(this.levels[t]=new n.Level(t,{}),e=this.levels[t]),e},e.Levels=r},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Level=void 0;var n=i(2),r=i(16),s=i(17);function o(t,e){this.id=t,this.id===n.BalanceData.towerID?this.data=e:(this.bgColor=Number("0x"+e.bgc),this.data=e.data,this.dataHard=e.dataHard),this.bgColor||(this.bgColor=10999295),this.targetCoins=e.tc,this.targetDeath=e.td,this.targetHardCoins=e.htc,this.targetHardDeath=e.htd,this.targetCoins||(this.targetCoins=this.targetDeath=this.targetHardCoins=this.targetHardDeath=0),this.id!==n.BalanceData.hubID&&this.id!==n.BalanceData.editID&&(this.saveData=s.SaveGame.getInstance().getLevel(this.id))}o.prototype.complete=function(t,e,i){this.saveData&&(!1===i?(-1===this.saveData.tt||t<this.saveData.tt)&&(this.saveData.tt=t):(-1===this.saveData.tth||t<this.saveData.tth)&&(this.saveData.tth=t),this.save())},o.prototype.save=function(){s.SaveGame.getInstance().saveLevel(this.id,this.saveData)},o.prototype.getName=function(){return this.id===n.BalanceData.editID?this.id:this.id===n.BalanceData.vexID?r.Localization.getText("actVex"):this.id===n.BalanceData.hubID?r.Localization.getText("acthub"):r.Localization.getText("actNorm")+" "+this.id},o.prototype.getNameHard=function(){return r.Localization.getText("actHard")},o.prototype.act3Star=function(){return-1!==this.saveData.tt&&1===this.saveData.cc&&1===this.saveData.nd},o.prototype.getTopTime=function(t){return!1===t?this.saveData.tt:this.saveData.tth},o.prototype.isTargetLevelComplete=function(t){return!!this.saveData&&(!1===t?-1!==this.saveData.tt:-1!==this.saveData.tth)},o.prototype.isTargetCoinsComplete=function(t){return this.saveData?!1===t?this.saveData.cc:this.saveData.cch:0},o.prototype.isTargetDeathComplete=function(t){return this.saveData?!1===t?this.saveData.nd:this.saveData.ndh:0},o.prototype.completeTargetCoins=function(t){this.saveData&&(!1===t?this.saveData.cc=1:this.saveData.cch=1)},o.prototype.completeTargetDeath=function(t){this.saveData&&(!1===t?this.saveData.nd=1:this.saveData.ndh=1)},o.prototype.getTargetCoins=function(t){return!1===t?this.targetCoins:this.targetHardCoins},o.prototype.getTargetDeath=function(t){return!1===t?this.targetDeath:this.targetHardDeath},e.Level=o},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.Cable=void 0,i(13)),u=i(0),i=(r=o.Entity,s(a,r),a.prototype.spawn=function(t,e,i){this.xPos=t,this.yPos=e,this.alive=!0;var n=1,r=0;i<0&&(n=-1,r=1,i=Math.abs(i));var s,i=i/this.imgHeight,o=Math.ceil(i),a=1-(o-i)/o,h=o;h<this.cables.length&&(h=this.cables.length);for(var l,c=0;c<h;c++)c<o?(c<this.cables.length?s=this.cables[c]:(s=new Phaser.GameObjects.Image(this.main,0,0,u.Atlases.gameplay,"cable 10000"),this.layer.add(s),s.setOrigin(.5,r),this.cables.push(s)),l=e+this.imgHeight*a*c*n,this.setCableParam(s,t,l,a)):this.cables[c].visible=!1},a.prototype.setCableParam=function(t,e,i,n){t.x=e,t.y=i,t.scaleY=n,t.visible=!0},a.prototype.destroy=function(){for(var t=0;t<this.cables.length;t++)this.cables[t].destroy();this.cables=null,this.layer=null,r.prototype.destroy.call(this)},a);function a(t,e){t=r.call(this,t)||this;return t.imgHeight=99,t.layer=e,t.cables=new Array,t}e.Cable=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.Pole=void 0,i(13)),a=i(0),i=(r=o.Entity,s(h,r),h.prototype.spawn=function(t){this.xPos=t.x,this.yPos=t.y,this.sprite.x=this.xPos,this.sprite.y=this.yPos,this.sprite.visible=!0,this.hitBoxPolygon.pos.x=this.xPos,this.hitBoxPolygon.pos.y=this.yPos},h.prototype.destroy=function(){this.sprite.destroy(),this.sprite=null,this.hitBoxPolygon=null,r.prototype.destroy.call(this)},h.prototype.destroySelf=function(){this.main.removeBlockFrom(this.main.poles,this),r.prototype.destroySelf.call(this)},h);function h(t,e){var i=r.call(this,t)||this;return i.sprite=new Phaser.GameObjects.Image(t,0,0,a.Atlases.gameplay,"pole 10000"),e.add(i.sprite),i.sprite.visible=!1,i.hitBoxPolygon=new SAT.Box(new SAT.Vector(0,0),10,10).toPolygon(),i.hitBoxPolygon.setOffset(new SAT.Vector(-5,-5)),i}e.Pole=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.Rope=void 0,i(0)),a=i(2),i=(r=i(13).Entity,s(h,r),h.prototype.spawn=function(t){this.xPos=t.x,this.yPos=t.y,this.height=t.height,this.sprite.displayWidth=this.width,this.sprite.displayHeight=this.height,this.sprite.x=this.xPos,this.sprite.y=this.yPos,this.sprite.visible=!0,this.alive=!0,this.halfHeight=.5*this.height,this.totalBound=new SAT.Box(new SAT.Vector(this.xPos,this.yPos),this.width,this.height-16),this.totalBoundPolygon=this.totalBound.toPolygon(),this.totalBoundPolygon.setOffset(new SAT.Vector(-.5*this.width,-(this.halfHeight+8)))},h.prototype.destroy=function(){this.sprite.destroy(),this.sprite=null,r.prototype.destroy.call(this),this.totalBound=null,this.totalBoundPolygon=null},h.prototype.destroySelf=function(){this.main.removeBlockFrom(this.main.ropes,this),r.prototype.destroySelf.call(this)},h);function h(t,e){var i=r.call(this,t)||this;return i.width=5,i.sprite=new Phaser.GameObjects.Image(t,0,0,o.Atlases.gameplay,a.BalanceData.getBasicBlockFrame(i.main.currLevelID)),i.sprite.setOrigin(1,.5),e.add(i.sprite),i.sprite.visible=!1,i}e.Rope=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.Wire=void 0,i(13)),a=i(0),h=i(4),i=(r=o.Entity,s(l,r),l.prototype.spawn=function(t){this.xPos=t.x,this.yPos=t.y,this.sprite.x=t.x,this.sprite.y=t.y,this.sprite.rotation=h.Tools.toRad(t.rotation),this.sprite.visible=!0,this.alive=!0},l.prototype.resetLevel=function(){this.sprite.scaleX=1},l.prototype.destroy=function(){this.sprite.destroy(),this.sprite=null,r.prototype.destroy.call(this)},l.prototype.destroySelf=function(){this.main.removeBlockFrom(this.main.wires,this),r.prototype.destroySelf.call(this)},l);function l(t,e){var i=r.call(this,t)||this;return i.sprite=new Phaser.GameObjects.Image(t,0,0,a.Atlases.gameplay,"wire 10000"),e.add(i.sprite),i.sprite.visible=!1,i.sprite.setOrigin(1/52,.5),i}e.Wire=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.ZiplineWire=void 0,i(0)),a=i(4),h=i(13),l=i(8),i=(r=h.Entity,s(c,r),c.prototype.setPos=function(t,e,i,n){this.startPosX=t,this.startPosY=e-this.yOff;var r=i,s=n-this.yOff;n<e&&(this.startPosX=i,this.startPosY=n-this.yOff,r=t,s=e-this.yOff),this.topEdge=this.startPosY,this.bottomEdge=s,this.startPosX<r?(this.direction=l.FacingDir.Right,this.leftEdge=this.startPosX,this.rightEdge=r):(this.direction=l.FacingDir.Left,this.leftEdge=r,this.rightEdge=this.startPosX),this.width=Math.abs(r-this.startPosX),this.height=Math.abs(s-this.startPosY),this.scope=this.height/this.width,this.wire.x=this.startPosX,this.wire.y=this.startPosY,this.wire.displayWidth=a.Tools.distance(this.startPosX,this.startPosY,r,s),this.wire.rotation=a.Tools.angleOfPoints(this.startPosX,this.startPosY,r,s),this.hitPolygon=new SAT.Polygon(new SAT.Vector(this.startPosX,this.startPosY),[new SAT.Vector(0,5),new SAT.Vector(r-this.startPosX,s-this.startPosY+5),new SAT.Vector(r-this.startPosX,s-this.startPosY-5),new SAT.Vector(0,-5)])},c.prototype.destroy=function(){this.wire&&this.wire.destroy(),this.wire=null,this.hitPolygon=null,r.prototype.destroy.call(this)},c.prototype.destroySelf=function(){this.main&&(this.main.removeBlockFrom(this.main.ziplines,this),r.prototype.destroySelf.call(this))},c);function c(t,e){var i=r.call(this,t)||this;return i.yOff=25,i.wire=new Phaser.GameObjects.Image(t,0,0,o.Atlases.gameplay,"whiteLine 10000"),i.wire.setOrigin(0,.5),i.wire.tint=16737792,e.add(i.wire),i}e.ZiplineWire=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.ZiplinePole=void 0,i(13)),a=i(72),h=i(0),i=(r=o.Entity,s(l,r),l.prototype.spawn=function(t){this.xPos=t.x,this.yPos=t.y,this.sprite.x=this.xPos,this.sprite.y=this.yPos},l.prototype.attach=function(t){return this.wire=new a.ZiplineWire(this.main,this.layer),this.wire.setPos(this.xPos,this.yPos,t.xPos,t.yPos),t.wire=this.wire,this.wire},l.prototype.destroy=function(){this.sprite.destroy(),this.sprite=null,this.wire&&this.wire.destroy(),this.wire=null,this.layer=null,r.prototype.destroy.call(this)},l.prototype.destroySelf=function(){this.main.removeBlockFrom(this.main.misc,this),this.wire.destroySelf(),r.prototype.destroySelf.call(this)},l);function l(t,e){var i=r.call(this,t)||this;return i.layer=e,i.sprite=new Phaser.GameObjects.Image(t,0,0,h.Atlases.gameplay,"ziplinePole 10000"),e.add(i.sprite),i.sprite.setOrigin(3/9.8,29.2/64.25),i}e.ZiplinePole=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.HazardStrips=void 0,i(13)),a=i(0),h=i(4),i=(r=o.Entity,s(l,r),l.prototype.destroySelf=function(){this.main.removeBlockFrom(this.main.misc,this),r.prototype.destroySelf.call(this)},l.prototype.spawn=function(t){this.xPos=t.x,this.yPos=t.y,this.sprite.x=this.xPos,this.sprite.y=this.yPos,this.sprite.rotation=h.Tools.toRad(t.rotation),this.sprite.visible=!0,this.alive=!0},l.prototype.destroy=function(){this.sprite.destroy(),this.sprite=null,r.prototype.destroy.call(this)},l);function l(t,e){var i=r.call(this,t)||this;return i.sprite=new Phaser.GameObjects.Image(t,0,0,a.Atlases.gameplay,"hazardStrips 10000"),e.add(i.sprite),i.sprite.visible=!1,i}e.HazardStrips=i},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EnemyBatteringRam=e.EnemyDrone=e.EnemyAndroidAdvanced=e.EnemyAndroid=e.TowerWall=e.Gate=e.BreakableBlock=e.AutoBreakableBlock=void 0;var n=i(242),r=(Object.defineProperty(e,"AutoBreakableBlock",{enumerable:!0,get:function(){return n.AutoBreakableBlock}}),i(243)),s=(Object.defineProperty(e,"BreakableBlock",{enumerable:!0,get:function(){return r.BreakableBlock}}),i(244)),o=(Object.defineProperty(e,"Gate",{enumerable:!0,get:function(){return s.Gate}}),i(245)),a=(Object.defineProperty(e,"TowerWall",{enumerable:!0,get:function(){return o.TowerWall}}),i(73)),h=(Object.defineProperty(e,"EnemyAndroid",{enumerable:!0,get:function(){return a.EnemyAndroid}}),i(246)),l=(Object.defineProperty(e,"EnemyAndroidAdvanced",{enumerable:!0,get:function(){return h.EnemyAndroidAdvanced}}),i(247)),c=(Object.defineProperty(e,"EnemyDrone",{enumerable:!0,get:function(){return l.EnemyDrone}}),i(248));Object.defineProperty(e,"EnemyBatteringRam",{enumerable:!0,get:function(){return c.EnemyBatteringRam}})},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.AutoBreakableBlock=void 0,i(0)),i=(r=i(5).Block,s(a,r),a.prototype.spawn=function(t){this.init(t.x,t.y,t.width,t.height),this.updateGraphicPosition(),this.sprite.setScale(this.width/100,this.height/100),this.sprite.visible=!0,this.sprite.alpha=1,this.startBreak=0},a.prototype.updateGraphicPosition=function(){this.sprite.x=this.xPos,this.sprite.y=this.yPos},a.prototype.landOn=function(t){t&&0===this.startBreak&&(this.startBreak=60)},a.prototype.update=function(){!1!==this.alive&&0!==this.startBreak&&(--this.startBreak,this.startBreak<=5&&(this.sprite.alpha-=.2,0===this.startBreak&&(this.sprite.alpha=0,this.alive=!1,this.sprite.visible=!1)),this.sprite.x=this.startX-2+4*Math.random(),this.sprite.y=this.startY-2+4*Math.random())},a.prototype.reset=function(){this.startBreak=0,this.alive=!0,this.sprite.alpha=1,this.sprite.visible=!0,this.updateGraphicPosition(),r.prototype.reset.call(this)},a.prototype.resetLevel=function(){this.reset()},a.prototype.destroy=function(){this.sprite.destroy(),this.sprite=null,r.prototype.destroy.call(this)},a);function a(t,e){var i=r.call(this,t,e)||this;return i.sprite=new Phaser.GameObjects.Image(t,0,0,o.Atlases.gameplay,"fallingBlock 10000"),e.add(i.sprite),i.sprite.visible=!1,i}e.AutoBreakableBlock=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.BreakableBlock=void 0,i(0)),a=i(11),i=(r=i(5).Block,s(h,r),h.prototype.spawn=function(t){this.init(t.x,t.y,t.width,t.height),this.updateGraphicPosition(),this.sprite.setScale(this.width/100,this.height/100),this.sprite.visible=!0},h.prototype.updateGraphicPosition=function(){this.sprite.x=this.xPos,this.sprite.y=this.yPos},h.prototype.smash=function(){this.sprite.visible=!1,a.SoundManager.playSFX("glassSmash");for(var t=.25*this.width,e=0;e<t;e++){var i=this.xPos-this.halfWidth+Math.random()*this.width,n=this.yPos-this.halfHeight+Math.random()*this.height;this.main.particleManager.createColorParticle(i,n,5*Math.random()-2.5,this.main.player.yVelocity*Math.random(),5903066,8),this.alive=!1}},h.prototype.update=function(){!1!==this.alive&&!0===this.main.player.checkAttackPolyCollision(this.totalPolygon)&&this.smash()},h.prototype.resetLevel=function(){this.reset()},h.prototype.reset=function(){this.alive=!0,this.sprite.visible=!0,r.prototype.reset.call(this)},h.prototype.destroy=function(){this.sprite.destroy(),this.sprite=null},h);function h(t,e){var i=r.call(this,t,e)||this;return i.sprite=new Phaser.GameObjects.Image(t,0,0,o.Atlases.gameplay,"glassBlock 10000"),e.add(i.sprite),i.sprite.visible=!1,i.type="breakableBlock",i}e.BreakableBlock=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.Gate=void 0,i(0)),a=i(4),h=i(3),i=(r=i(29).Block,s(l,r),l.prototype.spawn=function(t){this.init(t.x,t.y+40,h.BalanceData.towerCellSize+10,20),this.updateGraphicPosition(),this.container.scale=h.BalanceData.towerCellSize/100,this.opening=!1,this.spriteLeft.rotation=this.spriteRight.rotation=0},l.prototype.open=function(){this.opening=!0,this.alive=!1},l.prototype.updateGraphicPosition=function(){this.container.x=this.xPos,this.container.y=this.yPos-40},l.prototype.update=function(){!0===this.opening&&(this.spriteLeft.rotation+=.1,this.spriteLeft.rotation>=a.Tools.PI05&&(this.spriteLeft.rotation=a.Tools.PI05,this.opening=!1),this.spriteRight.rotation=-this.spriteLeft.rotation)},l.prototype.reset=function(){r.prototype.reset.call(this),this.alive=!0,this.opening=!1,this.spriteLeft.rotation=this.spriteRight.rotation=0},l.prototype.resetLevel=function(){this.reset()},l.prototype.destroy=function(){this.spriteLeft.destroy(),this.spriteLeft=null,this.spriteRight.destroy(),this.spriteRight=null,this.container.destroy(),this.container=null,r.prototype.destroy.call(this)},l);function l(t,e){var i=r.call(this,t,e)||this;return i.container=new Phaser.GameObjects.Container(t),e.add(i.container),i.spriteLeft=new Phaser.GameObjects.Image(t,-50,40,o.Atlases.gameplay,"basicBlockColors 10000"),i.spriteLeft.setOrigin(0,.5),i.spriteLeft.setDisplaySize(50,20),i.container.add(i.spriteLeft),i.spriteRight=new Phaser.GameObjects.Image(t,50,40,o.Atlases.gameplay,"basicBlockColors 10000"),i.spriteRight.setOrigin(1,.5),i.spriteRight.setDisplaySize(50,20),i.container.add(i.spriteRight),i.scalable=i.hangable=!1,i.type="gate",i}e.Gate=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.TowerWall=void 0,i(3)),i=(r=i(65).BasicBlock,s(a,r),a.prototype.spawn=function(t){r.prototype.spawn.call(this,{x:(o.BalanceData.config_TowerWallWidth/2+25)*t,y:0,width:50,height:3e3}),this.nextY=this.nextYStep},a.prototype.update=function(){var t=this.main.player.yPos;t>=this.nextY&&(this.yPos=t,this.nextY+=this.nextYStep),r.prototype.update.call(this)},a.prototype.reset=function(){r.prototype.reset.call(this),this.yPos=this.startY,this.nextY=this.nextYStep,this.updatePosition()},a.prototype.resetLevel=function(){this.reset()},a);function a(t,e){t=r.call(this,t,e)||this;return t.nextY=0,t.nextYStep=1e3,t.type="towerWall",t}e.TowerWall=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.EnemyAndroidAdvanced=void 0,i(8)),i=(r=i(73).EnemyAndroid,s(a,r),a.prototype.initGraphic=function(t,e){this.startScale=.052,r.prototype.initGraphic.call(this,t,"Enemy2")},a.prototype.attack=function(){var t;this.currFloor===this.main.currHeroFloor&&(t=this.main.player.xPos,.85<this.jdSprite.getAnimationProgress()&&Math.abs(this.xPos-t)<35&&this.main.player.kill(o.DeathType.buzzsaw))},a);function a(){return null!==r&&r.apply(this,arguments)||this}e.EnemyAndroidAdvanced=i},function(t,e,i){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.EnemyDrone=void 0,i(0)),a=i(4),h=i(3),l=i(18),c=i(7),u=i(20),i=(r=u.Obstacle,s(d,r),d.prototype.spawn=function(t){this.startX=t.x,this.startY=t.y,this.startDir=t.dir,this.borderLeft=this.startX-h.BalanceData.config_TowerWallWidth,this.borderRight=this.startX+h.BalanceData.config_TowerWallWidth,this.reset(),this.currFloor=Math.floor(this.startY/h.BalanceData.towerCellSize)},d.prototype.levelStart=function(){this.platforms=[];for(var t=0,e=this.main.blocks;t<e.length;t++){var i=e[t],n=Math.floor(i.yPos/h.BalanceData.towerCellSize);"towerWall"!==i.type&&this.currFloor!==n||(i.leftEdge<this.borderRight&&i.leftEdge>this.startX&&(this.borderRight=i.leftEdge-50),i.rightEdge>this.borderLeft&&i.rightEdge<this.startX&&(this.borderLeft=i.rightEdge+50)),this.currFloor-1!==n&&this.currFloor!==n&&this.currFloor+1!==n||this.platforms.push(i)}},d.prototype.update=function(){var t,e,i,n;!1!==this.alive&&(!0===this.isPatroling?(this.barrel.rotation=0,t=this.container.x+this.barrel.x*this.container.scaleX,n=this.container.y+this.barrel.y+2,!(0<this.xVelocity&&t<this.main.player.xPos||this.xVelocity<0&&t>this.main.player.xPos)||this.currFloor-1!==this.main.currHeroFloor&&this.currFloor!==this.main.currHeroFloor&&this.currFloor+1!==this.main.currHeroFloor||!0!==this.main.raycastToPlayerOneLine(this.platforms,t,n)?(this.xPos+=this.xVelocity,(this.xPos>this.borderRight||this.xPos<this.borderLeft)&&this.changeDir(),this.updatePosition()):(this.isPatroling=!1,e=this.main.player.xPos,i=this.main.player.yPos-this.main.player.halfHeight,this.sprite.setFrame("enemyDrone 10001"),this.laserAim.visible=!0,this.laserAim.x=t,this.laserAim.y=n,this.laserAim.displayWidth=a.Tools.distance(t,this.yPos,e,i),n=a.Tools.angleOfPoints(t,this.yPos,e,i),this.barrel.rotation=n,this.container.scaleX<0&&(this.barrel.rotation=Math.PI-n),this.laserAim.rotation=n,this.counter=0,this.alphaCount=.1)):(this.counter+=this.alphaCount,this.laserAim.alpha=.5+.5*Math.cos(this.counter),this.alphaCount+=.01,.8<=this.alphaCount&&(this.isPatroling=!0,this.laserAim.visible=!1,this.sprite.setFrame("enemyDrone 10000"),this.shoot())),!0===this.main.player.checkAttackPolyCollision(this.totalPolygon)&&this.smash())},d.prototype.smash=function(){this.main.particleManager.showExplosion(this.xPos,this.yPos),this.die(),h.Achievements.saveAchive(l.TrophieTower.killDrone)},d.prototype.shoot=function(){this.bullet.spawn(this.laserAim.x,this.laserAim.y,this.laserAim.rotation,12.5)},d.prototype.updatePosition=function(){this.container.x=this.xPos,this.container.y=this.yPos,this.totalPolygon.pos.x=this.xPos,this.totalPolygon.pos.y=this.yPos},d.prototype.die=function(){this.alive=!1,this.container.visible=!1},d.prototype.changeDir=function(){this.xVelocity=-this.xVelocity,this.setDir()},d.prototype.setDir=function(){0<this.xVelocity?this.container.scaleX=1:this.container.scaleX=-1},d.prototype.reset=function(){this.alive=!0,this.container.visible=!0,this.laserAim.visible=!1,this.isPatroling=!0,this.bullet.reset(),this.xPos=this.startX,this.yPos=this.startY,this.xVelocity=this.startDir,this.sprite.setFrame("enemyDrone 10000"),this.barrel.rotation=0,this.setDir(),this.updatePosition()},d.prototype.resetLevel=function(){this.reset()},d.prototype.destroy=function(){this.platforms=null,this.bullet=null,this.laserAim.destroy(),this.laserAim=null,this.sprite.destroy(),this.sprite=null,this.barrel.destroy(),this.barrel=null,this.container.destroy(),this.container=null,this.totalPolygon=null,r.prototype.destroy.call(this)},d);function d(t,e){var i=r.call(this,t,e)||this;return i.startDir=1,i.laserAim=new Phaser.GameObjects.Image(t,0,0,o.Atlases.gameplay,"whiteLine 10000"),i.laserAim.tint=16711680,i.laserAim.setOrigin(0,.5),e.add(i.laserAim),i.container=new Phaser.GameObjects.Container(t,0,0),e.add(i.container),i.barrel=new Phaser.GameObjects.Image(t,22,6,o.Atlases.gameplay,"enemyDroneBarrel 10000"),i.barrel.setOrigin(0,.5),i.container.add(i.barrel),i.sprite=new Phaser.GameObjects.Image(t,0,0,o.Atlases.gameplay,"enemyDrone 10000"),i.container.add(i.sprite),i.bullet=new u.Bullet(i.main,i.main.layerObstacle),i.main.obstacles.push(i.bullet),i.totalPolygon=c.Helpers.getPolygonOffset(0,0,60,30,-30,-13),i}e.EnemyDrone=i},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.EnemyBatteringRam=void 0;var s,o,a=i(0),h=i(3),l=i(18),c=i(8),u=i(7),i=i(74),d=((d=s=s||{})[d.walk=0]="walk",d[d.detect=1]="detect",d[d.attack=2]="attack",d[d.rest=3]="rest",o=i.BasicGroundEnemy,r(p,o),p.prototype.spawn=function(t){o.prototype.spawn.call(this,t),this.startY+=24,this.reset()},p.prototype.levelStart=function(){this.calcBorders(this.borderOffX)},p.prototype.update=function(){if(!1!==this.alive){if(this.currState===s.walk){if(this.currFloor===this.main.currHeroFloor){var t=this.main.player.xPos;if(0<this.xVelocity&&this.xPos<t&&t<this.borderRight+this.borderOffX||this.xVelocity<0&&this.xPos>t&&t>this.borderLeft-this.borderOffX)return this.currState=s.detect,this.counter=0,this.sprite.setFrame("enemyBatteringRamBase 10001"),this.wheel.setFrame("enemyBatteringRamWheel 10001"),this.wheelSpeed*=2,void this.updatePosition()}this.xPos+=this.xVelocity,this.xPos>this.borderRight?(this.xPos=this.borderRight,this.changeDir()):this.xPos<this.borderLeft&&(this.xPos=this.borderLeft,this.changeDir()),this.updatePosition(),this.wheel.rotation+=this.wheelSpeed}else this.currState===s.detect?(this.wheel.rotation+=this.wheelSpeed,this.counter+=1,20<=this.counter&&this.setAttack()):this.currState===s.attack?(this.wheel.rotation+=this.wheelSpeed,this.xPos+=this.xVelocity,this.xPos>this.borderRight?(this.xPos=this.borderRight,this.setRest()):this.xPos<this.borderLeft&&(this.xPos=this.borderLeft,this.setRest()),this.updatePosition()):this.currState===s.rest&&(this.counter+=1,60<=this.counter&&(this.xPos>=this.borderRight?this.xVelocity=-this.startSpeed:this.xPos<=this.borderLeft&&(this.xVelocity=this.startSpeed),this.setDir(),this.setWalk()));this.main.checkPlayerDeathByCircle(this.deathCircle,c.DeathType.buzzsaw)}},p.prototype.smash=function(){o.prototype.smash.call(this),h.Achievements.saveAchive(l.TrophieTower.killBatteringRam)},p.prototype.die=function(){o.prototype.die.call(this),this.wheel.visible=!1},p.prototype.setWalk=function(){this.currState=s.walk},p.prototype.setAttack=function(){this.xVelocity*=3,this.currState=s.attack},p.prototype.setRest=function(){this.counter=0,this.currState=s.rest,this.sprite.setFrame("enemyBatteringRamBase 10000"),this.wheel.setFrame("enemyBatteringRamWheel 10000")},p.prototype.changeDir=function(){o.prototype.changeDir.call(this),this.setWalk()},p.prototype.setDir=function(){o.prototype.setDir.call(this),this.wheelSpeed=.1*this.currDir},p.prototype.updatePosition=function(){this.wheel.x=this.xPos+46*this.sprite.scaleX,this.wheel.y=this.yPos-12,o.prototype.updatePosition.call(this),this.deathCircle.pos.x=this.wheel.x,this.deathCircle.pos.y=this.wheel.y},p.prototype.reset=function(){o.prototype.reset.call(this),this.recalcBorders(),this.wheel.visible=!0,this.setWalk(),this.sprite.setFrame("enemyBatteringRamBase 10000"),this.wheel.setFrame("enemyBatteringRamWheel 10000")},p.prototype.destroy=function(){this.wheel.destroy(),this.wheel=null,o.prototype.destroy.call(this)},p);function p(t,e){var i=o.call(this,t,e)||this;return i.borderOffX=25,i.wheel=new Phaser.GameObjects.Image(t,0,0,a.Atlases.gameplay,"enemyBatteringRamWheel 10000"),i.wheel.setOrigin(.49,.49),e.add(i.wheel),i.initGraphic(e,"enemyBatteringRamBase 10000"),i.sprite.setOrigin(.35,.5),i.deathCircle=new SAT.Circle(new SAT.Vector(0,0),i.borderOffX),i.totalPolygon=u.Helpers.getPolygonOffset(0,0,60,30,-30,-13),i}e.EnemyBatteringRam=d},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeChanges=void 0;var it=i(0);function n(){}n.addDelay=function(a){Phaser.Core.TimeStep.prototype.step=function(){var t=window.performance.now(),e=(this.now=t)-this.lastTime;if(!((e=e<0?0:e)<a)){this.rawDelta=e;var i=this.deltaIndex,n=this.deltaHistory,r=this.deltaSmoothingMax;(0<this._coolDown||!this.inFocus)&&(this._coolDown--,e=Math.min(e,this._target)),e>this._min&&(e=n[i],e=Math.min(e,this._min)),n[i]=e,this.deltaIndex++,this.deltaIndex>r&&(this.deltaIndex=0);for(var s=0,o=0;o<r;o++)s+=n[o];this.delta=s/=r,this.time+=this.rawDelta,t>this.nextFpsUpdate&&(this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0),this.framesThisSecond++;i=s/this._target;this.callback(t,s,i),this.lastTime=t,this.frame++}}},n.enableTJSDepthTesting=function(p){void 0===p&&(p=!1),Phaser.Renderer.WebGL.WebGLRenderer.prototype.init=function(t){var e,i=this.game,n=this.canvas,r=t.backgroundColor;if(t.contextCreation.depth=p,!(e=i.config.context||n.getContext("webgl2",t.contextCreation)||n.getContext("webgl",t.contextCreation)||n.getContext("experimental-webgl",t.contextCreation))||e.isContextLost())throw this.contextLost=!0,new Error("WebGL unsupported");this.gl=e;var s=this;this.contextLostHandler=function(t){s.contextLost=!0,s.game.events.emit(Phaser.Core.Events.CONTEXT_LOST,s),t.preventDefault()},this.contextRestoredHandler=function(){s.contextLost=!1,s.init(s.config),s.game.events.emit(Phaser.Core.Events.CONTEXT_RESTORED,s)},n.addEventListener("webglcontextlost",this.contextLostHandler,!1),n.addEventListener("webglcontextrestored",this.contextRestoredHandler,!1),i.context=e;for(var o=0;o<=27;o++)this.blendModes.push({func:[e.ONE,e.ONE_MINUS_SRC_ALPHA],equation:e.FUNC_ADD});this.blendModes[1].func=[e.ONE,e.DST_ALPHA],this.blendModes[2].func=[e.DST_COLOR,e.ONE_MINUS_SRC_ALPHA],this.blendModes[3].func=[e.ONE,e.ONE_MINUS_SRC_COLOR],this.blendModes[17]={func:[e.ZERO,e.ONE_MINUS_SRC_ALPHA],equation:e.FUNC_REVERSE_SUBTRACT},this.glFormats[0]=e.BYTE,this.glFormats[1]=e.SHORT,this.glFormats[2]=e.UNSIGNED_BYTE,this.glFormats[3]=e.UNSIGNED_SHORT,this.glFormats[4]=e.FLOAT,this.glFuncMap={mat2:{func:e.uniformMatrix2fv,length:1,matrix:!0},mat3:{func:e.uniformMatrix3fv,length:1,matrix:!0},mat4:{func:e.uniformMatrix4fv,length:1,matrix:!0},"1f":{func:e.uniform1f,length:1},"1fv":{func:e.uniform1fv,length:1},"1i":{func:e.uniform1i,length:1},"1iv":{func:e.uniform1iv,length:1},"2f":{func:e.uniform2f,length:2},"2fv":{func:e.uniform2fv,length:1},"2i":{func:e.uniform2i,length:2},"2iv":{func:e.uniform2iv,length:1},"3f":{func:e.uniform3f,length:3},"3fv":{func:e.uniform3fv,length:1},"3i":{func:e.uniform3i,length:3},"3iv":{func:e.uniform3iv,length:1},"4f":{func:e.uniform4f,length:4},"4fv":{func:e.uniform4fv,length:1},"4i":{func:e.uniform4i,length:4},"4iv":{func:e.uniform4iv,length:1}};var n=e.getSupportedExtensions(),a=(t.maxTextures&&-1!==t.maxTextures||(t.maxTextures=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS)),t.maxTextureSize||(t.maxTextureSize=e.getParameter(e.MAX_TEXTURE_SIZE)),"WEBGL_compressed_texture_"),h="WEBKIT_"+a,l=(this.compression.ETC1=e.getExtension(a+"etc1")||e.getExtension(h+"etc1"),this.compression.PVRTC=e.getExtension(a+"pvrtc")||e.getExtension(h+"pvrtc"),this.compression.S3TC=e.getExtension(a+"s3tc")||e.getExtension(h+"s3tc"),this.supportedExtensions=n,this.instancedArraysExtension=-1<n.indexOf("ANGLE_instanced_arrays")?e.getExtension("ANGLE_instanced_arrays"):null,this.vaoExtension=-1<n.indexOf("OES_vertex_array_object")?e.getExtension("OES_vertex_array_object"):null,e.disable(e.DEPTH_TEST),e.disable(e.CULL_FACE),e.enable(e.BLEND),e.clearColor(r.redGL,r.greenGL,r.blueGL,r.alphaGL),this.mipmapFilter=e[t.mipmapFilter],this.maxTextures=Phaser.Renderer.WebGL.Utils.checkShaderMax(e,t.maxTextures),this.textureIndexes=[],this.tempTextures);if(Array.isArray(l))for(var c=0;c<this.maxTextures;c++)e.deleteTexture(l[c]);else l=new Array(this.maxTextures);for(var u=0;u<this.maxTextures;u++){var d=e.createTexture();e.activeTexture(e.TEXTURE0+u),e.bindTexture(e.TEXTURE_2D,d),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,new Uint8Array([0,0,255,255])),l[u]=d,this.textureIndexes.push(u)}return this.tempTextures=l,this.currentActiveTexture=1,this.startActiveTexture++,e.activeTexture(e.TEXTURE1),this.pipelines=new Phaser.Renderer.WebGL.PipelineManager(this),this.setBlendMode(Phaser.BlendModes.NORMAL),this.projectionMatrix=(new Phaser.Math.Matrix4).identity(),i.textures.once(Phaser.Textures.Events.READY,this.boot,this),this}},n.updateText=function(b,w){Phaser.GameObjects.Text.prototype.updateText=function(){var t=this.canvas,e=this.context,i=this.style,n=i.resolution,r=i.metrics,s=(i.syncFont(t,e),this._text),o=(s=i.wordWrapWidth||i.wordWrapCallback?this.runWordWrap(this._text):s).split(this.splitRegExp),a=Phaser.GameObjects.GetTextSize(this,r,o);this.lineSpacing=b*(Number(i.fontSize.replace("px",""))/w);var h,s=this.padding;0===i.fixedWidth?(this.width=a.width+s.left+s.right,h=a.width):(this.width=i.fixedWidth,(h=this.width-s.left-s.right)<a.width&&(h=a.width)),0===i.fixedHeight?this.height=a.height+s.top+s.bottom:this.height=i.fixedHeight;var l,c,u=this.width,d=this.height;this.updateDisplayOrigin(),u*=n,d*=n,u=Math.max(u,1),d=Math.max(d,1),t.width!==u||t.height!==d?(t.width=u,t.height=d,this.frame.setSize(u,d),i.syncFont(t,e)):e.clearRect(0,0,u,d),e.save(),e.scale(n,n),i.backgroundColor&&(e.fillStyle=i.backgroundColor,e.fillRect(0,0,u,d)),i.syncStyle(t,e),e.textBaseline="alphabetic",e.translate(s.left,s.top);for(var p=0;p<a.lines;p++){if(l=i.strokeThickness/2,c=i.strokeThickness/2+p*a.lineHeight+r.ascent,0<p&&(c+=a.lineSpacing*p),i.rtl)l=u-l;else if("right"===i.align)l+=h-a.lineWidths[p];else if("center"===i.align)l+=(h-a.lineWidths[p])/2;else if("justify"===i.align&&.85<=a.lineWidths[p]/a.width){var f=a.width-a.lineWidths[p],g=e.measureText(" ").width,m=o[p].trim(),y=m.split(" ");f+=(o[p].length-m.length)*g;for(var v=Math.floor(f/g),x=0;0<v;)y[x]+=" ",x=(x+1)%(y.length-1||1),--v;o[p]=y.join(" ")}this.autoRound&&(l=Math.round(l),c=Math.round(c)),i.strokeThickness&&(this.style.syncShadow(e,i.shadowStroke),e.strokeText(o[p],l,c)),i.color&&(this.style.syncShadow(e,i.shadowFill),e.fillText(o[p],l,c))}e.restore(),this.renderer&&this.renderer.gl&&(this.frame.source.glTexture=this.renderer.canvasToTexture(t,this.frame.source.glTexture,!0),this.frame.glTexture=this.frame.source.glTexture),this.dirty=!0;n=this.input;return n&&!n.customHitArea&&(n.hitArea.width=this.width,n.hitArea.height=this.height),this}},n.strokePath=function(){Phaser.Renderer.WebGL.Pipelines.MultiPipeline.prototype.batchLine=function(t,e,i,n,r,s,o,a,h,l,c){this.renderer.pipelines.set(this);var u=this.calcMatrix,c=(c&&c.multiply(l,u),i-t),l=n-e,c=Math.sqrt(c*c+l*l),l=r*(n-e)/c,r=r*(t-i)/c,d=s*(n-e)/c,s=s*(t-i)/c,c=i-d,p=n-s,f=t-l,g=e-r,i=i+d,d=n+s,n=t+l,s=e+r,t=u.getX(c,p),l=u.getY(c,p),e=u.getX(f,g),r=u.getY(f,g),c=u.getX(i,d),p=u.getY(i,d),f=u.getX(n,s),g=u.getY(n,s),i=this.strokeTint,d=i.TL,u=i.TR,n=i.BL,s=i.BR;this.batchQuad(null,f,g,e,r,t,l,c,p,0,0,1,1,d,u,n,s,2)}},n.setVisibility=function(t){t.events.on(Phaser.Core.Events.HIDDEN,function(){e.suspend()}),t.events.on(Phaser.Core.Events.VISIBLE,function(){e.resume()});var e=t.sound.context},n.deleteInstanceFromAtlasJSON=function(){Phaser.Textures.Parsers.JSONArray=function(t,e,i){if(i.frames||i.textures){var n=t.source[e];t.add("__BASE",e,0,0,n.width,n.height);for(var r,s=(Array.isArray(i.textures)?i.textures[e]:i).frames,o=0;o<s.length;o++){var a=s[o],h=t.add(a.filename.replace("instance ",""),e,a.frame.x,a.frame.y,a.frame.w,a.frame.h),l=(a.trimmed&&h.setTrim(a.sourceSize.w,a.sourceSize.h,a.spriteSourceSize.x,a.spriteSourceSize.y,a.spriteSourceSize.w,a.spriteSourceSize.h),a.rotated&&(h.rotated=!0,h.updateUVsInverted()),a.anchor||a.pivot);l&&(h.customPivot=!0,h.pivotX=l.x,h.pivotY=l.y),h.customData=Phaser.Utils.Objects.Clone(a)}for(r in i)"frames"!==r&&(Array.isArray(i[r])?t.customData[r]=i[r].slice(0):t.customData[r]=i[r]);return t}}},n.setBitmapTextSize=function(){function r(t,B,F,e){if(void 0===F&&(F=!1),!(e=void 0===e?null:e))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 i=90,N=74;it.Fonts.Main===it.Fonts.Garet&&(i=70,N=66);var z,Y,n,r=t.text,X=r.length,U=t.maxWidth*t.scaleX,V=t.wordWrapCharCode,s=Number.MAX_VALUE,o=Number.MAX_VALUE,a=0,h=0,G=t.fontData.chars,j=t.letterSpacing,l=0,c=0,u=0,d=null,W=t._align,p=0,f=0,g=t.fontSize/t.fontData.size,m=g*t.scaleX,y=g*t.scaleY,v=null,H=0,x=[],b=Number.MAX_VALUE,w=0,K=0,T=0,S=[],q=[],P=null;if(0<U){for(M=0;M<X;M++)10!==(u=r.charCodeAt(M))?(d=G[u])&&(n=void 0,null!==v&&(n=d.kerning[H]),u===V?null!==P&&(S.push({word:P.word,i:P.i,x:P.x*m,y:P.y*y,w:P.w*m,h:P.h*y,cr:!1}),P=null):((P=null===P?{word:"",i:M,x:l,y:c,w:0,h:i,cr:!1}:P).word=P.word.concat(r[M]),P.w+=d.xOffset+d.xAdvance+(void 0!==n?n:0)),l+=d.xAdvance+j,v=d,H=u):(null!==P&&(S.push({word:P.word,i:P.i,x:P.x*m,y:P.y*y,w:P.w*m,h:P.h*y,cr:!0}),P=null),l=0,c+=i,v=null);null!==P&&S.push({word:P.word,i:P.i,x:P.x*m,y:P.y*y,w:P.w*m,h:P.h*y,cr:!1});for(var l=0,c=0,v=null,H=0,_=void 0,E=0,A=[],M=0;M<S.length;M++){var k=S[M],J=k.x,Z=k.x+k.w;_&&(E=J-(J-(_.x+_.w)+_.w),_=null),U<J-E||U<Z-E?(A.push(k.i-1),_=k.cr?(A.push(k.i+k.word.length),E=0,null):k):k.cr&&(A.push(k.i+k.word.length),E=0,_=null)}for(M=A.length-1;0<=M;M--)0<=A[M]&&(z=r,Y=A[M],r=z.substr(0,Y)+"\n"+z.substr(Y+1));X=(e.wrappedText=r).length,S=[],P=null}var C,Q,$,tt=0;for(M=0;M<X;M++)10!==(u=r.charCodeAt(M))?(d=G[u])&&(p=l,f=c,C=void 0,null!==v&&(p+=void 0!==(C=d.kerning[H])?C:0),p<s&&(s=p),f<o&&(o=f),a<(Q=p+d.xAdvance)&&(a=Q),h<($=f+i)&&(h=$),$=d.xOffset+d.xAdvance+(void 0!==C?C:0),u===V?null!==P&&(S.push({word:P.word,i:P.i,x:P.x*m,y:P.y*y,w:P.w*m,h:P.h*y}),P=null):((P=null===P?{word:"",i:tt,x:l,y:c,w:0,h:i}:P).word=P.word.concat(r[M]),P.w+=$),q.push({i:tt,char:r[M],code:u,x:(d.xOffset+l)*g,y:(d.yOffset+c)*g,w:d.width*g,h:d.height*g,t:c*g,r:Q*g,b:i*g,line:K,glyph:d}),l+=d.xAdvance+j,v=d,H=u,T=Q*g,tt++):(null!==P&&(S.push({word:P.word,i:P.i,x:P.x*m,y:P.y*y,w:P.w*m,h:P.h*y}),P=null),l=0,c+=N,v=null,w<(x[K]=T)&&(w=T),T<b&&(b=T),K++,T=0);if(null!==P&&S.push({word:P.word,i:P.i,x:P.x*m,y:P.y*y,w:P.w*m,h:P.h*y}),w<(x[K]=T)&&(w=T),T<b&&(b=T),0<W)for(var et=0;et<q.length;et++){var O,R=q[et];1===W?(O=(w-x[R.line])/2,R.x+=O,R.r+=O):2===W&&(O=w-x[R.line],R.x+=O,R.r+=O)}var L=e.local,D=e.global,I=e.lines;L.x=s*g,L.y=o*g,L.width=a*g,L.height=h*g,D.x=t.x-t._displayOriginX+s*m,D.y=t.y-t._displayOriginY+o*y,D.width=a*m,D.height=h*y,I.shortest=b,I.longest=w,I.lengths=x,B&&(L.x=Math.ceil(L.x),L.y=Math.ceil(L.y),L.width=Math.ceil(L.width),L.height=Math.ceil(L.height),D.x=Math.ceil(D.x),D.y=Math.ceil(D.y),D.width=Math.ceil(D.width),D.height=Math.ceil(D.height),I.shortest=Math.ceil(b),I.longest=Math.ceil(w)),F&&(t._displayOriginX=t.originX*L.width,t._displayOriginY=t.originY*L.height,D.x=t.x-t._displayOriginX*t.scaleX,D.y=t.y-t._displayOriginY*t.scaleY,B&&(D.x=Math.ceil(D.x),D.y=Math.ceil(D.y))),e.words=S,e.characters=q,e.lines.height=i,e.scale=g,e.scaleX=t.scaleX,e.scaleY=t.scaleY}Phaser.GameObjects.BitmapText.prototype.getTextBounds=function(t){var e=this._bounds;return(this._dirty||t||this.scaleX!==e.scaleX||this.scaleY!==e.scaleY)&&(r(this,t,!0,e),this._dirty=!1),e},Phaser.GameObjects.BitmapText.prototype.setFont=function(t,e,i){var n;return void 0===e&&(e=this._fontSize),void 0===i&&(i=this._align),t!==this.font&&(n=this.scene.sys.cache.bitmapFont.get(t))&&(this.font=t,this.fontData=n.data,this._fontSize=e,this._align=i,this.fromAtlas=!0===n.fromAtlas,this.setTexture(n.texture,n.frame),r(this,!1,!0,this._bounds)),this}},e.NativeChanges=n}]);