/*! For license information please see 832.299b765ea7fb9cf8b878.js.LICENSE.txt */ (self.webpackChunkscratchmap=self.webpackChunkscratchmap||[]).push([[832],{1924:(t,e,r)=>{"use strict";var i=r(210),n=r(5559),o=n(i("String.prototype.indexOf"));t.exports=function(t,e){var r=i(t,!!e);return"function"==typeof r&&o(t,".prototype.")>-1?n(r):r}},5559:(t,e,r)=>{"use strict";var i=r(8612),n=r(210),o=n("%Function.prototype.apply%"),s=n("%Function.prototype.call%"),a=n("%Reflect.apply%",!0)||i.call(s,o),h=n("%Object.getOwnPropertyDescriptor%",!0),u=n("%Object.defineProperty%",!0),l=n("%Math.max%");if(u)try{u({},"a",{value:1})}catch(t){u=null}t.exports=function(t){var e=a(i,s,arguments);return h&&u&&h(e,"length").configurable&&u(e,"length",{value:1+l(0,t.length-(arguments.length-1))}),e};var c=function(){return a(i,o,arguments)};u?u(t.exports,"apply",{value:c}):t.exports.apply=c},9187:t=>{"use strict";function e(t,e,i){i=i||2;var o,s,a,h,c,p,f,y=e&&e.length,m=y?e[0]*i:t.length,g=r(t,0,m,i,!0),v=[];if(!g||g.next===g.prev)return v;if(y&&(g=function(t,e,i,n){var o,s,a,h=[];for(o=0,s=e.length;o80*i){o=a=t[0],s=h=t[1];for(var _=i;_a&&(a=c),p>h&&(h=p);f=0!==(f=Math.max(a-o,h-s))?32767/f:0}return n(g,v,i,o,s,f,0),v}function r(t,e,r,i,n){var o,s;if(n===S(t,e,r,i)>0)for(o=e;o=e;o-=i)s=E(o,t[o],t[o+1],s);return s&&g(s,s.next)&&(w(s),s=s.next),s}function i(t,e){if(!t)return t;e||(e=t);var r,i=t;do{if(r=!1,i.steiner||!g(i,i.next)&&0!==m(i.prev,i,i.next))i=i.next;else{if(w(i),(i=e=i.prev)===i.next)break;r=!0}}while(r||i!==e);return e}function n(t,e,r,u,l,c,d){if(t){!d&&c&&function(t,e,r,i){var n=t;do{0===n.z&&(n.z=p(n.x,n.y,e,r,i)),n.prevZ=n.prev,n.nextZ=n.next,n=n.next}while(n!==t);n.prevZ.nextZ=null,n.prevZ=null,function(t){var e,r,i,n,o,s,a,h,u=1;do{for(r=t,t=null,o=null,s=0;r;){for(s++,i=r,a=0,e=0;e0||h>0&&i;)0!==a&&(0===h||!i||r.z<=i.z)?(n=r,r=r.nextZ,a--):(n=i,i=i.nextZ,h--),o?o.nextZ=n:t=n,n.prevZ=o,o=n;r=i}o.nextZ=null,u*=2}while(s>1)}(n)}(t,u,l,c);for(var f,y,m=t;t.prev!==t.next;)if(f=t.prev,y=t.next,c?s(t,u,l,c):o(t))e.push(f.i/r|0),e.push(t.i/r|0),e.push(y.i/r|0),w(t),t=y.next,m=y.next;else if((t=y)===m){d?1===d?n(t=a(i(t),e,r),e,r,u,l,c,2):2===d&&h(t,e,r,u,l,c):n(i(t),e,r,u,l,c,1);break}}}function o(t){var e=t.prev,r=t,i=t.next;if(m(e,r,i)>=0)return!1;for(var n=e.x,o=r.x,s=i.x,a=e.y,h=r.y,u=i.y,l=no?n>s?n:s:o>s?o:s,d=a>h?a>u?a:u:h>u?h:u,y=i.next;y!==e;){if(y.x>=l&&y.x<=p&&y.y>=c&&y.y<=d&&f(n,a,o,h,s,u,y.x,y.y)&&m(y.prev,y,y.next)>=0)return!1;y=y.next}return!0}function s(t,e,r,i){var n=t.prev,o=t,s=t.next;if(m(n,o,s)>=0)return!1;for(var a=n.x,h=o.x,u=s.x,l=n.y,c=o.y,d=s.y,y=ah?a>u?a:u:h>u?h:u,_=l>c?l>d?l:d:c>d?c:d,b=p(y,g,e,r,i),x=p(v,_,e,r,i),T=t.prevZ,E=t.nextZ;T&&T.z>=b&&E&&E.z<=x;){if(T.x>=y&&T.x<=v&&T.y>=g&&T.y<=_&&T!==n&&T!==s&&f(a,l,h,c,u,d,T.x,T.y)&&m(T.prev,T,T.next)>=0)return!1;if(T=T.prevZ,E.x>=y&&E.x<=v&&E.y>=g&&E.y<=_&&E!==n&&E!==s&&f(a,l,h,c,u,d,E.x,E.y)&&m(E.prev,E,E.next)>=0)return!1;E=E.nextZ}for(;T&&T.z>=b;){if(T.x>=y&&T.x<=v&&T.y>=g&&T.y<=_&&T!==n&&T!==s&&f(a,l,h,c,u,d,T.x,T.y)&&m(T.prev,T,T.next)>=0)return!1;T=T.prevZ}for(;E&&E.z<=x;){if(E.x>=y&&E.x<=v&&E.y>=g&&E.y<=_&&E!==n&&E!==s&&f(a,l,h,c,u,d,E.x,E.y)&&m(E.prev,E,E.next)>=0)return!1;E=E.nextZ}return!0}function a(t,e,r){var n=t;do{var o=n.prev,s=n.next.next;!g(o,s)&&v(o,n,n.next,s)&&x(o,s)&&x(s,o)&&(e.push(o.i/r|0),e.push(n.i/r|0),e.push(s.i/r|0),w(n),w(n.next),n=t=s),n=n.next}while(n!==t);return i(n)}function h(t,e,r,o,s,a){var h=t;do{for(var u=h.next.next;u!==h.prev;){if(h.i!==u.i&&y(h,u)){var l=T(h,u);return h=i(h,h.next),l=i(l,l.next),n(h,e,r,o,s,a,0),void n(l,e,r,o,s,a,0)}u=u.next}h=h.next}while(h!==t)}function u(t,e){return t.x-e.x}function l(t,e){var r=function(t,e){var r,i=e,n=t.x,o=t.y,s=-1/0;do{if(o<=i.y&&o>=i.next.y&&i.next.y!==i.y){var a=i.x+(o-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(a<=n&&a>s&&(s=a,r=i.x=i.x&&i.x>=l&&n!==i.x&&f(or.x||i.x===r.x&&c(r,i)))&&(r=i,d=h)),i=i.next}while(i!==u);return r}(t,e);if(!r)return e;var n=T(r,t);return i(n,n.next),i(r,r.next)}function c(t,e){return m(t.prev,t,e.prev)<0&&m(e.next,t,t.next)<0}function p(t,e,r,i,n){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-r)*n|0)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-i)*n|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function d(t){var e=t,r=t;do{(e.x=(t-s)*(o-a)&&(t-s)*(i-a)>=(r-s)*(e-a)&&(r-s)*(o-a)>=(n-s)*(i-a)}function y(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&v(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&(x(t,e)&&x(e,t)&&function(t,e){var r=t,i=!1,n=(t.x+e.x)/2,o=(t.y+e.y)/2;do{r.y>o!=r.next.y>o&&r.next.y!==r.y&&n<(r.next.x-r.x)*(o-r.y)/(r.next.y-r.y)+r.x&&(i=!i),r=r.next}while(r!==t);return i}(t,e)&&(m(t.prev,t,e.prev)||m(t,e.prev,e))||g(t,e)&&m(t.prev,t,t.next)>0&&m(e.prev,e,e.next)>0)}function m(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function g(t,e){return t.x===e.x&&t.y===e.y}function v(t,e,r,i){var n=b(m(t,e,r)),o=b(m(t,e,i)),s=b(m(r,i,t)),a=b(m(r,i,e));return n!==o&&s!==a||!(0!==n||!_(t,r,e))||!(0!==o||!_(t,i,e))||!(0!==s||!_(r,t,i))||!(0!==a||!_(r,e,i))}function _(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function b(t){return t>0?1:t<0?-1:0}function x(t,e){return m(t.prev,t,t.next)<0?m(t,e,t.next)>=0&&m(t,t.prev,e)>=0:m(t,e,t.prev)<0||m(t,t.next,e)<0}function T(t,e){var r=new P(t.i,t.x,t.y),i=new P(e.i,e.x,e.y),n=t.next,o=e.prev;return t.next=e,e.prev=t,r.next=n,n.prev=r,i.next=r,r.prev=i,o.next=i,i.prev=o,i}function E(t,e,r,i){var n=new P(t,e,r);return i?(n.next=i.next,n.prev=i,i.next.prev=n,i.next=n):(n.prev=n,n.next=n),n}function w(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function P(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function S(t,e,r,i){for(var n=0,o=e,s=r-i;o0&&(i+=t[n-1].length,r.holes.push(i))}return r}},6713:function(t,e,r){var i;!function(n){var o=n.Promise,s=o&&"resolve"in o&&"reject"in o&&"all"in o&&"race"in o&&function(){var t;return new o((function(e){t=e})),"function"==typeof t}();e?(e.Promise=s?o:S,e.Polyfill=S):void 0===(i=function(){return s?o:S}.call(e,r,e,t))||(t.exports=i);var a="pending",h="sealed",u="fulfilled",l="rejected",c=function(){};function p(t){return"[object Array]"===Object.prototype.toString.call(t)}var d,f="undefined"!=typeof setImmediate?setImmediate:setTimeout,y=[];function m(){for(var t=0;t{"use strict";var e=Object.prototype.hasOwnProperty,r="~";function i(){}function n(t,e,r){this.fn=t,this.context=e,this.once=r||!1}function o(t,e,i,o,s){if("function"!=typeof i)throw new TypeError("The listener must be a function");var a=new n(i,o||t,s),h=r?r+e:e;return t._events[h]?t._events[h].fn?t._events[h]=[t._events[h],a]:t._events[h].push(a):(t._events[h]=a,t._eventsCount++),t}function s(t,e){0==--t._eventsCount?t._events=new i:delete t._events[e]}function a(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(r=!1)),a.prototype.eventNames=function(){var t,i,n=[];if(0===this._eventsCount)return n;for(i in t=this._events)e.call(t,i)&&n.push(r?i.slice(1):i);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},a.prototype.listeners=function(t){var e=r?r+t:t,i=this._events[e];if(!i)return[];if(i.fn)return[i.fn];for(var n=0,o=i.length,s=new Array(o);n{"use strict";var e=Array.prototype.slice,r=Object.prototype.toString;t.exports=function(t){var i=this;if("function"!=typeof i||"[object Function]"!==r.call(i))throw new TypeError("Function.prototype.bind called on incompatible "+i);for(var n,o=e.call(arguments,1),s=Math.max(0,i.length-o.length),a=[],h=0;h{"use strict";var i=r(7648);t.exports=Function.prototype.bind||i},210:(t,e,r)=>{"use strict";var i,n=SyntaxError,o=Function,s=TypeError,a=function(t){try{return o('"use strict"; return ('+t+").constructor;")()}catch(t){}},h=Object.getOwnPropertyDescriptor;if(h)try{h({},"")}catch(t){h=null}var u=function(){throw new s},l=h?function(){try{return u}catch(t){try{return h(arguments,"callee").get}catch(t){return u}}}():u,c=r(1405)(),p=r(8185)(),d=Object.getPrototypeOf||(p?function(t){return t.__proto__}:null),f={},y="undefined"!=typeof Uint8Array&&d?d(Uint8Array):i,m={"%AggregateError%":"undefined"==typeof AggregateError?i:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?i:ArrayBuffer,"%ArrayIteratorPrototype%":c&&d?d([][Symbol.iterator]()):i,"%AsyncFromSyncIteratorPrototype%":i,"%AsyncFunction%":f,"%AsyncGenerator%":f,"%AsyncGeneratorFunction%":f,"%AsyncIteratorPrototype%":f,"%Atomics%":"undefined"==typeof Atomics?i:Atomics,"%BigInt%":"undefined"==typeof BigInt?i:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?i:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?i:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?i:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?i:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?i:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?i:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":f,"%Int8Array%":"undefined"==typeof Int8Array?i:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?i:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?i:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":c&&d?d(d([][Symbol.iterator]())):i,"%JSON%":"object"==typeof JSON?JSON:i,"%Map%":"undefined"==typeof Map?i:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&c&&d?d((new Map)[Symbol.iterator]()):i,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?i:Promise,"%Proxy%":"undefined"==typeof Proxy?i:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?i:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?i:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&c&&d?d((new Set)[Symbol.iterator]()):i,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?i:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":c&&d?d(""[Symbol.iterator]()):i,"%Symbol%":c?Symbol:i,"%SyntaxError%":n,"%ThrowTypeError%":l,"%TypedArray%":y,"%TypeError%":s,"%Uint8Array%":"undefined"==typeof Uint8Array?i:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?i:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?i:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?i:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?i:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?i:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?i:WeakSet};if(d)try{null.error}catch(t){var g=d(d(t));m["%Error.prototype%"]=g}var v=function t(e){var r;if("%AsyncFunction%"===e)r=a("async function () {}");else if("%GeneratorFunction%"===e)r=a("function* () {}");else if("%AsyncGeneratorFunction%"===e)r=a("async function* () {}");else if("%AsyncGenerator%"===e){var i=t("%AsyncGeneratorFunction%");i&&(r=i.prototype)}else if("%AsyncIteratorPrototype%"===e){var n=t("%AsyncGenerator%");n&&d&&(r=d(n.prototype))}return m[e]=r,r},_={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},b=r(8612),x=r(7642),T=b.call(Function.call,Array.prototype.concat),E=b.call(Function.apply,Array.prototype.splice),w=b.call(Function.call,String.prototype.replace),P=b.call(Function.call,String.prototype.slice),S=b.call(Function.call,RegExp.prototype.exec),I=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,A=/\\(\\)?/g,O=function(t,e){var r,i=t;if(x(_,i)&&(i="%"+(r=_[i])[0]+"%"),x(m,i)){var o=m[i];if(o===f&&(o=v(i)),void 0===o&&!e)throw new s("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:i,value:o}}throw new n("intrinsic "+t+" does not exist!")};t.exports=function(t,e){if("string"!=typeof t||0===t.length)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new s('"allowMissing" argument must be a boolean');if(null===S(/^%?[^%]*%?$/,t))throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=P(t,0,1),r=P(t,-1);if("%"===e&&"%"!==r)throw new n("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new n("invalid intrinsic syntax, expected opening `%`");var i=[];return w(t,I,(function(t,e,r,n){i[i.length]=r?w(n,A,"$1"):e||t})),i}(t),i=r.length>0?r[0]:"",o=O("%"+i+"%",e),a=o.name,u=o.value,l=!1,c=o.alias;c&&(i=c[0],E(r,T([0,1],c)));for(var p=1,d=!0;p=r.length){var v=h(u,f);u=(d=!!v)&&"get"in v&&!("originalValue"in v.get)?v.get:u[f]}else d=x(u,f),u=u[f];d&&!l&&(m[a]=u)}}return u}},8185:t=>{"use strict";var e={foo:{}},r=Object;t.exports=function(){return{__proto__:e}.foo===e.foo&&!({__proto__:null}instanceof r)}},1405:(t,e,r)=>{"use strict";var i="undefined"!=typeof Symbol&&Symbol,n=r(5419);t.exports=function(){return"function"==typeof i&&"function"==typeof Symbol&&"symbol"==typeof i("foo")&&"symbol"==typeof Symbol("bar")&&n()}},5419:t=>{"use strict";t.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 i=Object.getOwnPropertySymbols(t);if(1!==i.length||i[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}},7642:(t,e,r)=>{"use strict";var i=r(8612);t.exports=i.call(Function.call,Object.prototype.hasOwnProperty)},2940:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var r=0;r{"use strict";var e=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach((function(t){i[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},i)).join("")}catch(t){return!1}}()?Object.assign:function(t,n){for(var o,s,a=function(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),h=1;h{var i="function"==typeof Map&&Map.prototype,n=Object.getOwnPropertyDescriptor&&i?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=i&&n&&"function"==typeof n.get?n.get:null,s=i&&Map.prototype.forEach,a="function"==typeof Set&&Set.prototype,h=Object.getOwnPropertyDescriptor&&a?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,u=a&&h&&"function"==typeof h.get?h.get:null,l=a&&Set.prototype.forEach,c="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,d="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,f=Boolean.prototype.valueOf,y=Object.prototype.toString,m=Function.prototype.toString,g=String.prototype.match,v=String.prototype.slice,_=String.prototype.replace,b=String.prototype.toUpperCase,x=String.prototype.toLowerCase,T=RegExp.prototype.test,E=Array.prototype.concat,w=Array.prototype.join,P=Array.prototype.slice,S=Math.floor,I="function"==typeof BigInt?BigInt.prototype.valueOf:null,A=Object.getOwnPropertySymbols,O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,C="function"==typeof Symbol&&"object"==typeof Symbol.iterator,R="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,M=Object.prototype.propertyIsEnumerable,D=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function L(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||T.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var i=t<0?-S(-t):S(t);if(i!==t){var n=String(i),o=v.call(e,n.length+1);return _.call(n,r,"$&_")+"."+_.call(_.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return _.call(e,r,"$&_")}var N=r(4654),F=N.custom,U=G(F)?F:null;function B(t,e,r){var i="double"===(r.quoteStyle||e)?'"':"'";return i+t+i}function k(t){return _.call(String(t),/"/g,""")}function j(t){return!("[object Array]"!==V(t)||R&&"object"==typeof t&&R in t)}function X(t){return!("[object RegExp]"!==V(t)||R&&"object"==typeof t&&R in t)}function G(t){if(C)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!O)return!1;try{return O.call(t),!0}catch(t){}return!1}t.exports=function t(e,r,i,n){var a=r||{};if(z(a,"quoteStyle")&&"single"!==a.quoteStyle&&"double"!==a.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(z(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 h=!z(a,"customInspect")||a.customInspect;if("boolean"!=typeof h&&"symbol"!==h)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(z(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(z(a,"numericSeparator")&&"boolean"!=typeof a.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var y=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 W(e,a);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var b=String(e);return y?L(e,b):b}if("bigint"==typeof e){var T=String(e)+"n";return y?L(e,T):T}var S=void 0===a.depth?5:a.depth;if(void 0===i&&(i=0),i>=S&&S>0&&"object"==typeof e)return j(e)?"[Array]":"[Object]";var A,F=function(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=w.call(Array(t.indent+1)," ")}return{base:r,prev:w.call(Array(e+1),r)}}(a,i);if(void 0===n)n=[];else if(Y(n,e)>=0)return"[Circular]";function H(e,r,o){if(r&&(n=P.call(n)).push(r),o){var s={depth:a.depth};return z(a,"quoteStyle")&&(s.quoteStyle=a.quoteStyle),t(e,s,i+1,n)}return t(e,a,i+1,n)}if("function"==typeof e&&!X(e)){var q=function(t){if(t.name)return t.name;var e=g.call(m.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}(e),tt=$(e,H);return"[Function"+(q?": "+q:" (anonymous)")+"]"+(tt.length>0?" { "+w.call(tt,", ")+" }":"")}if(G(e)){var et=C?_.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):O.call(e);return"object"!=typeof e||C?et:Z(et)}if((A=e)&&"object"==typeof A&&("undefined"!=typeof HTMLElement&&A instanceof HTMLElement||"string"==typeof A.nodeName&&"function"==typeof A.getAttribute)){for(var rt="<"+x.call(String(e.nodeName)),it=e.attributes||[],nt=0;nt"}if(j(e)){if(0===e.length)return"[]";var ot=$(e,H);return F&&!function(t){for(var e=0;e=0)return!1;return!0}(ot)?"["+Q(ot,F)+"]":"[ "+w.call(ot,", ")+" ]"}if(function(t){return!("[object Error]"!==V(t)||R&&"object"==typeof t&&R in t)}(e)){var st=$(e,H);return"cause"in Error.prototype||!("cause"in e)||M.call(e,"cause")?0===st.length?"["+String(e)+"]":"{ ["+String(e)+"] "+w.call(st,", ")+" }":"{ ["+String(e)+"] "+w.call(E.call("[cause]: "+H(e.cause),st),", ")+" }"}if("object"==typeof e&&h){if(U&&"function"==typeof e[U]&&N)return N(e,{depth:S-i});if("symbol"!==h&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!o||!t||"object"!=typeof t)return!1;try{o.call(t);try{u.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var at=[];return s&&s.call(e,(function(t,r){at.push(H(r,e,!0)+" => "+H(t,e))})),J("Map",o.call(e),at,F)}if(function(t){if(!u||!t||"object"!=typeof t)return!1;try{u.call(t);try{o.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var ht=[];return l&&l.call(e,(function(t){ht.push(H(t,e))})),J("Set",u.call(e),ht,F)}if(function(t){if(!c||!t||"object"!=typeof t)return!1;try{c.call(t,c);try{p.call(t,p)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return K("WeakMap");if(function(t){if(!p||!t||"object"!=typeof t)return!1;try{p.call(t,p);try{c.call(t,c)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return K("WeakSet");if(function(t){if(!d||!t||"object"!=typeof t)return!1;try{return d.call(t),!0}catch(t){}return!1}(e))return K("WeakRef");if(function(t){return!("[object Number]"!==V(t)||R&&"object"==typeof t&&R in t)}(e))return Z(H(Number(e)));if(function(t){if(!t||"object"!=typeof t||!I)return!1;try{return I.call(t),!0}catch(t){}return!1}(e))return Z(H(I.call(e)));if(function(t){return!("[object Boolean]"!==V(t)||R&&"object"==typeof t&&R in t)}(e))return Z(f.call(e));if(function(t){return!("[object String]"!==V(t)||R&&"object"==typeof t&&R in t)}(e))return Z(H(String(e)));if(!function(t){return!("[object Date]"!==V(t)||R&&"object"==typeof t&&R in t)}(e)&&!X(e)){var ut=$(e,H),lt=D?D(e)===Object.prototype:e instanceof Object||e.constructor===Object,ct=e instanceof Object?"":"null prototype",pt=!lt&&R&&Object(e)===e&&R in e?v.call(V(e),8,-1):ct?"Object":"",dt=(lt||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(pt||ct?"["+w.call(E.call([],pt||[],ct||[]),": ")+"] ":"");return 0===ut.length?dt+"{}":F?dt+"{"+Q(ut,F)+"}":dt+"{ "+w.call(ut,", ")+" }"}return String(e)};var H=Object.prototype.hasOwnProperty||function(t){return t in this};function z(t,e){return H.call(t,e)}function V(t){return y.call(t)}function Y(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,i=t.length;re.maxStringLength){var r=t.length-e.maxStringLength,i="... "+r+" more character"+(r>1?"s":"");return W(v.call(t,0,e.maxStringLength),e)+i}return B(_.call(_.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,q),"single",e)}function q(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":"")+b.call(e.toString(16))}function Z(t){return"Object("+t+")"}function K(t){return t+" { ? }"}function J(t,e,r,i){return t+" ("+e+") {"+(i?Q(r,i):w.call(r,", "))+"}"}function Q(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+w.call(t,","+r)+"\n"+e.prev}function $(t,e){var r=j(t),i=[];if(r){i.length=t.length;for(var n=0;n{"use strict";t.exports=(t,e={})=>{if(!t)return;const r={key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:/?#]*)(?::(\d*))?))?((((?:[^?#/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@/]*@)([^:/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#/]*\.[^?#/.]+(?:[?#]|$)))*\/?)?([^?#/]*))(?:\?([^#]*))?(?:#(.*))?)/}},i=r.parser[e.strictMode?"strict":"loose"].exec(t),n={};let o=14;for(;o--;)n[r.key[o]]=i[o]||"";return n[r.q.name]={},n[r.key[12]].replace(r.q.parser,(function(t,e,i){e&&(n[r.q.name][e]=i)})),n}},3832:(t,e,r)=>{"use strict";r.r(e),r.d(e,{ALPHA_MODES:()=>E,AbstractBatchRenderer:()=>Mi,AbstractRenderer:()=>wi,AccessibilityManager:()=>ye,AnimatedSprite:()=>Js,AppLoaderPlugin:()=>fn,Application:()=>ki,Attribute:()=>rr,BLEND_MODES:()=>y,BUFFER_BITS:()=>f,BasePrepare:()=>Po,BaseRenderTexture:()=>Ze,BaseTexture:()=>Ne,BatchDrawCall:()=>Oi,BatchGeometry:()=>Li,BatchPluginFactory:()=>Ui,BatchRenderer:()=>Bi,BatchShaderGenerator:()=>Di,BatchTextureArray:()=>Ci,BitmapFont:()=>rs,BitmapFontData:()=>Zo,BitmapFontLoader:()=>ss,BitmapText:()=>os,Bounds:()=>oe,Buffer:()=>nr,CLEAR_MODES:()=>w,Circle:()=>Ht,Container:()=>ce,CountLimiter:()=>go,DEG_TO_RAD:()=>Xt,DRAW_MODES:()=>m,DisplayObject:()=>he,ENV:()=>p,Ellipse:()=>zt,Extract:()=>Gi,FORMATS:()=>g,FillStyle:()=>En,Filter:()=>ti,FilterState:()=>yr,Framebuffer:()=>qe,GC_MODES:()=>P,GLFramebuffer:()=>xr,GLProgram:()=>fi,GLTexture:()=>bi,GRAPHICS_CURVES:()=>Tn,Geometry:()=>lr,Graphics:()=>$n,GraphicsData:()=>Yn,GraphicsGeometry:()=>Zn,IGLUniformData:()=>di,InteractionData:()=>_e,InteractionEvent:()=>xe,InteractionManager:()=>Se,InteractionTrackingData:()=>Te,LINE_CAP:()=>vn,LINE_JOIN:()=>gn,LineStyle:()=>Kn,Loader:()=>dn,LoaderResource:()=>ln,MASK_TYPES:()=>I,MIPMAP_MODES:()=>T,MSAA_QUALITY:()=>A,MaskData:()=>Ir,Matrix:()=>Zt,Mesh:()=>Vo,MeshBatchUvs:()=>Go,MeshGeometry:()=>Wo,MeshMaterial:()=>Yo,NineSlicePlane:()=>Zs,ObjectRenderer:()=>gr,ObservablePoint:()=>qt,PI_2:()=>kt,PRECISION:()=>S,ParticleContainer:()=>_n,ParticleRenderer:()=>xn,PlaneGeometry:()=>zs,Point:()=>Wt,Polygon:()=>Vt,Prepare:()=>Oo,Program:()=>Jr,Quad:()=>cr,QuadUv:()=>pr,RAD_TO_DEG:()=>jt,RENDERER_TYPE:()=>d,Rectangle:()=>Gt,RenderTexture:()=>tr,RenderTexturePool:()=>er,Renderer:()=>Pi,RopeGeometry:()=>Vs,RoundedRectangle:()=>Yt,Runner:()=>Ie,SCALE_MODES:()=>b,SHAPES:()=>Bt,Shader:()=>Qr,SimpleMesh:()=>qs,SimplePlane:()=>Ws,SimpleRope:()=>Ys,Sprite:()=>io,SpriteMaskFilter:()=>ii,Spritesheet:()=>Ro,SpritesheetLoader:()=>Mo,State:()=>$r,System:()=>Ye,TARGETS:()=>v,TEXT_GRADIENT:()=>Fn,TYPES:()=>_,TemporaryDisplayObject:()=>ue,Text:()=>yo,TextMetrics:()=>co,TextStyle:()=>ao,Texture:()=>Qe,TextureLoader:()=>pn,TextureMatrix:()=>ri,TextureUvs:()=>Ke,Ticker:()=>ge,TickerPlugin:()=>ve,TilingSprite:()=>Fo,TilingSpriteRenderer:()=>ko,TimeLimiter:()=>Co,Transform:()=>ne,UPDATE_PRIORITY:()=>de,UniformGroup:()=>fr,VERSION:()=>ra,ViewableBuffer:()=>Ri,WRAP_MODES:()=>x,accessibleTarget:()=>pe,autoDetectRenderer:()=>Si,checkMaxIfStatementsInShader:()=>qr,defaultFilterVertex:()=>Ai,defaultVertex:()=>Ii,filters:()=>ia,graphicsUtils:()=>Vn,groupD8:()=>ie,interactiveTarget:()=>we,isMobile:()=>V,resources:()=>Ve,settings:()=>Y,systems:()=>Ti,uniformParsers:()=>Hr,useDeprecated:()=>ea,utils:()=>i});var i={};r.r(i),r.d(i,{BaseTextureCache:()=>At,CanvasRenderTarget:()=>Rt,DATA_URI:()=>Lt,EventEmitter:()=>q(),ProgramCache:()=>St,TextureCache:()=>It,clearTextureCache:()=>Ct,correctBlendMode:()=>ut,createIndicesForQuads:()=>dt,decomposeDataUri:()=>Nt,deprecation:()=>Pt,destroyTextureCache:()=>Ot,determineCrossOrigin:()=>Ft,earcut:()=>K(),getBufferType:()=>ft,getResolutionOfUrl:()=>Ut,hex2rgb:()=>nt,hex2string:()=>ot,interleaveTypedArrays:()=>mt,isMobile:()=>V,isPow2:()=>vt,isWebGLSupported:()=>it,log2:()=>_t,nextPow2:()=>gt,premultiplyBlendMode:()=>ht,premultiplyRgba:()=>lt,premultiplyTint:()=>ct,premultiplyTintToRgba:()=>pt,removeItems:()=>bt,rgb2hex:()=>at,sayHello:()=>rt,sign:()=>xt,skipHello:()=>et,string2hex:()=>st,trimCanvas:()=>Mt,uid:()=>Et,url:()=>J});var n=r(6713),o=r(7418),s=r.n(o);if(window.Promise||(window.Promise=n.Polyfill),Object.assign||(Object.assign=s()),Date.now&&Date.prototype.getTime||(Date.now=function(){return(new Date).getTime()}),!window.performance||!window.performance.now){var a=Date.now();window.performance||(window.performance={}),window.performance.now=function(){return Date.now()-a}}for(var h=Date.now(),u=["ms","moz","webkit","o"],l=0;l0?1:-1}),Number.isInteger||(Number.isInteger=function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}),window.ArrayBuffer||(window.ArrayBuffer=Array),window.Float32Array||(window.Float32Array=Array),window.Uint32Array||(window.Uint32Array=Array),window.Uint16Array||(window.Uint16Array=Array),window.Uint8Array||(window.Uint8Array=Array),window.Int32Array||(window.Int32Array=Array);var p,d,f,y,m,g,v,_,b,x,T,E,w,P,S,I,A,O=/iPhone/i,C=/iPod/i,R=/iPad/i,M=/\biOS-universal(?:.+)Mac\b/i,D=/\bAndroid(?:.+)Mobile\b/i,L=/Android/i,N=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,F=/Silk/i,U=/Windows Phone/i,B=/\bWindows(?:.+)ARM\b/i,k=/BlackBerry/i,j=/BB10/i,X=/Opera Mini/i,G=/\b(CriOS|Chrome)(?:.+)Mobile/i,H=/Mobile(?:.+)Firefox\b/i,z=function(t){return void 0!==t&&"MacIntel"===t.platform&&"number"==typeof t.maxTouchPoints&&t.maxTouchPoints>1&&"undefined"==typeof MSStream},V=function(t){var e={userAgent:"",platform:"",maxTouchPoints:0};t||"undefined"==typeof navigator?"string"==typeof t?e.userAgent=t:t&&t.userAgent&&(e={userAgent:t.userAgent,platform:t.platform,maxTouchPoints:t.maxTouchPoints||0}):e={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0};var r=e.userAgent,i=r.split("[FBAN");void 0!==i[1]&&(r=i[0]),void 0!==(i=r.split("Twitter"))[1]&&(r=i[0]);var n=function(t){return function(e){return e.test(t)}}(r),o={apple:{phone:n(O)&&!n(U),ipod:n(C),tablet:!n(O)&&(n(R)||z(e))&&!n(U),universal:n(M),device:(n(O)||n(C)||n(R)||n(M)||z(e))&&!n(U)},amazon:{phone:n(N),tablet:!n(N)&&n(F),device:n(N)||n(F)},android:{phone:!n(U)&&n(N)||!n(U)&&n(D),tablet:!n(U)&&!n(N)&&!n(D)&&(n(F)||n(L)),device:!n(U)&&(n(N)||n(F)||n(D)||n(L))||n(/\bokhttp\b/i)},windows:{phone:n(U),tablet:n(B),device:n(U)||n(B)},other:{blackberry:n(k),blackberry10:n(j),opera:n(X),firefox:n(H),chrome:n(G),device:n(k)||n(j)||n(X)||n(H)||n(G)},any:!1,phone:!1,tablet:!1};return o.any=o.apple.device||o.android.device||o.windows.device||o.other.device,o.phone=o.apple.phone||o.android.phone||o.windows.phone,o.tablet=o.apple.tablet||o.android.tablet||o.windows.tablet,o}(window.navigator),Y={MIPMAP_TEXTURES:1,ANISOTROPIC_LEVEL:0,RESOLUTION:1,FILTER_RESOLUTION:1,SPRITE_MAX_TEXTURES:function(t){var e,r=!0;(V.tablet||V.phone)&&(V.apple.device&&(e=navigator.userAgent.match(/OS (\d+)_(\d+)?/))&&parseInt(e[1],10)<11&&(r=!1),V.android.device&&(e=navigator.userAgent.match(/Android\s([0-9.]*)/))&&parseInt(e[1],10)<7&&(r=!1));return r?32:4}(),SPRITE_BATCH_SIZE:4096,RENDER_OPTIONS:{view:null,antialias:!1,autoDensity:!1,transparent:!1,backgroundColor:0,clearBeforeRender:!0,preserveDrawingBuffer:!1,width:800,height:600,legacy:!1},GC_MODE:0,GC_MAX_IDLE:3600,GC_MAX_CHECK_COUNT:600,WRAP_MODE:33071,SCALE_MODE:1,PRECISION_VERTEX:"highp",PRECISION_FRAGMENT:V.apple.device?"highp":"mediump",CAN_UPLOAD_SAME_BUFFER:!V.apple.device,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1},W=r(6729),q=r.n(W),Z=r(9187),K=r.n(Z),J=r(8575);!function(t){t[t.WEBGL_LEGACY=0]="WEBGL_LEGACY",t[t.WEBGL=1]="WEBGL",t[t.WEBGL2=2]="WEBGL2"}(p||(p={})),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.WEBGL=1]="WEBGL",t[t.CANVAS=2]="CANVAS"}(d||(d={})),function(t){t[t.COLOR=16384]="COLOR",t[t.DEPTH=256]="DEPTH",t[t.STENCIL=1024]="STENCIL"}(f||(f={})),function(t){t[t.NORMAL=0]="NORMAL",t[t.ADD=1]="ADD",t[t.MULTIPLY=2]="MULTIPLY",t[t.SCREEN=3]="SCREEN",t[t.OVERLAY=4]="OVERLAY",t[t.DARKEN=5]="DARKEN",t[t.LIGHTEN=6]="LIGHTEN",t[t.COLOR_DODGE=7]="COLOR_DODGE",t[t.COLOR_BURN=8]="COLOR_BURN",t[t.HARD_LIGHT=9]="HARD_LIGHT",t[t.SOFT_LIGHT=10]="SOFT_LIGHT",t[t.DIFFERENCE=11]="DIFFERENCE",t[t.EXCLUSION=12]="EXCLUSION",t[t.HUE=13]="HUE",t[t.SATURATION=14]="SATURATION",t[t.COLOR=15]="COLOR",t[t.LUMINOSITY=16]="LUMINOSITY",t[t.NORMAL_NPM=17]="NORMAL_NPM",t[t.ADD_NPM=18]="ADD_NPM",t[t.SCREEN_NPM=19]="SCREEN_NPM",t[t.NONE=20]="NONE",t[t.SRC_OVER=0]="SRC_OVER",t[t.SRC_IN=21]="SRC_IN",t[t.SRC_OUT=22]="SRC_OUT",t[t.SRC_ATOP=23]="SRC_ATOP",t[t.DST_OVER=24]="DST_OVER",t[t.DST_IN=25]="DST_IN",t[t.DST_OUT=26]="DST_OUT",t[t.DST_ATOP=27]="DST_ATOP",t[t.ERASE=26]="ERASE",t[t.SUBTRACT=28]="SUBTRACT",t[t.XOR=29]="XOR"}(y||(y={})),function(t){t[t.POINTS=0]="POINTS",t[t.LINES=1]="LINES",t[t.LINE_LOOP=2]="LINE_LOOP",t[t.LINE_STRIP=3]="LINE_STRIP",t[t.TRIANGLES=4]="TRIANGLES",t[t.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",t[t.TRIANGLE_FAN=6]="TRIANGLE_FAN"}(m||(m={})),function(t){t[t.RGBA=6408]="RGBA",t[t.RGB=6407]="RGB",t[t.ALPHA=6406]="ALPHA",t[t.LUMINANCE=6409]="LUMINANCE",t[t.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",t[t.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",t[t.DEPTH_STENCIL=34041]="DEPTH_STENCIL"}(g||(g={})),function(t){t[t.TEXTURE_2D=3553]="TEXTURE_2D",t[t.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",t[t.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",t[t.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",t[t.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",t[t.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",t[t.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z"}(v||(v={})),function(t){t[t.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",t[t.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",t[t.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",t[t.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",t[t.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",t[t.FLOAT=5126]="FLOAT",t[t.HALF_FLOAT=36193]="HALF_FLOAT"}(_||(_={})),function(t){t[t.NEAREST=0]="NEAREST",t[t.LINEAR=1]="LINEAR"}(b||(b={})),function(t){t[t.CLAMP=33071]="CLAMP",t[t.REPEAT=10497]="REPEAT",t[t.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"}(x||(x={})),function(t){t[t.OFF=0]="OFF",t[t.POW2=1]="POW2",t[t.ON=2]="ON"}(T||(T={})),function(t){t[t.NPM=0]="NPM",t[t.UNPACK=1]="UNPACK",t[t.PMA=2]="PMA",t[t.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",t[t.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",t[t.PREMULTIPLY_ALPHA=2]="PREMULTIPLY_ALPHA"}(E||(E={})),function(t){t[t.NO=0]="NO",t[t.YES=1]="YES",t[t.AUTO=2]="AUTO",t[t.BLEND=0]="BLEND",t[t.CLEAR=1]="CLEAR",t[t.BLIT=2]="BLIT"}(w||(w={})),function(t){t[t.AUTO=0]="AUTO",t[t.MANUAL=1]="MANUAL"}(P||(P={})),function(t){t.LOW="lowp",t.MEDIUM="mediump",t.HIGH="highp"}(S||(S={})),function(t){t[t.NONE=0]="NONE",t[t.SCISSOR=1]="SCISSOR",t[t.STENCIL=2]="STENCIL",t[t.SPRITE=3]="SPRITE"}(I||(I={})),function(t){t[t.NONE=0]="NONE",t[t.LOW=2]="LOW",t[t.MEDIUM=4]="MEDIUM",t[t.HIGH=8]="HIGH"}(A||(A={})),Y.RETINA_PREFIX=/@([0-9\.]+)x/,Y.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!0;var Q,$=!1,tt="5.3.12";function et(){$=!0}function rt(t){var e;if(!$){if(navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var r=["\n %c %c %c PixiJS "+tt+" - ✰ "+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;"];(e=window.console).log.apply(e,r)}else window.console&&window.console.log("PixiJS "+tt+" - "+t+" - http://www.pixijs.com/");$=!0}}function it(){return void 0===Q&&(Q=function(){var t={stencil:!0,failIfMajorPerformanceCaveat:Y.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!window.WebGLRenderingContext)return!1;var e=document.createElement("canvas"),r=e.getContext("webgl",t)||e.getContext("experimental-webgl",t),i=!(!r||!r.getContextAttributes().stencil);if(r){var n=r.getExtension("WEBGL_lose_context");n&&n.loseContext()}return r=null,i}catch(t){return!1}}()),Q}function nt(t,e){return void 0===e&&(e=[]),e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255,e}function ot(t){var e=t.toString(16);return"#"+("000000".substr(0,6-e.length)+e)}function st(t){return"string"==typeof t&&"#"===t[0]&&(t=t.substr(1)),parseInt(t,16)}function at(t){return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)}var ht=function(){for(var t=[],e=[],r=0;r<32;r++)t[r]=r,e[r]=r;t[y.NORMAL_NPM]=y.NORMAL,t[y.ADD_NPM]=y.ADD,t[y.SCREEN_NPM]=y.SCREEN,e[y.NORMAL]=y.NORMAL_NPM,e[y.ADD]=y.ADD_NPM,e[y.SCREEN]=y.SCREEN_NPM;var i=[];return i.push(e),i.push(t),i}();function ut(t,e){return ht[e?1:0][t]}function lt(t,e,r,i){return r=r||new Float32Array(4),i||void 0===i?(r[0]=t[0]*e,r[1]=t[1]*e,r[2]=t[2]*e):(r[0]=t[0],r[1]=t[1],r[2]=t[2]),r[3]=e,r}function ct(t,e){if(1===e)return(255*e<<24)+t;if(0===e)return 0;var r=t>>16&255,i=t>>8&255,n=255&t;return(255*e<<24)+((r=r*e+.5|0)<<16)+((i=i*e+.5|0)<<8)+(n*e+.5|0)}function pt(t,e,r,i){return(r=r||new Float32Array(4))[0]=(t>>16&255)/255,r[1]=(t>>8&255)/255,r[2]=(255&t)/255,(i||void 0===i)&&(r[0]*=e,r[1]*=e,r[2]*=e),r[3]=e,r}function dt(t,e){void 0===e&&(e=null);var r=6*t;if((e=e||new Uint16Array(r)).length!==r)throw new Error("Out buffer length is incorrect, got "+e.length+" and expected "+r);for(var i=0,n=0;i>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,1+(t|=t>>>16)}function vt(t){return!(t&t-1||!t)}function _t(t){var e=(t>65535?1:0)<<4,r=((t>>>=e)>255?1:0)<<3;return e|=r,e|=r=((t>>>=r)>15?1:0)<<2,(e|=r=((t>>>=r)>3?1:0)<<1)|(t>>>=r)>>1}function bt(t,e,r){var i,n=t.length;if(!(e>=n||0===r)){var o=n-(r=e+r>n?n-e:r);for(i=e;i=this.x&&t=this.y&&ee!=u>e&&t<(e-a)/(u-a)*(h-s)+s&&(r=!r)}return r},t}(),Yt=function(){function t(t,e,r,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===r&&(r=0),void 0===i&&(i=0),void 0===n&&(n=20),this.x=t,this.y=e,this.width=r,this.height=i,this.radius=n,this.type=Bt.RREC}return t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height,this.radius)},t.prototype.contains=function(t,e){if(this.width<=0||this.height<=0)return!1;if(t>=this.x&&t<=this.x+this.width&&e>=this.y&&e<=this.y+this.height){if(e>=this.y+this.radius&&e<=this.y+this.height-this.radius||t>=this.x+this.radius&&t<=this.x+this.width-this.radius)return!0;var r=t-(this.x+this.radius),i=e-(this.y+this.radius),n=this.radius*this.radius;if(r*r+i*i<=n)return!0;if((r=t-(this.x+this.width-this.radius))*r+i*i<=n)return!0;if(r*r+(i=e-(this.y+this.height-this.radius))*i<=n)return!0;if((r=t-(this.x+this.radius))*r+i*i<=n)return!0}return!1},t}(),Wt=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.x=t,this.y=e}return t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.copyFrom=function(t){return this.set(t.x,t.y),this},t.prototype.copyTo=function(t){return t.set(this.x,this.y),t},t.prototype.equals=function(t){return t.x===this.x&&t.y===this.y},t.prototype.set=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.x=t,this.y=e,this},t}(),qt=function(){function t(t,e,r,i){void 0===r&&(r=0),void 0===i&&(i=0),this._x=r,this._y=i,this.cb=t,this.scope=e}return t.prototype.clone=function(e,r){return void 0===e&&(e=this.cb),void 0===r&&(r=this.scope),new t(e,r,this._x,this._y)},t.prototype.set=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this._x===t&&this._y===e||(this._x=t,this._y=e,this.cb.call(this.scope)),this},t.prototype.copyFrom=function(t){return this._x===t.x&&this._y===t.y||(this._x=t.x,this._y=t.y,this.cb.call(this.scope)),this},t.prototype.copyTo=function(t){return t.set(this._x,this._y),t},t.prototype.equals=function(t){return t.x===this._x&&t.y===this._y},Object.defineProperty(t.prototype,"x",{get:function(){return this._x},set:function(t){this._x!==t&&(this._x=t,this.cb.call(this.scope))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this._y},set:function(t){this._y!==t&&(this._y=t,this.cb.call(this.scope))},enumerable:!1,configurable:!0}),t}(),Zt=function(){function t(t,e,r,i,n,o){void 0===t&&(t=1),void 0===e&&(e=0),void 0===r&&(r=0),void 0===i&&(i=1),void 0===n&&(n=0),void 0===o&&(o=0),this.array=null,this.a=t,this.b=e,this.c=r,this.d=i,this.tx=n,this.ty=o}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,e,r,i,n,o){return this.a=t,this.b=e,this.c=r,this.d=i,this.tx=n,this.ty=o,this},t.prototype.toArray=function(t,e){this.array||(this.array=new Float32Array(9));var r=e||this.array;return t?(r[0]=this.a,r[1]=this.b,r[2]=0,r[3]=this.c,r[4]=this.d,r[5]=0,r[6]=this.tx,r[7]=this.ty,r[8]=1):(r[0]=this.a,r[1]=this.c,r[2]=this.tx,r[3]=this.b,r[4]=this.d,r[5]=this.ty,r[6]=0,r[7]=0,r[8]=1),r},t.prototype.apply=function(t,e){e=e||new Wt;var r=t.x,i=t.y;return e.x=this.a*r+this.c*i+this.tx,e.y=this.b*r+this.d*i+this.ty,e},t.prototype.applyInverse=function(t,e){e=e||new Wt;var r=1/(this.a*this.d+this.c*-this.b),i=t.x,n=t.y;return e.x=this.d*r*i+-this.c*r*n+(this.ty*this.c-this.tx*this.d)*r,e.y=this.a*r*n+-this.b*r*i+(-this.ty*this.a+this.tx*this.b)*r,e},t.prototype.translate=function(t,e){return this.tx+=t,this.ty+=e,this},t.prototype.scale=function(t,e){return this.a*=t,this.d*=e,this.c*=t,this.b*=e,this.tx*=t,this.ty*=e,this},t.prototype.rotate=function(t){var e=Math.cos(t),r=Math.sin(t),i=this.a,n=this.c,o=this.tx;return this.a=i*e-this.b*r,this.b=i*r+this.b*e,this.c=n*e-this.d*r,this.d=n*r+this.d*e,this.tx=o*e-this.ty*r,this.ty=o*r+this.ty*e,this},t.prototype.append=function(t){var e=this.a,r=this.b,i=this.c,n=this.d;return this.a=t.a*e+t.b*i,this.b=t.a*r+t.b*n,this.c=t.c*e+t.d*i,this.d=t.c*r+t.d*n,this.tx=t.tx*e+t.ty*i+this.tx,this.ty=t.tx*r+t.ty*n+this.ty,this},t.prototype.setTransform=function(t,e,r,i,n,o,s,a,h){return this.a=Math.cos(s+h)*n,this.b=Math.sin(s+h)*n,this.c=-Math.sin(s-a)*o,this.d=Math.cos(s-a)*o,this.tx=t-(r*this.a+i*this.c),this.ty=e-(r*this.b+i*this.d),this},t.prototype.prepend=function(t){var e=this.tx;if(1!==t.a||0!==t.b||0!==t.c||1!==t.d){var r=this.a,i=this.c;this.a=r*t.a+this.b*t.c,this.b=r*t.b+this.b*t.d,this.c=i*t.a+this.d*t.c,this.d=i*t.b+this.d*t.d}return this.tx=e*t.a+this.ty*t.c+t.tx,this.ty=e*t.b+this.ty*t.d+t.ty,this},t.prototype.decompose=function(t){var e=this.a,r=this.b,i=this.c,n=this.d,o=-Math.atan2(-i,n),s=Math.atan2(r,e),a=Math.abs(o+s);return a<1e-5||Math.abs(kt-a)<1e-5?(t.rotation=s,t.skew.x=t.skew.y=0):(t.rotation=0,t.skew.x=o,t.skew.y=s),t.scale.x=Math.sqrt(e*e+r*r),t.scale.y=Math.sqrt(i*i+n*n),t.position.x=this.tx,t.position.y=this.ty,t},t.prototype.invert=function(){var t=this.a,e=this.b,r=this.c,i=this.d,n=this.tx,o=t*i-e*r;return this.a=i/o,this.b=-e/o,this.c=-r/o,this.d=t/o,this.tx=(r*this.ty-i*n)/o,this.ty=-(t*this.ty-e*n)/o,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 e=new t;return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e},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},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}(),Kt=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],Jt=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],Qt=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],$t=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],te=[],ee=[],re=Math.sign;!function(){for(var t=0;t<16;t++){var e=[];te.push(e);for(var r=0;r<16;r++)for(var i=re(Kt[t]*Kt[r]+Qt[t]*Jt[r]),n=re(Jt[t]*Kt[r]+$t[t]*Jt[r]),o=re(Kt[t]*Qt[r]+Qt[t]*$t[r]),s=re(Jt[t]*Qt[r]+$t[t]*$t[r]),a=0;a<16;a++)if(Kt[a]===i&&Jt[a]===n&&Qt[a]===o&&$t[a]===s){e.push(a);break}}for(t=0;t<16;t++){var h=new Zt;h.set(Kt[t],Jt[t],Qt[t],$t[t],0,0),ee.push(h)}}();var ie={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 Kt[t]},uY:function(t){return Jt[t]},vX:function(t){return Qt[t]},vY:function(t){return $t[t]},inv:function(t){return 8&t?15&t:7&-t},add:function(t,e){return te[t][e]},sub:function(t,e){return te[t][ie.inv(e)]},rotate180:function(t){return 4^t},isVertical:function(t){return 2==(3&t)},byDirection:function(t,e){return 2*Math.abs(t)<=Math.abs(e)?e>=0?ie.S:ie.N:2*Math.abs(e)<=Math.abs(t)?t>0?ie.E:ie.W:e>0?t>0?ie.SE:ie.SW:t>0?ie.NE:ie.NW},matrixAppendRotationInv:function(t,e,r,i){void 0===r&&(r=0),void 0===i&&(i=0);var n=ee[ie.inv(e)];n.tx=r,n.ty=i,t.append(n)}},ne=function(){function t(){this.worldTransform=new Zt,this.localTransform=new Zt,this.position=new qt(this.onChange,this,0,0),this.scale=new qt(this.onChange,this,1,1),this.pivot=new qt(this.onChange,this,0,0),this.skew=new qt(this.updateSkew,this,0,0),this._rotation=0,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._localID=0,this._currentLocalID=0,this._worldID=0,this._parentID=0}return t.prototype.onChange=function(){this._localID++},t.prototype.updateSkew=function(){this._cx=Math.cos(this._rotation+this.skew.y),this._sx=Math.sin(this._rotation+this.skew.y),this._cy=-Math.sin(this._rotation-this.skew.x),this._sy=Math.cos(this._rotation-this.skew.x),this._localID++},t.prototype.updateLocalTransform=function(){var t=this.localTransform;this._localID!==this._currentLocalID&&(t.a=this._cx*this.scale.x,t.b=this._sx*this.scale.x,t.c=this._cy*this.scale.y,t.d=this._sy*this.scale.y,t.tx=this.position.x-(this.pivot.x*t.a+this.pivot.y*t.c),t.ty=this.position.y-(this.pivot.x*t.b+this.pivot.y*t.d),this._currentLocalID=this._localID,this._parentID=-1)},t.prototype.updateTransform=function(t){var e=this.localTransform;if(this._localID!==this._currentLocalID&&(e.a=this._cx*this.scale.x,e.b=this._sx*this.scale.x,e.c=this._cy*this.scale.y,e.d=this._sy*this.scale.y,e.tx=this.position.x-(this.pivot.x*e.a+this.pivot.y*e.c),e.ty=this.position.y-(this.pivot.x*e.b+this.pivot.y*e.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==t._worldID){var r=t.worldTransform,i=this.worldTransform;i.a=e.a*r.a+e.b*r.c,i.b=e.a*r.b+e.b*r.d,i.c=e.c*r.a+e.d*r.c,i.d=e.c*r.b+e.d*r.d,i.tx=e.tx*r.a+e.ty*r.c+r.tx,i.ty=e.tx*r.b+e.ty*r.d+r.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}();Y.SORTABLE_CHILDREN=!1;var oe=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?Gt.EMPTY:((t=t||new Gt(0,0,1,1)).x=this.minX,t.y=this.minY,t.width=this.maxX-this.minX,t.height=this.maxY-this.minY,t)},t.prototype.addPoint=function(t){this.minX=Math.min(this.minX,t.x),this.maxX=Math.max(this.maxX,t.x),this.minY=Math.min(this.minY,t.y),this.maxY=Math.max(this.maxY,t.y)},t.prototype.addQuad=function(t){var e=this.minX,r=this.minY,i=this.maxX,n=this.maxY,o=t[0],s=t[1];e=oi?o:i,n=s>n?s:n,e=(o=t[2])i?o:i,n=s>n?s:n,e=(o=t[4])i?o:i,n=s>n?s:n,e=(o=t[6])i?o:i,n=s>n?s:n,this.minX=e,this.minY=r,this.maxX=i,this.maxY=n},t.prototype.addFrame=function(t,e,r,i,n){this.addFrameMatrix(t.worldTransform,e,r,i,n)},t.prototype.addFrameMatrix=function(t,e,r,i,n){var o=t.a,s=t.b,a=t.c,h=t.d,u=t.tx,l=t.ty,c=this.minX,p=this.minY,d=this.maxX,f=this.maxY,y=o*e+a*r+u,m=s*e+h*r+l;c=yd?y:d,f=m>f?m:f,c=(y=o*i+a*r+u)d?y:d,f=m>f?m:f,c=(y=o*e+a*n+u)d?y:d,f=m>f?m:f,c=(y=o*i+a*n+u)d?y:d,f=m>f?m:f,this.minX=c,this.minY=p,this.maxX=d,this.maxY=f},t.prototype.addVertexData=function(t,e,r){for(var i=this.minX,n=this.minY,o=this.maxX,s=this.maxY,a=e;ao?h:o,s=u>s?u:s}this.minX=i,this.minY=n,this.maxX=o,this.maxY=s},t.prototype.addVertices=function(t,e,r,i){this.addVerticesMatrix(t.worldTransform,e,r,i)},t.prototype.addVerticesMatrix=function(t,e,r,i,n,o){void 0===n&&(n=0),void 0===o&&(o=n);for(var s=t.a,a=t.b,h=t.c,u=t.d,l=t.tx,c=t.ty,p=this.minX,d=this.minY,f=this.maxX,y=this.maxY,m=r;mi?t.maxX:i,this.maxY=t.maxY>n?t.maxY:n},t.prototype.addBoundsMask=function(t,e){var r=t.minX>e.minX?t.minX:e.minX,i=t.minY>e.minY?t.minY:e.minY,n=t.maxXh?n:h,this.maxY=o>u?o:u}},t.prototype.addBoundsMatrix=function(t,e){this.addFrameMatrix(e,t.minX,t.minY,t.maxX,t.maxY)},t.prototype.addBoundsArea=function(t,e){var r=t.minX>e.x?t.minX:e.x,i=t.minY>e.y?t.minY:e.y,n=t.maxXh?n:h,this.maxY=o>u?o:u}},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,r,i,n,o){t-=n,e-=o,r+=n,i+=o,this.minX=this.minXr?this.maxX:r,this.minY=this.minYi?this.maxY:i},t}(),se=function(t,e){return se=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])},se(t,e)};function ae(t,e){function r(){this.constructor=t}se(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var he=function(t){function e(){var e=t.call(this)||this;return e.tempDisplayObjectParent=null,e.transform=new ne,e.alpha=1,e.visible=!0,e.renderable=!0,e.parent=null,e.worldAlpha=1,e._lastSortedIndex=0,e._zIndex=0,e.filterArea=null,e.filters=null,e._enabledFilters=null,e._bounds=new oe,e._localBounds=null,e._boundsID=0,e._boundsRect=null,e._localBoundsRect=null,e._mask=null,e._destroyed=!1,e.isSprite=!1,e.isMask=!1,e}return ae(e,t),e.mixin=function(t){for(var r=Object.keys(t),i=0;i1)for(var i=0;ithis.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},e.prototype.swapChildren=function(t,e){if(t!==e){var r=this.getChildIndex(t),i=this.getChildIndex(e);this.children[r]=e,this.children[i]=t,this.onChildrenChange(r=this.children.length)throw new Error("The index "+e+" supplied is out of bounds "+this.children.length);var r=this.getChildIndex(t);bt(this.children,r,1),this.children.splice(e,0,t),this.onChildrenChange(e)},e.prototype.getChildAt=function(t){if(t<0||t>=this.children.length)throw new Error("getChildAt: Index ("+t+") does not exist.");return this.children[t]},e.prototype.removeChild=function(){for(var t=arguments,e=[],r=0;r1)for(var i=0;i0&&n<=e){r=this.children.splice(i,n);for(var o=0;o1&&this.children.sort(le),this.sortDirty=!1},e.prototype.updateTransform=function(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(var t=0,e=this.children.length;t title : "+t.title+"
tabIndex: "+t.tabIndex},t.prototype.capHitArea=function(t){t.x<0&&(t.width+=t.x,t.x=0),t.y<0&&(t.height+=t.y,t.y=0),t.x+t.width>this.renderer.width&&(t.width=this.renderer.width-t.x),t.y+t.height>this.renderer.height&&(t.height=this.renderer.height-t.y)},t.prototype.addChild=function(t){var e=this.pool.pop();e||((e=document.createElement("button")).style.width=fe+"px",e.style.height=fe+"px",e.style.backgroundColor=this.debug?"rgba(255,255,255,0.5)":"transparent",e.style.position="absolute",e.style.zIndex=2..toString(),e.style.borderStyle="none",navigator.userAgent.toLowerCase().indexOf("chrome")>-1?e.setAttribute("aria-live","off"):e.setAttribute("aria-live","polite"),navigator.userAgent.match(/rv:.*Gecko\//)?e.setAttribute("aria-relevant","additions"):e.setAttribute("aria-relevant","text"),e.addEventListener("click",this._onClick.bind(this)),e.addEventListener("focus",this._onFocus.bind(this)),e.addEventListener("focusout",this._onFocusOut.bind(this))),e.style.pointerEvents=t.accessiblePointerEvents,e.type=t.accessibleType,t.accessibleTitle&&null!==t.accessibleTitle?e.title=t.accessibleTitle:t.accessibleHint&&null!==t.accessibleHint||(e.title="displayObject "+t.tabIndex),t.accessibleHint&&null!==t.accessibleHint&&e.setAttribute("aria-label",t.accessibleHint),this.debug&&this.updateDebugHTML(e),t._accessibleActive=!0,t._accessibleDiv=e,e.displayObject=t,this.children.push(t),this.div.appendChild(t._accessibleDiv),t._accessibleDiv.tabIndex=t.tabIndex},t.prototype._onClick=function(t){var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"click",e.eventData),e.dispatchEvent(t.target.displayObject,"pointertap",e.eventData),e.dispatchEvent(t.target.displayObject,"tap",e.eventData)},t.prototype._onFocus=function(t){t.target.getAttribute("aria-live")||t.target.setAttribute("aria-live","assertive");var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"mouseover",e.eventData)},t.prototype._onFocusOut=function(t){t.target.getAttribute("aria-live")||t.target.setAttribute("aria-live","polite");var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"mouseout",e.eventData)},t.prototype._onKeyDown=function(t){9===t.keyCode&&this.activate()},t.prototype._onMouseMove=function(t){0===t.movementX&&0===t.movementY||this.deactivate()},t.prototype.destroy=function(){this.destroyTouchHook(),this.div=null,window.document.removeEventListener("mousemove",this._onMouseMove,!0),window.removeEventListener("keydown",this._onKeyDown),this.pool=null,this.children=null,this.renderer=null},t}();Y.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"}(de||(de={}));var me=function(){function t(t,e,r,i){void 0===e&&(e=null),void 0===r&&(r=0),void 0===i&&(i=!1),this.fn=t,this.context=e,this.priority=r,this.once=i,this.next=null,this.previous=null,this._destroyed=!1}return t.prototype.match=function(t,e){return void 0===e&&(e=null),this.fn===t&&this.context===e},t.prototype.emit=function(t){this.fn&&(this.context?this.fn.call(this.context,t):this.fn(t));var e=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),e},t.prototype.connect=function(t){this.previous=t,t.next&&(t.next.previous=this),this.next=t.next,t.next=this},t.prototype.destroy=function(t){void 0===t&&(t=!1),this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);var e=this.next;return this.next=t?null:e,this.previous=null,e},t}(),ge=function(){function t(){var t=this;this._head=new me(null,null,1/0),this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this.autoStart=!1,this.deltaTime=1,this.deltaMS=1/Y.TARGET_FPMS,this.elapsedMS=1/Y.TARGET_FPMS,this.lastTime=-1,this.speed=1,this.started=!1,this._protected=!1,this._lastFrame=-1,this._tick=function(e){t._requestId=null,t.started&&(t.update(e),t.started&&null===t._requestId&&t._head.next&&(t._requestId=requestAnimationFrame(t._tick)))}}return t.prototype._requestIfNeeded=function(){null===this._requestId&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))},t.prototype._cancelIfNeeded=function(){null!==this._requestId&&(cancelAnimationFrame(this._requestId),this._requestId=null)},t.prototype._startIfPossible=function(){this.started?this._requestIfNeeded():this.autoStart&&this.start()},t.prototype.add=function(t,e,r){return void 0===r&&(r=de.NORMAL),this._addListener(new me(t,e,r))},t.prototype.addOnce=function(t,e,r){return void 0===r&&(r=de.NORMAL),this._addListener(new me(t,e,r,!0))},t.prototype._addListener=function(t){var e=this._head.next,r=this._head;if(e){for(;e;){if(t.priority>e.priority){t.connect(r);break}r=e,e=e.next}t.previous||t.connect(r)}else t.connect(r);return this._startIfPossible(),this},t.prototype.remove=function(t,e){for(var r=this._head.next;r;)r=r.match(t,e)?r.destroy():r.next;return this._head.next||this._cancelIfNeeded(),this},Object.defineProperty(t.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}),t.prototype.start=function(){this.started||(this.started=!0,this._requestIfNeeded())},t.prototype.stop=function(){this.started&&(this.started=!1,this._cancelIfNeeded())},t.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}},t.prototype.update=function(t){var e;if(void 0===t&&(t=performance.now()),t>this.lastTime){if((e=this.elapsedMS=t-this.lastTime)>this._maxElapsedMS&&(e=this._maxElapsedMS),e*=this.speed,this._minElapsedMS){var r=t-this._lastFrame|0;if(r=0;l--){var c=u[l],p=this.recursiveFindHit(t,c,r,i,a);if(p){if(!c.parent)continue;a=!1,p&&(t.target&&(i=!1),s=!0)}}return n&&(i&&!t.target&&!e.hitArea&&e.containsPoint&&e.containsPoint(o)&&(s=!0),e.interactive&&(s&&!t.target&&(t.target=e),r&&r(t,e,!!s))),s},t.prototype.findHit=function(t,e,r,i){this.recursiveFindHit(t,e,r,i,!1)},t}(),we={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};he.mixin(we);var Pe={target:null,data:{global:null}},Se=function(t){function e(e,r){var i=t.call(this)||this;return r=r||{},i.renderer=e,i.autoPreventDefault=void 0===r.autoPreventDefault||r.autoPreventDefault,i.interactionFrequency=r.interactionFrequency||10,i.mouse=new _e,i.mouse.identifier=1,i.mouse.global.set(-999999),i.activeInteractionData={},i.activeInteractionData[1]=i.mouse,i.interactionDataPool=[],i.eventData=new xe,i.interactionDOMElement=null,i.moveWhenInside=!1,i.eventsAdded=!1,i.tickerAdded=!1,i.mouseOverRenderer=!1,i.supportsTouchEvents="ontouchstart"in window,i.supportsPointerEvents=!!window.PointerEvent,i.onPointerUp=i.onPointerUp.bind(i),i.processPointerUp=i.processPointerUp.bind(i),i.onPointerCancel=i.onPointerCancel.bind(i),i.processPointerCancel=i.processPointerCancel.bind(i),i.onPointerDown=i.onPointerDown.bind(i),i.processPointerDown=i.processPointerDown.bind(i),i.onPointerMove=i.onPointerMove.bind(i),i.processPointerMove=i.processPointerMove.bind(i),i.onPointerOut=i.onPointerOut.bind(i),i.processPointerOverOut=i.processPointerOverOut.bind(i),i.onPointerOver=i.onPointerOver.bind(i),i.cursorStyles={default:"inherit",pointer:"pointer"},i.currentCursorMode=null,i.cursor=null,i.resolution=1,i.delayedEvents=[],i.search=new Ee,i._tempDisplayObject=new ue,i._useSystemTicker=void 0===r.useSystemTicker||r.useSystemTicker,i.setTargetElement(i.renderer.view,i.renderer.resolution),i}return function(t,e){function r(){this.constructor=t}be(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}(e,t),Object.defineProperty(e.prototype,"useSystemTicker",{get:function(){return this._useSystemTicker},set:function(t){this._useSystemTicker=t,t?this.addTickerListener():this.removeTickerListener()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastObjectRendered",{get:function(){return this.renderer._lastObjectRendered||this._tempDisplayObject},enumerable:!1,configurable:!0}),e.prototype.hitTest=function(t,e){return Pe.target=null,Pe.data.global=t,e||(e=this.lastObjectRendered),this.processInteractive(Pe,e,null,!0),Pe.target},e.prototype.setTargetElement=function(t,e){void 0===e&&(e=1),this.removeTickerListener(),this.removeEvents(),this.interactionDOMElement=t,this.resolution=e,this.addEvents(),this.addTickerListener()},e.prototype.addTickerListener=function(){!this.tickerAdded&&this.interactionDOMElement&&this._useSystemTicker&&(ge.system.add(this.tickerUpdate,this,de.INTERACTION),this.tickerAdded=!0)},e.prototype.removeTickerListener=function(){this.tickerAdded&&(ge.system.remove(this.tickerUpdate,this),this.tickerAdded=!1)},e.prototype.addEvents=function(){if(!this.eventsAdded&&this.interactionDOMElement){var t=this.interactionDOMElement.style;window.navigator.msPointerEnabled?(t.msContentZooming="none",t.msTouchAction="none"):this.supportsPointerEvents&&(t.touchAction="none"),this.supportsPointerEvents?(window.document.addEventListener("pointermove",this.onPointerMove,!0),this.interactionDOMElement.addEventListener("pointerdown",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("pointerleave",this.onPointerOut,!0),this.interactionDOMElement.addEventListener("pointerover",this.onPointerOver,!0),window.addEventListener("pointercancel",this.onPointerCancel,!0),window.addEventListener("pointerup",this.onPointerUp,!0)):(window.document.addEventListener("mousemove",this.onPointerMove,!0),this.interactionDOMElement.addEventListener("mousedown",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("mouseout",this.onPointerOut,!0),this.interactionDOMElement.addEventListener("mouseover",this.onPointerOver,!0),window.addEventListener("mouseup",this.onPointerUp,!0)),this.supportsTouchEvents&&(this.interactionDOMElement.addEventListener("touchstart",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("touchcancel",this.onPointerCancel,!0),this.interactionDOMElement.addEventListener("touchend",this.onPointerUp,!0),this.interactionDOMElement.addEventListener("touchmove",this.onPointerMove,!0)),this.eventsAdded=!0}},e.prototype.removeEvents=function(){if(this.eventsAdded&&this.interactionDOMElement){var t=this.interactionDOMElement.style;window.navigator.msPointerEnabled?(t.msContentZooming="",t.msTouchAction=""):this.supportsPointerEvents&&(t.touchAction=""),this.supportsPointerEvents?(window.document.removeEventListener("pointermove",this.onPointerMove,!0),this.interactionDOMElement.removeEventListener("pointerdown",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("pointerleave",this.onPointerOut,!0),this.interactionDOMElement.removeEventListener("pointerover",this.onPointerOver,!0),window.removeEventListener("pointercancel",this.onPointerCancel,!0),window.removeEventListener("pointerup",this.onPointerUp,!0)):(window.document.removeEventListener("mousemove",this.onPointerMove,!0),this.interactionDOMElement.removeEventListener("mousedown",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("mouseout",this.onPointerOut,!0),this.interactionDOMElement.removeEventListener("mouseover",this.onPointerOver,!0),window.removeEventListener("mouseup",this.onPointerUp,!0)),this.supportsTouchEvents&&(this.interactionDOMElement.removeEventListener("touchstart",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("touchcancel",this.onPointerCancel,!0),this.interactionDOMElement.removeEventListener("touchend",this.onPointerUp,!0),this.interactionDOMElement.removeEventListener("touchmove",this.onPointerMove,!0)),this.interactionDOMElement=null,this.eventsAdded=!1}},e.prototype.tickerUpdate=function(t){this._deltaTime+=t,this._deltaTime8)throw new Error("max arguments reached");var h=this.name,u=this.items;this._aliasCount++;for(var l=0,c=u.length;l0&&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(Ie.prototype,{dispatch:{value:Ie.prototype.emit},run:{value:Ie.prototype.emit}}),Y.PREFER_ENV=V.any?p.WEBGL:p.WEBGL2,Y.STRICT_TEXTURE_CACHE=!1;var Ae=[];function Oe(t,e){if(!t)return null;var r="";if("string"==typeof t){var i=/\.(\w{3,4})(?:$|\?|#)/i.exec(t);i&&(r=i[1].toLowerCase())}for(var n=Ae.length-1;n>=0;--n){var o=Ae[n];if(o.test&&o.test(t,r))return new o(t,e)}throw new Error("Unrecognized source type to auto-detect Resource")}var Ce=function(t,e){return Ce=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])},Ce(t,e)};function Re(t,e){function r(){this.constructor=t}Ce(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var Me=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this._width=t,this._height=e,this.destroyed=!1,this.internal=!1,this.onResize=new Ie("setRealSize"),this.onUpdate=new Ie("update"),this.onError=new Ie("onError")}return t.prototype.bind=function(t){this.onResize.add(t),this.onUpdate.add(t),this.onError.add(t),(this._width||this._height)&&this.onResize.emit(this._width,this._height)},t.prototype.unbind=function(t){this.onResize.remove(t),this.onUpdate.remove(t),this.onError.remove(t)},t.prototype.resize=function(t,e){t===this._width&&e===this._height||(this._width=t,this._height=e,this.onResize.emit(t,e))},Object.defineProperty(t.prototype,"valid",{get:function(){return!!this._width&&!!this._height},enumerable:!1,configurable:!0}),t.prototype.update=function(){this.destroyed||this.onUpdate.emit()},t.prototype.load=function(){return Promise.resolve(this)},Object.defineProperty(t.prototype,"width",{get:function(){return this._width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this._height},enumerable:!1,configurable:!0}),t.prototype.style=function(t,e,r){return!1},t.prototype.dispose=function(){},t.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,this.dispose(),this.onError.removeAll(),this.onError=null,this.onResize.removeAll(),this.onResize=null,this.onUpdate.removeAll(),this.onUpdate=null)},t.test=function(t,e){return!1},t}(),De=function(t){function e(e,r){var i=this,n=r||{},o=n.width,s=n.height;if(!o||!s)throw new Error("BufferResource width or height invalid");return(i=t.call(this,o,s)||this).data=e,i}return Re(e,t),e.prototype.upload=function(t,e,r){var i=t.gl;return i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e.alphaMode===E.UNPACK),r.width===e.width&&r.height===e.height?i.texSubImage2D(e.target,0,0,0,e.width,e.height,e.format,e.type,this.data):(r.width=e.width,r.height=e.height,i.texImage2D(e.target,0,r.internalFormat,e.width,e.height,0,e.format,r.type,this.data)),!0},e.prototype.dispose=function(){this.data=null},e.test=function(t){return t instanceof Float32Array||t instanceof Uint8Array||t instanceof Uint32Array},e}(Me),Le={scaleMode:b.NEAREST,format:g.RGBA,alphaMode:E.NPM},Ne=function(t){function e(e,r){void 0===e&&(e=null),void 0===r&&(r=null);var i=t.call(this)||this,n=(r=r||{}).alphaMode,o=r.mipmap,s=r.anisotropicLevel,a=r.scaleMode,h=r.width,u=r.height,l=r.wrapMode,c=r.format,p=r.type,d=r.target,f=r.resolution,y=r.resourceOptions;return!e||e instanceof Me||((e=Oe(e,y)).internal=!0),i.width=h||0,i.height=u||0,i.resolution=f||Y.RESOLUTION,i.mipmap=void 0!==o?o:Y.MIPMAP_TEXTURES,i.anisotropicLevel=void 0!==s?s:Y.ANISOTROPIC_LEVEL,i.wrapMode=l||Y.WRAP_MODE,i.scaleMode=void 0!==a?a:Y.SCALE_MODE,i.format=c||g.RGBA,i.type=p||_.UNSIGNED_BYTE,i.target=d||v.TEXTURE_2D,i.alphaMode=void 0!==n?n:E.UNPACK,void 0!==r.premultiplyAlpha&&(i.premultiplyAlpha=r.premultiplyAlpha),i.uid=Et(),i.touched=0,i.isPowerOfTwo=!1,i._refreshPOT(),i._glTextures={},i.dirtyId=0,i.dirtyStyleId=0,i.cacheId=null,i.valid=h>0&&u>0,i.textureCacheIds=[],i.destroyed=!1,i.resource=null,i._batchEnabled=0,i._batchLocation=0,i.parentTextureArray=null,i.setResource(e),i}return Re(e,t),Object.defineProperty(e.prototype,"realWidth",{get:function(){return Math.ceil(this.width*this.resolution-1e-4)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"realHeight",{get:function(){return Math.ceil(this.height*this.resolution-1e-4)},enumerable:!1,configurable:!0}),e.prototype.setStyle=function(t,e){var r;return void 0!==t&&t!==this.scaleMode&&(this.scaleMode=t,r=!0),void 0!==e&&e!==this.mipmap&&(this.mipmap=e,r=!0),r&&this.dirtyStyleId++,this},e.prototype.setSize=function(t,e,r){return this.resolution=r||this.resolution,this.width=t,this.height=e,this._refreshPOT(),this.update(),this},e.prototype.setRealSize=function(t,e,r){return this.resolution=r||this.resolution,this.width=t/this.resolution,this.height=e/this.resolution,this._refreshPOT(),this.update(),this},e.prototype._refreshPOT=function(){this.isPowerOfTwo=vt(this.realWidth)&&vt(this.realHeight)},e.prototype.setResolution=function(t){var e=this.resolution;return e===t||(this.resolution=t,this.valid&&(this.width=this.width*e/t,this.height=this.height*e/t,this.emit("update",this)),this._refreshPOT()),this},e.prototype.setResource=function(t){if(this.resource===t)return this;if(this.resource)throw new Error("Resource can be set only once");return t.bind(this),this.resource=t,this},e.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))},e.prototype.onError=function(t){this.emit("error",this,t)},e.prototype.destroy=function(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete At[this.cacheId],delete It[this.cacheId],this.cacheId=null),this.dispose(),e.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0},e.prototype.dispose=function(){this.emit("dispose",this)},e.prototype.castToBaseTexture=function(){return this},e.from=function(t,r,i){void 0===i&&(i=Y.STRICT_TEXTURE_CACHE);var n="string"==typeof t,o=null;n?o=t:(t._pixiId||(t._pixiId="pixiid_"+Et()),o=t._pixiId);var s=At[o];if(n&&i&&!s)throw new Error('The cacheId "'+o+'" does not exist in BaseTextureCache.');return s||((s=new e(t,r)).cacheId=o,e.addToCache(s,o)),s},e.fromBuffer=function(t,r,i,n){t=t||new Float32Array(r*i*4);var o=new De(t,{width:r,height:i}),s=t instanceof Float32Array?_.FLOAT:_.UNSIGNED_BYTE;return new e(o,Object.assign(Le,n||{width:r,height:i,type:s}))},e.addToCache=function(t,e){e&&(-1===t.textureCacheIds.indexOf(e)&&t.textureCacheIds.push(e),At[e]&&console.warn("BaseTexture added to the cache with an id ["+e+"] that already had an entry"),At[e]=t)},e.removeFromCache=function(t){if("string"==typeof t){var e=At[t];if(e){var r=e.textureCacheIds.indexOf(t);return r>-1&&e.textureCacheIds.splice(r,1),delete At[t],e}}else if(t&&t.textureCacheIds){for(var i=0;i0){if(!t.resource)throw new Error("CubeResource does not support copying of renderTexture.");this.addResourceAt(t.resource,e)}else t.target=v.TEXTURE_CUBE_MAP_POSITIVE_X+e,t.parentTextureArray=this.baseTexture,this.items[e]=t;return t.valid&&!this.valid&&this.resize(t.realWidth,t.realHeight),this.items[e]=t,this},e.prototype.upload=function(t,r,i){for(var n=this.itemDirtyIds,o=0;o]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i,e}(Be),He=function(t){function e(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];Be.crossOrigin(o,s,i.crossorigin);for(var a=0;a0&&!1===t.paused&&!1===t.ended&&t.readyState>2},e.prototype._isSourceReady=function(){var t=this.source;return 3===t.readyState||4===t.readyState},e.prototype._onPlayStart=function(){this.valid||this._onCanPlay(),this.autoUpdate&&!this._isConnectedToTicker&&(ge.shared.add(this.update,this),this._isConnectedToTicker=!0)},e.prototype._onPlayStop=function(){this._isConnectedToTicker&&(ge.shared.remove(this.update,this),this._isConnectedToTicker=!1)},e.prototype._onCanPlay=function(){var t=this.source;t.removeEventListener("canplay",this._onCanPlay),t.removeEventListener("canplaythrough",this._onCanPlay);var e=this.valid;this.resize(t.videoWidth,t.videoHeight),!e&&this._resolve&&(this._resolve(this),this._resolve=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&t.play()},e.prototype.dispose=function(){this._isConnectedToTicker&&ge.shared.remove(this.update,this);var e=this.source;e&&(e.removeEventListener("error",this._onError,!0),e.pause(),e.src="",e.load()),t.prototype.dispose.call(this)},Object.defineProperty(e.prototype,"autoUpdate",{get:function(){return this._autoUpdate},set:function(t){t!==this._autoUpdate&&(this._autoUpdate=t,!this._autoUpdate&&this._isConnectedToTicker?(ge.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._isSourcePlaying()&&(ge.shared.add(this.update,this),this._isConnectedToTicker=!0))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"updateFPS",{get:function(){return this._updateFPS},set:function(t){t!==this._updateFPS&&(this._updateFPS=t)},enumerable:!1,configurable:!0}),e.test=function(t,r){return t instanceof HTMLVideoElement||e.TYPES.indexOf(r)>-1},e.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"],e.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"},e}(Be),ze=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Re(e,t),e.test=function(t){return!!window.createImageBitmap&&t instanceof ImageBitmap},e}(Be);Ae.push(Xe,ze,ke,He,Ge,De,je,Ue);var Ve={Resource:Me,BaseImageResource:Be,INSTALLED:Ae,autoDetectResource:Oe,AbstractMultiResource:Fe,ArrayResource:Ue,BufferResource:De,CanvasResource:ke,CubeResource:je,ImageResource:Xe,SVGResource:Ge,VideoResource:He,ImageBitmapResource:ze},Ye=function(){function t(t){this.renderer=t}return t.prototype.destroy=function(){this.renderer=null},t}(),We=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Re(e,t),e.prototype.upload=function(t,e,r){var i=t.gl;return i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e.alphaMode===E.UNPACK),r.width===e.width&&r.height===e.height?i.texSubImage2D(e.target,0,0,0,e.width,e.height,e.format,e.type,this.data):(r.width=e.width,r.height=e.height,i.texImage2D(e.target,0,1===t.context.webGLVersion?i.DEPTH_COMPONENT:i.DEPTH_COMPONENT16,e.width,e.height,0,e.format,e.type,this.data)),!0},e}(De),qe=function(){function t(t,e){this.width=Math.ceil(t||100),this.height=Math.ceil(e||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 Ie("disposeFramebuffer"),this.multisample=A.NONE}return Object.defineProperty(t.prototype,"colorTexture",{get:function(){return this.colorTextures[0]},enumerable:!1,configurable:!0}),t.prototype.addColorTexture=function(t,e){return void 0===t&&(t=0),this.colorTextures[t]=e||new Ne(null,{scaleMode:b.NEAREST,resolution:1,mipmap:T.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this},t.prototype.addDepthTexture=function(t){return this.depthTexture=t||new Ne(new We(null,{width:this.width,height:this.height}),{scaleMode:b.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:T.OFF,format:g.DEPTH_COMPONENT,type:_.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this},t.prototype.enableDepth=function(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this},t.prototype.enableStencil=function(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this},t.prototype.resize=function(t,e){if(t=Math.ceil(t),e=Math.ceil(e),t!==this.width||e!==this.height){this.width=t,this.height=e,this.dirtyId++,this.dirtySize++;for(var r=0;r-1&&e.textureCacheIds.splice(r,1),delete It[t],e}}else if(t&&t.textureCacheIds){for(var i=0;ithis.baseTexture.width,s=r+n>this.baseTexture.height;if(o||s){var a=o&&s?"and":"or",h="X: "+e+" + "+i+" = "+(e+i)+" > "+this.baseTexture.width,u="Y: "+r+" + "+n+" = "+(r+n)+" > "+this.baseTexture.height;throw new Error("Texture Error: frame does not fit inside the base Texture dimensions: "+h+" "+a+" "+u)}this.valid=i&&n&&this.baseTexture.valid,this.trim||this.rotate||(this.orig=t),this.valid&&this.updateUvs()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rotate",{get:function(){return this._rotate},set:function(t){this._rotate=t,this.valid&&this.updateUvs()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this.orig.width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.orig.height},enumerable:!1,configurable:!0}),e.prototype.castToBaseTexture=function(){return this.baseTexture},e}(q());function $e(t){t.destroy=function(){},t.on=function(){},t.once=function(){},t.emit=function(){}}Qe.EMPTY=new Qe(new Ne),$e(Qe.EMPTY),$e(Qe.EMPTY.baseTexture),Qe.WHITE=function(){var t=document.createElement("canvas");t.width=16,t.height=16;var e=t.getContext("2d");return e.fillStyle="white",e.fillRect(0,0,16,16),new Qe(new Ne(new ke(t)))}(),$e(Qe.WHITE),$e(Qe.WHITE.baseTexture);var tr=function(t){function e(e,r){var i=this,n=null;if(!(e instanceof Ze)){var o=arguments[1],s=arguments[2],a=arguments[3],h=arguments[4];console.warn("Please use RenderTexture.create("+o+", "+s+") instead of the ctor directly."),n=arguments[0],r=null,e=new Ze({width:o,height:s,scaleMode:a,resolution:h})}return(i=t.call(this,e,r)||this).legacyRenderer=n,i.valid=!0,i.filterFrame=null,i.filterPoolKey=null,i.updateUvs(),i}return Re(e,t),Object.defineProperty(e.prototype,"framebuffer",{get:function(){return this.baseTexture.framebuffer},enumerable:!1,configurable:!0}),e.prototype.resize=function(t,e,r){void 0===r&&(r=!0),t=Math.ceil(t),e=Math.ceil(e),this.valid=t>0&&e>0,this._frame.width=this.orig.width=t,this._frame.height=this.orig.height=e,r&&this.baseTexture.resize(t,e),this.updateUvs()},e.prototype.setResolution=function(t){var e=this.baseTexture;e.resolution!==t&&(e.setResolution(t),this.resize(e.width,e.height,!1))},e.create=function(t){return"number"==typeof t&&(t={width:t,height:arguments[1],scaleMode:arguments[2],resolution:arguments[3]}),new e(new Ze(t))},e}(Qe),er=function(){function t(t){this.texturePool={},this.textureOptions=t||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0}return t.prototype.createTexture=function(t,e){var r=new Ze(Object.assign({width:t,height:e,resolution:1},this.textureOptions));return new tr(r)},t.prototype.getOptimalTexture=function(e,r,i){void 0===i&&(i=1);var n=t.SCREEN_KEY;e*=i,r*=i,this.enableFullScreen&&e===this._pixelsWidth&&r===this._pixelsHeight||(n=(65535&(e=gt(e)))<<16|65535&(r=gt(r))),this.texturePool[n]||(this.texturePool[n]=[]);var o=this.texturePool[n].pop();return o||(o=this.createTexture(e,r)),o.filterPoolKey=n,o.setResolution(i),o},t.prototype.getFilterTexture=function(t,e){var r=this.getOptimalTexture(t.width,t.height,e||t.resolution);return r.filterFrame=t.filterFrame,r},t.prototype.returnTexture=function(t){var e=t.filterPoolKey;t.filterFrame=null,this.texturePool[e].push(t)},t.prototype.returnFilterTexture=function(t){this.returnTexture(t)},t.prototype.clear=function(t){if(t=!1!==t)for(var e in this.texturePool){var r=this.texturePool[e];if(r)for(var i=0;i0&&e.height>0,i)for(var n=0;n1){for(var u=0;u1&&this.renderer.framebuffer.blit(),1===r.length)r[0].apply(this,e.renderTexture,h.renderTexture,w.BLEND,e),this.returnFilterTexture(e.renderTexture);else{var u=e.renderTexture,l=this.getOptimalFilterTexture(u.width,u.height,e.resolution);l.filterFrame=u.filterFrame;var c=0;for(c=0;c=0;--i)t[i]=r[i]||null,t[i]&&(t[i]._batchLocation=i)},e.prototype.boundArray=function(t,e,r,i){for(var n=t.elements,o=t.ids,s=t.count,a=0,h=0;h=0&&l=p.WEBGL2&&(r=t.getContext("webgl2",e)),r)this.webGLVersion=2;else if(this.webGLVersion=1,!(r=t.getContext("webgl",e)||t.getContext("experimental-webgl",e)))throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=r,this.getExtensions(),this.gl},e.prototype.getExtensions=function(){var t=this.gl;1===this.webGLVersion?Object.assign(this.extensions,{drawBuffers:t.getExtension("WEBGL_draw_buffers"),depthTexture:t.getExtension("WEBGL_depth_texture"),loseContext:t.getExtension("WEBGL_lose_context"),vertexArrayObject:t.getExtension("OES_vertex_array_object")||t.getExtension("MOZ_OES_vertex_array_object")||t.getExtension("WEBKIT_OES_vertex_array_object"),anisotropicFiltering:t.getExtension("EXT_texture_filter_anisotropic"),uint32ElementIndex:t.getExtension("OES_element_index_uint"),floatTexture:t.getExtension("OES_texture_float"),floatTextureLinear:t.getExtension("OES_texture_float_linear"),textureHalfFloat:t.getExtension("OES_texture_half_float"),textureHalfFloatLinear:t.getExtension("OES_texture_half_float_linear")}):2===this.webGLVersion&&Object.assign(this.extensions,{anisotropicFiltering:t.getExtension("EXT_texture_filter_anisotropic"),colorBufferFloat:t.getExtension("EXT_color_buffer_float"),floatTextureLinear:t.getExtension("OES_texture_float_linear")})},e.prototype.handleContextLost=function(t){t.preventDefault()},e.prototype.handleContextRestored=function(){this.renderer.runners.contextChange.emit(this.gl)},e.prototype.destroy=function(){var t=this.renderer.view;t.removeEventListener("webglcontextlost",this.handleContextLost),t.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(t){var e=t.getContextAttributes(),r="WebGL2RenderingContext"in window&&t instanceof window.WebGL2RenderingContext;r&&(this.webGLVersion=2),e.stencil||console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly");var i=r||!!t.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}(Ye),xr=function(t){this.framebuffer=t,this.stencil=null,this.dirtyId=0,this.dirtyFormat=0,this.dirtySize=0,this.multisample=A.NONE,this.msaaBuffer=null,this.blitFramebuffer=null},Tr=new Gt,Er=function(t){function e(e){var r=t.call(this,e)||this;return r.managedFramebuffers=[],r.unknownFramebuffer=new qe(10,10),r.msaaSamples=null,r}return Re(e,t),e.prototype.contextChange=function(){var t=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new Gt,this.hasMRT=!0,this.writeDepthTexture=!0,this.disposeAll(!0),1===this.renderer.context.webGLVersion){var e=this.renderer.context.extensions.drawBuffers,r=this.renderer.context.extensions.depthTexture;Y.PREFER_ENV===p.WEBGL_LEGACY&&(e=null,r=null),e?t.drawBuffers=function(t){return e.drawBuffersWEBGL(t)}:(this.hasMRT=!1,t.drawBuffers=function(){}),r||(this.writeDepthTexture=!1)}else this.msaaSamples=t.getInternalformatParameter(t.RENDERBUFFER,t.RGBA8,t.SAMPLES)},e.prototype.bind=function(t,e){var r=this.gl;if(t){var i=t.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(t);this.current!==t&&(this.current=t,r.bindFramebuffer(r.FRAMEBUFFER,i.framebuffer)),i.dirtyId!==t.dirtyId&&(i.dirtyId=t.dirtyId,i.dirtyFormat!==t.dirtyFormat?(i.dirtyFormat=t.dirtyFormat,this.updateFramebuffer(t)):i.dirtySize!==t.dirtySize&&(i.dirtySize=t.dirtySize,this.resizeFramebuffer(t)));for(var n=0;n1&&(r.msaaBuffer=e.createRenderbuffer(),e.bindRenderbuffer(e.RENDERBUFFER,r.msaaBuffer),e.renderbufferStorageMultisample(e.RENDERBUFFER,r.multisample,e.RGBA8,t.width,t.height),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.RENDERBUFFER,r.msaaBuffer));for(var n=[],o=0;o1)){var s=t.colorTextures[o],a=s.parentTextureArray||s;this.renderer.texture.bind(a,0),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0+o,s.target,a._glTextures[this.CONTEXT_UID].texture,0),n.push(e.COLOR_ATTACHMENT0+o)}if(n.length>1&&e.drawBuffers(n),t.depthTexture&&this.writeDepthTexture){var h=t.depthTexture;this.renderer.texture.bind(h,0),e.framebufferTexture2D(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.TEXTURE_2D,h._glTextures[this.CONTEXT_UID].texture,0)}r.stencil||!t.stencil&&!t.depth||(r.stencil=e.createRenderbuffer(),e.bindRenderbuffer(e.RENDERBUFFER,r.stencil),e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_STENCIL,t.width,t.height),t.depthTexture||e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.RENDERBUFFER,r.stencil))},e.prototype.detectSamples=function(t){var e=this.msaaSamples,r=A.NONE;if(t<=1||null===e)return r;for(var i=0;i=0&&this.managedFramebuffers.splice(n,1),t.disposeRunner.remove(this),e||(i.deleteFramebuffer(r.framebuffer),r.stencil&&i.deleteRenderbuffer(r.stencil))}},e.prototype.disposeAll=function(t){var e=this.managedFramebuffers;this.managedFramebuffers=[];for(var r=0;r=i.data.byteLength)e.bufferSubData(o,0,i.data);else{var s=i.static?e.STATIC_DRAW:e.DYNAMIC_DRAW;n.byteLength=i.data.byteLength,e.bufferData(o,i.data,s)}}}},e.prototype.checkCompatibility=function(t,e){var r=t.attributes,i=e.attributeData;for(var n in i)if(!r[n])throw new Error('shader and geometry incompatible, geometry missing the "'+n+'" attribute')},e.prototype.getSignature=function(t,e){var r=t.attributes,i=e.attributeData,n=["g",t.id];for(var o in r)i[o]&&n.push(o);return n.join("-")},e.prototype.initGeometryVao=function(t,e,r){void 0===r&&(r=!0),this.checkCompatibility(t,e);var i=this.gl,n=this.CONTEXT_UID,o=this.getSignature(t,e),s=t.glVertexArrayObjects[this.CONTEXT_UID],a=s[o];if(a)return s[e.id]=a,a;var h=t.buffers,u=t.attributes,l={},c={};for(var p in h)l[p]=0,c[p]=0;for(var p in u)!u[p].size&&e.attributeData[p]?u[p].size=e.attributeData[p].size:u[p].size||console.warn("PIXI Geometry attribute '"+p+"' size cannot be determined (likely the bound shader does not have the attribute)"),l[u[p].buffer]+=u[p].size*Pr[u[p].type];for(var p in u){var d=u[p],f=d.size;void 0===d.stride&&(l[d.buffer]===f*Pr[d.type]?d.stride=0:d.stride=l[d.buffer]),void 0===d.start&&(d.start=c[d.buffer],c[d.buffer]+=f*Pr[d.type])}a=i.createVertexArray(),i.bindVertexArray(a);for(var y=0;y=p.WEBGL2&&(e=t.getContext("webgl2",{})),e||((e=t.getContext("webgl",{})||t.getContext("experimental-webgl",{}))?e.getExtension("WEBGL_draw_buffers"):e=null),Lr=e}return Lr}function Fr(t,e,r){if("precision"!==t.substring(0,9)){var i=e;return e===S.HIGH&&r!==S.HIGH&&(i=S.MEDIUM),"precision "+i+" float;\n"+t}return r!==S.HIGH&&"precision highp"===t.substring(0,15)?t.replace("precision highp","precision mediump"):t}var Ur={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};function Br(t){return Ur[t]}var kr=null,jr={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",INT_SAMPLER_2D:"sampler2D",UNSIGNED_INT_SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube",INT_SAMPLER_CUBE:"samplerCube",UNSIGNED_INT_SAMPLER_CUBE:"samplerCube",SAMPLER_2D_ARRAY:"sampler2DArray",INT_SAMPLER_2D_ARRAY:"sampler2DArray",UNSIGNED_INT_SAMPLER_2D_ARRAY:"sampler2DArray"};function Xr(t,e){if(!kr){var r=Object.keys(jr);kr={};for(var i=0;i0&&(e+="\nelse "),re.name?1:-1})),o=0;o0?this._useCurrent():t.disable(t.SCISSOR_TEST)},e.prototype._useCurrent=function(){var t=this.maskStack[this.maskStack.length-1]._scissorRect,e=this.renderer.renderTexture.current,r=this.renderer.projection,i=r.transform,n=r.sourceFrame,o=r.destinationFrame,s=e?e.resolution:this.renderer.resolution,a=(t.x-n.x)*s+o.x,h=(t.y-n.y)*s+o.y,u=t.width*s,l=t.height*s;i&&(a+=i.tx*s,h+=i.ty*s),e||(h=this.renderer.height-l-h),this.renderer.gl.scissor(a,h,u,l)},e}(oi),ai=function(t){function e(e){var r=t.call(this,e)||this;return r.glConst=WebGLRenderingContext.STENCIL_TEST,r}return Re(e,t),e.prototype.getStackLength=function(){var t=this.maskStack[this.maskStack.length-1];return t?t._stencilCounter:0},e.prototype.push=function(t){var e=t.maskObject,r=this.renderer.gl,i=t._stencilCounter;0===i&&(this.renderer.framebuffer.forceStencil(),r.enable(r.STENCIL_TEST)),t._stencilCounter++,r.colorMask(!1,!1,!1,!1),r.stencilFunc(r.EQUAL,i,this._getBitwiseMask()),r.stencilOp(r.KEEP,r.KEEP,r.INCR),e.renderable=!0,e.render(this.renderer),this.renderer.batch.flush(),e.renderable=!1,this._useCurrent()},e.prototype.pop=function(t){var e=this.renderer.gl;0===this.getStackLength()?(e.disable(e.STENCIL_TEST),e.clear(e.STENCIL_BUFFER_BIT),e.clearStencil(0)):(e.colorMask(!1,!1,!1,!1),e.stencilOp(e.KEEP,e.KEEP,e.DECR),t.renderable=!0,t.render(this.renderer),this.renderer.batch.flush(),t.renderable=!1,this._useCurrent())},e.prototype._useCurrent=function(){var t=this.renderer.gl;t.colorMask(!0,!0,!0,!0),t.stencilFunc(t.EQUAL,this.getStackLength(),this._getBitwiseMask()),t.stencilOp(t.KEEP,t.KEEP,t.KEEP)},e.prototype._getBitwiseMask=function(){return(1<>=1,r++;this.stateId=t.data}for(r=0;rthis.checkCountMax&&(this.checkCount=0,this.run())))},e.prototype.run=function(){for(var t=this.renderer.texture,e=t.managedTextures,r=!1,i=0;ithis.maxIdle&&(t.destroyTexture(n,!0),e[i]=null,r=!0)}if(r){var o=0;for(i=0;i=0;i--)this.unload(t.children[i])},e}(Ye),bi=function(t){this.texture=t,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=6408,this.internalFormat=5121},xi=function(t){function e(e){var r=t.call(this,e)||this;return r.boundTextures=[],r.currentLocation=-1,r.managedTextures=[],r._unknownBoundTextures=!1,r.unknownTexture=new Ne,r}return Re(e,t),e.prototype.contextChange=function(){var t=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion;var e=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=e;for(var r=0;r=1:e.mipmap=!1,2===this.webGLVersion||t.isPowerOfTwo?e.wrapMode=t.wrapMode:e.wrapMode=x.CLAMP,t.resource&&t.resource.style(this.renderer,t,e)||this.setStyle(t,e),e.dirtyStyleId=t.dirtyStyleId)},e.prototype.setStyle=function(t,e){var r=this.gl;if(e.mipmap&&r.generateMipmap(t.target),r.texParameteri(t.target,r.TEXTURE_WRAP_S,e.wrapMode),r.texParameteri(t.target,r.TEXTURE_WRAP_T,e.wrapMode),e.mipmap){r.texParameteri(t.target,r.TEXTURE_MIN_FILTER,t.scaleMode===b.LINEAR?r.LINEAR_MIPMAP_LINEAR:r.NEAREST_MIPMAP_NEAREST);var i=this.renderer.context.extensions.anisotropicFiltering;if(i&&t.anisotropicLevel>0&&t.scaleMode===b.LINEAR){var n=Math.min(t.anisotropicLevel,r.getParameter(i.MAX_TEXTURE_MAX_ANISOTROPY_EXT));r.texParameterf(t.target,i.TEXTURE_MAX_ANISOTROPY_EXT,n)}}else r.texParameteri(t.target,r.TEXTURE_MIN_FILTER,t.scaleMode===b.LINEAR?r.LINEAR:r.NEAREST);r.texParameteri(t.target,r.TEXTURE_MAG_FILTER,t.scaleMode===b.LINEAR?r.LINEAR:r.NEAREST)},e}(Ye),Ti={FilterSystem:mr,BatchSystem:vr,ContextSystem:br,FramebufferSystem:Er,GeometrySystem:Sr,MaskSystem:ni,ScissorSystem:si,StencilSystem:ai,ProjectionSystem:hi,RenderTextureSystem:pi,ShaderSystem:gi,StateSystem:vi,TextureGCSystem:_i,TextureSystem:xi},Ei=new Zt,wi=function(t){function e(e,r){void 0===e&&(e=d.UNKNOWN);var i=t.call(this)||this;return(r=Object.assign({},Y.RENDER_OPTIONS,r)).roundPixels&&(Y.ROUND_PIXELS=r.roundPixels,Pt("5.0.0","Renderer roundPixels option is deprecated, please use PIXI.settings.ROUND_PIXELS",2)),i.options=r,i.type=e,i.screen=new Gt(0,0,r.width,r.height),i.view=r.view||document.createElement("canvas"),i.resolution=r.resolution||Y.RESOLUTION,i.transparent=r.transparent,i.autoDensity=r.autoDensity||r.autoResize||!1,i.preserveDrawingBuffer=r.preserveDrawingBuffer,i.clearBeforeRender=r.clearBeforeRender,i._backgroundColor=0,i._backgroundColorRgba=[0,0,0,0],i._backgroundColorString="#000000",i.backgroundColor=r.backgroundColor||i._backgroundColor,i._lastObjectRendered=null,i.plugins={},i}return Re(e,t),e.prototype.initPlugins=function(t){for(var e in t)this.plugins[e]=new t[e](this)},Object.defineProperty(e.prototype,"width",{get:function(){return this.view.width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.view.height},enumerable:!1,configurable:!0}),e.prototype.resize=function(t,e){this.screen.width=t,this.screen.height=e,this.view.width=t*this.resolution,this.view.height=e*this.resolution,this.autoDensity&&(this.view.style.width=t+"px",this.view.style.height=e+"px"),this.emit("resize",t,e)},e.prototype.generateTexture=function(t,e,r,i){0===(i=i||t.getLocalBounds(null,!0)).width&&(i.width=1),0===i.height&&(i.height=1);var n=tr.create({width:0|i.width,height:0|i.height,scaleMode:e,resolution:r});return Ei.tx=-i.x,Ei.ty=-i.y,this.render(t,n,!1,Ei,!!t.parent),n},e.prototype.destroy=function(t){for(var e in this.plugins)this.plugins[e].destroy(),this.plugins[e]=null;t&&this.view.parentNode&&this.view.parentNode.removeChild(this.view);var r=this;r.plugins=null,r.type=d.UNKNOWN,r.view=null,r.screen=null,r._tempDisplayObjectParent=null,r.options=null,this._backgroundColorRgba=null,this._backgroundColorString=null,this._lastObjectRendered=null},Object.defineProperty(e.prototype,"backgroundColor",{get:function(){return this._backgroundColor},set:function(t){this._backgroundColor=t,this._backgroundColorString=ot(t),nt(t,this._backgroundColorRgba)},enumerable:!1,configurable:!0}),e}(q()),Pi=function(t){function e(r){var i=t.call(this,d.WEBGL,r)||this;return r=i.options,i.gl=null,i.CONTEXT_UID=0,i.runners={destroy:new Ie("destroy"),contextChange:new Ie("contextChange"),reset:new Ie("reset"),update:new Ie("update"),postrender:new Ie("postrender"),prerender:new Ie("prerender"),resize:new Ie("resize")},i.globalUniforms=new fr({projectionMatrix:new Zt},!0),i.addSystem(ni,"mask").addSystem(br,"context").addSystem(vi,"state").addSystem(gi,"shader").addSystem(xi,"texture").addSystem(Sr,"geometry").addSystem(Er,"framebuffer").addSystem(si,"scissor").addSystem(ai,"stencil").addSystem(hi,"projection").addSystem(_i,"textureGC").addSystem(mr,"filter").addSystem(pi,"renderTexture").addSystem(vr,"batch"),i.initPlugins(e.__plugins),r.context?i.context.initFromContext(r.context):i.context.initFromOptions({alpha:!!i.transparent,antialias:r.antialias,premultipliedAlpha:i.transparent&&"notMultiplied"!==i.transparent,stencil:!0,preserveDrawingBuffer:r.preserveDrawingBuffer,powerPreference:i.options.powerPreference}),i.renderingToScreen=!0,rt(2===i.context.webGLVersion?"WebGL 2":"WebGL 1"),i.resize(i.options.width,i.options.height),i}return Re(e,t),e.create=function(t){if(it())return new e(t);throw new Error('WebGL unsupported in this browser, use "pixi.js-legacy" for fallback canvas2d support.')},e.prototype.addSystem=function(t,e){e||(e=t.name);var r=new t(this);if(this[e])throw new Error('Whoops! The name "'+e+'" is already in use');for(var i in this[e]=r,this.runners)this.runners[i].add(r);return this},e.prototype.render=function(t,e,r,i,n){if(this.renderingToScreen=!e,this.runners.prerender.emit(),this.emit("prerender"),this.projection.transform=i,!this.context.isLost){if(e||(this._lastObjectRendered=t),!n){var o=t.enableTempParent();t.updateTransform(),t.disableTempParent(o)}this.renderTexture.bind(e),this.batch.currentRenderer.start(),(void 0!==r?r:this.clearBeforeRender)&&this.renderTexture.clear(),t.render(this),this.batch.currentRenderer.flush(),e&&e.baseTexture.update(),this.runners.postrender.emit(),this.projection.transform=null,this.emit("postrender")}},e.prototype.resize=function(e,r){t.prototype.resize.call(this,e,r),this.runners.resize.emit(e,r)},e.prototype.reset=function(){return this.runners.reset.emit(),this},e.prototype.clear=function(){this.renderTexture.bind(),this.renderTexture.clear()},e.prototype.destroy=function(e){for(var r in this.runners.destroy.emit(),this.runners)this.runners[r].destroy();t.prototype.destroy.call(this,e),this.gl=null},e.registerPlugin=function(t,r){e.__plugins=e.__plugins||{},e.__plugins[t]=r},e}(wi);function Si(t){return Pi.create(t)}var Ii="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}",Ai="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",Oi=function(){this.texArray=null,this.blend=0,this.type=m.TRIANGLES,this.start=0,this.size=0,this.data=null},Ci=function(){function t(){this.elements=[],this.ids=[],this.count=0}return t.prototype.clear=function(){for(var t=0;tthis.size&&this.flush(),this._vertexCount+=t.vertexData.length/2,this._indexCount+=t.indices.length,this._bufferedTextures[this._bufferSize]=t._texture.baseTexture,this._bufferedElements[this._bufferSize++]=t)},e.prototype.buildTexturesAndDrawCalls=function(){var t=this._bufferedTextures,r=this.MAX_TEXTURES,i=e._textureArrayPool,n=this.renderer.batch,o=this._tempBoundTextures,s=this.renderer.textureGC.count,a=++Ne._globalBatch,h=0,u=i[0],l=0;n.copyBoundTextures(o,r);for(var c=0;c=r&&(n.boundArray(u,o,a,r),this.buildDrawCalls(u,l,c),l=c,u=i[++h],++a),p._batchEnabled=a,p.touched=s,u.elements[u.count++]=p)}for(u.count>0&&(n.boundArray(u,o,a,r),this.buildDrawCalls(u,l,this._bufferSize),++h,++a),c=0;c0&&(e+="\nelse "),r0||e.responseType===t.XHR_RESPONSE_TYPE.BUFFER)?i=200:1223===i&&(i=204),2==(i/100|0)){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(t){return void this.abort("Error trying to parse loaded json: "+t)}else if(this.xhrType===t.XHR_RESPONSE_TYPE.DOCUMENT)try{if(window.DOMParser){var n=new DOMParser;this.data=n.parseFromString(r,"text/xml")}else{var o=document.createElement("div");o.innerHTML=r,this.data=o}this.type=t.TYPE.XML}catch(t){return void this.abort("Error trying to parse loaded xml: "+t)}else this.data=e.response||r;this.complete()}else this.abort("["+e.status+"] "+e.statusText+": "+e.responseURL)},e._determineCrossOrigin=function(t,e){if(0===t.indexOf("data:"))return"";if(window.origin!==window.location.origin)return"anonymous";e=e||window.location,tn||(tn=document.createElement("a")),tn.href=t;var r=!(t=zi()(tn.href,{strictMode:!0})).port&&""===e.port||t.port===e.port,i=t.protocol?t.protocol+":":"";return t.host===e.hostname&&r&&i===e.protocol?"":"anonymous"},e._determineXhrType=function(){return t._xhrTypeMap[this.extension]||t.XHR_RESPONSE_TYPE.TEXT},e._determineLoadType=function(){return t._loadTypeMap[this.extension]||t.LOAD_TYPE.XHR},e._getExtension=function(){var t=this.url,e="";if(this.isDataUrl){var r=t.indexOf("/");e=t.substring(r+1,t.indexOf(";",r))}else{var i=t.indexOf("?"),n=t.indexOf("#"),o=Math.min(i>-1?i:t.length,n>-1?n:t.length);e=(t=t.substring(0,o)).substring(t.lastIndexOf(".")+1)}return e.toLowerCase()},e._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"}},Qi(t,[{key:"isDataUrl",get:function(){return this._hasFlag(t.STATUS_FLAGS.DATA_URL)}},{key:"isComplete",get:function(){return this._hasFlag(t.STATUS_FLAGS.COMPLETE)}},{key:"isLoading",get:function(){return this._hasFlag(t.STATUS_FLAGS.LOADING)}}]),t}();function nn(t,e,r){e&&0===e.indexOf(".")&&(e=e.substring(1)),e&&(t[e]=r)}function on(t){return t.toString().replace("object ","")}rn.STATUS_FLAGS={NONE:0,DATA_URL:1,COMPLETE:2,LOADING:4},rn.TYPE={UNKNOWN:0,JSON:1,XML:2,IMAGE:3,AUDIO:4,VIDEO:5,TEXT:6},rn.LOAD_TYPE={XHR:1,IMAGE:2,AUDIO:3,VIDEO:4},rn.XHR_RESPONSE_TYPE={DEFAULT:"text",BUFFER:"arraybuffer",BLOB:"blob",DOCUMENT:"document",JSON:"json",TEXT:"text"},rn._loadTypeMap={gif:rn.LOAD_TYPE.IMAGE,png:rn.LOAD_TYPE.IMAGE,bmp:rn.LOAD_TYPE.IMAGE,jpg:rn.LOAD_TYPE.IMAGE,jpeg:rn.LOAD_TYPE.IMAGE,tif:rn.LOAD_TYPE.IMAGE,tiff:rn.LOAD_TYPE.IMAGE,webp:rn.LOAD_TYPE.IMAGE,tga:rn.LOAD_TYPE.IMAGE,svg:rn.LOAD_TYPE.IMAGE,"svg+xml":rn.LOAD_TYPE.IMAGE,mp3:rn.LOAD_TYPE.AUDIO,ogg:rn.LOAD_TYPE.AUDIO,wav:rn.LOAD_TYPE.AUDIO,mp4:rn.LOAD_TYPE.VIDEO,webm:rn.LOAD_TYPE.VIDEO},rn._xhrTypeMap={xhtml:rn.XHR_RESPONSE_TYPE.DOCUMENT,html:rn.XHR_RESPONSE_TYPE.DOCUMENT,htm:rn.XHR_RESPONSE_TYPE.DOCUMENT,xml:rn.XHR_RESPONSE_TYPE.DOCUMENT,tmx:rn.XHR_RESPONSE_TYPE.DOCUMENT,svg:rn.XHR_RESPONSE_TYPE.DOCUMENT,tsx:rn.XHR_RESPONSE_TYPE.DOCUMENT,gif:rn.XHR_RESPONSE_TYPE.BLOB,png:rn.XHR_RESPONSE_TYPE.BLOB,bmp:rn.XHR_RESPONSE_TYPE.BLOB,jpg:rn.XHR_RESPONSE_TYPE.BLOB,jpeg:rn.XHR_RESPONSE_TYPE.BLOB,tif:rn.XHR_RESPONSE_TYPE.BLOB,tiff:rn.XHR_RESPONSE_TYPE.BLOB,webp:rn.XHR_RESPONSE_TYPE.BLOB,tga:rn.XHR_RESPONSE_TYPE.BLOB,json:rn.XHR_RESPONSE_TYPE.JSON,text:rn.XHR_RESPONSE_TYPE.TEXT,txt:rn.XHR_RESPONSE_TYPE.TEXT,ttf:rn.XHR_RESPONSE_TYPE.BUFFER,otf:rn.XHR_RESPONSE_TYPE.BUFFER},rn.EMPTY_GIF="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==";var sn=window.URL||window.webkitURL,an={caching:function(t,e){var r=this;Ki[t.url]?(t.data=Ki[t.url],t.complete()):t.onComplete.once((function(){return Ki[r.url]=r.data})),e()},parsing:function(t,e){if(t.data){if(t.xhr&&t.xhrType===rn.XHR_RESPONSE_TYPE.BLOB)if(window.Blob&&"string"!=typeof t.data){if(0===t.data.type.indexOf("image")){var r=sn.createObjectURL(t.data);return t.blob=t.data,t.data=new Image,t.data.src=r,t.type=rn.TYPE.IMAGE,void(t.data.onload=function(){sn.revokeObjectURL(r),t.data.onload=null,e()})}}else{var i=t.xhr.getResponseHeader("content-type");if(i&&0===i.indexOf("image"))return t.data=new Image,t.data.src="data:"+i+";base64,"+function(t){for(var e="",r=0;r>2,n[1]=(3&i[0])<<4|i[1]>>4,n[2]=(15&i[1])<<2|i[2]>>6,n[3]=63&i[2],r-(t.length-1)){case 2:n[3]=64,n[2]=64;break;case 1:n[3]=64}for(var s=0;s16384&&(i=16384),o._properties=[!1,!0,!1,!1,!1],o._maxSize=e,o._batchSize=i,o._buffers=null,o._bufferUpdateIDs=[],o._updateID=0,o.interactiveChildren=!1,o.blendMode=y.NORMAL,o.autoResize=n,o.roundPixels=!0,o.baseTexture=null,o.setProperties(r),o._tint=0,o.tintRgb=new Float32Array(4),o.tint=16777215,o}return mn(e,t),e.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])},e.prototype.updateTransform=function(){this.displayObjectUpdateTransform()},Object.defineProperty(e.prototype,"tint",{get:function(){return this._tint},set:function(t){this._tint=t,nt(t,this.tintRgb)},enumerable:!1,configurable:!0}),e.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))},e.prototype.onChildrenChange=function(t){for(var e=Math.floor(t/this._batchSize);this._bufferUpdateIDs.lengthr&&!t.autoResize&&(o=r);var s=t._buffers;s||(s=t._buffers=this.generateBuffers(t));var a=e[0]._texture.baseTexture;this.state.blendMode=ut(t.blendMode,a.alphaMode),n.state.set(this.state);var h=n.gl,u=t.worldTransform.copyTo(this.tempMatrix);u.prepend(n.globalUniforms.uniforms.projectionMatrix),this.shader.uniforms.translationMatrix=u.toArray(!0),this.shader.uniforms.uColor=lt(t.tintRgb,t.worldAlpha,this.shader.uniforms.uColor,a.alphaMode),this.shader.uniforms.uSampler=a,this.renderer.shader.bind(this.shader);for(var l=!1,c=0,p=0;ci&&(d=i),p>=s.length&&s.push(this._generateOneMoreBuffer(t));var f=s[p];f.uploadDynamic(e,c,d);var y=t._bufferUpdateIDs[p]||0;(l=l||f._updateID0,u=a.alpha,l=u<1&&h?ct(a._tintRGB,u):a._tintRGB+(255*u<<24);i[o]=l,i[o+n]=l,i[o+2*n]=l,i[o+3*n]=l,o+=4*n}},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.shader&&(this.shader.destroy(),this.shader=null),this.tempMatrix=null},e}(gr);!function(t){t.MITER="miter",t.BEVEL="bevel",t.ROUND="round"}(gn||(gn={})),function(t){t.BUTT="butt",t.ROUND="round",t.SQUARE="square"}(vn||(vn={}));var Tn={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 r=Math.ceil(t/this.maxLength);return rthis.maxSegments&&(r=this.maxSegments),r}},En=function(){function t(){this.color=16777215,this.alpha=1,this.texture=Qe.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=Qe.WHITE,this.matrix=null,this.visible=!1},t.prototype.destroy=function(){this.texture=null,this.matrix=null},t}(),wn=function(t,e){return wn=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])},wn(t,e)};function Pn(t,e){function r(){this.constructor=t}wn(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var Sn={build:function(t){t.points=t.shape.points.slice()},triangulate:function(t,e){var r=t.points,i=t.holes,n=e.points,o=e.indices;if(r.length>=6){for(var s=[],a=0;ac&&(c+=2*Math.PI);var p=l,d=c-l,f=Math.abs(d),y=Math.sqrt(h*h+u*u),m=1+(15*f*Math.sqrt(y)/Math.PI>>0),g=d/m;if(p+=g,a){s.push(t,e),s.push(r,i);for(var v=1,_=p;vv?(k?(p.push(V,Y),p.push(x+P*M,T+S*M),p.push(V,Y),p.push(x+I*M,T+A*M)):(p.push(x-P*R,T-S*R),p.push(W,q),p.push(x-I*R,T-A*R),p.push(W,q)),f+=2):o.join===gn.ROUND?k?(p.push(V,Y),p.push(x+P*M,T+S*M),f+=Dn(x,T,x+P*M,T+S*M,x+I*M,T+A*M,p,!0)+4,p.push(V,Y),p.push(x+I*M,T+A*M)):(p.push(x-P*R,T-S*R),p.push(W,q),f+=Dn(x,T,x-P*R,T-S*R,x-I*R,T-A*R,p,!1)+4,p.push(x-I*R,T-A*R),p.push(W,q)):(p.push(V,Y),p.push(W,q)):(p.push(x-P*R,T-S*R),p.push(x+P*M,T+S*M),o.join===gn.BEVEL||z/g>v||(o.join===gn.ROUND?f+=k?Dn(x,T,x+P*M,T+S*M,x+I*M,T+A*M,p,!0)+2:Dn(x,T,x-P*R,T-S*R,x-I*R,T-A*R,p,!1)+2:(k?(p.push(W,q),p.push(W,q)):(p.push(V,Y),p.push(V,Y)),f+=2)),p.push(x-I*R,T-A*R),p.push(x+I*M,T+A*M),f+=2)}}_=i[2*(d-2)],b=i[2*(d-2)+1],x=i[2*(d-1)],P=-(b-(T=i[2*(d-1)+1])),S=_-x,P/=O=Math.sqrt(P*P+S*S),S/=O,P*=m,S*=m,p.push(x-P*R,T-S*R),p.push(x+P*M,T+S*M),h||(o.cap===vn.ROUND?f+=Dn(x-P*(R-M)*.5,T-S*(R-M)*.5,x-P*R,T-S*R,x+P*M,T+S*M,p,!1)+2:o.cap===vn.SQUARE&&(f+=Mn(x,T,P,S,R,M,!1,p)));var K=e.indices,J=Tn.epsilon*Tn.epsilon;for(D=y;Dl*a}},t.arc=function(t,e,r,i,n,o,s,a,h){for(var u=s-o,l=Tn._segmentsCount(Math.abs(u)*n,40*Math.ceil(Math.abs(u)/kt)),c=u/(2*l),p=2*c,d=Math.cos(c),f=Math.sin(c),y=l-1,m=y%1/y,g=0;g<=y;++g){var v=c+o+p*(g+m*g),_=Math.cos(v),b=-Math.sin(v);h.push((d*_+f*b)*n+r,(d*-b+f*_)*n+i)}},t}(),kn=function(){function t(){}return t.curveLength=function(t,e,r,i,n,o,s,a){for(var h=0,u=0,l=0,c=0,p=0,d=0,f=0,y=0,m=0,g=0,v=0,_=t,b=e,x=1;x<=10;++x)g=_-(y=(f=(d=(p=1-(u=x/10))*p)*p)*t+3*d*u*r+3*p*(l=u*u)*n+(c=l*u)*s),v=b-(m=f*e+3*d*u*i+3*p*l*o+c*a),_=y,b=m,h+=Math.sqrt(g*g+v*v);return h},t.curveTo=function(e,r,i,n,o,s,a){var h=a[a.length-2],u=a[a.length-1];a.length-=2;var l=Tn._segmentsCount(t.curveLength(h,u,e,r,i,n,o,s)),c=0,p=0,d=0,f=0,y=0;a.push(h,u);for(var m=1,g=0;m<=l;++m)d=(p=(c=1-(g=m/l))*c)*c,y=(f=g*g)*g,a.push(d*h+3*p*g*e+3*c*f*i+y*o,d*u+3*p*g*r+3*c*f*n+y*s)},t}(),jn=function(){function t(){}return t.curveLength=function(t,e,r,i,n,o){var s=t-2*r+n,a=e-2*i+o,h=2*r-2*t,u=2*i-2*e,l=4*(s*s+a*a),c=4*(s*h+a*u),p=h*h+u*u,d=2*Math.sqrt(l+c+p),f=Math.sqrt(l),y=2*l*f,m=2*Math.sqrt(p),g=c/f;return(y*d+f*c*(d-m)+(4*p*l-c*c)*Math.log((2*f+g+d)/(g+m)))/(4*y)},t.curveTo=function(e,r,i,n,o){for(var s=o[o.length-2],a=o[o.length-1],h=Tn._segmentsCount(t.curveLength(s,a,e,r,i,n)),u=0,l=0,c=1;c<=h;++c){var p=c/h;u=s+(e-s)*p,l=a+(r-a)*p,o.push(u+(e+(i-e)*p-u)*p,l+(r+(n-r)*p-l)*p)}},t}(),Xn=function(){function t(){this.reset()}return t.prototype.begin=function(t,e,r){this.reset(),this.style=t,this.start=e,this.attribStart=r},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}(),Gn=((Nn={})[Bt.POLY]=Sn,Nn[Bt.CIRC]=In,Nn[Bt.ELIP]=In,Nn[Bt.RECT]=An,Nn[Bt.RREC]=Rn,Nn),Hn=[],zn=[],Vn={buildPoly:Sn,buildCircle:In,buildRectangle:An,buildRoundedRectangle:Rn,FILL_COMMANDS:Gn,BATCH_POOL:Hn,DRAW_CALL_POOL:zn,buildLine:Ln,Star:Un,ArcUtils:Bn,BezierUtils:kn,QuadraticUtils:jn,BatchPart:Xn},Yn=function(){function t(t,e,r,i){void 0===e&&(e=null),void 0===r&&(r=null),void 0===i&&(i=null),this.shape=t,this.lineStyle=r,this.fillStyle=e,this.matrix=i,this.type=t.type,this.points=[],this.holes=[]}return t.prototype.clone=function(){return new t(this.shape,this.fillStyle,this.lineStyle,this.matrix)},t.prototype.destroy=function(){this.shape=null,this.holes.length=0,this.holes=null,this.points.length=0,this.points=null,this.lineStyle=null,this.fillStyle=null},t}(),Wn=new Wt,qn=new oe,Zn=function(t){function e(){var e=t.call(this)||this;return e.uvsFloat32=null,e.indicesUint16=null,e.points=[],e.colors=[],e.uvs=[],e.indices=[],e.textureIds=[],e.graphicsData=[],e.dirty=0,e.batchDirty=-1,e.cacheDirty=-1,e.clearDirty=0,e.drawCalls=[],e.batches=[],e.shapeIndex=0,e._bounds=new oe,e.boundsDirty=-1,e.boundsPadding=0,e.batchable=!1,e.indicesUint16=null,e.uvsFloat32=null,e.closePointEps=1e-4,e}return Pn(e,t),Object.defineProperty(e.prototype,"bounds",{get:function(){return this.boundsDirty!==this.dirty&&(this.boundsDirty=this.dirty,this.calculateBounds()),this._bounds},enumerable:!1,configurable:!0}),e.prototype.invalidate=function(){this.boundsDirty=-1,this.dirty++,this.batchDirty++,this.shapeIndex=0,this.points.length=0,this.colors.length=0,this.uvs.length=0,this.indices.length=0,this.textureIds.length=0;for(var t=0;t0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this},e.prototype.drawShape=function(t,e,r,i){void 0===e&&(e=null),void 0===r&&(r=null),void 0===i&&(i=null);var n=new Yn(t,e,r,i);return this.graphicsData.push(n),this.dirty++,this},e.prototype.drawHole=function(t,e){if(void 0===e&&(e=null),!this.graphicsData.length)return null;var r=new Yn(t,null,null,e),i=this.graphicsData[this.graphicsData.length-1];return r.lineStyle=i.lineStyle,i.holes.push(r),this.dirty++,this},e.prototype.destroy=function(){t.prototype.destroy.call(this);for(var e=0;e0&&(n=(i=this.batches[this.batches.length-1]).style);for(var o=this.shapeIndex;o65535&&t;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,r=0;r0&&((n=zn.pop())||((n=new Oi).texArray=new Ci),this.drawCalls.push(n)),n.start=l,n.size=0,n.texArray.count=0,n.type=u),d.touched=1,d._batchEnabled=t,d._batchLocation=o,d.wrapMode=10497,n.texArray.elements[n.texArray.count++]=d,o++)),n.size+=c.size,l+=c.size,a=d._batchLocation,this.addColors(r,p.color,p.alpha,c.attribSize,c.attribStart),this.addTextureIds(i,a,c.attribSize,c.attribStart)}Ne._globalBatch=t,this.packAttributes()},e.prototype.packAttributes=function(){for(var t=this.points,e=this.uvs,r=this.colors,i=this.textureIds,n=new ArrayBuffer(3*t.length*4),o=new Float32Array(n),s=new Uint32Array(n),a=0,h=0;h>16)+(65280&e)+((255&e)<<16),r);t.length=Math.max(t.length,n+i);for(var s=0;s0&&t.alpha>0;return r?(t.matrix&&(t.matrix=t.matrix.clone(),t.matrix.invert()),Object.assign(this._lineStyle,{visible:r},t)):this._lineStyle.reset(),this},e.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 Vt,this.currentPath.closeStroke=!1,this.currentPath.points.push(t[e-2],t[e-1]))}else this.currentPath=new Vt,this.currentPath.closeStroke=!1},e.prototype.finishPoly=function(){this.currentPath&&(this.currentPath.points.length>2?(this.drawShape(this.currentPath),this.currentPath=null):this.currentPath.points.length=0)},e.prototype.moveTo=function(t,e){return this.startPoly(),this.currentPath.points[0]=t,this.currentPath.points[1]=e,this},e.prototype.lineTo=function(t,e){this.currentPath||this.moveTo(0,0);var r=this.currentPath.points,i=r[r.length-2],n=r[r.length-1];return i===t&&n===e||r.push(t,e),this},e.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)},e.prototype.quadraticCurveTo=function(t,e,r,i){this._initCurve();var n=this.currentPath.points;return 0===n.length&&this.moveTo(0,0),jn.curveTo(t,e,r,i,n),this},e.prototype.bezierCurveTo=function(t,e,r,i,n,o){return this._initCurve(),kn.curveTo(t,e,r,i,n,o,this.currentPath.points),this},e.prototype.arcTo=function(t,e,r,i,n){this._initCurve(t,e);var o=this.currentPath.points,s=Bn.curveTo(t,e,r,i,n,o);if(s){var a=s.cx,h=s.cy,u=s.radius,l=s.startAngle,c=s.endAngle,p=s.anticlockwise;this.arc(a,h,u,l,c,p)}return this},e.prototype.arc=function(t,e,r,i,n,o){if(void 0===o&&(o=!1),i===n)return this;if(!o&&n<=i?n+=kt:o&&i<=n&&(i+=kt),0==n-i)return this;var s=t+Math.cos(i)*r,a=e+Math.sin(i)*r,h=this._geometry.closePointEps,u=this.currentPath?this.currentPath.points:null;if(u){var l=Math.abs(u[u.length-2]-s),c=Math.abs(u[u.length-1]-a);l0;return r?(t.matrix&&(t.matrix=t.matrix.clone(),t.matrix.invert()),Object.assign(this._fillStyle,{visible:r},t)):this._fillStyle.reset(),this},e.prototype.endFill=function(){return this.finishPoly(),this._fillStyle.reset(),this},e.prototype.drawRect=function(t,e,r,i){return this.drawShape(new Gt(t,e,r,i))},e.prototype.drawRoundedRect=function(t,e,r,i,n){return this.drawShape(new Yt(t,e,r,i,n))},e.prototype.drawCircle=function(t,e,r){return this.drawShape(new Ht(t,e,r))},e.prototype.drawEllipse=function(t,e,r,i){return this.drawShape(new zt(t,e,r,i))},e.prototype.drawPolygon=function(){for(var t,e=arguments,r=[],i=0;i>16&255)/255*n,o.tint[1]=(i>>8&255)/255*n,o.tint[2]=(255&i)/255*n,o.tint[3]=n,t.shader.bind(e),t.geometry.bind(r,e),t.state.set(this.state);for(var a=0,h=s.length;a>16)+(65280&n)+((255&n)<<16)}}},e.prototype.calculateVertices=function(){var t=this.transform._worldID;if(this._transformID!==t){this._transformID=t;for(var e=this.transform.worldTransform,r=e.a,i=e.b,n=e.c,o=e.d,s=e.tx,a=e.ty,h=this._geometry.points,u=this.vertexData,l=0,c=0;c=i&&eo.x=n&&eo.y>16)+(65280&t)+((255&t)<<16)},enumerable:!1,configurable:!0}),Object.defineProperty(e.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||Qe.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}),e}(ce),no=function(t,e){return no=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])},no(t,e)};!function(t){t[t.LINEAR_VERTICAL=0]="LINEAR_VERTICAL",t[t.LINEAR_HORIZONTAL=1]="LINEAR_HORIZONTAL"}(Fn||(Fn={}));var oo={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fillGradientType:Fn.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},so=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],ao=function(){function t(t){this.styleID=0,this.reset(),lo(this,t,t)}return t.prototype.clone=function(){var e={};return lo(e,this,oo),new t(e)},t.prototype.reset=function(){lo(this,oo,oo)},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=uo(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=uo(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){(function(t,e){if(!Array.isArray(t)||!Array.isArray(e))return!1;if(t.length!==e.length)return!1;for(var r=0;r=0;r--){var i=e[r].trim();!/([\"\'])[^\'\"]+\1/.test(i)&&so.indexOf(i)<0&&(i='"'+i+'"'),e[r]=i}return this.fontStyle+" "+this.fontVariant+" "+this.fontWeight+" "+t+" "+e.join(",")},t}();function ho(t){return"number"==typeof t?ot(t):("string"==typeof t&&0===t.indexOf("0x")&&(t=t.replace("0x","#")),t)}function uo(t){if(Array.isArray(t)){for(var e=0;ef)if(""!==s&&(a+=t.addLine(s),s="",o=0),t.canBreakWords(g,r.breakWords))for(var x=t.wordWrapSplit(g),T=0;Tf&&(a+=t.addLine(s),d=!1,s="",o=0),s+=E,o+=I}else{s.length>0&&(a+=t.addLine(s),s="",o=0);var A=m===y.length-1;a+=t.addLine(g,!A),d=!1,s="",o=0}else b+o>f&&(d=!1,a+=t.addLine(s),s="",o=0),(s.length>0||!t.isBreakingSpace(g)||d)&&(s+=g,o+=b)}return a+t.addLine(s,!1)},t.addLine=function(e,r){return void 0===r&&(r=!0),e=t.trimRight(e),r?e+"\n":e},t.getFromCache=function(t,e,r,i){var n=r[t];if("number"!=typeof n){var o=t.length*e;n=i.measureText(t).width+o,r[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 r=e.length-1;r>=0;r--){var i=e[r];if(!t.isBreakingSpace(i))break;e=e.slice(0,-1)}return e},t.isNewline=function(e){return"string"==typeof e&&t._newlines.indexOf(e.charCodeAt(0))>=0},t.isBreakingSpace=function(e){return"string"==typeof e&&t._breakingSpaces.indexOf(e.charCodeAt(0))>=0},t.tokenize=function(e){var r=[],i="";if("string"!=typeof e)return r;for(var n=0;na;--p){for(y=0;y0},t}();function vo(t,e){var r=!1;if(t&&t._textures&&t._textures.length)for(var i=0;i=0;e--)this.add(t.children[e]);return this},t.prototype.destroy=function(){this.ticking&&ge.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 So(t,e){return e instanceof Ne&&(e._glTextures[t.CONTEXT_UID]||t.texture.bind(e),!0)}function Io(t,e){if(!(e instanceof $n))return!1;var r=e.geometry;e.finishPoly(),r.updateBatches();for(var i=r.batches,n=0;n=i&&No.x=n&&No.y>16)+(65280&t)+((255&t)<<16),this._colorDirty=!0)},enumerable:!1,configurable:!0}),e.prototype.update=function(){if(this._colorDirty){this._colorDirty=!1;var t=this.texture.baseTexture;pt(this._tint,this._alpha,this.uniforms.uColor,t.alphaMode)}this.uvMatrix.update()&&(this.uniforms.uTextureMatrix=this.uvMatrix.mapCoord)},e}(Qr),Wo=function(t){function e(e,r,i){var n=t.call(this)||this,o=new nr(e),s=new nr(r,!0),a=new nr(i,!0,!0);return n.addAttribute("aVertexPosition",o,2,!1,_.FLOAT).addAttribute("aTextureCoord",s,2,!1,_.FLOAT).addIndex(a),n._updateId=-1,n}return Xo(e,t),Object.defineProperty(e.prototype,"vertexDirtyId",{get:function(){return this.buffers[0]._updateID},enumerable:!1,configurable:!0}),e}(lr),qo=function(t,e){return qo=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])},qo(t,e)},Zo=function(){this.info=[],this.common=[],this.page=[],this.char=[],this.kerning=[]},Ko=function(){function t(){}return t.test=function(t){return"string"==typeof t&&0===t.indexOf("info face=")},t.parse=function(t){var e=t.match(/^[a-z]+\s+.+$/gm),r={info:[],common:[],page:[],char:[],chars:[],kerning:[],kernings:[]};for(var i in e){var n=e[i].match(/^[a-z]+/gm)[0],o=e[i].match(/[a-zA-Z]+=([^\s"']+|"([^"]*)")/gm),s={};for(var a in o){var h=o[a].split("="),u=h[0],l=h[1].replace(/"/gm,""),c=parseFloat(l),p=isNaN(c)?l:c;s[u]=p}r[n].push(s)}var d=new Zo;return r.info.forEach((function(t){return d.info.push({face:t.face,size:parseInt(t.size,10)})})),r.common.forEach((function(t){return d.common.push({lineHeight:parseInt(t.lineHeight,10)})})),r.page.forEach((function(t){return d.page.push({id:parseInt(t.id,10),file:t.file})})),r.char.forEach((function(t){return d.char.push({id:parseInt(t.id,10),page:parseInt(t.page,10),x:parseInt(t.x,10),y:parseInt(t.y,10),width:parseInt(t.width,10),height:parseInt(t.height,10),xoffset:parseInt(t.xoffset,10),yoffset:parseInt(t.yoffset,10),xadvance:parseInt(t.xadvance,10)})})),r.kerning.forEach((function(t){return d.kerning.push({first:parseInt(t.first,10),second:parseInt(t.second,10),amount:parseInt(t.amount,10)})})),d},t}(),Jo=function(){function t(){}return t.test=function(t){return t instanceof XMLDocument&&t.getElementsByTagName("page").length&&null!==t.getElementsByTagName("info")[0].getAttribute("face")},t.parse=function(t){for(var e=new Zo,r=t.getElementsByTagName("info"),i=t.getElementsByTagName("common"),n=t.getElementsByTagName("page"),o=t.getElementsByTagName("char"),s=t.getElementsByTagName("kerning"),a=0;a")>-1){var e=(new self.DOMParser).parseFromString(t,"text/xml");return Jo.test(e)}return!1},t.parse=function(t){var e=(new window.DOMParser).parseFromString(t,"text/xml");return Jo.parse(e)},t}(),$o=[Ko,Jo,Qo];function ts(t){for(var e=0;e<$o.length;e++)if($o[e].test(t))return $o[e];return null}function es(t,e,r,i,n,o,s){var a=r.text,h=r.fontProperties;e.translate(i,n),e.scale(o,o);var u=s.strokeThickness/2,l=-s.strokeThickness/2;if(e.font=s.toFontString(),e.lineWidth=s.strokeThickness,e.textBaseline=s.textBaseline,e.lineJoin=s.lineJoin,e.miterLimit=s.miterLimit,e.fillStyle=function(t,e,r,i,n,o){var s,a=r.fill;if(!Array.isArray(a))return a;if(1===a.length)return a[0];var h=r.dropShadow?r.dropShadowDistance:0,u=r.padding||0,l=Math.ceil(t.width/i)-h-2*u,c=Math.ceil(t.height/i)-h-2*u,p=a.slice(),d=r.fillGradientStops.slice();if(!d.length)for(var f=p.length+1,y=1;y=u-w*a){if(0===v)throw new Error("[BitmapFont] textureHeight "+u+"px is too small for "+c.fontSize+"px fonts");--x,f=null,y=null,m=null,v=0,g=0,_=0}else if(_=Math.max(w+T.fontProperties.descent,_),P*a+g>=p)--x,v+=_*a,v=Math.ceil(v),g=0,_=0;else{es(f,y,T,g,v,a,c);var S=T.text.charCodeAt(0);d.char.push({id:S,page:b.length-1,x:g/a,y:v/a,width:P,height:w,xoffset:0,yoffset:0,xadvance:Math.ceil(E-(c.dropShadow?c.dropShadowDistance:0)-(c.stroke?c.strokeThickness:0))}),g+=(P+2*s)*a,g=Math.ceil(g)}}var I=new t(d,b,!0);return void 0!==t.available[e]&&t.uninstall(e),t.available[e]=I,I},t.ALPHA=[["a","z"],["A","Z"]," "],t.NUMERIC=[["0","9"]],t.ALPHANUMERIC=[["a","z"],["A","Z"],["0","9"]," "],t.ASCII=[[" ","~"]],t.defaultOptions={resolution:1,textureWidth:512,textureHeight:512,padding:4,chars:t.ALPHANUMERIC},t.available={},t}(),is=[],ns=[],os=function(t){function e(r,i){void 0===i&&(i={});var n=t.call(this)||this;n._tint=16777215,i.font&&(Pt("5.3.0","PIXI.BitmapText constructor style.font property is deprecated."),n._upgradeStyle(i));var o=Object.assign({},e.styleDefaults,i),s=o.align,a=o.tint,h=o.maxWidth,u=o.letterSpacing,l=o.fontName,c=o.fontSize;if(!rs.available[l])throw new Error('Missing BitmapFont "'+l+'"');return n._activePagesMeshData=[],n._textWidth=0,n._textHeight=0,n._align=s,n._tint=a,n._fontName=l,n._fontSize=c||rs.available[l].size,n._text=r,n._maxWidth=h,n._maxLineHeight=0,n._letterSpacing=u,n._anchor=new qt((function(){n.dirty=!0}),n,0,0),n._roundPixels=Y.ROUND_PIXELS,n.dirty=!0,n._textureCache={},n}return function(t,e){function r(){this.constructor=t}qo(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}(e,t),e.prototype.updateText=function(){for(var t,e=rs.available[this._fontName],r=this._fontSize/e.size,i=new Wt,n=[],o=[],s=this._text.replace(/(?:\r\n|\r)/g,"\n")||" ",a=s.length,h=this._maxWidth*e.size/this._fontSize,u=null,l=0,c=0,p=0,d=-1,f=0,y=0,m=0,g=0;g0&&i.x>h&&(bt(n,1+d-++y,1+g-d),g=d,d=-1,o.push(f),c=Math.max(c,f),p++,i.x=0,i.y+=e.lineHeight,u=null)}}else o.push(l),c=Math.max(c,l),++p,++y,i.x=0,i.y+=e.lineHeight,u=null}var T=s.charAt(s.length-1);"\r"!==T&&"\n"!==T&&(/(?:\s)/.test(T)&&(l=f),o.push(l),c=Math.max(c,l));var E=[];for(g=0;g<=p;g++){var w=0;"right"===this._align?w=c-o[g]:"center"===this._align&&(w=(c-o[g])/2),E.push(w)}var P=n.length,S={},I=[],A=this._activePagesMeshData;for(g=0;g6*D)||V.vertices.length<2*Vo.BATCHABLE_SIZE)V.vertices=new Float32Array(8*D),V.uvs=new Float32Array(8*D),V.indices=new Uint16Array(6*D);else for(var L=V.total,N=V.vertices,F=4*L*2;F=2&&(t.fontSize=parseInt(e[0],10))}else t.fontName=t.font.name,t.fontSize="number"==typeof t.font.size?t.font.size:parseInt(t.font.size,10)},e.prototype.destroy=function(e){var r=this._textureCache;for(var i in r)r[i].destroy(),delete r[i];this._textureCache=null,t.prototype.destroy.call(this,e)},e.registerFont=function(t,e){return Pt("5.3.0","PIXI.BitmapText.registerFont is deprecated, use PIXI.BitmapFont.install"),rs.install(t,e)},Object.defineProperty(e,"fonts",{get:function(){return Pt("5.3.0","PIXI.BitmapText.fonts is deprecated, use PIXI.BitmapFont.available"),rs.available},enumerable:!1,configurable:!0}),e.styleDefaults={align:"left",tint:16777215,maxWidth:0,letterSpacing:0},e}(ce),ss=function(){function t(){}return t.add=function(){ln.setExtensionXhrType("fnt",ln.XHR_RESPONSE_TYPE.TEXT)},t.use=function(e,r){var i=ts(e.data);if(i)for(var n=t.getBaseUrl(this,e),o=i.parse(e.data),s={},a=function(t){s[t.metadata.pageFile]=t.texture,Object.keys(s).length===o.page.length&&(e.bitmapFont=rs.install(o,s,!0),r())},h=0;h=i&&(e=t-s-1),o+=a=a.replace("%value%",r[e].toString()),o+="\n"}return(n=n.replace("%blur%",o)).replace("%size%",t.toString())}(o);return(s=t.call(this,a,h)||this).horizontal=e,s.resolution=n,s._quality=0,s.quality=i,s.blur=r,s}return ls(e,t),e.prototype.apply=function(t,e,r,i){if(r?this.horizontal?this.uniforms.strength=1/r.width*(r.width/e.width):this.uniforms.strength=1/r.height*(r.height/e.height):this.horizontal?this.uniforms.strength=1/t.renderer.width*(t.renderer.width/e.width):this.uniforms.strength=1/t.renderer.height*(t.renderer.height/e.height),this.uniforms.strength*=this.strength,this.uniforms.strength/=this.passes,1===this.passes)t.applyFilter(this,e,r,i);else{var n=t.getFilterTexture(),o=t.renderer,s=e,a=n;this.state.blend=!1,t.applyFilter(this,s,a,Es.CLEAR);for(var h=1;h 0.0) {\n c.rgb /= c.a;\n }\n\n vec4 result;\n\n result.r = (m[0] * c.r);\n result.r += (m[1] * c.g);\n result.r += (m[2] * c.b);\n result.r += (m[3] * c.a);\n result.r += m[4];\n\n result.g = (m[5] * c.r);\n result.g += (m[6] * c.g);\n result.g += (m[7] * c.b);\n result.g += (m[8] * c.a);\n result.g += m[9];\n\n result.b = (m[10] * c.r);\n result.b += (m[11] * c.g);\n result.b += (m[12] * c.b);\n result.b += (m[13] * c.a);\n result.b += m[14];\n\n result.a = (m[15] * c.r);\n result.a += (m[16] * c.g);\n result.a += (m[17] * c.b);\n result.a += (m[18] * c.a);\n result.a += m[19];\n\n vec3 rgb = mix(c.rgb, result.rgb, uAlpha);\n\n // Premultiply alpha again.\n rgb *= result.a;\n\n gl_FragColor = vec4(rgb, result.a);\n}\n",r)||this).alpha=1,e}return function(t,e){function r(){this.constructor=t}Ms(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}(e,t),e.prototype._loadMatrix=function(t,e){void 0===e&&(e=!1);var r=t;e&&(this._multiply(r,this.uniforms.m,t),r=this._colorMatrix(r)),this.uniforms.m=r},e.prototype._multiply=function(t,e,r){return t[0]=e[0]*r[0]+e[1]*r[5]+e[2]*r[10]+e[3]*r[15],t[1]=e[0]*r[1]+e[1]*r[6]+e[2]*r[11]+e[3]*r[16],t[2]=e[0]*r[2]+e[1]*r[7]+e[2]*r[12]+e[3]*r[17],t[3]=e[0]*r[3]+e[1]*r[8]+e[2]*r[13]+e[3]*r[18],t[4]=e[0]*r[4]+e[1]*r[9]+e[2]*r[14]+e[3]*r[19]+e[4],t[5]=e[5]*r[0]+e[6]*r[5]+e[7]*r[10]+e[8]*r[15],t[6]=e[5]*r[1]+e[6]*r[6]+e[7]*r[11]+e[8]*r[16],t[7]=e[5]*r[2]+e[6]*r[7]+e[7]*r[12]+e[8]*r[17],t[8]=e[5]*r[3]+e[6]*r[8]+e[7]*r[13]+e[8]*r[18],t[9]=e[5]*r[4]+e[6]*r[9]+e[7]*r[14]+e[8]*r[19]+e[9],t[10]=e[10]*r[0]+e[11]*r[5]+e[12]*r[10]+e[13]*r[15],t[11]=e[10]*r[1]+e[11]*r[6]+e[12]*r[11]+e[13]*r[16],t[12]=e[10]*r[2]+e[11]*r[7]+e[12]*r[12]+e[13]*r[17],t[13]=e[10]*r[3]+e[11]*r[8]+e[12]*r[13]+e[13]*r[18],t[14]=e[10]*r[4]+e[11]*r[9]+e[12]*r[14]+e[13]*r[19]+e[14],t[15]=e[15]*r[0]+e[16]*r[5]+e[17]*r[10]+e[18]*r[15],t[16]=e[15]*r[1]+e[16]*r[6]+e[17]*r[11]+e[18]*r[16],t[17]=e[15]*r[2]+e[16]*r[7]+e[17]*r[12]+e[18]*r[17],t[18]=e[15]*r[3]+e[16]*r[8]+e[17]*r[13]+e[18]*r[18],t[19]=e[15]*r[4]+e[16]*r[9]+e[17]*r[14]+e[18]*r[19]+e[19],t},e.prototype._colorMatrix=function(t){var e=new Float32Array(t);return e[4]/=255,e[9]/=255,e[14]/=255,e[19]/=255,e},e.prototype.brightness=function(t,e){var r=[t,0,0,0,0,0,t,0,0,0,0,0,t,0,0,0,0,0,1,0];this._loadMatrix(r,e)},e.prototype.greyscale=function(t,e){var r=[t,t,t,0,0,t,t,t,0,0,t,t,t,0,0,0,0,0,1,0];this._loadMatrix(r,e)},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,e){t=(t||0)/180*Math.PI;var r=Math.cos(t),i=Math.sin(t),n=1/3,o=(0,Math.sqrt)(n),s=[r+(1-r)*n,n*(1-r)-o*i,n*(1-r)+o*i,0,0,n*(1-r)+o*i,r+n*(1-r),n*(1-r)-o*i,0,0,n*(1-r)-o*i,n*(1-r)+o*i,r+n*(1-r),0,0,0,0,0,1,0];this._loadMatrix(s,e)},e.prototype.contrast=function(t,e){var r=(t||0)+1,i=-.5*(r-1),n=[r,0,0,0,i,0,r,0,0,i,0,0,r,0,i,0,0,0,1,0];this._loadMatrix(n,e)},e.prototype.saturate=function(t,e){void 0===t&&(t=0);var r=2*t/3+1,i=-.5*(r-1),n=[r,i,i,0,0,i,r,i,0,0,i,i,r,0,0,0,0,0,1,0];this._loadMatrix(n,e)},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,e,r,i,n){var o=((r=r||16770432)>>16&255)/255,s=(r>>8&255)/255,a=(255&r)/255,h=((i=i||3375104)>>16&255)/255,u=(i>>8&255)/255,l=(255&i)/255,c=[.3,.59,.11,0,0,o,s,a,t=t||.2,0,h,u,l,e=e||.15,0,o-h,s-u,a-l,0,0];this._loadMatrix(c,n)},e.prototype.night=function(t,e){var r=[-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(r,e)},e.prototype.predator=function(t,e){var r=[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(r,e)},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}(ti);Ds.prototype.grayscale=Ds.prototype.greyscale;var Ls=function(t,e){return Ls=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])},Ls(t,e)},Ns=function(t){function e(e,r){var i=this,n=new Zt;return e.renderable=!1,(i=t.call(this,"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","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",{mapSampler:e._texture,filterMatrix:n,scale:{x:1,y:1},rotation:new Float32Array([1,0,0,1])})||this).maskSprite=e,i.maskMatrix=n,null==r&&(r=20),i.scale=new Wt(r,r),i}return function(t,e){function r(){this.constructor=t}Ls(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}(e,t),e.prototype.apply=function(t,e,r,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),s=Math.sqrt(n.c*n.c+n.d*n.d);0!==o&&0!==s&&(this.uniforms.rotation[0]=n.a/o,this.uniforms.rotation[1]=n.b/o,this.uniforms.rotation[2]=n.c/s,this.uniforms.rotation[3]=n.d/s),t.applyFilter(this,e,r,i)},Object.defineProperty(e.prototype,"map",{get:function(){return this.uniforms.mapSampler},set:function(t){this.uniforms.mapSampler=t},enumerable:!1,configurable:!0}),e}(ti),Fs=function(t,e){return Fs=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])},Fs(t,e)},Us=function(t){function e(){return t.call(this,"\nattribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 v_rgbNW;\nvarying vec2 v_rgbNE;\nvarying vec2 v_rgbSW;\nvarying vec2 v_rgbSE;\nvarying vec2 v_rgbM;\n\nvarying vec2 vFragCoord;\n\nuniform vec4 inputPixel;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvoid texcoords(vec2 fragCoord, vec2 inverseVP,\n out vec2 v_rgbNW, out vec2 v_rgbNE,\n out vec2 v_rgbSW, out vec2 v_rgbSE,\n out vec2 v_rgbM) {\n v_rgbNW = (fragCoord + vec2(-1.0, -1.0)) * inverseVP;\n v_rgbNE = (fragCoord + vec2(1.0, -1.0)) * inverseVP;\n v_rgbSW = (fragCoord + vec2(-1.0, 1.0)) * inverseVP;\n v_rgbSE = (fragCoord + vec2(1.0, 1.0)) * inverseVP;\n v_rgbM = vec2(fragCoord * inverseVP);\n}\n\nvoid main(void) {\n\n gl_Position = filterVertexPosition();\n\n vFragCoord = aVertexPosition * outputFrame.zw;\n\n texcoords(vFragCoord, inputPixel.zw, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);\n}\n",'varying vec2 v_rgbNW;\nvarying vec2 v_rgbNE;\nvarying vec2 v_rgbSW;\nvarying vec2 v_rgbSE;\nvarying vec2 v_rgbM;\n\nvarying vec2 vFragCoord;\nuniform sampler2D uSampler;\nuniform highp vec4 inputPixel;\n\n\n/**\n Basic FXAA implementation based on the code on geeks3d.com with the\n modification that the texture2DLod stuff was removed since it\'s\n unsupported by WebGL.\n\n --\n\n From:\n https://github.com/mitsuhiko/webgl-meincraft\n\n Copyright (c) 2011 by Armin Ronacher.\n\n Some rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are\n met:\n\n * Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n\n * Redistributions in binary form must reproduce the above\n copyright notice, this list of conditions and the following\n disclaimer in the documentation and/or other materials provided\n with the distribution.\n\n * The names of the contributors may not be used to endorse or\n promote products derived from this software without specific\n prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n#ifndef FXAA_REDUCE_MIN\n#define FXAA_REDUCE_MIN (1.0/ 128.0)\n#endif\n#ifndef FXAA_REDUCE_MUL\n#define FXAA_REDUCE_MUL (1.0 / 8.0)\n#endif\n#ifndef FXAA_SPAN_MAX\n#define FXAA_SPAN_MAX 8.0\n#endif\n\n//optimized version for mobile, where dependent\n//texture reads can be a bottleneck\nvec4 fxaa(sampler2D tex, vec2 fragCoord, vec2 inverseVP,\n vec2 v_rgbNW, vec2 v_rgbNE,\n vec2 v_rgbSW, vec2 v_rgbSE,\n vec2 v_rgbM) {\n vec4 color;\n vec3 rgbNW = texture2D(tex, v_rgbNW).xyz;\n vec3 rgbNE = texture2D(tex, v_rgbNE).xyz;\n vec3 rgbSW = texture2D(tex, v_rgbSW).xyz;\n vec3 rgbSE = texture2D(tex, v_rgbSE).xyz;\n vec4 texColor = texture2D(tex, v_rgbM);\n vec3 rgbM = texColor.xyz;\n vec3 luma = vec3(0.299, 0.587, 0.114);\n float lumaNW = dot(rgbNW, luma);\n float lumaNE = dot(rgbNE, luma);\n float lumaSW = dot(rgbSW, luma);\n float lumaSE = dot(rgbSE, luma);\n float lumaM = dot(rgbM, luma);\n float lumaMin = min(lumaM, min(min(lumaNW, lumaNE), min(lumaSW, lumaSE)));\n float lumaMax = max(lumaM, max(max(lumaNW, lumaNE), max(lumaSW, lumaSE)));\n\n mediump vec2 dir;\n dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE));\n dir.y = ((lumaNW + lumaSW) - (lumaNE + lumaSE));\n\n float dirReduce = max((lumaNW + lumaNE + lumaSW + lumaSE) *\n (0.25 * FXAA_REDUCE_MUL), FXAA_REDUCE_MIN);\n\n float rcpDirMin = 1.0 / (min(abs(dir.x), abs(dir.y)) + dirReduce);\n dir = min(vec2(FXAA_SPAN_MAX, FXAA_SPAN_MAX),\n max(vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX),\n dir * rcpDirMin)) * inverseVP;\n\n vec3 rgbA = 0.5 * (\n texture2D(tex, fragCoord * inverseVP + dir * (1.0 / 3.0 - 0.5)).xyz +\n texture2D(tex, fragCoord * inverseVP + dir * (2.0 / 3.0 - 0.5)).xyz);\n vec3 rgbB = rgbA * 0.5 + 0.25 * (\n texture2D(tex, fragCoord * inverseVP + dir * -0.5).xyz +\n texture2D(tex, fragCoord * inverseVP + dir * 0.5).xyz);\n\n float lumaB = dot(rgbB, luma);\n if ((lumaB < lumaMin) || (lumaB > lumaMax))\n color = vec4(rgbA, texColor.a);\n else\n color = vec4(rgbB, texColor.a);\n return color;\n}\n\nvoid main() {\n\n vec4 color;\n\n color = fxaa(uSampler, vFragCoord, inputPixel.zw, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);\n\n gl_FragColor = color;\n}\n')||this}return function(t,e){function r(){this.constructor=t}Fs(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}(e,t),e}(ti),Bs=function(t,e){return Bs=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])},Bs(t,e)},ks=function(t){function e(e,r){void 0===e&&(e=.5),void 0===r&&(r=Math.random());var i=t.call(this,Ai,"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",{uNoise:0,uSeed:0})||this;return i.noise=e,i.seed=r,i}return function(t,e){function r(){this.constructor=t}Bs(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}(e,t),Object.defineProperty(e.prototype,"noise",{get:function(){return this.uniforms.uNoise},set:function(t){this.uniforms.uNoise=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"seed",{get:function(){return this.uniforms.uSeed},set:function(t){this.uniforms.uSeed=t},enumerable:!1,configurable:!0}),e}(ti),js=new Zt;he.prototype._cacheAsBitmap=!1,he.prototype._cacheData=null;var Xs=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(he.prototype,{cacheAsBitmap:{get:function(){return this._cacheAsBitmap},set:function(t){var e;this._cacheAsBitmap!==t&&(this._cacheAsBitmap=t,t?(this._cacheData||(this._cacheData=new Xs),(e=this._cacheData).originalRender=this.render,e.originalRenderCanvas=this.renderCanvas,e.originalUpdateTransform=this.updateTransform,e.originalCalculateBounds=this.calculateBounds,e.originalGetLocalBounds=this.getLocalBounds,e.originalDestroy=this.destroy,e.originalContainsPoint=this.containsPoint,e.originalMask=this._mask,e.originalFilterArea=this.filterArea,this.render=this._renderCached,this.renderCanvas=this._renderCachedCanvas,this.destroy=this._cacheAsBitmapDestroy):((e=this._cacheData).sprite&&this._destroyCachedDisplayObject(),this.render=e.originalRender,this.renderCanvas=e.originalRenderCanvas,this.calculateBounds=e.originalCalculateBounds,this.getLocalBounds=e.originalGetLocalBounds,this.destroy=e.originalDestroy,this.updateTransform=e.originalUpdateTransform,this.containsPoint=e.originalContainsPoint,this._mask=e.originalMask,this.filterArea=e.originalFilterArea))}}}),he.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))},he.prototype._initCachedDisplayObject=function(t){if(!this._cacheData||!this._cacheData.sprite){var e=this.alpha;this.alpha=1,t.batch.flush();var r=this.getLocalBounds(null,!0).clone();if(this.filters){var i=this.filters[0].padding;r.pad(i)}r.ceil(Y.RESOLUTION);var n=t.renderTexture.current,o=t.renderTexture.sourceFrame.clone(),s=t.renderTexture.destinationFrame.clone(),a=t.projection.transform,h=tr.create({width:r.width,height:r.height}),u="cacheAsBitmap_"+Et();this._cacheData.textureCacheId=u,Ne.addToCache(h.baseTexture,u),Qe.addToCache(h,u);var l=this.transform.localTransform.copyTo(js).invert().translate(-r.x,-r.y);this.render=this._cacheData.originalRender,t.render(this,h,!0,l,!1),t.projection.transform=a,t.renderTexture.bind(n,o,s),this.render=this._renderCached,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null;var c=new io(h);c.transform.worldTransform=this.transform.worldTransform,c.anchor.x=-r.x/r.width,c.anchor.y=-r.y/r.height,c.alpha=e,c._bounds=this._bounds,this._cacheData.sprite=c,this.transform._parentID=-1,this.parent?this.updateTransform():(this.enableTempParent(),this.updateTransform(),this.disableTempParent(null)),this.containsPoint=c.containsPoint.bind(c)}},he.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))},he.prototype._initCachedDisplayObjectCanvas=function(t){if(!this._cacheData||!this._cacheData.sprite){var e=this.getLocalBounds(null,!0),r=this.alpha;this.alpha=1;var i=t.context,n=t._projTransform;e.ceil(Y.RESOLUTION);var o=tr.create({width:e.width,height:e.height}),s="cacheAsBitmap_"+Et();this._cacheData.textureCacheId=s,Ne.addToCache(o.baseTexture,s),Qe.addToCache(o,s);var a=js;this.transform.localTransform.copyTo(a),a.invert(),a.tx-=e.x,a.ty-=e.y,this.renderCanvas=this._cacheData.originalRenderCanvas,t.render(this,o,!0,a,!1),t.context=i,t._projTransform=n,this.renderCanvas=this._renderCachedCanvas,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null;var h=new io(o);h.transform.worldTransform=this.transform.worldTransform,h.anchor.x=-e.x/e.width,h.anchor.y=-e.y/e.height,h.alpha=r,h._bounds=this._bounds,this._cacheData.sprite=h,this.transform._parentID=-1,this.parent?this.updateTransform():(this.parent=t._tempDisplayObjectParent,this.updateTransform(),this.parent=null),this.containsPoint=h.containsPoint.bind(h)}},he.prototype._calculateCachedBounds=function(){this._bounds.clear(),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite._calculateBounds(),this._bounds.updateID=this._boundsID},he.prototype._getCachedLocalBounds=function(){return this._cacheData.sprite.getLocalBounds(null)},he.prototype._destroyCachedDisplayObject=function(){this._cacheData.sprite._texture.destroy(!0),this._cacheData.sprite=null,Ne.removeFromCache(this._cacheData.textureCacheId),Qe.removeFromCache(this._cacheData.textureCacheId),this._cacheData.textureCacheId=null},he.prototype._cacheAsBitmapDestroy=function(t){this.cacheAsBitmap=!1,this.destroy(t)},he.prototype.name=null,ce.prototype.getChildByName=function(t,e){for(var r=0,i=this.children.length;r0){var p=a.x-t[l].x,d=a.y-t[l].y,f=Math.sqrt(p*p+d*d);a=t[l],s+=f/h}else s=l/(u-1);n[c]=s,n[c+1]=0,n[c+2]=s,n[c+3]=1}var y=0;for(l=0;l0?this.textureScale*this._width/2:this._width/2;i/=l,n/=l,i*=c,n*=c,o[u]=h.x+i,o[u+1]=h.y+n,o[u+2]=h.x-i,o[u+3]=h.y-n,r=h}this.buffers[0].update()}},e.prototype.update=function(){this.textureScale>0?this.build():this.updateVertices()},e}(Wo),Ys=function(t){function e(e,r,i){void 0===i&&(i=0);var n=this,o=new Vs(e.height,r,i),s=new Yo(e);return i>0&&(e.baseTexture.wrapMode=x.REPEAT),(n=t.call(this,o,s)||this).autoUpdate=!0,n}return Hs(e,t),e.prototype._render=function(e){var r=this.geometry;(this.autoUpdate||r._width!==this.shader.texture.height)&&(r._width=this.shader.texture.height,r.update()),t.prototype._render.call(this,e)},e}(Vo),Ws=function(t){function e(e,r,i){var n=this,o=new zs(e.width,e.height,r,i),s=new Yo(Qe.WHITE);return(n=t.call(this,o,s)||this).texture=e,n}return Hs(e,t),e.prototype.textureUpdated=function(){this._textureID=this.shader.texture._updateID;var t=this.geometry;t.width=this.shader.texture.width,t.height=this.shader.texture.height,t.build()},Object.defineProperty(e.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}),e.prototype._render=function(e){this._textureID!==this.shader.texture._updateID&&this.textureUpdated(),t.prototype._render.call(this,e)},e.prototype.destroy=function(e){this.shader.texture.off("update",this.textureUpdated,this),t.prototype.destroy.call(this,e)},e}(Vo),qs=function(t){function e(e,r,i,n,o){void 0===e&&(e=Qe.EMPTY);var s=this,a=new Wo(r,i,n);a.getBuffer("aVertexPosition").static=!1;var h=new Yo(e);return(s=t.call(this,a,h,null,o)||this).autoUpdate=!0,s}return Hs(e,t),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._render=function(e){this.autoUpdate&&this.geometry.getBuffer("aVertexPosition").update(),t.prototype._render.call(this,e)},e}(Vo),Zs=function(t){function e(e,r,i,n,o){void 0===r&&(r=10),void 0===i&&(i=10),void 0===n&&(n=10),void 0===o&&(o=10);var s=t.call(this,Qe.WHITE,4,4)||this;return s._origWidth=e.orig.width,s._origHeight=e.orig.height,s._width=s._origWidth,s._height=s._origHeight,s._leftWidth=r,s._rightWidth=n,s._topHeight=i,s._bottomHeight=o,s.texture=e,s}return Hs(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,r=this._topHeight+this._bottomHeight,i=this._height>r?1:this._height/r;return Math.min(e,i)},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 r=1/this._origWidth,i=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]=r*this._leftWidth,e[4]=e[12]=e[20]=e[28]=1-r*this._rightWidth,e[9]=e[11]=e[13]=e[15]=i*this._topHeight,e[17]=e[19]=e[21]=e[23]=1-i*this._bottomHeight,this.updateHorizontalVertices(),this.updateVerticalVertices(),this.geometry.buffers[0].update(),this.geometry.buffers[1].update()},e}(Ws),Ks=function(t,e){return Ks=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])},Ks(t,e)},Js=function(t){function e(e,r){void 0===r&&(r=!0);var i=t.call(this,e[0]instanceof Qe?e[0]:e[0].texture)||this;return i._textures=null,i._durations=null,i._autoUpdate=r,i._isConnectedToTicker=!1,i.animationSpeed=1,i.loop=!0,i.updateAnchor=!1,i.onComplete=null,i.onFrameChange=null,i.onLoop=null,i._currentTime=0,i._playing=!1,i._previousFrame=null,i.textures=e,i}return function(t,e){function r(){this.constructor=t}Ks(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}(e,t),e.prototype.stop=function(){this._playing&&(this._playing=!1,this._autoUpdate&&this._isConnectedToTicker&&(ge.shared.remove(this.update,this),this._isConnectedToTicker=!1))},e.prototype.play=function(){this._playing||(this._playing=!0,this._autoUpdate&&!this._isConnectedToTicker&&(ge.shared.add(this.update,this,de.HIGH),this._isConnectedToTicker=!0))},e.prototype.gotoAndStop=function(t){this.stop();var e=this.currentFrame;this._currentTime=t,e!==this.currentFrame&&this.updateTexture()},e.prototype.gotoAndPlay=function(t){var e=this.currentFrame;this._currentTime=t,e!==this.currentFrame&&this.updateTexture(),this.play()},e.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())}},e.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))},e.prototype.destroy=function(e){this.stop(),t.prototype.destroy.call(this,e),this.onComplete=null,this.onFrameChange=null,this.onLoop=null},e.fromFrames=function(t){for(var r=[],i=0;i{"use strict";var i=r(210),n=r(1924),o=r(631),s=i("%TypeError%"),a=i("%WeakMap%",!0),h=i("%Map%",!0),u=n("WeakMap.prototype.get",!0),l=n("WeakMap.prototype.set",!0),c=n("WeakMap.prototype.has",!0),p=n("Map.prototype.get",!0),d=n("Map.prototype.set",!0),f=n("Map.prototype.has",!0),y=function(t,e){for(var r,i=t;null!==(r=i.next);i=r)if(r.key===e)return i.next=r.next,r.next=t.next,t.next=r,r};t.exports=function(){var t,e,r,i={assert:function(t){if(!i.has(t))throw new s("Side channel does not contain "+o(t))},get:function(i){if(a&&i&&("object"==typeof i||"function"==typeof i)){if(t)return u(t,i)}else if(h){if(e)return p(e,i)}else if(r)return function(t,e){var r=y(t,e);return r&&r.value}(r,i)},has:function(i){if(a&&i&&("object"==typeof i||"function"==typeof i)){if(t)return c(t,i)}else if(h){if(e)return f(e,i)}else if(r)return function(t,e){return!!y(t,e)}(r,i);return!1},set:function(i,n){a&&i&&("object"==typeof i||"function"==typeof i)?(t||(t=new a),l(t,i,n)):h?(e||(e=new h),d(e,i,n)):(r||(r={key:{},next:null}),function(t,e,r){var i=y(t,e);i?i.value=r:t.next={key:e,next:t.next,value:r}}(r,i,n))}};return i}},2511:function(t,e,r){var i;t=r.nmd(t),function(n){e&&e.nodeType,t&&t.nodeType;var o="object"==typeof r.g&&r.g;o.global!==o&&o.window!==o&&o.self;var s,a=2147483647,h=36,u=26,l=38,c=700,p=/^xn--/,d=/[^\x20-\x7E]/,f=/[\x2E\u3002\uFF0E\uFF61]/g,y={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},m=h-1,g=Math.floor,v=String.fromCharCode;function _(t){throw new RangeError(y[t])}function b(t,e){for(var r=t.length,i=[];r--;)i[r]=e(t[r]);return i}function x(t,e){var r=t.split("@"),i="";return r.length>1&&(i=r[0]+"@",t=r[1]),i+b((t=t.replace(f,".")).split("."),e).join(".")}function T(t){for(var e,r,i=[],n=0,o=t.length;n=55296&&e<=56319&&n65535&&(e+=v((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+v(t)})).join("")}function w(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function P(t,e,r){var i=0;for(t=r?g(t/c):t>>1,t+=g(t/e);t>m*u>>1;i+=h)t=g(t/m);return g(i+(m+1)*t/(t+l))}function S(t){var e,r,i,n,o,s,l,c,p,d,f,y=[],m=t.length,v=0,b=128,x=72;for((r=t.lastIndexOf("-"))<0&&(r=0),i=0;i=128&&_("not-basic"),y.push(t.charCodeAt(i));for(n=r>0?r+1:0;n=m&&_("invalid-input"),((c=(f=t.charCodeAt(n++))-48<10?f-22:f-65<26?f-65:f-97<26?f-97:h)>=h||c>g((a-v)/s))&&_("overflow"),v+=c*s,!(c<(p=l<=x?1:l>=x+u?u:l-x));l+=h)s>g(a/(d=h-p))&&_("overflow"),s*=d;x=P(v-o,e=y.length+1,0==o),g(v/e)>a-b&&_("overflow"),b+=g(v/e),v%=e,y.splice(v++,0,b)}return E(y)}function I(t){var e,r,i,n,o,s,l,c,p,d,f,y,m,b,x,E=[];for(y=(t=T(t)).length,e=128,r=0,o=72,s=0;s=e&&fg((a-r)/(m=i+1))&&_("overflow"),r+=(l-e)*m,e=l,s=0;sa&&_("overflow"),f==e){for(c=r,p=h;!(c<(d=p<=o?1:p>=o+u?u:p-o));p+=h)x=c-d,b=h-d,E.push(v(w(d+x%b,0))),c=g(x/b);E.push(v(w(c,0))),o=P(r,m,i==n),r=0,++i}++r,++e}return E.join("")}s={version:"1.4.1",ucs2:{decode:T,encode:E},decode:S,encode:I,toASCII:function(t){return x(t,(function(t){return d.test(t)?"xn--"+I(t):t}))},toUnicode:function(t){return x(t,(function(t){return p.test(t)?S(t.slice(4).toLowerCase()):t}))}},void 0===(i=function(){return s}.call(e,r,e,t))||(t.exports=i)}()},9532:t=>{"use strict";var e=String.prototype.replace,r=/%20/g,i="RFC3986";t.exports={default:i,formatters:{RFC1738:function(t){return e.call(t,r,"+")},RFC3986:function(t){return String(t)}},RFC1738:"RFC1738",RFC3986:i}},5984:(t,e,r)=>{"use strict";var i=r(4730),n=r(7325),o=r(9532);t.exports={formats:o,parse:n,stringify:i}},7325:(t,e,r)=>{"use strict";var i=r(9368),n=Object.prototype.hasOwnProperty,o=Array.isArray,s={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:i.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},a=function(t){return t.replace(/&#(\d+);/g,(function(t,e){return String.fromCharCode(parseInt(e,10))}))},h=function(t,e){return t&&"string"==typeof t&&e.comma&&t.indexOf(",")>-1?t.split(","):t},u=function(t,e,r,i){if(t){var o=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,s=/(\[[^[\]]*])/g,a=r.depth>0&&/(\[[^[\]]*])/.exec(o),u=a?o.slice(0,a.index):o,l=[];if(u){if(!r.plainObjects&&n.call(Object.prototype,u)&&!r.allowPrototypes)return;l.push(u)}for(var c=0;r.depth>0&&null!==(a=s.exec(o))&&c=0;--o){var s,a=t[o];if("[]"===a&&r.parseArrays)s=[].concat(n);else{s=r.plainObjects?Object.create(null):{};var u="["===a.charAt(0)&&"]"===a.charAt(a.length-1)?a.slice(1,-1):a,l=parseInt(u,10);r.parseArrays||""!==u?!isNaN(l)&&a!==u&&String(l)===u&&l>=0&&r.parseArrays&&l<=r.arrayLimit?(s=[])[l]=n:"__proto__"!==u&&(s[u]=n):s={0:n}}n=s}return n}(l,e,r,i)}};t.exports=function(t,e){var r=function(t){if(!t)return s;if(null!==t.decoder&&void 0!==t.decoder&&"function"!=typeof t.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var e=void 0===t.charset?s.charset:t.charset;return{allowDots:void 0===t.allowDots?s.allowDots:!!t.allowDots,allowPrototypes:"boolean"==typeof t.allowPrototypes?t.allowPrototypes:s.allowPrototypes,allowSparse:"boolean"==typeof t.allowSparse?t.allowSparse:s.allowSparse,arrayLimit:"number"==typeof t.arrayLimit?t.arrayLimit:s.arrayLimit,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:s.charsetSentinel,comma:"boolean"==typeof t.comma?t.comma:s.comma,decoder:"function"==typeof t.decoder?t.decoder:s.decoder,delimiter:"string"==typeof t.delimiter||i.isRegExp(t.delimiter)?t.delimiter:s.delimiter,depth:"number"==typeof t.depth||!1===t.depth?+t.depth:s.depth,ignoreQueryPrefix:!0===t.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof t.interpretNumericEntities?t.interpretNumericEntities:s.interpretNumericEntities,parameterLimit:"number"==typeof t.parameterLimit?t.parameterLimit:s.parameterLimit,parseArrays:!1!==t.parseArrays,plainObjects:"boolean"==typeof t.plainObjects?t.plainObjects:s.plainObjects,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:s.strictNullHandling}}(e);if(""===t||null==t)return r.plainObjects?Object.create(null):{};for(var l="string"==typeof t?function(t,e){var r,u={__proto__:null},l=e.ignoreQueryPrefix?t.replace(/^\?/,""):t,c=e.parameterLimit===1/0?void 0:e.parameterLimit,p=l.split(e.delimiter,c),d=-1,f=e.charset;if(e.charsetSentinel)for(r=0;r-1&&(m=o(m)?[m]:m),n.call(u,y)?u[y]=i.combine(u[y],m):u[y]=m}return u}(t,r):t,c=r.plainObjects?Object.create(null):{},p=Object.keys(l),d=0;d{"use strict";var i=r(7478),n=r(9368),o=r(9532),s=Object.prototype.hasOwnProperty,a={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,e){return t+"["+e+"]"},repeat:function(t){return t}},h=Array.isArray,u=Array.prototype.push,l=function(t,e){u.apply(t,h(e)?e:[e])},c=Date.prototype.toISOString,p=o.default,d={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:n.encode,encodeValuesOnly:!1,format:p,formatter:o.formatters[p],indices:!1,serializeDate:function(t){return c.call(t)},skipNulls:!1,strictNullHandling:!1},f={},y=function t(e,r,o,s,a,u,c,p,y,m,g,v,_,b,x,T){for(var E,w=e,P=T,S=0,I=!1;void 0!==(P=P.get(f))&&!I;){var A=P.get(e);if(S+=1,void 0!==A){if(A===S)throw new RangeError("Cyclic object value");I=!0}void 0===P.get(f)&&(S=0)}if("function"==typeof p?w=p(r,w):w instanceof Date?w=g(w):"comma"===o&&h(w)&&(w=n.maybeMap(w,(function(t){return t instanceof Date?g(t):t}))),null===w){if(a)return c&&!b?c(r,d.encoder,x,"key",v):r;w=""}if("string"==typeof(E=w)||"number"==typeof E||"boolean"==typeof E||"symbol"==typeof E||"bigint"==typeof E||n.isBuffer(w))return c?[_(b?r:c(r,d.encoder,x,"key",v))+"="+_(c(w,d.encoder,x,"value",v))]:[_(r)+"="+_(String(w))];var O,C=[];if(void 0===w)return C;if("comma"===o&&h(w))b&&c&&(w=n.maybeMap(w,c)),O=[{value:w.length>0?w.join(",")||null:void 0}];else if(h(p))O=p;else{var R=Object.keys(w);O=y?R.sort(y):R}for(var M=s&&h(w)&&1===w.length?r+"[]":r,D=0;D0?x+b:""}},9368:(t,e,r)=>{"use strict";var i=r(9532),n=Object.prototype.hasOwnProperty,o=Array.isArray,s=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),a=function(t,e){for(var r=e&&e.plainObjects?Object.create(null):{},i=0;i1;){var e=t.pop(),r=e.obj[e.prop];if(o(r)){for(var i=[],n=0;n=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||o===i.RFC1738&&(40===l||41===l)?h+=a.charAt(u):l<128?h+=s[l]:l<2048?h+=s[192|l>>6]+s[128|63&l]:l<55296||l>=57344?h+=s[224|l>>12]+s[128|l>>6&63]+s[128|63&l]:(u+=1,l=65536+((1023&l)<<10|1023&a.charCodeAt(u)),h+=s[240|l>>18]+s[128|l>>12&63]+s[128|l>>6&63]+s[128|63&l])}return h},isBuffer:function(t){return!(!t||"object"!=typeof t||!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t)))},isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},maybeMap:function(t,e){if(o(t)){for(var r=[],i=0;i{"use strict";var i=r(2511);function n(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var o=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,a=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,h=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),u=["'"].concat(h),l=["%","/","?",";","#"].concat(u),c=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,f={javascript:!0,"javascript:":!0},y={javascript:!0,"javascript:":!0},m={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},g=r(5984);function v(t,e,r){if(t&&"object"==typeof t&&t instanceof n)return t;var i=new n;return i.parse(t,e,r),i}n.prototype.parse=function(t,e,r){if("string"!=typeof t)throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var n=t.indexOf("?"),s=-1!==n&&n127?M+="x":M+=R[D];if(!M.match(p)){var N=O.slice(0,S),F=O.slice(S+1),U=R.match(d);U&&(N.push(U[1]),F.unshift(U[2])),F.length&&(v="/"+F.join(".")+v),this.hostname=N.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),A||(this.hostname=i.toASCII(this.hostname));var B=this.port?":"+this.port:"",k=this.hostname||"";this.host=k+B,this.href+=this.host,A&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==v[0]&&(v="/"+v))}if(!f[x])for(S=0,C=u.length;S0)&&r.host.split("@"))&&(r.auth=A.shift(),r.hostname=A.shift(),r.host=r.hostname)),r.search=t.search,r.query=t.query,null===r.pathname&&null===r.search||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r;if(!T.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var w=T.slice(-1)[0],P=(r.host||t.host||T.length>1)&&("."===w||".."===w)||""===w,S=0,I=T.length;I>=0;I--)"."===(w=T[I])?T.splice(I,1):".."===w?(T.splice(I,1),S++):S&&(T.splice(I,1),S--);if(!b&&!x)for(;S--;S)T.unshift("..");!b||""===T[0]||T[0]&&"/"===T[0].charAt(0)||T.unshift(""),P&&"/"!==T.join("/").substr(-1)&&T.push("");var A,O=""===T[0]||T[0]&&"/"===T[0].charAt(0);return E&&(r.hostname=O?"":T.length?T.shift():"",r.host=r.hostname,(A=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=A.shift(),r.hostname=A.shift(),r.host=r.hostname)),(b=b||r.host&&T.length)&&!O&&T.unshift(""),T.length>0?r.pathname=T.join("/"):(r.pathname=null,r.path=null),null===r.pathname&&null===r.search||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},n.prototype.parseHost=function(){var t=this.host,e=s.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)},e.parse=v,e.resolve=function(t,e){return v(t,!1,!0).resolve(e)},e.resolveObject=function(t,e){return t?v(t,!1,!0).resolveObject(e):e},e.format=function(t){return"string"==typeof t&&(t=v(t)),t instanceof n?t.format():n.prototype.format.call(t)},e.Url=n}}]);