text: !function(t){var e={};function r(i){if(e[i])return e[i].exports;var n=e[i]={i:i,l:!1,exports:{}};return t[i].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.m=t,r.c=e,r.d=function(t,e,i){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)r.d(i,n,function(e){return t[e]}.bind(null,n));return i},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=85)}([function(t,e,r){"use strict";var i,n=r(72),o=r(5),s=r(2),a=r(11),h=r(7),u=r(38),c=r(9),l=r(15),d=r(8).f,p=r(36),f=r(20),v=r(4),y=r(44),g=s.Int8Array,m=g&&g.prototype,_=s.Uint8ClampedArray,x=_&&_.prototype,b=g&&p(g),T=m&&p(m),w=Object.prototype,E=w.isPrototypeOf,S=v("toStringTag"),I=y("TYPED_ARRAY_TAG"),P=n&&!!f&&"Opera"!==u(s.opera),A=!1,O={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},C=function(t){return a(t)&&h(O,u(t))};for(i in O)s[i]||(P=!1);if((!P||"function"!=typeof b||b===Function.prototype)&&(b=function(){throw TypeError("Incorrect invocation")},P))for(i in O)s[i]&&f(s[i],b);if((!P||!T||T===w)&&(T=b.prototype,P))for(i in O)s[i]&&f(s[i].prototype,T);if(P&&p(x)!==T&&f(x,T),o&&!h(T,S))for(i in A=!0,d(T,S,{get:function(){return a(this)?this[I]:void 0}}),O)s[i]&&c(s[i],I,i);t.exports={NATIVE_ARRAY_BUFFER_VIEWS:P,TYPED_ARRAY_TAG:A&&I,aTypedArray:function(t){if(C(t))return t;throw TypeError("Target is not a typed array")},aTypedArrayConstructor:function(t){if(f){if(E.call(b,t))return t}else for(var e in O)if(h(O,i)){var r=s[e];if(r&&(t===r||E.call(r,t)))return t}throw TypeError("Target is not a typed array constructor")},exportTypedArrayMethod:function(t,e,r){if(o){if(r)for(var i in O){var n=s[i];n&&h(n.prototype,t)&&delete n.prototype[t]}T[t]&&!r||l(T,t,r?e:P&&m[t]||e)}},exportTypedArrayStaticMethod:function(t,e,r){var i,n;if(o){if(f){if(r)for(i in O)(n=s[i])&&h(n,t)&&delete n[t];if(b[t]&&!r)return;try{return l(b,t,r?e:P&&g[t]||e)}catch(t){}}for(i in O)!(n=s[i])||n[t]&&!r||l(n,t,e)}},isView:function(t){var e=u(t);return"DataView"===e||h(O,e)},isTypedArray:C,TypedArray:b,TypedArrayPrototype:T}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,r){(function(e){var r=function(t){return t&&t.Math==Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof e&&e)||Function("return this")()}).call(this,r(17))},function(t,e,r){var i=r(2),n=r(30).f,o=r(9),s=r(15),a=r(41),h=r(98),u=r(63);t.exports=function(t,e){var r,c,l,d,p,f=t.target,v=t.global,y=t.stat;if(r=v?i:y?i[f]||a(f,{}):(i[f]||{}).prototype)for(c in e){if(d=e[c],l=t.noTargetGet?(p=n(r,c))&&p.value:r[c],!u(v?c:f+(y?".":"#")+c,t.forced)&&void 0!==l){if(typeof d==typeof l)continue;h(d,l)}(t.sham||l&&l.sham)&&o(d,"sham",!0),s(r,c,d,t)}}},function(t,e,r){var i=r(2),n=r(60),o=r(7),s=r(44),a=r(66),h=r(102),u=n("wks"),c=i.Symbol,l=h?c:c&&c.withoutSetter||s;t.exports=function(t){return o(u,t)||(a&&o(c,t)?u[t]=c[t]:u[t]=l("Symbol."+t)),u[t]}},function(t,e,r){var i=r(1);t.exports=!i((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(t,e,r){var i=r(16),n=Math.min;t.exports=function(t){return t>0?n(i(t),9007199254740991):0}},function(t,e){var r={}.hasOwnProperty;t.exports=function(t,e){return r.call(t,e)}},function(t,e,r){var i=r(5),n=r(56),o=r(14),s=r(25),a=Object.defineProperty;e.f=i?a:function(t,e,r){if(o(t),e=s(e,!0),o(r),n)try{return a(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},function(t,e,r){var i=r(5),n=r(8),o=r(21);t.exports=i?function(t,e,r){return n.f(t,e,o(1,r))}:function(t,e,r){return t[e]=r,t}},function(t,e,r){var i=r(64),n=r(31),o=r(12),s=r(6),a=r(65),h=[].push,u=function(t){var e=1==t,r=2==t,u=3==t,c=4==t,l=6==t,d=5==t||l;return function(p,f,v,y){for(var g,m,_=o(p),x=n(_),b=i(f,v,3),T=s(x.length),w=0,E=y||a,S=e?E(p,T):r?E(p,0):void 0;T>w;w++)if((d||w in x)&&(m=b(g=x[w],w,_),t))if(e)S[w]=m;else if(m)switch(t){case 3:return!0;case 5:return g;case 6:return w;case 2:h.call(S,g)}else if(c)return!1;return l?-1:u||c?c:S}};t.exports={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(6)}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,r){var i=r(24);t.exports=function(t){return Object(i(t))}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}();function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=function(){function t(e,r,i){void 0===r&&(r=!1),n(this,t),this._fn=e,this._once=r,this._thisArg=i,this._next=this._prev=this._owner=null}return i(t,[{key:"detach",value:function(){return null!==this._owner&&(this._owner.detach(this),!0)}}]),t}();function s(t,e){return t._head?(t._tail._next=e,e._prev=t._tail,t._tail=e):(t._head=e,t._tail=e),e._owner=t,e}var a=function(){function t(){n(this,t),this._head=this._tail=void 0}return i(t,[{key:"handlers",value:function(){var t=!(arguments.length<=0||void 0===arguments[0])&&arguments[0],e=this._head;if(t)return!!e;for(var r=[];e;)r.push(e),e=e._next;return r}},{key:"has",value:function(t){if(!(t instanceof o))throw new Error("MiniSignal#has(): First arg must be a MiniSignalBinding object.");return t._owner===this}},{key:"dispatch",value:function(){var t=this._head;if(!t)return!1;for(;t;)t._once&&this.detach(t),t._fn.apply(t._thisArg,arguments),t=t._next;return!0}},{key:"add",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?null:arguments[1];if("function"!=typeof t)throw new Error("MiniSignal#add(): First arg must be a Function.");return s(this,new o(t,!1,e))}},{key:"once",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?null:arguments[1];if("function"!=typeof t)throw new Error("MiniSignal#once(): First arg must be a Function.");return s(this,new o(t,!0,e))}},{key:"detach",value:function(t){if(!(t instanceof o))throw new Error("MiniSignal#detach(): First arg must be a MiniSignalBinding object.");return t._owner!==this?this:(t._prev&&(t._prev._next=t._next),t._next&&(t._next._prev=t._prev),t===this._head?(this._head=t._next,null===t._next&&(this._tail=null)):t===this._tail&&(this._tail=t._prev,this._tail._next=null),t._owner=null,this)}},{key:"detachAll",value:function(){var t=this._head;if(!t)return this;for(this._head=this._tail=null;t;)t._owner=null,t=t._next;return this}}]),t}();a.MiniSignalBinding=o,e.default=a,t.exports=e.default},function(t,e,r){var i=r(11);t.exports=function(t){if(!i(t))throw TypeError(String(t)+" is not an object");return t}},function(t,e,r){var i=r(2),n=r(9),o=r(7),s=r(41),a=r(58),h=r(32),u=h.get,c=h.enforce,l=String(String).split("String");(t.exports=function(t,e,r,a){var h=!!a&&!!a.unsafe,u=!!a&&!!a.enumerable,d=!!a&&!!a.noTargetGet;"function"==typeof r&&("string"!=typeof e||o(r,"name")||n(r,"name",e),c(r).source=l.join("string"==typeof e?e:"")),t!==i?(h?!d&&t[e]&&(u=!0):delete t[e],u?t[e]=r:n(t,e,r)):u?t[e]=r:s(e,r)})(Function.prototype,"toString",(function(){return"function"==typeof this&&u(this).source||a(this)}))},function(t,e){var r=Math.ceil,i=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?i:r)(t)}},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){var i=r(16),n=Math.max,o=Math.min;t.exports=function(t,e){var r=i(t);return r<0?n(r+e,0):o(r,e)}},function(t,e,r){var i=r(5),n=r(1),o=r(7),s=Object.defineProperty,a={},h=function(t){throw t};t.exports=function(t,e){if(o(a,t))return a[t];e||(e={});var r=[][t],u=!!o(e,"ACCESSORS")&&e.ACCESSORS,c=o(e,0)?e[0]:h,l=o(e,1)?e[1]:void 0;return a[t]=!!r&&!n((function(){if(u&&!i)return!0;var t={length:-1};u?s(t,1,{enumerable:!0,get:h}):t[1]=1,r.call(t,c,l)}))}},function(t,e,r){var i=r(14),n=r(110);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(r,[]),e=r instanceof Array}catch(t){}return function(r,o){return i(r),n(o),e?t.call(r,o):r.__proto__=o,r}}():void 0)},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,r){var i=r(31),n=r(24);t.exports=function(t){return i(n(t))}},function(t,e){var r={}.toString;t.exports=function(t){return r.call(t).slice(8,-1)}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,r){var i=r(11);t.exports=function(t,e){if(!i(t))return t;var r,n;if(e&&"function"==typeof(r=t.toString)&&!i(n=r.call(t)))return n;if("function"==typeof(r=t.valueOf)&&!i(n=r.call(t)))return n;if(!e&&"function"==typeof(r=t.toString)&&!i(n=r.call(t)))return n;throw TypeError("Can't convert object to primitive value")}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},function(t,e,r){var i,n=r(14),o=r(105),s=r(46),a=r(45),h=r(106),u=r(57),c=r(42),l=c("IE_PROTO"),d=function(){},p=function(t){return"<script>"+t+"<\/script>"},f=function(){try{i=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t,e;f=i?function(t){t.write(p("")),t.close();var e=t.parentWindow.Object;return t=null,e}(i):((e=u("iframe")).style.display="none",h.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(p("document.F=Object")),t.close(),t.F);for(var r=s.length;r--;)delete f.prototype[s[r]];return f()};a[l]=!0,t.exports=Object.create||function(t,e){var r;return null!==t?(d.prototype=n(t),r=new d,d.prototype=null,r[l]=t):r=f(),void 0===e?r:o(r,e)}},function(t,e){t.exports={}},function(t,e,r){var i=r(14),n=r(26),o=r(4)("species");t.exports=function(t,e){var r,s=i(t).constructor;return void 0===s||null==(r=i(s)[o])?e:n(r)}},function(t,e,r){var i=r(5),n=r(55),o=r(21),s=r(22),a=r(25),h=r(7),u=r(56),c=Object.getOwnPropertyDescriptor;e.f=i?c:function(t,e){if(t=s(t),e=a(e,!0),u)try{return c(t,e)}catch(t){}if(h(t,e))return o(!n.f.call(t,e),t[e])}},function(t,e,r){var i=r(1),n=r(23),o="".split;t.exports=i((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==n(t)?o.call(t,""):Object(t)}:Object},function(t,e,r){var i,n,o,s=r(97),a=r(2),h=r(11),u=r(9),c=r(7),l=r(42),d=r(45),p=a.WeakMap;if(s){var f=new p,v=f.get,y=f.has,g=f.set;i=function(t,e){return g.call(f,t,e),e},n=function(t){return v.call(f,t)||{}},o=function(t){return y.call(f,t)}}else{var m=l("state");d[m]=!0,i=function(t,e){return u(t,m,e),e},n=function(t){return c(t,m)?t[m]:{}},o=function(t){return c(t,m)}}t.exports={set:i,get:n,has:o,enforce:function(t){return o(t)?n(t):i(t,{})},getterFor:function(t){return function(e){var r;if(!h(e)||(r=n(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}}}},function(t,e,r){var i=r(100),n=r(2),o=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,e){return arguments.length<2?o(i[t])||o(n[t]):i[t]&&i[t][e]||n[t]&&n[t][e]}},function(t,e,r){var i=r(61),n=r(46).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return i(t,n)}},function(t,e,r){var i=r(22),n=r(6),o=r(18),s=function(t){return function(e,r,s){var a,h=i(e),u=n(h.length),c=o(s,u);if(t&&r!=r){for(;u>c;)if((a=h[c++])!=a)return!0}else for(;u>c;c++)if((t||c in h)&&h[c]===r)return t||c||0;return!t&&-1}};t.exports={includes:s(!0),indexOf:s(!1)}},function(t,e,r){var i=r(7),n=r(12),o=r(42),s=r(109),a=o("IE_PROTO"),h=Object.prototype;t.exports=s?Object.getPrototypeOf:function(t){return t=n(t),i(t,a)?t[a]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?h:null}},function(t,e,r){"use strict";var i=r(1);t.exports=function(t,e){var r=[][t];return!!r&&i((function(){r.call(null,e||function(){throw 1},1)}))}},function(t,e,r){var i=r(50),n=r(23),o=r(4)("toStringTag"),s="Arguments"==n(function(){return arguments}());t.exports=i?n:function(t){var e,r,i;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),o))?r:s?n(e):"Object"==(i=n(e))&&"function"==typeof e.callee?"Arguments":i}},function(t,e,r){"use strict";var i=r(3),n=r(167);i({target:"String",proto:!0,forced:r(168)("anchor")},{anchor:function(t){return n(this,"a","name",t)}})},function(t,e,r){"use strict";var i=r(90),n=r(92);function o(){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}e.parse=_,e.resolve=function(t,e){return _(t,!1,!0).resolve(e)},e.resolveObject=function(t,e){return t?_(t,!1,!0).resolveObject(e):e},e.format=function(t){n.isString(t)&&(t=_(t));return t instanceof o?t.format():o.prototype.format.call(t)},e.Url=o;var s=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,h=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,u=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),c=["'"].concat(u),l=["%","/","?",";","#"].concat(c),d=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,f=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,v={javascript:!0,"javascript:":!0},y={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},m=r(93);function _(t,e,r){if(t&&n.isObject(t)&&t instanceof o)return t;var i=new o;return i.parse(t,e,r),i}o.prototype.parse=function(t,e,r){if(!n.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var o=t.indexOf("?"),a=-1!==o&&o<t.indexOf("#")?"?":"#",u=t.split(a);u[0]=u[0].replace(/\\/g,"/");var _=t=u.join(a);if(_=_.trim(),!r&&1===t.split("#").length){var x=h.exec(_);if(x)return this.path=_,this.href=_,this.pathname=x[1],x[2]?(this.search=x[2],this.query=e?m.parse(this.search.substr(1)):this.search.substr(1)):e&&(this.search="",this.query={}),this}var b=s.exec(_);if(b){var T=(b=b[0]).toLowerCase();this.protocol=T,_=_.substr(b.length)}if(r||b||_.match(/^\/\/[^@\/]+@[^@\/]+/)){var w="//"===_.substr(0,2);!w||b&&y[b]||(_=_.substr(2),this.slashes=!0)}if(!y[b]&&(w||b&&!g[b])){for(var E,S,I=-1,P=0;P<d.length;P++){-1!==(A=_.indexOf(d[P]))&&(-1===I||A<I)&&(I=A)}-1!==(S=-1===I?_.lastIndexOf("@"):_.lastIndexOf("@",I))&&(E=_.slice(0,S),_=_.slice(S+1),this.auth=decodeURIComponent(E)),I=-1;for(P=0;P<l.length;P++){var A;-1!==(A=_.indexOf(l[P]))&&(-1===I||A<I)&&(I=A)}-1===I&&(I=_.length),this.host=_.slice(0,I),_=_.slice(I),this.parseHost(),this.hostname=this.hostname||"";var O="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!O)for(var C=this.hostname.split(/\./),M=(P=0,C.length);P<M;P++){var R=C[P];if(R&&!R.match(p)){for(var D="",L=0,F=R.length;L<F;L++)R.charCodeAt(L)>127?D+="x":D+=R[L];if(!D.match(p)){var N=C.slice(0,P),B=C.slice(P+1),U=R.match(f);U&&(N.push(U[1]),B.unshift(U[2])),B.length&&(_="/"+B.join(".")+_),this.hostname=N.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),O||(this.hostname=i.toASCII(this.hostname));var k=this.port?":"+this.port:"",X=this.hostname||"";this.host=X+k,this.href+=this.host,O&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==_[0]&&(_="/"+_))}if(!v[T])for(P=0,M=c.length;P<M;P++){var j=c[P];if(-1!==_.indexOf(j)){var G=encodeURIComponent(j);G===j&&(G=escape(j)),_=_.split(j).join(G)}}var H=_.indexOf("#");-1!==H&&(this.hash=_.substr(H),_=_.slice(0,H));var z=_.indexOf("?");if(-1!==z?(this.search=_.substr(z),this.query=_.substr(z+1),e&&(this.query=m.parse(this.query)),_=_.slice(0,z)):e&&(this.search="",this.query={}),_&&(this.pathname=_),g[T]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){k=this.pathname||"";var V=this.search||"";this.path=k+V}return this.href=this.format(),this},o.prototype.format=function(){var t=this.auth||"";t&&(t=(t=encodeURIComponent(t)).replace(/%3A/i,":"),t+="@");var e=this.protocol||"",r=this.pathname||"",i=this.hash||"",o=!1,s="";this.host?o=t+this.host:this.hostname&&(o=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&n.isObject(this.query)&&Object.keys(this.query).length&&(s=m.stringify(this.query));var a=this.search||s&&"?"+s||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||g[e])&&!1!==o?(o="//"+(o||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):o||(o=""),i&&"#"!==i.charAt(0)&&(i="#"+i),a&&"?"!==a.charAt(0)&&(a="?"+a),e+o+(r=r.replace(/[?#]/g,(function(t){return encodeURIComponent(t)})))+(a=a.replace("#","%23"))+i},o.prototype.resolve=function(t){return this.resolveObject(_(t,!1,!0)).format()},o.prototype.resolveObject=function(t){if(n.isString(t)){var e=new o;e.parse(t,!1,!0),t=e}for(var r=new o,i=Object.keys(this),s=0;s<i.length;s++){var a=i[s];r[a]=this[a]}if(r.hash=t.hash,""===t.href)return r.href=r.format(),r;if(t.slashes&&!t.protocol){for(var h=Object.keys(t),u=0;u<h.length;u++){var c=h[u];"protocol"!==c&&(r[c]=t[c])}return g[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(t.protocol&&t.protocol!==r.protocol){if(!g[t.protocol]){for(var l=Object.keys(t),d=0;d<l.length;d++){var p=l[d];r[p]=t[p]}return r.href=r.format(),r}if(r.protocol=t.protocol,t.host||y[t.protocol])r.pathname=t.pathname;else{for(var f=(t.pathname||"").split("/");f.length&&!(t.host=f.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==f[0]&&f.unshift(""),f.length<2&&f.unshift(""),r.pathname=f.join("/")}if(r.search=t.search,r.query=t.query,r.host=t.host||"",r.auth=t.auth,r.hostname=t.hostname||t.host,r.port=t.port,r.pathname||r.search){var v=r.pathname||"",m=r.search||"";r.path=v+m}return r.slashes=r.slashes||t.slashes,r.href=r.format(),r}var _=r.pathname&&"/"===r.pathname.charAt(0),x=t.host||t.pathname&&"/"===t.pathname.charAt(0),b=x||_||r.host&&t.pathname,T=b,w=r.pathname&&r.pathname.split("/")||[],E=(f=t.pathname&&t.pathname.split("/")||[],r.protocol&&!g[r.protocol]);if(E&&(r.hostname="",r.port=null,r.host&&(""===w[0]?w[0]=r.host:w.unshift(r.host)),r.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===f[0]?f[0]=t.host:f.unshift(t.host)),t.host=null),b=b&&(""===f[0]||""===w[0])),x)r.host=t.host||""===t.host?t.host:r.host,r.hostname=t.hostname||""===t.hostname?t.hostname:r.hostname,r.search=t.search,r.query=t.query,w=f;else if(f.length)w||(w=[]),w.pop(),w=w.concat(f),r.search=t.search,r.query=t.query;else if(!n.isNullOrUndefined(t.search)){if(E)r.hostname=r.host=w.shift(),(O=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=O.shift(),r.host=r.hostname=O.shift());return r.search=t.search,r.query=t.query,n.isNull(r.pathname)&&n.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!w.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var S=w.slice(-1)[0],I=(r.host||t.host||w.length>1)&&("."===S||".."===S)||""===S,P=0,A=w.length;A>=0;A--)"."===(S=w[A])?w.splice(A,1):".."===S?(w.splice(A,1),P++):P&&(w.splice(A,1),P--);if(!b&&!T)for(;P--;P)w.unshift("..");!b||""===w[0]||w[0]&&"/"===w[0].charAt(0)||w.unshift(""),I&&"/"!==w.join("/").substr(-1)&&w.push("");var O,C=""===w[0]||w[0]&&"/"===w[0].charAt(0);E&&(r.hostname=r.host=C?"":w.length?w.shift():"",(O=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=O.shift(),r.host=r.hostname=O.shift()));return(b=b||r.host&&w.length)&&!C&&w.unshift(""),w.length?r.pathname=w.join("/"):(r.pathname=null,r.path=null),n.isNull(r.pathname)&&n.isNull(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},o.prototype.parseHost=function(){var t=this.host,e=a.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},function(t,e,r){var i=r(2),n=r(9);t.exports=function(t,e){try{n(i,t,e)}catch(r){i[t]=e}return e}},function(t,e,r){var i=r(60),n=r(44),o=i("keys");t.exports=function(t){return o[t]||(o[t]=n(t))}},function(t,e){t.exports=!1},function(t,e){var r=0,i=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++r+i).toString(36)}},function(t,e){t.exports={}},function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(t,e,r){var i=r(1),n=r(4),o=r(103),s=n("species");t.exports=function(t){return o>=51||!i((function(){var e=[];return(e.constructor={})[s]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},function(t,e,r){var i=r(8).f,n=r(7),o=r(4)("toStringTag");t.exports=function(t,e,r){t&&!n(t=r?t:t.prototype,o)&&i(t,o,{configurable:!0,value:e})}},function(t,e,r){"use strict";var i=r(12),n=r(18),o=r(6);t.exports=function(t){for(var e=i(this),r=o(e.length),s=arguments.length,a=n(s>1?arguments[1]:void 0,r),h=s>2?arguments[2]:void 0,u=void 0===h?r:n(h,r);u>a;)e[a++]=t;return e}},function(t,e,r){var i={};i[r(4)("toStringTag")]="z",t.exports="[object z]"===String(i)},function(t,e,r){"use strict";var i,n,o=r(126),s=r(127),a=RegExp.prototype.exec,h=String.prototype.replace,u=a,c=(i=/a/,n=/b*/g,a.call(i,"a"),a.call(n,"a"),0!==i.lastIndex||0!==n.lastIndex),l=s.UNSUPPORTED_Y||s.BROKEN_CARET,d=void 0!==/()??/.exec("")[1];(c||d||l)&&(u=function(t){var e,r,i,n,s=this,u=l&&s.sticky,p=o.call(s),f=s.source,v=0,y=t;return u&&(-1===(p=p.replace("y","")).indexOf("g")&&(p+="g"),y=String(t).slice(s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&"\n"!==t[s.lastIndex-1])&&(f="(?: "+f+")",y=" "+y,v++),r=new RegExp("^(?:"+f+")",p)),d&&(r=new RegExp("^"+f+"$(?!\\s)",p)),c&&(e=s.lastIndex),i=a.call(u?r:s,y),u?i?(i.input=i.input.slice(v),i[0]=i[0].slice(v),i.index=s.lastIndex,s.lastIndex+=i[0].length):s.lastIndex=0:c&&i&&(s.lastIndex=s.global?i.index+i[0].length:e),d&&i&&i.length>1&&h.call(i[0],r,(function(){for(n=1;n<arguments.length-2;n++)void 0===arguments[n]&&(i[n]=void 0)})),i}),t.exports=u},function(t,e,r){"use strict";t.exports=function(t,e){e=e||{};for(var 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={},o=14;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}},function(t,e,r){"use strict";var i=Object.prototype.hasOwnProperty,n="~";function o(){}function s(t,e,r){this.fn=t,this.context=e,this.once=r||!1}function a(t,e,r,i,o){if("function"!=typeof r)throw new TypeError("The listener must be a function");var a=new s(r,i||t,o),h=n?n+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 h(t,e){0==--t._eventsCount?t._events=new o:delete t._events[e]}function u(){this._events=new o,this._eventsCount=0}Object.create&&(o.prototype=Object.create(null),(new o).__proto__||(n=!1)),u.prototype.eventNames=function(){var t,e,r=[];if(0===this._eventsCount)return r;for(e in t=this._events)i.call(t,e)&&r.push(n?e.slice(1):e);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(t)):r},u.prototype.listeners=function(t){var e=n?n+t:t,r=this._events[e];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,s=new Array(o);i<o;i++)s[i]=r[i].fn;return s},u.prototype.listenerCount=function(t){var e=n?n+t:t,r=this._events[e];return r?r.fn?1:r.length:0},u.prototype.emit=function(t,e,r,i,o,s){var a=n?n+t:t;if(!this._events[a])return!1;var h,u,c=this._events[a],l=arguments.length;if(c.fn){switch(c.once&&this.removeListener(t,c.fn,void 0,!0),l){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,e),!0;case 3:return c.fn.call(c.context,e,r),!0;case 4:return c.fn.call(c.context,e,r,i),!0;case 5:return c.fn.call(c.context,e,r,i,o),!0;case 6:return c.fn.call(c.context,e,r,i,o,s),!0}for(u=1,h=new Array(l-1);u<l;u++)h[u-1]=arguments[u];c.fn.apply(c.context,h)}else{var d,p=c.length;for(u=0;u<p;u++)switch(c[u].once&&this.removeListener(t,c[u].fn,void 0,!0),l){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,e);break;case 3:c[u].fn.call(c[u].context,e,r);break;case 4:c[u].fn.call(c[u].context,e,r,i);break;default:if(!h)for(d=1,h=new Array(l-1);d<l;d++)h[d-1]=arguments[d];c[u].fn.apply(c[u].context,h)}}return!0},u.prototype.on=function(t,e,r){return a(this,t,e,r,!1)},u.prototype.once=function(t,e,r){return a(this,t,e,r,!0)},u.prototype.removeListener=function(t,e,r,i){var o=n?n+t:t;if(!this._events[o])return this;if(!e)return h(this,o),this;var s=this._events[o];if(s.fn)s.fn!==e||i&&!s.once||r&&s.context!==r||h(this,o);else{for(var a=0,u=[],c=s.length;a<c;a++)(s[a].fn!==e||i&&!s[a].once||r&&s[a].context!==r)&&u.push(s[a]);u.length?this._events[o]=1===u.length?u[0]:u:h(this,o)}return this},u.prototype.removeAllListeners=function(t){var e;return t?(e=n?n+t:t,this._events[e]&&h(this,e)):(this._events=new o,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=n,u.EventEmitter=u,t.exports=u},function(t,e,r){"use strict";function i(t,e,r){r=r||2;var i,a,h,u,c,p,f,y=e&&e.length,g=y?e[0]*r:t.length,m=n(t,0,g,r,!0),_=[];if(!m||m.next===m.prev)return _;if(y&&(m=function(t,e,r,i){var s,a,h,u,c,p=[];for(s=0,a=e.length;s<a;s++)h=e[s]*i,u=s<a-1?e[s+1]*i:t.length,(c=n(t,h,u,i,!1))===c.next&&(c.steiner=!0),p.push(v(c));for(p.sort(l),s=0;s<p.length;s++)d(p[s],r),r=o(r,r.next);return r}(t,e,m,r)),t.length>80*r){i=h=t[0],a=u=t[1];for(var x=r;x<g;x+=r)(c=t[x])<i&&(i=c),(p=t[x+1])<a&&(a=p),c>h&&(h=c),p>u&&(u=p);f=0!==(f=Math.max(h-i,u-a))?1/f:0}return s(m,_,r,i,a,f),_}function n(t,e,r,i,n){var o,s;if(n===A(t,e,r,i)>0)for(o=e;o<r;o+=i)s=S(o,t[o],t[o+1],s);else for(o=r-i;o>=e;o-=i)s=S(o,t[o],t[o+1],s);return s&&_(s,s.next)&&(I(s),s=s.next),s}function o(t,e){if(!t)return t;e||(e=t);var r,i=t;do{if(r=!1,i.steiner||!_(i,i.next)&&0!==m(i.prev,i,i.next))i=i.next;else{if(I(i),(i=e=i.prev)===i.next)break;r=!0}}while(r||i!==e);return e}function s(t,e,r,i,n,l,d){if(t){!d&&l&&function(t,e,r,i){var n=t;do{null===n.z&&(n.z=f(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;e<u&&(a++,i=i.nextZ);e++);for(h=u;a>0||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,i,n,l);for(var p,v,y=t;t.prev!==t.next;)if(p=t.prev,v=t.next,l?h(t,i,n,l):a(t))e.push(p.i/r),e.push(t.i/r),e.push(v.i/r),I(t),t=v.next,y=v.next;else if((t=v)===y){d?1===d?s(t=u(o(t),e,r),e,r,i,n,l,2):2===d&&c(t,e,r,i,n,l):s(o(t),e,r,i,n,l,1);break}}}function a(t){var e=t.prev,r=t,i=t.next;if(m(e,r,i)>=0)return!1;for(var n=t.next.next;n!==t.prev;){if(y(e.x,e.y,r.x,r.y,i.x,i.y,n.x,n.y)&&m(n.prev,n,n.next)>=0)return!1;n=n.next}return!0}function h(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<o.x?n.x<s.x?n.x:s.x:o.x<s.x?o.x:s.x,h=n.y<o.y?n.y<s.y?n.y:s.y:o.y<s.y?o.y:s.y,u=n.x>o.x?n.x>s.x?n.x:s.x:o.x>s.x?o.x:s.x,c=n.y>o.y?n.y>s.y?n.y:s.y:o.y>s.y?o.y:s.y,l=f(a,h,e,r,i),d=f(u,c,e,r,i),p=t.prevZ,v=t.nextZ;p&&p.z>=l&&v&&v.z<=d;){if(p!==t.prev&&p!==t.next&&y(n.x,n.y,o.x,o.y,s.x,s.y,p.x,p.y)&&m(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,v!==t.prev&&v!==t.next&&y(n.x,n.y,o.x,o.y,s.x,s.y,v.x,v.y)&&m(v.prev,v,v.next)>=0)return!1;v=v.nextZ}for(;p&&p.z>=l;){if(p!==t.prev&&p!==t.next&&y(n.x,n.y,o.x,o.y,s.x,s.y,p.x,p.y)&&m(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;v&&v.z<=d;){if(v!==t.prev&&v!==t.next&&y(n.x,n.y,o.x,o.y,s.x,s.y,v.x,v.y)&&m(v.prev,v,v.next)>=0)return!1;v=v.nextZ}return!0}function u(t,e,r){var i=t;do{var n=i.prev,s=i.next.next;!_(n,s)&&x(n,i,i.next,s)&&w(n,s)&&w(s,n)&&(e.push(n.i/r),e.push(i.i/r),e.push(s.i/r),I(i),I(i.next),i=t=s),i=i.next}while(i!==t);return o(i)}function c(t,e,r,i,n,a){var h=t;do{for(var u=h.next.next;u!==h.prev;){if(h.i!==u.i&&g(h,u)){var c=E(h,u);return h=o(h,h.next),c=o(c,c.next),s(h,e,r,i,n,a),void s(c,e,r,i,n,a)}u=u.next}h=h.next}while(h!==t)}function l(t,e){return t.x-e.x}function d(t,e){if(e=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){if(s=a,a===n){if(o===i.y)return i;if(o===i.next.y)return i.next}r=i.x<i.next.x?i:i.next}}i=i.next}while(i!==e);if(!r)return null;if(n===s)return r;var h,u=r,c=r.x,l=r.y,d=1/0;i=r;do{n>=i.x&&i.x>=c&&n!==i.x&&y(o<l?n:s,o,c,l,o<l?s:n,o,i.x,i.y)&&(h=Math.abs(o-i.y)/(n-i.x),w(i,t)&&(h<d||h===d&&(i.x>r.x||i.x===r.x&&p(r,i)))&&(r=i,d=h)),i=i.next}while(i!==u);return r}(t,e)){var r=E(e,t);o(e,e.next),o(r,r.next)}}function p(t,e){return m(t.prev,t,e.prev)<0&&m(e.next,t,t.next)<0}function f(t,e,r,i,n){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*n)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-i)*n)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function v(t){var e=t,r=t;do{(e.x<r.x||e.x===r.x&&e.y<r.y)&&(r=e),e=e.next}while(e!==t);return r}function y(t,e,r,i,n,o,s,a){return(n-s)*(e-a)-(t-s)*(o-a)>=0&&(t-s)*(i-a)-(r-s)*(e-a)>=0&&(r-s)*(o-a)-(n-s)*(i-a)>=0}function g(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&&x(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&(w(t,e)&&w(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))||_(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 _(t,e){return t.x===e.x&&t.y===e.y}function x(t,e,r,i){var n=T(m(t,e,r)),o=T(m(t,e,i)),s=T(m(r,i,t)),a=T(m(r,i,e));return n!==o&&s!==a||(!(0!==n||!b(t,r,e))||(!(0!==o||!b(t,i,e))||(!(0!==s||!b(r,t,i))||!(0!==a||!b(r,e,i)))))}function b(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 T(t){return t>0?1:t<0?-1:0}function w(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 E(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 S(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 I(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=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function A(t,e,r,i){for(var n=0,o=e,s=r-i;o<r;o+=i)n+=(t[s]-t[o])*(t[o+1]+t[s+1]),s=o;return n}t.exports=i,t.exports.default=i,i.deviation=function(t,e,r,i){var n=e&&e.length,o=n?e[0]*r:t.length,s=Math.abs(A(t,0,o,r));if(n)for(var a=0,h=e.length;a<h;a++){var u=e[a]*r,c=a<h-1?e[a+1]*r:t.length;s-=Math.abs(A(t,u,c,r))}var l=0;for(a=0;a<i.length;a+=3){var d=i[a]*r,p=i[a+1]*r,f=i[a+2]*r;l+=Math.abs((t[d]-t[f])*(t[p+1]-t[d+1])-(t[d]-t[p])*(t[f+1]-t[d+1]))}return 0===s&&0===l?0:Math.abs((l-s)/s)},i.flatten=function(t){for(var e=t[0][0].length,r={vertices:[],holes:[],dimensions:e},i=0,n=0;n<t.length;n++){for(var o=0;o<t[n].length;o++)for(var s=0;s<e;s++)r.vertices.push(t[n][o][s]);n>0&&(i+=t[n-1].length,r.holes.push(i))}return r}},function(t,e,r){"use strict";var i={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,o=n&&!i.call({1:2},1);e.f=o?function(t){var e=n(this,t);return!!e&&e.enumerable}:i},function(t,e,r){var i=r(5),n=r(1),o=r(57);t.exports=!i&&!n((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},function(t,e,r){var i=r(2),n=r(11),o=i.document,s=n(o)&&n(o.createElement);t.exports=function(t){return s?o.createElement(t):{}}},function(t,e,r){var i=r(59),n=Function.toString;"function"!=typeof i.inspectSource&&(i.inspectSource=function(t){return n.call(t)}),t.exports=i.inspectSource},function(t,e,r){var i=r(2),n=r(41),o=i["__core-js_shared__"]||n("__core-js_shared__",{});t.exports=o},function(t,e,r){var i=r(43),n=r(59);(t.exports=function(t,e){return n[t]||(n[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.6.4",mode:i?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(t,e,r){var i=r(7),n=r(22),o=r(35).indexOf,s=r(45);t.exports=function(t,e){var r,a=n(t),h=0,u=[];for(r in a)!i(s,r)&&i(a,r)&&u.push(r);for(;e.length>h;)i(a,r=e[h++])&&(~o(u,r)||u.push(r));return u}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,r){var i=r(1),n=/#|\.prototype\./,o=function(t,e){var r=a[s(t)];return r==u||r!=h&&("function"==typeof e?i(e):!!e)},s=o.normalize=function(t){return String(t).replace(n,".").toLowerCase()},a=o.data={},h=o.NATIVE="N",u=o.POLYFILL="P";t.exports=o},function(t,e,r){var i=r(26);t.exports=function(t,e,r){if(i(t),void 0===e)return t;switch(r){case 0:return function(){return t.call(e)};case 1:return function(r){return t.call(e,r)};case 2:return function(r,i){return t.call(e,r,i)};case 3:return function(r,i,n){return t.call(e,r,i,n)}}return function(){return t.apply(e,arguments)}}},function(t,e,r){var i=r(11),n=r(101),o=r(4)("species");t.exports=function(t,e){var r;return n(t)&&("function"!=typeof(r=t.constructor)||r!==Array&&!n(r.prototype)?i(r)&&null===(r=r[o])&&(r=void 0):r=void 0),new(void 0===r?Array:r)(0===e?0:e)}},function(t,e,r){var i=r(1);t.exports=!!Object.getOwnPropertySymbols&&!i((function(){return!String(Symbol())}))},function(t,e,r){"use strict";var i=r(22),n=r(68),o=r(28),s=r(32),a=r(107),h=s.set,u=s.getterFor("Array Iterator");t.exports=a(Array,"Array",(function(t,e){h(this,{type:"Array Iterator",target:i(t),index:0,kind:e})}),(function(){var t=u(this),e=t.target,r=t.kind,i=t.index++;return!e||i>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:i,done:!1}:"values"==r?{value:e[i],done:!1}:{value:[i,e[i]],done:!1}}),"values"),o.Arguments=o.Array,n("keys"),n("values"),n("entries")},function(t,e,r){var i=r(4),n=r(27),o=r(8),s=i("unscopables"),a=Array.prototype;null==a[s]&&o.f(a,s,{configurable:!0,value:n(null)}),t.exports=function(t){a[s][t]=!0}},function(t,e,r){var i=r(61),n=r(46);t.exports=Object.keys||function(t){return i(t,n)}},function(t,e,r){"use strict";var i,n,o,s=r(36),a=r(9),h=r(7),u=r(4),c=r(43),l=u("iterator"),d=!1;[].keys&&("next"in(o=[].keys())?(n=s(s(o)))!==Object.prototype&&(i=n):d=!0),null==i&&(i={}),c||h(i,l)||a(i,l,(function(){return this})),t.exports={IteratorPrototype:i,BUGGY_SAFARI_ITERATORS:d}},function(t,e,r){"use strict";var i=r(2),n=r(5),o=r(72),s=r(9),a=r(113),h=r(1),u=r(73),c=r(16),l=r(6),d=r(74),p=r(114),f=r(36),v=r(20),y=r(34).f,g=r(8).f,m=r(49),_=r(48),x=r(32),b=x.get,T=x.set,w=i.ArrayBuffer,E=w,S=i.DataView,I=S&&S.prototype,P=Object.prototype,A=i.RangeError,O=p.pack,C=p.unpack,M=function(t){return[255&t]},R=function(t){return[255&t,t>>8&255]},D=function(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]},L=function(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]},F=function(t){return O(t,23,4)},N=function(t){return O(t,52,8)},B=function(t,e){g(t.prototype,e,{get:function(){return b(this)[e]}})},U=function(t,e,r,i){var n=d(r),o=b(t);if(n+e>o.byteLength)throw A("Wrong index");var s=b(o.buffer).bytes,a=n+o.byteOffset,h=s.slice(a,a+e);return i?h:h.reverse()},k=function(t,e,r,i,n,o){var s=d(r),a=b(t);if(s+e>a.byteLength)throw A("Wrong index");for(var h=b(a.buffer).bytes,u=s+a.byteOffset,c=i(+n),l=0;l<e;l++)h[u+l]=c[o?l:e-l-1]};if(o){if(!h((function(){w(1)}))||!h((function(){new w(-1)}))||h((function(){return new w,new w(1.5),new w(NaN),"ArrayBuffer"!=w.name}))){for(var X,j=(E=function(t){return u(this,E),new w(d(t))}).prototype=w.prototype,G=y(w),H=0;G.length>H;)(X=G[H++])in E||s(E,X,w[X]);j.constructor=E}v&&f(I)!==P&&v(I,P);var z=new S(new E(2)),V=I.setInt8;z.setInt8(0,2147483648),z.setInt8(1,2147483649),!z.getInt8(0)&&z.getInt8(1)||a(I,{setInt8:function(t,e){V.call(this,t,e<<24>>24)},setUint8:function(t,e){V.call(this,t,e<<24>>24)}},{unsafe:!0})}else E=function(t){u(this,E,"ArrayBuffer");var e=d(t);T(this,{bytes:m.call(new Array(e),0),byteLength:e}),n||(this.byteLength=e)},S=function(t,e,r){u(this,S,"DataView"),u(t,E,"DataView");var i=b(t).byteLength,o=c(e);if(o<0||o>i)throw A("Wrong offset");if(o+(r=void 0===r?i-o:l(r))>i)throw A("Wrong length");T(this,{buffer:t,byteLength:r,byteOffset:o}),n||(this.buffer=t,this.byteLength=r,this.byteOffset=o)},n&&(B(E,"byteLength"),B(S,"buffer"),B(S,"byteLength"),B(S,"byteOffset")),a(S.prototype,{getInt8:function(t){return U(this,1,t)[0]<<24>>24},getUint8:function(t){return U(this,1,t)[0]},getInt16:function(t){var e=U(this,2,t,arguments.length>1?arguments[1]:void 0);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=U(this,2,t,arguments.length>1?arguments[1]:void 0);return e[1]<<8|e[0]},getInt32:function(t){return L(U(this,4,t,arguments.length>1?arguments[1]:void 0))},getUint32:function(t){return L(U(this,4,t,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(t){return C(U(this,4,t,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(t){return C(U(this,8,t,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(t,e){k(this,1,t,M,e)},setUint8:function(t,e){k(this,1,t,M,e)},setInt16:function(t,e){k(this,2,t,R,e,arguments.length>2?arguments[2]:void 0)},setUint16:function(t,e){k(this,2,t,R,e,arguments.length>2?arguments[2]:void 0)},setInt32:function(t,e){k(this,4,t,D,e,arguments.length>2?arguments[2]:void 0)},setUint32:function(t,e){k(this,4,t,D,e,arguments.length>2?arguments[2]:void 0)},setFloat32:function(t,e){k(this,4,t,F,e,arguments.length>2?arguments[2]:void 0)},setFloat64:function(t,e){k(this,8,t,N,e,arguments.length>2?arguments[2]:void 0)}});_(E,"ArrayBuffer"),_(S,"DataView"),t.exports={ArrayBuffer:E,DataView:S}},function(t,e){t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},function(t,e){t.exports=function(t,e,r){if(!(t instanceof e))throw TypeError("Incorrect "+(r?r+" ":"")+"invocation");return t}},function(t,e,r){var i=r(16),n=r(6);t.exports=function(t){if(void 0===t)return 0;var e=i(t),r=n(e);if(e!==r)throw RangeError("Wrong length or index");return r}},function(t,e,r){"use strict";var i=r(3),n=r(51);i({target:"RegExp",proto:!0,forced:/./.exec!==n},{exec:n})},function(t,e,r){var i=r(136);t.exports=function(t,e){var r=i(t);if(r%e)throw RangeError("Wrong offset");return r}},function(t,e,r){var i=r(11),n=r(20);t.exports=function(t,e,r){var o,s;return n&&"function"==typeof(o=e.constructor)&&o!==r&&i(s=o.prototype)&&s!==r.prototype&&n(t,s),t}},function(t,e,r){var i=r(26),n=r(12),o=r(31),s=r(6),a=function(t){return function(e,r,a,h){i(r);var u=n(e),c=o(u),l=s(u.length),d=t?l-1:0,p=t?-1:1;if(a<2)for(;;){if(d in c){h=c[d],d+=p;break}if(d+=p,t?d<0:l<=d)throw TypeError("Reduce of empty array with no initial value")}for(;t?d>=0:l>d;d+=p)d in c&&(h=r(h,c[d],d,u));return h}};t.exports={left:a(!1),right:a(!0)}},function(t,e,r){"use strict";var i=r(3),n=r(80);i({target:"Array",proto:!0,forced:[].forEach!=n},{forEach:n})},function(t,e,r){"use strict";var i=r(10).forEach,n=r(37),o=r(19),s=n("forEach"),a=o("forEach");t.exports=s&&a?[].forEach:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}},function(t,e,r){var i=r(2),n=r(166),o=r(80),s=r(9);for(var a in n){var h=i[a],u=h&&h.prototype;if(u&&u.forEach!==o)try{s(u,"forEach",o)}catch(t){u.forEach=o}}},function(t,e,r){"use strict";var i=r(3),n=r(10).map,o=r(47),s=r(19),a=o("map"),h=s("map");i({target:"Array",proto:!0,forced:!a||!h},{map:function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,r){(function(i,n){var o;!function(i){var s=i.Promise,a=s&&"resolve"in s&&"reject"in s&&"all"in s&&"race"in s&&function(){var t;return new s((function(e){t=e})),"function"==typeof t}();e?(e.Promise=a?s:w,e.Polyfill=w):void 0===(o=function(){return a?s:w}.call(e,r,e,t))||(t.exports=o);var h=function(){};function u(t){return"[object Array]"===Object.prototype.toString.call(t)}var c,l=void 0!==n?n:setTimeout,d=[];function p(){for(var t=0;t<d.length;t++)d[t][0](d[t][1]);d=[],c=!1}function f(t,e){d.push([t,e]),c||(c=!0,l(p,0))}function v(t){var e=t.owner,r=e.state_,i=e.data_,n=t[r],o=t.then;if("function"==typeof n){r="fulfilled";try{i=n(i)}catch(t){_(o,t)}}y(o,i)||("fulfilled"===r&&g(o,i),"rejected"===r&&_(o,i))}function y(t,e){var r;try{if(t===e)throw new TypeError("A promises callback cannot return that same promise.");if(e&&("function"==typeof e||"object"==typeof e)){var i=e.then;if("function"==typeof i)return i.call(e,(function(i){r||(r=!0,e!==i?g(t,i):m(t,i))}),(function(e){r||(r=!0,_(t,e))})),!0}}catch(e){return r||_(t,e),!0}return!1}function g(t,e){t!==e&&y(t,e)||m(t,e)}function m(t,e){"pending"===t.state_&&(t.state_="sealed",t.data_=e,f(b,t))}function _(t,e){"pending"===t.state_&&(t.state_="sealed",t.data_=e,f(T,t))}function x(t){var e=t.then_;t.then_=void 0;for(var r=0;r<e.length;r++)v(e[r])}function b(t){t.state_="fulfilled",x(t)}function T(t){t.state_="rejected",x(t)}function w(t){if("function"!=typeof t)throw new TypeError("Promise constructor takes a function argument");if(this instanceof w==!1)throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");this.then_=[],function(t,e){function r(t){_(e,t)}try{t((function(t){g(e,t)}),r)}catch(t){r(t)}}(t,this)}w.prototype={constructor:w,state_:"pending",then_:null,data_:void 0,then:function(t,e){var r={owner:this,then:new this.constructor(h),fulfilled:t,rejected:e};return"fulfilled"===this.state_||"rejected"===this.state_?f(v,r):this.then_.push(r),r.then},catch:function(t){return this.then(null,t)}},w.all=function(t){if(!u(t))throw new TypeError("You must pass an array to Promise.all().");return new this((function(e,r){var i=[],n=0;function o(t){return n++,function(r){i[t]=r,--n||e(i)}}for(var s,a=0;a<t.length;a++)(s=t[a])&&"function"==typeof s.then?s.then(o(a),r):i[a]=s;n||e(i)}))},w.race=function(t){if(!u(t))throw new TypeError("You must pass an array to Promise.race().");return new this((function(e,r){for(var i,n=0;n<t.length;n++)(i=t[n])&&"function"==typeof i.then?i.then(e,r):e(i)}))},w.resolve=function(t){return t&&"object"==typeof t&&t.constructor===this?t:new this((function(e){e(t)}))},w.reject=function(t){return new this((function(e,r){r(t)}))}}("undefined"!=typeof window?window:void 0!==i?i:"undefined"!=typeof self?self:this)}).call(this,r(17),r(87).setImmediate)},function(t,e,r){"use strict";
  /*
  object-assign
  (c) Sindre Sorhus
  @license MIT
  */var i=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function s(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}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,e){for(var r,a,h=s(t),u=1;u<arguments.length;u++){for(var c in r=Object(arguments[u]))n.call(r,c)&&(h[c]=r[c]);if(i){a=i(r);for(var l=0;l<a.length;l++)o.call(r,a[l])&&(h[a[l]]=r[a[l]])}}return h}},function(t,e,r){t.exports=r(176)},function(t,e,r){"use strict";(function(t){var e=r(83),i=r(84),n=r.n(i);
  /*!
   * @pixi/polyfill - v5.2.3
   * Compiled Fri, 24 Apr 2020 00:55:22 UTC
   *
   * @pixi/polyfill is licensed under the MIT License.
   * http://www.opensource.org/licenses/mit-license
   */
  window.Promise||(window.Promise=e.Polyfill),Object.assign||(Object.assign=n.a);var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{};if(Date.now&&Date.prototype.getTime||(Date.now=function(){return(new Date).getTime()}),!o.performance||!o.performance.now){var s=Date.now();o.performance||(o.performance={}),o.performance.now=function(){return Date.now()-s}}for(var a=Date.now(),h=["ms","moz","webkit","o"],u=0;u<h.length&&!o.requestAnimationFrame;++u){var c=h[u];o.requestAnimationFrame=o[c+"RequestAnimationFrame"],o.cancelAnimationFrame=o[c+"CancelAnimationFrame"]||o[c+"CancelRequestAnimationFrame"]}o.requestAnimationFrame||(o.requestAnimationFrame=function(t){if("function"!=typeof t)throw new TypeError(t+"is not a function");var e=Date.now(),r=16+a-e;return r<0&&(r=0),a=e,setTimeout((function(){a=Date.now(),t(performance.now())}),r)}),o.cancelAnimationFrame||(o.cancelAnimationFrame=function(t){return clearTimeout(t)}),Math.sign||(Math.sign=function(t){return 0===(t=Number(t))||isNaN(t)?t:t>0?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)}).call(this,r(17))},function(t,e,r){(function(t){var i=void 0!==t&&t||"undefined"!=typeof self&&self||window,n=Function.prototype.apply;function o(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new o(n.call(setTimeout,i,arguments),clearTimeout)},e.setInterval=function(){return new o(n.call(setInterval,i,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(i,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},r(88),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,r(17))},function(t,e,r){(function(t,e){!function(t,r){"use strict";if(!t.setImmediate){var i,n,o,s,a,h=1,u={},c=!1,l=t.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(t);d=d&&d.setTimeout?d:t,"[object process]"==={}.toString.call(t.process)?i=function(t){e.nextTick((function(){f(t)}))}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,r=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=r,e}}()?t.MessageChannel?((o=new MessageChannel).port1.onmessage=function(t){f(t.data)},i=function(t){o.port2.postMessage(t)}):l&&"onreadystatechange"in l.createElement("script")?(n=l.documentElement,i=function(t){var e=l.createElement("script");e.onreadystatechange=function(){f(t),e.onreadystatechange=null,n.removeChild(e),e=null},n.appendChild(e)}):i=function(t){setTimeout(f,0,t)}:(s="setImmediate$"+Math.random()+"$",a=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(s)&&f(+e.data.slice(s.length))},t.addEventListener?t.addEventListener("message",a,!1):t.attachEvent("onmessage",a),i=function(e){t.postMessage(s+e,"*")}),d.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),r=0;r<e.length;r++)e[r]=arguments[r+1];var n={callback:t,args:e};return u[h]=n,i(h),h++},d.clearImmediate=p}function p(t){delete u[t]}function f(t){if(c)setTimeout(f,0,t);else{var e=u[t];if(e){c=!0;try{!function(t){var e=t.callback,r=t.args;switch(r.length){case 0:e();break;case 1:e(r[0]);break;case 2:e(r[0],r[1]);break;case 3:e(r[0],r[1],r[2]);break;default:e.apply(void 0,r)}}(e)}finally{p(t),c=!1}}}}}("undefined"==typeof self?void 0===t?this:t:self)}).call(this,r(17),r(89))},function(t,e){var r,i,n=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(r===setTimeout)return setTimeout(t,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(t){r=o}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(t){i=s}}();var h,u=[],c=!1,l=-1;function d(){c&&h&&(c=!1,h.length?u=h.concat(u):l=-1,u.length&&p())}function p(){if(!c){var t=a(d);c=!0;for(var e=u.length;e;){for(h=u,u=[];++l<e;)h&&h[l].run();l=-1,e=u.length}h=null,c=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(t)}}function f(t,e){this.fun=t,this.array=e}function v(){}n.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];u.push(new f(t,e)),1!==u.length||c||a(p)},f.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=v,n.addListener=v,n.once=v,n.off=v,n.removeListener=v,n.removeAllListeners=v,n.emit=v,n.prependListener=v,n.prependOnceListener=v,n.listeners=function(t){return[]},n.binding=function(t){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(t){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},function(t,e,r){(function(t,i){var n;/*! https://mths.be/punycode v1.3.2 by @mathias */!function(o){e&&e.nodeType,t&&t.nodeType;var s="object"==typeof i&&i;s.global!==s&&s.window!==s&&s.self;var a,h=2147483647,u=/^xn--/,c=/[^\x20-\x7E]/,l=/[\x2E\u3002\uFF0E\uFF61]/g,d={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},p=Math.floor,f=String.fromCharCode;function v(t){throw RangeError(d[t])}function y(t,e){for(var r=t.length,i=[];r--;)i[r]=e(t[r]);return i}function g(t,e){var r=t.split("@"),i="";return r.length>1&&(i=r[0]+"@",t=r[1]),i+y((t=t.replace(l,".")).split("."),e).join(".")}function m(t){for(var e,r,i=[],n=0,o=t.length;n<o;)(e=t.charCodeAt(n++))>=55296&&e<=56319&&n<o?56320==(64512&(r=t.charCodeAt(n++)))?i.push(((1023&e)<<10)+(1023&r)+65536):(i.push(e),n--):i.push(e);return i}function _(t){return y(t,(function(t){var e="";return t>65535&&(e+=f((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=f(t)})).join("")}function x(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function b(t,e,r){var i=0;for(t=r?p(t/700):t>>1,t+=p(t/e);t>455;i+=36)t=p(t/35);return p(i+36*t/(t+38))}function T(t){var e,r,i,n,o,s,a,u,c,l,d,f=[],y=t.length,g=0,m=128,x=72;for((r=t.lastIndexOf("-"))<0&&(r=0),i=0;i<r;++i)t.charCodeAt(i)>=128&&v("not-basic"),f.push(t.charCodeAt(i));for(n=r>0?r+1:0;n<y;){for(o=g,s=1,a=36;n>=y&&v("invalid-input"),((u=(d=t.charCodeAt(n++))-48<10?d-22:d-65<26?d-65:d-97<26?d-97:36)>=36||u>p((h-g)/s))&&v("overflow"),g+=u*s,!(u<(c=a<=x?1:a>=x+26?26:a-x));a+=36)s>p(h/(l=36-c))&&v("overflow"),s*=l;x=b(g-o,e=f.length+1,0==o),p(g/e)>h-m&&v("overflow"),m+=p(g/e),g%=e,f.splice(g++,0,m)}return _(f)}function w(t){var e,r,i,n,o,s,a,u,c,l,d,y,g,_,T,w=[];for(y=(t=m(t)).length,e=128,r=0,o=72,s=0;s<y;++s)(d=t[s])<128&&w.push(f(d));for(i=n=w.length,n&&w.push("-");i<y;){for(a=h,s=0;s<y;++s)(d=t[s])>=e&&d<a&&(a=d);for(a-e>p((h-r)/(g=i+1))&&v("overflow"),r+=(a-e)*g,e=a,s=0;s<y;++s)if((d=t[s])<e&&++r>h&&v("overflow"),d==e){for(u=r,c=36;!(u<(l=c<=o?1:c>=o+26?26:c-o));c+=36)T=u-l,_=36-l,w.push(f(x(l+T%_,0))),u=p(T/_);w.push(f(x(u,0))),o=b(r,g,i==n),r=0,++i}++r,++e}return w.join("")}a={version:"1.3.2",ucs2:{decode:m,encode:_},decode:T,encode:w,toASCII:function(t){return g(t,(function(t){return c.test(t)?"xn--"+w(t):t}))},toUnicode:function(t){return g(t,(function(t){return u.test(t)?T(t.slice(4).toLowerCase()):t}))}},void 0===(n=function(){return a}.call(e,r,e,t))||(t.exports=n)}()}).call(this,r(91)(t),r(17))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,r){"use strict";t.exports={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"==typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},function(t,e,r){"use strict";e.decode=e.parse=r(94),e.encode=e.stringify=r(95)},function(t,e,r){"use strict";function i(t,e){return Object.prototype.hasOwnProperty.call(t,e)}t.exports=function(t,e,r,o){e=e||"&",r=r||"=";var s={};if("string"!=typeof t||0===t.length)return s;var a=/\+/g;t=t.split(e);var h=1e3;o&&"number"==typeof o.maxKeys&&(h=o.maxKeys);var u=t.length;h>0&&u>h&&(u=h);for(var c=0;c<u;++c){var l,d,p,f,v=t[c].replace(a,"%20"),y=v.indexOf(r);y>=0?(l=v.substr(0,y),d=v.substr(y+1)):(l=v,d=""),p=decodeURIComponent(l),f=decodeURIComponent(d),i(s,p)?n(s[p])?s[p].push(f):s[p]=[s[p],f]:s[p]=f}return s};var n=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},function(t,e,r){"use strict";var i=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};t.exports=function(t,e,r,a){return e=e||"&",r=r||"=",null===t&&(t=void 0),"object"==typeof t?o(s(t),(function(s){var a=encodeURIComponent(i(s))+r;return n(t[s])?o(t[s],(function(t){return a+encodeURIComponent(i(t))})).join(e):a+encodeURIComponent(i(t[s]))})).join(e):a?encodeURIComponent(i(a))+r+encodeURIComponent(i(t)):""};var n=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function o(t,e){if(t.map)return t.map(e);for(var r=[],i=0;i<t.length;i++)r.push(e(t[i],i));return r}var s=Object.keys||function(t){var e=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.push(r);return e}},function(t,e,r){"use strict";var i=r(3),n=r(10).filter,o=r(47),s=r(19),a=o("filter"),h=s("filter");i({target:"Array",proto:!0,forced:!a||!h},{filter:function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,r){var i=r(2),n=r(58),o=i.WeakMap;t.exports="function"==typeof o&&/native code/.test(n(o))},function(t,e,r){var i=r(7),n=r(99),o=r(30),s=r(8);t.exports=function(t,e){for(var r=n(e),a=s.f,h=o.f,u=0;u<r.length;u++){var c=r[u];i(t,c)||a(t,c,h(e,c))}}},function(t,e,r){var i=r(33),n=r(34),o=r(62),s=r(14);t.exports=i("Reflect","ownKeys")||function(t){var e=n.f(s(t)),r=o.f;return r?e.concat(r(t)):e}},function(t,e,r){var i=r(2);t.exports=i},function(t,e,r){var i=r(23);t.exports=Array.isArray||function(t){return"Array"==i(t)}},function(t,e,r){var i=r(66);t.exports=i&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(t,e,r){var i,n,o=r(2),s=r(104),a=o.process,h=a&&a.versions,u=h&&h.v8;u?n=(i=u.split("."))[0]+i[1]:s&&(!(i=s.match(/Edge\/(\d+)/))||i[1]>=74)&&(i=s.match(/Chrome\/(\d+)/))&&(n=i[1]),t.exports=n&&+n},function(t,e,r){var i=r(33);t.exports=i("navigator","userAgent")||""},function(t,e,r){var i=r(5),n=r(8),o=r(14),s=r(69);t.exports=i?Object.defineProperties:function(t,e){o(t);for(var r,i=s(e),a=i.length,h=0;a>h;)n.f(t,r=i[h++],e[r]);return t}},function(t,e,r){var i=r(33);t.exports=i("document","documentElement")},function(t,e,r){"use strict";var i=r(3),n=r(108),o=r(36),s=r(20),a=r(48),h=r(9),u=r(15),c=r(4),l=r(43),d=r(28),p=r(70),f=p.IteratorPrototype,v=p.BUGGY_SAFARI_ITERATORS,y=c("iterator"),g=function(){return this};t.exports=function(t,e,r,c,p,m,_){n(r,e,c);var x,b,T,w=function(t){if(t===p&&A)return A;if(!v&&t in I)return I[t];switch(t){case"keys":case"values":case"entries":return function(){return new r(this,t)}}return function(){return new r(this)}},E=e+" Iterator",S=!1,I=t.prototype,P=I[y]||I["@@iterator"]||p&&I[p],A=!v&&P||w(p),O="Array"==e&&I.entries||P;if(O&&(x=o(O.call(new t)),f!==Object.prototype&&x.next&&(l||o(x)===f||(s?s(x,f):"function"!=typeof x[y]&&h(x,y,g)),a(x,E,!0,!0),l&&(d[E]=g))),"values"==p&&P&&"values"!==P.name&&(S=!0,A=function(){return P.call(this)}),l&&!_||I[y]===A||h(I,y,A),d[e]=A,p)if(b={values:w("values"),keys:m?A:w("keys"),entries:w("entries")},_)for(T in b)!v&&!S&&T in I||u(I,T,b[T]);else i({target:e,proto:!0,forced:v||S},b);return b}},function(t,e,r){"use strict";var i=r(70).IteratorPrototype,n=r(27),o=r(21),s=r(48),a=r(28),h=function(){return this};t.exports=function(t,e,r){var u=e+" Iterator";return t.prototype=n(i,{next:o(1,r)}),s(t,u,!1,!0),a[u]=h,t}},function(t,e,r){var i=r(1);t.exports=!i((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},function(t,e,r){var i=r(11);t.exports=function(t){if(!i(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},function(t,e,r){"use strict";var i=r(3),n=r(26),o=r(12),s=r(1),a=r(37),h=[],u=h.sort,c=s((function(){h.sort(void 0)})),l=s((function(){h.sort(null)})),d=a("sort");i({target:"Array",proto:!0,forced:c||!l||!d},{sort:function(t){return void 0===t?u.call(o(this)):u.call(o(this),n(t))}})},function(t,e,r){"use strict";var i=r(3),n=r(1),o=r(71),s=r(14),a=r(18),h=r(6),u=r(29),c=o.ArrayBuffer,l=o.DataView,d=c.prototype.slice;i({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:n((function(){return!new c(2).slice(1,void 0).byteLength}))},{slice:function(t,e){if(void 0!==d&&void 0===e)return d.call(s(this),t);for(var r=s(this).byteLength,i=a(t,r),n=a(void 0===e?r:e,r),o=new(u(this,c))(h(n-i)),p=new l(this),f=new l(o),v=0;i<n;)f.setUint8(v++,p.getUint8(i++));return o}})},function(t,e,r){var i=r(15);t.exports=function(t,e,r){for(var n in e)i(t,n,e[n],r);return t}},function(t,e){var r=Math.abs,i=Math.pow,n=Math.floor,o=Math.log,s=Math.LN2;t.exports={pack:function(t,e,a){var h,u,c,l=new Array(a),d=8*a-e-1,p=(1<<d)-1,f=p>>1,v=23===e?i(2,-24)-i(2,-77):0,y=t<0||0===t&&1/t<0?1:0,g=0;for((t=r(t))!=t||t===1/0?(u=t!=t?1:0,h=p):(h=n(o(t)/s),t*(c=i(2,-h))<1&&(h--,c*=2),(t+=h+f>=1?v/c:v*i(2,1-f))*c>=2&&(h++,c/=2),h+f>=p?(u=0,h=p):h+f>=1?(u=(t*c-1)*i(2,e),h+=f):(u=t*i(2,f-1)*i(2,e),h=0));e>=8;l[g++]=255&u,u/=256,e-=8);for(h=h<<e|u,d+=e;d>0;l[g++]=255&h,h/=256,d-=8);return l[--g]|=128*y,l},unpack:function(t,e){var r,n=t.length,o=8*n-e-1,s=(1<<o)-1,a=s>>1,h=o-7,u=n-1,c=t[u--],l=127&c;for(c>>=7;h>0;l=256*l+t[u],u--,h-=8);for(r=l&(1<<-h)-1,l>>=-h,h+=e;h>0;r=256*r+t[u],u--,h-=8);if(0===l)l=1-a;else{if(l===s)return r?NaN:c?-1/0:1/0;r+=i(2,e),l-=a}return(c?-1:1)*r*i(2,l-e)}}},function(t,e,r){r(3)({target:"Date",stat:!0},{now:function(){return(new Date).getTime()}})},function(t,e,r){var i=r(15),n=Date.prototype,o=n.toString,s=n.getTime;new Date(NaN)+""!="Invalid Date"&&i(n,"toString",(function(){var t=s.call(this);return t==t?o.call(this):"Invalid Date"}))},function(t,e,r){r(3)({target:"Function",proto:!0},{bind:r(118)})},function(t,e,r){"use strict";var i=r(26),n=r(11),o=[].slice,s={},a=function(t,e,r){if(!(e in s)){for(var i=[],n=0;n<e;n++)i[n]="a["+n+"]";s[e]=Function("C,a","return new C("+i.join(",")+")")}return s[e](t,r)};t.exports=Function.bind||function(t){var e=i(this),r=o.call(arguments,1),s=function(){var i=r.concat(o.call(arguments));return this instanceof s?a(e,i.length,i):e.apply(t,i)};return n(e.prototype)&&(s.prototype=e.prototype),s}},function(t,e,r){var i=r(3),n=r(120);i({target:"Object",stat:!0,forced:Object.assign!==n},{assign:n})},function(t,e,r){"use strict";var i=r(5),n=r(1),o=r(69),s=r(62),a=r(55),h=r(12),u=r(31),c=Object.assign,l=Object.defineProperty;t.exports=!c||n((function(){if(i&&1!==c({b:1},c(l({},"a",{enumerable:!0,get:function(){l(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},r=Symbol();return t[r]=7,"abcdefghijklmnopqrst".split("").forEach((function(t){e[t]=t})),7!=c({},t)[r]||"abcdefghijklmnopqrst"!=o(c({},e)).join("")}))?function(t,e){for(var r=h(t),n=arguments.length,c=1,l=s.f,d=a.f;n>c;)for(var p,f=u(arguments[c++]),v=l?o(f).concat(l(f)):o(f),y=v.length,g=0;y>g;)p=v[g++],i&&!d.call(f,p)||(r[p]=f[p]);return r}:c},function(t,e,r){r(3)({target:"Object",stat:!0,sham:!r(5)},{create:r(27)})},function(t,e,r){var i=r(3),n=r(5);i({target:"Object",stat:!0,forced:!n,sham:!n},{defineProperty:r(8).f})},function(t,e,r){r(3)({target:"Object",stat:!0},{setPrototypeOf:r(20)})},function(t,e,r){var i=r(50),n=r(15),o=r(125);i||n(Object.prototype,"toString",o,{unsafe:!0})},function(t,e,r){"use strict";var i=r(50),n=r(38);t.exports=i?{}.toString:function(){return"[object "+n(this)+"]"}},function(t,e,r){"use strict";var i=r(14);t.exports=function(){var t=i(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,r){"use strict";var i=r(1);function n(t,e){return RegExp(t,e)}e.UNSUPPORTED_Y=i((function(){var t=n("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),e.BROKEN_CARET=i((function(){var t=n("^r","gy");return t.lastIndex=2,null!=t.exec("str")}))},function(t,e,r){"use strict";var i=r(129),n=r(14),o=r(24),s=r(130),a=r(131);i("search",1,(function(t,e,r){return[function(e){var r=o(this),i=null==e?void 0:e[t];return void 0!==i?i.call(e,r):new RegExp(e)[t](String(r))},function(t){var i=r(e,t,this);if(i.done)return i.value;var o=n(t),h=String(this),u=o.lastIndex;s(u,0)||(o.lastIndex=0);var c=a(o,h);return s(o.lastIndex,u)||(o.lastIndex=u),null===c?-1:c.index}]}))},function(t,e,r){"use strict";r(75);var i=r(15),n=r(1),o=r(4),s=r(51),a=r(9),h=o("species"),u=!n((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),c="$0"==="a".replace(/./,"$0"),l=o("replace"),d=!!/./[l]&&""===/./[l]("a","$0"),p=!n((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var r="ab".split(t);return 2!==r.length||"a"!==r[0]||"b"!==r[1]}));t.exports=function(t,e,r,l){var f=o(t),v=!n((function(){var e={};return e[f]=function(){return 7},7!=""[t](e)})),y=v&&!n((function(){var e=!1,r=/a/;return"split"===t&&((r={}).constructor={},r.constructor[h]=function(){return r},r.flags="",r[f]=/./[f]),r.exec=function(){return e=!0,null},r[f](""),!e}));if(!v||!y||"replace"===t&&(!u||!c||d)||"split"===t&&!p){var g=/./[f],m=r(f,""[t],(function(t,e,r,i,n){return e.exec===s?v&&!n?{done:!0,value:g.call(e,r,i)}:{done:!0,value:t.call(r,e,i)}:{done:!1}}),{REPLACE_KEEPS_$0:c,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:d}),_=m[0],x=m[1];i(String.prototype,t,_),i(RegExp.prototype,f,2==e?function(t,e){return x.call(t,this,e)}:function(t){return x.call(t,this)})}l&&a(RegExp.prototype[f],"sham",!0)}},function(t,e){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}},function(t,e,r){var i=r(23),n=r(51);t.exports=function(t,e){var r=t.exec;if("function"==typeof r){var o=r.call(t,e);if("object"!=typeof o)throw TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==i(t))throw TypeError("RegExp#exec called on incompatible receiver");return n.call(t,e)}},function(t,e,r){r(133)("Float32",(function(t){return function(e,r,i){return t(this,e,r,i)}}))},function(t,e,r){"use strict";var i=r(3),n=r(2),o=r(5),s=r(134),a=r(0),h=r(71),u=r(73),c=r(21),l=r(9),d=r(6),p=r(74),f=r(76),v=r(25),y=r(7),g=r(38),m=r(11),_=r(27),x=r(20),b=r(34).f,T=r(137),w=r(10).forEach,E=r(140),S=r(8),I=r(30),P=r(32),A=r(77),O=P.get,C=P.set,M=S.f,R=I.f,D=Math.round,L=n.RangeError,F=h.ArrayBuffer,N=h.DataView,B=a.NATIVE_ARRAY_BUFFER_VIEWS,U=a.TYPED_ARRAY_TAG,k=a.TypedArray,X=a.TypedArrayPrototype,j=a.aTypedArrayConstructor,G=a.isTypedArray,H=function(t,e){for(var r=0,i=e.length,n=new(j(t))(i);i>r;)n[r]=e[r++];return n},z=function(t,e){M(t,e,{get:function(){return O(this)[e]}})},V=function(t){var e;return t instanceof F||"ArrayBuffer"==(e=g(t))||"SharedArrayBuffer"==e},Y=function(t,e){return G(t)&&"symbol"!=typeof e&&e in t&&String(+e)==String(e)},W=function(t,e){return Y(t,e=v(e,!0))?c(2,t[e]):R(t,e)},q=function(t,e,r){return!(Y(t,e=v(e,!0))&&m(r)&&y(r,"value"))||y(r,"get")||y(r,"set")||r.configurable||y(r,"writable")&&!r.writable||y(r,"enumerable")&&!r.enumerable?M(t,e,r):(t[e]=r.value,t)};o?(B||(I.f=W,S.f=q,z(X,"buffer"),z(X,"byteOffset"),z(X,"byteLength"),z(X,"length")),i({target:"Object",stat:!0,forced:!B},{getOwnPropertyDescriptor:W,defineProperty:q}),t.exports=function(t,e,r){var o=t.match(/\d+$/)[0]/8,a=t+(r?"Clamped":"")+"Array",h="get"+t,c="set"+t,v=n[a],y=v,g=y&&y.prototype,S={},I=function(t,e){M(t,e,{get:function(){return function(t,e){var r=O(t);return r.view[h](e*o+r.byteOffset,!0)}(this,e)},set:function(t){return function(t,e,i){var n=O(t);r&&(i=(i=D(i))<0?0:i>255?255:255&i),n.view[c](e*o+n.byteOffset,i,!0)}(this,e,t)},enumerable:!0})};B?s&&(y=e((function(t,e,r,i){return u(t,y,a),A(m(e)?V(e)?void 0!==i?new v(e,f(r,o),i):void 0!==r?new v(e,f(r,o)):new v(e):G(e)?H(y,e):T.call(y,e):new v(p(e)),t,y)})),x&&x(y,k),w(b(v),(function(t){t in y||l(y,t,v[t])})),y.prototype=g):(y=e((function(t,e,r,i){u(t,y,a);var n,s,h,c=0,l=0;if(m(e)){if(!V(e))return G(e)?H(y,e):T.call(y,e);n=e,l=f(r,o);var v=e.byteLength;if(void 0===i){if(v%o)throw L("Wrong length");if((s=v-l)<0)throw L("Wrong length")}else if((s=d(i)*o)+l>v)throw L("Wrong length");h=s/o}else h=p(e),n=new F(s=h*o);for(C(t,{buffer:n,byteOffset:l,byteLength:s,length:h,view:new N(n)});c<h;)I(t,c++)})),x&&x(y,k),g=y.prototype=_(X)),g.constructor!==y&&l(g,"constructor",y),U&&l(g,U,a),S[a]=y,i({global:!0,forced:y!=v,sham:!B},S),"BYTES_PER_ELEMENT"in y||l(y,"BYTES_PER_ELEMENT",o),"BYTES_PER_ELEMENT"in g||l(g,"BYTES_PER_ELEMENT",o),E(a)}):t.exports=function(){}},function(t,e,r){var i=r(2),n=r(1),o=r(135),s=r(0).NATIVE_ARRAY_BUFFER_VIEWS,a=i.ArrayBuffer,h=i.Int8Array;t.exports=!s||!n((function(){h(1)}))||!n((function(){new h(-1)}))||!o((function(t){new h,new h(null),new h(1.5),new h(t)}),!0)||n((function(){return 1!==new h(new a(2),1,void 0).length}))},function(t,e,r){var i=r(4)("iterator"),n=!1;try{var o=0,s={next:function(){return{done:!!o++}},return:function(){n=!0}};s[i]=function(){return this},Array.from(s,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!n)return!1;var r=!1;try{var o={};o[i]=function(){return{next:function(){return{done:r=!0}}}},t(o)}catch(t){}return r}},function(t,e,r){var i=r(16);t.exports=function(t){var e=i(t);if(e<0)throw RangeError("The argument can't be less than 0");return e}},function(t,e,r){var i=r(12),n=r(6),o=r(138),s=r(139),a=r(64),h=r(0).aTypedArrayConstructor;t.exports=function(t){var e,r,u,c,l,d,p=i(t),f=arguments.length,v=f>1?arguments[1]:void 0,y=void 0!==v,g=o(p);if(null!=g&&!s(g))for(d=(l=g.call(p)).next,p=[];!(c=d.call(l)).done;)p.push(c.value);for(y&&f>2&&(v=a(v,arguments[2],2)),r=n(p.length),u=new(h(this))(r),e=0;r>e;e++)u[e]=y?v(p[e],e):p[e];return u}},function(t,e,r){var i=r(38),n=r(28),o=r(4)("iterator");t.exports=function(t){if(null!=t)return t[o]||t["@@iterator"]||n[i(t)]}},function(t,e,r){var i=r(4),n=r(28),o=i("iterator"),s=Array.prototype;t.exports=function(t){return void 0!==t&&(n.Array===t||s[o]===t)}},function(t,e,r){"use strict";var i=r(33),n=r(8),o=r(4),s=r(5),a=o("species");t.exports=function(t){var e=i(t),r=n.f;s&&e&&!e[a]&&r(e,a,{configurable:!0,get:function(){return this}})}},function(t,e,r){"use strict";var i=r(0),n=r(142),o=i.aTypedArray;(0,i.exportTypedArrayMethod)("copyWithin",(function(t,e){return n.call(o(this),t,e,arguments.length>2?arguments[2]:void 0)}))},function(t,e,r){"use strict";var i=r(12),n=r(18),o=r(6),s=Math.min;t.exports=[].copyWithin||function(t,e){var r=i(this),a=o(r.length),h=n(t,a),u=n(e,a),c=arguments.length>2?arguments[2]:void 0,l=s((void 0===c?a:n(c,a))-u,a-h),d=1;for(u<h&&h<u+l&&(d=-1,u+=l-1,h+=l-1);l-- >0;)u in r?r[h]=r[u]:delete r[h],h+=d,u+=d;return r}},function(t,e,r){"use strict";var i=r(0),n=r(10).every,o=i.aTypedArray;(0,i.exportTypedArrayMethod)("every",(function(t){return n(o(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,r){"use strict";var i=r(0),n=r(49),o=i.aTypedArray;(0,i.exportTypedArrayMethod)("fill",(function(t){return n.apply(o(this),arguments)}))},function(t,e,r){"use strict";var i=r(0),n=r(10).filter,o=r(29),s=i.aTypedArray,a=i.aTypedArrayConstructor;(0,i.exportTypedArrayMethod)("filter",(function(t){for(var e=n(s(this),t,arguments.length>1?arguments[1]:void 0),r=o(this,this.constructor),i=0,h=e.length,u=new(a(r))(h);h>i;)u[i]=e[i++];return u}))},function(t,e,r){"use strict";var i=r(0),n=r(10).find,o=i.aTypedArray;(0,i.exportTypedArrayMethod)("find",(function(t){return n(o(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,r){"use strict";var i=r(0),n=r(10).findIndex,o=i.aTypedArray;(0,i.exportTypedArrayMethod)("findIndex",(function(t){return n(o(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,r){"use strict";var i=r(0),n=r(10).forEach,o=i.aTypedArray;(0,i.exportTypedArrayMethod)("forEach",(function(t){n(o(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,r){"use strict";var i=r(0),n=r(35).includes,o=i.aTypedArray;(0,i.exportTypedArrayMethod)("includes",(function(t){return n(o(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,r){"use strict";var i=r(0),n=r(35).indexOf,o=i.aTypedArray;(0,i.exportTypedArrayMethod)("indexOf",(function(t){return n(o(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,r){"use strict";var i=r(2),n=r(0),o=r(67),s=r(4)("iterator"),a=i.Uint8Array,h=o.values,u=o.keys,c=o.entries,l=n.aTypedArray,d=n.exportTypedArrayMethod,p=a&&a.prototype[s],f=!!p&&("values"==p.name||null==p.name),v=function(){return h.call(l(this))};d("entries",(function(){return c.call(l(this))})),d("keys",(function(){return u.call(l(this))})),d("values",v,!f),d(s,v,!f)},function(t,e,r){"use strict";var i=r(0),n=i.aTypedArray,o=i.exportTypedArrayMethod,s=[].join;o("join",(function(t){return s.apply(n(this),arguments)}))},function(t,e,r){"use strict";var i=r(0),n=r(154),o=i.aTypedArray;(0,i.exportTypedArrayMethod)("lastIndexOf",(function(t){return n.apply(o(this),arguments)}))},function(t,e,r){"use strict";var i=r(22),n=r(16),o=r(6),s=r(37),a=r(19),h=Math.min,u=[].lastIndexOf,c=!!u&&1/[1].lastIndexOf(1,-0)<0,l=s("lastIndexOf"),d=a("indexOf",{ACCESSORS:!0,1:0}),p=c||!l||!d;t.exports=p?function(t){if(c)return u.apply(this,arguments)||0;var e=i(this),r=o(e.length),s=r-1;for(arguments.length>1&&(s=h(s,n(arguments[1]))),s<0&&(s=r+s);s>=0;s--)if(s in e&&e[s]===t)return s||0;return-1}:u},function(t,e,r){"use strict";var i=r(0),n=r(10).map,o=r(29),s=i.aTypedArray,a=i.aTypedArrayConstructor;(0,i.exportTypedArrayMethod)("map",(function(t){return n(s(this),t,arguments.length>1?arguments[1]:void 0,(function(t,e){return new(a(o(t,t.constructor)))(e)}))}))},function(t,e,r){"use strict";var i=r(0),n=r(78).left,o=i.aTypedArray;(0,i.exportTypedArrayMethod)("reduce",(function(t){return n(o(this),t,arguments.length,arguments.length>1?arguments[1]:void 0)}))},function(t,e,r){"use strict";var i=r(0),n=r(78).right,o=i.aTypedArray;(0,i.exportTypedArrayMethod)("reduceRight",(function(t){return n(o(this),t,arguments.length,arguments.length>1?arguments[1]:void 0)}))},function(t,e,r){"use strict";var i=r(0),n=i.aTypedArray,o=i.exportTypedArrayMethod,s=Math.floor;o("reverse",(function(){for(var t,e=n(this).length,r=s(e/2),i=0;i<r;)t=this[i],this[i++]=this[--e],this[e]=t;return this}))},function(t,e,r){"use strict";var i=r(0),n=r(6),o=r(76),s=r(12),a=r(1),h=i.aTypedArray;(0,i.exportTypedArrayMethod)("set",(function(t){h(this);var e=o(arguments.length>1?arguments[1]:void 0,1),r=this.length,i=s(t),a=n(i.length),u=0;if(a+e>r)throw RangeError("Wrong length");for(;u<a;)this[e+u]=i[u++]}),a((function(){new Int8Array(1).set({})})))},function(t,e,r){"use strict";var i=r(0),n=r(29),o=r(1),s=i.aTypedArray,a=i.aTypedArrayConstructor,h=i.exportTypedArrayMethod,u=[].slice;h("slice",(function(t,e){for(var r=u.call(s(this),t,e),i=n(this,this.constructor),o=0,h=r.length,c=new(a(i))(h);h>o;)c[o]=r[o++];return c}),o((function(){new Int8Array(1).slice()})))},function(t,e,r){"use strict";var i=r(0),n=r(10).some,o=i.aTypedArray;(0,i.exportTypedArrayMethod)("some",(function(t){return n(o(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,r){"use strict";var i=r(0),n=i.aTypedArray,o=i.exportTypedArrayMethod,s=[].sort;o("sort",(function(t){return s.call(n(this),t)}))},function(t,e,r){"use strict";var i=r(0),n=r(6),o=r(18),s=r(29),a=i.aTypedArray;(0,i.exportTypedArrayMethod)("subarray",(function(t,e){var r=a(this),i=r.length,h=o(t,i);return new(s(r,r.constructor))(r.buffer,r.byteOffset+h*r.BYTES_PER_ELEMENT,n((void 0===e?i:o(e,i))-h))}))},function(t,e,r){"use strict";var i=r(2),n=r(0),o=r(1),s=i.Int8Array,a=n.aTypedArray,h=n.exportTypedArrayMethod,u=[].toLocaleString,c=[].slice,l=!!s&&o((function(){u.call(new s(1))}));h("toLocaleString",(function(){return u.apply(l?c.call(a(this)):a(this),arguments)}),o((function(){return[1,2].toLocaleString()!=new s([1,2]).toLocaleString()}))||!o((function(){s.prototype.toLocaleString.call([1,2])})))},function(t,e,r){"use strict";var i=r(0).exportTypedArrayMethod,n=r(1),o=r(2).Uint8Array,s=o&&o.prototype||{},a=[].toString,h=[].join;n((function(){a.call({})}))&&(a=function(){return h.call(this)});var u=s.toString!=a;i("toString",a,u)},function(t,e){t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(t,e,r){var i=r(24),n=/"/g;t.exports=function(t,e,r,o){var s=String(i(t)),a="<"+e;return""!==r&&(a+=" "+r+'="'+String(o).replace(n,"&quot;")+'"'),a+">"+s+"</"+e+">"}},function(t,e,r){var i=r(1);t.exports=function(t){return i((function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}))}},function(t,e,r){"use strict";var i=r(3),n=r(35).indexOf,o=r(37),s=r(19),a=[].indexOf,h=!!a&&1/[1].indexOf(1,-0)<0,u=o("indexOf"),c=s("indexOf",{ACCESSORS:!0,1:0});i({target:"Array",proto:!0,forced:h||!u||!c},{indexOf:function(t){return h?a.apply(this,arguments)||0:n(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,r){"use strict";var i=r(3),n=r(18),o=r(16),s=r(6),a=r(12),h=r(65),u=r(171),c=r(47),l=r(19),d=c("splice"),p=l("splice",{ACCESSORS:!0,0:0,1:2}),f=Math.max,v=Math.min;i({target:"Array",proto:!0,forced:!d||!p},{splice:function(t,e){var r,i,c,l,d,p,y=a(this),g=s(y.length),m=n(t,g),_=arguments.length;if(0===_?r=i=0:1===_?(r=0,i=g-m):(r=_-2,i=v(f(o(e),0),g-m)),g+r-i>9007199254740991)throw TypeError("Maximum allowed length exceeded");for(c=h(y,i),l=0;l<i;l++)(d=m+l)in y&&u(c,l,y[d]);if(c.length=i,r<i){for(l=m;l<g-i;l++)p=l+r,(d=l+i)in y?y[p]=y[d]:delete y[p];for(l=g;l>g-i+r;l--)delete y[l-1]}else if(r>i)for(l=g-i;l>m;l--)p=l+r-1,(d=l+i-1)in y?y[p]=y[d]:delete y[p];for(l=0;l<r;l++)y[l+m]=arguments[l+2];return y.length=g-i+r,c}})},function(t,e,r){"use strict";var i=r(25),n=r(8),o=r(21);t.exports=function(t,e,r){var s=i(e);s in t?n.f(t,s,o(0,r)):t[s]=r}},function(t,e,r){var i=r(3),n=r(49),o=r(68);i({target:"Array",proto:!0},{fill:n}),o("fill")},function(t,e,r){"use strict";var i=r(5),n=r(2),o=r(63),s=r(15),a=r(7),h=r(23),u=r(77),c=r(25),l=r(1),d=r(27),p=r(34).f,f=r(30).f,v=r(8).f,y=r(174).trim,g=n.Number,m=g.prototype,_="Number"==h(d(m)),x=function(t){var e,r,i,n,o,s,a,h,u=c(t,!1);if("string"==typeof u&&u.length>2)if(43===(e=(u=y(u)).charCodeAt(0))||45===e){if(88===(r=u.charCodeAt(2))||120===r)return NaN}else if(48===e){switch(u.charCodeAt(1)){case 66:case 98:i=2,n=49;break;case 79:case 111:i=8,n=55;break;default:return+u}for(s=(o=u.slice(2)).length,a=0;a<s;a++)if((h=o.charCodeAt(a))<48||h>n)return NaN;return parseInt(o,i)}return+u};if(o("Number",!g(" 0o1")||!g("0b1")||g("+0x1"))){for(var b,T=function(t){var e=arguments.length<1?0:t,r=this;return r instanceof T&&(_?l((function(){m.valueOf.call(r)})):"Number"!=h(r))?u(new g(x(e)),r,T):x(e)},w=i?p(g):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),E=0;w.length>E;E++)a(g,b=w[E])&&!a(T,b)&&v(T,b,f(g,b));T.prototype=m,m.constructor=T,s(n,"Number",T)}},function(t,e,r){var i=r(24),n="["+r(175)+"]",o=RegExp("^"+n+n+"*"),s=RegExp(n+n+"*$"),a=function(t){return function(e){var r=String(i(e));return 1&t&&(r=r.replace(o,"")),2&t&&(r=r.replace(s,"")),r}};t.exports={start:a(1),end:a(2),trim:a(3)}},function(t,e){t.exports="\t\n\v\f\r                　\u2028\u2029\ufeff"},function(t,e,r){"use strict";r.r(e);var i={};r.r(i),r.d(i,"isMobile",(function(){return w})),r.d(i,"EventEmitter",(function(){return X.a})),r.d(i,"earcut",(function(){return G.a})),r.d(i,"url",(function(){return z.a})),r.d(i,"BaseTextureCache",(function(){return xt})),r.d(i,"CanvasRenderTarget",(function(){return wt})),r.d(i,"DATA_URI",(function(){return It})),r.d(i,"ProgramCache",(function(){return mt})),r.d(i,"TextureCache",(function(){return _t})),r.d(i,"clearTextureCache",(function(){return Tt})),r.d(i,"correctBlendMode",(function(){return et})),r.d(i,"createIndicesForQuads",(function(){return ot})),r.d(i,"decomposeDataUri",(function(){return Pt})),r.d(i,"deprecation",(function(){return gt})),r.d(i,"destroyTextureCache",(function(){return bt})),r.d(i,"determineCrossOrigin",(function(){return At})),r.d(i,"getBufferType",(function(){return st})),r.d(i,"getResolutionOfUrl",(function(){return Ot})),r.d(i,"hex2rgb",(function(){return K})),r.d(i,"hex2string",(function(){return J})),r.d(i,"interleaveTypedArrays",(function(){return ht})),r.d(i,"isPow2",(function(){return ct})),r.d(i,"isWebGLSupported",(function(){return Z})),r.d(i,"log2",(function(){return lt})),r.d(i,"nextPow2",(function(){return ut})),r.d(i,"premultiplyBlendMode",(function(){return tt})),r.d(i,"premultiplyRgba",(function(){return rt})),r.d(i,"premultiplyTint",(function(){return it})),r.d(i,"premultiplyTintToRgba",(function(){return nt})),r.d(i,"removeItems",(function(){return dt})),r.d(i,"rgb2hex",(function(){return Q})),r.d(i,"sayHello",(function(){return q})),r.d(i,"sign",(function(){return pt})),r.d(i,"skipHello",(function(){return W})),r.d(i,"string2hex",(function(){return $})),r.d(i,"trimCanvas",(function(){return Et})),r.d(i,"uid",(function(){return vt}));var n={};r.r(n),r.d(n,"AccessibilityManager",(function(){return ie})),r.d(n,"accessibleTarget",(function(){return ee}));var o={};r.r(o),r.d(o,"InteractionData",(function(){return ae})),r.d(o,"InteractionEvent",(function(){return ue})),r.d(o,"InteractionManager",(function(){return ve})),r.d(o,"InteractionTrackingData",(function(){return ce})),r.d(o,"interactiveTarget",(function(){return pe}));var s={};r.r(s),r.d(s,"accessibility",(function(){return n})),r.d(s,"interaction",(function(){return o})),r.d(s,"utils",(function(){return i})),r.d(s,"Application",(function(){return Ai})),r.d(s,"AbstractBatchRenderer",(function(){return xi})),r.d(s,"AbstractRenderer",(function(){return ci})),r.d(s,"Attribute",(function(){return ze})),r.d(s,"BaseRenderTexture",(function(){return Be})),r.d(s,"BaseTexture",(function(){return Se})),r.d(s,"BatchDrawCall",(function(){return yi})),r.d(s,"BatchGeometry",(function(){return Ti})),r.d(s,"BatchPluginFactory",(function(){return Si})),r.d(s,"BatchRenderer",(function(){return Pi})),r.d(s,"BatchShaderGenerator",(function(){return bi})),r.d(s,"BatchTextureArray",(function(){return gi})),r.d(s,"Buffer",(function(){return Ye})),r.d(s,"CubeTexture",(function(){return vi})),r.d(s,"Filter",(function(){return Gr})),r.d(s,"Framebuffer",(function(){return Fe})),r.d(s,"GLProgram",(function(){return ti})),r.d(s,"GLTexture",(function(){return si})),r.d(s,"Geometry",(function(){return $e})),r.d(s,"MaskData",(function(){return pr})),r.d(s,"ObjectRenderer",(function(){return or})),r.d(s,"Program",(function(){return Nr})),r.d(s,"Quad",(function(){return Qe})),r.d(s,"QuadUv",(function(){return tr})),r.d(s,"RenderTexture",(function(){return Ge})),r.d(s,"RenderTexturePool",(function(){return He})),r.d(s,"Renderer",(function(){return li})),r.d(s,"Shader",(function(){return Ur})),r.d(s,"SpriteMaskFilter",(function(){return Yr})),r.d(s,"State",(function(){return Xr})),r.d(s,"System",(function(){return De})),r.d(s,"Texture",(function(){return Xe})),r.d(s,"TextureMatrix",(function(){return zr})),r.d(s,"TextureUvs",(function(){return Ue})),r.d(s,"UniformGroup",(function(){return rr})),r.d(s,"ViewableBuffer",(function(){return mi})),r.d(s,"autoDetectRenderer",(function(){return di})),r.d(s,"checkMaxIfStatementsInShader",(function(){return Rr})),r.d(s,"defaultFilterVertex",(function(){return fi})),r.d(s,"defaultVertex",(function(){return pi})),r.d(s,"resources",(function(){return Re})),r.d(s,"systems",(function(){return hi})),r.d(s,"Extract",(function(){return Ri})),r.d(s,"AppLoaderPlugin",(function(){return rn})),r.d(s,"Loader",(function(){return en})),r.d(s,"LoaderResource",(function(){return nn})),r.d(s,"TextureLoader",(function(){return tn})),r.d(s,"ParticleContainer",(function(){return on})),r.d(s,"ParticleRenderer",(function(){return an})),r.d(s,"BasePrepare",(function(){return Kn})),r.d(s,"CountLimiter",(function(){return Zn})),r.d(s,"Prepare",(function(){return no})),r.d(s,"TimeLimiter",(function(){return ho})),r.d(s,"Spritesheet",(function(){return uo})),r.d(s,"SpritesheetLoader",(function(){return lo})),r.d(s,"TilingSprite",(function(){return fo})),r.d(s,"TilingSpriteRenderer",(function(){return go})),r.d(s,"BitmapFontLoader",(function(){return _o})),r.d(s,"BitmapText",(function(){return mo})),r.d(s,"Ticker",(function(){return oe})),r.d(s,"TickerPlugin",(function(){return se})),r.d(s,"UPDATE_PRIORITY",(function(){return re})),r.d(s,"ALPHA_MODES",(function(){return L})),r.d(s,"BLEND_MODES",(function(){return I})),r.d(s,"DRAW_MODES",(function(){return P})),r.d(s,"ENV",(function(){return E})),r.d(s,"FORMATS",(function(){return A})),r.d(s,"GC_MODES",(function(){return F})),r.d(s,"MASK_TYPES",(function(){return B})),r.d(s,"MIPMAP_MODES",(function(){return D})),r.d(s,"PRECISION",(function(){return N})),r.d(s,"RENDERER_TYPE",(function(){return S})),r.d(s,"SCALE_MODES",(function(){return M})),r.d(s,"TARGETS",(function(){return O})),r.d(s,"TYPES",(function(){return C})),r.d(s,"WRAP_MODES",(function(){return R})),r.d(s,"Bounds",(function(){return Jt})),r.d(s,"Container",(function(){return te})),r.d(s,"DisplayObject",(function(){return $t})),r.d(s,"FillStyle",(function(){return un})),r.d(s,"GRAPHICS_CURVES",(function(){return hn})),r.d(s,"Graphics",(function(){return Dn})),r.d(s,"GraphicsData",(function(){return In})),r.d(s,"GraphicsGeometry",(function(){return On})),r.d(s,"LineStyle",(function(){return Cn})),r.d(s,"graphicsUtils",(function(){return Sn})),r.d(s,"Circle",(function(){return Wt})),r.d(s,"DEG_TO_RAD",(function(){return Ft})),r.d(s,"Ellipse",(function(){return qt})),r.d(s,"Matrix",(function(){return Nt})),r.d(s,"ObservablePoint",(function(){return Rt})),r.d(s,"PI_2",(function(){return Dt})),r.d(s,"Point",(function(){return Mt})),r.d(s,"Polygon",(function(){return Zt})),r.d(s,"RAD_TO_DEG",(function(){return Lt})),r.d(s,"Rectangle",(function(){return Yt})),r.d(s,"RoundedRectangle",(function(){return Kt})),r.d(s,"SHAPES",(function(){return Ct})),r.d(s,"Transform",(function(){return Vt})),r.d(s,"groupD8",(function(){return zt})),r.d(s,"Mesh",(function(){return Lo})),r.d(s,"MeshBatchUvs",(function(){return Mo})),r.d(s,"MeshGeometry",(function(){return No})),r.d(s,"MeshMaterial",(function(){return Fo})),r.d(s,"NineSlicePlane",(function(){return Go})),r.d(s,"PlaneGeometry",(function(){return Bo})),r.d(s,"RopeGeometry",(function(){return Uo})),r.d(s,"SimpleMesh",(function(){return jo})),r.d(s,"SimplePlane",(function(){return Xo})),r.d(s,"SimpleRope",(function(){return ko})),r.d(s,"Runner",(function(){return ye})),r.d(s,"Sprite",(function(){return Nn})),r.d(s,"AnimatedSprite",(function(){return Ho})),r.d(s,"TEXT_GRADIENT",(function(){return Bn})),r.d(s,"Text",(function(){return qn})),r.d(s,"TextMetrics",(function(){return Vn})),r.d(s,"TextStyle",(function(){return Xn})),r.d(s,"isMobile",(function(){return w})),r.d(s,"settings",(function(){return U})),r.d(s,"VERSION",(function(){return Yo})),r.d(s,"filters",(function(){return Wo})),r.d(s,"useDeprecated",(function(){return Vo}));r(86);var a=/iPhone/i,h=/iPod/i,u=/iPad/i,c=/\biOS-universal(?:.+)Mac\b/i,l=/\bAndroid(?:.+)Mobile\b/i,d=/Android/i,p=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,f=/Silk/i,v=/Windows Phone/i,y=/\bWindows(?:.+)ARM\b/i,g=/BlackBerry/i,m=/BB10/i,_=/Opera Mini/i,x=/\b(CriOS|Chrome)(?:.+)Mobile/i,b=/Mobile(?:.+)Firefox\b/i,T=function(t){return void 0!==t&&"MacIntel"===t.platform&&"number"==typeof t.maxTouchPoints&&t.maxTouchPoints>1&&"undefined"==typeof MSStream};
  /*!
   * @pixi/settings - v5.2.3
   * Compiled Fri, 24 Apr 2020 00:55:22 UTC
   *
   * @pixi/settings is licensed under the MIT License.
   * http://www.opensource.org/licenses/mit-license
   */
  var w=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(a)&&!n(v),ipod:n(h),tablet:!n(a)&&(n(u)||T(e))&&!n(v),universal:n(c),device:(n(a)||n(h)||n(u)||n(c)||T(e))&&!n(v)},amazon:{phone:n(p),tablet:!n(p)&&n(f),device:n(p)||n(f)},android:{phone:!n(v)&&n(p)||!n(v)&&n(l),tablet:!n(v)&&!n(p)&&!n(l)&&(n(f)||n(d)),device:!n(v)&&(n(p)||n(f)||n(l)||n(d))||n(/\bokhttp\b/i)},windows:{phone:n(v),tablet:n(y),device:n(v)||n(y)},other:{blackberry:n(g),blackberry10:n(m),opera:n(_),firefox:n(b),chrome:n(x),device:n(g)||n(m)||n(_)||n(b)||n(x)},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);var E,S,I,P,A,O,C,M,R,D,L,F,N,B,U={MIPMAP_TEXTURES:1,ANISOTROPIC_LEVEL:0,RESOLUTION:1,FILTER_RESOLUTION:1,SPRITE_MAX_TEXTURES:function(t){var e=!0;if(w.tablet||w.phone){if(e=!1,w.apple.device){var r=navigator.userAgent.match(/OS (\d+)_(\d+)?/);if(r)parseInt(r[1],10)>=11&&(e=!0)}if(w.android.device){var i=navigator.userAgent.match(/Android\s([0-9.]*)/);if(i)parseInt(i[1],10)>=7&&(e=!0)}}return e?t:4}(32),SPRITE_BATCH_SIZE:4096,RENDER_OPTIONS:{view:null,antialias:!1,forceFXAA:!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:w.apple.device?"highp":"mediump",CAN_UPLOAD_SAME_BUFFER:!w.apple.device,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1},k=r(53),X=r.n(k),j=r(54),G=r.n(j),H=r(40),z=r.n(H);!function(t){t[t.WEBGL_LEGACY=0]="WEBGL_LEGACY",t[t.WEBGL=1]="WEBGL",t[t.WEBGL2=2]="WEBGL2"}(E||(E={})),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.WEBGL=1]="WEBGL",t[t.CANVAS=2]="CANVAS"}(S||(S={})),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"}(I||(I={})),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"}(P||(P={})),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"}(A||(A={})),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"}(O||(O={})),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"}(C||(C={})),function(t){t[t.NEAREST=0]="NEAREST",t[t.LINEAR=1]="LINEAR"}(M||(M={})),function(t){t[t.CLAMP=33071]="CLAMP",t[t.REPEAT=10497]="REPEAT",t[t.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"}(R||(R={})),function(t){t[t.OFF=0]="OFF",t[t.POW2=1]="POW2",t[t.ON=2]="ON"}(D||(D={})),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"}(L||(L={})),function(t){t[t.AUTO=0]="AUTO",t[t.MANUAL=1]="MANUAL"}(F||(F={})),function(t){t.LOW="lowp",t.MEDIUM="mediump",t.HIGH="highp"}(N||(N={})),function(t){t[t.NONE=0]="NONE",t[t.SCISSOR=1]="SCISSOR",t[t.STENCIL=2]="STENCIL",t[t.SPRITE=3]="SPRITE"}(B||(B={})),
  /*!
   * @pixi/utils - v5.2.3
   * Compiled Fri, 24 Apr 2020 00:55:22 UTC
   *
   * @pixi/utils is licensed under the MIT License.
   * http://www.opensource.org/licenses/mit-license
   */
  U.RETINA_PREFIX=/@([0-9\.]+)x/,U.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!0;var V,Y=!1;function W(){Y=!0}function q(t){var e;if(!Y){if(navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var r=["\n %c %c %c PixiJS 5.2.3 - ✰ "+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 5.2.3 - "+t+" - http://www.pixijs.com/");Y=!0}}function Z(){return void 0===V&&(V=function(){var t={stencil:!0,failIfMajorPerformanceCaveat:U.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}}()),V}function K(t,e){return(e=e||[])[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255,e}function J(t){var e=t.toString(16);return"#"+(e="000000".substr(0,6-e.length)+e)}function $(t){return"string"==typeof t&&"#"===t[0]&&(t=t.substr(1)),parseInt(t,16)}function Q(t){return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)}var tt=function(){for(var t=[],e=[],r=0;r<32;r++)t[r]=r,e[r]=r;t[I.NORMAL_NPM]=I.NORMAL,t[I.ADD_NPM]=I.ADD,t[I.SCREEN_NPM]=I.SCREEN,e[I.NORMAL]=I.NORMAL_NPM,e[I.ADD]=I.ADD_NPM,e[I.SCREEN]=I.SCREEN_NPM;var i=[];return i.push(e),i.push(t),i}();function et(t,e){return tt[e?1:0][t]}function rt(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 it(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=n*e+.5|0)}function nt(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 ot(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<r;i+=6,n+=4)e[i+0]=n+0,e[i+1]=n+1,e[i+2]=n+2,e[i+3]=n+0,e[i+4]=n+2,e[i+5]=n+3;return e}function st(t){if(4===t.BYTES_PER_ELEMENT)return t instanceof Float32Array?"Float32Array":t instanceof Uint32Array?"Uint32Array":"Int32Array";if(2===t.BYTES_PER_ELEMENT){if(t instanceof Uint16Array)return"Uint16Array"}else if(1===t.BYTES_PER_ELEMENT&&t instanceof Uint8Array)return"Uint8Array";return null}var at={Float32Array:Float32Array,Uint32Array:Uint32Array,Int32Array:Int32Array,Uint8Array:Uint8Array};function ht(t,e){for(var r=0,i=0,n={},o=0;o<t.length;o++)i+=e[o],r+=t[o].length;var s=new ArrayBuffer(4*r),a=null,h=0;for(o=0;o<t.length;o++){var u=e[o],c=t[o],l=st(c);n[l]||(n[l]=new at[l](s)),a=n[l];for(var d=0;d<c.length;d++){a[(d/u|0)*i+h+d%u]=c[d]}h+=u}return new Float32Array(s)}function ut(t){return t+=0===t?1:0,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)+1}function ct(t){return!(t&t-1||!t)}function lt(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 dt(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<o;++i)t[i]=t[i+r];t.length=o}}function pt(t){return 0===t?0:t<0?-1:1}var ft=0;function vt(){return++ft}var yt={};function gt(t,e,r){if(void 0===r&&(r=3),!yt[e]){var i=(new Error).stack;void 0===i?console.warn("PixiJS Deprecation Warning: ",e+"\nDeprecated since v"+t):(i=i.split("\n").splice(r).join("\n"),console.groupCollapsed?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",e+"\nDeprecated since v"+t),console.warn(i),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",e+"\nDeprecated since v"+t),console.warn(i))),yt[e]=!0}}var mt={},_t=Object.create(null),xt=Object.create(null);function bt(){var t;for(t in _t)_t[t].destroy();for(t in xt)xt[t].destroy()}function Tt(){var t;for(t in _t)delete _t[t];for(t in xt)delete xt[t]}var wt=function(){function t(t,e,r){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),this.resolution=r||U.RESOLUTION,this.resize(t,e)}return t.prototype.clear=function(){this.context.setTransform(1,0,0,1,0,0),this.context.clearRect(0,0,this.canvas.width,this.canvas.height)},t.prototype.resize=function(t,e){this.canvas.width=t*this.resolution,this.canvas.height=e*this.resolution},t.prototype.destroy=function(){this.context=null,this.canvas=null},Object.defineProperty(t.prototype,"width",{get:function(){return this.canvas.width},set:function(t){this.canvas.width=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.canvas.height},set:function(t){this.canvas.height=t},enumerable:!0,configurable:!0}),t}();function Et(t){var e,r,i,n=t.width,o=t.height,s=t.getContext("2d"),a=s.getImageData(0,0,n,o).data,h=a.length,u={top:null,left:null,right:null,bottom:null},c=null;for(e=0;e<h;e+=4)0!==a[e+3]&&(r=e/4%n,i=~~(e/4/n),null===u.top&&(u.top=i),null===u.left?u.left=r:r<u.left&&(u.left=r),null===u.right?u.right=r+1:u.right<r&&(u.right=r+1),null===u.bottom?u.bottom=i:u.bottom<i&&(u.bottom=i));return null!==u.top&&(n=u.right-u.left,o=u.bottom-u.top+1,c=s.getImageData(u.left,u.top,n,o)),{height:o,width:n,data:c}}var St,It=/^\s*data:(?:([\w-]+)\/([\w+.-]+))?(?:;charset=([\w-]+))?(?:;(base64))?,(.*)/i;function Pt(t){var e=It.exec(t);if(e)return{mediaType:e[1]?e[1].toLowerCase():void 0,subType:e[2]?e[2].toLowerCase():void 0,charset:e[3]?e[3].toLowerCase():void 0,encoding:e[4]?e[4].toLowerCase():void 0,data:e[5]}}function At(t,e){if(void 0===e&&(e=window.location),0===t.indexOf("data:"))return"";e=e||window.location,St||(St=document.createElement("a")),St.href=t;var r=Object(H.parse)(St.href),i=!r.port&&""===e.port||r.port===e.port;return r.hostname===e.hostname&&i&&r.protocol===e.protocol?"":"anonymous"}function Ot(t,e){var r=U.RETINA_PREFIX.exec(t);return r?parseFloat(r[1]):void 0!==e?e:1}
  /*!
   * @pixi/math - v5.2.3
   * Compiled Fri, 24 Apr 2020 00:55:22 UTC
   *
   * @pixi/math is licensed under the MIT License.
   * http://www.opensource.org/licenses/mit-license
   */var Ct,Mt=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}(),Rt=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:!0,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:!0,configurable:!0}),t}(),Dt=2*Math.PI,Lt=180/Math.PI,Ft=Math.PI/180;!function(t){t[t.POLY=0]="POLY",t[t.RECT=1]="RECT",t[t.CIRC=2]="CIRC",t[t.ELIP=3]="ELIP",t[t.RREC=4]="RREC"}(Ct||(Ct={}));var Nt=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 Mt;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 Mt;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(Dt-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:!0,configurable:!0}),Object.defineProperty(t,"TEMP_MATRIX",{get:function(){return new t},enumerable:!0,configurable:!0}),t}(),Bt=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],Ut=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],kt=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],Xt=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],jt=[],Gt=[],Ht=Math.sign;!function(){for(var t=0;t<16;t++){var e=[];jt.push(e);for(var r=0;r<16;r++)for(var i=Ht(Bt[t]*Bt[r]+kt[t]*Ut[r]),n=Ht(Ut[t]*Bt[r]+Xt[t]*Ut[r]),o=Ht(Bt[t]*kt[r]+kt[t]*Xt[r]),s=Ht(Ut[t]*kt[r]+Xt[t]*Xt[r]),a=0;a<16;a++)if(Bt[a]===i&&Ut[a]===n&&kt[a]===o&&Xt[a]===s){e.push(a);break}}for(t=0;t<16;t++){var h=new Nt;h.set(Bt[t],Ut[t],kt[t],Xt[t],0,0),Gt.push(h)}}();var zt={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 Bt[t]},uY:function(t){return Ut[t]},vX:function(t){return kt[t]},vY:function(t){return Xt[t]},inv:function(t){return 8&t?15&t:7&-t},add:function(t,e){return jt[t][e]},sub:function(t,e){return jt[t][zt.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?zt.S:zt.N:2*Math.abs(e)<=Math.abs(t)?t>0?zt.E:zt.W:e>0?t>0?zt.SE:zt.SW:t>0?zt.NE:zt.NW},matrixAppendRotationInv:function(t,e,r,i){void 0===r&&(r=0),void 0===i&&(i=0);var n=Gt[zt.inv(e)];n.tx=r,n.ty=i,t.append(n)}},Vt=function(){function t(){this.worldTransform=new Nt,this.localTransform=new Nt,this.position=new Rt(this.onChange,this,0,0),this.scale=new Rt(this.onChange,this,1,1),this.pivot=new Rt(this.onChange,this,0,0),this.skew=new Rt(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:!0,configurable:!0}),t.IDENTITY=new t,t}(),Yt=function(){function t(t,e,r,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===r&&(r=0),void 0===i&&(i=0),this.x=Number(t),this.y=Number(e),this.width=Number(r),this.height=Number(i),this.type=Ct.RECT}return Object.defineProperty(t.prototype,"left",{get:function(){return this.x},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return this.x+this.width},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return this.y},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!0,configurable:!0}),Object.defineProperty(t,"EMPTY",{get:function(){return new t(0,0,0,0)},enumerable:!0,configurable:!0}),t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copyFrom=function(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this},t.prototype.copyTo=function(t){return t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t},t.prototype.contains=function(t,e){return!(this.width<=0||this.height<=0)&&(t>=this.x&&t<this.x+this.width&&e>=this.y&&e<this.y+this.height)},t.prototype.pad=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.x-=t,this.y-=e,this.width+=2*t,this.height+=2*e,this},t.prototype.fit=function(t){var e=Math.max(this.x,t.x),r=Math.min(this.x+this.width,t.x+t.width),i=Math.max(this.y,t.y),n=Math.min(this.y+this.height,t.y+t.height);return this.x=e,this.width=Math.max(r-e,0),this.y=i,this.height=Math.max(n-i,0),this},t.prototype.ceil=function(t,e){void 0===t&&(t=1),void 0===e&&(e=.001);var r=Math.ceil((this.x+this.width-e)*t)/t,i=Math.ceil((this.y+this.height-e)*t)/t;return this.x=Math.floor((this.x+e)*t)/t,this.y=Math.floor((this.y+e)*t)/t,this.width=r-this.x,this.height=i-this.y,this},t.prototype.enlarge=function(t){var e=Math.min(this.x,t.x),r=Math.max(this.x+this.width,t.x+t.width),i=Math.min(this.y,t.y),n=Math.max(this.y+this.height,t.y+t.height);return this.x=e,this.width=r-e,this.y=i,this.height=n-i,this},t}(),Wt=function(){function t(t,e,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===r&&(r=0),this.x=t,this.y=e,this.radius=r,this.type=Ct.CIRC}return t.prototype.clone=function(){return new t(this.x,this.y,this.radius)},t.prototype.contains=function(t,e){if(this.radius<=0)return!1;var r=this.radius*this.radius,i=this.x-t,n=this.y-e;return(i*=i)+(n*=n)<=r},t.prototype.getBounds=function(){return new Yt(this.x-this.radius,this.y-this.radius,2*this.radius,2*this.radius)},t}(),qt=function(){function t(t,e,r,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===r&&(r=0),void 0===i&&(i=0),this.x=t,this.y=e,this.width=r,this.height=i,this.type=Ct.ELIP}return t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.contains=function(t,e){if(this.width<=0||this.height<=0)return!1;var r=(t-this.x)/this.width,i=(e-this.y)/this.height;return(r*=r)+(i*=i)<=1},t.prototype.getBounds=function(){return new Yt(this.x-this.width,this.y-this.height,this.width,this.height)},t}(),Zt=function(){function t(){for(var t=arguments,e=[],r=0;r<arguments.length;r++)e[r]=t[r];if(Array.isArray(e[0])&&(e=e[0]),e[0]instanceof Mt){for(var i=[],n=0,o=(e=e).length;n<o;n++)i.push(e[n].x,e[n].y);e=i}this.points=e,this.type=Ct.POLY,this.closeStroke=!0}return t.prototype.clone=function(){var e=new t(this.points.slice());return e.closeStroke=this.closeStroke,e},t.prototype.contains=function(t,e){for(var r=!1,i=this.points.length/2,n=0,o=i-1;n<i;o=n++){var s=this.points[2*n],a=this.points[2*n+1],h=this.points[2*o],u=this.points[2*o+1];a>e!=u>e&&t<(e-a)/(u-a)*(h-s)+s&&(r=!r)}return r},t}(),Kt=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=Ct.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}();
  /*!
   * @pixi/display - v5.2.3
   * Compiled Fri, 24 Apr 2020 00:55:22 UTC
   *
   * @pixi/display is licensed under the MIT License.
   * http://www.opensource.org/licenses/mit-license
   */
  U.SORTABLE_CHILDREN=!1;var Jt=function(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null};Jt.prototype.isEmpty=function(){return this.minX>this.maxX||this.minY>this.maxY},Jt.prototype.clear=function(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0},Jt.prototype.getRectangle=function(t){return this.minX>this.maxX||this.minY>this.maxY?Yt.EMPTY:((t=t||new Yt(0,0,1,1)).x=this.minX,t.y=this.minY,t.width=this.maxX-this.minX,t.height=this.maxY-this.minY,t)},Jt.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)},Jt.prototype.addQuad=function(t){var e=this.minX,r=this.minY,i=this.maxX,n=this.maxY,o=t[0],s=t[1];e=o<e?o:e,r=s<r?s:r,i=o>i?o:i,n=s>n?s:n,e=(o=t[2])<e?o:e,r=(s=t[3])<r?s:r,i=o>i?o:i,n=s>n?s:n,e=(o=t[4])<e?o:e,r=(s=t[5])<r?s:r,i=o>i?o:i,n=s>n?s:n,e=(o=t[6])<e?o:e,r=(s=t[7])<r?s:r,i=o>i?o:i,n=s>n?s:n,this.minX=e,this.minY=r,this.maxX=i,this.maxY=n},Jt.prototype.addFrame=function(t,e,r,i,n){this.addFrameMatrix(t.worldTransform,e,r,i,n)},Jt.prototype.addFrameMatrix=function(t,e,r,i,n){var o=t.a,s=t.b,a=t.c,h=t.d,u=t.tx,c=t.ty,l=this.minX,d=this.minY,p=this.maxX,f=this.maxY,v=o*e+a*r+u,y=s*e+h*r+c;l=v<l?v:l,d=y<d?y:d,p=v>p?v:p,f=y>f?y:f,l=(v=o*i+a*r+u)<l?v:l,d=(y=s*i+h*r+c)<d?y:d,p=v>p?v:p,f=y>f?y:f,l=(v=o*e+a*n+u)<l?v:l,d=(y=s*e+h*n+c)<d?y:d,p=v>p?v:p,f=y>f?y:f,l=(v=o*i+a*n+u)<l?v:l,d=(y=s*i+h*n+c)<d?y:d,p=v>p?v:p,f=y>f?y:f,this.minX=l,this.minY=d,this.maxX=p,this.maxY=f},Jt.prototype.addVertexData=function(t,e,r){for(var i=this.minX,n=this.minY,o=this.maxX,s=this.maxY,a=e;a<r;a+=2){var h=t[a],u=t[a+1];i=h<i?h:i,n=u<n?u:n,o=h>o?h:o,s=u>s?u:s}this.minX=i,this.minY=n,this.maxX=o,this.maxY=s},Jt.prototype.addVertices=function(t,e,r,i){this.addVerticesMatrix(t.worldTransform,e,r,i)},Jt.prototype.addVerticesMatrix=function(t,e,r,i,n,o){var s=t.a,a=t.b,h=t.c,u=t.d,c=t.tx,l=t.ty;n=n||0,o=o||0;for(var d=this.minX,p=this.minY,f=this.maxX,v=this.maxY,y=r;y<i;y+=2){var g=e[y],m=e[y+1],_=s*g+h*m+c,x=u*m+a*g+l;d=Math.min(d,_-n),f=Math.max(f,_+n),p=Math.min(p,x-o),v=Math.max(v,x+o)}this.minX=d,this.minY=p,this.maxX=f,this.maxY=v},Jt.prototype.addBounds=function(t){var e=this.minX,r=this.minY,i=this.maxX,n=this.maxY;this.minX=t.minX<e?t.minX:e,this.minY=t.minY<r?t.minY:r,this.maxX=t.maxX>i?t.maxX:i,this.maxY=t.maxY>n?t.maxY:n},Jt.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.maxX<e.maxX?t.maxX:e.maxX,o=t.maxY<e.maxY?t.maxY:e.maxY;if(r<=n&&i<=o){var s=this.minX,a=this.minY,h=this.maxX,u=this.maxY;this.minX=r<s?r:s,this.minY=i<a?i:a,this.maxX=n>h?n:h,this.maxY=o>u?o:u}},Jt.prototype.addBoundsMatrix=function(t,e){this.addFrameMatrix(e,t.minX,t.minY,t.maxX,t.maxY)},Jt.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.maxX<e.x+e.width?t.maxX:e.x+e.width,o=t.maxY<e.y+e.height?t.maxY:e.y+e.height;if(r<=n&&i<=o){var s=this.minX,a=this.minY,h=this.maxX,u=this.maxY;this.minX=r<s?r:s,this.minY=i<a?i:a,this.maxX=n>h?n:h,this.maxY=o>u?o:u}},Jt.prototype.pad=function(t,e){t=t||0,e=e||(0!==e?t:0),this.isEmpty()||(this.minX-=t,this.maxX+=t,this.minY-=e,this.maxY+=e)},Jt.prototype.addFramePad=function(t,e,r,i,n,o){t-=n,e-=o,r+=n,i+=o,this.minX=this.minX<t?this.minX:t,this.maxX=this.maxX>r?this.maxX:r,this.minY=this.minY<e?this.minY:e,this.maxY=this.maxY>i?this.maxY:i};var $t=function(t){function e(){t.call(this),this.tempDisplayObjectParent=null,this.transform=new Vt,this.alpha=1,this.visible=!0,this.renderable=!0,this.parent=null,this.worldAlpha=1,this._lastSortedIndex=0,this._zIndex=0,this.filterArea=null,this.filters=null,this._enabledFilters=null,this._bounds=new Jt,this._boundsID=0,this._lastBoundsID=-1,this._boundsRect=null,this._localBoundsRect=null,this._mask=null,this._destroyed=!1,this.isSprite=!1,this.isMask=!1}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={_tempDisplayObjectParent:{configurable:!0},x:{configurable:!0},y:{configurable:!0},worldTransform:{configurable:!0},localTransform:{configurable:!0},position:{configurable:!0},scale:{configurable:!0},pivot:{configurable:!0},skew:{configurable:!0},rotation:{configurable:!0},angle:{configurable:!0},zIndex:{configurable:!0},worldVisible:{configurable:!0},mask:{configurable:!0}};return e.mixin=function(t){for(var r=Object.keys(t),i=0;i<r.length;++i){var n=r[i];Object.defineProperty(e.prototype,n,Object.getOwnPropertyDescriptor(t,n))}},r._tempDisplayObjectParent.get=function(){return null===this.tempDisplayObjectParent&&(this.tempDisplayObjectParent=new e),this.tempDisplayObjectParent},e.prototype.updateTransform=function(){this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha},e.prototype.calculateBounds=function(){},e.prototype._recursivePostUpdateTransform=function(){this.parent?(this.parent._recursivePostUpdateTransform(),this.transform.updateTransform(this.parent.transform)):this.transform.updateTransform(this._tempDisplayObjectParent.transform)},e.prototype.getBounds=function(t,e){return t||(this.parent?(this._recursivePostUpdateTransform(),this.updateTransform()):(this.parent=this._tempDisplayObjectParent,this.updateTransform(),this.parent=null)),this._boundsID!==this._lastBoundsID&&(this.calculateBounds(),this._lastBoundsID=this._boundsID),e||(this._boundsRect||(this._boundsRect=new Yt),e=this._boundsRect),this._bounds.getRectangle(e)},e.prototype.getLocalBounds=function(t){var e=this.transform,r=this.parent;this.parent=null,this.transform=this._tempDisplayObjectParent.transform,t||(this._localBoundsRect||(this._localBoundsRect=new Yt),t=this._localBoundsRect);var i=this.getBounds(!1,t);return this.parent=r,this.transform=e,i},e.prototype.toGlobal=function(t,e,r){return void 0===r&&(r=!1),r||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.apply(t,e)},e.prototype.toLocal=function(t,e,r,i){return e&&(t=e.toGlobal(t,r,i)),i||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.applyInverse(t,r)},e.prototype.render=function(t){},e.prototype.setParent=function(t){if(!t||!t.addChild)throw new Error("setParent: Argument must be a Container");return t.addChild(this),t},e.prototype.setTransform=function(t,e,r,i,n,o,s,a,h){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===r&&(r=1),void 0===i&&(i=1),void 0===n&&(n=0),void 0===o&&(o=0),void 0===s&&(s=0),void 0===a&&(a=0),void 0===h&&(h=0),this.position.x=t,this.position.y=e,this.scale.x=r||1,this.scale.y=i||1,this.rotation=n,this.skew.x=o,this.skew.y=s,this.pivot.x=a,this.pivot.y=h,this},e.prototype.destroy=function(){this.parent&&this.parent.removeChild(this),this.removeAllListeners(),this.transform=null,this.parent=null,this._bounds=null,this._currentBounds=null,this._mask=null,this.filters=null,this.filterArea=null,this.hitArea=null,this.interactive=!1,this.interactiveChildren=!1,this._destroyed=!0},r.x.get=function(){return this.position.x},r.x.set=function(t){this.transform.position.x=t},r.y.get=function(){return this.position.y},r.y.set=function(t){this.transform.position.y=t},r.worldTransform.get=function(){return this.transform.worldTransform},r.localTransform.get=function(){return this.transform.localTransform},r.position.get=function(){return this.transform.position},r.position.set=function(t){this.transform.position.copyFrom(t)},r.scale.get=function(){return this.transform.scale},r.scale.set=function(t){this.transform.scale.copyFrom(t)},r.pivot.get=function(){return this.transform.pivot},r.pivot.set=function(t){this.transform.pivot.copyFrom(t)},r.skew.get=function(){return this.transform.skew},r.skew.set=function(t){this.transform.skew.copyFrom(t)},r.rotation.get=function(){return this.transform.rotation},r.rotation.set=function(t){this.transform.rotation=t},r.angle.get=function(){return this.transform.rotation*Lt},r.angle.set=function(t){this.transform.rotation=t*Ft},r.zIndex.get=function(){return this._zIndex},r.zIndex.set=function(t){this._zIndex=t,this.parent&&(this.parent.sortDirty=!0)},r.worldVisible.get=function(){var t=this;do{if(!t.visible)return!1;t=t.parent}while(t);return!0},r.mask.get=function(){return this._mask},r.mask.set=function(t){if(this._mask){var e=this._mask.maskObject||this._mask;e.renderable=!0,e.isMask=!1}if(this._mask=t,this._mask){var r=this._mask.maskObject||this._mask;r.renderable=!1,r.isMask=!0}},Object.defineProperties(e.prototype,r),e}(X.a);function Qt(t,e){return t.zIndex===e.zIndex?t._lastSortedIndex-e._lastSortedIndex:t.zIndex-e.zIndex}$t.prototype.displayObjectUpdateTransform=$t.prototype.updateTransform;var te=function(t){function e(){t.call(this),this.children=[],this.sortableChildren=U.SORTABLE_CHILDREN,this.sortDirty=!1}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={width:{configurable:!0},height:{configurable:!0}};return e.prototype.onChildrenChange=function(){},e.prototype.addChild=function(t){var e=arguments,r=arguments.length;if(r>1)for(var i=0;i<r;i++)this.addChild(e[i]);else t.parent&&t.parent.removeChild(t),t.parent=this,this.sortDirty=!0,t.transform._parentID=-1,this.children.push(t),this._boundsID++,this.onChildrenChange(this.children.length-1),this.emit("childAdded",t,this,this.children.length-1),t.emit("added",this);return t},e.prototype.addChildAt=function(t,e){if(e<0||e>this.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<i?r:i)}},e.prototype.getChildIndex=function(t){var e=this.children.indexOf(t);if(-1===e)throw new Error("The supplied DisplayObject must be a child of the caller");return e},e.prototype.setChildIndex=function(t,e){if(e<0||e>=this.children.length)throw new Error("The index "+e+" supplied is out of bounds "+this.children.length);var r=this.getChildIndex(t);dt(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(t){var e=arguments,r=arguments.length;if(r>1)for(var i=0;i<r;i++)this.removeChild(e[i]);else{var n=this.children.indexOf(t);if(-1===n)return null;t.parent=null,t.transform._parentID=-1,dt(this.children,n,1),this._boundsID++,this.onChildrenChange(n),t.emit("removed",this),this.emit("childRemoved",t,this,n)}return t},e.prototype.removeChildAt=function(t){var e=this.getChildAt(t);return e.parent=null,e.transform._parentID=-1,dt(this.children,t,1),this._boundsID++,this.onChildrenChange(t),e.emit("removed",this),this.emit("childRemoved",e,this,t),e},e.prototype.removeChildren=function(t,e){void 0===t&&(t=0);var r,i=t,n="number"==typeof e?e:this.children.length,o=n-i;if(o>0&&o<=n){r=this.children.splice(i,o);for(var s=0;s<r.length;++s)r[s].parent=null,r[s].transform&&(r[s].transform._parentID=-1);this._boundsID++,this.onChildrenChange(t);for(var a=0;a<r.length;++a)r[a].emit("removed",this),this.emit("childRemoved",r[a],this,a);return r}if(0===o&&0===this.children.length)return[];throw new RangeError("removeChildren: numeric values are outside the acceptable range.")},e.prototype.sortChildren=function(){for(var t=!1,e=0,r=this.children.length;e<r;++e){var i=this.children[e];i._lastSortedIndex=e,t||0===i.zIndex||(t=!0)}t&&this.children.length>1&&this.children.sort(Qt),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<e;++t){var r=this.children[t];r.visible&&r.updateTransform()}},e.prototype.calculateBounds=function(){this._bounds.clear(),this._calculateBounds();for(var t=0;t<this.children.length;t++){var e=this.children[t];if(e.visible&&e.renderable)if(e.calculateBounds(),e._mask){var r=e._mask.maskObject||e._mask;r.calculateBounds(),this._bounds.addBoundsMask(e._bounds,r._bounds)}else e.filterArea?this._bounds.addBoundsArea(e._bounds,e.filterArea):this._bounds.addBounds(e._bounds)}this._lastBoundsID=this._boundsID},e.prototype._calculateBounds=function(){},e.prototype.render=function(t){if(this.visible&&!(this.worldAlpha<=0)&&this.renderable)if(this._mask||this.filters&&this.filters.length)this.renderAdvanced(t);else{this._render(t);for(var e=0,r=this.children.length;e<r;++e)this.children[e].render(t)}},e.prototype.renderAdvanced=function(t){t.batch.flush();var e=this.filters,r=this._mask;if(e){this._enabledFilters||(this._enabledFilters=[]),this._enabledFilters.length=0;for(var i=0;i<e.length;i++)e[i].enabled&&this._enabledFilters.push(e[i]);this._enabledFilters.length&&t.filter.push(this,this._enabledFilters)}r&&t.mask.push(this,this._mask),this._render(t);for(var n=0,o=this.children.length;n<o;n++)this.children[n].render(t);t.batch.flush(),r&&t.mask.pop(this,this._mask),e&&this._enabledFilters&&this._enabledFilters.length&&t.filter.pop()},e.prototype._render=function(t){},e.prototype.destroy=function(e){t.prototype.destroy.call(this),this.sortDirty=!1;var r="boolean"==typeof e?e:e&&e.children,i=this.removeChildren(0,this.children.length);if(r)for(var n=0;n<i.length;++n)i[n].destroy(e)},r.width.get=function(){return this.scale.x*this.getLocalBounds().width},r.width.set=function(t){var e=this.getLocalBounds().width;this.scale.x=0!==e?t/e:1,this._width=t},r.height.get=function(){return this.scale.y*this.getLocalBounds().height},r.height.set=function(t){var e=this.getLocalBounds().height;this.scale.y=0!==e?t/e:1,this._height=t},Object.defineProperties(e.prototype,r),e}($t);te.prototype.containerUpdateTransform=te.prototype.updateTransform;
  /*!
   * @pixi/accessibility - v5.2.3
   * Compiled Fri, 24 Apr 2020 00:55:22 UTC
   *
   * @pixi/accessibility is licensed under the MIT License.
   * http://www.opensource.org/licenses/mit-license
   */
  var ee={accessible:!1,accessibleTitle:null,accessibleHint:null,tabIndex:0,_accessibleActive:!1,_accessibleDiv:!1,accessibleType:"button",accessiblePointerEvents:"auto",accessibleChildren:!0};$t.mixin(ee);var re,ie=function(t){this._hookDiv=null,(w.tablet||w.phone)&&this.createTouchHook();var e=document.createElement("div");e.style.width="100px",e.style.height="100px",e.style.position="absolute",e.style.top="0px",e.style.left="0px",e.style.zIndex=2,this.div=e,this.pool=[],this.renderId=0,this.debug=!1,this.renderer=t,this.children=[],this._onKeyDown=this._onKeyDown.bind(this),this._onMouseMove=this._onMouseMove.bind(this),this.isActive=!1,this.isMobileAccessibility=!1,this.androidUpdateCount=0,this.androidUpdateFrequency=500,window.addEventListener("keydown",this._onKeyDown,!1)};ie.prototype.createTouchHook=function(){var t=this,e=document.createElement("button");e.style.width="1px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.left="-1000px",e.style.zIndex=2,e.style.backgroundColor="#FF0000",e.title="select to enable accessability for this content",e.addEventListener("focus",(function(){t.isMobileAccessibility=!0,t.activate(),t.destroyTouchHook()})),document.body.appendChild(e),this._hookDiv=e},ie.prototype.destroyTouchHook=function(){this._hookDiv&&(document.body.removeChild(this._hookDiv),this._hookDiv=null)},ie.prototype.activate=function(){this.isActive||(this.isActive=!0,window.document.addEventListener("mousemove",this._onMouseMove,!0),window.removeEventListener("keydown",this._onKeyDown,!1),this.renderer.on("postrender",this.update,this),this.renderer.view.parentNode&&this.renderer.view.parentNode.appendChild(this.div))},ie.prototype.deactivate=function(){this.isActive&&!this.isMobileAccessibility&&(this.isActive=!1,window.document.removeEventListener("mousemove",this._onMouseMove,!0),window.addEventListener("keydown",this._onKeyDown,!1),this.renderer.off("postrender",this.update),this.div.parentNode&&this.div.parentNode.removeChild(this.div))},ie.prototype.updateAccessibleObjects=function(t){if(t.visible&&t.accessibleChildren){t.accessible&&t.interactive&&(t._accessibleActive||this.addChild(t),t.renderId=this.renderId);for(var e=t.children,r=0;r<e.length;r++)this.updateAccessibleObjects(e[r])}},ie.prototype.update=function(){var t=performance.now();if(!(w.android.device&&t<this.androidUpdateCount)&&(this.androidUpdateCount=t+this.androidUpdateFrequency,this.renderer.renderingToScreen)){this.updateAccessibleObjects(this.renderer._lastObjectRendered);var e=this.renderer.view.getBoundingClientRect(),r=this.renderer.resolution,i=e.width/this.renderer.width*r,n=e.height/this.renderer.height*r,o=this.div;o.style.left=e.left+"px",o.style.top=e.top+"px",o.style.width=this.renderer.width+"px",o.style.height=this.renderer.height+"px";for(var s=0;s<this.children.length;s++){var a=this.children[s];if(a.renderId!==this.renderId)a._accessibleActive=!1,dt(this.children,s,1),this.div.removeChild(a._accessibleDiv),this.pool.push(a._accessibleDiv),a._accessibleDiv=null,s--;else{o=a._accessibleDiv;var h=a.hitArea,u=a.worldTransform;a.hitArea?(o.style.left=(u.tx+h.x*u.a)*i+"px",o.style.top=(u.ty+h.y*u.d)*n+"px",o.style.width=h.width*u.a*i+"px",o.style.height=h.height*u.d*n+"px"):(h=a.getBounds(),this.capHitArea(h),o.style.left=h.x*i+"px",o.style.top=h.y*n+"px",o.style.width=h.width*i+"px",o.style.height=h.height*n+"px",o.title!==a.accessibleTitle&&null!==a.accessibleTitle&&(o.title=a.accessibleTitle),o.getAttribute("aria-label")!==a.accessibleHint&&null!==a.accessibleHint&&o.setAttribute("aria-label",a.accessibleHint)),a.accessibleTitle===o.title&&a.tabIndex===o.tabIndex||(o.title=a.accessibleTitle,o.tabIndex=a.tabIndex,this.debug&&this.updateDebugHTML(o))}}this.renderId++}},ie.prototype.updateDebugHTML=function(t){t.innerHTML="type: "+t.type+"</br> title : "+t.title+"</br> tabIndex: "+t.tabIndex},ie.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)},ie.prototype.addChild=function(t){var e=this.pool.pop();e||((e=document.createElement("button")).style.width="100px",e.style.height="100px",e.style.backgroundColor=this.debug?"rgba(255,255,255,0.5)":"transparent",e.style.position="absolute",e.style.zIndex=2,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},ie.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)},ie.prototype._onFocus=function(t){t.target.getAttribute("aria-live","off")||t.target.setAttribute("aria-live","assertive");var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"mouseover",e.eventData)},ie.prototype._onFocusOut=function(t){t.target.getAttribute("aria-live","off")||t.target.setAttribute("aria-live","polite");var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"mouseout",e.eventData)},ie.prototype._onKeyDown=function(t){9===t.keyCode&&this.activate()},ie.prototype._onMouseMove=function(t){0===t.movementX&&0===t.movementY||this.deactivate()},ie.prototype.destroy=function(){this.destroyTouchHook(),this.div=null;for(var t=0;t<this.children.length;t++)this.children[t].div=null;window.document.removeEventListener("mousemove",this._onMouseMove,!0),window.removeEventListener("keydown",this._onKeyDown),this.pool=null,this.children=null,this.renderer=null},
  /*!
   * @pixi/ticker - v5.2.3
   * Compiled Fri, 24 Apr 2020 00:55:22 UTC
   *
   * @pixi/ticker is licensed under the MIT License.
   * http://www.opensource.org/licenses/mit-license
   */
  U.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"}(re||(re={}));var ne=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}(),oe=function(){function t(){var t=this;this._head=new ne(null,null,1/0),this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this.autoStart=!1,this.deltaTime=1,this.deltaMS=1/U.TARGET_FPMS,this.elapsedMS=1/U.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=re.NORMAL),this._addListener(new ne(t,e,r))},t.prototype.addOnce=function(t,e,r){return void 0===r&&(r=re.NORMAL),this._addListener(new ne(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:!0,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<this._minElapsedMS)return;this._lastFrame=t-r%this._minElapsedMS}this.deltaMS=e,this.deltaTime=this.deltaMS*U.TARGET_FPMS;for(var i=this._head,n=i.next;n;)n=n.emit(this.deltaTime);i.next||this._cancelIfNeeded()}else this.deltaTime=this.deltaMS=this.elapsedMS=0;this.lastTime=t},Object.defineProperty(t.prototype,"FPS",{get:function(){return 1e3/this.elapsedMS},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"minFPS",{get:function(){return 1e3/this._maxElapsedMS},set:function(t){var e=Math.min(this.maxFPS,t),r=Math.min(Math.max(0,e)/1e3,U.TARGET_FPMS);this._maxElapsedMS=1/r},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"maxFPS",{get:function(){return this._minElapsedMS?Math.round(1e3/this._minElapsedMS):0},set:function(t){if(0===t)this._minElapsedMS=0;else{var e=Math.max(this.minFPS,t);this._minElapsedMS=1/(e/1e3)}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"shared",{get:function(){if(!t._shared){var e=t._shared=new t;e.autoStart=!0,e._protected=!0}return t._shared},enumerable:!0,configurable:!0}),Object.defineProperty(t,"system",{get:function(){if(!t._system){var e=t._system=new t;e.autoStart=!0,e._protected=!0}return t._system},enumerable:!0,configurable:!0}),t}(),se=function(){function t(){}return t.init=function(t){var e=this;t=Object.assign({autoStart:!0,sharedTicker:!1},t),Object.defineProperty(this,"ticker",{set:function(t){this._ticker&&this._ticker.remove(this.render,this),this._ticker=t,t&&t.add(this.render,this,re.LOW)},get:function(){return this._ticker}}),this.stop=function(){e._ticker.stop()},this.start=function(){e._ticker.start()},this._ticker=null,this.ticker=t.sharedTicker?oe.shared:new oe,t.autoStart&&this.start()},t.destroy=function(){if(this._ticker){var t=this._ticker;this.ticker=null,t.destroy()}},t}(),ae=function(){this.global=new Mt,this.target=null,this.originalEvent=null,this.identifier=null,this.isPrimary=!1,this.button=0,this.buttons=0,this.width=0,this.height=0,this.tiltX=0,this.tiltY=0,this.pointerType=null,this.pressure=0,this.rotationAngle=0,this.twist=0,this.tangentialPressure=0},he={pointerId:{configurable:!0}};he.pointerId.get=function(){return this.identifier},ae.prototype.getLocalPosition=function(t,e,r){return t.worldTransform.applyInverse(r||this.global,e)},ae.prototype.copyEvent=function(t){t.isPrimary&&(this.isPrimary=!0),this.button=t.button,this.buttons=Number.isInteger(t.buttons)?t.buttons:t.which,this.width=t.width,this.height=t.height,this.tiltX=t.tiltX,this.tiltY=t.tiltY,this.pointerType=t.pointerType,this.pressure=t.pressure,this.rotationAngle=t.rotationAngle,this.twist=t.twist||0,this.tangentialPressure=t.tangentialPressure||0},ae.prototype.reset=function(){this.isPrimary=!1},Object.defineProperties(ae.prototype,he);var ue=function(){this.stopped=!1,this.stopsPropagatingAt=null,this.stopPropagationHint=!1,this.target=null,this.currentTarget=null,this.type=null,this.data=null};ue.prototype.stopPropagation=function(){this.stopped=!0,this.stopPropagationHint=!0,this.stopsPropagatingAt=this.currentTarget},ue.prototype.reset=function(){this.stopped=!1,this.stopsPropagatingAt=null,this.stopPropagationHint=!1,this.currentTarget=null,this.target=null};var ce=function t(e){this._pointerId=e,this._flags=t.FLAGS.NONE},le={pointerId:{configurable:!0},flags:{configurable:!0},none:{configurable:!0},over:{configurable:!0},rightDown:{configurable:!0},leftDown:{configurable:!0}};ce.prototype._doSet=function(t,e){this._flags=e?this._flags|t:this._flags&~t},le.pointerId.get=function(){return this._pointerId},le.flags.get=function(){return this._flags},le.flags.set=function(t){this._flags=t},le.none.get=function(){return this._flags===this.constructor.FLAGS.NONE},le.over.get=function(){return 0!=(this._flags&this.constructor.FLAGS.OVER)},le.over.set=function(t){this._doSet(this.constructor.FLAGS.OVER,t)},le.rightDown.get=function(){return 0!=(this._flags&this.constructor.FLAGS.RIGHT_DOWN)},le.rightDown.set=function(t){this._doSet(this.constructor.FLAGS.RIGHT_DOWN,t)},le.leftDown.get=function(){return 0!=(this._flags&this.constructor.FLAGS.LEFT_DOWN)},le.leftDown.set=function(t){this._doSet(this.constructor.FLAGS.LEFT_DOWN,t)},Object.defineProperties(ce.prototype,le),ce.FLAGS=Object.freeze({NONE:0,OVER:1,LEFT_DOWN:2,RIGHT_DOWN:4});var de=function(){this._tempPoint=new Mt};de.prototype.recursiveFindHit=function(t,e,r,i,n){if(!e||!e.visible)return!1;var o=t.data.global,s=!1,a=n=e.interactive||n,h=!0;if(e.hitArea?(i&&(e.worldTransform.applyInverse(o,this._tempPoint),e.hitArea.contains(this._tempPoint.x,this._tempPoint.y)?s=!0:(i=!1,h=!1)),a=!1):e._mask&&i&&(e._mask.containsPoint&&e._mask.containsPoint(o)||(i=!1)),h&&e.interactiveChildren&&e.children)for(var u=e.children,c=u.length-1;c>=0;c--){var l=u[c],d=this.recursiveFindHit(t,l,r,i,a);if(d){if(!l.parent)continue;a=!1,d&&(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},de.prototype.findHit=function(t,e,r,i){this.recursiveFindHit(t,e,r,i,!1)};var pe={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};$t.mixin(pe);var fe={target:null,data:{global:null}},ve=function(t){function e(e,r){t.call(this),r=r||{},this.renderer=e,this.autoPreventDefault=void 0===r.autoPreventDefault||r.autoPreventDefault,this.interactionFrequency=r.interactionFrequency||10,this.mouse=new ae,this.mouse.identifier=1,this.mouse.global.set(-999999),this.activeInteractionData={},this.activeInteractionData[1]=this.mouse,this.interactionDataPool=[],this.eventData=new ue,this.interactionDOMElement=null,this.moveWhenInside=!1,this.eventsAdded=!1,this.tickerAdded=!1,this.mouseOverRenderer=!1,this.supportsTouchEvents="ontouchstart"in window,this.supportsPointerEvents=!!window.PointerEvent,this.onPointerUp=this.onPointerUp.bind(this),this.processPointerUp=this.processPointerUp.bind(this),this.onPointerCancel=this.onPointerCancel.bind(this),this.processPointerCancel=this.processPointerCancel.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.processPointerDown=this.processPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.processPointerMove=this.processPointerMove.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.processPointerOverOut=this.processPointerOverOut.bind(this),this.onPointerOver=this.onPointerOver.bind(this),this.cursorStyles={default:"inherit",pointer:"pointer"},this.currentCursorMode=null,this.cursor=null,this.resolution=1,this.delayedEvents=[],this.search=new de,this._useSystemTicker=void 0===r.useSystemTicker||r.useSystemTicker,this.setTargetElement(this.renderer.view,this.renderer.resolution)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={useSystemTicker:{configurable:!0}};return r.useSystemTicker.get=function(){return this._useSystemTicker},r.useSystemTicker.set=function(t){this._useSystemTicker=t,t?this.addTickerListener():this.removeTickerListener()},e.prototype.hitTest=function(t,e){return fe.target=null,fe.data.global=t,e||(e=this.renderer._lastObjectRendered),this.processInteractive(fe,e,null,!0),fe.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&&(oe.system.add(this.tickerUpdate,this,re.INTERACTION),this.tickerAdded=!0)},e.prototype.removeTickerListener=function(){this.tickerAdded&&(oe.system.remove(this.tickerUpdate,this),this.tickerAdded=!1)},e.prototype.addEvents=function(){!this.eventsAdded&&this.interactionDOMElement&&(window.navigator.msPointerEnabled?(this.interactionDOMElement.style["-ms-content-zooming"]="none",this.interactionDOMElement.style["-ms-touch-action"]="none"):this.supportsPointerEvents&&(this.interactionDOMElement.style["touch-action"]="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(){this.eventsAdded&&this.interactionDOMElement&&(window.navigator.msPointerEnabled?(this.interactionDOMElement.style["-ms-content-zooming"]="",this.interactionDOMElement.style["-ms-touch-action"]=""):this.supportsPointerEvents&&(this.interactionDOMElement.style["touch-action"]=""),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._deltaTime<this.interactionFrequency||(this._deltaTime=0,this.update())},e.prototype.update=function(){if(this.interactionDOMElement)if(this.didMove)this.didMove=!1;else{for(var t in this.cursor=null,this.activeInteractionData)if(this.activeInteractionData.hasOwnProperty(t)){var e=this.activeInteractionData[t];if(e.originalEvent&&"touch"!==e.pointerType){var r=this.configureInteractionEventForDOMEvent(this.eventData,e.originalEvent,e);this.processInteractive(r,this.renderer._lastObjectRendered,this.processPointerOverOut,!0)}}this.setCursorMode(this.cursor)}},e.prototype.setCursorMode=function(t){if(t=t||"default",this.currentCursorMode!==t){this.currentCursorMode=t;var e=this.cursorStyles[t];if(e)switch(typeof e){case"string":this.interactionDOMElement.style.cursor=e;break;case"function":e(t);break;case"object":Object.assign(this.interactionDOMElement.style,e)}else"string"!=typeof t||Object.prototype.hasOwnProperty.call(this.cursorStyles,t)||(this.interactionDOMElement.style.cursor=t)}},e.prototype.dispatchEvent=function(t,e,r){r.stopPropagationHint&&t!==r.stopsPropagatingAt||(r.currentTarget=t,r.type=e,t.emit(e,r),t[e]&&t[e](r))},e.prototype.delayDispatchEvent=function(t,e,r){this.delayedEvents.push({displayObject:t,eventString:e,eventData:r})},e.prototype.mapPositionToPoint=function(t,e,r){var i;i=this.interactionDOMElement.parentElement?this.interactionDOMElement.getBoundingClientRect():{x:0,y:0,width:0,height:0};var n=1/this.resolution;t.x=(e-i.left)*(this.interactionDOMElement.width/i.width)*n,t.y=(r-i.top)*(this.interactionDOMElement.height/i.height)*n},e.prototype.processInteractive=function(t,e,r,i){var n=this.search.findHit(t,e,r,i),o=this.delayedEvents;if(!o.length)return n;t.stopPropagationHint=!1;var s=o.length;this.delayedEvents=[];for(var a=0;a<s;a++){var h=o[a],u=h.displayObject,c=h.eventString,l=h.eventData;l.stopsPropagatingAt===u&&(l.stopPropagationHint=!0),this.dispatchEvent(u,c,l)}return n},e.prototype.onPointerDown=function(t){if(!this.supportsTouchEvents||"touch"!==t.pointerType){var e=this.normalizeToPointerData(t);if(this.autoPreventDefault&&e[0].isNormalized)(t.cancelable||!("cancelable"in t))&&t.preventDefault();for(var r=e.length,i=0;i<r;i++){var n=e[i],o=this.getInteractionDataForPointerId(n),s=this.configureInteractionEventForDOMEvent(this.eventData,n,o);if(s.data.originalEvent=t,this.processInteractive(s,this.renderer._lastObjectRendered,this.processPointerDown,!0),this.emit("pointerdown",s),"touch"===n.pointerType)this.emit("touchstart",s);else if("mouse"===n.pointerType||"pen"===n.pointerType){var a=2===n.button;this.emit(a?"rightdown":"mousedown",this.eventData)}}}},e.prototype.processPointerDown=function(t,e,r){var i=t.data,n=t.data.identifier;if(r)if(e.trackedPointers[n]||(e.trackedPointers[n]=new ce(n)),this.dispatchEvent(e,"pointerdown",t),"touch"===i.pointerType)this.dispatchEvent(e,"touchstart",t);else if("mouse"===i.pointerType||"pen"===i.pointerType){var o=2===i.button;o?e.trackedPointers[n].rightDown=!0:e.trackedPointers[n].leftDown=!0,this.dispatchEvent(e,o?"rightdown":"mousedown",t)}},e.prototype.onPointerComplete=function(t,e,r){for(var i=this.normalizeToPointerData(t),n=i.length,o=t.target!==this.interactionDOMElement?"outside":"",s=0;s<n;s++){var a=i[s],h=this.getInteractionDataForPointerId(a),u=this.configureInteractionEventForDOMEvent(this.eventData,a,h);if(u.data.originalEvent=t,this.processInteractive(u,this.renderer._lastObjectRendered,r,e||!o),this.emit(e?"pointercancel":"pointerup"+o,u),"mouse"===a.pointerType||"pen"===a.pointerType){var c=2===a.button;this.emit(c?"rightup"+o:"mouseup"+o,u)}else"touch"===a.pointerType&&(this.emit(e?"touchcancel":"touchend"+o,u),this.releaseInteractionDataForPointerId(a.pointerId,h))}},e.prototype.onPointerCancel=function(t){this.supportsTouchEvents&&"touch"===t.pointerType||this.onPointerComplete(t,!0,this.processPointerCancel)},e.prototype.processPointerCancel=function(t,e){var r=t.data,i=t.data.identifier;void 0!==e.trackedPointers[i]&&(delete e.trackedPointers[i],this.dispatchEvent(e,"pointercancel",t),"touch"===r.pointerType&&this.dispatchEvent(e,"touchcancel",t))},e.prototype.onPointerUp=function(t){this.supportsTouchEvents&&"touch"===t.pointerType||this.onPointerComplete(t,!1,this.processPointerUp)},e.prototype.processPointerUp=function(t,e,r){var i=t.data,n=t.data.identifier,o=e.trackedPointers[n],s="touch"===i.pointerType,a="mouse"===i.pointerType||"pen"===i.pointerType,h=!1;if(a){var u=2===i.button,c=ce.FLAGS,l=u?c.RIGHT_DOWN:c.LEFT_DOWN,d=void 0!==o&&o.flags&l;r?(this.dispatchEvent(e,u?"rightup":"mouseup",t),d&&(this.dispatchEvent(e,u?"rightclick":"click",t),h=!0)):d&&this.dispatchEvent(e,u?"rightupoutside":"mouseupoutside",t),o&&(u?o.rightDown=!1:o.leftDown=!1)}r?(this.dispatchEvent(e,"pointerup",t),s&&this.dispatchEvent(e,"touchend",t),o&&(a&&!h||this.dispatchEvent(e,"pointertap",t),s&&(this.dispatchEvent(e,"tap",t),o.over=!1))):o&&(this.dispatchEvent(e,"pointerupoutside",t),s&&this.dispatchEvent(e,"touchendoutside",t)),o&&o.none&&delete e.trackedPointers[n]},e.prototype.onPointerMove=function(t){if(!this.supportsTouchEvents||"touch"!==t.pointerType){var e=this.normalizeToPointerData(t);"mouse"!==e[0].pointerType&&"pen"!==e[0].pointerType||(this.didMove=!0,this.cursor=null);for(var r=e.length,i=0;i<r;i++){var n=e[i],o=this.getInteractionDataForPointerId(n),s=this.configureInteractionEventForDOMEvent(this.eventData,n,o);s.data.originalEvent=t,this.processInteractive(s,this.renderer._lastObjectRendered,this.processPointerMove,!0),this.emit("pointermove",s),"touch"===n.pointerType&&this.emit("touchmove",s),"mouse"!==n.pointerType&&"pen"!==n.pointerType||this.emit("mousemove",s)}"mouse"===e[0].pointerType&&this.setCursorMode(this.cursor)}},e.prototype.processPointerMove=function(t,e,r){var i=t.data,n="touch"===i.pointerType,o="mouse"===i.pointerType||"pen"===i.pointerType;o&&this.processPointerOverOut(t,e,r),this.moveWhenInside&&!r||(this.dispatchEvent(e,"pointermove",t),n&&this.dispatchEvent(e,"touchmove",t),o&&this.dispatchEvent(e,"mousemove",t))},e.prototype.onPointerOut=function(t){if(!this.supportsTouchEvents||"touch"!==t.pointerType){var e=this.normalizeToPointerData(t)[0];"mouse"===e.pointerType&&(this.mouseOverRenderer=!1,this.setCursorMode(null));var r=this.getInteractionDataForPointerId(e),i=this.configureInteractionEventForDOMEvent(this.eventData,e,r);i.data.originalEvent=e,this.processInteractive(i,this.renderer._lastObjectRendered,this.processPointerOverOut,!1),this.emit("pointerout",i),"mouse"===e.pointerType||"pen"===e.pointerType?this.emit("mouseout",i):this.releaseInteractionDataForPointerId(r.identifier)}},e.prototype.processPointerOverOut=function(t,e,r){var i=t.data,n=t.data.identifier,o="mouse"===i.pointerType||"pen"===i.pointerType,s=e.trackedPointers[n];r&&!s&&(s=e.trackedPointers[n]=new ce(n)),void 0!==s&&(r&&this.mouseOverRenderer?(s.over||(s.over=!0,this.delayDispatchEvent(e,"pointerover",t),o&&this.delayDispatchEvent(e,"mouseover",t)),o&&null===this.cursor&&(this.cursor=e.cursor)):s.over&&(s.over=!1,this.dispatchEvent(e,"pointerout",this.eventData),o&&this.dispatchEvent(e,"mouseout",t),s.none&&delete e.trackedPointers[n]))},e.prototype.onPointerOver=function(t){var e=this.normalizeToPointerData(t)[0],r=this.getInteractionDataForPointerId(e),i=this.configureInteractionEventForDOMEvent(this.eventData,e,r);i.data.originalEvent=e,"mouse"===e.pointerType&&(this.mouseOverRenderer=!0),this.emit("pointerover",i),"mouse"!==e.pointerType&&"pen"!==e.pointerType||this.emit("mouseover",i)},e.prototype.getInteractionDataForPointerId=function(t){var e,r=t.pointerId;return 1===r||"mouse"===t.pointerType?e=this.mouse:this.activeInteractionData[r]?e=this.activeInteractionData[r]:((e=this.interactionDataPool.pop()||new ae).identifier=r,this.activeInteractionData[r]=e),e.copyEvent(t),e},e.prototype.releaseInteractionDataForPointerId=function(t){var e=this.activeInteractionData[t];e&&(delete this.activeInteractionData[t],e.reset(),this.interactionDataPool.push(e))},e.prototype.configureInteractionEventForDOMEvent=function(t,e,r){return t.data=r,this.mapPositionToPoint(r.global,e.clientX,e.clientY),"touch"===e.pointerType&&(e.globalX=r.global.x,e.globalY=r.global.y),r.originalEvent=e,t.reset(),t},e.prototype.normalizeToPointerData=function(t){var e=[];if(this.supportsTouchEvents&&t instanceof TouchEvent)for(var r=0,i=t.changedTouches.length;r<i;r++){var n=t.changedTouches[r];void 0===n.button&&(n.button=t.touches.length?1:0),void 0===n.buttons&&(n.buttons=t.touches.length?1:0),void 0===n.isPrimary&&(n.isPrimary=1===t.touches.length&&"touchstart"===t.type),void 0===n.width&&(n.width=n.radiusX||1),void 0===n.height&&(n.height=n.radiusY||1),void 0===n.tiltX&&(n.tiltX=0),void 0===n.tiltY&&(n.tiltY=0),void 0===n.pointerType&&(n.pointerType="touch"),void 0===n.pointerId&&(n.pointerId=n.identifier||0),void 0===n.pressure&&(n.pressure=n.force||.5),void 0===n.twist&&(n.twist=0),void 0===n.tangentialPressure&&(n.tangentialPressure=0),void 0===n.layerX&&(n.layerX=n.offsetX=n.clientX),void 0===n.layerY&&(n.layerY=n.offsetY=n.clientY),n.isNormalized=!0,e.push(n)}else!(t instanceof MouseEvent)||this.supportsPointerEvents&&t instanceof window.PointerEvent?e.push(t):(void 0===t.isPrimary&&(t.isPrimary=!0),void 0===t.width&&(t.width=1),void 0===t.height&&(t.height=1),void 0===t.tiltX&&(t.tiltX=0),void 0===t.tiltY&&(t.tiltY=0),void 0===t.pointerType&&(t.pointerType="mouse"),void 0===t.pointerId&&(t.pointerId=1),void 0===t.pressure&&(t.pressure=.5),void 0===t.twist&&(t.twist=0),void 0===t.tangentialPressure&&(t.tangentialPressure=0),t.isNormalized=!0,e.push(t));return e},e.prototype.destroy=function(){this.removeEvents(),this.removeTickerListener(),this.removeAllListeners(),this.renderer=null,this.mouse=null,this.eventData=null,this.interactionDOMElement=null,this.onPointerDown=null,this.processPointerDown=null,this.onPointerUp=null,this.processPointerUp=null,this.onPointerCancel=null,this.processPointerCancel=null,this.onPointerMove=null,this.processPointerMove=null,this.onPointerOut=null,this.processPointerOverOut=null,this.onPointerOver=null,this.search=null},Object.defineProperties(e.prototype,r),e}(X.a),ye=function(){function t(t){this.items=[],this._name=t,this._aliasCount=0}return t.prototype.emit=function(t,e,r,i,n,o,s,a){if(arguments.length>8)throw new Error("max arguments reached");var h=this,u=h.name,c=h.items;this._aliasCount++;for(var l=0,d=c.length;l<d;l++)c[l][u](t,e,r,i,n,o,s,a);return c===this.items&&this._aliasCount--,this},t.prototype.ensureNonAliasedItems=function(){this._aliasCount>0&&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:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this._name},enumerable:!0,configurable:!0}),t}();Object.defineProperties(ye.prototype,{dispatch:{value:ye.prototype.emit},run:{value:ye.prototype.emit}});
  /*!
   * @pixi/core - v5.2.3
   * Compiled Fri, 24 Apr 2020 00:55:22 UTC
   *
   * @pixi/core is licensed under the MIT License.
   * http://www.opensource.org/licenses/mit-license
   */
  var ge=function(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 ye("setRealSize",2),this.onUpdate=new ye("update"),this.onError=new ye("onError",1)},me={valid:{configurable:!0},width:{configurable:!0},height:{configurable:!0}};ge.prototype.bind=function(t){this.onResize.add(t),this.onUpdate.add(t),this.onError.add(t),(this._width||this._height)&&this.onResize.run(this._width,this._height)},ge.prototype.unbind=function(t){this.onResize.remove(t),this.onUpdate.remove(t),this.onError.remove(t)},ge.prototype.resize=function(t,e){t===this._width&&e===this._height||(this._width=t,this._height=e,this.onResize.run(t,e))},me.valid.get=function(){return!!this._width&&!!this._height},ge.prototype.update=function(){this.destroyed||this.onUpdate.run()},ge.prototype.load=function(){return Promise.resolve()},me.width.get=function(){return this._width},me.height.get=function(){return this._height},ge.prototype.upload=function(t,e,r){return!1},ge.prototype.style=function(t,e,r){return!1},ge.prototype.dispose=function(){},ge.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)},Object.defineProperties(ge.prototype,me);var _e=function(t){function e(e){var r=e.naturalWidth||e.videoWidth||e.width,i=e.naturalHeight||e.videoHeight||e.height;t.call(this,r,i),this.source=e,this.noSubImage=!1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.crossOrigin=function(t,e,r){void 0===r&&0!==e.indexOf("data:")?t.crossOrigin=At(e):!1!==r&&(t.crossOrigin="string"==typeof r?r:"anonymous")},e.prototype.upload=function(t,e,r,i){var n=t.gl,o=e.realWidth,s=e.realHeight;return i=i||this.source,n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e.alphaMode===L.UNPACK),this.noSubImage||e.target!==n.TEXTURE_2D||r.width!==o||r.height!==s?(r.width=o,r.height=s,n.texImage2D(e.target,0,e.format,e.format,e.type,i)):n.texSubImage2D(n.TEXTURE_2D,0,0,0,e.format,e.type,i),!0},e.prototype.update=function(){if(!this.destroyed){var e=this.source.naturalWidth||this.source.videoWidth||this.source.width,r=this.source.naturalHeight||this.source.videoHeight||this.source.height;this.resize(e,r),t.prototype.update.call(this)}},e.prototype.dispose=function(){this.source=null},e}(ge),xe=function(t){function e(e,r){if(r=r||{},!(e instanceof HTMLImageElement)){var i=new Image;t.crossOrigin(i,e,r.crossorigin),i.src=e,e=i}t.call(this,e),!e.complete&&this._width&&this._height&&(this._width=0,this._height=0),this.url=e.src,this._process=null,this.preserveBitmap=!1,this.createBitmap=(void 0!==r.createBitmap?r.createBitmap:U.CREATE_IMAGE_BITMAP)&&!!window.createImageBitmap,this.alphaMode="number"==typeof r.alphaMode?r.alphaMode:null,void 0!==r.premultiplyAlpha&&(this.premultiplyAlpha=r.premultiplyAlpha),this.bitmap=null,this._load=null,!1!==r.autoLoad&&this.load()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.load=function(t){var e=this;return this._load?this._load:(void 0!==t&&(this.createBitmap=t),this._load=new Promise((function(t,r){e.url=e.source.src;var i=e.source,n=function(){e.destroyed||(i.onload=null,i.onerror=null,e.resize(i.width,i.height),e._load=null,e.createBitmap?t(e.process()):t(e))};i.complete&&i.src?n():(i.onload=n,i.onerror=function(t){r(t),e.onError.emit(t)})})),this._load)},e.prototype.process=function(){var t=this;return null!==this._process?this._process:null===this.bitmap&&window.createImageBitmap?(this._process=window.createImageBitmap(this.source,0,0,this.source.width,this.source.height,{premultiplyAlpha:this.premultiplyAlpha===L.UNPACK?"premultiply":"none"}).then((function(e){return t.destroyed?Promise.reject():(t.bitmap=e,t.update(),t._process=null,Promise.resolve(t))})),this._process):Promise.resolve(this)},e.prototype.upload=function(e,r,i){if("number"==typeof this.alphaMode&&(r.alphaMode=this.alphaMode),!this.createBitmap)return t.prototype.upload.call(this,e,r,i);if(!this.bitmap&&(this.process(),!this.bitmap))return!1;if(t.prototype.upload.call(this,e,r,i,this.bitmap),!this.preserveBitmap){var n=!0;for(var o in r._glTextures){var s=r._glTextures[o];if(s!==i&&s.dirtyId!==r.dirtyId){n=!1;break}}n&&(this.bitmap.close&&this.bitmap.close(),this.bitmap=null)}return!0},e.prototype.dispose=function(){this.source.onload=null,this.source.onerror=null,t.prototype.dispose.call(this),this.bitmap&&(this.bitmap.close(),this.bitmap=null),this._process=null,this._load=null},e}(_e),be=[];function Te(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=be.length-1;n>=0;--n){var o=be[n];if(o.test&&o.test(t,r))return new o(t,e)}return new xe(t,e)}var we=function(t){function e(e,r){var i=r||{},n=i.width,o=i.height;if(!n||!o)throw new Error("BufferResource width or height invalid");t.call(this,n,o),this.data=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.upload=function(t,e,r){var i=t.gl;return i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e.alphaMode===L.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}(ge),Ee={scaleMode:M.NEAREST,format:A.RGBA,alphaMode:L.NPM},Se=function(t){function e(e,r){void 0===e&&(e=null),void 0===r&&(r=null),t.call(this);var i=(r=r||{}).alphaMode,n=r.mipmap,o=r.anisotropicLevel,s=r.scaleMode,a=r.width,h=r.height,u=r.wrapMode,c=r.format,l=r.type,d=r.target,p=r.resolution,f=r.resourceOptions;!e||e instanceof ge||((e=Te(e,f)).internal=!0),this.width=a||0,this.height=h||0,this.resolution=p||U.RESOLUTION,this.mipmap=void 0!==n?n:U.MIPMAP_TEXTURES,this.anisotropicLevel=void 0!==o?o:U.ANISOTROPIC_LEVEL,this.wrapMode=u||U.WRAP_MODE,this.scaleMode=void 0!==s?s:U.SCALE_MODE,this.format=c||A.RGBA,this.type=l||C.UNSIGNED_BYTE,this.target=d||O.TEXTURE_2D,this.alphaMode=void 0!==i?i:L.UNPACK,void 0!==r.premultiplyAlpha&&(this.premultiplyAlpha=r.premultiplyAlpha),this.uid=vt(),this.touched=0,this.isPowerOfTwo=!1,this._refreshPOT(),this._glTextures={},this.dirtyId=0,this.dirtyStyleId=0,this.cacheId=null,this.valid=a>0&&h>0,this.textureCacheIds=[],this.destroyed=!1,this.resource=null,this._batchEnabled=0,this._batchLocation=0,this.setResource(e)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={realWidth:{configurable:!0},realHeight:{configurable:!0}};return r.realWidth.get=function(){return Math.ceil(this.width*this.resolution-1e-4)},r.realHeight.get=function(){return Math.ceil(this.height*this.resolution-1e-4)},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=ct(this.realWidth)&&ct(this.realHeight)},e.prototype.setResolution=function(t){var e=this.resolution;return e===t?this:(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 xt[this.cacheId],delete _t[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.from=function(t,r,i){void 0===i&&(i=U.STRICT_TEXTURE_CACHE);var n="string"==typeof t,o=null;n?o=t:(t._pixiId||(t._pixiId="pixiid_"+vt()),o=t._pixiId);var s=xt[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 we(t,{width:r,height:i}),s=t instanceof Float32Array?C.FLOAT:C.UNSIGNED_BYTE;return new e(o,Object.assign(Ee,n||{width:r,height:i,type:s}))},e.addToCache=function(t,e){e&&(-1===t.textureCacheIds.indexOf(e)&&t.textureCacheIds.push(e),xt[e]&&console.warn("BaseTexture added to the cache with an id ["+e+"] that already had an entry"),xt[e]=t)},e.removeFromCache=function(t){if("string"==typeof t){var e=xt[t];if(e){var r=e.textureCacheIds.indexOf(t);return r>-1&&e.textureCacheIds.splice(r,1),delete xt[t],e}}else if(t&&t.textureCacheIds){for(var i=0;i<t.textureCacheIds.length;++i)delete xt[t.textureCacheIds[i]];return t.textureCacheIds.length=0,t}return null},Object.defineProperties(e.prototype,r),e}(X.a);Se._globalBatch=0;var Ie=function(t){function e(e,r){var i;r=r||{};var n=e;Array.isArray(e)&&(i=e,n=e.length),t.call(this,r.width,r.height),this.items=[],this.itemDirtyIds=[];for(var o=0;o<n;o++){var s=new Se;this.items.push(s),this.itemDirtyIds.push(-1)}if(this.length=n,this._load=null,i)for(var a=0;a<n;a++)this.addResourceAt(Te(i[a],r),a)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.dispose=function(){for(var t=0,e=this.length;t<e;t++)this.items[t].destroy();this.items=null,this.itemDirtyIds=null,this._load=null},e.prototype.addResourceAt=function(t,e){if(!this.items[e])throw new Error("Index "+e+" is out of bounds");return t.valid&&!this.valid&&this.resize(t.width,t.height),this.items[e].setResource(t),this},e.prototype.bind=function(e){t.prototype.bind.call(this,e),e.target=O.TEXTURE_2D_ARRAY;for(var r=0;r<this.length;r++)this.items[r].on("update",e.update,e)},e.prototype.unbind=function(e){t.prototype.unbind.call(this,e);for(var r=0;r<this.length;r++)this.items[r].off("update",e.update,e)},e.prototype.load=function(){var t=this;if(this._load)return this._load;var e=this.items.map((function(t){return t.resource})),r=e.map((function(t){return t.load()}));return this._load=Promise.all(r).then((function(){var r=e[0],i=r.width,n=r.height;return t.resize(i,n),Promise.resolve(t)})),this._load},e.prototype.upload=function(t,e,r){var i=this.length,n=this.itemDirtyIds,o=this.items,s=t.gl;r.dirtyId<0&&s.texImage3D(s.TEXTURE_2D_ARRAY,0,e.format,this._width,this._height,i,0,e.format,e.type,null);for(var a=0;a<i;a++){var h=o[a];n[a]<h.dirtyId&&(n[a]=h.dirtyId,h.valid&&s.texSubImage3D(s.TEXTURE_2D_ARRAY,0,0,0,a,h.resource.width,h.resource.height,1,e.format,e.type,h.resource.source))}return!0},e}(ge),Pe=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.test=function(t){var e=window.OffscreenCanvas;return!!(e&&t instanceof e)||t instanceof HTMLCanvasElement},e}(_e),Ae=function(t){function e(r,i){if(i=i||{},t.call(this,r,i),this.length!==e.SIDES)throw new Error("Invalid length. Got "+this.length+", expected 6");for(var n=0;n<e.SIDES;n++)this.items[n].target=O.TEXTURE_CUBE_MAP_POSITIVE_X+n;!1!==i.autoLoad&&this.load()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.bind=function(e){t.prototype.bind.call(this,e),e.target=O.TEXTURE_CUBE_MAP},e.prototype.upload=function(t,r,i){for(var n=this.itemDirtyIds,o=0;o<e.SIDES;o++){var s=this.items[o];n[o]<s.dirtyId&&(n[o]=s.dirtyId,s.valid&&s.resource.upload(t,s,i))}return!0},e}(Ie);Ae.SIDES=6;var Oe=function(t){function e(e,r){r=r||{},t.call(this,document.createElement("canvas")),this._width=0,this._height=0,this.svg=e,this.scale=r.scale||1,this._overrideWidth=r.width,this._overrideHeight=r.height,this._resolve=null,this._crossorigin=r.crossorigin,this._load=null,!1!==r.autoLoad&&this.load()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.load=function(){var t=this;return this._load?this._load:(this._load=new Promise((function(e){if(t._resolve=function(){t.resize(t.source.width,t.source.height),e(t)},/^\<svg/.test(t.svg.trim())){if(!btoa)throw new Error("Your browser doesn't support base64 conversions.");t.svg="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(t.svg)))}t._loadSvg()})),this._load)},e.prototype._loadSvg=function(){var e=this,r=new Image;t.crossOrigin(r,this.svg,this._crossorigin),r.src=this.svg,r.onerror=function(t){e._resolve&&(r.onerror=null,e.onError.run(t))},r.onload=function(){if(e._resolve){var t=r.width,i=r.height;if(!t||!i)throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them.");var n=t*e.scale,o=i*e.scale;(e._overrideWidth||e._overrideHeight)&&(n=e._overrideWidth||e._overrideHeight/i*t,o=e._overrideHeight||e._overrideWidth/t*i),n=Math.round(n),o=Math.round(o);var s=e.source;s.width=n,s.height=o,s._pixiId="canvas_"+vt(),s.getContext("2d").drawImage(r,0,0,t,i,0,0,n,o),e._resolve(),e._resolve=null}}},e.getSize=function(t){var r=e.SVG_SIZE.exec(t),i={};return r&&(i[r[1]]=Math.round(parseFloat(r[3])),i[r[5]]=Math.round(parseFloat(r[7]))),i},e.prototype.dispose=function(){t.prototype.dispose.call(this),this._resolve=null,this._crossorigin=null},e.test=function(t,e){return"svg"===e||"string"==typeof t&&0===t.indexOf("data:image/svg+xml;base64")||"string"==typeof t&&0===t.indexOf("<svg")},e}(_e);Oe.SVG_SIZE=/<svg[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i;var Ce=function(t){function e(e,r){if(r=r||{},!(e instanceof HTMLVideoElement)){var i=document.createElement("video");i.setAttribute("preload","auto"),i.setAttribute("webkit-playsinline",""),i.setAttribute("playsinline",""),"string"==typeof e&&(e=[e]),t.crossOrigin(i,e[0].src||e[0],r.crossorigin);for(var n=0;n<e.length;++n){var o=document.createElement("source"),s=e[n],a=s.src,h=s.mime,u=(a=a||e[n]).split("?").shift().toLowerCase(),c=u.substr(u.lastIndexOf(".")+1);h=h||"video/"+c,o.src=a,o.type=h,i.appendChild(o)}e=i}t.call(this,e),this.noSubImage=!0,this._autoUpdate=!0,this._isConnectedToTicker=!1,this._updateFPS=r.updateFPS||0,this._msToNextUpdate=0,this.autoPlay=!1!==r.autoPlay,this._load=null,this._resolve=null,this._onCanPlay=this._onCanPlay.bind(this),this._onError=this._onError.bind(this),!1!==r.autoLoad&&this.load()}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={autoUpdate:{configurable:!0},updateFPS:{configurable:!0}};return e.prototype.update=function(e){if(void 0===e&&(e=0),!this.destroyed){var r=oe.shared.elapsedMS*this.source.playbackRate;this._msToNextUpdate=Math.floor(this._msToNextUpdate-r),(!this._updateFPS||this._msToNextUpdate<=0)&&(t.prototype.update.call(this,e),this._msToNextUpdate=this._updateFPS?Math.floor(1e3/this._updateFPS):0)}},e.prototype.load=function(){var t=this;if(this._load)return this._load;var e=this.source;return(e.readyState===e.HAVE_ENOUGH_DATA||e.readyState===e.HAVE_FUTURE_DATA)&&e.width&&e.height&&(e.complete=!0),e.addEventListener("play",this._onPlayStart.bind(this)),e.addEventListener("pause",this._onPlayStop.bind(this)),this._isSourceReady()?this._onCanPlay():(e.addEventListener("canplay",this._onCanPlay),e.addEventListener("canplaythrough",this._onCanPlay),e.addEventListener("error",this._onError,!0)),this._load=new Promise((function(r){t.valid?r(t):(t._resolve=r,e.load())})),this._load},e.prototype._onError=function(){this.source.removeEventListener("error",this._onError,!0),this.onError.run(event)},e.prototype._isSourcePlaying=function(){var t=this.source;return t.currentTime>0&&!1===t.paused&&!1===t.ended&&t.readyState>2},e.prototype._isSourceReady=function(){return 3===this.source.readyState||4===this.source.readyState},e.prototype._onPlayStart=function(){this.valid||this._onCanPlay(),this.autoUpdate&&!this._isConnectedToTicker&&(oe.shared.add(this.update,this),this._isConnectedToTicker=!0)},e.prototype._onPlayStop=function(){this._isConnectedToTicker&&(oe.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&&oe.shared.remove(this.update,this),this.source&&(this.source.removeEventListener("error",this._onError,!0),this.source.pause(),this.source.src="",this.source.load()),t.prototype.dispose.call(this)},r.autoUpdate.get=function(){return this._autoUpdate},r.autoUpdate.set=function(t){t!==this._autoUpdate&&(this._autoUpdate=t,!this._autoUpdate&&this._isConnectedToTicker?(oe.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._isSourcePlaying()&&(oe.shared.add(this.update,this),this._isConnectedToTicker=!0))},r.updateFPS.get=function(){return this._updateFPS},r.updateFPS.set=function(t){t!==this._updateFPS&&(this._updateFPS=t)},e.test=function(t,r){return t instanceof HTMLVideoElement||e.TYPES.indexOf(r)>-1},Object.defineProperties(e.prototype,r),e}(_e);Ce.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"];var Me=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.test=function(t){return!!window.createImageBitmap&&t instanceof ImageBitmap},e}(_e);be.push(xe,Me,Pe,Ce,Oe,we,Ae,Ie);var Re={INSTALLED:be,autoDetectResource:Te,ArrayResource:Ie,BufferResource:we,CanvasResource:Pe,CubeResource:Ae,ImageResource:xe,ImageBitmapResource:Me,SVGResource:Oe,VideoResource:Ce,Resource:ge,BaseImageResource:_e},De=function(t){this.renderer=t};De.prototype.destroy=function(){this.renderer=null};var Le=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.upload=function(t,e,r){var i=t.gl;return i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e.alphaMode===L.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}(we),Fe=function(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 ye("disposeFramebuffer",2)},Ne={colorTexture:{configurable:!0}};Ne.colorTexture.get=function(){return this.colorTextures[0]},Fe.prototype.addColorTexture=function(t,e){return void 0===t&&(t=0),this.colorTextures[t]=e||new Se(null,{scaleMode:M.NEAREST,resolution:1,mipmap:!1,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this},Fe.prototype.addDepthTexture=function(t){return this.depthTexture=t||new Se(new Le(null,{width:this.width,height:this.height}),{scaleMode:M.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:!1,format:A.DEPTH_COMPONENT,type:C.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this},Fe.prototype.enableDepth=function(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this},Fe.prototype.enableStencil=function(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this},Fe.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<this.colorTextures.length;r++){var i=this.colorTextures[r],n=i.resolution;i.setSize(t/n,e/n)}if(this.depthTexture){var o=this.depthTexture.resolution;this.depthTexture.setSize(t/o,e/o)}}},Fe.prototype.dispose=function(){this.disposeRunner.run(this,!1)},Object.defineProperties(Fe.prototype,Ne);var Be=function(t){function e(e){if("number"==typeof e){var r=arguments[0],i=arguments[1],n=arguments[2],o=arguments[3];e={width:r,height:i,scaleMode:n,resolution:o}}t.call(this,null,e);var s=e||{},a=s.width,h=s.height;this.mipmap=!1,this.width=Math.ceil(a)||100,this.height=Math.ceil(h)||100,this.valid=!0,this._canvasRenderTarget=null,this.clearColor=[0,0,0,0],this.framebuffer=new Fe(this.width*this.resolution,this.height*this.resolution).addColorTexture(0,this),this.maskStack=[],this.filterStack=[{}]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.resize=function(t,e){t=Math.ceil(t),e=Math.ceil(e),this.framebuffer.resize(t*this.resolution,e*this.resolution)},e.prototype.dispose=function(){this.framebuffer.dispose(),t.prototype.dispose.call(this)},e.prototype.destroy=function(){t.prototype.destroy.call(this,!0),this.framebuffer=null},e}(Se),Ue=function(){this.x0=0,this.y0=0,this.x1=1,this.y1=0,this.x2=1,this.y2=1,this.x3=0,this.y3=1,this.uvsFloat32=new Float32Array(8)};Ue.prototype.set=function(t,e,r){var i=e.width,n=e.height;if(r){var o=t.width/2/i,s=t.height/2/n,a=t.x/i+o,h=t.y/n+s;r=zt.add(r,zt.NW),this.x0=a+o*zt.uX(r),this.y0=h+s*zt.uY(r),r=zt.add(r,2),this.x1=a+o*zt.uX(r),this.y1=h+s*zt.uY(r),r=zt.add(r,2),this.x2=a+o*zt.uX(r),this.y2=h+s*zt.uY(r),r=zt.add(r,2),this.x3=a+o*zt.uX(r),this.y3=h+s*zt.uY(r)}else this.x0=t.x/i,this.y0=t.y/n,this.x1=(t.x+t.width)/i,this.y1=t.y/n,this.x2=(t.x+t.width)/i,this.y2=(t.y+t.height)/n,this.x3=t.x/i,this.y3=(t.y+t.height)/n;this.uvsFloat32[0]=this.x0,this.uvsFloat32[1]=this.y0,this.uvsFloat32[2]=this.x1,this.uvsFloat32[3]=this.y1,this.uvsFloat32[4]=this.x2,this.uvsFloat32[5]=this.y2,this.uvsFloat32[6]=this.x3,this.uvsFloat32[7]=this.y3};var ke=new Ue,Xe=function(t){function e(r,i,n,o,s,a){if(t.call(this),this.noFrame=!1,i||(this.noFrame=!0,i=new Yt(0,0,1,1)),r instanceof e&&(r=r.baseTexture),this.baseTexture=r,this._frame=i,this.trim=o,this.valid=!1,this.requiresUpdate=!1,this._uvs=ke,this.uvMatrix=null,this.orig=n||i,this._rotate=Number(s||0),!0===s)this._rotate=2;else if(this._rotate%2!=0)throw new Error("attempt to use diamond-shaped UVs. If you are sure, set rotation manually");this.defaultAnchor=a?new Mt(a.x,a.y):new Mt(0,0),this._updateID=0,this.textureCacheIds=[],r.valid?this.noFrame?r.valid&&this.onBaseTextureUpdated(r):this.frame=i:r.once("loaded",this.onBaseTextureUpdated,this),this.noFrame&&r.on("update",this.onBaseTextureUpdated,this)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={resolution:{configurable:!0},frame:{configurable:!0},rotate:{configurable:!0},width:{configurable:!0},height:{configurable:!0}};return e.prototype.update=function(){this.baseTexture.resource&&this.baseTexture.resource.update()},e.prototype.onBaseTextureUpdated=function(t){if(this.noFrame){if(!this.baseTexture.valid)return;this._frame.width=t.width,this._frame.height=t.height,this.valid=!0,this.updateUvs()}else this.frame=this._frame;this.emit("update",this)},e.prototype.destroy=function(t){if(this.baseTexture){if(t){var r=this.baseTexture.resource;r&&_t[r.url]&&e.removeFromCache(r.url),this.baseTexture.destroy()}this.baseTexture.off("loaded",this.onBaseTextureUpdated,this),this.baseTexture.off("update",this.onBaseTextureUpdated,this),this.baseTexture=null}this._frame=null,this._uvs=null,this.trim=null,this.orig=null,this.valid=!1,e.removeFromCache(this),this.textureCacheIds=null},e.prototype.clone=function(){return new e(this.baseTexture,this.frame.clone(),this.orig.clone(),this.trim&&this.trim.clone(),this.rotate,this.defaultAnchor)},e.prototype.updateUvs=function(){this._uvs===ke&&(this._uvs=new Ue),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++},e.from=function(t,r,i){void 0===r&&(r={}),void 0===i&&(i=U.STRICT_TEXTURE_CACHE);var n="string"==typeof t,o=null;n?o=t:(t._pixiId||(t._pixiId="pixiid_"+vt()),o=t._pixiId);var s=_t[o];if(n&&i&&!s)throw new Error('The cacheId "'+o+'" does not exist in TextureCache.');return s||(r.resolution||(r.resolution=Ot(t)),(s=new e(new Se(t,r))).baseTexture.cacheId=o,Se.addToCache(s.baseTexture,o),e.addToCache(s,o)),s},e.fromBuffer=function(t,r,i,n){return new e(Se.fromBuffer(t,r,i,n))},e.fromLoader=function(t,r,i){var n=new xe(t);n.url=r;var o=new e(new Se(n,{scaleMode:U.SCALE_MODE,resolution:Ot(r)}));return i||(i=r),Se.addToCache(o.baseTexture,i),e.addToCache(o,i),i!==r&&(Se.addToCache(o.baseTexture,r),e.addToCache(o,r)),o},e.addToCache=function(t,e){e&&(-1===t.textureCacheIds.indexOf(e)&&t.textureCacheIds.push(e),_t[e]&&console.warn("Texture added to the cache with an id ["+e+"] that already had an entry"),_t[e]=t)},e.removeFromCache=function(t){if("string"==typeof t){var e=_t[t];if(e){var r=e.textureCacheIds.indexOf(t);return r>-1&&e.textureCacheIds.splice(r,1),delete _t[t],e}}else if(t&&t.textureCacheIds){for(var i=0;i<t.textureCacheIds.length;++i)_t[t.textureCacheIds[i]]===t&&delete _t[t.textureCacheIds[i]];return t.textureCacheIds.length=0,t}return null},r.resolution.get=function(){return this.baseTexture.resolution},r.frame.get=function(){return this._frame},r.frame.set=function(t){this._frame=t,this.noFrame=!1;var e=t.x,r=t.y,i=t.width,n=t.height,o=e+i>this.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()},r.rotate.get=function(){return this._rotate},r.rotate.set=function(t){this._rotate=t,this.valid&&this.updateUvs()},r.width.get=function(){return this.orig.width},r.height.get=function(){return this.orig.height},Object.defineProperties(e.prototype,r),e}(X.a);function je(t){t.destroy=function(){},t.on=function(){},t.once=function(){},t.emit=function(){}}Xe.EMPTY=new Xe(new Se),je(Xe.EMPTY),je(Xe.EMPTY.baseTexture),Xe.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 Xe(new Se(new Pe(t)))}(),je(Xe.WHITE),je(Xe.WHITE.baseTexture);var Ge=function(t){function e(e,r){var i=null;if(!(e instanceof Be)){var n=arguments[1],o=arguments[2],s=arguments[3],a=arguments[4];console.warn("Please use RenderTexture.create("+n+", "+o+") instead of the ctor directly."),i=arguments[0],r=null,e=new Be({width:n,height:o,scaleMode:s,resolution:a})}t.call(this,e,r),this.legacyRenderer=i,this.valid=!0,this.filterFrame=null,this.filterPoolKey=null,this.updateUvs()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,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 Be(t))},e}(Xe),He=function(t){this.texturePool={},this.textureOptions=t||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0};He.prototype.createTexture=function(t,e){var r=new Be(Object.assign({width:t,height:e,resolution:1},this.textureOptions));return new Ge(r)},He.prototype.getOptimalTexture=function(t,e,r){void 0===r&&(r=1);var i=He.SCREEN_KEY;t*=r,e*=r,this.enableFullScreen&&t===this._pixelsWidth&&e===this._pixelsHeight||(i=(65535&(t=ut(t)))<<16|65535&(e=ut(e))),this.texturePool[i]||(this.texturePool[i]=[]);var n=this.texturePool[i].pop();return n||(n=this.createTexture(t,e)),n.filterPoolKey=i,n.setResolution(r),n},He.prototype.getFilterTexture=function(t,e){var r=this.getOptimalTexture(t.width,t.height,e||t.resolution);return r.filterFrame=t.filterFrame,r},He.prototype.returnTexture=function(t){var e=t.filterPoolKey;t.filterFrame=null,this.texturePool[e].push(t)},He.prototype.returnFilterTexture=function(t){this.returnTexture(t)},He.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;i<r.length;i++)r[i].destroy(!0)}this.texturePool={}},He.prototype.setScreenSize=function(t){if(t.width!==this._pixelsWidth||t.height!==this._pixelsHeight){var e=He.SCREEN_KEY,r=this.texturePool[e];if(this.enableFullScreen=t.width>0&&t.height>0,r)for(var i=0;i<r.length;i++)r[i].destroy(!0);this.texturePool[e]=[],this._pixelsWidth=t.width,this._pixelsHeight=t.height}},He.SCREEN_KEY="screen";var ze=function(t,e,r,i,n,o,s){void 0===r&&(r=!1),void 0===i&&(i=5126),this.buffer=t,this.size=e,this.normalized=r,this.type=i,this.stride=n,this.start=o,this.instance=s};ze.prototype.destroy=function(){this.buffer=null},ze.from=function(t,e,r,i,n){return new ze(t,e,r,i,n)};var Ve=0,Ye=function(t,e,r){void 0===e&&(e=!0),void 0===r&&(r=!1),this.data=t||new Float32Array(1),this._glBuffers={},this._updateID=0,this.index=r,this.static=e,this.id=Ve++,this.disposeRunner=new ye("disposeBuffer",2)};function We(t){if(4===t.BYTES_PER_ELEMENT)return t instanceof Float32Array?"Float32Array":t instanceof Uint32Array?"Uint32Array":"Int32Array";if(2===t.BYTES_PER_ELEMENT){if(t instanceof Uint16Array)return"Uint16Array"}else if(1===t.BYTES_PER_ELEMENT&&t instanceof Uint8Array)return"Uint8Array";return null}Ye.prototype.update=function(t){this.data=t||this.data,this._updateID++},Ye.prototype.dispose=function(){this.disposeRunner.run(this,!1)},Ye.prototype.destroy=function(){this.dispose(),this.data=null},Ye.from=function(t){return t instanceof Array&&(t=new Float32Array(t)),new Ye(t)};var qe={Float32Array:Float32Array,Uint32Array:Uint32Array,Int32Array:Int32Array,Uint8Array:Uint8Array};var Ze={5126:4,5123:2,5121:1},Ke=0,Je={Float32Array:Float32Array,Uint32Array:Uint32Array,Int32Array:Int32Array,Uint8Array:Uint8Array,Uint16Array:Uint16Array},$e=function(t,e){void 0===t&&(t=[]),void 0===e&&(e={}),this.buffers=t,this.indexBuffer=null,this.attributes=e,this.glVertexArrayObjects={},this.id=Ke++,this.instanced=!1,this.instanceCount=1,this.disposeRunner=new ye("disposeGeometry",2),this.refCount=0};$e.prototype.addAttribute=function(t,e,r,i,n,o,s,a){if(void 0===i&&(i=!1),void 0===a&&(a=!1),!e)throw new Error("You must pass a buffer when creating an attribute");e.data||(e instanceof Array&&(e=new Float32Array(e)),e=new Ye(e));var h=t.split("|");if(h.length>1){for(var u=0;u<h.length;u++)this.addAttribute(h[u],e,r,i,n);return this}var c=this.buffers.indexOf(e);return-1===c&&(this.buffers.push(e),c=this.buffers.length-1),this.attributes[t]=new ze(c,r,i,n,o,s,a),this.instanced=this.instanced||a,this},$e.prototype.getAttribute=function(t){return this.attributes[t]},$e.prototype.getBuffer=function(t){return this.buffers[this.getAttribute(t).buffer]},$e.prototype.addIndex=function(t){return t.data||(t instanceof Array&&(t=new Uint16Array(t)),t=new Ye(t)),t.index=!0,this.indexBuffer=t,-1===this.buffers.indexOf(t)&&this.buffers.push(t),this},$e.prototype.getIndex=function(){return this.indexBuffer},$e.prototype.interleave=function(){if(1===this.buffers.length||2===this.buffers.length&&this.indexBuffer)return this;var t,e=[],r=[],i=new Ye;for(t in this.attributes){var n=this.attributes[t],o=this.buffers[n.buffer];e.push(o.data),r.push(n.size*Ze[n.type]/4),n.buffer=0}for(i.data=function(t,e){for(var r=0,i=0,n={},o=0;o<t.length;o++)i+=e[o],r+=t[o].length;for(var s=new ArrayBuffer(4*r),a=null,h=0,u=0;u<t.length;u++){var c=e[u],l=t[u],d=We(l);n[d]||(n[d]=new qe[d](s)),a=n[d];for(var p=0;p<l.length;p++){a[(p/c|0)*i+h+p%c]=l[p]}h+=c}return new Float32Array(s)}(e,r),t=0;t<this.buffers.length;t++)this.buffers[t]!==this.indexBuffer&&this.buffers[t].destroy();return this.buffers=[i],this.indexBuffer&&this.buffers.push(this.indexBuffer),this},$e.prototype.getSize=function(){for(var t in this.attributes){var e=this.attributes[t];return this.buffers[e.buffer].data.length/(e.stride/4||e.size)}return 0},$e.prototype.dispose=function(){this.disposeRunner.run(this,!1)},$e.prototype.destroy=function(){this.dispose(),this.buffers=null,this.indexBuffer=null,this.attributes=null},$e.prototype.clone=function(){for(var t=new $e,e=0;e<this.buffers.length;e++)t.buffers[e]=new Ye(this.buffers[e].data.slice());for(var r in this.attributes){var i=this.attributes[r];t.attributes[r]=new ze(i.buffer,i.size,i.normalized,i.type,i.stride,i.start,i.instance)}return this.indexBuffer&&(t.indexBuffer=t.buffers[this.buffers.indexOf(this.indexBuffer)],t.indexBuffer.index=!0),t},$e.merge=function(t){for(var e,r=new $e,i=[],n=[],o=[],s=0;s<t.length;s++){e=t[s];for(var a=0;a<e.buffers.length;a++)n[a]=n[a]||0,n[a]+=e.buffers[a].data.length,o[a]=0}for(var h=0;h<e.buffers.length;h++)i[h]=new(Je[We(e.buffers[h].data)])(n[h]),r.buffers[h]=new Ye(i[h]);for(var u=0;u<t.length;u++){e=t[u];for(var c=0;c<e.buffers.length;c++)i[c].set(e.buffers[c].data,o[c]),o[c]+=e.buffers[c].data.length}if(r.attributes=e.attributes,e.indexBuffer){r.indexBuffer=r.buffers[e.buffers.indexOf(e.indexBuffer)],r.indexBuffer.index=!0;for(var l=0,d=0,p=0,f=0,v=0;v<e.buffers.length;v++)if(e.buffers[v]!==e.indexBuffer){f=v;break}for(var y in e.attributes){var g=e.attributes[y];(0|g.buffer)===f&&(d+=g.size*Ze[g.type]/4)}for(var m=0;m<t.length;m++){for(var _=t[m].indexBuffer.data,x=0;x<_.length;x++)r.indexBuffer.data[x+p]+=l;l+=e.buffers[f].data.length/d,p+=_.length}}return r};var Qe=function(t){function e(){t.call(this),this.addAttribute("aVertexPosition",[0,0,1,0,1,1,0,1]).addIndex([0,1,3,2])}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}($e),tr=function(t){function e(){t.call(this),this.vertices=new Float32Array([-1,-1,1,-1,1,1,-1,1]),this.uvs=new Float32Array([0,0,1,0,1,1,0,1]),this.vertexBuffer=new Ye(this.vertices),this.uvBuffer=new Ye(this.uvs),this.addAttribute("aVertexPosition",this.vertexBuffer).addAttribute("aTextureCoord",this.uvBuffer).addIndex([0,1,2,0,2,3])}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.map=function(t,e){var r=0,i=0;return this.uvs[0]=r,this.uvs[1]=i,this.uvs[2]=r+e.width/t.width,this.uvs[3]=i,this.uvs[4]=r+e.width/t.width,this.uvs[5]=i+e.height/t.height,this.uvs[6]=r,this.uvs[7]=i+e.height/t.height,r=e.x,i=e.y,this.vertices[0]=r,this.vertices[1]=i,this.vertices[2]=r+e.width,this.vertices[3]=i,this.vertices[4]=r+e.width,this.vertices[5]=i+e.height,this.vertices[6]=r,this.vertices[7]=i+e.height,this.invalidate(),this},e.prototype.invalidate=function(){return this.vertexBuffer._updateID++,this.uvBuffer._updateID++,this},e}($e),er=0,rr=function(t,e){this.uniforms=t,this.group=!0,this.syncUniforms={},this.dirtyId=0,this.id=er++,this.static=!!e};rr.prototype.update=function(){this.dirtyId++},rr.prototype.add=function(t,e,r){this.uniforms[t]=new rr(e,r)},rr.from=function(t,e){return new rr(t,e)};var ir=function(){this.renderTexture=null,this.target=null,this.legacy=!1,this.resolution=1,this.sourceFrame=new Yt,this.destinationFrame=new Yt,this.filters=[]};ir.prototype.clear=function(){this.target=null,this.filters=null,this.renderTexture=null};var nr=function(t){function e(e){t.call(this,e),this.defaultFilterStack=[{}],this.texturePool=new He,this.texturePool.setScreenSize(e.view),this.statePool=[],this.quad=new Qe,this.quadUv=new tr,this.tempRect=new Yt,this.activeState={},this.globalUniforms=new rr({outputFrame:this.tempRect,inputSize:new Float32Array(4),inputPixel:new Float32Array(4),inputClamp:new Float32Array(4),resolution:1,filterArea:new Float32Array(4),filterClamp:new Float32Array(4)},!0),this.forceClear=!1,this.useMaxPadding=!1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.push=function(t,e){for(var r=this.renderer,i=this.defaultFilterStack,n=this.statePool.pop()||new ir,o=e[0].resolution,s=e[0].padding,a=e[0].autoFit,h=e[0].legacy,u=1;u<e.length;u++){var c=e[u];o=Math.min(o,c.resolution),s=this.useMaxPadding?Math.max(s,c.padding):s+c.padding,a=a||c.autoFit,h=h||c.legacy}1===i.length&&(this.defaultFilterStack[0].renderTexture=r.renderTexture.current),i.push(n),n.resolution=o,n.legacy=h,n.target=t,n.sourceFrame.copyFrom(t.filterArea||t.getBounds(!0)),n.sourceFrame.pad(s),a&&n.sourceFrame.fit(this.renderer.renderTexture.sourceFrame),n.sourceFrame.ceil(o),n.renderTexture=this.getOptimalFilterTexture(n.sourceFrame.width,n.sourceFrame.height,o),n.filters=e,n.destinationFrame.width=n.renderTexture.width,n.destinationFrame.height=n.renderTexture.height,n.renderTexture.filterFrame=n.sourceFrame,r.renderTexture.bind(n.renderTexture,n.sourceFrame),r.renderTexture.clear()},e.prototype.pop=function(){var t=this.defaultFilterStack,e=t.pop(),r=e.filters;this.activeState=e;var i=this.globalUniforms.uniforms;i.outputFrame=e.sourceFrame,i.resolution=e.resolution;var n=i.inputSize,o=i.inputPixel,s=i.inputClamp;if(n[0]=e.destinationFrame.width,n[1]=e.destinationFrame.height,n[2]=1/n[0],n[3]=1/n[1],o[0]=n[0]*e.resolution,o[1]=n[1]*e.resolution,o[2]=1/o[0],o[3]=1/o[1],s[0]=.5*o[2],s[1]=.5*o[3],s[2]=e.sourceFrame.width*n[2]-.5*o[2],s[3]=e.sourceFrame.height*n[3]-.5*o[3],e.legacy){var a=i.filterArea;a[0]=e.destinationFrame.width,a[1]=e.destinationFrame.height,a[2]=e.sourceFrame.x,a[3]=e.sourceFrame.y,i.filterClamp=i.inputClamp}this.globalUniforms.update();var h=t[t.length-1];if(1===r.length)r[0].apply(this,e.renderTexture,h.renderTexture,!1,e),this.returnFilterTexture(e.renderTexture);else{var u=e.renderTexture,c=this.getOptimalFilterTexture(u.width,u.height,e.resolution);c.filterFrame=u.filterFrame;var l=0;for(l=0;l<r.length-1;++l){r[l].apply(this,u,c,!0,e);var d=u;u=c,c=d}r[l].apply(this,u,h.renderTexture,!1,e),this.returnFilterTexture(u),this.returnFilterTexture(c)}e.clear(),this.statePool.push(e)},e.prototype.applyFilter=function(t,e,r,i){var n=this.renderer;n.renderTexture.bind(r,r?r.filterFrame:null),i&&n.renderTexture.clear(),t.uniforms.uSampler=e,t.uniforms.filterGlobals=this.globalUniforms,n.state.set(t.state),n.shader.bind(t),t.legacy?(this.quadUv.map(e._frame,e.filterFrame),n.geometry.bind(this.quadUv),n.geometry.draw(P.TRIANGLES)):(n.geometry.bind(this.quad),n.geometry.draw(P.TRIANGLE_STRIP))},e.prototype.calculateSpriteMatrix=function(t,e){var r=this.activeState,i=r.sourceFrame,n=r.destinationFrame,o=e._texture.orig,s=t.set(n.width,0,0,n.height,i.x,i.y),a=e.worldTransform.copyTo(Nt.TEMP_MATRIX);return a.invert(),s.prepend(a),s.scale(1/o.width,1/o.height),s.translate(e.anchor.x,e.anchor.y),s},e.prototype.destroy=function(){this.texturePool.clear(!1)},e.prototype.getOptimalFilterTexture=function(t,e,r){return void 0===r&&(r=1),this.texturePool.getOptimalTexture(t,e,r)},e.prototype.getFilterTexture=function(t,e){if("number"==typeof t){var r=t;t=e,e=r}t=t||this.activeState.renderTexture;var i=this.texturePool.getOptimalTexture(t.width,t.height,e||t.resolution);return i.filterFrame=t.filterFrame,i},e.prototype.returnFilterTexture=function(t){this.texturePool.returnTexture(t)},e.prototype.emptyPool=function(){this.texturePool.clear(!0)},e.prototype.resize=function(){this.texturePool.setScreenSize(this.renderer.view)},e}(De),or=function(t){this.renderer=t};or.prototype.flush=function(){},or.prototype.destroy=function(){this.renderer=null},or.prototype.start=function(){},or.prototype.stop=function(){this.flush()},or.prototype.render=function(t){};var sr=function(t){function e(e){t.call(this,e),this.emptyRenderer=new or(e),this.currentRenderer=this.emptyRenderer}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setObjectRenderer=function(t){this.currentRenderer!==t&&(this.currentRenderer.stop(),this.currentRenderer=t,this.currentRenderer.start())},e.prototype.flush=function(){this.setObjectRenderer(this.emptyRenderer)},e.prototype.reset=function(){this.setObjectRenderer(this.emptyRenderer)},e.prototype.copyBoundTextures=function(t,e){for(var r=this.renderer.texture.boundTextures,i=e-1;i>=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<s;h++){var u=n[h],c=u._batchLocation;if(c>=0&&c<i&&e[c]===u)o[h]=c;else for(;a<i;){var l=e[a];if(!l||l._batchEnabled!==r||l._batchLocation!==a){o[h]=a,u._batchLocation=a,e[a]=u;break}a++}}},e}(De);U.PREFER_ENV=w.any?E.WEBGL:E.WEBGL2,U.STRICT_TEXTURE_CACHE=!1;var ar=0,hr=function(t){function e(e){t.call(this,e),this.webGLVersion=1,this.extensions={},this.handleContextLost=this.handleContextLost.bind(this),this.handleContextRestored=this.handleContextRestored.bind(this),e.view.addEventListener("webglcontextlost",this.handleContextLost,!1),e.view.addEventListener("webglcontextrestored",this.handleContextRestored,!1)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={isLost:{configurable:!0}};return r.isLost.get=function(){return!this.gl||this.gl.isContextLost()},e.prototype.contextChange=function(t){this.gl=t,this.renderer.gl=t,this.renderer.CONTEXT_UID=ar++,t.isContextLost()&&t.getExtension("WEBGL_lose_context")&&t.getExtension("WEBGL_lose_context").restoreContext()},e.prototype.initFromContext=function(t){this.gl=t,this.validateContext(t),this.renderer.gl=t,this.renderer.CONTEXT_UID=ar++,this.renderer.runners.contextChange.run(t)},e.prototype.initFromOptions=function(t){var e=this.createContext(this.renderer.view,t);this.initFromContext(e)},e.prototype.createContext=function(t,e){var r;if(U.PREFER_ENV>=E.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(),r},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.run(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){t.getContextAttributes().stencil||console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly")},Object.defineProperties(e.prototype,r),e}(De),ur=function(t){function e(e){t.call(this,e),this.managedFramebuffers=[],this.unknownFramebuffer=new Fe(10,10)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={size:{configurable:!0}};return 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 Yt,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;U.PREFER_ENV===E.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)}},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;n<t.colorTextures.length;n++)t.colorTextures[n].texturePart?this.renderer.texture.unbind(t.colorTextures[n].texture):this.renderer.texture.unbind(t.colorTextures[n]);t.depthTexture&&this.renderer.texture.unbind(t.depthTexture),e?this.setViewport(e.x,e.y,e.width,e.height):this.setViewport(0,0,t.width,t.height)}else this.current&&(this.current=null,r.bindFramebuffer(r.FRAMEBUFFER,null)),e?this.setViewport(e.x,e.y,e.width,e.height):this.setViewport(0,0,this.renderer.width,this.renderer.height)},e.prototype.setViewport=function(t,e,r,i){var n=this.viewport;n.width===r&&n.height===i&&n.x===t&&n.y===e||(n.x=t,n.y=e,n.width=r,n.height=i,this.gl.viewport(t,e,r,i))},r.size.get=function(){return this.current?{x:0,y:0,width:this.current.width,height:this.current.height}:{x:0,y:0,width:this.renderer.width,height:this.renderer.height}},e.prototype.clear=function(t,e,r,i){var n=this.gl;n.clearColor(t,e,r,i),n.clear(n.COLOR_BUFFER_BIT|n.DEPTH_BUFFER_BIT)},e.prototype.initFramebuffer=function(t){var e={framebuffer:this.gl.createFramebuffer(),stencil:null,dirtyId:0,dirtyFormat:0,dirtySize:0};return t.glFramebuffers[this.CONTEXT_UID]=e,this.managedFramebuffers.push(t),t.disposeRunner.add(this),e},e.prototype.resizeFramebuffer=function(t){var e=this.gl,r=t.glFramebuffers[this.CONTEXT_UID];r.stencil&&(e.bindRenderbuffer(e.RENDERBUFFER,r.stencil),e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_STENCIL,t.width,t.height));for(var i=t.colorTextures,n=0;n<i.length;n++)this.renderer.texture.bind(i[n],0);t.depthTexture&&this.renderer.texture.bind(t.depthTexture,0)},e.prototype.updateFramebuffer=function(t){var e=this.gl,r=t.glFramebuffers[this.CONTEXT_UID],i=t.colorTextures.length;e.drawBuffers||(i=Math.min(i,1));for(var n=[],o=0;o<i;o++){var s=t.colorTextures[o];s.texturePart?(this.renderer.texture.bind(s.texture,0),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0+o,e.TEXTURE_CUBE_MAP_NEGATIVE_X+s.side,s.texture._glTextures[this.CONTEXT_UID].texture,0)):(this.renderer.texture.bind(s,0),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0+o,e.TEXTURE_2D,s._glTextures[this.CONTEXT_UID].texture,0)),n.push(e.COLOR_ATTACHMENT0+o)}if((n.length>1&&e.drawBuffers(n),t.depthTexture)&&this.writeDepthTexture){var a=t.depthTexture;this.renderer.texture.bind(a,0),e.framebufferTexture2D(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.TEXTURE_2D,a._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.disposeFramebuffer=function(t,e){var r=t.glFramebuffers[this.CONTEXT_UID],i=this.gl;if(r){delete t.glFramebuffers[this.CONTEXT_UID];var n=this.managedFramebuffers.indexOf(t);n>=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<e.length;r++)this.disposeFramebuffer(e[r],t)},e.prototype.forceStencil=function(){var t=this.current;if(t){var e=t.glFramebuffers[this.CONTEXT_UID];if(e&&!e.stencil){t.enableStencil();var r=t.width,i=t.height,n=this.gl,o=n.createRenderbuffer();n.bindRenderbuffer(n.RENDERBUFFER,o),n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,r,i),e.stencil=o,n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,n.RENDERBUFFER,o)}}},e.prototype.reset=function(){this.current=this.unknownFramebuffer,this.viewport=new Yt},Object.defineProperties(e.prototype,r),e}(De),cr=function(t){this.buffer=t,this.updateID=-1,this.byteLength=-1,this.refCount=0},lr={5126:4,5123:2,5121:1},dr=function(t){function e(e){t.call(this,e),this._activeGeometry=null,this._activeVao=null,this.hasVao=!0,this.hasInstance=!0,this.canUseUInt32ElementIndex=!1,this.boundBuffers={},this.managedGeometries={},this.managedBuffers={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.contextChange=function(){this.disposeAll(!0);var t=this.gl=this.renderer.gl,e=this.renderer.context;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,!t.createVertexArray){var r=this.renderer.context.extensions.vertexArrayObject;U.PREFER_ENV===E.WEBGL_LEGACY&&(r=null),r?(t.createVertexArray=function(){return r.createVertexArrayOES()},t.bindVertexArray=function(t){return r.bindVertexArrayOES(t)},t.deleteVertexArray=function(t){return r.deleteVertexArrayOES(t)}):(this.hasVao=!1,t.createVertexArray=function(){},t.bindVertexArray=function(){},t.deleteVertexArray=function(){})}if(!t.vertexAttribDivisor){var i=t.getExtension("ANGLE_instanced_arrays");i?(t.vertexAttribDivisor=function(t,e){return i.vertexAttribDivisorANGLE(t,e)},t.drawElementsInstanced=function(t,e,r,n,o){return i.drawElementsInstancedANGLE(t,e,r,n,o)},t.drawArraysInstanced=function(t,e,r,n){return i.drawArraysInstancedANGLE(t,e,r,n)}):this.hasInstance=!1}this.canUseUInt32ElementIndex=2===e.webGLVersion||!!e.extensions.uint32ElementIndex},e.prototype.bind=function(t,e){e=e||this.renderer.shader.shader;var r=this.gl,i=t.glVertexArrayObjects[this.CONTEXT_UID];i||(this.managedGeometries[t.id]=t,t.disposeRunner.add(this),t.glVertexArrayObjects[this.CONTEXT_UID]=i={});var n=i[e.program.id]||this.initGeometryVao(t,e.program);this._activeGeometry=t,this._activeVao!==n&&(this._activeVao=n,this.hasVao?r.bindVertexArray(n):this.activateVao(t,e.program)),this.updateBuffers()},e.prototype.reset=function(){this.unbind()},e.prototype.updateBuffers=function(){for(var t=this._activeGeometry,e=this.gl,r=0;r<t.buffers.length;r++){var i=t.buffers[r],n=i._glBuffers[this.CONTEXT_UID];if(i._updateID!==n.updateID){n.updateID=i._updateID;var o=i.index?e.ELEMENT_ARRAY_BUFFER:e.ARRAY_BUFFER;if(e.bindBuffer(o,n.buffer),this._boundBuffer=n,n.byteLength>=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){this.checkCompatibility(t,e);var r=this.gl,i=this.CONTEXT_UID,n=this.getSignature(t,e),o=t.glVertexArrayObjects[this.CONTEXT_UID],s=o[n];if(s)return o[e.id]=s,s;var a=t.buffers,h=t.attributes,u={},c={};for(var l in a)u[l]=0,c[l]=0;for(var d in h)!h[d].size&&e.attributeData[d]?h[d].size=e.attributeData[d].size:h[d].size||console.warn("PIXI Geometry attribute '"+d+"' size cannot be determined (likely the bound shader does not have the attribute)"),u[h[d].buffer]+=h[d].size*lr[h[d].type];for(var p in h){var f=h[p],v=f.size;void 0===f.stride&&(u[f.buffer]===v*lr[f.type]?f.stride=0:f.stride=u[f.buffer]),void 0===f.start&&(f.start=c[f.buffer],c[f.buffer]+=v*lr[f.type])}s=r.createVertexArray(),r.bindVertexArray(s);for(var y=0;y<a.length;y++){var g=a[y];g._glBuffers[i]||(g._glBuffers[i]=new cr(r.createBuffer()),this.managedBuffers[g.id]=g,g.disposeRunner.add(this)),g._glBuffers[i].refCount++}return this.activateVao(t,e),this._activeVao=s,o[e.id]=s,o[n]=s,s},e.prototype.disposeBuffer=function(t,e){if(this.managedBuffers[t.id]){delete this.managedBuffers[t.id];var r=t._glBuffers[this.CONTEXT_UID],i=this.gl;t.disposeRunner.remove(this),r&&(e||i.deleteBuffer(r.buffer),delete t._glBuffers[this.CONTEXT_UID])}},e.prototype.disposeGeometry=function(t,e){if(this.managedGeometries[t.id]){delete this.managedGeometries[t.id];var r=t.glVertexArrayObjects[this.CONTEXT_UID],i=this.gl,n=t.buffers;if(t.disposeRunner.remove(this),r){for(var o=0;o<n.length;o++){var s=n[o]._glBuffers[this.CONTEXT_UID];s.refCount--,0!==s.refCount||e||this.disposeBuffer(n[o],e)}if(!e)for(var a in r)if("g"===a[0]){var h=r[a];this._activeVao===h&&this.unbind(),i.deleteVertexArray(h)}delete t.glVertexArrayObjects[this.CONTEXT_UID]}}},e.prototype.disposeAll=function(t){for(var e=Object.keys(this.managedGeometries),r=0;r<e.length;r++)this.disposeGeometry(this.managedGeometries[e[r]],t);e=Object.keys(this.managedBuffers);for(var i=0;i<e.length;i++)this.disposeBuffer(this.managedBuffers[e[i]],t)},e.prototype.activateVao=function(t,e){var r=this.gl,i=this.CONTEXT_UID,n=t.buffers,o=t.attributes;t.indexBuffer&&r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,t.indexBuffer._glBuffers[i].buffer);var s=null;for(var a in o){var h=o[a],u=n[h.buffer]._glBuffers[i];if(e.attributeData[a]){s!==u&&(r.bindBuffer(r.ARRAY_BUFFER,u.buffer),s=u);var c=e.attributeData[a].location;if(r.enableVertexAttribArray(c),r.vertexAttribPointer(c,h.size,h.type||r.FLOAT,h.normalized,h.stride,h.start),h.instance){if(!this.hasInstance)throw new Error("geometry error, GPU Instancing is not supported on this device");r.vertexAttribDivisor(c,1)}}}},e.prototype.draw=function(t,e,r,i){var n=this.gl,o=this._activeGeometry;if(o.indexBuffer){var s=o.indexBuffer.data.BYTES_PER_ELEMENT,a=2===s?n.UNSIGNED_SHORT:n.UNSIGNED_INT;2===s||4===s&&this.canUseUInt32ElementIndex?o.instanced?n.drawElementsInstanced(t,e||o.indexBuffer.data.length,a,(r||0)*s,i||1):n.drawElements(t,e||o.indexBuffer.data.length,a,(r||0)*s):console.warn("unsupported index buffer type: uint32")}else o.instanced?n.drawArraysInstanced(t,r,e||o.getSize(),i||1):n.drawArrays(t,r,e||o.getSize());return this},e.prototype.unbind=function(){this.gl.bindVertexArray(null),this._activeVao=null,this._activeGeometry=null},e}(De),pr=function(t){this.type=B.NONE,this.autoDetect=!0,this.maskObject=t||null,this.pooled=!1,this.isMaskData=!0,this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null,this._target=null};function fr(t,e,r,i){var n=vr(t,t.VERTEX_SHADER,e),o=vr(t,t.FRAGMENT_SHADER,r),s=t.createProgram();if(t.attachShader(s,n),t.attachShader(s,o),i)for(var a in i)t.bindAttribLocation(s,i[a],a);return t.linkProgram(s),t.getProgramParameter(s,t.LINK_STATUS)||(t.getShaderParameter(n,t.COMPILE_STATUS)||(console.warn(e),console.error(t.getShaderInfoLog(n))),t.getShaderParameter(o,t.COMPILE_STATUS)||(console.warn(r),console.error(t.getShaderInfoLog(o))),console.error("Pixi.js Error: Could not initialize shader."),console.error("gl.VALIDATE_STATUS",t.getProgramParameter(s,t.VALIDATE_STATUS)),console.error("gl.getError()",t.getError()),""!==t.getProgramInfoLog(s)&&console.warn("Pixi.js Warning: gl.getProgramInfoLog()",t.getProgramInfoLog(s)),t.deleteProgram(s),s=null),t.deleteShader(n),t.deleteShader(o),s}function vr(t,e,r){var i=t.createShader(e);return t.shaderSource(i,r),t.compileShader(i),i}function yr(t,e){switch(t){case"float":return 0;case"vec2":return new Float32Array(2*e);case"vec3":return new Float32Array(3*e);case"vec4":return new Float32Array(4*e);case"int":case"sampler2D":case"sampler2DArray":return 0;case"ivec2":return new Int32Array(2*e);case"ivec3":return new Int32Array(3*e);case"ivec4":return new Int32Array(4*e);case"bool":return!1;case"bvec2":return gr(2*e);case"bvec3":return gr(3*e);case"bvec4":return gr(4*e);case"mat2":return new Float32Array([1,0,0,1]);case"mat3":return new Float32Array([1,0,0,0,1,0,0,0,1]);case"mat4":return new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}return null}function gr(t){for(var e=new Array(t),r=0;r<e.length;r++)e[r]=!1;return e}pr.prototype.reset=function(){this.pooled&&(this.maskObject=null,this.type=B.NONE,this.autoDetect=!0),this._target=null},pr.prototype.copyCountersOrReset=function(t){t?(this._stencilCounter=t._stencilCounter,this._scissorCounter=t._scissorCounter,this._scissorRect=t._scissorRect):(this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null)};var mr,_r={},xr=_r;function br(){if(xr===_r||xr&&xr.isContextLost()){var t,e=document.createElement("canvas");U.PREFER_ENV>=E.WEBGL2&&(t=e.getContext("webgl2",{})),t||((t=e.getContext("webgl",{})||e.getContext("experimental-webgl",{}))?t.getExtension("WEBGL_draw_buffers"):t=null),xr=t}return xr}function Tr(t,e,r){if("precision"!==t.substring(0,9)){var i=e;return e===N.HIGH&&r!==N.HIGH&&(i=N.MEDIUM),"precision "+i+" float;\n"+t}return r!==N.HIGH&&"precision highp"===t.substring(0,15)?t.replace("precision highp","precision mediump"):t}var wr={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 Er(t){return wr[t]}var Sr=null,Ir={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",SAMPLER_CUBE:"samplerCube",SAMPLER_2D_ARRAY:"sampler2DArray"};function Pr(t,e){if(!Sr){var r=Object.keys(Ir);Sr={};for(var i=0;i<r.length;++i){var n=r[i];Sr[t[n]]=Ir[n]}}return Sr[e]}var Ar={float:"\n    if(cv !== v)\n    {\n        cv.v = v;\n        gl.uniform1f(location, v)\n    }",vec2:"\n    if(cv[0] !== v[0] || cv[1] !== v[1])\n    {\n        cv[0] = v[0];\n        cv[1] = v[1];\n        gl.uniform2f(location, v[0], v[1])\n    }",vec3:"\n    if(cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])\n    {\n        cv[0] = v[0];\n        cv[1] = v[1];\n        cv[2] = v[2];\n\n        gl.uniform3f(location, v[0], v[1], v[2])\n    }",vec4:"gl.uniform4f(location, v[0], v[1], v[2], v[3])",int:"gl.uniform1i(location, v)",ivec2:"gl.uniform2i(location, v[0], v[1])",ivec3:"gl.uniform3i(location, v[0], v[1], v[2])",ivec4:"gl.uniform4i(location, v[0], v[1], v[2], v[3])",bool:"gl.uniform1i(location, v)",bvec2:"gl.uniform2i(location, v[0], v[1])",bvec3:"gl.uniform3i(location, v[0], v[1], v[2])",bvec4:"gl.uniform4i(location, v[0], v[1], v[2], v[3])",mat2:"gl.uniformMatrix2fv(location, false, v)",mat3:"gl.uniformMatrix3fv(location, false, v)",mat4:"gl.uniformMatrix4fv(location, false, v)",sampler2D:"gl.uniform1i(location, v)",samplerCube:"gl.uniform1i(location, v)",sampler2DArray:"gl.uniform1i(location, v)"},Or={float:"gl.uniform1fv(location, v)",vec2:"gl.uniform2fv(location, v)",vec3:"gl.uniform3fv(location, v)",vec4:"gl.uniform4fv(location, v)",mat4:"gl.uniformMatrix4fv(location, false, v)",mat3:"gl.uniformMatrix3fv(location, false, v)",mat2:"gl.uniformMatrix2fv(location, false, v)",int:"gl.uniform1iv(location, v)",ivec2:"gl.uniform2iv(location, v)",ivec3:"gl.uniform3iv(location, v)",ivec4:"gl.uniform4iv(location, v)",bool:"gl.uniform1iv(location, v)",bvec2:"gl.uniform2iv(location, v)",bvec3:"gl.uniform3iv(location, v)",bvec4:"gl.uniform4iv(location, v)",sampler2D:"gl.uniform1iv(location, v)",samplerCube:"gl.uniform1iv(location, v)",sampler2DArray:"gl.uniform1iv(location, v)"};var Cr,Mr=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join("\n");function Rr(t,e){if(0===t)throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");for(var r=e.createShader(e.FRAGMENT_SHADER);;){var i=Mr.replace(/%forloop%/gi,Dr(t));if(e.shaderSource(r,i),e.compileShader(r),e.getShaderParameter(r,e.COMPILE_STATUS))break;t=t/2|0}return t}function Dr(t){for(var e="",r=0;r<t;++r)r>0&&(e+="\nelse "),r<t-1&&(e+="if(test == "+r+".0){}");return e}var Lr=0,Fr={},Nr=function t(e,r,i){void 0===i&&(i="pixi-shader"),this.id=Lr++,this.vertexSrc=e||t.defaultVertexSrc,this.fragmentSrc=r||t.defaultFragmentSrc,this.vertexSrc=this.vertexSrc.trim(),this.fragmentSrc=this.fragmentSrc.trim(),"#version"!==this.vertexSrc.substring(0,8)&&(i=i.replace(/\s+/g,"-"),Fr[i]?(Fr[i]++,i+="-"+Fr[i]):Fr[i]=1,this.vertexSrc="#define SHADER_NAME "+i+"\n"+this.vertexSrc,this.fragmentSrc="#define SHADER_NAME "+i+"\n"+this.fragmentSrc,this.vertexSrc=Tr(this.vertexSrc,U.PRECISION_VERTEX,N.HIGH),this.fragmentSrc=Tr(this.fragmentSrc,U.PRECISION_FRAGMENT,function(){if(!mr){mr=N.MEDIUM;var t=br();if(t&&t.getShaderPrecisionFormat){var e=t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT);mr=e.precision?N.HIGH:N.MEDIUM}}return mr}())),this.extractData(this.vertexSrc,this.fragmentSrc),this.glPrograms={},this.syncUniforms=null},Br={defaultVertexSrc:{configurable:!0},defaultFragmentSrc:{configurable:!0}};Nr.prototype.extractData=function(t,e){var r=br();if(r){var i=fr(r,t,e);this.attributeData=this.getAttributeData(i,r),this.uniformData=this.getUniformData(i,r),r.deleteProgram(i)}else this.uniformData={},this.attributeData={}},Nr.prototype.getAttributeData=function(t,e){for(var r={},i=[],n=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES),o=0;o<n;o++){var s=e.getActiveAttrib(t,o),a=Pr(e,s.type),h={type:a,name:s.name,size:Er(a),location:0};r[s.name]=h,i.push(h)}i.sort((function(t,e){return t.name>e.name?1:-1}));for(var u=0;u<i.length;u++)i[u].location=u;return r},Nr.prototype.getUniformData=function(t,e){for(var r={},i=e.getProgramParameter(t,e.ACTIVE_UNIFORMS),n=0;n<i;n++){var o=e.getActiveUniform(t,n),s=o.name.replace(/\[.*?\]/,""),a=o.name.match(/\[.*?\]/,""),h=Pr(e,o.type);r[s]={type:h,size:o.size,isArray:a,value:yr(h,o.size)}}return r},Br.defaultVertexSrc.get=function(){return"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void){\n   gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n   vTextureCoord = aTextureCoord;\n}\n"},Br.defaultFragmentSrc.get=function(){return"varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\n\nvoid main(void){\n   gl_FragColor *= texture2D(uSampler, vTextureCoord);\n}"},Nr.from=function(t,e,r){var i=t+e,n=mt[i];return n||(mt[i]=n=new Nr(t,e,r)),n},Object.defineProperties(Nr,Br);var Ur=function(t,e){for(var r in this.program=t,this.uniformGroup=e?e instanceof rr?e:new rr(e):new rr({}),t.uniformData)this.uniformGroup.uniforms[r]instanceof Array&&(this.uniformGroup.uniforms[r]=new Float32Array(this.uniformGroup.uniforms[r]))},kr={uniforms:{configurable:!0}};Ur.prototype.checkUniformExists=function(t,e){if(e.uniforms[t])return!0;for(var r in e.uniforms){var i=e.uniforms[r];if(i.group&&this.checkUniformExists(t,i))return!0}return!1},Ur.prototype.destroy=function(){this.uniformGroup=null},kr.uniforms.get=function(){return this.uniformGroup.uniforms},Ur.from=function(t,e,r){var i=Nr.from(t,e);return new Ur(i,r)},Object.defineProperties(Ur.prototype,kr);var Xr=function(){this.data=0,this.blendMode=I.NORMAL,this.polygonOffset=0,this.blend=!0},jr={blend:{configurable:!0},offsets:{configurable:!0},culling:{configurable:!0},depthTest:{configurable:!0},clockwiseFrontFace:{configurable:!0},blendMode:{configurable:!0},polygonOffset:{configurable:!0}};jr.blend.get=function(){return!!(1&this.data)},jr.blend.set=function(t){!!(1&this.data)!==t&&(this.data^=1)},jr.offsets.get=function(){return!!(2&this.data)},jr.offsets.set=function(t){!!(2&this.data)!==t&&(this.data^=2)},jr.culling.get=function(){return!!(4&this.data)},jr.culling.set=function(t){!!(4&this.data)!==t&&(this.data^=4)},jr.depthTest.get=function(){return!!(8&this.data)},jr.depthTest.set=function(t){!!(8&this.data)!==t&&(this.data^=8)},jr.clockwiseFrontFace.get=function(){return!!(16&this.data)},jr.clockwiseFrontFace.set=function(t){!!(16&this.data)!==t&&(this.data^=16)},jr.blendMode.get=function(){return this._blendMode},jr.blendMode.set=function(t){this.blend=t!==I.NONE,this._blendMode=t},jr.polygonOffset.get=function(){return this._polygonOffset},jr.polygonOffset.set=function(t){this.offsets=!!t,this._polygonOffset=t},Xr.for2d=function(){var t=new Xr;return t.depthTest=!1,t.blend=!0,t},Object.defineProperties(Xr.prototype,jr);var Gr=function(t){function e(r,i,n){var o=Nr.from(r||e.defaultVertexSrc,i||e.defaultFragmentSrc);t.call(this,o,n),this.padding=0,this.resolution=U.FILTER_RESOLUTION,this.enabled=!0,this.autoFit=!0,this.legacy=!!this.program.attributeData.aTextureCoord,this.state=new Xr}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={blendMode:{configurable:!0}},i={defaultVertexSrc:{configurable:!0},defaultFragmentSrc:{configurable:!0}};return e.prototype.apply=function(t,e,r,i,n){t.applyFilter(this,e,r,i,n)},r.blendMode.get=function(){return this.state.blendMode},r.blendMode.set=function(t){this.state.blendMode=t},i.defaultVertexSrc.get=function(){return"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"},i.defaultFragmentSrc.get=function(){return"varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\n\nvoid main(void){\n   gl_FragColor = texture2D(uSampler, vTextureCoord);\n}\n"},Object.defineProperties(e.prototype,r),Object.defineProperties(e,i),e}(Ur);Gr.SOURCE_KEY_MAP={};var Hr=new Nt,zr=function(t,e){this._texture=t,this.mapCoord=new Nt,this.uClampFrame=new Float32Array(4),this.uClampOffset=new Float32Array(2),this._updateID=-1,this.clampOffset=0,this.clampMargin=void 0===e?.5:e,this.isSimple=!1},Vr={texture:{configurable:!0}};Vr.texture.get=function(){return this._texture},Vr.texture.set=function(t){this._texture=t,this._updateID=-1},zr.prototype.multiplyUvs=function(t,e){void 0===e&&(e=t);for(var r=this.mapCoord,i=0;i<t.length;i+=2){var n=t[i],o=t[i+1];e[i]=n*r.a+o*r.c+r.tx,e[i+1]=n*r.b+o*r.d+r.ty}return e},zr.prototype.update=function(t){var e=this._texture;if(!e||!e.valid)return!1;if(!t&&this._updateID===e._updateID)return!1;this._updateID=e._updateID;var r=e._uvs;this.mapCoord.set(r.x1-r.x0,r.y1-r.y0,r.x3-r.x0,r.y3-r.y0,r.x0,r.y0);var i=e.orig,n=e.trim;n&&(Hr.set(i.width/n.width,0,0,i.height/n.height,-n.x/n.width,-n.y/n.height),this.mapCoord.append(Hr));var o=e.baseTexture,s=this.uClampFrame,a=this.clampMargin/o.resolution,h=this.clampOffset;return s[0]=(e._frame.x+a+h)/o.width,s[1]=(e._frame.y+a+h)/o.height,s[2]=(e._frame.x+e._frame.width-a+h)/o.width,s[3]=(e._frame.y+e._frame.height-a+h)/o.height,this.uClampOffset[0]=h/o.realWidth,this.uClampOffset[1]=h/o.realHeight,this.isSimple=e._frame.width===o.width&&e._frame.height===o.height&&0===e.rotate,!0},Object.defineProperties(zr.prototype,Vr);var Yr=function(t){function e(e){var r=new Nt;t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 otherMatrix;\n\nvarying vec2 vMaskCoord;\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n    gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n    vTextureCoord = aTextureCoord;\n    vMaskCoord = ( otherMatrix * vec3( aTextureCoord, 1.0)  ).xy;\n}\n","varying vec2 vMaskCoord;\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform sampler2D mask;\nuniform float alpha;\nuniform float npmAlpha;\nuniform vec4 maskClamp;\n\nvoid main(void)\n{\n    float clip = step(3.5,\n        step(maskClamp.x, vMaskCoord.x) +\n        step(maskClamp.y, vMaskCoord.y) +\n        step(vMaskCoord.x, maskClamp.z) +\n        step(vMaskCoord.y, maskClamp.w));\n\n    vec4 original = texture2D(uSampler, vTextureCoord);\n    vec4 masky = texture2D(mask, vMaskCoord);\n    float alphaMul = 1.0 - npmAlpha * (1.0 - masky.a);\n\n    original *= (alphaMul * masky.r * alpha * clip);\n\n    gl_FragColor = original;\n}\n"),e.renderable=!1,this.maskSprite=e,this.maskMatrix=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.apply=function(t,e,r,i){var n=this.maskSprite,o=this.maskSprite.texture;o.valid&&(o.transform||(o.transform=new zr(o,0)),o.transform.update(),this.uniforms.npmAlpha=o.baseTexture.alphaMode?0:1,this.uniforms.mask=o,this.uniforms.otherMatrix=t.calculateSpriteMatrix(this.maskMatrix,n).prepend(o.transform.mapCoord),this.uniforms.alpha=n.worldAlpha,this.uniforms.maskClamp=o.transform.uClampFrame,t.applyFilter(this,e,r,i))},e}(Gr),Wr=function(t){function e(e){t.call(this,e),this.scissorRenderTarget=null,this.enableScissor=!1,this.alphaMaskPool=[],this.maskDataPool=[],this.maskStack=[],this.alphaMaskIndex=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setMaskStack=function(t){this.maskStack=t,this.renderer.scissor.setMaskStack(t),this.renderer.stencil.setMaskStack(t)},e.prototype.push=function(t,e){if(!e.isMaskData){var r=this.maskDataPool.pop()||new pr;r.pooled=!0,r.maskObject=e,e=r}switch(e.autoDetect&&this.detect(e),e.copyCountersOrReset(this.maskStack[this.maskStack.length-1]),e._target=t,e.type){case B.SCISSOR:this.maskStack.push(e),this.renderer.scissor.push(e);break;case B.STENCIL:this.maskStack.push(e),this.renderer.stencil.push(e);break;case B.SPRITE:e.copyCountersOrReset(null),this.pushSpriteMask(e),this.maskStack.push(e)}},e.prototype.pop=function(t){var e=this.maskStack.pop();if(e&&e._target===t){switch(e.type){case B.SCISSOR:this.renderer.scissor.pop();break;case B.STENCIL:this.renderer.stencil.pop(e.maskObject);break;case B.SPRITE:this.popSpriteMask()}e.reset(),e.pooled&&this.maskDataPool.push(e)}},e.prototype.detect=function(t){var e=t.maskObject;if(e.isSprite)t.type=B.SPRITE;else if(t.type=B.STENCIL,this.enableScissor&&e.isFastRect&&e.isFastRect()){var r=e.worldTransform,i=Math.atan2(r.b,r.a),n=Math.atan2(r.d,r.c);i=Math.round(i*(180/Math.PI)*100),n=((n=Math.round(n*(180/Math.PI)*100)-i)%18e3+18e3)%18e3,0===(i=(i%9e3+9e3)%9e3)&&9e3===n&&(t.type=B.SCISSOR)}},e.prototype.pushSpriteMask=function(t){var e=t.maskObject,r=t._target,i=this.alphaMaskPool[this.alphaMaskIndex];i||(i=this.alphaMaskPool[this.alphaMaskIndex]=[new Yr(e)]),i[0].resolution=this.renderer.resolution,i[0].maskSprite=e;var n=r.filterArea;r.filterArea=e.getBounds(!0),this.renderer.filter.push(r,i),r.filterArea=n,this.alphaMaskIndex++},e.prototype.popSpriteMask=function(){this.renderer.filter.pop(),this.alphaMaskIndex--},e}(De),qr=function(t){function e(e){t.call(this,e),this.maskStack=[],this.glConst=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getStackLength=function(){return this.maskStack.length},e.prototype.setMaskStack=function(t){var e=this.renderer.gl,r=this.getStackLength();this.maskStack=t;var i=this.getStackLength();i!==r&&(0===i?e.disable(this.glConst):(e.enable(this.glConst),this._useCurrent()))},e.prototype._useCurrent=function(){},e.prototype.destroy=function(){t.prototype.destroy.call(this,this),this.maskStack=null},e}(De),Zr=function(t){function e(e){t.call(this,e),this.glConst=WebGLRenderingContext.SCISSOR_TEST}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getStackLength=function(){var t=this.maskStack[this.maskStack.length-1];return t?t._scissorCounter:0},e.prototype.push=function(t){var e=t.maskObject;e.renderable=!0;var r=t._scissorRect,i=e.getBounds(!0),n=this.renderer.gl;e.renderable=!1,r?i.fit(r):n.enable(n.SCISSOR_TEST),t._scissorCounter++,t._scissorRect=i,this._useCurrent()},e.prototype.pop=function(){var t=this.renderer.gl;this.getStackLength()>0?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,c=t.height*s;i&&(a+=i.tx*s,h+=i.ty*s),e||(h=this.renderer.height-c-h),this.renderer.gl.scissor(a,h,u,c)},e}(qr),Kr=function(t){function e(e){t.call(this,e),this.glConst=WebGLRenderingContext.STENCIL_TEST}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,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<<this.getStackLength())-1},e}(qr),Jr=function(t){function e(e){t.call(this,e),this.destinationFrame=null,this.sourceFrame=null,this.defaultFrame=null,this.projectionMatrix=new Nt,this.transform=null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.update=function(t,e,r,i){this.destinationFrame=t||this.destinationFrame||this.defaultFrame,this.sourceFrame=e||this.sourceFrame||t,this.calculateProjection(this.destinationFrame,this.sourceFrame,r,i),this.transform&&this.projectionMatrix.append(this.transform);var n=this.renderer;n.globalUniforms.uniforms.projectionMatrix=this.projectionMatrix,n.globalUniforms.update(),n.shader.shader&&n.shader.syncUniformGroup(n.shader.shader.uniforms.globals)},e.prototype.calculateProjection=function(t,e,r,i){var n=this.projectionMatrix;i?(n.a=1/t.width*2*r,n.d=-1/t.height*2*r,n.tx=-1-e.x*n.a,n.ty=1-e.y*n.d):(n.a=1/t.width*2*r,n.d=1/t.height*2*r,n.tx=-1-e.x*n.a,n.ty=-1-e.y*n.d)},e.prototype.setTransform=function(){},e}(De),$r=new Yt,Qr=function(t){function e(e){t.call(this,e),this.clearColor=e._backgroundColorRgba,this.defaultMaskStack=[],this.current=null,this.sourceFrame=new Yt,this.destinationFrame=new Yt}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.bind=function(t,e,r){void 0===t&&(t=null),this.current=t;var i,n=this.renderer;if(t){var o=t.baseTexture;i=o.resolution,r||($r.width=o.realWidth,$r.height=o.realHeight,r=$r),e||(e=r),this.renderer.framebuffer.bind(o.framebuffer,r),this.renderer.projection.update(r,e,i,!1),this.renderer.mask.setMaskStack(o.maskStack)}else i=this.renderer.resolution,r||($r.width=n.width,$r.height=n.height,r=$r),e||(e=r),n.framebuffer.bind(null,r),this.renderer.projection.update(r,e,i,!0),this.renderer.mask.setMaskStack(this.defaultMaskStack);this.sourceFrame.copyFrom(e),this.destinationFrame.x=r.x/i,this.destinationFrame.y=r.y/i,this.destinationFrame.width=r.width/i,this.destinationFrame.height=r.height/i,e===r&&this.sourceFrame.copyFrom(this.destinationFrame)},e.prototype.clear=function(t){t=this.current?t||this.current.baseTexture.clearColor:t||this.clearColor,this.renderer.framebuffer.clear(t[0],t[1],t[2],t[3])},e.prototype.resize=function(){this.bind(null)},e.prototype.reset=function(){this.bind(null)},e}(De),ti=function(t,e){this.program=t,this.uniformData=e,this.uniformGroups={}};ti.prototype.destroy=function(){this.uniformData=null,this.uniformGroups=null,this.program=null};var ei=0,ri={textureCount:0},ii=function(t){function e(e){t.call(this,e),this.systemCheck(),this.gl=null,this.shader=null,this.program=null,this.cache={},this.id=ei++}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.systemCheck=function(){if(!function(){if("boolean"==typeof Cr)return Cr;try{var t=new Function("param1","param2","param3","return param1[param2] === param3;");Cr=!0===t({a:"b"},"a","b")}catch(t){Cr=!1}return Cr}())throw new Error("Current environment does not allow unsafe-eval, please use @pixi/unsafe-eval module to enable support.")},e.prototype.contextChange=function(t){this.gl=t,this.reset()},e.prototype.bind=function(t,e){t.uniforms.globals=this.renderer.globalUniforms;var r=t.program,i=r.glPrograms[this.renderer.CONTEXT_UID]||this.generateShader(t);return this.shader=t,this.program!==r&&(this.program=r,this.gl.useProgram(i.program)),e||(ri.textureCount=0,this.syncUniformGroup(t.uniformGroup,ri)),i},e.prototype.setUniforms=function(t){var e=this.shader.program,r=e.glPrograms[this.renderer.CONTEXT_UID];e.syncUniforms(r.uniformData,t,this.renderer)},e.prototype.syncUniformGroup=function(t,e){var r=this.getglProgram();t.static&&t.dirtyId===r.uniformGroups[t.id]||(r.uniformGroups[t.id]=t.dirtyId,this.syncUniforms(t,r,e))},e.prototype.syncUniforms=function(t,e,r){(t.syncUniforms[this.shader.program.id]||this.createSyncGroups(t))(e.uniformData,t.uniforms,this.renderer,r)},e.prototype.createSyncGroups=function(t){var e=this.getSignature(t,this.shader.program.uniformData);return this.cache[e]||(this.cache[e]=function(t,e){var r="var v = null;\n    var cv = null\n    var t = 0;\n    var gl = renderer.gl\n    ";for(var i in t.uniforms){var n=e[i];if(n)if("float"===n.type&&1===n.size)r+="\n            if(uv."+i+" !== ud."+i+".value)\n            {\n                ud."+i+".value = uv."+i+"\n                gl.uniform1f(ud."+i+".location, uv."+i+")\n            }\n";else if("sampler2D"!==n.type&&"samplerCube"!==n.type&&"sampler2DArray"!==n.type||1!==n.size||n.isArray)if("mat3"===n.type&&1===n.size)void 0!==t.uniforms[i].a?r+="\n                gl.uniformMatrix3fv(ud."+i+".location, false, uv."+i+".toArray(true));\n                \n":r+="\n                gl.uniformMatrix3fv(ud."+i+".location, false, uv."+i+");\n                \n";else if("vec2"===n.type&&1===n.size)void 0!==t.uniforms[i].x?r+="\n                cv = ud."+i+".value;\n                v = uv."+i+";\n\n                if(cv[0] !== v.x || cv[1] !== v.y)\n                {\n                    cv[0] = v.x;\n                    cv[1] = v.y;\n                    gl.uniform2f(ud."+i+".location, v.x, v.y);\n                }\n":r+="\n                cv = ud."+i+".value;\n                v = uv."+i+";\n\n                if(cv[0] !== v[0] || cv[1] !== v[1])\n                {\n                    cv[0] = v[0];\n                    cv[1] = v[1];\n                    gl.uniform2f(ud."+i+".location, v[0], v[1]);\n                }\n                \n";else if("vec4"===n.type&&1===n.size)void 0!==t.uniforms[i].width?r+="\n                cv = ud."+i+".value;\n                v = uv."+i+";\n\n                if(cv[0] !== v.x || cv[1] !== v.y || cv[2] !== v.width || cv[3] !== v.height)\n                {\n                    cv[0] = v.x;\n                    cv[1] = v.y;\n                    cv[2] = v.width;\n                    cv[3] = v.height;\n                    gl.uniform4f(ud."+i+".location, v.x, v.y, v.width, v.height)\n                }\n":r+="\n                cv = ud."+i+".value;\n                v = uv."+i+";\n\n                if(cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])\n                {\n                    cv[0] = v[0];\n                    cv[1] = v[1];\n                    cv[2] = v[2];\n                    cv[3] = v[3];\n\n                    gl.uniform4f(ud."+i+".location, v[0], v[1], v[2], v[3])\n                }\n                \n";else{r+="\n            cv = ud."+i+".value;\n            v = uv."+i+";\n            "+(1===n.size?Ar:Or)[n.type].replace("location","ud."+i+".location")+";\n"}else r+="\n\n            t = syncData.textureCount++;\n\n            renderer.texture.bind(uv."+i+", t);\n            \n            if(ud."+i+".value !== t)\n            {\n                ud."+i+".value = t;\n                gl.uniform1i(ud."+i+".location, t);\n; // eslint-disable-line max-len\n            }\n";else t.uniforms[i].group&&(r+="\n                    renderer.shader.syncUniformGroup(uv."+i+", syncData);\n                ")}return new Function("ud","uv","renderer","syncData",r)}(t,this.shader.program.uniformData)),t.syncUniforms[this.shader.program.id]=this.cache[e],t.syncUniforms[this.shader.program.id]},e.prototype.getSignature=function(t,e){var r=t.uniforms,i=[];for(var n in r)i.push(n),e[n]&&i.push(e[n].type);return i.join("-")},e.prototype.getglProgram=function(){return this.shader?this.shader.program.glPrograms[this.renderer.CONTEXT_UID]:null},e.prototype.generateShader=function(t){var e=this.gl,r=t.program,i={};for(var n in r.attributeData)i[n]=r.attributeData[n].location;var o=fr(e,r.vertexSrc,r.fragmentSrc,i),s={};for(var a in r.uniformData){var h=r.uniformData[a];s[a]={location:e.getUniformLocation(o,a),value:yr(h.type,h.size)}}var u=new ti(o,s);return r.glPrograms[this.renderer.CONTEXT_UID]=u,u},e.prototype.reset=function(){this.program=null,this.shader=null},e.prototype.destroy=function(){this.destroyed=!0},e}(De);var ni=function(t){function e(e){t.call(this,e),this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode=I.NONE,this._blendEq=!1,this.map=[],this.map[0]=this.setBlend,this.map[1]=this.setOffset,this.map[2]=this.setCullFace,this.map[3]=this.setDepthTest,this.map[4]=this.setFrontFace,this.checks=[],this.defaultState=new Xr,this.defaultState.blend=!0,this.defaultState.depth=!0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.contextChange=function(t){this.gl=t,this.blendModes=function(t,e){return void 0===e&&(e=[]),e[I.NORMAL]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[I.ADD]=[t.ONE,t.ONE],e[I.MULTIPLY]=[t.DST_COLOR,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[I.SCREEN]=[t.ONE,t.ONE_MINUS_SRC_COLOR,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[I.OVERLAY]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[I.DARKEN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[I.LIGHTEN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[I.COLOR_DODGE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[I.COLOR_BURN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[I.HARD_LIGHT]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[I.SOFT_LIGHT]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[I.DIFFERENCE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[I.EXCLUSION]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[I.HUE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[I.SATURATION]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[I.COLOR]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[I.LUMINOSITY]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[I.NONE]=[0,0],e[I.NORMAL_NPM]=[t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[I.ADD_NPM]=[t.SRC_ALPHA,t.ONE,t.ONE,t.ONE],e[I.SCREEN_NPM]=[t.SRC_ALPHA,t.ONE_MINUS_SRC_COLOR,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[I.SRC_IN]=[t.DST_ALPHA,t.ZERO],e[I.SRC_OUT]=[t.ONE_MINUS_DST_ALPHA,t.ZERO],e[I.SRC_ATOP]=[t.DST_ALPHA,t.ONE_MINUS_SRC_ALPHA],e[I.DST_OVER]=[t.ONE_MINUS_DST_ALPHA,t.ONE],e[I.DST_IN]=[t.ZERO,t.SRC_ALPHA],e[I.DST_OUT]=[t.ZERO,t.ONE_MINUS_SRC_ALPHA],e[I.DST_ATOP]=[t.ONE_MINUS_DST_ALPHA,t.SRC_ALPHA],e[I.XOR]=[t.ONE_MINUS_DST_ALPHA,t.ONE_MINUS_SRC_ALPHA],e[I.SUBTRACT]=[t.ONE,t.ONE,t.ONE,t.ONE,t.FUNC_REVERSE_SUBTRACT,t.FUNC_ADD],e}(t),this.set(this.defaultState),this.reset()},e.prototype.set=function(t){if(t=t||this.defaultState,this.stateId!==t.data){for(var e=this.stateId^t.data,r=0;e;)1&e&&this.map[r].call(this,!!(t.data&1<<r)),e>>=1,r++;this.stateId=t.data}for(var i=0;i<this.checks.length;i++)this.checks[i](this,t)},e.prototype.forceState=function(t){t=t||this.defaultState;for(var e=0;e<this.map.length;e++)this.map[e].call(this,!!(t.data&1<<e));for(var r=0;r<this.checks.length;r++)this.checks[r](this,t);this.stateId=t.data},e.prototype.setBlend=function(t){this.updateCheck(e.checkBlendMode,t),this.gl[t?"enable":"disable"](this.gl.BLEND)},e.prototype.setOffset=function(t){this.updateCheck(e.checkPolygonOffset,t),this.gl[t?"enable":"disable"](this.gl.POLYGON_OFFSET_FILL)},e.prototype.setDepthTest=function(t){this.gl[t?"enable":"disable"](this.gl.DEPTH_TEST)},e.prototype.setCullFace=function(t){this.gl[t?"enable":"disable"](this.gl.CULL_FACE)},e.prototype.setFrontFace=function(t){this.gl.frontFace(this.gl[t?"CW":"CCW"])},e.prototype.setBlendMode=function(t){if(t!==this.blendMode){this.blendMode=t;var e=this.blendModes[t],r=this.gl;2===e.length?r.blendFunc(e[0],e[1]):r.blendFuncSeparate(e[0],e[1],e[2],e[3]),6===e.length?(this._blendEq=!0,r.blendEquationSeparate(e[4],e[5])):this._blendEq&&(this._blendEq=!1,r.blendEquationSeparate(r.FUNC_ADD,r.FUNC_ADD))}},e.prototype.setPolygonOffset=function(t,e){this.gl.polygonOffset(t,e)},e.prototype.reset=function(){this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL,!1),this.forceState(0),this._blendEq=!0,this.blendMode=-1,this.setBlendMode(0)},e.prototype.updateCheck=function(t,e){var r=this.checks.indexOf(t);e&&-1===r?this.checks.push(t):e||-1===r||this.checks.splice(r,1)},e.checkBlendMode=function(t,e){t.setBlendMode(e.blendMode)},e.checkPolygonOffset=function(t,e){t.setPolygonOffset(e.polygonOffset,0)},e}(De),oi=function(t){function e(e){t.call(this,e),this.count=0,this.checkCount=0,this.maxIdle=U.GC_MAX_IDLE,this.checkCountMax=U.GC_MAX_CHECK_COUNT,this.mode=U.GC_MODE}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.postrender=function(){this.renderer.renderingToScreen&&(this.count++,this.mode!==F.MANUAL&&(this.checkCount++,this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run())))},e.prototype.run=function(){for(var t=this.renderer.texture,e=t.managedTextures,r=!1,i=0;i<e.length;i++){var n=e[i];!n.framebuffer&&this.count-n.touched>this.maxIdle&&(t.destroyTexture(n,!0),e[i]=null,r=!0)}if(r){for(var o=0,s=0;s<e.length;s++)null!==e[s]&&(e[o++]=e[s]);e.length=o}},e.prototype.unload=function(t){var e=this.renderer.textureSystem;t._texture&&t._texture._glRenderTargets&&e.destroyTexture(t._texture);for(var r=t.children.length-1;r>=0;r--)this.unload(t.children[r])},e}(De),si=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},ai=function(t){function e(e){t.call(this,e),this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new Se}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,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<e;r++)this.boundTextures[r]=null;this.emptyTextures={};var i=new si(t.createTexture());t.bindTexture(t.TEXTURE_2D,i.texture),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,new Uint8Array(4)),this.emptyTextures[t.TEXTURE_2D]=i,this.emptyTextures[t.TEXTURE_CUBE_MAP]=new si(t.createTexture()),t.bindTexture(t.TEXTURE_CUBE_MAP,this.emptyTextures[t.TEXTURE_CUBE_MAP].texture);for(var n=0;n<6;n++)t.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+n,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,null);t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_MIN_FILTER,t.LINEAR);for(var o=0;o<this.boundTextures.length;o++)this.bind(null,o)},e.prototype.bind=function(t,e){void 0===e&&(e=0);var r=this.gl;if(t){if((t=t.baseTexture||t).valid){t.touched=this.renderer.textureGC.count;var i=t._glTextures[this.CONTEXT_UID]||this.initTexture(t);this.boundTextures[e]!==t&&(this.currentLocation!==e&&(this.currentLocation=e,r.activeTexture(r.TEXTURE0+e)),r.bindTexture(t.target,i.texture)),i.dirtyId!==t.dirtyId&&(this.currentLocation!==e&&(this.currentLocation=e,r.activeTexture(r.TEXTURE0+e)),this.updateTexture(t)),this.boundTextures[e]=t}}else this.currentLocation!==e&&(this.currentLocation=e,r.activeTexture(r.TEXTURE0+e)),r.bindTexture(r.TEXTURE_2D,this.emptyTextures[r.TEXTURE_2D].texture),this.boundTextures[e]=null},e.prototype.reset=function(){this._unknownBoundTextures=!0,this.currentLocation=-1;for(var t=0;t<this.boundTextures.length;t++)this.boundTextures[t]=this.unknownTexture},e.prototype.unbind=function(t){var e=this.gl,r=this.boundTextures;if(this._unknownBoundTextures){this._unknownBoundTextures=!1;for(var i=0;i<r.length;i++)r[i]===this.unknownTexture&&this.bind(null,i)}for(var n=0;n<r.length;n++)r[n]===t&&(this.currentLocation!==n&&(e.activeTexture(e.TEXTURE0+n),this.currentLocation=n),e.bindTexture(e.TEXTURE_2D,this.emptyTextures[t.target].texture),r[n]=null)},e.prototype.initTexture=function(t){var e=new si(this.gl.createTexture());return e.dirtyId=-1,t._glTextures[this.CONTEXT_UID]=e,this.managedTextures.push(t),t.on("dispose",this.destroyTexture,this),e},e.prototype.initTextureType=function(t,e){if(e.internalFormat=t.format,e.type=t.type,2===this.webGLVersion){var r=this.renderer.gl;t.type===r.FLOAT&&t.format===r.RGBA&&(e.internalFormat=r.RGBA32F),t.type===C.HALF_FLOAT&&(e.type=r.HALF_FLOAT),e.type===r.HALF_FLOAT&&t.format===r.RGBA&&(e.internalFormat=r.RGBA16F)}},e.prototype.updateTexture=function(t){var e=t._glTextures[this.CONTEXT_UID];if(e){var r=this.renderer;if(this.initTextureType(t,e),t.resource&&t.resource.upload(r,t,e));else{var i=t.realWidth,n=t.realHeight,o=r.gl;(e.width!==i||e.height!==n||e.dirtyId<0)&&(e.width=i,e.height=n,o.texImage2D(t.target,0,e.internalFormat,i,n,0,t.format,e.type,null))}t.dirtyStyleId!==e.dirtyStyleId&&this.updateTextureStyle(t),e.dirtyId=t.dirtyId}},e.prototype.destroyTexture=function(t,e){var r=this.gl;if((t=t.baseTexture||t)._glTextures[this.CONTEXT_UID]&&(this.unbind(t),r.deleteTexture(t._glTextures[this.CONTEXT_UID].texture),t.off("dispose",this.destroyTexture,this),delete t._glTextures[this.CONTEXT_UID],!e)){var i=this.managedTextures.indexOf(t);-1!==i&&dt(this.managedTextures,i,1)}},e.prototype.updateTextureStyle=function(t){var e=t._glTextures[this.CONTEXT_UID];e&&(t.mipmap!==D.POW2&&2===this.webGLVersion||t.isPowerOfTwo?e.mipmap=t.mipmap>=1:e.mipmap=0,2===this.webGLVersion||t.isPowerOfTwo?e.wrapMode=t.wrapMode:e.wrapMode=R.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===M.LINEAR?r.LINEAR_MIPMAP_LINEAR:r.NEAREST_MIPMAP_NEAREST);var i=this.renderer.context.extensions.anisotropicFiltering;if(i&&t.anisotropicLevel>0&&t.scaleMode===M.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===M.LINEAR?r.LINEAR:r.NEAREST);r.texParameteri(t.target,r.TEXTURE_MAG_FILTER,t.scaleMode===M.LINEAR?r.LINEAR:r.NEAREST)},e}(De),hi={FilterSystem:nr,BatchSystem:sr,ContextSystem:hr,FramebufferSystem:ur,GeometrySystem:dr,MaskSystem:Wr,ScissorSystem:Zr,StencilSystem:Kr,ProjectionSystem:Jr,RenderTextureSystem:Qr,ShaderSystem:ii,StateSystem:ni,TextureGCSystem:oi,TextureSystem:ai},ui=new Nt,ci=function(t){function e(e,r){t.call(this),(r=Object.assign({},U.RENDER_OPTIONS,r)).roundPixels&&(U.ROUND_PIXELS=r.roundPixels,gt("5.0.0","Renderer roundPixels option is deprecated, please use PIXI.settings.ROUND_PIXELS",2)),this.options=r,this.type=S.UNKNOWN,this.screen=new Yt(0,0,r.width,r.height),this.view=r.view||document.createElement("canvas"),this.resolution=r.resolution||U.RESOLUTION,this.transparent=r.transparent,this.autoDensity=r.autoDensity||r.autoResize||!1,this.preserveDrawingBuffer=r.preserveDrawingBuffer,this.clearBeforeRender=r.clearBeforeRender,this._backgroundColor=0,this._backgroundColorRgba=[0,0,0,0],this._backgroundColorString="#000000",this.backgroundColor=r.backgroundColor||this._backgroundColor,this._tempDisplayObjectParent=new te,this._lastObjectRendered=this._tempDisplayObjectParent,this.plugins={}}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={width:{configurable:!0},height:{configurable:!0},backgroundColor:{configurable:!0}};return e.prototype.initPlugins=function(t){for(var e in t)this.plugins[e]=new t[e](this)},r.width.get=function(){return this.view.width},r.height.get=function(){return this.view.height},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")},e.prototype.generateTexture=function(t,e,r,i){0===(i=i||t.getLocalBounds()).width&&(i.width=1),0===i.height&&(i.height=1);var n=Ge.create({width:0|i.width,height:0|i.height,scaleMode:e,resolution:r});return ui.tx=-i.x,ui.ty=-i.y,this.render(t,n,!1,ui,!!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),this.plugins=null,this.type=S.UNKNOWN,this.view=null,this.screen=null,this.resolution=0,this.transparent=!1,this.autoDensity=!1,this.blendModes=null,this.options=null,this.preserveDrawingBuffer=!1,this.clearBeforeRender=!1,this._backgroundColor=0,this._backgroundColorRgba=null,this._backgroundColorString=null,this._tempDisplayObjectParent=null,this._lastObjectRendered=null},r.backgroundColor.get=function(){return this._backgroundColor},r.backgroundColor.set=function(t){this._backgroundColor=t,this._backgroundColorString=J(t),K(t,this._backgroundColorRgba)},Object.defineProperties(e.prototype,r),e}(X.a),li=function(t){function e(r){void 0===r&&(r={}),t.call(this,"WebGL",r),r=this.options,this.type=S.WEBGL,this.gl=null,this.CONTEXT_UID=0,this.runners={destroy:new ye("destroy"),contextChange:new ye("contextChange",1),reset:new ye("reset"),update:new ye("update"),postrender:new ye("postrender"),prerender:new ye("prerender"),resize:new ye("resize",2)},this.globalUniforms=new rr({projectionMatrix:new Nt},!0),this.addSystem(Wr,"mask").addSystem(hr,"context").addSystem(ni,"state").addSystem(ii,"shader").addSystem(ai,"texture").addSystem(dr,"geometry").addSystem(ur,"framebuffer").addSystem(Zr,"scissor").addSystem(Kr,"stencil").addSystem(Jr,"projection").addSystem(oi,"textureGC").addSystem(nr,"filter").addSystem(Qr,"renderTexture").addSystem(sr,"batch"),this.initPlugins(e.__plugins),r.context?this.context.initFromContext(r.context):this.context.initFromOptions({alpha:this.transparent,antialias:r.antialias,premultipliedAlpha:this.transparent&&"notMultiplied"!==this.transparent,stencil:!0,preserveDrawingBuffer:r.preserveDrawingBuffer,powerPreference:this.options.powerPreference}),this.renderingToScreen=!0,q(2===this.context.webGLVersion?"WebGL 2":"WebGL 1"),this.resize(this.options.width,this.options.height)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.create=function(t){if(Z())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.run(),this.emit("prerender"),this.projection.transform=i,!this.context.isLost){if(e||(this._lastObjectRendered=t),!n){var o=t.parent;t.parent=this._tempDisplayObjectParent,t.updateTransform(),t.parent=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.run(),this.projection.transform=null,this.emit("postrender")}},e.prototype.resize=function(e,r){t.prototype.resize.call(this,e,r),this.runners.resize.run(e,r)},e.prototype.reset=function(){return this.runners.reset.run(),this},e.prototype.clear=function(){this.framebuffer.bind(),this.framebuffer.clear()},e.prototype.destroy=function(e){for(var r in this.runners.destroy.run(),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}(ci);function di(t){return li.create(t)}var pi="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}",fi="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",vi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.from=function(t,r){return new e(new Ae(t,r))},e}(Se),yi=function(){this.texArray=null,this.blend=0,this.type=P.TRIANGLES,this.start=0,this.size=0,this.data=null},gi=function(){this.elements=[],this.ids=[],this.count=0};gi.prototype.clear=function(){for(var t=0;t<this.count;t++)this.elements[t]=null;this.count=0};var mi=function(t){this.rawBinaryData=new ArrayBuffer(t),this.uint32View=new Uint32Array(this.rawBinaryData),this.float32View=new Float32Array(this.rawBinaryData)},_i={int8View:{configurable:!0},uint8View:{configurable:!0},int16View:{configurable:!0},uint16View:{configurable:!0},int32View:{configurable:!0}};_i.int8View.get=function(){return this._int8View||(this._int8View=new Int8Array(this.rawBinaryData)),this._int8View},_i.uint8View.get=function(){return this._uint8View||(this._uint8View=new Uint8Array(this.rawBinaryData)),this._uint8View},_i.int16View.get=function(){return this._int16View||(this._int16View=new Int16Array(this.rawBinaryData)),this._int16View},_i.uint16View.get=function(){return this._uint16View||(this._uint16View=new Uint16Array(this.rawBinaryData)),this._uint16View},_i.int32View.get=function(){return this._int32View||(this._int32View=new Int32Array(this.rawBinaryData)),this._int32View},mi.prototype.view=function(t){return this[t+"View"]},mi.prototype.destroy=function(){this.rawBinaryData=null,this._int8View=null,this._uint8View=null,this._int16View=null,this._uint16View=null,this._int32View=null,this.uint32View=null,this.float32View=null},mi.sizeOf=function(t){switch(t){case"int8":case"uint8":return 1;case"int16":case"uint16":return 2;case"int32":case"uint32":case"float32":return 4;default:throw new Error(t+" isn't a valid view type")}},Object.defineProperties(mi.prototype,_i);var xi=function(t){function e(e){t.call(this,e),this.shaderGenerator=null,this.geometryClass=null,this.vertexSize=null,this.state=Xr.for2d(),this.size=4*U.SPRITE_BATCH_SIZE,this._vertexCount=0,this._indexCount=0,this._bufferedElements=[],this._bufferedTextures=[],this._bufferSize=0,this._shader=null,this._packedGeometries=[],this._packedGeometryPoolSize=2,this._flushId=0,this._aBuffers={},this._iBuffers={},this.MAX_TEXTURES=1,this.renderer.on("prerender",this.onPrerender,this),e.runners.contextChange.add(this),this._dcIndex=0,this._aIndex=0,this._iIndex=0,this._attributeBuffer=null,this._indexBuffer=null,this._tempBoundTextures=[]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.contextChange=function(){var t=this.renderer.gl;U.PREFER_ENV===E.WEBGL_LEGACY?this.MAX_TEXTURES=1:(this.MAX_TEXTURES=Math.min(t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),U.SPRITE_MAX_TEXTURES),this.MAX_TEXTURES=Rr(this.MAX_TEXTURES,t)),this._shader=this.shaderGenerator.generateShader(this.MAX_TEXTURES);for(var e=0;e<this._packedGeometryPoolSize;e++)this._packedGeometries[e]=new this.geometryClass;this.initFlushBuffers()},e.prototype.initFlushBuffers=function(){for(var t=e._drawCallPool,r=e._textureArrayPool,i=this.size/4,n=Math.floor(i/this.MAX_TEXTURES)+1;t.length<i;)t.push(new yi);for(;r.length<n;)r.push(new gi);for(var o=0;o<this.MAX_TEXTURES;o++)this._tempBoundTextures[o]=null},e.prototype.onPrerender=function(){this._flushId=0},e.prototype.render=function(t){t._texture.valid&&(this._vertexCount+t.vertexData.length/2>this.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=++Se._globalBatch,h=0,u=i[0],c=0;n.copyBoundTextures(o,r);for(var l=0;l<this._bufferSize;++l){var d=t[l];t[l]=null,d._batchEnabled!==a&&(u.count>=r&&(n.boundArray(u,o,a,r),this.buildDrawCalls(u,c,l),c=l,u=i[++h],++a),d._batchEnabled=a,d.touched=s,u.elements[u.count++]=d)}u.count>0&&(n.boundArray(u,o,a,r),this.buildDrawCalls(u,c,this._bufferSize),++h,++a);for(var p=0;p<o.length;p++)o[p]=null;Se._globalBatch=a},e.prototype.buildDrawCalls=function(t,r,i){var n=this._bufferedElements,o=this._attributeBuffer,s=this._indexBuffer,a=this.vertexSize,h=e._drawCallPool,u=this._dcIndex,c=this._aIndex,l=this._iIndex,d=h[u];d.start=this._iIndex,d.texArray=t;for(var p=r;p<i;++p){var f=n[p],v=f._texture.baseTexture,y=tt[v.alphaMode?1:0][f.blendMode];n[p]=null,r<p&&d.blend!==y&&(d.size=l-d.start,r=p,(d=h[++u]).texArray=t,d.start=l),this.packInterleavedGeometry(f,o,s,c,l),c+=f.vertexData.length/2*a,l+=f.indices.length,d.blend=y}r<i&&(d.size=l-d.start,++u),this._dcIndex=u,this._aIndex=c,this._iIndex=l},e.prototype.bindAndClearTexArray=function(t){for(var e=this.renderer.texture,r=0;r<t.count;r++)e.bind(t.elements[r],t.ids[r]),t.elements[r]=null;t.count=0},e.prototype.updateGeometry=function(){var t=this._packedGeometries,e=this._attributeBuffer,r=this._indexBuffer;U.CAN_UPLOAD_SAME_BUFFER?(t[this._flushId]._buffer.update(e.rawBinaryData),t[this._flushId]._indexBuffer.update(r),this.renderer.geometry.updateBuffers()):(this._packedGeometryPoolSize<=this._flushId&&(this._packedGeometryPoolSize++,t[this._flushId]=new this.geometryClass),t[this._flushId]._buffer.update(e.rawBinaryData),t[this._flushId]._indexBuffer.update(r),this.renderer.geometry.bind(t[this._flushId]),this.renderer.geometry.updateBuffers(),this._flushId++)},e.prototype.drawBatches=function(){for(var t=this._dcIndex,r=this.renderer,i=r.gl,n=r.state,o=e._drawCallPool,s=null,a=0;a<t;a++){var h=o[a],u=h.texArray,c=h.type,l=h.size,d=h.start,p=h.blend;s!==u&&(s=u,this.bindAndClearTexArray(u)),this.state.blendMode=p,n.set(this.state),i.drawElements(c,l,i.UNSIGNED_SHORT,2*d)}},e.prototype.flush=function(){0!==this._vertexCount&&(this._attributeBuffer=this.getAttributeBuffer(this._vertexCount),this._indexBuffer=this.getIndexBuffer(this._indexCount),this._aIndex=0,this._iIndex=0,this._dcIndex=0,this.buildTexturesAndDrawCalls(),this.updateGeometry(),this.drawBatches(),this._bufferSize=0,this._vertexCount=0,this._indexCount=0)},e.prototype.start=function(){this.renderer.state.set(this.state),this.renderer.shader.bind(this._shader),U.CAN_UPLOAD_SAME_BUFFER&&this.renderer.geometry.bind(this._packedGeometries[this._flushId])},e.prototype.stop=function(){this.flush()},e.prototype.destroy=function(){for(var e=0;e<this._packedGeometryPoolSize;e++)this._packedGeometries[e]&&this._packedGeometries[e].destroy();this.renderer.off("prerender",this.onPrerender,this),this._aBuffers=null,this._iBuffers=null,this._packedGeometries=null,this._attributeBuffer=null,this._indexBuffer=null,this._shader&&(this._shader.destroy(),this._shader=null),t.prototype.destroy.call(this)},e.prototype.getAttributeBuffer=function(t){var e=ut(Math.ceil(t/8)),r=lt(e),i=8*e;this._aBuffers.length<=r&&(this._iBuffers.length=r+1);var n=this._aBuffers[i];return n||(this._aBuffers[i]=n=new mi(i*this.vertexSize*4)),n},e.prototype.getIndexBuffer=function(t){var e=ut(Math.ceil(t/12)),r=lt(e),i=12*e;this._iBuffers.length<=r&&(this._iBuffers.length=r+1);var n=this._iBuffers[r];return n||(this._iBuffers[r]=n=new Uint16Array(i)),n},e.prototype.packInterleavedGeometry=function(t,e,r,i,n){for(var o=e.uint32View,s=e.float32View,a=i/this.vertexSize,h=t.uvs,u=t.indices,c=t.vertexData,l=t._texture.baseTexture._batchLocation,d=Math.min(t.worldAlpha,1),p=d<1&&t._texture.baseTexture.alphaMode?it(t._tintRGB,d):t._tintRGB+(255*d<<24),f=0;f<c.length;f+=2)s[i++]=c[f],s[i++]=c[f+1],s[i++]=h[f],s[i++]=h[f+1],o[i++]=p,s[i++]=l;for(var v=0;v<u.length;v++)r[n++]=a+u[v]},e}(or);xi._drawCallPool=[],xi._textureArrayPool=[];var bi=function(t,e){if(this.vertexSrc=t,this.fragTemplate=e,this.programCache={},this.defaultGroupCache={},e.indexOf("%count%")<0)throw new Error('Fragment template must contain "%count%".');if(e.indexOf("%forloop%")<0)throw new Error('Fragment template must contain "%forloop%".')};bi.prototype.generateShader=function(t){if(!this.programCache[t]){for(var e=new Int32Array(t),r=0;r<t;r++)e[r]=r;this.defaultGroupCache[t]=rr.from({uSamplers:e},!0);var i=this.fragTemplate;i=(i=i.replace(/%count%/gi,""+t)).replace(/%forloop%/gi,this.generateSampleSrc(t)),this.programCache[t]=new Nr(this.vertexSrc,i)}var n={tint:new Float32Array([1,1,1,1]),translationMatrix:new Nt,default:this.defaultGroupCache[t]};return new Ur(this.programCache[t],n)},bi.prototype.generateSampleSrc=function(t){var e="";e+="\n",e+="\n";for(var r=0;r<t;r++)r>0&&(e+="\nelse "),r<t-1&&(e+="if(vTextureId < "+r+".5)"),e+="\n{",e+="\n\tcolor = texture2D(uSamplers["+r+"], vTextureCoord);",e+="\n}";return e+="\n",e+="\n"};var Ti=function(t){function e(e){void 0===e&&(e=!1),t.call(this),this._buffer=new Ye(null,e,!1),this._indexBuffer=new Ye(null,e,!0),this.addAttribute("aVertexPosition",this._buffer,2,!1,C.FLOAT).addAttribute("aTextureCoord",this._buffer,2,!1,C.FLOAT).addAttribute("aColor",this._buffer,4,!0,C.UNSIGNED_BYTE).addAttribute("aTextureId",this._buffer,1,!0,C.FLOAT).addIndex(this._indexBuffer)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}($e),wi="precision highp float;\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\nattribute vec4 aColor;\nattribute float aTextureId;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform vec4 tint;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\nvarying float vTextureId;\n\nvoid main(void){\n    gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n    vTextureCoord = aTextureCoord;\n    vTextureId = aTextureId;\n    vColor = aColor * tint;\n}\n",Ei="varying vec2 vTextureCoord;\nvarying vec4 vColor;\nvarying float vTextureId;\nuniform sampler2D uSamplers[%count%];\n\nvoid main(void){\n    vec4 color;\n    %forloop%\n    gl_FragColor = color * vColor;\n}\n",Si=function(){},Ii={defaultVertexSrc:{configurable:!0},defaultFragmentTemplate:{configurable:!0}};Si.create=function(t){var e=Object.assign({vertex:wi,fragment:Ei,geometryClass:Ti,vertexSize:6},t),r=e.vertex,i=e.fragment,n=e.vertexSize,o=e.geometryClass;return function(t){function e(e){t.call(this,e),this.shaderGenerator=new bi(r,i),this.geometryClass=o,this.vertexSize=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(xi)},Ii.defaultVertexSrc.get=function(){return wi},Ii.defaultFragmentTemplate.get=function(){return Ei},Object.defineProperties(Si,Ii);var Pi=Si.create(),Ai=function t(e){var r=this;e=Object.assign({forceCanvas:!1},e),this.renderer=di(e),this.stage=new te,t._plugins.forEach((function(t){t.init.call(r,e)}))},Oi={view:{configurable:!0},screen:{configurable:!0}};
  /*!
   * @pixi/app - v5.2.3
   * Compiled Fri, 24 Apr 2020 00:55:22 UTC
   *
   * @pixi/app is licensed under the MIT License.
   * http://www.opensource.org/licenses/mit-license
   */Ai.registerPlugin=function(t){Ai._plugins.push(t)},Ai.prototype.render=function(){this.renderer.render(this.stage)},Oi.view.get=function(){return this.renderer.view},Oi.screen.get=function(){return this.renderer.screen},Ai.prototype.destroy=function(t,e){var r=this,i=Ai._plugins.slice(0);i.reverse(),i.forEach((function(t){t.destroy.call(r)})),this.stage.destroy(e),this.stage=null,this.renderer.destroy(t),this.renderer=null,this._options=null},Object.defineProperties(Ai.prototype,Oi),Ai._plugins=[];var Ci=function(){};Ci.init=function(t){var e=this;Object.defineProperty(this,"resizeTo",{set:function(t){window.removeEventListener("resize",this.resize),this._resizeTo=t,t&&(window.addEventListener("resize",this.resize),this.resize())},get:function(){return this._resizeTo}}),this.resize=function(){e._resizeTo&&(e._resizeTo===window?e.renderer.resize(window.innerWidth,window.innerHeight):e.renderer.resize(e._resizeTo.clientWidth,e._resizeTo.clientHeight))},this._resizeTo=null,this.resizeTo=t.resizeTo||null},Ci.destroy=function(){this.resizeTo=null,this.resize=null},Ai.registerPlugin(Ci);
  /*!
   * @pixi/extract - v5.2.3
   * Compiled Fri, 24 Apr 2020 00:55:22 UTC
   *
   * @pixi/extract is licensed under the MIT License.
   * http://www.opensource.org/licenses/mit-license
   */
  var Mi=new Yt,Ri=function(t){this.renderer=t,t.extract=this};Ri.prototype.image=function(t,e,r){var i=new Image;return i.src=this.base64(t,e,r),i},Ri.prototype.base64=function(t,e,r){return this.canvas(t).toDataURL(e,r)},Ri.prototype.canvas=function(t){var e,r,i,n=this.renderer,o=!1,s=!1;t&&(t instanceof Ge?i=t:(i=this.renderer.generateTexture(t),s=!0)),i?(e=i.baseTexture.resolution,r=i.frame,o=!1,n.renderTexture.bind(i)):(e=this.renderer.resolution,o=!0,(r=Mi).width=this.renderer.width,r.height=this.renderer.height,n.renderTexture.bind(null));var a=Math.floor(r.width*e+1e-4),h=Math.floor(r.height*e+1e-4),u=new wt(a,h,1),c=new Uint8Array(4*a*h),l=n.gl;l.readPixels(r.x*e,r.y*e,a,h,l.RGBA,l.UNSIGNED_BYTE,c);var d=u.context.getImageData(0,0,a,h);if(Ri.arrayPostDivide(c,d.data),u.context.putImageData(d,0,0),o){var p=new wt(u.width,u.height,1);p.context.scale(1,-1),p.context.drawImage(u.canvas,0,-h),u.destroy(),u=p}return s&&i.destroy(!0),u.canvas},Ri.prototype.pixels=function(t){var e,r,i,n=this.renderer,o=!1;t&&(t instanceof Ge?i=t:(i=this.renderer.generateTexture(t),o=!0)),i?(e=i.baseTexture.resolution,r=i.frame,n.renderTexture.bind(i)):(e=n.resolution,(r=Mi).width=n.width,r.height=n.height,n.renderTexture.bind(null));var s=r.width*e,a=r.height*e,h=new Uint8Array(4*s*a),u=n.gl;return u.readPixels(r.x*e,r.y*e,s,a,u.RGBA,u.UNSIGNED_BYTE,h),o&&i.destroy(!0),Ri.arrayPostDivide(h,h),h},Ri.prototype.destroy=function(){this.renderer.extract=null,this.renderer=null},Ri.arrayPostDivide=function(t,e){for(var r=0;r<t.length;r+=4){var i=e[r+3]=t[r+3];0!==i?(e[r]=Math.round(Math.min(255*t[r]/i,255)),e[r+1]=Math.round(Math.min(255*t[r+1]/i,255)),e[r+2]=Math.round(Math.min(255*t[r+2]/i,255))):(e[r]=t[r],e[r+1]=t[r+1],e[r+2]=t[r+2])}};var Di=r(52),Li=r.n(Di),Fi=r(13),Ni=r.n(Fi);
  /*!
   * resource-loader - v3.0.1
   * https://github.com/pixijs/pixi-sound
   * Compiled Tue, 02 Jul 2019 14:06:18 UTC
   *
   * resource-loader is licensed under the MIT license.
   * http://www.opensource.org/licenses/mit-license
   */
  function Bi(){}function Ui(t,e,r,i){var n=0,o=t.length;!function s(a){a||n===o?r&&r(a):i?setTimeout((function(){e(t[n++],s)}),1):e(t[n++],s)}()}function ki(t){return function(){if(null===t)throw new Error("Callback was already called.");var e=t;t=null,e.apply(this,arguments)}}function Xi(t,e){if(null==e)e=1;else if(0===e)throw new Error("Concurrency must not be zero");var r=0,i={_tasks:[],concurrency:e,saturated:Bi,unsaturated:Bi,buffer:e/4,empty:Bi,drain:Bi,error:Bi,started:!1,paused:!1,push:function(t,e){n(t,!1,e)},kill:function(){r=0,i.drain=Bi,i.started=!1,i._tasks=[]},unshift:function(t,e){n(t,!0,e)},process:function(){for(;!i.paused&&r<i.concurrency&&i._tasks.length;){var e=i._tasks.shift();0===i._tasks.length&&i.empty(),(r+=1)===i.concurrency&&i.saturated(),t(e.data,ki(o(e)))}},length:function(){return i._tasks.length},running:function(){return r},idle:function(){return i._tasks.length+r===0},pause:function(){!0!==i.paused&&(i.paused=!0)},resume:function(){if(!1!==i.paused){i.paused=!1;for(var t=1;t<=i.concurrency;t++)i.process()}}};function n(t,e,r){if(null!=r&&"function"!=typeof r)throw new Error("task callback must be a function");if(i.started=!0,null==t&&i.idle())setTimeout((function(){return i.drain()}),1);else{var n={data:t,callback:"function"==typeof r?r:Bi};e?i._tasks.unshift(n):i._tasks.push(n),setTimeout((function(){return i.process()}),1)}}function o(t){return function(){r-=1,t.callback.apply(t,arguments),null!=arguments[0]&&i.error(arguments[0],t.data),r<=i.concurrency-i.buffer&&i.unsaturated(),i.idle()&&i.drain(),i.process()}}return i}var ji={};function Gi(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function Hi(t,e,r){return e&&Gi(t.prototype,e),r&&Gi(t,r),t}var zi=!(!window.XDomainRequest||"withCredentials"in new XMLHttpRequest),Vi=null;function Yi(){}var Wi=function(){function t(e,r,i){if("string"!=typeof e||"string"!=typeof r)throw new Error("Both name and url are required for constructing a resource.");i=i||{},this._flags=0,this._setFlag(t.STATUS_FLAGS.DATA_URL,0===r.indexOf("data:")),this.name=e,this.url=r,this.extension=this._getExtension(),this.data=null,this.crossOrigin=!0===i.crossOrigin?"anonymous":i.crossOrigin,this.timeout=i.timeout||0,this.loadType=i.loadType||this._determineLoadType(),this.xhrType=i.xhrType,this.metadata=i.metadata||{},this.error=null,this.xhr=null,this.children=[],this.type=t.TYPE.UNKNOWN,this.progressChunk=0,this._dequeue=Yi,this._onLoadBinding=null,this._elementTimer=0,this._boundComplete=this.complete.bind(this),this._boundOnError=this._onError.bind(this),this._boundOnProgress=this._onProgress.bind(this),this._boundOnTimeout=this._onTimeout.bind(this),this._boundXhrOnError=this._xhrOnError.bind(this),this._boundXhrOnTimeout=this._xhrOnTimeout.bind(this),this._boundXhrOnAbort=this._xhrOnAbort.bind(this),this._boundXhrOnLoad=this._xhrOnLoad.bind(this),this.onStart=new Ni.a,this.onProgress=new Ni.a,this.onComplete=new Ni.a,this.onAfterMiddleware=new Ni.a}t.setExtensionLoadType=function(e,r){qi(t._loadTypeMap,e,r)},t.setExtensionXhrType=function(e,r){qi(t._xhrTypeMap,e,r)};var e=t.prototype;return e.complete=function(){this._clearEvents(),this._finish()},e.abort=function(e){if(!this.error){if(this.error=new Error(e),this._clearEvents(),this.xhr)this.xhr.abort();else if(this.xdr)this.xdr.abort();else if(this.data)if(this.data.src)this.data.src=t.EMPTY_GIF;else for(;this.data.firstChild;)this.data.removeChild(this.data.firstChild);this._finish()}},e.load=function(e){var r=this;if(!this.isLoading)if(this.isComplete)e&&setTimeout((function(){return e(r)}),1);else switch(e&&this.onComplete.once(e),this._setFlag(t.STATUS_FLAGS.LOADING,!0),this.onStart.dispatch(this),!1!==this.crossOrigin&&"string"==typeof this.crossOrigin||(this.crossOrigin=this._determineCrossOrigin(this.url)),this.loadType){case t.LOAD_TYPE.IMAGE:this.type=t.TYPE.IMAGE,this._loadElement("image");break;case t.LOAD_TYPE.AUDIO:this.type=t.TYPE.AUDIO,this._loadSourceElement("audio");break;case t.LOAD_TYPE.VIDEO:this.type=t.TYPE.VIDEO,this._loadSourceElement("video");break;case t.LOAD_TYPE.XHR:default:zi&&this.crossOrigin?this._loadXdr():this._loadXhr()}},e._hasFlag=function(t){return 0!=(this._flags&t)},e._setFlag=function(t,e){this._flags=e?this._flags|t:this._flags&~t},e._clearEvents=function(){clearTimeout(this._elementTimer),this.data&&this.data.removeEventListener&&(this.data.removeEventListener("error",this._boundOnError,!1),this.data.removeEventListener("load",this._boundComplete,!1),this.data.removeEventListener("progress",this._boundOnProgress,!1),this.data.removeEventListener("canplaythrough",this._boundComplete,!1)),this.xhr&&(this.xhr.removeEventListener?(this.xhr.removeEventListener("error",this._boundXhrOnError,!1),this.xhr.removeEventListener("timeout",this._boundXhrOnTimeout,!1),this.xhr.removeEventListener("abort",this._boundXhrOnAbort,!1),this.xhr.removeEventListener("progress",this._boundOnProgress,!1),this.xhr.removeEventListener("load",this._boundXhrOnLoad,!1)):(this.xhr.onerror=null,this.xhr.ontimeout=null,this.xhr.onprogress=null,this.xhr.onload=null))},e._finish=function(){if(this.isComplete)throw new Error("Complete called again for an already completed resource.");this._setFlag(t.STATUS_FLAGS.COMPLETE,!0),this._setFlag(t.STATUS_FLAGS.LOADING,!1),this.onComplete.dispatch(this)},e._loadElement=function(t){this.metadata.loadElement?this.data=this.metadata.loadElement:"image"===t&&void 0!==window.Image?this.data=new Image:this.data=document.createElement(t),this.crossOrigin&&(this.data.crossOrigin=this.crossOrigin),this.metadata.skipSource||(this.data.src=this.url),this.data.addEventListener("error",this._boundOnError,!1),this.data.addEventListener("load",this._boundComplete,!1),this.data.addEventListener("progress",this._boundOnProgress,!1),this.timeout&&(this._elementTimer=setTimeout(this._boundOnTimeout,this.timeout))},e._loadSourceElement=function(t){if(this.metadata.loadElement?this.data=this.metadata.loadElement:"audio"===t&&void 0!==window.Audio?this.data=new Audio:this.data=document.createElement(t),null!==this.data){if(this.crossOrigin&&(this.data.crossOrigin=this.crossOrigin),!this.metadata.skipSource)if(navigator.isCocoonJS)this.data.src=Array.isArray(this.url)?this.url[0]:this.url;else if(Array.isArray(this.url))for(var e=this.metadata.mimeType,r=0;r<this.url.length;++r)this.data.appendChild(this._createSource(t,this.url[r],Array.isArray(e)?e[r]:e));else{var i=this.metadata.mimeType;this.data.appendChild(this._createSource(t,this.url,Array.isArray(i)?i[0]:i))}this.data.addEventListener("error",this._boundOnError,!1),this.data.addEventListener("load",this._boundComplete,!1),this.data.addEventListener("progress",this._boundOnProgress,!1),this.data.addEventListener("canplaythrough",this._boundComplete,!1),this.data.load(),this.timeout&&(this._elementTimer=setTimeout(this._boundOnTimeout,this.timeout))}else this.abort("Unsupported element: "+t)},e._loadXhr=function(){"string"!=typeof this.xhrType&&(this.xhrType=this._determineXhrType());var e=this.xhr=new XMLHttpRequest;e.open("GET",this.url,!0),e.timeout=this.timeout,this.xhrType===t.XHR_RESPONSE_TYPE.JSON||this.xhrType===t.XHR_RESPONSE_TYPE.DOCUMENT?e.responseType=t.XHR_RESPONSE_TYPE.TEXT:e.responseType=this.xhrType,e.addEventListener("error",this._boundXhrOnError,!1),e.addEventListener("timeout",this._boundXhrOnTimeout,!1),e.addEventListener("abort",this._boundXhrOnAbort,!1),e.addEventListener("progress",this._boundOnProgress,!1),e.addEventListener("load",this._boundXhrOnLoad,!1),e.send()},e._loadXdr=function(){"string"!=typeof this.xhrType&&(this.xhrType=this._determineXhrType());var t=this.xhr=new XDomainRequest;t.timeout=this.timeout||5e3,t.onerror=this._boundXhrOnError,t.ontimeout=this._boundXhrOnTimeout,t.onprogress=this._boundOnProgress,t.onload=this._boundXhrOnLoad,t.open("GET",this.url,!0),setTimeout((function(){return t.send()}),1)},e._createSource=function(t,e,r){r||(r=t+"/"+this._getExtension(e));var i=document.createElement("source");return i.src=e,i.type=r,i},e._onError=function(t){this.abort("Failed to load element using: "+t.target.nodeName)},e._onProgress=function(t){t&&t.lengthComputable&&this.onProgress.dispatch(this,t.loaded/t.total)},e._onTimeout=function(){this.abort("Load timed out.")},e._xhrOnError=function(){var t=this.xhr;this.abort(Zi(t)+" Request failed. Status: "+t.status+', text: "'+t.statusText+'"')},e._xhrOnTimeout=function(){var t=this.xhr;this.abort(Zi(t)+" Request timed out.")},e._xhrOnAbort=function(){var t=this.xhr;this.abort(Zi(t)+" Request was aborted by the user.")},e._xhrOnLoad=function(){var e=this.xhr,r="",i=void 0===e.status?200:e.status;if(""!==e.responseType&&"text"!==e.responseType&&void 0!==e.responseType||(r=e.responseText),0===i&&(r.length>0||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,Vi||(Vi=document.createElement("a")),Vi.href=t;var r=!(t=Li()(Vi.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"}},Hi(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 qi(t,e,r){e&&0===e.indexOf(".")&&(e=e.substring(1)),e&&(t[e]=r)}function Zi(t){return t.toString().replace("object ","")}Wi.STATUS_FLAGS={NONE:0,DATA_URL:1,COMPLETE:2,LOADING:4},Wi.TYPE={UNKNOWN:0,JSON:1,XML:2,IMAGE:3,AUDIO:4,VIDEO:5,TEXT:6},Wi.LOAD_TYPE={XHR:1,IMAGE:2,AUDIO:3,VIDEO:4},Wi.XHR_RESPONSE_TYPE={DEFAULT:"text",BUFFER:"arraybuffer",BLOB:"blob",DOCUMENT:"document",JSON:"json",TEXT:"text"},Wi._loadTypeMap={gif:Wi.LOAD_TYPE.IMAGE,png:Wi.LOAD_TYPE.IMAGE,bmp:Wi.LOAD_TYPE.IMAGE,jpg:Wi.LOAD_TYPE.IMAGE,jpeg:Wi.LOAD_TYPE.IMAGE,tif:Wi.LOAD_TYPE.IMAGE,tiff:Wi.LOAD_TYPE.IMAGE,webp:Wi.LOAD_TYPE.IMAGE,tga:Wi.LOAD_TYPE.IMAGE,svg:Wi.LOAD_TYPE.IMAGE,"svg+xml":Wi.LOAD_TYPE.IMAGE,mp3:Wi.LOAD_TYPE.AUDIO,ogg:Wi.LOAD_TYPE.AUDIO,wav:Wi.LOAD_TYPE.AUDIO,mp4:Wi.LOAD_TYPE.VIDEO,webm:Wi.LOAD_TYPE.VIDEO},Wi._xhrTypeMap={xhtml:Wi.XHR_RESPONSE_TYPE.DOCUMENT,html:Wi.XHR_RESPONSE_TYPE.DOCUMENT,htm:Wi.XHR_RESPONSE_TYPE.DOCUMENT,xml:Wi.XHR_RESPONSE_TYPE.DOCUMENT,tmx:Wi.XHR_RESPONSE_TYPE.DOCUMENT,svg:Wi.XHR_RESPONSE_TYPE.DOCUMENT,tsx:Wi.XHR_RESPONSE_TYPE.DOCUMENT,gif:Wi.XHR_RESPONSE_TYPE.BLOB,png:Wi.XHR_RESPONSE_TYPE.BLOB,bmp:Wi.XHR_RESPONSE_TYPE.BLOB,jpg:Wi.XHR_RESPONSE_TYPE.BLOB,jpeg:Wi.XHR_RESPONSE_TYPE.BLOB,tif:Wi.XHR_RESPONSE_TYPE.BLOB,tiff:Wi.XHR_RESPONSE_TYPE.BLOB,webp:Wi.XHR_RESPONSE_TYPE.BLOB,tga:Wi.XHR_RESPONSE_TYPE.BLOB,json:Wi.XHR_RESPONSE_TYPE.JSON,text:Wi.XHR_RESPONSE_TYPE.TEXT,txt:Wi.XHR_RESPONSE_TYPE.TEXT,ttf:Wi.XHR_RESPONSE_TYPE.BUFFER,otf:Wi.XHR_RESPONSE_TYPE.BUFFER},Wi.EMPTY_GIF="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==";var Ki=window.URL||window.webkitURL;var Ji={caching:function(t,e){var r=this;ji[t.url]?(t.data=ji[t.url],t.complete()):t.onComplete.once((function(){return ji[r.url]=r.data})),e()},parsing:function(t,e){if(t.data){if(t.xhr&&t.xhrType===Wi.XHR_RESPONSE_TYPE.BLOB)if(window.Blob&&"string"!=typeof t.data){if(0===t.data.type.indexOf("image")){var r=Ki.createObjectURL(t.data);return t.blob=t.data,t.data=new Image,t.data.src=r,t.type=Wi.TYPE.IMAGE,void(t.data.onload=function(){Ki.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<t.length;){for(var i=[0,0,0],n=[0,0,0,0],o=0;o<i.length;++o)r<t.length?i[o]=255&t.charCodeAt(r++):i[o]=0;switch(n[0]=i[0]>>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;s<n.length;++s)e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(n[s])}return e}(t.xhr.responseText),t.type=Wi.TYPE.IMAGE,void(t.data.onload=function(){t.data.onload=null,e()})}e()}else e()}},$i=/(#[\w-]+)?$/,Qi=function(){function t(e,r){var i=this;void 0===e&&(e=""),void 0===r&&(r=10),this.baseUrl=e,this.progress=0,this.loading=!1,this.defaultQueryString="",this._beforeMiddleware=[],this._afterMiddleware=[],this._resourcesParsing=[],this._boundLoadResource=function(t,e){return i._loadResource(t,e)},this._queue=Xi(this._boundLoadResource,r),this._queue.pause(),this.resources={},this.onProgress=new Ni.a,this.onError=new Ni.a,this.onLoad=new Ni.a,this.onStart=new Ni.a,this.onComplete=new Ni.a;for(var n=0;n<t._defaultBeforeMiddleware.length;++n)this.pre(t._defaultBeforeMiddleware[n]);for(var o=0;o<t._defaultAfterMiddleware.length;++o)this.use(t._defaultAfterMiddleware[o])}var e=t.prototype;return e.add=function(t,e,r,i){if(Array.isArray(t)){for(var n=0;n<t.length;++n)this.add(t[n]);return this}if("object"==typeof t&&(i=e||t.callback||t.onComplete,r=t,e=t.url,t=t.name||t.key||t.url),"string"!=typeof e&&(i=r,r=e,e=t),"string"!=typeof e)throw new Error("No url passed to add resource to loader.");if("function"==typeof r&&(i=r,r=null),this.loading&&(!r||!r.parentResource))throw new Error("Cannot add resources while the loader is running.");if(this.resources[t])throw new Error('Resource named "'+t+'" already exists.');if(e=this._prepareUrl(e),this.resources[t]=new Wi(t,e,r),"function"==typeof i&&this.resources[t].onAfterMiddleware.once(i),this.loading){for(var o=r.parentResource,s=[],a=0;a<o.children.length;++a)o.children[a].isComplete||s.push(o.children[a]);var h=o.progressChunk*(s.length+1)/(s.length+2);o.children.push(this.resources[t]),o.progressChunk=h;for(var u=0;u<s.length;++u)s[u].progressChunk=h;this.resources[t].progressChunk=h}return this._queue.push(this.resources[t]),this},e.pre=function(t){return this._beforeMiddleware.push(t),this},e.use=function(t){return this._afterMiddleware.push(t),this},e.reset=function(){for(var t in this.progress=0,this.loading=!1,this._queue.kill(),this._queue.pause(),this.resources){var e=this.resources[t];e._onLoadBinding&&e._onLoadBinding.detach(),e.isLoading&&e.abort()}return this.resources={},this},e.load=function(t){if("function"==typeof t&&this.onComplete.once(t),this.loading)return this;if(this._queue.idle())this._onStart(),this._onComplete();else{for(var e=100/this._queue._tasks.length,r=0;r<this._queue._tasks.length;++r)this._queue._tasks[r].data.progressChunk=e;this._onStart(),this._queue.resume()}return this},e._prepareUrl=function(t){var e,r=Li()(t,{strictMode:!0});if(e=r.protocol||!r.path||0===t.indexOf("//")?t:this.baseUrl.length&&this.baseUrl.lastIndexOf("/")!==this.baseUrl.length-1&&"/"!==t.charAt(0)?this.baseUrl+"/"+t:this.baseUrl+t,this.defaultQueryString){var i=$i.exec(e)[0];-1!==(e=e.substr(0,e.length-i.length)).indexOf("?")?e+="&"+this.defaultQueryString:e+="?"+this.defaultQueryString,e+=i}return e},e._loadResource=function(t,e){var r=this;t._dequeue=e,Ui(this._beforeMiddleware,(function(e,i){e.call(r,t,(function(){i(t.isComplete?{}:null)}))}),(function(){t.isComplete?r._onLoad(t):(t._onLoadBinding=t.onComplete.once(r._onLoad,r),t.load())}),!0)},e._onStart=function(){this.progress=0,this.loading=!0,this.onStart.dispatch(this)},e._onComplete=function(){this.progress=100,this.loading=!1,this.onComplete.dispatch(this,this.resources)},e._onLoad=function(t){var e=this;t._onLoadBinding=null,this._resourcesParsing.push(t),t._dequeue(),Ui(this._afterMiddleware,(function(r,i){r.call(e,t,i)}),(function(){t.onAfterMiddleware.dispatch(t),e.progress=Math.min(100,e.progress+t.progressChunk),e.onProgress.dispatch(e,t),t.error?e.onError.dispatch(t.error,e,t):e.onLoad.dispatch(e,t),e._resourcesParsing.splice(e._resourcesParsing.indexOf(t),1),e._queue.idle()&&0===e._resourcesParsing.length&&e._onComplete()}),!0)},Hi(t,[{key:"concurrency",get:function(){return this._queue.concurrency},set:function(t){this._queue.concurrency=t}}]),t}();Qi._defaultBeforeMiddleware=[],Qi._defaultAfterMiddleware=[],Qi.pre=function(t){return Qi._defaultBeforeMiddleware.push(t),Qi},Qi.use=function(t){return Qi._defaultAfterMiddleware.push(t),Qi};
  /*!
   * @pixi/loaders - v5.2.3
   * Compiled Fri, 24 Apr 2020 00:55:22 UTC
   *
   * @pixi/loaders is licensed under the MIT License.
   * http://www.opensource.org/licenses/mit-license
   */
  var tn=function(){};tn.use=function(t,e){t.data&&t.type===Wi.TYPE.IMAGE&&(t.texture=Xe.fromLoader(t.data,t.url,t.name)),e()};var en=function(t){function e(r,i){var n=this;t.call(this,r,i),X.a.call(this);for(var o=0;o<e._plugins.length;++o){var s=e._plugins[o],a=s.pre,h=s.use;a&&this.pre(a),h&&this.use(h)}this.onStart.add((function(t){return n.emit("start",t)})),this.onProgress.add((function(t,e){return n.emit("progress",t,e)})),this.onError.add((function(t,e,r){return n.emit("error",t,e,r)})),this.onLoad.add((function(t,e){return n.emit("load",t,e)})),this.onComplete.add((function(t,e){return n.emit("complete",t,e)})),this._protected=!1}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={shared:{configurable:!0}};return e.prototype.destroy=function(){this._protected||(this.removeAllListeners(),this.reset())},r.shared.get=function(){var t=e._shared;return t||((t=new e)._protected=!0,e._shared=t),t},Object.defineProperties(e,r),e}(Qi);Object.assign(en.prototype,X.a.prototype),en._plugins=[],en.registerPlugin=function(t){return en._plugins.push(t),t.add&&t.add(),en},en.registerPlugin({use:Ji.parsing}),en.registerPlugin(tn);var rn=function(){};rn.init=function(t){t=Object.assign({sharedLoader:!1},t),this.loader=t.sharedLoader?en.shared:new en},rn.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)};var nn=Wi,on=function(t){function e(e,r,i,n){void 0===e&&(e=1500),void 0===i&&(i=16384),void 0===n&&(n=!1),t.call(this);i>16384&&(i=16384),this._properties=[!1,!0,!1,!1,!1],this._maxSize=e,this._batchSize=i,this._buffers=null,this._bufferUpdateIDs=[],this._updateID=0,this.interactiveChildren=!1,this.blendMode=I.NORMAL,this.autoResize=n,this.roundPixels=!0,this.baseTexture=null,this.setProperties(r),this._tint=0,this.tintRgb=new Float32Array(4),this.tint=16777215}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={tint:{configurable:!0}};return 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()},r.tint.get=function(){return this._tint},r.tint.set=function(t){this._tint=t,K(t,this.tintRgb)},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.length<e;)this._bufferUpdateIDs.push(0);this._bufferUpdateIDs[e]=++this._updateID},e.prototype.dispose=function(){if(this._buffers){for(var t=0;t<this._buffers.length;++t)this._buffers[t].destroy();this._buffers=null}},e.prototype.destroy=function(e){t.prototype.destroy.call(this,e),this.dispose(),this._properties=null,this._buffers=null,this._bufferUpdateIDs=null},Object.defineProperties(e.prototype,r),e}(te),sn=function(t,e,r){this.geometry=new $e,this.indexBuffer=null,this.size=r,this.dynamicProperties=[],this.staticProperties=[];for(var i=0;i<t.length;++i){var n=t[i];n={attributeName:n.attributeName,size:n.size,uploadFunction:n.uploadFunction,type:n.type||C.FLOAT,offset:n.offset},e[i]?this.dynamicProperties.push(n):this.staticProperties.push(n)}this.staticStride=0,this.staticBuffer=null,this.staticData=null,this.staticDataUint32=null,this.dynamicStride=0,this.dynamicBuffer=null,this.dynamicData=null,this.dynamicDataUint32=null,this._updateID=0,this.initBuffers()};
  /*!
   * @pixi/particles - v5.2.3
   * Compiled Fri, 24 Apr 2020 00:55:22 UTC
   *
   * @pixi/particles is licensed under the MIT License.
   * http://www.opensource.org/licenses/mit-license
   */sn.prototype.initBuffers=function(){var t=this.geometry,e=0;this.indexBuffer=new Ye(ot(this.size),!0,!0),t.addIndex(this.indexBuffer),this.dynamicStride=0;for(var r=0;r<this.dynamicProperties.length;++r){var i=this.dynamicProperties[r];i.offset=e,e+=i.size,this.dynamicStride+=i.size}var n=new ArrayBuffer(this.size*this.dynamicStride*4*4);this.dynamicData=new Float32Array(n),this.dynamicDataUint32=new Uint32Array(n),this.dynamicBuffer=new Ye(this.dynamicData,!1,!1);var o=0;this.staticStride=0;for(var s=0;s<this.staticProperties.length;++s){var a=this.staticProperties[s];a.offset=o,o+=a.size,this.staticStride+=a.size}var h=new ArrayBuffer(this.size*this.staticStride*4*4);this.staticData=new Float32Array(h),this.staticDataUint32=new Uint32Array(h),this.staticBuffer=new Ye(this.staticData,!0,!1);for(var u=0;u<this.dynamicProperties.length;++u){var c=this.dynamicProperties[u];t.addAttribute(c.attributeName,this.dynamicBuffer,0,c.type===C.UNSIGNED_BYTE,c.type,4*this.dynamicStride,4*c.offset)}for(var l=0;l<this.staticProperties.length;++l){var d=this.staticProperties[l];t.addAttribute(d.attributeName,this.staticBuffer,0,d.type===C.UNSIGNED_BYTE,d.type,4*this.staticStride,4*d.offset)}},sn.prototype.uploadDynamic=function(t,e,r){for(var i=0;i<this.dynamicProperties.length;i++){var n=this.dynamicProperties[i];n.uploadFunction(t,e,r,n.type===C.UNSIGNED_BYTE?this.dynamicDataUint32:this.dynamicData,this.dynamicStride,n.offset)}this.dynamicBuffer._updateID++},sn.prototype.uploadStatic=function(t,e,r){for(var i=0;i<this.staticProperties.length;i++){var n=this.staticProperties[i];n.uploadFunction(t,e,r,n.type===C.UNSIGNED_BYTE?this.staticDataUint32:this.staticData,this.staticStride,n.offset)}this.staticBuffer._updateID++},sn.prototype.destroy=function(){this.indexBuffer=null,this.dynamicProperties=null,this.dynamicBuffer=null,this.dynamicData=null,this.dynamicDataUint32=null,this.staticProperties=null,this.staticBuffer=null,this.staticData=null,this.staticDataUint32=null,this.geometry.destroy()};var an=function(t){function e(e){t.call(this,e),this.shader=null,this.properties=null,this.tempMatrix=new Nt,this.properties=[{attributeName:"aVertexPosition",size:2,uploadFunction:this.uploadVertices,offset:0},{attributeName:"aPositionCoord",size:2,uploadFunction:this.uploadPosition,offset:0},{attributeName:"aRotation",size:1,uploadFunction:this.uploadRotation,offset:0},{attributeName:"aTextureCoord",size:2,uploadFunction:this.uploadUvs,offset:0},{attributeName:"aColor",size:1,type:C.UNSIGNED_BYTE,uploadFunction:this.uploadTint,offset:0}],this.shader=Ur.from("attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\nattribute vec4 aColor;\n\nattribute vec2 aPositionCoord;\nattribute float aRotation;\n\nuniform mat3 translationMatrix;\nuniform vec4 uColor;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nvoid main(void){\n    float x = (aVertexPosition.x) * cos(aRotation) - (aVertexPosition.y) * sin(aRotation);\n    float y = (aVertexPosition.x) * sin(aRotation) + (aVertexPosition.y) * cos(aRotation);\n\n    vec2 v = vec2(x, y);\n    v = v + aPositionCoord;\n\n    gl_Position = vec4((translationMatrix * vec3(v, 1.0)).xy, 0.0, 1.0);\n\n    vTextureCoord = aTextureCoord;\n    vColor = aColor * uColor;\n}\n","varying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nuniform sampler2D uSampler;\n\nvoid main(void){\n    vec4 color = texture2D(uSampler, vTextureCoord) * vColor;\n    gl_FragColor = color;\n}",{}),this.state=Xr.for2d()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(t){var e=t.children,r=t._maxSize,i=t._batchSize,n=this.renderer,o=e.length;if(0!==o){o>r&&!t.autoResize&&(o=r);var s=t._buffers;s||(s=t._buffers=this.generateBuffers(t));var a=e[0]._texture.baseTexture;this.state.blendMode=et(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=rt(t.tintRgb,t.worldAlpha,this.shader.uniforms.uColor,a.alphaMode),this.shader.uniforms.uSampler=a,this.renderer.shader.bind(this.shader);for(var c=!1,l=0,d=0;l<o;l+=i,d+=1){var p=o-l;p>i&&(p=i),d>=s.length&&s.push(this._generateOneMoreBuffer(t));var f=s[d];f.uploadDynamic(e,l,p);var v=t._bufferUpdateIDs[d]||0;(c=c||f._updateID<v)&&(f._updateID=t._updateID,f.uploadStatic(e,l,p)),n.geometry.bind(f.geometry),h.drawElements(h.TRIANGLES,6*p,h.UNSIGNED_SHORT,0)}}},e.prototype.generateBuffers=function(t){for(var e=[],r=t._maxSize,i=t._batchSize,n=t._properties,o=0;o<r;o+=i)e.push(new sn(this.properties,n,i));return e},e.prototype._generateOneMoreBuffer=function(t){var e=t._batchSize,r=t._properties;return new sn(this.properties,r,e)},e.prototype.uploadVertices=function(t,e,r,i,n,o){for(var s=0,a=0,h=0,u=0,c=0;c<r;++c){var l=t[e+c],d=l._texture,p=l.scale.x,f=l.scale.y,v=d.trim,y=d.orig;v?(s=(a=v.x-l.anchor.x*y.width)+v.width,h=(u=v.y-l.anchor.y*y.height)+v.height):(s=y.width*(1-l.anchor.x),a=y.width*-l.anchor.x,h=y.height*(1-l.anchor.y),u=y.height*-l.anchor.y),i[o]=a*p,i[o+1]=u*f,i[o+n]=s*p,i[o+n+1]=u*f,i[o+2*n]=s*p,i[o+2*n+1]=h*f,i[o+3*n]=a*p,i[o+3*n+1]=h*f,o+=4*n}},e.prototype.uploadPosition=function(t,e,r,i,n,o){for(var s=0;s<r;s++){var a=t[e+s].position;i[o]=a.x,i[o+1]=a.y,i[o+n]=a.x,i[o+n+1]=a.y,i[o+2*n]=a.x,i[o+2*n+1]=a.y,i[o+3*n]=a.x,i[o+3*n+1]=a.y,o+=4*n}},e.prototype.uploadRotation=function(t,e,r,i,n,o){for(var s=0;s<r;s++){var a=t[e+s].rotation;i[o]=a,i[o+n]=a,i[o+2*n]=a,i[o+3*n]=a,o+=4*n}},e.prototype.uploadUvs=function(t,e,r,i,n,o){for(var s=0;s<r;++s){var a=t[e+s]._texture._uvs;a?(i[o]=a.x0,i[o+1]=a.y0,i[o+n]=a.x1,i[o+n+1]=a.y1,i[o+2*n]=a.x2,i[o+2*n+1]=a.y2,i[o+3*n]=a.x3,i[o+3*n+1]=a.y3,o+=4*n):(i[o]=0,i[o+1]=0,i[o+n]=0,i[o+n+1]=0,i[o+2*n]=0,i[o+2*n+1]=0,i[o+3*n]=0,i[o+3*n+1]=0,o+=4*n)}},e.prototype.uploadTint=function(t,e,r,i,n,o){for(var s=0;s<r;++s){var a=t[e+s],h=a._texture.baseTexture.alphaMode>0,u=a.alpha,c=u<1&&h?it(a._tintRGB,u):a._tintRGB+(255*u<<24);i[o]=c,i[o+n]=c,i[o+2*n]=c,i[o+3*n]=c,o+=4*n}},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.shader&&(this.shader.destroy(),this.shader=null),this.tempMatrix=null},e}(or),hn={adaptive:!0,maxLength:10,minSegments:8,maxSegments:2048,_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 r<this.minSegments?r=this.minSegments:r>this.maxSegments&&(r=this.maxSegments),r}},un=function(){this.reset()};un.prototype.clone=function(){var t=new un;return t.color=this.color,t.alpha=this.alpha,t.texture=this.texture,t.matrix=this.matrix,t.visible=this.visible,t},un.prototype.reset=function(){this.color=16777215,this.alpha=1,this.texture=Xe.WHITE,this.matrix=null,this.visible=!1},un.prototype.destroy=function(){this.texture=null,this.matrix=null};var cn={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;a<i.length;a++){var h=i[a];s.push(r.length/2),r=r.concat(h.points)}var u=G()(r,s,2);if(!u)return;for(var c=n.length/2,l=0;l<u.length;l+=3)o.push(u[l]+c),o.push(u[l+1]+c),o.push(u[l+2]+c);for(var d=0;d<r.length;d++)n.push(r[d])}}},ln={build:function(t){var e,r,i=t.shape,n=t.points,o=i.x,s=i.y;if(n.length=0,t.type===Ct.CIRC?(e=i.radius,r=i.radius):(e=i.width,r=i.height),0!==e&&0!==r){var a=Math.floor(30*Math.sqrt(i.radius))||Math.floor(15*Math.sqrt(i.width+i.height));a/=2.3;for(var h=2*Math.PI/a,u=0;u<a-.5;u++)n.push(o+Math.sin(-h*u)*e,s+Math.cos(-h*u)*r);n.push(n[0],n[1])}},triangulate:function(t,e){var r=t.points,i=e.points,n=e.indices,o=i.length/2,s=o,a=t.shape,h=t.matrix,u=a.x,c=a.y;i.push(t.matrix?h.a*u+h.c*c+h.tx:u,t.matrix?h.b*u+h.d*c+h.ty:c);for(var l=0;l<r.length;l+=2)i.push(r[l],r[l+1]),n.push(o++,s,o)}},dn={build:function(t){var e=t.shape,r=e.x,i=e.y,n=e.width,o=e.height,s=t.points;s.length=0,s.push(r,i,r+n,i,r+n,i+o,r,i+o)},triangulate:function(t,e){var r=t.points,i=e.points,n=i.length/2;i.push(r[0],r[1],r[2],r[3],r[6],r[7],r[4],r[5]),e.indices.push(n,n+1,n+2,n+1,n+2,n+3)}},pn={build:function(t){var e=t.shape,r=t.points,i=e.x,n=e.y,o=e.width,s=e.height,a=Math.max(0,Math.min(e.radius,Math.min(o,s)/2));r.length=0,a?(vn(i,n+a,i,n,i+a,n,r),vn(i+o-a,n,i+o,n,i+o,n+a,r),vn(i+o,n+s-a,i+o,n+s,i+o-a,n+s,r),vn(i+a,n+s,i,n+s,i,n+s-a,r)):r.push(i,n,i+o,n,i+o,n+s,i,n+s)},triangulate:function(t,e){for(var r=t.points,i=e.points,n=e.indices,o=i.length/2,s=G()(r,null,2),a=0,h=s.length;a<h;a+=3)n.push(s[a]+o),n.push(s[a+1]+o),n.push(s[a+2]+o);for(var u=0,c=r.length;u<c;u++)i.push(r[u],r[++u])}};function fn(t,e,r){return t+(e-t)*r}function vn(t,e,r,i,n,o,s){void 0===s&&(s=[]);for(var a=s,h=0,u=0,c=0,l=0,d=0,p=0,f=0,v=0;f<=20;++f)h=fn(t,r,v=f/20),u=fn(e,i,v),c=fn(r,n,v),l=fn(i,o,v),d=fn(h,c,v),p=fn(u,l,v),a.push(d,p);return a}function yn(t,e){t.lineStyle.native?function(t,e){var r=0,i=t.shape,n=t.points||i.points,o=i.type!==Ct.POLY||i.closeStroke;if(0===n.length)return;var s=e.points,a=e.indices,h=n.length/2,u=s.length/2,c=u;for(s.push(n[0],n[1]),r=1;r<h;r++)s.push(n[2*r],n[2*r+1]),a.push(c,c+1),c++;o&&a.push(c,u)}(t,e):function(t,e){var r=t.shape,i=t.points||r.points.slice(),n=e.closePointEps;if(0===i.length)return;var o=t.lineStyle,s=new Mt(i[0],i[1]),a=new Mt(i[i.length-2],i[i.length-1]),h=r.type!==Ct.POLY||r.closeStroke,u=Math.abs(s.x-a.x)<n&&Math.abs(s.y-a.y)<n;if(h){i=i.slice(),u&&(i.pop(),i.pop(),a.set(i[i.length-2],i[i.length-1]));var c=a.x+.5*(s.x-a.x),l=a.y+.5*(s.y-a.y);i.unshift(c,l),i.push(c,l)}var d=e.points,p=i.length/2,f=i.length,v=d.length/2,y=o.width/2,g=i[0],m=i[1],_=i[2],x=i[3],b=0,T=0,w=-(m-x),E=g-_,S=0,I=0,P=0,A=0,O=Math.sqrt(w*w+E*E);w/=O,E/=O,w*=y,E*=y;var C=o.alignment,M=2*(1-C),R=2*C;d.push(g-w*M,m-E*M),d.push(g+w*R,m+E*R);for(var D=1;D<p-1;++D){g=i[2*(D-1)],m=i[2*(D-1)+1],_=i[2*D],x=i[2*D+1],b=i[2*(D+1)],T=i[2*(D+1)+1],w=-(m-x),E=g-_,O=Math.sqrt(w*w+E*E),w/=O,E/=O,w*=y,E*=y,S=-(x-T),I=_-b,O=Math.sqrt(S*S+I*I),S/=O,I/=O;var L=-E+m-(-E+x),F=-w+_-(-w+g),N=(-w+g)*(-E+x)-(-w+_)*(-E+m),B=-(I*=y)+T-(-I+x),U=-(S*=y)+_-(-S+b),k=(-S+b)*(-I+x)-(-S+_)*(-I+T),X=L*U-B*F;if(Math.abs(X)<.1)X+=10.1,d.push(_-w*M,x-E*M),d.push(_+w*R,x+E*R);else{var j=(F*k-U*N)/X,G=(B*N-L*k)/X;(j-_)*(j-_)+(G-x)*(G-x)>196*y*y?(P=w-S,A=E-I,O=Math.sqrt(P*P+A*A),P/=O,A/=O,P*=y,A*=y,d.push(_-P*M,x-A*M),d.push(_+P*R,x+A*R),d.push(_-P*R*M,x-A*M),f++):(d.push(_+(j-_)*M,x+(G-x)*M),d.push(_-(j-_)*R,x-(G-x)*R))}}g=i[2*(p-2)],m=i[2*(p-2)+1],_=i[2*(p-1)],x=i[2*(p-1)+1],w=-(m-x),E=g-_,O=Math.sqrt(w*w+E*E),w/=O,E/=O,w*=y,E*=y,d.push(_-w*M,x-E*M),d.push(_+w*R,x+E*R);for(var H=e.indices,z=0;z<f-2;++z)H.push(v,v+1,v+2),v++}(t,e)}var gn=function(t){function e(e,r,i,n,o,s){o=o||n/2;for(var a=-1*Math.PI/2+s,h=2*i,u=Dt/h,c=[],l=0;l<h;l++){var d=l%2?o:n,p=l*u+a;c.push(e+d*Math.cos(p),r+d*Math.sin(p))}t.call(this,c)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Zt),mn=function(){};mn.curveTo=function(t,e,r,i,n,o){var s=o[o.length-2],a=o[o.length-1]-e,h=s-t,u=i-e,c=r-t,l=Math.abs(a*c-h*u);if(l<1e-8||0===n)return o[o.length-2]===t&&o[o.length-1]===e||o.push(t,e),null;var d=a*a+h*h,p=u*u+c*c,f=a*u+h*c,v=n*Math.sqrt(d)/l,y=n*Math.sqrt(p)/l,g=v*f/d,m=y*f/p,_=v*c+y*h,x=v*u+y*a,b=h*(y+g),T=a*(y+g),w=c*(v+m),E=u*(v+m);return{cx:_+t,cy:x+e,radius:n,startAngle:Math.atan2(T-x,b-_),endAngle:Math.atan2(E-x,w-_),anticlockwise:h*u>c*a}},mn.arc=function(t,e,r,i,n,o,s,a,h){for(var u=s-o,c=hn._segmentsCount(Math.abs(u)*n,40*Math.ceil(Math.abs(u)/Dt)),l=u/(2*c),d=2*l,p=Math.cos(l),f=Math.sin(l),v=c-1,y=v%1/v,g=0;g<=v;++g){var m=l+o+d*(g+y*g),_=Math.cos(m),x=-Math.sin(m);h.push((p*_+f*x)*n+r,(p*-x+f*_)*n+i)}};var _n=function(){};_n.curveLength=function(t,e,r,i,n,o,s,a){for(var h=0,u=0,c=0,l=0,d=0,p=0,f=0,v=0,y=0,g=0,m=0,_=t,x=e,b=1;b<=10;++b)g=_-(v=(f=(p=(d=1-(u=b/10))*d)*d)*t+3*p*u*r+3*d*(c=u*u)*n+(l=c*u)*s),m=x-(y=f*e+3*p*u*i+3*d*c*o+l*a),_=v,x=y,h+=Math.sqrt(g*g+m*m);return h},_n.curveTo=function(t,e,r,i,n,o,s){var a=s[s.length-2],h=s[s.length-1];s.length-=2;var u=hn._segmentsCount(_n.curveLength(a,h,t,e,r,i,n,o)),c=0,l=0,d=0,p=0,f=0;s.push(a,h);for(var v=1,y=0;v<=u;++v)d=(l=(c=1-(y=v/u))*c)*c,f=(p=y*y)*y,s.push(d*a+3*l*y*t+3*c*p*r+f*n,d*h+3*l*y*e+3*c*p*i+f*o)};var xn=function(){};xn.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,c=4*(s*s+a*a),l=4*(s*h+a*u),d=h*h+u*u,p=2*Math.sqrt(c+l+d),f=Math.sqrt(c),v=2*c*f,y=2*Math.sqrt(d),g=l/f;return(v*p+f*l*(p-y)+(4*d*c-l*l)*Math.log((2*f+g+p)/(g+y)))/(4*v)},xn.curveTo=function(t,e,r,i,n){for(var o=n[n.length-2],s=n[n.length-1],a=hn._segmentsCount(xn.curveLength(o,s,t,e,r,i)),h=0,u=0,c=1;c<=a;++c){var l=c/a;h=o+(t-o)*l,u=s+(e-s)*l,n.push(h+(t+(r-t)*l-h)*l,u+(e+(i-e)*l-u)*l)}};var bn=function(){this.reset()};bn.prototype.begin=function(t,e,r){this.reset(),this.style=t,this.start=e,this.attribStart=r},bn.prototype.end=function(t,e){this.attribSize=e-this.attribStart,this.size=t-this.start},bn.prototype.reset=function(){this.style=null,this.size=0,this.start=0,this.attribStart=0,this.attribSize=0};var Tn={};Tn[Ct.POLY]=cn,Tn[Ct.CIRC]=ln,Tn[Ct.ELIP]=ln,Tn[Ct.RECT]=dn,Tn[Ct.RREC]=pn;var wn=[],En=[],Sn={buildPoly:cn,buildCircle:ln,buildRectangle:dn,buildRoundedRectangle:pn,FILL_COMMANDS:Tn,BATCH_POOL:wn,DRAW_CALL_POOL:En,buildLine:yn,buildComplexPoly:function(t,e){var r=t.points.slice();if(!(r.length<6)){var i=e.indices;e.points=r,e.alpha=t.fillAlpha,e.color=K(t.fillColor);for(var n=1/0,o=-1/0,s=1/0,a=-1/0,h=0,u=0,c=0;c<r.length;c+=2)n=(h=r[c])<n?h:n,o=h>o?h:o,s=(u=r[c+1])<s?u:s,a=u>a?u:a;r.push(n,s,o,s,o,a,n,a);for(var l=r.length/2,d=0;d<l;d++)i.push(d)}},bezierCurveTo:function(t,e,r,i,n,o,s,a,h,u){void 0===u&&(u=[]);var c=0,l=0,d=0,p=0,f=0;u.push(t,e);for(var v=1,y=0;v<=h;++v)d=(l=(c=1-(y=v/h))*c)*c,f=(p=y*y)*y,u.push(d*t+3*l*y*r+3*c*p*n+f*s,d*e+3*l*y*i+3*c*p*o+f*a);return u},Star:gn,ArcUtils:mn,BezierUtils:_n,QuadraticUtils:xn,BatchPart:bn},In=function(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=[]};In.prototype.clone=function(){return new In(this.shape,this.fillStyle,this.lineStyle,this.matrix)},In.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};var Pn=new Mt,An=new Jt,On=function(t){function e(){t.call(this),this.points=[],this.colors=[],this.uvs=[],this.indices=[],this.textureIds=[],this.graphicsData=[],this.dirty=0,this.batchDirty=-1,this.cacheDirty=-1,this.clearDirty=0,this.drawCalls=[],this.batches=[],this.shapeIndex=0,this._bounds=new Jt,this.boundsDirty=-1,this.boundsPadding=0,this.batchable=!1,this.indicesUint16=null,this.uvsFloat32=null,this.closePointEps=1e-4}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={bounds:{configurable:!0}};return r.bounds.get=function(){return this.boundsDirty!==this.dirty&&(this.boundsDirty=this.dirty,this.calculateBounds()),this._bounds},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;t<this.drawCalls.length;t++)this.drawCalls[t].textures.length=0,En.push(this.drawCalls[t]);this.drawCalls.length=0;for(var e=0;e<this.batches.length;e++){var r=this.batches[e];r.reset(),wn.push(r)}this.batches.length=0},e.prototype.clear=function(){return this.graphicsData.length>0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this},e.prototype.drawShape=function(t,e,r,i){var n=new In(t,e,r,i);return this.graphicsData.push(n),this.dirty++,this},e.prototype.drawHole=function(t,e){if(!this.graphicsData.length)return null;var r=new In(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(e){t.prototype.destroy.call(this,e);for(var r=0;r<this.graphicsData.length;++r)this.graphicsData[r].destroy();this.points.length=0,this.points=null,this.colors.length=0,this.colors=null,this.uvs.length=0,this.uvs=null,this.indices.length=0,this.indices=null,this.indexBuffer.destroy(),this.indexBuffer=null,this.graphicsData.length=0,this.graphicsData=null,this.drawCalls.length=0,this.drawCalls=null,this.batches.length=0,this.batches=null,this._bounds=null},e.prototype.containsPoint=function(t){for(var e=this.graphicsData,r=0;r<e.length;++r){var i=e[r];if(i.fillStyle.visible&&(i.shape&&(i.matrix?i.matrix.applyInverse(t,Pn):Pn.copyFrom(t),i.shape.contains(Pn.x,Pn.y)))){var n=!1;if(i.holes)for(var o=0;o<i.holes.length;o++){if(i.holes[o].shape.contains(Pn.x,Pn.y)){n=!0;break}}if(!n)return!0}}return!1},e.prototype.updateBatches=function(){if(this.graphicsData.length){if(this.validateBatching()){this.cacheDirty=this.dirty;var t=this.uvs,e=this.graphicsData,r=null,i=null;this.batches.length>0&&(i=(r=this.batches[this.batches.length-1]).style);for(var n=this.shapeIndex;n<e.length;n++){this.shapeIndex++;var o=e[n],s=o.fillStyle,a=o.lineStyle;Tn[o.type].build(o),o.matrix&&this.transformPoints(o.points,o.matrix);for(var h=0;h<2;h++){var u=0===h?s:a;if(u.visible){var c=u.texture.baseTexture,l=this.indices.length,d=this.points.length/2;c.wrapMode=R.REPEAT,0===h?this.processFill(o):this.processLine(o);var p=this.points.length/2-d;0!==p&&(r&&!this._compareStyles(i,u)&&(r.end(l,d),r=null),r||((r=wn.pop()||new bn).begin(u,l,d),this.batches.push(r),i=u),this.addUvs(this.points,t,u.texture,d,p,u.matrix))}}}if(r){var f=this.indices.length,v=this.points.length/2;r.end(f,v)}0!==this.batches.length?(this.indicesUint16=new Uint16Array(this.indices),this.batchable=this.isBatchable(),this.batchable?this.packBatches():this.buildDrawCalls()):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;t<e;t++){var r=this.graphicsData[t],i=r.fillStyle,n=r.lineStyle;if(i&&!i.texture.baseTexture.valid)return!1;if(n&&!n.texture.baseTexture.valid)return!1}return!0},e.prototype.packBatches=function(){this.batchDirty++,this.uvsFloat32=new Float32Array(this.uvs);for(var t=this.batches,e=0,r=t.length;e<r;e++)for(var i=t[e],n=0;n<i.size;n++){var o=i.start+n;this.indicesUint16[o]=this.indicesUint16[o]-i.attribStart}},e.prototype.isBatchable=function(){for(var t=this.batches,r=0;r<t.length;r++)if(t[r].style.native)return!1;return this.points.length<2*e.BATCHABLE_SIZE},e.prototype.buildDrawCalls=function(){for(var t=++Se._globalBatch,e=0;e<this.drawCalls.length;e++)this.drawCalls[e].textures.length=0,En.push(this.drawCalls[e]);this.drawCalls.length=0;var r=this.colors,i=this.textureIds,n=En.pop();n||((n=new yi).textures=new gi),n.textures.count=0,n.start=0,n.size=0,n.type=P.TRIANGLES;var o=0,s=null,a=0,h=!1,u=P.TRIANGLES,c=0;this.drawCalls.push(n);for(var l=0;l<this.batches.length;l++){var d=this.batches[l],p=d.style,f=p.texture.baseTexture;h!==!!p.native&&(u=(h=!!p.native)?P.LINES:P.TRIANGLES,s=null,o=8,t++),s!==f&&(s=f,f._batchEnabled!==t&&(8===o&&(t++,o=0,n.size>0&&((n=En.pop())||((n=new yi).textures=new gi),this.drawCalls.push(n)),n.start=c,n.size=0,n.textures.count=0,n.type=u),f.touched=1,f._batchEnabled=t,f._batchLocation=o,f.wrapMode=10497,n.textures.elements[n.textures.count++]=f,o++)),n.size+=d.size,c+=d.size,a=f._batchLocation,this.addColors(r,p.color,p.alpha,d.attribSize),this.addTextureIds(i,a,d.attribSize)}Se._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<t.length/2;h++)o[a++]=t[2*h],o[a++]=t[2*h+1],o[a++]=e[2*h],o[a++]=e[2*h+1],s[a++]=r[h],o[a++]=i[h];this._buffer.update(n),this._indexBuffer.update(this.indicesUint16)},e.prototype.processFill=function(t){t.holes.length?(this.processHoles(t.holes),cn.triangulate(t,this)):Tn[t.type].triangulate(t,this)},e.prototype.processLine=function(t){yn(t,this);for(var e=0;e<t.holes.length;e++)yn(t.holes[e],this)},e.prototype.processHoles=function(t){for(var e=0;e<t.length;e++){var r=t[e];Tn[r.type].build(r),r.matrix&&this.transformPoints(r.points,r.matrix)}},e.prototype.calculateBounds=function(){var t=this._bounds,e=An,r=Nt.IDENTITY;this._bounds.clear(),e.clear();for(var i=0;i<this.graphicsData.length;i++){var n=this.graphicsData[i],o=n.shape,s=n.type,a=n.lineStyle,h=n.matrix||Nt.IDENTITY,u=0;if(a&&a.visible){var c=a.alignment;u=a.width,s===Ct.POLY?u*=.5+Math.abs(.5-c):u*=Math.max(0,c)}r!==h&&(e.isEmpty()||(t.addBoundsMatrix(e,r),e.clear()),r=h),s===Ct.RECT||s===Ct.RREC?e.addFramePad(o.x,o.y,o.x+o.width,o.y+o.height,u,u):s===Ct.CIRC?e.addFramePad(o.x,o.y,o.x,o.y,o.radius+u,o.radius+u):s===Ct.ELIP?e.addFramePad(o.x,o.y,o.x,o.y,o.width+u,o.height+u):t.addVerticesMatrix(r,o.points,0,o.points.length,u,u)}e.isEmpty()||t.addBoundsMatrix(e,r),t.pad(this.boundsPadding,this.boundsPadding)},e.prototype.transformPoints=function(t,e){for(var r=0;r<t.length/2;r++){var i=t[2*r],n=t[2*r+1];t[2*r]=e.a*i+e.c*n+e.tx,t[2*r+1]=e.b*i+e.d*n+e.ty}},e.prototype.addColors=function(t,e,r,i){for(var n=it((e>>16)+(65280&e)+((255&e)<<16),r);i-- >0;)t.push(n)},e.prototype.addTextureIds=function(t,e,r){for(;r-- >0;)t.push(e)},e.prototype.addUvs=function(t,e,r,i,n,o){for(var s=0,a=e.length,h=r.frame;s<n;){var u=t[2*(i+s)],c=t[2*(i+s)+1];if(o){var l=o.a*u+o.c*c+o.tx;c=o.b*u+o.d*c+o.ty,u=l}s++,e.push(u/h.width,c/h.height)}var d=r.baseTexture;(h.width<d.width||h.height<d.height)&&this.adjustUvs(e,r,a,n)},e.prototype.adjustUvs=function(t,e,r,i){for(var n=e.baseTexture,o=r+2*i,s=e.frame,a=s.width/n.width,h=s.height/n.height,u=s.x/s.width,c=s.y/s.height,l=Math.floor(t[r]+1e-6),d=Math.floor(t[r+1]+1e-6),p=r+2;p<o;p+=2)l=Math.min(l,Math.floor(t[p]+1e-6)),d=Math.min(d,Math.floor(t[p+1]+1e-6));u-=l,c-=d;for(var f=r;f<o;f+=2)t[f]=(t[f]+u)*a,t[f+1]=(t[f+1]+c)*h},Object.defineProperties(e.prototype,r),e}(Ti);On.BATCHABLE_SIZE=100;var Cn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){var t=new e;return t.color=this.color,t.alpha=this.alpha,t.texture=this.texture,t.matrix=this.matrix,t.visible=this.visible,t.width=this.width,t.alignment=this.alignment,t.native=this.native,t},e.prototype.reset=function(){t.prototype.reset.call(this),this.color=0,this.width=0,this.alignment=.5,this.native=!1},e}(un),Mn=new Float32Array(3),Rn={},Dn=function(t){function e(e){void 0===e&&(e=null),t.call(this),this.geometry=e||new On,this.geometry.refCount++,this.shader=null,this.state=Xr.for2d(),this._fillStyle=new un,this._lineStyle=new Cn,this._matrix=null,this._holeMode=!1,this.currentPath=null,this.batches=[],this.batchTint=-1,this.vertexData=null,this._transformID=-1,this.batchDirty=-1,this.pluginName="batch",this.tint=16777215,this.blendMode=I.NORMAL}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={blendMode:{configurable:!0},tint:{configurable:!0},fill:{configurable:!0},line:{configurable:!0}};return e.prototype.clone=function(){return this.finishPoly(),new e(this.geometry)},r.blendMode.set=function(t){this.state.blendMode=t},r.blendMode.get=function(){return this.state.blendMode},r.tint.get=function(){return this._tint},r.tint.set=function(t){this._tint=t},r.fill.get=function(){return this._fillStyle},r.line.get=function(){return this._lineStyle},e.prototype.lineStyle=function(t){if("number"==typeof t){var e=arguments;t={width:e[0]||0,color:e[1]||0,alpha:void 0!==e[2]?e[2]:1,alignment:void 0!==e[3]?e[3]:.5,native:!!e[4]}}return this.lineTextureStyle(t)},e.prototype.lineTextureStyle=function(t){if("number"==typeof t){gt("v5.2.0","Please use object-based options for Graphics#lineTextureStyle");var e=arguments[0],r=arguments[1],i=arguments[2],n=arguments[3],o=arguments[4],s=arguments[5],a=arguments[6];t={width:e,texture:r,color:i,alpha:n,matrix:o,alignment:s,native:a},Object.keys(t).forEach((function(e){return void 0===t[e]&&delete t[e]}))}t=Object.assign({width:0,texture:Xe.WHITE,color:t&&t.texture?16777215:0,alpha:1,matrix:null,alignment:.5,native:!1},t),this.currentPath&&this.startPoly();var h=t.width>0&&t.alpha>0;return h?(t.matrix&&(t.matrix=t.matrix.clone(),t.matrix.invert()),Object.assign(this._lineStyle,{visible:h},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 Zt,this.currentPath.closeStroke=!1,this.currentPath.points.push(t[e-2],t[e-1]))}else this.currentPath=new Zt,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),xn.curveTo(t,e,r,i,n),this},e.prototype.bezierCurveTo=function(t,e,r,i,n,o){return this._initCurve(),_n.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=mn.curveTo(t,e,r,i,n,o);if(s){var a=s.cx,h=s.cy,u=s.radius,c=s.startAngle,l=s.endAngle,d=s.anticlockwise;this.arc(a,h,u,c,l,d)}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+=Dt:o&&i<=n&&(i+=Dt),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 c=Math.abs(u[u.length-2]-s),l=Math.abs(u[u.length-1]-a);c<h&&l<h||u.push(s,a)}else this.moveTo(s,a),u=this.currentPath.points;return mn.arc(s,a,t,e,r,i,n,o,u),this},e.prototype.beginFill=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=1),this.beginTextureFill({texture:Xe.WHITE,color:t,alpha:e})},e.prototype.beginTextureFill=function(t){if(t instanceof Xe){gt("v5.2.0","Please use object-based options for Graphics#beginTextureFill");var e=arguments[0],r=arguments[1],i=arguments[2],n=arguments[3];t={texture:e,color:r,alpha:i,matrix:n},Object.keys(t).forEach((function(e){return void 0===t[e]&&delete t[e]}))}t=Object.assign({texture:Xe.WHITE,color:16777215,alpha:1,matrix:null},t),this.currentPath&&this.startPoly();var o=t.alpha>0;return o?(t.matrix&&(t.matrix=t.matrix.clone(),t.matrix.invert()),Object.assign(this._fillStyle,{visible:o},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 Yt(t,e,r,i))},e.prototype.drawRoundedRect=function(t,e,r,i,n){return this.drawShape(new Kt(t,e,r,i,n))},e.prototype.drawCircle=function(t,e,r){return this.drawShape(new Wt(t,e,r))},e.prototype.drawEllipse=function(t,e,r,i){return this.drawShape(new qt(t,e,r,i))},e.prototype.drawPolygon=function(t){var e=arguments,r=t,i=!0;if(r.points&&(i=r.closeStroke,r=r.points),!Array.isArray(r)){r=new Array(arguments.length);for(var n=0;n<r.length;++n)r[n]=e[n]}var o=new Zt(r);return o.closeStroke=i,this.drawShape(o),this},e.prototype.drawShape=function(t){return this._holeMode?this.geometry.drawHole(t,this._matrix):this.geometry.drawShape(t,this._fillStyle.clone(),this._lineStyle.clone(),this._matrix),this},e.prototype.drawStar=function(t,e,r,i,n,o){return void 0===o&&(o=0),this.drawPolygon(new gn(t,e,r,i,n,o))},e.prototype.clear=function(){return this.geometry.clear(),this._lineStyle.reset(),this._fillStyle.reset(),this._matrix=null,this._holeMode=!1,this.currentPath=null,this},e.prototype.isFastRect=function(){return 1===this.geometry.graphicsData.length&&this.geometry.graphicsData[0].shape.type===Ct.RECT&&!this.geometry.graphicsData[0].lineWidth},e.prototype._render=function(t){this.finishPoly();var e=this.geometry;e.updateBatches(),e.batchable?(this.batchDirty!==e.batchDirty&&this._populateBatches(),this._renderBatched(t)):(t.batch.flush(),this._renderDirect(t))},e.prototype._populateBatches=function(){var t=this.geometry,e=this.blendMode;this.batches=[],this.batchTint=-1,this._transformID=-1,this.batchDirty=t.batchDirty,this.vertexData=new Float32Array(t.points);for(var r=0,i=t.batches.length;r<i;r++){var n=t.batches[r],o=n.style.color,s=new Float32Array(this.vertexData.buffer,4*n.attribStart*2,2*n.attribSize),a=new Float32Array(t.uvsFloat32.buffer,4*n.attribStart*2,2*n.attribSize),h={vertexData:s,blendMode:e,indices:new Uint16Array(t.indicesUint16.buffer,2*n.start,n.size),uvs:a,_batchRGB:K(o),_tintRGB:o,_texture:n.style.texture,alpha:n.style.alpha,worldAlpha:1};this.batches[r]=h}},e.prototype._renderBatched=function(t){if(this.batches.length){t.batch.setObjectRenderer(t.plugins[this.pluginName]),this.calculateVertices(),this.calculateTints();for(var e=0,r=this.batches.length;e<r;e++){var i=this.batches[e];i.worldAlpha=this.worldAlpha*i.alpha,t.plugins[this.pluginName].render(i)}}},e.prototype._renderDirect=function(t){var e=this._resolveDirectShader(t),r=this.geometry,i=this.tint,n=this.worldAlpha,o=e.uniforms,s=r.drawCalls;o.translationMatrix=this.transform.worldTransform,o.tint[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<h;a++)this._renderDrawCallDirect(t,r.drawCalls[a])},e.prototype._renderDrawCallDirect=function(t,e){for(var r=e.textures,i=e.type,n=e.size,o=e.start,s=r.count,a=0;a<s;a++)t.texture.bind(r.elements[a],a);t.geometry.draw(i,n,o)},e.prototype._resolveDirectShader=function(t){var e=this.shader,r=this.pluginName;if(!e){if(!Rn[r]){for(var i=new Int32Array(16),n=0;n<16;n++)i[n]=n;var o={tint:new Float32Array([1,1,1,1]),translationMatrix:new Nt,default:rr.from({uSamplers:i},!0)},s=t.plugins[r]._shader.program;Rn[r]=new Ur(s,o)}e=Rn[r]}return e},e.prototype._calculateBounds=function(){this.finishPoly();var t=this.geometry;if(t.graphicsData.length){var e=t.bounds,r=e.minX,i=e.minY,n=e.maxX,o=e.maxY;this._bounds.addFrame(this.transform,r,i,n,o)}},e.prototype.containsPoint=function(t){return this.worldTransform.applyInverse(t,e._TEMP_POINT),this.geometry.containsPoint(e._TEMP_POINT)},e.prototype.calculateTints=function(){if(this.batchTint!==this.tint){this.batchTint=this.tint;for(var t=K(this.tint,Mn),e=0;e<this.batches.length;e++){var r=this.batches[e],i=r._batchRGB,n=(t[0]*i[0]*255<<16)+(t[1]*i[1]*255<<8)+(0|t[2]*i[2]*255);r._tintRGB=(n>>16)+(65280&n)+((255&n)<<16)}}},e.prototype.calculateVertices=function(){if(this._transformID!==this.transform._worldID){this._transformID=this.transform._worldID;for(var t=this.transform.worldTransform,e=t.a,r=t.b,i=t.c,n=t.d,o=t.tx,s=t.ty,a=this.geometry.points,h=this.vertexData,u=0,c=0;c<a.length;c+=2){var l=a[c],d=a[c+1];h[u++]=e*l+i*d+o,h[u++]=n*d+r*l+s}}},e.prototype.closePath=function(){var t=this.currentPath;return t&&(t.closeStroke=!0),this},e.prototype.setMatrix=function(t){return this._matrix=t,this},e.prototype.beginHole=function(){return this.finishPoly(),this._holeMode=!0,this},e.prototype.endHole=function(){return this.finishPoly(),this._holeMode=!1,this},e.prototype.destroy=function(e){t.prototype.destroy.call(this,e),this.geometry.refCount--,0===this.geometry.refCount&&this.geometry.dispose(),this._matrix=null,this.currentPath=null,this._lineStyle.destroy(),this._lineStyle=null,this._fillStyle.destroy(),this._fillStyle=null,this.geometry=null,this.shader=null,this.vertexData=null,this.batches.length=0,this.batches=null,t.prototype.destroy.call(this,e)},Object.defineProperties(e.prototype,r),e}(te);Dn._TEMP_POINT=new Mt;
  /*!
   * @pixi/sprite - v5.2.3
   * Compiled Fri, 24 Apr 2020 00:55:22 UTC
   *
   * @pixi/sprite is licensed under the MIT License.
   * http://www.opensource.org/licenses/mit-license
   */
  var Ln=new Mt,Fn=new Uint16Array([0,1,2,0,2,3]),Nn=function(t){function e(e){t.call(this),this._anchor=new Rt(this._onAnchorUpdate,this,e?e.defaultAnchor.x:0,e?e.defaultAnchor.y:0),this._texture=null,this._width=0,this._height=0,this._tint=null,this._tintRGB=null,this.tint=16777215,this.blendMode=I.NORMAL,this.shader=null,this._cachedTint=16777215,this.uvs=null,this.texture=e||Xe.EMPTY,this.vertexData=new Float32Array(8),this.vertexTrimmedData=null,this._transformID=-1,this._textureID=-1,this._transformTrimmedID=-1,this._textureTrimmedID=-1,this.indices=Fn,this.pluginName="batch",this.isSprite=!0,this._roundPixels=U.ROUND_PIXELS}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={roundPixels:{configurable:!0},width:{configurable:!0},height:{configurable:!0},anchor:{configurable:!0},tint:{configurable:!0},texture:{configurable:!0}};return e.prototype._onTextureUpdate=function(){this._textureID=-1,this._textureTrimmedID=-1,this._cachedTint=16777215,this._width&&(this.scale.x=pt(this.scale.x)*this._width/this._texture.orig.width),this._height&&(this.scale.y=pt(this.scale.y)*this._height/this._texture.orig.height)},e.prototype._onAnchorUpdate=function(){this._transformID=-1,this._transformTrimmedID=-1},e.prototype.calculateVertices=function(){var t=this._texture;if(this._transformID!==this.transform._worldID||this._textureID!==t._updateID){this._textureID!==t._updateID&&(this.uvs=this._texture._uvs.uvsFloat32),this._transformID=this.transform._worldID,this._textureID=t._updateID;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.vertexData,u=t.trim,c=t.orig,l=this._anchor,d=0,p=0,f=0,v=0;if(u?(d=(p=u.x-l._x*c.width)+u.width,f=(v=u.y-l._y*c.height)+u.height):(d=(p=-l._x*c.width)+c.width,f=(v=-l._y*c.height)+c.height),h[0]=r*p+n*v+s,h[1]=o*v+i*p+a,h[2]=r*d+n*v+s,h[3]=o*v+i*d+a,h[4]=r*d+n*f+s,h[5]=o*f+i*d+a,h[6]=r*p+n*f+s,h[7]=o*f+i*p+a,this._roundPixels)for(var y=U.RESOLUTION,g=0;g<h.length;++g)h[g]=Math.round((h[g]*y|0)/y)}},e.prototype.calculateTrimmedVertices=function(){if(this.vertexTrimmedData){if(this._transformTrimmedID===this.transform._worldID&&this._textureTrimmedID===this._texture._updateID)return}else this.vertexTrimmedData=new Float32Array(8);this._transformTrimmedID=this.transform._worldID,this._textureTrimmedID=this._texture._updateID;var t=this._texture,e=this.vertexTrimmedData,r=t.orig,i=this._anchor,n=this.transform.worldTransform,o=n.a,s=n.b,a=n.c,h=n.d,u=n.tx,c=n.ty,l=-i._x*r.width,d=l+r.width,p=-i._y*r.height,f=p+r.height;e[0]=o*l+a*p+u,e[1]=h*p+s*l+c,e[2]=o*d+a*p+u,e[3]=h*p+s*d+c,e[4]=o*d+a*f+u,e[5]=h*f+s*d+c,e[6]=o*l+a*f+u,e[7]=h*f+s*l+c},e.prototype._render=function(t){this.calculateVertices(),t.batch.setObjectRenderer(t.plugins[this.pluginName]),t.plugins[this.pluginName].render(this)},e.prototype._calculateBounds=function(){var t=this._texture.trim,e=this._texture.orig;!t||t.width===e.width&&t.height===e.height?(this.calculateVertices(),this._bounds.addQuad(this.vertexData)):(this.calculateTrimmedVertices(),this._bounds.addQuad(this.vertexTrimmedData))},e.prototype.getLocalBounds=function(e){return 0===this.children.length?(this._bounds.minX=this._texture.orig.width*-this._anchor._x,this._bounds.minY=this._texture.orig.height*-this._anchor._y,this._bounds.maxX=this._texture.orig.width*(1-this._anchor._x),this._bounds.maxY=this._texture.orig.height*(1-this._anchor._y),e||(this._localBoundsRect||(this._localBoundsRect=new Yt),e=this._localBoundsRect),this._bounds.getRectangle(e)):t.prototype.getLocalBounds.call(this,e)},e.prototype.containsPoint=function(t){this.worldTransform.applyInverse(t,Ln);var e=this._texture.orig.width,r=this._texture.orig.height,i=-e*this.anchor.x,n=0;return Ln.x>=i&&Ln.x<i+e&&(n=-r*this.anchor.y,Ln.y>=n&&Ln.y<n+r)},e.prototype.destroy=function(e){if(t.prototype.destroy.call(this,e),this._texture.off("update",this._onTextureUpdate,this),this._anchor=null,"boolean"==typeof e?e:e&&e.texture){var r="boolean"==typeof e?e:e&&e.baseTexture;this._texture.destroy(!!r)}this._texture=null,this.shader=null},e.from=function(t,r){return new e(t instanceof Xe?t:Xe.from(t,r))},r.roundPixels.set=function(t){this._roundPixels!==t&&(this._transformID=-1),this._roundPixels=t},r.roundPixels.get=function(){return this._roundPixels},r.width.get=function(){return Math.abs(this.scale.x)*this._texture.orig.width},r.width.set=function(t){var e=pt(this.scale.x)||1;this.scale.x=e*t/this._texture.orig.width,this._width=t},r.height.get=function(){return Math.abs(this.scale.y)*this._texture.orig.height},r.height.set=function(t){var e=pt(this.scale.y)||1;this.scale.y=e*t/this._texture.orig.height,this._height=t},r.anchor.get=function(){return this._anchor},r.anchor.set=function(t){this._anchor.copyFrom(t)},r.tint.get=function(){return this._tint},r.tint.set=function(t){this._tint=t,this._tintRGB=(t>>16)+(65280&t)+((255&t)<<16)},r.texture.get=function(){return this._texture},r.texture.set=function(t){this._texture!==t&&(this._texture&&this._texture.off("update",this._onTextureUpdate,this),this._texture=t||Xe.EMPTY,this._cachedTint=16777215,this._textureID=-1,this._textureTrimmedID=-1,t&&(t.baseTexture.valid?this._onTextureUpdate():t.once("update",this._onTextureUpdate,this)))},Object.defineProperties(e.prototype,r),e}(te),Bn={LINEAR_VERTICAL:0,LINEAR_HORIZONTAL:1},Un={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fillGradientType:Bn.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},kn=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],Xn=function(t){this.styleID=0,this.reset(),zn(this,t,t)},jn={align:{configurable:!0},breakWords:{configurable:!0},dropShadow:{configurable:!0},dropShadowAlpha:{configurable:!0},dropShadowAngle:{configurable:!0},dropShadowBlur:{configurable:!0},dropShadowColor:{configurable:!0},dropShadowDistance:{configurable:!0},fill:{configurable:!0},fillGradientType:{configurable:!0},fillGradientStops:{configurable:!0},fontFamily:{configurable:!0},fontSize:{configurable:!0},fontStyle:{configurable:!0},fontVariant:{configurable:!0},fontWeight:{configurable:!0},letterSpacing:{configurable:!0},lineHeight:{configurable:!0},leading:{configurable:!0},lineJoin:{configurable:!0},miterLimit:{configurable:!0},padding:{configurable:!0},stroke:{configurable:!0},strokeThickness:{configurable:!0},textBaseline:{configurable:!0},trim:{configurable:!0},whiteSpace:{configurable:!0},wordWrap:{configurable:!0},wordWrapWidth:{configurable:!0}};function Gn(t){return"number"==typeof t?J(t):("string"==typeof t&&0===t.indexOf("0x")&&(t=t.replace("0x","#")),t)}function Hn(t){if(Array.isArray(t)){for(var e=0;e<t.length;++e)t[e]=Gn(t[e]);return t}return Gn(t)}function zn(t,e,r){for(var i in r)Array.isArray(e[i])?t[i]=e[i].slice():t[i]=e[i]}Xn.prototype.clone=function(){var t={};return zn(t,this,Un),new Xn(t)},Xn.prototype.reset=function(){zn(this,Un,Un)},jn.align.get=function(){return this._align},jn.align.set=function(t){this._align!==t&&(this._align=t,this.styleID++)},jn.breakWords.get=function(){return this._breakWords},jn.breakWords.set=function(t){this._breakWords!==t&&(this._breakWords=t,this.styleID++)},jn.dropShadow.get=function(){return this._dropShadow},jn.dropShadow.set=function(t){this._dropShadow!==t&&(this._dropShadow=t,this.styleID++)},jn.dropShadowAlpha.get=function(){return this._dropShadowAlpha},jn.dropShadowAlpha.set=function(t){this._dropShadowAlpha!==t&&(this._dropShadowAlpha=t,this.styleID++)},jn.dropShadowAngle.get=function(){return this._dropShadowAngle},jn.dropShadowAngle.set=function(t){this._dropShadowAngle!==t&&(this._dropShadowAngle=t,this.styleID++)},jn.dropShadowBlur.get=function(){return this._dropShadowBlur},jn.dropShadowBlur.set=function(t){this._dropShadowBlur!==t&&(this._dropShadowBlur=t,this.styleID++)},jn.dropShadowColor.get=function(){return this._dropShadowColor},jn.dropShadowColor.set=function(t){var e=Hn(t);this._dropShadowColor!==e&&(this._dropShadowColor=e,this.styleID++)},jn.dropShadowDistance.get=function(){return this._dropShadowDistance},jn.dropShadowDistance.set=function(t){this._dropShadowDistance!==t&&(this._dropShadowDistance=t,this.styleID++)},jn.fill.get=function(){return this._fill},jn.fill.set=function(t){var e=Hn(t);this._fill!==e&&(this._fill=e,this.styleID++)},jn.fillGradientType.get=function(){return this._fillGradientType},jn.fillGradientType.set=function(t){this._fillGradientType!==t&&(this._fillGradientType=t,this.styleID++)},jn.fillGradientStops.get=function(){return this._fillGradientStops},jn.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<t.length;++r)if(t[r]!==e[r])return!1;return!0})(this._fillGradientStops,t)||(this._fillGradientStops=t,this.styleID++)},jn.fontFamily.get=function(){return this._fontFamily},jn.fontFamily.set=function(t){this.fontFamily!==t&&(this._fontFamily=t,this.styleID++)},jn.fontSize.get=function(){return this._fontSize},jn.fontSize.set=function(t){this._fontSize!==t&&(this._fontSize=t,this.styleID++)},jn.fontStyle.get=function(){return this._fontStyle},jn.fontStyle.set=function(t){this._fontStyle!==t&&(this._fontStyle=t,this.styleID++)},jn.fontVariant.get=function(){return this._fontVariant},jn.fontVariant.set=function(t){this._fontVariant!==t&&(this._fontVariant=t,this.styleID++)},jn.fontWeight.get=function(){return this._fontWeight},jn.fontWeight.set=function(t){this._fontWeight!==t&&(this._fontWeight=t,this.styleID++)},jn.letterSpacing.get=function(){return this._letterSpacing},jn.letterSpacing.set=function(t){this._letterSpacing!==t&&(this._letterSpacing=t,this.styleID++)},jn.lineHeight.get=function(){return this._lineHeight},jn.lineHeight.set=function(t){this._lineHeight!==t&&(this._lineHeight=t,this.styleID++)},jn.leading.get=function(){return this._leading},jn.leading.set=function(t){this._leading!==t&&(this._leading=t,this.styleID++)},jn.lineJoin.get=function(){return this._lineJoin},jn.lineJoin.set=function(t){this._lineJoin!==t&&(this._lineJoin=t,this.styleID++)},jn.miterLimit.get=function(){return this._miterLimit},jn.miterLimit.set=function(t){this._miterLimit!==t&&(this._miterLimit=t,this.styleID++)},jn.padding.get=function(){return this._padding},jn.padding.set=function(t){this._padding!==t&&(this._padding=t,this.styleID++)},jn.stroke.get=function(){return this._stroke},jn.stroke.set=function(t){var e=Hn(t);this._stroke!==e&&(this._stroke=e,this.styleID++)},jn.strokeThickness.get=function(){return this._strokeThickness},jn.strokeThickness.set=function(t){this._strokeThickness!==t&&(this._strokeThickness=t,this.styleID++)},jn.textBaseline.get=function(){return this._textBaseline},jn.textBaseline.set=function(t){this._textBaseline!==t&&(this._textBaseline=t,this.styleID++)},jn.trim.get=function(){return this._trim},jn.trim.set=function(t){this._trim!==t&&(this._trim=t,this.styleID++)},jn.whiteSpace.get=function(){return this._whiteSpace},jn.whiteSpace.set=function(t){this._whiteSpace!==t&&(this._whiteSpace=t,this.styleID++)},jn.wordWrap.get=function(){return this._wordWrap},jn.wordWrap.set=function(t){this._wordWrap!==t&&(this._wordWrap=t,this.styleID++)},jn.wordWrapWidth.get=function(){return this._wordWrapWidth},jn.wordWrapWidth.set=function(t){this._wordWrapWidth!==t&&(this._wordWrapWidth=t,this.styleID++)},Xn.prototype.toFontString=function(){var t="number"==typeof this.fontSize?this.fontSize+"px":this.fontSize,e=this.fontFamily;Array.isArray(this.fontFamily)||(e=this.fontFamily.split(","));for(var r=e.length-1;r>=0;r--){var i=e[r].trim();!/([\"\'])[^\'\"]+\1/.test(i)&&kn.indexOf(i)<0&&(i='"'+i+'"'),e[r]=i}return this.fontStyle+" "+this.fontVariant+" "+this.fontWeight+" "+t+" "+e.join(",")},Object.defineProperties(Xn.prototype,jn);var Vn=function(t,e,r,i,n,o,s,a,h){this.text=t,this.style=e,this.width=r,this.height=i,this.lines=n,this.lineWidths=o,this.lineHeight=s,this.maxLineWidth=a,this.fontProperties=h};Vn.measureText=function(t,e,r,i){void 0===i&&(i=Vn._canvas),r=null==r?e.wordWrap:r;var n=e.toFontString(),o=Vn.measureFont(n);0===o.fontSize&&(o.fontSize=e.fontSize,o.ascent=e.fontSize);var s=i.getContext("2d");s.font=n;for(var a=(r?Vn.wordWrap(t,e,i):t).split(/(?:\r\n|\r|\n)/),h=new Array(a.length),u=0,c=0;c<a.length;c++){var l=s.measureText(a[c]).width+(a[c].length-1)*e.letterSpacing;h[c]=l,u=Math.max(u,l)}var d=u+e.strokeThickness;e.dropShadow&&(d+=e.dropShadowDistance);var p=e.lineHeight||o.fontSize+e.strokeThickness,f=Math.max(p,o.fontSize+e.strokeThickness)+(a.length-1)*(p+e.leading);return e.dropShadow&&(f+=e.dropShadowDistance),new Vn(t,e,d,f,a,h,p+e.leading,u,o)},Vn.wordWrap=function(t,e,r){void 0===r&&(r=Vn._canvas);for(var i=r.getContext("2d"),n=0,o="",s="",a={},h=e.letterSpacing,u=e.whiteSpace,c=Vn.collapseSpaces(u),l=Vn.collapseNewlines(u),d=!c,p=e.wordWrapWidth+h,f=Vn.tokenize(t),v=0;v<f.length;v++){var y=f[v];if(Vn.isNewline(y)){if(!l){s+=Vn.addLine(o),d=!c,o="",n=0;continue}y=" "}if(c){var g=Vn.isBreakingSpace(y),m=Vn.isBreakingSpace(o[o.length-1]);if(g&&m)continue}var _=Vn.getFromCache(y,h,a,i);if(_>p)if(""!==o&&(s+=Vn.addLine(o),o="",n=0),Vn.canBreakWords(y,e.breakWords))for(var x=Vn.wordWrapSplit(y),b=0;b<x.length;b++){for(var T=x[b],w=1;x[b+w];){var E=x[b+w],S=T[T.length-1];if(Vn.canBreakChars(S,E,y,b,e.breakWords))break;T+=E,w++}b+=T.length-1;var I=Vn.getFromCache(T,h,a,i);I+n>p&&(s+=Vn.addLine(o),d=!1,o="",n=0),o+=T,n+=I}else{o.length>0&&(s+=Vn.addLine(o),o="",n=0);var P=v===f.length-1;s+=Vn.addLine(y,!P),d=!1,o="",n=0}else _+n>p&&(d=!1,s+=Vn.addLine(o),o="",n=0),(o.length>0||!Vn.isBreakingSpace(y)||d)&&(o+=y,n+=_)}return s+=Vn.addLine(o,!1)},Vn.addLine=function(t,e){return void 0===e&&(e=!0),t=Vn.trimRight(t),t=e?t+"\n":t},Vn.getFromCache=function(t,e,r,i){var n=r[t];if(void 0===n){var o=t.length*e;n=i.measureText(t).width+o,r[t]=n}return n},Vn.collapseSpaces=function(t){return"normal"===t||"pre-line"===t},Vn.collapseNewlines=function(t){return"normal"===t},Vn.trimRight=function(t){if("string"!=typeof t)return"";for(var e=t.length-1;e>=0;e--){var r=t[e];if(!Vn.isBreakingSpace(r))break;t=t.slice(0,-1)}return t},Vn.isNewline=function(t){return"string"==typeof t&&Vn._newlines.indexOf(t.charCodeAt(0))>=0},Vn.isBreakingSpace=function(t){return"string"==typeof t&&Vn._breakingSpaces.indexOf(t.charCodeAt(0))>=0},Vn.tokenize=function(t){var e=[],r="";if("string"!=typeof t)return e;for(var i=0;i<t.length;i++){var n=t[i];Vn.isBreakingSpace(n)||Vn.isNewline(n)?(""!==r&&(e.push(r),r=""),e.push(n)):r+=n}return""!==r&&e.push(r),e},Vn.canBreakWords=function(t,e){return e},Vn.canBreakChars=function(t,e,r,i,n){return!0},Vn.wordWrapSplit=function(t){return t.split("")},Vn.measureFont=function(t){if(Vn._fonts[t])return Vn._fonts[t];var e={},r=Vn._canvas,i=Vn._context;i.font=t;var n=Vn.METRICS_STRING+Vn.BASELINE_SYMBOL,o=Math.ceil(i.measureText(n).width),s=Math.ceil(i.measureText(Vn.BASELINE_SYMBOL).width),a=2*s;s=s*Vn.BASELINE_MULTIPLIER|0,r.width=o,r.height=a,i.fillStyle="#f00",i.fillRect(0,0,o,a),i.font=t,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(n,0,s);var h=i.getImageData(0,0,o,a).data,u=h.length,c=4*o,l=0,d=0,p=!1;for(l=0;l<s;++l){for(var f=0;f<c;f+=4)if(255!==h[d+f]){p=!0;break}if(p)break;d+=c}for(e.ascent=s-l,d=u-c,p=!1,l=a;l>s;--l){for(var v=0;v<c;v+=4)if(255!==h[d+v]){p=!0;break}if(p)break;d-=c}return e.descent=l-s,e.fontSize=e.ascent+e.descent,Vn._fonts[t]=e,e},Vn.clearMetrics=function(t){void 0===t&&(t=""),t?delete Vn._fonts[t]:Vn._fonts={}};var Yn=function(){try{var t=new OffscreenCanvas(0,0),e=t.getContext("2d");return e&&e.measureText?t:document.createElement("canvas")}catch(t){return document.createElement("canvas")}}();Yn.width=Yn.height=10,Vn._canvas=Yn,Vn._context=Yn.getContext("2d"),Vn._fonts={},Vn.METRICS_STRING="|ÉqÅ",Vn.BASELINE_SYMBOL="M",Vn.BASELINE_MULTIPLIER=1.4,Vn._newlines=[10,13],Vn._breakingSpaces=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288];var Wn={texture:!0,children:!1,baseTexture:!0},qn=function(t){function e(e,r,i){var n=!1;i||(i=document.createElement("canvas"),n=!0),i.width=3,i.height=3;var o=Xe.from(i);o.orig=new Yt,o.trim=new Yt,t.call(this,o),this._ownCanvas=n,this.canvas=i,this.context=this.canvas.getContext("2d"),this._resolution=U.RESOLUTION,this._autoResolution=!0,this._text=null,this._style=null,this._styleListener=null,this._font="",this.text=e,this.style=r,this.localStyleID=-1}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={width:{configurable:!0},height:{configurable:!0},style:{configurable:!0},text:{configurable:!0},resolution:{configurable:!0}};return e.prototype.updateText=function(t){var e=this._style;if(this.localStyleID!==e.styleID&&(this.dirty=!0,this.localStyleID=e.styleID),this.dirty||!t){this._font=this._style.toFontString();var r,i,n=this.context,o=Vn.measureText(this._text||" ",this._style,this._style.wordWrap,this.canvas),s=o.width,a=o.height,h=o.lines,u=o.lineHeight,c=o.lineWidths,l=o.maxLineWidth,d=o.fontProperties;this.canvas.width=Math.ceil((Math.max(1,s)+2*e.padding)*this._resolution),this.canvas.height=Math.ceil((Math.max(1,a)+2*e.padding)*this._resolution),n.scale(this._resolution,this._resolution),n.clearRect(0,0,this.canvas.width,this.canvas.height),n.font=this._font,n.lineWidth=e.strokeThickness,n.textBaseline=e.textBaseline,n.lineJoin=e.lineJoin,n.miterLimit=e.miterLimit;for(var p=e.dropShadow?2:1,f=0;f<p;++f){var v=e.dropShadow&&0===f,y=v?2*a:0,g=y*this.resolution;if(v){n.fillStyle="black",n.strokeStyle="black";var m=e.dropShadowColor,_=K("number"==typeof m?m:$(m));n.shadowColor="rgba("+255*_[0]+","+255*_[1]+","+255*_[2]+","+e.dropShadowAlpha+")",n.shadowBlur=e.dropShadowBlur,n.shadowOffsetX=Math.cos(e.dropShadowAngle)*e.dropShadowDistance,n.shadowOffsetY=Math.sin(e.dropShadowAngle)*e.dropShadowDistance+g}else n.fillStyle=this._generateFillStyle(e,h,o),n.strokeStyle=e.stroke,n.shadowColor=0,n.shadowBlur=0,n.shadowOffsetX=0,n.shadowOffsetY=0;for(var x=0;x<h.length;x++)r=e.strokeThickness/2,i=e.strokeThickness/2+x*u+d.ascent,"right"===e.align?r+=l-c[x]:"center"===e.align&&(r+=(l-c[x])/2),e.stroke&&e.strokeThickness&&this.drawLetterSpacing(h[x],r+e.padding,i+e.padding-y,!0),e.fill&&this.drawLetterSpacing(h[x],r+e.padding,i+e.padding-y)}this.updateTexture()}},e.prototype.drawLetterSpacing=function(t,e,r,i){void 0===i&&(i=!1);var n=this._style.letterSpacing;if(0!==n)for(var o=e,s=Array.from?Array.from(t):t.split(""),a=this.context.measureText(t).width,h=0,u=0;u<s.length;++u){var c=s[u];i?this.context.strokeText(c,o,r):this.context.fillText(c,o,r),o+=a-(h=this.context.measureText(t.substring(u+1)).width)+n,a=h}else i?this.context.strokeText(t,e,r):this.context.fillText(t,e,r)},e.prototype.updateTexture=function(){var t=this.canvas;if(this._style.trim){var e=Et(t);e.data&&(t.width=e.width,t.height=e.height,this.context.putImageData(e.data,0,0))}var r=this._texture,i=this._style,n=i.trim?0:i.padding,o=r.baseTexture;r.trim.width=r._frame.width=Math.ceil(t.width/this._resolution),r.trim.height=r._frame.height=Math.ceil(t.height/this._resolution),r.trim.x=-n,r.trim.y=-n,r.orig.width=r._frame.width-2*n,r.orig.height=r._frame.height-2*n,this._onTextureUpdate(),o.setRealSize(t.width,t.height,this._resolution),this.dirty=!1},e.prototype._render=function(e){this._autoResolution&&this._resolution!==e.resolution&&(this._resolution=e.resolution,this.dirty=!0),this.updateText(!0),t.prototype._render.call(this,e)},e.prototype.getLocalBounds=function(e){return this.updateText(!0),t.prototype.getLocalBounds.call(this,e)},e.prototype._calculateBounds=function(){this.updateText(!0),this.calculateVertices(),this._bounds.addQuad(this.vertexData)},e.prototype._onStyleChange=function(){this.dirty=!0},e.prototype._generateFillStyle=function(t,e,r){if(!Array.isArray(t.fill))return t.fill;if(1===t.fill.length)return t.fill[0];var i,n=t.dropShadow?t.dropShadowDistance:0,o=t.padding||0,s=Math.ceil(this.canvas.width/this._resolution)-n-2*o,a=Math.ceil(this.canvas.height/this._resolution)-n-2*o,h=t.fill.slice(),u=t.fillGradientStops.slice();if(!u.length)for(var c=h.length+1,l=1;l<c;++l)u.push(l/c);if(h.unshift(t.fill[0]),u.unshift(0),h.push(t.fill[t.fill.length-1]),u.push(1),t.fillGradientType===Bn.LINEAR_VERTICAL){i=this.context.createLinearGradient(s/2,o,s/2,a+o);for(var d=0,p=(r.fontProperties.fontSize+t.strokeThickness)/a,f=0;f<e.length;f++)for(var v=r.lineHeight*f,y=0;y<h.length;y++){var g=v/a+("number"==typeof u[y]?u[y]:y/h.length)*p,m=Math.max(d,g);m=Math.min(m,1),i.addColorStop(m,h[y]),d=m}}else{i=this.context.createLinearGradient(o,a/2,s+o,a/2);for(var _=h.length+1,x=1,b=0;b<h.length;b++){var T=void 0;T="number"==typeof u[b]?u[b]:x/_,i.addColorStop(T,h[b]),x++}}return i},e.prototype.destroy=function(e){"boolean"==typeof e&&(e={children:e}),e=Object.assign({},Wn,e),t.prototype.destroy.call(this,e),this._ownCanvas&&(this.canvas.height=this.canvas.width=0),this.context=null,this.canvas=null,this._style=null},r.width.get=function(){return this.updateText(!0),Math.abs(this.scale.x)*this._texture.orig.width},r.width.set=function(t){this.updateText(!0);var e=pt(this.scale.x)||1;this.scale.x=e*t/this._texture.orig.width,this._width=t},r.height.get=function(){return this.updateText(!0),Math.abs(this.scale.y)*this._texture.orig.height},r.height.set=function(t){this.updateText(!0);var e=pt(this.scale.y)||1;this.scale.y=e*t/this._texture.orig.height,this._height=t},r.style.get=function(){return this._style},r.style.set=function(t){t=t||{},this._style=t instanceof Xn?t:new Xn(t),this.localStyleID=-1,this.dirty=!0},r.text.get=function(){return this._text},r.text.set=function(t){t=String(null==t?"":t),this._text!==t&&(this._text=t,this.dirty=!0)},r.resolution.get=function(){return this._resolution},r.resolution.set=function(t){this._autoResolution=!1,this._resolution!==t&&(this._resolution=t,this.dirty=!0)},Object.defineProperties(e.prototype,r),e}(Nn);
  /*!
   * @pixi/prepare - v5.2.3
   * Compiled Fri, 24 Apr 2020 00:55:22 UTC
   *
   * @pixi/prepare is licensed under the MIT License.
   * http://www.opensource.org/licenses/mit-license
   */
  U.UPLOADS_PER_FRAME=4;var Zn=function(t){this.maxItemsPerFrame=t,this.itemsLeft=0};Zn.prototype.beginFrame=function(){this.itemsLeft=this.maxItemsPerFrame},Zn.prototype.allowedToUpload=function(){return this.itemsLeft-- >0};var Kn=function(t){var e=this;this.limiter=new Zn(U.UPLOADS_PER_FRAME),this.renderer=t,this.uploadHookHelper=null,this.queue=[],this.addHooks=[],this.uploadHooks=[],this.completes=[],this.ticking=!1,this.delayedTick=function(){e.queue&&e.prepareItems()},this.registerFindHook(ro),this.registerFindHook(io),this.registerFindHook(Jn),this.registerFindHook($n),this.registerFindHook(Qn),this.registerUploadHook(to),this.registerUploadHook(eo)};function Jn(t,e){var r=!1;if(t&&t._textures&&t._textures.length)for(var i=0;i<t._textures.length;i++)if(t._textures[i]instanceof Xe){var n=t._textures[i].baseTexture;-1===e.indexOf(n)&&(e.push(n),r=!0)}return r}function $n(t,e){if(t.baseTexture instanceof Se){var r=t.baseTexture;return-1===e.indexOf(r)&&e.push(r),!0}return!1}function Qn(t,e){if(t._texture&&t._texture instanceof Xe){var r=t._texture.baseTexture;return-1===e.indexOf(r)&&e.push(r),!0}return!1}function to(t,e){return e instanceof qn&&(e.updateText(!0),!0)}function eo(t,e){if(e instanceof Xn){var r=e.toFontString();return Vn.measureFont(r),!0}return!1}function ro(t,e){if(t instanceof qn){-1===e.indexOf(t.style)&&e.push(t.style),-1===e.indexOf(t)&&e.push(t);var r=t._texture.baseTexture;return-1===e.indexOf(r)&&e.push(r),!0}return!1}function io(t,e){return t instanceof Xn&&(-1===e.indexOf(t)&&e.push(t),!0)}Kn.prototype.upload=function(t,e){"function"==typeof t&&(e=t,t=null),t&&this.add(t),this.queue.length?(e&&this.completes.push(e),this.ticking||(this.ticking=!0,oe.system.addOnce(this.tick,this,re.UTILITY))):e&&e()},Kn.prototype.tick=function(){setTimeout(this.delayedTick,0)},Kn.prototype.prepareItems=function(){for(this.limiter.beginFrame();this.queue.length&&this.limiter.allowedToUpload();){var t=this.queue[0],e=!1;if(t&&!t._destroyed)for(var r=0,i=this.uploadHooks.length;r<i;r++)if(this.uploadHooks[r](this.uploadHookHelper,t)){this.queue.shift(),e=!0;break}e||this.queue.shift()}if(this.queue.length)oe.system.addOnce(this.tick,this,re.UTILITY);else{this.ticking=!1;var n=this.completes.slice(0);this.completes.length=0;for(var o=0,s=n.length;o<s;o++)n[o]()}},Kn.prototype.registerFindHook=function(t){return t&&this.addHooks.push(t),this},Kn.prototype.registerUploadHook=function(t){return t&&this.uploadHooks.push(t),this},Kn.prototype.add=function(t){for(var e=0,r=this.addHooks.length;e<r&&!this.addHooks[e](t,this.queue);e++);if(t instanceof te)for(var i=t.children.length-1;i>=0;i--)this.add(t.children[i]);return this},Kn.prototype.destroy=function(){this.ticking&&oe.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};var no=function(t){function e(e){t.call(this,e),this.uploadHookHelper=this.renderer,this.registerFindHook(ao),this.registerUploadHook(oo),this.registerUploadHook(so)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Kn);function oo(t,e){return e instanceof Se&&(e._glTextures[t.CONTEXT_UID]||t.texture.bind(e),!0)}function so(t,e){if(!(e instanceof Dn))return!1;var r=e.geometry;e.finishPoly(),r.updateBatches();for(var i=r.batches,n=0;n<i.length;n++){var o=i[n].style.texture;o&&oo(t,o.baseTexture)}return r.batchable||t.geometry.bind(r,e._resolveDirectShader(t)),!0}function ao(t,e){return t instanceof Dn&&(e.push(t),!0)}var ho=function(t){this.maxMilliseconds=t,this.frameStart=0};ho.prototype.beginFrame=function(){this.frameStart=Date.now()},ho.prototype.allowedToUpload=function(){return Date.now()-this.frameStart<this.maxMilliseconds};
  /*!
   * @pixi/spritesheet - v5.2.3
   * Compiled Fri, 24 Apr 2020 00:55:22 UTC
   *
   * @pixi/spritesheet is licensed under the MIT License.
   * http://www.opensource.org/licenses/mit-license
   */
  var uo=function(t,e,r){void 0===r&&(r=null),this._texture=t instanceof Xe?t:null,this.baseTexture=t instanceof Se?t:this._texture.baseTexture,this.textures={},this.animations={},this.data=e,this.resolution=this._updateResolution(r||(this.baseTexture.resource?this.baseTexture.resource.url:null)),this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null},co={BATCH_SIZE:{configurable:!0}};co.BATCH_SIZE.get=function(){return 1e3},uo.prototype._updateResolution=function(t){var e=this.data.meta.scale,r=Ot(t,null);return null===r&&(r=void 0!==e?parseFloat(e):1),1!==r&&this.baseTexture.setResolution(r),r},uo.prototype.parse=function(t){this._batchIndex=0,this._callback=t,this._frameKeys.length<=uo.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()},uo.prototype._processFrames=function(t){for(var e=t,r=uo.BATCH_SIZE;e-t<r&&e<this._frameKeys.length;){var i=this._frameKeys[e],n=this._frames[i],o=n.frame;if(o){var s=null,a=null,h=!1!==n.trimmed&&n.sourceSize?n.sourceSize:n.frame,u=new Yt(0,0,Math.floor(h.w)/this.resolution,Math.floor(h.h)/this.resolution);s=n.rotated?new Yt(Math.floor(o.x)/this.resolution,Math.floor(o.y)/this.resolution,Math.floor(o.h)/this.resolution,Math.floor(o.w)/this.resolution):new Yt(Math.floor(o.x)/this.resolution,Math.floor(o.y)/this.resolution,Math.floor(o.w)/this.resolution,Math.floor(o.h)/this.resolution),!1!==n.trimmed&&n.spriteSourceSize&&(a=new Yt(Math.floor(n.spriteSourceSize.x)/this.resolution,Math.floor(n.spriteSourceSize.y)/this.resolution,Math.floor(o.w)/this.resolution,Math.floor(o.h)/this.resolution)),this.textures[i]=new Xe(this.baseTexture,s,u,a,n.rotated?2:0,n.anchor),Xe.addToCache(this.textures[i],i)}e++}},uo.prototype._processAnimations=function(){var t=this.data.animations||{};for(var e in t){this.animations[e]=[];for(var r=0;r<t[e].length;r++){var i=t[e][r];this.animations[e].push(this.textures[i])}}},uo.prototype._parseComplete=function(){var t=this._callback;this._callback=null,this._batchIndex=0,t.call(this,this.textures)},uo.prototype._nextBatch=function(){var t=this;this._processFrames(this._batchIndex*uo.BATCH_SIZE),this._batchIndex++,setTimeout((function(){t._batchIndex*uo.BATCH_SIZE<t._frameKeys.length?t._nextBatch():(t._processAnimations(),t._parseComplete())}),0)},uo.prototype.destroy=function(t){for(var e in void 0===t&&(t=!1),this.textures)this.textures[e].destroy();this._frames=null,this._frameKeys=null,this.data=null,this.textures=null,t&&(this._texture&&this._texture.destroy(),this.baseTexture.destroy()),this._texture=null,this.baseTexture=null},Object.defineProperties(uo,co);var lo=function(){};lo.use=function(t,e){var r=t.name+"_image";if(t.data&&t.type===nn.TYPE.JSON&&t.data.frames&&!this.resources[r]){var i={crossOrigin:t.crossOrigin,metadata:t.metadata.imageMetadata,parentResource:t},n=lo.getResourcePath(t,this.baseUrl);this.add(r,n,i,(function(r){if(r.error)e(r.error);else{var i=new uo(r.texture,t.data,t.url);i.parse((function(){t.spritesheet=i,t.textures=i.textures,e()}))}}))}else e()},lo.getResourcePath=function(t,e){return t.isDataUrl?t.data.meta.image:z.a.resolve(t.url.replace(e,""),t.data.meta.image)};
  /*!
   * @pixi/sprite-tiling - v5.2.3
   * Compiled Fri, 24 Apr 2020 00:55:22 UTC
   *
   * @pixi/sprite-tiling is licensed under the MIT License.
   * http://www.opensource.org/licenses/mit-license
   */
  var po=new Mt,fo=function(t){function e(e,r,i){void 0===r&&(r=100),void 0===i&&(i=100),t.call(this,e),this.tileTransform=new Vt,this._width=r,this._height=i,this._canvasPattern=null,this.uvMatrix=e.uvMatrix||new zr(e),this.pluginName="tilingSprite",this.uvRespectAnchor=!1}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={clampMargin:{configurable:!0},tileScale:{configurable:!0},tilePosition:{configurable:!0},width:{configurable:!0},height:{configurable:!0}};return r.clampMargin.get=function(){return this.uvMatrix.clampMargin},r.clampMargin.set=function(t){this.uvMatrix.clampMargin=t,this.uvMatrix.update(!0)},r.tileScale.get=function(){return this.tileTransform.scale},r.tileScale.set=function(t){this.tileTransform.scale.copyFrom(t)},r.tilePosition.get=function(){return this.tileTransform.position},r.tilePosition.set=function(t){this.tileTransform.position.copyFrom(t)},e.prototype._onTextureUpdate=function(){this.uvMatrix&&(this.uvMatrix.texture=this._texture),this._cachedTint=16777215},e.prototype._render=function(t){var e=this._texture;e&&e.valid&&(this.tileTransform.updateLocalTransform(),this.uvMatrix.update(),t.batch.setObjectRenderer(t.plugins[this.pluginName]),t.plugins[this.pluginName].render(this))},e.prototype._calculateBounds=function(){var t=this._width*-this._anchor._x,e=this._height*-this._anchor._y,r=this._width*(1-this._anchor._x),i=this._height*(1-this._anchor._y);this._bounds.addFrame(this.transform,t,e,r,i)},e.prototype.getLocalBounds=function(e){return 0===this.children.length?(this._bounds.minX=this._width*-this._anchor._x,this._bounds.minY=this._height*-this._anchor._y,this._bounds.maxX=this._width*(1-this._anchor._x),this._bounds.maxY=this._height*(1-this._anchor._y),e||(this._localBoundsRect||(this._localBoundsRect=new Yt),e=this._localBoundsRect),this._bounds.getRectangle(e)):t.prototype.getLocalBounds.call(this,e)},e.prototype.containsPoint=function(t){this.worldTransform.applyInverse(t,po);var e=this._width,r=this._height,i=-e*this.anchor._x;if(po.x>=i&&po.x<i+e){var n=-r*this.anchor._y;if(po.y>=n&&po.y<n+r)return!0}return!1},e.prototype.destroy=function(e){t.prototype.destroy.call(this,e),this.tileTransform=null,this.uvMatrix=null},e.from=function(t,r,i){return new e(Xe.from(t),r,i)},e.fromFrame=function(t,r,i){var n=_t[t];if(!n)throw new Error('The frameId "'+t+'" does not exist in the texture cache '+this);return new e(n,r,i)},e.fromImage=function(t,r,i,n){return n&&"object"!=typeof n&&(n={scaleMode:arguments[4],resourceOptions:{crossorigin:arguments[3]}}),new e(Xe.from(t,n),r,i)},r.width.get=function(){return this._width},r.width.set=function(t){this._width=t},r.height.get=function(){return this._height},r.height.set=function(t){this._height=t},Object.defineProperties(e.prototype,r),e}(Nn),vo="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform mat3 uTransform;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n    gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n    vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;\n}\n",yo=new Nt,go=function(t){function e(e){t.call(this,e);var r={globals:this.renderer.globalUniforms};this.shader=Ur.from(vo,"varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec4 uColor;\nuniform mat3 uMapCoord;\nuniform vec4 uClampFrame;\nuniform vec2 uClampOffset;\n\nvoid main(void)\n{\n    vec2 coord = vTextureCoord - floor(vTextureCoord - uClampOffset);\n    coord = (uMapCoord * vec3(coord, 1.0)).xy;\n    coord = clamp(coord, uClampFrame.xy, uClampFrame.zw);\n\n    vec4 texSample = texture2D(uSampler, coord);\n    gl_FragColor = texSample * uColor;\n}\n",r),this.simpleShader=Ur.from(vo,"varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec4 uColor;\n\nvoid main(void)\n{\n    vec4 sample = texture2D(uSampler, vTextureCoord);\n    gl_FragColor = sample * uColor;\n}\n",r),this.quad=new tr,this.state=Xr.for2d()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(t){var e=this.renderer,r=this.quad,i=r.vertices;i[0]=i[6]=t._width*-t.anchor.x,i[1]=i[3]=t._height*-t.anchor.y,i[2]=i[4]=t._width*(1-t.anchor.x),i[5]=i[7]=t._height*(1-t.anchor.y),t.uvRespectAnchor&&((i=r.uvs)[0]=i[6]=-t.anchor.x,i[1]=i[3]=-t.anchor.y,i[2]=i[4]=1-t.anchor.x,i[5]=i[7]=1-t.anchor.y),r.invalidate();var n=t._texture,o=n.baseTexture,s=t.tileTransform.localTransform,a=t.uvMatrix,h=o.isPowerOfTwo&&n.frame.width===o.width&&n.frame.height===o.height;h&&(o._glTextures[e.CONTEXT_UID]?h=o.wrapMode!==R.CLAMP:o.wrapMode===R.CLAMP&&(o.wrapMode=R.REPEAT));var u=h?this.simpleShader:this.shader,c=n.width,l=n.height,d=t._width,p=t._height;yo.set(s.a*c/d,s.b*c/p,s.c*l/d,s.d*l/p,s.tx/d,s.ty/p),yo.invert(),h?yo.prepend(a.mapCoord):(u.uniforms.uMapCoord=a.mapCoord.toArray(!0),u.uniforms.uClampFrame=a.uClampFrame,u.uniforms.uClampOffset=a.uClampOffset),u.uniforms.uTransform=yo.toArray(!0),u.uniforms.uColor=nt(t.tint,t.worldAlpha,u.uniforms.uColor,o.alphaMode),u.uniforms.translationMatrix=t.transform.worldTransform.toArray(!0),u.uniforms.uSampler=n,e.shader.bind(u),e.geometry.bind(r),this.state.blendMode=et(t.blendMode,o.alphaMode),e.state.set(this.state),e.geometry.draw(this.renderer.gl.TRIANGLES,6,0)},e}(or),mo=function(t){function e(e,r){var i=this;void 0===r&&(r={}),t.call(this),this._textWidth=0,this._textHeight=0,this._glyphs=[],this._font={tint:void 0!==r.tint?r.tint:16777215,align:r.align||"left",name:null,size:0},this.font=r.font,this._text=e,this._maxWidth=0,this._maxLineHeight=0,this._letterSpacing=0,this._anchor=new Rt((function(){i.dirty=!0}),this,0,0),this.dirty=!1,this.roundPixels=U.ROUND_PIXELS,this.updateText()}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={tint:{configurable:!0},align:{configurable:!0},anchor:{configurable:!0},font:{configurable:!0},text:{configurable:!0},maxWidth:{configurable:!0},maxLineHeight:{configurable:!0},textWidth:{configurable:!0},letterSpacing:{configurable:!0},textHeight:{configurable:!0}};return e.prototype.updateText=function(){for(var t=e.fonts[this._font.name],r=this._font.size/t.size,i=new Mt,n=[],o=[],s=this._text.replace(/(?:\r\n|\r)/g,"\n")||" ",a=s.length,h=this._maxWidth*t.size/this._font.size,u=null,c=0,l=0,d=0,p=-1,f=0,v=0,y=0,g=0;g<a;g++){var m=s.charCodeAt(g),_=s.charAt(g);if(/(?:\s)/.test(_)&&(p=g,f=c),"\r"!==_&&"\n"!==_){var x=t.chars[m];x&&(u&&x.kerning[u]&&(i.x+=x.kerning[u]),n.push({texture:x.texture,line:d,charCode:m,position:new Mt(i.x+x.xOffset+this._letterSpacing/2,i.y+x.yOffset)}),i.x+=x.xAdvance+this._letterSpacing,c=i.x,y=Math.max(y,x.yOffset+x.texture.height),u=m,-1!==p&&h>0&&i.x>h&&(dt(n,1+p-++v,1+g-p),g=p,p=-1,o.push(f),l=Math.max(l,f),d++,i.x=0,i.y+=t.lineHeight,u=null))}else o.push(c),l=Math.max(l,c),++d,++v,i.x=0,i.y+=t.lineHeight,u=null}var b=s.charAt(s.length-1);"\r"!==b&&"\n"!==b&&(/(?:\s)/.test(b)&&(c=f),o.push(c),l=Math.max(l,c));for(var T=[],w=0;w<=d;w++){var E=0;"right"===this._font.align?E=l-o[w]:"center"===this._font.align&&(E=(l-o[w])/2),T.push(E)}for(var S=n.length,I=this.tint,P=0;P<S;P++){var A=this._glyphs[P];A?A.texture=n[P].texture:((A=new Nn(n[P].texture)).roundPixels=this.roundPixels,this._glyphs.push(A)),A.position.x=(n[P].position.x+T[n[P].line])*r,A.position.y=n[P].position.y*r,A.scale.x=A.scale.y=r,A.tint=I,A.parent||this.addChild(A)}for(var O=S;O<this._glyphs.length;++O)this.removeChild(this._glyphs[O]);if(this._textWidth=l*r,this._textHeight=(i.y+t.lineHeight)*r,0!==this.anchor.x||0!==this.anchor.y)for(var C=0;C<S;C++)this._glyphs[C].x-=this._textWidth*this.anchor.x,this._glyphs[C].y-=this._textHeight*this.anchor.y;this._maxLineHeight=y*r},e.prototype.updateTransform=function(){this.validate(),this.containerUpdateTransform()},e.prototype.getLocalBounds=function(){return this.validate(),t.prototype.getLocalBounds.call(this)},e.prototype.validate=function(){this.dirty&&(this.updateText(),this.dirty=!1)},r.tint.get=function(){return this._font.tint},r.tint.set=function(t){this._font.tint="number"==typeof t&&t>=0?t:16777215,this.dirty=!0},r.align.get=function(){return this._font.align},r.align.set=function(t){this._font.align=t||"left",this.dirty=!0},r.anchor.get=function(){return this._anchor},r.anchor.set=function(t){"number"==typeof t?this._anchor.set(t):this._anchor.copyFrom(t)},r.font.get=function(){return this._font},r.font.set=function(t){t&&("string"==typeof t?(t=t.split(" "),this._font.name=1===t.length?t[0]:t.slice(1).join(" "),this._font.size=t.length>=2?parseInt(t[0],10):e.fonts[this._font.name].size):(this._font.name=t.name,this._font.size="number"==typeof t.size?t.size:parseInt(t.size,10)),this.dirty=!0)},r.text.get=function(){return this._text},r.text.set=function(t){t=String(null==t?"":t),this._text!==t&&(this._text=t,this.dirty=!0)},r.maxWidth.get=function(){return this._maxWidth},r.maxWidth.set=function(t){this._maxWidth!==t&&(this._maxWidth=t,this.dirty=!0)},r.maxLineHeight.get=function(){return this.validate(),this._maxLineHeight},r.textWidth.get=function(){return this.validate(),this._textWidth},r.letterSpacing.get=function(){return this._letterSpacing},r.letterSpacing.set=function(t){this._letterSpacing!==t&&(this._letterSpacing=t,this.dirty=!0)},r.textHeight.get=function(){return this.validate(),this._textHeight},e.registerFont=function(t,r){var i={},n=t.getElementsByTagName("info")[0],o=t.getElementsByTagName("common")[0],s=t.getElementsByTagName("page"),a=Ot(s[0].getAttribute("file")),h={};i.font=n.getAttribute("face"),i.size=parseInt(n.getAttribute("size"),10),i.lineHeight=parseInt(o.getAttribute("lineHeight"),10)/a,i.chars={},r instanceof Xe&&(r=[r]);for(var u=0;u<s.length;u++){var c=s[u].getAttribute("id"),l=s[u].getAttribute("file");h[c]=r instanceof Array?r[u]:r[l]}for(var d=t.getElementsByTagName("char"),p=0;p<d.length;p++){var f=d[p],v=parseInt(f.getAttribute("id"),10),y=f.getAttribute("page")||0,g=new Yt(parseInt(f.getAttribute("x"),10)/a+h[y].frame.x/a,parseInt(f.getAttribute("y"),10)/a+h[y].frame.y/a,parseInt(f.getAttribute("width"),10)/a,parseInt(f.getAttribute("height"),10)/a);i.chars[v]={xOffset:parseInt(f.getAttribute("xoffset"),10)/a,yOffset:parseInt(f.getAttribute("yoffset"),10)/a,xAdvance:parseInt(f.getAttribute("xadvance"),10)/a,kerning:{},texture:new Xe(h[y].baseTexture,g),page:y}}for(var m=t.getElementsByTagName("kerning"),_=0;_<m.length;_++){var x=m[_],b=parseInt(x.getAttribute("first"),10)/a,T=parseInt(x.getAttribute("second"),10)/a,w=parseInt(x.getAttribute("amount"),10)/a;i.chars[T]&&(i.chars[T].kerning[b]=w)}return e.fonts[i.font]=i,i},Object.defineProperties(e.prototype,r),e}(te);mo.fonts={};var _o=function(){};_o.parse=function(t,e){t.bitmapFont=mo.registerFont(t.data,e)},_o.add=function(){nn.setExtensionXhrType("fnt",nn.XHR_RESPONSE_TYPE.DOCUMENT)},_o.dirname=function(t){var e=t.replace(/\\/g,"/").replace(/\/$/,"").replace(/\/[^\/]*$/,"");return e===t?".":""===e?"/":e},_o.use=function(t,e){if(t.data&&t.type===nn.TYPE.XML)if(0!==t.data.getElementsByTagName("page").length&&0!==t.data.getElementsByTagName("info").length&&null!==t.data.getElementsByTagName("info")[0].getAttribute("face")){var r=t.isDataUrl?"":_o.dirname(t.url);t.isDataUrl&&("."===r&&(r=""),this.baseUrl&&r&&"/"===this.baseUrl.charAt(this.baseUrl.length-1)&&(r+="/")),(r=r.replace(this.baseUrl,""))&&"/"!==r.charAt(r.length-1)&&(r+="/");for(var i=t.data.getElementsByTagName("page"),n={},o=function(r){n[r.metadata.pageFile]=r.texture,Object.keys(n).length===i.length&&(_o.parse(t,n),e())},s=0;s<i.length;++s){var a=i[s].getAttribute("file"),h=r+a,u=!1;for(var c in this.resources){var l=this.resources[c];if(l.url===h){l.metadata.pageFile=a,l.texture?o(l):l.onAfterMiddleware.add(o),u=!0;break}}if(!u){var d={crossOrigin:t.crossOrigin,loadType:nn.LOAD_TYPE.IMAGE,metadata:Object.assign({pageFile:a},t.metadata.imageMetadata),parentResource:t};this.add(h,d,o)}}}else e();else e()};
  /*!
   * @pixi/filter-alpha - v5.2.3
   * Compiled Fri, 24 Apr 2020 00:55:22 UTC
   *
   * @pixi/filter-alpha is licensed under the MIT License.
   * http://www.opensource.org/licenses/mit-license
   */
  var xo=function(t){function e(e){void 0===e&&(e=1),t.call(this,pi,"varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform float uAlpha;\n\nvoid main(void)\n{\n   gl_FragColor = texture2D(uSampler, vTextureCoord) * uAlpha;\n}\n",{uAlpha:1}),this.alpha=e}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={alpha:{configurable:!0}};return r.alpha.get=function(){return this.uniforms.uAlpha},r.alpha.set=function(t){this.uniforms.uAlpha=t},Object.defineProperties(e.prototype,r),e}(Gr);var bo={5:[.153388,.221461,.250301],7:[.071303,.131514,.189879,.214607],9:[.028532,.067234,.124009,.179044,.20236],11:[.0093,.028002,.065984,.121703,.175713,.198596],13:[.002406,.009255,.027867,.065666,.121117,.174868,.197641],15:[489e-6,.002403,.009246,.02784,.065602,.120999,.174697,.197448]},To=["varying vec2 vBlurTexCoords[%size%];","uniform sampler2D uSampler;","void main(void)","{","    gl_FragColor = vec4(0.0);","    %blur%","}"].join("\n");var wo=function(t){function e(e,r,i,n,o){var s=function(t,e){var r,i=Math.ceil(t/2),n="\n    attribute vec2 aVertexPosition;\n\n    uniform mat3 projectionMatrix;\n\n    uniform float strength;\n\n    varying vec2 vBlurTexCoords[%size%];\n\n    uniform vec4 inputSize;\n    uniform vec4 outputFrame;\n\n    vec4 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\n    vec2 filterTextureCoord( void )\n    {\n        return aVertexPosition * (outputFrame.zw * inputSize.zw);\n    }\n\n    void main(void)\n    {\n        gl_Position = filterVertexPosition();\n\n        vec2 textureCoord = filterTextureCoord();\n        %blur%\n    }",o="";r=e?"vBlurTexCoords[%index%] =  textureCoord + vec2(%sampleIndex% * strength, 0.0);":"vBlurTexCoords[%index%] =  textureCoord + vec2(0.0, %sampleIndex% * strength);";for(var s=0;s<t;s++){var a=r.replace("%index%",s);o+=a=a.replace("%sampleIndex%",s-(i-1)+".0"),o+="\n"}return n=(n=n.replace("%blur%",o)).replace("%size%",t)}(o=o||5,e),a=function(t){for(var e,r=bo[t],i=r.length,n=To,o="",s=0;s<t;s++){var a="gl_FragColor += texture2D(uSampler, vBlurTexCoords[%index%]) * %value%;".replace("%index%",s);e=s,s>=i&&(e=t-s-1),o+=a=a.replace("%value%",r[e]),o+="\n"}return n=(n=n.replace("%blur%",o)).replace("%size%",t)}(o);t.call(this,s,a),this.horizontal=e,this.resolution=n||U.RESOLUTION,this._quality=0,this.quality=i||4,this.blur=r||8}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={blur:{configurable:!0},quality:{configurable:!0}};return 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,!0);for(var h=1;h<this.passes-1;h++){o.renderTexture.bind(s,s.filterFrame),this.uniforms.uSampler=a;var u=a;a=s,s=u,o.shader.bind(this),o.geometry.draw(5)}this.state.blend=!0,t.applyFilter(this,a,r,i),t.returnFilterTexture(n)}},r.blur.get=function(){return this.strength},r.blur.set=function(t){this.padding=1+2*Math.abs(t),this.strength=t},r.quality.get=function(){return this._quality},r.quality.set=function(t){this._quality=t,this.passes=t},Object.defineProperties(e.prototype,r),e}(Gr),Eo=function(t){function e(e,r,i,n){t.call(this),this.blurXFilter=new wo(!0,e,r,i,n),this.blurYFilter=new wo(!1,e,r,i,n),this.resolution=i||U.RESOLUTION,this.quality=r||4,this.blur=e||8,this.repeatEdgePixels=!1}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={blur:{configurable:!0},quality:{configurable:!0},blurX:{configurable:!0},blurY:{configurable:!0},blendMode:{configurable:!0},repeatEdgePixels:{configurable:!0}};return e.prototype.apply=function(t,e,r,i){var n=Math.abs(this.blurXFilter.strength),o=Math.abs(this.blurYFilter.strength);if(n&&o){var s=t.getFilterTexture();this.blurXFilter.apply(t,e,s,!0),this.blurYFilter.apply(t,s,r,i),t.returnFilterTexture(s)}else o?this.blurYFilter.apply(t,e,r,i):this.blurXFilter.apply(t,e,r,i)},e.prototype.updatePadding=function(){this._repeatEdgePixels?this.padding=0:this.padding=2*Math.max(Math.abs(this.blurXFilter.strength),Math.abs(this.blurYFilter.strength))},r.blur.get=function(){return this.blurXFilter.blur},r.blur.set=function(t){this.blurXFilter.blur=this.blurYFilter.blur=t,this.updatePadding()},r.quality.get=function(){return this.blurXFilter.quality},r.quality.set=function(t){this.blurXFilter.quality=this.blurYFilter.quality=t},r.blurX.get=function(){return this.blurXFilter.blur},r.blurX.set=function(t){this.blurXFilter.blur=t,this.updatePadding()},r.blurY.get=function(){return this.blurYFilter.blur},r.blurY.set=function(t){this.blurYFilter.blur=t,this.updatePadding()},r.blendMode.get=function(){return this.blurYFilter.blendMode},r.blendMode.set=function(t){this.blurYFilter.blendMode=t},r.repeatEdgePixels.get=function(){return this._repeatEdgePixels},r.repeatEdgePixels.set=function(t){this._repeatEdgePixels=t,this.updatePadding()},Object.defineProperties(e.prototype,r),e}(Gr),So=function(t){function e(){var e={m:new Float32Array([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0]),uAlpha:1};t.call(this,fi,"varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform float m[20];\nuniform float uAlpha;\n\nvoid main(void)\n{\n    vec4 c = texture2D(uSampler, vTextureCoord);\n\n    if (uAlpha == 0.0) {\n        gl_FragColor = c;\n        return;\n    }\n\n    // Un-premultiply alpha before applying the color matrix. See issue #3539.\n    if (c.a > 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",e),this.alpha=1}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={matrix:{configurable:!0},alpha:{configurable:!0}};return 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,c=(255&i)/255,l=[.3,.59,.11,0,0,o,s,a,t=t||.2,0,h,u,c,e=e||.15,0,o-h,s-u,a-c,0,0];this._loadMatrix(l,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)},r.matrix.get=function(){return this.uniforms.m},r.matrix.set=function(t){this.uniforms.m=t},r.alpha.get=function(){return this.uniforms.uAlpha},r.alpha.set=function(t){this.uniforms.uAlpha=t},Object.defineProperties(e.prototype,r),e}(Gr);So.prototype.grayscale=So.prototype.greyscale;
  /*!
   * @pixi/filter-displacement - v5.2.3
   * Compiled Fri, 24 Apr 2020 00:55:22 UTC
   *
   * @pixi/filter-displacement is licensed under the MIT License.
   * http://www.opensource.org/licenses/mit-license
   */
  var Io=function(t){function e(e,r){var i=new Nt;e.renderable=!1,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:i,scale:{x:1,y:1},rotation:new Float32Array([1,0,0,1])}),this.maskSprite=e,this.maskMatrix=i,null==r&&(r=20),this.scale=new Mt(r,r)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={map:{configurable:!0}};return 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.transform.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)},r.map.get=function(){return this.uniforms.mapSampler},r.map.set=function(t){this.uniforms.mapSampler=t},Object.defineProperties(e.prototype,r),e}(Gr),Po=function(t){function e(){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')}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Gr),Ao=function(t){function e(e,r){void 0===e&&(e=.5),void 0===r&&(r=Math.random()),t.call(this,fi,"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.noise=e,this.seed=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={noise:{configurable:!0},seed:{configurable:!0}};return r.noise.get=function(){return this.uniforms.uNoise},r.noise.set=function(t){this.uniforms.uNoise=t},r.seed.get=function(){return this.uniforms.uSeed},r.seed.set=function(t){this.uniforms.uSeed=t},Object.defineProperties(e.prototype,r),e}(Gr),Oo=new Nt;$t.prototype._cacheAsBitmap=!1,$t.prototype._cacheData=!1;var Co=function(){this.textureCacheId=null,this.originalRender=null,this.originalRenderCanvas=null,this.originalCalculateBounds=null,this.originalGetLocalBounds=null,this.originalUpdateTransform=null,this.originalHitTest=null,this.originalDestroy=null,this.originalMask=null,this.originalFilterArea=null,this.sprite=null};Object.defineProperties($t.prototype,{cacheAsBitmap:{get:function(){return this._cacheAsBitmap},set:function(t){var e;this._cacheAsBitmap!==t&&(this._cacheAsBitmap=t,t?(this._cacheData||(this._cacheData=new Co),(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))}}}),$t.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))},$t.prototype._initCachedDisplayObject=function(t){if(!this._cacheData||!this._cacheData.sprite){var e=this.alpha;this.alpha=1,t.batch.flush();var r=this.getLocalBounds().clone();if(this.filters){var i=this.filters[0].padding;r.pad(i)}r.ceil(U.RESOLUTION);var n=t.renderTexture.current,o=t.renderTexture.sourceFrame.clone(),s=t.projection.transform,a=Ge.create(r.width,r.height),h="cacheAsBitmap_"+vt();this._cacheData.textureCacheId=h,Se.addToCache(a.baseTexture,h),Xe.addToCache(a,h);var u=Oo;u.tx=-r.x,u.ty=-r.y,this.transform.worldTransform.identity(),this.render=this._cacheData.originalRender,t.render(this,a,!0,u,!0),t.projection.transform=s,t.renderTexture.bind(n,o),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 Nn(a);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.parent=t._tempDisplayObjectParent,this.updateTransform(),this.parent=null),this.containsPoint=c.containsPoint.bind(c)}},$t.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))},$t.prototype._initCachedDisplayObjectCanvas=function(t){if(!this._cacheData||!this._cacheData.sprite){var e=this.getLocalBounds(),r=this.alpha;this.alpha=1;var i=t.context,n=t._projTransform;e.ceil(U.RESOLUTION);var o=Ge.create(e.width,e.height),s="cacheAsBitmap_"+vt();this._cacheData.textureCacheId=s,Se.addToCache(o.baseTexture,s),Xe.addToCache(o,s);var a=Oo;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 Nn(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)}},$t.prototype._calculateCachedBounds=function(){this._bounds.clear(),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite._calculateBounds(),this._lastBoundsID=this._boundsID},$t.prototype._getCachedLocalBounds=function(){return this._cacheData.sprite.getLocalBounds()},$t.prototype._destroyCachedDisplayObject=function(){this._cacheData.sprite._texture.destroy(!0),this._cacheData.sprite=null,Se.removeFromCache(this._cacheData.textureCacheId),Xe.removeFromCache(this._cacheData.textureCacheId),this._cacheData.textureCacheId=null},$t.prototype._cacheAsBitmapDestroy=function(t){this.cacheAsBitmap=!1,this.destroy(t)},
  /*!
   * @pixi/mixin-get-child-by-name - v5.2.3
   * Compiled Fri, 24 Apr 2020 00:55:22 UTC
   *
   * @pixi/mixin-get-child-by-name is licensed under the MIT License.
   * http://www.opensource.org/licenses/mit-license
   */
  $t.prototype.name=null,te.prototype.getChildByName=function(t){for(var e=0;e<this.children.length;e++)if(this.children[e].name===t)return this.children[e];return null},
  /*!
   * @pixi/mixin-get-global-position - v5.2.3
   * Compiled Fri, 24 Apr 2020 00:55:22 UTC
   *
   * @pixi/mixin-get-global-position is licensed under the MIT License.
   * http://www.opensource.org/licenses/mit-license
   */
  $t.prototype.getGlobalPosition=function(t,e){return void 0===t&&(t=new Mt),void 0===e&&(e=!1),this.parent?this.parent.toGlobal(this.position,t,e):(t.x=this.position.x,t.y=this.position.y),t};
  /*!
   * @pixi/mesh - v5.2.3
   * Compiled Fri, 24 Apr 2020 00:55:22 UTC
   *
   * @pixi/mesh is licensed under the MIT License.
   * http://www.opensource.org/licenses/mit-license
   */
  var Mo=function(t,e){this.uvBuffer=t,this.uvMatrix=e,this.data=null,this._bufferUpdateId=-1,this._textureUpdateId=-1,this._updateID=0};Mo.prototype.update=function(t){if(t||this._bufferUpdateId!==this.uvBuffer._updateID||this._textureUpdateId!==this.uvMatrix._updateID){this._bufferUpdateId=this.uvBuffer._updateID,this._textureUpdateId=this.uvMatrix._updateID;var e=this.uvBuffer.data;this.data&&this.data.length===e.length||(this.data=new Float32Array(e.length)),this.uvMatrix.multiplyUvs(e,this.data),this._updateID++}};var Ro=new Mt,Do=new Zt,Lo=function(t){function e(e,r,i,n){void 0===n&&(n=P.TRIANGLES),t.call(this),this.geometry=e,e.refCount++,this.shader=r,this.state=i||Xr.for2d(),this.drawMode=n,this.start=0,this.size=0,this.uvs=null,this.indices=null,this.vertexData=new Float32Array(1),this.vertexDirty=0,this._transformID=-1,this.tint=16777215,this.blendMode=I.NORMAL,this._roundPixels=U.ROUND_PIXELS,this.batchUvs=null}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={uvBuffer:{configurable:!0},verticesBuffer:{configurable:!0},material:{configurable:!0},blendMode:{configurable:!0},roundPixels:{configurable:!0},tint:{configurable:!0},texture:{configurable:!0}};return r.uvBuffer.get=function(){return this.geometry.buffers[1]},r.verticesBuffer.get=function(){return this.geometry.buffers[0]},r.material.set=function(t){this.shader=t},r.material.get=function(){return this.shader},r.blendMode.set=function(t){this.state.blendMode=t},r.blendMode.get=function(){return this.state.blendMode},r.roundPixels.set=function(t){this._roundPixels!==t&&(this._transformID=-1),this._roundPixels=t},r.roundPixels.get=function(){return this._roundPixels},r.tint.get=function(){return this.shader.tint},r.tint.set=function(t){this.shader.tint=t},r.texture.get=function(){return this.shader.texture},r.texture.set=function(t){this.shader.texture=t},e.prototype._render=function(t){var r=this.geometry.buffers[0].data;this.shader.batchable&&this.drawMode===P.TRIANGLES&&r.length<2*e.BATCHABLE_SIZE?this._renderToBatch(t):this._renderDefault(t)},e.prototype._renderDefault=function(t){var e=this.shader;e.alpha=this.worldAlpha,e.update&&e.update(),t.batch.flush(),e.program.uniformData.translationMatrix&&(e.uniforms.translationMatrix=this.transform.worldTransform.toArray(!0)),t.shader.bind(e),t.state.set(this.state),t.geometry.bind(this.geometry,e),t.geometry.draw(this.drawMode,this.size,this.start,this.geometry.instanceCount)},e.prototype._renderToBatch=function(t){var e=this.geometry;this.shader.uvMatrix&&(this.shader.uvMatrix.update(),this.calculateUvs()),this.calculateVertices(),this.indices=e.indexBuffer.data,this._tintRGB=this.shader._tintRGB,this._texture=this.shader.texture;var r=this.material.pluginName;t.batch.setObjectRenderer(t.plugins[r]),t.plugins[r].render(this)},e.prototype.calculateVertices=function(){var t=this.geometry,e=t.buffers[0].data;if(t.vertexDirtyId!==this.vertexDirty||this._transformID!==this.transform._worldID){this._transformID=this.transform._worldID,this.vertexData.length!==e.length&&(this.vertexData=new Float32Array(e.length));for(var r=this.transform.worldTransform,i=r.a,n=r.b,o=r.c,s=r.d,a=r.tx,h=r.ty,u=this.vertexData,c=0;c<u.length/2;c++){var l=e[2*c],d=e[2*c+1];u[2*c]=i*l+o*d+a,u[2*c+1]=n*l+s*d+h}if(this._roundPixels)for(var p=U.RESOLUTION,f=0;f<u.length;++f)u[f]=Math.round((u[f]*p|0)/p);this.vertexDirty=t.vertexDirtyId}},e.prototype.calculateUvs=function(){var t=this.geometry.buffers[1];this.shader.uvMatrix.isSimple?this.uvs=t.data:(this.batchUvs||(this.batchUvs=new Mo(t,this.shader.uvMatrix)),this.batchUvs.update(),this.uvs=this.batchUvs.data)},e.prototype._calculateBounds=function(){this.calculateVertices(),this._bounds.addVertexData(this.vertexData,0,this.vertexData.length)},e.prototype.containsPoint=function(t){if(!this.getBounds().contains(t.x,t.y))return!1;this.worldTransform.applyInverse(t,Ro);for(var e=this.geometry.getBuffer("aVertexPosition").data,r=Do.points,i=this.geometry.getIndex().data,n=i.length,o=4===this.drawMode?3:1,s=0;s+2<n;s+=o){var a=2*i[s],h=2*i[s+1],u=2*i[s+2];if(r[0]=e[a],r[1]=e[a+1],r[2]=e[h],r[3]=e[h+1],r[4]=e[u],r[5]=e[u+1],Do.contains(Ro.x,Ro.y))return!0}return!1},e.prototype.destroy=function(e){t.prototype.destroy.call(this,e),this.geometry.refCount--,0===this.geometry.refCount&&this.geometry.dispose(),this.geometry=null,this.shader=null,this.state=null,this.uvs=null,this.indices=null,this.vertexData=null},Object.defineProperties(e.prototype,r),e}(te);Lo.BATCHABLE_SIZE=100;var Fo=function(t){function e(e,r){var i={uSampler:e,alpha:1,uTextureMatrix:Nt.IDENTITY,uColor:new Float32Array([1,1,1,1])};(r=Object.assign({tint:16777215,alpha:1,pluginName:"batch"},r)).uniforms&&Object.assign(i,r.uniforms),t.call(this,r.program||Nr.from("attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform mat3 uTextureMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n    gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n    vTextureCoord = (uTextureMatrix * vec3(aTextureCoord, 1.0)).xy;\n}\n","varying vec2 vTextureCoord;\nuniform vec4 uColor;\n\nuniform sampler2D uSampler;\n\nvoid main(void)\n{\n    gl_FragColor = texture2D(uSampler, vTextureCoord) * uColor;\n}\n"),i),this._colorDirty=!1,this.uvMatrix=new zr(e),this.batchable=void 0===r.program,this.pluginName=r.pluginName,this.tint=r.tint,this.alpha=r.alpha}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={texture:{configurable:!0},alpha:{configurable:!0},tint:{configurable:!0}};return r.texture.get=function(){return this.uniforms.uSampler},r.texture.set=function(t){this.uniforms.uSampler!==t&&(this.uniforms.uSampler=t,this.uvMatrix.texture=t)},r.alpha.set=function(t){t!==this._alpha&&(this._alpha=t,this._colorDirty=!0)},r.alpha.get=function(){return this._alpha},r.tint.set=function(t){t!==this._tint&&(this._tint=t,this._tintRGB=(t>>16)+(65280&t)+((255&t)<<16),this._colorDirty=!0)},r.tint.get=function(){return this._tint},e.prototype.update=function(){if(this._colorDirty){this._colorDirty=!1;var t=this.texture.baseTexture;nt(this._tint,this._alpha,this.uniforms.uColor,t.alphaMode)}this.uvMatrix.update()&&(this.uniforms.uTextureMatrix=this.uvMatrix.mapCoord)},Object.defineProperties(e.prototype,r),e}(Ur),No=function(t){function e(e,r,i){t.call(this);var n=new Ye(e),o=new Ye(r,!0),s=new Ye(i,!0,!0);this.addAttribute("aVertexPosition",n,2,!1,C.FLOAT).addAttribute("aTextureCoord",o,2,!1,C.FLOAT).addIndex(s),this._updateId=-1}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={vertexDirtyId:{configurable:!0}};return r.vertexDirtyId.get=function(){return this.buffers[0]._updateID},Object.defineProperties(e.prototype,r),e}($e),Bo=function(t){function e(e,r,i,n){void 0===e&&(e=100),void 0===r&&(r=100),void 0===i&&(i=10),void 0===n&&(n=10),t.call(this),this.segWidth=i,this.segHeight=n,this.width=e,this.height=r,this.build()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.build=function(){for(var t=this.segWidth*this.segHeight,e=[],r=[],i=[],n=this.segWidth-1,o=this.segHeight-1,s=this.width/n,a=this.height/o,h=0;h<t;h++){var u=h%this.segWidth,c=h/this.segWidth|0;e.push(u*s,c*a),r.push(u/n,c/o)}for(var l=n*o,d=0;d<l;d++){var p=d%n,f=d/n|0,v=f*this.segWidth+p,y=f*this.segWidth+p+1,g=(f+1)*this.segWidth+p,m=(f+1)*this.segWidth+p+1;i.push(v,y,g,y,m,g)}this.buffers[0].data=new Float32Array(e),this.buffers[1].data=new Float32Array(r),this.indexBuffer.data=new Uint16Array(i),this.buffers[0].update(),this.buffers[1].update(),this.indexBuffer.update()},e}(No),Uo=function(t){function e(e,r,i){void 0===e&&(e=200),void 0===i&&(i=0),t.call(this,new Float32Array(4*r.length),new Float32Array(4*r.length),new Uint16Array(6*(r.length-1))),this.points=r,this.width=e,this.textureScale=i,this.build()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.build=function(){var t=this.points;if(t){var e=this.getBuffer("aVertexPosition"),r=this.getBuffer("aTextureCoord"),i=this.getIndex();if(!(t.length<1)){e.data.length/4!==t.length&&(e.data=new Float32Array(4*t.length),r.data=new Float32Array(4*t.length),i.data=new Uint16Array(6*(t.length-1)));var n=r.data,o=i.data;n[0]=0,n[1]=0,n[2]=0,n[3]=1;for(var s=0,a=t[0],h=this.width*this.textureScale,u=t.length,c=0;c<u;c++){var l=4*c;if(this.textureScale>0){var d=a.x-t[c].x,p=a.y-t[c].y,f=Math.sqrt(d*d+p*p);a=t[c],s+=f/h}else s=c/(u-1);n[l]=s,n[l+1]=0,n[l+2]=s,n[l+3]=1}for(var v=0,y=0;y<u-1;y++){var g=2*y;o[v++]=g,o[v++]=g+1,o[v++]=g+2,o[v++]=g+2,o[v++]=g+1,o[v++]=g+3}r.update(),i.update(),this.updateVertices()}}},e.prototype.updateVertices=function(){var t=this.points;if(!(t.length<1)){for(var e,r=t[0],i=0,n=0,o=this.buffers[0].data,s=t.length,a=0;a<s;a++){var h=t[a],u=4*a;n=-((e=a<t.length-1?t[a+1]:h).x-r.x),i=e.y-r.y;var c=Math.sqrt(i*i+n*n),l=this.textureScale>0?this.textureScale*this.width/2:this.width/2;i/=c,n/=c,i*=l,n*=l,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}(No),ko=function(t){function e(e,r,i){void 0===i&&(i=0);var n=new Uo(e.height,r,i),o=new Fo(e);i>0&&(e.baseTexture.wrapMode=R.REPEAT),t.call(this,n,o),this.autoUpdate=!0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._render=function(e){(this.autoUpdate||this.geometry.width!==this.shader.texture.height)&&(this.geometry.width=this.shader.texture.height,this.geometry.update()),t.prototype._render.call(this,e)},e}(Lo),Xo=function(t){function e(e,r,i){var n=new Bo(e.width,e.height,r,i),o=new Fo(Xe.WHITE);t.call(this,n,o),this.texture=e}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={texture:{configurable:!0}};return e.prototype.textureUpdated=function(){this._textureID=this.shader.texture._updateID,this.geometry.width=this.shader.texture.width,this.geometry.height=this.shader.texture.height,this.geometry.build()},r.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))},r.texture.get=function(){return this.shader.texture},e.prototype._render=function(e){this._textureID!==this.shader.texture._updateID&&this.textureUpdated(),t.prototype._render.call(this,e)},Object.defineProperties(e.prototype,r),e}(Lo),jo=function(t){function e(e,r,i,n,o){void 0===e&&(e=Xe.EMPTY);var s=new No(r,i,n);s.getBuffer("aVertexPosition").static=!1;var a=new Fo(e);t.call(this,s,a,null,o),this.autoUpdate=!0}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={vertices:{configurable:!0}};return r.vertices.get=function(){return this.geometry.getBuffer("aVertexPosition").data},r.vertices.set=function(t){this.geometry.getBuffer("aVertexPosition").data=t},e.prototype._render=function(e){this.autoUpdate&&this.geometry.getBuffer("aVertexPosition").update(),t.prototype._render.call(this,e)},Object.defineProperties(e.prototype,r),e}(Lo),Go=function(t){function e(e,r,i,n,o){t.call(this,Xe.WHITE,4,4),this._origWidth=e.orig.width,this._origHeight=e.orig.height,this._width=this._origWidth,this._height=this._origHeight,this._leftWidth=void 0!==r?r:10,this._rightWidth=void 0!==n?n:10,this._topHeight=void 0!==i?i:10,this._bottomHeight=void 0!==o?o:10,this.texture=e}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={vertices:{configurable:!0},width:{configurable:!0},height:{configurable:!0},leftWidth:{configurable:!0},rightWidth:{configurable:!0},topHeight:{configurable:!0},bottomHeight:{configurable:!0}};return e.prototype.textureUpdated=function(){this._textureID=this.shader.texture._updateID,this._refresh()},r.vertices.get=function(){return this.geometry.getBuffer("aVertexPosition").data},r.vertices.set=function(t){this.geometry.getBuffer("aVertexPosition").data=t},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)},r.width.get=function(){return this._width},r.width.set=function(t){this._width=t,this._refresh()},r.height.get=function(){return this._height},r.height.set=function(t){this._height=t,this._refresh()},r.leftWidth.get=function(){return this._leftWidth},r.leftWidth.set=function(t){this._leftWidth=t,this._refresh()},r.rightWidth.get=function(){return this._rightWidth},r.rightWidth.set=function(t){this._rightWidth=t,this._refresh()},r.topHeight.get=function(){return this._topHeight},r.topHeight.set=function(t){this._topHeight=t,this._refresh()},r.bottomHeight.get=function(){return this._bottomHeight},r.bottomHeight.set=function(t){this._bottomHeight=t,this._refresh()},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()},Object.defineProperties(e.prototype,r),e}(Xo),Ho=function(t){function e(e,r){t.call(this,e[0]instanceof Xe?e[0]:e[0].texture),this._textures=null,this._durations=null,this._autoUpdate=!1!==r,this._isConnectedToTicker=!1,this.animationSpeed=1,this.loop=!0,this.updateAnchor=!1,this.onComplete=null,this.onFrameChange=null,this.onLoop=null,this._currentTime=0,this._playing=!1,this._previousFrame=null,this.textures=e}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={totalFrames:{configurable:!0},textures:{configurable:!0},currentFrame:{configurable:!0},playing:{configurable:!0},autoUpdate:{configurable:!0}};return e.prototype.stop=function(){this.playing&&(this._playing=!1,this._autoUpdate&&this._isConnectedToTicker&&(oe.shared.remove(this.update,this),this._isConnectedToTicker=!1))},e.prototype.play=function(){this.playing||(this._playing=!0,this._autoUpdate&&!this._isConnectedToTicker&&(oe.shared.add(this.update,this,re.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){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.currentFrame<r?this.onLoop():this.animationSpeed<0&&this.currentFrame>r&&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<t.length;++i)r.push(Xe.from(t[i]));return new e(r)},e.fromImages=function(t){for(var r=[],i=0;i<t.length;++i)r.push(Xe.from(t[i]));return new e(r)},r.totalFrames.get=function(){return this._textures.length},r.textures.get=function(){return this._textures},r.textures.set=function(t){if(t[0]instanceof Xe)this._textures=t,this._durations=null;else{this._textures=[],this._durations=[];for(var e=0;e<t.length;e++)this._textures.push(t[e].texture),this._durations.push(t[e].time)}this._previousFrame=null,this.gotoAndStop(0),this.updateTexture()},r.currentFrame.get=function(){var t=Math.floor(this._currentTime)%this._textures.length;return t<0&&(t+=this._textures.length),t},r.playing.get=function(){return this._playing},r.autoUpdate.get=function(){return this._autoUpdate},r.autoUpdate.set=function(t){t!==this._autoUpdate&&(this._autoUpdate=t,!this._autoUpdate&&this._isConnectedToTicker?(oe.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._playing&&(oe.shared.add(this.update,this),this._isConnectedToTicker=!0))},Object.defineProperties(e.prototype,r),e}(Nn),zo="5.0.0";function Vo(){var t=this;Object.defineProperties(t,{SVG_SIZE:{get:function(){return gt(zo,"PIXI.utils.SVG_SIZE property has moved to PIXI.resources.SVGResource.SVG_SIZE"),t.SVGResource.SVG_SIZE}},TransformStatic:{get:function(){return gt(zo,"PIXI.TransformStatic class has been removed, use PIXI.Transform"),t.Transform}},TransformBase:{get:function(){return gt(zo,"PIXI.TransformBase class has been removed, use PIXI.Transform"),t.Transform}},TRANSFORM_MODE:{get:function(){return gt(zo,"PIXI.TRANSFORM_MODE property has been removed"),{STATIC:0,DYNAMIC:1}}},WebGLRenderer:{get:function(){return gt(zo,"PIXI.WebGLRenderer class has moved to PIXI.Renderer"),t.Renderer}},CanvasRenderTarget:{get:function(){return gt(zo,"PIXI.CanvasRenderTarget class has moved to PIXI.utils.CanvasRenderTarget"),t.utils.CanvasRenderTarget}},loader:{get:function(){return gt(zo,"PIXI.loader instance has moved to PIXI.Loader.shared"),t.Loader.shared}},FilterManager:{get:function(){return gt(zo,"PIXI.FilterManager class has moved to PIXI.systems.FilterSystem"),t.systems.FilterSystem}},CanvasTinter:{get:function(){return gt("5.2.0","PIXI.CanvasTinter namespace has moved to PIXI.canvasUtils"),t.canvasUtils}},GroupD8:{get:function(){return gt("5.2.0","PIXI.GroupD8 namespace has moved to PIXI.groupD8"),t.groupD8}}}),t.prepare={},Object.defineProperties(t.prepare,{BasePrepare:{get:function(){return gt("5.2.1","PIXI.prepare.BasePrepare moved to PIXI.BasePrepare"),t.BasePrepare}},Prepare:{get:function(){return gt("5.2.1","PIXI.prepare.Prepare moved to PIXI.Prepare"),t.Prepare}},CanvasPrepare:{get:function(){return gt("5.2.1","PIXI.prepare.CanvasPrepare moved to PIXI.CanvasPrepare"),t.CanvasPrepare}}}),t.extract={},Object.defineProperties(t.extract,{Extract:{get:function(){return gt("5.2.1","PIXI.extract.Extract moved to PIXI.Extract"),t.Extract}},CanvasExtract:{get:function(){return gt("5.2.1","PIXI.extract.CanvasExtract moved to PIXI.CanvasExtract"),t.CanvasExtract}}}),t.extras={},Object.defineProperties(t.extras,{TilingSprite:{get:function(){return gt(zo,"PIXI.extras.TilingSprite class has moved to PIXI.TilingSprite"),t.TilingSprite}},TilingSpriteRenderer:{get:function(){return gt(zo,"PIXI.extras.TilingSpriteRenderer class has moved to PIXI.TilingSpriteRenderer"),t.TilingSpriteRenderer}},AnimatedSprite:{get:function(){return gt(zo,"PIXI.extras.AnimatedSprite class has moved to PIXI.AnimatedSprite"),t.AnimatedSprite}},BitmapText:{get:function(){return gt(zo,"PIXI.extras.BitmapText class has moved to PIXI.BitmapText"),t.BitmapText}}}),Object.defineProperties(t.utils,{getSvgSize:{get:function(){return gt(zo,"PIXI.utils.getSvgSize function has moved to PIXI.resources.SVGResource.getSize"),t.SVGResource.getSize}}}),t.mesh={},Object.defineProperties(t.mesh,{Mesh:{get:function(){return gt(zo,"PIXI.mesh.Mesh class has moved to PIXI.SimpleMesh"),t.SimpleMesh}},NineSlicePlane:{get:function(){return gt(zo,"PIXI.mesh.NineSlicePlane class has moved to PIXI.NineSlicePlane"),t.NineSlicePlane}},Plane:{get:function(){return gt(zo,"PIXI.mesh.Plane class has moved to PIXI.SimplePlane"),t.SimplePlane}},Rope:{get:function(){return gt(zo,"PIXI.mesh.Rope class has moved to PIXI.SimpleRope"),t.SimpleRope}},RawMesh:{get:function(){return gt(zo,"PIXI.mesh.RawMesh class has moved to PIXI.Mesh"),t.Mesh}},CanvasMeshRenderer:{get:function(){return gt(zo,"PIXI.mesh.CanvasMeshRenderer class has moved to PIXI.CanvasMeshRenderer"),t.CanvasMeshRenderer}},MeshRenderer:{get:function(){return gt(zo,"PIXI.mesh.MeshRenderer class has moved to PIXI.MeshRenderer"),t.MeshRenderer}}}),t.particles={},Object.defineProperties(t.particles,{ParticleContainer:{get:function(){return gt(zo,"PIXI.particles.ParticleContainer class has moved to PIXI.ParticleContainer"),t.ParticleContainer}},ParticleRenderer:{get:function(){return gt(zo,"PIXI.particles.ParticleRenderer class has moved to PIXI.ParticleRenderer"),t.ParticleRenderer}}}),t.ticker={},Object.defineProperties(t.ticker,{Ticker:{get:function(){return gt(zo,"PIXI.ticker.Ticker class has moved to PIXI.Ticker"),t.Ticker}},shared:{get:function(){return gt(zo,"PIXI.ticker.shared instance has moved to PIXI.Ticker.shared"),t.Ticker.shared}}}),t.loaders={},Object.defineProperties(t.loaders,{Loader:{get:function(){return gt(zo,"PIXI.loaders.Loader class has moved to PIXI.Loader"),t.Loader}},Resource:{get:function(){return gt(zo,"PIXI.loaders.Resource class has moved to PIXI.LoaderResource"),t.LoaderResource}},bitmapFontParser:{get:function(){return gt(zo,"PIXI.loaders.bitmapFontParser function has moved to PIXI.BitmapFontLoader.use"),t.BitmapFontLoader.use}},parseBitmapFontData:{get:function(){return gt(zo,"PIXI.loaders.parseBitmapFontData function has moved to PIXI.BitmapFontLoader.parse"),t.BitmapFontLoader.parse}},spritesheetParser:{get:function(){return gt(zo,"PIXI.loaders.spritesheetParser function has moved to PIXI.SpritesheetLoader.use"),t.SpritesheetLoader.use}},getResourcePath:{get:function(){return gt(zo,"PIXI.loaders.getResourcePath property has moved to PIXI.SpritesheetLoader.getResourcePath"),t.SpritesheetLoader.getResourcePath}}}),t.Loader.addPixiMiddleware=function(e){return gt(zo,"PIXI.loaders.Loader.addPixiMiddleware function is deprecated, use PIXI.loaders.Loader.registerPlugin"),t.loaders.Loader.registerPlugin({use:e()})},Object.defineProperty(t.extract,"WebGLExtract",{get:function(){return gt(zo,"PIXI.extract.WebGLExtract method has moved to PIXI.Extract"),t.Extract}}),Object.defineProperty(t.prepare,"WebGLPrepare",{get:function(){return gt(zo,"PIXI.prepare.WebGLPrepare class has moved to PIXI.Prepare"),t.Prepare}}),t.Container.prototype._renderWebGL=function(t){gt(zo,"PIXI.Container._renderWebGL method has moved to PIXI.Container._render"),this._render(t)},t.Container.prototype.renderWebGL=function(t){gt(zo,"PIXI.Container.renderWebGL method has moved to PIXI.Container.render"),this.render(t)},t.DisplayObject.prototype.renderWebGL=function(t){gt(zo,"PIXI.DisplayObject.renderWebGL method has moved to PIXI.DisplayObject.render"),this.render(t)},t.Container.prototype.renderAdvancedWebGL=function(t){gt(zo,"PIXI.Container.renderAdvancedWebGL method has moved to PIXI.Container.renderAdvanced"),this.renderAdvanced(t)},Object.defineProperties(t.settings,{TRANSFORM_MODE:{get:function(){return gt(zo,"PIXI.settings.TRANSFORM_MODE property has been removed"),0},set:function(){gt(zo,"PIXI.settings.TRANSFORM_MODE property has been removed")}}});var e=t.BaseTexture;e.prototype.loadSource=function(e){gt(zo,"PIXI.BaseTexture.loadSource method has been deprecated");var r=t.resources.autoDetectResource(e);r.internal=!0,this.setResource(r),this.update()};var r=!1;Object.defineProperties(e.prototype,{hasLoaded:{get:function(){return gt(zo,"PIXI.BaseTexture.hasLoaded property has been removed, use PIXI.BaseTexture.valid"),this.valid}},imageUrl:{get:function(){return gt(zo,"PIXI.BaseTexture.imageUrl property has been removed, use PIXI.BaseTexture.resource.url"),this.resource&&this.resource.url},set:function(t){gt(zo,"PIXI.BaseTexture.imageUrl property has been removed, use PIXI.BaseTexture.resource.url"),this.resource&&(this.resource.url=t)}},source:{get:function(){return gt(zo,"PIXI.BaseTexture.source property has been moved, use `PIXI.BaseTexture.resource.source`"),this.resource&&this.resource.source},set:function(t){gt(zo,"PIXI.BaseTexture.source property has been moved, use `PIXI.BaseTexture.resource.source` if you want to set HTMLCanvasElement. Otherwise, create new BaseTexture."),this.resource&&(this.resource.source=t)}},premultiplyAlpha:{get:function(){return gt("5.2.0","PIXI.BaseTexture.premultiplyAlpha property has been changed to `alphaMode`, see `PIXI.ALPHA_MODES`"),0!==this.alphaMode},set:function(t){gt("5.2.0","PIXI.BaseTexture.premultiplyAlpha property has been changed to `alphaMode`, see `PIXI.ALPHA_MODES`"),this.alphaMode=Number(t)}},_id:{get:function(){return r||(gt("5.2.0","PIXI.BaseTexture._id batch local field has been changed to `_batchLocation`"),r=!0),this._batchLocation},set:function(t){this._batchLocation=t}}}),e.fromImage=function(t,r,i,n){gt(zo,"PIXI.BaseTexture.fromImage method has been replaced with PIXI.BaseTexture.from");var o={scale:n,crossorigin:r};return e.from(t,{scaleMode:i,resourceOptions:o})},e.fromCanvas=function(t,r){return gt(zo,"PIXI.BaseTexture.fromCanvas method has been replaced with PIXI.BaseTexture.from"),e.from(t,{scaleMode:r})},e.fromSVG=function(t,r,i,n){gt(zo,"PIXI.BaseTexture.fromSVG method has been replaced with PIXI.BaseTexture.from");var o={scale:n,crossorigin:r};return e.from(t,{scaleMode:i,resourceOptions:o})},Object.defineProperties(t.resources.ImageResource.prototype,{premultiplyAlpha:{get:function(){return gt("5.2.0","PIXI.resources.ImageResource.premultiplyAlpha property has been changed to `alphaMode`, see `PIXI.ALPHA_MODES`"),0!==this.alphaMode},set:function(t){gt("5.2.0","PIXI.resources.ImageResource.premultiplyAlpha property has been changed to `alphaMode`, see `PIXI.ALPHA_MODES`"),this.alphaMode=Number(t)}}}),t.Point.prototype.copy=function(t){return gt(zo,"PIXI.Point.copy method has been replaced with PIXI.Point.copyFrom"),this.copyFrom(t)},t.ObservablePoint.prototype.copy=function(t){return gt(zo,"PIXI.ObservablePoint.copy method has been replaced with PIXI.ObservablePoint.copyFrom"),this.copyFrom(t)},t.Rectangle.prototype.copy=function(t){return gt(zo,"PIXI.Rectangle.copy method has been replaced with PIXI.Rectangle.copyFrom"),this.copyFrom(t)},t.Matrix.prototype.copy=function(t){return gt(zo,"PIXI.Matrix.copy method has been replaced with PIXI.Matrix.copyTo"),this.copyTo(t)},t.systems.StateSystem.prototype.setState=function(t){return gt("v5.1.0","StateSystem.setState has been renamed to StateSystem.set"),this.set(t)},Object.assign(t.systems.FilterSystem.prototype,{getRenderTarget:function(t,e){return gt(zo,"PIXI.FilterManager.getRenderTarget method has been replaced with PIXI.systems.FilterSystem#getFilterTexture"),this.getFilterTexture(e)},returnRenderTarget:function(t){gt(zo,"PIXI.FilterManager.returnRenderTarget method has been replaced with PIXI.systems.FilterSystem.returnFilterTexture"),this.returnFilterTexture(t)},calculateScreenSpaceMatrix:function(t){gt(zo,"PIXI.systems.FilterSystem.calculateScreenSpaceMatrix method is removed, use `(vTextureCoord * inputSize.xy) + outputFrame.xy` instead");var e=t.identity(),r=this.activeState,i=r.sourceFrame,n=r.destinationFrame;return e.translate(i.x/n.width,i.y/n.height),e.scale(n.width,n.height),e},calculateNormalizedScreenSpaceMatrix:function(t){gt(zo,"PIXI.systems.FilterManager.calculateNormalizedScreenSpaceMatrix method is removed, use `((vTextureCoord * inputSize.xy) + outputFrame.xy) / outputFrame.zw` instead.");var e=this.activeState,r=e.sourceFrame,i=e.destinationFrame,n=t.identity();n.translate(r.x/i.width,r.y/i.height);var o=i.width/r.width,s=i.height/r.height;return n.scale(o,s),n}}),Object.defineProperties(t.RenderTexture.prototype,{sourceFrame:{get:function(){return gt(zo,"PIXI.RenderTexture.sourceFrame property has been removed"),this.filterFrame}},size:{get:function(){return gt(zo,"PIXI.RenderTexture.size property has been removed"),this._frame}}});var i=function(t){function e(e,r,i,n){gt(zo,"PIXI.filters.BlurXFilter class is deprecated, use PIXI.filters.BlurFilterPass"),t.call(this,!0,e,r,i,n)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(t.filters.BlurFilterPass),n=function(t){function e(e,r,i,n){gt(zo,"PIXI.filters.BlurYFilter class is deprecated, use PIXI.filters.BlurFilterPass"),t.call(this,!1,e,r,i,n)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(t.filters.BlurFilterPass);Object.assign(t.filters,{BlurXFilter:i,BlurYFilter:n});var o=t.Sprite,s=t.Texture,a=t.Graphics;function h(t,e,r,i){return gt(zo,"PIXI.Sprite."+t+" method is deprecated, use PIXI.Sprite.from"),o.from(e,{resourceOptions:{scale:i,crossorigin:r}})}function u(t,e,r,i){return gt(zo,"PIXI.Texture."+t+" method is deprecated, use PIXI.Texture.from"),s.from(e,{resourceOptions:{scale:i,crossorigin:r}})}a.prototype.generateCanvasTexture||(a.prototype.generateCanvasTexture=function(){gt(zo,'PIXI.Graphics.generateCanvasTexture method is only available in "pixi.js-legacy"')}),Object.defineProperty(t.Graphics.prototype,"graphicsData",{get:function(){return gt(zo,"PIXI.Graphics.graphicsData property is deprecated, use PIXI.Graphics.geometry.graphicsData"),this.geometry.graphicsData}}),Object.defineProperty(t.SimpleRope.prototype,"points",{get:function(){return gt(zo,"PIXI.SimpleRope.points property is deprecated, use PIXI.SimpleRope.geometry.points"),this.geometry.points},set:function(t){gt(zo,"PIXI.SimpleRope.points property is deprecated, use PIXI.SimpleRope.geometry.points"),this.geometry.points=t}}),o.fromImage=h.bind(null,"fromImage"),o.fromSVG=h.bind(null,"fromSVG"),o.fromCanvas=h.bind(null,"fromCanvas"),o.fromVideo=h.bind(null,"fromVideo"),o.fromFrame=h.bind(null,"fromFrame"),s.fromImage=u.bind(null,"fromImage"),s.fromSVG=u.bind(null,"fromSVG"),s.fromCanvas=u.bind(null,"fromCanvas"),s.fromVideo=u.bind(null,"fromVideo"),s.fromFrame=u.bind(null,"fromFrame"),Object.defineProperty(t.AbstractRenderer.prototype,"autoResize",{get:function(){return gt(zo,"PIXI.AbstractRenderer.autoResize property is deprecated, use PIXI.AbstractRenderer.autoDensity"),this.autoDensity},set:function(t){gt(zo,"PIXI.AbstractRenderer.autoResize property is deprecated, use PIXI.AbstractRenderer.autoDensity"),this.autoDensity=t}}),Object.defineProperty(t.Renderer.prototype,"textureManager",{get:function(){return gt(zo,"PIXI.Renderer.textureManager property is deprecated, use PIXI.Renderer.texture"),this.texture}}),t.utils.mixins={mixin:function(){gt(zo,"PIXI.utils.mixins.mixin function is no longer available")},delayMixin:function(){gt(zo,"PIXI.utils.mixins.delayMixin function is no longer available")},performMixins:function(){gt(zo,"PIXI.utils.mixins.performMixins function is no longer available")}}}li.registerPlugin("accessibility",ie),li.registerPlugin("extract",Ri),li.registerPlugin("interaction",ve),li.registerPlugin("particle",an),li.registerPlugin("prepare",no),li.registerPlugin("batch",Pi),li.registerPlugin("tilingSprite",go),en.registerPlugin(_o),en.registerPlugin(lo),Ai.registerPlugin(se),Ai.registerPlugin(rn);var Yo="5.2.3",Wo={AlphaFilter:xo,BlurFilter:Eo,BlurFilterPass:wo,ColorMatrixFilter:So,DisplacementFilter:Io,FXAAFilter:Po,NoiseFilter:Ao};r(96),r(67),r(111),r(112),r(115),r(116),r(117),r(119),r(121),r(122),r(123),r(124),r(75),r(128),r(132),r(141),r(143),r(144),r(145),r(146),r(147),r(148),r(149),r(150),r(151),r(152),r(153),r(155),r(156),r(157),r(158),r(159),r(160),r(161),r(162),r(163),r(164),r(165);(function(t){r||(r={}),Object.assign(t.Container.prototype,{render:function(t){this._activeParentLayer&&this._activeParentLayer!=t._activeLayer||(this.visible?(this.displayOrder=t.incDisplayOrder(),this.worldAlpha<=0||!this.renderable||(t._activeLayer=null,this.containerRenderWebGL(t),t._activeLayer=this._activeParentLayer)):this.displayOrder=0)},renderCanvas:function(t){this._activeParentLayer&&this._activeParentLayer!=t._activeLayer||(this.visible?(this.displayOrder=t.incDisplayOrder(),this.worldAlpha<=0||!this.renderable||(t._activeLayer=null,this.containerRenderCanvas(t),t._activeLayer=this._activeParentLayer)):this.displayOrder=0)},containerRenderWebGL:t.Container.prototype.render,containerRenderCanvas:t.Container.prototype.renderCanvas}),Object.assign(t.DisplayObject.prototype,{parentLayer:null,_activeParentLayer:null,parentGroup:null,zOrder:0,zIndex:0,updateOrder:0,displayOrder:0,layerableChildren:!0,isLayer:!1}),t.ParticleContainer?t.ParticleContainer.prototype.layerableChildren=!1:t.ParticleContainer&&(t.ParticleContainer.prototype.layerableChildren=!1);var e,r,i=(e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,r)},function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)});!function(e){var r=function(t){function e(e,r){var i=t.call(this)||this;return i._activeLayer=null,i._activeStage=null,i._activeChildren=[],i._lastUpdateId=-1,i.useRenderTexture=!1,i.useDoubleBuffer=!1,i.sortPriority=0,i.clearColor=new Float32Array([0,0,0,0]),i.canDrawWithoutLayer=!1,i.canDrawInParentStage=!0,i.zIndex=0,i.enableSort=!1,i._tempResult=[],i._tempZero=[],i.useZeroOptimization=!1,i.zIndex=e,i.enableSort=!!r,"function"==typeof r&&i.on("sort",r),i}return i(e,t),e.prototype.doSort=function(t,r){if(this.listeners("sort",!0))for(var i=0;i<r.length;i++)this.emit("sort",r[i]);this.useZeroOptimization?this.doSortWithZeroOptimization(t,r):r.sort(e.compareZIndex)},e.compareZIndex=function(t,e){return t.zOrder<e.zOrder?-1:t.zOrder>e.zOrder?1:t.updateOrder-e.updateOrder},e.prototype.doSortWithZeroOptimization=function(t,e){throw new Error("not implemented yet")},e.prototype.clear=function(){this._activeLayer=null,this._activeStage=null,this._activeChildren.length=0},e.prototype.addDisplayObject=function(t,e){this.check(t),e._activeParentLayer=this._activeLayer,this._activeLayer?this._activeLayer._activeChildren.push(e):this._activeChildren.push(e)},e.prototype.foundLayer=function(t,r){this.check(t),null!=this._activeLayer&&e.conflict(),this._activeLayer=r,this._activeStage=t},e.prototype.foundStage=function(t){this._activeLayer||this.canDrawInParentStage||this.clear()},e.prototype.check=function(t){if(this._lastUpdateId<e._layerUpdateId)this._lastUpdateId=e._layerUpdateId,this.clear(),this._activeStage=t;else if(this.canDrawInParentStage){for(var r=this._activeStage;r&&r!=t;)r=r._activeParentStage;if(this._activeStage=r,null==r)return void this.clear()}},e.conflict=function(){e._lastLayerConflict+5e3<Date.now()&&(e._lastLayerConflict=Date.now(),console.log("PIXI-display plugin found two layers with the same group in one stage - that's not healthy. Please place a breakpoint here and debug it"))},e._layerUpdateId=0,e._lastLayerConflict=0,e}(t.utils.EventEmitter);e.Group=r}(r||(r={})),function(t){function e(e,r,i,n,o){this.search||(this.search=new t.LayersTreeSearch),this.search.findHit(e,r,i,n);var s=this.delayedEvents;if(s&&s.length){e.stopPropagationHint=!1;var a=s.length;this.delayedEvents=[];for(var h=0;h<a;h++){var u=s[h],c=u.displayObject,l=u.eventString,d=u.eventData;d.stopsPropagatingAt===c&&(d.stopPropagationHint=!0),this.dispatchEvent(c,l,d)}}}t.processInteractive51=e,t.patchInteractionManager=function(r){r&&(r.search?r.search.worksWithDisplay||(r.search=new t.LayersTreeSearch):r.processInteractive=e)}}(r||(r={})),function(e){var r=function(){function e(e){this.layer=e,this.renderTexture=null,this.doubleBuffer=null,this.currentBufferIndex=0,this._tempRenderTarget=null,this._tempRenderTargetSource=new t.Rectangle}return e.prototype.initRenderTexture=function(e){var r=e?e.screen.width:100,i=e?e.screen.height:100,n=e?e.resolution:t.settings.RESOLUTION;this.renderTexture=t.RenderTexture.create({width:r,height:i,resolution:n}),this.layer.group.useDoubleBuffer&&(this.doubleBuffer=[t.RenderTexture.create({width:r,height:i,resolution:n}),t.RenderTexture.create({width:r,height:i,resolution:n})])},e.prototype.getRenderTexture=function(){return this.renderTexture||this.initRenderTexture(),this.renderTexture},e.prototype.pushTexture=function(t){var e=t.screen;this.renderTexture||this.initRenderTexture(t);var r=this.renderTexture,i=this.layer.group,n=this.doubleBuffer;if(r.width===e.width&&r.height===e.height&&r.baseTexture.resolution===t.resolution||(r.baseTexture.resolution=t.resolution,r.resize(e.width,e.height),n&&(n[0].baseTexture.resolution=t.resolution,n[0].resize(e.width,e.height),n[1].baseTexture.resolution=t.resolution,n[1].resize(e.width,e.height))),this._tempRenderTarget=t.renderTexture.current,this._tempRenderTargetSource.copyFrom(t.renderTexture.sourceFrame),t.batch.flush(),i.useDoubleBuffer){var o=n[this.currentBufferIndex];o.baseTexture._glTextures[t.CONTEXT_UID]||(t.renderTexture.bind(o,void 0,void 0),t.texture.bind(o),i.clearColor&&t.renderTexture.clear(i.clearColor)),t.texture.unbind(r),r.baseTexture._glTextures=o.baseTexture._glTextures,r.baseTexture.framebuffer=o.baseTexture.framebuffer,o=n[1-this.currentBufferIndex],t.renderTexture.bind(o,void 0,void 0)}else t.renderTexture.bind(r,void 0,void 0);i.clearColor&&t.renderTexture.clear(i.clearColor);var s=t.filter.defaultFilterStack;s.length>1&&(s[s.length-1].renderTexture=t.renderTexture.current)},e.prototype.popTexture=function(t){t.batch.flush();var e=t.filter.defaultFilterStack;e.length>1&&(e[e.length-1].renderTexture=this._tempRenderTarget),t.renderTexture.bind(this._tempRenderTarget,this._tempRenderTargetSource,void 0),this._tempRenderTarget=null;var r=this.renderTexture,i=this.layer.group,n=this.doubleBuffer;if(i.useDoubleBuffer){t.texture.unbind(r),this.currentBufferIndex=1-this.currentBufferIndex;var o=n[this.currentBufferIndex];r.baseTexture._glTextures=o.baseTexture._glTextures,r.baseTexture.framebuffer=o.baseTexture.framebuffer}},e.prototype.destroy=function(){this.renderTexture&&(this.renderTexture.destroy(),this.doubleBuffer&&(this.doubleBuffer[0].destroy(!0),this.doubleBuffer[1].destroy(!0)))},e}();e.LayerTextureCache=r;var n=function(t){function n(r){void 0===r&&(r=null);var i=t.call(this)||this;return i.isLayer=!0,i.group=null,i._activeChildren=[],i._tempChildren=null,i._activeStageParent=null,i._sortedChildren=[],i._tempLayerParent=null,i.insertChildrenBeforeActive=!0,i.insertChildrenAfterActive=!0,null!=r?(i.group=r,i.zIndex=r.zIndex):i.group=new e.Group(0,!1),i._tempChildren=i.children,i}return i(n,t),n.prototype.beginWork=function(t){var e=this._activeChildren;this._activeStageParent=t,this.group.foundLayer(t,this);var r=this.group._activeChildren;e.length=0;for(var i=0;i<r.length;i++)r[i]._activeParentLayer=this,e.push(r[i]);r.length=0},n.prototype.endWork=function(){for(var t=this.children,e=this._activeChildren,r=this._sortedChildren,i=0;i<e.length;i++)this.emit("display",e[i]);if(r.length=0,this.insertChildrenBeforeActive)for(i=0;i<t.length;i++)r.push(t[i]);for(i=0;i<e.length;i++)r.push(e[i]);if(!this.insertChildrenBeforeActive&&this.insertChildrenAfterActive)for(i=0;i<t.length;i++)r.push(t[i]);this.group.enableSort&&this.doSort()},Object.defineProperty(n.prototype,"useRenderTexture",{get:function(){return this.group.useRenderTexture},set:function(t){this.group.useRenderTexture=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"useDoubleBuffer",{get:function(){return this.group.useDoubleBuffer},set:function(t){this.group.useDoubleBuffer=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"clearColor",{get:function(){return this.group.clearColor},set:function(t){this.group.clearColor=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"sortPriority",{get:function(){return this.group.sortPriority},set:function(t){this.group.sortPriority=t},enumerable:!0,configurable:!0}),n.prototype.getRenderTexture=function(){return this.textureCache||(this.textureCache=new r(this)),this.textureCache.getRenderTexture()},n.prototype.updateDisplayLayers=function(){},n.prototype.doSort=function(){this.group.doSort(this,this._sortedChildren)},n.prototype._preRender=function(t){return(!this._activeParentLayer||this._activeParentLayer==t._activeLayer)&&(this.visible?(this.displayOrder=t.incDisplayOrder(),!(this.worldAlpha<=0||!this.renderable)&&(this.children!==this._sortedChildren&&this._tempChildren!=this.children&&(this._tempChildren=this.children),this._boundsID++,this.children=this._sortedChildren,this._tempLayerParent=t._activeLayer,t._activeLayer=this,!0)):(this.displayOrder=0,!1))},n.prototype._postRender=function(t){this.children=this._tempChildren,t._activeLayer=this._tempLayerParent,this._tempLayerParent=null},n.prototype.render=function(t){this._preRender(t)&&(this.group.useRenderTexture&&(this.textureCache||(this.textureCache=new r(this)),this.textureCache.pushTexture(t)),this.containerRenderWebGL(t),this._postRender(t),this.group.useRenderTexture&&this.textureCache.popTexture(t))},n.prototype.destroy=function(e){this.textureCache&&(this.textureCache.destroy(),this.textureCache=null),t.prototype.destroy.call(this,e)},n}(t.Container);e.Layer=n,n.prototype.renderCanvas=function(t){this._preRender(t)&&(this.containerRenderCanvas(t),this._postRender(t))}}(r||(r={})),function(e){var r=t.Point,i=function(){function t(){this._tempPoint=new r,this._queue=[[],[]],this._eventDisplayOrder=0,this.worksWithDisplay=!0}return t.prototype.recursiveFindHit=function(t,e,r,i,n){if(!e||!e.visible)return 0;var o=0,s=i=e.interactive||i;e.hitArea&&(s=!1),e._activeParentLayer&&(n=!1);var a=e._mask;r<1/0&&a&&(a.containsPoint(t)||(n=!0)),r<1/0&&e.filterArea&&(e.filterArea.contains(t.x,t.y)||(n=!0));var h=e.children;if(e.interactiveChildren&&h)for(var u=h.length-1;u>=0;u--){var c=h[u],l=this.recursiveFindHit(t,c,r,s,n);if(l){if(!c.parent)continue;o=l,r=l}}return i&&(n?e.interactive&&this._queueAdd(e,0):(r<e.displayOrder&&(e.hitArea?(e.worldTransform.applyInverse(t,this._tempPoint),e.hitArea.contains(this._tempPoint.x,this._tempPoint.y)&&(o=e.displayOrder)):e.containsPoint&&e.containsPoint(t)&&(o=e.displayOrder)),e.interactive&&this._queueAdd(e,o===1/0?0:o))),o},t.prototype.findHit=function(t,e,r,i){var n=null,o=null;o=t.data&&t.data.global?(n=t).data.global:t,this._startInteractionProcess(),this.recursiveFindHit(o,e,i?0:1/0,!1,!1),this._finishInteractionProcess(n,r)},t.prototype._startInteractionProcess=function(){this._eventDisplayOrder=1,this._queue||(this._queue=[[],[]]),this._queue[0].length=0,this._queue[1].length=0},t.prototype._queueAdd=function(t,e){var r=this._queue;if(e<this._eventDisplayOrder)r[0].push(t);else{if(e>this._eventDisplayOrder){this._eventDisplayOrder=e;for(var i=r[1],n=0,o=i.length;n<o;n++)r[0].push(i[n]);r[1].length=0}r[1].push(t)}},t.prototype._finishInteractionProcess=function(t,e){for(var r=this._queue,i=r[0],n=0,o=i.length;n<o;n++)t?e&&e(t,i[n],!1):e(i[n],!1);for(n=0,o=(i=r[1]).length;n<o;n++)t?(t.target||(t.target=i[n]),e&&e(t,i[n],!0)):e(i[n],!0)},t}();e.LayersTreeSearch=i}(r||(r={})),function(t){var e=function(e){function r(){var t=e.call(this)||this;return t.isStage=!0,t._tempGroups=[],t._activeLayers=[],t._activeParentStage=null,t}return i(r,e),r.prototype.clear=function(){this._activeLayers.length=0,this._tempGroups.length=0},r.prototype.destroy=function(t){this.clear(),e.prototype.destroy.call(this,t)},r.prototype._addRecursive=function(t){if(t.visible){if(t.isLayer){var e=t;this._activeLayers.push(e),e.beginWork(this)}if(t!=this&&t.isStage){t.updateAsChildStage(this)}else{var i=t.parentGroup;null!=i&&i.addDisplayObject(this,t);var n=t.parentLayer;if(null!=n&&(i=n.group).addDisplayObject(this,t),t.updateOrder=++r._updateOrderCounter,!(t.alpha<=0||!t.renderable||!t.layerableChildren||i&&i.sortPriority)){var o=t.children;if(o&&o.length)for(var s=0;s<o.length;s++)this._addRecursive(o[s])}}}},r.prototype._addRecursiveChildren=function(t){if(!(t.alpha<=0)&&t.renderable&&t.layerableChildren){var e=t.children;if(e&&e.length)for(var r=0;r<e.length;r++)this._addRecursive(e[r])}},r.prototype._updateStageInner=function(){this.clear(),this._addRecursive(this);for(var t=this._activeLayers,e=0;e<t.length;e++){if((n=t[e]).group.sortPriority){n.endWork();for(var r=n._sortedChildren,i=0;i<r.length;i++)this._addRecursiveChildren(r[i])}}for(e=0;e<t.length;e++){var n;(n=t[e]).group.sortPriority||n.endWork()}},r.prototype.updateAsChildStage=function(t){this._activeParentStage=t,r._updateOrderCounter=0,this._updateStageInner()},r.prototype.updateStage=function(){this._activeParentStage=null,t.Group._layerUpdateId++,this._updateStageInner()},r._updateOrderCounter=0,r}(t.Layer);t.Stage=e}(r||(r={})),function(e){Object.assign(t.Renderer.prototype,{_lastDisplayOrder:0,_activeLayer:null,incDisplayOrder:function(){return++this._lastDisplayOrder},_oldRender:t.Renderer.prototype.render,render:function(t,r,i,n,o){r||(this._lastDisplayOrder=0),this._activeLayer=null,t.isStage&&t.updateStage(),e.patchInteractionManager(this.plugins.interaction),this._oldRender(t,r,i,n,o)}});var r=t.CanvasRenderer;r&&Object.assign(r.prototype,{_lastDisplayOrder:0,_activeLayer:null,incDisplayOrder:function(){return++this._lastDisplayOrder},_oldRender:r.prototype.render,render:function(t,r,i,n,o){r||(this._lastDisplayOrder=0),this._activeLayer=null,t.isStage&&t.updateStage(),e.patchInteractionManager(this.plugins.interaction),this._oldRender(t,r,i,n,o)}})}(r||(r={})),t.display=r})(s),window.PIXI=s;var qo=s,Zo=document.getElementById("container").clientWidth,Ko=document.getElementById("container").clientHeight,Jo=new qo.Application({width:Zo,height:Ko,backgroundColor:1087931,view:document.querySelector("#scene"),resolution:window.devicePixelRatio||1});Jo.stage=new qo.display.Stage,Jo.stage.sortableChildren=!0,window.app=Jo,window.sizes={width:Zo,height:Ko,ofWidth:function(t){return this.width*t},ofHeight:function(t){return this.height*t},constant:function(t){return this.height/700*t}};r(79),r(81);var $o=[],Qo=!1;function ts(t){Qo||("click"===t.type?window.removeEventListener("touchstart",ts):window.removeEventListener("click",ts),Qo=!0);for(var e=0;e<$o.length;e++)$o[e](t)}window.addEventListener("click",ts),window.addEventListener("touchstart",ts);r(39);var es=qo.Texture.from("assets/background-day.png"),rs=new qo.display.Group(2,!1),is=new qo.display.Layer(rs),ns=new qo.Container,os=[],ss=window.sizes,as=ss.width,hs=ss.height;app.stage.addChild(ns),app.stage.addChild(is);var us={update:function(t,e){if(t.isPlaying&&!t.lost)for(var r=0;r<os.length;r++){var i=os[r];i.x+=t.groundSpeed*e*.5,i.x<-as&&(i.x+=as*os.length)}},init:function(t){for(var e=0;e<3;e++){var r=new qo.Sprite(es);r.x=as*e,r.y=0,r.width=as,r.height=hs,r.anchor.set(0),r.parentGroup=rs,ns.addChild(r),os.push(r)}}},cs=qo.Texture.from("assets/base.png"),ls=new qo.display.Group(5,!1),ds=new qo.display.Layer(ls),ps=new qo.Container,fs=[],vs=window.sizes,ys=vs.width,gs=vs.height;app.stage.addChild(ps),app.stage.addChild(ds);var ms={init:function(t){for(var e=t.groundHeight,r=0;r<3;r++){var i=new qo.Sprite(cs);i.x=ys*r,i.y=gs-e,i.width=ys,i.height=e,i.anchor.set(0),i.parentGroup=ls,ps.addChild(i),fs.push(i)}},update:function(t,e){if(t.isPlaying&&!t.lost)for(var r=0;r<fs.length;r++){var i=fs[r];i.x+=t.groundSpeed*e,i.x<-ys&&(i.x+=ys*fs.length)}}},_s=(r(169),r(82),r(170),["assets/pipe-green.png"].map((function(t){return qo.Texture.from(t)}))),xs=new qo.display.Group(4,!1),bs=new qo.display.Layer(xs),Ts=new qo.Container;app.stage.addChild(Ts),app.stage.addChild(bs);var ws=[],Es=function(t,e){var r=t.tubeHeight,i=t.tubeWidth,n=t.tubeGap,o=t.groundHeight,s=sizes.height;e||(e=ws[ws.length-1].top.x+t.tubeDistance);var a=s-o-r,h=a+(r+n-a)*Math.random(),u=_s[0],c=new qo.Sprite(u),l=new qo.Sprite(u),d=!1;c.anchor.set(.5,0),l.anchor.set(.5,0),l.angle=180,l.width=i,l.height=r,c.width=i,c.height=r,c.parentGroup=xs,l.parentGroup=xs,Ts.addChild(c),Ts.addChild(l);var p=function(e,r){e&&(c.x=e,l.x=e),r&&(c.y=r,l.y=r-n),d||e<=sizes.width/2-i/2&&(t.score++,d=!0)},f={setPosition:p,btm:c,top:l,dispose:function(){Ts.removeChild(c),Ts.removeChild(l),c.destroy(),l.destroy(),ws.splice(ws.indexOf(f),1)},checkCollision:function(t){var e=c.getBounds(!1),r=l.getBounds(!1);return Ps(t,e)||Ps(t,r)},passed:d};ws.push(f),p(e,h)},Ss=function(){return ws},Is={init:function(t){Es(t,1.3*sizes.width);for(var e=0;e<5;e++)Es(t)},update:function(t,e){if(t.isPlaying&&!t.lost){for(var r=null,i=0;i<ws.length;i++){var n=ws[i];n.top.x<=-t.tubeWidth/2&&(r=n),n.setPosition(n.top.x+t.groundSpeed*e)}r&&(r.dispose(),Es(t))}},getTubes:Ss,destroyAlltubes:function(){for(;Ss().length>0;)Ss()[0].dispose()}};function Ps(t,e){return!(e.left>t.right||e.right<t.left||e.top>t.bottom||e.bottom<t.top)}var As=qo.Texture.from("assets/bluebird-downflap.png"),Os=new qo.display.Group(3,!1),Cs=new qo.display.Layer(Os),Ms=new qo.Container;app.stage.addChild(Ms),app.stage.addChild(Cs);var Rs=new qo.Sprite(As);Ms.addChild(Rs);var Ds=sizes.ofWidth(.13),Ls=24*Ds/34,Fs={update:function(t,e){!t.isPlaying||t.lost||(t.playerSpeed+=e*t.gravityAcceleration,t.playerPosition.y+=t.playerSpeed*e,t.playerPosition.y<0&&(t.playerPosition.y=0,t.playerSpeed=0),function(t,e){Rs.y+Ls/2>=window.sizes.height-t.groundHeight&&(t.lost=!0);var r=Is.getTubes(),i=Rs.getBounds(!1),n={left:i.left,right:i.right,top:i.top,bottom:i.bottom};n.right-=.2*Rs.width,n.left+=.2*Rs.width,n.top+=.2*Rs.height,n.bottom-=.2*Rs.height;for(var o=0;o<3;o++){var s=r[o];s&&(s.checkCollision(n)&&(t.lost=!0))}}(t)),Rs.x=t.playerPosition.x,Rs.y=t.playerPosition.y},init:function(t){Rs.anchor.set(.5,0),Rs.parentGroup=Os,Rs.width=Ds,Rs.height=Ls,Rs.x=t.playerPosition.x,Rs.y=t.playerPosition.y}},Ns=(r(172),r(173),new Array(10).fill().map((function(t,e){return qo.Texture.from("assets/".concat(e,".png"))}))),Bs=new qo.display.Group(9,!1),Us=new qo.display.Layer(Bs),ks=new qo.Container,Xs=sizes.ofWidth(.11),js=Xs/1.45;ks.x=sizes.ofWidth(.1/3),ks.y=ks.x,app.stage.addChild(ks),app.stage.addChild(Us);var Gs,Hs=-1,zs=[us,ms,Fs,Is,{init:function(t){},update:function(t,e){if(t.score!==Hs){Hs=t.score,ks.children.forEach((function(t){return t.destroy()})),ks.removeChildren();for(var r=String(Hs),i=0;i<r.length;i++){var n=r[i],o=new qo.Sprite(Ns[Number(n)]);o.x=i*(1.1*js),o.width=js,o.height=Xs,o.parentGroup=Bs,ks.addChild(o)}}}}],Vs=Ys();function Ys(){return{isPlaying:!1,lost:!1,playerPosition:{x:sizes.ofWidth(.5),y:sizes.ofHeight(.5)},playerSpeed:0,playerSpeedJumped:sizes.constant(-10),gravityAcceleration:sizes.constant(.6),groundSpeed:sizes.constant(-4),groundHeight:.12*window.sizes.height,tubeWidth:sizes.ofWidth(.14),tubeHeight:sizes.height/2,tubeGap:sizes.ofHeight(.24),tubeDistance:sizes.ofWidth(.6),score:0}}zs.forEach((function(t){return t.init(Vs)})),app.ticker.add((function(t){for(var e=0;e<5;e++)for(var r=0;r<zs.length;r++)zs[r].update(Vs,t/5)})),Gs=function(t){if(Vs.lost)return Vs=Ys(),Is.destroyAlltubes(),void Is.init(Vs);var e=Vs,r=e.isPlaying,i=e.playerSpeedJumped;r||(Vs.isPlaying=!0),Vs.playerSpeed=i},$o.push(Gs)}]);