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?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(e){return null!=e.error}).length}}]),e}(),u=exports.Message=function(){function e(n,r,o,s){t(this,e),this.data=null,this.expired=!1,this._action=n,this._component=r,this._gameObject=o,this.data=s,this.responses=new i}return r(e,[{key:"action",get:function(){return this._action}},{key:"component",get:function(){return this._component}},{key:"gameObject",get:function(){return this._gameObject}}]),e}(); },{}],"ToXV":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ComponentState=exports.Component=void 0;var e,t=require("./message");function n(e){return(n="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 o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){for(var n=0;n1&&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}(); },{}],"2GAs":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ChainComponent=void 0;var t=require("../engine/component"),e=require("../utils/query-condition"),r=require("../utils/stack"),n=require("../utils/cmd-node");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,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=u(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,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function u(t,e){if(t){if("string"==typeof t)return o(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)?o(t,e):void 0}}function o(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 s(this,o),(t=u.call(this)).scopeStack=new r.Stack,t.current=null,t.head=null,t.tail=null,t.tmpParam=null,t.tmpParam2=null,t.abortIfChecks=[],t._name=e,t}return h(o,[{key:"mergeAtBeginning",value:function(e){if(e.cmpState===t.ComponentState.RUNNING)throw new Error("Can't merge running component!");return this.head&&e.tail?(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(g,t,0===t),this}},{key:"endRepeat",value:function(){return this.enqueue(P),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(w,t),this}},{key:"endWhile",value:function(){return this.enqueue(N),this}},{key:"beginInterval",value:function(t){return this.enqueue(x,t),this}},{key:"endInterval",value:function(){return this.enqueue(I),this}},{key:"beginIf",value:function(t){return this.enqueue(q,t),this}},{key:"else",value:function(){return this.enqueue(S),this}},{key:"endIf",value:function(){return this.enqueue(O),this}},{key:"addComponent",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.enqueue(R,t,e),this}},{key:"waitFor",value:function(t){return this.enqueue(A,t),this}},{key:"waitForFirst",value:function(t){return this.enqueue(E,t),this}},{key:"waitUntil",value:function(t){return this.enqueue(U,t),this}},{key:"waitFrames",value:function(t){return this.enqueue(_,t),this}},{key:"waitTime",value:function(t){return this.enqueue(j,t),this}},{key:"waitForMessage",value:function(t){return this.enqueue(B,t),this}},{key:"waitForMessageConditional",value:function(t,e){return this.enqueue(G,t,e),this}},{key:"removeComponent",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.enqueue(F,t,e),this}},{key:"detachGameObjectsByQuery",value:function(t){return this.enqueue(T,t),this}},{key:"destroyGameObjectsByQuery",value:function(t){return this.enqueue(W,t),this}},{key:"detachGameObject",value:function(t){return this.enqueue(M,t),this}},{key:"destroyGameObject",value:function(t){return this.enqueue(Q,t),this}},{key:"addAbortCondition",value:function(t){return this.abortIfChecks.push(t),this}},{key:"onMessage",value:function(t){this.current&&(this.current.key===B&&this.current.param1===t.action||this.current.key===G&&this.current.param1===t.action&&(0,e.queryConditionCheck)(t.gameObject,this.current.param2))&&(this.tmpParam2=!0)}},{key:"onUpdate",value:function(e,r){var n,i,u,o,s,c,h,l=this;if(null!==this.owner){if(0!==this.abortIfChecks.length){var m,f=a(this.abortIfChecks);try{for(f.s();!(m=f.n()).done;){if((0,m.value)())return void this.finish()}}catch(X){f.e(X)}finally{f.f()}}if(null==this.current&&(this.current=this.dequeue()),null!=this.current)switch(this.current.key){case g:this.current.cacheParams(),this.scopeStack.push(this.current),this.gotoNextImmediately(e,r);break;case P:var d=this.scopeStack.pop();d.setParam1(d.getParam1()-1),!0===d.getParam2()||d.getParam1()>0?(this.current=d,this.onUpdate(e,r)):(d.resetCache(),this.gotoNextImmediately(e,r));break;case C:this.current.param1(this),this.gotoNextImmediately(e,r);break;case w:this.scopeStack.push(this.current),this.gotoNextImmediately(e,r);break;case N:var p=this.scopeStack.pop();p.param1()?(this.current=p,this.onUpdate(e,r)):this.gotoNextImmediately(e,r);break;case x: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 I:this.current=this.scopeStack.pop(),this.onUpdate(e,r);break;case q:if(this.current.param1()){this.gotoNextImmediately(e,r);break}for(var y=1;;)if(this.current=this.dequeue(),(null===(n=this.current)||void 0===n?void 0:n.key)===q&&y++,(null===(i=this.current)||void 0===i?void 0:i.key)===O&&y--,1===y&&(null===(u=this.current)||void 0===u?void 0:u.key)===S||0===y&&(null===(o=this.current)||void 0===o?void 0:o.key)===O){this.gotoNext();break}this.onUpdate(e,r);break;case S:for(var v=1;;)if(this.current=this.dequeue(),(null===(s=this.current)||void 0===s?void 0:s.key)===q&&v++,(null===(c=this.current)||void 0===c?void 0:c.key)===O&&v--,0===v&&(null===(h=this.current)||void 0===h?void 0:h.key)===O){this.gotoNext();break}this.onUpdate(e,r);break;case O:this.gotoNextImmediately(e,r);break;case j: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 R:(null!=this.current.getParam2()?this.current.getParam2():this.owner).addComponent(this.current.getParam1()),this.gotoNextImmediately(e,r);break;case A:var b=!this.current.cached;this.current.cached||this.current.cacheParams();var k=this.current.getParam1(),D=Array.isArray(k);b&&(D||k.cmpState!==t.ComponentState.NEW?D&&k.filter(function(e){return e.cmpState===t.ComponentState.NEW}).forEach(function(t){return l.owner.addComponentAndRun(t)}):this.owner.addComponentAndRun(k)),(!D&&k.isCompleted||D&&0===k.filter(function(e){return e._cmpState===t.ComponentState.RUNNING}).length)&&(this.current.resetCache(),this.gotoNextImmediately(e,r));break;case E:var $=!this.current.cached;this.current.cached||this.current.cacheParams();var z=this.current.getParam1();$&&z.filter(function(e){return e._cmpState===t.ComponentState.NEW}).forEach(function(t){return l.owner.addComponentAndRun(t)}),0!==z.filter(function(t){return t.isCompleted}).length&&(this.current.resetCache(),z.forEach(function(t){return t.finish()}),this.gotoNextImmediately(e,r));break;case U:this.current.param1()||this.gotoNextImmediately(e,r);break;case _:null==this.tmpParam&&(this.tmpParam=0),++this.tmpParam>this.current.param1&&(this.tmpParam=null,this.gotoNextImmediately(e,r));break;case B:case G:!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 F:var H=null!=this.current.param2?this.current.param2:this.owner;H.removeComponent(H.findComponentByName(this.current.param1)),this.gotoNextImmediately(e,r);break;case T:var J,K=a(this.scene.findObjectsByQuery(this.current.param1));try{for(K.s();!(J=K.n()).done;){J.value.detach()}}catch(X){K.e(X)}finally{K.f()}this.gotoNextImmediately(e,r);break;case W:var L,V=a(this.scene.findObjectsByQuery(this.current.param1));try{for(V.s();!(L=V.n()).done;){L.value.detach()}}catch(X){V.e(X)}finally{V.f()}this.gotoNextImmediately(e,r);break;case M:this.current.param1.detach(),this.gotoNextImmediately(e,r);break;case Q: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.CmdNode(t,e,r);null==this.head?this.head=this.tail=i:this.tail&&(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(){var t;this.current=(null===(t=this.current)||void 0===t?void 0:t.next)||null}},{key:"gotoNextImmediately",value:function(t,e){var r;this.current=(null===(r=this.current)||void 0===r?void 0:r.next)||null,this.onUpdate(t,e)}}]),o}(); },{"../engine/component":"ToXV","../utils/query-condition":"nsTS","../utils/stack":"byMe","../utils/cmd-node":"jIHf"}],"1pwq":[function(require,module,exports) { "use strict";var E;Object.defineProperty(exports,"__esModule",{value:!0}),exports.Messages=void 0,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={})); },{}],"c6lI":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Keys=exports.KeyInputComponent=void 0;var e=require("../engine/component");function t(e){return(t="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 n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){for(var n=0;n1&&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)}}]),i}(); },{"../engine/component":"ToXV"}],"oqpG":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.DebugComponent=void 0;var e=require("../engine/component"),t=require("../engine/constants"),n=require("./key-input-component");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){return a(e)||l(e,t)||u(e,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 l(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,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=(o=i.call(n)).done)&&(a.push(o.value),a.length!==t);c=!0);}catch(e){u=!0,r=e}finally{try{if(!c&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw r}}return a}}function a(e){if(Array.isArray(e))return e}function c(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=u(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,r=function(){};return{s:r,n:function(){return o>=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,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 u(e,t){if(e){if("string"==typeof e)return d(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)?d(e,t):void 0}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n=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 s(n,t){if(n){if("string"==typeof n)return c(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)?c(n,t):void 0}}function c(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}(); },{"../engine/component":"ToXV","../utils/query-condition":"nsTS"}],"q/1l":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.PointerMessages=exports.PointerInputComponent=void 0;var e,t=require("../engine/component"),n=require("../engine/message");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){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=i(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,r=function(){};return{s:r,n:function(){return o>=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 s,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,s=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw s}}}}function i(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,o=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:null;return this.messagesToSend.push(new n.Message(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}(); },{"../engine/component":"ToXV","../engine/message":"kkvE"}],"B36O":[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 r(t,e){for(var r=0;r128)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 d(t,e){if(t){if("string"==typeof t)return p(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)?p(t,e):void 0}}function p(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=f(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=f(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){var n;if(e.internalState===t.ATTACHED)throw new Error("This object has already been added to the scene: ".concat(null===(n=e.pixiObj)||void 0===n?void 0:n.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=f(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=f(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=o(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=f(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=f(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=f(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}();S.idCounter=0; },{"./component":"ToXV","../utils/flags":"B36O"}],"K3Mt":[function(require,module,exports) { "use strict";function e(e){var t=this.constructor;return this.then(function(r){return t.resolve(e()).then(function(){return r})},function(r){return t.resolve(e()).then(function(){return t.reject(r)})})}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=exports.default=e; },{}],"q3ko":[function(require,module,exports) { "use strict";function t(t){return new this(function(e,r){if(!t||void 0===t.length)return r(new TypeError(typeof t+" "+t+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var o=Array.prototype.slice.call(t);if(0===o.length)return e([]);var n=o.length;function i(t,r){if(r&&("object"==typeof r||"function"==typeof r)){var f=r.then;if("function"==typeof f)return void f.call(r,function(e){i(t,e)},function(r){o[t]={status:"rejected",reason:r},0==--n&&e(o)})}o[t]={status:"fulfilled",value:r},0==--n&&e(o)}for(var f=0;f0?1:-1}),Number.isInteger||(Number.isInteger=function(a){return"number"==typeof a&&isFinite(a)&&Math.floor(a)===a}),globalThis.ArrayBuffer||(globalThis.ArrayBuffer=Array),globalThis.Float32Array||(globalThis.Float32Array=Array),globalThis.Uint32Array||(globalThis.Uint32Array=Array),globalThis.Uint16Array||(globalThis.Uint16Array=Array),globalThis.Uint8Array||(globalThis.Uint8Array=Array),globalThis.Int32Array||(globalThis.Int32Array=Array); },{"promise-polyfill":"/Lmn","object-assign":"J4Nk"}],"UTLU":[function(require,module,exports) { "use strict";var E,_,T,N,R,A,I,O,S,L,U,P,D,M,G,C,o,t,B,F;Object.defineProperty(exports,"__esModule",{value:!0}),exports.WRAP_MODES=exports.TYPES=exports.TARGETS=exports.SCALE_MODES=exports.SAMPLER_TYPES=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.COLOR_MASK_BITS=exports.CLEAR_MODES=exports.BUFFER_TYPE=exports.BUFFER_BITS=exports.BLEND_MODES=exports.ALPHA_MODES=void 0,function(E){E[E.WEBGL_LEGACY=0]="WEBGL_LEGACY",E[E.WEBGL=1]="WEBGL",E[E.WEBGL2=2]="WEBGL2"}(E||(exports.ENV=E={})),function(E){E[E.UNKNOWN=0]="UNKNOWN",E[E.WEBGL=1]="WEBGL",E[E.CANVAS=2]="CANVAS"}(_||(exports.RENDERER_TYPE=_={})),function(E){E[E.COLOR=16384]="COLOR",E[E.DEPTH=256]="DEPTH",E[E.STENCIL=1024]="STENCIL"}(T||(exports.BUFFER_BITS=T={})),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"}(N||(exports.BLEND_MODES=N={})),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={})),function(E){E[E.RGBA=6408]="RGBA",E[E.RGB=6407]="RGB",E[E.RG=33319]="RG",E[E.RED=6403]="RED",E[E.RGBA_INTEGER=36249]="RGBA_INTEGER",E[E.RGB_INTEGER=36248]="RGB_INTEGER",E[E.RG_INTEGER=33320]="RG_INTEGER",E[E.RED_INTEGER=36244]="RED_INTEGER",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"}(A||(exports.FORMATS=A={})),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"}(I||(exports.TARGETS=I={})),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.UNSIGNED_INT=5125]="UNSIGNED_INT",E[E.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",E[E.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",E[E.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",E[E.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",E[E.BYTE=5120]="BYTE",E[E.SHORT=5122]="SHORT",E[E.INT=5124]="INT",E[E.FLOAT=5126]="FLOAT",E[E.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",E[E.HALF_FLOAT=36193]="HALF_FLOAT"}(O||(exports.TYPES=O={})),function(E){E[E.FLOAT=0]="FLOAT",E[E.INT=1]="INT",E[E.UINT=2]="UINT"}(S||(exports.SAMPLER_TYPES=S={})),function(E){E[E.NEAREST=0]="NEAREST",E[E.LINEAR=1]="LINEAR"}(L||(exports.SCALE_MODES=L={})),function(E){E[E.CLAMP=33071]="CLAMP",E[E.REPEAT=10497]="REPEAT",E[E.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"}(U||(exports.WRAP_MODES=U={})),function(E){E[E.OFF=0]="OFF",E[E.POW2=1]="POW2",E[E.ON=2]="ON",E[E.ON_MANUAL=3]="ON_MANUAL"}(P||(exports.MIPMAP_MODES=P={})),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",E[E.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA"}(D||(exports.ALPHA_MODES=D={})),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"}(M||(exports.CLEAR_MODES=M={})),function(E){E[E.AUTO=0]="AUTO",E[E.MANUAL=1]="MANUAL"}(G||(exports.GC_MODES=G={})),function(E){E.LOW="lowp",E.MEDIUM="mediump",E.HIGH="highp"}(C||(exports.PRECISION=C={})),function(E){E[E.NONE=0]="NONE",E[E.SCISSOR=1]="SCISSOR",E[E.STENCIL=2]="STENCIL",E[E.SPRITE=3]="SPRITE",E[E.COLOR=4]="COLOR"}(o||(exports.MASK_TYPES=o={})),function(E){E[E.RED=1]="RED",E[E.GREEN=2]="GREEN",E[E.BLUE=4]="BLUE",E[E.ALPHA=8]="ALPHA"}(t||(exports.COLOR_MASK_BITS=t={})),function(E){E[E.NONE=0]="NONE",E[E.LOW=2]="LOW",E[E.MEDIUM=4]="MEDIUM",E[E.HIGH=8]="HIGH"}(B||(exports.MSAA_QUALITY=B={})),function(E){E[E.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",E[E.ARRAY_BUFFER=34962]="ARRAY_BUFFER",E[E.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER"}(F||(exports.BUFFER_TYPE=F={})); },{}],"IJuH":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.settings=exports.isMobile=exports.BrowserAdapter=void 0;var e=require("@pixi/constants"),t=exports.BrowserAdapter={createCanvas:function(e,t){var i=document.createElement("canvas");return i.width=e,i.height=t,i},getWebGLRenderingContext:function(){return WebGLRenderingContext},getNavigator:function(){return navigator},getBaseUrl:function(){var e;return null!==(e=document.baseURI)&&void 0!==e?e:window.location.href},fetch:function(e,t){return fetch(e,t)}},i=/iPhone/i,n=/iPod/i,r=/iPad/i,o=/\biOS-universal(?:.+)Mac\b/i,a=/\bAndroid(?:.+)Mobile\b/i,d=/Android/i,s=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,u=/Silk/i,p=/Windows Phone/i,l=/\bWindows(?:.+)ARM\b/i,c=/BlackBerry/i,A=/BB10/i,E=/Opera Mini/i,v=/\b(CriOS|Chrome)(?:.+)Mobile/i,b=/Mobile(?:.+)Firefox\b/i,f=function(e){return void 0!==e&&"MacIntel"===e.platform&&"number"==typeof e.maxTouchPoints&&e.maxTouchPoints>1&&"undefined"==typeof MSStream};function h(e){return function(t){return t.test(e)}}function I(e){var t={userAgent:"",platform:"",maxTouchPoints:0};e||"undefined"==typeof navigator?"string"==typeof e?t.userAgent=e:e&&e.userAgent&&(t={userAgent:e.userAgent,platform:e.platform,maxTouchPoints:e.maxTouchPoints||0}):t={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0};var I=t.userAgent,M=I.split("[FBAN");void 0!==M[1]&&(I=M[0]),void 0!==(M=I.split("Twitter"))[1]&&(I=M[0]);var P=h(I),g={apple:{phone:P(i)&&!P(p),ipod:P(n),tablet:!P(i)&&(P(r)||f(t))&&!P(p),universal:P(o),device:(P(i)||P(n)||P(r)||P(o)||f(t))&&!P(p)},amazon:{phone:P(s),tablet:!P(s)&&P(u),device:P(s)||P(u)},android:{phone:!P(p)&&P(s)||!P(p)&&P(a),tablet:!P(p)&&!P(s)&&!P(a)&&(P(u)||P(d)),device:!P(p)&&(P(s)||P(u)||P(a)||P(d))||P(/\bokhttp\b/i)},windows:{phone:P(p),tablet:P(l),device:P(p)||P(l)},other:{blackberry:P(c),blackberry10:P(A),opera:P(E),firefox:P(b),chrome:P(v),device:P(c)||P(A)||P(E)||P(b)||P(v)},any:!1,phone:!1,tablet:!1};return g.any=g.apple.device||g.android.device||g.windows.device||g.other.device,g.phone=g.apple.phone||g.android.phone||g.windows.phone,g.tablet=g.apple.tablet||g.android.tablet||g.windows.tablet,g}var M=exports.isMobile=I(globalThis.navigator);function P(){return!M.apple.device}function g(e){var t=!0;if(M.tablet||M.phone){var i;if(M.apple.device)if(i=navigator.userAgent.match(/OS (\d+)_(\d+)?/))parseInt(i[1],10)<11&&(t=!1);if(M.android.device)if(i=navigator.userAgent.match(/Android\s([0-9.]*)/))parseInt(i[1],10)<7&&(t=!1)}return t?e:4}var _=exports.settings={ADAPTER:t,MIPMAP_TEXTURES:e.MIPMAP_MODES.POW2,ANISOTROPIC_LEVEL:0,RESOLUTION:1,FILTER_RESOLUTION:1,FILTER_MULTISAMPLE:e.MSAA_QUALITY.NONE,SPRITE_MAX_TEXTURES:g(32),SPRITE_BATCH_SIZE:4096,RENDER_OPTIONS:{view:null,width:800,height:600,autoDensity:!1,backgroundColor:0,backgroundAlpha:1,useContextAlpha:!0,clearBeforeRender:!0,antialias:!1,preserveDrawingBuffer:!1},GC_MODE:e.GC_MODES.AUTO,GC_MAX_IDLE:3600,GC_MAX_CHECK_COUNT:600,WRAP_MODE:e.WRAP_MODES.CLAMP,SCALE_MODE:e.SCALE_MODES.LINEAR,PRECISION_VERTEX:e.PRECISION.HIGH,PRECISION_FRAGMENT:M.apple.device?e.PRECISION.HIGH:e.PRECISION.MEDIUM,CAN_UPLOAD_SAME_BUFFER:P(),CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1}; },{"@pixi/constants":"UTLU"}],"wCSE":[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); },{}],"jYt2":[function(require,module,exports) { "use strict";module.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var o=Object.getOwnPropertySymbols(t);if(1!==o.length||o[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var n=Object.getOwnPropertyDescriptor(t,e);if(42!==n.value||!0!==n.enumerable)return!1}return!0}; },{}],"NS5K":[function(require,module,exports) { "use strict";var o="undefined"!=typeof Symbol&&Symbol,e=require("./shams");module.exports=function(){return"function"==typeof o&&("function"==typeof Symbol&&("symbol"==typeof o("foo")&&("symbol"==typeof Symbol("bar")&&e())))}; },{"./shams":"jYt2"}],"Hgl8":[function(require,module,exports) { "use strict";var o={foo:{}},t=Object;module.exports=function(){return{__proto__:o}.foo===o.foo&&!({__proto__:null}instanceof t)}; },{}],"B6/o":[function(require,module,exports) { "use strict";var t="Function.prototype.bind called on incompatible ",n=Array.prototype.slice,o=Object.prototype.toString,r="[object Function]";module.exports=function(e){var p=this;if("function"!=typeof p||o.call(p)!==r)throw new TypeError(t+p);for(var i,c=n.call(arguments,1),a=Math.max(0,p.length-c.length),l=[],u=0;u1&&"boolean"!=typeof e)throw new o('"allowMissing" argument must be a boolean');if(null===F(/^%?[^%]*%?$/,r))throw new t("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=v(r),y=n.length>0?n[0]:"",p=R("%"+y+"%",e),i=p.name,f=p.value,c=!1,l=p.alias;l&&(y=l[0],E(n,S([0,1],l)));for(var u=1,A=!0;u=n.length){var h=a(f,d);f=(A=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:f[d]}else A=m(f,d),f=f[d];A&&!c&&(s[i]=f)}}return f}; },{"has-symbols":"NS5K","has-proto":"Hgl8","function-bind":"58Ti","has":"ar57"}],"y9YS":[function(require,module,exports) { "use strict";var e=require("function-bind"),t=require("get-intrinsic"),r=t("%Function.prototype.apply%"),n=t("%Function.prototype.call%"),l=t("%Reflect.apply%",!0)||e.call(n,r),o=t("%Object.getOwnPropertyDescriptor%",!0),p=t("%Object.defineProperty%",!0),u=t("%Math.max%");if(p)try{p({},"a",{value:1})}catch(c){p=null}module.exports=function(t){var r=l(e,n,arguments);o&&p&&(o(r,"length").configurable&&p(r,"length",{value:1+u(0,t.length-(arguments.length-1))}));return r};var a=function(){return l(e,r,arguments)};p?p(module.exports,"apply",{value:a}):module.exports.apply=a; },{"function-bind":"58Ti","get-intrinsic":"LiLl"}],"tAi/":[function(require,module,exports) { "use strict";var r=require("get-intrinsic"),t=require("./"),e=t(r("String.prototype.indexOf"));module.exports=function(i,n){var o=r(i,!!n);return"function"==typeof o&&e(i,".prototype.")>-1?t(o):o}; },{"get-intrinsic":"LiLl","./":"y9YS"}],"f88W":[function(require,module,exports) { },{}],"d9qy":[function(require,module,exports) { var t="function"==typeof Map&&Map.prototype,e=Object.getOwnPropertyDescriptor&&t?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,r=t&&e&&"function"==typeof e.get?e.get:null,n=t&&Map.prototype.forEach,o="function"==typeof Set&&Set.prototype,i=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,u=o&&i&&"function"==typeof i.get?i.get:null,c=o&&Set.prototype.forEach,l="function"==typeof WeakMap&&WeakMap.prototype,a=l?WeakMap.prototype.has:null,f="function"==typeof WeakSet&&WeakSet.prototype,p=f?WeakSet.prototype.has:null,y="function"==typeof WeakRef&&WeakRef.prototype,g=y?WeakRef.prototype.deref:null,b=Boolean.prototype.valueOf,s=Object.prototype.toString,S=Function.prototype.toString,h=String.prototype.match,m=String.prototype.slice,v=String.prototype.replace,d=String.prototype.toUpperCase,j=String.prototype.toLowerCase,O=RegExp.prototype.test,w=Array.prototype.concat,x=Array.prototype.join,k=Array.prototype.slice,E=Math.floor,M="function"==typeof BigInt?BigInt.prototype.valueOf:null,W=Object.getOwnPropertySymbols,_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,L="function"==typeof Symbol&&"object"==typeof Symbol.iterator,$="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===L||"symbol")?Symbol.toStringTag:null,q=Object.prototype.propertyIsEnumerable,A=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function T(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||O.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var n=t<0?-E(-t):E(t);if(n!==t){var o=String(n),i=m.call(e,o.length+1);return v.call(o,r,"$&_")+"."+v.call(v.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return v.call(e,r,"$&_")}var I=require("./util.inspect"),N=I.custom,P=J(N)?N:null;function R(t,e,r){var n="double"===(r.quoteStyle||e)?'"':"'";return n+t+n}function D(t){return v.call(String(t),/"/g,""")}function B(t){return!("[object Array]"!==X(t)||$&&"object"==typeof t&&$ in t)}function C(t){return!("[object Date]"!==X(t)||$&&"object"==typeof t&&$ in t)}function z(t){return!("[object RegExp]"!==X(t)||$&&"object"==typeof t&&$ in t)}function F(t){return!("[object Error]"!==X(t)||$&&"object"==typeof t&&$ in t)}function H(t){return!("[object String]"!==X(t)||$&&"object"==typeof t&&$ in t)}function U(t){return!("[object Number]"!==X(t)||$&&"object"==typeof t&&$ in t)}function G(t){return!("[object Boolean]"!==X(t)||$&&"object"==typeof t&&$ in t)}function J(t){if(L)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!_)return!1;try{return _.call(t),!0}catch(e){}return!1}function K(t){if(!t||"object"!=typeof t||!M)return!1;try{return M.call(t),!0}catch(e){}return!1}module.exports=function t(e,o,i,l){var a=o||{};if(V(a,"quoteStyle")&&"single"!==a.quoteStyle&&"double"!==a.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(V(a,"maxStringLength")&&("number"==typeof a.maxStringLength?a.maxStringLength<0&&a.maxStringLength!==1/0:null!==a.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var f=!V(a,"customInspect")||a.customInspect;if("boolean"!=typeof f&&"symbol"!==f)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(V(a,"indent")&&null!==a.indent&&"\t"!==a.indent&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(V(a,"numericSeparator")&&"boolean"!=typeof a.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var p=a.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return ut(e,a);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var y=String(e);return p?T(e,y):y}if("bigint"==typeof e){var g=String(e)+"n";return p?T(e,g):g}var s=void 0===a.depth?5:a.depth;if(void 0===i&&(i=0),i>=s&&s>0&&"object"==typeof e)return B(e)?"[Array]":"[Object]";var S=yt(a,i);if(void 0===l)l=[];else if(Z(l,e)>=0)return"[Circular]";function h(e,r,n){if(r&&(l=k.call(l)).push(r),n){var o={depth:a.depth};return V(a,"quoteStyle")&&(o.quoteStyle=a.quoteStyle),t(e,o,i+1,l)}return t(e,a,i+1,l)}if("function"==typeof e&&!z(e)){var d=Y(e),O=bt(e,h);return"[Function"+(d?": "+d:" (anonymous)")+"]"+(O.length>0?" { "+x.call(O,", ")+" }":"")}if(J(e)){var E=L?v.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):_.call(e);return"object"!=typeof e||L?E:lt(E)}if(it(e)){for(var W="<"+j.call(String(e.nodeName)),N=e.attributes||[],Q=0;Q"}if(B(e)){if(0===e.length)return"[]";var ct=bt(e,h);return S&&!pt(ct)?"["+gt(ct,S)+"]":"[ "+x.call(ct,", ")+" ]"}if(F(e)){var st=bt(e,h);return"cause"in Error.prototype||!("cause"in e)||q.call(e,"cause")?0===st.length?"["+String(e)+"]":"{ ["+String(e)+"] "+x.call(st,", ")+" }":"{ ["+String(e)+"] "+x.call(w.call("[cause]: "+h(e.cause),st),", ")+" }"}if("object"==typeof e&&f){if(P&&"function"==typeof e[P]&&I)return I(e,{depth:s-i});if("symbol"!==f&&"function"==typeof e.inspect)return e.inspect()}if(tt(e)){var St=[];return n&&n.call(e,function(t,r){St.push(h(r,e,!0)+" => "+h(t,e))}),ft("Map",r.call(e),St,S)}if(nt(e)){var ht=[];return c&&c.call(e,function(t){ht.push(h(t,e))}),ft("Set",u.call(e),ht,S)}if(et(e))return at("WeakMap");if(ot(e))return at("WeakSet");if(rt(e))return at("WeakRef");if(U(e))return lt(h(Number(e)));if(K(e))return lt(h(M.call(e)));if(G(e))return lt(b.call(e));if(H(e))return lt(h(String(e)));if(!C(e)&&!z(e)){var mt=bt(e,h),vt=A?A(e)===Object.prototype:e instanceof Object||e.constructor===Object,dt=e instanceof Object?"":"null prototype",jt=!vt&&$&&Object(e)===e&&$ in e?m.call(X(e),8,-1):dt?"Object":"",Ot=(vt||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(jt||dt?"["+x.call(w.call([],jt||[],dt||[]),": ")+"] ":"");return 0===mt.length?Ot+"{}":S?Ot+"{"+gt(mt,S)+"}":Ot+"{ "+x.call(mt,", ")+" }"}return String(e)};var Q=Object.prototype.hasOwnProperty||function(t){return t in this};function V(t,e){return Q.call(t,e)}function X(t){return s.call(t)}function Y(t){if(t.name)return t.name;var e=h.call(S.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function Z(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;re.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return ut(m.call(t,0,e.maxStringLength),e)+n}return R(v.call(v.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,ct),"single",e)}function ct(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+d.call(e.toString(16))}function lt(t){return"Object("+t+")"}function at(t){return t+" { ? }"}function ft(t,e,r,n){return t+" ("+e+") {"+(n?gt(r,n):x.call(r,", "))+"}"}function pt(t){for(var e=0;e=0)return!1;return!0}function yt(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=x.call(Array(t.indent+1)," ")}return{base:r,prev:x.call(Array(e+1),r)}}function gt(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+x.call(t,","+r)+"\n"+e.prev}function bt(t,e){var r=B(t),n=[];if(r){n.length=t.length;for(var o=0;o1;){var e=r.pop(),o=e.obj[e.prop];if(t(o)){for(var n=[],c=0;c=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122||u===r.RFC1738&&(40===i||41===i)?p+=f.charAt(a):i<128?p+=o[i]:i<2048?p+=o[192|i>>6]+o[128|63&i]:i<55296||i>=57344?p+=o[224|i>>12]+o[128|i>>6&63]+o[128|63&i]:(a+=1,i=65536+((1023&i)<<10|1023&f.charCodeAt(a)),p+=o[240|i>>18]+o[128|i>>12&63]+o[128|i>>6&63]+o[128|63&i])}return p},i=function(r){for(var e=[{obj:{o:r},prop:"o"}],t=[],o=0;o0?O.join(",")||null:void 0}];else if(i(m))E=m;else{var z=Object.keys(O);E=v?z.sort(v):z}for(var H=f&&i(O)&&1===O.length?n+"[]":n,Q=0;Q0?g+b:""}; },{"side-channel":"iGu9","./utils":"lcoA","./formats":"vn5D"}],"wY+C":[function(require,module,exports) { "use strict";var e=require("./utils"),r=Object.prototype.hasOwnProperty,t=Array.isArray,i={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:e.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},o=function(e){return e.replace(/&#(\d+);/g,function(e,r){return String.fromCharCode(parseInt(r,10))})},a=function(e,r){return e&&"string"==typeof e&&r.comma&&e.indexOf(",")>-1?e.split(","):e},n="utf8=%26%2310003%3B",l="utf8=%E2%9C%93",c=function(c,s){var p,d={__proto__:null},u=s.ignoreQueryPrefix?c.replace(/^\?/,""):c,f=s.parameterLimit===1/0?void 0:s.parameterLimit,m=u.split(s.delimiter,f),y=-1,h=s.charset;if(s.charsetSentinel)for(p=0;p-1&&(g=t(g)?[g]:g),r.call(d,b)?d[b]=e.combine(d[b],g):d[b]=g}return d},s=function(e,r,t,i){for(var o=i?r:a(r,t),n=e.length-1;n>=0;--n){var l,c=e[n];if("[]"===c&&t.parseArrays)l=[].concat(o);else{l=t.plainObjects?Object.create(null):{};var s="["===c.charAt(0)&&"]"===c.charAt(c.length-1)?c.slice(1,-1):c,p=parseInt(s,10);t.parseArrays||""!==s?!isNaN(p)&&c!==s&&String(p)===s&&p>=0&&t.parseArrays&&p<=t.arrayLimit?(l=[])[p]=o:"__proto__"!==s&&(l[s]=o):l={0:o}}o=l}return o},p=function(e,t,i,o){if(e){var a=i.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,n=/(\[[^[\]]*])/g,l=i.depth>0&&/(\[[^[\]]*])/.exec(a),c=l?a.slice(0,l.index):a,p=[];if(c){if(!i.plainObjects&&r.call(Object.prototype,c)&&!i.allowPrototypes)return;p.push(c)}for(var d=0;i.depth>0&&null!==(l=n.exec(a))&&d",'"',"`"," ","\r","\n","\t"],o=["{","}","|","\\","^","`"].concat(r),n=["'"].concat(o),i=["%","/","?",";","#"].concat(n),l=["/","?","#"],p=255,c=/^[+a-z0-9A-Z_-]{0,63}$/,f=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,u={javascript:!0,"javascript:":!0},m={javascript:!0,"javascript:":!0},v={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=require("qs");function g(t,h,e){if(t&&"object"==typeof t&&t instanceof s)return t;var a=new s;return a.parse(t,h,e),a}function b(t){return"string"==typeof t&&(t=g(t)),t instanceof s?t.format():s.prototype.format.call(t)}function q(t,s){return g(t,!1,!0).resolve(s)}function x(t,s){return t?g(t,!1,!0).resolveObject(s):s}s.prototype.parse=function(s,e,r){if("string"!=typeof s)throw new TypeError("Parameter 'url' must be a string, not "+typeof s);var o=s.indexOf("?"),g=-1!==o&&o127?H+="x":H+=z[L];if(!H.match(c)){var Z=R.slice(0,w),_=R.slice(w+1),E=z.match(f);E&&(Z.push(E[1]),_.unshift(E[2])),_.length&&(q="/"+_.join(".")+q),this.hostname=Z.join(".");break}}}this.hostname.length>p?this.hostname="":this.hostname=this.hostname.toLowerCase(),U||(this.hostname=t.toASCII(this.hostname));var F=this.port?":"+this.port:"",Q=this.hostname||"";this.host=Q+F,this.href+=this.host,U&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==q[0]&&(q="/"+q))}if(!u[j])for(w=0,$=n.length;w<$;w++){var S=n[w];if(-1!==q.indexOf(S)){var T=encodeURIComponent(S);T===S&&(T=escape(S)),q=q.split(S).join(T)}}var B=q.indexOf("#");-1!==B&&(this.hash=q.substr(B),q=q.slice(0,B));var D=q.indexOf("?");if(-1!==D?(this.search=q.substr(D),this.query=q.substr(D+1),e&&(this.query=y.parse(this.query)),q=q.slice(0,D)):e&&(this.search="",this.query={}),q&&(this.pathname=q),v[j]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){F=this.pathname||"";var G=this.search||"";this.path=F+G}return this.href=this.format(),this},s.prototype.format=function(){var t=this.auth||"";t&&(t=(t=encodeURIComponent(t)).replace(/%3A/i,":"),t+="@");var s=this.protocol||"",h=this.pathname||"",e=this.hash||"",a=!1,r="";this.host?a=t+this.host:this.hostname&&(a=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(a+=":"+this.port)),this.query&&"object"==typeof this.query&&Object.keys(this.query).length&&(r=y.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var o=this.search||r&&"?"+r||"";return s&&":"!==s.substr(-1)&&(s+=":"),this.slashes||(!s||v[s])&&!1!==a?(a="//"+(a||""),h&&"/"!==h.charAt(0)&&(h="/"+h)):a||(a=""),e&&"#"!==e.charAt(0)&&(e="#"+e),o&&"?"!==o.charAt(0)&&(o="?"+o),s+a+(h=h.replace(/[?#]/g,function(t){return encodeURIComponent(t)}))+(o=o.replace("#","%23"))+e},s.prototype.resolve=function(t){return this.resolveObject(g(t,!1,!0)).format()},s.prototype.resolveObject=function(t){if("string"==typeof t){var h=new s;h.parse(t,!1,!0),t=h}for(var e=new s,a=Object.keys(this),r=0;r0)&&e.host.split("@"))&&(e.auth=k.shift(),e.hostname=k.shift(),e.host=e.hostname);return e.search=t.search,e.query=t.query,null===e.pathname&&null===e.search||(e.path=(e.pathname?e.pathname:"")+(e.search?e.search:"")),e.href=e.format(),e}if(!j.length)return e.pathname=null,e.search?e.path="/"+e.search:e.path=null,e.href=e.format(),e;for(var A=j.slice(-1)[0],C=(e.host||t.host||j.length>1)&&("."===A||".."===A)||""===A,I=0,w=j.length;w>=0;w--)"."===(A=j[w])?j.splice(w,1):".."===A?(j.splice(w,1),I++):I&&(j.splice(w,1),I--);if(!x&&!d)for(;I--;I)j.unshift("..");!x||""===j[0]||j[0]&&"/"===j[0].charAt(0)||j.unshift(""),C&&"/"!==j.join("/").substr(-1)&&j.push("");var k,U=""===j[0]||j[0]&&"/"===j[0].charAt(0);O&&(e.hostname=U?"":j.length?j.shift():"",e.host=e.hostname,(k=!!(e.host&&e.host.indexOf("@")>0)&&e.host.split("@"))&&(e.auth=k.shift(),e.hostname=k.shift(),e.host=e.hostname));return(x=x||e.host&&j.length)&&!U&&j.unshift(""),j.length>0?e.pathname=j.join("/"):(e.pathname=null,e.path=null),null===e.pathname&&null===e.search||(e.path=(e.pathname?e.pathname:"")+(e.search?e.search:"")),e.auth=t.auth||e.auth,e.slashes=e.slashes||t.slashes,e.href=e.format(),e},s.prototype.parseHost=function(){var t=this.host,s=e.exec(t);s&&(":"!==(s=s[0])&&(this.port=s.substr(1)),t=t.substr(0,t.length-s.length)),t&&(this.hostname=t)},exports.parse=g,exports.resolve=q,exports.resolveObject=x,exports.format=b,exports.Url=s; },{"punycode":"FIMm","qs":"wGDy"}],"+k8Z":[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=Nr,exports.correctBlendMode=dr,exports.createIndicesForQuads=br,exports.decomposeDataUri=Ur,exports.deprecation=_r,exports.destroyTextureCache=Rr,exports.determineCrossOrigin=Fr,Object.defineProperty(exports,"earcut",{enumerable:!0,get:function(){return r.default}}),exports.getBufferType=vr,exports.getResolutionOfUrl=jr,exports.hex2rgb=ar,exports.hex2string=fr,exports.interleaveTypedArrays=mr,Object.defineProperty(exports,"isMobile",{enumerable:!0,get:function(){return e.isMobile}}),exports.isPow2=Ar,exports.isWebGLSupported=x,exports.log2=Er,exports.nextPow2=yr,exports.premultiplyBlendMode=exports.path=void 0,exports.premultiplyRgba=hr,exports.premultiplyTint=gr,exports.premultiplyTintToRgba=pr,exports.removeItems=wr,exports.rgb2hex=sr,exports.sayHello=v,exports.sign=Pr,exports.skipHello=b,exports.string2hex=lr,exports.trimCanvas=Sr,exports.uid=Dr,exports.url=void 0;var e=require("@pixi/settings"),t=i(require("eventemitter3")),r=i(require("earcut")),n=require("url"),o=require("@pixi/constants");function i(e){return e&&e.__esModule?e:{default:e}}var a=exports.url={parse:n.parse,format:n.format,resolve:n.resolve};function f(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function l(e){return e.split("?")[0].split("#")[0]}function s(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function c(e,t,r){return e.replace(new RegExp(s(t),"g"),r)}function u(e,t){for(var r,n="",o=0,i=-1,a=0,f=0;f<=e.length;++f){if(f2){var l=n.lastIndexOf("/");if(l!==n.length-1){-1===l?(n="",o=0):o=(n=n.slice(0,l)).length-1-n.lastIndexOf("/"),i=f,a=0;continue}}else if(2===n.length||1===n.length){n="",o=0,i=f,a=0;continue}t&&(n.length>0?n+="/..":n="..",o=2)}else n.length>0?n+="/"+e.slice(i+1,f):n=e.slice(i+1,f),o=f-i-1;i=f,a=0}else 46===r&&-1!==a?++a:a=-1}return n}var d=exports.path={toPosix:function(e){return c(e,"\\","/")},isUrl:function(e){return/^https?:/.test(this.toPosix(e))},isDataUrl:function(e){return/^data:([a-z]+\/[a-z0-9-+.]+(;[a-z0-9-.!#$%*+.{}|~`]+=[a-z0-9-.!#$%*+.{}()_|~`]+)*)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s<>]*?)$/i.test(e)},hasProtocol:function(e){return/^[^/:]+:\//.test(this.toPosix(e))},getProtocol:function(e){f(e),e=this.toPosix(e);var t="",r=/^file:\/\/\//.exec(e),n=/^[^/:]+:\/\//.exec(e),o=/^[^/:]+:\//.exec(e);if(r||n||o){var i=(null==r?void 0:r[0])||(null==n?void 0:n[0])||(null==o?void 0:o[0]);t=i,e=e.slice(i.length)}return t},toAbsolute:function(t,r,n){if(this.isDataUrl(t))return t;var o=l(this.toPosix(null!=r?r:e.settings.ADAPTER.getBaseUrl())),i=l(this.toPosix(null!=n?n:this.rootname(o)));return f(t),(t=this.toPosix(t)).startsWith("/")?d.join(i,t.slice(1)):this.isAbsolute(t)?t:this.join(o,t)},normalize:function(e){if(f(e=this.toPosix(e)),0===e.length)return".";var t="",r=e.startsWith("/");this.hasProtocol(e)&&(t=this.rootname(e),e=e.slice(t.length));var n=e.endsWith("/");return(e=u(e,!1)).length>0&&n&&(e+="/"),r?"/"+e:t+e},isAbsolute:function(e){return f(e),e=this.toPosix(e),!!this.hasProtocol(e)||e.startsWith("/")},join:function(){for(var e,t,r=arguments,n=[],o=0;o0)if(void 0===t)t=a;else{var l=null!==(e=n[i-1])&&void 0!==e?e:"";this.extname(l)?t+="/../"+a:t+="/"+a}}return void 0===t?".":this.normalize(t)},dirname:function(e){if(f(e),0===e.length)return".";for(var t=(e=this.toPosix(e)).charCodeAt(0),r=47===t,n=-1,o=!0,i=this.getProtocol(e),a=e,l=(e=e.slice(i.length)).length-1;l>=1;--l)if(47===(t=e.charCodeAt(l))){if(!o){n=l;break}}else o=!1;return-1===n?r?"/":this.isUrl(a)?i+e:i:r&&1===n?"//":i+e.slice(0,n)},rootname:function(e){f(e);var t="";if(t=(e=this.toPosix(e)).startsWith("/")?"/":this.getProtocol(e),this.isUrl(e)){var r=e.indexOf("/",t.length);(t=-1!==r?e.slice(0,r):e).endsWith("/")||(t+="/")}return t},basename:function(e,t){f(e),t&&f(t),e=this.toPosix(e);var r,n=0,o=-1,i=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var a=t.length-1,l=-1;for(r=e.length-1;r>=0;--r){var s=e.charCodeAt(r);if(47===s){if(!i){n=r+1;break}}else-1===l&&(i=!1,l=r+1),a>=0&&(s===t.charCodeAt(a)?-1==--a&&(o=r):(a=-1,o=l))}return n===o?o=l:-1===o&&(o=e.length),e.slice(n,o)}for(r=e.length-1;r>=0;--r)if(47===e.charCodeAt(r)){if(!i){n=r+1;break}}else-1===o&&(i=!1,o=r+1);return-1===o?"":e.slice(n,o)},extname:function(e){f(e);for(var t=-1,r=0,n=-1,o=!0,i=0,a=(e=this.toPosix(e)).length-1;a>=0;--a){var l=e.charCodeAt(a);if(47!==l)-1===n&&(o=!1,n=a+1),46===l?-1===t?t=a:1!==i&&(i=1):-1!==t&&(i=-1);else if(!o){r=a+1;break}}return-1===t||-1===n||0===i||1===i&&t===n-1&&t===r+1?"":e.slice(t,n)},parse:function(e){f(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var r,n=(e=this.toPosix(e)).charCodeAt(0),o=this.isAbsolute(e);t.root=this.rootname(e),r=o||this.hasProtocol(e)?1:0;for(var i=-1,a=0,l=-1,s=!0,c=e.length-1,u=0;c>=r;--c)if(47!==(n=e.charCodeAt(c)))-1===l&&(s=!1,l=c+1),46===n?-1===i?i=c:1!==u&&(u=1):-1!==i&&(u=-1);else if(!s){a=c+1;break}return-1===i||-1===l||0===u||1===u&&i===l-1&&i===a+1?-1!==l&&(t.base=t.name=0===a&&o?e.slice(1,l):e.slice(a,l)):(0===a&&o?(t.name=e.slice(1,i),t.base=e.slice(1,l)):(t.name=e.slice(a,i),t.base=e.slice(a,l)),t.ext=e.slice(i,l)),t.dir=this.dirname(e),t},sep:"/",delimiter:":"};e.settings.RETINA_PREFIX=/@([0-9\.]+)x/,e.settings.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var h,g=!1,p="6.5.10";function b(){g=!0}function v(t){var r;if(!g){if(e.settings.ADAPTER.getNavigator().userAgent.toLowerCase().indexOf("chrome")>-1){var n=["\n %c %c %c PixiJS "+p+" - ✰ "+t+" ✰ %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;"];(r=globalThis.console).log.apply(r,n)}else globalThis.console&&globalThis.console.log("PixiJS "+p+" - "+t+" - http://www.pixijs.com/");g=!0}}function x(){return void 0===h&&(h=function(){var t={stencil:!0,failIfMajorPerformanceCaveat:e.settings.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!e.settings.ADAPTER.getWebGLRenderingContext())return!1;var r=e.settings.ADAPTER.createCanvas(),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}}()),h}var m="#f0f8ff",y="#faebd7",A="#00ffff",E="#7fffd4",w="#f0ffff",P="#f5f5dc",k="#ffe4c4",D="#000000",C="#ffebcd",_="#0000ff",M="#8a2be2",T="#a52a2a",O="#deb887",R="#5f9ea0",N="#7fff00",L="#d2691e",S="#ff7f50",B="#6495ed",I="#fff8dc",U="#dc143c",F="#00ffff",j="#00008b",q="#008b8b",W="#b8860b",z="#a9a9a9",J="#006400",$="#a9a9a9",G="#bdb76b",Y="#8b008b",H="#556b2f",V="#ff8c00",X="#9932cc",Q="#8b0000",K="#e9967a",Z="#8fbc8f",ee="#483d8b",te="#2f4f4f",re="#2f4f4f",ne="#00ced1",oe="#9400d3",ie="#ff1493",ae="#00bfff",fe="#696969",le="#696969",se="#1e90ff",ce="#b22222",ue="#fffaf0",de="#228b22",he="#ff00ff",ge="#dcdcdc",pe="#f8f8ff",be="#daa520",ve="#ffd700",xe="#808080",me="#008000",ye="#adff2f",Ae="#808080",Ee="#f0fff0",we="#ff69b4",Pe="#cd5c5c",ke="#4b0082",De="#fffff0",Ce="#f0e68c",_e="#fff0f5",Me="#e6e6fa",Te="#7cfc00",Oe="#fffacd",Re="#add8e6",Ne="#f08080",Le="#e0ffff",Se="#fafad2",Be="#d3d3d3",Ie="#90ee90",Ue="#d3d3d3",Fe="#ffb6c1",je="#ffa07a",qe="#20b2aa",We="#87cefa",ze="#778899",Je="#778899",$e="#b0c4de",Ge="#ffffe0",Ye="#00ff00",He="#32cd32",Ve="#faf0e6",Xe="#ff00ff",Qe="#800000",Ke="#66cdaa",Ze="#0000cd",et="#ba55d3",tt="#9370db",rt="#3cb371",nt="#7b68ee",ot="#00fa9a",it="#48d1cc",at="#c71585",ft="#191970",lt="#f5fffa",st="#ffe4e1",ct="#ffe4b5",ut="#ffdead",dt="#000080",ht="#fdf5e6",gt="#808000",pt="#6b8e23",bt="#ffa500",vt="#ff4500",xt="#da70d6",mt="#eee8aa",yt="#98fb98",At="#afeeee",Et="#db7093",wt="#ffefd5",Pt="#ffdab9",kt="#cd853f",Dt="#ffc0cb",Ct="#dda0dd",_t="#b0e0e6",Mt="#800080",Tt="#663399",Ot="#ff0000",Rt="#bc8f8f",Nt="#4169e1",Lt="#8b4513",St="#fa8072",Bt="#f4a460",It="#2e8b57",Ut="#fff5ee",Ft="#a0522d",jt="#c0c0c0",qt="#87ceeb",Wt="#6a5acd",zt="#708090",Jt="#708090",$t="#fffafa",Gt="#00ff7f",Yt="#4682b4",Ht="#d2b48c",Vt="#008080",Xt="#d8bfd8",Qt="#ff6347",Kt="#40e0d0",Zt="#ee82ee",er="#f5deb3",tr="#ffffff",rr="#f5f5f5",nr="#ffff00",or="#9acd32",ir={aliceblue:m,antiquewhite:y,aqua:A,aquamarine:E,azure:w,beige:P,bisque:k,black:D,blanchedalmond:C,blue:_,blueviolet:M,brown:T,burlywood:O,cadetblue:R,chartreuse:N,chocolate:L,coral:S,cornflowerblue:B,cornsilk:I,crimson:U,cyan:F,darkblue:j,darkcyan:q,darkgoldenrod:W,darkgray:z,darkgreen:J,darkgrey:$,darkkhaki:G,darkmagenta:Y,darkolivegreen:H,darkorange:V,darkorchid:X,darkred:Q,darksalmon:K,darkseagreen:Z,darkslateblue:ee,darkslategray:te,darkslategrey:re,darkturquoise:ne,darkviolet:oe,deeppink:ie,deepskyblue:ae,dimgray:fe,dimgrey:le,dodgerblue:se,firebrick:ce,floralwhite:ue,forestgreen:de,fuchsia:he,gainsboro:ge,ghostwhite:pe,goldenrod:be,gold:ve,gray:xe,green:me,greenyellow:ye,grey:Ae,honeydew:Ee,hotpink:we,indianred:Pe,indigo:ke,ivory:De,khaki:Ce,lavenderblush:_e,lavender:Me,lawngreen:Te,lemonchiffon:Oe,lightblue:Re,lightcoral:Ne,lightcyan:Le,lightgoldenrodyellow:Se,lightgray:Be,lightgreen:Ie,lightgrey:Ue,lightpink:Fe,lightsalmon:je,lightseagreen:qe,lightskyblue:We,lightslategray:ze,lightslategrey:Je,lightsteelblue:$e,lightyellow:Ge,lime:Ye,limegreen:He,linen:Ve,magenta:Xe,maroon:Qe,mediumaquamarine:Ke,mediumblue:Ze,mediumorchid:et,mediumpurple:tt,mediumseagreen:rt,mediumslateblue:nt,mediumspringgreen:ot,mediumturquoise:it,mediumvioletred:at,midnightblue:ft,mintcream:lt,mistyrose:st,moccasin:ct,navajowhite:ut,navy:dt,oldlace:ht,olive:gt,olivedrab:pt,orange:bt,orangered:vt,orchid:xt,palegoldenrod:mt,palegreen:yt,paleturquoise:At,palevioletred:Et,papayawhip:wt,peachpuff:Pt,peru:kt,pink:Dt,plum:Ct,powderblue:_t,purple:Mt,rebeccapurple:Tt,red:Ot,rosybrown:Rt,royalblue:Nt,saddlebrown:Lt,salmon:St,sandybrown:Bt,seagreen:It,seashell:Ut,sienna:Ft,silver:jt,skyblue:qt,slateblue:Wt,slategray:zt,slategrey:Jt,snow:$t,springgreen:Gt,steelblue:Yt,tan:Ht,teal:Vt,thistle:Xt,tomato:Qt,turquoise:Kt,violet:Zt,wheat:er,white:tr,whitesmoke:rr,yellow:nr,yellowgreen:or};function ar(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 fr(e){var t=e.toString(16);return"#"+(t="000000".substring(0,6-t.length)+t)}function lr(e){return"string"==typeof e&&"#"===(e=ir[e.toLowerCase()]||e)[0]&&(e=e.slice(1)),parseInt(e,16)}function sr(e){return(255*e[0]<<16)+(255*e[1]<<8)+(255*e[2]|0)}function cr(){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 ur=exports.premultiplyBlendMode=cr();function dr(e,t){return ur[t?1:0][e]}function hr(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 gr(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 pr(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 br(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 Ar(e){return!(e&e-1||!e)}function Er(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 wr(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&&it.right?t.right:this.right)<=s)return!1;var h=this.yt.bottom?t.bottom:this.bottom)>h}var o=this.left,e=this.right,n=this.top,a=this.bottom;if(e<=o||a<=n)return!1;var c=r[0].set(t.left,t.top),y=r[1].set(t.left,t.bottom),p=r[2].set(t.right,t.top),u=r[3].set(t.right,t.bottom);if(p.x<=c.x||y.y<=c.y)return!1;var x=Math.sign(i.a*i.d-i.b*i.c);if(0===x)return!1;if(i.apply(c,c),i.apply(y,y),i.apply(p,p),i.apply(u,u),Math.max(c.x,y.x,p.x,u.x)<=o||Math.min(c.x,y.x,p.x,u.x)>=e||Math.max(c.y,y.y,p.y,u.y)<=n||Math.min(c.y,y.y,p.y,u.y)>=a)return!1;var d=x*(y.y-c.y),f=x*(c.x-y.x),l=d*o+f*n,b=d*e+f*n,v=d*o+f*a,g=d*e+f*a;if(Math.max(l,b,v,g)<=d*c.x+f*c.y||Math.min(l,b,v,g)>=d*u.x+f*u.y)return!1;var w=x*(c.y-p.y),_=x*(p.x-c.x),m=w*o+_*n,M=w*e+_*n,I=w*o+_*a,D=w*e+_*a;return!(Math.max(m,M,I,D)<=w*c.x+_*c.y||Math.min(m,M,I,D)>=w*u.x+_*u.y)},i.prototype.pad=function(t,i){return void 0===t&&(t=0),void 0===i&&(i=t),this.x-=t,this.y-=i,this.width+=2*t,this.height+=2*i,this},i.prototype.fit=function(t){var i=Math.max(this.x,t.x),s=Math.min(this.x+this.width,t.x+t.width),h=Math.max(this.y,t.y),o=Math.min(this.y+this.height,t.y+t.height);return this.x=i,this.width=Math.max(s-i,0),this.y=h,this.height=Math.max(o-h,0),this},i.prototype.ceil=function(t,i){void 0===t&&(t=1),void 0===i&&(i=.001);var s=Math.ceil((this.x+this.width-i)*t)/t,h=Math.ceil((this.y+this.height-i)*t)/t;return this.x=Math.floor((this.x+i)*t)/t,this.y=Math.floor((this.y+i)*t)/t,this.width=s-this.x,this.height=h-this.y,this},i.prototype.enlarge=function(t){var i=Math.min(this.x,t.x),s=Math.max(this.x+this.width,t.x+t.width),h=Math.min(this.y,t.y),o=Math.max(this.y+this.height,t.y+t.height);return this.x=i,this.width=s-i,this.y=h,this.height=o-h,this},i.prototype.toString=function(){return"[@pixi/math:Rectangle x="+this.x+" y="+this.y+" width="+this.width+" height="+this.height+"]"},i}(),n=exports.Circle=function(){function i(i,s,h){void 0===i&&(i=0),void 0===s&&(s=0),void 0===h&&(h=0),this.x=i,this.y=s,this.radius=h,this.type=t.CIRC}return i.prototype.clone=function(){return new i(this.x,this.y,this.radius)},i.prototype.contains=function(t,i){if(this.radius<=0)return!1;var s=this.radius*this.radius,h=this.x-t,o=this.y-i;return(h*=h)+(o*=o)<=s},i.prototype.getBounds=function(){return new e(this.x-this.radius,this.y-this.radius,2*this.radius,2*this.radius)},i.prototype.toString=function(){return"[@pixi/math:Circle x="+this.x+" y="+this.y+" radius="+this.radius+"]"},i}(),a=exports.Ellipse=function(){function i(i,s,h,o){void 0===i&&(i=0),void 0===s&&(s=0),void 0===h&&(h=0),void 0===o&&(o=0),this.x=i,this.y=s,this.width=h,this.height=o,this.type=t.ELIP}return i.prototype.clone=function(){return new i(this.x,this.y,this.width,this.height)},i.prototype.contains=function(t,i){if(this.width<=0||this.height<=0)return!1;var s=(t-this.x)/this.width,h=(i-this.y)/this.height;return(s*=s)+(h*=h)<=1},i.prototype.getBounds=function(){return new e(this.x-this.width,this.y-this.height,this.width,this.height)},i.prototype.toString=function(){return"[@pixi/math:Ellipse x="+this.x+" y="+this.y+" width="+this.width+" height="+this.height+"]"},i}(),c=exports.Polygon=function(){function i(){for(var i=arguments,s=[],h=0;hi!=c>i&&t<(i-n)/(c-n)*(a-e)+e&&(s=!s)}return s},i.prototype.toString=function(){return"[@pixi/math:PolygoncloseStroke="+this.closeStroke+"points="+this.points.reduce(function(t,i){return t+", "+i},"")+"]"},i}(),y=exports.RoundedRectangle=function(){function i(i,s,h,o,r){void 0===i&&(i=0),void 0===s&&(s=0),void 0===h&&(h=0),void 0===o&&(o=0),void 0===r&&(r=20),this.x=i,this.y=s,this.width=h,this.height=o,this.radius=r,this.type=t.RREC}return i.prototype.clone=function(){return new i(this.x,this.y,this.width,this.height,this.radius)},i.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){var s=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(i>=this.y+s&&i<=this.y+this.height-s||t>=this.x+s&&t<=this.x+this.width-s)return!0;var h=t-(this.x+s),o=i-(this.y+s),r=s*s;if(h*h+o*o<=r)return!0;if((h=t-(this.x+this.width-s))*h+o*o<=r)return!0;if(h*h+(o=i-(this.y+this.height-s))*o<=r)return!0;if((h=t-(this.x+s))*h+o*o<=r)return!0}return!1},i.prototype.toString=function(){return"[@pixi/math:RoundedRectangle x="+this.x+" y="+this.y+"width="+this.width+" height="+this.height+" radius="+this.radius+"]"},i}(),p=exports.ObservablePoint=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},t.prototype.toString=function(){return"[@pixi/math:ObservablePoint x=0 y=0 scope="+this.scope+"]"},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}(),u=exports.Matrix=function(){function t(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 t.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]},t.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},t.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},t.prototype.apply=function(t,i){i=i||new o;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},t.prototype.applyInverse=function(t,i){i=i||new o;var s=1/(this.a*this.d+this.c*-this.b),h=t.x,r=t.y;return i.x=this.d*s*h+-this.c*s*r+(this.ty*this.c-this.tx*this.d)*s,i.y=this.a*s*r+-this.b*s*h+(-this.ty*this.a+this.tx*this.b)*s,i},t.prototype.translate=function(t,i){return this.tx+=t,this.ty+=i,this},t.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},t.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},t.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},t.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},t.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},t.prototype.decompose=function(t){var s=this.a,h=this.b,o=this.c,r=this.d,e=t.pivot,n=-Math.atan2(-o,r),a=Math.atan2(h,s),c=Math.abs(n+a);return c<1e-5||Math.abs(i-c)<1e-5?(t.rotation=a,t.skew.x=t.skew.y=0):(t.rotation=0,t.skew.x=n,t.skew.y=a),t.scale.x=Math.sqrt(s*s+h*h),t.scale.y=Math.sqrt(o*o+r*r),t.position.x=this.tx+(e.x*s+e.y*o),t.position.y=this.ty+(e.x*h+e.y*r),t},t.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},t.prototype.identity=function(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this},t.prototype.clone=function(){var i=new t;return i.a=this.a,i.b=this.b,i.c=this.c,i.d=this.d,i.tx=this.tx,i.ty=this.ty,i},t.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},t.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},t.prototype.toString=function(){return"[@pixi/math:Matrix a="+this.a+" b="+this.b+" c="+this.c+" d="+this.d+" tx="+this.tx+" ty="+this.ty+"]"},Object.defineProperty(t,"IDENTITY",{get:function(){return new t},enumerable:!1,configurable:!0}),Object.defineProperty(t,"TEMP_MATRIX",{get:function(){return new t},enumerable:!1,configurable:!0}),t}(),x=[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],f=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],l=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],b=[],v=[],g=Math.sign;function w(){for(var t=0;t<16;t++){var i=[];b.push(i);for(var s=0;s<16;s++)for(var h=g(x[t]*x[s]+f[t]*d[s]),o=g(d[t]*x[s]+l[t]*d[s]),r=g(x[t]*f[s]+f[t]*l[s]),e=g(d[t]*f[s]+l[t]*l[s]),n=0;n<16;n++)if(x[n]===h&&d[n]===o&&f[n]===r&&l[n]===e){i.push(n);break}}for(t=0;t<16;t++){var a=new u;a.set(x[t],d[t],f[t],l[t],0,0),v.push(a)}}w();var _=exports.groupD8={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 x[t]},uY:function(t){return d[t]},vX:function(t){return f[t]},vY:function(t){return l[t]},inv:function(t){return 8&t?15&t:7&-t},add:function(t,i){return b[t][i]},sub:function(t,i){return b[t][_.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?_.S:_.N:2*Math.abs(i)<=Math.abs(t)?t>0?_.E:_.W:i>0?t>0?_.SE:_.SW:t>0?_.NE:_.NW},matrixAppendRotationInv:function(t,i,s,h){void 0===s&&(s=0),void 0===h&&(h=0);var o=v[_.inv(i)];o.tx=s,o.ty=h,t.append(o)}},m=exports.Transform=function(){function t(){this.worldTransform=new u,this.localTransform=new u,this.position=new p(this.onChange,this,0,0),this.scale=new p(this.onChange,this,1,1),this.pivot=new p(this.onChange,this,0,0),this.skew=new p(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.toString=function(){return"[@pixi/math:Transform position=("+this.position.x+", "+this.position.y+") rotation="+this.rotation+" scale=("+this.scale.x+", "+this.scale.y+") skew=("+this.skew.x+", "+this.skew.y+") ]"},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}(); },{}],"Yd2V":[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"),n=require("@pixi/constants");t.settings.SORTABLE_CHILDREN=!1;var r=exports.Bounds=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.addPointMatrix=function(t,e){var i=t.a,n=t.b,r=t.c,s=t.d,o=t.tx,a=t.ty,h=i*e.x+r*e.y+o,l=n*e.x+s*e.y+a;this.minX=Math.min(this.minX,h),this.maxX=Math.max(this.maxX,h),this.minY=Math.min(this.minY,l),this.maxY=Math.max(this.maxY,l)},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,u=this.minY,m=this.maxX,c=this.maxY,f=s*e+a*i+l,y=o*e+h*i+d;p=fm?f:m,c=y>c?y:c,p=(f=s*n+a*i+l)m?f:m,c=y>c?y:c,p=(f=s*e+a*r+l)m?f:m,c=y>c?y:c,p=(f=s*n+a*r+l)m?f:m,c=y>c?y:c,this.minX=p,this.minY=u,this.maxX=m,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,u=this.minX,m=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}(),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 o(t,e){function i(){this.constructor=t}s(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var a=exports.DisplayObject=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.cullable=!1,i.cullArea=null,i.parent=null,i.worldAlpha=1,i._lastSortedIndex=0,i._zIndex=0,i.filterArea=null,i.filters=null,i._enabledFilters=null,i._bounds=new r,i._localBounds=null,i._boundsID=0,i._boundsRect=null,i._localBoundsRect=null,i._mask=null,i._maskRefCount=0,i._destroyed=!1,i.isSprite=!1,i.isMask=!1,i}return o(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},r.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)},r.prototype.getChildAt=function(t){if(t<0||t>=this.children.length)throw new Error("getChildAt: Index ("+t+") does not exist.");return this.children[t]},r.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(l),this.sortDirty=!1},r.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;t0&&e.height>0){var i,n;if(this.cullArea?(i=this.cullArea,n=this.worldTransform):this._render!==r.prototype._render&&(i=this.getBounds(!0)),i&&e.intersects(i,n))this._render(t);else if(this.cullArea)return;for(var s=0,o=this.children.length;s8)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}();Object.defineProperties(t.prototype,{dispatch:{value:t.prototype.emit},run:{value:t.prototype.emit}}); },{}],"N1K7":[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"),i=require("@pixi/extensions");e.settings.TARGET_FPMS=.06,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 s=function(){function t(t,e,i,s){void 0===e&&(e=null),void 0===i&&(i=0),void 0===s&&(s=!1),this.next=null,this.previous=null,this._destroyed=!1,this.fn=t,this.context=e,this.priority=i,this.once=s}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}(),n=exports.Ticker=function(){function i(){var t=this;this.autoStart=!1,this.deltaTime=1,this.lastTime=-1,this.speed=1,this.started=!1,this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this._protected=!1,this._lastFrame=-1,this._head=new s(null,null,1/0),this.deltaMS=1/e.settings.TARGET_FPMS,this.elapsedMS=1/e.settings.TARGET_FPMS,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 i.prototype._requestIfNeeded=function(){null===this._requestId&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))},i.prototype._cancelIfNeeded=function(){null!==this._requestId&&(cancelAnimationFrame(this._requestId),this._requestId=null)},i.prototype._startIfPossible=function(){this.started?this._requestIfNeeded():this.autoStart&&this.start()},i.prototype.add=function(e,i,n){return void 0===n&&(n=t.NORMAL),this._addListener(new s(e,i,n))},i.prototype.addOnce=function(e,i,n){return void 0===n&&(n=t.NORMAL),this._addListener(new s(e,i,n,!0))},i.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},i.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(i.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}),i.prototype.start=function(){this.started||(this.started=!0,this._requestIfNeeded())},i.prototype.stop=function(){this.started&&(this.started=!1,this._cancelIfNeeded())},i.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}},i.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;--n){var o=u[n];if(o.test&&o.test(e,r))return new o(e,t)}throw new Error("Unrecognized source type to auto-detect Resource")}var l=function(e,t){return(l=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 d(e,t){function r(){this.constructor=e}l(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var c=function(){return(c=Object.assign||function(e){for(var t,r=arguments,i=1,n=arguments.length;i0&&f>0,s.textureCacheIds=[],s.destroyed=!1,s.resource=null,s._batchEnabled=0,s._batchLocation=0,s.parentTextureArray=null,s.setResource(n),s}return d(n,e),Object.defineProperty(n.prototype,"realWidth",{get:function(){return Math.round(this.width*this.resolution)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"realHeight",{get:function(){return Math.round(this.height*this.resolution)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"mipmap",{get:function(){return this._mipmap},set:function(e){this._mipmap!==e&&(this._mipmap=e,this.dirtyStyleId++)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"scaleMode",{get:function(){return this._scaleMode},set:function(e){this._scaleMode!==e&&(this._scaleMode=e,this.dirtyStyleId++)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"wrapMode",{get:function(){return this._wrapMode},set:function(e){this._wrapMode!==e&&(this._wrapMode=e,this.dirtyStyleId++)},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 r=r||this.resolution,this.setRealSize(e*r,t*r,r)},n.prototype.setRealSize=function(e,t,r){return this.resolution=r||this.resolution,this.width=Math.round(e)/this.resolution,this.height=Math.round(t)/this.resolution,this._refreshPOT(),this.update(),this},n.prototype._refreshPOT=function(){this.isPowerOfTwo=(0,i.isPow2)(this.realWidth)&&(0,i.isPow2)(this.realHeight)},n.prototype.setResolution=function(e){var t=this.resolution;return t===e?this:(this.resolution=e,this.valid&&(this.width=Math.round(this.width*t)/e,this.height=Math.round(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 i.BaseTextureCache[this.cacheId],delete i.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(e,r,o){void 0===o&&(o=t.settings.STRICT_TEXTURE_CACHE);var s="string"==typeof e,a=null;if(s)a=e;else{if(!e._pixiId){var u=r&&r.pixiIdPrefix||"pixiid";e._pixiId=u+"_"+(0,i.uid)()}a=e._pixiId}var h=i.BaseTextureCache[a];if(s&&o&&!h)throw new Error('The cacheId "'+a+'" does not exist in BaseTextureCache.');return h||((h=new n(e,r)).cacheId=a,n.addToCache(h,a)),h},n.fromBuffer=function(e,t,i,o){e=e||new Float32Array(t*i*4);var s=new m(e,{width:t,height:i}),a=e instanceof Float32Array?r.TYPES.FLOAT:r.TYPES.UNSIGNED_BYTE;return new n(s,Object.assign({},v,o||{width:t,height:i,type:a}))},n.addToCache=function(e,t){t&&(-1===e.textureCacheIds.indexOf(t)&&e.textureCacheIds.push(t),i.BaseTextureCache[t]&&console.warn("BaseTexture added to the cache with an id ["+t+"] that already had an entry"),i.BaseTextureCache[t]=e)},n.removeFromCache=function(e){if("string"==typeof e){var t=i.BaseTextureCache[e];if(t){var r=t.textureCacheIds.indexOf(e);return r>-1&&t.textureCacheIds.splice(r,1),delete i.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,t)}else e.target=r.TARGETS.TEXTURE_CUBE_MAP_POSITIVE_X+t,e.parentTextureArray=this.baseTexture,this.items[t]=e;return e.valid&&!this.valid&&this.resize(e.realWidth,e.realHeight),this.items[t]=e,this},t.prototype.upload=function(e,r,i){for(var n=this.itemDirtyIds,o=0;o)?\s*()]*-->)?\s*\]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i,r}(x),R=exports.VideoResource=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];x.crossOrigin(o,s,i.crossorigin);for(var a=0;a2},t.prototype._onPlayStart=function(){this.valid||this._onCanPlay(),this.autoUpdate&&!this._isConnectedToTicker&&(s.Ticker.shared.add(this.update,this),this._isConnectedToTicker=!0)},t.prototype._onPlayStop=function(){this._isConnectedToTicker&&(s.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&&(s.Ticker.shared.remove(this.update,this),this._isConnectedToTicker=!1);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?(s.Ticker.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._isSourcePlaying()&&(s.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 globalThis.HTMLVideoElement&&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}(x),A=exports.ImageBitmapResource=function(e){function t(t){return e.call(this,t)||this}return d(t,e),t.test=function(e){return!!globalThis.createImageBitmap&&"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap},t}(x);u.push(b,A,T,R,S,m,E,_);var M={__proto__:null,Resource:p,BaseImageResource:x,INSTALLED:u,autoDetectResource:h,AbstractMultiResource:y,ArrayResource:_,BufferResource:m,CanvasResource:T,CubeResource:E,ImageResource:b,SVGResource:S,VideoResource:R,ImageBitmapResource:A},I=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return d(t,e),t.prototype.upload=function(e,t,i){var n=e.gl;n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t.alphaMode===r.ALPHA_MODES.UNPACK);var o=t.realWidth,s=t.realHeight;return i.width===o&&i.height===s?n.texSubImage2D(t.target,0,0,0,o,s,t.format,i.type,this.data):(i.width=o,i.height=s,n.texImage2D(t.target,0,i.internalFormat,o,s,0,t.format,i.type,this.data)),!0},t}(m),w=exports.Framebuffer=function(){function e(e,t){this.width=Math.round(e||100),this.height=Math.round(t||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 o.Runner("disposeFramebuffer"),this.multisample=r.MSAA_QUALITY.NONE}return Object.defineProperty(e.prototype,"colorTexture",{get:function(){return this.colorTextures[0]},enumerable:!1,configurable:!0}),e.prototype.addColorTexture=function(e,t){return void 0===e&&(e=0),this.colorTextures[e]=t||new g(null,{scaleMode:r.SCALE_MODES.NEAREST,resolution:1,mipmap:r.MIPMAP_MODES.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this},e.prototype.addDepthTexture=function(e){return this.depthTexture=e||new g(new I(null,{width:this.width,height:this.height}),{scaleMode:r.SCALE_MODES.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:r.MIPMAP_MODES.OFF,format:r.FORMATS.DEPTH_COMPONENT,type:r.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.round(e),t=Math.round(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(r,1),delete i.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(r.prototype,"rotate",{get:function(){return this._rotate},set:function(e){this._rotate=e,this.valid&&this.updateUvs()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"width",{get:function(){return this.orig.width},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"height",{get:function(){return this.orig.height},enumerable:!1,configurable:!0}),r.prototype.castToBaseTexture=function(){return this.baseTexture},Object.defineProperty(r,"EMPTY",{get:function(){return r._EMPTY||(r._EMPTY=new r(new g),P(r._EMPTY),P(r._EMPTY.baseTexture)),r._EMPTY},enumerable:!1,configurable:!0}),Object.defineProperty(r,"WHITE",{get:function(){if(!r._WHITE){var e=t.settings.ADAPTER.createCanvas(16,16),i=e.getContext("2d");e.width=16,e.height=16,i.fillStyle="white",i.fillRect(0,0,16,16),r._WHITE=new r(g.from(e)),P(r._WHITE),P(r._WHITE.baseTexture)}return r._WHITE},enumerable:!1,configurable:!0}),r}(i.EventEmitter),N=exports.RenderTexture=function(e){function t(t,r){var i=e.call(this,t,r)||this;return i.valid=!0,i.filterFrame=null,i.filterPoolKey=null,i.updateUvs(),i}return d(t,e),Object.defineProperty(t.prototype,"framebuffer",{get:function(){return this.baseTexture.framebuffer},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"multisample",{get:function(){return this.framebuffer.multisample},set:function(e){this.framebuffer.multisample=e},enumerable:!1,configurable:!0}),t.prototype.resize=function(e,t,r){void 0===r&&(r=!0);var i=this.baseTexture.resolution,n=Math.round(e*i)/i,o=Math.round(t*i)/i;this.valid=n>0&&o>0,this._frame.width=this.orig.width=n,this._frame.height=this.orig.height=o,r&&this.baseTexture.resize(n,o),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){for(var r=arguments,n=[],o=1;o1?-o:-1:(s=((65535&(e=(0,i.nextPow2)(e)))<<16|65535&(t=(0,i.nextPow2)(t)))>>>0,o>1&&(s+=4294967296*o)),this.texturePool[s]||(this.texturePool[s]=[]);var a=this.texturePool[s].pop();return a||(a=this.createTexture(e,t,o)),a.filterPoolKey=s,a.setResolution(n),a},e.prototype.getFilterTexture=function(e,t,i){var n=this.getOptimalTexture(e.width,e.height,t||e.resolution,i||r.MSAA_QUALITY.NONE);return n.filterFrame=e.filterFrame,n},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&&e.height>0,this.texturePool)if(Number(t)<0){var r=this.texturePool[t];if(r)for(var i=0;i1){for(var h=0;h1&&((d=this.getOptimalFilterTexture(l.width,l.height,t.resolution)).filterFrame=l.filterFrame),i[c].apply(this,l,d,r.CLEAR_MODES.CLEAR,t);var f=l;l=d,d=f}i[c].apply(this,l,h.renderTexture,r.CLEAR_MODES.BLEND,t),c>1&&t.multisample>1&&this.returnFilterTexture(t.renderTexture),this.returnFilterTexture(l),this.returnFilterTexture(d)}t.clear(),this.statePool.push(t)},e.prototype.bindAndClear=function(e,t){void 0===t&&(t=r.CLEAR_MODES.CLEAR);var i=this.renderer,n=i.renderTexture,o=i.state;if(e===this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?this.renderer.projection.transform=this.activeState.transform:this.renderer.projection.transform=null,e&&e.filterFrame){var s=this.tempRect;s.x=0,s.y=0,s.width=e.filterFrame.width,s.height=e.filterFrame.height,n.bind(e,e.filterFrame,s)}else e!==this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?n.bind(e):this.renderer.renderTexture.bind(e,this.activeState.bindingSourceFrame,this.activeState.bindingDestinationFrame);var a=1&o.stateId||this.forceClear;(t===r.CLEAR_MODES.CLEAR||t===r.CLEAR_MODES.BLIT&&a)&&this.renderer.framebuffer.clear(0,0,0,0)},e.prototype.applyFilter=function(e,t,i,n){var o=this.renderer;o.state.set(e.state),this.bindAndClear(i,n),e.uniforms.uSampler=t,e.uniforms.filterGlobals=this.globalUniforms,o.shader.bind(e),e.legacy=!!e.program.attributeData.aTextureCoord,e.legacy?(this.quadUv.map(t._frame,t.filterFrame),o.geometry.bind(this.quadUv),o.geometry.draw(r.DRAW_MODES.TRIANGLES)):(o.geometry.bind(this.quad),o.geometry.draw(r.DRAW_MODES.TRIANGLE_STRIP))},e.prototype.calculateSpriteMatrix=function(e,t){var r=this.activeState,i=r.sourceFrame,n=r.destinationFrame,o=t._texture.orig,s=e.set(n.width,0,0,n.height,i.x,i.y),u=t.worldTransform.copyTo(a.Matrix.TEMP_MATRIX);return u.invert(),s.prepend(u),s.scale(1/o.width,1/o.height),s.translate(t.anchor.x,t.anchor.y),s},e.prototype.destroy=function(){this.renderer=null,this.texturePool.clear(!1)},e.prototype.getOptimalFilterTexture=function(e,t,i,n){return void 0===i&&(i=1),void 0===n&&(n=r.MSAA_QUALITY.NONE),this.texturePool.getOptimalTexture(e,t,i,n)},e.prototype.getFilterTexture=function(e,t,i){if("number"==typeof e){var n=e;e=t,t=n}e=e||this.activeState.renderTexture;var o=this.texturePool.getOptimalTexture(e.width,e.height,t||e.resolution,i||r.MSAA_QUALITY.NONE);return o.filterFrame=e.filterFrame,o},e.prototype.returnFilterTexture=function(e){this.texturePool.returnTexture(e)},e.prototype.emptyPool=function(){this.texturePool.clear(!0)},e.prototype.resize=function(){this.texturePool.setScreenSize(this.renderer.view)},e.prototype.transformAABB=function(e,t){var r=Z[0],i=Z[1],n=Z[2],o=Z[3];r.set(t.left,t.top),i.set(t.left,t.bottom),n.set(t.right,t.top),o.set(t.right,t.bottom),e.apply(r,r),e.apply(i,i),e.apply(n,n),e.apply(o,o);var s=Math.min(r.x,i.x,n.x,o.x),a=Math.min(r.y,i.y,n.y,o.y),u=Math.max(r.x,i.x,n.x,o.x),h=Math.max(r.y,i.y,n.y,o.y);t.x=s,t.y=a,t.width=u-s,t.height=h-a},e.prototype.roundFrame=function(e,t,r,i,n){if(!(e.width<=0||e.height<=0||r.width<=0||r.height<=0)){if(n){var o=n.a,s=n.b,a=n.c,u=n.d;if((Math.abs(s)>1e-4||Math.abs(a)>1e-4)&&(Math.abs(o)>1e-4||Math.abs(u)>1e-4))return}(n=n?$.copyFrom(n):$.identity()).translate(-r.x,-r.y).scale(i.width/r.width,i.height/r.height).translate(i.x,i.y),this.transformAABB(n,e),e.ceil(t),this.transformAABB(n.invert(),e)}},e}(),ee=exports.ObjectRenderer=function(){function e(e){this.renderer=e}return e.prototype.flush=function(){},e.prototype.destroy=function(){this.renderer=null},e.prototype.start=function(){},e.prototype.stop=function(){this.flush()},e.prototype.render=function(e){},e}(),te=exports.BatchSystem=function(){function e(e){this.renderer=e,this.emptyRenderer=new ee(e),this.currentRenderer=this.emptyRenderer}return e.prototype.setObjectRenderer=function(e){this.currentRenderer!==e&&(this.currentRenderer.stop(),this.currentRenderer=e,this.currentRenderer.start())},e.prototype.flush=function(){this.setObjectRenderer(this.emptyRenderer)},e.prototype.reset=function(){this.setObjectRenderer(this.emptyRenderer)},e.prototype.copyBoundTextures=function(e,t){for(var r=this.renderer.texture.boundTextures,i=t-1;i>=0;--i)e[i]=r[i]||null,e[i]&&(e[i]._batchLocation=i)},e.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=r.ENV.WEBGL2&&(n=e.getContext("webgl2",i)),n)this.webGLVersion=2;else if(this.webGLVersion=1,!(n=e.getContext("webgl",i)||e.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},e.prototype.getExtensions=function(){var e=this.gl,t={loseContext:e.getExtension("WEBGL_lose_context"),anisotropicFiltering:e.getExtension("EXT_texture_filter_anisotropic"),floatTextureLinear:e.getExtension("OES_texture_float_linear"),s3tc:e.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:e.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:e.getExtension("WEBGL_compressed_texture_etc"),etc1:e.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:e.getExtension("WEBGL_compressed_texture_atc"),astc:e.getExtension("WEBGL_compressed_texture_astc")};1===this.webGLVersion?Object.assign(this.extensions,t,{drawBuffers:e.getExtension("WEBGL_draw_buffers"),depthTexture:e.getExtension("WEBGL_depth_texture"),vertexArrayObject:e.getExtension("OES_vertex_array_object")||e.getExtension("MOZ_OES_vertex_array_object")||e.getExtension("WEBKIT_OES_vertex_array_object"),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,t,{colorBufferFloat:e.getExtension("EXT_color_buffer_float")})},e.prototype.handleContextLost=function(e){var t=this;e.preventDefault(),setTimeout(function(){t.gl.isContextLost()&&t.extensions.loseContext&&t.extensions.loseContext.restoreContext()},0)},e.prototype.handleContextRestored=function(){this.renderer.runners.contextChange.emit(this.gl)},e.prototype.destroy=function(){var e=this.renderer.view;this.renderer=null,e.removeEventListener("webglcontextlost",this.handleContextLost),e.removeEventListener("webglcontextrestored",this.handleContextRestored),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()},e.prototype.postrender=function(){this.renderer.renderingToScreen&&this.gl.flush()},e.prototype.validateContext=function(e){var t=e.getContextAttributes(),r="WebGL2RenderingContext"in globalThis&&e instanceof globalThis.WebGL2RenderingContext;r&&(this.webGLVersion=2),t&&!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")},e}(),ne=exports.GLFramebuffer=function(){return function(e){this.framebuffer=e,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=r.MSAA_QUALITY.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0}}(),oe=new a.Rectangle,se=exports.FramebufferSystem=function(){function e(e){this.renderer=e,this.managedFramebuffers=[],this.unknownFramebuffer=new w(10,10),this.msaaSamples=null}return e.prototype.contextChange=function(){this.disposeAll(!0);var e=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new a.Rectangle,this.hasMRT=!0,this.writeDepthTexture=!0,1===this.renderer.context.webGLVersion){var i=this.renderer.context.extensions.drawBuffers,n=this.renderer.context.extensions.depthTexture;t.settings.PREFER_ENV===r.ENV.WEBGL_LEGACY&&(i=null,n=null),i?e.drawBuffers=function(e){return i.drawBuffersWEBGL(e)}:(this.hasMRT=!1,e.drawBuffers=function(){}),n||(this.writeDepthTexture=!1)}else this.msaaSamples=e.getInternalformatParameter(e.RENDERBUFFER,e.RGBA8,e.SAMPLES)},e.prototype.bind=function(e,t,r){void 0===r&&(r=0);var i=this.gl;if(e){var n=e.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(e);this.current!==e&&(this.current=e,i.bindFramebuffer(i.FRAMEBUFFER,n.framebuffer)),n.mipLevel!==r&&(e.dirtyId++,e.dirtyFormat++,n.mipLevel=r),n.dirtyId!==e.dirtyId&&(n.dirtyId=e.dirtyId,n.dirtyFormat!==e.dirtyFormat?(n.dirtyFormat=e.dirtyFormat,n.dirtySize=e.dirtySize,this.updateFramebuffer(e,r)):n.dirtySize!==e.dirtySize&&(n.dirtySize=e.dirtySize,this.resizeFramebuffer(e)));for(var o=0;o>r,u=t.height>>r,h=a/t.width;this.setViewport(t.x*h,t.y*h,a,u)}else{a=e.width>>r,u=e.height>>r;this.setViewport(0,0,a,u)}}else this.current&&(this.current=null,i.bindFramebuffer(i.FRAMEBUFFER,null)),t?this.setViewport(t.x,t.y,t.width,t.height):this.setViewport(0,0,this.renderer.width,this.renderer.height)},e.prototype.setViewport=function(e,t,r,i){var n=this.viewport;e=Math.round(e),t=Math.round(t),r=Math.round(r),i=Math.round(i),n.width===r&&n.height===i&&n.x===e&&n.y===t||(n.x=e,n.y=t,n.width=r,n.height=i,this.gl.viewport(e,t,r,i))},Object.defineProperty(e.prototype,"size",{get:function(){return this.current?{x:0,y:0,width:this.current.width,height:this.current.height}:{x:0,y:0,width:this.renderer.width,height:this.renderer.height}},enumerable:!1,configurable:!0}),e.prototype.clear=function(e,t,i,n,o){void 0===o&&(o=r.BUFFER_BITS.COLOR|r.BUFFER_BITS.DEPTH);var s=this.gl;s.clearColor(e,t,i,n),s.clear(o)},e.prototype.initFramebuffer=function(e){var t=this.gl,r=new ne(t.createFramebuffer());return r.multisample=this.detectSamples(e.multisample),e.glFramebuffers[this.CONTEXT_UID]=r,this.managedFramebuffers.push(e),e.disposeRunner.add(this),r},e.prototype.resizeFramebuffer=function(e){var t=this.gl,r=e.glFramebuffers[this.CONTEXT_UID];r.msaaBuffer&&(t.bindRenderbuffer(t.RENDERBUFFER,r.msaaBuffer),t.renderbufferStorageMultisample(t.RENDERBUFFER,r.multisample,t.RGBA8,e.width,e.height)),r.stencil&&(t.bindRenderbuffer(t.RENDERBUFFER,r.stencil),r.msaaBuffer?t.renderbufferStorageMultisample(t.RENDERBUFFER,r.multisample,t.DEPTH24_STENCIL8,e.width,e.height):t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,e.width,e.height));var i=e.colorTextures,n=i.length;t.drawBuffers||(n=Math.min(n,1));for(var o=0;o1&&this.canMultisampleFramebuffer(e)?(i.msaaBuffer=i.msaaBuffer||r.createRenderbuffer(),r.bindRenderbuffer(r.RENDERBUFFER,i.msaaBuffer),r.renderbufferStorageMultisample(r.RENDERBUFFER,i.multisample,r.RGBA8,e.width,e.height),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.RENDERBUFFER,i.msaaBuffer)):i.msaaBuffer&&(r.deleteRenderbuffer(i.msaaBuffer),i.msaaBuffer=null,i.blitFramebuffer&&(i.blitFramebuffer.dispose(),i.blitFramebuffer=null));for(var s=[],a=0;a1&&r.drawBuffers(s),e.depthTexture)&&this.writeDepthTexture){var l=e.depthTexture;this.renderer.texture.bind(l,0),r.framebufferTexture2D(r.FRAMEBUFFER,r.DEPTH_ATTACHMENT,r.TEXTURE_2D,l._glTextures[this.CONTEXT_UID].texture,t)}!e.stencil&&!e.depth||e.depthTexture&&this.writeDepthTexture?i.stencil&&(r.deleteRenderbuffer(i.stencil),i.stencil=null):(i.stencil=i.stencil||r.createRenderbuffer(),r.bindRenderbuffer(r.RENDERBUFFER,i.stencil),i.msaaBuffer?r.renderbufferStorageMultisample(r.RENDERBUFFER,i.multisample,r.DEPTH24_STENCIL8,e.width,e.height):r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,e.width,e.height),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,i.stencil))},e.prototype.canMultisampleFramebuffer=function(e){return 1!==this.renderer.context.webGLVersion&&e.colorTextures.length<=1&&!e.depthTexture},e.prototype.detectSamples=function(e){var t=this.msaaSamples,i=r.MSAA_QUALITY.NONE;if(e<=1||null===t)return i;for(var n=0;n=0&&this.managedFramebuffers.splice(n,1),e.disposeRunner.remove(this),t||(i.deleteFramebuffer(r.framebuffer),r.msaaBuffer&&i.deleteRenderbuffer(r.msaaBuffer),r.stencil&&i.deleteRenderbuffer(r.stencil)),r.blitFramebuffer&&r.blitFramebuffer.dispose()}},e.prototype.disposeAll=function(e){var t=this.managedFramebuffers;this.managedFramebuffers=[];for(var r=0;r=r.ENV.WEBGL2&&(i=e.getContext("webgl2",{})),i||((i=e.getContext("webgl",{})||e.getContext("experimental-webgl",{}))?i.getExtension("WEBGL_draw_buffers"):i=null),ge=i}return ge}function _e(){if(!me){me=r.PRECISION.MEDIUM;var e=ye();if(e&&e.getShaderPrecisionFormat){var t=e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT);me=t.precision?r.PRECISION.HIGH:r.PRECISION.MEDIUM}}return me}function xe(e,t,i){if("precision"!==e.substring(0,9)){var n=t;return t===r.PRECISION.HIGH&&i!==r.PRECISION.HIGH&&(n=r.PRECISION.MEDIUM),"precision "+n+" float;\n"+e}return i!==r.PRECISION.HIGH&&"precision highp"===e.substring(0,15)?e.replace("precision highp","precision mediump"):e}var Te={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,uint:1,uvec2:2,uvec3:3,uvec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};function Ee(e){return Te[e]}var be=null,Se={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",UNSIGNED_INT:"uint",UNSIGNED_INT_VEC2:"uvec2",UNSIGNED_INT_VEC3:"uvec3",UNSIGNED_INT_VEC4:"uvec4",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 Re(e,t){if(!be){var r=Object.keys(Se);be={};for(var i=0;i0&&(t+="\nelse "),r0?this.maskStack[this.maskStack.length-1]._colorMask:15;r!==t&&this.renderer.gl.colorMask(0!=(1&r),0!=(2&r),0!=(4&r),0!=(8&r))},e.prototype.destroy=function(){this.renderer=null},e}(),it=function(){function e(e){this.renderer=e,this.maskStack=[],this.glConst=0}return e.prototype.getStackLength=function(){return this.maskStack.length},e.prototype.setMaskStack=function(e){var t=this.renderer.gl,r=this.getStackLength();this.maskStack=e;var i=this.getStackLength();i!==r&&(0===i?t.disable(this.glConst):(t.enable(this.glConst),this._useCurrent()))},e.prototype._useCurrent=function(){},e.prototype.destroy=function(){this.renderer=null,this.maskStack=null},e}(),nt=new a.Matrix,ot=[],st=exports.ScissorSystem=function(e){function r(r){var i=e.call(this,r)||this;return i.glConst=t.settings.ADAPTER.getWebGLRenderingContext().SCISSOR_TEST,i}return d(r,e),r.prototype.getStackLength=function(){var e=this.maskStack[this.maskStack.length-1];return e?e._scissorCounter:0},r.prototype.calcScissorRect=function(e){var t;if(!e._scissorRectLocal){var r=e._scissorRect,i=e.maskObject,n=this.renderer,o=n.renderTexture,s=i.getBounds(!0,null!==(t=ot.pop())&&void 0!==t?t:new a.Rectangle);this.roundFrameToPixels(s,o.current?o.current.resolution:n.resolution,o.sourceFrame,o.destinationFrame,n.projection.transform),r&&s.fit(r),e._scissorRectLocal=s}},r.isMatrixRotated=function(e){if(!e)return!1;var t=e.a,r=e.b,i=e.c,n=e.d;return(Math.abs(r)>1e-4||Math.abs(i)>1e-4)&&(Math.abs(t)>1e-4||Math.abs(n)>1e-4)},r.prototype.testScissor=function(e){var t=e.maskObject;if(!t.isFastRect||!t.isFastRect())return!1;if(r.isMatrixRotated(t.worldTransform))return!1;if(r.isMatrixRotated(this.renderer.projection.transform))return!1;this.calcScissorRect(e);var i=e._scissorRectLocal;return i.width>0&&i.height>0},r.prototype.roundFrameToPixels=function(e,t,i,n,o){r.isMatrixRotated(o)||((o=o?nt.copyFrom(o):nt.identity()).translate(-i.x,-i.y).scale(n.width/i.width,n.height/i.height).translate(n.x,n.y),this.renderer.filter.transformAABB(o,e),e.fit(n),e.x=Math.round(e.x*t),e.y=Math.round(e.y*t),e.width=Math.round(e.width*t),e.height=Math.round(e.height*t))},r.prototype.push=function(e){e._scissorRectLocal||this.calcScissorRect(e);var t=this.renderer.gl;e._scissorRect||t.enable(t.SCISSOR_TEST),e._scissorCounter++,e._scissorRect=e._scissorRectLocal,this._useCurrent()},r.prototype.pop=function(e){var t=this.renderer.gl;e&&ot.push(e._scissorRectLocal),this.getStackLength()>0?this._useCurrent():t.disable(t.SCISSOR_TEST)},r.prototype._useCurrent=function(){var e,t=this.maskStack[this.maskStack.length-1]._scissorRect;e=this.renderer.renderTexture.current?t.y:this.renderer.height-t.height-t.y,this.renderer.gl.scissor(t.x,e,t.width,t.height)},r}(it),at=exports.StencilSystem=function(e){function r(r){var i=e.call(this,r)||this;return i.glConst=t.settings.ADAPTER.getWebGLRenderingContext().STENCIL_TEST,i}return d(r,e),r.prototype.getStackLength=function(){var e=this.maskStack[this.maskStack.length-1];return e?e._stencilCounter:0},r.prototype.push=function(e){var t=e.maskObject,r=this.renderer.gl,i=e._stencilCounter;0===i&&(this.renderer.framebuffer.forceStencil(),r.clearStencil(0),r.clear(r.STENCIL_BUFFER_BIT),r.enable(r.STENCIL_TEST)),e._stencilCounter++;var n=e._colorMask;0!==n&&(e._colorMask=0,r.colorMask(!1,!1,!1,!1)),r.stencilFunc(r.EQUAL,i,4294967295),r.stencilOp(r.KEEP,r.KEEP,r.INCR),t.renderable=!0,t.render(this.renderer),this.renderer.batch.flush(),t.renderable=!1,0!==n&&(e._colorMask=n,r.colorMask(0!=(1&n),0!=(2&n),0!=(4&n),0!=(8&n))),this._useCurrent()},r.prototype.pop=function(e){var t=this.renderer.gl;if(0===this.getStackLength())t.disable(t.STENCIL_TEST);else{var r=0!==this.maskStack.length?this.maskStack[this.maskStack.length-1]:null,i=r?r._colorMask:15;0!==i&&(r._colorMask=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,0!==i&&(r._colorMask=i,t.colorMask(0!=(1&i),0!=(2&i),0!=(4&i),0!=(8&i))),this._useCurrent()}},r.prototype._useCurrent=function(){var e=this.renderer.gl;e.stencilFunc(e.EQUAL,this.getStackLength(),4294967295),e.stencilOp(e.KEEP,e.KEEP,e.KEEP)},r}(it),ut=exports.ProjectionSystem=function(){function e(e){this.renderer=e,this.destinationFrame=null,this.sourceFrame=null,this.defaultFrame=null,this.projectionMatrix=new a.Matrix,this.transform=null}return e.prototype.update=function(e,t,r,i){this.destinationFrame=e||this.destinationFrame||this.defaultFrame,this.sourceFrame=t||this.sourceFrame||e,this.calculateProjection(this.destinationFrame,this.sourceFrame,r,i),this.transform&&this.projectionMatrix.append(this.transform);var n=this.renderer;n.globalUniforms.uniforms.projectionMatrix=this.projectionMatrix,n.globalUniforms.update(),n.shader.shader&&n.shader.syncUniformGroup(n.shader.shader.uniforms.globals)},e.prototype.calculateProjection=function(e,t,r,i){var n=this.projectionMatrix,o=i?-1:1;n.identity(),n.a=1/t.width*2,n.d=o*(1/t.height*2),n.tx=-1-t.x*n.a,n.ty=-o-t.y*n.d},e.prototype.setTransform=function(e){},e.prototype.destroy=function(){this.renderer=null},e}(),ht=new a.Rectangle,lt=new a.Rectangle,dt=exports.RenderTextureSystem=function(){function e(e){this.renderer=e,this.clearColor=e._backgroundColorRgba,this.defaultMaskStack=[],this.current=null,this.sourceFrame=new a.Rectangle,this.destinationFrame=new a.Rectangle,this.viewportFrame=new a.Rectangle}return e.prototype.bind=function(e,t,r){void 0===e&&(e=null);var i,n,o,s=this.renderer;this.current=e,e?(o=(i=e.baseTexture).resolution,t||(ht.width=e.frame.width,ht.height=e.frame.height,t=ht),r||(lt.x=e.frame.x,lt.y=e.frame.y,lt.width=t.width,lt.height=t.height,r=lt),n=i.framebuffer):(o=s.resolution,t||(ht.width=s.screen.width,ht.height=s.screen.height,t=ht),r||((r=ht).width=t.width,r.height=t.height));var a=this.viewportFrame;a.x=r.x*o,a.y=r.y*o,a.width=r.width*o,a.height=r.height*o,e||(a.y=s.view.height-(a.y+a.height)),a.ceil(),this.renderer.framebuffer.bind(n,a),this.renderer.projection.update(r,t,o,!n),e?this.renderer.mask.setMaskStack(i.maskStack):this.renderer.mask.setMaskStack(this.defaultMaskStack),this.sourceFrame.copyFrom(t),this.destinationFrame.copyFrom(r)},e.prototype.clear=function(e,t){e=this.current?e||this.current.baseTexture.clearColor:e||this.clearColor;var r=this.destinationFrame,i=this.current?this.current.baseTexture:this.renderer.screen,n=r.width!==i.width||r.height!==i.height;if(n){var o=this.viewportFrame,s=o.x,a=o.y,u=o.width,h=o.height;s=Math.round(s),a=Math.round(a),u=Math.round(u),h=Math.round(h),this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST),this.renderer.gl.scissor(s,a,u,h)}this.renderer.framebuffer.clear(e[0],e[1],e[2],e[3],t),n&&this.renderer.scissor.pop()},e.prototype.resize=function(){this.bind(null)},e.prototype.reset=function(){this.bind(null)},e.prototype.destroy=function(){this.renderer=null},e}();function ct(e,t,r,i,n){r.buffer.update(n)}var ft={float:"\n data[offset] = v;\n ",vec2:"\n data[offset] = v[0];\n data[offset+1] = v[1];\n ",vec3:"\n data[offset] = v[0];\n data[offset+1] = v[1];\n data[offset+2] = v[2];\n\n ",vec4:"\n data[offset] = v[0];\n data[offset+1] = v[1];\n data[offset+2] = v[2];\n data[offset+3] = v[3];\n ",mat2:"\n data[offset] = v[0];\n data[offset+1] = v[1];\n\n data[offset+4] = v[2];\n data[offset+5] = v[3];\n ",mat3:"\n data[offset] = v[0];\n data[offset+1] = v[1];\n data[offset+2] = v[2];\n\n data[offset + 4] = v[3];\n data[offset + 5] = v[4];\n data[offset + 6] = v[5];\n\n data[offset + 8] = v[6];\n data[offset + 9] = v[7];\n data[offset + 10] = v[8];\n ",mat4:"\n for(var i = 0; i < 16; i++)\n {\n data[offset + i] = v[i];\n }\n "},pt={float:4,vec2:8,vec3:12,vec4:16,int:4,ivec2:8,ivec3:12,ivec4:16,uint:4,uvec2:8,uvec3:12,uvec4:16,bool:4,bvec2:8,bvec3:12,bvec4:16,mat2:32,mat3:48,mat4:64};function mt(e){for(var t=e.map(function(e){return{data:e,offset:0,dataLen:0,dirty:0}}),r=0,i=0,n=0,o=0;o1&&(r=Math.max(r,16)*s.data.size),s.dataLen=r,i%r!=0&&i<16){var a=i%r%16;i+=a,n+=a}i+r>16?(n=16*Math.ceil(n/16),s.offset=n,n+=r,i=r):(s.offset=n,i+=r,n+=r)}return{uboElements:t,size:n=16*Math.ceil(n/16)}}function vt(e,t){var r=[];for(var i in e)t[i]&&r.push(t[i]);return r.sort(function(e,t){return e.index-t.index}),r}function gt(e,t){if(!e.autoManage)return{size:0,syncFunc:ct};for(var r=mt(vt(e.uniforms,t)),i=r.uboElements,n=r.size,o=["\n var v = null;\n var v2 = null;\n var cv = null;\n var t = 0;\n var gl = renderer.gl\n var index = 0;\n var data = buffer.data;\n "],s=0;s1){var f=Ee(a.data.type),p=Math.max(pt[a.data.type]/16,1),m=f/p,v=(4-m%4)%4;o.push("\n cv = ud."+h+".value;\n v = uv."+h+";\n offset = "+a.offset/4+";\n\n t = 0;\n\n for(var i=0; i < "+a.data.size*p+"; i++)\n {\n for(var j = 0; j < "+m+"; j++)\n {\n data[offset++] = v[t++];\n }\n offset += "+v+";\n }\n\n ")}else{var g=ft[a.data.type];o.push("\n cv = ud."+h+".value;\n v = uv."+h+";\n offset = "+a.offset/4+";\n "+g+";\n ")}}return o.push("\n renderer.buffer.update(buffer);\n "),{size:n,syncFunc:new Function("ud","uv","renderer","syncData","buffer",o.join("\n"))}}var yt=exports.IGLUniformData=function(){return function(){}}(),_t=exports.GLProgram=function(){function e(e,t){this.program=e,this.uniformData=t,this.uniformGroups={},this.uniformDirtyGroups={},this.uniformBufferBindings={}}return e.prototype.destroy=function(){this.uniformData=null,this.uniformGroups=null,this.uniformDirtyGroups=null,this.uniformBufferBindings=null,this.program=null},e}();function xt(e,t){for(var r={},i=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES),n=0;nt?1:-1});for(var s=0;s>=1,r++;this.stateId=e.data}for(r=0;rthis.checkCountMax&&(this.checkCount=0,this.run())))},e.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])},e.prototype.destroy=function(){this.renderer=null},e}();function Nt(e){var t,i,n,o,s,a,u,h,l,d,c,f,p,m,v,g,y,_,x,T,E,b,S;return"WebGL2RenderingContext"in globalThis&&e instanceof globalThis.WebGL2RenderingContext?((t={})[r.TYPES.UNSIGNED_BYTE]=((i={})[r.FORMATS.RGBA]=e.RGBA8,i[r.FORMATS.RGB]=e.RGB8,i[r.FORMATS.RG]=e.RG8,i[r.FORMATS.RED]=e.R8,i[r.FORMATS.RGBA_INTEGER]=e.RGBA8UI,i[r.FORMATS.RGB_INTEGER]=e.RGB8UI,i[r.FORMATS.RG_INTEGER]=e.RG8UI,i[r.FORMATS.RED_INTEGER]=e.R8UI,i[r.FORMATS.ALPHA]=e.ALPHA,i[r.FORMATS.LUMINANCE]=e.LUMINANCE,i[r.FORMATS.LUMINANCE_ALPHA]=e.LUMINANCE_ALPHA,i),t[r.TYPES.BYTE]=((n={})[r.FORMATS.RGBA]=e.RGBA8_SNORM,n[r.FORMATS.RGB]=e.RGB8_SNORM,n[r.FORMATS.RG]=e.RG8_SNORM,n[r.FORMATS.RED]=e.R8_SNORM,n[r.FORMATS.RGBA_INTEGER]=e.RGBA8I,n[r.FORMATS.RGB_INTEGER]=e.RGB8I,n[r.FORMATS.RG_INTEGER]=e.RG8I,n[r.FORMATS.RED_INTEGER]=e.R8I,n),t[r.TYPES.UNSIGNED_SHORT]=((o={})[r.FORMATS.RGBA_INTEGER]=e.RGBA16UI,o[r.FORMATS.RGB_INTEGER]=e.RGB16UI,o[r.FORMATS.RG_INTEGER]=e.RG16UI,o[r.FORMATS.RED_INTEGER]=e.R16UI,o[r.FORMATS.DEPTH_COMPONENT]=e.DEPTH_COMPONENT16,o),t[r.TYPES.SHORT]=((s={})[r.FORMATS.RGBA_INTEGER]=e.RGBA16I,s[r.FORMATS.RGB_INTEGER]=e.RGB16I,s[r.FORMATS.RG_INTEGER]=e.RG16I,s[r.FORMATS.RED_INTEGER]=e.R16I,s),t[r.TYPES.UNSIGNED_INT]=((a={})[r.FORMATS.RGBA_INTEGER]=e.RGBA32UI,a[r.FORMATS.RGB_INTEGER]=e.RGB32UI,a[r.FORMATS.RG_INTEGER]=e.RG32UI,a[r.FORMATS.RED_INTEGER]=e.R32UI,a[r.FORMATS.DEPTH_COMPONENT]=e.DEPTH_COMPONENT24,a),t[r.TYPES.INT]=((u={})[r.FORMATS.RGBA_INTEGER]=e.RGBA32I,u[r.FORMATS.RGB_INTEGER]=e.RGB32I,u[r.FORMATS.RG_INTEGER]=e.RG32I,u[r.FORMATS.RED_INTEGER]=e.R32I,u),t[r.TYPES.FLOAT]=((h={})[r.FORMATS.RGBA]=e.RGBA32F,h[r.FORMATS.RGB]=e.RGB32F,h[r.FORMATS.RG]=e.RG32F,h[r.FORMATS.RED]=e.R32F,h[r.FORMATS.DEPTH_COMPONENT]=e.DEPTH_COMPONENT32F,h),t[r.TYPES.HALF_FLOAT]=((l={})[r.FORMATS.RGBA]=e.RGBA16F,l[r.FORMATS.RGB]=e.RGB16F,l[r.FORMATS.RG]=e.RG16F,l[r.FORMATS.RED]=e.R16F,l),t[r.TYPES.UNSIGNED_SHORT_5_6_5]=((d={})[r.FORMATS.RGB]=e.RGB565,d),t[r.TYPES.UNSIGNED_SHORT_4_4_4_4]=((c={})[r.FORMATS.RGBA]=e.RGBA4,c),t[r.TYPES.UNSIGNED_SHORT_5_5_5_1]=((f={})[r.FORMATS.RGBA]=e.RGB5_A1,f),t[r.TYPES.UNSIGNED_INT_2_10_10_10_REV]=((p={})[r.FORMATS.RGBA]=e.RGB10_A2,p[r.FORMATS.RGBA_INTEGER]=e.RGB10_A2UI,p),t[r.TYPES.UNSIGNED_INT_10F_11F_11F_REV]=((m={})[r.FORMATS.RGB]=e.R11F_G11F_B10F,m),t[r.TYPES.UNSIGNED_INT_5_9_9_9_REV]=((v={})[r.FORMATS.RGB]=e.RGB9_E5,v),t[r.TYPES.UNSIGNED_INT_24_8]=((g={})[r.FORMATS.DEPTH_STENCIL]=e.DEPTH24_STENCIL8,g),t[r.TYPES.FLOAT_32_UNSIGNED_INT_24_8_REV]=((y={})[r.FORMATS.DEPTH_STENCIL]=e.DEPTH32F_STENCIL8,y),S=t):((_={})[r.TYPES.UNSIGNED_BYTE]=((x={})[r.FORMATS.RGBA]=e.RGBA,x[r.FORMATS.RGB]=e.RGB,x[r.FORMATS.ALPHA]=e.ALPHA,x[r.FORMATS.LUMINANCE]=e.LUMINANCE,x[r.FORMATS.LUMINANCE_ALPHA]=e.LUMINANCE_ALPHA,x),_[r.TYPES.UNSIGNED_SHORT_5_6_5]=((T={})[r.FORMATS.RGB]=e.RGB,T),_[r.TYPES.UNSIGNED_SHORT_4_4_4_4]=((E={})[r.FORMATS.RGBA]=e.RGBA,E),_[r.TYPES.UNSIGNED_SHORT_5_5_5_1]=((b={})[r.FORMATS.RGBA]=e.RGBA,b),S=_),S}var Dt=exports.GLTexture=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=r.TYPES.UNSIGNED_BYTE,this.internalFormat=r.FORMATS.RGBA,this.samplerType=0}}(),Lt=exports.TextureSystem=function(){function e(e){this.renderer=e,this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new g,this.hasIntegerTextures=!1}return e.prototype.contextChange=function(){var e=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion,this.internalFormats=Nt(e);var t=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=t;for(var r=0;r=0;--o){var s=t[o];if(s)s._glTextures[n].samplerType!==r.SAMPLER_TYPES.FLOAT&&this.renderer.texture.unbind(s)}},e.prototype.initTexture=function(e){var t=new Dt(this.gl.createTexture());return t.dirtyId=-1,e._glTextures[this.CONTEXT_UID]=t,this.managedTextures.push(e),e.on("dispose",this.destroyTexture,this),t},e.prototype.initTextureType=function(e,t){var i,n;t.internalFormat=null!==(n=null===(i=this.internalFormats[e.type])||void 0===i?void 0:i[e.format])&&void 0!==n?n:e.format,2===this.webGLVersion&&e.type===r.TYPES.HALF_FLOAT?t.type=this.gl.HALF_FLOAT:t.type=e.type},e.prototype.updateTexture=function(e){var t=e._glTextures[this.CONTEXT_UID];if(t){var i=this.renderer;if(this.initTextureType(e,t),e.resource&&e.resource.upload(i,e,t))t.samplerType!==r.SAMPLER_TYPES.FLOAT&&(this.hasIntegerTextures=!0);else{var n=e.realWidth,o=e.realHeight,s=i.gl;(t.width!==n||t.height!==o||t.dirtyId<0)&&(t.width=n,t.height=o,s.texImage2D(e.target,0,t.internalFormat,n,o,0,e.format,t.type,null))}e.dirtyStyleId!==t.dirtyStyleId&&this.updateTextureStyle(e),t.dirtyId=e.dirtyId}},e.prototype.destroyTexture=function(e,t){var r=this.gl;if((e=e.castToBaseTexture())._glTextures[this.CONTEXT_UID]&&(this.unbind(e),r.deleteTexture(e._glTextures[this.CONTEXT_UID].texture),e.off("dispose",this.destroyTexture,this),delete e._glTextures[this.CONTEXT_UID],!t)){var n=this.managedTextures.indexOf(e);-1!==n&&(0,i.removeItems)(this.managedTextures,n,1)}},e.prototype.updateTextureStyle=function(e){var t=e._glTextures[this.CONTEXT_UID];t&&(e.mipmap!==r.MIPMAP_MODES.POW2&&2===this.webGLVersion||e.isPowerOfTwo?t.mipmap=e.mipmap>=1:t.mipmap=!1,2===this.webGLVersion||e.isPowerOfTwo?t.wrapMode=e.wrapMode:t.wrapMode=r.WRAP_MODES.CLAMP,e.resource&&e.resource.style(this.renderer,e,t)||this.setStyle(e,t),t.dirtyStyleId=e.dirtyStyleId)},e.prototype.setStyle=function(e,t){var i=this.gl;if(t.mipmap&&e.mipmap!==r.MIPMAP_MODES.ON_MANUAL&&i.generateMipmap(e.target),i.texParameteri(e.target,i.TEXTURE_WRAP_S,t.wrapMode),i.texParameteri(e.target,i.TEXTURE_WRAP_T,t.wrapMode),t.mipmap){i.texParameteri(e.target,i.TEXTURE_MIN_FILTER,e.scaleMode===r.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===r.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===r.SCALE_MODES.LINEAR?i.LINEAR:i.NEAREST);i.texParameteri(e.target,i.TEXTURE_MAG_FILTER,e.scaleMode===r.SCALE_MODES.LINEAR?i.LINEAR:i.NEAREST)},e.prototype.destroy=function(){this.renderer=null},e}(),Ut={__proto__:null,FilterSystem:J,BatchSystem:te,ContextSystem:ie,FramebufferSystem:se,GeometrySystem:ue,MaskSystem:rt,ScissorSystem:st,StencilSystem:at,ProjectionSystem:ut,RenderTextureSystem:dt,ShaderSystem:Rt,StateSystem:Pt,TextureGCSystem:Bt,TextureSystem:Lt},Gt=new a.Matrix,kt=exports.AbstractRenderer=function(e){function n(n,o){void 0===n&&(n=r.RENDERER_TYPE.UNKNOWN);var s=e.call(this)||this;return o=Object.assign({},t.settings.RENDER_OPTIONS,o),s.options=o,s.type=n,s.screen=new a.Rectangle(0,0,o.width,o.height),s.view=o.view||t.settings.ADAPTER.createCanvas(),s.resolution=o.resolution||t.settings.RESOLUTION,s.useContextAlpha=o.useContextAlpha,s.autoDensity=!!o.autoDensity,s.preserveDrawingBuffer=o.preserveDrawingBuffer,s.clearBeforeRender=o.clearBeforeRender,s._backgroundColor=0,s._backgroundColorRgba=[0,0,0,1],s._backgroundColorString="#000000",s.backgroundColor=o.backgroundColor||s._backgroundColor,s.backgroundAlpha=o.backgroundAlpha,void 0!==o.transparent&&((0,i.deprecation)("6.0.0","Option transparent is deprecated, please use backgroundAlpha instead."),s.useContextAlpha=o.transparent,s.backgroundAlpha=o.transparent?0:1),s._lastObjectRendered=null,s.plugins={},s}return d(n,e),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.view.width=Math.round(e*this.resolution),this.view.height=Math.round(t*this.resolution);var r=this.view.width/this.resolution,i=this.view.height/this.resolution;this.screen.width=r,this.screen.height=i,this.autoDensity&&(this.view.style.width=r+"px",this.view.style.height=i+"px"),this.emit("resize",r,i)},n.prototype.generateTexture=function(e,t,r,n){void 0===t&&(t={}),"number"==typeof t&&((0,i.deprecation)("6.1.0","generateTexture options (scaleMode, resolution, region) are now object options."),t={scaleMode:t,resolution:r,region:n});var o=t.region,s=f(t,["region"]);0===(n=o||e.getLocalBounds(null,!0)).width&&(n.width=1),0===n.height&&(n.height=1);var a=N.create(c({width:n.width,height:n.height},s));return Gt.tx=-n.x,Gt.ty=-n.y,this.render(e,{renderTexture:a,clear:!1,transform:Gt,skipUpdateTransform:!!e.parent}),a},n.prototype.destroy=function(e){for(var t in this.plugins)this.plugins[t].destroy(),this.plugins[t]=null;e&&this.view.parentNode&&this.view.parentNode.removeChild(this.view);this.plugins=null,this.type=r.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,i.hex2string)(e),(0,i.hex2rgb)(e,this._backgroundColorRgba)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"backgroundAlpha",{get:function(){return this._backgroundColorRgba[3]},set:function(e){this._backgroundColorRgba[3]=e},enumerable:!1,configurable:!0}),n}(i.EventEmitter),Vt=function(){return function(e){this.buffer=e||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}}(),Ht=function(){function e(e){this.renderer=e,this.managedBuffers={},this.boundBufferBases={}}return e.prototype.destroy=function(){this.renderer=null},e.prototype.contextChange=function(){this.disposeAll(!0),this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID},e.prototype.bind=function(e){var t=this.gl,r=this.CONTEXT_UID,i=e._glBuffers[r]||this.createGLBuffer(e);t.bindBuffer(e.type,i.buffer)},e.prototype.bindBufferBase=function(e,t){var r=this.gl,i=this.CONTEXT_UID;if(this.boundBufferBases[t]!==e){var n=e._glBuffers[i]||this.createGLBuffer(e);this.boundBufferBases[t]=e,r.bindBufferBase(r.UNIFORM_BUFFER,t,n.buffer)}},e.prototype.bindBufferRange=function(e,t,r){var i=this.gl,n=this.CONTEXT_UID;r=r||0;var o=e._glBuffers[n]||this.createGLBuffer(e);i.bindBufferRange(i.UNIFORM_BUFFER,t||0,o.buffer,256*r,256)},e.prototype.update=function(e){var t=this.gl,r=this.CONTEXT_UID,i=e._glBuffers[r];if(e._updateID!==i.updateID)if(i.updateID=e._updateID,t.bindBuffer(e.type,i.buffer),i.byteLength>=e.data.byteLength)t.bufferSubData(e.type,0,e.data);else{var n=e.static?t.STATIC_DRAW:t.DYNAMIC_DRAW;i.byteLength=e.data.byteLength,t.bufferData(e.type,e.data,n)}},e.prototype.dispose=function(e,t){if(this.managedBuffers[e.id]){delete this.managedBuffers[e.id];var r=e._glBuffers[this.CONTEXT_UID],i=this.gl;e.disposeRunner.remove(this),r&&(t||i.deleteBuffer(r.buffer),delete e._glBuffers[this.CONTEXT_UID])}},e.prototype.disposeAll=function(e){for(var t=Object.keys(this.managedBuffers),r=0;r=r.MSAA_QUALITY.HIGH?this.multisample=r.MSAA_QUALITY.HIGH:e>=r.MSAA_QUALITY.MEDIUM?this.multisample=r.MSAA_QUALITY.MEDIUM:e>=r.MSAA_QUALITY.LOW?this.multisample=r.MSAA_QUALITY.LOW:this.multisample=r.MSAA_QUALITY.NONE},t.prototype.addSystem=function(e,t){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},t.prototype.render=function(e,t){var r,n,o,s;if(t&&(t instanceof N?((0,i.deprecation)("6.0.0","Renderer#render arguments changed, use options instead."),r=t,n=arguments[2],o=arguments[3],s=arguments[4]):(r=t.renderTexture,n=t.clear,o=t.transform,s=t.skipUpdateTransform)),this.renderingToScreen=!r,this.runners.prerender.emit(),this.emit("prerender"),this.projection.transform=o,!this.context.isLost){if(r||(this._lastObjectRendered=e),!s){var a=e.enableTempParent();e.updateTransform(),e.disableTempParent(a)}this.renderTexture.bind(r),this.batch.currentRenderer.start(),(void 0!==n?n:this.clearBeforeRender)&&this.renderTexture.clear(),e.render(this),this.batch.currentRenderer.flush(),r&&r.baseTexture.update(),this.runners.postrender.emit(),this.projection.transform=null,this.emit("postrender")}},t.prototype.generateTexture=function(t,r,i,n){void 0===r&&(r={});var o=e.prototype.generateTexture.call(this,t,r,i,n);return this.framebuffer.blit(),o},t.prototype.resize=function(t,r){e.prototype.resize.call(this,t,r),this.runners.resize.emit(this.screen.height,this.screen.width)},t.prototype.reset=function(){return this.runners.reset.emit(),this},t.prototype.clear=function(){this.renderTexture.bind(),this.renderTexture.clear()},t.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},Object.defineProperty(t.prototype,"extract",{get:function(){return(0,i.deprecation)("6.0.0","Renderer#extract has been deprecated, please use Renderer#plugins.extract instead."),this.plugins.extract},enumerable:!1,configurable:!0}),t.registerPlugin=function(e,t){(0,i.deprecation)("6.5.0","Renderer.registerPlugin() has been deprecated, please use extensions.add() instead."),n.extensions.add({name:e,type:n.ExtensionType.RendererPlugin,ref:t})},t.__plugins={},t}(kt);function Xt(e){return jt.create(e)}n.extensions.handleByMap(n.ExtensionType.RendererPlugin,jt.__plugins);var zt="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}",Yt="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",Wt=exports.defaultVertex=zt,Kt=exports.defaultFilterVertex=Yt,Qt=exports.System=function(){function e(e){(0,i.deprecation)("6.1.0","System class is deprecated, implemement ISystem interface instead."),this.renderer=e}return e.prototype.destroy=function(){this.renderer=null},e}(),qt=exports.BatchDrawCall=function(){return function(){this.texArray=null,this.blend=0,this.type=r.DRAW_MODES.TRIANGLES,this.start=0,this.size=0,this.data=null}}(),Zt=exports.BatchTextureArray=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=++g._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 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);var t=this.renderer,i=t.width,s=t.height;e.x+e.width>i&&(e.width=i-e.x),e.y+e.height>s&&(e.height=s-e.y)},e.prototype.addChild=function(e){var t=this.pool.pop();t||((t=document.createElement("button")).style.width=o+"px",t.style.height=o+"px",t.style.backgroundColor=this.debug?"rgba(255,255,255,0.5)":"transparent",t.style.position="absolute",t.style.zIndex=a.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,i=e.target.displayObject,s=t.eventData;t.dispatchEvent(i,"click",s),t.dispatchEvent(i,"pointertap",s),t.dispatchEvent(i,"tap",s)},e.prototype._onFocus=function(e){e.target.getAttribute("aria-live")||e.target.setAttribute("aria-live","assertive");var t=this.renderer.plugins.interaction,i=e.target.displayObject,s=t.eventData;t.dispatchEvent(i,"mouseover",s)},e.prototype._onFocusOut=function(e){e.target.getAttribute("aria-live")||e.target.setAttribute("aria-live","polite");var t=this.renderer.plugins.interaction,i=e.target.displayObject,s=t.eventData;t.dispatchEvent(i,"mouseout",s)},e.prototype._onKeyDown=function(e){e.keyCode===n&&this.activate()},e.prototype._onMouseMove=function(e){0===e.movementX&&0===e.movementY||this.deactivate()},e.prototype.destroy=function(){this.destroyTouchHook(),this.div=null,globalThis.document.removeEventListener("mousemove",this._onMouseMove,!0),globalThis.removeEventListener("keydown",this._onKeyDown),this.pool=null,this.children=null,this.renderer=null},e.extension={name:"accessibility",type:[i.ExtensionType.RendererPlugin,i.ExtensionType.CanvasRendererPlugin]},e}(); },{"@pixi/display":"Yd2V","@pixi/utils":"+k8Z","@pixi/core":"3sUx"}],"5Nyr":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.interactiveTarget=exports.InteractionTrackingData=exports.InteractionManager=exports.InteractionEvent=exports.InteractionData=void 0;var t=require("@pixi/math"),e=require("@pixi/ticker"),i=require("@pixi/display"),n=require("@pixi/utils"),o=require("@pixi/core"),r=exports.InteractionData=function(){function e(){this.pressure=0,this.rotationAngle=0,this.twist=0,this.tangentialPressure=0,this.global=new t.Point,this.target=null,this.originalEvent=null,this.identifier=null,this.isPrimary=!1,this.button=0,this.buttons=0,this.width=0,this.height=0,this.tiltX=0,this.tiltY=0,this.pointerType=null,this.pressure=0,this.rotationAngle=0,this.twist=0,this.tangentialPressure=0}return Object.defineProperty(e.prototype,"pointerId",{get:function(){return this.identifier},enumerable:!1,configurable:!0}),e.prototype.getLocalPosition=function(t,e,i){return t.worldTransform.applyInverse(i||this.global,e)},e.prototype.copyEvent=function(t){"isPrimary"in t&&t.isPrimary&&(this.isPrimary=!0),this.button="button"in t&&t.button;var e="buttons"in t&&t.buttons;this.buttons=Number.isInteger(e)?e:"which"in t&&t.which,this.width="width"in t&&t.width,this.height="height"in t&&t.height,this.tiltX="tiltX"in t&&t.tiltX,this.tiltY="tiltY"in t&&t.tiltY,this.pointerType="pointerType"in t&&t.pointerType,this.pressure="pressure"in t&&t.pressure,this.rotationAngle="rotationAngle"in t&&t.rotationAngle,this.twist="twist"in t&&t.twist||0,this.tangentialPressure="tangentialPressure"in t&&t.tangentialPressure||0},e.prototype.reset=function(){this.isPrimary=!1},e}(),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)}var h=exports.InteractionEvent=function(){function t(){this.stopped=!1,this.stopsPropagatingAt=null,this.stopPropagationHint=!1,this.target=null,this.currentTarget=null,this.type=null,this.data=null}return t.prototype.stopPropagation=function(){this.stopped=!0,this.stopPropagationHint=!0,this.stopsPropagatingAt=this.currentTarget},t.prototype.reset=function(){this.stopped=!1,this.stopsPropagatingAt=null,this.stopPropagationHint=!1,this.currentTarget=null,this.target=null},t}(),p=exports.InteractionTrackingData=function(){function t(e){this._pointerId=e,this._flags=t.FLAGS.NONE}return t.prototype._doSet=function(t,e){this._flags=e?this._flags|t:this._flags&~t},Object.defineProperty(t.prototype,"pointerId",{get:function(){return this._pointerId},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"flags",{get:function(){return this._flags},set:function(t){this._flags=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"none",{get:function(){return this._flags===t.FLAGS.NONE},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"over",{get:function(){return 0!=(this._flags&t.FLAGS.OVER)},set:function(e){this._doSet(t.FLAGS.OVER,e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rightDown",{get:function(){return 0!=(this._flags&t.FLAGS.RIGHT_DOWN)},set:function(e){this._doSet(t.FLAGS.RIGHT_DOWN,e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"leftDown",{get:function(){return 0!=(this._flags&t.FLAGS.LEFT_DOWN)},set:function(e){this._doSet(t.FLAGS.LEFT_DOWN,e)},enumerable:!1,configurable:!0}),t.FLAGS=Object.freeze({NONE:0,OVER:1,LEFT_DOWN:2,RIGHT_DOWN:4}),t}(),c=function(){function e(){this._tempPoint=new t.Point}return e.prototype.recursiveFindHit=function(t,e,i,n,o){var r;if(!e||!e.visible)return!1;var s=t.data.global,a=!1,h=o=e.interactive||o,p=!0;if(e.hitArea)n&&(e.worldTransform.applyInverse(s,this._tempPoint),e.hitArea.contains(this._tempPoint.x,this._tempPoint.y)?a=!0:(n=!1,p=!1)),h=!1;else if(e._mask&&n){var c=e._mask.isMaskData?e._mask.maskObject:e._mask;c&&!(null===(r=c.containsPoint)||void 0===r?void 0:r.call(c,s))&&(n=!1)}if(p&&e.interactiveChildren&&e.children)for(var u=e.children,l=u.length-1;l>=0;l--){var v=u[l],d=this.recursiveFindHit(t,v,i,n,h);if(d){if(!v.parent)continue;h=!1,d&&(t.target&&(n=!1),a=!0)}}return o&&(n&&!t.target&&!e.hitArea&&e.containsPoint&&e.containsPoint(s)&&(a=!0),e.interactive&&(a&&!t.target&&(t.target=e),i&&i(t,e,!!a))),a},e.prototype.findHit=function(t,e,i,n){this.recursiveFindHit(t,e,i,n,!1)},e}(),u=exports.interactiveTarget={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};i.DisplayObject.mixin(u);var l=1,v={target:null,data:{global:null}},d=exports.InteractionManager=function(t){function n(e,n){var o=t.call(this)||this;return n=n||{},o.renderer=e,o.autoPreventDefault=void 0===n.autoPreventDefault||n.autoPreventDefault,o.interactionFrequency=n.interactionFrequency||10,o.mouse=new r,o.mouse.identifier=l,o.mouse.global.set(-999999),o.activeInteractionData={},o.activeInteractionData[l]=o.mouse,o.interactionDataPool=[],o.eventData=new h,o.interactionDOMElement=null,o.moveWhenInside=!1,o.eventsAdded=!1,o.tickerAdded=!1,o.mouseOverRenderer=!("PointerEvent"in globalThis),o.supportsTouchEvents="ontouchstart"in globalThis,o.supportsPointerEvents=!!globalThis.PointerEvent,o.onPointerUp=o.onPointerUp.bind(o),o.processPointerUp=o.processPointerUp.bind(o),o.onPointerCancel=o.onPointerCancel.bind(o),o.processPointerCancel=o.processPointerCancel.bind(o),o.onPointerDown=o.onPointerDown.bind(o),o.processPointerDown=o.processPointerDown.bind(o),o.onPointerMove=o.onPointerMove.bind(o),o.processPointerMove=o.processPointerMove.bind(o),o.onPointerOut=o.onPointerOut.bind(o),o.processPointerOverOut=o.processPointerOverOut.bind(o),o.onPointerOver=o.onPointerOver.bind(o),o.cursorStyles={default:"inherit",pointer:"pointer"},o.currentCursorMode=null,o.cursor=null,o.resolution=1,o.delayedEvents=[],o.search=new c,o._tempDisplayObject=new i.TemporaryDisplayObject,o._eventListenerOptions={capture:!0,passive:!1},o._useSystemTicker=void 0===n.useSystemTicker||n.useSystemTicker,o.setTargetElement(o.renderer.view,o.renderer.resolution),o}return a(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 v.target=null,v.data.global=t,e||(e=this.lastObjectRendered),this.processInteractive(v,e,null,!0),v.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;globalThis.navigator.msPointerEnabled?(t.msContentZooming="none",t.msTouchAction="none"):this.supportsPointerEvents&&(t.touchAction="none"),this.supportsPointerEvents?(globalThis.document.addEventListener("pointermove",this.onPointerMove,this._eventListenerOptions),this.interactionDOMElement.addEventListener("pointerdown",this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.addEventListener("pointerleave",this.onPointerOut,this._eventListenerOptions),this.interactionDOMElement.addEventListener("pointerover",this.onPointerOver,this._eventListenerOptions),globalThis.addEventListener("pointercancel",this.onPointerCancel,this._eventListenerOptions),globalThis.addEventListener("pointerup",this.onPointerUp,this._eventListenerOptions)):(globalThis.document.addEventListener("mousemove",this.onPointerMove,this._eventListenerOptions),this.interactionDOMElement.addEventListener("mousedown",this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.addEventListener("mouseout",this.onPointerOut,this._eventListenerOptions),this.interactionDOMElement.addEventListener("mouseover",this.onPointerOver,this._eventListenerOptions),globalThis.addEventListener("mouseup",this.onPointerUp,this._eventListenerOptions)),this.supportsTouchEvents&&(this.interactionDOMElement.addEventListener("touchstart",this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.addEventListener("touchcancel",this.onPointerCancel,this._eventListenerOptions),this.interactionDOMElement.addEventListener("touchend",this.onPointerUp,this._eventListenerOptions),this.interactionDOMElement.addEventListener("touchmove",this.onPointerMove,this._eventListenerOptions)),this.eventsAdded=!0}},n.prototype.removeEvents=function(){if(this.eventsAdded&&this.interactionDOMElement){var t=this.interactionDOMElement.style;globalThis.navigator.msPointerEnabled?(t.msContentZooming="",t.msTouchAction=""):this.supportsPointerEvents&&(t.touchAction=""),this.supportsPointerEvents?(globalThis.document.removeEventListener("pointermove",this.onPointerMove,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("pointerdown",this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("pointerleave",this.onPointerOut,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("pointerover",this.onPointerOver,this._eventListenerOptions),globalThis.removeEventListener("pointercancel",this.onPointerCancel,this._eventListenerOptions),globalThis.removeEventListener("pointerup",this.onPointerUp,this._eventListenerOptions)):(globalThis.document.removeEventListener("mousemove",this.onPointerMove,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("mousedown",this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("mouseout",this.onPointerOut,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("mouseover",this.onPointerOver,this._eventListenerOptions),globalThis.removeEventListener("mouseup",this.onPointerUp,this._eventListenerOptions)),this.supportsTouchEvents&&(this.interactionDOMElement.removeEventListener("touchstart",this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("touchcancel",this.onPointerCancel,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("touchend",this.onPointerUp,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("touchmove",this.onPointerMove,this._eventListenerOptions)),this.interactionDOMElement=null,this.eventsAdded=!1}},n.prototype.tickerUpdate=function(t){this._deltaTime+=t,this._deltaTime0&&(r=t.composedPath()[0]);for(var s=r!==this.interactionDOMElement?"outside":"",a=0;a=2?u.multisample:e.MSAA_QUALITY.NONE;if(s=this.renderer.generateTexture(t,{multisample:f}),f!==e.MSAA_QUALITY.NONE){var l=i.RenderTexture.create({width:s.width,height:s.height});u.framebuffer.bind(s.framebuffer),u.framebuffer.blit(l.framebuffer),u.framebuffer.bind(null),s.destroy(!0),s=l}d=!0}s?(o=s.baseTexture.resolution,r=null!=r?r:s.frame,h=!1,u.renderTexture.bind(s)):(o=u.resolution,r||((r=n).width=u.width,r.height=u.height),h=!0,u.renderTexture.bind(null));var x=Math.round(r.width*o),p=Math.round(r.height*o),c=new Uint8Array(a*x*p),v=u.gl;return v.readPixels(Math.round(r.x*o),Math.round(r.y*o),x,p,v.RGBA,v.UNSIGNED_BYTE,c),d&&s.destroy(!0),{pixels:c,width:x,height:p,flipY:h}},r.prototype.destroy=function(){this.renderer=null},r.arrayPostDivide=function(e,t){for(var r=0;r0||e.responseType===t.XHR_RESPONSE_TYPE.BUFFER)?i=u:i===l&&(i=d),(i/100|0)===p){if(this.xhrType===t.XHR_RESPONSE_TYPE.TEXT)this.data=r,this.type=t.TYPE.TEXT;else if(this.xhrType===t.XHR_RESPONSE_TYPE.JSON)try{this.data=JSON.parse(r),this.type=t.TYPE.JSON}catch(o){return void this.abort("Error trying to parse loaded json: "+o)}else if(this.xhrType===t.XHR_RESPONSE_TYPE.DOCUMENT)try{if(globalThis.DOMParser){var s=new DOMParser;this.data=s.parseFromString(r,"text/xml")}else{var n=document.createElement("div");n.innerHTML=r,this.data=n}this.type=t.TYPE.XML}catch(a){return void this.abort("Error trying to parse loaded xml: "+a)}else this.data=e.response||r;this.complete()}else this.abort("["+e.status+"] "+e.statusText+": "+e.responseURL)},t.prototype._determineCrossOrigin=function(t,e){if(0===t.indexOf("data:"))return"";if(globalThis.origin!==globalThis.location.origin)return"anonymous";e=e||globalThis.location,a||(a=document.createElement("a")),a.href=t;var r=o(a.href,{strictMode:!0}),i=!r.port&&""===e.port||r.port===e.port,s=r.protocol?r.protocol+":":"";return r.host===e.hostname&&i&&s===e.protocol?"":"anonymous"},t.prototype._determineXhrType=function(){return t._xhrTypeMap[this.extension]||t.XHR_RESPONSE_TYPE.TEXT},t.prototype._determineLoadType=function(){return t._loadTypeMap[this.extension]||t.LOAD_TYPE.XHR},t.prototype._getExtension=function(t){void 0===t&&(t=this.url);var 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()},t.prototype._getMimeFromXhrType=function(e){switch(e){case t.XHR_RESPONSE_TYPE.BUFFER:return"application/octet-binary";case t.XHR_RESPONSE_TYPE.BLOB:return"application/blob";case t.XHR_RESPONSE_TYPE.DOCUMENT:return"application/xml";case t.XHR_RESPONSE_TYPE.JSON:return"application/json";case t.XHR_RESPONSE_TYPE.DEFAULT:case t.XHR_RESPONSE_TYPE.TEXT:default:return"text/plain"}},t}();function T(){}function g(t){return function(){for(var e=arguments,r=[],i=0;i>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(n=0;n0&&t[t.length-1])&&(6===r[0]||2===r[0])){E=0;continue}if(3===r[0]&&(!t||r[1]>t[0]&&r[1]=33776&&_<=33779)return"s3tc";if(_>=37488&&_<=37497)return"etc";if(_>=35840&&_<=35843)return"pvrtc";if(_>=36196)return"etc1";if(_>=35986&&_<=34798)return"atc";throw new Error("Invalid (compressed) texture format given!")},e._createLevelBuffers=function(_,e,R,T,t,r,E){for(var O=new Array(R),G=_.byteOffset,S=r,M=E,D=S+T-1&~(T-1),n=M+t-1&~(t-1),I=D*n*A[e],o=0;o1?S:D,levelHeight:R>1?M:n,levelBuffer:new Uint8Array(_.buffer,G,I)},G+=I,I=(D=(S=S>>1||1)+T-1&~(T-1))*(n=(M=M>>1||1)+t-1&~(t-1))*A[e];return O},e}(I),a=exports.CompressedTextureLoader=function(){function _(){}return _.use=function(e,R){var r=e.data;if(e.type===T.LoaderResource.TYPE.JSON&&r&&r.cacheID&&r.textures){for(var E=r.textures,A=void 0,O=void 0,G=0,S=E.length;G>>=1,W>>>=1}var k=U;for(K=0;K1||0!==O?f:l,levelHeight:X>1||0!==O?L:c,levelBuffer:new Uint8Array(e,x,N)},x+=N}U=(U+=p+4)%4!=0?U+4-U%4:U,N=(l=(f=f>>1||1)+4-1&-4)*(c=(L=L>>1||1)+4-1&-4)*s}return 0!==O?{uncompressed:P.map(function(_){var e=_[0].levelBuffer,T=!1;return O===E.TYPES.FLOAT?e=new Float32Array(_[0].levelBuffer.buffer,_[0].levelBuffer.byteOffset,_[0].levelBuffer.byteLength/4):O===E.TYPES.UNSIGNED_INT?(T=!0,e=new Uint32Array(_[0].levelBuffer.buffer,_[0].levelBuffer.byteOffset,_[0].levelBuffer.byteLength/4)):O===E.TYPES.INT&&(T=!0,e=new Int32Array(_[0].levelBuffer.buffer,_[0].levelBuffer.byteOffset,_[0].levelBuffer.byteLength/4)),{resource:new R.BufferResource(e,{width:_[0].levelWidth,height:_[0].levelHeight}),type:O,format:T?__(G):G}}),kvData:C}:{compressed:P.map(function(_){return new o(null,{format:S,width:M,height:D,levels:X,levelBuffers:_})}),kvData:C}}function $(_,e){for(var R=0;Re-t){console.error("KTXLoader: keyAndValueByteSize out of bounds");break}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,p=u.alphaMode>0;this.state.blendMode=(0,i.correctBlendMode)(t.blendMode,p),a.state.set(this.state);var h=a.gl,d=t.worldTransform.copyTo(this.tempMatrix);d.prepend(a.globalUniforms.uniforms.projectionMatrix),this.shader.uniforms.translationMatrix=d.toArray(!0),this.shader.uniforms.uColor=(0,i.premultiplyRgba)(t.tintRgb,t.worldAlpha,this.shader.uniforms.uColor,p),this.shader.uniforms.uSampler=u,this.renderer.shader.bind(this.shader);for(var l=!1,c=0,f=0;co&&(y=o),f>=s.length&&s.push(this._generateOneMoreBuffer(t));var v=s[f];v.uploadDynamic(e,c,y);var m=t._bufferUpdateIDs[f]||0;(l=l||v._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.extension={name:"particle",type:r.ExtensionType.RendererPlugin},a}(r.ObjectRenderer); },{"@pixi/constants":"UTLU","@pixi/display":"Yd2V","@pixi/utils":"+k8Z","@pixi/core":"3sUx","@pixi/math":"4NJu"}],"zdy7":[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"),h=require("@pixi/display");!function(t){t.MITER="miter",t.BEVEL="bevel",t.ROUND="round"}(t||(exports.LINE_JOIN=t={})),function(t){t.BUTT="butt",t.ROUND="round",t.SQUARE="square"}(e||(exports.LINE_CAP=e={}));var a=exports.GRAPHICS_CURVES={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}},o=exports.FillStyle=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}(),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)}function p(t,e){var i,r;void 0===e&&(e=!1);var s=t.length;if(!(s<6)){for(var n=0,h=0,a=t[s-2],o=t[s-1];h0||e&&n<=0){var p=s/2;for(h=p+p%2;h=6){p(i,!1);for(var a=[],o=0;o=0&&a>=0&&s>=0&&n>=0){var d=Math.ceil(2.3*Math.sqrt(h+a)),y=8*d+(s?4:0)+(n?4:0);if(o.length=y,0!==y){if(0===d)return o.length=8,o[0]=o[6]=e+s,o[1]=o[3]=i+n,o[2]=o[4]=e-s,void(o[5]=o[7]=i-n);var v=0,g=4*d+(s?2:0)+2,b=g,x=y,m=e+(D=s+h),_=e-D,S=i+(T=n);if(o[v++]=m,o[v++]=S,o[--g]=S,o[--g]=_,n){var P=i-T;o[b++]=_,o[b++]=P,o[--x]=P,o[--x]=m}for(var w=1;wp&&(p+=2*Math.PI);var c=u,f=p-u,d=Math.abs(f),y=Math.sqrt(o*o+l*l),v=1+(15*d*Math.sqrt(y)/Math.PI>>0),g=f/v;if(c+=g,a){h.push(t,e),h.push(i,r);for(var b=1,x=c;b=0&&(l.join===t.ROUND?m+=x(T,A,T-C*N,A-I*N,T-B*N,A-L*N,v,!1)+4:m+=2,v.push(T-B*H,A-L*H),v.push(T+B*N,A+L*N));else{var Y=(-C+M)*(-I+A)-(-C+T)*(-I+D),Q=(-B+E)*(-L+A)-(-B+T)*(-L+R),X=(F*Q-z*Y)/W,J=(G*Y-q*Q)/W,Z=(X-T)*(X-T)+(J-A)*(J-A),K=T+(X-T)*N,$=A+(J-A)*N,tt=T-(X-T)*H,et=A-(J-A)*H,it=V?N:H;Z<=Math.min(F*F+q*q,z*z+G*G)+it*it*P?l.join===t.BEVEL||Z/P>w?(V?(v.push(K,$),v.push(T+C*H,A+I*H),v.push(K,$),v.push(T+B*H,A+L*H)):(v.push(T-C*N,A-I*N),v.push(tt,et),v.push(T-B*N,A-L*N),v.push(tt,et)),m+=2):l.join===t.ROUND?V?(v.push(K,$),v.push(T+C*H,A+I*H),m+=x(T,A,T+C*H,A+I*H,T+B*H,A+L*H,v,!0)+4,v.push(K,$),v.push(T+B*H,A+L*H)):(v.push(T-C*N,A-I*N),v.push(tt,et),m+=x(T,A,T-C*N,A-I*N,T-B*N,A-L*N,v,!1)+4,v.push(T-B*N,A-L*N),v.push(tt,et)):(v.push(K,$),v.push(tt,et)):(v.push(T-C*N,A-I*N),v.push(T+C*H,A+I*H),l.join===t.ROUND?m+=V?x(T,A,T+C*H,A+I*H,T+B*H,A+L*H,v,!0)+2:x(T,A,T-C*N,A-I*N,T-B*N,A-L*N,v,!1)+2:l.join===t.MITER&&Z/P<=w&&(V?(v.push(tt,et),v.push(tt,et)):(v.push(K,$),v.push(K,$)),m+=2),v.push(T-B*N,A-L*N),v.push(T+B*H,A+L*H),m+=2)}}M=h[2*(g-2)],D=h[2*(g-2)+1],T=h[2*(g-1)],C=-(D-(A=h[2*(g-1)+1])),I=M-T,C/=O=Math.sqrt(C*C+I*I),I/=O,C*=S,I*=S,v.push(T-C*N,A-I*N),v.push(T+C*H,A+I*H),c||(l.cap===e.ROUND?m+=x(T-C*(N-H)*.5,A-I*(N-H)*.5,T-C*N,A-I*N,T+C*H,A+I*H,v,!1)+2:l.cap===e.SQUARE&&(m+=b(T,A,C,I,N,H,!1,v)));var rt=s.indices,st=a.epsilon*a.epsilon;for(j=_;ju*a}},t.arc=function(t,e,i,s,n,h,o,l,u){for(var p=o-h,c=a._segmentsCount(Math.abs(p)*n,40*Math.ceil(Math.abs(p)/r.PI_2)),f=p/(2*c),d=2*f,y=Math.cos(f),v=Math.sin(f),g=c-1,b=g%1/g,x=0;x<=g;++x){var m=f+h+d*(x+b*x),_=Math.cos(m),S=-Math.sin(m);u.push((y*_+v*S)*n+i,(y*-S+v*_)*n+s)}},t}(),M=function(){function t(){}return t.curveLength=function(t,e,i,r,s,n,h,a){for(var o=0,l=0,u=0,p=0,c=0,f=0,d=0,y=0,v=0,g=0,b=0,x=t,m=e,_=1;_<=10;++_)g=x-(y=(d=(f=(c=1-(l=_/10))*c)*c)*t+3*f*l*i+3*c*(u=l*l)*s+(p=u*l)*h),b=m-(v=d*e+3*f*l*r+3*c*u*n+p*a),x=y,m=v,o+=Math.sqrt(g*g+b*b);return o},t.curveTo=function(e,i,r,s,n,h,o){var l=o[o.length-2],u=o[o.length-1];o.length-=2;var p=a._segmentsCount(t.curveLength(l,u,e,i,r,s,n,h)),c=0,f=0,d=0,y=0,v=0;o.push(l,u);for(var g=1,b=0;g<=p;++g)d=(f=(c=1-(b=g/p))*c)*c,v=(y=b*b)*b,o.push(d*l+3*f*b*e+3*c*y*r+v*n,d*u+3*f*b*i+3*c*y*s+v*h)},t}(),D=function(){function t(){}return t.curveLength=function(t,e,i,r,s,n){var h=t-2*i+s,a=e-2*r+n,o=2*i-2*t,l=2*r-2*e,u=4*(h*h+a*a),p=4*(h*o+a*l),c=o*o+l*l,f=2*Math.sqrt(u+p+c),d=Math.sqrt(u),y=2*u*d,v=2*Math.sqrt(c),g=p/d;return(y*f+d*p*(f-v)+(4*c*u-p*p)*Math.log((2*d+g+f)/(g+v)))/(4*y)},t.curveTo=function(e,i,r,s,n){for(var h=n[n.length-2],o=n[n.length-1],l=a._segmentsCount(t.curveLength(h,o,e,i,r,s)),u=0,p=0,c=1;c<=l;++c){var f=c/l;u=h+(e-h)*f,p=o+(i-o)*f,n.push(u+(e+(r-e)*f-u)*f,p+(i+(s-i)*f-p)*f)}},t}(),T=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}(),A=((P={})[r.SHAPES.POLY]=c,P[r.SHAPES.CIRC]=f,P[r.SHAPES.ELIP]=f,P[r.SHAPES.RECT]=d,P[r.SHAPES.RREC]=g,P),E=[],R=[],C=exports.GraphicsData=function(){function t(t,e,i,r){void 0===e&&(e=null),void 0===i&&(i=null),void 0===r&&(r=null),this.points=[],this.holes=[],this.shape=t,this.lineStyle=i,this.fillStyle=e,this.matrix=r,this.type=t.type}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}(),I=new r.Point,B=exports.GraphicsGeometry=function(t){function e(){var e=t.call(this)||this;return e.closePointEps=1e-4,e.boundsPadding=0,e.uvsFloat32=null,e.indicesUint16=null,e.batchable=!1,e.points=[],e.colors=[],e.uvs=[],e.indices=[],e.textureIds=[],e.graphicsData=[],e.drawCalls=[],e.batchDirty=-1,e.batches=[],e.dirty=0,e.cacheDirty=-1,e.clearDirty=0,e.shapeIndex=0,e._bounds=new h.Bounds,e.boundsDirty=-1,e}return u(e,t),Object.defineProperty(e.prototype,"bounds",{get:function(){return this.updateBatches(),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 C(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 C(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&&(r=(i=this.batches[this.batches.length-1]).style);for(var s=this.shapeIndex;s65535;this.indicesUint16&&this.indices.length===this.indicesUint16.length&&g===this.indicesUint16.BYTES_PER_ELEMENT>2?this.indicesUint16.set(this.indices):this.indicesUint16=g?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&&((h=R.pop())||((h=new i.BatchDrawCall).texArray=new i.BatchTextureArray),this.drawCalls.push(h)),h.start=c,h.size=0,h.texArray.count=0,h.type=p),y.touched=1,y._batchEnabled=t,y._batchLocation=a,y.wrapMode=n.WRAP_MODES.REPEAT,h.texArray.elements[h.texArray.count++]=y,a++)),h.size+=f.size,c+=f.size,l=y._batchLocation,this.addColors(r,d.color,d.alpha,f.attribSize,f.attribStart),this.addTextureIds(s,l,f.attribSize,f.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),h=new Uint32Array(s),a=0,o=0;o>16)+(65280&e)+((255&e)<<16),a=(0,s.premultiplyTint)(h,i);t.length=Math.max(t.length,n+r);for(var o=0;o0&&r.alpha>0;return s?(r.matrix&&(r.matrix=r.matrix.clone(),r.matrix.invert()),Object.assign(this._lineStyle,{visible:s},r)):this._lineStyle.reset(),this},a.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},a.prototype.finishPoly=function(){this.currentPath&&(this.currentPath.points.length>2?(this.drawShape(this.currentPath),this.currentPath=null):this.currentPath.points.length=0)},a.prototype.moveTo=function(t,e){return this.startPoly(),this.currentPath.points[0]=t,this.currentPath.points[1]=e,this},a.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},a.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)},a.prototype.quadraticCurveTo=function(t,e,i,r){this._initCurve();var s=this.currentPath.points;return 0===s.length&&this.moveTo(0,0),D.curveTo(t,e,i,r,s),this},a.prototype.bezierCurveTo=function(t,e,i,r,s,n){return this._initCurve(),M.curveTo(t,e,i,r,s,n,this.currentPath.points),this},a.prototype.arcTo=function(t,e,i,r,s){this._initCurve(t,e);var n=this.currentPath.points,h=w.curveTo(t,e,i,r,s,n);if(h){var a=h.cx,o=h.cy,l=h.radius,u=h.startAngle,p=h.endAngle,c=h.anticlockwise;this.arc(a,o,l,u,p,c)}return this},a.prototype.arc=function(t,e,i,s,n,h){if(void 0===h&&(h=!1),s===n)return this;if(!h&&n<=s?n+=r.PI_2:h&&s<=n&&(s+=r.PI_2),0===n-s)return this;var a=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]-a),c=Math.abs(u[u.length-1]-o);p0;return e?(t.matrix&&(t.matrix=t.matrix.clone(),t.matrix.invert()),Object.assign(this._fillStyle,{visible:e},t)):this._fillStyle.reset(),this},a.prototype.endFill=function(){return this.finishPoly(),this._fillStyle.reset(),this},a.prototype.drawRect=function(t,e,i,s){return this.drawShape(new r.Rectangle(t,e,i,s))},a.prototype.drawRoundedRect=function(t,e,i,s,n){return this.drawShape(new r.RoundedRectangle(t,e,i,s,n))},a.prototype.drawCircle=function(t,e,i){return this.drawShape(new r.Circle(t,e,i))},a.prototype.drawEllipse=function(t,e,i,s){return this.drawShape(new r.Ellipse(t,e,i,s))},a.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 a=0,o=h.length;a>16)+(65280&n)+((255&n)<<16)}}},a.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,h=e.tx,a=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(c.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}),c}(i.Container); },{"@pixi/constants":"UTLU","@pixi/core":"3sUx","@pixi/display":"Yd2V","@pixi/math":"4NJu","@pixi/settings":"IJuH","@pixi/utils":"+k8Z"}],"f06f":[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)}!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=exports.TextStyle=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(b,i.breakWords))for(var w=t.wordWrapSplit(b),v=0;vd&&(a+=t.addLine(s),p=!1,s="",o=0),s+=T,o+=L}else{s.length>0&&(a+=t.addLine(s),s="",o=0);var A=_===y.length-1;a+=t.addLine(b,!A),p=!1,s="",o=0}else m+o>d&&(p=!1,a+=t.addLine(s),s="",o=0),(s.length>0||!t.isBreakingSpace(b)||p)&&(s+=b,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,i){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&&g>y&&(_=(y+g)/2);var b=y+d,S=r.lineHeight*(p+1),x=b;p+10},e}();function h(e,r){var i=!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&&i.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 g(e,r){return r instanceof t.BaseTexture&&(r._glTextures[e.CONTEXT_UID]||e.texture.bind(r),!0)}function T(e,t){if(!(t instanceof r.Graphics))return!1;var i=t.geometry;t.finishPoly(),i.updateBatches();for(var o=i.batches,n=0;n=n&&u.x=o&&u.y1?e.Shader.from(p,h,r):e.Shader.from(l,d,r)},r.prototype.render=function(e){var t=this.renderer,r=this.quad,i=r.vertices;i[0]=i[6]=e._width*-e.anchor.x,i[1]=i[3]=e._height*-e.anchor.y,i[2]=i[4]=e._width*(1-e.anchor.x),i[5]=i[7]=e._height*(1-e.anchor.y);var a=e.uvRespectAnchor?e.anchor.x:0,u=e.uvRespectAnchor?e.anchor.y:0;(i=r.uvs)[0]=i[6]=-a,i[1]=i[3]=-u,i[2]=i[4]=1-a,i[5]=i[7]=1-u,r.invalidate();var s=e._texture,c=s.baseTexture,l=c.alphaMode>0,d=e.tileTransform.localTransform,p=e.uvMatrix,h=c.isPowerOfTwo&&s.frame.width===c.width&&s.frame.height===c.height;h&&(c._glTextures[t.CONTEXT_UID]?h=c.wrapMode!==n.WRAP_MODES.CLAMP:c.wrapMode===n.WRAP_MODES.CLAMP&&(c.wrapMode=n.WRAP_MODES.REPEAT));var f=h?this.simpleShader:this.shader,x=s.width,v=s.height,_=e._width,g=e._height;m.set(d.a*x/_,d.b*x/g,d.c*v/_,d.d*v/g,d.tx/_,d.ty/g),m.invert(),h?m.prepend(p.mapCoord):(f.uniforms.uMapCoord=p.mapCoord.toArray(!0),f.uniforms.uClampFrame=p.uClampFrame,f.uniforms.uClampOffset=p.uClampOffset),f.uniforms.uTransform=m.toArray(!0),f.uniforms.uColor=(0,o.premultiplyTintToRgba)(e.tint,e.worldAlpha,f.uniforms.uColor,l),f.uniforms.translationMatrix=e.transform.worldTransform.toArray(!0),f.uniforms.uSampler=s,t.shader.bind(f),t.geometry.bind(r),this.state.blendMode=(0,o.correctBlendMode)(e.blendMode,l),t.state.set(this.state),t.geometry.draw(this.renderer.gl.TRIANGLES,6,0)},r.extension={name:"tilingSprite",type:e.ExtensionType.RendererPlugin},r}(e.ObjectRenderer); },{"@pixi/core":"3sUx","@pixi/math":"4NJu","@pixi/sprite":"p9l6","@pixi/constants":"UTLU","@pixi/utils":"+k8Z"}],"pTUz":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.MeshMaterial=exports.MeshGeometry=exports.MeshBatchUvs=exports.Mesh=void 0;var t=require("@pixi/core"),e=require("@pixi/math"),r=require("@pixi/constants"),i=require("@pixi/display"),n=require("@pixi/settings"),a=require("@pixi/utils"),o=function(t,e){return(o=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 s(t,e){function r(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var u=exports.MeshBatchUvs=function(){function t(t,e){this.uvBuffer=t,this.uvMatrix=e,this.data=null,this._bufferUpdateId=-1,this._textureUpdateId=-1,this._updateID=0}return t.prototype.update=function(t){if(t||this._bufferUpdateId!==this.uvBuffer._updateID||this._textureUpdateId!==this.uvMatrix._updateID){this._bufferUpdateId=this.uvBuffer._updateID,this._textureUpdateId=this.uvMatrix._updateID;var e=this.uvBuffer.data;this.data&&this.data.length===e.length||(this.data=new Float32Array(e.length)),this.uvMatrix.multiplyUvs(e,this.data),this._updateID++}},t}(),h=new e.Point,l=new e.Polygon,d=exports.Mesh=function(e){function i(i,a,o,s){void 0===s&&(s=r.DRAW_MODES.TRIANGLES);var u=e.call(this)||this;return u.geometry=i,u.shader=a,u.state=o||t.State.for2d(),u.drawMode=s,u.start=0,u.size=0,u.uvs=null,u.indices=null,u.vertexData=new Float32Array(1),u.vertexDirty=-1,u._transformID=-1,u._roundPixels=n.settings.ROUND_PIXELS,u.batchUvs=null,u}return s(i,e),Object.defineProperty(i.prototype,"geometry",{get:function(){return this._geometry},set:function(t){this._geometry!==t&&(this._geometry&&(this._geometry.refCount--,0===this._geometry.refCount&&this._geometry.dispose()),this._geometry=t,this._geometry&&this._geometry.refCount++,this.vertexDirty=-1)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"uvBuffer",{get:function(){return this.geometry.buffers[1]},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"verticesBuffer",{get:function(){return this.geometry.buffers[0]},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"material",{get:function(){return this.shader},set:function(t){this.shader=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"blendMode",{get:function(){return this.state.blendMode},set:function(t){this.state.blendMode=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"roundPixels",{get:function(){return this._roundPixels},set:function(t){this._roundPixels!==t&&(this._transformID=-1),this._roundPixels=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"tint",{get:function(){return"tint"in this.shader?this.shader.tint:null},set:function(t){this.shader.tint=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"texture",{get:function(){return"texture"in this.shader?this.shader.texture:null},set:function(t){this.shader.texture=t},enumerable:!1,configurable:!0}),i.prototype._render=function(t){var e=this.geometry.buffers[0].data;this.shader.batchable&&this.drawMode===r.DRAW_MODES.TRIANGLES&&e.length<2*i.BATCHABLE_SIZE?this._renderToBatch(t):this._renderDefault(t)},i.prototype._renderDefault=function(t){var e=this.shader;e.alpha=this.worldAlpha,e.update&&e.update(),t.batch.flush(),e.uniforms.translationMatrix=this.transform.worldTransform.toArray(!0),t.shader.bind(e),t.state.set(this.state),t.geometry.bind(this.geometry,e),t.geometry.draw(this.drawMode,this.size,this.start,this.geometry.instanceCount)},i.prototype._renderToBatch=function(t){var e=this.geometry,r=this.shader;r.uvMatrix&&(r.uvMatrix.update(),this.calculateUvs()),this.calculateVertices(),this.indices=e.indexBuffer.data,this._tintRGB=r._tintRGB,this._texture=r.texture;var i=this.material.pluginName;t.batch.setObjectRenderer(t.plugins[i]),t.plugins[i].render(this)},i.prototype.calculateVertices=function(){var t=this.geometry.buffers[0],e=t.data,r=t._updateID;if(r!==this.vertexDirty||this._transformID!==this.transform._worldID){this._transformID=this.transform._worldID,this.vertexData.length!==e.length&&(this.vertexData=new Float32Array(e.length));for(var i=this.transform.worldTransform,a=i.a,o=i.b,s=i.c,u=i.d,h=i.tx,l=i.ty,d=this.vertexData,f=0;f>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),x=exports.MeshGeometry=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); },{"@pixi/core":"3sUx","@pixi/math":"4NJu","@pixi/constants":"UTLU","@pixi/display":"Yd2V","@pixi/settings":"IJuH","@pixi/utils":"+k8Z"}],"0CDN":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.XMLStringFormat=exports.XMLFormat=exports.TextFormat=exports.BitmapText=exports.BitmapFontLoader=exports.BitmapFontData=exports.BitmapFont=void 0,exports.autoDetectFormat=x;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/constants"),s=require("@pixi/display"),h=require("@pixi/loaders"),l=function(e,t){return(l=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 u(e,t){function r(){this.constructor=e}l(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var f=exports.BitmapFontData=function(){return function(){this.info=[],this.common=[],this.page=[],this.char=[],this.kerning=[],this.distanceField=[]}}(),c=exports.TextFormat=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:[],distanceField:[]};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],u=h[1].replace(/"/gm,""),c=parseFloat(u),p=isNaN(c)?u:c;o[l]=p}r[n].push(o)}var d=new f;return r.info.forEach(function(e){return d.info.push({face:e.face,size:parseInt(e.size,10)})}),r.common.forEach(function(e){return d.common.push({lineHeight:parseInt(e.lineHeight,10)})}),r.page.forEach(function(e){return d.page.push({id:parseInt(e.id,10),file:e.file})}),r.char.forEach(function(e){return d.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 d.kerning.push({first:parseInt(e.first,10),second:parseInt(e.second,10),amount:parseInt(e.amount,10)})}),r.distanceField.forEach(function(e){return d.distanceField.push({distanceRange:parseInt(e.distanceRange,10),fieldType:e.fieldType})}),d},e}(),p=exports.XMLFormat=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 f,r=e.getElementsByTagName("info"),i=e.getElementsByTagName("common"),n=e.getElementsByTagName("page"),a=e.getElementsByTagName("char"),o=e.getElementsByTagName("kerning"),s=e.getElementsByTagName("distanceField"),h=0;h")>-1){var t=(new globalThis.DOMParser).parseFromString(e,"text/xml");return p.test(t)}return!1},e.parse=function(e){var t=(new globalThis.DOMParser).parseFromString(e,"text/xml");return p.parse(t)},e}(),g=[c,p,d];function x(e){for(var t=0;t=p-I*u){if(0===S)throw new Error("[BitmapFont] textureHeight "+p+"px is too small (fontFamily: '"+g.fontFamily+"', fontSize: "+g.fontSize+"px, char: '"+E+"')");--F,y=null,T=null,w=null,S=0,M=0,A=0}else if(A=Math.max(I+C.fontProperties.descent,A),D*u+M>=x){if(0===M)throw new Error("[BitmapFont] textureWidth "+c+"px is too small (fontFamily: '"+g.fontFamily+"', fontSize: "+g.fontSize+"px, char: '"+E+"')");--F,S+=A*u,S=Math.ceil(S),M=0,A=0}else{v(y,T,C,M,S,u,g);var B=b(C.text);m.char.push({id:B,page:P.length-1,x:M/u,y:S/u,width:D,height:I,xoffset:0,yoffset:0,xadvance:Math.ceil(O-(g.dropShadow?g.dropShadowDistance:0)-(g.stroke?g.strokeThickness:0))}),M+=(D+2*l)*u,M=Math.ceil(M)}}if(!(null==o?void 0:o.skipKerning)){F=0;for(var L=d.length;F 0.99) {\r\n alpha = 1.0;\r\n }\r\n\r\n // NPM Textures, NPM outputs\r\n gl_FragColor = vec4(uColor.rgb, uColor.a * alpha);\r\n\r\n}\r\n",M="// Mesh material default fragment\r\nattribute vec2 aVertexPosition;\r\nattribute vec2 aTextureCoord;\r\n\r\nuniform mat3 projectionMatrix;\r\nuniform mat3 translationMatrix;\r\nuniform mat3 uTextureMatrix;\r\n\r\nvarying vec2 vTextureCoord;\r\n\r\nvoid main(void)\r\n{\r\n gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\r\n\r\n vTextureCoord = (uTextureMatrix * vec3(aTextureCoord, 1.0)).xy;\r\n}\r\n",S=[],A=[],P=[],F=exports.BitmapText=function(a){function s(r,i){void 0===i&&(i={});var n=a.call(this)||this;n._tint=16777215;var o=Object.assign({},s.styleDefaults,i),h=o.align,l=o.tint,u=o.maxWidth,f=o.letterSpacing,c=o.fontName,p=o.fontSize;if(!T.available[c])throw new Error('Missing BitmapFont "'+c+'"');return n._activePagesMeshData=[],n._textWidth=0,n._textHeight=0,n._align=h,n._tint=l,n._font=void 0,n._fontName=c,n._fontSize=p,n.text=r,n._maxWidth=u,n._maxLineHeight=0,n._letterSpacing=f,n._anchor=new e.ObservablePoint(function(){n.dirty=!0},n,0,0),n._roundPixels=t.settings.ROUND_PIXELS,n.dirty=!0,n._resolution=t.settings.RESOLUTION,n._autoResolution=!0,n._textureCache={},n}return u(s,a),s.prototype.updateText=function(){for(var t,a=T.available[this._fontName],s=this.fontSize,h=s/a.size,l=new e.Point,u=[],f=[],c=[],p=y(this._text.replace(/(?:\r\n|\r)/g,"\n")||" "),d=this._maxWidth*a.size/s,g="none"===a.distanceFieldType?S:A,x=null,m=0,v=0,_=0,F=-1,E=0,C=0,O=0,I=0,D=0;D0&&l.x>d&&(++C,(0,i.removeItems)(u,1+F-C,1+D-F),D=F,F=-1,f.push(E),c.push(u.length>0?u[u.length-1].prevSpaces:0),v=Math.max(v,E),_++,l.x=0,l.y+=a.lineHeight,x=null,I=0)}}else f.push(m),c.push(-1),v=Math.max(v,m),++_,++C,l.x=0,l.y+=a.lineHeight,x=null,I=0}var k=p[p.length-1];"\r"!==k&&"\n"!==k&&(/(?:\s)/.test(k)&&(m=E),f.push(m),v=Math.max(v,m),c.push(-1));var z=[];for(D=0;D<=_;D++){var H=0;"right"===this._align?H=v-f[D]:"center"===this._align?H=(v-f[D])/2:"justify"===this._align&&(H=c[D]<0?0:(v-f[D])/c[D]),z.push(H)}var R=u.length,j={},W=[],U=this._activePagesMeshData;g.push.apply(g,U);for(D=0;D6*$)||le.vertices.length<2*r.Mesh.BATCHABLE_SIZE)le.vertices=new Float32Array(8*$),le.uvs=new Float32Array(8*$),le.indices=new Uint16Array(6*$);else for(var J=le.total,K=le.vertices,Q=4*J*2;Q=i&&(e=t-u-1),o+=a=a.replace("%value%",r[e].toString()),o+="\n"}return n=(n=n.replace("%blur%",o)).replace("%size%",t.toString())}var p=exports.BlurFilterPass=function(t){function i(r,i,n,o,l){void 0===i&&(i=8),void 0===n&&(n=4),void 0===o&&(o=e.settings.FILTER_RESOLUTION),void 0===l&&(l=5);var s=this,p=u(l,r),h=a(l);return(s=t.call(this,p,h)||this).horizontal=r,s.resolution=o,s._quality=0,s.quality=n,s.blur=i,s}return n(i,t),i.prototype.apply=function(t,e,i,n){if(i?this.horizontal?this.uniforms.strength=1/i.width*(i.width/e.width):this.uniforms.strength=1/i.height*(i.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,i,n);else{var o=t.getFilterTexture(),u=t.renderer,l=e,s=o;this.state.blend=!1,t.applyFilter(this,l,s,r.CLEAR_MODES.CLEAR);for(var a=1;a>16&255)/255,0,0,0,0,0,(t>>8&255)/255,0,0,0,0,0,(255&t)/255,0,0,0,0,0,1,0];this._loadMatrix(o,r)},e.prototype.greyscale=function(t,r){var o=[t,t,t,0,0,t,t,t,0,0,t,t,t,0,0,0,0,0,1,0];this._loadMatrix(o,r)},e.prototype.blackAndWhite=function(t){this._loadMatrix([.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0],t)},e.prototype.hue=function(t,r){t=(t||0)/180*Math.PI;var o=Math.cos(t),n=Math.sin(t),e=1/3,i=(0,Math.sqrt)(e),a=[o+(1-o)*e,e*(1-o)-i*n,e*(1-o)+i*n,0,0,e*(1-o)+i*n,o+e*(1-o),e*(1-o)-i*n,0,0,e*(1-o)-i*n,e*(1-o)+i*n,o+e*(1-o),0,0,0,0,0,1,0];this._loadMatrix(a,r)},e.prototype.contrast=function(t,r){var o=(t||0)+1,n=-.5*(o-1),e=[o,0,0,0,n,0,o,0,0,n,0,0,o,0,n,0,0,0,1,0];this._loadMatrix(e,r)},e.prototype.saturate=function(t,r){void 0===t&&(t=0);var o=2*t/3+1,n=-.5*(o-1),e=[o,n,n,0,0,n,o,n,0,0,n,n,o,0,0,0,0,0,1,0];this._loadMatrix(e,r)},e.prototype.desaturate=function(){this.saturate(-1)},e.prototype.negative=function(t){this._loadMatrix([-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0],t)},e.prototype.sepia=function(t){this._loadMatrix([.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0],t)},e.prototype.technicolor=function(t){this._loadMatrix([1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0],t)},e.prototype.polaroid=function(t){this._loadMatrix([1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],t)},e.prototype.toBGR=function(t){this._loadMatrix([0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0],t)},e.prototype.kodachrome=function(t){this._loadMatrix([1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0],t)},e.prototype.browni=function(t){this._loadMatrix([.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0],t)},e.prototype.vintage=function(t){this._loadMatrix([.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0],t)},e.prototype.colorTone=function(t,r,o,n,e){var i=((o=o||16770432)>>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);e.prototype.grayscale=e.prototype.greyscale; },{"@pixi/core":"3sUx"}],"73dt":[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=exports.DisplacementFilter=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); },{"@pixi/core":"3sUx","@pixi/math":"4NJu"}],"9o1g":[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 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\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, inputSize.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 inputSize;\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, inputSize.zw, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);\n\n gl_FragColor = color;\n}\n',i=exports.FXAAFilter=function(n){function e(){return n.call(this,o,t)||this}return r(e,n),e}(n.Filter); },{"@pixi/core":"3sUx"}],"aa0F":[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=exports.NoiseFilter=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); },{"@pixi/core":"3sUx"}],"vdW4":[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"),s=require("@pixi/utils"),r=require("@pixi/settings"),n=require("@pixi/constants"),h=new i.Matrix;e.DisplayObject.prototype._cacheAsBitmap=!1,e.DisplayObject.prototype._cacheData=null,e.DisplayObject.prototype._cacheAsBitmapResolution=null,e.DisplayObject.prototype._cacheAsBitmapMultisample=n.MSAA_QUALITY.NONE;var o=exports.CacheData=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}}();Object.defineProperties(e.DisplayObject.prototype,{cacheAsBitmapResolution:{get:function(){return this._cacheAsBitmapResolution},set:function(t){t!==this._cacheAsBitmapResolution&&(this._cacheAsBitmapResolution=t,this.cacheAsBitmap&&(this.cacheAsBitmap=!1,this.cacheAsBitmap=!0))}},cacheAsBitmapMultisample:{get:function(){return this._cacheAsBitmapMultisample},set:function(t){t!==this._cacheAsBitmapMultisample&&(this._cacheAsBitmapMultisample=t,this.cacheAsBitmap&&(this.cacheAsBitmap=!1,this.cacheAsBitmap=!0))}},cacheAsBitmap:{get:function(){return this._cacheAsBitmap},set:function(t){var a;this._cacheAsBitmap!==t&&(this._cacheAsBitmap=t,t?(this._cacheData||(this._cacheData=new o),(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){var i;if(!this._cacheData||!this._cacheData.sprite){var n=this.alpha;this.alpha=1,e.batch.flush();var o=this.getLocalBounds(null,!0).clone();if(this.filters&&this.filters.length){var c=this.filters[0].padding;o.pad(c)}o.ceil(r.settings.RESOLUTION);var l=e.renderTexture.current,p=e.renderTexture.sourceFrame.clone(),d=e.renderTexture.destinationFrame.clone(),u=e.projection.transform,m=t.RenderTexture.create({width:o.width,height:o.height,resolution:this.cacheAsBitmapResolution||e.resolution,multisample:null!==(i=this.cacheAsBitmapMultisample)&&void 0!==i?i:e.multisample}),_="cacheAsBitmap_"+(0,s.uid)();this._cacheData.textureCacheId=_,t.BaseTexture.addToCache(m.baseTexture,_),t.Texture.addToCache(m,_);var f=this.transform.localTransform.copyTo(h).invert().translate(-o.x,-o.y);this.render=this._cacheData.originalRender,e.render(this,{renderTexture:m,clear:!0,transform:f,skipUpdateTransform:!1}),e.framebuffer.blit(),e.projection.transform=u,e.renderTexture.bind(l,p,d),this.render=this._renderCached,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null,this.alpha=n;var D=new a.Sprite(m);D.transform.worldTransform=this.transform.worldTransform,D.anchor.x=-o.x/o.width,D.anchor.y=-o.y/o.height,D.alpha=n,D._bounds=this._bounds,this._cacheData.sprite=D,this.transform._parentID=-1,this.parent?this.updateTransform():(this.enableTempParent(),this.updateTransform(),this.disableTempParent(null)),this.containsPoint=D.containsPoint.bind(D)}},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),n=this.alpha;this.alpha=1;var o=e.context,c=e._projTransform;i.ceil(r.settings.RESOLUTION);var l=t.RenderTexture.create({width:i.width,height:i.height}),p="cacheAsBitmap_"+(0,s.uid)();this._cacheData.textureCacheId=p,t.BaseTexture.addToCache(l.baseTexture,p),t.Texture.addToCache(l,p);var d=h;this.transform.localTransform.copyTo(d),d.invert(),d.tx-=i.x,d.ty-=i.y,this.renderCanvas=this._cacheData.originalRenderCanvas,e.render(this,{renderTexture:l,clear:!0,transform:d,skipUpdateTransform:!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,this.alpha=n;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=n,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":"3sUx","@pixi/sprite":"p9l6","@pixi/display":"Yd2V","@pixi/math":"4NJu","@pixi/utils":"+k8Z","@pixi/settings":"IJuH","@pixi/constants":"UTLU"}],"Q+FK":[function(require,module,exports) { "use strict";var e=require("@pixi/display");e.DisplayObject.prototype.name=null,e.Container.prototype.getChildByName=function(e,i){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),n=exports.SimpleRope=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),a=exports.SimplePlane=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.autoResize=!0,n}return h(r,e),r.prototype.textureUpdated=function(){this._textureID=this.shader.texture._updateID;var t=this.geometry,e=this.shader.texture,i=e.width,r=e.height;!this.autoResize||t.width===i&&t.height===r||(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),u=exports.SimpleMesh=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),d=10,p=exports.NineSlicePlane=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); },{"@pixi/mesh":"pTUz","@pixi/constants":"UTLU","@pixi/core":"3sUx"}],"ubaA":[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=exports.AnimatedSprite=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;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 f(this,o),(e=n.call(this))._proxy=new t.GameObjectProxy(r,k(e)),e}return h(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 y(t,e){if(t){if("string"==typeof t)return f(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)?f(t,e):void 0}}function f(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 s(this,o),(e=n.call(this,i,a))._proxy=new t.GameObjectProxy(r,k(e)),e}return h(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 f(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 s(this,o),(e=n.call(this,i,{fontName:a,fontSize:u,tint:c}))._proxy=new t.GameObjectProxy(r,k(e)),e}return h(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 y(t,e){if(t){if("string"==typeof t)return f(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)?f(t,e):void 0}}function f(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 s(this,o),(e=n.call(this))._proxy=new t.GameObjectProxy(r,C(e)),e}return h(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: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 f(this,o),(e=n.call(this,i,a,u,c))._proxy=new t.GameObjectProxy(r,k(e)),e}return h(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 f(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)?f(t,e):void 0}}function f(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 s(this,o),(e=n.call(this,i,a,u,c,l))._proxy=new t.GameObjectProxy(r,k(e)),e}return h(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 y(t,e){if(t){if("string"==typeof t)return f(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)?f(t,e):void 0}}function f(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 s(this,o),(e=n.call(this,i,a))._proxy=new t.GameObjectProxy(r,C(e)),e}return h(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 y(t,e){if(t){if("string"==typeof t)return f(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)?f(t,e):void 0}}function f(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 s(this,o),(e=n.call(this,i,a,u,c,l))._proxy=new t.GameObjectProxy(r,k(e)),e}return h(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 f(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)?f(t,e):void 0}}function f(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 s(this,o),(e=n.call(this,i,a,u))._proxy=new t.GameObjectProxy(r,k(e)),e}return h(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 f(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)?f(t,e):void 0}}function f(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 s(this,o),(e=n.call(this,i,a,u))._proxy=new t.GameObjectProxy(r,k(e)),e}return h(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[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 f(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)?f(t,e):void 0}}function f(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 s(this,o),(e=n.call(this,i))._proxy=new t.GameObjectProxy(r,k(e)),e}return h(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 f(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)?f(t,e):void 0}}function f(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 s(this,o),(e=n.call(this,i))._proxy=new t.GameObjectProxy(r,k(e)),e}return h(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 f(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)?f(t,e):void 0}}function f(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 s(this,o),(e=n.call(this,i,a,u))._proxy=new t.GameObjectProxy(r,k(e)),e}return h(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[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 s,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,s=t},f:function(){try{n||null==r.return||r.return()}finally{if(p)throw s}}}}function w(t,e){if(t){if("string"==typeof t)return k(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)?k(t,e):void 0}}function k(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0;return this.objectProps={text:e,fontName:r,fontSize:i,fontColor:o,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,i,o,s){return this.objectProps={type:t.NineSlicePlane,texture:e,leftWidth:r,topHeight:i,rightWidth:o,bottomHeight:s},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,i){return this.objectProps={type:t.SimplePlane,texture:e,verticesX:r,verticesY:i},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,i){return this.objectProps={texture:e,width:r,height:i,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,m,v=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.objectToBuild)m=this.objectToBuild;else switch(this.objectProps.type){case t.Container:m=new i.Container(this.props.name);break;case t.AnimatedSprite:m=new e.AnimatedSprite(this.props.name,this.objectProps.textures);break;case t.BitmapText:m=new r.BitmapText(this.props.name,this.objectProps.text,this.objectProps.fontName,this.objectProps.fontSize,this.objectProps.fontColor);break;case t.Graphics:m=new o.Graphics(this.props.name);break;case t.Mesh:m=new s.Mesh(this.props.name,this.objectProps.geometry,this.objectProps.shader);break;case t.NineSlicePlane:m=new n.NineSlicePlane(this.props.name,this.objectProps.texture,this.objectProps.leftWidth,this.objectProps.topHeight,this.objectProps.rightWidth,this.objectProps.bottomHeight);break;case t.ParticleContainer:m=new p.ParticleContainer(this.props.name,1e4,{});break;case t.SimpleMesh:m=new a.SimpleMesh(this.props.name,this.objectProps.texture,this.objectProps.vertices);break;case t.SimplePlane:m=new l.SimplePlane(this.props.name,this.objectProps.texture,this.objectProps.verticesX,this.objectProps.verticesY);break;case t.SimpleRope:m=new h.SimpleRope(this.props.name,this.objectProps.texture,this.objectProps.points);break;case t.Sprite:m=new c.Sprite(this.props.name,null===(y=this.objectProps.texture)||void 0===y?void 0:y.clone());break;case t.Text:(m=new u.Text(this.props.name,this.objectProps.text)).style=this.objectProps.fontStyle;break;case t.TilingSprite:m=new f.TilingSprite(this.props.name,this.objectProps.texture.clone(),this.objectProps.width,this.objectProps.height);break;default:throw new Error("Unsupported object type")}var P,j=x(this.props.components);try{for(j.s();!(P=j.n()).done;){var g=P.value;null==m||m.addComponent(g)}}catch(H){j.e(H)}finally{j.f()}this.props.components=[];var S,w=x(this.props.componentBuilders);try{for(w.s();!(S=w.n()).done;){var k=S.value;null==m||m.addComponent(k())}}catch(H){w.e(H)}finally{w.f()}var X,Y=x(this.props.attributes);try{for(Y.s();!(X=Y.n()).done;){var T=d(X.value,2),A=T[0],C=T[1];null==m||m.assignAttribute(A,C)}}catch(H){Y.e(H)}finally{Y.f()}var M,O=x(this.props.flags);try{for(O.s();!(M=O.n()).done;){var B=M.value;null==m||m.setFlag(B)}}catch(H){O.e(H)}finally{O.f()}if(null!=this.props.state&&(m.stateId=this.props.state),0!==this.props.tags.size&&this.props.tags.forEach(function(t){return null==m?void 0:m.addTag(t)}),null!=this.props.scaleX&&(m.scale.x=this.props.scaleX),null!=this.props.scaleY&&(m.scale.y=this.props.scaleY),null!=this.props.relPosX){var q=new b.Point;q.x=this.props.relPosX*this.scene.width/this.scene.stage.scale.x,m.position.x=m.toLocal(q).x,null!=this.props.scaleX&&(m.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,m.position.y=m.toLocal(N).y,null!=this.props.scaleY&&(m.position.y*=this.props.scaleY)}if(null!=this.props.locPosX&&(null!=this.props.relPosX?m.position.x+=this.props.locPosX:m.position.x=this.props.locPosX),null!=this.props.locPosY&&(null!=this.props.relPosY?m.position.y+=this.props.locPosY:m.position.y=this.props.locPosY),null!=this.props.absPosX){var I=new b.Point;I.x=this.props.absPosX,m.position.x=m.toLocal(I,this.scene.stage.pixiObj).x,null!=this.props.scaleX&&(m.position.x*=this.props.scaleX)}if(null!=this.props.absPosY){var E=new b.Point;E.y=this.props.absPosY,m.position.y=m.toLocal(E,this.scene.stage.pixiObj).y,null!=this.props.scaleY&&(m.position.y*=this.props.scaleY)}if(null!=this.props.anchorX&&(m instanceof c.Sprite||m instanceof u.Text?m.anchor.x=this.props.anchorX:m.pivot.x=this.props.anchorX*m.width),null!=this.props.anchorY&&(m instanceof c.Sprite||m instanceof u.Text?m.anchor.y=this.props.anchorY:m.pivot.y=this.props.anchorY*m.height),null!=this.props.virtAnchorX){var W=this.props.virtAnchorX-(null==this.props.anchorX?0:this.props.anchorX);m.position.x-=W*m.width}if(null!=this.props.virtAnchorY){var G=this.props.virtAnchorY-(null==this.props.anchorY?0:this.props.anchorY);m.position.y-=G*m.height}null!=this.props.parent&&this.props.parent.pixiObj.addChild(m.pixiObj);var R,D=x(this.children);try{for(D.s();!(R=D.n()).done;){R.value.withParent(m).process(v)}}catch(H){D.e(H)}finally{D.f()}return v&&this.clear(),m}},{key:"clear",value:function(){return this.props={name:"",components:[],componentBuilders:[],attributes:new Map,flags:[],tags:new Set},this.objectProps={type:t.Container},this.objectToBuild=void 0,this.children=[],this}}]),m}(); },{"./game-objects/animated-sprite":"qbaK","./game-objects/bitmap-text":"ZLA6","./game-objects/container":"vP/R","./game-objects/graphics":"LAuL","./game-objects/mesh":"96mc","./game-objects/nine-slice-plane":"II/q","./game-objects/particle-container":"Ckyg","./game-objects/simple-mesh":"+XxB","./game-objects/simple-plane":"P9jE","./game-objects/simple-rope":"MSJi","./game-objects/sprite":"T/2B","./game-objects/text":"9uYN","./game-objects/tiling-sprite":"mplg","./component":"ToXV","pixi.js":"VhzX"}],"n1dT":[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){return i(t)||n(t)||a(t)||r()}function r(){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 n(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function i(t){if(Array.isArray(t))return u(t)}function o(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=a(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 o,u=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return u=t.done,t},e:function(t){s=!0,o=t},f:function(){try{u||null==r.return||r.return()}finally{if(s)throw o}}}}function a(t,e){if(t){if("string"==typeof t)return u(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)?u(t,e):void 0}}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},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 a,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,a=e},f:function(){try{r||null==n.return||n.return()}finally{if(o)throw a}}}}function g(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,s=n.pixiObj;this.config.namesSearchEnabled&&this.gameObjectNames.insert(s.name,s),this.config.flagsSearchEnabled&&n.getAllFlags().forEach(function(e){return i.gameObjectFlags.insert(e,s)}),this.config.tagsSearchEnabled&&n.tags.forEach(function(e){return i.gameObjectTags.insert(e,s)}),this.config.statesSearchEnabled&&this.gameObjectStates.insert(s.stateId,s),this.gameObjects.set(n.id,s),this.sendMessage(new e.Message(t.Messages.OBJECT_ADDED,void 0,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.Message(t.Messages.OBJECT_REMOVED,void 0,i))}},{key:"_onComponentAdded",value:function(n,i){n.scene=this,this.sendMessage(new e.Message(t.Messages.COMPONENT_ADDED,n,i.pixiObj))}},{key:"_onComponentDetached",value:function(n){this.subscribers.removeItem(n),this.sendMessage(new e.Message(t.Messages.COMPONENT_DETACHED,n,n.owner))}},{key:"_onComponentRemoved",value:function(n,i){this.subscribers.removeItem(n),this.sendMessage(new e.Message(t.Messages.COMPONENT_REMOVED,n,i.pixiObj))}},{key:"_onStateChanged",value:function(n,i,s){if(this.config.statesSearchEnabled&&(this.gameObjectStates.remove(n,s.pixiObj),this.gameObjectStates.insert(i,s.pixiObj)),this.config.notifyStateChanges){var a={previous:n,current:i};this.sendMessage(new e.Message(t.Messages.STATE_CHANGED,void 0,s.pixiObj,a))}}},{key:"_onAttributeAdded",value:function(n,i,s){if(this.config.notifyAttributeChanges){var a={key:n,type:t.Messages.ATTRIBUTE_ADDED,previousValue:null,currentValue:i};this.sendMessage(new e.Message(t.Messages.ATTRIBUTE_ADDED,void 0,s.pixiObj,a))}}},{key:"_onAttributeChanged",value:function(n,i,s,a){if(this.config.notifyAttributeChanges){var r={key:n,type:t.Messages.ATTRIBUTE_CHANGED,previousValue:i,currentValue:s};this.sendMessage(new e.Message(t.Messages.ATTRIBUTE_CHANGED,void 0,a.pixiObj,r))}}},{key:"_onAttributeRemoved",value:function(n,i,s){if(this.config.notifyAttributeChanges){var a={key:n,type:t.Messages.ATTRIBUTE_REMOVED,previousValue:i,currentValue:null};this.sendMessage(new e.Message(t.Messages.ATTRIBUTE_REMOVED,void 0,s.pixiObj,a))}}},{key:"_onFlagChanged",value:function(n,i,s){if(this.config.flagsSearchEnabled&&(i?this.gameObjectFlags.insert(n,s.pixiObj):this.gameObjectFlags.remove(n,s.pixiObj)),this.config.notifyFlagChanges){var a={flag:n,isSet:i};this.sendMessage(new e.Message(t.Messages.FLAG_CHANGED,void 0,s.pixiObj,a))}}},{key:"_onTagAdded",value:function(n,i){if(this.config.tagsSearchEnabled&&this.gameObjectTags.insert(n,i.pixiObj),this.config.notifyTagChanges){var s={tag:n,type:t.Messages.TAG_ADDED};this.sendMessage(new e.Message(t.Messages.TAG_ADDED,void 0,i.pixiObj,s))}}},{key:"_onTagRemoved",value:function(n,i){if(this.config.tagsSearchEnabled&&this.gameObjectTags.remove(n,i.pixiObj),this.config.notifyTagChanges){var s={tag:n,type:t.Messages.TAG_REMOVED};this.sendMessage(new e.Message(t.Messages.TAG_REMOVED,void 0,i.pixiObj,s))}}},{key:"initConfig",value:function(e){this._config=Object.assign(Object.assign({},S),e)}}]),o}(); },{"./message":"kkvE","./constants":"1pwq","./game-objects/container":"vP/R","../utils/lookup-map":"n1dT","../components/debug-component":"oqpG","../utils/query-condition":"nsTS"}],"Yt5f":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.resizeContainer=exports.isMobileDevice=void 0;var e=exports.isMobileDevice=function(){return/(iphone|ipod|ipad|android)/gi.test(navigator.userAgent)},t=exports.resizeContainer=function(t,n,i){var o,r=!1;window.innerWidth/window.innerHeight>n/i?o=window.innerHeight/i:(o=window.innerWidth/n,r=!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(o,")"),a=r?window.innerHeight/2-i/2:(o-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",(o-1)*n/2+(window.innerWidth-n*o)/2+"px")}; },{}],"JMwq":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.GameLoopType=exports.Engine=void 0;var e,i=o(require("pixi.js")),t=require("./scene"),n=require("../utils/helpers");function r(e){if("function"!=typeof WeakMap)return null;var i=new WeakMap,t=new WeakMap;return(r=function(e){return e?t:i})(e)}function o(e,i){if(!i&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=r(i);if(t&&t.has(e))return t.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,t&&t.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,i){if(!(e instanceof i))throw new TypeError("Cannot call a class as a function")}function u(e,i){for(var t=0;t0;n--){var o=Math.floor(Math.random()*(n+1)),i=[t[o],t[n]];t[n]=i[0],t[o]=i[1]}return t}},{key:"resolveEnemyHP",value:function(e){for(var t=w.length-1;t>=0;t--)if(e>=w[t][1])return[e-=w[t][1],t]}},{key:"loadEnemy",value:function(n,i,l,s){new e.Builder(this.scene).withName(r.Tags.ENEMY).asSprite(t.Texture.from(w[n][0])).scale(4*r.TEXTURE_SCALE).localPos(new e.Vector(16,s)).anchor(.5).withParent(this.scene.stage).withComponent(new o.EnemyController).withAttribute("speed",i).withAttribute("health",l).withAttribute("value",w[n][6]).withComponent(new a.AnimationController).withAttribute("x",w[n][2]).withAttribute("y",w[n][3]).withAttribute("width",w[n][4]).withAttribute("height",w[n][5]).build()}},{key:"loadCharacter",value:function(n){new e.Builder(this.scene).withName(r.Tags.PLAYER).asSprite(t.Texture.from(r.Assets.FRIENDLY_1)).scale(4*-r.TEXTURE_SCALE,4*r.TEXTURE_SCALE).localPos(n).anchor(.5).withParent(this.scene.stage).withComponent(new i.CharacterController).withComponent(new a.AnimationController).build()}}],[{key:"loadExplosion",value:function(n,o){new e.Builder(n).withName("Explosion").asSprite(t.Texture.from(r.Assets.EXPLOSION)).scale(r.TEXTURE_SCALE,r.TEXTURE_SCALE).localPos(o).anchor(.5).withParent(n.stage).withComponent(new l.ExplosionController).build()}},{key:"loadGameOverScreen",value:function(n,o){n.clearScene(),new e.Builder(n).withName(r.Tags.BACKGROUND).asSprite(t.Texture.from(r.Assets.LEVEL_BACKGROUND)).scale(16*r.TEXTURE_SCALE,12*r.TEXTURE_SCALE).withParent(n.stage).build();var i=new e.Graphics;i.beginFill(789009),i.drawRoundedRect(4,3,n.width/2,n.height/2,.5),i.endFill(),n.stage.addChild(i);var a=new t.Text("Game Over",{fill:16777215,fontSize:26,align:"center"});a.position.set(8,4),a.anchor.set(.5),a.scale.set(10*r.TEXTURE_SCALE),a.resolution=2,n.stage.addChild(a);var l=new t.Text(o,{fill:16777215,fontSize:26,align:"center"});l.position.set(8,6),l.anchor.set(.5),l.scale.set(10*r.TEXTURE_SCALE),l.resolution=2,n.stage.addChild(l);var s=t.Texture.from(r.Assets.BUTTON),u=new t.Sprite(s);u.anchor.set(.5),u.texture.frame=new t.Rectangle(0,0,256,64),u.position.set(8,8),u.scale.set(5*r.TEXTURE_SCALE);var c=new t.Text("Play Again",{fontSize:24,fill:16777215});c.anchor.set(.5),c.position.set(u.width/2,u.height/2),u.addChild(c),u.interactive=!0,u.buttonMode=!0,u.on("pointerdown",function(){window.location.reload()}),n.stage.addChild(u)}}]),s}(); },{"colfio":"KfU2","pixi.js":"VhzX","./Constants":"Ggp6","./components/ProjectileController":"oZQR","./components/EnemyController":"xiDB","./components/CharacterController":"eIJ1","./components/AnimationController":"zUx2","./components/ExplosionController":"G1VT"}],"2swh":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CollisionSystem=void 0;var t=n(require("colfio")),e=require("../Constants");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 u in t)if("default"!==u&&Object.prototype.hasOwnProperty.call(t,u)){var f=i?Object.getOwnPropertyDescriptor(t,u):null;f&&(f.get||f.set)?Object.defineProperty(o,u,f):o[u]=t[u]}return o.default=t,n&&n.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){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=u(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,f=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return f=t.done,t},e:function(t){c=!0,i=t},f:function(){try{f||null==r.return||r.return()}finally{if(c)throw i}}}}function u(t,e){if(t){if("string"==typeof t)return f(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)?f(t,e):void 0}}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&v>0)return void this.sendMessage(e.Messages.COLLISION,{projectile:a,enemy:y})}}catch(d){s.e(d)}finally{s.f()}}}catch(d){f.e(d)}finally{f.f()}}},{key:"horizIntersection",value:function(t,e){return Math.min(t.right,e.right)-Math.max(t.left,e.left)}},{key:"vertIntersection",value:function(t,e){return Math.min(t.bottom,e.bottom)-Math.max(t.top,e.top)}}]),o}(); },{"colfio":"KfU2","../Constants":"Ggp6"}],"rRXw":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ButtonController=void 0;var t,e=i(require("colfio")),n=i(require("pixi.js")),r=require("../Constants");function o(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(o=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=o(e);if(n&&n.has(t))return n.get(t);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in t)if("default"!==u&&Object.prototype.hasOwnProperty.call(t,u)){var s=i?Object.getOwnPropertyDescriptor(t,u):null;s&&(s.get||s.set)?Object.defineProperty(r,u,s):r[u]=t[u]}return r.default=t,n&&n.set(t,r),r}function u(t){return(u="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){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){for(var n=0;n=g[this.type][this.rank]&&(this.rank+=1,this.rank=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,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function u(e,t){if(e){if("string"==typeof e)return f(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)?f(e,t):void 0}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=this.increaseInterval&&(this.fixedFrequencythis.scene.width+1||-1>o.position.x||o.y>this.scene.height+1||-1>o.position.y)&&o.destroy()}}catch(u){r.e(u)}finally{r.f()}var i,a=c(this.scene.findObjectsByName(t.Tags.ENEMY));try{for(a.s();!(i=a.n()).done;){var s=i.value;s.position.x<-1&&(this.scene.sendMessage(new e.Message(t.Messages.HEARTH_DOWN)),s.destroy())}}catch(u){a.e(u)}finally{a.f()}}}]),s}(); },{"colfio":"KfU2","../Constants":"Ggp6","../Factory":"5fEB","./CollisionSystem":"2swh","./StatSystem":"Jq1T"}],"GyMK":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.GameLoader=void 0;var e=require("./Constants"),s=require("./systems/GameSystem");function t(e){return(t="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 n(e,s){if(!(e instanceof s))throw new TypeError("Cannot call a class as a function")}function r(e,s){for(var t=0;t