if (self.CavalryLogger) { CavalryLogger.start_js(["TVlQe"]); } /** * License: https://www.facebook.com/legal/license/MDzNl_j9yvg/ */ __d("bit-twiddle-1.0.2",[],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g={},h={exports:g};function i(){__p&&__p();var a=32;g.INT_BITS=a;g.INT_MAX=2147483647;g.INT_MIN=-1<0)-(a<0)};g.abs=function(b){var c=b>>a-1;return(b^c)-c};g.min=function(a,b){return b^(a^b)&-(a65535)<<4;a>>>=b;c=(a>255)<<3;a>>>=c;b|=c;c=(a>15)<<2;a>>>=c;b|=c;c=(a>3)<<1;a>>>=c;b|=c;return b|a>>1};g.log10=function(a){return a>=1e9?9:a>=1e8?8:a>=1e7?7:a>=1e6?6:a>=1e5?5:a>=1e4?4:a>=1e3?3:a>=100?2:a>=10?1:0};g.popCount=function(a){a=a-(a>>>1&1431655765);a=(a&858993459)+(a>>>2&858993459);return(a+(a>>>4)&252645135)*16843009>>>24};function b(a){var b=32;a&=-a;a&&b--;a&65535&&(b-=16);a&16711935&&(b-=8);a&252645135&&(b-=4);a&858993459&&(b-=2);a&1431655765&&(b-=1);return b}g.countTrailingZeros=b;g.nextPow2=function(a){a+=a===0;--a;a|=a>>>1;a|=a>>>2;a|=a>>>4;a|=a>>>8;a|=a>>>16;return a+1};g.prevPow2=function(a){a|=a>>>1;a|=a>>>2;a|=a>>>4;a|=a>>>8;a|=a>>>16;return a-(a>>>1)};g.parity=function(a){a^=a>>>16;a^=a>>>8;a^=a>>>4;a&=15;return 27030>>>a&1};var c=new Array(256);(function(a){for(var b=0;b<256;++b){var c=b,d=b,e=7;for(c>>>=1;c;c>>>=1)d<<=1,d|=c&1,--e;a[b]=d<>>8&255]<<16|c[a>>>16&255]<<8|c[a>>>24&255]};g.interleave2=function(a,b){__p&&__p();a&=65535;a=(a|a<<8)&16711935;a=(a|a<<4)&252645135;a=(a|a<<2)&858993459;a=(a|a<<1)&1431655765;b&=65535;b=(b|b<<8)&16711935;b=(b|b<<4)&252645135;b=(b|b<<2)&858993459;b=(b|b<<1)&1431655765;return a|b<<1};g.deinterleave2=function(a,b){a=a>>>b&1431655765;a=(a|a>>>1)&858993459;a=(a|a>>>2)&252645135;a=(a|a>>>4)&16711935;a=(a|a>>>16)&65535;return a<<16>>16};g.interleave3=function(a,b,c){__p&&__p();a&=1023;a=(a|a<<16)&4278190335;a=(a|a<<8)&251719695;a=(a|a<<4)&3272356035;a=(a|a<<2)&1227133513;b&=1023;b=(b|b<<16)&4278190335;b=(b|b<<8)&251719695;b=(b|b<<4)&3272356035;b=(b|b<<2)&1227133513;a|=b<<1;c&=1023;c=(c|c<<16)&4278190335;c=(c|c<<8)&251719695;c=(c|c<<4)&3272356035;c=(c|c<<2)&1227133513;return a|c<<2};g.deinterleave3=function(a,b){a=a>>>b&1227133513;a=(a|a>>>2)&3272356035;a=(a|a>>>4)&251719695;a=(a|a>>>8)&4278190335;a=(a|a>>>16)&1023;return a<<22>>22};g.nextCombination=function(a){var c=a|a-1;return c+1|(~c&-~c)-1>>>b(a)+1}}var j=!1,k=function(){j||(j=!0,i());return h.exports};a=function(a){switch(a){case void 0:return k()}};e.exports=a}),null); /** * License: https://www.facebook.com/legal/license/MDzNl_j9yvg/ */ __d("eventemitter3-2.0.3",[],(function(a,b,c,d,e,f){"use strict";__p&&__p();a={};var g={exports:a};function h(){__p&&__p();var a=Object.prototype.hasOwnProperty,b="~";function c(){}Object.create&&(c.prototype=Object.create(null),new c().__proto__||(b=!1));function d(a,b,c){this.fn=a,this.context=b,this.once=c||!1}function e(){this._events=new c(),this._eventsCount=0}e.prototype.eventNames=function(){var c=[],d,e;if(this._eventsCount===0)return c;for(e in d=this._events)a.call(d,e)&&c.push(b?e.slice(1):e);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(d)):c};e.prototype.listeners=function(a,c){__p&&__p();a=b?b+a:a;a=this._events[a];if(c)return!!a;if(!a)return[];if(a.fn)return[a.fn];for(var c=0,d=a.length,e=new Array(d);c=a.byteLength?c.bufferSubData(this.type,b,a):c.bufferData(this.type,a,this.drawType);this.data=a};b.prototype.bind=function(){var a=this.gl;a.bindBuffer(this.type,this.buffer)};b.createVertexBuffer=function(a,c,d){return new b(a,a.ARRAY_BUFFER,c,d)};b.createIndexBuffer=function(a,c,d){return new b(a,a.ELEMENT_ARRAY_BUFFER,c,d)};b.create=function(a,c,d,e){return new b(a,c,d,e)};b.prototype.destroy=function(){this.gl.deleteBuffer(this.buffer)};o.exports=b}var p=!1,ba=function(){p||(p=!0,aa());return o.exports};d={};var q={exports:d};function ca(){__p&&__p();var a=function(a,b,c,d,e){this.gl=a,this.texture=a.createTexture(),this.mipmap=!1,this.premultiplyAlpha=!1,this.width=b||-1,this.height=c||-1,this.format=d||a.RGBA,this.type=e||a.UNSIGNED_BYTE};a.prototype.upload=function(a){this.bind();var b=this.gl;b.pixelStorei(b.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.premultiplyAlpha);var c=a.videoWidth||a.width,d=a.videoHeight||a.height;d!==this.height||c!==this.width?b.texImage2D(b.TEXTURE_2D,0,this.format,this.format,this.type,a):b.texSubImage2D(b.TEXTURE_2D,0,0,0,this.format,this.type,a);this.width=c;this.height=d};var b=!1;a.prototype.uploadData=function(a,c,d){__p&&__p();this.bind();var e=this.gl;if(a instanceof Float32Array){if(!b){var f=e.getExtension("OES_texture_float");if(f)b=!0;else throw new Error("floating point textures not available")}this.type=e.FLOAT}else this.type=this.type||e.UNSIGNED_BYTE;e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.premultiplyAlpha);c!==this.width||d!==this.height?e.texImage2D(e.TEXTURE_2D,0,this.format,c,d,0,this.format,this.type,a||null):e.texSubImage2D(e.TEXTURE_2D,0,0,0,c,d,this.format,this.type,a||null);this.width=c;this.height=d};a.prototype.bind=function(a){var b=this.gl;a!==void 0&&b.activeTexture(b.TEXTURE0+a);b.bindTexture(b.TEXTURE_2D,this.texture)};a.prototype.unbind=function(){var a=this.gl;a.bindTexture(a.TEXTURE_2D,null)};a.prototype.minFilter=function(a){var b=this.gl;this.bind();this.mipmap?b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MIN_FILTER,a?b.LINEAR_MIPMAP_LINEAR:b.NEAREST_MIPMAP_NEAREST):b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MIN_FILTER,a?b.LINEAR:b.NEAREST)};a.prototype.magFilter=function(a){var b=this.gl;this.bind();b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MAG_FILTER,a?b.LINEAR:b.NEAREST)};a.prototype.enableMipmap=function(){var a=this.gl;this.bind();this.mipmap=!0;a.generateMipmap(a.TEXTURE_2D)};a.prototype.enableLinearScaling=function(){this.minFilter(!0),this.magFilter(!0)};a.prototype.enableNearestScaling=function(){this.minFilter(!1),this.magFilter(!1)};a.prototype.enableWrapClamp=function(){var a=this.gl;this.bind();a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE)};a.prototype.enableWrapRepeat=function(){var a=this.gl;this.bind();a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.REPEAT);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.REPEAT)};a.prototype.enableWrapMirrorRepeat=function(){var a=this.gl;this.bind();a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.MIRRORED_REPEAT);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.MIRRORED_REPEAT)};a.prototype.destroy=function(){var a=this.gl;a.deleteTexture(this.texture)};a.fromSource=function(b,c,d){b=new a(b);b.premultiplyAlpha=d||!1;b.upload(c);return b};a.fromData=function(b,c,d,e){b=new a(b);b.uploadData(c,d,e);return b};q.exports=a}var r=!1,s=function(){r||(r=!0,ca());return q.exports};f={};var t={exports:f};function da(){__p&&__p();var a=s(),b=function(a,b,c){this.gl=a,this.framebuffer=a.createFramebuffer(),this.stencil=null,this.texture=null,this.width=b||100,this.height=c||100};b.prototype.enableTexture=function(b){var c=this.gl;this.texture=b||new a(c);this.texture.bind();this.bind();c.framebufferTexture2D(c.FRAMEBUFFER,c.COLOR_ATTACHMENT0,c.TEXTURE_2D,this.texture.texture,0)};b.prototype.enableStencil=function(){if(this.stencil)return;var a=this.gl;this.stencil=a.createRenderbuffer();a.bindRenderbuffer(a.RENDERBUFFER,this.stencil);a.framebufferRenderbuffer(a.FRAMEBUFFER,a.DEPTH_STENCIL_ATTACHMENT,a.RENDERBUFFER,this.stencil);a.renderbufferStorage(a.RENDERBUFFER,a.DEPTH_STENCIL,this.width,this.height)};b.prototype.clear=function(a,b,c,d){this.bind();var e=this.gl;e.clearColor(a,b,c,d);e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT)};b.prototype.bind=function(){var a=this.gl;a.bindFramebuffer(a.FRAMEBUFFER,this.framebuffer)};b.prototype.unbind=function(){var a=this.gl;a.bindFramebuffer(a.FRAMEBUFFER,null)};b.prototype.resize=function(a,b){var c=this.gl;this.width=a;this.height=b;this.texture&&this.texture.uploadData(null,a,b);this.stencil&&(c.bindRenderbuffer(c.RENDERBUFFER,this.stencil),c.renderbufferStorage(c.RENDERBUFFER,c.DEPTH_STENCIL,a,b))};b.prototype.destroy=function(){var a=this.gl;this.texture&&this.texture.destroy();a.deleteFramebuffer(this.framebuffer);this.gl=null;this.stencil=null;this.texture=null};b.createRGBA=function(c,d,e,f){f=a.fromData(c,null,d,e);f.enableNearestScaling();f.enableWrapClamp();c=new b(c,d,e);c.enableTexture(f);c.unbind();return c};b.createFloat32=function(c,d,e,f){f=new a.fromData(c,f,d,e);f.enableNearestScaling();f.enableWrapClamp();c=new b(c,d,e);c.enableTexture(f);c.unbind();return c};t.exports=b}var u=!1,ea=function(){u||(u=!0,da());return t.exports};a={};var v={exports:a};function fa(){__p&&__p();var a=function(a,c,d,e){__p&&__p();c=b(a,a.VERTEX_SHADER,c);d=b(a,a.FRAGMENT_SHADER,d);var f=a.createProgram();a.attachShader(f,c);a.attachShader(f,d);if(e)for(var g in e)a.bindAttribLocation(f,e[g],g);a.linkProgram(f);a.getProgramParameter(f,a.LINK_STATUS)||(a.getProgramInfoLog(f)!=="",a.deleteProgram(f),f=null);a.deleteShader(c);a.deleteShader(d);return f},b=function(a,b,c){b=a.createShader(b);a.shaderSource(b,c);a.compileShader(b);return!a.getShaderParameter(b,a.COMPILE_STATUS)?null:b};v.exports=a}var w=!1,x=function(){w||(w=!0,fa());return v.exports};b={};var y={exports:b};function ga(){__p&&__p();var a=function(a,d){if(!b){var e=Object.keys(c);b={};for(var f=0;f=d||c===0)return;c=b+c>d?d-b:c;d=d-c;for(b=b;b0||a.responseType===b.XHR_RESPONSE_TYPE.BUFFER)?d=l:d===o&&(d=m);d=d/100|0;if(d===p)if(this.xhrType===b.XHR_RESPONSE_TYPE.TEXT)this.data=c,this.type=b.TYPE.TEXT;else if(this.xhrType===b.XHR_RESPONSE_TYPE.JSON)try{this.data=JSON.parse(c),this.type=b.TYPE.JSON}catch(a){this.abort("Error trying to parse loaded json: "+a);return}else if(this.xhrType===b.XHR_RESPONSE_TYPE.DOCUMENT)try{if(window.DOMParser){d=new DOMParser();this.data=d.parseFromString(c,"text/xml")}else{d=document.createElement("div");d.innerHTML=c;this.data=d}this.type=b.TYPE.XML}catch(a){this.abort("Error trying to parse loaded xml: "+a);return}else this.data=a.response||c;else{this.abort("["+a.status+"] "+a.statusText+": "+a.responseURL);return}this.complete()};b.prototype._determineCrossOrigin=function(a,b){if(a.indexOf("data:")===0)return"";b=b||window.location;j||(j=document.createElement("a"));j.href=a;a=c["default"](j.href,{strictMode:!0});var d=!a.port&&b.port===""||a.port===b.port,e=a.protocol?a.protocol+":":"";return a.host!==b.hostname||!d||e!==b.protocol?"anonymous":""};b.prototype._determineXhrType=function(){return b._xhrTypeMap[this.extension]||b.XHR_RESPONSE_TYPE.TEXT};b.prototype._determineLoadType=function(){return b._loadTypeMap[this.extension]||b.LOAD_TYPE.XHR};b.prototype._getExtension=function(){__p&&__p();var a=this.url;if(this.isDataUrl){var b=a.indexOf("/");b=a.substring(b+1,a.indexOf(";",b))}else{var c=a.indexOf("?"),d=a.indexOf("#");c=Math.min(c>-1?c:a.length,d>-1?d:a.length);a=a.substring(0,c);b=a.substring(a.lastIndexOf(".")+1)}return b.toLowerCase()};b.prototype._getMimeFromXhrType=function(a){switch(a){case b.XHR_RESPONSE_TYPE.BUFFER:return"application/octet-binary";case b.XHR_RESPONSE_TYPE.BLOB:return"application/blob";case b.XHR_RESPONSE_TYPE.DOCUMENT:return"application/xml";case b.XHR_RESPONSE_TYPE.JSON:return"application/json";case b.XHR_RESPONSE_TYPE.DEFAULT:case b.XHR_RESPONSE_TYPE.TEXT:default:return"text/plain"}};a(b,[{key:"isDataUrl",get:function(){return this._hasFlag(b.STATUS_FLAGS.DATA_URL)}},{key:"isComplete",get:function(){return this._hasFlag(b.STATUS_FLAGS.COMPLETE)}},{key:"isLoading",get:function(){return this._hasFlag(b.STATUS_FLAGS.LOADING)}}]);return b}();n["default"]=e;e.STATUS_FLAGS={NONE:0,DATA_URL:1<<0,COMPLETE:1<<1,LOADING:1<<2};e.TYPE={UNKNOWN:0,JSON:1,XML:2,IMAGE:3,AUDIO:4,VIDEO:5,TEXT:6};e.LOAD_TYPE={XHR:1,IMAGE:2,AUDIO:3,VIDEO:4};e.XHR_RESPONSE_TYPE={DEFAULT:"text",BUFFER:"arraybuffer",BLOB:"blob",DOCUMENT:"document",JSON:"json",TEXT:"text"};e._loadTypeMap={gif:e.LOAD_TYPE.IMAGE,png:e.LOAD_TYPE.IMAGE,bmp:e.LOAD_TYPE.IMAGE,jpg:e.LOAD_TYPE.IMAGE,jpeg:e.LOAD_TYPE.IMAGE,tif:e.LOAD_TYPE.IMAGE,tiff:e.LOAD_TYPE.IMAGE,webp:e.LOAD_TYPE.IMAGE,tga:e.LOAD_TYPE.IMAGE,svg:e.LOAD_TYPE.IMAGE,"svg+xml":e.LOAD_TYPE.IMAGE,mp3:e.LOAD_TYPE.AUDIO,ogg:e.LOAD_TYPE.AUDIO,wav:e.LOAD_TYPE.AUDIO,mp4:e.LOAD_TYPE.VIDEO,webm:e.LOAD_TYPE.VIDEO};e._xhrTypeMap={xhtml:e.XHR_RESPONSE_TYPE.DOCUMENT,html:e.XHR_RESPONSE_TYPE.DOCUMENT,htm:e.XHR_RESPONSE_TYPE.DOCUMENT,xml:e.XHR_RESPONSE_TYPE.DOCUMENT,tmx:e.XHR_RESPONSE_TYPE.DOCUMENT,svg:e.XHR_RESPONSE_TYPE.DOCUMENT,tsx:e.XHR_RESPONSE_TYPE.DOCUMENT,gif:e.XHR_RESPONSE_TYPE.BLOB,png:e.XHR_RESPONSE_TYPE.BLOB,bmp:e.XHR_RESPONSE_TYPE.BLOB,jpg:e.XHR_RESPONSE_TYPE.BLOB,jpeg:e.XHR_RESPONSE_TYPE.BLOB,tif:e.XHR_RESPONSE_TYPE.BLOB,tiff:e.XHR_RESPONSE_TYPE.BLOB,webp:e.XHR_RESPONSE_TYPE.BLOB,tga:e.XHR_RESPONSE_TYPE.BLOB,json:e.XHR_RESPONSE_TYPE.JSON,text:e.XHR_RESPONSE_TYPE.TEXT,txt:e.XHR_RESPONSE_TYPE.TEXT,ttf:e.XHR_RESPONSE_TYPE.BUFFER,otf:e.XHR_RESPONSE_TYPE.BUFFER};e.EMPTY_GIF="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==";function r(a,b,c){b&&b.indexOf(".")===0&&(b=b.substring(1));if(!b)return;a[b]=c}function s(a){return a.toString().replace("object ","")}}var q=!1,r=function(){q||(q=!0,p());return o.exports},s={},t={exports:s};function u(){__p&&__p();s.__esModule=!0;var a=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol==="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},b=function(){__p&&__p();function a(a,b){for(var c=0;c0&&arguments[0]!==void 0?arguments[0]:"",e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:10;l(this,c);this.baseUrl=b;this.progress=0;this.loading=!1;this.defaultQueryString="";this._beforeMiddleware=[];this._afterMiddleware=[];this._resourcesParsing=[];this._boundLoadResource=function(b,c){return a._loadResource(b,c)};this._queue=f.queue(this._boundLoadResource,e);this._queue.pause();this.resources={};this.onProgress=new d["default"]();this.onError=new d["default"]();this.onLoad=new d["default"]();this.onStart=new d["default"]();this.onComplete=new d["default"]()}c.prototype.add=function(b,c,d,e){__p&&__p();if(Array.isArray(b)){for(var f=0;f>2;f[1]=(e[0]&3)<<4|e[1]>>4;f[2]=(e[1]&15)<<2|e[2]>>6;f[3]=e[2]&63;g=d-(b.length-1);switch(g){case 2:f[3]=64;f[2]=64;break;case 1:f[3]=64;break;default:break}for(var e=0;e0?1:-1})}var y=!1,z=function(){y||(y=!0,x());return w.exports};b={};var A={exports:b};function B(){Number.isInteger||(Number.isInteger=function(a){return typeof a==="number"&&isFinite(a)&&Math.floor(a)===a})}var C=!1,D=function(){C||(C=!0,B());return A.exports};d={};var E={exports:d};function F(){r(),v(),z(),D(),window.ArrayBuffer||(window.ArrayBuffer=Array),window.Float32Array||(window.Float32Array=Array),window.Uint32Array||(window.Uint32Array=Array),window.Uint16Array||(window.Uint16Array=Array)}var G=!1,H=function(){G||(G=!0,F());return E.exports},I={},J={exports:I};function aa(){I.__esModule=!0,I.VERSION="4.8.1",I.PI_2=Math.PI*2,I.RAD_TO_DEG=180/Math.PI,I.DEG_TO_RAD=Math.PI/180,I.RENDERER_TYPE={UNKNOWN:0,WEBGL:1,CANVAS:2},I.BLEND_MODES={NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16,NORMAL_NPM:17,ADD_NPM:18,SCREEN_NPM:19},I.DRAW_MODES={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},I.SCALE_MODES={LINEAR:0,NEAREST:1},I.WRAP_MODES={CLAMP:0,REPEAT:1,MIRRORED_REPEAT:2},I.GC_MODES={AUTO:0,MANUAL:1},I.URL_FILE_EXTENSION=/\.(\w{3,4})(?:$|\?|#)/i,I.DATA_URI=/^\s*data:(?:([\w-]+)\/([\w+.-]+))?(?:;charset=([\w-]+))?(?:;(base64))?,(.*)/i,I.SVG_SIZE=/]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i,I.SHAPES={POLY:0,RECT:1,CIRC:2,ELIP:3,RREC:4},I.PRECISION={LOW:"lowp",MEDIUM:"mediump",HIGH:"highp"},I.TRANSFORM_MODE={STATIC:0,DYNAMIC:1},I.TEXT_GRADIENT={LINEAR_VERTICAL:0,LINEAR_HORIZONTAL:1},I.UPDATE_PRIORITY={INTERACTION:50,HIGH:25,NORMAL:0,LOW:-25,UTILITY:-50}}var ba=!1,K=function(){ba||(ba=!0,aa());return J.exports},ca={},da={exports:ca};function L(){__p&&__p();ca.__esModule=!0;function a(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var b=function(){__p&&__p();function b(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;a(this,b);this.x=c;this.y=d}b.prototype.clone=function(){return new b(this.x,this.y)};b.prototype.copy=function(a){this.set(a.x,a.y)};b.prototype.equals=function(a){return a.x===this.x&&a.y===this.y};b.prototype.set=function(a,b){this.x=a||0,this.y=b||(b!==0?this.x:0)};return b}();ca["default"]=b}var ea=!1,fa=function(){ea||(ea=!0,L());return da.exports},M={},N={exports:M};function ga(){__p&&__p();M.__esModule=!0;var a=function(){__p&&__p();function a(a,b){for(var c=0;c2&&arguments[2]!==void 0?arguments[2]:0,f=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;b(this,c);this._x=e;this._y=f;this.cb=a;this.scope=d}c.prototype.set=function(a,b){a=a||0;b=b||(b!==0?a:0);(this._x!==a||this._y!==b)&&(this._x=a,this._y=b,this.cb.call(this.scope))};c.prototype.copy=function(a){(this._x!==a.x||this._y!==a.y)&&(this._x=a.x,this._y=a.y,this.cb.call(this.scope))};a(c,[{key:"x",get:function(){return this._x},set:function(a){this._x!==a&&(this._x=a,this.cb.call(this.scope))}},{key:"y",get:function(){return this._y},set:function(a){this._y!==a&&(this._y=a,this.cb.call(this.scope))}}]);return c}();M["default"]=c}var ha=!1,ia=function(){ha||(ha=!0,ga());return N.exports},ja={},ka={exports:ja};function la(){__p&&__p();ja.__esModule=!0;var a=function(){__p&&__p();function a(a,b){for(var c=0;c0&&arguments[0]!==void 0?arguments[0]:1,c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,e=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1,g=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,h=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0;f(this,b);this.a=a;this.b=c;this.c=d;this.d=e;this.tx=g;this.ty=h;this.array=null}b.prototype.fromArray=function(a){this.a=a[0],this.b=a[1],this.c=a[3],this.d=a[4],this.tx=a[2],this.ty=a[5]};b.prototype.set=function(a,b,c,d,e,f){this.a=a;this.b=b;this.c=c;this.d=d;this.tx=e;this.ty=f;return this};b.prototype.toArray=function(a,b){this.array||(this.array=new Float32Array(9));b=b||this.array;a?(b[0]=this.a,b[1]=this.b,b[2]=0,b[3]=this.c,b[4]=this.d,b[5]=0,b[6]=this.tx,b[7]=this.ty,b[8]=1):(b[0]=this.a,b[1]=this.c,b[2]=this.tx,b[3]=this.b,b[4]=this.d,b[5]=this.ty,b[6]=0,b[7]=0,b[8]=1);return b};b.prototype.apply=function(a,b){b=b||new c["default"]();var d=a.x;a=a.y;b.x=this.a*d+this.c*a+this.tx;b.y=this.b*d+this.d*a+this.ty;return b};b.prototype.applyInverse=function(a,b){b=b||new c["default"]();var d=1/(this.a*this.d+this.c*-this.b),e=a.x;a=a.y;b.x=this.d*d*e+-this.c*d*a+(this.ty*this.c-this.tx*this.d)*d;b.y=this.a*d*a+-this.b*d*e+(-this.ty*this.a+this.tx*this.b)*d;return b};b.prototype.translate=function(a,b){this.tx+=a;this.ty+=b;return this};b.prototype.scale=function(a,b){this.a*=a;this.d*=b;this.c*=a;this.b*=b;this.tx*=a;this.ty*=b;return this};b.prototype.rotate=function(a){__p&&__p();var b=Math.cos(a);a=Math.sin(a);var c=this.a,d=this.c,e=this.tx;this.a=c*b-this.b*a;this.b=c*a+this.b*b;this.c=d*b-this.d*a;this.d=d*a+this.d*b;this.tx=e*b-this.ty*a;this.ty=e*a+this.ty*b;return this};b.prototype.append=function(a){var b=this.a,c=this.b,d=this.c,e=this.d;this.a=a.a*b+a.b*d;this.b=a.a*c+a.b*e;this.c=a.c*b+a.d*d;this.d=a.c*c+a.d*e;this.tx=a.tx*b+a.ty*d+this.tx;this.ty=a.tx*c+a.ty*e+this.ty;return this};b.prototype.setTransform=function(a,b,c,d,e,f,g,h,i){this.a=Math.cos(g+i)*e;this.b=Math.sin(g+i)*e;this.c=-Math.sin(g-h)*f;this.d=Math.cos(g-h)*f;this.tx=a-(c*this.a+d*this.c);this.ty=b-(c*this.b+d*this.d);return this};b.prototype.prepend=function(a){__p&&__p();var b=this.tx;if(a.a!==1||a.b!==0||a.c!==0||a.d!==1){var c=this.a,d=this.c;this.a=c*a.a+this.b*a.c;this.b=c*a.b+this.b*a.d;this.c=d*a.a+this.d*a.c;this.d=d*a.b+this.d*a.d}this.tx=b*a.a+this.ty*a.c+a.tx;this.ty=b*a.b+this.ty*a.d+a.ty;return this};b.prototype.decompose=function(a){var b=this.a,c=this.b,e=this.c,f=this.d,g=-Math.atan2(-e,f),h=Math.atan2(c,b),i=Math.abs(g+h);i<1e-5||Math.abs(d.PI_2-i)<1e-5?(a.rotation=h,b<0&&f>=0&&(a.rotation+=a.rotation<=0?Math.PI:-Math.PI),a.skew.x=a.skew.y=0):(a.rotation=0,a.skew.x=g,a.skew.y=h);a.scale.x=Math.sqrt(b*b+c*c);a.scale.y=Math.sqrt(e*e+f*f);a.position.x=this.tx;a.position.y=this.ty;return a};b.prototype.invert=function(){var a=this.a,b=this.b,c=this.c,d=this.d,e=this.tx,f=a*d-b*c;this.a=d/f;this.b=-b/f;this.c=-c/f;this.d=a/f;this.tx=(c*this.ty-d*e)/f;this.ty=-(a*this.ty-b*e)/f;return this};b.prototype.identity=function(){this.a=1;this.b=0;this.c=0;this.d=1;this.tx=0;this.ty=0;return this};b.prototype.clone=function(){var a=new b();a.a=this.a;a.b=this.b;a.c=this.c;a.d=this.d;a.tx=this.tx;a.ty=this.ty;return a};b.prototype.copy=function(a){a.a=this.a;a.b=this.b;a.c=this.c;a.d=this.d;a.tx=this.tx;a.ty=this.ty;return a};a(b,null,[{key:"IDENTITY",get:function(){return new b()}},{key:"TEMP_MATRIX",get:function(){return new b()}}]);return b}();ja["default"]=e}var ma=!1,na=function(){ma||(ma=!0,la());return ka.exports},oa={},pa={exports:oa};function qa(){__p&&__p();oa.__esModule=!0;var a=na(),b=c(a);function c(a){return a&&a.__esModule?a:{"default":a}}var d=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],e=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],f=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],g=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],h=[],i=[];function j(a){if(a<0)return-1;return a>0?1:0}function k(){__p&&__p();for(var a=0;a<16;a++){var c=[];i.push(c);for(var k=0;k<16;k++){var l=j(d[a]*d[k]+f[a]*e[k]),m=j(e[a]*d[k]+g[a]*e[k]),n=j(d[a]*f[k]+f[a]*g[k]),o=j(e[a]*f[k]+g[a]*g[k]);for(var p=0;p<16;p++)if(d[p]===l&&e[p]===m&&f[p]===n&&g[p]===o){c.push(p);break}}}for(var l=0;l<16;l++){m=new b["default"]();m.set(d[l],e[l],f[l],g[l],0,0);h.push(m)}}k();var l={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MIRROR_HORIZONTAL:12,uX:function(a){return d[a]},uY:function(a){return e[a]},vX:function(a){return f[a]},vY:function(a){return g[a]},inv:function(a){return a&8?a&15:-a&7},add:function(a,b){return i[a][b]},sub:function(a,b){return i[a][l.inv(b)]},rotate180:function(a){return a^4},isVertical:function(a){return(a&3)===2},byDirection:function(a,b){if(Math.abs(a)*2<=Math.abs(b))return b>=0?l.S:l.N;else if(Math.abs(b)*2<=Math.abs(a))return a>0?l.E:l.W;else if(b>0)return a>0?l.SE:l.SW;else if(a>0)return l.NE;return l.NW},matrixAppendRotationInv:function(a,b){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,e=h[l.inv(b)];e.tx=c;e.ty=d;a.append(e)}};oa["default"]=l}var ra=!1,sa=function(){ra||(ra=!0,qa());return pa.exports},ta={},ua={exports:ta};function va(){__p&&__p();ta.__esModule=!0;var a=function(){__p&&__p();function a(a,b){for(var c=0;c0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,g=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;c(this,d);this.x=Number(a);this.y=Number(e);this.width=Number(f);this.height=Number(g);this.type=b.SHAPES.RECT}d.prototype.clone=function(){return new d(this.x,this.y,this.width,this.height)};d.prototype.copy=function(a){this.x=a.x;this.y=a.y;this.width=a.width;this.height=a.height;return this};d.prototype.contains=function(a,b){if(this.width<=0||this.height<=0)return!1;return a>=this.x&&a=this.y&&ba.x+a.width&&(this.width=a.width-this.x,this.width<0&&(this.width=0)),this.y+this.height>a.y+a.height&&(this.height=a.height-this.y,this.height<0&&(this.height=0))};d.prototype.enlarge=function(a){var b=Math.min(this.x,a.x),c=Math.max(this.x+this.width,a.x+a.width),d=Math.min(this.y,a.y);a=Math.max(this.y+this.height,a.y+a.height);this.x=b;this.width=c-b;this.y=d;this.height=a-d};a(d,[{key:"left",get:function(){return this.x}},{key:"right",get:function(){return this.x+this.width}},{key:"top",get:function(){return this.y}},{key:"bottom",get:function(){return this.y+this.height}}],[{key:"EMPTY",get:function(){return new d(0,0,0,0)}}]);return d}();ta["default"]=d}var wa=!1,xa=function(){wa||(wa=!0,va());return ua.exports},ya={},za={exports:ya};function Aa(){__p&&__p();ya.__esModule=!0;var a=xa(),b=d(a),c=K();function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}d=function(){__p&&__p();function a(){var b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;e(this,a);this.x=b;this.y=d;this.radius=f;this.type=c.SHAPES.CIRC}a.prototype.clone=function(){return new a(this.x,this.y,this.radius)};a.prototype.contains=function(a,b){if(this.radius<=0)return!1;var c=this.radius*this.radius;a=this.x-a;b=this.y-b;a*=a;b*=b;return a+b<=c};a.prototype.getBounds=function(){return new b["default"](this.x-this.radius,this.y-this.radius,this.radius*2,this.radius*2)};return a}();ya["default"]=d}var Ba=!1,Ca=function(){Ba||(Ba=!0,Aa());return za.exports},Da={},Ea={exports:Da};function Fa(){__p&&__p();Da.__esModule=!0;var a=xa(),b=d(a),c=K();function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}d=function(){__p&&__p();function a(){var b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,g=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;e(this,a);this.x=b;this.y=d;this.width=f;this.height=g;this.type=c.SHAPES.ELIP}a.prototype.clone=function(){return new a(this.x,this.y,this.width,this.height)};a.prototype.contains=function(a,b){if(this.width<=0||this.height<=0)return!1;a=(a-this.x)/this.width;b=(b-this.y)/this.height;a*=a;b*=b;return a+b<=1};a.prototype.getBounds=function(){return new b["default"](this.x-this.width,this.y-this.height,this.width,this.height)};return a}();Da["default"]=d}var Ga=!1,Ha=function(){Ga||(Ga=!0,Fa());return Ea.exports},Ia={},Ja={exports:Ia};function Ka(){__p&&__p();Ia.__esModule=!0;var a=fa(),b=d(a),c=K();function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}d=function(){__p&&__p();function a(){__p&&__p();for(var d=arguments.length,f=Array(d),g=0;gb!==j>b&&a<(i-g)*((b-h)/(j-h))+g;i&&(c=!c)}return c};return a}();Ia["default"]=d}var La=!1,Ma=function(){La||(La=!0,Ka());return Ja.exports},Na={},Oa={exports:Na};function Pa(){__p&&__p();Na.__esModule=!0;var a=K();function b(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var c=function(){__p&&__p();function c(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,g=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,h=arguments.length>4&&arguments[4]!==void 0?arguments[4]:20;b(this,c);this.x=d;this.y=e;this.width=f;this.height=g;this.radius=h;this.type=a.SHAPES.RREC}c.prototype.clone=function(){return new c(this.x,this.y,this.width,this.height,this.radius)};c.prototype.contains=function(a,b){__p&&__p();if(this.width<=0||this.height<=0)return!1;if(a>=this.x&&a<=this.x+this.width&&(b>=this.y&&b<=this.y+this.height)){if(b>=this.y+this.radius&&b<=this.y+this.height-this.radius||a>=this.x+this.radius&&a<=this.x+this.width-this.radius)return!0;var c=a-(this.x+this.radius),d=b-(this.y+this.radius),e=this.radius*this.radius;if(c*c+d*d<=e)return!0;c=a-(this.x+this.width-this.radius);if(c*c+d*d<=e)return!0;d=b-(this.y+this.height-this.radius);if(c*c+d*d<=e)return!0;c=a-(this.x+this.radius);if(c*c+d*d<=e)return!0}return!1};return c}();Na["default"]=c}var Qa=!1,Ra=function(){Qa||(Qa=!0,Pa());return Oa.exports},O={},Sa={exports:O};function Ta(){__p&&__p();O.__esModule=!0;var a=fa();Object.defineProperty(O,"Point",{enumerable:!0,get:function(){return j(a)["default"]}});var b=ia();Object.defineProperty(O,"ObservablePoint",{enumerable:!0,get:function(){return j(b)["default"]}});var c=na();Object.defineProperty(O,"Matrix",{enumerable:!0,get:function(){return j(c)["default"]}});var d=sa();Object.defineProperty(O,"GroupD8",{enumerable:!0,get:function(){return j(d)["default"]}});var e=Ca();Object.defineProperty(O,"Circle",{enumerable:!0,get:function(){return j(e)["default"]}});var f=Ha();Object.defineProperty(O,"Ellipse",{enumerable:!0,get:function(){return j(f)["default"]}});var g=Ma();Object.defineProperty(O,"Polygon",{enumerable:!0,get:function(){return j(g)["default"]}});var h=xa();Object.defineProperty(O,"Rectangle",{enumerable:!0,get:function(){return j(h)["default"]}});var i=Ra();Object.defineProperty(O,"RoundedRectangle",{enumerable:!0,get:function(){return j(i)["default"]}});function j(a){return a&&a.__esModule?a:{"default":a}}}var Ua=!1,P=function(){Ua||(Ua=!0,Ta());return Sa.exports},Va={},Wa={exports:Va};function Xa(){__p&&__p();Va.__esModule=!0;var a=P();function b(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var c=function(){__p&&__p();function c(){b(this,c),this.minX=Infinity,this.minY=Infinity,this.maxX=-Infinity,this.maxY=-Infinity,this.rect=null}c.prototype.isEmpty=function(){return this.minX>this.maxX||this.minY>this.maxY};c.prototype.clear=function(){this.updateID++,this.minX=Infinity,this.minY=Infinity,this.maxX=-Infinity,this.maxY=-Infinity};c.prototype.getRectangle=function(b){if(this.minX>this.maxX||this.minY>this.maxY)return a.Rectangle.EMPTY;b=b||new a.Rectangle(0,0,1,1);b.x=this.minX;b.y=this.minY;b.width=this.maxX-this.minX;b.height=this.maxY-this.minY;return b};c.prototype.addPoint=function(a){this.minX=Math.min(this.minX,a.x),this.maxX=Math.max(this.maxX,a.x),this.minY=Math.min(this.minY,a.y),this.maxY=Math.max(this.maxY,a.y)};c.prototype.addQuad=function(a){__p&&__p();var b=this.minX,c=this.minY,d=this.maxX,e=this.maxY,f=a[0],g=a[1];b=fd?f:d;e=g>e?g:e;f=a[2];g=a[3];b=fd?f:d;e=g>e?g:e;f=a[4];g=a[5];b=fd?f:d;e=g>e?g:e;f=a[6];g=a[7];b=fd?f:d;e=g>e?g:e;this.minX=b;this.minY=c;this.maxX=d;this.maxY=e};c.prototype.addFrame=function(a,b,c,d,e){__p&&__p();a=a.worldTransform;var f=a.a,g=a.b,h=a.c,i=a.d,j=a.tx;a=a.ty;var k=this.minX,l=this.minY,m=this.maxX,n=this.maxY,o=f*b+h*c+j,p=g*b+i*c+a;k=om?o:m;n=p>n?p:n;o=f*d+h*c+j;p=g*d+i*c+a;k=om?o:m;n=p>n?p:n;o=f*b+h*e+j;p=g*b+i*e+a;k=om?o:m;n=p>n?p:n;o=f*d+h*e+j;p=g*d+i*e+a;k=om?o:m;n=p>n?p:n;this.minX=k;this.minY=l;this.maxX=m;this.maxY=n};c.prototype.addVertices=function(a,b,c,d){__p&&__p();a=a.worldTransform;var e=a.a,f=a.b,g=a.c,h=a.d,i=a.tx;a=a.ty;var j=this.minX,k=this.minY,l=this.maxX,m=this.maxY;for(var c=c;cl?p:l;m=o>m?o:m}this.minX=j;this.minY=k;this.maxX=l;this.maxY=m};c.prototype.addBounds=function(a){var b=this.minX,c=this.minY,d=this.maxX,e=this.maxY;this.minX=a.minXd?a.maxX:d;this.maxY=a.maxY>e?a.maxY:e};c.prototype.addBoundsMask=function(a,b){__p&&__p();var c=a.minX>b.minX?a.minX:b.minX,d=a.minY>b.minY?a.minY:b.minY,e=a.maxXg?e:g;this.maxY=a>h?a:h}};c.prototype.addBoundsArea=function(a,b){__p&&__p();var c=a.minX>b.x?a.minX:b.x,d=a.minY>b.y?a.minY:b.y,e=a.maxXg?e:g;this.maxY=a>h?a:h}};return c}();Va["default"]=c}var Ya=!1,Za=function(){Ya||(Ya=!0,Xa());return Wa.exports},$a={},ab={exports:$a};function bb(){$a.__esModule=!0;$a["default"]=c;c=j();var a=b(c);function b(a){return a&&a.__esModule?a:{"default":a}}function c(b){return a["default"].tablet||a["default"].phone?4:b}}var cb=!1,db=function(){cb||(cb=!0,bb());return ab.exports},eb={},fb={exports:eb};function gb(){eb.__esModule=!0;eb["default"]=a;function a(){var a=!!navigator.platform&&/iPad|iPhone|iPod/.test(navigator.platform);return!a}}var hb=!1,ib=function(){hb||(hb=!0,gb());return fb.exports},jb={},kb={exports:jb};function lb(){jb.__esModule=!0;var a=db();a=c(a);var b=ib();c=c(b);function c(a){return a&&a.__esModule?a:{"default":a}}jb["default"]={TARGET_FPMS:.06,MIPMAP_TEXTURES:!0,RESOLUTION:1,FILTER_RESOLUTION:1,SPRITE_MAX_TEXTURES:a["default"](32),SPRITE_BATCH_SIZE:4096,RETINA_PREFIX:/@([0-9\.]+)x/,RENDER_OPTIONS:{view:null,antialias:!1,forceFXAA:!1,autoResize:!1,transparent:!1,backgroundColor:0,clearBeforeRender:!0,preserveDrawingBuffer:!1,roundPixels:!1,width:800,height:600,legacy:!1},TRANSFORM_MODE:0,GC_MODE:0,GC_MAX_IDLE:60*60,GC_MAX_CHECK_COUNT:60*10,WRAP_MODE:0,SCALE_MODE:0,PRECISION_VERTEX:"highp",PRECISION_FRAGMENT:"mediump",CAN_UPLOAD_SAME_BUFFER:c["default"](),MESH_CANVAS_PADDING:0}}var mb=!1,Q=function(){mb||(mb=!0,lb());return kb.exports},nb={},ob={exports:nb};function pb(){__p&&__p();nb.__esModule=!0;var a=P();function b(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var c=function(){__p&&__p();function c(){b(this,c),this.worldTransform=new a.Matrix(),this.localTransform=new a.Matrix(),this._worldID=0,this._parentID=0}c.prototype.updateLocalTransform=function(){};c.prototype.updateTransform=function(a){a=a.worldTransform;var b=this.worldTransform,c=this.localTransform;b.a=c.a*a.a+c.b*a.c;b.b=c.a*a.b+c.b*a.d;b.c=c.c*a.a+c.d*a.c;b.d=c.c*a.b+c.d*a.d;b.tx=c.tx*a.a+c.ty*a.c+a.tx;b.ty=c.tx*a.b+c.ty*a.d+a.ty;this._worldID++};return c}();nb["default"]=c;c.prototype.updateWorldTransform=c.prototype.updateTransform;c.IDENTITY=new c()}var qb=!1,rb=function(){qb||(qb=!0,pb());return ob.exports},sb={},tb={exports:sb};function ub(){__p&&__p();sb.__esModule=!0;var a=function(){__p&&__p();function a(a,b){for(var c=0;c2&&arguments[2]!==void 0?arguments[2]:!1;c||(this._recursivePostUpdateTransform(),!this.parent?(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null):this.displayObjectUpdateTransform());return this.worldTransform.apply(a,b)};d.prototype.toLocal=function(a,b,c,d){b&&(a=b.toGlobal(a,c,d));d||(this._recursivePostUpdateTransform(),!this.parent?(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null):this.displayObjectUpdateTransform());return this.worldTransform.applyInverse(a,c)};d.prototype.renderWebGL=function(a){};d.prototype.renderCanvas=function(a){};d.prototype.setParent=function(a){if(!a||!a.addChild)throw new Error("setParent: Argument must be a Container");a.addChild(this);return a};d.prototype.setTransform=function(){__p&&__p();var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1,e=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,f=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0,g=arguments.length>6&&arguments[6]!==void 0?arguments[6]:0,h=arguments.length>7&&arguments[7]!==void 0?arguments[7]:0,i=arguments.length>8&&arguments[8]!==void 0?arguments[8]:0;this.position.x=a;this.position.y=b;this.scale.x=c?c:1;this.scale.y=d?d:1;this.rotation=e;this.skew.x=f;this.skew.y=g;this.pivot.x=h;this.pivot.y=i;return this};d.prototype.destroy=function(){this.removeAllListeners(),this.parent&&this.parent.removeChild(this),this.transform=null,this.parent=null,this._bounds=null,this._currentBounds=null,this._mask=null,this.filterArea=null,this.interactive=!1,this.interactiveChildren=!1,this._destroyed=!0};a(d,[{key:"_tempDisplayObjectParent",get:function(){this.tempDisplayObjectParent===null&&(this.tempDisplayObjectParent=new d());return this.tempDisplayObjectParent}},{key:"x",get:function(){return this.position.x},set:function(a){this.transform.position.x=a}},{key:"y",get:function(){return this.position.y},set:function(a){this.transform.position.y=a}},{key:"worldTransform",get:function(){return this.transform.worldTransform}},{key:"localTransform",get:function(){return this.transform.localTransform}},{key:"position",get:function(){return this.transform.position},set:function(a){this.transform.position.copy(a)}},{key:"scale",get:function(){return this.transform.scale},set:function(a){this.transform.scale.copy(a)}},{key:"pivot",get:function(){return this.transform.pivot},set:function(a){this.transform.pivot.copy(a)}},{key:"skew",get:function(){return this.transform.skew},set:function(a){this.transform.skew.copy(a)}},{key:"rotation",get:function(){return this.transform.rotation},set:function(a){this.transform.rotation=a}},{key:"worldVisible",get:function(){var a=this;do{if(!a.visible)return!1;a=a.parent}while(a);return!0}},{key:"mask",get:function(){return this._mask},set:function(a){this._mask&&(this._mask.renderable=!0,this._mask.isMask=!1),this._mask=a,this._mask&&(this._mask.renderable=!1,this._mask.isMask=!0)}},{key:"filters",get:function(){return this._filters&&this._filters.slice()},set:function(a){this._filters=a&&a.slice()}}]);return d}(b["default"]);Cb["default"]=k;k.prototype.displayObjectUpdateTransform=k.prototype.updateTransform}var Fb=!1,Gb=function(){Fb||(Fb=!0,Eb());return Db.exports},Hb={},Ib={exports:Hb};function Jb(){__p&&__p();Hb.__esModule=!0;function a(a){a.__plugins={},a.registerPlugin=function(b,c){a.__plugins[b]=c},a.prototype.initPlugins=function(){this.plugins=this.plugins||{};for(var b in a.__plugins)this.plugins[b]=new a.__plugins[b](this)},a.prototype.destroyPlugins=function(){for(var a in this.plugins)this.plugins[a].destroy(),this.plugins[a]=null;this.plugins=null}}Hb["default"]={mixin:function(b){a(b)}}}var Kb=!1,Lb=function(){Kb||(Kb=!0,Jb());return Ib.exports},Mb={},Nb={exports:Mb};function Ob(){__p&&__p();Mb.__esModule=!0;Mb.mixin=a;Mb.delayMixin=c;Mb.performMixins=d;function a(a,b){if(!a||!b)return;var c=Object.keys(b);for(var d=0;d>16&255)/255;b[1]=(a>>8&255)/255;b[2]=(a&255)/255;return b}function m(a){a=a.toString(16);a="000000".substr(0,6-a.length)+a;return"#"+a}function n(a){return(a[0]*255<<16)+(a[1]*255<<8)+(a[2]*255|0)}function o(a,c){a=b["default"].RETINA_PREFIX.exec(a);return a?parseFloat(a[1]):c!==void 0?c:1}function p(b){b=a.DATA_URI.exec(b);return b?{mediaType:b[1]?b[1].toLowerCase():void 0,subType:b[2]?b[2].toLowerCase():void 0,charset:b[3]?b[3].toLowerCase():void 0,encoding:b[4]?b[4].toLowerCase():void 0,data:b[5]}:void 0}function q(b){b=a.URL_FILE_EXTENSION.exec(b);return b?b[1].toLowerCase():void 0}function r(b){b=a.SVG_SIZE.exec(b);var c={};b&&(c[b[1]]=Math.round(parseFloat(b[3])),c[b[5]]=Math.round(parseFloat(b[7])));return c}function s(){f=!0}function t(b){if(f)return;if(navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var c=["\n %c %c %c PixiJS "+a.VERSION+" - \u2730 "+b+" \u2730 %c %c http://www.pixijs.com/ %c %c \u2665%c\u2665%c\u2665 \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;"];window.console.log.apply(console,c)}else window.console&&window.console.log("PixiJS "+a.VERSION+" - "+b+" - http://www.pixijs.com/");f=!0}function u(){__p&&__p();var a={stencil:!0,failIfMajorPerformanceCaveat:!0};try{if(!window.WebGLRenderingContext)return!1;var b=document.createElement("canvas");b=b.getContext("webgl",a)||b.getContext("experimental-webgl",a);a=!!(b&&b.getContextAttributes().stencil);if(b){var c=b.getExtension("WEBGL_lose_context");c&&c.loseContext()}b=null;return a}catch(a){return!1}}function v(a){return a===0?0:a<0?-1:1}var w=R.TextureCache=Object.create(null),x=R.BaseTextureCache=Object.create(null);function y(){var a;for(a in w)w[a].destroy();for(a in x)x[a].destroy()}function z(){var a;for(a in w)delete w[a];for(a in x)delete x[a]}var A=R.premultiplyBlendMode=y["default"]();function B(a,b){return A[b?1:0][a]}function C(a,b){__p&&__p();if(b===1)return(b*255<<24)+a;if(b===0)return 0;var c=a>>16&255,d=a>>8&255;a=a&255;c=c*b+.5|0;d=d*b+.5|0;a=a*b+.5|0;return(b*255<<24)+(c<<16)+(d<<8)+a}function D(a,b,c,d){c=c||new Float32Array(4);d||d===void 0?(c[0]=a[0]*b,c[1]=a[1]*b,c[2]=a[2]*b):(c[0]=a[0],c[1]=a[1],c[2]=a[2]);c[3]=b;return c}function E(a,b,c,d){c=c||new Float32Array(4);c[0]=(a>>16&255)/255;c[1]=(a>>8&255)/255;c[2]=(a&255)/255;(d||d===void 0)&&(c[0]*=b,c[1]*=b,c[2]*=b);c[3]=b;return c}}var Yb=!1,S=function(){Yb||(Yb=!0,Xb());return Wb.exports},Zb={},$b={exports:Zb};function ac(){__p&&__p();Zb.__esModule=!0;var a=function(){__p&&__p();function a(a,b){for(var c=0;c1)for(var c=0;cthis.children.length)throw new Error(a+"addChildAt: The index "+b+" supplied is out of bounds "+this.children.length);a.parent&&a.parent.removeChild(a);a.parent=this;a.transform._parentID=-1;this.children.splice(b,0,a);this._boundsID++;this.onChildrenChange(b);a.emit("added",this);return a};d.prototype.swapChildren=function(a,b){if(a===b)return;var c=this.getChildIndex(a),d=this.getChildIndex(b);this.children[c]=b;this.children[d]=a;this.onChildrenChange(c=this.children.length)throw new Error("The index "+c+" supplied is out of bounds "+this.children.length);var d=this.getChildIndex(a);b.removeItems(this.children,d,1);this.children.splice(c,0,a);this.onChildrenChange(c)};d.prototype.getChildAt=function(a){if(a<0||a>=this.children.length)throw new Error("getChildAt: Index ("+a+") does not exist.");return this.children[a]};d.prototype.removeChild=function(a){__p&&__p();var c=arguments.length;if(c>1)for(var d=0;d0&&arguments[0]!==void 0?arguments[0]:0,b=arguments[1],c=a,d=typeof b==="number"?b:this.children.length,e=d-c,f=void 0;if(e>0&&e<=d){f=this.children.splice(c,e);for(var g=0;g1&&arguments[1]!==void 0?arguments[1]:window.location;if(b.indexOf("data:")===0)return"";d=d||window.location;c||(c=document.createElement("a"));c.href=b;b=a["default"].parse(c.href);var e=!b.port&&d.port===""||b.port===d.port;return b.hostname!==d.hostname||!e||b.protocol!==d.protocol?"anonymous":""}}var gc=!1,hc=function(){gc||(gc=!0,fc());return ec.exports},ic={},jc={exports:ic};function kc(){__p&&__p();ic.__esModule=!0;var a=S(),b=Q(),c=g(b);b=i();b=g(b);var d=hc(),e=g(d);d=m();var f=g(d);function g(a){return a&&a.__esModule?a:{"default":a}}function h(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function j(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b==="object"||typeof b==="function")?b:a}function k(a,b){if(typeof b!=="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}});b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}g=function(b){__p&&__p();k(d,b);function d(e,f,g){__p&&__p();h(this,d);var i=j(this,b.call(this));i.uid=a.uid();i.touched=0;i.resolution=g||c["default"].RESOLUTION;i.width=100;i.height=100;i.realWidth=100;i.realHeight=100;i.scaleMode=f!==void 0?f:c["default"].SCALE_MODE;i.hasLoaded=!1;i.isLoading=!1;i.source=null;i.origSource=null;i.imageType=null;i.sourceScale=1;i.premultipliedAlpha=!0;i.imageUrl=null;i.isPowerOfTwo=!1;i.mipmap=c["default"].MIPMAP_TEXTURES;i.wrapMode=c["default"].WRAP_MODE;i._glTextures={};i._enabled=0;i._virtalBoundId=-1;i._destroyed=!1;i.textureCacheIds=[];e&&i.loadSource(e);return i}d.prototype.update=function(){this.imageType!=="svg"&&(this.realWidth=this.source.naturalWidth||this.source.videoWidth||this.source.width,this.realHeight=this.source.naturalHeight||this.source.videoHeight||this.source.height,this._updateDimensions()),this.emit("update",this)};d.prototype._updateDimensions=function(){this.width=this.realWidth/this.resolution,this.height=this.realHeight/this.resolution,this.isPowerOfTwo=f["default"].isPow2(this.realWidth)&&f["default"].isPow2(this.realHeight)};d.prototype.loadSource=function(a){__p&&__p();var b=this.isLoading;this.hasLoaded=!1;this.isLoading=!1;b&&this.source&&(this.source.onload=null,this.source.onerror=null);var c=!this.source;this.source=a;if((a.src&&a.complete||a.getContext)&&a.width&&a.height)this._updateImageType(),this.imageType==="svg"?this._loadSvgSource():this._sourceLoaded(),c&&this.emit("loaded",this);else if(!a.getContext){this.isLoading=!0;var d=this;a.onload=function(){__p&&__p();d._updateImageType();a.onload=null;a.onerror=null;if(!d.isLoading)return;d.isLoading=!1;d._sourceLoaded();if(d.imageType==="svg"){d._loadSvgSource();return}d.emit("loaded",d)};a.onerror=function(){a.onload=null;a.onerror=null;if(!d.isLoading)return;d.isLoading=!1;d.emit("error",d)};if(a.complete&&a.src){a.onload=null;a.onerror=null;if(d.imageType==="svg"){d._loadSvgSource();return}this.isLoading=!1;a.width&&a.height?(this._sourceLoaded(),b&&this.emit("loaded",this)):b&&this.emit("error",this)}}};d.prototype._updateImageType=function(){__p&&__p();if(!this.imageUrl)return;var b=a.decomposeDataUri(this.imageUrl);if(b&&b.mediaType==="image"){b=b.subType.split("+")[0];b=a.getUrlFileExtension("."+b);if(!b)throw new Error("Invalid image type in data URI.")}else b=a.getUrlFileExtension(this.imageUrl),b||(b="png");this.imageType=b};d.prototype._loadSvgSource=function(){if(this.imageType!=="svg")return;var b=a.decomposeDataUri(this.imageUrl);b?this._loadSvgSourceUsingDataUri(b):this._loadSvgSourceUsingXhr()};d.prototype._loadSvgSourceUsingDataUri=function(a){var b;if(a.encoding==="base64"){if(!atob)throw new Error("Your browser doesn't support base64 conversions.");b=atob(a.data)}else b=a.data;this._loadSvgSourceUsingString(b)};d.prototype._loadSvgSourceUsingXhr=function(){var a=this,b=new XMLHttpRequest();b.onload=function(){if(b.readyState!==b.DONE||b.status!==200)throw new Error("Failed to load SVG using XHR.");a._loadSvgSourceUsingString(b.response)};b.onerror=function(){return a.emit("error",a)};b.open("GET",this.imageUrl,!0);b.send()};d.prototype._loadSvgSourceUsingString=function(b){__p&&__p();b=a.getSvgSize(b);var c=b.width;b=b.height;if(!c||!b)throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them.");this.realWidth=Math.round(c*this.sourceScale);this.realHeight=Math.round(b*this.sourceScale);this._updateDimensions();var e=document.createElement("canvas");e.width=this.realWidth;e.height=this.realHeight;e._pixiId="canvas_"+a.uid();e.getContext("2d").drawImage(this.source,0,0,c,b,0,0,this.realWidth,this.realHeight);this.origSource=this.source;this.source=e;d.addToCache(this,e._pixiId);this.isLoading=!1;this._sourceLoaded();this.emit("loaded",this)};d.prototype._sourceLoaded=function(){this.hasLoaded=!0,this.update()};d.prototype.destroy=function(){this.imageUrl&&(delete a.TextureCache[this.imageUrl],this.imageUrl=null,navigator.isCocoonJS||(this.source.src="")),this.source=null,this.dispose(),d.removeFromCache(this),this.textureCacheIds=null,this._destroyed=!0};d.prototype.dispose=function(){this.emit("dispose",this)};d.prototype.updateSourceImage=function(a){this.source.src=a,this.loadSource(this.source)};d.fromImage=function(b,c,f,g){__p&&__p();var h=a.BaseTextureCache[b];if(!h){var i=new Image();c===void 0&&b.indexOf("data:")!==0?i.crossOrigin=e["default"](b):c&&(i.crossOrigin=typeof c==="string"?c:"anonymous");h=new d(i,f);h.imageUrl=b;g&&(h.sourceScale=g);h.resolution=a.getResolutionOfUrl(b);i.src=b;d.addToCache(h,b)}return h};d.fromCanvas=function(b,c){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"canvas";b._pixiId||(b._pixiId=e+"_"+a.uid());var f=a.BaseTextureCache[b._pixiId];f||(f=new d(b,c),d.addToCache(f,b._pixiId));return f};d.from=function(b,c,e){__p&&__p();if(typeof b==="string")return d.fromImage(b,void 0,c,e);else if(b instanceof HTMLImageElement){var f=b.src,g=a.BaseTextureCache[f];g||(g=new d(b,c),g.imageUrl=f,e&&(g.sourceScale=e),g.resolution=a.getResolutionOfUrl(f),d.addToCache(g,f));return g}else if(b instanceof HTMLCanvasElement)return d.fromCanvas(b,c);return b};d.addToCache=function(b,c){c&&(b.textureCacheIds.indexOf(c)===-1&&b.textureCacheIds.push(c),a.BaseTextureCache[c],a.BaseTextureCache[c]=b)};d.removeFromCache=function(b){__p&&__p();if(typeof b==="string"){var c=a.BaseTextureCache[b];if(c){var d=c.textureCacheIds.indexOf(b);d>-1&&c.textureCacheIds.splice(d,1);delete a.BaseTextureCache[b];return c}}else if(b&&b.textureCacheIds){for(var d=0;d1&&arguments[1]!==void 0?arguments[1]:null,e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,f=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;a(this,b);this.fn=c;this.context=d;this.priority=e;this.once=f;this.next=null;this.previous=null;this._destroyed=!1}b.prototype.match=function(a,b){b=b||null;return this.fn===a&&this.context===b};b.prototype.emit=function(a){this.fn&&(this.context?this.fn.call(this.context,a):this.fn(a));a=this.next;this.once&&this.destroy(!0);this._destroyed&&(this.next=null);return a};b.prototype.connect=function(a){this.previous=a,a.next&&(a.next.previous=this),this.next=a.next,a.next=this};b.prototype.destroy=function(){__p&&__p();var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!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 b=this.next;this.next=a?null:b;this.previous=null;return b};return b}();nc["default"]=b}var qc=!1,rc=function(){qc||(qc=!0,pc());return oc.exports},sc={},tc={exports:sc};function uc(){__p&&__p();sc.__esModule=!0;var a=function(){__p&&__p();function a(a,b){for(var c=0;c2&&arguments[2]!==void 0?arguments[2]:d.UPDATE_PRIORITY.NORMAL;return this._addListener(new e["default"](a,b,c))};b.prototype.addOnce=function(a,b){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:d.UPDATE_PRIORITY.NORMAL;return this._addListener(new e["default"](a,b,c,!0))};b.prototype._addListener=function(a){__p&&__p();var b=this._head.next,c=this._head;if(!b)a.connect(c);else{while(b){if(a.priority>b.priority){a.connect(c);break}c=b;b=b.next}a.previous||a.connect(c)}this._startIfPossible();return this};b.prototype.remove=function(a,b){var c=this._head.next;while(c)c.match(a,b)?c=c.destroy():c=c.next;this._head.next||this._cancelIfNeeded();return this};b.prototype.start=function(){this.started||(this.started=!0,this._requestIfNeeded())};b.prototype.stop=function(){this.started&&(this.started=!1,this._cancelIfNeeded())};b.prototype.destroy=function(){this.stop();var a=this._head.next;while(a)a=a.destroy(!0);this._head.destroy();this._head=null};b.prototype.update=function(){__p&&__p();var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:performance.now(),b;if(a>this.lastTime){b=this.elapsedMS=a-this.lastTime;b>this._maxElapsedMS&&(b=this._maxElapsedMS);this.deltaTime=b*c["default"].TARGET_FPMS*this.speed;var d=this._head,e=d.next;while(e)e=e.emit(this.deltaTime);d.next||this._cancelIfNeeded()}else this.deltaTime=this.elapsedMS=0;this.lastTime=a};a(b,[{key:"FPS",get:function(){return 1e3/this.elapsedMS}},{key:"minFPS",get:function(){return 1e3/this._maxElapsedMS},set:function(a){a=Math.min(Math.max(0,a)/1e3,c["default"].TARGET_FPMS);this._maxElapsedMS=1/a}}]);return b}();sc["default"]=f}var vc=!1,wc=function(){vc||(vc=!0,uc());return tc.exports},xc={},yc={exports:xc};function zc(){__p&&__p();xc.__esModule=!0;xc.Ticker=xc.shared=void 0;var a=wc();b=b(a);function b(a){return a&&a.__esModule?a:{"default":a}}a=new b["default"]();a.autoStart=!0;a.destroy=function(){};xc.shared=a;xc.Ticker=b["default"]}var Ac=!1,Bc=function(){Ac||(Ac=!0,zc());return yc.exports},Cc={},Dc={exports:Cc};function Ec(){__p&&__p();Cc.__esModule=!0;var a=function(){__p&&__p();function a(a,b){for(var c=0;c0&&a.paused===!1&&a.ended===!1&&a.readyState>2};h.prototype._isSourceReady=function(){return this.source.readyState===3||this.source.readyState===4};h.prototype._onPlayStart=function(){this.hasLoaded||this._onCanPlay(),!this._isAutoUpdating&&this.autoUpdate&&(e.shared.add(this.update,this,f.UPDATE_PRIORITY.HIGH),this._isAutoUpdating=!0)};h.prototype._onPlayStop=function(){this._isAutoUpdating&&(e.shared.remove(this.update,this),this._isAutoUpdating=!1)};h.prototype._onCanPlay=function(){this.hasLoaded=!0,this.source&&(this.source.removeEventListener("canplay",this._onCanPlay),this.source.removeEventListener("canplaythrough",this._onCanPlay),this.width=this.source.videoWidth,this.height=this.source.videoHeight,this.__loaded||(this.__loaded=!0,this.emit("loaded",this)),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&this.source.play())};h.prototype.destroy=function(){this._isAutoUpdating&&e.shared.remove(this.update,this),this.source&&this.source._pixiId&&(c["default"].removeFromCache(this.source._pixiId),delete this.source._pixiId,this.source.pause(),this.source.src="",this.source.load()),b.prototype.destroy.call(this)};h.fromVideo=function(a,b){a._pixiId||(a._pixiId="video_"+d.uid());var e=d.BaseTextureCache[a._pixiId];e||(e=new h(a,b),c["default"].addToCache(e,a._pixiId));return e};h.fromUrl=function(a,b,c){__p&&__p();var d=document.createElement("video");d.setAttribute("webkit-playsinline","");d.setAttribute("playsinline","");var e=Array.isArray(a)?a[0].src||a[0]:a.src||a;c===void 0&&e.indexOf("data:")!==0?d.crossOrigin=g["default"](e):c&&(d.crossOrigin=typeof c==="string"?c:"anonymous");if(Array.isArray(a))for(var c=0;c2&&arguments[2]!==void 0?arguments[2]:"canvas";return new b(c["default"].fromCanvas(a,d,e))};b.fromVideo=function(a,c){return typeof a==="string"?b.fromVideoUrl(a,c):new b(d["default"].fromVideo(a,c))};b.fromVideoUrl=function(a,c){return new b(d["default"].fromUrl(a,c))};b.from=function(a){__p&&__p();if(typeof a==="string"){var d=g.TextureCache[a];if(!d){var e=a.match(/\.(mp4|webm|ogg|h264|avi|mov)$/)!==null;return e?b.fromVideoUrl(a):b.fromImage(a)}return d}else if(a instanceof HTMLImageElement)return new b(c["default"].from(a));else if(a instanceof HTMLCanvasElement)return b.fromCanvas(a,j["default"].SCALE_MODE,"HTMLCanvasElement");else if(a instanceof HTMLVideoElement)return b.fromVideo(a);else if(a instanceof c["default"])return new b(a);return a};b.fromLoader=function(a,d,e){a=new c["default"](a,void 0,g.getResolutionOfUrl(d));var f=new b(a);a.imageUrl=d;e||(e=d);c["default"].addToCache(f.baseTexture,e);b.addToCache(f,e);e!==d&&(c["default"].addToCache(f.baseTexture,d),b.addToCache(f,d));return f};b.addToCache=function(a,b){b&&(a.textureCacheIds.indexOf(b)===-1&&a.textureCacheIds.push(b),g.TextureCache[b],g.TextureCache[b]=a)};b.removeFromCache=function(a){__p&&__p();if(typeof a==="string"){var b=g.TextureCache[a];if(b){var c=b.textureCacheIds.indexOf(a);c>-1&&b.textureCacheIds.splice(c,1);delete g.TextureCache[a];return b}}else if(a&&a.textureCacheIds){for(var c=0;cthis.baseTexture.width,g=c+e>this.baseTexture.height;if(f||g){f=f&&g?"and":"or";g="X: "+b+" + "+d+" = "+(b+d)+" > "+this.baseTexture.width;b="Y: "+c+" + "+e+" = "+(c+e)+" > "+this.baseTexture.height;throw new Error("Texture Error: frame does not fit inside the base Texture dimensions: "+(g+" "+f+" "+b))}this.valid=d&&e&&this.baseTexture.hasLoaded;!this.trim&&!this.rotate&&(this.orig=a);this.valid&&this._updateUvs()}},{key:"rotate",get:function(){return this._rotate},set:function(a){this._rotate=a,this.valid&&this._updateUvs()}},{key:"width",get:function(){return this.orig.width}},{key:"height",get:function(){return this.orig.height}}]);return b}(b["default"]);Mc["default"]=o;function p(){var a=document.createElement("canvas");a.width=10;a.height=10;var b=a.getContext("2d");b.fillStyle="white";b.fillRect(0,0,10,10);return new o(new c["default"](a))}function q(a){a.destroy=function(){},a.on=function(){},a.once=function(){},a.emit=function(){}}o.EMPTY=new o(new c["default"]());q(o.EMPTY);q(o.EMPTY.baseTexture);o.WHITE=p();q(o.WHITE);q(o.WHITE.baseTexture)}var Pc=!1,T=function(){Pc||(Pc=!0,Oc());return Nc.exports},Qc={},Rc={exports:Qc};function Sc(){__p&&__p();Qc.__esModule=!0;var a=function(){__p&&__p();function a(a,b){for(var c=0;c=c&&k.x=c&&k.y>16)+(a&65280)+((a&255)<<16)}},{key:"texture",get:function(){return this._texture},set:function(a){if(this._texture===a)return;this._texture=a;this.cachedTint=16777215;this._textureID=-1;this._textureTrimmedID=-1;a&&(a.baseTexture.hasLoaded?this._onTextureUpdate():a.once("update",this._onTextureUpdate,this))}}]);return g}(g["default"]);Qc["default"]=e}var Tc=!1,Uc=function(){Tc||(Tc=!0,Sc());return Rc.exports},Vc={},Wc={exports:Vc};function Xc(){__p&&__p();Vc.__esModule=!0;var a=mc();a=d(a);var b=Q(),c=d(b);function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b==="object"||typeof b==="function")?b:a}function g(a,b){if(typeof b!=="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}});b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}d=function(a){__p&&__p();g(b,a);function b(){__p&&__p();var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:100,g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:100,h=arguments[2],i=arguments[3];e(this,b);var j=f(this,a.call(this,null,h));j.resolution=i||c["default"].RESOLUTION;j.width=Math.ceil(d);j.height=Math.ceil(g);j.realWidth=j.width*j.resolution;j.realHeight=j.height*j.resolution;j.scaleMode=h!==void 0?h:c["default"].SCALE_MODE;j.hasLoaded=!0;j._glRenderTargets={};j._canvasRenderTarget=null;j.valid=!1;return j}b.prototype.resize=function(a,b){__p&&__p();a=Math.ceil(a);b=Math.ceil(b);if(a===this.width&&b===this.height)return;this.valid=a>0&&b>0;this.width=a;this.height=b;this.realWidth=this.width*this.resolution;this.realHeight=this.height*this.resolution;if(!this.valid)return;this.emit("update",this)};b.prototype.destroy=function(){a.prototype.destroy.call(this,!0),this.renderer=null};return b}(a["default"]);Vc["default"]=d}var Yc=!1,Zc=function(){Yc||(Yc=!0,Xc());return Wc.exports},$c={},ad={exports:$c};function bd(){__p&&__p();$c.__esModule=!0;var a=Zc(),b=c(a);a=T();c=c(a);function c(a){return a&&a.__esModule?a:{"default":a}}function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b==="object"||typeof b==="function")?b:a}function f(a,b){if(typeof b!=="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}});b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}a=function(a){__p&&__p();f(c,a);function c(f,g){__p&&__p();d(this,c);var h=null;if(!(f instanceof b["default"])){var i=arguments[1],j=arguments[2],k=arguments[3],l=arguments[4];console.warn("Please use RenderTexture.create("+i+", "+j+") instead of the ctor directly.");h=arguments[0];g=null;f=new b["default"](i,j,k,l)}var m=e(this,a.call(this,f,g));m.legacyRenderer=h;m.valid=!0;m._updateUvs();return m}c.prototype.resize=function(a,b,c){a=Math.ceil(a),b=Math.ceil(b),this.valid=a>0&&b>0,this._frame.width=this.orig.width=a,this._frame.height=this.orig.height=b,c||this.baseTexture.resize(a,b),this._updateUvs()};c.create=function(a,d,e,f){return new c(new b["default"](a,d,e,f))};return c}(c["default"]);$c["default"]=a}var cd=!1,dd=function(){cd||(cd=!0,bd());return ad.exports},ed={},fd={exports:ed};function gd(){__p&&__p();ed.__esModule=!0;var a=function(){__p&&__p();function a(a,b){for(var c=0;cl?l:o;c.moveTo(k,n+o);c.lineTo(k,n+m-o);c.quadraticCurveTo(k,n+m,k+o,n+m);c.lineTo(k+i-o,n+m);c.quadraticCurveTo(k+i,n+m,k+i,n+m-o);c.lineTo(k+i,n+o);c.quadraticCurveTo(k+i,n,k+i-o,n);c.lineTo(k+o,n);c.quadraticCurveTo(k,n,k,n+o);c.closePath()}}};c.prototype.popMask=function(a){a.context.restore(),a.invalidateBlendMode()};c.prototype.destroy=function(){};return c}();jd["default"]=c}var md=!1,nd=function(){md||(md=!0,ld());return kd.exports},od={},pd={exports:od};function qd(){__p&&__p();od.__esModule=!0;var a=function(){__p&&__p();function a(a,b){for(var c=0;c0&&arguments[0]!==void 0?arguments[0]:[];b["default"]()?(c[a.BLEND_MODES.NORMAL]="source-over",c[a.BLEND_MODES.ADD]="lighter",c[a.BLEND_MODES.MULTIPLY]="multiply",c[a.BLEND_MODES.SCREEN]="screen",c[a.BLEND_MODES.OVERLAY]="overlay",c[a.BLEND_MODES.DARKEN]="darken",c[a.BLEND_MODES.LIGHTEN]="lighten",c[a.BLEND_MODES.COLOR_DODGE]="color-dodge",c[a.BLEND_MODES.COLOR_BURN]="color-burn",c[a.BLEND_MODES.HARD_LIGHT]="hard-light",c[a.BLEND_MODES.SOFT_LIGHT]="soft-light",c[a.BLEND_MODES.DIFFERENCE]="difference",c[a.BLEND_MODES.EXCLUSION]="exclusion",c[a.BLEND_MODES.HUE]="hue",c[a.BLEND_MODES.SATURATION]="saturate",c[a.BLEND_MODES.COLOR]="color",c[a.BLEND_MODES.LUMINOSITY]="luminosity"):(c[a.BLEND_MODES.NORMAL]="source-over",c[a.BLEND_MODES.ADD]="lighter",c[a.BLEND_MODES.MULTIPLY]="source-over",c[a.BLEND_MODES.SCREEN]="source-over",c[a.BLEND_MODES.OVERLAY]="source-over",c[a.BLEND_MODES.DARKEN]="source-over",c[a.BLEND_MODES.LIGHTEN]="source-over",c[a.BLEND_MODES.COLOR_DODGE]="source-over",c[a.BLEND_MODES.COLOR_BURN]="source-over",c[a.BLEND_MODES.HARD_LIGHT]="source-over",c[a.BLEND_MODES.SOFT_LIGHT]="source-over",c[a.BLEND_MODES.DIFFERENCE]="source-over",c[a.BLEND_MODES.EXCLUSION]="source-over",c[a.BLEND_MODES.HUE]="source-over",c[a.BLEND_MODES.SATURATION]="source-over",c[a.BLEND_MODES.COLOR]="source-over",c[a.BLEND_MODES.LUMINOSITY]="source-over");c[a.BLEND_MODES.NORMAL_NPM]=c[a.BLEND_MODES.NORMAL];c[a.BLEND_MODES.ADD_NPM]=c[a.BLEND_MODES.ADD];c[a.BLEND_MODES.SCREEN_NPM]=c[a.BLEND_MODES.SCREEN];return c}}var Bd=!1,Cd=function(){Bd||(Bd=!0,Ad());return zd.exports},Dd={},Ed={exports:Dd};function Fd(){__p&&__p();Dd.__esModule=!0;var a=id();a=i(a);var b=nd(),c=i(b);b=sd();var d=i(b);b=Cd();var e=i(b);b=S();var f=K(),g=Q(),h=i(g);function i(a){return a&&a.__esModule?a:{"default":a}}function j(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function k(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b==="object"||typeof b==="function")?b:a}function l(a,b){if(typeof b!=="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}});b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}i=function(a){__p&&__p();l(b,a);function b(d,g,h){__p&&__p();j(this,b);d=k(this,a.call(this,"Canvas",d,g,h));d.type=f.RENDERER_TYPE.CANVAS;d.rootContext=d.view.getContext("2d",{alpha:d.transparent});d.context=d.rootContext;d.refresh=!0;d.maskManager=new c["default"](d);d.smoothProperty="imageSmoothingEnabled";d.rootContext.imageSmoothingEnabled||(d.rootContext.webkitImageSmoothingEnabled?d.smoothProperty="webkitImageSmoothingEnabled":d.rootContext.mozImageSmoothingEnabled?d.smoothProperty="mozImageSmoothingEnabled":d.rootContext.oImageSmoothingEnabled?d.smoothProperty="oImageSmoothingEnabled":d.rootContext.msImageSmoothingEnabled&&(d.smoothProperty="msImageSmoothingEnabled"));d.initPlugins();d.blendModes=e["default"]();d._activeBlendMode=null;d.renderingToScreen=!1;d.resize(d.options.width,d.options.height);return d}b.prototype.render=function(a,b,c,e,g){__p&&__p();if(!this.view)return;this.renderingToScreen=!b;this.emit("prerender");var h=this.resolution;b?(b=b.baseTexture||b,b._canvasRenderTarget||(b._canvasRenderTarget=new d["default"](b.width,b.height,b.resolution),b.source=b._canvasRenderTarget.canvas,b.valid=!0),this.context=b._canvasRenderTarget.context,this.resolution=b._canvasRenderTarget.resolution):this.context=this.rootContext;var i=this.context;b||(this._lastObjectRendered=a);if(!g){b=a.parent;g=this._tempDisplayObjectParent.transform.worldTransform;e?(e.copy(g),this._tempDisplayObjectParent.transform._worldID=-1):g.identity();a.parent=this._tempDisplayObjectParent;a.updateTransform();a.parent=b}i.save();i.setTransform(1,0,0,1,0,0);i.globalAlpha=1;this._activeBlendMode=f.BLEND_MODES.NORMAL;i.globalCompositeOperation=this.blendModes[f.BLEND_MODES.NORMAL];navigator.isCocoonJS&&this.view.screencanvas&&(i.fillStyle="black",i.clear());(c!==void 0?c:this.clearBeforeRender)&&(this.renderingToScreen&&(this.transparent?i.clearRect(0,0,this.width,this.height):(i.fillStyle=this._backgroundColorString,i.fillRect(0,0,this.width,this.height))));e=this.context;this.context=i;a.renderCanvas(this);this.context=e;i.restore();this.resolution=h;this.emit("postrender")};b.prototype.clear=function(a){var b=this.context;a=a||this._backgroundColorString;!this.transparent&&a?(b.fillStyle=a,b.fillRect(0,0,this.width,this.height)):b.clearRect(0,0,this.width,this.height)};b.prototype.setBlendMode=function(a){if(this._activeBlendMode===a)return;this._activeBlendMode=a;this.context.globalCompositeOperation=this.blendModes[a]};b.prototype.destroy=function(b){this.destroyPlugins(),a.prototype.destroy.call(this,b),this.context=null,this.refresh=!0,this.maskManager.destroy(),this.maskManager=null,this.smoothProperty=null};b.prototype.resize=function(b,c){a.prototype.resize.call(this,b,c),this.smoothProperty&&(this.rootContext[this.smoothProperty]=h["default"].SCALE_MODE===f.SCALE_MODES.LINEAR)};b.prototype.invalidateBlendMode=function(){this._activeBlendMode=this.blendModes.indexOf(this.context.globalCompositeOperation)};return b}(a["default"]);Dd["default"]=i;b.pluginTarget.mixin(i)}var Gd=!1,Hd=function(){Gd||(Gd=!0,Fd());return Ed.exports},Id={},Jd={exports:Id};function Kd(){__p&&__p();Id.__esModule=!0;var a=S(),b=xd();c=c(b);function c(a){return a&&a.__esModule?a:{"default":a}}var d={getTintedTexture:function(a,b){__p&&__p();a=a._texture;b=d.roundColor(b);var c="#"+("00000"+(b|0).toString(16)).substr(-6);a.tintCache=a.tintCache||{};var e=a.tintCache[c],f=void 0;if(e){if(e.tintId===a._updateID)return a.tintCache[c];f=a.tintCache[c]}else f=d.canvas||document.createElement("canvas");d.tintMethod(a,b,f);f.tintId=a._updateID;if(d.convertTintToImage){e=new Image();e.src=f.toDataURL();a.tintCache[c]=e}else a.tintCache[c]=f,d.canvas=null;return f},tintWithMultiply:function(a,b,c){__p&&__p();var d=c.getContext("2d"),e=a._frame.clone(),f=a.baseTexture.resolution;e.x*=f;e.y*=f;e.width*=f;e.height*=f;c.width=Math.ceil(e.width);c.height=Math.ceil(e.height);d.save();d.fillStyle="#"+("00000"+(b|0).toString(16)).substr(-6);d.fillRect(0,0,e.width,e.height);d.globalCompositeOperation="multiply";d.drawImage(a.baseTexture.source,e.x,e.y,e.width,e.height,0,0,e.width,e.height);d.globalCompositeOperation="destination-atop";d.drawImage(a.baseTexture.source,e.x,e.y,e.width,e.height,0,0,e.width,e.height);d.restore()},tintWithOverlay:function(a,b,c){__p&&__p();var d=c.getContext("2d"),e=a._frame.clone(),f=a.baseTexture.resolution;e.x*=f;e.y*=f;e.width*=f;e.height*=f;c.width=Math.ceil(e.width);c.height=Math.ceil(e.height);d.save();d.globalCompositeOperation="copy";d.fillStyle="#"+("00000"+(b|0).toString(16)).substr(-6);d.fillRect(0,0,e.width,e.height);d.globalCompositeOperation="destination-atop";d.drawImage(a.baseTexture.source,e.x,e.y,e.width,e.height,0,0,e.width,e.height);d.restore()},tintWithPerPixel:function(b,c,d){__p&&__p();var e=d.getContext("2d"),f=b._frame.clone(),g=b.baseTexture.resolution;f.x*=g;f.y*=g;f.width*=g;f.height*=g;d.width=Math.ceil(f.width);d.height=Math.ceil(f.height);e.save();e.globalCompositeOperation="copy";e.drawImage(b.baseTexture.source,f.x,f.y,f.width,f.height,0,0,f.width,f.height);e.restore();g=a.hex2rgb(c);d=g[0];b=g[1];c=g[2];g=e.getImageData(0,0,f.width,f.height);f=g.data;for(var h=0;h-1){g=g.split(" ");var h=g[1];g=g[2];var i=1;g.indexOf("[")>-1&&(e=g.split(/\[|]/),g=e[0],i*=Number(e[1]));g.match(c)||(d[g]={value:b(h,i),name:g,type:h})}}return d}}var ee=!1,fe=function(){ee||(ee=!0,de());return ce.exports},ge={},he={exports:ge};function ie(){__p&&__p();ge.__esModule=!0;var a=function(){__p&&__p();function a(a,b){for(var c=0;c 0.5)"," {"," color = vec4(1.0, 0.0, 0.0, 1.0);"," }"," else"," {"," color = vec4(0.0, 1.0, 0.0, 1.0);"," }"," gl_FragColor = mix(sample, masky, 0.5);"," gl_FragColor *= sample.a;","}"].join("\n")}}]);return b}();ge["default"]=g}var je=!1,ke=function(){je||(je=!0,ie());return he.exports},le={},me={exports:le};function ne(){__p&&__p();le.__esModule=!0;var a=function(){__p&&__p();function a(a,b){for(var c=0;c0&&arguments[0]!==void 0?arguments[0]:!1,b=this.renderer,c=this.managedFilters;b.off("prerender",this.onPrerender,this);for(var d=0;dthis.checkCountMax&&(this.checkCount=0,this.run())};b.prototype.run=function(){__p&&__p();var a=this.renderer.textureManager,b=a._managedTextures,c=!1;for(var d=0;dthis.maxIdle&&(a.destroyTexture(e,!0),b[d]=null,c=!0)}if(c){e=0;for(var d=0;d=0;b--)this.unload(a.children[b])};return b}();of["default"]=d}var rf=!1,sf=function(){rf||(rf=!0,qf());return pf.exports},tf={},uf={exports:tf};function vf(){__p&&__p();tf.__esModule=!0;tf["default"]=b;var a=K();function b(b){__p&&__p();var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];c[a.BLEND_MODES.NORMAL]=[b.ONE,b.ONE_MINUS_SRC_ALPHA];c[a.BLEND_MODES.ADD]=[b.ONE,b.DST_ALPHA];c[a.BLEND_MODES.MULTIPLY]=[b.DST_COLOR,b.ONE_MINUS_SRC_ALPHA];c[a.BLEND_MODES.SCREEN]=[b.ONE,b.ONE_MINUS_SRC_COLOR];c[a.BLEND_MODES.OVERLAY]=[b.ONE,b.ONE_MINUS_SRC_ALPHA];c[a.BLEND_MODES.DARKEN]=[b.ONE,b.ONE_MINUS_SRC_ALPHA];c[a.BLEND_MODES.LIGHTEN]=[b.ONE,b.ONE_MINUS_SRC_ALPHA];c[a.BLEND_MODES.COLOR_DODGE]=[b.ONE,b.ONE_MINUS_SRC_ALPHA];c[a.BLEND_MODES.COLOR_BURN]=[b.ONE,b.ONE_MINUS_SRC_ALPHA];c[a.BLEND_MODES.HARD_LIGHT]=[b.ONE,b.ONE_MINUS_SRC_ALPHA];c[a.BLEND_MODES.SOFT_LIGHT]=[b.ONE,b.ONE_MINUS_SRC_ALPHA];c[a.BLEND_MODES.DIFFERENCE]=[b.ONE,b.ONE_MINUS_SRC_ALPHA];c[a.BLEND_MODES.EXCLUSION]=[b.ONE,b.ONE_MINUS_SRC_ALPHA];c[a.BLEND_MODES.HUE]=[b.ONE,b.ONE_MINUS_SRC_ALPHA];c[a.BLEND_MODES.SATURATION]=[b.ONE,b.ONE_MINUS_SRC_ALPHA];c[a.BLEND_MODES.COLOR]=[b.ONE,b.ONE_MINUS_SRC_ALPHA];c[a.BLEND_MODES.LUMINOSITY]=[b.ONE,b.ONE_MINUS_SRC_ALPHA];c[a.BLEND_MODES.NORMAL_NPM]=[b.SRC_ALPHA,b.ONE_MINUS_SRC_ALPHA,b.ONE,b.ONE_MINUS_SRC_ALPHA];c[a.BLEND_MODES.ADD_NPM]=[b.SRC_ALPHA,b.DST_ALPHA,b.ONE,b.DST_ALPHA];c[a.BLEND_MODES.SCREEN_NPM]=[b.SRC_ALPHA,b.ONE_MINUS_SRC_COLOR,b.ONE,b.ONE_MINUS_SRC_COLOR];return c}}var wf=!1,xf=function(){wf||(wf=!0,vf());return uf.exports},yf={},zf={exports:yf};function Af(){__p&&__p();yf.__esModule=!0;var a=xf(),b=c(a);function c(a){return a&&a.__esModule?a:{"default":a}}function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var e=0,f=1,g=2,h=3,i=4;c=function(){__p&&__p();function a(c){d(this,a),this.activeState=new Uint8Array(16),this.defaultState=new Uint8Array(16),this.defaultState[0]=1,this.stackIndex=0,this.stack=[],this.gl=c,this.maxAttribs=c.getParameter(c.MAX_VERTEX_ATTRIBS),this.attribState={tempAttribState:new Array(this.maxAttribs),attribState:new Array(this.maxAttribs)},this.blendModes=b["default"](c),this.nativeVaoExtension=c.getExtension("OES_vertex_array_object")||c.getExtension("MOZ_OES_vertex_array_object")||c.getExtension("WEBKIT_OES_vertex_array_object")}a.prototype.push=function(){var a=this.stack[this.stackIndex];a||(a=this.stack[this.stackIndex]=new Uint8Array(16));++this.stackIndex;for(var b=0;b1&&arguments[1]!==void 0?arguments[1]:{};c[a.DRAW_MODES.POINTS]=b.POINTS;c[a.DRAW_MODES.LINES]=b.LINES;c[a.DRAW_MODES.LINE_LOOP]=b.LINE_LOOP;c[a.DRAW_MODES.LINE_STRIP]=b.LINE_STRIP;c[a.DRAW_MODES.TRIANGLES]=b.TRIANGLES;c[a.DRAW_MODES.TRIANGLE_STRIP]=b.TRIANGLE_STRIP;c[a.DRAW_MODES.TRIANGLE_FAN]=b.TRIANGLE_FAN;return c}}var Gf=!1,Hf=function(){Gf||(Gf=!0,Ff());return Ef.exports},If={},Jf={exports:If};function Kf(){If.__esModule=!0;If["default"]=a;function a(a){a=a.getContextAttributes();a.stencil||console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly")}}var Lf=!1,Mf=function(){Lf||(Lf=!0,Kf());return Jf.exports},Nf={},Of={exports:Nf};function Pf(){__p&&__p();Nf.__esModule=!0;var a=id(),b=r(a);a=ze();var c=r(a);a=Ee();var d=r(a);a=hf();var e=r(a);a=Je();var f=r(a);a=ae();var g=r(a);a=nf();var i=r(a);a=mc();var j=r(a);a=sf();var k=r(a);a=Cf();var l=r(a);a=Hf();var m=r(a);a=Mf();var n=r(a);a=S();var o=h(),p=r(o),q=K();function r(a){return a&&a.__esModule?a:{"default":a}}function s(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function t(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b==="object"||typeof b==="function")?b:a}function u(a,b){if(typeof b!=="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}});b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}var v=0;r=function(a){__p&&__p();u(h,a);function h(b,e,f){__p&&__p();s(this,h);b=t(this,a.call(this,"WebGL",b,e,f));b.legacy=b.options.legacy;b.legacy&&(p["default"].VertexArrayObject.FORCE_NATIVE=!0);b.type=q.RENDERER_TYPE.WEBGL;b.handleContextLost=b.handleContextLost.bind(b);b.handleContextRestored=b.handleContextRestored.bind(b);b.view.addEventListener("webglcontextlost",b.handleContextLost,!1);b.view.addEventListener("webglcontextrestored",b.handleContextRestored,!1);b._contextOptions={alpha:b.transparent,antialias:b.options.antialias,premultipliedAlpha:b.transparent&&b.transparent!=="notMultiplied",stencil:!0,preserveDrawingBuffer:b.options.preserveDrawingBuffer,powerPreference:b.options.powerPreference};b._backgroundColorRgba[3]=b.transparent?0:1;b.maskManager=new c["default"](b);b.stencilManager=new d["default"](b);b.emptyRenderer=new g["default"](b);b.currentRenderer=b.emptyRenderer;b.textureManager=null;b.filterManager=null;b.initPlugins();b.options.context&&n["default"](b.options.context);b.gl=b.options.context||p["default"].createContext(b.view,b._contextOptions);b.CONTEXT_UID=v++;b.state=new l["default"](b.gl);b.renderingToScreen=!0;b.boundTextures=null;b._activeShader=null;b._activeVao=null;b._activeRenderTarget=null;b._initContext();b.drawModes=m["default"](b.gl);b._nextTextureLocation=0;b.setBlendMode(0);return b}h.prototype._initContext=function(){__p&&__p();var a=this.gl;a.isContextLost()&&a.getExtension("WEBGL_lose_context")&&a.getExtension("WEBGL_lose_context").restoreContext();var b=a.getParameter(a.MAX_TEXTURE_IMAGE_UNITS);this._activeShader=null;this._activeVao=null;this.boundTextures=new Array(b);this.emptyTextures=new Array(b);this.textureManager=new i["default"](this);this.filterManager=new e["default"](this);this.textureGC=new k["default"](this);this.state.resetToDefault();this.rootRenderTarget=new f["default"](a,this.width,this.height,null,this.resolution,!0);this.rootRenderTarget.clearColor=this._backgroundColorRgba;this.bindRenderTarget(this.rootRenderTarget);var c=new p["default"].GLTexture.fromData(a,null,1,1),d={_glTextures:{}};d._glTextures[this.CONTEXT_UID]={};for(var g=0;g0&&(b+="\nelse "),c0&&(b+="\nelse "),c=this.size&&this.flush();if(!a._texture._uvs)return;this.sprites[this.currentIndex++]=a};b.prototype.flush=function(){__p&&__p();if(this.currentIndex===0)return;var a=this.renderer.gl,b=this.MAX_TEXTURES,c=l["default"].nextPow2(this.currentIndex);c=l["default"].log2(c);c=this.buffers[c];var d=this.sprites,e=this.groups,f=c.float32View,g=c.uint32View,h=this.boundTextures,m=this.renderer.boundTextures,n=this.renderer.textureGC.count,o=0,p=void 0,q=void 0,t=1,u=0,v=e[0],w=j.premultiplyBlendMode[d[0]._texture.baseTexture.premultipliedAlpha?1:0][d[0].blendMode];v.textureCount=0;v.start=0;v.blend=w;r++;var x=void 0;for(x=0;x=0;c--){var d=b[c].trim();/([\"\'])[^\'\"]+\1/.test(d)||(d='"'+d+'"');b[c]=d}return this.fontStyle+" "+this.fontVariant+" "+this.fontWeight+" "+a+" "+b.join(",")};a(b,[{key:"align",get:function(){return this._align},set:function(a){this._align!==a&&(this._align=a,this.styleID++)}},{key:"breakWords",get:function(){return this._breakWords},set:function(a){this._breakWords!==a&&(this._breakWords=a,this.styleID++)}},{key:"dropShadow",get:function(){return this._dropShadow},set:function(a){this._dropShadow!==a&&(this._dropShadow=a,this.styleID++)}},{key:"dropShadowAlpha",get:function(){return this._dropShadowAlpha},set:function(a){this._dropShadowAlpha!==a&&(this._dropShadowAlpha=a,this.styleID++)}},{key:"dropShadowAngle",get:function(){return this._dropShadowAngle},set:function(a){this._dropShadowAngle!==a&&(this._dropShadowAngle=a,this.styleID++)}},{key:"dropShadowBlur",get:function(){return this._dropShadowBlur},set:function(a){this._dropShadowBlur!==a&&(this._dropShadowBlur=a,this.styleID++)}},{key:"dropShadowColor",get:function(){return this._dropShadowColor},set:function(a){a=g(a);this._dropShadowColor!==a&&(this._dropShadowColor=a,this.styleID++)}},{key:"dropShadowDistance",get:function(){return this._dropShadowDistance},set:function(a){this._dropShadowDistance!==a&&(this._dropShadowDistance=a,this.styleID++)}},{key:"fill",get:function(){return this._fill},set:function(a){a=g(a);this._fill!==a&&(this._fill=a,this.styleID++)}},{key:"fillGradientType",get:function(){return this._fillGradientType},set:function(a){this._fillGradientType!==a&&(this._fillGradientType=a,this.styleID++)}},{key:"fillGradientStops",get:function(){return this._fillGradientStops},set:function(a){h(this._fillGradientStops,a)||(this._fillGradientStops=a,this.styleID++)}},{key:"fontFamily",get:function(){return this._fontFamily},set:function(a){this.fontFamily!==a&&(this._fontFamily=a,this.styleID++)}},{key:"fontSize",get:function(){return this._fontSize},set:function(a){this._fontSize!==a&&(this._fontSize=a,this.styleID++)}},{key:"fontStyle",get:function(){return this._fontStyle},set:function(a){this._fontStyle!==a&&(this._fontStyle=a,this.styleID++)}},{key:"fontVariant",get:function(){return this._fontVariant},set:function(a){this._fontVariant!==a&&(this._fontVariant=a,this.styleID++)}},{key:"fontWeight",get:function(){return this._fontWeight},set:function(a){this._fontWeight!==a&&(this._fontWeight=a,this.styleID++)}},{key:"letterSpacing",get:function(){return this._letterSpacing},set:function(a){this._letterSpacing!==a&&(this._letterSpacing=a,this.styleID++)}},{key:"lineHeight",get:function(){return this._lineHeight},set:function(a){this._lineHeight!==a&&(this._lineHeight=a,this.styleID++)}},{key:"leading",get:function(){return this._leading},set:function(a){this._leading!==a&&(this._leading=a,this.styleID++)}},{key:"lineJoin",get:function(){return this._lineJoin},set:function(a){this._lineJoin!==a&&(this._lineJoin=a,this.styleID++)}},{key:"miterLimit",get:function(){return this._miterLimit},set:function(a){this._miterLimit!==a&&(this._miterLimit=a,this.styleID++)}},{key:"padding",get:function(){return this._padding},set:function(a){this._padding!==a&&(this._padding=a,this.styleID++)}},{key:"stroke",get:function(){return this._stroke},set:function(a){a=g(a);this._stroke!==a&&(this._stroke=a,this.styleID++)}},{key:"strokeThickness",get:function(){return this._strokeThickness},set:function(a){this._strokeThickness!==a&&(this._strokeThickness=a,this.styleID++)}},{key:"textBaseline",get:function(){return this._textBaseline},set:function(a){this._textBaseline!==a&&(this._textBaseline=a,this.styleID++)}},{key:"trim",get:function(){return this._trim},set:function(a){this._trim!==a&&(this._trim=a,this.styleID++)}},{key:"whiteSpace",get:function(){return this._whiteSpace},set:function(a){this._whiteSpace!==a&&(this._whiteSpace=a,this.styleID++)}},{key:"wordWrap",get:function(){return this._wordWrap},set:function(a){this._wordWrap!==a&&(this._wordWrap=a,this.styleID++)}},{key:"wordWrapWidth",get:function(){return this._wordWrapWidth},set:function(a){this._wordWrapWidth!==a&&(this._wordWrapWidth=a,this.styleID++)}}]);return b}();lg["default"]=b;function f(a){if(typeof a==="number")return c.hex2string(a);else typeof a==="string"&&(a.indexOf("0x")===0&&(a=a.replace("0x","#")));return a}function g(a){if(!Array.isArray(a))return f(a);else{for(var b=0;b3&&arguments[3]!==void 0?arguments[3]:b._canvas;e=e||d.wordWrap;var f=d.toFontString(),g=b.measureFont(f),h=a.getContext("2d");h.font=f;var i=e?b.wordWrap(c,d,a):c,j=i.split(/(?:\r\n|\r|\n)/),k=new Array(j.length),l=0;for(var m=0;m2&&arguments[2]!==void 0?arguments[2]:b._canvas,e=a.getContext("2d"),f=0,g="",h="",i={},j=d.letterSpacing,k=d.whiteSpace,l=b.collapseSpaces(k),m=b.collapseNewlines(k),n=!l,o=d.wordWrapWidth+j,p=b.tokenize(c);for(var q=0;qo){g!==""&&(h+=b.addLine(g),g="",f=0);if(b.canBreakWords(r,d.breakWords)){var v=r.split("");for(var w=0;wo&&(h+=b.addLine(g),n=!1,g="",f=0);g+=x;f+=B}}else{g.length>0&&(h+=b.addLine(g),g="",f=0);var C=q===p.length-1;h+=b.addLine(r,!C);n=!1;g="";f=0}}else u+f>o&&(n=!1,h+=b.addLine(g),g="",f=0),(g.length>0||!b.isBreakingSpace(r)||n)&&(g+=r,f+=u)}h+=b.addLine(g,!1);return h};b.addLine=function(a){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;a=b.trimRight(a);a=c?a+"\n":a;return a};b.getFromCache=function(a,b,c,d){var e=c[a];if(e===void 0){b=a.length*b;e=d.measureText(a).width+b;c[a]=e}return e};b.collapseSpaces=function(a){return a==="normal"||a==="pre-line"};b.collapseNewlines=function(a){return a==="normal"};b.trimRight=function(a){if(typeof a!=="string")return"";for(var c=a.length-1;c>=0;c--){var d=a[c];if(!b.isBreakingSpace(d))break;a=a.slice(0,-1)}return a};b.isNewline=function(a){return typeof a!=="string"?!1:b._newlines.indexOf(a.charCodeAt(0))>=0};b.isBreakingSpace=function(a){return typeof a!=="string"?!1:b._breakingSpaces.indexOf(a.charCodeAt(0))>=0};b.tokenize=function(a){__p&&__p();var c=[],d="";if(typeof a!=="string")return c;for(var e=0;eh;--j){for(var l=0;l0&&arguments[0]!==void 0?arguments[0]:"";a?delete b._fonts[a]:b._fonts={}};return b}();qg["default"]=b;var c=document.createElement("canvas");c.width=c.height=10;b._canvas=c;b._context=c.getContext("2d");b._fonts={};b.METRICS_STRING="|\xc9q";b.BASELINE_SYMBOL="M";b.BASELINE_MULTIPLIER=1.4;b._newlines=[10,13];b._breakingSpaces=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288]}var tg=!1,ug=function(){tg||(tg=!0,sg());return rg.exports},vg={},wg={exports:vg};function xg(){__p&&__p();vg.__esModule=!0;vg["default"]=a;function a(a){__p&&__p();var b=a.width,c=a.height;a=a.getContext("2d");var d=a.getImageData(0,0,b,c);d=d.data;var e=d.length,f={top:null,left:null,right:null,bottom:null},g,h,i;for(g=0;g0&&(a.shadowColor=b.dropShadowColor);var k=Math.cos(b.dropShadowAngle)*b.dropShadowDistance,l=Math.sin(b.dropShadowAngle)*b.dropShadowDistance;for(var m=0;m3&&arguments[3]!==void 0?arguments[3]:!1,e=this._style,f=e.letterSpacing;if(f===0){d?this.context.strokeText(a,b,c):this.context.fillText(a,b,c);return}var g=String.prototype.split.call(a,""),h=b,i=0,j="";while(i9&&arguments[9]!==void 0?arguments[9]:[],k,l,m,n,o;j.push(a,b);for(var p=1,q=0;p<=i;++p)q=p/i,k=1-q,l=k*k,m=l*k,n=q*q,o=n*q,j.push(m*a+3*l*q*c+3*k*n*e+o*g,m*b+3*l*q*d+3*k*n*f+o*h);return j}}var Ng=!1,Og=function(){Ng||(Ng=!0,Mg());return Lg.exports},Pg={},Qg={exports:Pg};function Rg(){__p&&__p();Pg.__esModule=!0;var a=cc();a=m(a);var b=dd(),c=m(b);b=T();var d=m(b);b=Jg();var e=m(b);b=Uc();var f=m(b),g=P(),h=S(),i=K();b=Za();var j=m(b);b=Og();var k=m(b);b=Hd();var l=m(b);function m(a){return a&&a.__esModule?a:{"default":a}}function n(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function o(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b==="object"||typeof b==="function")?b:a}function p(a,b){if(typeof b!=="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}});b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}var q=void 0,r=new g.Matrix(),s=new g.Point(),t=new Float32Array(4),u=new Float32Array(4);m=function(a){__p&&__p();p(b,a);function b(){__p&&__p();var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;n(this,b);var d=o(this,a.call(this));d.fillAlpha=1;d.lineWidth=0;d.nativeLines=c;d.lineColor=0;d.lineAlignment=.5;d.graphicsData=[];d.tint=16777215;d._prevTint=16777215;d.blendMode=i.BLEND_MODES.NORMAL;d.currentPath=null;d._webGL={};d.isMask=!1;d.boundsPadding=0;d._localBounds=new j["default"]();d.dirty=0;d.fastRectDirty=-1;d.clearDirty=0;d.boundsDirty=-1;d.cachedSpriteDirty=!1;d._spriteRect=null;d._fastRect=!1;return d}b.prototype.clone=function(){__p&&__p();var a=new b();a.renderable=this.renderable;a.fillAlpha=this.fillAlpha;a.lineWidth=this.lineWidth;a.lineColor=this.lineColor;a.lineAlignment=this.lineAlignment;a.tint=this.tint;a.blendMode=this.blendMode;a.isMask=this.isMask;a.boundsPadding=this.boundsPadding;a.dirty=0;a.cachedSpriteDirty=this.cachedSpriteDirty;for(var c=0;cb.CURVES.maxSegments&&(a=b.CURVES.maxSegments);return a};b.prototype.lineStyle=function(){__p&&__p();var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:.5;this.lineWidth=a;this.lineColor=b;this.lineAlpha=c;this.lineAlignment=d;if(this.currentPath)if(this.currentPath.shape.points.length){var e=new g.Polygon(this.currentPath.shape.points.slice(-2));e.closed=!1;this.drawShape(e)}else this.currentPath.lineWidth=this.lineWidth,this.currentPath.lineColor=this.lineColor,this.currentPath.lineAlpha=this.lineAlpha,this.currentPath.lineAlignment=this.lineAlignment;return this};b.prototype.moveTo=function(a,b){a=new g.Polygon([a,b]);a.closed=!1;this.drawShape(a);return this};b.prototype.lineTo=function(a,b){this.currentPath.shape.points.push(a,b);this.dirty++;return this};b.prototype.quadraticCurveTo=function(a,c,d,e){__p&&__p();this.currentPath?this.currentPath.shape.points.length===0&&(this.currentPath.shape.points=[0,0]):this.moveTo(0,0);var f=this.currentPath.shape.points,g,h;f.length===0&&this.moveTo(0,0);var i=f[f.length-2],j=f[f.length-1],k=b.CURVES.adaptive?this._segmentsCount(this._quadraticCurveLength(i,j,a,c,d,e)):20;for(var l=1;l<=k;++l){var m=l/k;g=i+(a-i)*m;h=j+(c-j)*m;f.push(g+(a+(d-a)*m-g)*m,h+(c+(e-c)*m-h)*m)}this.dirty++;return this};b.prototype.bezierCurveTo=function(a,c,d,e,f,g){this.currentPath?this.currentPath.shape.points.length===0&&(this.currentPath.shape.points=[0,0]):this.moveTo(0,0);var h=this.currentPath.shape.points,i=h[h.length-2],j=h[h.length-1];h.length-=2;var l=b.CURVES.adaptive?this._segmentsCount(this._bezierCurveLength(i,j,a,c,d,e,f,g)):20;k["default"](i,j,a,c,d,e,f,g,l,h);this.dirty++;return this};b.prototype.arcTo=function(a,b,c,d,e){__p&&__p();this.currentPath?this.currentPath.shape.points.length===0&&this.currentPath.shape.points.push(a,b):this.moveTo(a,b);var f=this.currentPath.shape.points,g=f[f.length-2],h=f[f.length-1];h=h-b;g=g-a;d=d-b;c=c-a;var i=Math.abs(h*c-g*d);if(i<1e-8||e===0)(f[f.length-2]!==a||f[f.length-1]!==b)&&f.push(a,b);else{f=h*h+g*g;var j=d*d+c*c,k=h*d+g*c,l=e*Math.sqrt(f)/i;i=e*Math.sqrt(j)/i;f=l*k/f;k=i*k/j;j=l*c+i*g;var m=l*d+i*h,n=g*(i+f);i=h*(i+f);f=c*(l+k);l=d*(l+k);k=Math.atan2(i-m,n-j);i=Math.atan2(l-m,f-j);this.arc(j+a,m+b,e,k,i,g*d>c*h)}this.dirty++;return this};b.prototype.arc=function(a,c,d,e,f){__p&&__p();var g=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1;if(e===f)return this;!g&&f<=e?f+=i.PI_2:g&&e<=f&&(e+=i.PI_2);var h=f-e,j=b.CURVES.adaptive?this._segmentsCount(Math.abs(h)*d):Math.ceil(Math.abs(h)/i.PI_2)*40;if(h===0)return this;var k=a+Math.cos(e)*d,l=c+Math.sin(e)*d,m=this.currentPath?this.currentPath.shape.points:null;m?(m[m.length-2]!==k||m[m.length-1]!==l)&&m.push(k,l):(this.moveTo(k,l),m=this.currentPath.shape.points);var n=h/(j*2),o=n*2,p=Math.cos(n),q=Math.sin(n),r=j-1,s=r%1/r;for(var t=0;t<=r;++t){var u=t+s*t,v=n+e+o*u,w=Math.cos(v),x=-Math.sin(v);m.push((p*w+q*x)*d+a,(p*-x+q*w)*d+c)}this.dirty++;return this};b.prototype.beginFill=function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.filling=!0;this.fillColor=a;this.fillAlpha=b;this.currentPath&&(this.currentPath.shape.points.length<=2&&(this.currentPath.fill=this.filling,this.currentPath.fillColor=this.fillColor,this.currentPath.fillAlpha=this.fillAlpha));return this};b.prototype.endFill=function(){this.filling=!1;this.fillColor=null;this.fillAlpha=1;return this};b.prototype.drawRect=function(a,b,c,d){this.drawShape(new g.Rectangle(a,b,c,d));return this};b.prototype.drawRoundedRect=function(a,b,c,d,e){this.drawShape(new g.RoundedRectangle(a,b,c,d,e));return this};b.prototype.drawCircle=function(a,b,c){this.drawShape(new g.Circle(a,b,c));return this};b.prototype.drawEllipse=function(a,b,c,d){this.drawShape(new g.Ellipse(a,b,c,d));return this};b.prototype.drawPolygon=function(a){__p&&__p();var b=a,c=!0;b instanceof g.Polygon&&(c=b.closed,b=b.points);if(!Array.isArray(b)){b=new Array(arguments.length);for(var d=0;d5&&arguments[5]!==void 0?arguments[5]:0;e=e||d/2;var g=-1*Math.PI/2+f,h=c*2,j=i.PI_2/h,k=[];for(var l=0;l0)&&(this.lineWidth=0,this.lineAlignment=.5,this.filling=!1,this.boundsDirty=-1,this.dirty++,this.clearDirty++,this.graphicsData.length=0);this.currentPath=null;this._spriteRect=null;return this};b.prototype.isFastRect=function(){return this.graphicsData.length===1&&this.graphicsData[0].shape.type===i.SHAPES.RECT&&!this.graphicsData[0].lineWidth};b.prototype._renderWebGL=function(a){this.dirty!==this.fastRectDirty&&(this.fastRectDirty=this.dirty,this._fastRect=this.isFastRect()),this._fastRect?this._renderSpriteRect(a):(a.setObjectRenderer(a.plugins.graphics),a.plugins.graphics.render(this))};b.prototype._renderSpriteRect=function(a){__p&&__p();var b=this.graphicsData[0].shape;this._spriteRect||(this._spriteRect=new f["default"](new d["default"](d["default"].WHITE)));var c=this._spriteRect;if(this.tint===16777215)c.tint=this.graphicsData[0].fillColor;else{var e=t,g=u;h.hex2rgb(this.graphicsData[0].fillColor,e);h.hex2rgb(this.tint,g);e[0]*=g[0];e[1]*=g[1];e[2]*=g[2];c.tint=h.rgb2hex(e)}c.alpha=this.graphicsData[0].fillAlpha;c.worldAlpha=this.worldAlpha*c.alpha;c.blendMode=this.blendMode;c._texture._frame.width=b.width;c._texture._frame.height=b.height;c.transform.worldTransform=this.transform.worldTransform;c.anchor.set(-b.x/b.width,-b.y/b.height);c._onAnchorUpdate();c._renderWebGL(a)};b.prototype._renderCanvas=function(a){if(this.isMask===!0)return;a.plugins.graphics.render(this)};b.prototype._calculateBounds=function(){this.boundsDirty!==this.dirty&&(this.boundsDirty=this.dirty,this.updateLocalBounds(),this.cachedSpriteDirty=!0);var a=this._localBounds;this._bounds.addFrame(this.transform,a.minX,a.minY,a.maxX,a.maxY)};b.prototype.containsPoint=function(a){__p&&__p();this.worldTransform.applyInverse(a,s);a=this.graphicsData;for(var b=0;bb?e+g:b,c=fd?f+h:d;else if(l===i.SHAPES.CIRC)e=k.x,f=k.y,g=k.radius+m/2,h=k.radius+m/2,a=e-gb?e+g:b,c=f-hd?f+h:d;else if(l===i.SHAPES.ELIP)e=k.x,f=k.y,g=k.width+m/2,h=k.height+m/2,a=e-gb?e+g:b,c=f-hd?f+h:d;else{l=k.points;k=0;var n=0,o=0,p=0,q,r,s;for(var t=0;t+2b?r+q:b;c=s-gd?s+g:d}}}}else a=0,b=0,c=0,d=0;r=this.boundsPadding;this._localBounds.minX=a-r;this._localBounds.maxX=b+r;this._localBounds.minY=c-r;this._localBounds.maxY=d+r};b.prototype.drawShape=function(a){this.currentPath&&(this.currentPath.shape.points.length<=2&&this.graphicsData.pop());this.currentPath=null;a=new e["default"](this.lineWidth,this.lineColor,this.lineAlpha,this.fillColor,this.fillAlpha,this.filling,this.nativeLines,a,this.lineAlignment);this.graphicsData.push(a);a.type===i.SHAPES.POLY&&(a.shape.closed=a.shape.closed||this.filling,this.currentPath=a);this.dirty++;return a};b.prototype.generateCanvasTexture=function(a){__p&&__p();var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,e=this.getLocalBounds(),f=c["default"].create(e.width,e.height,a,b);q||(q=new l["default"]());this.transform.updateLocalTransform();this.transform.localTransform.copy(r);r.invert();r.tx-=e.x;r.ty-=e.y;q.render(this,f,!0,r);var g=d["default"].fromCanvas(f.baseTexture._canvasRenderTarget.canvas,a,"graphics");g.baseTexture.resolution=b;g.baseTexture.update();return g};b.prototype.closePath=function(){var a=this.currentPath;a&&a.shape&&a.shape.close();return this};b.prototype.addHole=function(){var a=this.graphicsData.pop();this.currentPath=this.graphicsData[this.graphicsData.length-1];this.currentPath.addHole(a.shape);this.currentPath=null;return this};b.prototype.destroy=function(b){__p&&__p();a.prototype.destroy.call(this,b);for(var b=0;b196*j*j?(y=u-w,z=v-x,A=Math.sqrt(y*y+z*z),y/=A,z/=A,y*=j,z*=j,g.push(q-y*B,r-z*B),g.push(m,n,k,l),g.push(q+y*c,r+z*c),g.push(m,n,k,l),g.push(q-y*c*B,r-z*B),g.push(m,n,k,l),d++):(g.push(q+(E-q)*B,r+(H-r)*B),g.push(m,n,k,l),g.push(q-(E-q)*c,r-(H-r)*c),g.push(m,n,k,l))}o=e[(f-2)*2];p=e[(f-2)*2+1];q=e[(f-1)*2];r=e[(f-1)*2+1];u=-(p-r);v=o-q;A=Math.sqrt(u*u+v*v);u/=A;v/=A;u*=j;v*=j;g.push(q-u*B,r-v*B);g.push(m,n,k,l);g.push(q+u*c,r+v*c);g.push(m,n,k,l);h.push(i);for(var F=0;F=6){var h=[],i=d.holes;for(var j=0;j0&&a["default"](d,e,f)}}var lh=!1,mh=function(){lh||(lh=!0,kh());return jh.exports},nh={},oh={exports:nh};function ph(){__p&&__p();nh.__esModule=!0;nh["default"]=d;d=hh();var a=c(d),b=S();function c(a){return a&&a.__esModule?a:{"default":a}}function d(c,d,e){__p&&__p();var f=c.shape,g=f.x,h=f.y,i=f.width;f=f.height;if(c.fill){var j=b.hex2rgb(c.fillColor),k=c.fillAlpha,l=j[0]*k,m=j[1]*k;j=j[2]*k;var n=d.points,o=d.indices,p=n.length/6;n.push(g,h);n.push(l,m,j,k);n.push(g+i,h);n.push(l,m,j,k);n.push(g,h+f);n.push(l,m,j,k);n.push(g+i,h+f);n.push(l,m,j,k);o.push(p,p,p+1,p+2,p+3,p+3)}if(c.lineWidth){n=c.points;c.points=[g,h,g+i,h,g+i,h+f,g,h+f,g,h];a["default"](c,d,e);c.points=n}}}var qh=!1,rh=function(){qh||(qh=!0,ph());return oh.exports},sh={},th={exports:sh};function uh(){__p&&__p();sh.__esModule=!0;sh["default"]=e;e=l();var a=d(e);e=hh();var b=d(e),c=S();function d(a){return a&&a.__esModule?a:{"default":a}}function e(d,e,f){__p&&__p();var h=d.shape,i=h.x,j=h.y,k=h.width,l=h.height;h=h.radius;var m=[];m.push(i,j+h);g(i,j+l-h,i,j+l,i+h,j+l,m);g(i+k-h,j+l,i+k,j+l,i+k,j+l-h,m);g(i+k,j+h,i+k,j,i+k-h,j,m);g(i+h,j,i,j,i,j+h+1e-10,m);if(d.fill){l=c.hex2rgb(d.fillColor);k=d.fillAlpha;i=l[0]*k;j=l[1]*k;h=l[2]*k;l=e.points;var n=e.indices,o=l.length/6,p=a["default"](m,null,2);for(var q=0,r=p.length;q6&&arguments[6]!==void 0?arguments[6]:[],i=20,j=h,k=0,l=0,m=0,n=0,o=0,p;for(var q=0,r=0;q<=i;++q)r=q/i,k=f(a,c,r),l=f(b,d,r),m=f(c,e,r),n=f(d,g,r),o=f(k,m,r),p=f(l,n,r),j.push(o,p);return j}}var vh=!1,wh=function(){vh||(vh=!0,uh());return th.exports},xh={},yh={exports:xh};function zh(){__p&&__p();xh.__esModule=!0;xh["default"]=e;e=hh();var a=d(e),b=K(),c=S();function d(a){return a&&a.__esModule?a:{"default":a}}function e(d,e,f){__p&&__p();var g=d.shape,h=g.x,i=g.y,j=void 0,k=void 0;d.type===b.SHAPES.CIRC?(j=g.radius,k=g.radius):(j=g.width,k=g.height);if(j===0||k===0)return;g=Math.floor(30*Math.sqrt(g.radius))||Math.floor(15*Math.sqrt(g.width+g.height));var l=Math.PI*2/g;if(d.fill){var m=c.hex2rgb(d.fillColor),n=d.fillAlpha,o=m[0]*n,p=m[1]*n;m=m[2]*n;var q=e.points,r=e.indices,s=q.length/6;r.push(s);for(var t=0;t32e4)&&(d=this.graphicsDataPool.pop()||new f["default"](this.renderer.gl,this.primitiveShader,this.renderer.state.attribsState),d.nativeLines=c,d.reset(b),a.data.push(d));d.dirty=!0;return d};return e}(d["default"]);Ch["default"]=l;c["default"].registerPlugin("graphics",l)}var Fh=!1,Gh=function(){Fh||(Fh=!0,Eh());return Dh.exports},Hh={},Ih={exports:Hh};function Jh(){__p&&__p();Hh.__esModule=!0;var a=Hd();c=c(a);var b=K();function c(a){return a&&a.__esModule?a:{"default":a}}function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}a=function(){__p&&__p();function a(b){d(this,a),this.renderer=b}a.prototype.render=function(a){__p&&__p();var c=this.renderer,d=c.context,e=a.worldAlpha,f=a.transform.worldTransform,g=c.resolution;this._prevTint!==this.tint&&(this.dirty=!0);d.setTransform(f.a*g,f.b*g,f.c*g,f.d*g,f.tx*g,f.ty*g);a.dirty&&(this.updateGraphicsTint(a),a.dirty=!1);c.setBlendMode(a.blendMode);for(var f=0;fn?n:q;d.beginPath();d.moveTo(m,p+q);d.lineTo(m,p+o-q);d.quadraticCurveTo(m,p+o,m+q,p+o);d.lineTo(m+j-q,p+o);d.quadraticCurveTo(m+j,p+o,m+j,p+o-q);d.lineTo(m+j,p+q);d.quadraticCurveTo(m+j,p,m+j-q,p);d.lineTo(m+q,p);d.quadraticCurveTo(m,p,m,p+q);d.closePath();(g.fillColor||g.fillColor===0)&&(d.globalAlpha=g.fillAlpha*e,d.fillStyle="#"+("00000"+(h|0).toString(16)).substr(-6),d.fill());g.lineWidth&&(d.globalAlpha=g.lineAlpha*e,d.strokeStyle="#"+("00000"+(i|0).toString(16)).substr(-6),d.stroke())}}};a.prototype.updateGraphicsTint=function(a){a._prevTint=a.tint;var b=(a.tint>>16&255)/255,c=(a.tint>>8&255)/255,d=(a.tint&255)/255;for(var e=0;e>16&255)/255*b*255<<16)+((g>>8&255)/255*c*255<<8)+(g&255)/255*d*255;f._lineTint=((h>>16&255)/255*b*255<<16)+((h>>8&255)/255*c*255<<8)+(h&255)/255*d*255}};a.prototype.renderPolygon=function(a,b,c){c.moveTo(a[0],a[1]);for(var d=1;d2&&arguments[2]!==void 0?arguments[2]:null;d(this,e);this.baseTexture=a;this.textures={};this.data=b;this.resolution=this._updateResolution(c||this.baseTexture.imageUrl);this._frames=this.data.frames;this._frameKeys=Object.keys(this._frames);this._batchIndex=0;this._callback=null}e.prototype._updateResolution=function(a){var b=this.data.meta.scale;a=c.getResolutionOfUrl(a,null);a===null&&(a=b!==void 0?parseFloat(b):1);a!==1&&(this.baseTexture.resolution=a,this.baseTexture.update());return a};e.prototype.parse=function(a){this._batchIndex=0,this._callback=a,this._frameKeys.length<=e.BATCH_SIZE?(this._processFrames(0),this._parseComplete()):this._nextBatch()};e.prototype._processFrames=function(a){__p&&__p();var c=a,d=e.BATCH_SIZE,f=this.baseTexture.sourceScale;while(c-a0&&arguments[0]!==void 0?arguments[0]:!1;for(var b in this.textures)this.textures[b].destroy();this._frames=null;this._frameKeys=null;this.data=null;this.textures=null;a&&this.baseTexture.destroy();this.baseTexture=null};return e}();Mh["default"]=e}var Ph=!1,Qh=function(){Ph||(Ph=!0,Oh());return Nh.exports},Rh={},Sh={exports:Rh};function Th(){__p&&__p();Rh.__esModule=!0;Rh.autoDetectRenderer=f;f=S();var a=e(f);e=Hd();var b=d(e);f=Rf();var c=d(f);function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(a&&a.__esModule)return a;else{var b={};if(a!=null)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);b["default"]=a;return b}}function f(d,e,f,g){var h=d&&d.forceCanvas;g!==void 0&&(h=g);return!h&&a.isWebGLSupported()?new c["default"](d,e,f):new b["default"](d,e,f)}}var Uh=!1,Vh=function(){Uh||(Uh=!0,Th());return Sh.exports},Wh={},Xh={exports:Wh};function Yh(){__p&&__p();Wh.__esModule=!0;var a=function(){__p&&__p();function a(a,b){for(var c=0;c1?this._fontStyle="italic":c.indexOf("oblique")>-1?this._fontStyle="oblique":this._fontStyle="normal";c.indexOf("small-caps")>-1?this._fontVariant="small-caps":this._fontVariant="normal";c=c.split(" ");var d=-1;this._fontSize=26;for(var a=0;a-1&&dthis.renderer.width&&(a.width=this.renderer.width-a.x),a.y+a.height>this.renderer.height&&(a.height=this.renderer.height-a.y)};a.prototype.addChild=function(a){__p&&__p();var b=this.pool.pop();b||(b=document.createElement("button"),b.style.width=h+"px",b.style.height=h+"px",b.style.backgroundColor=this.debug?"rgba(255,0,0,0.5)":"transparent",b.style.position="absolute",b.style.zIndex=l,b.style.borderStyle="none",navigator.userAgent.toLowerCase().indexOf("chrome")>-1?b.setAttribute("aria-live","off"):b.setAttribute("aria-live","polite"),navigator.userAgent.match(/rv:.*Gecko\//)?b.setAttribute("aria-relevant","additions"):b.setAttribute("aria-relevant","text"),b.addEventListener("click",this._onClick.bind(this)),b.addEventListener("focus",this._onFocus.bind(this)),b.addEventListener("focusout",this._onFocusOut.bind(this)));a.accessibleTitle&&a.accessibleTitle!==null?b.title=a.accessibleTitle:(!a.accessibleHint||a.accessibleHint===null)&&(b.title="displayObject "+a.tabIndex);a.accessibleHint&&a.accessibleHint!==null&&b.setAttribute("aria-label",a.accessibleHint);a._accessibleActive=!0;a._accessibleDiv=b;b.displayObject=a;this.children.push(a);this.div.appendChild(a._accessibleDiv);a._accessibleDiv.tabIndex=a.tabIndex};a.prototype._onClick=function(a){var b=this.renderer.plugins.interaction;b.dispatchEvent(a.target.displayObject,"click",b.eventData)};a.prototype._onFocus=function(a){a.target.getAttribute("aria-live","off")||a.target.setAttribute("aria-live","assertive");var b=this.renderer.plugins.interaction;b.dispatchEvent(a.target.displayObject,"mouseover",b.eventData)};a.prototype._onFocusOut=function(a){a.target.getAttribute("aria-live","off")||a.target.setAttribute("aria-live","polite");var b=this.renderer.plugins.interaction;b.dispatchEvent(a.target.displayObject,"mouseout",b.eventData)};a.prototype._onKeyDown=function(a){if(a.keyCode!==g)return;this.activate()};a.prototype._onMouseMove=function(a){if(a.movementX===0&&a.movementY===0)return;this.deactivate()};a.prototype.destroy=function(){this.div=null;for(var a=0;a=this._durations[this.currentFrame])d-=this._durations[this.currentFrame]*a,this._currentTime+=a;this._currentTime+=d/this._durations[this.currentFrame]}else this._currentTime+=b;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()):c!==this.currentFrame&&(this.loop&&this.onLoop&&(this.animationSpeed>0&&this.currentFramec&&this.onLoop()),this.updateTexture())};d.prototype.updateTexture=function(){this._texture=this._textures[this.currentFrame],this._textureID=-1,this.cachedTint=16777215,this.onFrameChange&&this.onFrameChange(this.currentFrame)};d.prototype.destroy=function(a){this.stop(),b.prototype.destroy.call(this,a)};d.fromFrames=function(a){var b=[];for(var e=0;e1&&arguments[1]!==void 0?arguments[1]:100,f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:100;g(this,e);var i=h(this,b.call(this,a));i.tileTransform=new c.TransformStatic();i._width=d;i._height=f;i._canvasPattern=null;i.uvTransform=a.transform||new c.TextureMatrix(a);i.pluginName="tilingSprite";i.uvRespectAnchor=!1;return i}e.prototype._onTextureUpdate=function(){this.uvTransform&&(this.uvTransform.texture=this._texture),this.cachedTint=16777215};e.prototype._renderWebGL=function(a){var b=this._texture;if(!b||!b.valid)return;this.tileTransform.updateLocalTransform();this.uvTransform.update();a.setObjectRenderer(a.plugins[this.pluginName]);a.plugins[this.pluginName].render(this)};e.prototype._renderCanvas=function(a){__p&&__p();var b=this._texture;if(!b.baseTexture.hasLoaded)return;var e=a.context,f=this.worldTransform,g=a.resolution,h=b.baseTexture,i=h.resolution,j=this.tilePosition.x/this.tileScale.x%b._frame.width*i,k=this.tilePosition.y/this.tileScale.y%b._frame.height*i;if(this._textureID!==this._texture._updateID||this.cachedTint!==this.tint){this._textureID=this._texture._updateID;var l=new c.CanvasRenderTarget(b._frame.width,b._frame.height,i);this.tint!==16777215?(this.tintedTexture=d["default"].getTintedTexture(this,this.tint),l.context.drawImage(this.tintedTexture,0,0)):l.context.drawImage(h.source,-b._frame.x*i,-b._frame.y*i);this.cachedTint=this.tint;this._canvasPattern=l.context.createPattern(l.canvas,"repeat")}e.globalAlpha=this.worldAlpha;e.setTransform(f.a*g,f.b*g,f.c*g,f.d*g,f.tx*g,f.ty*g);a.setBlendMode(this.blendMode);e.fillStyle=this._canvasPattern;e.scale(this.tileScale.x/i,this.tileScale.y/i);h=this.anchor.x*-this._width;b=this.anchor.y*-this._height;this.uvRespectAnchor?(e.translate(j,k),e.fillRect(-j+h,-k+b,this._width/this.tileScale.x*i,this._height/this.tileScale.y*i)):(e.translate(j+h,k+b),e.fillRect(-j,-k,this._width/this.tileScale.x*i,this._height/this.tileScale.y*i))};e.prototype._calculateBounds=function(){var a=this._width*-this._anchor._x,b=this._height*-this._anchor._y,c=this._width*(1-this._anchor._x),d=this._height*(1-this._anchor._y);this._bounds.addFrame(this.transform,a,b,c,d)};e.prototype.getLocalBounds=function(a){if(this.children.length===0){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);a||(this._localBoundsRect||(this._localBoundsRect=new c.Rectangle()),a=this._localBoundsRect);return this._bounds.getRectangle(a)}return b.prototype.getLocalBounds.call(this,a)};e.prototype.containsPoint=function(a){this.worldTransform.applyInverse(a,j);a=this._width;var b=this._height,c=-a*this.anchor._x;if(j.x>=c&&j.x=c&&j.y1&&arguments[1]!==void 0?arguments[1]:{};i(this,g);var e=j(this,b.call(this));e._textWidth=0;e._textHeight=0;e._glyphs=[];e._font={tint:c.tint!==void 0?c.tint:16777215,align:c.align||"left",name:null,size:0};e.font=c.font;e._text=a;e._maxWidth=0;e._maxLineHeight=0;e._letterSpacing=0;e._anchor=new d["default"](function(){e.dirty=!0},e,0,0);e.dirty=!1;e.updateText();return e}g.prototype.updateText=function(){__p&&__p();var a=g.fonts[this._font.name],b=this._font.size/a.size,d=new c.Point(),e=[],f=[],h=this.text.replace(/(?:\r\n|\r)/g,"\n"),i=h.length,j=this._maxWidth*a.size/this._font.size,k=null,l=0,m=0,n=0,o=-1,p=0,q=0,r=0;for(var s=0;s0&&d.x>j&&(++q,c.utils.removeItems(e,1+o-q,1+s-o),s=o,o=-1,f.push(p),m=Math.max(m,p),n++,d.x=0,d.y+=a.lineHeight,k=null)}u=h.charAt(h.length-1);u!=="\r"&&u!=="\n"&&(/(?:\s)/.test(u)&&(l=p),f.push(l),m=Math.max(m,l));t=[];for(var s=0;s<=n;s++){o=0;this._font.align==="right"?o=m-f[s]:this._font.align==="center"&&(o=(m-f[s])/2);t.push(o)}j=e.length;k=this.tint;for(var q=0;q=0?a:16777215,this.dirty=!0}},{key:"align",get:function(){return this._font.align},set:function(a){this._font.align=a||"left",this.dirty=!0}},{key:"anchor",get:function(){return this._anchor},set:function(a){typeof a==="number"?this._anchor.set(a):this._anchor.copy(a)}},{key:"font",get:function(){return this._font},set:function(a){if(!a)return;typeof a==="string"?(a=a.split(" "),this._font.name=a.length===1?a[0]:a.slice(1).join(" "),this._font.size=a.length>=2?parseInt(a[0],10):g.fonts[this._font.name].size):(this._font.name=a.name,this._font.size=typeof a.size==="number"?a.size:parseInt(a.size,10));this.dirty=!0}},{key:"text",get:function(){return this._text},set:function(a){a=a.toString()||" ";if(this._text===a)return;this._text=a;this.dirty=!0}},{key:"maxWidth",get:function(){return this._maxWidth},set:function(a){if(this._maxWidth===a)return;this._maxWidth=a;this.dirty=!0}},{key:"maxLineHeight",get:function(){this.validate();return this._maxLineHeight}},{key:"textWidth",get:function(){this.validate();return this._textWidth}},{key:"letterSpacing",get:function(){return this._letterSpacing},set:function(a){this._letterSpacing!==a&&(this._letterSpacing=a,this.dirty=!0)}},{key:"textHeight",get:function(){this.validate();return this._textHeight}}]);return g}(c.Container);aj["default"]=h;h.fonts={}}var dj=!1,ej=function(){dj||(dj=!0,cj());return bj.exports};f={};var fj={exports:f};function gj(){__p&&__p();var a=V(),b=g(a);g=T();var c=f(g);a=mc();var d=f(a),e=S();function f(a){return a&&a.__esModule?a:{"default":a}}function g(a){if(a&&a.__esModule)return a;else{var b={};if(a!=null)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);b["default"]=a;return b}}function h(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}g=b.DisplayObject;var i=new b.Matrix();g.prototype._cacheAsBitmap=!1;g.prototype._cacheData=!1;var j=function a(){h(this,a),this.textureCacheId=null,this.originalRenderWebGL=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(g.prototype,{cacheAsBitmap:{get:function(){return this._cacheAsBitmap},set:function(a){if(this._cacheAsBitmap===a)return;this._cacheAsBitmap=a;var b=void 0;a?(this._cacheData||(this._cacheData=new j()),b=this._cacheData,b.originalRenderWebGL=this.renderWebGL,b.originalRenderCanvas=this.renderCanvas,b.originalUpdateTransform=this.updateTransform,b.originalCalculateBounds=this._calculateBounds,b.originalGetLocalBounds=this.getLocalBounds,b.originalDestroy=this.destroy,b.originalContainsPoint=this.containsPoint,b.originalMask=this._mask,b.originalFilterArea=this.filterArea,this.renderWebGL=this._renderCachedWebGL,this.renderCanvas=this._renderCachedCanvas,this.destroy=this._cacheAsBitmapDestroy):(b=this._cacheData,b.sprite&&this._destroyCachedDisplayObject(),this.renderWebGL=b.originalRenderWebGL,this.renderCanvas=b.originalRenderCanvas,this._calculateBounds=b.originalCalculateBounds,this.getLocalBounds=b.originalGetLocalBounds,this.destroy=b.originalDestroy,this.updateTransform=b.originalUpdateTransform,this.containsPoint=b.originalContainsPoint,this._mask=b.originalMask,this.filterArea=b.originalFilterArea)}}});g.prototype._renderCachedWebGL=function(a){if(!this.visible||this.worldAlpha<=0||!this.renderable)return;this._initCachedDisplayObject(a);this._cacheData.sprite._transformID=-1;this._cacheData.sprite.worldAlpha=this.worldAlpha;this._cacheData.sprite._renderWebGL(a)};g.prototype._initCachedDisplayObject=function(a){__p&&__p();if(this._cacheData&&this._cacheData.sprite)return;var f=this.alpha;this.alpha=1;a.currentRenderer.flush();var g=this.getLocalBounds().clone();if(this._filters){var h=this._filters[0].padding;g.pad(h)}h=a._activeRenderTarget;var j=a.filterManager.filterStack,k=b.RenderTexture.create(g.width|0,g.height|0),l="cacheAsBitmap_"+e.uid();this._cacheData.textureCacheId=l;d["default"].addToCache(k.baseTexture,l);c["default"].addToCache(k,l);l=i;l.tx=-g.x;l.ty=-g.y;this.transform.worldTransform.identity();this.renderWebGL=this._cacheData.originalRenderWebGL;a.render(this,k,!0,l,!0);a.bindRenderTarget(h);a.filterManager.filterStack=j;this.renderWebGL=this._renderCachedWebGL;this.updateTransform=this.displayObjectUpdateTransform;this._mask=null;this.filterArea=null;l=new b.Sprite(k);l.transform.worldTransform=this.transform.worldTransform;l.anchor.x=-(g.x/g.width);l.anchor.y=-(g.y/g.height);l.alpha=f;l._bounds=this._bounds;this._calculateBounds=this._calculateCachedBounds;this.getLocalBounds=this._getCachedLocalBounds;this._cacheData.sprite=l;this.transform._parentID=-1;!this.parent?(this.parent=a._tempDisplayObjectParent,this.updateTransform(),this.parent=null):this.updateTransform();this.containsPoint=l.containsPoint.bind(l)};g.prototype._renderCachedCanvas=function(a){if(!this.visible||this.worldAlpha<=0||!this.renderable)return;this._initCachedDisplayObjectCanvas(a);this._cacheData.sprite.worldAlpha=this.worldAlpha;this._cacheData.sprite.renderCanvas(a)};g.prototype._initCachedDisplayObjectCanvas=function(a){__p&&__p();if(this._cacheData&&this._cacheData.sprite)return;var f=this.getLocalBounds(),g=this.alpha;this.alpha=1;var h=a.context,j=b.RenderTexture.create(f.width|0,f.height|0),k="cacheAsBitmap_"+e.uid();this._cacheData.textureCacheId=k;d["default"].addToCache(j.baseTexture,k);c["default"].addToCache(j,k);k=i;this.transform.localTransform.copy(k);k.invert();k.tx-=f.x;k.ty-=f.y;this.renderCanvas=this._cacheData.originalRenderCanvas;a.render(this,j,!0,k,!1);a.context=h;this.renderCanvas=this._renderCachedCanvas;this._calculateBounds=this._calculateCachedBounds;this._mask=null;this.filterArea=null;k=new b.Sprite(j);k.transform.worldTransform=this.transform.worldTransform;k.anchor.x=-(f.x/f.width);k.anchor.y=-(f.y/f.height);k._bounds=this._bounds;k.alpha=g;!this.parent?(this.parent=a._tempDisplayObjectParent,this.updateTransform(),this.parent=null):this.updateTransform();this.updateTransform=this.displayObjectUpdateTransform;this._cacheData.sprite=k;this.containsPoint=k.containsPoint.bind(k)};g.prototype._calculateCachedBounds=function(){this._cacheData.sprite._calculateBounds()};g.prototype._getCachedLocalBounds=function(){return this._cacheData.sprite.getLocalBounds()};g.prototype._destroyCachedDisplayObject=function(){this._cacheData.sprite._texture.destroy(!0),this._cacheData.sprite=null,d["default"].removeFromCache(this._cacheData.textureCacheId),c["default"].removeFromCache(this._cacheData.textureCacheId),this._cacheData.textureCacheId=null};g.prototype._cacheAsBitmapDestroy=function(a){this.cacheAsBitmap=!1,this.destroy(a)}}var hj=!1,ij=function(){hj||(hj=!0,gj());return fj.exports};c={};var jj={exports:c};function kj(){__p&&__p();var a=V();b=b(a);function b(a){if(a&&a.__esModule)return a;else{var b={};if(a!=null)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);b["default"]=a;return b}}b.DisplayObject.prototype.name=null;b.Container.prototype.getChildByName=function(a){for(var b=0;b0&&arguments[0]!==void 0?arguments[0]:new b.Point(),c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;this.parent?this.parent.toGlobal(this.position,a,c):(a.x=this.position.x,a.y=this.position.y);return a}}var pj=!1,qj=function(){pj||(pj=!0,oj());return nj.exports},W={},rj={exports:W};function sj(){__p&&__p();W.__esModule=!0;W.BitmapText=W.TilingSpriteRenderer=W.TilingSprite=W.AnimatedSprite=void 0;var a=Qi();Object.defineProperty(W,"AnimatedSprite",{enumerable:!0,get:function(){return e(a)["default"]}});var b=Vi();Object.defineProperty(W,"TilingSprite",{enumerable:!0,get:function(){return e(b)["default"]}});var c=$i();Object.defineProperty(W,"TilingSpriteRenderer",{enumerable:!0,get:function(){return e(c)["default"]}});var d=ej();Object.defineProperty(W,"BitmapText",{enumerable:!0,get:function(){return e(d)["default"]}});ij();mj();qj();function e(a){return a&&a.__esModule?a:{"default":a}}}var tj=!1,uj=function(){tj||(tj=!0,sj());return rj.exports},vj={},wj={exports:vj};function xj(){__p&&__p();vj.__esModule=!0;var a=V();b=b(a);function b(a){if(a&&a.__esModule)return a;else{var b={};if(a!=null)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);b["default"]=a;return b}}function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function d(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b==="object"||typeof b==="function")?b:a}function e(a,b){if(typeof b!=="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}});b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}a=function(a){e(b,a);function b(){c(this,b);return d(this,a.call(this,"\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\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\nuniform vec4 filterArea;\n\nvarying vec2 vTextureCoord;\n\nvec2 mapCoord( vec2 coord )\n{\n coord *= filterArea.xy;\n coord += filterArea.zw;\n\n return coord;\n}\n\nvec2 unmapCoord( vec2 coord )\n{\n coord -= filterArea.zw;\n coord /= filterArea.xy;\n\n return coord;\n}\n\nvoid texcoords(vec2 fragCoord, vec2 resolution,\n out vec2 v_rgbNW, out vec2 v_rgbNE,\n out vec2 v_rgbSW, out vec2 v_rgbSE,\n out vec2 v_rgbM) {\n vec2 inverseVP = 1.0 / resolution.xy;\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 = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = aTextureCoord;\n\n vec2 fragCoord = vTextureCoord * filterArea.xy;\n\n texcoords(fragCoord, filterArea.xy, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);\n}",'varying vec2 v_rgbNW;\nvarying vec2 v_rgbNE;\nvarying vec2 v_rgbSW;\nvarying vec2 v_rgbSE;\nvarying vec2 v_rgbM;\n\nvarying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform vec4 filterArea;\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 resolution,\n vec2 v_rgbNW, vec2 v_rgbNE,\n vec2 v_rgbSW, vec2 v_rgbSE,\n vec2 v_rgbM) {\n vec4 color;\n mediump vec2 inverseVP = vec2(1.0 / resolution.x, 1.0 / resolution.y);\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 vec2 fragCoord = vTextureCoord * filterArea.xy;\n\n vec4 color;\n\n color = fxaa(uSampler, fragCoord, filterArea.xy, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);\n\n gl_FragColor = color;\n}\n'))}return b}(b.Filter);vj["default"]=a}var yj=!1,zj=function(){yj||(yj=!0,xj());return wj.exports},Aj={},Bj={exports:Aj};function Cj(){__p&&__p();Aj.__esModule=!0;var a=function(){__p&&__p();function a(a,b){for(var c=0;c0&&arguments[0]!==void 0?arguments[0]:.5,f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Math.random();d(this,c);var g=e(this,b.call(this,"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}","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"));g.noise=a;g.seed=f;return g}a(c,[{key:"noise",get:function(){return this.uniforms.uNoise},set:function(a){this.uniforms.uNoise=a}},{key:"seed",get:function(){return this.uniforms.uSeed},set:function(a){this.uniforms.uSeed=a}}]);return c}(c.Filter);Aj["default"]=b}var Dj=!1,Ej=function(){Dj||(Dj=!0,Cj());return Bj.exports},Fj={},Gj={exports:Fj};function Hj(){__p&&__p();Fj.__esModule=!0;var a=function(){__p&&__p();function a(a,b){for(var c=0;c=e&&(i=c-j-1);k=k.replace("%value%",d[i]);g+=k;g+="\n"}f=f.replace("%blur%",g);f=f.replace("%size%",c);return f}}var Sj=!1,Tj=function(){Sj||(Sj=!0,Rj());return Qj.exports},Uj={},Vj={exports:Uj};function Wj(){Uj.__esModule=!0;Uj["default"]=a;function a(a){a=a.getParameter(a.MAX_VARYING_VECTORS);var b=15;while(b>a)b-=2;return b}}var Xj=!1,Yj=function(){Xj||(Xj=!0,Wj());return Vj.exports},Zj={},$j={exports:Zj};function ak(){__p&&__p();Zj.__esModule=!0;var a=function(){__p&&__p();function a(a,b){for(var c=0;c 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"));a.uniforms.m=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0];a.alpha=1;return a}c.prototype._loadMatrix=function(a){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,c=a;b&&(this._multiply(c,this.uniforms.m,a),c=this._colorMatrix(c));this.uniforms.m=c};c.prototype._multiply=function(a,b,c){__p&&__p();a[0]=b[0]*c[0]+b[1]*c[5]+b[2]*c[10]+b[3]*c[15];a[1]=b[0]*c[1]+b[1]*c[6]+b[2]*c[11]+b[3]*c[16];a[2]=b[0]*c[2]+b[1]*c[7]+b[2]*c[12]+b[3]*c[17];a[3]=b[0]*c[3]+b[1]*c[8]+b[2]*c[13]+b[3]*c[18];a[4]=b[0]*c[4]+b[1]*c[9]+b[2]*c[14]+b[3]*c[19]+b[4];a[5]=b[5]*c[0]+b[6]*c[5]+b[7]*c[10]+b[8]*c[15];a[6]=b[5]*c[1]+b[6]*c[6]+b[7]*c[11]+b[8]*c[16];a[7]=b[5]*c[2]+b[6]*c[7]+b[7]*c[12]+b[8]*c[17];a[8]=b[5]*c[3]+b[6]*c[8]+b[7]*c[13]+b[8]*c[18];a[9]=b[5]*c[4]+b[6]*c[9]+b[7]*c[14]+b[8]*c[19]+b[9];a[10]=b[10]*c[0]+b[11]*c[5]+b[12]*c[10]+b[13]*c[15];a[11]=b[10]*c[1]+b[11]*c[6]+b[12]*c[11]+b[13]*c[16];a[12]=b[10]*c[2]+b[11]*c[7]+b[12]*c[12]+b[13]*c[17];a[13]=b[10]*c[3]+b[11]*c[8]+b[12]*c[13]+b[13]*c[18];a[14]=b[10]*c[4]+b[11]*c[9]+b[12]*c[14]+b[13]*c[19]+b[14];a[15]=b[15]*c[0]+b[16]*c[5]+b[17]*c[10]+b[18]*c[15];a[16]=b[15]*c[1]+b[16]*c[6]+b[17]*c[11]+b[18]*c[16];a[17]=b[15]*c[2]+b[16]*c[7]+b[17]*c[12]+b[18]*c[17];a[18]=b[15]*c[3]+b[16]*c[8]+b[17]*c[13]+b[18]*c[18];a[19]=b[15]*c[4]+b[16]*c[9]+b[17]*c[14]+b[18]*c[19]+b[19];return a};c.prototype._colorMatrix=function(a){a=new Float32Array(a);a[4]/=255;a[9]/=255;a[14]/=255;a[19]/=255;return a};c.prototype.brightness=function(a,b){a=[a,0,0,0,0,0,a,0,0,0,0,0,a,0,0,0,0,0,1,0];this._loadMatrix(a,b)};c.prototype.greyscale=function(a,b){a=[a,a,a,0,0,a,a,a,0,0,a,a,a,0,0,0,0,0,1,0];this._loadMatrix(a,b)};c.prototype.blackAndWhite=function(a){var b=[.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0];this._loadMatrix(b,a)};c.prototype.hue=function(a,b){__p&&__p();a=(a||0)/180*Math.PI;var c=Math.cos(a);a=Math.sin(a);var d=Math.sqrt,e=1/3;d=d(e);var f=c+(1-c)*e,g=e*(1-c)-d*a,h=e*(1-c)+d*a,i=e*(1-c)+d*a,j=c+e*(1-c),k=e*(1-c)-d*a,l=e*(1-c)-d*a;d=e*(1-c)+d*a;a=c+e*(1-c);e=[f,g,h,0,0,i,j,k,0,0,l,d,a,0,0,0,0,0,1,0];this._loadMatrix(e,b)};c.prototype.contrast=function(a,b){a=(a||0)+1;var c=-.5*(a-1);a=[a,0,0,0,c,0,a,0,0,c,0,0,a,0,c,0,0,0,1,0];this._loadMatrix(a,b)};c.prototype.saturate=function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,b=arguments[1],c=a*2/3+1,d=(c-1)*-.5,e=[c,d,d,0,0,d,c,d,0,0,d,d,c,0,0,0,0,0,1,0];this._loadMatrix(e,b)};c.prototype.desaturate=function(){this.saturate(-1)};c.prototype.negative=function(a){var b=[-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0];this._loadMatrix(b,a)};c.prototype.sepia=function(a){var b=[.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0];this._loadMatrix(b,a)};c.prototype.technicolor=function(a){var b=[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];this._loadMatrix(b,a)};c.prototype.polaroid=function(a){var b=[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0];this._loadMatrix(b,a)};c.prototype.toBGR=function(a){var b=[0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0];this._loadMatrix(b,a)};c.prototype.kodachrome=function(a){var b=[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];this._loadMatrix(b,a)};c.prototype.browni=function(a){var b=[.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0];this._loadMatrix(b,a)};c.prototype.vintage=function(a){var b=[.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0];this._loadMatrix(b,a)};c.prototype.colorTone=function(a,b,c,d,e){__p&&__p();a=a||.2;b=b||.15;c=c||16770432;d=d||3375104;var f=(c>>16&255)/255,g=(c>>8&255)/255;c=(c&255)/255;var h=(d>>16&255)/255,i=(d>>8&255)/255;d=(d&255)/255;a=[.3,.59,.11,0,0,f,g,c,a,0,h,i,d,b,0,f-h,g-i,c-d,0,0];this._loadMatrix(a,e)};c.prototype.night=function(a,b){a=a||.1;a=[a*-2,-a,0,0,0,-a,0,a,0,0,0,a,a*2,0,0,0,0,0,1,0];this._loadMatrix(a,b)};c.prototype.predator=function(a,b){a=[11.224130630493164*a,-4.794486999511719*a,-2.8746118545532227*a,0*a,.40342438220977783*a,-3.6330697536468506*a,9.193157196044922*a,-2.951810836791992*a,0*a,-1.316135048866272*a,-3.2184197902679443*a,-4.2375030517578125*a,7.476448059082031*a,0*a,.8044459223747253*a,0,0,0,1,0];this._loadMatrix(a,b)};c.prototype.lsd=function(a){var b=[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0];this._loadMatrix(b,a)};c.prototype.reset=function(){var a=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0];this._loadMatrix(a,!1)};a(c,[{key:"matrix",get:function(){return this.uniforms.m},set:function(a){this.uniforms.m=a}},{key:"alpha",get:function(){return this.uniforms.uAlpha},set:function(a){this.uniforms.uAlpha=a}}]);return c}(c.Filter);nk["default"]=b;b.prototype.grayscale=b.prototype.greyscale}var qk=!1,rk=function(){qk||(qk=!0,pk());return ok.exports},sk={},tk={exports:sk};function uk(){__p&&__p();sk.__esModule=!0;var a=function(){__p&&__p();function a(a,b){for(var c=0;c0&&arguments[0]!==void 0?arguments[0]:1;d(this,c);var f=e(this,b.call(this,"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}","varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform float uAlpha;\n\nvoid main(void)\n{\n gl_FragColor = texture2D(uSampler, vTextureCoord) * uAlpha;\n}\n"));f.alpha=a;f.glShaderKey="alpha";return f}a(c,[{key:"alpha",get:function(){return this.uniforms.uAlpha},set:function(a){this.uniforms.uAlpha=a}}]);return c}(c.Filter);sk["default"]=b}var vk=!1,wk=function(){vk||(vk=!0,uk());return tk.exports},X={},xk={exports:X};function yk(){__p&&__p();X.__esModule=!0;var a=zj();Object.defineProperty(X,"FXAAFilter",{enumerable:!0,get:function(){return i(a)["default"]}});var b=Ej();Object.defineProperty(X,"NoiseFilter",{enumerable:!0,get:function(){return i(b)["default"]}});var c=Jj();Object.defineProperty(X,"DisplacementFilter",{enumerable:!0,get:function(){return i(c)["default"]}});var d=mk();Object.defineProperty(X,"BlurFilter",{enumerable:!0,get:function(){return i(d)["default"]}});var e=ck();Object.defineProperty(X,"BlurXFilter",{enumerable:!0,get:function(){return i(e)["default"]}});var f=hk();Object.defineProperty(X,"BlurYFilter",{enumerable:!0,get:function(){return i(f)["default"]}});var g=rk();Object.defineProperty(X,"ColorMatrixFilter",{enumerable:!0,get:function(){return i(g)["default"]}});var h=wk();Object.defineProperty(X,"AlphaFilter",{enumerable:!0,get:function(){return i(h)["default"]}});function i(a){return a&&a.__esModule?a:{"default":a}}}var zk=!1,Ak=function(){zk||(zk=!0,yk());return xk.exports},Bk={},Ck={exports:Bk};function Dk(){__p&&__p();Bk.__esModule=!0;var a=function(){__p&&__p();function a(a,b){for(var c=0;c1&&arguments[1]!==void 0?arguments[1]:1;this.removeEvents();this.interactionDOMElement=a;this.resolution=b;this.addEvents()};g.prototype.addEvents=function(){if(!this.interactionDOMElement)return;c.ticker.shared.add(this.update,this,c.UPDATE_PRIORITY.INTERACTION);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};g.prototype.removeEvents=function(){if(!this.interactionDOMElement)return;c.ticker.shared.remove(this.update,this);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};g.prototype.update=function(a){__p&&__p();this._deltaTime+=a;if(this._deltaTime=0;j--){var k=i[j],l=this.processInteractive(a,k,c,d,h);if(l){if(!k.parent)continue;h=!1;l&&(a.target&&(d=!1),g=!0)}}}e&&(d&&!a.target&&(!b.hitArea&&b.containsPoint&&(b.containsPoint(f)&&(g=!0))),b.interactive&&(g&&!a.target&&(a.target=b),c&&c(a,b,!!g)));return g};g.prototype.onPointerDown=function(a){__p&&__p();if(this.supportsTouchEvents&&a.pointerType==="touch")return;var b=this.normalizeToPointerData(a);this.autoPreventDefault&&b[0].isNormalized&&a.preventDefault();var c=b.length;for(var d=0;d0){var t=d/Math.abs(a.worldTransform.a);d=d/Math.abs(a.worldTransform.d);a=(r+f+s)/3;var u=(b+c+g)/3,v=r-a,w=b-u,x=Math.sqrt(v*v+w*w);r=a+v/x*(x+t);b=u+w/x*(x+d);v=f-a;w=c-u;x=Math.sqrt(v*v+w*w);f=a+v/x*(x+t);c=u+w/x*(x+d);v=s-a;w=g-u;x=Math.sqrt(v*v+w*w);s=a+v/x*(x+t);g=u+w/x*(x+d)}e.save();e.beginPath();e.moveTo(r,b);e.lineTo(f,c);e.lineTo(s,g);e.closePath();e.clip();a=l*p+o*n+m*q-p*n-o*m-l*q;v=r*p+o*s+f*q-p*s-o*f-r*q;t=l*f+r*n+m*s-f*n-r*m-l*s;u=l*p*s+o*f*n+r*m*q-r*p*n-o*m*s-l*f*q;w=b*p+o*g+c*q-p*g-o*c-b*q;x=l*c+b*n+m*g-c*n-b*m-l*g;d=l*p*g+o*c*n+b*m*q-b*p*n-o*m*g-l*c*q;e.transform(v/a,w/a,t/a,x/a,u/a,d/a);e.drawImage(i,0,0,j*h.resolution,k*h.resolution,0,0,j,k);e.restore();this.renderer.invalidateBlendMode()};a.prototype.renderMeshFlat=function(a){__p&&__p();var b=this.renderer.context;a=a.vertices;var c=a.length/2;b.beginPath();for(var d=1;db?1:this._height/b;a[9]=a[11]=a[13]=a[15]=this._topHeight*b;a[17]=a[19]=a[21]=a[23]=this._height-this._bottomHeight*b;a[25]=a[27]=a[29]=a[31]=this._height};c.prototype.updateVerticalVertices=function(){var a=this.vertices,b=this._leftWidth+this._rightWidth;b=this._width>b?1:this._width/b;a[2]=a[10]=a[18]=a[26]=this._leftWidth*b;a[4]=a[12]=a[20]=a[28]=this._width-this._rightWidth*b;a[6]=a[14]=a[22]=a[30]=this._width};c.prototype._renderCanvas=function(a){__p&&__p();var b=a.context;b.globalAlpha=this.worldAlpha;a.setBlendMode(this.blendMode);var c=this.worldTransform,d=a.resolution;a.roundPixels?b.setTransform(c.a*d,c.b*d,c.c*d,c.d*d,c.tx*d|0,c.ty*d|0):b.setTransform(c.a*d,c.b*d,c.c*d,c.d*d,c.tx*d,c.ty*d);a=this._texture.baseTexture;c=a.source;d=a.width*a.resolution;a=a.height*a.resolution;this.drawSegment(b,c,d,a,0,1,10,11);this.drawSegment(b,c,d,a,2,3,12,13);this.drawSegment(b,c,d,a,4,5,14,15);this.drawSegment(b,c,d,a,8,9,18,19);this.drawSegment(b,c,d,a,10,11,20,21);this.drawSegment(b,c,d,a,12,13,22,23);this.drawSegment(b,c,d,a,16,17,26,27);this.drawSegment(b,c,d,a,18,19,28,29);this.drawSegment(b,c,d,a,20,21,30,31)};c.prototype.drawSegment=function(a,b,c,d,e,f,g,h){var i=this.uvs,j=this.vertices,k=(i[g]-i[e])*c,l=(i[h]-i[f])*d;g=j[g]-j[e];h=j[h]-j[f];k<1&&(k=1);l<1&&(l=1);g<1&&(g=1);h<1&&(h=1);a.drawImage(b,i[e]*c,i[f]*d,k,l,j[e],j[f],g,h)};c.prototype._refresh=function(){__p&&__p();b.prototype._refresh.call(this);var a=this.uvs,c=this._texture;this._origWidth=c.orig.width;this._origHeight=c.orig.height;c=1/this._origWidth;var d=1/this._origHeight;a[0]=a[8]=a[16]=a[24]=0;a[1]=a[3]=a[5]=a[7]=0;a[6]=a[14]=a[22]=a[30]=1;a[25]=a[27]=a[29]=a[31]=1;a[2]=a[10]=a[18]=a[26]=c*this._leftWidth;a[4]=a[12]=a[20]=a[28]=1-c*this._rightWidth;a[9]=a[11]=a[13]=a[15]=d*this._topHeight;a[17]=a[19]=a[21]=a[23]=1-d*this._bottomHeight;this.updateHorizontalVertices();this.updateVerticalVertices();this.dirty++;this.multiplyUvs()};a(c,[{key:"width",get:function(){return this._width},set:function(a){this._width=a,this._refresh()}},{key:"height",get:function(){return this._height},set:function(a){this._height=a,this._refresh()}},{key:"leftWidth",get:function(){return this._leftWidth},set:function(a){this._leftWidth=a,this._refresh()}},{key:"rightWidth",get:function(){return this._rightWidth},set:function(a){this._rightWidth=a,this._refresh()}},{key:"topHeight",get:function(){return this._topHeight},set:function(a){this._topHeight=a,this._refresh()}},{key:"bottomHeight",get:function(){return this._bottomHeight},set:function(a){this._bottomHeight=a,this._refresh()}}]);return c}(c["default"]);Wl["default"]=b}var Zl=!1,$l=function(){Zl||(Zl=!0,Yl());return Xl.exports},am={},bm={exports:am};function cm(){__p&&__p();am.__esModule=!0;var a=Gl();b=b(a);function b(a){return a&&a.__esModule?a:{"default":a}}function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function d(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b==="object"||typeof b==="function")?b:a}function e(a,b){if(typeof b!=="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}});b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}a=function(a){__p&&__p();e(b,a);function b(e,f){__p&&__p();c(this,b);e=d(this,a.call(this,e));e.points=f;e.vertices=new Float32Array(f.length*4);e.uvs=new Float32Array(f.length*4);e.colors=new Float32Array(f.length*2);e.indices=new Uint16Array(f.length*2);e.autoUpdate=!0;e.refresh();return e}b.prototype._refresh=function(){__p&&__p();var a=this.points;if(a.length<1||!this._texture._uvs)return;this.vertices.length/4!==a.length&&(this.vertices=new Float32Array(a.length*4),this.uvs=new Float32Array(a.length*4),this.colors=new Float32Array(a.length*2),this.indices=new Uint16Array(a.length*2));var b=this.uvs,c=this.indices,d=this.colors;b[0]=0;b[1]=0;b[2]=0;b[3]=1;d[0]=1;d[1]=1;c[0]=0;c[1]=1;a=a.length;for(var e=1;e0&&arguments[0]!==void 0?arguments[0]:1500,d=arguments[1],h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:16384,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;f(this,e);var j=g(this,b.call(this)),k=16384;h>k&&(h=k);h>a&&(h=a);j._properties=[!1,!0,!1,!1,!1];j._maxSize=a;j._batchSize=h;j._glBuffers={};j._bufferUpdateIDs=[];j._updateID=0;j.interactiveChildren=!1;j.blendMode=c.BLEND_MODES.NORMAL;j.autoResize=i;j.roundPixels=!0;j.baseTexture=null;j.setProperties(d);j._tint=0;j.tintRgb=new Float32Array(4);j.tint=16777215;return j}e.prototype.setProperties=function(a){a&&(this._properties[0]="vertices"in a||"scale"in a?!!a.vertices||!!a.scale:this._properties[0],this._properties[1]="position"in a?!!a.position:this._properties[1],this._properties[2]="rotation"in a?!!a.rotation:this._properties[2],this._properties[3]="uvs"in a?!!a.uvs:this._properties[3],this._properties[4]="tint"in a||"alpha"in a?!!a.tint||!!a.alpha:this._properties[4])};e.prototype.updateTransform=function(){this.displayObjectUpdateTransform()};e.prototype.renderWebGL=function(a){var b=this;if(!this.visible||this.worldAlpha<=0||!this.children.length||!this.renderable)return;this.baseTexture||(this.baseTexture=this.children[0]._texture.baseTexture,this.baseTexture.hasLoaded||this.baseTexture.once("update",function(){return b.onChildrenChange(0)}));a.setObjectRenderer(a.plugins.particle);a.plugins.particle.render(this)};e.prototype.onChildrenChange=function(a){a=Math.floor(a/this._batchSize);while(this._bufferUpdateIDs.lengthd&&(g=d);d=a._glBuffers[f.CONTEXT_UID];d||(d=a._glBuffers[f.CONTEXT_UID]=this.generateBuffers(a));var h=c[0]._texture.baseTexture;this.renderer.setBlendMode(b.utils.correctBlendMode(a.blendMode,h.premultipliedAlpha));var i=f.gl,j=a.worldTransform.copy(this.tempMatrix);j.prepend(f._activeRenderTarget.projectionMatrix);this.shader.uniforms.projectionMatrix=j.toArray(!0);this.shader.uniforms.uColor=b.utils.premultiplyRgba(a.tintRgb,a.worldAlpha,this.shader.uniforms.uColor,h.premultipliedAlpha);this.shader.uniforms.uSampler=f.bindTexture(h);j=!1;for(var h=0,k=0;he&&(l=e);if(k>=d.length){if(!a.autoResize)break;d.push(this._generateOneMoreBuffer(a))}var m=d[k];m.uploadDynamic(c,h,l);var n=a._bufferUpdateIDs[k]||0;j=j||m._updateID0};return b}();Im["default"]=b}var Lm=!1,Mm=function(){Lm||(Lm=!0,Km());return Jm.exports},Nm={},Om={exports:Nm};function Pm(){__p&&__p();Nm.__esModule=!0;var a=V(),b=e(a);e=Mm();var c=d(e);function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(a&&a.__esModule)return a;else{var b={};if(a!=null)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);b["default"]=a;return b}}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var g=b.ticker.shared;b.settings.UPLOADS_PER_FRAME=4;a=function(){__p&&__p();function a(d){__p&&__p();var e=this;f(this,a);this.limiter=new c["default"](b.settings.UPLOADS_PER_FRAME);this.renderer=d;this.uploadHookHelper=null;this.queue=[];this.addHooks=[];this.uploadHooks=[];this.completes=[];this.ticking=!1;this.delayedTick=function(){if(!e.queue)return;e.prepareItems()};this.registerFindHook(m);this.registerFindHook(n);this.registerFindHook(h);this.registerFindHook(i);this.registerFindHook(j);this.registerUploadHook(k);this.registerUploadHook(l)}a.prototype.upload=function(a,c){typeof a==="function"&&(c=a,a=null),a&&this.add(a),this.queue.length?(c&&this.completes.push(c),this.ticking||(this.ticking=!0,g.addOnce(this.tick,this,b.UPDATE_PRIORITY.UTILITY))):c&&c()};a.prototype.tick=function(){setTimeout(this.delayedTick,0)};a.prototype.prepareItems=function(){__p&&__p();this.limiter.beginFrame();while(this.queue.length&&this.limiter.allowedToUpload()){var a=this.queue[0],c=!1;if(a&&!a._destroyed)for(var d=0,e=this.uploadHooks.length;d=0;c--)this.add(a.children[c]);return this};a.prototype.destroy=function(){this.ticking&&g.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};return a}();Nm["default"]=a;function h(a,c){var d=!1;if(a&&a._textures&&a._textures.length)for(var e=0;e