parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c0?1:-1}),Number.isInteger||(Number.isInteger=function(n){return"number"==typeof n&&isFinite(n)&&Math.floor(n)===n}),window.ArrayBuffer||(window.ArrayBuffer=Array),window.Float32Array||(window.Float32Array=Array),window.Uint32Array||(window.Uint32Array=Array),window.Uint16Array||(window.Uint16Array=Array),window.Uint8Array||(window.Uint8Array=Array),window.Int32Array||(window.Int32Array=Array); },{"es6-promise-polyfill":"aj4z","object-assign":"J4Nk"}],"UGVv":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=m;var e=/iPhone/i,i=/iPod/i,o=/iPad/i,t=/\biOS-universal(?:.+)Mac\b/i,n=/\bAndroid(?:.+)Mobile\b/i,r=/Android/i,a=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,d=/Silk/i,l=/Windows Phone/i,p=/\bWindows(?:.+)ARM\b/i,s=/BlackBerry/i,u=/BB10/i,b=/Opera Mini/i,c=/\b(CriOS|Chrome)(?:.+)Mobile/i,h=/Mobile(?:.+)Firefox\b/i,v=function(e){return void 0!==e&&"MacIntel"===e.platform&&"number"==typeof e.maxTouchPoints&&e.maxTouchPoints>1&&"undefined"==typeof MSStream};function f(e){return function(i){return i.test(e)}}function m(m){var g={userAgent:"",platform:"",maxTouchPoints:0};m||"undefined"==typeof navigator?"string"==typeof m?g.userAgent=m:m&&m.userAgent&&(g={userAgent:m.userAgent,platform:m.platform,maxTouchPoints:m.maxTouchPoints||0}):g={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0};var A=g.userAgent,P=A.split("[FBAN");void 0!==P[1]&&(A=P[0]),void 0!==(P=A.split("Twitter"))[1]&&(A=P[0]);var w=f(A),x={apple:{phone:w(e)&&!w(l),ipod:w(i),tablet:!w(e)&&(w(o)||v(g))&&!w(l),universal:w(t),device:(w(e)||w(i)||w(o)||w(t)||v(g))&&!w(l)},amazon:{phone:w(a),tablet:!w(a)&&w(d),device:w(a)||w(d)},android:{phone:!w(l)&&w(a)||!w(l)&&w(n),tablet:!w(l)&&!w(a)&&!w(n)&&(w(d)||w(r)),device:!w(l)&&(w(a)||w(d)||w(n)||w(r))||w(/\bokhttp\b/i)},windows:{phone:w(l),tablet:w(p),device:w(l)||w(p)},other:{blackberry:w(s),blackberry10:w(u),opera:w(b),firefox:w(h),chrome:w(c),device:w(s)||w(u)||w(b)||w(h)||w(c)},any:!1,phone:!1,tablet:!1};return x.any=x.apple.device||x.android.device||x.windows.device||x.other.device,x.phone=x.apple.phone||x.android.phone||x.windows.phone,x.tablet=x.apple.tablet||x.android.tablet||x.windows.tablet,x} },{}],"KzjX":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e={};Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return t.default}});var t=n(require("./isMobile"));function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(r=function(e){return e?n:t})(e)}function n(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=r(t);if(n&&n.has(e))return n.get(e);var o={},u=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var f in e)if("default"!==f&&Object.prototype.hasOwnProperty.call(e,f)){var a=u?Object.getOwnPropertyDescriptor(e,f):null;a&&(a.get||a.set)?Object.defineProperty(o,f,a):o[f]=e[f]}return o.default=e,n&&n.set(e,o),o}Object.keys(t).forEach(function(r){"default"!==r&&"__esModule"!==r&&(Object.prototype.hasOwnProperty.call(e,r)||r in exports&&exports[r]===t[r]||Object.defineProperty(exports,r,{enumerable:!0,get:function(){return t[r]}}))}); },{"./isMobile":"UGVv"}],"t4Uo":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.settings=exports.isMobile=void 0;var e=r(require("ismobilejs"));function r(e){return e&&e.__esModule?e:{default:e}}var i=(0,e.default)(window.navigator);function t(e){var r=!0;if(i.tablet||i.phone){var t;if(i.apple.device)if(t=navigator.userAgent.match(/OS (\d+)_(\d+)?/))parseInt(t[1],10)<11&&(r=!1);if(i.android.device)if(t=navigator.userAgent.match(/Android\s([0-9.]*)/))parseInt(t[1],10)<7&&(r=!1)}return r?e:4}function a(){return!i.apple.device}exports.isMobile=i;var n={MIPMAP_TEXTURES:1,ANISOTROPIC_LEVEL:0,RESOLUTION:1,FILTER_RESOLUTION:1,SPRITE_MAX_TEXTURES:t(32),SPRITE_BATCH_SIZE:4096,RENDER_OPTIONS:{view:null,antialias:!1,autoDensity:!1,transparent:!1,backgroundColor:0,clearBeforeRender:!0,preserveDrawingBuffer:!1,width:800,height:600,legacy:!1},GC_MODE:0,GC_MAX_IDLE:3600,GC_MAX_CHECK_COUNT:600,WRAP_MODE:33071,SCALE_MODE:1,PRECISION_VERTEX:"highp",PRECISION_FRAGMENT:i.apple.device?"highp":"mediump",CAN_UPLOAD_SAME_BUFFER:a(),CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1};exports.settings=n; },{"ismobilejs":"KzjX"}],"2JJl":[function(require,module,exports) { "use strict";var e=Object.prototype.hasOwnProperty,t="~";function n(){}function r(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,n,o,s,i){if("function"!=typeof o)throw new TypeError("The listener must be a function");var c=new r(o,s||e,i),f=t?t+n:n;return e._events[f]?e._events[f].fn?e._events[f]=[e._events[f],c]:e._events[f].push(c):(e._events[f]=c,e._eventsCount++),e}function s(e,t){0==--e._eventsCount?e._events=new n:delete e._events[t]}function i(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(t=!1)),i.prototype.eventNames=function(){var n,r,o=[];if(0===this._eventsCount)return o;for(r in n=this._events)e.call(n,r)&&o.push(t?r.slice(1):r);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(n)):o},i.prototype.listeners=function(e){var n=t?t+e:e,r=this._events[n];if(!r)return[];if(r.fn)return[r.fn];for(var o=0,s=r.length,i=new Array(s);o80*x){i=v=e[0],u=o=e[1];for(var Z=x;Zv&&(v=p),a>o&&(o=a);y=0!==(y=Math.max(v-i,o-u))?32767/y:0}return r(s,c,x,i,u,y,0),c}function n(e,n,t,r,x){var i,u;if(x===D(e,n,t,r)>0)for(i=n;i=n;i-=r)u=A(i,e[i],e[i+1],u);return u&&w(u,u.next)&&(B(u),u=u.next),u}function t(e,n){if(!e)return e;n||(n=e);var t,r=e;do{if(t=!1,r.steiner||!w(r,r.next)&&0!==g(r.prev,r,r.next))r=r.next;else{if(B(r),(r=n=r.prev)===r.next)break;t=!0}}while(t||r!==n);return n}function r(e,n,f,o,p,a,y){if(e){!y&&a&&h(e,o,p,a);for(var l,s,c=e;e.prev!==e.next;)if(l=e.prev,s=e.next,a?i(e,o,p,a):x(e))n.push(l.i/f|0),n.push(e.i/f|0),n.push(s.i/f|0),B(e),e=s.next,c=s.next;else if((e=s)===c){y?1===y?r(e=u(t(e),n,f),n,f,o,p,a,2):2===y&&v(e,n,f,o,p,a):r(t(e),n,f,o,p,a,1);break}}}function x(e){var n=e.prev,t=e,r=e.next;if(g(n,t,r)>=0)return!1;for(var x=n.x,i=t.x,u=r.x,v=n.y,f=t.y,o=r.y,p=xi?x>u?x:u:i>u?i:u,h=v>f?v>o?v:o:f>o?f:o,l=r.next;l!==n;){if(l.x>=p&&l.x<=y&&l.y>=a&&l.y<=h&&Z(x,v,i,f,u,o,l.x,l.y)&&g(l.prev,l,l.next)>=0)return!1;l=l.next}return!0}function i(e,n,t,r){var x=e.prev,i=e,u=e.next;if(g(x,i,u)>=0)return!1;for(var v=x.x,f=i.x,o=u.x,p=x.y,a=i.y,y=u.y,h=vf?v>o?v:o:f>o?f:o,d=p>a?p>y?p:y:a>y?a:y,w=s(h,l,n,t,r),M=s(c,d,n,t,r),z=e.prevZ,m=e.nextZ;z&&z.z>=w&&m&&m.z<=M;){if(z.x>=h&&z.x<=c&&z.y>=l&&z.y<=d&&z!==x&&z!==u&&Z(v,p,f,a,o,y,z.x,z.y)&&g(z.prev,z,z.next)>=0)return!1;if(z=z.prevZ,m.x>=h&&m.x<=c&&m.y>=l&&m.y<=d&&m!==x&&m!==u&&Z(v,p,f,a,o,y,m.x,m.y)&&g(m.prev,m,m.next)>=0)return!1;m=m.nextZ}for(;z&&z.z>=w;){if(z.x>=h&&z.x<=c&&z.y>=l&&z.y<=d&&z!==x&&z!==u&&Z(v,p,f,a,o,y,z.x,z.y)&&g(z.prev,z,z.next)>=0)return!1;z=z.prevZ}for(;m&&m.z<=M;){if(m.x>=h&&m.x<=c&&m.y>=l&&m.y<=d&&m!==x&&m!==u&&Z(v,p,f,a,o,y,m.x,m.y)&&g(m.prev,m,m.next)>=0)return!1;m=m.nextZ}return!0}function u(e,n,r){var x=e;do{var i=x.prev,u=x.next.next;!w(i,u)&&M(i,x,x.next,u)&&k(i,u)&&k(u,i)&&(n.push(i.i/r|0),n.push(x.i/r|0),n.push(u.i/r|0),B(x),B(x.next),x=e=u),x=x.next}while(x!==e);return t(x)}function v(e,n,x,i,u,v){var f=e;do{for(var o=f.next.next;o!==f.prev;){if(f.i!==o.i&&d(f,o)){var p=q(f,o);return f=t(f,f.next),p=t(p,p.next),r(f,n,x,i,u,v,0),void r(p,n,x,i,u,v,0)}o=o.next}f=f.next}while(f!==e)}function f(e,t,r,x){var i,u,v,f=[];for(i=0,u=t.length;i=r.next.y&&r.next.y!==r.y){var v=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(v<=x&&v>u&&(u=v,t=r.x=r.x&&r.x>=p&&x!==r.x&&Z(it.x||r.x===t.x&&y(t,r)))&&(t=r,h=f)),r=r.next}while(r!==o);return t}function y(e,n){return g(e.prev,e,n.prev)<0&&g(n.next,e,e.next)<0}function h(e,n,t,r){var x=e;do{0===x.z&&(x.z=s(x.x,x.y,n,t,r)),x.prevZ=x.prev,x.nextZ=x.next,x=x.next}while(x!==e);x.prevZ.nextZ=null,x.prevZ=null,l(x)}function l(e){var n,t,r,x,i,u,v,f,o=1;do{for(t=e,e=null,i=null,u=0;t;){for(u++,r=t,v=0,n=0;n0||f>0&&r;)0!==v&&(0===f||!r||t.z<=r.z)?(x=t,t=t.nextZ,v--):(x=r,r=r.nextZ,f--),i?i.nextZ=x:e=x,x.prevZ=i,i=x;t=r}i.nextZ=null,o*=2}while(u>1);return e}function s(e,n,t,r,x){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-t)*x|0)|e<<8))|e<<4))|e<<2))|e<<1))|(n=1431655765&((n=858993459&((n=252645135&((n=16711935&((n=(n-r)*x|0)|n<<8))|n<<4))|n<<2))|n<<1))<<1}function c(e){var n=e,t=e;do{(n.x=(e-u)*(i-v)&&(e-u)*(r-v)>=(t-u)*(n-v)&&(t-u)*(i-v)>=(x-u)*(r-v)}function d(e,n){return e.next.i!==n.i&&e.prev.i!==n.i&&!b(e,n)&&(k(e,n)&&k(n,e)&&j(e,n)&&(g(e.prev,e,n.prev)||g(e,n.prev,n))||w(e,n)&&g(e.prev,e,e.next)>0&&g(n.prev,n,n.next)>0)}function g(e,n,t){return(n.y-e.y)*(t.x-n.x)-(n.x-e.x)*(t.y-n.y)}function w(e,n){return e.x===n.x&&e.y===n.y}function M(e,n,t,r){var x=m(g(e,n,t)),i=m(g(e,n,r)),u=m(g(t,r,e)),v=m(g(t,r,n));return x!==i&&u!==v||(!(0!==x||!z(e,t,n))||(!(0!==i||!z(e,r,n))||(!(0!==u||!z(t,e,r))||!(0!==v||!z(t,n,r)))))}function z(e,n,t){return n.x<=Math.max(e.x,t.x)&&n.x>=Math.min(e.x,t.x)&&n.y<=Math.max(e.y,t.y)&&n.y>=Math.min(e.y,t.y)}function m(e){return e>0?1:e<0?-1:0}function b(e,n){var t=e;do{if(t.i!==e.i&&t.next.i!==e.i&&t.i!==n.i&&t.next.i!==n.i&&M(t,t.next,e,n))return!0;t=t.next}while(t!==e);return!1}function k(e,n){return g(e.prev,e,e.next)<0?g(e,n,e.next)>=0&&g(e,e.prev,n)>=0:g(e,n,e.prev)<0||g(e,e.next,n)<0}function j(e,n){var t=e,r=!1,x=(e.x+n.x)/2,i=(e.y+n.y)/2;do{t.y>i!=t.next.y>i&&t.next.y!==t.y&&x<(t.next.x-t.x)*(i-t.y)/(t.next.y-t.y)+t.x&&(r=!r),t=t.next}while(t!==e);return r}function q(e,n){var t=new C(e.i,e.x,e.y),r=new C(n.i,n.x,n.y),x=e.next,i=n.prev;return e.next=n,n.prev=e,t.next=x,x.prev=t,r.next=t,t.prev=r,i.next=r,r.prev=i,r}function A(e,n,t,r){var x=new C(e,n,t);return r?(x.next=r.next,x.prev=r,r.next.prev=x,r.next=x):(x.prev=x,x.next=x),x}function B(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function C(e,n,t){this.i=e,this.x=n,this.y=t,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function D(e,n,t,r){for(var x=0,i=n,u=t-r;i0&&(r+=e[x-1].length,t.holes.push(r))}return t}; },{}],"FIMm":[function(require,module,exports) { var global = arguments[3]; var define; var o,e=arguments[3];!function(n){var r="object"==typeof exports&&exports&&!exports.nodeType&&exports,t="object"==typeof module&&module&&!module.nodeType&&module,u="object"==typeof e&&e;u.global!==u&&u.window!==u&&u.self!==u||(n=u);var i,f,c=2147483647,l=36,s=1,p=26,a=38,d=700,h=72,v=128,g="-",w=/^xn--/,x=/[^\x20-\x7E]/,y=/[\x2E\u3002\uFF0E\uFF61]/g,m={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},C=l-s,b=Math.floor,j=String.fromCharCode;function A(o){throw new RangeError(m[o])}function I(o,e){for(var n=o.length,r=[];n--;)r[n]=e(o[n]);return r}function E(o,e){var n=o.split("@"),r="";return n.length>1&&(r=n[0]+"@",o=n[1]),r+I((o=o.replace(y,".")).split("."),e).join(".")}function F(o){for(var e,n,r=[],t=0,u=o.length;t=55296&&e<=56319&&t65535&&(e+=j((o-=65536)>>>10&1023|55296),o=56320|1023&o),e+=j(o)}).join("")}function S(o,e){return o+22+75*(o<26)-((0!=e)<<5)}function T(o,e,n){var r=0;for(o=n?b(o/d):o>>1,o+=b(o/e);o>C*p>>1;r+=l)o=b(o/C);return b(r+(C+1)*o/(o+a))}function L(o){var e,n,r,t,u,i,f,a,d,w,x,y=[],m=o.length,C=0,j=v,I=h;for((n=o.lastIndexOf(g))<0&&(n=0),r=0;r=128&&A("not-basic"),y.push(o.charCodeAt(r));for(t=n>0?n+1:0;t=m&&A("invalid-input"),((a=(x=o.charCodeAt(t++))-48<10?x-22:x-65<26?x-65:x-97<26?x-97:l)>=l||a>b((c-C)/i))&&A("overflow"),C+=a*i,!(a<(d=f<=I?s:f>=I+p?p:f-I));f+=l)i>b(c/(w=l-d))&&A("overflow"),i*=w;I=T(C-u,e=y.length+1,0==u),b(C/e)>c-j&&A("overflow"),j+=b(C/e),C%=e,y.splice(C++,0,j)}return O(y)}function M(o){var e,n,r,t,u,i,f,a,d,w,x,y,m,C,I,E=[];for(y=(o=F(o)).length,e=v,n=0,u=h,i=0;i=e&&xb((c-n)/(m=r+1))&&A("overflow"),n+=(f-e)*m,e=f,i=0;ic&&A("overflow"),x==e){for(a=n,d=l;!(a<(w=d<=u?s:d>=u+p?p:d-u));d+=l)I=a-w,C=l-w,E.push(j(S(w+I%C,0))),a=b(I/C);E.push(j(S(a,0))),u=T(n,m,r==t),n=0,++r}++n,++e}return E.join("")}if(i={version:"1.4.1",ucs2:{decode:F,encode:O},decode:L,encode:M,toASCII:function(o){return E(o,function(o){return x.test(o)?"xn--"+M(o):o})},toUnicode:function(o){return E(o,function(o){return w.test(o)?L(o.slice(4).toLowerCase()):o})}},"function"==typeof o&&"object"==typeof o.amd&&o.amd)o("punycode",function(){return i});else if(r&&t)if(module.exports==r)t.exports=i;else for(f in i)i.hasOwnProperty(f)&&(r[f]=i[f]);else n.punycode=i}(this); },{}],"5YsI":[function(require,module,exports) { "use strict";module.exports={isString:function(n){return"string"==typeof n},isObject:function(n){return"object"==typeof n&&null!==n},isNull:function(n){return null===n},isNullOrUndefined:function(n){return null==n}}; },{}],"J6GP":[function(require,module,exports) { "use strict";function r(r,e){return Object.prototype.hasOwnProperty.call(r,e)}module.exports=function(t,n,o,a){n=n||"&",o=o||"=";var s={};if("string"!=typeof t||0===t.length)return s;var p=/\+/g;t=t.split(n);var u=1e3;a&&"number"==typeof a.maxKeys&&(u=a.maxKeys);var c=t.length;u>0&&c>u&&(c=u);for(var i=0;i=0?(y=b.substr(0,d),l=b.substr(d+1)):(y=b,l=""),f=decodeURIComponent(y),v=decodeURIComponent(l),r(s,f)?e(s[f])?s[f].push(v):s[f]=[s[f],v]:s[f]=v}return s};var e=Array.isArray||function(r){return"[object Array]"===Object.prototype.toString.call(r)}; },{}],"bvhO":[function(require,module,exports) { "use strict";var n=function(n){switch(typeof n){case"string":return n;case"boolean":return n?"true":"false";case"number":return isFinite(n)?n:"";default:return""}};module.exports=function(o,u,c,a){return u=u||"&",c=c||"=",null===o&&(o=void 0),"object"==typeof o?r(t(o),function(t){var a=encodeURIComponent(n(t))+c;return e(o[t])?r(o[t],function(e){return a+encodeURIComponent(n(e))}).join(u):a+encodeURIComponent(n(o[t]))}).join(u):a?encodeURIComponent(n(a))+c+encodeURIComponent(n(o)):""};var e=Array.isArray||function(n){return"[object Array]"===Object.prototype.toString.call(n)};function r(n,e){if(n.map)return n.map(e);for(var r=[],t=0;t",'"',"`"," ","\r","\n","\t"],n=["{","}","|","\\","^","`"].concat(o),i=["'"].concat(n),l=["%","/","?",";","#"].concat(i),p=["/","?","#"],c=255,u=/^[+a-z0-9A-Z_-]{0,63}$/,f=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},v={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=require("querystring");function b(t,e,a){if(t&&s.isObject(t)&&t instanceof h)return t;var r=new h;return r.parse(t,e,a),r}function q(t){return s.isString(t)&&(t=b(t)),t instanceof h?t.format():h.prototype.format.call(t)}function O(t,s){return b(t,!1,!0).resolve(s)}function d(t,s){return t?b(t,!1,!0).resolveObject(s):s}h.prototype.parse=function(h,a,o){if(!s.isString(h))throw new TypeError("Parameter 'url' must be a string, not "+typeof h);var n=h.indexOf("?"),b=-1!==n&&n127?z+="x":z+=$[H];if(!z.match(u)){var Z=R.slice(0,U),_=R.slice(U+1),E=$.match(f);E&&(Z.push(E[1]),_.unshift(E[2])),_.length&&(O="/"+_.join(".")+O),this.hostname=Z.join(".");break}}}this.hostname.length>c?this.hostname="":this.hostname=this.hostname.toLowerCase(),N||(this.hostname=t.toASCII(this.hostname));var P=this.port?":"+this.port:"",T=this.hostname||"";this.host=T+P,this.href+=this.host,N&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==O[0]&&(O="/"+O))}if(!m[x])for(U=0,S=i.length;U0)&&a.host.split("@"))&&(a.auth=k.shift(),a.host=a.hostname=k.shift());return a.search=t.search,a.query=t.query,s.isNull(a.pathname)&&s.isNull(a.search)||(a.path=(a.pathname?a.pathname:"")+(a.search?a.search:"")),a.href=a.format(),a}if(!x.length)return a.pathname=null,a.search?a.path="/"+a.search:a.path=null,a.href=a.format(),a;for(var C=x.slice(-1)[0],I=(a.host||t.host||x.length>1)&&("."===C||".."===C)||""===C,w=0,U=x.length;U>=0;U--)"."===(C=x[U])?x.splice(U,1):".."===C?(x.splice(U,1),w++):w&&(x.splice(U,1),w--);if(!d&&!j)for(;w--;w)x.unshift("..");!d||""===x[0]||x[0]&&"/"===x[0].charAt(0)||x.unshift(""),I&&"/"!==x.join("/").substr(-1)&&x.push("");var k,N=""===x[0]||x[0]&&"/"===x[0].charAt(0);A&&(a.hostname=a.host=N?"":x.length?x.shift():"",(k=!!(a.host&&a.host.indexOf("@")>0)&&a.host.split("@"))&&(a.auth=k.shift(),a.host=a.hostname=k.shift()));return(d=d||a.host&&x.length)&&!N&&x.unshift(""),x.length?a.pathname=x.join("/"):(a.pathname=null,a.path=null),s.isNull(a.pathname)&&s.isNull(a.search)||(a.path=(a.pathname?a.pathname:"")+(a.search?a.search:"")),a.auth=t.auth||a.auth,a.slashes=a.slashes||t.slashes,a.href=a.format(),a},h.prototype.parseHost=function(){var t=this.host,s=a.exec(t);s&&(":"!==(s=s[0])&&(this.port=s.substr(1)),t=t.substr(0,t.length-s.length)),t&&(this.hostname=t)}; },{"punycode":"FIMm","./util":"5YsI","querystring":"+00f"}],"LQBK":[function(require,module,exports) { "use strict";var E,_,T,A,R,N,O,S,L,I,P,M,U,D,C,o,t;Object.defineProperty(exports,"__esModule",{value:!0}),exports.WRAP_MODES=exports.TYPES=exports.TARGETS=exports.SCALE_MODES=exports.RENDERER_TYPE=exports.PRECISION=exports.MSAA_QUALITY=exports.MIPMAP_MODES=exports.MASK_TYPES=exports.GC_MODES=exports.FORMATS=exports.ENV=exports.DRAW_MODES=exports.CLEAR_MODES=exports.BUFFER_BITS=exports.BLEND_MODES=exports.ALPHA_MODES=void 0,exports.ENV=E,function(E){E[E.WEBGL_LEGACY=0]="WEBGL_LEGACY",E[E.WEBGL=1]="WEBGL",E[E.WEBGL2=2]="WEBGL2"}(E||(exports.ENV=E={})),exports.RENDERER_TYPE=_,function(E){E[E.UNKNOWN=0]="UNKNOWN",E[E.WEBGL=1]="WEBGL",E[E.CANVAS=2]="CANVAS"}(_||(exports.RENDERER_TYPE=_={})),exports.BUFFER_BITS=T,function(E){E[E.COLOR=16384]="COLOR",E[E.DEPTH=256]="DEPTH",E[E.STENCIL=1024]="STENCIL"}(T||(exports.BUFFER_BITS=T={})),exports.BLEND_MODES=A,function(E){E[E.NORMAL=0]="NORMAL",E[E.ADD=1]="ADD",E[E.MULTIPLY=2]="MULTIPLY",E[E.SCREEN=3]="SCREEN",E[E.OVERLAY=4]="OVERLAY",E[E.DARKEN=5]="DARKEN",E[E.LIGHTEN=6]="LIGHTEN",E[E.COLOR_DODGE=7]="COLOR_DODGE",E[E.COLOR_BURN=8]="COLOR_BURN",E[E.HARD_LIGHT=9]="HARD_LIGHT",E[E.SOFT_LIGHT=10]="SOFT_LIGHT",E[E.DIFFERENCE=11]="DIFFERENCE",E[E.EXCLUSION=12]="EXCLUSION",E[E.HUE=13]="HUE",E[E.SATURATION=14]="SATURATION",E[E.COLOR=15]="COLOR",E[E.LUMINOSITY=16]="LUMINOSITY",E[E.NORMAL_NPM=17]="NORMAL_NPM",E[E.ADD_NPM=18]="ADD_NPM",E[E.SCREEN_NPM=19]="SCREEN_NPM",E[E.NONE=20]="NONE",E[E.SRC_OVER=0]="SRC_OVER",E[E.SRC_IN=21]="SRC_IN",E[E.SRC_OUT=22]="SRC_OUT",E[E.SRC_ATOP=23]="SRC_ATOP",E[E.DST_OVER=24]="DST_OVER",E[E.DST_IN=25]="DST_IN",E[E.DST_OUT=26]="DST_OUT",E[E.DST_ATOP=27]="DST_ATOP",E[E.ERASE=26]="ERASE",E[E.SUBTRACT=28]="SUBTRACT",E[E.XOR=29]="XOR"}(A||(exports.BLEND_MODES=A={})),exports.DRAW_MODES=R,function(E){E[E.POINTS=0]="POINTS",E[E.LINES=1]="LINES",E[E.LINE_LOOP=2]="LINE_LOOP",E[E.LINE_STRIP=3]="LINE_STRIP",E[E.TRIANGLES=4]="TRIANGLES",E[E.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",E[E.TRIANGLE_FAN=6]="TRIANGLE_FAN"}(R||(exports.DRAW_MODES=R={})),exports.FORMATS=N,function(E){E[E.RGBA=6408]="RGBA",E[E.RGB=6407]="RGB",E[E.ALPHA=6406]="ALPHA",E[E.LUMINANCE=6409]="LUMINANCE",E[E.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",E[E.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",E[E.DEPTH_STENCIL=34041]="DEPTH_STENCIL"}(N||(exports.FORMATS=N={})),exports.TARGETS=O,function(E){E[E.TEXTURE_2D=3553]="TEXTURE_2D",E[E.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",E[E.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",E[E.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",E[E.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",E[E.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",E[E.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",E[E.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",E[E.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z"}(O||(exports.TARGETS=O={})),exports.TYPES=S,function(E){E[E.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",E[E.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",E[E.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",E[E.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",E[E.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",E[E.FLOAT=5126]="FLOAT",E[E.HALF_FLOAT=36193]="HALF_FLOAT"}(S||(exports.TYPES=S={})),exports.SCALE_MODES=L,function(E){E[E.NEAREST=0]="NEAREST",E[E.LINEAR=1]="LINEAR"}(L||(exports.SCALE_MODES=L={})),exports.WRAP_MODES=I,function(E){E[E.CLAMP=33071]="CLAMP",E[E.REPEAT=10497]="REPEAT",E[E.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"}(I||(exports.WRAP_MODES=I={})),exports.MIPMAP_MODES=P,function(E){E[E.OFF=0]="OFF",E[E.POW2=1]="POW2",E[E.ON=2]="ON"}(P||(exports.MIPMAP_MODES=P={})),exports.ALPHA_MODES=M,function(E){E[E.NPM=0]="NPM",E[E.UNPACK=1]="UNPACK",E[E.PMA=2]="PMA",E[E.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",E[E.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",E[E.PREMULTIPLY_ALPHA=2]="PREMULTIPLY_ALPHA"}(M||(exports.ALPHA_MODES=M={})),exports.CLEAR_MODES=U,function(E){E[E.NO=0]="NO",E[E.YES=1]="YES",E[E.AUTO=2]="AUTO",E[E.BLEND=0]="BLEND",E[E.CLEAR=1]="CLEAR",E[E.BLIT=2]="BLIT"}(U||(exports.CLEAR_MODES=U={})),exports.GC_MODES=D,function(E){E[E.AUTO=0]="AUTO",E[E.MANUAL=1]="MANUAL"}(D||(exports.GC_MODES=D={})),exports.PRECISION=C,function(E){E.LOW="lowp",E.MEDIUM="mediump",E.HIGH="highp"}(C||(exports.PRECISION=C={})),exports.MASK_TYPES=o,function(E){E[E.NONE=0]="NONE",E[E.SCISSOR=1]="SCISSOR",E[E.STENCIL=2]="STENCIL",E[E.SPRITE=3]="SPRITE"}(o||(exports.MASK_TYPES=o={})),exports.MSAA_QUALITY=t,function(E){E[E.NONE=0]="NONE",E[E.LOW=2]="LOW",E[E.MEDIUM=4]="MEDIUM",E[E.HIGH=8]="HIGH"}(t||(exports.MSAA_QUALITY=t={})); },{}],"2G5T":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.DATA_URI=exports.CanvasRenderTarget=exports.BaseTextureCache=void 0,Object.defineProperty(exports,"EventEmitter",{enumerable:!0,get:function(){return t.default}}),exports.TextureCache=exports.ProgramCache=void 0,exports.clearTextureCache=W,exports.correctBlendMode=b,exports.createIndicesForQuads=D,exports.decomposeDataUri=z,exports.deprecation=I,exports.destroyTextureCache=U,exports.determineCrossOrigin=H,Object.defineProperty(exports,"earcut",{enumerable:!0,get:function(){return r.default}}),exports.getBufferType=O,exports.getResolutionOfUrl=V,exports.hex2rgb=g,exports.hex2string=x,exports.interleaveTypedArrays=M,Object.defineProperty(exports,"isMobile",{enumerable:!0,get:function(){return e.isMobile}}),exports.isPow2=P,exports.isWebGLSupported=d,exports.log2=N,exports.nextPow2=C,exports.premultiplyBlendMode=void 0,exports.premultiplyRgba=w,exports.premultiplyTint=A,exports.premultiplyTintToRgba=m,exports.removeItems=R,exports.rgb2hex=v,exports.sayHello=p,exports.sign=L,exports.skipHello=f,exports.string2hex=h,exports.trimCanvas=q,exports.uid=S,Object.defineProperty(exports,"url",{enumerable:!0,get:function(){return n.default}});var e=require("@pixi/settings"),t=s(require("eventemitter3")),r=s(require("earcut")),n=a(require("url")),o=require("@pixi/constants");function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}function a(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(n,a,s):n[a]=e[a]}return n.default=e,r&&r.set(e,n),n}function s(e){return e&&e.__esModule?e:{default:e}}e.settings.RETINA_PREFIX=/@([0-9\.]+)x/,e.settings.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!0;var c,u=!1,l="5.3.12";function f(){u=!0}function p(e){var t;if(!u){if(navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var r=["\n %c %c %c PixiJS "+l+" - ✰ "+e+" ✰ %c %c http://www.pixijs.com/ %c %c ♥%c♥%c♥ \n\n","background: #ff66a5; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff66a5; background: #030307; padding:5px 0;","background: #ff66a5; padding:5px 0;","background: #ffc3dc; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;"];(t=window.console).log.apply(t,r)}else window.console&&window.console.log("PixiJS "+l+" - "+e+" - http://www.pixijs.com/");u=!0}}function d(){return void 0===c&&(c=function(){var t={stencil:!0,failIfMajorPerformanceCaveat:e.settings.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!window.WebGLRenderingContext)return!1;var r=document.createElement("canvas"),n=r.getContext("webgl",t)||r.getContext("experimental-webgl",t),o=!(!n||!n.getContextAttributes().stencil);if(n){var i=n.getExtension("WEBGL_lose_context");i&&i.loseContext()}return n=null,o}catch(a){return!1}}()),c}function g(e,t){return void 0===t&&(t=[]),t[0]=(e>>16&255)/255,t[1]=(e>>8&255)/255,t[2]=(255&e)/255,t}function x(e){var t=e.toString(16);return"#"+(t="000000".substr(0,6-t.length)+t)}function h(e){return"string"==typeof e&&"#"===e[0]&&(e=e.substr(1)),parseInt(e,16)}function v(e){return(255*e[0]<<16)+(255*e[1]<<8)+(255*e[2]|0)}function E(){for(var e=[],t=[],r=0;r<32;r++)e[r]=r,t[r]=r;e[o.BLEND_MODES.NORMAL_NPM]=o.BLEND_MODES.NORMAL,e[o.BLEND_MODES.ADD_NPM]=o.BLEND_MODES.ADD,e[o.BLEND_MODES.SCREEN_NPM]=o.BLEND_MODES.SCREEN,t[o.BLEND_MODES.NORMAL]=o.BLEND_MODES.NORMAL_NPM,t[o.BLEND_MODES.ADD]=o.BLEND_MODES.ADD_NPM,t[o.BLEND_MODES.SCREEN]=o.BLEND_MODES.SCREEN_NPM;var n=[];return n.push(t),n.push(e),n}var y=E();function b(e,t){return y[t?1:0][e]}function w(e,t,r,n){return r=r||new Float32Array(4),n||void 0===n?(r[0]=e[0]*t,r[1]=e[1]*t,r[2]=e[2]*t):(r[0]=e[0],r[1]=e[1],r[2]=e[2]),r[3]=t,r}function A(e,t){if(1===t)return(255*t<<24)+e;if(0===t)return 0;var r=e>>16&255,n=e>>8&255,o=255&e;return(255*t<<24)+((r=r*t+.5|0)<<16)+((n=n*t+.5|0)<<8)+(o=o*t+.5|0)}function m(e,t,r,n){return(r=r||new Float32Array(4))[0]=(e>>16&255)/255,r[1]=(e>>8&255)/255,r[2]=(255&e)/255,(n||void 0===n)&&(r[0]*=t,r[1]*=t,r[2]*=t),r[3]=t,r}function D(e,t){void 0===t&&(t=null);var r=6*e;if((t=t||new Uint16Array(r)).length!==r)throw new Error("Out buffer length is incorrect, got "+t.length+" and expected "+r);for(var n=0,o=0;n>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,(e|=e>>>16)+1}function P(e){return!(e&e-1||!e)}function N(e){var t=(e>65535?1:0)<<4,r=((e>>>=t)>255?1:0)<<3;return t|=r,t|=r=((e>>>=r)>15?1:0)<<2,(t|=r=((e>>>=r)>3?1:0)<<1)|(e>>>=r)>>1}function R(e,t,r){var n,o=e.length;if(!(t>=o||0===r)){var i=o-(r=t+r>o?o-t:r);for(n=t;n=this.x&&t=this.y&&ii!=c>i&&t<(i-n)/(c-n)*(a-e)+e&&(s=!s)}return s},t}();exports.Polygon=n;var a=function(){function t(t,i,h,o,r){void 0===t&&(t=0),void 0===i&&(i=0),void 0===h&&(h=0),void 0===o&&(o=0),void 0===r&&(r=20),this.x=t,this.y=i,this.width=h,this.height=o,this.radius=r,this.type=s.RREC}return t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height,this.radius)},t.prototype.contains=function(t,i){if(this.width<=0||this.height<=0)return!1;if(t>=this.x&&t<=this.x+this.width&&i>=this.y&&i<=this.y+this.height){if(i>=this.y+this.radius&&i<=this.y+this.height-this.radius||t>=this.x+this.radius&&t<=this.x+this.width-this.radius)return!0;var s=t-(this.x+this.radius),h=i-(this.y+this.radius),o=this.radius*this.radius;if(s*s+h*h<=o)return!0;if((s=t-(this.x+this.width-this.radius))*s+h*h<=o)return!0;if(s*s+(h=i-(this.y+this.height-this.radius))*h<=o)return!0;if((s=t-(this.x+this.radius))*s+h*h<=o)return!0}return!1},t}();exports.RoundedRectangle=a;var c=function(){function t(t,i){void 0===t&&(t=0),void 0===i&&(i=0),this.x=t,this.y=i}return t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.copyFrom=function(t){return this.set(t.x,t.y),this},t.prototype.copyTo=function(t){return t.set(this.x,this.y),t},t.prototype.equals=function(t){return t.x===this.x&&t.y===this.y},t.prototype.set=function(t,i){return void 0===t&&(t=0),void 0===i&&(i=t),this.x=t,this.y=i,this},t}();exports.Point=c;var u=function(){function t(t,i,s,h){void 0===s&&(s=0),void 0===h&&(h=0),this._x=s,this._y=h,this.cb=t,this.scope=i}return t.prototype.clone=function(i,s){return void 0===i&&(i=this.cb),void 0===s&&(s=this.scope),new t(i,s,this._x,this._y)},t.prototype.set=function(t,i){return void 0===t&&(t=0),void 0===i&&(i=t),this._x===t&&this._y===i||(this._x=t,this._y=i,this.cb.call(this.scope)),this},t.prototype.copyFrom=function(t){return this._x===t.x&&this._y===t.y||(this._x=t.x,this._y=t.y,this.cb.call(this.scope)),this},t.prototype.copyTo=function(t){return t.set(this._x,this._y),t},t.prototype.equals=function(t){return t.x===this._x&&t.y===this._y},Object.defineProperty(t.prototype,"x",{get:function(){return this._x},set:function(t){this._x!==t&&(this._x=t,this.cb.call(this.scope))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this._y},set:function(t){this._y!==t&&(this._y=t,this.cb.call(this.scope))},enumerable:!1,configurable:!0}),t}();exports.ObservablePoint=u;var p=function(){function i(t,i,s,h,o,r){void 0===t&&(t=1),void 0===i&&(i=0),void 0===s&&(s=0),void 0===h&&(h=1),void 0===o&&(o=0),void 0===r&&(r=0),this.array=null,this.a=t,this.b=i,this.c=s,this.d=h,this.tx=o,this.ty=r}return i.prototype.fromArray=function(t){this.a=t[0],this.b=t[1],this.c=t[3],this.d=t[4],this.tx=t[2],this.ty=t[5]},i.prototype.set=function(t,i,s,h,o,r){return this.a=t,this.b=i,this.c=s,this.d=h,this.tx=o,this.ty=r,this},i.prototype.toArray=function(t,i){this.array||(this.array=new Float32Array(9));var s=i||this.array;return t?(s[0]=this.a,s[1]=this.b,s[2]=0,s[3]=this.c,s[4]=this.d,s[5]=0,s[6]=this.tx,s[7]=this.ty,s[8]=1):(s[0]=this.a,s[1]=this.c,s[2]=this.tx,s[3]=this.b,s[4]=this.d,s[5]=this.ty,s[6]=0,s[7]=0,s[8]=1),s},i.prototype.apply=function(t,i){i=i||new c;var s=t.x,h=t.y;return i.x=this.a*s+this.c*h+this.tx,i.y=this.b*s+this.d*h+this.ty,i},i.prototype.applyInverse=function(t,i){i=i||new c;var s=1/(this.a*this.d+this.c*-this.b),h=t.x,o=t.y;return i.x=this.d*s*h+-this.c*s*o+(this.ty*this.c-this.tx*this.d)*s,i.y=this.a*s*o+-this.b*s*h+(-this.ty*this.a+this.tx*this.b)*s,i},i.prototype.translate=function(t,i){return this.tx+=t,this.ty+=i,this},i.prototype.scale=function(t,i){return this.a*=t,this.d*=i,this.c*=t,this.b*=i,this.tx*=t,this.ty*=i,this},i.prototype.rotate=function(t){var i=Math.cos(t),s=Math.sin(t),h=this.a,o=this.c,r=this.tx;return this.a=h*i-this.b*s,this.b=h*s+this.b*i,this.c=o*i-this.d*s,this.d=o*s+this.d*i,this.tx=r*i-this.ty*s,this.ty=r*s+this.ty*i,this},i.prototype.append=function(t){var i=this.a,s=this.b,h=this.c,o=this.d;return this.a=t.a*i+t.b*h,this.b=t.a*s+t.b*o,this.c=t.c*i+t.d*h,this.d=t.c*s+t.d*o,this.tx=t.tx*i+t.ty*h+this.tx,this.ty=t.tx*s+t.ty*o+this.ty,this},i.prototype.setTransform=function(t,i,s,h,o,r,e,n,a){return this.a=Math.cos(e+a)*o,this.b=Math.sin(e+a)*o,this.c=-Math.sin(e-n)*r,this.d=Math.cos(e-n)*r,this.tx=t-(s*this.a+h*this.c),this.ty=i-(s*this.b+h*this.d),this},i.prototype.prepend=function(t){var i=this.tx;if(1!==t.a||0!==t.b||0!==t.c||1!==t.d){var s=this.a,h=this.c;this.a=s*t.a+this.b*t.c,this.b=s*t.b+this.b*t.d,this.c=h*t.a+this.d*t.c,this.d=h*t.b+this.d*t.d}return this.tx=i*t.a+this.ty*t.c+t.tx,this.ty=i*t.b+this.ty*t.d+t.ty,this},i.prototype.decompose=function(i){var s=this.a,h=this.b,o=this.c,r=this.d,e=-Math.atan2(-o,r),n=Math.atan2(h,s),a=Math.abs(e+n);return a<1e-5||Math.abs(t-a)<1e-5?(i.rotation=n,i.skew.x=i.skew.y=0):(i.rotation=0,i.skew.x=e,i.skew.y=n),i.scale.x=Math.sqrt(s*s+h*h),i.scale.y=Math.sqrt(o*o+r*r),i.position.x=this.tx,i.position.y=this.ty,i},i.prototype.invert=function(){var t=this.a,i=this.b,s=this.c,h=this.d,o=this.tx,r=t*h-i*s;return this.a=h/r,this.b=-i/r,this.c=-s/r,this.d=t/r,this.tx=(s*this.ty-h*o)/r,this.ty=-(t*this.ty-i*o)/r,this},i.prototype.identity=function(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this},i.prototype.clone=function(){var t=new i;return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t},i.prototype.copyTo=function(t){return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t},i.prototype.copyFrom=function(t){return this.a=t.a,this.b=t.b,this.c=t.c,this.d=t.d,this.tx=t.tx,this.ty=t.ty,this},Object.defineProperty(i,"IDENTITY",{get:function(){return new i},enumerable:!1,configurable:!0}),Object.defineProperty(i,"TEMP_MATRIX",{get:function(){return new i},enumerable:!1,configurable:!0}),i}();exports.Matrix=p;var y=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],d=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],x=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],f=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],l=[],v=[],b=Math.sign;function _(){for(var t=0;t<16;t++){var i=[];l.push(i);for(var s=0;s<16;s++)for(var h=b(y[t]*y[s]+x[t]*d[s]),o=b(d[t]*y[s]+f[t]*d[s]),r=b(y[t]*x[s]+x[t]*f[s]),e=b(d[t]*x[s]+f[t]*f[s]),n=0;n<16;n++)if(y[n]===h&&d[n]===o&&x[n]===r&&f[n]===e){i.push(n);break}}for(t=0;t<16;t++){var a=new p;a.set(y[t],d[t],x[t],f[t],0,0),v.push(a)}}_();var w={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:function(t){return y[t]},uY:function(t){return d[t]},vX:function(t){return x[t]},vY:function(t){return f[t]},inv:function(t){return 8&t?15&t:7&-t},add:function(t,i){return l[t][i]},sub:function(t,i){return l[t][w.inv(i)]},rotate180:function(t){return 4^t},isVertical:function(t){return 2==(3&t)},byDirection:function(t,i){return 2*Math.abs(t)<=Math.abs(i)?i>=0?w.S:w.N:2*Math.abs(i)<=Math.abs(t)?t>0?w.E:w.W:i>0?t>0?w.SE:w.SW:t>0?w.NE:w.NW},matrixAppendRotationInv:function(t,i,s,h){void 0===s&&(s=0),void 0===h&&(h=0);var o=v[w.inv(i)];o.tx=s,o.ty=h,t.append(o)}};exports.groupD8=w;var g=function(){function t(){this.worldTransform=new p,this.localTransform=new p,this.position=new u(this.onChange,this,0,0),this.scale=new u(this.onChange,this,1,1),this.pivot=new u(this.onChange,this,0,0),this.skew=new u(this.updateSkew,this,0,0),this._rotation=0,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._localID=0,this._currentLocalID=0,this._worldID=0,this._parentID=0}return t.prototype.onChange=function(){this._localID++},t.prototype.updateSkew=function(){this._cx=Math.cos(this._rotation+this.skew.y),this._sx=Math.sin(this._rotation+this.skew.y),this._cy=-Math.sin(this._rotation-this.skew.x),this._sy=Math.cos(this._rotation-this.skew.x),this._localID++},t.prototype.updateLocalTransform=function(){var t=this.localTransform;this._localID!==this._currentLocalID&&(t.a=this._cx*this.scale.x,t.b=this._sx*this.scale.x,t.c=this._cy*this.scale.y,t.d=this._sy*this.scale.y,t.tx=this.position.x-(this.pivot.x*t.a+this.pivot.y*t.c),t.ty=this.position.y-(this.pivot.x*t.b+this.pivot.y*t.d),this._currentLocalID=this._localID,this._parentID=-1)},t.prototype.updateTransform=function(t){var i=this.localTransform;if(this._localID!==this._currentLocalID&&(i.a=this._cx*this.scale.x,i.b=this._sx*this.scale.x,i.c=this._cy*this.scale.y,i.d=this._sy*this.scale.y,i.tx=this.position.x-(this.pivot.x*i.a+this.pivot.y*i.c),i.ty=this.position.y-(this.pivot.x*i.b+this.pivot.y*i.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==t._worldID){var s=t.worldTransform,h=this.worldTransform;h.a=i.a*s.a+i.b*s.c,h.b=i.a*s.b+i.b*s.d,h.c=i.c*s.a+i.d*s.c,h.d=i.c*s.b+i.d*s.d,h.tx=i.tx*s.a+i.ty*s.c+s.tx,h.ty=i.tx*s.b+i.ty*s.d+s.ty,this._parentID=t._worldID,this._worldID++}},t.prototype.setFromMatrix=function(t){t.decompose(this),this._localID++},Object.defineProperty(t.prototype,"rotation",{get:function(){return this._rotation},set:function(t){this._rotation!==t&&(this._rotation=t,this.updateSkew())},enumerable:!1,configurable:!0}),t.IDENTITY=new t,t}();exports.Transform=g; },{}],"nL3p":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.TemporaryDisplayObject=exports.DisplayObject=exports.Container=exports.Bounds=void 0;var t=require("@pixi/settings"),e=require("@pixi/math"),i=require("@pixi/utils");t.settings.SORTABLE_CHILDREN=!1;var n=function(){function t(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null,this.updateID=-1}return t.prototype.isEmpty=function(){return this.minX>this.maxX||this.minY>this.maxY},t.prototype.clear=function(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0},t.prototype.getRectangle=function(t){return this.minX>this.maxX||this.minY>this.maxY?e.Rectangle.EMPTY:((t=t||new e.Rectangle(0,0,1,1)).x=this.minX,t.y=this.minY,t.width=this.maxX-this.minX,t.height=this.maxY-this.minY,t)},t.prototype.addPoint=function(t){this.minX=Math.min(this.minX,t.x),this.maxX=Math.max(this.maxX,t.x),this.minY=Math.min(this.minY,t.y),this.maxY=Math.max(this.maxY,t.y)},t.prototype.addQuad=function(t){var e=this.minX,i=this.minY,n=this.maxX,r=this.maxY,s=t[0],o=t[1];e=sn?s:n,r=o>r?o:r,e=(s=t[2])n?s:n,r=o>r?o:r,e=(s=t[4])n?s:n,r=o>r?o:r,e=(s=t[6])n?s:n,r=o>r?o:r,this.minX=e,this.minY=i,this.maxX=n,this.maxY=r},t.prototype.addFrame=function(t,e,i,n,r){this.addFrameMatrix(t.worldTransform,e,i,n,r)},t.prototype.addFrameMatrix=function(t,e,i,n,r){var s=t.a,o=t.b,a=t.c,h=t.d,l=t.tx,d=t.ty,p=this.minX,m=this.minY,u=this.maxX,c=this.maxY,f=s*e+a*i+l,y=o*e+h*i+d;p=fu?f:u,c=y>c?y:c,p=(f=s*n+a*i+l)u?f:u,c=y>c?y:c,p=(f=s*e+a*r+l)u?f:u,c=y>c?y:c,p=(f=s*n+a*r+l)u?f:u,c=y>c?y:c,this.minX=p,this.minY=m,this.maxX=u,this.maxY=c},t.prototype.addVertexData=function(t,e,i){for(var n=this.minX,r=this.minY,s=this.maxX,o=this.maxY,a=e;as?h:s,o=l>o?l:o}this.minX=n,this.minY=r,this.maxX=s,this.maxY=o},t.prototype.addVertices=function(t,e,i,n){this.addVerticesMatrix(t.worldTransform,e,i,n)},t.prototype.addVerticesMatrix=function(t,e,i,n,r,s){void 0===r&&(r=0),void 0===s&&(s=r);for(var o=t.a,a=t.b,h=t.c,l=t.d,d=t.tx,p=t.ty,m=this.minX,u=this.minY,c=this.maxX,f=this.maxY,y=i;yn?t.maxX:n,this.maxY=t.maxY>r?t.maxY:r},t.prototype.addBoundsMask=function(t,e){var i=t.minX>e.minX?t.minX:e.minX,n=t.minY>e.minY?t.minY:e.minY,r=t.maxXh?r:h,this.maxY=s>l?s:l}},t.prototype.addBoundsMatrix=function(t,e){this.addFrameMatrix(e,t.minX,t.minY,t.maxX,t.maxY)},t.prototype.addBoundsArea=function(t,e){var i=t.minX>e.x?t.minX:e.x,n=t.minY>e.y?t.minY:e.y,r=t.maxXh?r:h,this.maxY=s>l?s:l}},t.prototype.pad=function(t,e){void 0===t&&(t=0),void 0===e&&(e=t),this.isEmpty()||(this.minX-=t,this.maxX+=t,this.minY-=e,this.maxY+=e)},t.prototype.addFramePad=function(t,e,i,n,r,s){t-=r,e-=s,i+=r,n+=s,this.minX=this.minXi?this.maxX:i,this.minY=this.minYn?this.maxY:n},t}();exports.Bounds=n;var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)};function s(t,e){function i(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var o=function(t){function i(){var i=t.call(this)||this;return i.tempDisplayObjectParent=null,i.transform=new e.Transform,i.alpha=1,i.visible=!0,i.renderable=!0,i.parent=null,i.worldAlpha=1,i._lastSortedIndex=0,i._zIndex=0,i.filterArea=null,i.filters=null,i._enabledFilters=null,i._bounds=new n,i._localBounds=null,i._boundsID=0,i._boundsRect=null,i._localBoundsRect=null,i._mask=null,i._destroyed=!1,i.isSprite=!1,i.isMask=!1,i}return s(i,t),i.mixin=function(t){for(var e=Object.keys(t),n=0;n1)for(var n=0;nthis.children.length)throw new Error(t+"addChildAt: The index "+e+" supplied is out of bounds "+this.children.length);return t.parent&&t.parent.removeChild(t),t.parent=this,this.sortDirty=!0,t.transform._parentID=-1,this.children.splice(e,0,t),this._boundsID++,this.onChildrenChange(e),t.emit("added",this),this.emit("childAdded",t,this,e),t},n.prototype.swapChildren=function(t,e){if(t!==e){var i=this.getChildIndex(t),n=this.getChildIndex(e);this.children[i]=e,this.children[n]=t,this.onChildrenChange(i=this.children.length)throw new Error("The index "+e+" supplied is out of bounds "+this.children.length);var n=this.getChildIndex(t);(0,i.removeItems)(this.children,n,1),this.children.splice(e,0,t),this.onChildrenChange(e)},n.prototype.getChildAt=function(t){if(t<0||t>=this.children.length)throw new Error("getChildAt: Index ("+t+") does not exist.");return this.children[t]},n.prototype.removeChild=function(){for(var t=arguments,e=[],n=0;n1)for(var r=0;r0&&r<=e){i=this.children.splice(n,r);for(var s=0;s1&&this.children.sort(h),this.sortDirty=!1},n.prototype.updateTransform=function(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(var t=0,e=this.children.length;t title : "+e.title+"
tabIndex: "+e.tabIndex},e.prototype.capHitArea=function(e){e.x<0&&(e.width+=e.x,e.x=0),e.y<0&&(e.height+=e.y,e.y=0),e.x+e.width>this.renderer.width&&(e.width=this.renderer.width-e.x),e.y+e.height>this.renderer.height&&(e.height=this.renderer.height-e.y)},e.prototype.addChild=function(e){var t=this.pool.pop();t||((t=document.createElement("button")).style.width=n+"px",t.style.height=n+"px",t.style.backgroundColor=this.debug?"rgba(255,255,255,0.5)":"transparent",t.style.position="absolute",t.style.zIndex=l.toString(),t.style.borderStyle="none",navigator.userAgent.toLowerCase().indexOf("chrome")>-1?t.setAttribute("aria-live","off"):t.setAttribute("aria-live","polite"),navigator.userAgent.match(/rv:.*Gecko\//)?t.setAttribute("aria-relevant","additions"):t.setAttribute("aria-relevant","text"),t.addEventListener("click",this._onClick.bind(this)),t.addEventListener("focus",this._onFocus.bind(this)),t.addEventListener("focusout",this._onFocusOut.bind(this))),t.style.pointerEvents=e.accessiblePointerEvents,t.type=e.accessibleType,e.accessibleTitle&&null!==e.accessibleTitle?t.title=e.accessibleTitle:e.accessibleHint&&null!==e.accessibleHint||(t.title="displayObject "+e.tabIndex),e.accessibleHint&&null!==e.accessibleHint&&t.setAttribute("aria-label",e.accessibleHint),this.debug&&this.updateDebugHTML(t),e._accessibleActive=!0,e._accessibleDiv=t,t.displayObject=e,this.children.push(e),this.div.appendChild(e._accessibleDiv),e._accessibleDiv.tabIndex=e.tabIndex},e.prototype._onClick=function(e){var t=this.renderer.plugins.interaction;t.dispatchEvent(e.target.displayObject,"click",t.eventData),t.dispatchEvent(e.target.displayObject,"pointertap",t.eventData),t.dispatchEvent(e.target.displayObject,"tap",t.eventData)},e.prototype._onFocus=function(e){e.target.getAttribute("aria-live")||e.target.setAttribute("aria-live","assertive");var t=this.renderer.plugins.interaction;t.dispatchEvent(e.target.displayObject,"mouseover",t.eventData)},e.prototype._onFocusOut=function(e){e.target.getAttribute("aria-live")||e.target.setAttribute("aria-live","polite");var t=this.renderer.plugins.interaction;t.dispatchEvent(e.target.displayObject,"mouseout",t.eventData)},e.prototype._onKeyDown=function(e){e.keyCode===s&&this.activate()},e.prototype._onMouseMove=function(e){0===e.movementX&&0===e.movementY||this.deactivate()},e.prototype.destroy=function(){this.destroyTouchHook(),this.div=null,window.document.removeEventListener("mousemove",this._onMouseMove,!0),window.removeEventListener("keydown",this._onKeyDown),this.pool=null,this.children=null,this.renderer=null},e}();exports.AccessibilityManager=p; },{"@pixi/display":"nL3p","@pixi/utils":"2G5T"}],"F3Q6":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.UPDATE_PRIORITY=exports.TickerPlugin=exports.Ticker=void 0;var t,e=require("@pixi/settings");e.settings.TARGET_FPMS=.06,exports.UPDATE_PRIORITY=t,function(t){t[t.INTERACTION=50]="INTERACTION",t[t.HIGH=25]="HIGH",t[t.NORMAL=0]="NORMAL",t[t.LOW=-25]="LOW",t[t.UTILITY=-50]="UTILITY"}(t||(exports.UPDATE_PRIORITY=t={}));var i=function(){function t(t,e,i,s){void 0===e&&(e=null),void 0===i&&(i=0),void 0===s&&(s=!1),this.fn=t,this.context=e,this.priority=i,this.once=s,this.next=null,this.previous=null,this._destroyed=!1}return t.prototype.match=function(t,e){return void 0===e&&(e=null),this.fn===t&&this.context===e},t.prototype.emit=function(t){this.fn&&(this.context?this.fn.call(this.context,t):this.fn(t));var e=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),e},t.prototype.connect=function(t){this.previous=t,t.next&&(t.next.previous=this),this.next=t.next,t.next=this},t.prototype.destroy=function(t){void 0===t&&(t=!1),this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);var e=this.next;return this.next=t?null:e,this.previous=null,e},t}(),s=function(){function s(){var t=this;this._head=new i(null,null,1/0),this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this.autoStart=!1,this.deltaTime=1,this.deltaMS=1/e.settings.TARGET_FPMS,this.elapsedMS=1/e.settings.TARGET_FPMS,this.lastTime=-1,this.speed=1,this.started=!1,this._protected=!1,this._lastFrame=-1,this._tick=function(e){t._requestId=null,t.started&&(t.update(e),t.started&&null===t._requestId&&t._head.next&&(t._requestId=requestAnimationFrame(t._tick)))}}return s.prototype._requestIfNeeded=function(){null===this._requestId&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))},s.prototype._cancelIfNeeded=function(){null!==this._requestId&&(cancelAnimationFrame(this._requestId),this._requestId=null)},s.prototype._startIfPossible=function(){this.started?this._requestIfNeeded():this.autoStart&&this.start()},s.prototype.add=function(e,s,r){return void 0===r&&(r=t.NORMAL),this._addListener(new i(e,s,r))},s.prototype.addOnce=function(e,s,r){return void 0===r&&(r=t.NORMAL),this._addListener(new i(e,s,r,!0))},s.prototype._addListener=function(t){var e=this._head.next,i=this._head;if(e){for(;e;){if(t.priority>e.priority){t.connect(i);break}i=e,e=e.next}t.previous||t.connect(i)}else t.connect(i);return this._startIfPossible(),this},s.prototype.remove=function(t,e){for(var i=this._head.next;i;)i=i.match(t,e)?i.destroy():i.next;return this._head.next||this._cancelIfNeeded(),this},Object.defineProperty(s.prototype,"count",{get:function(){if(!this._head)return 0;for(var t=0,e=this._head;e=e.next;)t++;return t},enumerable:!1,configurable:!0}),s.prototype.start=function(){this.started||(this.started=!0,this._requestIfNeeded())},s.prototype.stop=function(){this.started&&(this.started=!1,this._cancelIfNeeded())},s.prototype.destroy=function(){if(!this._protected){this.stop();for(var t=this._head.next;t;)t=t.destroy(!0);this._head.destroy(),this._head=null}},s.prototype.update=function(t){var i;if(void 0===t&&(t=performance.now()),t>this.lastTime){if((i=this.elapsedMS=t-this.lastTime)>this._maxElapsedMS&&(i=this._maxElapsedMS),i*=this.speed,this._minElapsedMS){var s=t-this._lastFrame|0;if(s=0;p--){var u=c[p],l=this.recursiveFindHit(t,u,i,n,a);if(l){if(!u.parent)continue;a=!1,l&&(t.target&&(n=!1),s=!0)}}return o&&(n&&!t.target&&!e.hitArea&&e.containsPoint&&e.containsPoint(r)&&(s=!0),e.interactive&&(s&&!t.target&&(t.target=e),i&&i(t,e,!!s))),s},e.prototype.findHit=function(t,e,i,n){this.recursiveFindHit(t,e,i,n,!1)},e}(),p={interactive:!1,interactiveChildren:!0,hitArea:null,get buttonMode(){return"pointer"===this.cursor},set buttonMode(t){t?this.cursor="pointer":"pointer"===this.cursor&&(this.cursor=null)},cursor:null,get trackedPointers(){return void 0===this._trackedPointers&&(this._trackedPointers={}),this._trackedPointers},_trackedPointers:void 0};exports.interactiveTarget=p,i.DisplayObject.mixin(p);var u=1,l={target:null,data:{global:null}},d=function(t){function n(e,n){var r=t.call(this)||this;return n=n||{},r.renderer=e,r.autoPreventDefault=void 0===n.autoPreventDefault||n.autoPreventDefault,r.interactionFrequency=n.interactionFrequency||10,r.mouse=new o,r.mouse.identifier=u,r.mouse.global.set(-999999),r.activeInteractionData={},r.activeInteractionData[u]=r.mouse,r.interactionDataPool=[],r.eventData=new a,r.interactionDOMElement=null,r.moveWhenInside=!1,r.eventsAdded=!1,r.tickerAdded=!1,r.mouseOverRenderer=!1,r.supportsTouchEvents="ontouchstart"in window,r.supportsPointerEvents=!!window.PointerEvent,r.onPointerUp=r.onPointerUp.bind(r),r.processPointerUp=r.processPointerUp.bind(r),r.onPointerCancel=r.onPointerCancel.bind(r),r.processPointerCancel=r.processPointerCancel.bind(r),r.onPointerDown=r.onPointerDown.bind(r),r.processPointerDown=r.processPointerDown.bind(r),r.onPointerMove=r.onPointerMove.bind(r),r.processPointerMove=r.processPointerMove.bind(r),r.onPointerOut=r.onPointerOut.bind(r),r.processPointerOverOut=r.processPointerOverOut.bind(r),r.onPointerOver=r.onPointerOver.bind(r),r.cursorStyles={default:"inherit",pointer:"pointer"},r.currentCursorMode=null,r.cursor=null,r.resolution=1,r.delayedEvents=[],r.search=new c,r._tempDisplayObject=new i.TemporaryDisplayObject,r._useSystemTicker=void 0===n.useSystemTicker||n.useSystemTicker,r.setTargetElement(r.renderer.view,r.renderer.resolution),r}return s(n,t),Object.defineProperty(n.prototype,"useSystemTicker",{get:function(){return this._useSystemTicker},set:function(t){this._useSystemTicker=t,t?this.addTickerListener():this.removeTickerListener()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"lastObjectRendered",{get:function(){return this.renderer._lastObjectRendered||this._tempDisplayObject},enumerable:!1,configurable:!0}),n.prototype.hitTest=function(t,e){return l.target=null,l.data.global=t,e||(e=this.lastObjectRendered),this.processInteractive(l,e,null,!0),l.target},n.prototype.setTargetElement=function(t,e){void 0===e&&(e=1),this.removeTickerListener(),this.removeEvents(),this.interactionDOMElement=t,this.resolution=e,this.addEvents(),this.addTickerListener()},n.prototype.addTickerListener=function(){!this.tickerAdded&&this.interactionDOMElement&&this._useSystemTicker&&(e.Ticker.system.add(this.tickerUpdate,this,e.UPDATE_PRIORITY.INTERACTION),this.tickerAdded=!0)},n.prototype.removeTickerListener=function(){this.tickerAdded&&(e.Ticker.system.remove(this.tickerUpdate,this),this.tickerAdded=!1)},n.prototype.addEvents=function(){if(!this.eventsAdded&&this.interactionDOMElement){var t=this.interactionDOMElement.style;window.navigator.msPointerEnabled?(t.msContentZooming="none",t.msTouchAction="none"):this.supportsPointerEvents&&(t.touchAction="none"),this.supportsPointerEvents?(window.document.addEventListener("pointermove",this.onPointerMove,!0),this.interactionDOMElement.addEventListener("pointerdown",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("pointerleave",this.onPointerOut,!0),this.interactionDOMElement.addEventListener("pointerover",this.onPointerOver,!0),window.addEventListener("pointercancel",this.onPointerCancel,!0),window.addEventListener("pointerup",this.onPointerUp,!0)):(window.document.addEventListener("mousemove",this.onPointerMove,!0),this.interactionDOMElement.addEventListener("mousedown",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("mouseout",this.onPointerOut,!0),this.interactionDOMElement.addEventListener("mouseover",this.onPointerOver,!0),window.addEventListener("mouseup",this.onPointerUp,!0)),this.supportsTouchEvents&&(this.interactionDOMElement.addEventListener("touchstart",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("touchcancel",this.onPointerCancel,!0),this.interactionDOMElement.addEventListener("touchend",this.onPointerUp,!0),this.interactionDOMElement.addEventListener("touchmove",this.onPointerMove,!0)),this.eventsAdded=!0}},n.prototype.removeEvents=function(){if(this.eventsAdded&&this.interactionDOMElement){var t=this.interactionDOMElement.style;window.navigator.msPointerEnabled?(t.msContentZooming="",t.msTouchAction=""):this.supportsPointerEvents&&(t.touchAction=""),this.supportsPointerEvents?(window.document.removeEventListener("pointermove",this.onPointerMove,!0),this.interactionDOMElement.removeEventListener("pointerdown",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("pointerleave",this.onPointerOut,!0),this.interactionDOMElement.removeEventListener("pointerover",this.onPointerOver,!0),window.removeEventListener("pointercancel",this.onPointerCancel,!0),window.removeEventListener("pointerup",this.onPointerUp,!0)):(window.document.removeEventListener("mousemove",this.onPointerMove,!0),this.interactionDOMElement.removeEventListener("mousedown",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("mouseout",this.onPointerOut,!0),this.interactionDOMElement.removeEventListener("mouseover",this.onPointerOver,!0),window.removeEventListener("mouseup",this.onPointerUp,!0)),this.supportsTouchEvents&&(this.interactionDOMElement.removeEventListener("touchstart",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("touchcancel",this.onPointerCancel,!0),this.interactionDOMElement.removeEventListener("touchend",this.onPointerUp,!0),this.interactionDOMElement.removeEventListener("touchmove",this.onPointerMove,!0)),this.interactionDOMElement=null,this.eventsAdded=!1}},n.prototype.tickerUpdate=function(t){this._deltaTime+=t,this._deltaTime8)throw new Error("max arguments reached");var h=this.name,a=this.items;this._aliasCount++;for(var m=0,p=a.length;m0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))},t.prototype.add=function(t){return t[this._name]&&(this.ensureNonAliasedItems(),this.remove(t),this.items.push(t)),this},t.prototype.remove=function(t){var e=this.items.indexOf(t);return-1!==e&&(this.ensureNonAliasedItems(),this.items.splice(e,1)),this},t.prototype.contains=function(t){return-1!==this.items.indexOf(t)},t.prototype.removeAll=function(){return this.ensureNonAliasedItems(),this.items.length=0,this},t.prototype.destroy=function(){this.removeAll(),this.items=null,this._name=null},Object.defineProperty(t.prototype,"empty",{get:function(){return 0===this.items.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this._name},enumerable:!1,configurable:!0}),t}();exports.Runner=t,Object.defineProperties(t.prototype,{dispatch:{value:t.prototype.emit},run:{value:t.prototype.emit}}); },{}],"p2j5":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ViewableBuffer=exports.UniformGroup=exports.TextureUvs=exports.TextureMatrix=exports.Texture=exports.System=exports.State=exports.SpriteMaskFilter=exports.Shader=exports.Renderer=exports.RenderTexturePool=exports.RenderTexture=exports.QuadUv=exports.Quad=exports.Program=exports.ObjectRenderer=exports.MaskData=exports.IGLUniformData=exports.Geometry=exports.GLTexture=exports.GLProgram=exports.GLFramebuffer=exports.Framebuffer=exports.FilterState=exports.Filter=exports.Buffer=exports.BatchTextureArray=exports.BatchShaderGenerator=exports.BatchRenderer=exports.BatchPluginFactory=exports.BatchGeometry=exports.BatchDrawCall=exports.BaseTexture=exports.BaseRenderTexture=exports.Attribute=exports.AbstractRenderer=exports.AbstractBatchRenderer=void 0,exports.autoDetectRenderer=At,exports.checkMaxIfStatementsInShader=Oe,exports.uniformParsers=exports.systems=exports.resources=exports.defaultVertex=exports.defaultFilterVertex=void 0;var e=require("@pixi/settings"),t=require("@pixi/constants"),r=require("@pixi/utils"),i=require("@pixi/runner"),n=require("@pixi/ticker"),o=require("@pixi/math");e.settings.PREFER_ENV=r.isMobile.any?t.ENV.WEBGL:t.ENV.WEBGL2,e.settings.STRICT_TEXTURE_CACHE=!1;var s=[];function a(e,t){if(!e)return null;var r="";if("string"==typeof e){var i=/\.(\w{3,4})(?:$|\?|#)/i.exec(e);i&&(r=i[1].toLowerCase())}for(var n=s.length-1;n>=0;--n){var o=s[n];if(o.test&&o.test(e,r))return new o(e,t)}throw new Error("Unrecognized source type to auto-detect Resource")}var u=function(e,t){return(u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};function h(e,t){function r(){this.constructor=e}u(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var l=function(){function e(e,t){void 0===e&&(e=0),void 0===t&&(t=0),this._width=e,this._height=t,this.destroyed=!1,this.internal=!1,this.onResize=new i.Runner("setRealSize"),this.onUpdate=new i.Runner("update"),this.onError=new i.Runner("onError")}return e.prototype.bind=function(e){this.onResize.add(e),this.onUpdate.add(e),this.onError.add(e),(this._width||this._height)&&this.onResize.emit(this._width,this._height)},e.prototype.unbind=function(e){this.onResize.remove(e),this.onUpdate.remove(e),this.onError.remove(e)},e.prototype.resize=function(e,t){e===this._width&&t===this._height||(this._width=e,this._height=t,this.onResize.emit(e,t))},Object.defineProperty(e.prototype,"valid",{get:function(){return!!this._width&&!!this._height},enumerable:!1,configurable:!0}),e.prototype.update=function(){this.destroyed||this.onUpdate.emit()},e.prototype.load=function(){return Promise.resolve(this)},Object.defineProperty(e.prototype,"width",{get:function(){return this._width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},enumerable:!1,configurable:!0}),e.prototype.style=function(e,t,r){return!1},e.prototype.dispose=function(){},e.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,this.dispose(),this.onError.removeAll(),this.onError=null,this.onResize.removeAll(),this.onResize=null,this.onUpdate.removeAll(),this.onUpdate=null)},e.test=function(e,t){return!1},e}(),d=function(e){function r(t,r){var i=this,n=r||{},o=n.width,s=n.height;if(!o||!s)throw new Error("BufferResource width or height invalid");return(i=e.call(this,o,s)||this).data=t,i}return h(r,e),r.prototype.upload=function(e,r,i){var n=e.gl;return n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.alphaMode===t.ALPHA_MODES.UNPACK),i.width===r.width&&i.height===r.height?n.texSubImage2D(r.target,0,0,0,r.width,r.height,r.format,r.type,this.data):(i.width=r.width,i.height=r.height,n.texImage2D(r.target,0,i.internalFormat,r.width,r.height,0,r.format,i.type,this.data)),!0},r.prototype.dispose=function(){this.data=null},r.test=function(e){return e instanceof Float32Array||e instanceof Uint8Array||e instanceof Uint32Array},r}(l),c={scaleMode:t.SCALE_MODES.NEAREST,format:t.FORMATS.RGBA,alphaMode:t.ALPHA_MODES.NPM},f=function(i){function n(n,o){void 0===n&&(n=null),void 0===o&&(o=null);var s=i.call(this)||this,u=(o=o||{}).alphaMode,h=o.mipmap,d=o.anisotropicLevel,c=o.scaleMode,f=o.width,p=o.height,m=o.wrapMode,v=o.format,g=o.type,y=o.target,x=o.resolution,_=o.resourceOptions;return!n||n instanceof l||((n=a(n,_)).internal=!0),s.width=f||0,s.height=p||0,s.resolution=x||e.settings.RESOLUTION,s.mipmap=void 0!==h?h:e.settings.MIPMAP_TEXTURES,s.anisotropicLevel=void 0!==d?d:e.settings.ANISOTROPIC_LEVEL,s.wrapMode=m||e.settings.WRAP_MODE,s.scaleMode=void 0!==c?c:e.settings.SCALE_MODE,s.format=v||t.FORMATS.RGBA,s.type=g||t.TYPES.UNSIGNED_BYTE,s.target=y||t.TARGETS.TEXTURE_2D,s.alphaMode=void 0!==u?u:t.ALPHA_MODES.UNPACK,void 0!==o.premultiplyAlpha&&(s.premultiplyAlpha=o.premultiplyAlpha),s.uid=(0,r.uid)(),s.touched=0,s.isPowerOfTwo=!1,s._refreshPOT(),s._glTextures={},s.dirtyId=0,s.dirtyStyleId=0,s.cacheId=null,s.valid=f>0&&p>0,s.textureCacheIds=[],s.destroyed=!1,s.resource=null,s._batchEnabled=0,s._batchLocation=0,s.parentTextureArray=null,s.setResource(n),s}return h(n,i),Object.defineProperty(n.prototype,"realWidth",{get:function(){return Math.ceil(this.width*this.resolution-1e-4)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"realHeight",{get:function(){return Math.ceil(this.height*this.resolution-1e-4)},enumerable:!1,configurable:!0}),n.prototype.setStyle=function(e,t){var r;return void 0!==e&&e!==this.scaleMode&&(this.scaleMode=e,r=!0),void 0!==t&&t!==this.mipmap&&(this.mipmap=t,r=!0),r&&this.dirtyStyleId++,this},n.prototype.setSize=function(e,t,r){return this.resolution=r||this.resolution,this.width=e,this.height=t,this._refreshPOT(),this.update(),this},n.prototype.setRealSize=function(e,t,r){return this.resolution=r||this.resolution,this.width=e/this.resolution,this.height=t/this.resolution,this._refreshPOT(),this.update(),this},n.prototype._refreshPOT=function(){this.isPowerOfTwo=(0,r.isPow2)(this.realWidth)&&(0,r.isPow2)(this.realHeight)},n.prototype.setResolution=function(e){var t=this.resolution;return t===e?this:(this.resolution=e,this.valid&&(this.width=this.width*t/e,this.height=this.height*t/e,this.emit("update",this)),this._refreshPOT(),this)},n.prototype.setResource=function(e){if(this.resource===e)return this;if(this.resource)throw new Error("Resource can be set only once");return e.bind(this),this.resource=e,this},n.prototype.update=function(){this.valid?(this.dirtyId++,this.dirtyStyleId++,this.emit("update",this)):this.width>0&&this.height>0&&(this.valid=!0,this.emit("loaded",this),this.emit("update",this))},n.prototype.onError=function(e){this.emit("error",this,e)},n.prototype.destroy=function(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete r.BaseTextureCache[this.cacheId],delete r.TextureCache[this.cacheId],this.cacheId=null),this.dispose(),n.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0},n.prototype.dispose=function(){this.emit("dispose",this)},n.prototype.castToBaseTexture=function(){return this},n.from=function(t,i,o){void 0===o&&(o=e.settings.STRICT_TEXTURE_CACHE);var s="string"==typeof t,a=null;s?a=t:(t._pixiId||(t._pixiId="pixiid_"+(0,r.uid)()),a=t._pixiId);var u=r.BaseTextureCache[a];if(s&&o&&!u)throw new Error('The cacheId "'+a+'" does not exist in BaseTextureCache.');return u||((u=new n(t,i)).cacheId=a,n.addToCache(u,a)),u},n.fromBuffer=function(e,r,i,o){e=e||new Float32Array(r*i*4);var s=new d(e,{width:r,height:i}),a=e instanceof Float32Array?t.TYPES.FLOAT:t.TYPES.UNSIGNED_BYTE;return new n(s,Object.assign(c,o||{width:r,height:i,type:a}))},n.addToCache=function(e,t){t&&(-1===e.textureCacheIds.indexOf(t)&&e.textureCacheIds.push(t),r.BaseTextureCache[t]&&console.warn("BaseTexture added to the cache with an id ["+t+"] that already had an entry"),r.BaseTextureCache[t]=e)},n.removeFromCache=function(e){if("string"==typeof e){var t=r.BaseTextureCache[e];if(t){var i=t.textureCacheIds.indexOf(e);return i>-1&&t.textureCacheIds.splice(i,1),delete r.BaseTextureCache[e],t}}else if(e&&e.textureCacheIds){for(var n=0;n0){if(!e.resource)throw new Error("CubeResource does not support copying of renderTexture.");this.addResourceAt(e.resource,r)}else e.target=t.TARGETS.TEXTURE_CUBE_MAP_POSITIVE_X+r,e.parentTextureArray=this.baseTexture,this.items[r]=e;return e.valid&&!this.valid&&this.resize(e.realWidth,e.realHeight),this.items[r]=e,this},r.prototype.upload=function(e,t,i){for(var n=this.itemDirtyIds,o=0;o]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i,t}(v),E=function(e){function t(r,i){var n=this;if(i=i||{},!(r instanceof HTMLVideoElement)){var o=document.createElement("video");o.setAttribute("preload","auto"),o.setAttribute("webkit-playsinline",""),o.setAttribute("playsinline",""),"string"==typeof r&&(r=[r]);var s=r[0].src||r[0];v.crossOrigin(o,s,i.crossorigin);for(var a=0;a0&&!1===e.paused&&!1===e.ended&&e.readyState>2},t.prototype._isSourceReady=function(){var e=this.source;return 3===e.readyState||4===e.readyState},t.prototype._onPlayStart=function(){this.valid||this._onCanPlay(),this.autoUpdate&&!this._isConnectedToTicker&&(n.Ticker.shared.add(this.update,this),this._isConnectedToTicker=!0)},t.prototype._onPlayStop=function(){this._isConnectedToTicker&&(n.Ticker.shared.remove(this.update,this),this._isConnectedToTicker=!1)},t.prototype._onCanPlay=function(){var e=this.source;e.removeEventListener("canplay",this._onCanPlay),e.removeEventListener("canplaythrough",this._onCanPlay);var t=this.valid;this.resize(e.videoWidth,e.videoHeight),!t&&this._resolve&&(this._resolve(this),this._resolve=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&e.play()},t.prototype.dispose=function(){this._isConnectedToTicker&&n.Ticker.shared.remove(this.update,this);var t=this.source;t&&(t.removeEventListener("error",this._onError,!0),t.pause(),t.src="",t.load()),e.prototype.dispose.call(this)},Object.defineProperty(t.prototype,"autoUpdate",{get:function(){return this._autoUpdate},set:function(e){e!==this._autoUpdate&&(this._autoUpdate=e,!this._autoUpdate&&this._isConnectedToTicker?(n.Ticker.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._isSourcePlaying()&&(n.Ticker.shared.add(this.update,this),this._isConnectedToTicker=!0))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"updateFPS",{get:function(){return this._updateFPS},set:function(e){e!==this._updateFPS&&(this._updateFPS=e)},enumerable:!1,configurable:!0}),t.test=function(e,r){return e instanceof HTMLVideoElement||t.TYPES.indexOf(r)>-1},t.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"],t.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"},t}(v),T=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return h(t,e),t.test=function(e){return!!window.createImageBitmap&&e instanceof ImageBitmap},t}(v);s.push(x,T,g,E,_,d,y,m);var b={Resource:l,BaseImageResource:v,INSTALLED:s,autoDetectResource:a,AbstractMultiResource:p,ArrayResource:m,BufferResource:d,CanvasResource:g,CubeResource:y,ImageResource:x,SVGResource:_,VideoResource:E,ImageBitmapResource:T};exports.resources=b;var S=function(){function e(e){this.renderer=e}return e.prototype.destroy=function(){this.renderer=null},e}();exports.System=S;var w=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return h(r,e),r.prototype.upload=function(e,r,i){var n=e.gl;return n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.alphaMode===t.ALPHA_MODES.UNPACK),i.width===r.width&&i.height===r.height?n.texSubImage2D(r.target,0,0,0,r.width,r.height,r.format,r.type,this.data):(i.width=r.width,i.height=r.height,n.texImage2D(r.target,0,1===e.context.webGLVersion?n.DEPTH_COMPONENT:n.DEPTH_COMPONENT16,r.width,r.height,0,r.format,r.type,this.data)),!0},r}(d),A=function(){function e(e,r){this.width=Math.ceil(e||100),this.height=Math.ceil(r||100),this.stencil=!1,this.depth=!1,this.dirtyId=0,this.dirtyFormat=0,this.dirtySize=0,this.depthTexture=null,this.colorTextures=[],this.glFramebuffers={},this.disposeRunner=new i.Runner("disposeFramebuffer"),this.multisample=t.MSAA_QUALITY.NONE}return Object.defineProperty(e.prototype,"colorTexture",{get:function(){return this.colorTextures[0]},enumerable:!1,configurable:!0}),e.prototype.addColorTexture=function(e,r){return void 0===e&&(e=0),this.colorTextures[e]=r||new f(null,{scaleMode:t.SCALE_MODES.NEAREST,resolution:1,mipmap:t.MIPMAP_MODES.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this},e.prototype.addDepthTexture=function(e){return this.depthTexture=e||new f(new w(null,{width:this.width,height:this.height}),{scaleMode:t.SCALE_MODES.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:t.MIPMAP_MODES.OFF,format:t.FORMATS.DEPTH_COMPONENT,type:t.TYPES.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this},e.prototype.enableDepth=function(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this},e.prototype.enableStencil=function(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this},e.prototype.resize=function(e,t){if(e=Math.ceil(e),t=Math.ceil(t),e!==this.width||t!==this.height){this.width=e,this.height=t,this.dirtyId++,this.dirtySize++;for(var r=0;r-1&&t.textureCacheIds.splice(i,1),delete r.TextureCache[e],t}}else if(e&&e.textureCacheIds){for(var n=0;nthis.baseTexture.width,s=r+n>this.baseTexture.height;if(o||s){var a=o&&s?"and":"or",u="X: "+t+" + "+i+" = "+(t+i)+" > "+this.baseTexture.width,h="Y: "+r+" + "+n+" = "+(r+n)+" > "+this.baseTexture.height;throw new Error("Texture Error: frame does not fit inside the base Texture dimensions: "+u+" "+a+" "+h)}this.valid=i&&n&&this.baseTexture.valid,this.trim||this.rotate||(this.orig=e),this.valid&&this.updateUvs()},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"rotate",{get:function(){return this._rotate},set:function(e){this._rotate=e,this.valid&&this.updateUvs()},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"width",{get:function(){return this.orig.width},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"height",{get:function(){return this.orig.height},enumerable:!1,configurable:!0}),i.prototype.castToBaseTexture=function(){return this.baseTexture},i}(r.EventEmitter);function P(){var e=document.createElement("canvas");e.width=16,e.height=16;var t=e.getContext("2d");return t.fillStyle="white",t.fillRect(0,0,16,16),new O(new f(new g(e)))}function M(e){e.destroy=function(){},e.on=function(){},e.once=function(){},e.emit=function(){}}exports.Texture=O,O.EMPTY=new O(new f),M(O.EMPTY),M(O.EMPTY.baseTexture),O.WHITE=P(),M(O.WHITE),M(O.WHITE.baseTexture);var D=function(e){function t(t,r){var i=this,n=null;if(!(t instanceof C)){var o=arguments[1],s=arguments[2],a=arguments[3],u=arguments[4];console.warn("Please use RenderTexture.create("+o+", "+s+") instead of the ctor directly."),n=arguments[0],r=null,t=new C({width:o,height:s,scaleMode:a,resolution:u})}return(i=e.call(this,t,r)||this).legacyRenderer=n,i.valid=!0,i.filterFrame=null,i.filterPoolKey=null,i.updateUvs(),i}return h(t,e),Object.defineProperty(t.prototype,"framebuffer",{get:function(){return this.baseTexture.framebuffer},enumerable:!1,configurable:!0}),t.prototype.resize=function(e,t,r){void 0===r&&(r=!0),e=Math.ceil(e),t=Math.ceil(t),this.valid=e>0&&t>0,this._frame.width=this.orig.width=e,this._frame.height=this.orig.height=t,r&&this.baseTexture.resize(e,t),this.updateUvs()},t.prototype.setResolution=function(e){var t=this.baseTexture;t.resolution!==e&&(t.setResolution(e),this.resize(t.width,t.height,!1))},t.create=function(e){return"number"==typeof e&&(e={width:e,height:arguments[1],scaleMode:arguments[2],resolution:arguments[3]}),new t(new C(e))},t}(O);exports.RenderTexture=D;var F=function(){function e(e){this.texturePool={},this.textureOptions=e||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0}return e.prototype.createTexture=function(e,t){var r=new C(Object.assign({width:e,height:t,resolution:1},this.textureOptions));return new D(r)},e.prototype.getOptimalTexture=function(t,i,n){void 0===n&&(n=1);var o=e.SCREEN_KEY;t*=n,i*=n,this.enableFullScreen&&t===this._pixelsWidth&&i===this._pixelsHeight||(o=(65535&(t=(0,r.nextPow2)(t)))<<16|65535&(i=(0,r.nextPow2)(i))),this.texturePool[o]||(this.texturePool[o]=[]);var s=this.texturePool[o].pop();return s||(s=this.createTexture(t,i)),s.filterPoolKey=o,s.setResolution(n),s},e.prototype.getFilterTexture=function(e,t){var r=this.getOptimalTexture(e.width,e.height,t||e.resolution);return r.filterFrame=e.filterFrame,r},e.prototype.returnTexture=function(e){var t=e.filterPoolKey;e.filterFrame=null,this.texturePool[t].push(e)},e.prototype.returnFilterTexture=function(e){this.returnTexture(e)},e.prototype.clear=function(e){if(e=!1!==e)for(var t in this.texturePool){var r=this.texturePool[t];if(r)for(var i=0;i0&&t.height>0,i)for(var n=0;n1){for(var h=0;h1&&this.renderer.framebuffer.blit(),1===i.length)i[0].apply(this,r.renderTexture,h.renderTexture,t.CLEAR_MODES.BLEND,r),this.returnFilterTexture(r.renderTexture);else{var l=r.renderTexture,d=this.getOptimalFilterTexture(l.width,l.height,r.resolution);d.filterFrame=l.filterFrame;var c=0;for(c=0;c=0;--i)e[i]=r[i]||null,e[i]&&(e[i]._batchLocation=i)},t.prototype.boundArray=function(e,t,r,i){for(var n=e.elements,o=e.ids,s=e.count,a=0,u=0;u=0&&l=t.ENV.WEBGL2&&(n=r.getContext("webgl2",i)),n)this.webGLVersion=2;else if(this.webGLVersion=1,!(n=r.getContext("webgl",i)||r.getContext("experimental-webgl",i)))throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=n,this.getExtensions(),this.gl},i.prototype.getExtensions=function(){var e=this.gl;1===this.webGLVersion?Object.assign(this.extensions,{drawBuffers:e.getExtension("WEBGL_draw_buffers"),depthTexture:e.getExtension("WEBGL_depth_texture"),loseContext:e.getExtension("WEBGL_lose_context"),vertexArrayObject:e.getExtension("OES_vertex_array_object")||e.getExtension("MOZ_OES_vertex_array_object")||e.getExtension("WEBKIT_OES_vertex_array_object"),anisotropicFiltering:e.getExtension("EXT_texture_filter_anisotropic"),uint32ElementIndex:e.getExtension("OES_element_index_uint"),floatTexture:e.getExtension("OES_texture_float"),floatTextureLinear:e.getExtension("OES_texture_float_linear"),textureHalfFloat:e.getExtension("OES_texture_half_float"),textureHalfFloatLinear:e.getExtension("OES_texture_half_float_linear")}):2===this.webGLVersion&&Object.assign(this.extensions,{anisotropicFiltering:e.getExtension("EXT_texture_filter_anisotropic"),colorBufferFloat:e.getExtension("EXT_color_buffer_float"),floatTextureLinear:e.getExtension("OES_texture_float_linear")})},i.prototype.handleContextLost=function(e){e.preventDefault()},i.prototype.handleContextRestored=function(){this.renderer.runners.contextChange.emit(this.gl)},i.prototype.destroy=function(){var e=this.renderer.view;e.removeEventListener("webglcontextlost",this.handleContextLost),e.removeEventListener("webglcontextrestored",this.handleContextRestored),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()},i.prototype.postrender=function(){this.renderer.renderingToScreen&&this.gl.flush()},i.prototype.validateContext=function(e){var t=e.getContextAttributes(),r="WebGL2RenderingContext"in window&&e instanceof window.WebGL2RenderingContext;r&&(this.webGLVersion=2),t.stencil||console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly");var i=r||!!e.getExtension("OES_element_index_uint");this.supports.uint32Indices=i,i||console.warn("Provided WebGL context does not support 32 index buffer, complex graphics may not render correctly")},i}(S),te=function(){return function(e){this.framebuffer=e,this.stencil=null,this.dirtyId=0,this.dirtyFormat=0,this.dirtySize=0,this.multisample=t.MSAA_QUALITY.NONE,this.msaaBuffer=null,this.blitFramebuffer=null}}();exports.GLFramebuffer=te;var re=new o.Rectangle,ie=function(r){function i(e){var t=r.call(this,e)||this;return t.managedFramebuffers=[],t.unknownFramebuffer=new A(10,10),t.msaaSamples=null,t}return h(i,r),i.prototype.contextChange=function(){var r=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new o.Rectangle,this.hasMRT=!0,this.writeDepthTexture=!0,this.disposeAll(!0),1===this.renderer.context.webGLVersion){var i=this.renderer.context.extensions.drawBuffers,n=this.renderer.context.extensions.depthTexture;e.settings.PREFER_ENV===t.ENV.WEBGL_LEGACY&&(i=null,n=null),i?r.drawBuffers=function(e){return i.drawBuffersWEBGL(e)}:(this.hasMRT=!1,r.drawBuffers=function(){}),n||(this.writeDepthTexture=!1)}else this.msaaSamples=r.getInternalformatParameter(r.RENDERBUFFER,r.RGBA8,r.SAMPLES)},i.prototype.bind=function(e,t){var r=this.gl;if(e){var i=e.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(e);this.current!==e&&(this.current=e,r.bindFramebuffer(r.FRAMEBUFFER,i.framebuffer)),i.dirtyId!==e.dirtyId&&(i.dirtyId=e.dirtyId,i.dirtyFormat!==e.dirtyFormat?(i.dirtyFormat=e.dirtyFormat,this.updateFramebuffer(e)):i.dirtySize!==e.dirtySize&&(i.dirtySize=e.dirtySize,this.resizeFramebuffer(e)));for(var n=0;n1&&(r.msaaBuffer=t.createRenderbuffer(),t.bindRenderbuffer(t.RENDERBUFFER,r.msaaBuffer),t.renderbufferStorageMultisample(t.RENDERBUFFER,r.multisample,t.RGBA8,e.width,e.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.RENDERBUFFER,r.msaaBuffer));for(var n=[],o=0;o1)){var s=e.colorTextures[o],a=s.parentTextureArray||s;this.renderer.texture.bind(a,0),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0+o,s.target,a._glTextures[this.CONTEXT_UID].texture,0),n.push(t.COLOR_ATTACHMENT0+o)}if((n.length>1&&t.drawBuffers(n),e.depthTexture)&&this.writeDepthTexture){var u=e.depthTexture;this.renderer.texture.bind(u,0),t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.TEXTURE_2D,u._glTextures[this.CONTEXT_UID].texture,0)}r.stencil||!e.stencil&&!e.depth||(r.stencil=t.createRenderbuffer(),t.bindRenderbuffer(t.RENDERBUFFER,r.stencil),t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,e.width,e.height),e.depthTexture||t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,r.stencil))},i.prototype.detectSamples=function(e){var r=this.msaaSamples,i=t.MSAA_QUALITY.NONE;if(e<=1||null===r)return i;for(var n=0;n=0&&this.managedFramebuffers.splice(n,1),e.disposeRunner.remove(this),t||(i.deleteFramebuffer(r.framebuffer),r.stencil&&i.deleteRenderbuffer(r.stencil))}},i.prototype.disposeAll=function(e){var t=this.managedFramebuffers;this.managedFramebuffers=[];for(var r=0;r=i.data.byteLength)t.bufferSubData(o,0,i.data);else{var s=i.static?t.STATIC_DRAW:t.DYNAMIC_DRAW;n.byteLength=i.data.byteLength,t.bufferData(o,i.data,s)}}}},i.prototype.checkCompatibility=function(e,t){var r=e.attributes,i=t.attributeData;for(var n in i)if(!r[n])throw new Error('shader and geometry incompatible, geometry missing the "'+n+'" attribute')},i.prototype.getSignature=function(e,t){var r=e.attributes,i=t.attributeData,n=["g",e.id];for(var o in r)i[o]&&n.push(o);return n.join("-")},i.prototype.initGeometryVao=function(e,t,r){void 0===r&&(r=!0),this.checkCompatibility(e,t);var i=this.gl,n=this.CONTEXT_UID,o=this.getSignature(e,t),s=e.glVertexArrayObjects[this.CONTEXT_UID],a=s[o];if(a)return s[t.id]=a,a;var u=e.buffers,h=e.attributes,l={},d={};for(var c in u)l[c]=0,d[c]=0;for(var c in h)!h[c].size&&t.attributeData[c]?h[c].size=t.attributeData[c].size:h[c].size||console.warn("PIXI Geometry attribute '"+c+"' size cannot be determined (likely the bound shader does not have the attribute)"),l[h[c].buffer]+=h[c].size*oe[h[c].type];for(var c in h){var f=h[c],p=f.size;void 0===f.stride&&(l[f.buffer]===p*oe[f.type]?f.stride=0:f.stride=l[f.buffer]),void 0===f.start&&(f.start=d[f.buffer],d[f.buffer]+=p*oe[f.type])}a=i.createVertexArray(),i.bindVertexArray(a);for(var m=0;m=t.ENV.WEBGL2&&(i=r.getContext("webgl2",{})),i||((i=r.getContext("webgl",{})||r.getContext("experimental-webgl",{}))?i.getExtension("WEBGL_draw_buffers"):i=null),pe=i}return pe}function ve(){if(!ce){ce=t.PRECISION.MEDIUM;var e=me();if(e&&e.getShaderPrecisionFormat){var r=e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT);ce=r.precision?t.PRECISION.HIGH:t.PRECISION.MEDIUM}}return ce}function ge(e,r,i){if("precision"!==e.substring(0,9)){var n=r;return r===t.PRECISION.HIGH&&i!==t.PRECISION.HIGH&&(n=t.PRECISION.MEDIUM),"precision "+n+" float;\n"+e}return i!==t.PRECISION.HIGH&&"precision highp"===e.substring(0,15)?e.replace("precision highp","precision mediump"):e}var ye={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};function xe(e){return ye[e]}var _e=null,Ee={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",INT_SAMPLER_2D:"sampler2D",UNSIGNED_INT_SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube",INT_SAMPLER_CUBE:"samplerCube",UNSIGNED_INT_SAMPLER_CUBE:"samplerCube",SAMPLER_2D_ARRAY:"sampler2DArray",INT_SAMPLER_2D_ARRAY:"sampler2DArray",UNSIGNED_INT_SAMPLER_2D_ARRAY:"sampler2DArray"};function Te(e,t){if(!_e){var r=Object.keys(Ee);_e={};for(var i=0;i0&&(t+="\nelse "),rt.name?1:-1});for(o=0;o0?this._useCurrent():e.disable(e.SCISSOR_TEST)},t.prototype._useCurrent=function(){var e=this.maskStack[this.maskStack.length-1]._scissorRect,t=this.renderer.renderTexture.current,r=this.renderer.projection,i=r.transform,n=r.sourceFrame,o=r.destinationFrame,s=t?t.resolution:this.renderer.resolution,a=(e.x-n.x)*s+o.x,u=(e.y-n.y)*s+o.y,h=e.width*s,l=e.height*s;i&&(a+=i.tx*s,u+=i.ty*s),t||(u=this.renderer.height-l-u),this.renderer.gl.scissor(a,u,h,l)},t}(Je),tt=function(e){function t(t){var r=e.call(this,t)||this;return r.glConst=WebGLRenderingContext.STENCIL_TEST,r}return h(t,e),t.prototype.getStackLength=function(){var e=this.maskStack[this.maskStack.length-1];return e?e._stencilCounter:0},t.prototype.push=function(e){var t=e.maskObject,r=this.renderer.gl,i=e._stencilCounter;0===i&&(this.renderer.framebuffer.forceStencil(),r.enable(r.STENCIL_TEST)),e._stencilCounter++,r.colorMask(!1,!1,!1,!1),r.stencilFunc(r.EQUAL,i,this._getBitwiseMask()),r.stencilOp(r.KEEP,r.KEEP,r.INCR),t.renderable=!0,t.render(this.renderer),this.renderer.batch.flush(),t.renderable=!1,this._useCurrent()},t.prototype.pop=function(e){var t=this.renderer.gl;0===this.getStackLength()?(t.disable(t.STENCIL_TEST),t.clear(t.STENCIL_BUFFER_BIT),t.clearStencil(0)):(t.colorMask(!1,!1,!1,!1),t.stencilOp(t.KEEP,t.KEEP,t.DECR),e.renderable=!0,e.render(this.renderer),this.renderer.batch.flush(),e.renderable=!1,this._useCurrent())},t.prototype._useCurrent=function(){var e=this.renderer.gl;e.colorMask(!0,!0,!0,!0),e.stencilFunc(e.EQUAL,this.getStackLength(),this._getBitwiseMask()),e.stencilOp(e.KEEP,e.KEEP,e.KEEP)},t.prototype._getBitwiseMask=function(){return(1<>=1,r++;this.stateId=e.data}for(r=0;rthis.checkCountMax&&(this.checkCount=0,this.run())))},i.prototype.run=function(){for(var e=this.renderer.texture,t=e.managedTextures,r=!1,i=0;ithis.maxIdle&&(e.destroyTexture(n,!0),t[i]=null,r=!0)}if(r){var o=0;for(i=0;i=0;i--)this.unload(e.children[i])},i}(S),_t=function(){return function(e){this.texture=e,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=6408,this.internalFormat=5121}}();exports.GLTexture=_t;var Et=function(e){function i(t){var r=e.call(this,t)||this;return r.boundTextures=[],r.currentLocation=-1,r.managedTextures=[],r._unknownBoundTextures=!1,r.unknownTexture=new f,r}return h(i,e),i.prototype.contextChange=function(){var e=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion;var t=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=t;for(var r=0;r=1:r.mipmap=!1,2===this.webGLVersion||e.isPowerOfTwo?r.wrapMode=e.wrapMode:r.wrapMode=t.WRAP_MODES.CLAMP,e.resource&&e.resource.style(this.renderer,e,r)||this.setStyle(e,r),r.dirtyStyleId=e.dirtyStyleId)},i.prototype.setStyle=function(e,r){var i=this.gl;if(r.mipmap&&i.generateMipmap(e.target),i.texParameteri(e.target,i.TEXTURE_WRAP_S,r.wrapMode),i.texParameteri(e.target,i.TEXTURE_WRAP_T,r.wrapMode),r.mipmap){i.texParameteri(e.target,i.TEXTURE_MIN_FILTER,e.scaleMode===t.SCALE_MODES.LINEAR?i.LINEAR_MIPMAP_LINEAR:i.NEAREST_MIPMAP_NEAREST);var n=this.renderer.context.extensions.anisotropicFiltering;if(n&&e.anisotropicLevel>0&&e.scaleMode===t.SCALE_MODES.LINEAR){var o=Math.min(e.anisotropicLevel,i.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT));i.texParameterf(e.target,n.TEXTURE_MAX_ANISOTROPY_EXT,o)}}else i.texParameteri(e.target,i.TEXTURE_MIN_FILTER,e.scaleMode===t.SCALE_MODES.LINEAR?i.LINEAR:i.NEAREST);i.texParameteri(e.target,i.TEXTURE_MAG_FILTER,e.scaleMode===t.SCALE_MODES.LINEAR?i.LINEAR:i.NEAREST)},i}(S),Tt={FilterSystem:Q,BatchSystem:$,ContextSystem:ee,FramebufferSystem:ie,GeometrySystem:se,MaskSystem:$e,ScissorSystem:et,StencilSystem:tt,ProjectionSystem:rt,RenderTextureSystem:st,ShaderSystem:dt,StateSystem:yt,TextureGCSystem:xt,TextureSystem:Et};exports.systems=Tt;var bt=new o.Matrix,St=function(i){function n(n,s){void 0===n&&(n=t.RENDERER_TYPE.UNKNOWN);var a=i.call(this)||this;return(s=Object.assign({},e.settings.RENDER_OPTIONS,s)).roundPixels&&(e.settings.ROUND_PIXELS=s.roundPixels,(0,r.deprecation)("5.0.0","Renderer roundPixels option is deprecated, please use PIXI.settings.ROUND_PIXELS",2)),a.options=s,a.type=n,a.screen=new o.Rectangle(0,0,s.width,s.height),a.view=s.view||document.createElement("canvas"),a.resolution=s.resolution||e.settings.RESOLUTION,a.transparent=s.transparent,a.autoDensity=s.autoDensity||s.autoResize||!1,a.preserveDrawingBuffer=s.preserveDrawingBuffer,a.clearBeforeRender=s.clearBeforeRender,a._backgroundColor=0,a._backgroundColorRgba=[0,0,0,0],a._backgroundColorString="#000000",a.backgroundColor=s.backgroundColor||a._backgroundColor,a._lastObjectRendered=null,a.plugins={},a}return h(n,i),n.prototype.initPlugins=function(e){for(var t in e)this.plugins[t]=new e[t](this)},Object.defineProperty(n.prototype,"width",{get:function(){return this.view.width},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"height",{get:function(){return this.view.height},enumerable:!1,configurable:!0}),n.prototype.resize=function(e,t){this.screen.width=e,this.screen.height=t,this.view.width=e*this.resolution,this.view.height=t*this.resolution,this.autoDensity&&(this.view.style.width=e+"px",this.view.style.height=t+"px"),this.emit("resize",e,t)},n.prototype.generateTexture=function(e,t,r,i){0===(i=i||e.getLocalBounds(null,!0)).width&&(i.width=1),0===i.height&&(i.height=1);var n=D.create({width:0|i.width,height:0|i.height,scaleMode:t,resolution:r});return bt.tx=-i.x,bt.ty=-i.y,this.render(e,n,!1,bt,!!e.parent),n},n.prototype.destroy=function(e){for(var r in this.plugins)this.plugins[r].destroy(),this.plugins[r]=null;e&&this.view.parentNode&&this.view.parentNode.removeChild(this.view);this.plugins=null,this.type=t.RENDERER_TYPE.UNKNOWN,this.view=null,this.screen=null,this._tempDisplayObjectParent=null,this.options=null,this._backgroundColorRgba=null,this._backgroundColorString=null,this._lastObjectRendered=null},Object.defineProperty(n.prototype,"backgroundColor",{get:function(){return this._backgroundColor},set:function(e){this._backgroundColor=e,this._backgroundColorString=(0,r.hex2string)(e),(0,r.hex2rgb)(e,this._backgroundColorRgba)},enumerable:!1,configurable:!0}),n}(r.EventEmitter);exports.AbstractRenderer=St;var wt=function(e){function n(s){var a=e.call(this,t.RENDERER_TYPE.WEBGL,s)||this;return s=a.options,a.gl=null,a.CONTEXT_UID=0,a.runners={destroy:new i.Runner("destroy"),contextChange:new i.Runner("contextChange"),reset:new i.Runner("reset"),update:new i.Runner("update"),postrender:new i.Runner("postrender"),prerender:new i.Runner("prerender"),resize:new i.Runner("resize")},a.globalUniforms=new K({projectionMatrix:new o.Matrix},!0),a.addSystem($e,"mask").addSystem(ee,"context").addSystem(yt,"state").addSystem(dt,"shader").addSystem(Et,"texture").addSystem(se,"geometry").addSystem(ie,"framebuffer").addSystem(et,"scissor").addSystem(tt,"stencil").addSystem(rt,"projection").addSystem(xt,"textureGC").addSystem(Q,"filter").addSystem(st,"renderTexture").addSystem($,"batch"),a.initPlugins(n.__plugins),s.context?a.context.initFromContext(s.context):a.context.initFromOptions({alpha:!!a.transparent,antialias:s.antialias,premultipliedAlpha:a.transparent&&"notMultiplied"!==a.transparent,stencil:!0,preserveDrawingBuffer:s.preserveDrawingBuffer,powerPreference:a.options.powerPreference}),a.renderingToScreen=!0,(0,r.sayHello)(2===a.context.webGLVersion?"WebGL 2":"WebGL 1"),a.resize(a.options.width,a.options.height),a}return h(n,e),n.create=function(e){if((0,r.isWebGLSupported)())return new n(e);throw new Error('WebGL unsupported in this browser, use "pixi.js-legacy" for fallback canvas2d support.')},n.prototype.addSystem=function(e,t){t||(t=e.name);var r=new e(this);if(this[t])throw new Error('Whoops! The name "'+t+'" is already in use');for(var i in this[t]=r,this.runners)this.runners[i].add(r);return this},n.prototype.render=function(e,t,r,i,n){if(this.renderingToScreen=!t,this.runners.prerender.emit(),this.emit("prerender"),this.projection.transform=i,!this.context.isLost){if(t||(this._lastObjectRendered=e),!n){var o=e.enableTempParent();e.updateTransform(),e.disableTempParent(o)}this.renderTexture.bind(t),this.batch.currentRenderer.start(),(void 0!==r?r:this.clearBeforeRender)&&this.renderTexture.clear(),e.render(this),this.batch.currentRenderer.flush(),t&&t.baseTexture.update(),this.runners.postrender.emit(),this.projection.transform=null,this.emit("postrender")}},n.prototype.resize=function(t,r){e.prototype.resize.call(this,t,r),this.runners.resize.emit(t,r)},n.prototype.reset=function(){return this.runners.reset.emit(),this},n.prototype.clear=function(){this.renderTexture.bind(),this.renderTexture.clear()},n.prototype.destroy=function(t){for(var r in this.runners.destroy.emit(),this.runners)this.runners[r].destroy();e.prototype.destroy.call(this,t),this.gl=null},n.registerPlugin=function(e,t){n.__plugins=n.__plugins||{},n.__plugins[e]=t},n}(St);function At(e){return wt.create(e)}exports.Renderer=wt;var Ct="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}";exports.defaultVertex=Ct;var Rt="attribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nuniform vec4 inputSize;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvec2 filterTextureCoord( void )\n{\n return aVertexPosition * (outputFrame.zw * inputSize.zw);\n}\n\nvoid main(void)\n{\n gl_Position = filterVertexPosition();\n vTextureCoord = filterTextureCoord();\n}\n";exports.defaultFilterVertex=Rt;var It=function(){return function(){this.texArray=null,this.blend=0,this.type=t.DRAW_MODES.TRIANGLES,this.start=0,this.size=0,this.data=null}}();exports.BatchDrawCall=It;var Ot=function(){function e(){this.elements=[],this.ids=[],this.count=0}return e.prototype.clear=function(){for(var e=0;ethis.size&&this.flush(),this._vertexCount+=e.vertexData.length/2,this._indexCount+=e.indices.length,this._bufferedTextures[this._bufferSize]=e._texture.baseTexture,this._bufferedElements[this._bufferSize++]=e)},n.prototype.buildTexturesAndDrawCalls=function(){var e=this._bufferedTextures,t=this.MAX_TEXTURES,r=n._textureArrayPool,i=this.renderer.batch,o=this._tempBoundTextures,s=this.renderer.textureGC.count,a=++f._globalBatch,u=0,h=r[0],l=0;i.copyBoundTextures(o,t);for(var d=0;d=t&&(i.boundArray(h,o,a,t),this.buildDrawCalls(h,l,d),l=d,h=r[++u],++a),c._batchEnabled=a,c.touched=s,h.elements[h.count++]=c)}h.count>0&&(i.boundArray(h,o,a,t),this.buildDrawCalls(h,l,this._bufferSize),++u,++a);for(d=0;d0&&(t+="\nelse "),r{if(!e)return;const t={key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:/?#]*)(?::(\d*))?))?((((?:[^?#/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@/]*@)([^:/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#/]*\.[^?#/.]+(?:[?#]|$)))*\/?)?([^?#/]*))(?:\?([^#]*))?(?:#(.*))?)/}},o=t.parser[r.strictMode?"strict":"loose"].exec(e),s={};let a=14;for(;a--;)s[t.key[a]]=o[a]||"";return s[t.q.name]={},s[t.key[12]].replace(t.q.parser,function(e,r,o){r&&(s[t.q.name][r]=o)}),s}); },{}],"vKdq":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=function(){function n(n,t){for(var e=0;e0||t.responseType===r.XHR_RESPONSE_TYPE.BUFFER)?i=f:i===T&&(i=p),(i/100|0)===O){if(this.xhrType===r.XHR_RESPONSE_TYPE.TEXT)this.data=e,this.type=r.TYPE.TEXT;else if(this.xhrType===r.XHR_RESPONSE_TYPE.JSON)try{this.data=JSON.parse(e),this.type=r.TYPE.JSON}catch(o){return void this.abort("Error trying to parse loaded json: "+o)}else if(this.xhrType===r.XHR_RESPONSE_TYPE.DOCUMENT)try{if(window.DOMParser){var s=new DOMParser;this.data=s.parseFromString(e,"text/xml")}else{var n=document.createElement("div");n.innerHTML=e,this.data=n}this.type=r.TYPE.XML}catch(o){return void this.abort("Error trying to parse loaded xml: "+o)}else this.data=t.response||e;this.complete()}else this.abort("["+t.status+"] "+t.statusText+": "+t.responseURL)},i._determineCrossOrigin=function(e,r){if(0===e.indexOf("data:"))return"";if(window.origin!==window.location.origin)return"anonymous";r=r||window.location,_||(_=document.createElement("a")),_.href=e;var i=!(e=(0,t.default)(_.href,{strictMode:!0})).port&&""===r.port||e.port===r.port,s=e.protocol?e.protocol+":":"";return e.host===r.hostname&&i&&s===r.protocol?"":"anonymous"},i._determineXhrType=function(){return r._xhrTypeMap[this.extension]||r.XHR_RESPONSE_TYPE.TEXT},i._determineLoadType=function(){return r._loadTypeMap[this.extension]||r.LOAD_TYPE.XHR},i._getExtension=function(){var t=this.url,e="";if(this.isDataUrl){var r=t.indexOf("/");e=t.substring(r+1,t.indexOf(";",r))}else{var i=t.indexOf("?"),s=t.indexOf("#"),n=Math.min(i>-1?i:t.length,s>-1?s:t.length);e=(t=t.substring(0,n)).substring(t.lastIndexOf(".")+1)}return e.toLowerCase()},i._getMimeFromXhrType=function(t){switch(t){case r.XHR_RESPONSE_TYPE.BUFFER:return"application/octet-binary";case r.XHR_RESPONSE_TYPE.BLOB:return"application/blob";case r.XHR_RESPONSE_TYPE.DOCUMENT:return"application/xml";case r.XHR_RESPONSE_TYPE.JSON:return"application/json";case r.XHR_RESPONSE_TYPE.DEFAULT:case r.XHR_RESPONSE_TYPE.TEXT:default:return"text/plain"}},l(r,[{key:"isDataUrl",get:function(){return this._hasFlag(r.STATUS_FLAGS.DATA_URL)}},{key:"isComplete",get:function(){return this._hasFlag(r.STATUS_FLAGS.COMPLETE)}},{key:"isLoading",get:function(){return this._hasFlag(r.STATUS_FLAGS.LOADING)}}]),r}();function P(t,e,r){e&&0===e.indexOf(".")&&(e=e.substring(1)),e&&(t[e]=r)}function S(t){return t.toString().replace("object ","")}exports.Resource=m,m.STATUS_FLAGS={NONE:0,DATA_URL:1,COMPLETE:2,LOADING:4},m.TYPE={UNKNOWN:0,JSON:1,XML:2,IMAGE:3,AUDIO:4,VIDEO:5,TEXT:6},m.LOAD_TYPE={XHR:1,IMAGE:2,AUDIO:3,VIDEO:4},m.XHR_RESPONSE_TYPE={DEFAULT:"text",BUFFER:"arraybuffer",BLOB:"blob",DOCUMENT:"document",JSON:"json",TEXT:"text"},m._loadTypeMap={gif:m.LOAD_TYPE.IMAGE,png:m.LOAD_TYPE.IMAGE,bmp:m.LOAD_TYPE.IMAGE,jpg:m.LOAD_TYPE.IMAGE,jpeg:m.LOAD_TYPE.IMAGE,tif:m.LOAD_TYPE.IMAGE,tiff:m.LOAD_TYPE.IMAGE,webp:m.LOAD_TYPE.IMAGE,tga:m.LOAD_TYPE.IMAGE,svg:m.LOAD_TYPE.IMAGE,"svg+xml":m.LOAD_TYPE.IMAGE,mp3:m.LOAD_TYPE.AUDIO,ogg:m.LOAD_TYPE.AUDIO,wav:m.LOAD_TYPE.AUDIO,mp4:m.LOAD_TYPE.VIDEO,webm:m.LOAD_TYPE.VIDEO},m._xhrTypeMap={xhtml:m.XHR_RESPONSE_TYPE.DOCUMENT,html:m.XHR_RESPONSE_TYPE.DOCUMENT,htm:m.XHR_RESPONSE_TYPE.DOCUMENT,xml:m.XHR_RESPONSE_TYPE.DOCUMENT,tmx:m.XHR_RESPONSE_TYPE.DOCUMENT,svg:m.XHR_RESPONSE_TYPE.DOCUMENT,tsx:m.XHR_RESPONSE_TYPE.DOCUMENT,gif:m.XHR_RESPONSE_TYPE.BLOB,png:m.XHR_RESPONSE_TYPE.BLOB,bmp:m.XHR_RESPONSE_TYPE.BLOB,jpg:m.XHR_RESPONSE_TYPE.BLOB,jpeg:m.XHR_RESPONSE_TYPE.BLOB,tif:m.XHR_RESPONSE_TYPE.BLOB,tiff:m.XHR_RESPONSE_TYPE.BLOB,webp:m.XHR_RESPONSE_TYPE.BLOB,tga:m.XHR_RESPONSE_TYPE.BLOB,json:m.XHR_RESPONSE_TYPE.JSON,text:m.XHR_RESPONSE_TYPE.TEXT,txt:m.XHR_RESPONSE_TYPE.TEXT,ttf:m.XHR_RESPONSE_TYPE.BUFFER,otf:m.XHR_RESPONSE_TYPE.BUFFER},m.EMPTY_GIF="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==";var A="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function b(t){for(var e="",r=0;r>2,s[1]=(3&i[0])<<4|i[1]>>4,s[2]=(15&i[1])<<2|i[2]>>6,s[3]=63&i[2],r-(t.length-1)){case 2:s[3]=64,s[2]=64;break;case 1:s[3]=64}for(var o=0;o16384&&(o=16384),n._properties=[!1,!0,!1,!1,!1],n._maxSize=i,n._batchSize=o,n._buffers=null,n._bufferUpdateIDs=[],n._updateID=0,n.interactiveChildren=!1,n.blendMode=t.BLEND_MODES.NORMAL,n.autoResize=a,n.roundPixels=!0,n.baseTexture=null,n.setProperties(r),n._tint=0,n.tintRgb=new Float32Array(4),n.tint=16777215,n}return n(r,e),r.prototype.setProperties=function(t){t&&(this._properties[0]="vertices"in t||"scale"in t?!!t.vertices||!!t.scale:this._properties[0],this._properties[1]="position"in t?!!t.position:this._properties[1],this._properties[2]="rotation"in t?!!t.rotation:this._properties[2],this._properties[3]="uvs"in t?!!t.uvs:this._properties[3],this._properties[4]="tint"in t||"alpha"in t?!!t.tint||!!t.alpha:this._properties[4])},r.prototype.updateTransform=function(){this.displayObjectUpdateTransform()},Object.defineProperty(r.prototype,"tint",{get:function(){return this._tint},set:function(t){this._tint=t,(0,i.hex2rgb)(t,this.tintRgb)},enumerable:!1,configurable:!0}),r.prototype.render=function(t){var e=this;this.visible&&!(this.worldAlpha<=0)&&this.children.length&&this.renderable&&(this.baseTexture||(this.baseTexture=this.children[0]._texture.baseTexture,this.baseTexture.valid||this.baseTexture.once("update",function(){return e.onChildrenChange(0)})),t.batch.setObjectRenderer(t.plugins.particle),t.plugins.particle.render(this))},r.prototype.onChildrenChange=function(t){for(var e=Math.floor(t/this._batchSize);this._bufferUpdateIDs.lengthr&&!t.autoResize&&(n=r);var s=t._buffers;s||(s=t._buffers=this.generateBuffers(t));var u=e[0]._texture.baseTexture;this.state.blendMode=(0,i.correctBlendMode)(t.blendMode,u.alphaMode),a.state.set(this.state);var p=a.gl,h=t.worldTransform.copyTo(this.tempMatrix);h.prepend(a.globalUniforms.uniforms.projectionMatrix),this.shader.uniforms.translationMatrix=h.toArray(!0),this.shader.uniforms.uColor=(0,i.premultiplyRgba)(t.tintRgb,t.worldAlpha,this.shader.uniforms.uColor,u.alphaMode),this.shader.uniforms.uSampler=u,this.renderer.shader.bind(this.shader);for(var d=!1,f=0,l=0;fo&&(c=o),l>=s.length&&s.push(this._generateOneMoreBuffer(t));var y=s[l];y.uploadDynamic(e,f,c);var v=t._bufferUpdateIDs[l]||0;(d=d||y._updateID0,h=u.alpha,d=h<1&&p?(0,i.premultiplyTint)(u._tintRGB,h):u._tintRGB+(255*h<<24);o[n]=d,o[n+a]=d,o[n+2*a]=d,o[n+3*a]=d,n+=4*a}},a.prototype.destroy=function(){e.prototype.destroy.call(this),this.shader&&(this.shader.destroy(),this.shader=null),this.tempMatrix=null},a}(r.ObjectRenderer);exports.ParticleRenderer=d; },{"@pixi/constants":"LQBK","@pixi/display":"nL3p","@pixi/utils":"2G5T","@pixi/core":"p2j5","@pixi/math":"oNQC"}],"KxlN":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.graphicsUtils=exports.LineStyle=exports.LINE_JOIN=exports.LINE_CAP=exports.GraphicsGeometry=exports.GraphicsData=exports.Graphics=exports.GRAPHICS_CURVES=exports.FillStyle=void 0;var t,e,i=require("@pixi/core"),r=require("@pixi/math"),s=require("@pixi/utils"),n=require("@pixi/constants"),a=require("@pixi/display");exports.LINE_JOIN=t,function(t){t.MITER="miter",t.BEVEL="bevel",t.ROUND="round"}(t||(exports.LINE_JOIN=t={})),exports.LINE_CAP=e,function(t){t.BUTT="butt",t.ROUND="round",t.SQUARE="square"}(e||(exports.LINE_CAP=e={}));var h={adaptive:!0,maxLength:10,minSegments:8,maxSegments:2048,epsilon:1e-4,_segmentsCount:function(t,e){if(void 0===e&&(e=20),!this.adaptive||!t||isNaN(t))return e;var i=Math.ceil(t/this.maxLength);return ithis.maxSegments&&(i=this.maxSegments),i}};exports.GRAPHICS_CURVES=h;var o=function(){function t(){this.color=16777215,this.alpha=1,this.texture=i.Texture.WHITE,this.matrix=null,this.visible=!1,this.reset()}return t.prototype.clone=function(){var e=new t;return e.color=this.color,e.alpha=this.alpha,e.texture=this.texture,e.matrix=this.matrix,e.visible=this.visible,e},t.prototype.reset=function(){this.color=16777215,this.alpha=1,this.texture=i.Texture.WHITE,this.matrix=null,this.visible=!1},t.prototype.destroy=function(){this.texture=null,this.matrix=null},t}();exports.FillStyle=o;var l=function(t,e){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)};function u(t,e){function i(){this.constructor=t}l(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var p={build:function(t){t.points=t.shape.points.slice()},triangulate:function(t,e){var i=t.points,r=t.holes,n=e.points,a=e.indices;if(i.length>=6){for(var h=[],o=0;op&&(p+=2*Math.PI);var c=u,d=p-u,f=Math.abs(d),y=Math.sqrt(o*o+l*l),v=1+(15*f*Math.sqrt(y)/Math.PI>>0),g=d/v;if(c+=g,h){a.push(t,e),a.push(i,r);for(var b=1,x=c;bw?(W?(v.push(Z,K),v.push(D+C*H,E+R*H),v.push(Z,K),v.push(D+B*H,E+L*H)):(v.push(D-C*N,E-R*N),v.push($,tt),v.push(D-B*N,E-L*N),v.push($,tt)),m+=2):l.join===t.ROUND?W?(v.push(Z,K),v.push(D+C*H,E+R*H),m+=b(D,E,D+C*H,E+R*H,D+B*H,E+L*H,v,!0)+4,v.push(Z,K),v.push(D+B*H,E+L*H)):(v.push(D-C*N,E-R*N),v.push($,tt),m+=b(D,E,D-C*N,E-R*N,D-B*N,E-L*N,v,!1)+4,v.push(D-B*N,E-L*N),v.push($,tt)):(v.push(Z,K),v.push($,tt)):(v.push(D-C*N,E-R*N),v.push(D+C*H,E+R*H),l.join===t.BEVEL||J/P>w||(l.join===t.ROUND?m+=W?b(D,E,D+C*H,E+R*H,D+B*H,E+L*H,v,!0)+2:b(D,E,D-C*N,E-R*N,D-B*N,E-L*N,v,!1)+2:(W?(v.push($,tt),v.push($,tt)):(v.push(Z,K),v.push(Z,K)),m+=2)),v.push(D-B*N,E-L*N),v.push(D+B*H,E+L*H),m+=2)}}M=a[2*(x-2)],T=a[2*(x-2)+1],D=a[2*(x-1)],C=-(T-(E=a[2*(x-1)+1])),R=M-D,C/=O=Math.sqrt(C*C+R*R),R/=O,C*=_,R*=_,v.push(D-C*N,E-R*N),v.push(D+C*H,E+R*H),c||(l.cap===e.ROUND?m+=b(D-C*(N-H)*.5,E-R*(N-H)*.5,D-C*N,E-R*N,D+C*H,E+R*H,v,!1)+2:l.cap===e.SQUARE&&(m+=g(D,E,C,R,N,H,!1,v)));var it=s.indices,rt=h.epsilon*h.epsilon;for(j=S;ju*h}},t.arc=function(t,e,i,s,n,a,o,l,u){for(var p=o-a,c=h._segmentsCount(Math.abs(p)*n,40*Math.ceil(Math.abs(p)/r.PI_2)),d=p/(2*c),f=2*d,y=Math.cos(d),v=Math.sin(d),g=c-1,b=g%1/g,x=0;x<=g;++x){var m=d+a+f*(x+b*x),S=Math.cos(m),_=-Math.sin(m);u.push((y*S+v*_)*n+i,(y*-_+v*S)*n+s)}},t}(),M=function(){function t(){}return t.curveLength=function(t,e,i,r,s,n,a,h){for(var o=0,l=0,u=0,p=0,c=0,d=0,f=0,y=0,v=0,g=0,b=0,x=t,m=e,S=1;S<=10;++S)g=x-(y=(f=(d=(c=1-(l=S/10))*c)*c)*t+3*d*l*i+3*c*(u=l*l)*s+(p=u*l)*a),b=m-(v=f*e+3*d*l*r+3*c*u*n+p*h),x=y,m=v,o+=Math.sqrt(g*g+b*b);return o},t.curveTo=function(e,i,r,s,n,a,o){var l=o[o.length-2],u=o[o.length-1];o.length-=2;var p=h._segmentsCount(t.curveLength(l,u,e,i,r,s,n,a)),c=0,d=0,f=0,y=0,v=0;o.push(l,u);for(var g=1,b=0;g<=p;++g)f=(d=(c=1-(b=g/p))*c)*c,v=(y=b*b)*b,o.push(f*l+3*d*b*e+3*c*y*r+v*n,f*u+3*d*b*i+3*c*y*s+v*a)},t}(),T=function(){function t(){}return t.curveLength=function(t,e,i,r,s,n){var a=t-2*i+s,h=e-2*r+n,o=2*i-2*t,l=2*r-2*e,u=4*(a*a+h*h),p=4*(a*o+h*l),c=o*o+l*l,d=2*Math.sqrt(u+p+c),f=Math.sqrt(u),y=2*u*f,v=2*Math.sqrt(c),g=p/f;return(y*d+f*p*(d-v)+(4*c*u-p*p)*Math.log((2*f+g+d)/(g+v)))/(4*y)},t.curveTo=function(e,i,r,s,n){for(var a=n[n.length-2],o=n[n.length-1],l=h._segmentsCount(t.curveLength(a,o,e,i,r,s)),u=0,p=0,c=1;c<=l;++c){var d=c/l;u=a+(e-a)*d,p=o+(i-o)*d,n.push(u+(e+(r-e)*d-u)*d,p+(i+(s-i)*d-p)*d)}},t}(),D=function(){function t(){this.reset()}return t.prototype.begin=function(t,e,i){this.reset(),this.style=t,this.start=e,this.attribStart=i},t.prototype.end=function(t,e){this.attribSize=e-this.attribStart,this.size=t-this.start},t.prototype.reset=function(){this.style=null,this.size=0,this.start=0,this.attribStart=0,this.attribSize=0},t}(),E=((_={})[r.SHAPES.POLY]=p,_[r.SHAPES.CIRC]=c,_[r.SHAPES.ELIP]=c,_[r.SHAPES.RECT]=d,_[r.SHAPES.RREC]=v,_),A=[],I=[],C={buildPoly:p,buildCircle:c,buildRectangle:d,buildRoundedRectangle:v,FILL_COMMANDS:E,BATCH_POOL:A,DRAW_CALL_POOL:I,buildLine:S,Star:P,ArcUtils:w,BezierUtils:M,QuadraticUtils:T,BatchPart:D};exports.graphicsUtils=C;var R=function(){function t(t,e,i,r){void 0===e&&(e=null),void 0===i&&(i=null),void 0===r&&(r=null),this.shape=t,this.lineStyle=i,this.fillStyle=e,this.matrix=r,this.type=t.type,this.points=[],this.holes=[]}return t.prototype.clone=function(){return new t(this.shape,this.fillStyle,this.lineStyle,this.matrix)},t.prototype.destroy=function(){this.shape=null,this.holes.length=0,this.holes=null,this.points.length=0,this.points=null,this.lineStyle=null,this.fillStyle=null},t}();exports.GraphicsData=R;var B=new r.Point,L=new a.Bounds,O=function(t){function e(){var e=t.call(this)||this;return e.uvsFloat32=null,e.indicesUint16=null,e.points=[],e.colors=[],e.uvs=[],e.indices=[],e.textureIds=[],e.graphicsData=[],e.dirty=0,e.batchDirty=-1,e.cacheDirty=-1,e.clearDirty=0,e.drawCalls=[],e.batches=[],e.shapeIndex=0,e._bounds=new a.Bounds,e.boundsDirty=-1,e.boundsPadding=0,e.batchable=!1,e.indicesUint16=null,e.uvsFloat32=null,e.closePointEps=1e-4,e}return u(e,t),Object.defineProperty(e.prototype,"bounds",{get:function(){return this.boundsDirty!==this.dirty&&(this.boundsDirty=this.dirty,this.calculateBounds()),this._bounds},enumerable:!1,configurable:!0}),e.prototype.invalidate=function(){this.boundsDirty=-1,this.dirty++,this.batchDirty++,this.shapeIndex=0,this.points.length=0,this.colors.length=0,this.uvs.length=0,this.indices.length=0,this.textureIds.length=0;for(var t=0;t0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this},e.prototype.drawShape=function(t,e,i,r){void 0===e&&(e=null),void 0===i&&(i=null),void 0===r&&(r=null);var s=new R(t,e,i,r);return this.graphicsData.push(s),this.dirty++,this},e.prototype.drawHole=function(t,e){if(void 0===e&&(e=null),!this.graphicsData.length)return null;var i=new R(t,null,null,e),r=this.graphicsData[this.graphicsData.length-1];return i.lineStyle=r.lineStyle,r.holes.push(i),this.dirty++,this},e.prototype.destroy=function(){t.prototype.destroy.call(this);for(var e=0;e0&&(s=(r=this.batches[this.batches.length-1]).style);for(var a=this.shapeIndex;a65535&&t;this.indicesUint16=b?new Uint32Array(this.indices):new Uint16Array(this.indices)}this.batchable=this.isBatchable(),this.batchable?this.packBatches():this.buildDrawCalls()}else this.batchable=!0}}else this.batchable=!0},e.prototype._compareStyles=function(t,e){return!(!t||!e)&&(t.texture.baseTexture===e.texture.baseTexture&&(t.color+t.alpha===e.color+e.alpha&&!!t.native==!!e.native))},e.prototype.validateBatching=function(){if(this.dirty===this.cacheDirty||!this.graphicsData.length)return!1;for(var t=0,e=this.graphicsData.length;t131070)return!1;for(var t=this.batches,i=0;i0&&((a=I.pop())||((a=new i.BatchDrawCall).texArray=new i.BatchTextureArray),this.drawCalls.push(a)),a.start=c,a.size=0,a.texArray.count=0,a.type=p),y.touched=1,y._batchEnabled=t,y._batchLocation=h,y.wrapMode=10497,a.texArray.elements[a.texArray.count++]=y,h++)),a.size+=d.size,c+=d.size,l=y._batchLocation,this.addColors(r,f.color,f.alpha,d.attribSize,d.attribStart),this.addTextureIds(s,l,d.attribSize,d.attribStart)}i.BaseTexture._globalBatch=t,this.packAttributes()},e.prototype.packAttributes=function(){for(var t=this.points,e=this.uvs,i=this.colors,r=this.textureIds,s=new ArrayBuffer(3*t.length*4),n=new Float32Array(s),a=new Uint32Array(s),h=0,o=0;o>16)+(65280&e)+((255&e)<<16),h=(0,s.premultiplyTint)(a,i);t.length=Math.max(t.length,n+r);for(var o=0;o0&&r.alpha>0;return d?(r.matrix&&(r.matrix=r.matrix.clone(),r.matrix.invert()),Object.assign(this._lineStyle,{visible:d},r)):this._lineStyle.reset(),this},h.prototype.startPoly=function(){if(this.currentPath){var t=this.currentPath.points,e=this.currentPath.points.length;e>2&&(this.drawShape(this.currentPath),this.currentPath=new r.Polygon,this.currentPath.closeStroke=!1,this.currentPath.points.push(t[e-2],t[e-1]))}else this.currentPath=new r.Polygon,this.currentPath.closeStroke=!1},h.prototype.finishPoly=function(){this.currentPath&&(this.currentPath.points.length>2?(this.drawShape(this.currentPath),this.currentPath=null):this.currentPath.points.length=0)},h.prototype.moveTo=function(t,e){return this.startPoly(),this.currentPath.points[0]=t,this.currentPath.points[1]=e,this},h.prototype.lineTo=function(t,e){this.currentPath||this.moveTo(0,0);var i=this.currentPath.points,r=i[i.length-2],s=i[i.length-1];return r===t&&s===e||i.push(t,e),this},h.prototype._initCurve=function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.currentPath?0===this.currentPath.points.length&&(this.currentPath.points=[t,e]):this.moveTo(t,e)},h.prototype.quadraticCurveTo=function(t,e,i,r){this._initCurve();var s=this.currentPath.points;return 0===s.length&&this.moveTo(0,0),T.curveTo(t,e,i,r,s),this},h.prototype.bezierCurveTo=function(t,e,i,r,s,n){return this._initCurve(),M.curveTo(t,e,i,r,s,n,this.currentPath.points),this},h.prototype.arcTo=function(t,e,i,r,s){this._initCurve(t,e);var n=this.currentPath.points,a=w.curveTo(t,e,i,r,s,n);if(a){var h=a.cx,o=a.cy,l=a.radius,u=a.startAngle,p=a.endAngle,c=a.anticlockwise;this.arc(h,o,l,u,p,c)}return this},h.prototype.arc=function(t,e,i,s,n,a){if(void 0===a&&(a=!1),s===n)return this;if(!a&&n<=s?n+=r.PI_2:a&&s<=n&&(s+=r.PI_2),0===n-s)return this;var h=t+Math.cos(s)*i,o=e+Math.sin(s)*i,l=this._geometry.closePointEps,u=this.currentPath?this.currentPath.points:null;if(u){var p=Math.abs(u[u.length-2]-h),c=Math.abs(u[u.length-1]-o);p0;return o?(t.matrix&&(t.matrix=t.matrix.clone(),t.matrix.invert()),Object.assign(this._fillStyle,{visible:o},t)):this._fillStyle.reset(),this},h.prototype.endFill=function(){return this.finishPoly(),this._fillStyle.reset(),this},h.prototype.drawRect=function(t,e,i,s){return this.drawShape(new r.Rectangle(t,e,i,s))},h.prototype.drawRoundedRect=function(t,e,i,s,n){return this.drawShape(new r.RoundedRectangle(t,e,i,s,n))},h.prototype.drawCircle=function(t,e,i){return this.drawShape(new r.Circle(t,e,i))},h.prototype.drawEllipse=function(t,e,i,s){return this.drawShape(new r.Ellipse(t,e,i,s))},h.prototype.drawPolygon=function(){for(var t,e=arguments,i=[],s=0;s>16&255)/255*s,n.tint[1]=(r>>8&255)/255*s,n.tint[2]=(255&r)/255*s,n.tint[3]=s,t.shader.bind(e),t.geometry.bind(i,e),t.state.set(this.state);for(var h=0,o=a.length;h>16)+(65280&n)+((255&n)<<16)}}},h.prototype.calculateVertices=function(){var t=this.transform._worldID;if(this._transformID!==t){this._transformID=t;for(var e=this.transform.worldTransform,i=e.a,r=e.b,s=e.c,n=e.d,a=e.tx,h=e.ty,o=this._geometry.points,l=this.vertexData,u=0,p=0;p=r&&u.x=s&&u.y>16)+(65280&t)+((255&t)<<16)},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"texture",{get:function(){return this._texture},set:function(t){this._texture!==t&&(this._texture&&this._texture.off("update",this._onTextureUpdate,this),this._texture=t||e.Texture.EMPTY,this._cachedTint=16777215,this._textureID=-1,this._textureTrimmedID=-1,t&&(t.baseTexture.valid?this._onTextureUpdate():t.once("update",this._onTextureUpdate,this)))},enumerable:!1,configurable:!0}),o}(i.Container);exports.Sprite=_; },{"@pixi/constants":"LQBK","@pixi/core":"p2j5","@pixi/display":"nL3p","@pixi/math":"oNQC","@pixi/settings":"t4Uo","@pixi/utils":"2G5T"}],"T62s":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.TextStyle=exports.TextMetrics=exports.Text=exports.TEXT_GRADIENT=void 0;var t,e=require("@pixi/sprite"),i=require("@pixi/core"),r=require("@pixi/settings"),n=require("@pixi/math"),o=require("@pixi/utils"),s=function(t,e){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)};function a(t,e){function i(){this.constructor=t}s(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}exports.TEXT_GRADIENT=t,function(t){t[t.LINEAR_VERTICAL=0]="LINEAR_VERTICAL",t[t.LINEAR_HORIZONTAL=1]="LINEAR_HORIZONTAL"}(t||(exports.TEXT_GRADIENT=t={}));var h={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fillGradientType:t.LINEAR_VERTICAL,fillGradientStops:[],fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",letterSpacing:0,lineHeight:0,lineJoin:"miter",miterLimit:10,padding:0,stroke:"black",strokeThickness:0,textBaseline:"alphabetic",trim:!1,whiteSpace:"pre",wordWrap:!1,wordWrapWidth:100,leading:0},l=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],c=function(){function t(t){this.styleID=0,this.reset(),d(this,t,t)}return t.prototype.clone=function(){var e={};return d(e,this,h),new t(e)},t.prototype.reset=function(){d(this,h,h)},Object.defineProperty(t.prototype,"align",{get:function(){return this._align},set:function(t){this._align!==t&&(this._align=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"breakWords",{get:function(){return this._breakWords},set:function(t){this._breakWords!==t&&(this._breakWords=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadow",{get:function(){return this._dropShadow},set:function(t){this._dropShadow!==t&&(this._dropShadow=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadowAlpha",{get:function(){return this._dropShadowAlpha},set:function(t){this._dropShadowAlpha!==t&&(this._dropShadowAlpha=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadowAngle",{get:function(){return this._dropShadowAngle},set:function(t){this._dropShadowAngle!==t&&(this._dropShadowAngle=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadowBlur",{get:function(){return this._dropShadowBlur},set:function(t){this._dropShadowBlur!==t&&(this._dropShadowBlur=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadowColor",{get:function(){return this._dropShadowColor},set:function(t){var e=f(t);this._dropShadowColor!==e&&(this._dropShadowColor=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadowDistance",{get:function(){return this._dropShadowDistance},set:function(t){this._dropShadowDistance!==t&&(this._dropShadowDistance=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fill",{get:function(){return this._fill},set:function(t){var e=f(t);this._fill!==e&&(this._fill=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fillGradientType",{get:function(){return this._fillGradientType},set:function(t){this._fillGradientType!==t&&(this._fillGradientType=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fillGradientStops",{get:function(){return this._fillGradientStops},set:function(t){p(this._fillGradientStops,t)||(this._fillGradientStops=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fontFamily",{get:function(){return this._fontFamily},set:function(t){this.fontFamily!==t&&(this._fontFamily=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fontSize",{get:function(){return this._fontSize},set:function(t){this._fontSize!==t&&(this._fontSize=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fontStyle",{get:function(){return this._fontStyle},set:function(t){this._fontStyle!==t&&(this._fontStyle=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fontVariant",{get:function(){return this._fontVariant},set:function(t){this._fontVariant!==t&&(this._fontVariant=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fontWeight",{get:function(){return this._fontWeight},set:function(t){this._fontWeight!==t&&(this._fontWeight=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"letterSpacing",{get:function(){return this._letterSpacing},set:function(t){this._letterSpacing!==t&&(this._letterSpacing=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lineHeight",{get:function(){return this._lineHeight},set:function(t){this._lineHeight!==t&&(this._lineHeight=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"leading",{get:function(){return this._leading},set:function(t){this._leading!==t&&(this._leading=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lineJoin",{get:function(){return this._lineJoin},set:function(t){this._lineJoin!==t&&(this._lineJoin=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"miterLimit",{get:function(){return this._miterLimit},set:function(t){this._miterLimit!==t&&(this._miterLimit=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"padding",{get:function(){return this._padding},set:function(t){this._padding!==t&&(this._padding=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"stroke",{get:function(){return this._stroke},set:function(t){var e=f(t);this._stroke!==e&&(this._stroke=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"strokeThickness",{get:function(){return this._strokeThickness},set:function(t){this._strokeThickness!==t&&(this._strokeThickness=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"textBaseline",{get:function(){return this._textBaseline},set:function(t){this._textBaseline!==t&&(this._textBaseline=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"trim",{get:function(){return this._trim},set:function(t){this._trim!==t&&(this._trim=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"whiteSpace",{get:function(){return this._whiteSpace},set:function(t){this._whiteSpace!==t&&(this._whiteSpace=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"wordWrap",{get:function(){return this._wordWrap},set:function(t){this._wordWrap!==t&&(this._wordWrap=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"wordWrapWidth",{get:function(){return this._wordWrapWidth},set:function(t){this._wordWrapWidth!==t&&(this._wordWrapWidth=t,this.styleID++)},enumerable:!1,configurable:!0}),t.prototype.toFontString=function(){var t="number"==typeof this.fontSize?this.fontSize+"px":this.fontSize,e=this.fontFamily;Array.isArray(this.fontFamily)||(e=this.fontFamily.split(","));for(var i=e.length-1;i>=0;i--){var r=e[i].trim();!/([\"\'])[^\'\"]+\1/.test(r)&&l.indexOf(r)<0&&(r='"'+r+'"'),e[i]=r}return this.fontStyle+" "+this.fontVariant+" "+this.fontWeight+" "+t+" "+e.join(",")},t}();function u(t){return"number"==typeof t?(0,o.hex2string)(t):("string"==typeof t&&0===t.indexOf("0x")&&(t=t.replace("0x","#")),t)}function f(t){if(Array.isArray(t)){for(var e=0;ed)if(""!==s&&(a+=t.addLine(s),s="",o=0),t.canBreakWords(_,i.breakWords))for(var w=t.wordWrapSplit(_),x=0;xd&&(a+=t.addLine(s),p=!1,s="",o=0),s+=v,o+=O}else{s.length>0&&(a+=t.addLine(s),s="",o=0);var A=y===g.length-1;a+=t.addLine(_,!A),p=!1,s="",o=0}else m+o>d&&(p=!1,a+=t.addLine(s),s="",o=0),(s.length>0||!t.isBreakingSpace(_)||p)&&(s+=_,o+=m)}return a+=t.addLine(s,!1)},t.addLine=function(e,i){return void 0===i&&(i=!0),e=t.trimRight(e),e=i?e+"\n":e},t.getFromCache=function(t,e,i,r){var n=i[t];if("number"!=typeof n){var o=t.length*e;n=r.measureText(t).width+o,i[t]=n}return n},t.collapseSpaces=function(t){return"normal"===t||"pre-line"===t},t.collapseNewlines=function(t){return"normal"===t},t.trimRight=function(e){if("string"!=typeof e)return"";for(var i=e.length-1;i>=0;i--){var r=e[i];if(!t.isBreakingSpace(r))break;e=e.slice(0,-1)}return e},t.isNewline=function(e){return"string"==typeof e&&t._newlines.indexOf(e.charCodeAt(0))>=0},t.isBreakingSpace=function(e){return"string"==typeof e&&t._breakingSpaces.indexOf(e.charCodeAt(0))>=0},t.tokenize=function(e){var i=[],r="";if("string"!=typeof e)return i;for(var n=0;na;--f){for(g=0;g0},e}();function h(e,i){var r=!1;if(e&&e._textures&&e._textures.length)for(var o=0;o=0;t--)this.add(e.children[t]);return this},t.prototype.destroy=function(){this.ticking&&r.Ticker.system.remove(this.tick,this),this.ticking=!1,this.addHooks=null,this.uploadHooks=null,this.renderer=null,this.completes=null,this.queue=null,this.limiter=null,this.uploadHookHelper=null},t}();function m(e,i){return i instanceof t.BaseTexture&&(i._glTextures[e.CONTEXT_UID]||e.texture.bind(i),!0)}function g(e,t){if(!(t instanceof i.Graphics))return!1;var r=t.geometry;t.finishPoly(),r.updateBatches();for(var o=r.batches,s=0;s=i&&s.x=o&&s.y>16)+(65280&t)+((255&t)<<16),this._colorDirty=!0)},enumerable:!1,configurable:!0}),i.prototype.update=function(){if(this._colorDirty){this._colorDirty=!1;var t=this.texture.baseTexture;(0,a.premultiplyTintToRgba)(this._tint,this._alpha,this.uniforms.uColor,t.alphaMode)}this.uvMatrix.update()&&(this.uniforms.uTextureMatrix=this.uvMatrix.mapCoord)},i}(t.Shader);exports.MeshMaterial=c;var x=function(e){function i(i,n,a){var o=e.call(this)||this,s=new t.Buffer(i),u=new t.Buffer(n,!0),h=new t.Buffer(a,!0,!0);return o.addAttribute("aVertexPosition",s,2,!1,r.TYPES.FLOAT).addAttribute("aTextureCoord",u,2,!1,r.TYPES.FLOAT).addIndex(h),o._updateId=-1,o}return s(i,e),Object.defineProperty(i.prototype,"vertexDirtyId",{get:function(){return this.buffers[0]._updateID},enumerable:!1,configurable:!0}),i}(t.Geometry);exports.MeshGeometry=x; },{"@pixi/core":"p2j5","@pixi/math":"oNQC","@pixi/constants":"LQBK","@pixi/display":"nL3p","@pixi/settings":"t4Uo","@pixi/utils":"2G5T"}],"Lw+o":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.BitmapText=exports.BitmapFontLoader=exports.BitmapFontData=exports.BitmapFont=void 0;var e=require("@pixi/math"),t=require("@pixi/settings"),r=require("@pixi/mesh"),i=require("@pixi/utils"),n=require("@pixi/core"),a=require("@pixi/text"),o=require("@pixi/display"),s=require("@pixi/loaders"),h=function(e,t){return(h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};function l(e,t){function r(){this.constructor=e}h(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var u=function(){return function(){this.info=[],this.common=[],this.page=[],this.char=[],this.kerning=[]}}();exports.BitmapFontData=u;var f=function(){function e(){}return e.test=function(e){return"string"==typeof e&&0===e.indexOf("info face=")},e.parse=function(e){var t=e.match(/^[a-z]+\s+.+$/gm),r={info:[],common:[],page:[],char:[],chars:[],kerning:[],kernings:[]};for(var i in t){var n=t[i].match(/^[a-z]+/gm)[0],a=t[i].match(/[a-zA-Z]+=([^\s"']+|"([^"]*)")/gm),o={};for(var s in a){var h=a[s].split("="),l=h[0],f=h[1].replace(/"/gm,""),c=parseFloat(f),p=isNaN(c)?f:c;o[l]=p}r[n].push(o)}var g=new u;return r.info.forEach(function(e){return g.info.push({face:e.face,size:parseInt(e.size,10)})}),r.common.forEach(function(e){return g.common.push({lineHeight:parseInt(e.lineHeight,10)})}),r.page.forEach(function(e){return g.page.push({id:parseInt(e.id,10),file:e.file})}),r.char.forEach(function(e){return g.char.push({id:parseInt(e.id,10),page:parseInt(e.page,10),x:parseInt(e.x,10),y:parseInt(e.y,10),width:parseInt(e.width,10),height:parseInt(e.height,10),xoffset:parseInt(e.xoffset,10),yoffset:parseInt(e.yoffset,10),xadvance:parseInt(e.xadvance,10)})}),r.kerning.forEach(function(e){return g.kerning.push({first:parseInt(e.first,10),second:parseInt(e.second,10),amount:parseInt(e.amount,10)})}),g},e}(),c=function(){function e(){}return e.test=function(e){return e instanceof XMLDocument&&e.getElementsByTagName("page").length&&null!==e.getElementsByTagName("info")[0].getAttribute("face")},e.parse=function(e){for(var t=new u,r=e.getElementsByTagName("info"),i=e.getElementsByTagName("common"),n=e.getElementsByTagName("page"),a=e.getElementsByTagName("char"),o=e.getElementsByTagName("kerning"),s=0;s")>-1){var t=(new self.DOMParser).parseFromString(e,"text/xml");return c.test(t)}return!1},e.parse=function(e){var t=(new window.DOMParser).parseFromString(e,"text/xml");return c.parse(t)},e}(),g=[f,c,p];function d(e){for(var t=0;t=c-E*l){if(0===T)throw new Error("[BitmapFont] textureHeight "+c+"px is too small for "+g.fontSize+"px fonts");--S,y=null,b=null,_=null,T=0,w=0,A=0}else if(A=Math.max(E+P.fontProperties.descent,A),M*l+w>=d)--S,T+=A*l,T=Math.ceil(T),w=0,A=0;else{v(y,b,P,w,T,l,g);var B=P.text.charCodeAt(0);x.char.push({id:B,page:I.length-1,x:w/l,y:T/l,width:M,height:E,xoffset:0,yoffset:0,xadvance:Math.ceil(O-(g.dropShadow?g.dropShadowDistance:0)-(g.stroke?g.strokeThickness:0))}),w+=(M+2*h)*l,w=Math.ceil(w)}}var z=new t(x,I,!0);return void 0!==t.available[e]&&t.uninstall(e),t.available[e]=z,z},t.ALPHA=[["a","z"],["A","Z"]," "],t.NUMERIC=[["0","9"]],t.ALPHANUMERIC=[["a","z"],["A","Z"],["0","9"]," "],t.ASCII=[[" ","~"]],t.defaultOptions={resolution:1,textureWidth:512,textureHeight:512,padding:4,chars:t.ALPHANUMERIC},t.available={},t}();exports.BitmapFont=y;var b=[],_=[],w=function(a){function o(r,n){void 0===n&&(n={});var s=a.call(this)||this;s._tint=16777215,n.font&&((0,i.deprecation)("5.3.0","PIXI.BitmapText constructor style.font property is deprecated."),s._upgradeStyle(n));var h=Object.assign({},o.styleDefaults,n),l=h.align,u=h.tint,f=h.maxWidth,c=h.letterSpacing,p=h.fontName,g=h.fontSize;if(!y.available[p])throw new Error('Missing BitmapFont "'+p+'"');return s._activePagesMeshData=[],s._textWidth=0,s._textHeight=0,s._align=l,s._tint=u,s._fontName=p,s._fontSize=g||y.available[p].size,s._text=r,s._maxWidth=f,s._maxLineHeight=0,s._letterSpacing=c,s._anchor=new e.ObservablePoint(function(){s.dirty=!0},s,0,0),s._roundPixels=t.settings.ROUND_PIXELS,s.dirty=!0,s._textureCache={},s}return l(o,a),o.prototype.updateText=function(){for(var t,a=y.available[this._fontName],o=this._fontSize/a.size,s=new e.Point,h=[],l=[],u=this._text.replace(/(?:\r\n|\r)/g,"\n")||" ",f=u.length,c=this._maxWidth*a.size/this._fontSize,p=null,g=0,d=0,x=0,v=-1,m=0,w=0,T=0,A=0;A0&&s.x>c&&(++w,(0,i.removeItems)(h,1+v-w,1+A-v),A=v,v=-1,l.push(m),d=Math.max(d,m),x++,s.x=0,s.y+=a.lineHeight,p=null)}}else l.push(g),d=Math.max(d,g),++x,++w,s.x=0,s.y+=a.lineHeight,p=null}var E=u.charAt(u.length-1);"\r"!==E&&"\n"!==E&&(/(?:\s)/.test(E)&&(g=m),l.push(g),d=Math.max(d,g));var M=[];for(A=0;A<=x;A++){var B=0;"right"===this._align?B=d-l[A]:"center"===this._align&&(B=(d-l[A])/2),M.push(B)}var z=h.length,C={},k=[],H=this._activePagesMeshData;for(A=0;A6*D)||K.vertices.length<2*r.Mesh.BATCHABLE_SIZE)K.vertices=new Float32Array(8*D),K.uvs=new Float32Array(8*D),K.indices=new Uint16Array(6*D);else for(var U=K.total,W=K.vertices,R=4*U*2;R=2&&(e.fontSize=parseInt(t[0],10))}else e.fontName=e.font.name,e.fontSize="number"==typeof e.font.size?e.font.size:parseInt(e.font.size,10)},o.prototype.destroy=function(e){var t=this._textureCache;for(var r in t){t[r].destroy(),delete t[r]}this._textureCache=null,a.prototype.destroy.call(this,e)},o.registerFont=function(e,t){return(0,i.deprecation)("5.3.0","PIXI.BitmapText.registerFont is deprecated, use PIXI.BitmapFont.install"),y.install(e,t)},Object.defineProperty(o,"fonts",{get:function(){return(0,i.deprecation)("5.3.0","PIXI.BitmapText.fonts is deprecated, use PIXI.BitmapFont.available"),y.available},enumerable:!1,configurable:!0}),o.styleDefaults={align:"left",tint:16777215,maxWidth:0,letterSpacing:0},o}(o.Container);exports.BitmapText=w;var T=function(){function e(){}return e.add=function(){s.LoaderResource.setExtensionXhrType("fnt",s.LoaderResource.XHR_RESPONSE_TYPE.TEXT)},e.use=function(t,r){var i=d(t.data);if(i)for(var n=e.getBaseUrl(this,t),a=i.parse(t.data),o={},h=function(e){o[e.metadata.pageFile]=e.texture,Object.keys(o).length===a.page.length&&(t.bitmapFont=y.install(a,o,!0),r())},l=0;l=i&&(e=t-E-1),o+=u=u.replace("%value%",r[e].toString()),o+="\n"}return n=(n=n.replace("%blur%",o)).replace("%size%",t.toString())}!function(t){t[t.WEBGL_LEGACY=0]="WEBGL_LEGACY",t[t.WEBGL=1]="WEBGL",t[t.WEBGL2=2]="WEBGL2"}(E||(E={})),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.WEBGL=1]="WEBGL",t[t.CANVAS=2]="CANVAS"}(u||(u={})),function(t){t[t.COLOR=16384]="COLOR",t[t.DEPTH=256]="DEPTH",t[t.STENCIL=1024]="STENCIL"}(l||(l={})),function(t){t[t.NORMAL=0]="NORMAL",t[t.ADD=1]="ADD",t[t.MULTIPLY=2]="MULTIPLY",t[t.SCREEN=3]="SCREEN",t[t.OVERLAY=4]="OVERLAY",t[t.DARKEN=5]="DARKEN",t[t.LIGHTEN=6]="LIGHTEN",t[t.COLOR_DODGE=7]="COLOR_DODGE",t[t.COLOR_BURN=8]="COLOR_BURN",t[t.HARD_LIGHT=9]="HARD_LIGHT",t[t.SOFT_LIGHT=10]="SOFT_LIGHT",t[t.DIFFERENCE=11]="DIFFERENCE",t[t.EXCLUSION=12]="EXCLUSION",t[t.HUE=13]="HUE",t[t.SATURATION=14]="SATURATION",t[t.COLOR=15]="COLOR",t[t.LUMINOSITY=16]="LUMINOSITY",t[t.NORMAL_NPM=17]="NORMAL_NPM",t[t.ADD_NPM=18]="ADD_NPM",t[t.SCREEN_NPM=19]="SCREEN_NPM",t[t.NONE=20]="NONE",t[t.SRC_OVER=0]="SRC_OVER",t[t.SRC_IN=21]="SRC_IN",t[t.SRC_OUT=22]="SRC_OUT",t[t.SRC_ATOP=23]="SRC_ATOP",t[t.DST_OVER=24]="DST_OVER",t[t.DST_IN=25]="DST_IN",t[t.DST_OUT=26]="DST_OUT",t[t.DST_ATOP=27]="DST_ATOP",t[t.ERASE=26]="ERASE",t[t.SUBTRACT=28]="SUBTRACT",t[t.XOR=29]="XOR"}(_||(_={})),function(t){t[t.POINTS=0]="POINTS",t[t.LINES=1]="LINES",t[t.LINE_LOOP=2]="LINE_LOOP",t[t.LINE_STRIP=3]="LINE_STRIP",t[t.TRIANGLES=4]="TRIANGLES",t[t.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",t[t.TRIANGLE_FAN=6]="TRIANGLE_FAN"}(s||(s={})),function(t){t[t.RGBA=6408]="RGBA",t[t.RGB=6407]="RGB",t[t.ALPHA=6406]="ALPHA",t[t.LUMINANCE=6409]="LUMINANCE",t[t.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",t[t.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",t[t.DEPTH_STENCIL=34041]="DEPTH_STENCIL"}(T||(T={})),function(t){t[t.TEXTURE_2D=3553]="TEXTURE_2D",t[t.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",t[t.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",t[t.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",t[t.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",t[t.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",t[t.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z"}(a||(a={})),function(t){t[t.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",t[t.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",t[t.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",t[t.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",t[t.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",t[t.FLOAT=5126]="FLOAT",t[t.HALF_FLOAT=36193]="HALF_FLOAT"}(N||(N={})),function(t){t[t.NEAREST=0]="NEAREST",t[t.LINEAR=1]="LINEAR"}(O||(O={})),function(t){t[t.CLAMP=33071]="CLAMP",t[t.REPEAT=10497]="REPEAT",t[t.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"}(A||(A={})),function(t){t[t.OFF=0]="OFF",t[t.POW2=1]="POW2",t[t.ON=2]="ON"}(R||(R={})),function(t){t[t.NPM=0]="NPM",t[t.UNPACK=1]="UNPACK",t[t.PMA=2]="PMA",t[t.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",t[t.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",t[t.PREMULTIPLY_ALPHA=2]="PREMULTIPLY_ALPHA"}(P||(P={})),function(t){t[t.NO=0]="NO",t[t.YES=1]="YES",t[t.AUTO=2]="AUTO",t[t.BLEND=0]="BLEND",t[t.CLEAR=1]="CLEAR",t[t.BLIT=2]="BLIT"}(L||(L={})),function(t){t[t.AUTO=0]="AUTO",t[t.MANUAL=1]="MANUAL"}(p||(p={})),function(t){t.LOW="lowp",t.MEDIUM="mediump",t.HIGH="highp"}(I||(I={})),function(t){t[t.NONE=0]="NONE",t[t.SCISSOR=1]="SCISSOR",t[t.STENCIL=2]="STENCIL",t[t.SPRITE=3]="SPRITE"}(h||(h={})),function(t){t[t.NONE=0]="NONE",t[t.LOW=2]="LOW",t[t.MEDIUM=4]="MEDIUM",t[t.HIGH=8]="HIGH"}(c||(c={}));var U=function(t){function r(r,i,n,E,u){void 0===i&&(i=8),void 0===n&&(n=4),void 0===E&&(E=e.settings.FILTER_RESOLUTION),void 0===u&&(u=5);var l=this,_=o(u,r),s=f(u);return(l=t.call(this,_,s)||this).horizontal=r,l.resolution=E,l._quality=0,l.quality=n,l.blur=i,l}return i(r,t),r.prototype.apply=function(t,e,r,i){if(r?this.horizontal?this.uniforms.strength=1/r.width*(r.width/e.width):this.uniforms.strength=1/r.height*(r.height/e.height):this.horizontal?this.uniforms.strength=1/t.renderer.width*(t.renderer.width/e.width):this.uniforms.strength=1/t.renderer.height*(t.renderer.height/e.height),this.uniforms.strength*=this.strength,this.uniforms.strength/=this.passes,1===this.passes)t.applyFilter(this,e,r,i);else{var n=t.getFilterTexture(),o=t.renderer,E=e,u=n;this.state.blend=!1,t.applyFilter(this,E,u,L.CLEAR);for(var l=1;l>16&255)/255,a=(o>>8&255)/255,u=(255&o)/255,l=((n=n||3375104)>>16&255)/255,p=(n>>8&255)/255,s=(255&n)/255,c=[.3,.59,.11,0,0,i,a,u,t=t||.2,0,l,p,s,r=r||.15,0,i-l,a-p,u-s,0,0];this._loadMatrix(c,e)},e.prototype.night=function(t,r){var o=[-2*(t=t||.1),-t,0,0,0,-t,0,t,0,0,0,t,2*t,0,0,0,0,0,1,0];this._loadMatrix(o,r)},e.prototype.predator=function(t,r){var o=[11.224130630493164*t,-4.794486999511719*t,-2.8746118545532227*t,0*t,.40342438220977783*t,-3.6330697536468506*t,9.193157196044922*t,-2.951810836791992*t,0*t,-1.316135048866272*t,-3.2184197902679443*t,-4.2375030517578125*t,7.476448059082031*t,0*t,.8044459223747253*t,0,0,0,1,0];this._loadMatrix(o,r)},e.prototype.lsd=function(t){this._loadMatrix([2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],t)},e.prototype.reset=function(){this._loadMatrix([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],!1)},Object.defineProperty(e.prototype,"matrix",{get:function(){return this.uniforms.m},set:function(t){this.uniforms.m=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"alpha",{get:function(){return this.uniforms.uAlpha},set:function(t){this.uniforms.uAlpha=t},enumerable:!1,configurable:!0}),e}(t.Filter);exports.ColorMatrixFilter=e,e.prototype.grayscale=e.prototype.greyscale; },{"@pixi/core":"p2j5"}],"8rpU":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.DisplacementFilter=void 0;var t=require("@pixi/core"),r=require("@pixi/math"),e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)r.hasOwnProperty(e)&&(t[e]=r[e])})(t,r)};function i(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}var n="varying vec2 vFilterCoord;\nvarying vec2 vTextureCoord;\n\nuniform vec2 scale;\nuniform mat2 rotation;\nuniform sampler2D uSampler;\nuniform sampler2D mapSampler;\n\nuniform highp vec4 inputSize;\nuniform vec4 inputClamp;\n\nvoid main(void)\n{\n vec4 map = texture2D(mapSampler, vFilterCoord);\n\n map -= 0.5;\n map.xy = scale * inputSize.zw * (rotation * map.xy);\n\n gl_FragColor = texture2D(uSampler, clamp(vec2(vTextureCoord.x + map.x, vTextureCoord.y + map.y), inputClamp.xy, inputClamp.zw));\n}\n",o="attribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\nuniform mat3 filterMatrix;\n\nvarying vec2 vTextureCoord;\nvarying vec2 vFilterCoord;\n\nuniform vec4 inputSize;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvec2 filterTextureCoord( void )\n{\n return aVertexPosition * (outputFrame.zw * inputSize.zw);\n}\n\nvoid main(void)\n{\n\tgl_Position = filterVertexPosition();\n\tvTextureCoord = filterTextureCoord();\n\tvFilterCoord = ( filterMatrix * vec3( vTextureCoord, 1.0) ).xy;\n}\n",a=function(t){function e(e,i){var a=this,u=new r.Matrix;return e.renderable=!1,(a=t.call(this,o,n,{mapSampler:e._texture,filterMatrix:u,scale:{x:1,y:1},rotation:new Float32Array([1,0,0,1])})||this).maskSprite=e,a.maskMatrix=u,null==i&&(i=20),a.scale=new r.Point(i,i),a}return i(e,t),e.prototype.apply=function(t,r,e,i){this.uniforms.filterMatrix=t.calculateSpriteMatrix(this.maskMatrix,this.maskSprite),this.uniforms.scale.x=this.scale.x,this.uniforms.scale.y=this.scale.y;var n=this.maskSprite.worldTransform,o=Math.sqrt(n.a*n.a+n.b*n.b),a=Math.sqrt(n.c*n.c+n.d*n.d);0!==o&&0!==a&&(this.uniforms.rotation[0]=n.a/o,this.uniforms.rotation[1]=n.b/o,this.uniforms.rotation[2]=n.c/a,this.uniforms.rotation[3]=n.d/a),t.applyFilter(this,r,e,i)},Object.defineProperty(e.prototype,"map",{get:function(){return this.uniforms.mapSampler},set:function(t){this.uniforms.mapSampler=t},enumerable:!1,configurable:!0}),e}(t.Filter);exports.DisplacementFilter=a; },{"@pixi/core":"p2j5","@pixi/math":"oNQC"}],"zKIa":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.FXAAFilter=void 0;var n=require("@pixi/core"),e=function(n,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,e){n.__proto__=e}||function(n,e){for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r])})(n,r)};function r(n,r){function o(){this.constructor=n}e(n,r),n.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}var o="\nattribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 v_rgbNW;\nvarying vec2 v_rgbNE;\nvarying vec2 v_rgbSW;\nvarying vec2 v_rgbSE;\nvarying vec2 v_rgbM;\n\nvarying vec2 vFragCoord;\n\nuniform vec4 inputPixel;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvoid texcoords(vec2 fragCoord, vec2 inverseVP,\n out vec2 v_rgbNW, out vec2 v_rgbNE,\n out vec2 v_rgbSW, out vec2 v_rgbSE,\n out vec2 v_rgbM) {\n v_rgbNW = (fragCoord + vec2(-1.0, -1.0)) * inverseVP;\n v_rgbNE = (fragCoord + vec2(1.0, -1.0)) * inverseVP;\n v_rgbSW = (fragCoord + vec2(-1.0, 1.0)) * inverseVP;\n v_rgbSE = (fragCoord + vec2(1.0, 1.0)) * inverseVP;\n v_rgbM = vec2(fragCoord * inverseVP);\n}\n\nvoid main(void) {\n\n gl_Position = filterVertexPosition();\n\n vFragCoord = aVertexPosition * outputFrame.zw;\n\n texcoords(vFragCoord, inputPixel.zw, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);\n}\n",t='varying vec2 v_rgbNW;\nvarying vec2 v_rgbNE;\nvarying vec2 v_rgbSW;\nvarying vec2 v_rgbSE;\nvarying vec2 v_rgbM;\n\nvarying vec2 vFragCoord;\nuniform sampler2D uSampler;\nuniform highp vec4 inputPixel;\n\n\n/**\n Basic FXAA implementation based on the code on geeks3d.com with the\n modification that the texture2DLod stuff was removed since it\'s\n unsupported by WebGL.\n\n --\n\n From:\n https://github.com/mitsuhiko/webgl-meincraft\n\n Copyright (c) 2011 by Armin Ronacher.\n\n Some rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are\n met:\n\n * Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n\n * Redistributions in binary form must reproduce the above\n copyright notice, this list of conditions and the following\n disclaimer in the documentation and/or other materials provided\n with the distribution.\n\n * The names of the contributors may not be used to endorse or\n promote products derived from this software without specific\n prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n#ifndef FXAA_REDUCE_MIN\n#define FXAA_REDUCE_MIN (1.0/ 128.0)\n#endif\n#ifndef FXAA_REDUCE_MUL\n#define FXAA_REDUCE_MUL (1.0 / 8.0)\n#endif\n#ifndef FXAA_SPAN_MAX\n#define FXAA_SPAN_MAX 8.0\n#endif\n\n//optimized version for mobile, where dependent\n//texture reads can be a bottleneck\nvec4 fxaa(sampler2D tex, vec2 fragCoord, vec2 inverseVP,\n vec2 v_rgbNW, vec2 v_rgbNE,\n vec2 v_rgbSW, vec2 v_rgbSE,\n vec2 v_rgbM) {\n vec4 color;\n vec3 rgbNW = texture2D(tex, v_rgbNW).xyz;\n vec3 rgbNE = texture2D(tex, v_rgbNE).xyz;\n vec3 rgbSW = texture2D(tex, v_rgbSW).xyz;\n vec3 rgbSE = texture2D(tex, v_rgbSE).xyz;\n vec4 texColor = texture2D(tex, v_rgbM);\n vec3 rgbM = texColor.xyz;\n vec3 luma = vec3(0.299, 0.587, 0.114);\n float lumaNW = dot(rgbNW, luma);\n float lumaNE = dot(rgbNE, luma);\n float lumaSW = dot(rgbSW, luma);\n float lumaSE = dot(rgbSE, luma);\n float lumaM = dot(rgbM, luma);\n float lumaMin = min(lumaM, min(min(lumaNW, lumaNE), min(lumaSW, lumaSE)));\n float lumaMax = max(lumaM, max(max(lumaNW, lumaNE), max(lumaSW, lumaSE)));\n\n mediump vec2 dir;\n dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE));\n dir.y = ((lumaNW + lumaSW) - (lumaNE + lumaSE));\n\n float dirReduce = max((lumaNW + lumaNE + lumaSW + lumaSE) *\n (0.25 * FXAA_REDUCE_MUL), FXAA_REDUCE_MIN);\n\n float rcpDirMin = 1.0 / (min(abs(dir.x), abs(dir.y)) + dirReduce);\n dir = min(vec2(FXAA_SPAN_MAX, FXAA_SPAN_MAX),\n max(vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX),\n dir * rcpDirMin)) * inverseVP;\n\n vec3 rgbA = 0.5 * (\n texture2D(tex, fragCoord * inverseVP + dir * (1.0 / 3.0 - 0.5)).xyz +\n texture2D(tex, fragCoord * inverseVP + dir * (2.0 / 3.0 - 0.5)).xyz);\n vec3 rgbB = rgbA * 0.5 + 0.25 * (\n texture2D(tex, fragCoord * inverseVP + dir * -0.5).xyz +\n texture2D(tex, fragCoord * inverseVP + dir * 0.5).xyz);\n\n float lumaB = dot(rgbB, luma);\n if ((lumaB < lumaMin) || (lumaB > lumaMax))\n color = vec4(rgbA, texColor.a);\n else\n color = vec4(rgbB, texColor.a);\n return color;\n}\n\nvoid main() {\n\n vec4 color;\n\n color = fxaa(uSampler, vFragCoord, inputPixel.zw, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);\n\n gl_FragColor = color;\n}\n',i=function(n){function e(){return n.call(this,o,t)||this}return r(e,n),e}(n.Filter);exports.FXAAFilter=i; },{"@pixi/core":"p2j5"}],"nEkq":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.NoiseFilter=void 0;var e=require("@pixi/core"),o=function(e,r){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,o){e.__proto__=o}||function(e,o){for(var r in o)o.hasOwnProperty(r)&&(e[r]=o[r])})(e,r)};function r(e,r){function n(){this.constructor=e}o(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}var n="precision highp float;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nuniform float uNoise;\nuniform float uSeed;\nuniform sampler2D uSampler;\n\nfloat rand(vec2 co)\n{\n return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);\n}\n\nvoid main()\n{\n vec4 color = texture2D(uSampler, vTextureCoord);\n float randomValue = rand(gl_FragCoord.xy * uSeed);\n float diff = (randomValue - 0.5) * uNoise;\n\n // Un-premultiply alpha before applying the color matrix. See issue #3539.\n if (color.a > 0.0) {\n color.rgb /= color.a;\n }\n\n color.r += diff;\n color.g += diff;\n color.b += diff;\n\n // Premultiply alpha again.\n color.rgb *= color.a;\n\n gl_FragColor = color;\n}\n",t=function(o){function t(r,t){void 0===r&&(r=.5),void 0===t&&(t=Math.random());var i=o.call(this,e.defaultFilterVertex,n,{uNoise:0,uSeed:0})||this;return i.noise=r,i.seed=t,i}return r(t,o),Object.defineProperty(t.prototype,"noise",{get:function(){return this.uniforms.uNoise},set:function(e){this.uniforms.uNoise=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"seed",{get:function(){return this.uniforms.uSeed},set:function(e){this.uniforms.uSeed=e},enumerable:!1,configurable:!0}),t}(e.Filter);exports.NoiseFilter=t; },{"@pixi/core":"p2j5"}],"fh0A":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CacheData=void 0;var t=require("@pixi/core"),a=require("@pixi/sprite"),e=require("@pixi/display"),i=require("@pixi/math"),r=require("@pixi/utils"),s=require("@pixi/settings"),n=new i.Matrix;e.DisplayObject.prototype._cacheAsBitmap=!1,e.DisplayObject.prototype._cacheData=null;var h=function(){return function(){this.textureCacheId=null,this.originalRender=null,this.originalRenderCanvas=null,this.originalCalculateBounds=null,this.originalGetLocalBounds=null,this.originalUpdateTransform=null,this.originalDestroy=null,this.originalMask=null,this.originalFilterArea=null,this.originalContainsPoint=null,this.sprite=null}}();exports.CacheData=h,Object.defineProperties(e.DisplayObject.prototype,{cacheAsBitmap:{get:function(){return this._cacheAsBitmap},set:function(t){var a;this._cacheAsBitmap!==t&&(this._cacheAsBitmap=t,t?(this._cacheData||(this._cacheData=new h),(a=this._cacheData).originalRender=this.render,a.originalRenderCanvas=this.renderCanvas,a.originalUpdateTransform=this.updateTransform,a.originalCalculateBounds=this.calculateBounds,a.originalGetLocalBounds=this.getLocalBounds,a.originalDestroy=this.destroy,a.originalContainsPoint=this.containsPoint,a.originalMask=this._mask,a.originalFilterArea=this.filterArea,this.render=this._renderCached,this.renderCanvas=this._renderCachedCanvas,this.destroy=this._cacheAsBitmapDestroy):((a=this._cacheData).sprite&&this._destroyCachedDisplayObject(),this.render=a.originalRender,this.renderCanvas=a.originalRenderCanvas,this.calculateBounds=a.originalCalculateBounds,this.getLocalBounds=a.originalGetLocalBounds,this.destroy=a.originalDestroy,this.updateTransform=a.originalUpdateTransform,this.containsPoint=a.originalContainsPoint,this._mask=a.originalMask,this.filterArea=a.originalFilterArea))}}}),e.DisplayObject.prototype._renderCached=function(t){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObject(t),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._render(t))},e.DisplayObject.prototype._initCachedDisplayObject=function(e){if(!this._cacheData||!this._cacheData.sprite){var i=this.alpha;this.alpha=1,e.batch.flush();var h=this.getLocalBounds(null,!0).clone();if(this.filters){var o=this.filters[0].padding;h.pad(o)}h.ceil(s.settings.RESOLUTION);var c=e.renderTexture.current,l=e.renderTexture.sourceFrame.clone(),d=e.renderTexture.destinationFrame.clone(),p=e.projection.transform,u=t.RenderTexture.create({width:h.width,height:h.height}),_="cacheAsBitmap_"+(0,r.uid)();this._cacheData.textureCacheId=_,t.BaseTexture.addToCache(u.baseTexture,_),t.Texture.addToCache(u,_);var D=this.transform.localTransform.copyTo(n).invert().translate(-h.x,-h.y);this.render=this._cacheData.originalRender,e.render(this,u,!0,D,!1),e.projection.transform=p,e.renderTexture.bind(c,l,d),this.render=this._renderCached,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null;var f=new a.Sprite(u);f.transform.worldTransform=this.transform.worldTransform,f.anchor.x=-h.x/h.width,f.anchor.y=-h.y/h.height,f.alpha=i,f._bounds=this._bounds,this._cacheData.sprite=f,this.transform._parentID=-1,this.parent?this.updateTransform():(this.enableTempParent(),this.updateTransform(),this.disableTempParent(null)),this.containsPoint=f.containsPoint.bind(f)}},e.DisplayObject.prototype._renderCachedCanvas=function(t){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObjectCanvas(t),this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._renderCanvas(t))},e.DisplayObject.prototype._initCachedDisplayObjectCanvas=function(e){if(!this._cacheData||!this._cacheData.sprite){var i=this.getLocalBounds(null,!0),h=this.alpha;this.alpha=1;var o=e.context,c=e._projTransform;i.ceil(s.settings.RESOLUTION);var l=t.RenderTexture.create({width:i.width,height:i.height}),d="cacheAsBitmap_"+(0,r.uid)();this._cacheData.textureCacheId=d,t.BaseTexture.addToCache(l.baseTexture,d),t.Texture.addToCache(l,d);var p=n;this.transform.localTransform.copyTo(p),p.invert(),p.tx-=i.x,p.ty-=i.y,this.renderCanvas=this._cacheData.originalRenderCanvas,e.render(this,l,!0,p,!1),e.context=o,e._projTransform=c,this.renderCanvas=this._renderCachedCanvas,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null;var u=new a.Sprite(l);u.transform.worldTransform=this.transform.worldTransform,u.anchor.x=-i.x/i.width,u.anchor.y=-i.y/i.height,u.alpha=h,u._bounds=this._bounds,this._cacheData.sprite=u,this.transform._parentID=-1,this.parent?this.updateTransform():(this.parent=e._tempDisplayObjectParent,this.updateTransform(),this.parent=null),this.containsPoint=u.containsPoint.bind(u)}},e.DisplayObject.prototype._calculateCachedBounds=function(){this._bounds.clear(),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite._calculateBounds(),this._bounds.updateID=this._boundsID},e.DisplayObject.prototype._getCachedLocalBounds=function(){return this._cacheData.sprite.getLocalBounds(null)},e.DisplayObject.prototype._destroyCachedDisplayObject=function(){this._cacheData.sprite._texture.destroy(!0),this._cacheData.sprite=null,t.BaseTexture.removeFromCache(this._cacheData.textureCacheId),t.Texture.removeFromCache(this._cacheData.textureCacheId),this._cacheData.textureCacheId=null},e.DisplayObject.prototype._cacheAsBitmapDestroy=function(t){this.cacheAsBitmap=!1,this.destroy(t)}; },{"@pixi/core":"p2j5","@pixi/sprite":"ueA8","@pixi/display":"nL3p","@pixi/math":"oNQC","@pixi/utils":"2G5T","@pixi/settings":"t4Uo"}],"CSWr":[function(require,module,exports) { "use strict";var i=require("@pixi/display");i.DisplayObject.prototype.name=null,i.Container.prototype.getChildByName=function(i,e){for(var r=0,t=this.children.length;r0){var f=n.x-t[d].x,g=n.y-t[d].y,c=Math.sqrt(f*f+g*g);n=t[d],s+=c/a}else s=d/(u-1);h[p]=s,h[p+1]=0,h[p+2]=s,h[p+3]=1}var l=0;for(d=0;d0?this.textureScale*this._width/2:this._width/2;r/=d,h/=d,r*=p,h*=p,o[u]=a.x+r,o[u+1]=a.y+h,o[u+2]=a.x-r,o[u+3]=a.y-h,i=a}this.buffers[0].update()}},e.prototype.update=function(){this.textureScale>0?this.build():this.updateVertices()},e}(t.MeshGeometry);exports.RopeGeometry=s;var n=function(i){function r(r,h,o){void 0===o&&(o=0);var n=this,a=new s(r.height,h,o),u=new t.MeshMaterial(r);return o>0&&(r.baseTexture.wrapMode=e.WRAP_MODES.REPEAT),(n=i.call(this,a,u)||this).autoUpdate=!0,n}return h(r,i),r.prototype._render=function(t){var e=this.geometry;(this.autoUpdate||e._width!==this.shader.texture.height)&&(e._width=this.shader.texture.height,e.update()),i.prototype._render.call(this,t)},r}(t.Mesh);exports.SimpleRope=n;var a=function(e){function r(r,h,s){var n=this,a=new o(r.width,r.height,h,s),u=new t.MeshMaterial(i.Texture.WHITE);return(n=e.call(this,a,u)||this).texture=r,n}return h(r,e),r.prototype.textureUpdated=function(){this._textureID=this.shader.texture._updateID;var t=this.geometry;t.width=this.shader.texture.width,t.height=this.shader.texture.height,t.build()},Object.defineProperty(r.prototype,"texture",{get:function(){return this.shader.texture},set:function(t){this.shader.texture!==t&&(this.shader.texture=t,this._textureID=-1,t.baseTexture.valid?this.textureUpdated():t.once("update",this.textureUpdated,this))},enumerable:!1,configurable:!0}),r.prototype._render=function(t){this._textureID!==this.shader.texture._updateID&&this.textureUpdated(),e.prototype._render.call(this,t)},r.prototype.destroy=function(t){this.shader.texture.off("update",this.textureUpdated,this),e.prototype.destroy.call(this,t)},r}(t.Mesh);exports.SimplePlane=a;var u=function(e){function r(r,h,o,s,n){void 0===r&&(r=i.Texture.EMPTY);var a=this,u=new t.MeshGeometry(h,o,s);u.getBuffer("aVertexPosition").static=!1;var d=new t.MeshMaterial(r);return(a=e.call(this,u,d,null,n)||this).autoUpdate=!0,a}return h(r,e),Object.defineProperty(r.prototype,"vertices",{get:function(){return this.geometry.getBuffer("aVertexPosition").data},set:function(t){this.geometry.getBuffer("aVertexPosition").data=t},enumerable:!1,configurable:!0}),r.prototype._render=function(t){this.autoUpdate&&this.geometry.getBuffer("aVertexPosition").update(),e.prototype._render.call(this,t)},r}(t.Mesh);exports.SimpleMesh=u;var d=10,p=function(t){function e(e,r,h,o,s){void 0===r&&(r=d),void 0===h&&(h=d),void 0===o&&(o=d),void 0===s&&(s=d);var n=t.call(this,i.Texture.WHITE,4,4)||this;return n._origWidth=e.orig.width,n._origHeight=e.orig.height,n._width=n._origWidth,n._height=n._origHeight,n._leftWidth=r,n._rightWidth=o,n._topHeight=h,n._bottomHeight=s,n.texture=e,n}return h(e,t),e.prototype.textureUpdated=function(){this._textureID=this.shader.texture._updateID,this._refresh()},Object.defineProperty(e.prototype,"vertices",{get:function(){return this.geometry.getBuffer("aVertexPosition").data},set:function(t){this.geometry.getBuffer("aVertexPosition").data=t},enumerable:!1,configurable:!0}),e.prototype.updateHorizontalVertices=function(){var t=this.vertices,e=this._getMinScale();t[9]=t[11]=t[13]=t[15]=this._topHeight*e,t[17]=t[19]=t[21]=t[23]=this._height-this._bottomHeight*e,t[25]=t[27]=t[29]=t[31]=this._height},e.prototype.updateVerticalVertices=function(){var t=this.vertices,e=this._getMinScale();t[2]=t[10]=t[18]=t[26]=this._leftWidth*e,t[4]=t[12]=t[20]=t[28]=this._width-this._rightWidth*e,t[6]=t[14]=t[22]=t[30]=this._width},e.prototype._getMinScale=function(){var t=this._leftWidth+this._rightWidth,e=this._width>t?1:this._width/t,i=this._topHeight+this._bottomHeight,r=this._height>i?1:this._height/i;return Math.min(e,r)},Object.defineProperty(e.prototype,"width",{get:function(){return this._width},set:function(t){this._width=t,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},set:function(t){this._height=t,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"leftWidth",{get:function(){return this._leftWidth},set:function(t){this._leftWidth=t,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rightWidth",{get:function(){return this._rightWidth},set:function(t){this._rightWidth=t,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"topHeight",{get:function(){return this._topHeight},set:function(t){this._topHeight=t,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bottomHeight",{get:function(){return this._bottomHeight},set:function(t){this._bottomHeight=t,this._refresh()},enumerable:!1,configurable:!0}),e.prototype._refresh=function(){var t=this.texture,e=this.geometry.buffers[1].data;this._origWidth=t.orig.width,this._origHeight=t.orig.height;var i=1/this._origWidth,r=1/this._origHeight;e[0]=e[8]=e[16]=e[24]=0,e[1]=e[3]=e[5]=e[7]=0,e[6]=e[14]=e[22]=e[30]=1,e[25]=e[27]=e[29]=e[31]=1,e[2]=e[10]=e[18]=e[26]=i*this._leftWidth,e[4]=e[12]=e[20]=e[28]=1-i*this._rightWidth,e[9]=e[11]=e[13]=e[15]=r*this._topHeight,e[17]=e[19]=e[21]=e[23]=1-r*this._bottomHeight,this.updateHorizontalVertices(),this.updateVerticalVertices(),this.geometry.buffers[0].update(),this.geometry.buffers[1].update()},e}(a);exports.NineSlicePlane=p; },{"@pixi/mesh":"Ihaq","@pixi/constants":"LQBK","@pixi/core":"p2j5"}],"GC82":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.AnimatedSprite=void 0;var t=require("@pixi/core"),e=require("@pixi/sprite"),r=require("@pixi/ticker"),i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)};function n(t,e){function r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var o=function(e){function i(r,i){void 0===i&&(i=!0);var n=e.call(this,r[0]instanceof t.Texture?r[0]:r[0].texture)||this;return n._textures=null,n._durations=null,n._autoUpdate=i,n._isConnectedToTicker=!1,n.animationSpeed=1,n.loop=!0,n.updateAnchor=!1,n.onComplete=null,n.onFrameChange=null,n.onLoop=null,n._currentTime=0,n._playing=!1,n._previousFrame=null,n.textures=r,n}return n(i,e),i.prototype.stop=function(){this._playing&&(this._playing=!1,this._autoUpdate&&this._isConnectedToTicker&&(r.Ticker.shared.remove(this.update,this),this._isConnectedToTicker=!1))},i.prototype.play=function(){this._playing||(this._playing=!0,this._autoUpdate&&!this._isConnectedToTicker&&(r.Ticker.shared.add(this.update,this,r.UPDATE_PRIORITY.HIGH),this._isConnectedToTicker=!0))},i.prototype.gotoAndStop=function(t){this.stop();var e=this.currentFrame;this._currentTime=t,e!==this.currentFrame&&this.updateTexture()},i.prototype.gotoAndPlay=function(t){var e=this.currentFrame;this._currentTime=t,e!==this.currentFrame&&this.updateTexture(),this.play()},i.prototype.update=function(t){if(this._playing){var e=this.animationSpeed*t,r=this.currentFrame;if(null!==this._durations){var i=this._currentTime%1*this._durations[this.currentFrame];for(i+=e/60*1e3;i<0;)this._currentTime--,i+=this._durations[this.currentFrame];var n=Math.sign(this.animationSpeed*t);for(this._currentTime=Math.floor(this._currentTime);i>=this._durations[this.currentFrame];)i-=this._durations[this.currentFrame]*n,this._currentTime+=n;this._currentTime+=i/this._durations[this.currentFrame]}else this._currentTime+=e;this._currentTime<0&&!this.loop?(this.gotoAndStop(0),this.onComplete&&this.onComplete()):this._currentTime>=this._textures.length&&!this.loop?(this.gotoAndStop(this._textures.length-1),this.onComplete&&this.onComplete()):r!==this.currentFrame&&(this.loop&&this.onLoop&&(this.animationSpeed>0&&this.currentFramer&&this.onLoop()),this.updateTexture())}},i.prototype.updateTexture=function(){var t=this.currentFrame;this._previousFrame!==t&&(this._previousFrame=t,this._texture=this._textures[t],this._textureID=-1,this._textureTrimmedID=-1,this._cachedTint=16777215,this.uvs=this._texture._uvs.uvsFloat32,this.updateAnchor&&this._anchor.copyFrom(this._texture.defaultAnchor),this.onFrameChange&&this.onFrameChange(this.currentFrame))},i.prototype.destroy=function(t){this.stop(),e.prototype.destroy.call(this,t),this.onComplete=null,this.onFrameChange=null,this.onLoop=null},i.fromFrames=function(e){for(var r=[],n=0;n0?this.responses[0].data:null}},{key:"isProcessed",value:function(){return 0!==this.responses.length}},{key:"isSuccess",value:function(){return!this.isError()}},{key:"isError",value:function(){return!!this.responses.filter(function(t){return null!=t.error}).length}}]),t}();exports.MessageResponses=s;var u=function(){function t(n,r,o,i){e(this,t),this._action=null,this._component=null,this._gameObject=null,this.data=null,this.expired=!1,this._action=n,this._component=r,this._gameObject=o,this.data=i,this.responses=new s}return r(t,[{key:"action",get:function(){return this._action}},{key:"component",get:function(){return this._component}},{key:"gameObject",get:function(){return this._gameObject}}]),t}();exports.default=u; },{}],"n89G":[function(require,module,exports) { "use strict";var E;Object.defineProperty(exports,"__esModule",{value:!0}),exports.Messages=void 0,exports.Messages=E,function(E){E.ANY="ANY",E.OBJECT_ADDED="OBJECT_ADDED",E.OBJECT_REMOVED="OBJECT_REMOVED",E.COMPONENT_ADDED="COMPONENT_ADDED",E.COMPONENT_DETACHED="COMPONENT_DETACHED",E.COMPONENT_REMOVED="COMPONENT_REMOVED",E.ATTRIBUTE_ADDED="ATTRIBUTE_ADDED",E.ATTRIBUTE_CHANGED="ATTRIBUTE_CHANGED",E.ATTRIBUTE_REMOVED="ATTRIBUTE_REMOVED",E.STATE_CHANGED="STATE_CHANGED",E.FLAG_CHANGED="FLAG_CHANGED",E.TAG_ADDED="TAG_ADDED",E.TAG_REMOVED="TAG_REMOVED",E.SCENE_CLEAR="SCENE_CLEAR"}(E||(exports.Messages=E={})); },{}],"jR7U":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.ComponentState=void 0;var e,t=n(require("./message"));function n(e){return e&&e.__esModule?e:{default:e}}function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n128)throw new Error("Only flag values between 1-128 are supported");var e=this.getFlagIndex(t),r=1<128)throw new Error("Flag at unsupported index");var r=this.getFlagIndex(e),a=1<=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,r=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}function p(t,e){if(t){if("string"==typeof t)return y(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(t,e):void 0}}function y(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n1&&void 0!==arguments[1]&&arguments[1]){if(!this.isOnScene)throw new Error("This object hasn't been added to the scene yet");if(this._internalState===t.DETACHED)throw new Error("Can't run a component upon a detached object!");this.initNewComponent(e),this.waitingForUpdate||e.onUpdate(this.scene.currentDelta,this.scene.currentAbsolute)}else this.componentsToAdd.push(e)}},{key:"removeComponent",value:function(t){t._cmpState===e.ComponentState.RUNNING&&(t.onFinish(),t._cmpState=e.ComponentState.FINISHED),t.onDetach(),t._cmpState=e.ComponentState.DETACHED,t.onRemove(),t._cmpState=e.ComponentState.REMOVED,t._lastFixedUpdate=0,t.owner=null,this.components.delete(t.id),this.isOnScene&&this.scene._onComponentRemoved(t,this)}},{key:"removeAllComponents",value:function(){var t,e=d(this.components);try{for(e.s();!(t=e.n()).done;){var n=c(t.value,2)[1];this.removeComponent(n)}}catch(i){e.e(i)}finally{e.f()}}},{key:"findComponentByName",value:function(t){var e,n=d(this.components);try{for(n.s();!(e=n.n()).done;){var i=c(e.value,2)[1];if(i.name===t)return i}}catch(o){n.e(o)}finally{n.f()}return null}},{key:"assignAttribute",value:function(t,e){if(this.attributes.has(t)){var n=this.attributes.get(t);this.attributes.set(t,e),this.isOnScene&&this.scene._onAttributeChanged(t,n,e,this)}else this.attributes.set(t,e),this.isOnScene&&this.scene._onAttributeAdded(t,e,this)}},{key:"getAttribute",value:function(t){return this.attributes.get(t)}},{key:"removeAttribute",value:function(t){if(this.attributes.has(t)){var e=this.attributes.get(t);return this.attributes.delete(t),this.isOnScene&&this.scene._onAttributeRemoved(t,e,this),!0}return!1}},{key:"addTag",value:function(t){this._tags.add(t),this.isOnScene&&this.scene._onTagAdded(t,this)}},{key:"removeTag",value:function(t){this._tags.has(t)&&(this._tags.delete(t),this.isOnScene&&this.scene._onTagRemoved(t,this))}},{key:"hasTag",value:function(t){return this._tags.has(t)}},{key:"setFlag",value:function(t){this.flags.setFlag(t),this.isOnScene&&this.scene._onFlagChanged(t,!0,this)}},{key:"resetFlag",value:function(t){this.flags.resetFlag(t),this.isOnScene&&this.scene._onFlagChanged(t,!1,this)}},{key:"hasFlag",value:function(t){return this.flags.hasFlag(t)}},{key:"invertFlag",value:function(t){this.flags.invertFlag(t),this.isOnScene&&this.scene._onFlagChanged(t,this.flags.hasFlag(t),this)}},{key:"stateId",get:function(){return this._stateId},set:function(t){var e=this.stateId;this._stateId=t,this.isOnScene&&this.scene._onStateChanged(e,t,this)}},{key:"onChildAdded",value:function(e){if(e.internalState===t.ATTACHED)throw new Error("This object has already been added to the scene: ".concat(e.pixiObj.name));e.scene=this.scene,e.attach()}},{key:"onChildDetached",value:function(t){t.detach()}},{key:"onChildDestroyed",value:function(t){t.destroy()}},{key:"update",value:function(t,n){this.initNewComponents();var i,o=d(this.components);try{for(o.s();!(i=o.n()).done;){var r=c(i.value,2)[1];if(r._cmpState===e.ComponentState.RUNNING&&(r.onUpdate(t,n),r.fixedFrequency&&n-r._lastFixedUpdate>=1e3/r.fixedFrequency)){var a=0===r._lastFixedUpdate?1e3/r.fixedFrequency:n-r._lastFixedUpdate;r.onFixedUpdate(a,n),r._lastFixedUpdate=n}}}catch(h){o.e(h)}finally{o.f()}var s,u=d(this.pixiObj.children);try{for(u.s();!(s=u.n()).done;){var l=s.value;l&&l._proxy&&l._proxy.update(t,n)}}catch(h){u.e(h)}finally{u.f()}this.lastAbsolute=n}},{key:"initNewComponent",value:function(t){if(!this.isOnScene)throw new Error("The object must be on the scene before its components are initialized");if(null!==t.owner)throw new Error("The component ".concat(t.name,":").concat(t.id," seems to already have a game object assigned!"));t.owner=this.pixiObj,this.components.set(t.id,t),this.scene._onComponentAdded(t,this),t.onInit(),t._cmpState=e.ComponentState.INITIALIZED,t.onAttach(),t._cmpState=e.ComponentState.RUNNING}},{key:"initNewComponents",value:function(){var t=this;if(0!==this.componentsToAdd.length){var e=r(this.componentsToAdd);this.componentsToAdd=[],e.forEach(function(e){t.components.set(e.id,e),t.initNewComponent(e)})}}},{key:"attach",value:function(){var n=this;this._internalState=t.ATTACHED,this.scene._onObjectAdded(this),this.initNewComponents(),this.components.forEach(function(t){t.cmpState===e.ComponentState.DETACHED&&(n.scene._onComponentAdded(t,n),t.onAttach(),t._cmpState=e.ComponentState.RUNNING)});var i,o=d(this.pixiObj.children);try{for(o.s();!(i=o.n()).done;){var r=i.value;r&&r._proxy&&r._proxy.attach()}}catch(a){o.e(a)}finally{o.f()}}},{key:"detach",value:function(){var n=this;this._internalState=t.DETACHED,this.components.forEach(function(t){t._cmpState!==e.ComponentState.DETACHED&&(n.scene._onComponentDetached(t),t.onDetach(),t._cmpState=e.ComponentState.DETACHED)}),this.scene._onObjectRemoved(this);var i,o=d(this.pixiObj.children);try{for(o.s();!(i=o.n()).done;){var r=i.value;r&&r._proxy&&r._proxy.detach()}}catch(a){o.e(a)}finally{o.f()}}},{key:"destroy",value:function(){this._internalState=t.DESTROYED,this.removeAllComponents(),this.scene._onObjectRemoved(this);var e,n=d(this.pixiObj.children);try{for(n.s();!(e=n.n()).done;){var i=e.value;i&&i._proxy&&i._proxy.destroy()}}catch(o){n.e(o)}finally{n.f()}}}]),i}();exports.default=_,_.idCounter=0; },{"./component":"jR7U","../utils/flags":"LCiO"}],"OTmP":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=o(require("../game-object-proxy")),e=n(require("pixi.js"));function r(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(r=function(t){return t?n:e})(t)}function n(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=typeof t&&"function"!=typeof t)return{default:t};var n=r(e);if(n&&n.has(t))return n.get(t);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&Object.prototype.hasOwnProperty.call(t,a)){var u=i?Object.getOwnPropertyDescriptor(t,a):null;u&&(u.get||u.set)?Object.defineProperty(o,a,u):o[a]=t[a]}return o.default=t,n&&n.set(t,o),o}function o(t){return t&&t.__esModule?t:{default:t}}function i(t){return(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})(t)}function a(t){return l(t)||c(t)||s(t)||u()}function u(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function c(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function l(t){if(Array.isArray(t))return y(t)}function f(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=s(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function s(t,e){if(t){if("string"==typeof t)return y(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?y(t,e):void 0}}function y(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:"";return p(this,o),(e=n.call(this))._proxy=new t.default(r,C(e)),e}return d(o,[{key:"id",get:function(){return this._proxy.id}},{key:"pixiObj",get:function(){return this}},{key:"scene",get:function(){return this._proxy.scene}},{key:"parentGameObject",get:function(){return this.parent}},{key:"asAnimatedSprite",value:function(){throw new Error("Can't cast to this object!")}},{key:"asBitmapText",value:function(){throw new Error("Can't cast to this object!")}},{key:"asContainer",value:function(){return this}},{key:"asGraphics",value:function(){throw new Error("Can't cast to this object!")}},{key:"asMesh",value:function(){throw new Error("Can't cast to this object!")}},{key:"asNineSlicePlane",value:function(){throw new Error("Can't cast to this object!")}},{key:"asParticleContainer",value:function(){throw new Error("Can't cast to this object!")}},{key:"asSimpleMesh",value:function(){throw new Error("Can't cast to this object!")}},{key:"asSimplePlane",value:function(){throw new Error("Can't cast to this object!")}},{key:"asSimpleRope",value:function(){throw new Error("Can't cast to this object!")}},{key:"asSprite",value:function(){throw new Error("Can't cast to this object!")}},{key:"asText",value:function(){throw new Error("Can't cast to this object!")}},{key:"asTilingSprite",value:function(){throw new Error("Can't cast to this object!")}},{key:"addChild",value:function(){for(var t,e=arguments.length,r=new Array(e),n=0;n=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return s=t.done,t},e:function(t){u=!0,o=t},f:function(){try{s||null==r.return||r.return()}finally{if(u)throw o}}}}function a(t,e){if(t){if("string"==typeof t)return s(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(t,e):void 0}}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r1&&void 0!==arguments[1]&&arguments[1];return this.keys.has(e)||t&&this.handledKeys.has(e)}},{key:"handleKey",value:function(e){this.keys.delete(e),this.handledKeys.add(e)}},{key:"pressKey",value:function(e){this.handledKeys.has(e)||this.keys.add(e)}},{key:"releaseKey",value:function(e){this.handledKeys.delete(e),this.keys.delete(e)}}]),r}();exports.KeyInputComponent=Y; },{"../engine/component":"jR7U"}],"QNqz":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=r(require("../engine/component")),t=require("../engine/constants"),n=require("./key-input-component");function r(e){return e&&e.__esModule?e:{default:e}}function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return c(e)||a(e,t)||d(e,t)||l()}function l(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function a(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,l,a=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(a.push(r.value),a.length!==t);c=!0);}catch(d){u=!0,o=d}finally{try{if(!c&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw o}}return a}}function c(e){if(Array.isArray(e))return e}function u(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=d(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return l=e.done,e},e:function(e){a=!0,i=e},f:function(){try{l||null==n.return||n.return()}finally{if(a)throw i}}}}function d(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,r=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return r=e.done,e},e:function(e){o=!0,s=e},f:function(){try{r||null==n.return||n.return()}finally{if(o)throw s}}}}function f(e,t){if(e){if("string"==typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(e,t):void 0}}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n=i.delay&&(this.pendingInvocations.splice(n,1),i.action(),this.sceneCleared))break}}},{key:"_subscribeComponent",value:function(e,t){this.subscribers.insert(e,t)}},{key:"_unsubscribeComponent",value:function(e,t){this.subscribers.remove(e,t)}},{key:"_onObjectAdded",value:function(n){var i=this,a=n.pixiObj;this.config.namesSearchEnabled&&this.gameObjectNames.insert(a.name,a),this.config.flagsSearchEnabled&&n.getAllFlags().forEach(function(e){return i.gameObjectFlags.insert(e,a)}),this.config.tagsSearchEnabled&&n.tags.forEach(function(e){return i.gameObjectTags.insert(e,a)}),this.config.statesSearchEnabled&&this.gameObjectStates.insert(a.stateId,a),this.gameObjects.set(n.id,n.pixiObj),this.sendMessage(new e.default(t.Messages.OBJECT_ADDED,null,n.pixiObj))}},{key:"_onObjectRemoved",value:function(n){var i=n.pixiObj;this.config.namesSearchEnabled&&this.gameObjectNames.remove(i.name,i),this.config.flagsSearchEnabled&&this.gameObjectFlags.removeItem(i),this.config.statesSearchEnabled&&this.gameObjectStates.removeItem(i),this.config.tagsSearchEnabled&&this.gameObjectTags.removeItem(i),this.gameObjects.delete(n.id),this.sendMessage(new e.default(t.Messages.OBJECT_REMOVED,null,i))}},{key:"_onComponentAdded",value:function(n,i){n.scene=this,this.sendMessage(new e.default(t.Messages.COMPONENT_ADDED,n,i.pixiObj))}},{key:"_onComponentDetached",value:function(n){this.subscribers.removeItem(n),this.sendMessage(new e.default(t.Messages.COMPONENT_DETACHED,n,n.owner))}},{key:"_onComponentRemoved",value:function(n,i){this.subscribers.removeItem(n),this.sendMessage(new e.default(t.Messages.COMPONENT_REMOVED,n,i.pixiObj))}},{key:"_onStateChanged",value:function(n,i,a){if(this.config.statesSearchEnabled&&(this.gameObjectStates.remove(n,a.pixiObj),this.gameObjectStates.insert(i,a.pixiObj)),this.config.notifyStateChanges){var s={previous:n,current:i};this.sendMessage(new e.default(t.Messages.STATE_CHANGED,null,a.pixiObj,s))}}},{key:"_onAttributeAdded",value:function(n,i,a){if(this.config.notifyAttributeChanges){var s={key:n,type:t.Messages.ATTRIBUTE_ADDED,previousValue:null,currentValue:i};this.sendMessage(new e.default(t.Messages.ATTRIBUTE_ADDED,null,a.pixiObj,s))}}},{key:"_onAttributeChanged",value:function(n,i,a,s){if(this.config.notifyAttributeChanges){var r={key:n,type:t.Messages.ATTRIBUTE_CHANGED,previousValue:i,currentValue:a};this.sendMessage(new e.default(t.Messages.ATTRIBUTE_CHANGED,null,s.pixiObj,r))}}},{key:"_onAttributeRemoved",value:function(n,i,a){if(this.config.notifyAttributeChanges){var s={key:n,type:t.Messages.ATTRIBUTE_REMOVED,previousValue:i,currentValue:null};this.sendMessage(new e.default(t.Messages.ATTRIBUTE_REMOVED,null,a.pixiObj,s))}}},{key:"_onFlagChanged",value:function(n,i,a){if(this.config.flagsSearchEnabled&&(i?this.gameObjectFlags.insert(n,a.pixiObj):this.gameObjectFlags.remove(n,a.pixiObj)),this.config.notifyFlagChanges){var s={flag:n,isSet:i};this.sendMessage(new e.default(t.Messages.FLAG_CHANGED,null,a.pixiObj,s))}}},{key:"_onTagAdded",value:function(n,i){if(this.config.tagsSearchEnabled&&this.gameObjectTags.insert(n,i.pixiObj),this.config.notifyTagChanges){var a={tag:n,type:t.Messages.TAG_ADDED};this.sendMessage(new e.default(t.Messages.TAG_ADDED,null,i.pixiObj,a))}}},{key:"_onTagRemoved",value:function(n,i){if(this.config.tagsSearchEnabled&&this.gameObjectTags.remove(n,i.pixiObj),this.config.notifyTagChanges){var a={tag:n,type:t.Messages.TAG_REMOVED};this.sendMessage(new e.default(t.Messages.TAG_REMOVED,null,i.pixiObj,a))}}},{key:"initConfig",value:function(e){this._config=Object.assign(Object.assign({},S),e)}}]),r}();exports.default=E; },{"./message":"JZGm","./constants":"n89G","./game-objects/container":"OTmP","../utils/lookup-map":"aRmU","../components/debug-component":"QNqz","../utils/query-condition":"IzC/"}],"nbel":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.resizeContainer=exports.isMobileDevice=void 0;var e=function(){return/(iphone|ipod|ipad|android)/gi.test(navigator.userAgent)};exports.isMobileDevice=e;var t=function(t,n,i){var r,o=!1;window.innerWidth/window.innerHeight>n/i?r=window.innerHeight/i:(r=window.innerWidth/n,o=!0);var s=function(){return setTimeout(function(){window.scrollTo(0,1)},10)};e()&&(document.documentElement.style.setProperty("--vh",.01*window.innerHeight+"px"),window.addEventListener("load",s,!1),window.addEventListener("orientationchange",s,!1));var d="scale(".concat(r,")"),a=o?window.innerHeight/2-i/2:(r-1)*i/2;t.style.setProperty("position","absolute"),t.style.setProperty("MozTransform",d),t.style.setProperty("transform",d),t.style.setProperty("WebkitTransform",d),t.style.setProperty("top",a+"px"),t.style.setProperty("left",(r-1)*n/2+(window.innerWidth-n*r)/2+"px")};exports.resizeContainer=t; },{}],"8/Nf":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.GameLoopType=void 0;var e,t=o(require("pixi.js")),i=o(require("./scene")),n=require("../utils/helpers");function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(r=function(e){return e?i:t})(e)}function o(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=r(t);if(i&&i.has(e))return i.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var a=o?Object.getOwnPropertyDescriptor(e,s):null;a&&(a.get||a.set)?Object.defineProperty(n,s,a):n[s]=e[s]}return n.default=e,i&&i.set(e,n),n}function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var i=0;i=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function s(t,e){if(t){if("string"==typeof t)return y(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?y(t,e):void 0}}function y(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",a=arguments.length>2?arguments[2]:void 0,u=arguments.length>3?arguments[3]:void 0,c=arguments.length>4&&void 0!==arguments[4]?arguments[4]:16777215;return p(this,o),(e=n.call(this,i,{fontName:a,fontSize:u,tint:c}))._proxy=new t.default(r,C(e)),e}return d(o,[{key:"id",get:function(){return this._proxy.id}},{key:"pixiObj",get:function(){return this}},{key:"scene",get:function(){return this._proxy.scene}},{key:"parentGameObject",get:function(){return this.parent}},{key:"asAnimatedSprite",value:function(){throw new Error("Can't cast to this object!")}},{key:"asBitmapText",value:function(){return this}},{key:"asContainer",value:function(){return this}},{key:"asGraphics",value:function(){throw new Error("Can't cast to this object!")}},{key:"asMesh",value:function(){throw new Error("Can't cast to this object!")}},{key:"asNineSlicePlane",value:function(){throw new Error("Can't cast to this object!")}},{key:"asParticleContainer",value:function(){throw new Error("Can't cast to this object!")}},{key:"asSimpleMesh",value:function(){throw new Error("Can't cast to this object!")}},{key:"asSimplePlane",value:function(){throw new Error("Can't cast to this object!")}},{key:"asSimpleRope",value:function(){throw new Error("Can't cast to this object!")}},{key:"asSprite",value:function(){throw new Error("Can't cast to this object!")}},{key:"asText",value:function(){throw new Error("Can't cast to this object!")}},{key:"asTilingSprite",value:function(){throw new Error("Can't cast to this object!")}},{key:"addChild",value:function(){for(var t,e=arguments.length,r=new Array(e),n=0;n=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function s(t,e){if(t){if("string"==typeof t)return y(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?y(t,e):void 0}}function y(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:"";return p(this,o),(e=n.call(this))._proxy=new t.default(r,C(e)),e}return d(o,[{key:"id",get:function(){return this._proxy.id}},{key:"pixiObj",get:function(){return this}},{key:"scene",get:function(){return this._proxy.scene}},{key:"parentGameObject",get:function(){return this.parent}},{key:"asAnimatedSprite",value:function(){throw new Error("Can't cast to this object!")}},{key:"asBitmapText",value:function(){throw new Error("Can't cast to this object!")}},{key:"asContainer",value:function(){return this}},{key:"asGraphics",value:function(){return this}},{key:"asMesh",value:function(){throw new Error("Can't cast to this object!")}},{key:"asNineSlicePlane",value:function(){throw new Error("Can't cast to this object!")}},{key:"asParticleContainer",value:function(){throw new Error("Can't cast to this object!")}},{key:"asSimpleMesh",value:function(){throw new Error("Can't cast to this object!")}},{key:"asSimplePlane",value:function(){throw new Error("Can't cast to this object!")}},{key:"asSimpleRope",value:function(){throw new Error("Can't cast to this object!")}},{key:"asSprite",value:function(){throw new Error("Can't cast to this object!")}},{key:"asText",value:function(){throw new Error("Can't cast to this object!")}},{key:"asTilingSprite",value:function(){throw new Error("Can't cast to this object!")}},{key:"addChild",value:function(){for(var t,e=arguments.length,r=new Array(e),n=0;n=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function s(t,e){if(t){if("string"==typeof t)return y(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?y(t,e):void 0}}function y(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1?arguments[1]:void 0,a=arguments.length>2?arguments[2]:void 0,u=arguments.length>3?arguments[3]:void 0,c=arguments.length>4?arguments[4]:void 0;return p(this,o),(e=n.call(this,i,a,u,c))._proxy=new t.default(r,C(e)),e}return d(o,[{key:"id",get:function(){return this._proxy.id}},{key:"pixiObj",get:function(){return this}},{key:"scene",get:function(){return this._proxy.scene}},{key:"parentGameObject",get:function(){return this.parent}},{key:"asAnimatedSprite",value:function(){throw new Error("Can't cast to this object!")}},{key:"asBitmapText",value:function(){throw new Error("Can't cast to this object!")}},{key:"asContainer",value:function(){return this}},{key:"asGraphics",value:function(){throw new Error("Can't cast to this object!")}},{key:"asMesh",value:function(){return this}},{key:"asNineSlicePlane",value:function(){throw new Error("Can't cast to this object!")}},{key:"asParticleContainer",value:function(){throw new Error("Can't cast to this object!")}},{key:"asSimpleMesh",value:function(){throw new Error("Can't cast to this object!")}},{key:"asSimplePlane",value:function(){throw new Error("Can't cast to this object!")}},{key:"asSimpleRope",value:function(){throw new Error("Can't cast to this object!")}},{key:"asSprite",value:function(){throw new Error("Can't cast to this object!")}},{key:"asText",value:function(){throw new Error("Can't cast to this object!")}},{key:"asTilingSprite",value:function(){throw new Error("Can't cast to this object!")}},{key:"addChild",value:function(){for(var t,e=arguments.length,r=new Array(e),n=0;n=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function y(t,e){if(t){if("string"==typeof t)return s(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(t,e):void 0}}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1?arguments[1]:void 0,a=arguments.length>2?arguments[2]:void 0,u=arguments.length>3?arguments[3]:void 0,l=arguments.length>4?arguments[4]:void 0,c=arguments.length>5?arguments[5]:void 0;return p(this,o),(e=n.call(this,i,a,u,l,c))._proxy=new t.default(r,C(e)),e}return d(o,[{key:"id",get:function(){return this._proxy.id}},{key:"pixiObj",get:function(){return this}},{key:"scene",get:function(){return this._proxy.scene}},{key:"parentGameObject",get:function(){return this.parent}},{key:"asAnimatedSprite",value:function(){throw new Error("Can't cast to this object!")}},{key:"asBitmapText",value:function(){throw new Error("Can't cast to this object!")}},{key:"asContainer",value:function(){return this}},{key:"asGraphics",value:function(){throw new Error("Can't cast to this object!")}},{key:"asMesh",value:function(){return this}},{key:"asNineSlicePlane",value:function(){return this}},{key:"asParticleContainer",value:function(){throw new Error("Can't cast to this object!")}},{key:"asSimpleMesh",value:function(){throw new Error("Can't cast to this object!")}},{key:"asSimplePlane",value:function(){return this}},{key:"asSimpleRope",value:function(){throw new Error("Can't cast to this object!")}},{key:"asSprite",value:function(){throw new Error("Can't cast to this object!")}},{key:"asText",value:function(){throw new Error("Can't cast to this object!")}},{key:"asTilingSprite",value:function(){throw new Error("Can't cast to this object!")}},{key:"addChild",value:function(){for(var t,e=arguments.length,r=new Array(e),n=0;n=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function s(t,e){if(t){if("string"==typeof t)return y(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?y(t,e):void 0}}function y(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:"";return p(this,o),(e=n.call(this))._proxy=new t.default(r,C(e)),e}return d(o,[{key:"id",get:function(){return this._proxy.id}},{key:"pixiObj",get:function(){return this}},{key:"scene",get:function(){return this._proxy.scene}},{key:"parentGameObject",get:function(){return this.parent}},{key:"asAnimatedSprite",value:function(){throw new Error("Can't cast to this object!")}},{key:"asBitmapText",value:function(){throw new Error("Can't cast to this object!")}},{key:"asContainer",value:function(){return this}},{key:"asGraphics",value:function(){throw new Error("Can't cast to this object!")}},{key:"asMesh",value:function(){throw new Error("Can't cast to this object!")}},{key:"asNineSlicePlane",value:function(){throw new Error("Can't cast to this object!")}},{key:"asParticleContainer",value:function(){return this}},{key:"asSimpleMesh",value:function(){throw new Error("Can't cast to this object!")}},{key:"asSimplePlane",value:function(){throw new Error("Can't cast to this object!")}},{key:"asSimpleRope",value:function(){throw new Error("Can't cast to this object!")}},{key:"asSprite",value:function(){throw new Error("Can't cast to this object!")}},{key:"asText",value:function(){throw new Error("Can't cast to this object!")}},{key:"asTilingSprite",value:function(){throw new Error("Can't cast to this object!")}},{key:"addChild",value:function(){for(var t,e=arguments.length,r=new Array(e),n=0;n=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function s(t,e){if(t){if("string"==typeof t)return y(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?y(t,e):void 0}}function y(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1?arguments[1]:void 0;return p(this,o),(e=n.call(this,i))._proxy=new t.default(r,C(e)),e}return d(o,[{key:"id",get:function(){return this._proxy.id}},{key:"pixiObj",get:function(){return this}},{key:"scene",get:function(){return this._proxy.scene}},{key:"parentGameObject",get:function(){return this.parent}},{key:"asAnimatedSprite",value:function(){throw new Error("Can't cast to this object!")}},{key:"asBitmapText",value:function(){throw new Error("Can't cast to this object!")}},{key:"asContainer",value:function(){return this}},{key:"asGraphics",value:function(){throw new Error("Can't cast to this object!")}},{key:"asMesh",value:function(){throw new Error("Can't cast to this object!")}},{key:"asNineSlicePlane",value:function(){throw new Error("Can't cast to this object!")}},{key:"asParticleContainer",value:function(){throw new Error("Can't cast to this object!")}},{key:"asSimpleMesh",value:function(){throw new Error("Can't cast to this object!")}},{key:"asSimplePlane",value:function(){throw new Error("Can't cast to this object!")}},{key:"asSimpleRope",value:function(){throw new Error("Can't cast to this object!")}},{key:"asSprite",value:function(){return this}},{key:"asText",value:function(){throw new Error("Can't cast to this object!")}},{key:"asTilingSprite",value:function(){throw new Error("Can't cast to this object!")}},{key:"addChild",value:function(){for(var t,e=arguments.length,r=new Array(e),n=0;n=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function y(t,e){if(t){if("string"==typeof t)return s(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(t,e):void 0}}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return p(this,o),(e=n.call(this,i))._proxy=new t.default(r,C(e)),e}return d(o,[{key:"id",get:function(){return this._proxy.id}},{key:"pixiObj",get:function(){return this}},{key:"scene",get:function(){return this._proxy.scene}},{key:"parentGameObject",get:function(){return this.parent}},{key:"asAnimatedSprite",value:function(){throw new Error("Can't cast to this object!")}},{key:"asBitmapText",value:function(){throw new Error("Can't cast to this object!")}},{key:"asContainer",value:function(){return this}},{key:"asGraphics",value:function(){throw new Error("Can't cast to this object!")}},{key:"asMesh",value:function(){throw new Error("Can't cast to this object!")}},{key:"asNineSlicePlane",value:function(){throw new Error("Can't cast to this object!")}},{key:"asParticleContainer",value:function(){throw new Error("Can't cast to this object!")}},{key:"asSimpleMesh",value:function(){throw new Error("Can't cast to this object!")}},{key:"asSimplePlane",value:function(){throw new Error("Can't cast to this object!")}},{key:"asSimpleRope",value:function(){throw new Error("Can't cast to this object!")}},{key:"asSprite",value:function(){return this}},{key:"asText",value:function(){return this}},{key:"asTilingSprite",value:function(){throw new Error("Can't cast to this object!")}},{key:"addChild",value:function(){for(var t,e=arguments.length,r=new Array(e),n=0;n=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function y(t,e){if(t){if("string"==typeof t)return s(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(t,e):void 0}}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1?arguments[1]:void 0,a=arguments.length>2?arguments[2]:void 0,u=arguments.length>3?arguments[3]:void 0;return p(this,o),(e=n.call(this,i,a,u))._proxy=new t.default(r,C(e)),e}return d(o,[{key:"id",get:function(){return this._proxy.id}},{key:"pixiObj",get:function(){return this}},{key:"scene",get:function(){return this._proxy.scene}},{key:"parentGameObject",get:function(){return this.parent}},{key:"asAnimatedSprite",value:function(){throw new Error("Can't cast to this object!")}},{key:"asBitmapText",value:function(){throw new Error("Can't cast to this object!")}},{key:"asContainer",value:function(){return this}},{key:"asGraphics",value:function(){throw new Error("Can't cast to this object!")}},{key:"asMesh",value:function(){throw new Error("Can't cast to this object!")}},{key:"asNineSlicePlane",value:function(){throw new Error("Can't cast to this object!")}},{key:"asParticleContainer",value:function(){throw new Error("Can't cast to this object!")}},{key:"asSimpleMesh",value:function(){throw new Error("Can't cast to this object!")}},{key:"asSimplePlane",value:function(){throw new Error("Can't cast to this object!")}},{key:"asSimpleRope",value:function(){throw new Error("Can't cast to this object!")}},{key:"asSprite",value:function(){return this}},{key:"asText",value:function(){throw new Error("Can't cast to this object!")}},{key:"asTilingSprite",value:function(){return this}},{key:"addChild",value:function(){for(var t,e=arguments.length,r=new Array(e),n=0;n=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function y(t,e){if(t){if("string"==typeof t)return s(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(t,e):void 0}}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1?arguments[1]:void 0,a=arguments.length>2?arguments[2]:void 0;return p(this,o),(e=n.call(this,i,a))._proxy=new t.default(r,C(e)),e}return d(o,[{key:"id",get:function(){return this._proxy.id}},{key:"pixiObj",get:function(){return this}},{key:"scene",get:function(){return this._proxy.scene}},{key:"parentGameObject",get:function(){return this.parent}},{key:"asAnimatedSprite",value:function(){return this}},{key:"asBitmapText",value:function(){throw new Error("Can't cast to this object!")}},{key:"asContainer",value:function(){return this}},{key:"asGraphics",value:function(){throw new Error("Can't cast to this object!")}},{key:"asMesh",value:function(){throw new Error("Can't cast to this object!")}},{key:"asNineSlicePlane",value:function(){throw new Error("Can't cast to this object!")}},{key:"asParticleContainer",value:function(){throw new Error("Can't cast to this object!")}},{key:"asSimpleMesh",value:function(){throw new Error("Can't cast to this object!")}},{key:"asSimplePlane",value:function(){throw new Error("Can't cast to this object!")}},{key:"asSimpleRope",value:function(){throw new Error("Can't cast to this object!")}},{key:"asSprite",value:function(){return this}},{key:"asText",value:function(){throw new Error("Can't cast to this object!")}},{key:"asTilingSprite",value:function(){throw new Error("Can't cast to this object!")}},{key:"addChild",value:function(){for(var t,e=arguments.length,r=new Array(e),n=0;n=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function y(t,e){if(t){if("string"==typeof t)return s(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(t,e):void 0}}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1?arguments[1]:void 0,a=arguments.length>2?arguments[2]:void 0,u=arguments.length>3?arguments[3]:void 0,c=arguments.length>4?arguments[4]:void 0,l=arguments.length>5?arguments[5]:void 0;return p(this,o),(e=n.call(this,i,a,u,c,l))._proxy=new t.default(r,C(e)),e}return d(o,[{key:"id",get:function(){return this._proxy.id}},{key:"pixiObj",get:function(){return this}},{key:"scene",get:function(){return this._proxy.scene}},{key:"parentGameObject",get:function(){return this.parent}},{key:"asAnimatedSprite",value:function(){throw new Error("Can't cast to this object!")}},{key:"asBitmapText",value:function(){throw new Error("Can't cast to this object!")}},{key:"asContainer",value:function(){return this}},{key:"asGraphics",value:function(){throw new Error("Can't cast to this object!")}},{key:"asMesh",value:function(){return this}},{key:"asNineSlicePlane",value:function(){throw new Error("Can't cast to this object!")}},{key:"asParticleContainer",value:function(){throw new Error("Can't cast to this object!")}},{key:"asSimpleMesh",value:function(){return this}},{key:"asSimplePlane",value:function(){throw new Error("Can't cast to this object!")}},{key:"asSimpleRope",value:function(){throw new Error("Can't cast to this object!")}},{key:"asSprite",value:function(){throw new Error("Can't cast to this object!")}},{key:"asText",value:function(){throw new Error("Can't cast to this object!")}},{key:"asTilingSprite",value:function(){throw new Error("Can't cast to this object!")}},{key:"addChild",value:function(){for(var t,e=arguments.length,r=new Array(e),n=0;n=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function y(t,e){if(t){if("string"==typeof t)return s(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(t,e):void 0}}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1?arguments[1]:void 0,a=arguments.length>2?arguments[2]:void 0,u=arguments.length>3?arguments[3]:void 0;return p(this,o),(e=n.call(this,i,a,u))._proxy=new t.default(r,C(e)),e}return d(o,[{key:"id",get:function(){return this._proxy.id}},{key:"pixiObj",get:function(){return this}},{key:"scene",get:function(){return this._proxy.scene}},{key:"parentGameObject",get:function(){return this.parent}},{key:"asAnimatedSprite",value:function(){throw new Error("Can't cast to this object!")}},{key:"asBitmapText",value:function(){throw new Error("Can't cast to this object!")}},{key:"asContainer",value:function(){return this}},{key:"asGraphics",value:function(){throw new Error("Can't cast to this object!")}},{key:"asMesh",value:function(){return this}},{key:"asNineSlicePlane",value:function(){throw new Error("Can't cast to this object!")}},{key:"asParticleContainer",value:function(){throw new Error("Can't cast to this object!")}},{key:"asSimpleMesh",value:function(){throw new Error("Can't cast to this object!")}},{key:"asSimplePlane",value:function(){return this}},{key:"asSimpleRope",value:function(){throw new Error("Can't cast to this object!")}},{key:"asSprite",value:function(){throw new Error("Can't cast to this object!")}},{key:"asText",value:function(){throw new Error("Can't cast to this object!")}},{key:"asTilingSprite",value:function(){throw new Error("Can't cast to this object!")}},{key:"addChild",value:function(){for(var t,e=arguments.length,r=new Array(e),n=0;n=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function y(t,e){if(t){if("string"==typeof t)return s(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(t,e):void 0}}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1?arguments[1]:void 0,a=arguments.length>2?arguments[2]:void 0,u=arguments.length>3?arguments[3]:void 0;return p(this,o),(e=n.call(this,i,a,u))._proxy=new t.default(r,C(e)),e}return d(o,[{key:"id",get:function(){return this._proxy.id}},{key:"pixiObj",get:function(){return this}},{key:"scene",get:function(){return this._proxy.scene}},{key:"parentGameObject",get:function(){return this.parent}},{key:"asAnimatedSprite",value:function(){throw new Error("Can't cast to this object!")}},{key:"asBitmapText",value:function(){throw new Error("Can't cast to this object!")}},{key:"asContainer",value:function(){return this}},{key:"asGraphics",value:function(){throw new Error("Can't cast to this object!")}},{key:"asMesh",value:function(){return this}},{key:"asNineSlicePlane",value:function(){throw new Error("Can't cast to this object!")}},{key:"asParticleContainer",value:function(){throw new Error("Can't cast to this object!")}},{key:"asSimpleMesh",value:function(){throw new Error("Can't cast to this object!")}},{key:"asSimplePlane",value:function(){throw new Error("Can't cast to this object!")}},{key:"asSimpleRope",value:function(){return this}},{key:"asSprite",value:function(){throw new Error("Can't cast to this object!")}},{key:"asText",value:function(){throw new Error("Can't cast to this object!")}},{key:"asTilingSprite",value:function(){throw new Error("Can't cast to this object!")}},{key:"addChild",value:function(){for(var t,e=arguments.length,r=new Array(e),n=0;n=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,n=!0,p=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return n=t.done,t},e:function(t){p=!0,i=t},f:function(){try{n||null==r.return||r.return()}finally{if(p)throw i}}}}function k(t,e){if(t){if("string"==typeof t)return X(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?X(t,e):void 0}}function X(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,o=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1?arguments[1]:void 0,o=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0;return this.objectProps={text:e,fontName:r,fontSize:o,fontColor:s,type:t.BitmapText},this}},{key:"asGraphics",value:function(){return this.objectProps={type:t.Graphics},this}},{key:"asMesh",value:function(e,r){return this.objectProps={geometry:e,shader:r,type:t.Mesh},this}},{key:"asNineSlicePlane",value:function(e,r,o,s,i){return this.objectProps={type:t.NineSlicePlane,texture:e,leftWidth:r,topHeight:o,rightWidth:s,bottomHeight:i},this}},{key:"asParticleContainer",value:function(){return this.objectProps={type:t.ParticleContainer},this}},{key:"asSimpleMesh",value:function(e,r){return this.objectProps={type:t.SimpleMesh,texture:e,vertices:r},this}},{key:"asSimplePlane",value:function(e,r,o){return this.objectProps={type:t.SimplePlane,texture:e,verticesX:r,verticesY:o},this}},{key:"asSimpleRope",value:function(e,r){return this.objectProps={type:t.SimpleRope,texture:e,points:r},this}},{key:"asSprite",value:function(e){return this.objectProps={texture:e,type:t.Sprite},this}},{key:"asTilingSprite",value:function(e,r,o){return this.objectProps={texture:e,width:r,height:o,type:t.TilingSprite},this}},{key:"asText",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1?arguments[1]:void 0;return this.objectProps={text:e,fontStyle:r,type:t.Text},this}},{key:"buildInto",value:function(t){return this.objectToBuild=t,this.process(!0)}},{key:"buildIntoAndKeepData",value:function(t){return this.objectToBuild=t,this.process(!1)}},{key:"build",value:function(){return this.process(!0)}},{key:"buildAndKeepData",value:function(){return this.process(!1)}},{key:"process",value:function(){var y,v=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(null!==this.objectToBuild)y=this.objectToBuild;else switch(this.objectProps.type){case t.Container:y=new o.default(this.props.name);break;case t.AnimatedSprite:y=new e.default(this.props.name,this.objectProps.textures);break;case t.BitmapText:y=new r.default(this.props.name,this.objectProps.text,this.objectProps.fontName,this.objectProps.fontSize,this.objectProps.fontColor);break;case t.Graphics:y=new s.default(this.props.name);break;case t.Mesh:y=new i.default(this.props.name,this.objectProps.geometry,this.objectProps.shader);break;case t.NineSlicePlane:y=new n.default(this.props.name,this.objectProps.texture,this.objectProps.leftWidth,this.objectProps.topHeight,this.objectProps.rightWidth,this.objectProps.bottomHeight);break;case t.ParticleContainer:y=new p.default(this.props.name);break;case t.SimpleMesh:y=new a.default(this.props.name,this.objectProps.texture,this.objectProps.vertices);break;case t.SimplePlane:y=new l.default(this.props.name,this.objectProps.texture,this.objectProps.verticesX,this.objectProps.verticesY);break;case t.SimpleRope:y=new h.default(this.props.name,this.objectProps.texture,this.objectProps.points);break;case t.Sprite:y=new u.default(this.props.name,this.objectProps.texture.clone());break;case t.Text:(y=new c.default(this.props.name,this.objectProps.text)).style=this.objectProps.fontStyle;break;case t.TilingSprite:y=new f.default(this.props.name,this.objectProps.texture.clone(),this.objectProps.width,this.objectProps.height)}var m,d=w(this.props.components);try{for(d.s();!(m=d.n()).done;){var P=m.value;y.addComponent(P)}}catch(H){d.e(H)}finally{d.f()}this.props.components=[];var g,x=w(this.props.componentBuilders);try{for(x.s();!(g=x.n()).done;){var S=g.value;y.addComponent(S())}}catch(H){x.e(H)}finally{x.f()}var k,X=w(this.props.attributes);try{for(X.s();!(k=X.n()).done;){var Y=j(k.value,2),A=Y[0],T=Y[1];y.assignAttribute(A,T)}}catch(H){X.e(H)}finally{X.f()}var C,O=w(this.props.flags);try{for(O.s();!(C=O.n()).done;){var M=C.value;y.setFlag(M)}}catch(H){O.e(H)}finally{O.f()}null!=this.props.state&&(y.stateId=this.props.state),0!==this.props.tags.size&&this.props.tags.forEach(function(t){return y.addTag(t)});var q=y.pixiObj;if(null!=this.props.scaleX&&(q.scale.x=this.props.scaleX),null!=this.props.scaleY&&(q.scale.y=this.props.scaleY),null!=this.props.relPosX){var B=new b.Point;B.x=this.props.relPosX*this.scene.width/this.scene.stage.scale.x,q.position.x=q.toLocal(B).x,null!=this.props.scaleX&&(q.position.x*=this.props.scaleX)}if(null!=this.props.relPosY){var N=new b.Point;N.y=this.props.relPosY*this.scene.height/this.scene.stage.scale.y,q.position.y=q.toLocal(N).y,null!=this.props.scaleY&&(q.position.y*=this.props.scaleY)}if(null!=this.props.locPosX&&(null!=this.props.relPosX?q.position.x+=this.props.locPosX:q.position.x=this.props.locPosX),null!=this.props.locPosY&&(null!=this.props.relPosY?q.position.y+=this.props.locPosY:q.position.y=this.props.locPosY),null!=this.props.absPosX){var I=new b.Point;I.x=this.props.absPosX,q.position.x=q.toLocal(I,this.scene.stage.pixiObj).x,null!=this.props.scaleX&&(q.position.x*=this.props.scaleX)}if(null!=this.props.absPosY){var W=new b.Point;W.y=this.props.absPosY,q.position.y=q.toLocal(W,this.scene.stage.pixiObj).y,null!=this.props.scaleY&&(q.position.y*=this.props.scaleY)}if(null!=this.props.anchorX&&(q instanceof u.default||q instanceof c.default?q.anchor.x=this.props.anchorX:q.pivot.x=this.props.anchorX*q.width),null!=this.props.anchorY&&(q instanceof u.default||q instanceof c.default?q.anchor.y=this.props.anchorY:q.pivot.y=this.props.anchorY*q.height),null!=this.props.virtAnchorX){var E=this.props.virtAnchorX-(null==this.props.anchorX?0:this.props.anchorX);q.position.x-=E*q.width}if(null!=this.props.virtAnchorY){var _=this.props.virtAnchorY-(null==this.props.anchorY?0:this.props.anchorY);q.position.y-=_*q.height}null!=this.props.parent&&this.props.parent.pixiObj.addChild(y.pixiObj);var G,R=w(this.children);try{for(R.s();!(G=R.n()).done;){var D=G.value.withParent(y).process(v);y.pixiObj.addChild(D.pixiObj)}}catch(H){R.e(H)}finally{R.f()}return v&&this.clear(),y}},{key:"clear",value:function(){return this.props={name:"",components:[],componentBuilders:[],attributes:new Map,flags:[],tags:new Set},this.objectProps={type:t.Container},this.objectToBuild=null,this.children=[],this}}]),v}();exports.default=M; },{"./game-objects/animated-sprite":"l0w2","./game-objects/bitmap-text":"+HPP","./game-objects/container":"OTmP","./game-objects/graphics":"3VUd","./game-objects/mesh":"IiXL","./game-objects/nine-slice-plane":"gSRg","./game-objects/particle-container":"Tb9J","./game-objects/simple-mesh":"cxZT","./game-objects/simple-plane":"ZMkM","./game-objects/simple-rope":"yDt/","./game-objects/sprite":"nlgN","./game-objects/text":"Wa9Q","./game-objects/tiling-sprite":"wS5x","./component":"jR7U","pixi.js":"wbEC"}],"EvPM":[function(require,module,exports) { "use strict";function t(e){return(t="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)}function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var o=0;o1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;a(this,t),this.key=0,this.param1=null,this.param2=null,this.param1C=null,this.param2C=null,this.cached=!1,this.next=null,this.previous=null,this.key=r,this.param1=e,this.param2=i,this.param1C=null,this.param2C=null}return e(t,[{key:"cacheParams",value:function(){this.cached||(null!=this.param1&&(this.param1C="function"==typeof this.param1?this.param1():this.param1),null!=this.param2&&(this.param2C="function"==typeof this.param2?this.param2():this.param2),this.cached=!0)}},{key:"getParam1",value:function(){return this.cached||this.cacheParams(),this.param1C}},{key:"setParam1",value:function(t){this.param1=t,this.param1C=t}},{key:"getParam2",value:function(){return this.cached||this.cacheParams(),this.param2C}},{key:"setParam2",value:function(t){this.param2=t,this.param2C=t}},{key:"resetCache",value:function(){this.param1C=this.param2C=null,this.cached=!1}}]),t}();exports.default=o; },{}],"RXbb":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=u(require("../engine/component")),e=require("../utils/query-condition"),r=i(require("../utils/stack")),n=i(require("../utils/cmd-node"));function i(t){return t&&t.__esModule?t:{default:t}}function a(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(a=function(t){return t?r:e})(t)}function u(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=typeof t&&"function"!=typeof t)return{default:t};var r=a(e);if(r&&r.has(t))return r.get(t);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in t)if("default"!==u&&Object.prototype.hasOwnProperty.call(t,u)){var o=i?Object.getOwnPropertyDescriptor(t,u):null;o&&(o.get||o.set)?Object.defineProperty(n,u,o):n[u]=t[u]}return n.default=t,r&&r.set(t,n),n}function o(t){return(o="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})(t)}function s(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=c(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,o=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return u=t.done,t},e:function(t){o=!0,a=t},f:function(){try{u||null==r.return||r.return()}finally{if(o)throw a}}}}function c(t,e){if(t){if("string"==typeof t)return h(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?h(t,e):void 0}}function h(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:"Chain";return l(this,u),(t=a.call(this)).scopeStack=new r.default,t.current=null,t.head=null,t.tail=null,t.tmpParam=null,t.tmpParam2=null,t.abortIfChecks=[],t._name=e,t}return m(u,[{key:"mergeAtBeginning",value:function(e){if(e.cmpState===t.ComponentState.RUNNING)throw new Error("Can't merge running component!");return this.head?(e.tail.next=this.head,this.head=e.head):(this.head=e.head,this.tail=e.tail),this.current=this.head,e.head=e.tail=null,this}},{key:"mergeWith",value:function(e){if(e.cmpState===t.ComponentState.RUNNING)throw new Error("Can't merge running component!");return this.tail?(this.tail.next=e.head,this.tail=e.tail):(this.tail=e.tail,this.head=e.head),e.head=e.tail=null,this}},{key:"beginRepeat",value:function(t){return this.enqueue(x,t,0===t),this}},{key:"endRepeat",value:function(){return this.enqueue(N),this}},{key:"call",value:function(t){return this.enqueue(C,t),this}},{key:"executeUpon",value:function(t){return t.addComponentAndRun(this),this}},{key:"beginWhile",value:function(t){return this.enqueue(I,t),this}},{key:"endWhile",value:function(){return this.enqueue(q),this}},{key:"beginInterval",value:function(t){return this.enqueue(O,t),this}},{key:"endInterval",value:function(){return this.enqueue(S),this}},{key:"beginIf",value:function(t){return this.enqueue(j,t),this}},{key:"else",value:function(){return this.enqueue(_),this}},{key:"endIf",value:function(){return this.enqueue(R),this}},{key:"addComponent",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.enqueue(E,t,e),this}},{key:"waitFor",value:function(t){return this.enqueue(U,t),this}},{key:"waitForFirst",value:function(t){return this.enqueue(M,t),this}},{key:"waitUntil",value:function(t){return this.enqueue(W,t),this}},{key:"waitFrames",value:function(t){return this.enqueue(B,t),this}},{key:"waitTime",value:function(t){return this.enqueue(A,t),this}},{key:"waitForMessage",value:function(t){return this.enqueue(G,t),this}},{key:"waitForMessageConditional",value:function(t,e){return this.enqueue(F,t,e),this}},{key:"removeComponent",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.enqueue(T,t,e),this}},{key:"detachGameObjectsByQuery",value:function(t){return this.enqueue(Q,t),this}},{key:"destroyGameObjectsByQuery",value:function(t){return this.enqueue(D,t),this}},{key:"detachGameObject",value:function(t){return this.enqueue($,t),this}},{key:"destroyGameObject",value:function(t){return this.enqueue(z,t),this}},{key:"addAbortCondition",value:function(t){return this.abortIfChecks.push(t),this}},{key:"onMessage",value:function(t){this.current&&(this.current.key===G&&this.current.param1===t.action||this.current.key===F&&this.current.param1===t.action&&(0,e.queryConditionCheck)(t.gameObject,this.current.param2))&&(this.tmpParam2=!0)}},{key:"onUpdate",value:function(e,r){var n=this;if(null!==this.owner){if(0!==this.abortIfChecks.length){var i,a=s(this.abortIfChecks);try{for(a.s();!(i=a.n()).done;){if((0,i.value)())return void this.finish()}}catch(P){a.e(P)}finally{a.f()}}if(null==this.current&&(this.current=this.dequeue()),null!=this.current)switch(this.current.key){case x:this.current.cacheParams(),this.scopeStack.push(this.current),this.gotoNextImmediately(e,r);break;case N:var u=this.scopeStack.pop();u.setParam1(u.getParam1()-1),!0===u.getParam2()||u.getParam1()>0?(this.current=u,this.onUpdate(e,r)):(u.resetCache(),this.gotoNextImmediately(e,r));break;case C:this.current.param1(this),this.gotoNextImmediately(e,r);break;case I:this.scopeStack.push(this.current),this.gotoNextImmediately(e,r);break;case q:var o=this.scopeStack.pop();o.param1()?(this.current=o,this.onUpdate(e,r)):this.gotoNextImmediately(e,r);break;case O:this.current.cached||this.current.cacheParams(),null==this.tmpParam?this.tmpParam=r:r-this.tmpParam>=this.current.getParam1()&&(this.tmpParam=null,this.current.resetCache(),this.scopeStack.push(this.current),this.gotoNextImmediately(e,r));break;case S:this.current=this.scopeStack.pop(),this.onUpdate(e,r);break;case j:if(this.current.param1()){this.gotoNextImmediately(e,r);break}for(var c=1;;)if(this.current=this.dequeue(),this.current.key===j&&c++,this.current.key===R&&c--,1===c&&this.current.key===_||0===c&&this.current.key===R){this.gotoNext();break}this.onUpdate(e,r);break;case _:for(var h=1;;)if(this.current=this.dequeue(),this.current.key===j&&h++,this.current.key===R&&h--,0===h&&this.current.key===R){this.gotoNext();break}this.onUpdate(e,r);break;case R:this.gotoNextImmediately(e,r);break;case A:this.current.cacheParams(),null==this.tmpParam&&(this.tmpParam=r),r-this.tmpParam>this.current.getParam1()&&(this.tmpParam=null,this.current.resetCache(),this.gotoNextImmediately(e,r));break;case E:(null!=this.current.getParam2()?this.current.getParam2():this.owner).addComponent(this.current.getParam1()),this.gotoNextImmediately(e,r);break;case U:var l=!this.current.cached;this.current.cached||this.current.cacheParams();var f=this.current.getParam1(),m=Array.isArray(f);l&&(m||f.cmpState!==t.ComponentState.NEW?m&&f.filter(function(e){return e.cmpState===t.ComponentState.NEW}).forEach(function(t){return n.owner.addComponentAndRun(t)}):this.owner.addComponentAndRun(f)),(!m&&f.isCompleted||m&&0===f.filter(function(e){return e._cmpState===t.ComponentState.RUNNING}).length)&&(this.current.resetCache(),this.gotoNextImmediately(e,r));break;case M:var p=!this.current.cached;this.current.cached||this.current.cacheParams();var y=this.current.getParam1();p&&y.filter(function(e){return e._cmpState===t.ComponentState.NEW}).forEach(function(t){return n.owner.addComponentAndRun(t)}),0!==y.filter(function(t){return t.isCompleted}).length&&(this.current.resetCache(),y.forEach(function(t){return t.finish()}),this.gotoNextImmediately(e,r));break;case W:this.current.param1()||this.gotoNextImmediately(e,r);break;case B:null==this.tmpParam&&(this.tmpParam=0),++this.tmpParam>this.current.param1&&(this.tmpParam=null,this.gotoNextImmediately(e,r));break;case G:case F:!0===this.tmpParam?!0===this.tmpParam2&&(this.unsubscribe(this.current.param1),this.tmpParam=this.tmpParam2=null,this.gotoNextImmediately(e,r)):(this.tmpParam=!0,this.tmpParam2=!1,this.subscribe(this.current.param1));break;case T:var d=null!=this.current.param2?this.current.param2:this.owner;d.removeComponent(d.findComponentByName(this.current.param1)),this.gotoNextImmediately(e,r);break;case Q:var v,b=s(this.scene.findObjectsByQuery(this.current.param1));try{for(b.s();!(v=b.n()).done;){v.value.detach()}}catch(P){b.e(P)}finally{b.f()}this.gotoNextImmediately(e,r);break;case D:var k,g=s(this.scene.findObjectsByQuery(this.current.param1));try{for(g.s();!(k=g.n()).done;){k.value.detach()}}catch(P){g.e(P)}finally{g.f()}this.gotoNextImmediately(e,r);break;case $:this.current.param1.detach(),this.gotoNextImmediately(e,r);break;case z:this.current.param1.destroy(),this.gotoNextImmediately(e,r)}else this.finish()}}},{key:"enqueue",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=new n.default(t,e,r);null==this.head?this.head=this.tail=i:(this.tail.next=i,i.previous=this.tail,this.tail=i),null==this.current&&(this.current=this.head)}},{key:"dequeue",value:function(){return null==this.current||null==this.current.next?null:(this.current=this.current.next,this.current)}},{key:"gotoNext",value:function(){this.current=this.current.next}},{key:"gotoNextImmediately",value:function(t,e){this.current=this.current.next,this.onUpdate(t,e)}}]),u}();exports.default=H; },{"../engine/component":"jR7U","../utils/query-condition":"IzC/","../utils/stack":"EvPM","../utils/cmd-node":"iN1m"}],"JXEQ":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.FuncComponent=void 0;var n=e(require("../engine/component")),t=require("../utils/query-condition");function e(n){return n&&n.__esModule?n:{default:n}}function r(n){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}function o(n,t){return a(n)||u(n,t)||c(n,t)||i()}function i(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(n,t){var e=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=e){var r,o,i,u,a=[],s=!0,c=!1;try{if(i=(e=e.call(n)).next,0===t){if(Object(e)!==e)return;s=!1}else for(;!(s=(r=i.call(e)).done)&&(a.push(r.value),a.length!==t);s=!0);}catch(l){c=!0,o=l}finally{try{if(!s&&null!=e.return&&(u=e.return(),Object(u)!==u))return}finally{if(c)throw o}}return a}}function a(n){if(Array.isArray(n))return n}function s(n,t){var e="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!e){if(Array.isArray(n)||(e=c(n))||t&&n&&"number"==typeof n.length){e&&(n=e);var r=0,o=function(){};return{s:o,n:function(){return r>=n.length?{done:!0}:{done:!1,value:n[r++]}},e:function(n){throw n},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,a=!1;return{s:function(){e=e.call(n)},n:function(){var n=e.next();return u=n.done,n},e:function(n){a=!0,i=n},f:function(){try{u||null==e.return||e.return()}finally{if(a)throw i}}}}function c(n,t){if(n){if("string"==typeof n)return l(n,t);var e=Object.prototype.toString.call(n).slice(8,-1);return"Object"===e&&n.constructor&&(e=n.constructor.name),"Map"===e||"Set"===e?Array.from(n):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?l(n,t):void 0}}function l(n,t){(null==t||t>n.length)&&(t=n.length);for(var e=0,r=new Array(t);e=this.duration?this.finish():null!=this.onUpdateFunc&&this.onUpdateFunc(this,n,t)}},{key:"onDetach",value:function(){null!=this.onDetachFunc&&this.onDetachFunc(this)}},{key:"onRemove",value:function(){null!=this.onRemoveFunc&&this.onRemoveFunc(this)}},{key:"onFinish",value:function(){this.firstRun=0,null!=this.onFinishFunc&&this.onFinishFunc(this)}}]),i}();exports.FuncComponent=k; },{"../engine/component":"jR7U","../utils/query-condition":"IzC/"}],"EYRE":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.VirtualGamepadComponent=exports.GamepadButtons=void 0;var e,t=require("./key-input-component"),n=r(require("../engine/game-objects/graphics"));function r(e){return e&&e.__esModule?e:{default:e}}function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var n=0;n=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function s(e,t){if(e){if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:null;return this.messagesToSend.push(new n.default(e,this,this.owner,t)),null}},{key:"getMousePos",value:function(e,t,n){var o=e.getBoundingClientRect(),r=this.scene.app.renderer.resolution,i=n?t.changedTouches[0].clientX:t.clientX,s=n?t.changedTouches[0].clientY:t.clientY;return{posX:Math.round((i-o.left)/(o.right-o.left)*this.scene.app.view.width/r),posY:Math.round((s-o.top)/(o.bottom-o.top)*this.scene.app.view.height/r)}}}]),s}();exports.PointerInputComponent=P; },{"../engine/component":"jR7U","../engine/message":"JZGm"}],"W4cB":[function(require,module,exports) { "use strict";function t(e){return(t="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)}function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){for(var n=0;nthis.scene.app.screen.height)&&this.sendMessage(e.Messages.LOAD_CHECKPOINT):(n.right<-this.scene.app.screen.width||n.bottom<0||n.top>this.scene.app.screen.height)&&(this.sendMessage(e.Messages.OBJECT_DESTROYED),this.scene.stage.removeChild(this.owner))}}]),o}();exports.GarbageRemoval=d; },{"../constants/enums/messeges":"wkHK","../../libs/pixi-ecs":"KEu4"}],"dSEd":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Shift=void 0;var t=require("../constants/enums/messeges"),e=r(require("../../libs/pixi-ecs"));function n(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(n=function(t){return t?r:e})(t)}function r(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=typeof t&&"function"!=typeof t)return{default:t};var r=n(e);if(r&&r.has(t))return r.get(t);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&Object.prototype.hasOwnProperty.call(t,s)){var u=i?Object.getOwnPropertyDescriptor(t,s):null;u&&(u.get||u.set)?Object.defineProperty(o,s,u):o[s]=t[s]}return o.default=t,r&&r.set(t,o),o}function o(t){return(o="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})(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){for(var n=0;n20&&(t=20),0!=this.state.running){var n=this.owner.position.x,r=this.owner.position.y;this.owner.position.set(n-this.state.speed*t,r)}}},{key:"modifyState",value:function(t){this.state=Object.assign(Object.assign({},this.state),t)}}]),o}();exports.Shift=d; },{"../constants/enums/messeges":"wkHK","../../libs/pixi-ecs":"KEu4"}],"xPIR":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=o(require("../../libs/pixi-ecs")),e=require("../components/garbage-removal"),r=require("../components/shift");function n(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(n=function(t){return t?r:e})(t)}function o(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=typeof t&&"function"!=typeof t)return{default:t};var r=n(e);if(r&&r.has(t))return r.get(t);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in t)if("default"!==u&&Object.prototype.hasOwnProperty.call(t,u)){var c=i?Object.getOwnPropertyDescriptor(t,u):null;c&&(c.get||c.set)?Object.defineProperty(o,u,c):o[u]=t[u]}return o.default=t,r&&r.set(t,o),o}function i(t){return(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})(t)}function u(t,e){for(var r=0;r20&&(e=20),0!=this.state.running){var i=this.state.dir,n=this.owner.position,r=(this.scene.app.screen.width,this.scene.app.screen.height,this.owner.getBounds(),e*this.state.speed);switch(i){case s.Direction.DOWN:this.state.allowedDown&&(n.y+=r);break;case s.Direction.UP:this.state.allowedUp&&(n.y-=r)}}}},{key:"handleObstacleCollisionEnter",value:function(i){switch(i){case s.Direction.UP:this.state.flipPressed?(this.modifyState({dir:s.Direction.DOWN,flipPressed:!1,canFlip:!1}),this.sendMessage(e.Messages.FLIP_IMAGE)):this.modifyState({allowedUp:!1,canFlip:!0});break;case s.Direction.DOWN:this.state.flipPressed?(this.modifyState({dir:s.Direction.UP,flipPressed:!1,canFlip:!1}),this.sendMessage(e.Messages.FLIP_IMAGE)):this.modifyState({allowedDown:!1,canFlip:!0});break;case s.Direction.RIGHT:this.owner.addComponent(new t.Shift(null));break;case s.Direction.LEFT:}}},{key:"handleObstacleCollisionEnd",value:function(e){switch(e){case s.Direction.UP:0==this.state.allowedDown?this.modifyState({allowedUp:!0}):this.modifyState({allowedUp:!0,canFlip:!1});break;case s.Direction.DOWN:0==this.state.allowedUp?this.modifyState({allowedDown:!0}):this.modifyState({allowedDown:!0,canFlip:!1});break;case s.Direction.RIGHT:var t=this.owner.findComponentByName("Shift");t&&this.owner.removeComponent(t);break;case s.Direction.LEFT:}}},{key:"handleCollisionEnter",value:function(t){switch(t.otherObject.tags.values().next().value){case"BUFF":this.owner.addComponent(new n.PlayerBuff(null)),this.scene.stage.removeChild(t.otherObject);break;case"SLOW":this.owner.addComponent(new r.SlowMotion(null)),this.scene.stage.removeChild(t.otherObject);break;case"CHECKPOINT":this.sendMessage(e.Messages.SAVE_CHECKPOINT),this.scene.stage.removeChild(t.otherObject);break;case"OBJECT":this.handleObstacleCollisionEnter(t.dir)}}},{key:"modifyState",value:function(e){this.state=Object.assign(Object.assign({},this.state),e)}}]),c}();exports.PlayerMovement=v; },{"../constants/enums/messeges":"wkHK","./shift":"dSEd","../../libs/pixi-ecs":"KEu4","./player-buff":"xX/U","../constants/enums/direction":"+F+q","./slow-motion":"vxKK"}],"J4+2":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.PlayerCollider=exports.CollisionDetails=void 0;var t=require("../constants/enums/messeges"),e=i(require("../../libs/pixi-ecs")),n=require("../constants/enums/direction");function r(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(r=function(t){return t?n:e})(t)}function i(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=typeof t&&"function"!=typeof t)return{default:t};var n=r(e);if(n&&n.has(t))return n.get(t);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&Object.prototype.hasOwnProperty.call(t,s)){var a=o?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=t[s]}return i.default=t,n&&n.set(t,i),i}function o(t){return(o="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})(t)}function s(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=a(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){u=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw o}}}}function a(t,e){if(t){if("string"==typeof t)return u(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(t,e):void 0}}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);ne.x&&t.ye.y}},{key:"checkCollisionDirection",value:function(t,e){var r=e.bottom-t.y,i=t.bottom-e.y,o=t.right-e.x,s=e.right-t.x;return i10&&(t/=1e3),t||0},Object.defineProperty(n.prototype,"_enabled",{set:function(t){e.Ticker.shared.remove(this._updateListener,this),t&&e.Ticker.shared.add(this._updateListener,this)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"progress",{get:function(){return this._progress},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"paused",{get:function(){return this._paused},set:function(t){this._paused=t,this.refreshPaused()},enumerable:!0,configurable:!0}),n.prototype.destroy=function(){this.removeAllListeners(),this._internalStop(),this._gain&&(this._gain.disconnect(),this._gain=null),this._media&&(this._media.context.events.off("refresh",this.refresh,this),this._media.context.events.off("refreshPaused",this.refreshPaused,this),this._media=null),this._end=null,this._speed=1,this._volume=1,this._loop=!1,this._elapsed=0,this._duration=0,this._paused=!1,this._muted=!1,this._pausedReal=!1},n.prototype.toString=function(){return"[WebAudioInstance id="+this.id+"]"},n.prototype._now=function(){return this._media.context.audioContext.currentTime},n.prototype._updateListener=function(){this._update()},n.prototype._update=function(t){if(void 0===t&&(t=!1),this._source){var e=this._now(),n=e-this._lastUpdate;if(n>0||t){var o=this._source.playbackRate.value;this._elapsed+=n*o,this._lastUpdate=e;var i=this._duration,r=void 0;if(this._source.loopStart){var s=this._source.loopEnd-this._source.loopStart;r=(this._source.loopStart+this._elapsed%s)/i}else r=this._elapsed%i/i;this._progress=r,this.emit("progress",this._progress,i)}}},n.prototype.init=function(t){this._media=t,t.context.events.on("refresh",this.refresh,this),t.context.events.on("refreshPaused",this.refreshPaused,this)},n.prototype._internalStop=function(){this._source&&(this._enabled=!1,this._source.onended=null,this._source.stop(0),this._source.disconnect(),this._source=null)},n.prototype._onComplete=function(){this._source&&(this._enabled=!1,this._source.onended=null,this._source.disconnect()),this._source=null,this._progress=1,this.emit("progress",1,this._duration),this.emit("end",this)},n}(n.EventEmitter),g=function(t){function e(e){var n=this,o=e.audioContext,i=o.createBufferSource(),r=o.createGain(),s=o.createAnalyser();return i.connect(s),s.connect(r),r.connect(e.destination),(n=t.call(this,s,r)||this).context=e,n.bufferSource=i,n.gain=r,n.analyser=s,n}return u(e,t),Object.defineProperty(e.prototype,"script",{get:function(){return this._script||(this._script=this.context.audioContext.createScriptProcessor(e.BUFFER_SIZE),this._script.connect(this.context.destination)),this._script},enumerable:!0,configurable:!0}),e.prototype.destroy=function(){t.prototype.destroy.call(this),this.bufferSource.disconnect(),this._script&&this._script.disconnect(),this.gain.disconnect(),this.analyser.disconnect(),this.bufferSource=null,this._script=null,this.gain=null,this.analyser=null,this.context=null},e.prototype.cloneBufferSource=function(){var t=this.bufferSource,e=this.context.audioContext.createBufferSource();e.buffer=t.buffer,_.setParamValue(e.playbackRate,t.playbackRate.value),e.loop=t.loop;var n=this.context.audioContext.createGain();return e.connect(n),n.connect(this.destination),{source:e,gain:n}},Object.defineProperty(e.prototype,"bufferSize",{get:function(){return this.script.bufferSize},enumerable:!0,configurable:!0}),e.BUFFER_SIZE=0,e}(i),b=function(){function t(){}return t.prototype.init=function(t){this.parent=t,this._nodes=new g(this.context),this._source=this._nodes.bufferSource,this.source=t.options.source},t.prototype.destroy=function(){this.parent=null,this._nodes.destroy(),this._nodes=null,this._source=null,this.source=null},t.prototype.create=function(){return new m(this)},Object.defineProperty(t.prototype,"context",{get:function(){return this.parent.context},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isPlayable",{get:function(){return!!this._source&&!!this._source.buffer},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"filters",{get:function(){return this._nodes.filters},set:function(t){this._nodes.filters=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"duration",{get:function(){return this._source.buffer.duration},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"buffer",{get:function(){return this._source.buffer},set:function(t){this._source.buffer=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"nodes",{get:function(){return this._nodes},enumerable:!0,configurable:!0}),t.prototype.load=function(t){this.source?this._decode(this.source,t):this.parent.url?this._loadUrl(t):t&&t(new Error("sound.url or sound.source must be set"))},t.prototype._loadUrl=function(t){var e=this,n=new XMLHttpRequest,o=this.parent.url;n.open("GET",o,!0),n.responseType="arraybuffer",n.onload=function(){e.source=n.response,e._decode(n.response,t)},n.send()},t.prototype._decode=function(t,e){var n=this;this.parent.context.decode(t,function(t,o){if(t)e&&e(t);else{n.parent.isLoaded=!0,n.buffer=o;var i=n.parent.autoPlayStart();e&&e(null,n.parent,i)}})},t}(),v=function(t){function e(){var o=this,i=window,r=new e.AudioContext,s=r.createDynamicsCompressor(),u=r.createAnalyser();return u.connect(s),s.connect(r.destination),(o=t.call(this,u,s)||this)._ctx=r,o._offlineCtx=new e.OfflineAudioContext(1,2,i.OfflineAudioContext?r.sampleRate:44100),o._unlocked=!1,o.compressor=s,o.analyser=u,o.events=new n.EventEmitter,o.volume=1,o.speed=1,o.muted=!1,o.paused=!1,"running"!==r.state&&(o._unlock(),o._unlock=o._unlock.bind(o),document.addEventListener("mousedown",o._unlock,!0),document.addEventListener("touchstart",o._unlock,!0),document.addEventListener("touchend",o._unlock,!0)),o}return u(e,t),e.prototype._unlock=function(){this._unlocked||(this.playEmptySound(),"running"===this._ctx.state&&(document.removeEventListener("mousedown",this._unlock,!0),document.removeEventListener("touchend",this._unlock,!0),document.removeEventListener("touchstart",this._unlock,!0),this._unlocked=!0))},e.prototype.playEmptySound=function(){var t=this._ctx.createBufferSource();t.buffer=this._ctx.createBuffer(1,1,22050),t.connect(this._ctx.destination),t.start(0,0,0),"suspended"===t.context.state&&t.context.resume()},Object.defineProperty(e,"AudioContext",{get:function(){var t=window;return t.AudioContext||t.webkitAudioContext||null},enumerable:!0,configurable:!0}),Object.defineProperty(e,"OfflineAudioContext",{get:function(){var t=window;return t.OfflineAudioContext||t.webkitOfflineAudioContext||null},enumerable:!0,configurable:!0}),e.prototype.destroy=function(){t.prototype.destroy.call(this);var e=this._ctx;void 0!==e.close&&e.close(),this.events.removeAllListeners(),this.analyser.disconnect(),this.compressor.disconnect(),this.analyser=null,this.compressor=null,this.events=null,this._offlineCtx=null,this._ctx=null},Object.defineProperty(e.prototype,"audioContext",{get:function(){return this._ctx},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"offlineContext",{get:function(){return this._offlineCtx},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"paused",{get:function(){return this._paused},set:function(t){t&&"running"===this._ctx.state?this._ctx.suspend():t||"suspended"!==this._ctx.state||this._ctx.resume(),this._paused=t},enumerable:!0,configurable:!0}),e.prototype.refresh=function(){this.events.emit("refresh")},e.prototype.refreshPaused=function(){this.events.emit("refreshPaused")},e.prototype.toggleMute=function(){return this.muted=!this.muted,this.refresh(),this.muted},e.prototype.togglePause=function(){return this.paused=!this.paused,this.refreshPaused(),this._paused},e.prototype.decode=function(t,e){this._offlineCtx.decodeAudioData(t,function(t){e(null,t)},function(t){e(new Error(t.message||"Unable to decode file"))})},e}(i),P={WebAudioMedia:b,WebAudioInstance:m,WebAudioNodes:g,WebAudioContext:v,WebAudioUtils:_},x={Filter:r,EqualizerFilter:function(t){function e(n,o,i,r,s,u,a,c,h,l){void 0===n&&(n=0),void 0===o&&(o=0),void 0===i&&(i=0),void 0===r&&(r=0),void 0===s&&(s=0),void 0===u&&(u=0),void 0===a&&(a=0),void 0===c&&(c=0),void 0===h&&(h=0),void 0===l&&(l=0);var f=this;if(!p().useLegacy){var d=[{f:e.F32,type:"lowshelf",gain:n},{f:e.F64,type:"peaking",gain:o},{f:e.F125,type:"peaking",gain:i},{f:e.F250,type:"peaking",gain:r},{f:e.F500,type:"peaking",gain:s},{f:e.F1K,type:"peaking",gain:u},{f:e.F2K,type:"peaking",gain:a},{f:e.F4K,type:"peaking",gain:c},{f:e.F8K,type:"peaking",gain:h},{f:e.F16K,type:"highshelf",gain:l}].map(function(t){var e=p().context.audioContext.createBiquadFilter();return e.type=t.type,_.setParamValue(e.Q,1),e.frequency.value=t.f,_.setParamValue(e.gain,t.gain),e});(f=t.call(this,d[0],d[d.length-1])||this).bands=d,f.bandsMap={};for(var y=0;y0&&f.bands[y-1].connect(m),f.bandsMap[m.frequency.value]=m}return f}f=t.call(this,null)||this}return u(e,t),e.prototype.setGain=function(t,e){if(void 0===e&&(e=0),!this.bandsMap[t])throw new Error("No band found for frequency "+t);_.setParamValue(this.bandsMap[t].gain,e)},e.prototype.getGain=function(t){if(!this.bandsMap[t])throw new Error("No band found for frequency "+t);return this.bandsMap[t].gain.value},Object.defineProperty(e.prototype,"f32",{get:function(){return this.getGain(e.F32)},set:function(t){this.setGain(e.F32,t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"f64",{get:function(){return this.getGain(e.F64)},set:function(t){this.setGain(e.F64,t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"f125",{get:function(){return this.getGain(e.F125)},set:function(t){this.setGain(e.F125,t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"f250",{get:function(){return this.getGain(e.F250)},set:function(t){this.setGain(e.F250,t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"f500",{get:function(){return this.getGain(e.F500)},set:function(t){this.setGain(e.F500,t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"f1k",{get:function(){return this.getGain(e.F1K)},set:function(t){this.setGain(e.F1K,t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"f2k",{get:function(){return this.getGain(e.F2K)},set:function(t){this.setGain(e.F2K,t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"f4k",{get:function(){return this.getGain(e.F4K)},set:function(t){this.setGain(e.F4K,t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"f8k",{get:function(){return this.getGain(e.F8K)},set:function(t){this.setGain(e.F8K,t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"f16k",{get:function(){return this.getGain(e.F16K)},set:function(t){this.setGain(e.F16K,t)},enumerable:!0,configurable:!0}),e.prototype.reset=function(){this.bands.forEach(function(t){_.setParamValue(t.gain,0)})},e.prototype.destroy=function(){this.bands.forEach(function(t){t.disconnect()}),this.bands=null,this.bandsMap=null},e.F32=32,e.F64=64,e.F125=125,e.F250=250,e.F500=500,e.F1K=1e3,e.F2K=2e3,e.F4K=4e3,e.F8K=8e3,e.F16K=16e3,e}(r),DistortionFilter:function(t){function e(e){void 0===e&&(e=0);var n=this;if(!p().useLegacy){var o=p().context.audioContext.createWaveShaper();return(n=t.call(this,o)||this)._distortion=o,n.amount=e,n}n=t.call(this,null)||this}return u(e,t),Object.defineProperty(e.prototype,"amount",{get:function(){return this._amount},set:function(t){t*=1e3,this._amount=t;for(var e,n=new Float32Array(44100),o=Math.PI/180,i=0;i<44100;++i)e=2*i/44100-1,n[i]=(3+t)*e*20*o/(Math.PI+t*Math.abs(e));this._distortion.curve=n,this._distortion.oversample="4x"},enumerable:!0,configurable:!0}),e.prototype.destroy=function(){this._distortion=null,t.prototype.destroy.call(this)},e}(r),StereoFilter:function(t){function e(e){void 0===e&&(e=0);var n=this;if(!p().useLegacy){var o,i,r,s=p().context.audioContext;return s.createStereoPanner?r=o=s.createStereoPanner():((i=s.createPanner()).panningModel="equalpower",r=i),(n=t.call(this,r)||this)._stereo=o,n._panner=i,n.pan=e,n}n=t.call(this,null)||this}return u(e,t),Object.defineProperty(e.prototype,"pan",{get:function(){return this._pan},set:function(t){this._pan=t,this._stereo?_.setParamValue(this._stereo.pan,t):this._panner.setPosition(t,0,1-Math.abs(t))},enumerable:!0,configurable:!0}),e.prototype.destroy=function(){t.prototype.destroy.call(this),this._stereo=null,this._panner=null},e}(r),ReverbFilter:function(t){function e(e,n,o){void 0===e&&(e=3),void 0===n&&(n=2),void 0===o&&(o=!1);var i=this;if(!p().useLegacy)return(i=t.call(this,null)||this)._seconds=i._clamp(e,1,50),i._decay=i._clamp(n,0,100),i._reverse=o,i._rebuild(),i;i=t.call(this,null)||this}return u(e,t),e.prototype._clamp=function(t,e,n){return Math.min(n,Math.max(e,t))},Object.defineProperty(e.prototype,"seconds",{get:function(){return this._seconds},set:function(t){this._seconds=this._clamp(t,1,50),this._rebuild()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"decay",{get:function(){return this._decay},set:function(t){this._decay=this._clamp(t,0,100),this._rebuild()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"reverse",{get:function(){return this._reverse},set:function(t){this._reverse=t,this._rebuild()},enumerable:!0,configurable:!0}),e.prototype._rebuild=function(){for(var t,e=p().context.audioContext,n=e.sampleRate,o=n*this._seconds,i=e.createBuffer(2,o,n),r=i.getChannelData(0),s=i.getChannelData(1),u=0;u=this._end&&!this._source.loop&&this._onComplete()},n.prototype._onComplete=function(){e.Ticker.shared.remove(this._onUpdate,this),this._internalStop(),this.emit("progress",1,this._duration),this.emit("end",this)},n.prototype.destroy=function(){e.Ticker.shared.remove(this._onUpdate,this),this.removeAllListeners();var t=this._source;t&&(t.onended=null,t.onplay=null,t.onpause=null,this._internalStop()),this._source=null,this._speed=1,this._volume=1,this._loop=!1,this._end=null,this._start=0,this._duration=0,this._playing=!1,this._pausedReal=!1,this._paused=!1,this._muted=!1,this._media&&(this._media.context.off("refresh",this.refresh,this),this._media.context.off("refreshPaused",this.refreshPaused,this),this._media=null)},n.prototype.toString=function(){return"[HTMLAudioInstance id="+this.id+"]"},n.PADDING=.1,n}(n.EventEmitter),E=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.init=function(t){this.parent=t,this._source=t.options.source||new Audio,t.url&&(this._source.src=t.url)},e.prototype.create=function(){return new j(this)},Object.defineProperty(e.prototype,"isPlayable",{get:function(){return!!this._source&&4===this._source.readyState},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"duration",{get:function(){return this._source.duration},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"context",{get:function(){return this.parent.context},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"filters",{get:function(){return null},set:function(t){},enumerable:!0,configurable:!0}),e.prototype.destroy=function(){this.removeAllListeners(),this.parent=null,this._source&&(this._source.src="",this._source.load(),this._source=null)},Object.defineProperty(e.prototype,"source",{get:function(){return this._source},enumerable:!0,configurable:!0}),e.prototype.load=function(t){var e=this._source,n=this.parent;if(4!==e.readyState){if(!n.url)return t(new Error("sound.url or sound.source must be set"));e.src=n.url;var o=function(){e.removeEventListener("canplaythrough",i),e.removeEventListener("load",i),e.removeEventListener("abort",r),e.removeEventListener("error",s)},i=function(){o(),n.isLoaded=!0;var e=n.autoPlayStart();t&&t(null,n,e)},r=function(){o(),t&&t(new Error("Sound loading has been aborted"))},s=function(){o();var n="Failed to load audio element (code: "+e.error.code+")";t&&t(new Error(n))};e.addEventListener("canplaythrough",i,!1),e.addEventListener("load",i,!1),e.addEventListener("abort",r,!1),e.addEventListener("error",s,!1),e.load()}else{n.isLoaded=!0;var u=n.autoPlayStart();t&&setTimeout(function(){t(null,n,u)},0)}},e}(n.EventEmitter),w=function(t){function e(){var e=t.call(this)||this;return e.speed=1,e.volume=1,e.muted=!1,e.paused=!1,e}return u(e,t),e.prototype.refresh=function(){this.emit("refresh")},e.prototype.refreshPaused=function(){this.emit("refreshPaused")},Object.defineProperty(e.prototype,"filters",{get:function(){return null},set:function(t){},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"audioContext",{get:function(){return null},enumerable:!0,configurable:!0}),e.prototype.toggleMute=function(){return this.muted=!this.muted,this.refresh(),this.muted},e.prototype.togglePause=function(){return this.paused=!this.paused,this.refreshPaused(),this.paused},e.prototype.destroy=function(){this.removeAllListeners()},e}(n.EventEmitter),A={HTMLAudioMedia:E,HTMLAudioInstance:j,HTMLAudioContext:w},L=["mp3","ogg","oga","opus","mpeg","wav","m4a","aiff","wma","mid"],F=(h={m4a:"mp4",oga:"ogg"},l=document.createElement("audio"),f={},d=/^no$/,L.forEach(function(t){var e=h[t]||t,n=l.canPlayType("audio/"+t).replace(d,""),o=l.canPlayType("audio/"+e).replace(d,"");f[t]=!!n||!!o}),Object.freeze(f)),C=/\.(\{([^\}]+)\})(\?.*)?$/;function S(t){var e=C,n="string"==typeof t?t:t.url;if(e.test(n)){for(var o=e.exec(n),i=o[2].split(","),r=i[i.length-1],s=0,u=i.length;s-1?t.sound=p().add(t.name,{loaded:e,preload:!0,url:t.url,source:t.data}):e()},e}(),M=function(){function t(t,e){this.parent=t,Object.assign(this,e),this.duration=this.end-this.start}return t.prototype.play=function(t){return this.parent.play({complete:t,speed:this.speed||this.parent.speed,end:this.end,start:this.start,loop:this.loop})},t.prototype.destroy=function(){this.parent=null},t}(),T=function(){function t(t,e){this.media=t,this.options=e,this._instances=[],this._sprites={},this.media.init(this);var n=e.complete;this._autoPlayOptions=n?{complete:n}:null,this.isLoaded=!1,this.isPlaying=!1,this.autoPlay=e.autoPlay,this.singleInstance=e.singleInstance,this.preload=e.preload||this.autoPlay,this.url=e.url,this.speed=e.speed,this.volume=e.volume,this.loop=e.loop,e.sprites&&this.addSprites(e.sprites),this.preload&&this._preload(e.loaded)}return t.from=function(e){var n={};return"string"==typeof e?n.url=e:e instanceof ArrayBuffer||e instanceof HTMLAudioElement?n.source=e:n=e,(n=c({autoPlay:!1,singleInstance:!1,url:null,source:null,preload:!1,volume:1,speed:1,complete:null,loaded:null,loop:!1},n)).url&&(n.url=S(n.url)),Object.freeze(n),new t(p().useLegacy?new E:new b,n)},Object.defineProperty(t.prototype,"context",{get:function(){return p().context},enumerable:!0,configurable:!0}),t.prototype.pause=function(){return this.isPlaying=!1,this.paused=!0,this},t.prototype.resume=function(){return this.isPlaying=this._instances.length>0,this.paused=!1,this},Object.defineProperty(t.prototype,"paused",{get:function(){return this._paused},set:function(t){this._paused=t,this.refreshPaused()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"speed",{get:function(){return this._speed},set:function(t){this._speed=t,this.refresh()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"filters",{get:function(){return this.media.filters},set:function(t){this.media.filters=t},enumerable:!0,configurable:!0}),t.prototype.addSprites=function(t,e){if("object"==typeof t){var n={};for(var o in t)n[o]=this.addSprites(o,t[o]);return n}if("string"==typeof t){var i=new M(this,e);return this._sprites[t]=i,i}},t.prototype.destroy=function(){this._removeInstances(),this.removeSprites(),this.media.destroy(),this.media=null,this._sprites=null,this._instances=null},t.prototype.removeSprites=function(t){if(t){var e=this._sprites[t];void 0!==e&&(e.destroy(),delete this._sprites[t])}else for(var n in this._sprites)this.removeSprites(n);return this},Object.defineProperty(t.prototype,"isPlayable",{get:function(){return this.isLoaded&&this.media&&this.media.isPlayable},enumerable:!0,configurable:!0}),t.prototype.stop=function(){if(!this.isPlayable)return this.autoPlay=!1,this._autoPlayOptions=null,this;this.isPlaying=!1;for(var t=this._instances.length-1;t>=0;t--)this._instances[t].stop();return this},t.prototype.play=function(t,e){var n,o=this;if("string"==typeof t?n={sprite:r=t,loop:this.loop,complete:e}:"function"==typeof t?(n={}).complete=t:n=t,(n=c({complete:null,loaded:null,sprite:null,end:null,start:0,volume:1,speed:1,muted:!1,loop:!1},n||{})).sprite){var i=n.sprite,r=this._sprites[i];n.start=r.start,n.end=r.end,n.speed=r.speed||1,n.loop=r.loop||n.loop,delete n.sprite}if(n.offset&&(n.start=n.offset),!this.isLoaded)return new Promise(function(t,e){o.autoPlay=!0,o._autoPlayOptions=n,o._preload(function(o,i,r){o?e(o):(n.loaded&&n.loaded(o,i,r),t(r))})});this.singleInstance&&this._removeInstances();var s=this._createInstance();return this._instances.push(s),this.isPlaying=!0,s.once("end",function(){n.complete&&n.complete(o),o._onComplete(s)}),s.once("stop",function(){o._onComplete(s)}),s.play(n),s},t.prototype.refresh=function(){for(var t=this._instances.length,e=0;e=0;t--)this._poolInstance(this._instances[t]);this._instances.length=0},t.prototype._onComplete=function(t){if(this._instances){var e=this._instances.indexOf(t);e>-1&&this._instances.splice(e,1),this.isPlaying=this._instances.length>0}this._poolInstance(t)},t.prototype._createInstance=function(){if(t._pool.length>0){var e=t._pool.pop();return e.init(this.media),e}return this.media.create()},t.prototype._poolInstance=function(e){e.destroy(),t._pool.indexOf(e)<0&&t._pool.push(e)},t._pool=[],t}(),R=function(){function t(){this.init()}return t.prototype.init=function(){return this.supported&&(this._webAudioContext=new v),this._htmlAudioContext=new w,this._sounds={},this.useLegacy=!this.supported,this},Object.defineProperty(t.prototype,"context",{get:function(){return this._context},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"filtersAll",{get:function(){return this.useLegacy?[]:this._context.filters},set:function(t){this.useLegacy||(this._context.filters=t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"supported",{get:function(){return null!==v.AudioContext},enumerable:!0,configurable:!0}),t.prototype.add=function(t,e){if("object"==typeof t){var n={};for(var o in t){var i=this._getOptions(t[o],e);n[o]=this.add(o,i)}return n}if("string"==typeof t){if(e instanceof T)return this._sounds[t]=e,e;i=this._getOptions(e);var r=T.from(i);return this._sounds[t]=r,r}},t.prototype._getOptions=function(t,e){var n;return n="string"==typeof t?{url:t}:t instanceof ArrayBuffer||t instanceof HTMLAudioElement?{source:t}:t,c({},n,e||{})},Object.defineProperty(t.prototype,"useLegacy",{get:function(){return this._useLegacy},set:function(t){k.legacy=t,this._useLegacy=t,this._context=!t&&this.supported?this._webAudioContext:this._htmlAudioContext},enumerable:!0,configurable:!0}),t.prototype.remove=function(t){return this.exists(t,!0),this._sounds[t].destroy(),delete this._sounds[t],this},Object.defineProperty(t.prototype,"volumeAll",{get:function(){return this._context.volume},set:function(t){this._context.volume=t,this._context.refresh()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"speedAll",{get:function(){return this._context.speed},set:function(t){this._context.speed=t,this._context.refresh()},enumerable:!0,configurable:!0}),t.prototype.togglePauseAll=function(){return this._context.togglePause()},t.prototype.pauseAll=function(){return this._context.paused=!0,this._context.refreshPaused(),this},t.prototype.resumeAll=function(){return this._context.paused=!1,this._context.refreshPaused(),this},t.prototype.toggleMuteAll=function(){return this._context.toggleMute()},t.prototype.muteAll=function(){return this._context.muted=!0,this._context.refresh(),this},t.prototype.unmuteAll=function(){return this._context.muted=!1,this._context.refresh(),this},t.prototype.removeAll=function(){for(var t in this._sounds)this._sounds[t].destroy(),delete this._sounds[t];return this},t.prototype.stopAll=function(){for(var t in this._sounds)this._sounds[t].stop();return this},t.prototype.exists=function(t,e){return void 0===e&&(e=!1),!!this._sounds[t]},t.prototype.find=function(t){return this.exists(t,!0),this._sounds[t]},t.prototype.play=function(t,e){return this.find(t).play(e)},t.prototype.stop=function(t){return this.find(t).stop()},t.prototype.pause=function(t){return this.find(t).pause()},t.prototype.resume=function(t){return this.find(t).resume()},t.prototype.volume=function(t,e){var n=this.find(t);return void 0!==e&&(n.volume=e),n.volume},t.prototype.speed=function(t,e){var n=this.find(t);return void 0!==e&&(n.speed=e),n.speed},t.prototype.duration=function(t){return this.find(t).duration},t.prototype.close=function(){return this.removeAll(),this._sounds=null,this._webAudioContext&&(this._webAudioContext.destroy(),this._webAudioContext=null),this._htmlAudioContext&&(this._htmlAudioContext.destroy(),this._htmlAudioContext=null),this._context=null,this},t}(),G=0,I={get PLAY_ID(){return G},playOnce:function(t,e){var n="alias"+G++;return p().add(n,{url:t,preload:!0,autoPlay:!0,loaded:function(t){t&&(p().remove(n),e&&e(t))},complete:function(){p().remove(n),e&&e(null)}}),n},render:function(t,e){var n=document.createElement("canvas");e=c({width:512,height:128,fill:"black"},e||{}),n.width=e.width,n.height=e.height;var i=o.BaseTexture.from(n);if(!(t.media instanceof b))return i;var r=t.media,s=n.getContext("2d");s.fillStyle=e.fill;for(var u=r.buffer.getChannelData(0),a=Math.ceil(u.length/e.width),p=e.height/2,h=0;hf&&(f=_)}s.fillRect(h,(1+l)*p,1,Math.max(1,(f-l)*p))}return i},resolveUrl:S,sineTone:function(t,e){void 0===t&&(t=200),void 0===e&&(e=1);var n=T.from({singleInstance:!0});if(!(n.media instanceof b))return n;for(var o=n.media,i=n.context.audioContext.createBuffer(1,48e3*e,48e3),r=i.getChannelData(0),s=0;s=e.length?{done:!0}:{done:!1,value:e[s++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){a=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(a)throw i}}}}function m(e,t){if(e){if("string"==typeof e)return b(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?b(e,t):void 0}}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,s=new Array(t);n0&&(s=this.gameScene.blocks.reduce(function(e,t){return t.pos.x>e?t.pos.x:e},this.gameScene.blocks[0].pos.x)),this.mapData.blocks.map(function(e){return new r.Block(e.pos.x,e.pos.y,e.width,e.height)}).forEach(function(e){e.pos.x+=s,n.gameScene.blocks.push(e)}),this.mapData.specialEffects.map(function(e){return new o.SpecialEffect(e.type,new r.Block(e.block.pos.x,e.block.pos.y,e.block.width,e.block.height))}).forEach(function(e){e.block.pos.x+=s,n.gameScene.specialEffects.push(e)}),this.mapData.checkpoints.map(function(e){return new i.Checkpoint(new a.Position(e.pos.x,e.pos.y),e.direction)}).forEach(function(e){e.pos.x+=s,n.gameScene.checkpoints.push(e)}),t&&(this.gameScene.spawnpoint=this.mapData.spawnpoint,this.gameScene.dir=this.mapData.dir)}},{key:"loadScene",value:function(){var t=this,n=this.scene.stage.children.length;this.scene.stage.removeChildren(0,n);var s=c.default.getInstance().createPlayer(this.gameScene.spawnpoint,this.loader);this.scene.stage.addChild(s),this.dir.setDireciton(this.gameScene.dir),this.sendMessage(e.Messages.PLAYER_DIRECTION,this.dir.getDirection()),this.gameScene.blocks.forEach(function(e){var n=c.default.getInstance().createObstacle(e);t.scene.stage.addChild(n)}),this.gameScene.specialEffects.forEach(function(e){var n=c.default.getInstance().createBuff(e);t.scene.stage.addChild(n)}),this.gameScene.checkpoints.forEach(function(e){var n=c.default.getInstance().createCheckPoint(e,t.mapData.isFinalMap,t.loader);t.scene.stage.addChild(n)});for(var r=0;r0)this.score.forEach(function(n,o){if(o<10){var i=t.default.getInstance().createText(o+1+".");i.position.set(r/4-50,80+40*o),e.scene.stage.addChild(i);var c=t.default.getInstance().createText(n.score.toString());c.position.set(r-r/4,80+40*o),e.scene.stage.addChild(c);var a=t.default.getInstance().createText(n.player.toString());a.position.set(r-r/2-80,80+40*o),e.scene.stage.addChild(a)}});else{var n=t.default.getInstance().createText("No game played yet");n.position.set(r/2-115,70),this.scene.stage.addChild(n)}var o=t.default.getInstance().createText("Press ENTER to CONTINUE");o.position.set(r/2-130,500),this.scene.stage.addChild(o);var i=t.default.getInstance().createText("By Kuba Rathousky\nand Tomas Vahalik");i.position.set(0,40),this.scene.stage.addChild(i);var c=t.default.getInstance().createText("Gravity Guy");c.position.set(0,10),this.scene.stage.addChild(c)}}]),i}();exports.ScoreBoardScene=O; },{"../../../libs/pixi-ecs":"KEu4","../../block_factory/block-factory":"mWgk","../../constants/constants":"15SV"}],"ChsE":[function(require,module,exports) { "use strict";function t(r){return(t="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})(r)}function r(t,r){for(var e=0;e0){var n,i=localStorage.getItem(r.LOCALSTORAGE_SCORE);return(n=i?JSON.parse(i):[]).push(new t.Score(this.nameInput.text.substring(0,Math.min(20,this.nameInput.text.length)),this.score)),localStorage.setItem(r.LOCALSTORAGE_SCORE,JSON.stringify(n)),this.sendMessage(o.Messages.LOAD_BOARD),!0}return!1}},{key:"onRemove",value:function(){this.scene.stage.removeChildren()}},{key:"loadScene",value:function(){var e=this.scene.width,t=n.default.getInstance().createText("Your time: "+this.score);t.position.set(310,146),this.scene.stage.addChild(t),this.nameInput.x=310,this.nameInput.y=242,this.scene.stage.addChild(this.nameInput),this.nameInput.focus();var r=n.default.getInstance().createText("Press ENTER to continue");r.position.set(e/2-130,540),this.scene.stage.addChild(r)}}]),c}();exports.NameInputScene=S; },{"../../../libs/pixi-ecs":"KEu4","../../base_elements/score":"ChsE","../../block_factory/block-factory":"mWgk","../../constants/constants":"15SV","../../constants/enums/messeges":"wkHK"}],"CLNR":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LoadManager=void 0;var e=c(require("../../libs/pixi-ecs")),t=require("./scenes/game-scene"),n=require("./scenes/score-board-scene"),r=require("../constants/enums/messeges"),o=require("./scenes/name-input-scene");function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(i=function(e){return e?n:t})(e)}function c(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=i(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var c in e)if("default"!==c&&Object.prototype.hasOwnProperty.call(e,c)){var u=o?Object.getOwnPropertyDescriptor(e,c):null;u&&(u.get||u.set)?Object.defineProperty(r,c,u):r[c]=e[c]}return r.default=e,n&&n.set(e,r),r}function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n