Newer
Older
pixi.js / bin / pixi.min.js
@Mat Groves Mat Groves on 21 Sep 2016 349 KB republished files
/*!
 * pixi.js - v4.0.2
 * Compiled Wed Sep 21 2016 20:03:30 GMT+0100 (BST)
 *
 * pixi.js is licensed under the MIT License.
 * http://www.opensource.org/licenses/mit-license
 */
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.PIXI=t()}}(function(){var t;return function t(e,r,i){function n(s,a){if(!r[s]){if(!e[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(o)return o(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var h=r[s]={exports:{}};e[s][0].call(h.exports,function(t){var r=e[s][1][t];return n(r?r:t)},h,h.exports,t,e,r,i)}return r[s].exports}for(var o="function"==typeof require&&require,s=0;s<i.length;s++)n(i[s]);return n}({1:[function(t,e,r){var i=new ArrayBuffer(0),n=function(t,e,r,n){this.gl=t,this.buffer=t.createBuffer(),this.type=e||t.ARRAY_BUFFER,this.drawType=n||t.STATIC_DRAW,this.data=i,r&&this.upload(r),this._updateID=0};n.prototype.upload=function(t,e,r){r||this.bind();var i=this.gl;t=t||this.data,e=e||0,this.data.byteLength>=t.byteLength?i.bufferSubData(this.type,e,t):i.bufferData(this.type,t,this.drawType),this.data=t},n.prototype.bind=function(){var t=this.gl;t.bindBuffer(this.type,this.buffer)},n.createVertexBuffer=function(t,e,r){return new n(t,t.ARRAY_BUFFER,e,r)},n.createIndexBuffer=function(t,e,r){return new n(t,t.ELEMENT_ARRAY_BUFFER,e,r)},n.create=function(t,e,r,i){return new n(t,e,r,i)},n.prototype.destroy=function(){this.gl.deleteBuffer(this.buffer)},e.exports=n},{}],2:[function(t,e,r){var i=t("./GLTexture"),n=function(t,e,r){this.gl=t,this.framebuffer=t.createFramebuffer(),this.stencil=null,this.texture=null,this.width=e||100,this.height=r||100};n.prototype.enableTexture=function(t){var e=this.gl;this.texture=t||new i(e),this.texture.bind(),this.bind(),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,this.texture.texture,0)},n.prototype.enableStencil=function(){if(!this.stencil){var t=this.gl;this.stencil=t.createRenderbuffer(),t.bindRenderbuffer(t.RENDERBUFFER,this.stencil),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,this.stencil),t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,this.width,this.height)}},n.prototype.clear=function(t,e,r,i){this.bind();var n=this.gl;n.clearColor(t,e,r,i),n.clear(n.COLOR_BUFFER_BIT)},n.prototype.bind=function(){var t=this.gl;this.texture&&this.texture.unbind(),t.bindFramebuffer(t.FRAMEBUFFER,this.framebuffer)},n.prototype.unbind=function(){var t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,null)},n.prototype.resize=function(t,e){var r=this.gl;this.width=t,this.height=e,this.texture&&this.texture.uploadData(null,t,e),this.stencil&&(r.bindRenderbuffer(r.RENDERBUFFER,this.stencil),r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,t,e))},n.prototype.destroy=function(){var t=this.gl;this.texture&&this.texture.destroy(),t.deleteFramebuffer(this.framebuffer),this.gl=null,this.stencil=null,this.texture=null},n.createRGBA=function(t,e,r,o){var s=i.fromData(t,null,e,r);s.enableNearestScaling(),s.enableWrapClamp();var a=new n(t,e,r);return a.enableTexture(s),a.unbind(),a},n.createFloat32=function(t,e,r,o){var s=new i.fromData(t,o,e,r);s.enableNearestScaling(),s.enableWrapClamp();var a=new n(t,e,r);return a.enableTexture(s),a.unbind(),a},e.exports=n},{"./GLTexture":4}],3:[function(t,e,r){var i=t("./shader/compileProgram"),n=t("./shader/extractAttributes"),o=t("./shader/extractUniforms"),s=t("./shader/generateUniformAccessObject"),a=function(t,e,r,a){this.gl=t,this.program=i(t,e,r,a),this.attributes=n(t,this.program);for(var u in this.attributes)console.log(u+" : "+this.attributes[u].location);console.log(">>>>>>>");var l=o(t,this.program);this.uniforms=s(t,l)};a.prototype.bind=function(){this.gl.useProgram(this.program)},a.prototype.destroy=function(){},e.exports=a},{"./shader/compileProgram":9,"./shader/extractAttributes":11,"./shader/extractUniforms":12,"./shader/generateUniformAccessObject":13}],4:[function(t,e,r){var i=function(t,e,r,i,n){this.gl=t,this.texture=t.createTexture(),this.mipmap=!1,this.premultiplyAlpha=!1,this.width=e||-1,this.height=r||-1,this.format=i||t.RGBA,this.type=n||t.UNSIGNED_BYTE};i.prototype.upload=function(t){this.bind();var e=this.gl;e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.premultiplyAlpha);var r=t.videoWidth||t.width,i=t.videoHeight||t.height;i!==this.height||r!==this.width?e.texImage2D(e.TEXTURE_2D,0,this.format,this.format,this.type,t):e.texSubImage2D(e.TEXTURE_2D,0,0,0,this.format,this.type,t),this.width=r,this.height=i};var n=!1;i.prototype.uploadData=function(t,e,r){this.bind();var i=this.gl;if(t instanceof Float32Array){if(!n){var o=i.getExtension("OES_texture_float");if(!o)throw new Error("floating point textures not available");n=!0}this.type=i.FLOAT}else this.type=i.UNSIGNED_BYTE;i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.premultiplyAlpha),e!==this.width||r!==this.height?i.texImage2D(i.TEXTURE_2D,0,this.format,e,r,0,this.format,this.type,t||null):i.texSubImage2D(i.TEXTURE_2D,0,0,0,e,r,this.format,this.type,t||null),this.width=e,this.height=r},i.prototype.bind=function(t){var e=this.gl;void 0!==t&&e.activeTexture(e.TEXTURE0+t),e.bindTexture(e.TEXTURE_2D,this.texture)},i.prototype.unbind=function(){var t=this.gl;t.bindTexture(t.TEXTURE_2D,null)},i.prototype.minFilter=function(t){var e=this.gl;this.bind(),this.mipmap?e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t?e.LINEAR_MIPMAP_LINEAR:e.NEAREST_MIPMAP_NEAREST):e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t?e.LINEAR:e.NEAREST)},i.prototype.magFilter=function(t){var e=this.gl;this.bind(),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,t?e.LINEAR:e.NEAREST)},i.prototype.enableMipmap=function(){var t=this.gl;this.bind(),this.mipmap=!0,t.generateMipmap(t.TEXTURE_2D)},i.prototype.enableLinearScaling=function(){this.minFilter(!0),this.magFilter(!0)},i.prototype.enableNearestScaling=function(){this.minFilter(!1),this.magFilter(!1)},i.prototype.enableWrapClamp=function(){var t=this.gl;this.bind(),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE)},i.prototype.enableWrapRepeat=function(){var t=this.gl;this.bind(),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.REPEAT)},i.prototype.enableWrapMirrorRepeat=function(){var t=this.gl;this.bind(),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.MIRRORED_REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.MIRRORED_REPEAT)},i.prototype.destroy=function(){var t=this.gl;t.deleteTexture(this.texture)},i.fromSource=function(t,e,r){var n=new i(t);return n.premultiplyAlpha=r||!1,n.upload(e),n},i.fromData=function(t,e,r,n){var o=new i(t);return o.uploadData(e,r,n),o},e.exports=i},{}],5:[function(t,e,r){function i(t,e){if(this.nativeVaoExtension=null,i.FORCE_NATIVE||(this.nativeVaoExtension=t.getExtension("OES_vertex_array_object")||t.getExtension("MOZ_OES_vertex_array_object")||t.getExtension("WEBKIT_OES_vertex_array_object")),this.nativeState=e,this.nativeVaoExtension){this.nativeVao=this.nativeVaoExtension.createVertexArrayOES();var r=t.getParameter(t.MAX_VERTEX_ATTRIBS);this.nativeState={tempAttribState:new Array(r),attribState:new Array(r)}}this.gl=t,this.attributes=[],this.indexBuffer=null,this.dirty=!1}var n=t("./setVertexAttribArrays");i.prototype.constructor=i,e.exports=i,i.FORCE_NATIVE=!0,i.prototype.bind=function(){return this.nativeVao?(this.nativeVaoExtension.bindVertexArrayOES(this.nativeVao),this.dirty&&(this.dirty=!1,this.activate())):this.activate(),this},i.prototype.unbind=function(){return this.nativeVao&&this.nativeVaoExtension.bindVertexArrayOES(null),this},i.prototype.activate=function(){for(var t=this.gl,e=null,r=0;r<this.attributes.length;r++){var i=this.attributes[r];e!==i.buffer&&(i.buffer.bind(),e=i.buffer),t.vertexAttribPointer(i.attribute.location,i.attribute.size,i.type||t.FLOAT,i.normalized||!1,i.stride||0,i.start||0)}return n(t,this.attributes,this.nativeState),this.indexBuffer.bind(),this},i.prototype.addAttribute=function(t,e,r,i,n,o){return this.attributes.push({buffer:t,attribute:e,location:e.location,type:r||this.gl.FLOAT,normalized:i||!1,stride:n||0,start:o||0}),this.dirty=!0,this},i.prototype.addIndex=function(t){return this.indexBuffer=t,this.dirty=!0,this},i.prototype.clear=function(){return this.nativeVao&&this.nativeVaoExtension.bindVertexArrayOES(this.nativeVao),this.attributes.length=0,this.indexBuffer=null,this},i.prototype.draw=function(t,e,r){var i=this.gl;return i.drawElements(t,e||this.indexBuffer.data.length,i.UNSIGNED_SHORT,r||0),this},i.prototype.destroy=function(){this.gl=null,this.indexBuffer=null,this.attributes=null,this.nativeState=null,this.nativeVao&&this.nativeVaoExtension.deleteVertexArrayOES(this.nativeVao),this.nativeVaoExtension=null,this.nativeVao=null}},{"./setVertexAttribArrays":8}],6:[function(t,e,r){var i=function(t,e){var r=t.getContext("webgl",e)||t.getContext("experimental-webgl",e);if(!r)throw new Error("This browser does not support webGL. Try using the canvas renderer");return r};e.exports=i},{}],7:[function(t,e,r){var i={createContext:t("./createContext"),setVertexAttribArrays:t("./setVertexAttribArrays"),GLBuffer:t("./GLBuffer"),GLFramebuffer:t("./GLFramebuffer"),GLShader:t("./GLShader"),GLTexture:t("./GLTexture"),VertexArrayObject:t("./VertexArrayObject"),shader:t("./shader")};"undefined"!=typeof e&&e.exports&&(e.exports=i),"undefined"!=typeof window&&(window.PIXI=window.PIXI||{},window.PIXI.glCore=i)},{"./GLBuffer":1,"./GLFramebuffer":2,"./GLShader":3,"./GLTexture":4,"./VertexArrayObject":5,"./createContext":6,"./setVertexAttribArrays":8,"./shader":14}],8:[function(t,e,r){var i=function(t,e,r){var i;if(r){var n=r.tempAttribState,o=r.attribState;for(i=0;i<n.length;i++)n[i]=!1;for(i=0;i<e.length;i++)n[e[i].attribute.location]=!0;for(i=0;i<o.length;i++)o[i]!==n[i]&&(o[i]=n[i],r.attribState[i]?t.enableVertexAttribArray(i):t.disableVertexAttribArray(i))}else for(i=0;i<e.length;i++){var s=e[i];t.enableVertexAttribArray(s.attribute.location)}};e.exports=i},{}],9:[function(t,e,r){var i=function(t,e,r,i){var o=n(t,t.VERTEX_SHADER,e),s=n(t,t.FRAGMENT_SHADER,r),a=t.createProgram();if(t.attachShader(a,o),t.attachShader(a,s),i)for(var u in i)t.bindAttribLocation(a,i[u],u);return t.linkProgram(a),t.getProgramParameter(a,t.LINK_STATUS)||(console.error("Pixi.js Error: Could not initialize shader."),console.error("gl.VALIDATE_STATUS",t.getProgramParameter(a,t.VALIDATE_STATUS)),console.error("gl.getError()",t.getError()),""!==t.getProgramInfoLog(a)&&console.warn("Pixi.js Warning: gl.getProgramInfoLog()",t.getProgramInfoLog(a)),t.deleteProgram(a),a=null),t.deleteShader(o),t.deleteShader(s),a},n=function(t,e,r){var i=t.createShader(e);return t.shaderSource(i,r),t.compileShader(i),t.getShaderParameter(i,t.COMPILE_STATUS)?i:(console.log(t.getShaderInfoLog(i)),null)};e.exports=i},{}],10:[function(t,e,r){var i=function(t,e){switch(t){case"float":return 0;case"vec2":return new Float32Array(2*e);case"vec3":return new Float32Array(3*e);case"vec4":return new Float32Array(4*e);case"int":case"sampler2D":return 0;case"ivec2":return new Int32Array(2*e);case"ivec3":return new Int32Array(3*e);case"ivec4":return new Int32Array(4*e);case"bool":return!1;case"bvec2":return n(2*e);case"bvec3":return n(3*e);case"bvec4":return n(4*e);case"mat2":return new Float32Array([1,0,0,1]);case"mat3":return new Float32Array([1,0,0,0,1,0,0,0,1]);case"mat4":return new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}},n=function(t){for(var e=new Array(t),r=0;r<e.length;r++)e[r]=!1;return e};e.exports=i},{}],11:[function(t,e,r){var i=t("./mapType"),n=t("./mapSize"),o=function(t,e){for(var r={},o=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES),a=0;a<o;a++){var u=t.getActiveAttrib(e,a),l=i(t,u.type);r[u.name]={type:l,size:n(l),location:t.getAttribLocation(e,u.name),pointer:s}}return r},s=function(t,e,r,i){gl.vertexAttribPointer(this.location,this.size,t||gl.FLOAT,e||!1,r||0,i||0)};e.exports=o},{"./mapSize":15,"./mapType":16}],12:[function(t,e,r){var i=t("./mapType"),n=t("./defaultValue"),o=function(t,e){for(var r={},o=t.getProgramParameter(e,t.ACTIVE_UNIFORMS),s=0;s<o;s++){var a=t.getActiveUniform(e,s),u=a.name.replace(/\[.*?\]/,""),l=i(t,a.type);r[u]={type:l,size:a.size,location:t.getUniformLocation(e,u),value:n(l,a.size)}}return r};e.exports=o},{"./defaultValue":10,"./mapType":16}],13:[function(t,e,r){var i=function(t,e){var r={data:{}};r.gl=t;for(var i=Object.keys(e),a=0;a<i.length;a++){var u=i[a],l=u.split("."),h=l[l.length-1],c=s(l,r),f=e[u];c.data[h]=f,c.gl=t,Object.defineProperty(c,h,{get:n(h),set:o(h,f)})}return r},n=function(t){var e=a.replace("%%",t);return new Function(e)},o=function(t,e){var r,i=u.replace(/%%/g,t);return r=1===e.size?l[e.type]:h[e.type],r&&(i+="\nthis.gl."+r+";"),new Function("value",i)},s=function(t,e){for(var r=e,i=0;i<t.length-1;i++){var n=r[t[i]]||{data:{}};r[t[i]]=n,r=n}return r},a=["return this.data.%%.value;"].join("\n"),u=["this.data.%%.value = value;","var location = this.data.%%.location;"].join("\n"),l={float:"uniform1f(location, value)",vec2:"uniform2f(location, value[0], value[1])",vec3:"uniform3f(location, value[0], value[1], value[2])",vec4:"uniform4f(location, value[0], value[1], value[2], value[3])",int:"uniform1i(location, value)",ivec2:"uniform2i(location, value[0], value[1])",ivec3:"uniform3i(location, value[0], value[1], value[2])",ivec4:"uniform4i(location, value[0], value[1], value[2], value[3])",bool:"uniform1i(location, value)",bvec2:"uniform2i(location, value[0], value[1])",bvec3:"uniform3i(location, value[0], value[1], value[2])",bvec4:"uniform4i(location, value[0], value[1], value[2], value[3])",mat2:"uniformMatrix2fv(location, false, value)",mat3:"uniformMatrix3fv(location, false, value)",mat4:"uniformMatrix4fv(location, false, value)",sampler2D:"uniform1i(location, value)"},h={float:"uniform1fv(location, value)",vec2:"uniform2fv(location, value)",vec3:"uniform3fv(location, value)",vec4:"uniform4fv(location, value)",int:"uniform1iv(location, value)",ivec2:"uniform2iv(location, value)",ivec3:"uniform3iv(location, value)",ivec4:"uniform4iv(location, value)",bool:"uniform1iv(location, value)",bvec2:"uniform2iv(location, value)",bvec3:"uniform3iv(location, value)",bvec4:"uniform4iv(location, value)",sampler2D:"uniform1iv(location, value)"};e.exports=i},{}],14:[function(t,e,r){e.exports={compileProgram:t("./compileProgram"),defaultValue:t("./defaultValue"),extractAttributes:t("./extractAttributes"),extractUniforms:t("./extractUniforms"),generateUniformAccessObject:t("./generateUniformAccessObject"),mapSize:t("./mapSize"),mapType:t("./mapType")}},{"./compileProgram":9,"./defaultValue":10,"./extractAttributes":11,"./extractUniforms":12,"./generateUniformAccessObject":13,"./mapSize":15,"./mapType":16}],15:[function(t,e,r){var i=function(t){return n[t]},n={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};e.exports=i},{}],16:[function(t,e,r){var i=function(t,e){if(!n){var r=Object.keys(o);n={};for(var i=0;i<r.length;++i){var s=r[i];n[t[s]]=o[s]}}return n[e]},n=null,o={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D"};e.exports=i},{}],17:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e,r,i){(0,s.default)(e)(t,(0,u.default)(r),i)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=n;var o=t("./internal/eachOfLimit"),s=i(o),a=t("./internal/withoutIndex"),u=i(a);e.exports=r.default},{"./internal/eachOfLimit":21,"./internal/withoutIndex":28}],18:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(r,"__esModule",{value:!0});var n=t("./eachLimit"),o=i(n),s=t("./internal/doLimit"),a=i(s);r.default=(0,a.default)(o.default,1),e.exports=r.default},{"./eachLimit":17,"./internal/doLimit":20}],19:[function(t,e,r){"use strict";function i(){this.head=this.tail=null,this.length=0}function n(t,e){t.length=1,t.head=t.tail=e}Object.defineProperty(r,"__esModule",{value:!0}),r.default=i,i.prototype.removeLink=function(t){return t.prev?t.prev.next=t.next:this.head=t.next,t.next?t.next.prev=t.prev:this.tail=t.prev,t.prev=t.next=null,this.length-=1,t},i.prototype.empty=i,i.prototype.insertAfter=function(t,e){e.prev=t,e.next=t.next,t.next?t.next.prev=e:this.tail=e,t.next=e,this.length+=1},i.prototype.insertBefore=function(t,e){e.prev=t.prev,e.next=t,t.prev?t.prev.next=e:this.head=e,t.prev=e,this.length+=1},i.prototype.unshift=function(t){this.head?this.insertBefore(this.head,t):n(this,t)},i.prototype.push=function(t){this.tail?this.insertAfter(this.tail,t):n(this,t)},i.prototype.shift=function(){return this.head&&this.removeLink(this.head)},i.prototype.pop=function(){return this.tail&&this.removeLink(this.tail)},e.exports=r.default},{}],20:[function(t,e,r){"use strict";function i(t,e){return function(r,i,n){return t(r,e,i,n)}}Object.defineProperty(r,"__esModule",{value:!0}),r.default=i,e.exports=r.default},{}],21:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t){return function(e,r,i){function n(t){if(c-=1,t)l=!0,i(t);else{if(l&&c<=0)return i(null);o()}}function o(){for(;c<t&&!l;){var e=a();if(null===e)return l=!0,void(c<=0&&i(null));c+=1,r(e.value,e.key,(0,f.default)(n))}}if(i=(0,u.default)(i||s.default),t<=0||!e)return i(null);var a=(0,h.default)(e),l=!1,c=0;o()}}Object.defineProperty(r,"__esModule",{value:!0}),r.default=n;var o=t("lodash/noop"),s=i(o),a=t("./once"),u=i(a),l=t("./iterator"),h=i(l),c=t("./onlyOnce"),f=i(c);e.exports=r.default},{"./iterator":23,"./once":24,"./onlyOnce":25,"lodash/noop":54}],22:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(t){return i&&t[i]&&t[i]()};var i="function"==typeof Symbol&&Symbol.iterator;e.exports=r.default},{}],23:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t){var e=-1,r=t.length;return function(){return++e<r?{value:t[e],key:e}:null}}function o(t){var e=-1;return function(){var r=t.next();return r.done?null:(e++,{value:r.value,key:e})}}function s(t){var e=(0,d.default)(t),r=-1,i=e.length;return function(){var n=e[++r];return r<i?{value:t[n],key:n}:null}}function a(t){if((0,l.default)(t))return n(t);var e=(0,c.default)(t);return e?o(e):s(t)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=a;var u=t("lodash/isArrayLike"),l=i(u),h=t("./getIterator"),c=i(h),f=t("lodash/keys"),d=i(f);e.exports=r.default},{"./getIterator":22,"lodash/isArrayLike":46,"lodash/keys":53}],24:[function(t,e,r){"use strict";function i(t){return function(){if(null!==t){var e=t;t=null,e.apply(this,arguments)}}}Object.defineProperty(r,"__esModule",{value:!0}),r.default=i,e.exports=r.default},{}],25:[function(t,e,r){"use strict";function i(t){return function(){if(null===t)throw new Error("Callback was already called.");var e=t;t=null,e.apply(this,arguments)}}Object.defineProperty(r,"__esModule",{value:!0}),r.default=i,e.exports=r.default},{}],26:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e,r){function i(t,e,r){if(null!=r&&"function"!=typeof r)throw new Error("task callback must be a function");return l.started=!0,(0,u.default)(t)||(t=[t]),0===t.length&&l.idle()?(0,y.default)(function(){l.drain()}):((0,s.default)(t,function(t){var i={data:t,callback:r||h.default};e?l._tasks.unshift(i):l._tasks.push(i)}),void(0,y.default)(l.process))}function n(t){return(0,f.default)(function(e){o-=1,(0,s.default)(t,function(t){(0,s.default)(a,function(e,r){if(e===t)return a.splice(r,1),!1}),t.callback.apply(t,e),null!=e[0]&&l.error(e[0],t.data)}),o<=l.concurrency-l.buffer&&l.unsaturated(),l.idle()&&l.drain(),l.process()})}if(null==e)e=1;else if(0===e)throw new Error("Concurrency must not be zero");var o=0,a=[],l={_tasks:new _.default,concurrency:e,payload:r,saturated:h.default,unsaturated:h.default,buffer:e/4,empty:h.default,drain:h.default,error:h.default,started:!1,paused:!1,push:function(t,e){i(t,!1,e)},kill:function(){l.drain=h.default,l._tasks.empty()},unshift:function(t,e){i(t,!0,e)},process:function(){for(;!l.paused&&o<l.concurrency&&l._tasks.length;){var e=[],r=[],i=l._tasks.length;l.payload&&(i=Math.min(i,l.payload));for(var s=0;s<i;s++){var u=l._tasks.shift();e.push(u),r.push(u.data)}0===l._tasks.length&&l.empty(),o+=1,a.push(e[0]),o===l.concurrency&&l.saturated();var h=(0,p.default)(n(e));t(r,h)}},length:function(){return l._tasks.length},running:function(){return o},workersList:function(){return a},idle:function(){return l._tasks.length+o===0},pause:function(){l.paused=!0},resume:function(){if(l.paused!==!1){l.paused=!1;for(var t=Math.min(l.concurrency,l._tasks.length),e=1;e<=t;e++)(0,y.default)(l.process)}}};return l}Object.defineProperty(r,"__esModule",{value:!0}),r.default=n;var o=t("lodash/_arrayEach"),s=i(o),a=t("lodash/isArray"),u=i(a),l=t("lodash/noop"),h=i(l),c=t("lodash/rest"),f=i(c),d=t("./onlyOnce"),p=i(d),v=t("./setImmediate"),y=i(v),g=t("./DoublyLinkedList"),_=i(g);e.exports=r.default},{"./DoublyLinkedList":19,"./onlyOnce":25,"./setImmediate":27,"lodash/_arrayEach":35,"lodash/isArray":45,"lodash/noop":54,"lodash/rest":55}],27:[function(t,e,r){(function(e){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t){setTimeout(t,0)}function o(t){return(0,u.default)(function(e,r){t(function(){e.apply(null,r)})})}Object.defineProperty(r,"__esModule",{value:!0}),r.hasNextTick=r.hasSetImmediate=void 0,r.fallback=n,r.wrap=o;var s,a=t("lodash/rest"),u=i(a),l=r.hasSetImmediate="function"==typeof setImmediate&&setImmediate,h=r.hasNextTick="object"==typeof e&&"function"==typeof e.nextTick;s=l?setImmediate:h?e.nextTick:n,r.default=o(s)}).call(this,t("_process"))},{_process:61,"lodash/rest":55}],28:[function(t,e,r){"use strict";function i(t){return function(e,r,i){return t(e,i)}}Object.defineProperty(r,"__esModule",{value:!0}),r.default=i,e.exports=r.default},{}],29:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(t,e){return(0,o.default)(function(e,r){t(e[0],r)},e,1)};var n=t("./internal/queue"),o=i(n);e.exports=r.default},{"./internal/queue":26}],30:[function(t,e,r){"use strict";"use restrict";function i(t){var e=32;return t&=-t,t&&e--,65535&t&&(e-=16),16711935&t&&(e-=8),252645135&t&&(e-=4),858993459&t&&(e-=2),1431655765&t&&(e-=1),e}var n=32;r.INT_BITS=n,r.INT_MAX=2147483647,r.INT_MIN=-1<<n-1,r.sign=function(t){return(t>0)-(t<0)},r.abs=function(t){var e=t>>n-1;return(t^e)-e},r.min=function(t,e){return e^(t^e)&-(t<e)},r.max=function(t,e){return t^(t^e)&-(t<e)},r.isPow2=function(t){return!(t&t-1||!t)},r.log2=function(t){var e,r;return e=(t>65535)<<4,t>>>=e,r=(t>255)<<3,t>>>=r,e|=r,r=(t>15)<<2,t>>>=r,e|=r,r=(t>3)<<1,t>>>=r,e|=r,e|t>>1},r.log10=function(t){return t>=1e9?9:t>=1e8?8:t>=1e7?7:t>=1e6?6:t>=1e5?5:t>=1e4?4:t>=1e3?3:t>=100?2:t>=10?1:0},r.popCount=function(t){return t-=t>>>1&1431655765,t=(858993459&t)+(t>>>2&858993459),16843009*(t+(t>>>4)&252645135)>>>24},r.countTrailingZeros=i,r.nextPow2=function(t){return t+=0===t,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t+1},r.prevPow2=function(t){return t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t-(t>>>1)},r.parity=function(t){return t^=t>>>16,t^=t>>>8,t^=t>>>4,t&=15,27030>>>t&1};var o=new Array(256);!function(t){for(var e=0;e<256;++e){var r=e,i=e,n=7;for(r>>>=1;r;r>>>=1)i<<=1,i|=1&r,--n;t[e]=i<<n&255}}(o),r.reverse=function(t){return o[255&t]<<24|o[t>>>8&255]<<16|o[t>>>16&255]<<8|o[t>>>24&255]},r.interleave2=function(t,e){return t&=65535,t=16711935&(t|t<<8),t=252645135&(t|t<<4),t=858993459&(t|t<<2),t=1431655765&(t|t<<1),e&=65535,e=16711935&(e|e<<8),e=252645135&(e|e<<4),e=858993459&(e|e<<2),e=1431655765&(e|e<<1),t|e<<1},r.deinterleave2=function(t,e){return t=t>>>e&1431655765,t=858993459&(t|t>>>1),t=252645135&(t|t>>>2),t=16711935&(t|t>>>4),t=65535&(t|t>>>16),t<<16>>16},r.interleave3=function(t,e,r){return t&=1023,t=4278190335&(t|t<<16),t=251719695&(t|t<<8),t=3272356035&(t|t<<4),t=1227133513&(t|t<<2),e&=1023,e=4278190335&(e|e<<16),e=251719695&(e|e<<8),e=3272356035&(e|e<<4),e=1227133513&(e|e<<2),t|=e<<1,r&=1023,r=4278190335&(r|r<<16),r=251719695&(r|r<<8),r=3272356035&(r|r<<4),r=1227133513&(r|r<<2),t|r<<2},r.deinterleave3=function(t,e){return t=t>>>e&1227133513,t=3272356035&(t|t>>>2),t=251719695&(t|t>>>4),t=4278190335&(t|t>>>8),t=1023&(t|t>>>16),t<<22>>22},r.nextCombination=function(t){var e=t|t-1;return e+1|(~e&-~e)-1>>>i(t)+1}},{}],31:[function(t,e,r){"use strict";function i(t,e,r){r=r||2;var i=e&&e.length,o=i?e[0]*r:t.length,a=n(t,0,o,r,!0),u=[];if(!a)return u;var l,h,f,d,p,v,y;if(i&&(a=c(t,e,a,r)),t.length>80*r){l=f=t[0],h=d=t[1];for(var g=r;g<o;g+=r)p=t[g],v=t[g+1],p<l&&(l=p),v<h&&(h=v),p>f&&(f=p),v>d&&(d=v);y=Math.max(f-l,d-h)}return s(a,u,r,l,h,y),u}function n(t,e,r,i,n){var o,s;if(n===P(t,e,r,i)>0)for(o=e;o<r;o+=i)s=C(o,t[o],t[o+1],s);else for(o=r-i;o>=e;o-=i)s=C(o,t[o],t[o+1],s);return s&&T(s,s.next)&&(R(s),s=s.next),s}function o(t,e){if(!t)return t;e||(e=t);var r,i=t;do if(r=!1,i.steiner||!T(i,i.next)&&0!==b(i.prev,i,i.next))i=i.next;else{if(R(i),i=e=i.prev,i===i.next)return null;r=!0}while(r||i!==e);return e}function s(t,e,r,i,n,c,f){if(t){!f&&c&&v(t,i,n,c);for(var d,p,y=t;t.prev!==t.next;)if(d=t.prev,p=t.next,c?u(t,i,n,c):a(t))e.push(d.i/r),e.push(t.i/r),e.push(p.i/r),R(t),t=p.next,y=p.next;else if(t=p,t===y){f?1===f?(t=l(t,e,r),s(t,e,r,i,n,c,2)):2===f&&h(t,e,r,i,n,c):s(o(t),e,r,i,n,c,1);break}}}function a(t){var e=t.prev,r=t,i=t.next;if(b(e,r,i)>=0)return!1;for(var n=t.next.next;n!==t.prev;){if(m(e.x,e.y,r.x,r.y,i.x,i.y,n.x,n.y)&&b(n.prev,n,n.next)>=0)return!1;n=n.next}return!0}function u(t,e,r,i){var n=t.prev,o=t,s=t.next;if(b(n,o,s)>=0)return!1;for(var a=n.x<o.x?n.x<s.x?n.x:s.x:o.x<s.x?o.x:s.x,u=n.y<o.y?n.y<s.y?n.y:s.y:o.y<s.y?o.y:s.y,l=n.x>o.x?n.x>s.x?n.x:s.x:o.x>s.x?o.x:s.x,h=n.y>o.y?n.y>s.y?n.y:s.y:o.y>s.y?o.y:s.y,c=g(a,u,e,r,i),f=g(l,h,e,r,i),d=t.nextZ;d&&d.z<=f;){if(d!==t.prev&&d!==t.next&&m(n.x,n.y,o.x,o.y,s.x,s.y,d.x,d.y)&&b(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(d=t.prevZ;d&&d.z>=c;){if(d!==t.prev&&d!==t.next&&m(n.x,n.y,o.x,o.y,s.x,s.y,d.x,d.y)&&b(d.prev,d,d.next)>=0)return!1;d=d.prevZ}return!0}function l(t,e,r){var i=t;do{var n=i.prev,o=i.next.next;!T(n,o)&&w(n,i,i.next,o)&&S(n,o)&&S(o,n)&&(e.push(n.i/r),e.push(i.i/r),e.push(o.i/r),R(i),R(i.next),i=t=o),i=i.next}while(i!==t);return i}function h(t,e,r,i,n,a){var u=t;do{for(var l=u.next.next;l!==u.prev;){if(u.i!==l.i&&x(u,l)){var h=O(u,l);return u=o(u,u.next),h=o(h,h.next),s(u,e,r,i,n,a),void s(h,e,r,i,n,a)}l=l.next}u=u.next}while(u!==t)}function c(t,e,r,i){var s,a,u,l,h,c=[];for(s=0,a=e.length;s<a;s++)u=e[s]*i,l=s<a-1?e[s+1]*i:t.length,h=n(t,u,l,i,!1),h===h.next&&(h.steiner=!0),c.push(_(h));for(c.sort(f),s=0;s<c.length;s++)d(c[s],r),r=o(r,r.next);return r}function f(t,e){return t.x-e.x}function d(t,e){if(e=p(t,e)){var r=O(e,t);o(r,r.next)}}function p(t,e){var r,i=e,n=t.x,o=t.y,s=-(1/0);do{if(o<=i.y&&o>=i.next.y){var a=i.x+(o-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(a<=n&&a>s){if(s=a,a===n){if(o===i.y)return i;if(o===i.next.y)return i.next}r=i.x<i.next.x?i:i.next}}i=i.next}while(i!==e);if(!r)return null;if(n===s)return r.prev;var u,l=r,h=r.x,c=r.y,f=1/0;for(i=r.next;i!==l;)n>=i.x&&i.x>=h&&m(o<c?n:s,o,h,c,o<c?s:n,o,i.x,i.y)&&(u=Math.abs(o-i.y)/(n-i.x),(u<f||u===f&&i.x>r.x)&&S(i,t)&&(r=i,f=u)),i=i.next;return r}function v(t,e,r,i){var n=t;do null===n.z&&(n.z=g(n.x,n.y,e,r,i)),n.prevZ=n.prev,n.nextZ=n.next,n=n.next;while(n!==t);n.prevZ.nextZ=null,n.prevZ=null,y(n)}function y(t){var e,r,i,n,o,s,a,u,l=1;do{for(r=t,t=null,o=null,s=0;r;){for(s++,i=r,a=0,e=0;e<l&&(a++,i=i.nextZ,i);e++);for(u=l;a>0||u>0&&i;)0===a?(n=i,i=i.nextZ,u--):0!==u&&i?r.z<=i.z?(n=r,r=r.nextZ,a--):(n=i,i=i.nextZ,u--):(n=r,r=r.nextZ,a--),o?o.nextZ=n:t=n,n.prevZ=o,o=n;r=i}o.nextZ=null,l*=2}while(s>1);return t}function g(t,e,r,i,n){return t=32767*(t-r)/n,e=32767*(e-i)/n,t=16711935&(t|t<<8),t=252645135&(t|t<<4),t=858993459&(t|t<<2),t=1431655765&(t|t<<1),e=16711935&(e|e<<8),e=252645135&(e|e<<4),e=858993459&(e|e<<2),e=1431655765&(e|e<<1),t|e<<1}function _(t){var e=t,r=t;do e.x<r.x&&(r=e),e=e.next;while(e!==t);return r}function m(t,e,r,i,n,o,s,a){return(n-s)*(e-a)-(t-s)*(o-a)>=0&&(t-s)*(i-a)-(r-s)*(e-a)>=0&&(r-s)*(o-a)-(n-s)*(i-a)>=0}function x(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!E(t,e)&&S(t,e)&&S(e,t)&&M(t,e)}function b(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function T(t,e){return t.x===e.x&&t.y===e.y}function w(t,e,r,i){return!!(T(t,e)&&T(r,i)||T(t,i)&&T(r,e))||b(t,e,r)>0!=b(t,e,i)>0&&b(r,i,t)>0!=b(r,i,e)>0}function E(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&w(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}function S(t,e){return b(t.prev,t,t.next)<0?b(t,e,t.next)>=0&&b(t,t.prev,e)>=0:b(t,e,t.prev)<0||b(t,t.next,e)<0}function M(t,e){var r=t,i=!1,n=(t.x+e.x)/2,o=(t.y+e.y)/2;do r.y>o!=r.next.y>o&&n<(r.next.x-r.x)*(o-r.y)/(r.next.y-r.y)+r.x&&(i=!i),r=r.next;while(r!==t);return i}function O(t,e){var r=new A(t.i,t.x,t.y),i=new A(e.i,e.x,e.y),n=t.next,o=e.prev;return t.next=e,e.prev=t,r.next=n,n.prev=r,i.next=r,r.prev=i,o.next=i,i.prev=o,i}function C(t,e,r,i){var n=new A(t,e,r);return i?(n.next=i.next,n.prev=i,i.next.prev=n,i.next=n):(n.prev=n,n.next=n),n}function R(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function A(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function P(t,e,r,i){for(var n=0,o=e,s=r-i;o<r;o+=i)n+=(t[s]-t[o])*(t[o+1]+t[s+1]),s=o;return n}e.exports=i,i.deviation=function(t,e,r,i){var n=e&&e.length,o=n?e[0]*r:t.length,s=Math.abs(P(t,0,o,r));if(n)for(var a=0,u=e.length;a<u;a++){var l=e[a]*r,h=a<u-1?e[a+1]*r:t.length;s-=Math.abs(P(t,l,h,r))}var c=0;for(a=0;a<i.length;a+=3){var f=i[a]*r,d=i[a+1]*r,p=i[a+2]*r;c+=Math.abs((t[f]-t[p])*(t[d+1]-t[f+1])-(t[f]-t[d])*(t[p+1]-t[f+1]))}return 0===s&&0===c?0:Math.abs((c-s)/s)},i.flatten=function(t){for(var e=t[0][0].length,r={vertices:[],holes:[],dimensions:e},i=0,n=0;n<t.length;n++){for(var o=0;o<t[n].length;o++)for(var s=0;s<e;s++)r.vertices.push(t[n][o][s]);n>0&&(i+=t[n-1].length,r.holes.push(i))}return r}},{}],32:[function(t,e,r){"use strict";function i(t,e,r){this.fn=t,this.context=e,this.once=r||!1}function n(){}var o=Object.prototype.hasOwnProperty,s="function"!=typeof Object.create&&"~";n.prototype._events=void 0,n.prototype.eventNames=function(){var t,e=this._events,r=[];if(!e)return r;for(t in e)o.call(e,t)&&r.push(s?t.slice(1):t);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(e)):r},n.prototype.listeners=function(t,e){var r=s?s+t:t,i=this._events&&this._events[r];if(e)return!!i;if(!i)return[];if(i.fn)return[i.fn];for(var n=0,o=i.length,a=new Array(o);n<o;n++)a[n]=i[n].fn;return a},n.prototype.emit=function(t,e,r,i,n,o){var a=s?s+t:t;if(!this._events||!this._events[a])return!1;var u,l,h=this._events[a],c=arguments.length;if("function"==typeof h.fn){switch(h.once&&this.removeListener(t,h.fn,void 0,!0),c){case 1:return h.fn.call(h.context),!0;case 2:return h.fn.call(h.context,e),!0;case 3:return h.fn.call(h.context,e,r),!0;case 4:return h.fn.call(h.context,e,r,i),!0;case 5:return h.fn.call(h.context,e,r,i,n),!0;case 6:return h.fn.call(h.context,e,r,i,n,o),!0}for(l=1,u=new Array(c-1);l<c;l++)u[l-1]=arguments[l];h.fn.apply(h.context,u)}else{var f,d=h.length;for(l=0;l<d;l++)switch(h[l].once&&this.removeListener(t,h[l].fn,void 0,!0),c){case 1:h[l].fn.call(h[l].context);break;case 2:h[l].fn.call(h[l].context,e);break;case 3:h[l].fn.call(h[l].context,e,r);break;default:if(!u)for(f=1,
u=new Array(c-1);f<c;f++)u[f-1]=arguments[f];h[l].fn.apply(h[l].context,u)}}return!0},n.prototype.on=function(t,e,r){var n=new i(e,r||this),o=s?s+t:t;return this._events||(this._events=s?{}:Object.create(null)),this._events[o]?this._events[o].fn?this._events[o]=[this._events[o],n]:this._events[o].push(n):this._events[o]=n,this},n.prototype.once=function(t,e,r){var n=new i(e,r||this,(!0)),o=s?s+t:t;return this._events||(this._events=s?{}:Object.create(null)),this._events[o]?this._events[o].fn?this._events[o]=[this._events[o],n]:this._events[o].push(n):this._events[o]=n,this},n.prototype.removeListener=function(t,e,r,i){var n=s?s+t:t;if(!this._events||!this._events[n])return this;var o=this._events[n],a=[];if(e)if(o.fn)(o.fn!==e||i&&!o.once||r&&o.context!==r)&&a.push(o);else for(var u=0,l=o.length;u<l;u++)(o[u].fn!==e||i&&!o[u].once||r&&o[u].context!==r)&&a.push(o[u]);return a.length?this._events[n]=1===a.length?a[0]:a:delete this._events[n],this},n.prototype.removeAllListeners=function(t){return this._events?(t?delete this._events[s?s+t:t]:this._events=s?{}:Object.create(null),this):this},n.prototype.off=n.prototype.removeListener,n.prototype.addListener=n.prototype.on,n.prototype.setMaxListeners=function(){return this},n.prefixed=s,"undefined"!=typeof e&&(e.exports=n)},{}],33:[function(e,r,i){!function(e){var i=/iPhone/i,n=/iPod/i,o=/iPad/i,s=/(?=.*\bAndroid\b)(?=.*\bMobile\b)/i,a=/Android/i,u=/(?=.*\bAndroid\b)(?=.*\bSD4930UR\b)/i,l=/(?=.*\bAndroid\b)(?=.*\b(?:KFOT|KFTT|KFJWI|KFJWA|KFSOWI|KFTHWI|KFTHWA|KFAPWI|KFAPWA|KFARWI|KFASWI|KFSAWI|KFSAWA)\b)/i,h=/IEMobile/i,c=/(?=.*\bWindows\b)(?=.*\bARM\b)/i,f=/BlackBerry/i,d=/BB10/i,p=/Opera Mini/i,v=/(CriOS|Chrome)(?=.*\bMobile\b)/i,y=/(?=.*\bFirefox\b)(?=.*\bMobile\b)/i,g=new RegExp("(?:Nexus 7|BNTV250|Kindle Fire|Silk|GT-P1000)","i"),_=function(t,e){return t.test(e)},m=function(t){var e=t||navigator.userAgent,r=e.split("[FBAN");if("undefined"!=typeof r[1]&&(e=r[0]),r=e.split("Twitter"),"undefined"!=typeof r[1]&&(e=r[0]),this.apple={phone:_(i,e),ipod:_(n,e),tablet:!_(i,e)&&_(o,e),device:_(i,e)||_(n,e)||_(o,e)},this.amazon={phone:_(u,e),tablet:!_(u,e)&&_(l,e),device:_(u,e)||_(l,e)},this.android={phone:_(u,e)||_(s,e),tablet:!_(u,e)&&!_(s,e)&&(_(l,e)||_(a,e)),device:_(u,e)||_(l,e)||_(s,e)||_(a,e)},this.windows={phone:_(h,e),tablet:_(c,e),device:_(h,e)||_(c,e)},this.other={blackberry:_(f,e),blackberry10:_(d,e),opera:_(p,e),firefox:_(y,e),chrome:_(v,e),device:_(f,e)||_(d,e)||_(p,e)||_(y,e)||_(v,e)},this.seven_inch=_(g,e),this.any=this.apple.device||this.android.device||this.windows.device||this.other.device||this.seven_inch,this.phone=this.apple.phone||this.android.phone||this.windows.phone,this.tablet=this.apple.tablet||this.android.tablet||this.windows.tablet,"undefined"==typeof window)return this},x=function(){var t=new m;return t.Class=m,t};"undefined"!=typeof r&&r.exports&&"undefined"==typeof window?r.exports=m:"undefined"!=typeof r&&r.exports&&"undefined"!=typeof window?r.exports=x():"function"==typeof t&&t.amd?t("isMobile",[],e.isMobile=x()):e.isMobile=x()}(this)},{}],34:[function(t,e,r){function i(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}e.exports=i},{}],35:[function(t,e,r){function i(t,e){for(var r=-1,i=t?t.length:0;++r<i&&e(t[r],r,t)!==!1;);return t}e.exports=i},{}],36:[function(t,e,r){function i(t,e){var r=s(t)||o(t)?n(t.length,String):[],i=r.length,u=!!i;for(var h in t)!e&&!l.call(t,h)||u&&("length"==h||a(h,i))||r.push(h);return r}var n=t("./_baseTimes"),o=t("./isArguments"),s=t("./isArray"),a=t("./_isIndex"),u=Object.prototype,l=u.hasOwnProperty;e.exports=i},{"./_baseTimes":39,"./_isIndex":40,"./isArguments":44,"./isArray":45}],37:[function(t,e,r){function i(t){if(!n(t))return o(t);var e=[];for(var r in Object(t))a.call(t,r)&&"constructor"!=r&&e.push(r);return e}var n=t("./_isPrototype"),o=t("./_nativeKeys"),s=Object.prototype,a=s.hasOwnProperty;e.exports=i},{"./_isPrototype":41,"./_nativeKeys":42}],38:[function(t,e,r){function i(t,e){return e=o(void 0===e?t.length-1:e,0),function(){for(var r=arguments,i=-1,s=o(r.length-e,0),a=Array(s);++i<s;)a[i]=r[e+i];i=-1;for(var u=Array(e+1);++i<e;)u[i]=r[i];return u[e]=a,n(t,this,u)}}var n=t("./_apply"),o=Math.max;e.exports=i},{"./_apply":34}],39:[function(t,e,r){function i(t,e){for(var r=-1,i=Array(t);++r<t;)i[r]=e(r);return i}e.exports=i},{}],40:[function(t,e,r){function i(t,e){return e=null==e?n:e,!!e&&("number"==typeof t||o.test(t))&&t>-1&&t%1==0&&t<e}var n=9007199254740991,o=/^(?:0|[1-9]\d*)$/;e.exports=i},{}],41:[function(t,e,r){function i(t){var e=t&&t.constructor,r="function"==typeof e&&e.prototype||n;return t===r}var n=Object.prototype;e.exports=i},{}],42:[function(t,e,r){var i=t("./_overArg"),n=i(Object.keys,Object);e.exports=n},{"./_overArg":43}],43:[function(t,e,r){function i(t,e){return function(r){return t(e(r))}}e.exports=i},{}],44:[function(t,e,r){function i(t){return n(t)&&a.call(t,"callee")&&(!l.call(t,"callee")||u.call(t)==o)}var n=t("./isArrayLikeObject"),o="[object Arguments]",s=Object.prototype,a=s.hasOwnProperty,u=s.toString,l=s.propertyIsEnumerable;e.exports=i},{"./isArrayLikeObject":47}],45:[function(t,e,r){var i=Array.isArray;e.exports=i},{}],46:[function(t,e,r){function i(t){return null!=t&&o(t.length)&&!n(t)}var n=t("./isFunction"),o=t("./isLength");e.exports=i},{"./isFunction":48,"./isLength":49}],47:[function(t,e,r){function i(t){return o(t)&&n(t)}var n=t("./isArrayLike"),o=t("./isObjectLike");e.exports=i},{"./isArrayLike":46,"./isObjectLike":51}],48:[function(t,e,r){function i(t){var e=n(t)?u.call(t):"";return e==o||e==s}var n=t("./isObject"),o="[object Function]",s="[object GeneratorFunction]",a=Object.prototype,u=a.toString;e.exports=i},{"./isObject":50}],49:[function(t,e,r){function i(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=n}var n=9007199254740991;e.exports=i},{}],50:[function(t,e,r){function i(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}e.exports=i},{}],51:[function(t,e,r){function i(t){return!!t&&"object"==typeof t}e.exports=i},{}],52:[function(t,e,r){function i(t){return"symbol"==typeof t||n(t)&&a.call(t)==o}var n=t("./isObjectLike"),o="[object Symbol]",s=Object.prototype,a=s.toString;e.exports=i},{"./isObjectLike":51}],53:[function(t,e,r){function i(t){return s(t)?n(t):o(t)}var n=t("./_arrayLikeKeys"),o=t("./_baseKeys"),s=t("./isArrayLike");e.exports=i},{"./_arrayLikeKeys":36,"./_baseKeys":37,"./isArrayLike":46}],54:[function(t,e,r){function i(){}e.exports=i},{}],55:[function(t,e,r){function i(t,e){if("function"!=typeof t)throw new TypeError(s);return e=void 0===e?e:o(e),n(t,e)}var n=t("./_baseRest"),o=t("./toInteger"),s="Expected a function";e.exports=i},{"./_baseRest":38,"./toInteger":57}],56:[function(t,e,r){function i(t){if(!t)return 0===t?t:0;if(t=n(t),t===o||t===-o){var e=t<0?-1:1;return e*s}return t===t?t:0}var n=t("./toNumber"),o=1/0,s=1.7976931348623157e308;e.exports=i},{"./toNumber":58}],57:[function(t,e,r){function i(t){var e=n(t),r=e%1;return e===e?r?e-r:e:0}var n=t("./toFinite");e.exports=i},{"./toFinite":56}],58:[function(t,e,r){function i(t){if("number"==typeof t)return t;if(o(t))return s;if(n(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=n(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(a,"");var r=l.test(t);return r||h.test(t)?c(t.slice(2),r?2:8):u.test(t)?s:+t}var n=t("./isObject"),o=t("./isSymbol"),s=NaN,a=/^\s+|\s+$/g,u=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,h=/^0o[0-7]+$/i,c=parseInt;e.exports=i},{"./isObject":50,"./isSymbol":52}],59:[function(t,e,r){"use strict";function i(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function n(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;var i=Object.getOwnPropertyNames(e).map(function(t){return e[t]});if("0123456789"!==i.join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(t){n[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(t){return!1}}var o=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable;e.exports=n()?Object.assign:function(t,e){for(var r,n,a=i(t),u=1;u<arguments.length;u++){r=Object(arguments[u]);for(var l in r)o.call(r,l)&&(a[l]=r[l]);if(Object.getOwnPropertySymbols){n=Object.getOwnPropertySymbols(r);for(var h=0;h<n.length;h++)s.call(r,n[h])&&(a[n[h]]=r[n[h]])}}return a}},{}],60:[function(t,e,r){(function(t){function e(t,e){for(var r=0,i=t.length-1;i>=0;i--){var n=t[i];"."===n?t.splice(i,1):".."===n?(t.splice(i,1),r++):r&&(t.splice(i,1),r--)}if(e)for(;r--;r)t.unshift("..");return t}function i(t,e){if(t.filter)return t.filter(e);for(var r=[],i=0;i<t.length;i++)e(t[i],i,t)&&r.push(t[i]);return r}var n=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,o=function(t){return n.exec(t).slice(1)};r.resolve=function(){for(var r="",n=!1,o=arguments.length-1;o>=-1&&!n;o--){var s=o>=0?arguments[o]:t.cwd();if("string"!=typeof s)throw new TypeError("Arguments to path.resolve must be strings");s&&(r=s+"/"+r,n="/"===s.charAt(0))}return r=e(i(r.split("/"),function(t){return!!t}),!n).join("/"),(n?"/":"")+r||"."},r.normalize=function(t){var n=r.isAbsolute(t),o="/"===s(t,-1);return t=e(i(t.split("/"),function(t){return!!t}),!n).join("/"),t||n||(t="."),t&&o&&(t+="/"),(n?"/":"")+t},r.isAbsolute=function(t){return"/"===t.charAt(0)},r.join=function(){var t=Array.prototype.slice.call(arguments,0);return r.normalize(i(t,function(t,e){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t}).join("/"))},r.relative=function(t,e){function i(t){for(var e=0;e<t.length&&""===t[e];e++);for(var r=t.length-1;r>=0&&""===t[r];r--);return e>r?[]:t.slice(e,r-e+1)}t=r.resolve(t).substr(1),e=r.resolve(e).substr(1);for(var n=i(t.split("/")),o=i(e.split("/")),s=Math.min(n.length,o.length),a=s,u=0;u<s;u++)if(n[u]!==o[u]){a=u;break}for(var l=[],u=a;u<n.length;u++)l.push("..");return l=l.concat(o.slice(a)),l.join("/")},r.sep="/",r.delimiter=":",r.dirname=function(t){var e=o(t),r=e[0],i=e[1];return r||i?(i&&(i=i.substr(0,i.length-1)),r+i):"."},r.basename=function(t,e){var r=o(t)[2];return e&&r.substr(-1*e.length)===e&&(r=r.substr(0,r.length-e.length)),r},r.extname=function(t){return o(t)[3]};var s="b"==="ab".substr(-1)?function(t,e,r){return t.substr(e,r)}:function(t,e,r){return e<0&&(e=t.length+e),t.substr(e,r)}}).call(this,t("_process"))},{_process:61}],61:[function(t,e,r){function i(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function o(t){if(c===setTimeout)return setTimeout(t,0);if((c===i||!c)&&setTimeout)return c=setTimeout,setTimeout(t,0);try{return c(t,0)}catch(e){try{return c.call(null,t,0)}catch(e){return c.call(this,t,0)}}}function s(t){if(f===clearTimeout)return clearTimeout(t);if((f===n||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(t);try{return f(t)}catch(e){try{return f.call(null,t)}catch(e){return f.call(this,t)}}}function a(){y&&p&&(y=!1,p.length?v=p.concat(v):g=-1,v.length&&u())}function u(){if(!y){var t=o(a);y=!0;for(var e=v.length;e;){for(p=v,v=[];++g<e;)p&&p[g].run();g=-1,e=v.length}p=null,y=!1,s(t)}}function l(t,e){this.fun=t,this.array=e}function h(){}var c,f,d=e.exports={};!function(){try{c="function"==typeof setTimeout?setTimeout:i}catch(t){c=i}try{f="function"==typeof clearTimeout?clearTimeout:n}catch(t){f=n}}();var p,v=[],y=!1,g=-1;d.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];v.push(new l(t,e)),1!==v.length||y||o(u)},l.prototype.run=function(){this.fun.apply(null,this.array)},d.title="browser",d.browser=!0,d.env={},d.argv=[],d.version="",d.versions={},d.on=h,d.addListener=h,d.once=h,d.off=h,d.removeListener=h,d.removeAllListeners=h,d.emit=h,d.binding=function(t){throw new Error("process.binding is not supported")},d.cwd=function(){return"/"},d.chdir=function(t){throw new Error("process.chdir is not supported")},d.umask=function(){return 0}},{}],62:[function(e,r,i){(function(e){!function(n){function o(t){throw new RangeError(L[t])}function s(t,e){for(var r=t.length,i=[];r--;)i[r]=e(t[r]);return i}function a(t,e){var r=t.split("@"),i="";r.length>1&&(i=r[0]+"@",t=r[1]),t=t.replace(I,".");var n=t.split("."),o=s(n,e).join(".");return i+o}function u(t){for(var e,r,i=[],n=0,o=t.length;n<o;)e=t.charCodeAt(n++),e>=55296&&e<=56319&&n<o?(r=t.charCodeAt(n++),56320==(64512&r)?i.push(((1023&e)<<10)+(1023&r)+65536):(i.push(e),n--)):i.push(e);return i}function l(t){return s(t,function(t){var e="";return t>65535&&(t-=65536,e+=B(t>>>10&1023|55296),t=56320|1023&t),e+=B(t)}).join("")}function h(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:w}function c(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function f(t,e,r){var i=0;for(t=r?F(t/O):t>>1,t+=F(t/e);t>k*S>>1;i+=w)t=F(t/k);return F(i+(k+1)*t/(t+M))}function d(t){var e,r,i,n,s,a,u,c,d,p,v=[],y=t.length,g=0,_=R,m=C;for(r=t.lastIndexOf(A),r<0&&(r=0),i=0;i<r;++i)t.charCodeAt(i)>=128&&o("not-basic"),v.push(t.charCodeAt(i));for(n=r>0?r+1:0;n<y;){for(s=g,a=1,u=w;n>=y&&o("invalid-input"),c=h(t.charCodeAt(n++)),(c>=w||c>F((T-g)/a))&&o("overflow"),g+=c*a,d=u<=m?E:u>=m+S?S:u-m,!(c<d);u+=w)p=w-d,a>F(T/p)&&o("overflow"),a*=p;e=v.length+1,m=f(g-s,e,0==s),F(g/e)>T-_&&o("overflow"),_+=F(g/e),g%=e,v.splice(g++,0,_)}return l(v)}function p(t){var e,r,i,n,s,a,l,h,d,p,v,y,g,_,m,x=[];for(t=u(t),y=t.length,e=R,r=0,s=C,a=0;a<y;++a)v=t[a],v<128&&x.push(B(v));for(i=n=x.length,n&&x.push(A);i<y;){for(l=T,a=0;a<y;++a)v=t[a],v>=e&&v<l&&(l=v);for(g=i+1,l-e>F((T-r)/g)&&o("overflow"),r+=(l-e)*g,e=l,a=0;a<y;++a)if(v=t[a],v<e&&++r>T&&o("overflow"),v==e){for(h=r,d=w;p=d<=s?E:d>=s+S?S:d-s,!(h<p);d+=w)m=h-p,_=w-p,x.push(B(c(p+m%_,0))),h=F(m/_);x.push(B(c(h,0))),s=f(r,g,i==n),r=0,++i}++r,++e}return x.join("")}function v(t){return a(t,function(t){return P.test(t)?d(t.slice(4).toLowerCase()):t})}function y(t){return a(t,function(t){return D.test(t)?"xn--"+p(t):t})}var g="object"==typeof i&&i&&!i.nodeType&&i,_="object"==typeof r&&r&&!r.nodeType&&r,m="object"==typeof e&&e;m.global!==m&&m.window!==m&&m.self!==m||(n=m);var x,b,T=2147483647,w=36,E=1,S=26,M=38,O=700,C=72,R=128,A="-",P=/^xn--/,D=/[^\x20-\x7E]/,I=/[\x2E\u3002\uFF0E\uFF61]/g,L={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},k=w-E,F=Math.floor,B=String.fromCharCode;if(x={version:"1.4.1",ucs2:{decode:u,encode:l},decode:d,encode:p,toASCII:y,toUnicode:v},"function"==typeof t&&"object"==typeof t.amd&&t.amd)t("punycode",function(){return x});else if(g&&_)if(r.exports==g)_.exports=x;else for(b in x)x.hasOwnProperty(b)&&(g[b]=x[b]);else n.punycode=x}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],63:[function(t,e,r){"use strict";function i(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.exports=function(t,e,r,o){e=e||"&",r=r||"=";var s={};if("string"!=typeof t||0===t.length)return s;var a=/\+/g;t=t.split(e);var u=1e3;o&&"number"==typeof o.maxKeys&&(u=o.maxKeys);var l=t.length;u>0&&l>u&&(l=u);for(var h=0;h<l;++h){var c,f,d,p,v=t[h].replace(a,"%20"),y=v.indexOf(r);y>=0?(c=v.substr(0,y),f=v.substr(y+1)):(c=v,f=""),d=decodeURIComponent(c),p=decodeURIComponent(f),i(s,d)?n(s[d])?s[d].push(p):s[d]=[s[d],p]:s[d]=p}return s};var n=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},{}],64:[function(t,e,r){"use strict";function i(t,e){if(t.map)return t.map(e);for(var r=[],i=0;i<t.length;i++)r.push(e(t[i],i));return r}var n=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};e.exports=function(t,e,r,a){return e=e||"&",r=r||"=",null===t&&(t=void 0),"object"==typeof t?i(s(t),function(s){var a=encodeURIComponent(n(s))+r;return o(t[s])?i(t[s],function(t){return a+encodeURIComponent(n(t))}).join(e):a+encodeURIComponent(n(t[s]))}).join(e):a?encodeURIComponent(n(a))+r+encodeURIComponent(n(t)):""};var o=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},s=Object.keys||function(t){var e=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.push(r);return e}},{}],65:[function(t,e,r){"use strict";r.decode=r.parse=t("./decode"),r.encode=r.stringify=t("./encode")},{"./decode":63,"./encode":64}],66:[function(t,e,r){"use strict";function i(t,e){u.call(this),e=e||l,this.baseUrl=t||"",this.progress=0,this.loading=!1,this._progressChunk=0,this._beforeMiddleware=[],this._afterMiddleware=[],this._boundLoadResource=this._loadResource.bind(this),this._buffer=[],this._numToLoad=0,this._queue=n(this._boundLoadResource,e),this.resources={}}var n=t("async/queue"),o=t("async/eachSeries"),s=t("url"),a=t("./Resource"),u=t("eventemitter3"),l=10,h=100;i.prototype=Object.create(u.prototype),i.prototype.constructor=i,e.exports=i,i.prototype.add=i.prototype.enqueue=function(t,e,r,i){if(Array.isArray(t)){for(var n=0;n<t.length;++n)this.add(t[n]);return this}if("object"==typeof t&&(i=e||t.callback||t.onComplete,r=t,e=t.url,t=t.name||t.key||t.url),"string"!=typeof e&&(i=r,r=e,e=t),"string"!=typeof e)throw new Error("No url passed to add resource to loader.");if("function"==typeof r&&(i=r,r=null),this.resources[t])throw new Error('Resource with name "'+t+'" already exists.');return e=this._prepareUrl(e),this.resources[t]=new a(t,e,r),"function"==typeof i&&this.resources[t].once("afterMiddleware",i),this._numToLoad++,this._queue.started?(this._queue.push(this.resources[t]),this._progressChunk=(h-this.progress)/(this._queue.length()+this._queue.running())):(this._buffer.push(this.resources[t]),this._progressChunk=h/this._buffer.length),this},i.prototype.before=i.prototype.pre=function(t){return this._beforeMiddleware.push(t),this},i.prototype.after=i.prototype.use=function(t){return this._afterMiddleware.push(t),this},i.prototype.reset=function(){this.progress=0,this.loading=!1,this._progressChunk=0,this._buffer.length=0,this._numToLoad=0,this._queue.kill(),this._queue.started=!1;for(var t in this.resources){var e=this.resources[t];e.off("complete",this._onLoad,this),e.isLoading&&e.abort()}return this.resources={},this},i.prototype.load=function(t){if("function"==typeof t&&this.once("complete",t),this._queue.started)return this;this.emit("start",this),this.loading=!0;for(var e=0;e<this._buffer.length;++e)this._queue.push(this._buffer[e]);return this._buffer.length=0,this},i.prototype._prepareUrl=function(t){var e=s.parse(t);return e.protocol||!e.pathname||0===e.pathname.indexOf("//")?t:this.baseUrl.length&&this.baseUrl.lastIndexOf("/")!==this.baseUrl.length-1&&"/"!==t.charAt(0)?this.baseUrl+"/"+t:this.baseUrl+t},i.prototype._loadResource=function(t,e){var r=this;t._dequeue=e,o(this._beforeMiddleware,function(e,i){e.call(r,t,function(){i(t.isComplete?{}:null)})},function(){t.isComplete?r._onLoad(t):(t.once("complete",r._onLoad,r),t.load())})},i.prototype._onComplete=function(){this.loading=!1,this.emit("complete",this,this.resources)},i.prototype._onLoad=function(t){var e=this;o(this._afterMiddleware,function(r,i){r.call(e,t,i)},function(){t.emit("afterMiddleware",t),e._numToLoad--,e.progress+=e._progressChunk,e.emit("progress",e,t),t.error?e.emit("error",t.error,e,t):e.emit("load",e,t),0===e._numToLoad&&(e.progress=100,e._onComplete())}),t._dequeue()},i.LOAD_TYPE=a.LOAD_TYPE,i.XHR_RESPONSE_TYPE=a.XHR_RESPONSE_TYPE},{"./Resource":67,"async/eachSeries":18,"async/queue":29,eventemitter3:32,url:72}],67:[function(t,e,r){"use strict";function i(t,e,r){if(s.call(this),r=r||{},"string"!=typeof t||"string"!=typeof e)throw new Error("Both name and url are required for constructing a resource.");this.name=t,this.url=e,this.isDataUrl=0===this.url.indexOf("data:"),this.data=null,this.crossOrigin=r.crossOrigin===!0?"anonymous":r.crossOrigin,this.loadType=r.loadType||this._determineLoadType(),this.xhrType=r.xhrType,this.metadata=r.metadata||{},this.error=null,this.xhr=null,this.isJson=!1,this.isXml=!1,this.isImage=!1,this.isAudio=!1,this.isVideo=!1,this.isComplete=!1,this.isLoading=!1,this._dequeue=null,this._boundComplete=this.complete.bind(this),this._boundOnError=this._onError.bind(this),this._boundOnProgress=this._onProgress.bind(this),this._boundXhrOnError=this._xhrOnError.bind(this),this._boundXhrOnAbort=this._xhrOnAbort.bind(this),this._boundXhrOnLoad=this._xhrOnLoad.bind(this),this._boundXdrOnTimeout=this._xdrOnTimeout.bind(this)}function n(t){return t.toString().replace("object ","")}function o(t,e,r){e&&0===e.indexOf(".")&&(e=e.substring(1)),e&&(t[e]=r)}var s=t("eventemitter3"),a=t("url"),u=!(!window.XDomainRequest||"withCredentials"in new XMLHttpRequest),l=null,h=0,c=200,f=204;i.prototype=Object.create(s.prototype),i.prototype.constructor=i,e.exports=i,i.prototype.complete=function(){if(this.data&&this.data.removeEventListener&&(this.data.removeEventListener("error",this._boundOnError,!1),this.data.removeEventListener("load",this._boundComplete,!1),this.data.removeEventListener("progress",this._boundOnProgress,!1),this.data.removeEventListener("canplaythrough",this._boundComplete,!1)),this.xhr&&(this.xhr.removeEventListener?(this.xhr.removeEventListener("error",this._boundXhrOnError,!1),this.xhr.removeEventListener("abort",this._boundXhrOnAbort,!1),this.xhr.removeEventListener("progress",this._boundOnProgress,!1),this.xhr.removeEventListener("load",this._boundXhrOnLoad,!1)):(this.xhr.onerror=null,this.xhr.ontimeout=null,this.xhr.onprogress=null,this.xhr.onload=null)),this.isComplete)throw new Error("Complete called again for an already completed resource.");this.isComplete=!0,this.isLoading=!1,this.emit("complete",this)},i.prototype.abort=function(t){if(!this.error){if(this.error=new Error(t),this.xhr)this.xhr.abort();else if(this.xdr)this.xdr.abort();else if(this.data)if("undefined"!=typeof this.data.src)this.data.src="";else for(;this.data.firstChild;)this.data.removeChild(this.data.firstChild);this.complete()}},i.prototype.load=function(t){if(!this.isLoading)if(this.isComplete){if(t){var e=this;setTimeout(function(){t(e)},1)}}else switch(t&&this.once("complete",t),this.isLoading=!0,this.emit("start",this),this.crossOrigin!==!1&&"string"==typeof this.crossOrigin||(this.crossOrigin=this._determineCrossOrigin(this.url)),this.loadType){case i.LOAD_TYPE.IMAGE:this._loadElement("image");break;case i.LOAD_TYPE.AUDIO:this._loadSourceElement("audio");break;case i.LOAD_TYPE.VIDEO:this._loadSourceElement("video");break;case i.LOAD_TYPE.XHR:default:u&&this.crossOrigin?this._loadXdr():this._loadXhr()}},i.prototype._loadElement=function(t){this.metadata.loadElement?this.data=this.metadata.loadElement:"image"===t&&"undefined"!=typeof window.Image?this.data=new Image:this.data=document.createElement(t),this.crossOrigin&&(this.data.crossOrigin=this.crossOrigin),this.metadata.skipSource||(this.data.src=this.url);var e="is"+t[0].toUpperCase()+t.substring(1);this[e]===!1&&(this[e]=!0),this.data.addEventListener("error",this._boundOnError,!1),this.data.addEventListener("load",this._boundComplete,!1),this.data.addEventListener("progress",this._boundOnProgress,!1)},i.prototype._loadSourceElement=function(t){if(this.metadata.loadElement?this.data=this.metadata.loadElement:"audio"===t&&"undefined"!=typeof window.Audio?this.data=new Audio:this.data=document.createElement(t),null===this.data)return void this.abort("Unsupported element "+t);if(!this.metadata.skipSource)if(navigator.isCocoonJS)this.data.src=Array.isArray(this.url)?this.url[0]:this.url;else if(Array.isArray(this.url))for(var e=0;e<this.url.length;++e)this.data.appendChild(this._createSource(t,this.url[e]));else this.data.appendChild(this._createSource(t,this.url));this["is"+t[0].toUpperCase()+t.substring(1)]=!0,this.data.addEventListener("error",this._boundOnError,!1),this.data.addEventListener("load",this._boundComplete,!1),this.data.addEventListener("progress",this._boundOnProgress,!1),this.data.addEventListener("canplaythrough",this._boundComplete,!1),this.data.load()},i.prototype._loadXhr=function(){"string"!=typeof this.xhrType&&(this.xhrType=this._determineXhrType());var t=this.xhr=new XMLHttpRequest;t.open("GET",this.url,!0),this.xhrType===i.XHR_RESPONSE_TYPE.JSON||this.xhrType===i.XHR_RESPONSE_TYPE.DOCUMENT?t.responseType=i.XHR_RESPONSE_TYPE.TEXT:t.responseType=this.xhrType,t.addEventListener("error",this._boundXhrOnError,!1),t.addEventListener("abort",this._boundXhrOnAbort,!1),t.addEventListener("progress",this._boundOnProgress,!1),t.addEventListener("load",this._boundXhrOnLoad,!1),t.send()},i.prototype._loadXdr=function(){"string"!=typeof this.xhrType&&(this.xhrType=this._determineXhrType());var t=this.xhr=new XDomainRequest;t.timeout=5e3,t.onerror=this._boundXhrOnError,t.ontimeout=this._boundXdrOnTimeout,t.onprogress=this._boundOnProgress,t.onload=this._boundXhrOnLoad,t.open("GET",this.url,!0),setTimeout(function(){t.send()},0)},i.prototype._createSource=function(t,e,r){r||(r=t+"/"+e.substr(e.lastIndexOf(".")+1));var i=document.createElement("source");return i.src=e,i.type=r,i},i.prototype._onError=function(t){this.abort("Failed to load element using "+t.target.nodeName)},i.prototype._onProgress=function(t){t&&t.lengthComputable&&this.emit("progress",this,t.loaded/t.total)},i.prototype._xhrOnError=function(){var t=this.xhr;this.abort(n(t)+" Request failed. Status: "+t.status+', text: "'+t.statusText+'"')},i.prototype._xhrOnAbort=function(){this.abort(n(this.xhr)+" Request was aborted by the user.")},i.prototype._xdrOnTimeout=function(){this.abort(n(this.xhr)+" Request timed out.")},i.prototype._xhrOnLoad=function(){var t=this.xhr,e="undefined"==typeof t.status?t.status:c;if(!(e===c||e===f||e===h&&t.responseText.length>0))return void this.abort("["+t.status+"]"+t.statusText+":"+t.responseURL);if(this.xhrType===i.XHR_RESPONSE_TYPE.TEXT)this.data=t.responseText;else if(this.xhrType===i.XHR_RESPONSE_TYPE.JSON)try{this.data=JSON.parse(t.responseText),this.isJson=!0}catch(t){return void this.abort("Error trying to parse loaded json:",t)}else if(this.xhrType===i.XHR_RESPONSE_TYPE.DOCUMENT)try{if(window.DOMParser){var r=new DOMParser;this.data=r.parseFromString(t.responseText,"text/xml")}else{var n=document.createElement("div");n.innerHTML=t.responseText,this.data=n}this.isXml=!0}catch(t){return void this.abort("Error trying to parse loaded xml:",t)}else this.data=t.response||t.responseText;this.complete()},i.prototype._determineCrossOrigin=function(t,e){if(0===t.indexOf("data:"))return"";e=e||window.location,l||(l=document.createElement("a")),l.href=t,t=a.parse(l.href);var r=!t.port&&""===e.port||t.port===e.port;return t.hostname===e.hostname&&r&&t.protocol===e.protocol?"":"anonymous"},i.prototype._determineXhrType=function(){return i._xhrTypeMap[this._getExtension()]||i.XHR_RESPONSE_TYPE.TEXT},i.prototype._determineLoadType=function(){return i._loadTypeMap[this._getExtension()]||i.LOAD_TYPE.XHR},i.prototype._getExtension=function(){var t=this.url,e="";if(this.isDataUrl){var r=t.indexOf("/");e=t.substring(r+1,t.indexOf(";",r))}else{var i=t.indexOf("?");i!==-1&&(t=t.substring(0,i)),e=t.substring(t.lastIndexOf(".")+1)}return e.toLowerCase()},i.prototype._getMimeFromXhrType=function(t){switch(t){case i.XHR_RESPONSE_TYPE.BUFFER:return"application/octet-binary";case i.XHR_RESPONSE_TYPE.BLOB:return"application/blob";case i.XHR_RESPONSE_TYPE.DOCUMENT:return"application/xml";case i.XHR_RESPONSE_TYPE.JSON:return"application/json";case i.XHR_RESPONSE_TYPE.DEFAULT:case i.XHR_RESPONSE_TYPE.TEXT:default:return"text/plain"}},i.LOAD_TYPE={XHR:1,IMAGE:2,AUDIO:3,VIDEO:4},i.XHR_RESPONSE_TYPE={DEFAULT:"text",BUFFER:"arraybuffer",BLOB:"blob",DOCUMENT:"document",JSON:"json",TEXT:"text"},i._loadTypeMap={gif:i.LOAD_TYPE.IMAGE,png:i.LOAD_TYPE.IMAGE,bmp:i.LOAD_TYPE.IMAGE,jpg:i.LOAD_TYPE.IMAGE,jpeg:i.LOAD_TYPE.IMAGE,tif:i.LOAD_TYPE.IMAGE,tiff:i.LOAD_TYPE.IMAGE,webp:i.LOAD_TYPE.IMAGE,tga:i.LOAD_TYPE.IMAGE,"svg+xml":i.LOAD_TYPE.IMAGE},i._xhrTypeMap={xhtml:i.XHR_RESPONSE_TYPE.DOCUMENT,html:i.XHR_RESPONSE_TYPE.DOCUMENT,htm:i.XHR_RESPONSE_TYPE.DOCUMENT,xml:i.XHR_RESPONSE_TYPE.DOCUMENT,tmx:i.XHR_RESPONSE_TYPE.DOCUMENT,tsx:i.XHR_RESPONSE_TYPE.DOCUMENT,svg:i.XHR_RESPONSE_TYPE.DOCUMENT,gif:i.XHR_RESPONSE_TYPE.BLOB,png:i.XHR_RESPONSE_TYPE.BLOB,bmp:i.XHR_RESPONSE_TYPE.BLOB,jpg:i.XHR_RESPONSE_TYPE.BLOB,jpeg:i.XHR_RESPONSE_TYPE.BLOB,tif:i.XHR_RESPONSE_TYPE.BLOB,tiff:i.XHR_RESPONSE_TYPE.BLOB,webp:i.XHR_RESPONSE_TYPE.BLOB,tga:i.XHR_RESPONSE_TYPE.BLOB,json:i.XHR_RESPONSE_TYPE.JSON,text:i.XHR_RESPONSE_TYPE.TEXT,txt:i.XHR_RESPONSE_TYPE.TEXT},i.setExtensionLoadType=function(t,e){o(i._loadTypeMap,t,e)},i.setExtensionXhrType=function(t,e){o(i._xhrTypeMap,t,e)}},{eventemitter3:32,url:72}],68:[function(t,e,r){"use strict";e.exports={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encodeBinary:function(t){for(var e,r="",i=new Array(4),n=0,o=0,s=0;n<t.length;){for(e=new Array(3),o=0;o<e.length;o++)n<t.length?e[o]=255&t.charCodeAt(n++):e[o]=0;switch(i[0]=e[0]>>2,i[1]=(3&e[0])<<4|e[1]>>4,i[2]=(15&e[1])<<2|e[2]>>6,i[3]=63&e[2],s=n-(t.length-1)){case 2:i[3]=64,i[2]=64;break;case 1:i[3]=64}for(o=0;o<i.length;o++)r+=this._keyStr.charAt(i[o])}return r}}},{}],69:[function(t,e,r){"use strict";e.exports=t("./Loader"),e.exports.Resource=t("./Resource"),e.exports.middleware={caching:{memory:t("./middlewares/caching/memory")},parsing:{blob:t("./middlewares/parsing/blob")}}},{"./Loader":66,"./Resource":67,"./middlewares/caching/memory":70,"./middlewares/parsing/blob":71}],70:[function(t,e,r){"use strict";var i={};e.exports=function(){return function(t,e){i[t.url]?(t.data=i[t.url],t.complete()):t.once("complete",function(){i[this.url]=this.data}),e()}}},{}],71:[function(t,e,r){"use strict";var i=t("../../Resource"),n=t("../../b64"),o=window.URL||window.webkitURL;e.exports=function(){return function(t,e){if(!t.data)return void e();if(t.xhr&&t.xhrType===i.XHR_RESPONSE_TYPE.BLOB)if(window.Blob&&"string"!=typeof t.data){if(0===t.data.type.indexOf("image")){var r=o.createObjectURL(t.data);return t.blob=t.data,t.data=new Image,t.data.src=r,t.isImage=!0,void(t.data.onload=function(){o.revokeObjectURL(r),t.data.onload=null,e()})}}else{var s=t.xhr.getResponseHeader("content-type");if(s&&0===s.indexOf("image"))return t.data=new Image,t.data.src="data:"+s+";base64,"+n.encodeBinary(t.xhr.responseText),t.isImage=!0,void(t.data.onload=function(){t.data.onload=null,e()})}e()}}},{"../../Resource":67,"../../b64":68}],72:[function(t,e,r){"use strict";function i(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function n(t,e,r){if(t&&l.isObject(t)&&t instanceof i)return t;var n=new i;return n.parse(t,e,r),n}function o(t){return l.isString(t)&&(t=n(t)),t instanceof i?t.format():i.prototype.format.call(t)}function s(t,e){return n(t,!1,!0).resolve(e)}function a(t,e){return t?n(t,!1,!0).resolveObject(e):e}var u=t("punycode"),l=t("./util");r.parse=n,r.resolve=s,r.resolveObject=a,r.format=o,r.Url=i;var h=/^([a-z0-9.+-]+:)/i,c=/:[0-9]*$/,f=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,d=["<",">",'"',"`"," ","\r","\n","\t"],p=["{","}","|","\\","^","`"].concat(d),v=["'"].concat(p),y=["%","/","?",";","#"].concat(v),g=["/","?","#"],_=255,m=/^[+a-z0-9A-Z_-]{0,63}$/,x=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,b={javascript:!0,"javascript:":!0},T={javascript:!0,"javascript:":!0},w={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},E=t("querystring");i.prototype.parse=function(t,e,r){if(!l.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var i=t.indexOf("?"),n=i!==-1&&i<t.indexOf("#")?"?":"#",o=t.split(n),s=/\\/g;
o[0]=o[0].replace(s,"/"),t=o.join(n);var a=t;if(a=a.trim(),!r&&1===t.split("#").length){var c=f.exec(a);if(c)return this.path=a,this.href=a,this.pathname=c[1],c[2]?(this.search=c[2],e?this.query=E.parse(this.search.substr(1)):this.query=this.search.substr(1)):e&&(this.search="",this.query={}),this}var d=h.exec(a);if(d){d=d[0];var p=d.toLowerCase();this.protocol=p,a=a.substr(d.length)}if(r||d||a.match(/^\/\/[^@\/]+@[^@\/]+/)){var S="//"===a.substr(0,2);!S||d&&T[d]||(a=a.substr(2),this.slashes=!0)}if(!T[d]&&(S||d&&!w[d])){for(var M=-1,O=0;O<g.length;O++){var C=a.indexOf(g[O]);C!==-1&&(M===-1||C<M)&&(M=C)}var R,A;A=M===-1?a.lastIndexOf("@"):a.lastIndexOf("@",M),A!==-1&&(R=a.slice(0,A),a=a.slice(A+1),this.auth=decodeURIComponent(R)),M=-1;for(var O=0;O<y.length;O++){var C=a.indexOf(y[O]);C!==-1&&(M===-1||C<M)&&(M=C)}M===-1&&(M=a.length),this.host=a.slice(0,M),a=a.slice(M),this.parseHost(),this.hostname=this.hostname||"";var P="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!P)for(var D=this.hostname.split(/\./),O=0,I=D.length;O<I;O++){var L=D[O];if(L&&!L.match(m)){for(var k="",F=0,B=L.length;F<B;F++)k+=L.charCodeAt(F)>127?"x":L[F];if(!k.match(m)){var N=D.slice(0,O),j=D.slice(O+1),U=L.match(x);U&&(N.push(U[1]),j.unshift(U[2])),j.length&&(a="/"+j.join(".")+a),this.hostname=N.join(".");break}}}this.hostname.length>_?this.hostname="":this.hostname=this.hostname.toLowerCase(),P||(this.hostname=u.toASCII(this.hostname));var W=this.port?":"+this.port:"",G=this.hostname||"";this.host=G+W,this.href+=this.host,P&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==a[0]&&(a="/"+a))}if(!b[p])for(var O=0,I=v.length;O<I;O++){var X=v[O];if(a.indexOf(X)!==-1){var H=encodeURIComponent(X);H===X&&(H=escape(X)),a=a.split(X).join(H)}}var z=a.indexOf("#");z!==-1&&(this.hash=a.substr(z),a=a.slice(0,z));var V=a.indexOf("?");if(V!==-1?(this.search=a.substr(V),this.query=a.substr(V+1),e&&(this.query=E.parse(this.query)),a=a.slice(0,V)):e&&(this.search="",this.query={}),a&&(this.pathname=a),w[p]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var W=this.pathname||"",Y=this.search||"";this.path=W+Y}return this.href=this.format(),this},i.prototype.format=function(){var t=this.auth||"";t&&(t=encodeURIComponent(t),t=t.replace(/%3A/i,":"),t+="@");var e=this.protocol||"",r=this.pathname||"",i=this.hash||"",n=!1,o="";this.host?n=t+this.host:this.hostname&&(n=t+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(n+=":"+this.port)),this.query&&l.isObject(this.query)&&Object.keys(this.query).length&&(o=E.stringify(this.query));var s=this.search||o&&"?"+o||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||w[e])&&n!==!1?(n="//"+(n||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):n||(n=""),i&&"#"!==i.charAt(0)&&(i="#"+i),s&&"?"!==s.charAt(0)&&(s="?"+s),r=r.replace(/[?#]/g,function(t){return encodeURIComponent(t)}),s=s.replace("#","%23"),e+n+r+s+i},i.prototype.resolve=function(t){return this.resolveObject(n(t,!1,!0)).format()},i.prototype.resolveObject=function(t){if(l.isString(t)){var e=new i;e.parse(t,!1,!0),t=e}for(var r=new i,n=Object.keys(this),o=0;o<n.length;o++){var s=n[o];r[s]=this[s]}if(r.hash=t.hash,""===t.href)return r.href=r.format(),r;if(t.slashes&&!t.protocol){for(var a=Object.keys(t),u=0;u<a.length;u++){var h=a[u];"protocol"!==h&&(r[h]=t[h])}return w[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(t.protocol&&t.protocol!==r.protocol){if(!w[t.protocol]){for(var c=Object.keys(t),f=0;f<c.length;f++){var d=c[f];r[d]=t[d]}return r.href=r.format(),r}if(r.protocol=t.protocol,t.host||T[t.protocol])r.pathname=t.pathname;else{for(var p=(t.pathname||"").split("/");p.length&&!(t.host=p.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==p[0]&&p.unshift(""),p.length<2&&p.unshift(""),r.pathname=p.join("/")}if(r.search=t.search,r.query=t.query,r.host=t.host||"",r.auth=t.auth,r.hostname=t.hostname||t.host,r.port=t.port,r.pathname||r.search){var v=r.pathname||"",y=r.search||"";r.path=v+y}return r.slashes=r.slashes||t.slashes,r.href=r.format(),r}var g=r.pathname&&"/"===r.pathname.charAt(0),_=t.host||t.pathname&&"/"===t.pathname.charAt(0),m=_||g||r.host&&t.pathname,x=m,b=r.pathname&&r.pathname.split("/")||[],p=t.pathname&&t.pathname.split("/")||[],E=r.protocol&&!w[r.protocol];if(E&&(r.hostname="",r.port=null,r.host&&(""===b[0]?b[0]=r.host:b.unshift(r.host)),r.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===p[0]?p[0]=t.host:p.unshift(t.host)),t.host=null),m=m&&(""===p[0]||""===b[0])),_)r.host=t.host||""===t.host?t.host:r.host,r.hostname=t.hostname||""===t.hostname?t.hostname:r.hostname,r.search=t.search,r.query=t.query,b=p;else if(p.length)b||(b=[]),b.pop(),b=b.concat(p),r.search=t.search,r.query=t.query;else if(!l.isNullOrUndefined(t.search)){if(E){r.hostname=r.host=b.shift();var S=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@");S&&(r.auth=S.shift(),r.host=r.hostname=S.shift())}return r.search=t.search,r.query=t.query,l.isNull(r.pathname)&&l.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!b.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var M=b.slice(-1)[0],O=(r.host||t.host||b.length>1)&&("."===M||".."===M)||""===M,C=0,R=b.length;R>=0;R--)M=b[R],"."===M?b.splice(R,1):".."===M?(b.splice(R,1),C++):C&&(b.splice(R,1),C--);if(!m&&!x)for(;C--;C)b.unshift("..");!m||""===b[0]||b[0]&&"/"===b[0].charAt(0)||b.unshift(""),O&&"/"!==b.join("/").substr(-1)&&b.push("");var A=""===b[0]||b[0]&&"/"===b[0].charAt(0);if(E){r.hostname=r.host=A?"":b.length?b.shift():"";var S=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@");S&&(r.auth=S.shift(),r.host=r.hostname=S.shift())}return m=m||r.host&&b.length,m&&!A&&b.unshift(""),b.length?r.pathname=b.join("/"):(r.pathname=null,r.path=null),l.isNull(r.pathname)&&l.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},i.prototype.parseHost=function(){var t=this.host,e=c.exec(t);e&&(e=e[0],":"!==e&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},{"./util":73,punycode:62,querystring:65}],73:[function(t,e,r){"use strict";e.exports={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"==typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},{}],74:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}r.__esModule=!0;var o=t("../core"),s=i(o),a=t("ismobilejs"),u=i(a),l=t("./accessibleTarget"),h=i(l);Object.assign(s.default.DisplayObject.prototype,h.default);var c=function(){function t(e){n(this,t),!u.default.tablet&&!u.default.phone||navigator.isCocoonJS||this.createTouchHook();var r=document.createElement("div");r.style.width="100px",r.style.height="100px",r.style.position="absolute",r.style.top=0,r.style.left=0,r.style.zIndex=2,this.div=r,this.pool=[],this.renderId=0,this.debug=!1,this.renderer=e,this.children=[],this._onKeyDown=this._onKeyDown.bind(this),this._onMouseMove=this._onMouseMove.bind(this),this.isActive=!1,this.isMobileAccessabillity=!1,window.addEventListener("keydown",this._onKeyDown,!1)}return t.prototype.createTouchHook=function(){var t=this,e=document.createElement("button");e.style.width="1px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.left="-1000px",e.style.zIndex=2,e.style.backgroundColor="#FF0000",e.title="HOOK DIV",e.addEventListener("focus",function(){t.isMobileAccessabillity=!0,t.activate(),document.body.removeChild(e)}),document.body.appendChild(e)},t.prototype.activate=function(){this.isActive||(this.isActive=!0,window.document.addEventListener("mousemove",this._onMouseMove,!0),window.removeEventListener("keydown",this._onKeyDown,!1),this.renderer.on("postrender",this.update,this),this.renderer.view.parentNode&&this.renderer.view.parentNode.appendChild(this.div))},t.prototype.deactivate=function(){this.isActive&&!this.isMobileAccessabillity&&(this.isActive=!1,window.document.removeEventListener("mousemove",this._onMouseMove),window.addEventListener("keydown",this._onKeyDown,!1),this.renderer.off("postrender",this.update),this.div.parentNode&&this.div.parentNode.removeChild(this.div))},t.prototype.updateAccessibleObjects=function(t){if(t.visible){t.accessible&&t.interactive&&(t._accessibleActive||this.addChild(t),t.renderId=this.renderId);for(var e=t.children,r=e.length-1;r>=0;r--)this.updateAccessibleObjects(e[r])}},t.prototype.update=function(){if(this.renderer.renderingToScreen){this.updateAccessibleObjects(this.renderer._lastObjectRendered);var t=this.renderer.view.getBoundingClientRect(),e=t.width/this.renderer.width,r=t.height/this.renderer.height,i=this.div;i.style.left=t.left+"px",i.style.top=t.top+"px",i.style.width=this.renderer.width+"px",i.style.height=this.renderer.height+"px";for(var n=0;n<this.children.length;n++){var o=this.children[n];if(o.renderId!==this.renderId)o._accessibleActive=!1,s.default.utils.removeItems(this.children,n,1),this.div.removeChild(o._accessibleDiv),this.pool.push(o._accessibleDiv),o._accessibleDiv=null,n--,0===this.children.length&&this.deactivate();else{i=o._accessibleDiv;var a=o.hitArea,u=o.worldTransform;o.hitArea?(i.style.left=(u.tx+a.x*u.a)*e+"px",i.style.top=(u.ty+a.y*u.d)*r+"px",i.style.width=a.width*u.a*e+"px",i.style.height=a.height*u.d*r+"px"):(a=o.getBounds(),this.capHitArea(a),i.style.left=a.x*e+"px",i.style.top=a.y*r+"px",i.style.width=a.width*e+"px",i.style.height=a.height*r+"px")}}this.renderId++}},t.prototype.capHitArea=function(t){t.x<0&&(t.width+=t.x,t.x=0),t.y<0&&(t.height+=t.y,t.y=0),t.x+t.width>this.renderer.width&&(t.width=this.renderer.width-t.x),t.y+t.height>this.renderer.height&&(t.height=this.renderer.height-t.y)},t.prototype.addChild=function(t){var e=this.pool.pop();e||(e=document.createElement("button"),e.style.width="100px",e.style.height="100px",e.style.backgroundColor=this.debug?"rgba(255,0,0,0.5)":"transparent",e.style.position="absolute",e.style.zIndex=2,e.style.borderStyle="none",e.addEventListener("click",this._onClick.bind(this)),e.addEventListener("focus",this._onFocus.bind(this)),e.addEventListener("focusout",this._onFocusOut.bind(this))),t.accessibleTitle?e.title=t.accessibleTitle:t.accessibleTitle||t.accessibleHint||(e.title="displayObject "+this.tabIndex),t.accessibleHint&&e.setAttribute("aria-label",t.accessibleHint),t._accessibleActive=!0,t._accessibleDiv=e,e.displayObject=t,this.children.push(t),this.div.appendChild(t._accessibleDiv),t._accessibleDiv.tabIndex=t.tabIndex},t.prototype._onClick=function(t){var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"click",e.eventData)},t.prototype._onFocus=function(t){var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"mouseover",e.eventData)},t.prototype._onFocusOut=function(t){var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"mouseout",e.eventData)},t.prototype._onKeyDown=function(t){9===t.keyCode&&this.activate()},t.prototype._onMouseMove=function(){this.deactivate()},t.prototype.destroy=function(){this.div=null;for(var t=0;t<this.children.length;t++)this.children[t].div=null;window.document.removeEventListener("mousemove",this._onMouseMove),window.removeEventListener("keydown",this._onKeyDown),this.pool=null,this.children=null,this.renderer=null},t}();s.default.WebGLRenderer.registerPlugin("accessibility",c),s.default.CanvasRenderer.registerPlugin("accessibility",c),r.default=c},{"../core":97,"./accessibleTarget":75,ismobilejs:33}],75:[function(t,e,r){"use strict";r.__esModule=!0;var i={accessible:!1,accessibleTitle:null,accessibleHint:null,tabIndex:0,_accessibleActive:!1,_accessibleDiv:!1};r.default=i},{}],76:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0;var n=t("./accessibleTarget"),o=i(n),s=t("./AccessibilityManager"),a=i(s);r.default={accessibleTarget:o.default,AccessibilityManager:a.default}},{"./AccessibilityManager":74,"./accessibleTarget":75}],77:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t){if(t instanceof Array){if("precision"!==t[0].substring(0,9)){var e=t.slice(0);return e.unshift("precision "+h.default.PRECISION.DEFAULT+" float;"),e}}else if("precision"!==t.substring(0,9))return"precision "+h.default.PRECISION.DEFAULT+" float;\n"+t;return t}r.__esModule=!0;var u=t("pixi-gl-core"),l=t("./const"),h=i(l),c=function(t){function e(r,i,s){return n(this,e),o(this,t.call(this,r,a(i),a(s)))}return s(e,t),e}(u.GLShader);r.default=c},{"./const":78,"pixi-gl-core":7}],78:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0;var n=t("./utils/maxRecommendedTextures"),o=i(n),s={VERSION:"4.0.2",PI_2:2*Math.PI,RAD_TO_DEG:180/Math.PI,DEG_TO_RAD:Math.PI/180,TARGET_FPMS:.06,RENDERER_TYPE:{UNKNOWN:0,WEBGL:1,CANVAS:2},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},DRAW_MODES:{POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},SCALE_MODES:{DEFAULT:0,LINEAR:0,NEAREST:1},WRAP_MODES:{DEFAULT:0,CLAMP:0,REPEAT:1,MIRRORED_REPEAT:2},GC_MODES:{DEFAULT:0,AUTO:0,MANUAL:1},MIPMAP_TEXTURES:!0,RETINA_PREFIX:/@(.+)x/,RESOLUTION:1,FILTER_RESOLUTION:1,DEFAULT_RENDER_OPTIONS:{view:null,resolution:1,antialias:!1,forceFXAA:!1,autoResize:!1,transparent:!1,backgroundColor:0,clearBeforeRender:!0,preserveDrawingBuffer:!1,roundPixels:!1},SHAPES:{POLY:0,RECT:1,CIRC:2,ELIP:3,RREC:4},PRECISION:{DEFAULT:"mediump",LOW:"lowp",MEDIUM:"mediump",HIGH:"highp"},TRANSFORM_MODE:{DEFAULT:0,STATIC:0,DYNAMIC:1},TEXT_GRADIENT:{LINEAR_VERTICAL:0,LINEAR_HORIZONTAL:1},SPRITE_BATCH_SIZE:4096,SPRITE_MAX_TEXTURES:(0,o.default)(32)};r.default=s},{"./utils/maxRecommendedTextures":152}],79:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}r.__esModule=!0;var o=t("../math"),s=i(o),a=s.default.Rectangle,u=function(){function t(){n(this,t),this.minX=1/0,this.minY=1/0,this.maxX=-(1/0),this.maxY=-(1/0),this.rect=null}return t.prototype.isEmpty=function(){return this.minX>this.maxX||this.minY>this.maxY},t.prototype.clear=function(){this.updateID++,this.minX=1/0,this.minY=1/0,this.maxX=-(1/0),this.maxY=-(1/0)},t.prototype.getRectangle=function(t){return this.minX>this.maxX||this.minY>this.maxY?a.EMPTY:(t=t||new a(0,0,1,1),t.x=this.minX,t.y=this.minY,t.width=this.maxX-this.minX,t.height=this.maxY-this.minY,t)},t.prototype.addPoint=function(t){this.minX=Math.min(this.minX,t.x),this.maxX=Math.max(this.maxX,t.x),this.minY=Math.min(this.minY,t.y),this.maxY=Math.max(this.maxY,t.y)},t.prototype.addQuad=function(t){var e=this.minX,r=this.minY,i=this.maxX,n=this.maxY,o=t[0],s=t[1];e=o<e?o:e,r=s<r?s:r,i=o>i?o:i,n=s>n?s:n,o=t[2],s=t[3],e=o<e?o:e,r=s<r?s:r,i=o>i?o:i,n=s>n?s:n,o=t[4],s=t[5],e=o<e?o:e,r=s<r?s:r,i=o>i?o:i,n=s>n?s:n,o=t[6],s=t[7],e=o<e?o:e,r=s<r?s:r,i=o>i?o:i,n=s>n?s:n,this.minX=e,this.minY=r,this.maxX=i,this.maxY=n},t.prototype.addFrame=function(t,e,r,i,n){var o=t.worldTransform,s=o.a,a=o.b,u=o.c,l=o.d,h=o.tx,c=o.ty,f=this.minX,d=this.minY,p=this.maxX,v=this.maxY,y=s*e+u*r+h,g=a*e+l*r+c;f=y<f?y:f,d=g<d?g:d,p=y>p?y:p,v=g>v?g:v,y=s*i+u*r+h,g=a*i+l*r+c,f=y<f?y:f,d=g<d?g:d,p=y>p?y:p,v=g>v?g:v,y=s*e+u*n+h,g=a*e+l*n+c,f=y<f?y:f,d=g<d?g:d,p=y>p?y:p,v=g>v?g:v,y=s*i+u*n+h,g=a*i+l*n+c,f=y<f?y:f,d=g<d?g:d,p=y>p?y:p,v=g>v?g:v,this.minX=f,this.minY=d,this.maxX=p,this.maxY=v},t.prototype.addVertices=function(t,e,r,i){for(var n=t.worldTransform,o=n.a,s=n.b,a=n.c,u=n.d,l=n.tx,h=n.ty,c=this.minX,f=this.minY,d=this.maxX,p=this.maxY,v=r;v<i;v+=2){var y=e[v],g=e[v+1],_=o*y+a*g+l,m=u*g+s*y+h;c=_<c?_:c,f=m<f?m:f,d=_>d?_:d,p=m>p?m:p}this.minX=c,this.minY=f,this.maxX=d,this.maxY=p},t.prototype.addBounds=function(t){var e=this.minX,r=this.minY,i=this.maxX,n=this.maxY;this.minX=t.minX<e?t.minX:e,this.minY=t.minY<r?t.minY:r,this.maxX=t.maxX>i?t.maxX:i,this.maxY=t.maxY>n?t.maxY:n},t}();r.default=u},{"../math":102}],80:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}r.__esModule=!0;var a=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),u=t("../utils"),l=i(u),h=t("./DisplayObject"),c=i(h),f=function(t){function e(){n(this,e);var r=o(this,t.call(this));return r.children=[],r}return s(e,t),e.prototype.onChildrenChange=function(){},e.prototype.addChild=function(t){var e=arguments.length;if(e>1)for(var r=0;r<e;r++)this.addChild(arguments[r]);else t.parent&&t.parent.removeChild(t),t.parent=this,this.transform._parentID=-1,this.children.push(t),this.onChildrenChange(this.children.length-1),t.emit("added",this);return t},e.prototype.addChildAt=function(t,e){if(e>=0&&e<=this.children.length)return t.parent&&t.parent.removeChild(t),t.parent=this,this.children.splice(e,0,t),this.onChildrenChange(e),t.emit("added",this),t;throw new Error(t+"addChildAt: The index "+e+" supplied is out of bounds "+this.children.length)},e.prototype.swapChildren=function(t,e){if(t!==e){var r=this.getChildIndex(t),i=this.getChildIndex(e);if(r<0||i<0)throw new Error("swapChildren: Both the supplied DisplayObjects must be children of the caller.");this.children[r]=e,this.children[i]=t,this.onChildrenChange(r<i?r:i)}},e.prototype.getChildIndex=function(t){var e=this.children.indexOf(t);if(e===-1)throw new Error("The supplied DisplayObject must be a child of the caller");return e},e.prototype.setChildIndex=function(t,e){if(e<0||e>=this.children.length)throw new Error("The supplied index is out of bounds");var r=this.getChildIndex(t);l.default.removeItems(this.children,r,1),this.children.splice(e,0,t),this.onChildrenChange(e)},e.prototype.getChildAt=function(t){if(t<0||t>=this.children.length)throw new Error("getChildAt: Supplied index "+t+" does not exist in the child list, or the supplied DisplayObject is not a child of the caller");return this.children[t]},e.prototype.removeChild=function(t){var e=arguments.length;if(e>1)for(var r=0;r<e;r++)this.removeChild(arguments[r]);else{var i=this.children.indexOf(t);if(i===-1)return;t.parent=null,l.default.removeItems(this.children,i,1),this.onChildrenChange(i),t.emit("removed",this)}return t},e.prototype.removeChildAt=function(t){var e=this.getChildAt(t);return e.parent=null,l.default.removeItems(this.children,t,1),this.onChildrenChange(t),e.emit("removed",this),e},e.prototype.removeChildren=function(){var t=arguments.length<=0||void 0===arguments[0]?0:arguments[0],e=arguments[1],r=t,i="number"==typeof e?e:this.children.length,n=i-r,o=void 0;if(n>0&&n<=i){o=this.children.splice(r,n);for(var s=0;s<o.length;++s)o[s].parent=null;this.onChildrenChange(t);for(var a=0;a<o.length;++a)o[a].emit("removed",this);return o}if(0===n&&0===this.children.length)return[];throw new RangeError("removeChildren: numeric values are outside the acceptable range.")},e.prototype.updateTransform=function(){if(this._boundsID++,this.visible){this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(var t=0,e=this.children.length;t<e;++t)this.children[t].updateTransform()}},e.prototype.calculateBounds=function(){if(this._bounds.clear(),this.visible){this._calculateBounds();for(var t=0;t<this.children.length;t++){var e=this.children[t];e.calculateBounds(),this._bounds.addBounds(e._bounds)}this._boundsID=this._lastBoundsID}},e.prototype._calculateBounds=function(){},e.prototype.renderWebGL=function(t){if(this.visible&&!(this.worldAlpha<=0)&&this.renderable)if(this._mask||this._filters)this.renderAdvancedWebGL(t);else{this._renderWebGL(t);for(var e=0,r=this.children.length;e<r;++e)this.children[e].renderWebGL(t)}},e.prototype.renderAdvancedWebGL=function(t){t.currentRenderer.flush();var e=this._filters,r=this._mask;if(e){this._enabledFilters||(this._enabledFilters=[]),this._enabledFilters.length=0;for(var i=0;i<e.length;i++)e[i].enabled&&this._enabledFilters.push(e[i]);this._enabledFilters.length&&t.filterManager.pushFilter(this,this._enabledFilters)}r&&t.maskManager.pushMask(this,this._mask),t.currentRenderer.start(),this._renderWebGL(t);for(var n=0,o=this.children.length;n<o;n++)this.children[n].renderWebGL(t);t.currentRenderer.flush(),r&&t.maskManager.popMask(this,this._mask),e&&this._enabledFilters&&this._enabledFilters.length&&t.filterManager.popFilter(),t.currentRenderer.start()},e.prototype._renderWebGL=function(t){},e.prototype._renderCanvas=function(t){},e.prototype.renderCanvas=function(t){if(this.visible&&!(this.alpha<=0)&&this.renderable){this._mask&&t.maskManager.pushMask(this._mask),this._renderCanvas(t);for(var e=0,r=this.children.length;e<r;++e)this.children[e].renderCanvas(t);this._mask&&t.maskManager.popMask(t)}},e.prototype.destroy=function(e){t.prototype.destroy.call(this);var r="boolean"==typeof e?e:e&&e.children,i=this.children;if(this.children=null,r)for(var n=i.length-1;n>=0;n--){var o=i[n];o.parent=null,o.destroy(e)}},a(e,[{key:"width",get:function(){return this.scale.x*this.getLocalBounds().width},set:function(t){var e=this.getLocalBounds().width;0!==e?this.scale.x=t/e:this.scale.x=1,this._width=t}},{key:"height",get:function(){return this.scale.y*this.getLocalBounds().height},set:function(t){var e=this.getLocalBounds().height;0!==e?this.scale.y=t/e:this.scale.y=1,this._height=t}}]),e}(c.default);f.prototype.containerUpdateTransform=f.prototype.updateTransform,r.default=f},{"../utils":151,"./DisplayObject":81}],81:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}r.__esModule=!0;var a=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),u=t("eventemitter3"),l=i(u),h=t("../const"),c=i(h),f=t("./TransformStatic"),d=i(f),p=t("./Transform"),v=i(p),y=t("./Bounds"),g=i(y),_=t("../math"),m=i(_),x=function(t){function e(){n(this,e);var r=o(this,t.call(this)),i=c.default.TRANSFORM_MODE.DEFAULT===c.default.TRANSFORM_MODE.STATIC?d.default:v.default;return r.tempDisplayObjectParent=null,r.transform=new i,r.alpha=1,r.visible=!0,r.renderable=!0,r.parent=null,r.worldAlpha=1,r.filterArea=null,r._filters=null,r._enabledFilters=null,r._bounds=new g.default,r._boundsID=0,r._lastBoundsID=-1,r._boundsRect=null,r._localBoundsRect=null,r._mask=null,r}return s(e,t),e.prototype.updateTransform=function(){this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha,this._bounds.updateID++},e.prototype._recursivePostUpdateTransform=function(){this.parent?(this.parent._recursivePostUpdateTransform(),this.transform.updateTransform(this.parent.transform)):this.transform.updateTransform(this._tempDisplayObjectParent.transform)},e.prototype.getBounds=function(t,e){return t||(this.parent?(this._recursivePostUpdateTransform(),this.updateTransform()):(this.parent=this._tempDisplayObjectParent,this.parent.transform._worldID++,this.updateTransform(),this.parent=null)),this._boundsID!==this._lastBoundsID&&this.calculateBounds(),e||(this._boundsRect||(this._boundsRect=new m.default.Rectangle),e=this._boundsRect),this._bounds.getRectangle(e)},e.prototype.getLocalBounds=function(t){var e=this.transform,r=this.parent;this.parent=null,this.transform=this._tempDisplayObjectParent.transform,t||(this._localBoundsRect||(this._localBoundsRect=new m.default.Rectangle),t=this._localBoundsRect);var i=this.getBounds(!1,t);return this.parent=r,this.transform=e,i},e.prototype.toGlobal=function(t,e){var r=!(arguments.length<=2||void 0===arguments[2])&&arguments[2];return r||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.apply(t,e)},e.prototype.toLocal=function(t,e,r,i){return e&&(t=e.toGlobal(t,r,i)),i||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.applyInverse(t,r)},e.prototype.renderWebGL=function(t){},e.prototype.renderCanvas=function(t){},e.prototype.setParent=function(t){if(!t||!t.addChild)throw new Error("setParent: Argument must be a Container");return t.addChild(this),t},e.prototype.setTransform=function(){var t=arguments.length<=0||void 0===arguments[0]?0:arguments[0],e=arguments.length<=1||void 0===arguments[1]?0:arguments[1],r=arguments.length<=2||void 0===arguments[2]?1:arguments[2],i=arguments.length<=3||void 0===arguments[3]?1:arguments[3],n=arguments.length<=4||void 0===arguments[4]?0:arguments[4],o=arguments.length<=5||void 0===arguments[5]?0:arguments[5],s=arguments.length<=6||void 0===arguments[6]?0:arguments[6],a=arguments.length<=7||void 0===arguments[7]?0:arguments[7],u=arguments.length<=8||void 0===arguments[8]?0:arguments[8];return this.position.x=t,this.position.y=e,this.scale.x=r?r:1,this.scale.y=i?i:1,this.rotation=n,this.skew.x=o,this.skew.y=s,this.pivot.x=a,this.pivot.y=u,this},e.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},a(e,[{key:"_tempDisplayObjectParent",get:function(){return null===this.tempDisplayObjectParent&&(this.tempDisplayObjectParent=new e),this.tempDisplayObjectParent}},{key:"x",get:function(){return this.position.x},set:function(t){this.transform.position.x=t}},{key:"y",get:function(){return this.position.y},set:function(t){this.transform.position.y=t}},{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(t){this.transform.position.copy(t)}},{key:"scale",get:function(){return this.transform.scale},set:function(t){this.transform.scale.copy(t)}},{key:"pivot",get:function(){return this.transform.pivot},set:function(t){this.transform.pivot.copy(t)}},{key:"skew",get:function(){return this.transform.skew},set:function(t){this.transform.skew.copy(t)}},{key:"rotation",get:function(){return this.transform.rotation},set:function(t){this.transform.rotation=t}},{key:"worldVisible",get:function(){var t=this;do{if(!t.visible)return!1;t=t.parent}while(t);return!0}},{key:"mask",get:function(){return this._mask},set:function(t){this._mask&&(this._mask.renderable=!0),this._mask=t,this._mask&&(this._mask.renderable=!1)}},{key:"filters",get:function(){return this._filters&&this._filters.slice()},set:function(t){this._filters=t&&t.slice()}}]),e}(l.default);x.prototype.displayObjectUpdateTransform=x.prototype.updateTransform,r.default=x},{"../const":78,"../math":102,"./Bounds":79,"./Transform":82,"./TransformStatic":84,eventemitter3:32}],82:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}r.__esModule=!0;var a=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),u=t("../math"),l=i(u),h=t("./TransformBase"),c=i(h),f=function(t){function e(){n(this,e);var r=o(this,t.call(this));return r.position=new l.default.Point(0,0),r.scale=new l.default.Point(1,1),r.skew=new l.default.ObservablePoint(r.updateSkew,r,0,0),r.pivot=new l.default.Point(0,0),r._rotation=0,r._sr=Math.sin(0),r._cr=Math.cos(0),r._cy=Math.cos(0),r._sy=Math.sin(0),r._nsx=Math.sin(0),r._cx=Math.cos(0),r}return s(e,t),e.prototype.updateSkew=function(){this._cy=Math.cos(this.skew.y),this._sy=Math.sin(this.skew.y),this._nsx=Math.sin(this.skew.x),this._cx=Math.cos(this.skew.x)},e.prototype.updateLocalTransform=function(){var t=this.localTransform,e=void 0,r=void 0,i=void 0,n=void 0;e=this._cr*this.scale.x,r=this._sr*this.scale.x,i=-this._sr*this.scale.y,n=this._cr*this.scale.y,t.a=this._cy*e+this._sy*i,t.b=this._cy*r+this._sy*n,t.c=this._nsx*e+this._cx*i,t.d=this._nsx*r+this._cx*n},e.prototype.updateTransform=function(t){var e=t.worldTransform,r=this.worldTransform,i=this.localTransform,n=void 0,o=void 0,s=void 0,a=void 0;n=this._cr*this.scale.x,o=this._sr*this.scale.x,s=-this._sr*this.scale.y,a=this._cr*this.scale.y,i.a=this._cy*n+this._sy*s,i.b=this._cy*o+this._sy*a,i.c=this._nsx*n+this._cx*s,i.d=this._nsx*o+this._cx*a,i.tx=this.position.x-(this.pivot.x*i.a+this.pivot.y*i.c),i.ty=this.position.y-(this.pivot.x*i.b+this.pivot.y*i.d),r.a=i.a*e.a+i.b*e.c,r.b=i.a*e.b+i.b*e.d,r.c=i.c*e.a+i.d*e.c,r.d=i.c*e.b+i.d*e.d,r.tx=i.tx*e.a+i.ty*e.c+e.tx,r.ty=i.tx*e.b+i.ty*e.d+e.ty,this._worldID++},e.prototype.setFromMatrix=function(t){t.decompose(this)},a(e,[{key:"rotation",get:function(){return this._rotation},set:function(t){this._rotation=t,this._sr=Math.sin(t),this._cr=Math.cos(t)}}]),e}(c.default);r.default=f},{"../math":102,"./TransformBase":83}],83:[function(t,e,r){"use strict";function i(t){
return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}r.__esModule=!0;var o=t("../math"),s=i(o),a=function(){function t(){n(this,t),this.worldTransform=new s.default.Matrix,this.localTransform=new s.default.Matrix,this._worldID=0}return t.prototype.updateLocalTransform=function(){},t.prototype.updateTransform=function(t){var e=t.worldTransform,r=this.worldTransform,i=this.localTransform;r.a=i.a*e.a+i.b*e.c,r.b=i.a*e.b+i.b*e.d,r.c=i.c*e.a+i.d*e.c,r.d=i.c*e.b+i.d*e.d,r.tx=i.tx*e.a+i.ty*e.c+e.tx,r.ty=i.tx*e.b+i.ty*e.d+e.ty,this._worldID++},t}();a.prototype.updateWorldTransform=a.prototype.updateTransform,a.IDENTITY=new a,r.default=a},{"../math":102}],84:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}r.__esModule=!0;var a=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),u=t("../math"),l=i(u),h=t("./TransformBase"),c=i(h),f=function(t){function e(){n(this,e);var r=o(this,t.call(this));return r.position=new l.default.ObservablePoint(r.onChange,r,0,0),r.scale=new l.default.ObservablePoint(r.onChange,r,1,1),r.pivot=new l.default.ObservablePoint(r.onChange,r,0,0),r.skew=new l.default.ObservablePoint(r.updateSkew,r,0,0),r._rotation=0,r._sr=Math.sin(0),r._cr=Math.cos(0),r._cy=Math.cos(0),r._sy=Math.sin(0),r._nsx=Math.sin(0),r._cx=Math.cos(0),r._localID=0,r._currentLocalID=0,r}return s(e,t),e.prototype.onChange=function(){this._localID++},e.prototype.updateSkew=function(){this._cy=Math.cos(this.skew._y),this._sy=Math.sin(this.skew._y),this._nsx=Math.sin(this.skew._x),this._cx=Math.cos(this.skew._x),this._localID++},e.prototype.updateLocalTransform=function(){var t=this.localTransform;if(this._localID!==this._currentLocalID){var e=void 0,r=void 0,i=void 0,n=void 0;e=this._cr*this.scale._x,r=this._sr*this.scale._x,i=-this._sr*this.scale._y,n=this._cr*this.scale._y,t.a=this._cy*e+this._sy*i,t.b=this._cy*r+this._sy*n,t.c=this._nsx*e+this._cx*i,t.d=this._nsx*r+this._cx*n,t.tx=this.position._x-(this.pivot._x*t.a+this.pivot._y*t.c),t.ty=this.position._y-(this.pivot._x*t.b+this.pivot._y*t.d),this._currentLocalID=this._localID,this._parentID=-1}},e.prototype.updateTransform=function(t){var e=t.worldTransform,r=this.worldTransform,i=this.localTransform;if(this._localID!==this._currentLocalID){var n=void 0,o=void 0,s=void 0,a=void 0;n=this._cr*this.scale._x,o=this._sr*this.scale._x,s=-this._sr*this.scale._y,a=this._cr*this.scale._y,i.a=this._cy*n+this._sy*s,i.b=this._cy*o+this._sy*a,i.c=this._nsx*n+this._cx*s,i.d=this._nsx*o+this._cx*a,i.tx=this.position._x-(this.pivot._x*i.a+this.pivot._y*i.c),i.ty=this.position._y-(this.pivot._x*i.b+this.pivot._y*i.d),this._currentLocalID=this._localID,this._parentID=-1}this._parentID!==t._worldID&&(r.a=i.a*e.a+i.b*e.c,r.b=i.a*e.b+i.b*e.d,r.c=i.c*e.a+i.d*e.c,r.d=i.c*e.b+i.d*e.d,r.tx=i.tx*e.a+i.ty*e.c+e.tx,r.ty=i.tx*e.b+i.ty*e.d+e.ty,this._parentID=t._worldID,this._worldID++)},e.prototype.setFromMatrix=function(t){t.decompose(this),this._localID++},a(e,[{key:"rotation",get:function(){return this._rotation},set:function(t){this._rotation=t,this._sr=Math.sin(t),this._cr=Math.cos(t),this._localID++}}]),e}(c.default);r.default=f},{"../math":102,"./TransformBase":83}],85:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}r.__esModule=!0;var a=t("../display/Container"),u=i(a),l=t("../textures/RenderTexture"),h=i(l),c=t("../textures/Texture"),f=i(c),d=t("./GraphicsData"),p=i(d),v=t("../sprites/Sprite"),y=i(v),g=t("../math"),_=i(g),m=t("../const"),x=i(m),b=t("../utils"),T=i(b),w=t("../display/Bounds"),E=i(w),S=t("./utils/bezierCurveTo"),M=i(S),O=t("../renderers/canvas/CanvasRenderer"),C=i(O),R=void 0,A=new _.default.Matrix,P=new _.default.Point,D=new Float32Array(4),I=new Float32Array(4),L=function(t){function e(){n(this,e);var r=o(this,t.call(this));return r.fillAlpha=1,r.lineWidth=0,r.lineColor=0,r.graphicsData=[],r.tint=16777215,r._prevTint=16777215,r.blendMode=x.default.BLEND_MODES.NORMAL,r.currentPath=null,r._webGL={},r.isMask=!1,r.boundsPadding=0,r._localBounds=new E.default,r.dirty=0,r.fastRectDirty=-1,r.clearDirty=0,r.boundsDirty=-1,r.cachedSpriteDirty=!1,r._spriteRect=null,r._fastRect=!1,r}return s(e,t),e.prototype.clone=function t(){var t=new e;t.renderable=this.renderable,t.fillAlpha=this.fillAlpha,t.lineWidth=this.lineWidth,t.lineColor=this.lineColor,t.tint=this.tint,t.blendMode=this.blendMode,t.isMask=this.isMask,t.boundsPadding=this.boundsPadding,t.dirty=0,t.cachedSpriteDirty=this.cachedSpriteDirty;for(var r=0;r<this.graphicsData.length;++r)t.graphicsData.push(this.graphicsData[r].clone());return t.currentPath=t.graphicsData[t.graphicsData.length-1],t.updateLocalBounds(),t},e.prototype.lineStyle=function(t,e,r){if(this.lineWidth=t||0,this.lineColor=e||0,this.lineAlpha=void 0===r?1:r,this.currentPath)if(this.currentPath.shape.points.length){var i=new _.default.Polygon(this.currentPath.shape.points.slice(-2));i.closed=!1,this.drawShape(i)}else this.currentPath.lineWidth=this.lineWidth,this.currentPath.lineColor=this.lineColor,this.currentPath.lineAlpha=this.lineAlpha;return this},e.prototype.moveTo=function(t,e){var r=new _.default.Polygon([t,e]);return r.closed=!1,this.drawShape(r),this},e.prototype.lineTo=function(t,e){return this.currentPath.shape.points.push(t,e),this.dirty++,this},e.prototype.quadraticCurveTo=function(t,e,r,i){this.currentPath?0===this.currentPath.shape.points.length&&(this.currentPath.shape.points=[0,0]):this.moveTo(0,0);var n=20,o=this.currentPath.shape.points,s=void 0,a=void 0;0===o.length&&this.moveTo(0,0);for(var u=o[o.length-2],l=o[o.length-1],h=0,c=1;c<=n;++c)h=c/n,s=u+(t-u)*h,a=l+(e-l)*h,o.push(s+(t+(r-t)*h-s)*h,a+(e+(i-e)*h-a)*h);return this.dirty++,this},e.prototype.bezierCurveTo=function(t,e,r,i,n,o){this.currentPath?0===this.currentPath.shape.points.length&&(this.currentPath.shape.points=[0,0]):this.moveTo(0,0);var s=this.currentPath.shape.points,a=s[s.length-2],u=s[s.length-1];return s.length-=2,(0,M.default)(a,u,t,e,r,i,n,o,s),this.dirty++,this},e.prototype.arcTo=function(t,e,r,i,n){this.currentPath?0===this.currentPath.shape.points.length&&this.currentPath.shape.points.push(t,e):this.moveTo(t,e);var o=this.currentPath.shape.points,s=o[o.length-2],a=o[o.length-1],u=a-e,l=s-t,h=i-e,c=r-t,f=Math.abs(u*c-l*h);if(f<1e-8||0===n)o[o.length-2]===t&&o[o.length-1]===e||o.push(t,e);else{var d=u*u+l*l,p=h*h+c*c,v=u*h+l*c,y=n*Math.sqrt(d)/f,g=n*Math.sqrt(p)/f,_=y*v/d,m=g*v/p,x=y*c+g*l,b=y*h+g*u,T=l*(g+_),w=u*(g+_),E=c*(y+m),S=h*(y+m),M=Math.atan2(w-b,T-x),O=Math.atan2(S-b,E-x);this.arc(x+t,b+e,n,M,O,l*h>c*u)}return this.dirty++,this},e.prototype.arc=function(t,e,r,i,n){var o=!(arguments.length<=5||void 0===arguments[5])&&arguments[5];if(i===n)return this;!o&&n<=i?n+=2*Math.PI:o&&i<=n&&(i+=2*Math.PI);var s=o?(i-n)*-1:n-i,a=40*Math.ceil(Math.abs(s)/(2*Math.PI));if(0===s)return this;var u=t+Math.cos(i)*r,l=e+Math.sin(i)*r;this.currentPath?this.currentPath.shape.points.push(u,l):this.moveTo(u,l);for(var h=this.currentPath.shape.points,c=s/(2*a),f=2*c,d=Math.cos(c),p=Math.sin(c),v=a-1,y=v%1/v,g=0;g<=v;g++){var _=g+y*g,m=c+i+f*_,x=Math.cos(m),b=-Math.sin(m);h.push((d*x+p*b)*r+t,(d*-b+p*x)*r+e)}return this.dirty++,this},e.prototype.beginFill=function(){var t=arguments.length<=0||void 0===arguments[0]?0:arguments[0],e=arguments.length<=1||void 0===arguments[1]?1:arguments[1];return this.filling=!0,this.fillColor=t,this.fillAlpha=e,this.currentPath&&this.currentPath.shape.points.length<=2&&(this.currentPath.fill=this.filling,this.currentPath.fillColor=this.fillColor,this.currentPath.fillAlpha=this.fillAlpha),this},e.prototype.endFill=function(){return this.filling=!1,this.fillColor=null,this.fillAlpha=1,this},e.prototype.drawRect=function(t,e,r,i){return this.drawShape(new _.default.Rectangle(t,e,r,i)),this},e.prototype.drawRoundedRect=function(t,e,r,i,n){return this.drawShape(new _.default.RoundedRectangle(t,e,r,i,n)),this},e.prototype.drawCircle=function(t,e,r){return this.drawShape(new _.default.Circle(t,e,r)),this},e.prototype.drawEllipse=function(t,e,r,i){return this.drawShape(new _.default.Ellipse(t,e,r,i)),this},e.prototype.drawPolygon=function(t){var e=t,r=!0;if(e instanceof _.default.Polygon&&(r=e.closed,e=e.points),!Array.isArray(e)){e=new Array(arguments.length);for(var i=0;i<e.length;++i)e[i]=arguments[i]}var n=new _.default.Polygon(e);return n.closed=r,this.drawShape(n),this},e.prototype.clear=function(){return this.lineWidth=0,this.filling=!1,this.dirty++,this.clearDirty++,this.graphicsData=[],this},e.prototype.isFastRect=function(){return 1===this.graphicsData.length&&this.graphicsData[0].shape.type===x.default.SHAPES.RECT&&!this.graphicsData[0].lineWidth},e.prototype._renderWebGL=function(t){this.dirty!==this.fastRectDirty&&(this.fastRectDirty=this.dirty,this._fastRect=this.isFastRect()),this._fastRect?this._renderSpriteRect(t):(t.setObjectRenderer(t.plugins.graphics),t.plugins.graphics.render(this))},e.prototype._renderSpriteRect=function(t){var r=this.graphicsData[0].shape;if(!this._spriteRect){if(!e._SPRITE_TEXTURE){e._SPRITE_TEXTURE=h.default.create(10,10);var i=document.createElement("canvas");i.width=10,i.height=10;var n=i.getContext("2d");n.fillStyle="white",n.fillRect(0,0,10,10),e._SPRITE_TEXTURE=f.default.fromCanvas(i)}this._spriteRect=new y.default(e._SPRITE_TEXTURE)}if(16777215===this.tint)this._spriteRect.tint=this.graphicsData[0].fillColor;else{var o=D,s=I;T.default.hex2rgb(this.graphicsData[0].fillColor,o),T.default.hex2rgb(this.tint,s),o[0]*=s[0],o[1]*=s[1],o[2]*=s[2],this._spriteRect.tint=T.default.rgb2hex(o)}this._spriteRect.alpha=this.graphicsData[0].fillAlpha,this._spriteRect.worldAlpha=this.worldAlpha*this._spriteRect.alpha,e._SPRITE_TEXTURE._frame.width=r.width,e._SPRITE_TEXTURE._frame.height=r.height,this._spriteRect.transform.worldTransform=this.transform.worldTransform,this._spriteRect.anchor.set(-r.x/r.width,-r.y/r.height),this._spriteRect.onAnchorUpdate(),this._spriteRect._renderWebGL(t)},e.prototype._renderCanvas=function(t){this.isMask!==!0&&t.plugins.graphics.render(this)},e.prototype._calculateBounds=function(){if(this.renderable){this.boundsDirty!==this.dirty&&(this.boundsDirty=this.dirty,this.updateLocalBounds(),this.dirty++,this.cachedSpriteDirty=!0);var t=this._localBounds;this._bounds.addFrame(this.transform,t.minX,t.minY,t.maxX,t.maxY)}},e.prototype.containsPoint=function(t){this.worldTransform.applyInverse(t,P);for(var e=this.graphicsData,r=0;r<e.length;r++){var i=e[r];if(i.fill&&i.shape&&i.shape.contains(P.x,P.y))return!0}return!1},e.prototype.updateLocalBounds=function(){var t=1/0,e=-(1/0),r=1/0,i=-(1/0);if(this.graphicsData.length)for(var n=void 0,o=void 0,s=void 0,a=void 0,u=void 0,l=void 0,h=0;h<this.graphicsData.length;h++){var c=this.graphicsData[h],f=c.type,d=c.lineWidth;if(n=c.shape,f===x.default.SHAPES.RECT||f===x.default.SHAPES.RREC)s=n.x-d/2,a=n.y-d/2,u=n.width+d,l=n.height+d,t=s<t?s:t,e=s+u>e?s+u:e,r=a<r?a:r,i=a+l>i?a+l:i;else if(f===x.default.SHAPES.CIRC)s=n.x,a=n.y,u=n.radius+d/2,l=n.radius+d/2,t=s-u<t?s-u:t,e=s+u>e?s+u:e,r=a-l<r?a-l:r,i=a+l>i?a+l:i;else if(f===x.default.SHAPES.ELIP)s=n.x,a=n.y,u=n.width+d/2,l=n.height+d/2,t=s-u<t?s-u:t,e=s+u>e?s+u:e,r=a-l<r?a-l:r,i=a+l>i?a+l:i;else{o=n.points;for(var p=0;p<o.length;p+=2)s=o[p],a=o[p+1],t=s-d<t?s-d:t,e=s+d>e?s+d:e,r=a-d<r?a-d:r,i=a+d>i?a+d:i}}else t=0,e=0,r=0,i=0;var v=this.boundsPadding;this._localBounds.minX=t-v,this._localBounds.maxX=e+2*v,this._localBounds.minY=r-v,this._localBounds.maxY=i+2*v},e.prototype.drawShape=function(t){this.currentPath&&this.currentPath.shape.points.length<=2&&this.graphicsData.pop(),this.currentPath=null;var e=new p.default(this.lineWidth,this.lineColor,this.lineAlpha,this.fillColor,this.fillAlpha,this.filling,t);return this.graphicsData.push(e),e.type===x.default.SHAPES.POLY&&(e.shape.closed=e.shape.closed||this.filling,this.currentPath=e),this.dirty++,e},e.prototype.generateCanvasTexture=function(t,e){e=e||1;var r=this.getLocalBounds(),i=new h.default.create(r.width*e,r.height*e);R||(R=new C.default),A.tx=-r.x,A.ty=-r.y,R.render(this,i,!1,A);var n=f.default.fromCanvas(i.baseTexture._canvasRenderTarget.canvas,t);return n.baseTexture.resolution=e,n},e.prototype.closePath=function(){var t=this.currentPath;return t&&t.shape&&t.shape.close(),this},e.prototype.addHole=function(){var t=this.graphicsData.pop();return this.currentPath=this.graphicsData[this.graphicsData.length-1],this.currentPath.addHole(t.shape),this.currentPath=null,this},e.prototype.destroy=function(){t.prototype.destroy.call(this,arguments);for(var e=0;e<this.graphicsData.length;++e)this.graphicsData[e].destroy();for(var r in this._webgl)for(var i=0;i<this._webgl[r].data.length;++i)this._webgl[r].data[i].destroy();this._spriteRect&&this._spriteRect.destroy(),this.graphicsData=null,this.currentPath=null,this._webgl=null,this._localBounds=null},e}(u.default);L._SPRITE_TEXTURE=null,r.default=L},{"../const":78,"../display/Bounds":79,"../display/Container":80,"../math":102,"../renderers/canvas/CanvasRenderer":109,"../sprites/Sprite":133,"../textures/RenderTexture":143,"../textures/Texture":144,"../utils":151,"./GraphicsData":86,"./utils/bezierCurveTo":88}],86:[function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}r.__esModule=!0;var n=function(){function t(e,r,n,o,s,a,u){i(this,t),this.lineWidth=e,this.lineColor=r,this.lineAlpha=n,this._lineTint=r,this.fillColor=o,this.fillAlpha=s,this._fillTint=o,this.fill=a,this.holes=[],this.shape=u,this.type=u.type}return t.prototype.clone=function(){return new t(this.lineWidth,this.lineColor,this.lineAlpha,this.fillColor,this.fillAlpha,this.fill,this.shape)},t.prototype.addHole=function(t){this.holes.push(t)},t.prototype.destroy=function(){this.shape=null,this.holes=null},t}();r.default=n},{}],87:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}r.__esModule=!0;var o=t("../../renderers/canvas/CanvasRenderer"),s=i(o),a=t("../../const"),u=i(a),l=function(){function t(e){n(this,t),this.renderer=e}return t.prototype.render=function(t){var e=this.renderer,r=e.context,i=t.worldAlpha,n=t.transform.worldTransform,o=e.resolution;this._prevTint!==this.tint&&(this.dirty=!0),r.setTransform(n.a*o,n.b*o,n.c*o,n.d*o,n.tx*o,n.ty*o),t.dirty&&(this.updateGraphicsTint(t),t.dirty=!1),e.setBlendMode(t.blendMode);for(var s=0;s<t.graphicsData.length;s++){var a=t.graphicsData[s],l=a.shape,h=a._fillTint,c=a._lineTint;if(r.lineWidth=a.lineWidth,a.type===u.default.SHAPES.POLY){r.beginPath(),this.renderPolygon(l.points,l.closed,r);for(var f=0;f<a.holes.length;f++){var d=a.holes[f];this.renderPolygon(d.points,!0,r)}a.fill&&(r.globalAlpha=a.fillAlpha*i,r.fillStyle="#"+("00000"+(0|h).toString(16)).substr(-6),r.fill()),a.lineWidth&&(r.globalAlpha=a.lineAlpha*i,r.strokeStyle="#"+("00000"+(0|c).toString(16)).substr(-6),r.stroke())}else if(a.type===u.default.SHAPES.RECT)(a.fillColor||0===a.fillColor)&&(r.globalAlpha=a.fillAlpha*i,r.fillStyle="#"+("00000"+(0|h).toString(16)).substr(-6),r.fillRect(l.x,l.y,l.width,l.height)),a.lineWidth&&(r.globalAlpha=a.lineAlpha*i,r.strokeStyle="#"+("00000"+(0|c).toString(16)).substr(-6),r.strokeRect(l.x,l.y,l.width,l.height));else if(a.type===u.default.SHAPES.CIRC)r.beginPath(),r.arc(l.x,l.y,l.radius,0,2*Math.PI),r.closePath(),a.fill&&(r.globalAlpha=a.fillAlpha*i,r.fillStyle="#"+("00000"+(0|h).toString(16)).substr(-6),r.fill()),a.lineWidth&&(r.globalAlpha=a.lineAlpha*i,r.strokeStyle="#"+("00000"+(0|c).toString(16)).substr(-6),r.stroke());else if(a.type===u.default.SHAPES.ELIP){var p=2*l.width,v=2*l.height,y=l.x-p/2,g=l.y-v/2;r.beginPath();var _=.5522848,m=p/2*_,x=v/2*_,b=y+p,T=g+v,w=y+p/2,E=g+v/2;r.moveTo(y,E),r.bezierCurveTo(y,E-x,w-m,g,w,g),r.bezierCurveTo(w+m,g,b,E-x,b,E),r.bezierCurveTo(b,E+x,w+m,T,w,T),r.bezierCurveTo(w-m,T,y,E+x,y,E),r.closePath(),a.fill&&(r.globalAlpha=a.fillAlpha*i,r.fillStyle="#"+("00000"+(0|h).toString(16)).substr(-6),r.fill()),a.lineWidth&&(r.globalAlpha=a.lineAlpha*i,r.strokeStyle="#"+("00000"+(0|c).toString(16)).substr(-6),r.stroke())}else if(a.type===u.default.SHAPES.RREC){var S=l.x,M=l.y,O=l.width,C=l.height,R=l.radius,A=Math.min(O,C)/2|0;R=R>A?A:R,r.beginPath(),r.moveTo(S,M+R),r.lineTo(S,M+C-R),r.quadraticCurveTo(S,M+C,S+R,M+C),r.lineTo(S+O-R,M+C),r.quadraticCurveTo(S+O,M+C,S+O,M+C-R),r.lineTo(S+O,M+R),r.quadraticCurveTo(S+O,M,S+O-R,M),r.lineTo(S+R,M),r.quadraticCurveTo(S,M,S,M+R),r.closePath(),(a.fillColor||0===a.fillColor)&&(r.globalAlpha=a.fillAlpha*i,r.fillStyle="#"+("00000"+(0|h).toString(16)).substr(-6),r.fill()),a.lineWidth&&(r.globalAlpha=a.lineAlpha*i,r.strokeStyle="#"+("00000"+(0|c).toString(16)).substr(-6),r.stroke())}}},t.prototype.updateGraphicsTint=function(t){t._prevTint=t.tint;for(var e=(t.tint>>16&255)/255,r=(t.tint>>8&255)/255,i=(255&t.tint)/255,n=0;n<t.graphicsData.length;n++){var o=t.graphicsData[n],s=0|o.fillColor,a=0|o.lineColor;o._fillTint=((s>>16&255)/255*e*255<<16)+((s>>8&255)/255*r*255<<8)+(255&s)/255*i*255,o._lineTint=((a>>16&255)/255*e*255<<16)+((a>>8&255)/255*r*255<<8)+(255&a)/255*i*255}},t.prototype.renderPolygon=function(t,e,r){r.moveTo(t[0],t[1]);for(var i=1;i<t.length/2;i++)r.lineTo(t[2*i],t[2*i+1]);e&&r.closePath()},t.prototype.destroy=function(){this.renderer=null},t}();s.default.registerPlugin("graphics",l),r.default=l},{"../../const":78,"../../renderers/canvas/CanvasRenderer":109}],88:[function(t,e,r){"use strict";r.__esModule=!0;var i=function(t,e,r,i,n,o,s,a){var u=arguments.length<=8||void 0===arguments[8]?[]:arguments[8],l=20,h=void 0,c=void 0,f=void 0,d=void 0,p=void 0;u.push(t,e);for(var v=1,y=0;v<=l;++v)y=v/l,h=1-y,c=h*h,f=c*h,d=y*y,p=d*y,u.push(f*t+3*c*y*r+3*h*d*n+p*s,f*e+3*c*y*i+3*h*d*o+p*a);return u};r.default=i},{}],89:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}r.__esModule=!0;var a=t("../../utils"),u=i(a),l=t("../../const"),h=i(l),c=t("../../renderers/webgl/utils/ObjectRenderer"),f=i(c),d=t("../../renderers/webgl/WebGLRenderer"),p=i(d),v=t("./WebGLGraphicsData"),y=i(v),g=t("./shaders/PrimitiveShader"),_=i(g),m=t("./utils/buildPoly"),x=i(m),b=t("./utils/buildRectangle"),T=i(b),w=t("./utils/buildRoundedRectangle"),E=i(w),S=t("./utils/buildCircle"),M=i(S),O=function(t){function e(r){n(this,e);var i=o(this,t.call(this,r));return i.graphicsDataPool=[],i.primitiveShader=null,i.gl=r.gl,i.CONTEXT_UID=0,i}return s(e,t),e.prototype.onContextChange=function(){this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.primitiveShader=new _.default(this.gl)},e.prototype.destroy=function(){f.default.prototype.destroy.call(this);for(var t=0;t<this.graphicsDataPool.length;++t)this.graphicsDataPool[t].destroy();this.graphicsDataPool=null},e.prototype.render=function(t){var e=this.renderer,r=e.gl,i=void 0,n=t._webGL[this.CONTEXT_UID];n&&t.dirty===n.dirty||(this.updateGraphics(t),n=t._webGL[this.CONTEXT_UID]);var o=this.primitiveShader;e.bindShader(o),e.state.setBlendMode(t.blendMode);for(var s=0,a=n.data.length;s<a;s++){i=n.data[s];var l=i.shader;e.bindShader(l),l.uniforms.translationMatrix=t.transform.worldTransform.toArray(!0),l.uniforms.tint=u.default.hex2rgb(t.tint),l.uniforms.alpha=t.worldAlpha,i.vao.bind().draw(r.TRIANGLE_STRIP,i.indices.length).unbind()}},e.prototype.updateGraphics=function(t){var e=this.renderer.gl,r=t._webGL[this.CONTEXT_UID];if(r||(r=t._webGL[this.CONTEXT_UID]={lastIndex:0,data:[],gl:e,clearDirty:-1,dirty:-1}),r.dirty=t.dirty,t.clearDirty!==r.clearDirty){r.clearDirty=t.clearDirty;for(var i=0;i<r.data.length;i++){var n=r.data[i];this.graphicsDataPool.push(n)}r.data=[],r.lastIndex=0}for(var o=void 0,s=r.lastIndex;s<t.graphicsData.length;s++){var a=t.graphicsData[s];o=this.getWebGLData(r,0),a.type===h.default.SHAPES.POLY&&(0,x.default)(a,o),a.type===h.default.SHAPES.RECT?(0,T.default)(a,o):a.type===h.default.SHAPES.CIRC||a.type===h.default.SHAPES.ELIP?(0,M.default)(a,o):a.type===h.default.SHAPES.RREC&&(0,E.default)(a,o),r.lastIndex++}for(var u=0;u<r.data.length;u++)o=r.data[u],o.dirty&&o.upload()},e.prototype.getWebGLData=function(t,e){var r=t.data[t.data.length-1];return(!r||r.points.length>32e4)&&(r=this.graphicsDataPool.pop()||new y.default(this.renderer.gl,this.primitiveShader,this.renderer.state.attribsState),r.reset(e),t.data.push(r)),r.dirty=!0,r},e}(f.default);p.default.registerPlugin("graphics",O),r.default=O},{"../../const":78,"../../renderers/webgl/WebGLRenderer":116,"../../renderers/webgl/utils/ObjectRenderer":126,"../../utils":151,"./WebGLGraphicsData":90,"./shaders/PrimitiveShader":91,"./utils/buildCircle":92,"./utils/buildPoly":94,"./utils/buildRectangle":95,"./utils/buildRoundedRectangle":96}],90:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}r.__esModule=!0;var o=t("pixi-gl-core"),s=i(o),a=function(){function t(e,r,i){n(this,t),this.gl=e,this.color=[0,0,0],this.points=[],this.indices=[],this.buffer=s.default.GLBuffer.createVertexBuffer(e),this.indexBuffer=s.default.GLBuffer.createIndexBuffer(e),this.dirty=!0,this.glPoints=null,this.glIndices=null,this.shader=r,this.vao=new s.default.VertexArrayObject(e,i).addIndex(this.indexBuffer).addAttribute(this.buffer,r.attributes.aVertexPosition,e.FLOAT,!1,24,0).addAttribute(this.buffer,r.attributes.aColor,e.FLOAT,!1,24,8)}return t.prototype.reset=function(){this.points.length=0,this.indices.length=0},t.prototype.upload=function(){this.glPoints=new Float32Array(this.points),this.buffer.upload(this.glPoints),this.glIndices=new Uint16Array(this.indices),this.indexBuffer.upload(this.glIndices),this.dirty=!1},t.prototype.destroy=function(){this.color=null,this.points=null,this.indices=null,this.vao.destroy(),this.buffer.destroy(),this.indexBuffer.destroy(),this.gl=null,this.buffer=null,this.indexBuffer=null,this.glPoints=null,this.glIndices=null},t}();r.default=a},{"pixi-gl-core":7}],91:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}r.__esModule=!0;var a=t("../../../Shader"),u=i(a),l=function(t){function e(r){return n(this,e),o(this,t.call(this,r,["attribute vec2 aVertexPosition;","attribute vec4 aColor;","uniform mat3 translationMatrix;","uniform mat3 projectionMatrix;","uniform float alpha;","uniform vec3 tint;","varying vec4 vColor;","void main(void){","   gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);","   vColor = aColor * vec4(tint * alpha, alpha);","}"].join("\n"),["varying vec4 vColor;","void main(void){","   gl_FragColor = vColor;","}"].join("\n")))}return s(e,t),e}(u.default);r.default=l},{"../../../Shader":77}],92:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0;var n=t("./buildLine"),o=i(n),s=t("../../../const"),a=i(s),u=t("../../../utils"),l=i(u),h=function(t,e){var r=t.shape,i=r.x,n=r.y,s=void 0,u=void 0;t.type===a.default.SHAPES.CIRC?(s=r.radius,u=r.radius):(s=r.width,u=r.height);var h=Math.floor(30*Math.sqrt(r.radius))||Math.floor(15*Math.sqrt(r.width+r.height)),c=2*Math.PI/h;if(t.fill){var f=l.default.hex2rgb(t.fillColor),d=t.fillAlpha,p=f[0]*d,v=f[1]*d,y=f[2]*d,g=e.points,_=e.indices,m=g.length/6;_.push(m);for(var x=0;x<h+1;x++)g.push(i,n,p,v,y,d),g.push(i+Math.sin(c*x)*s,n+Math.cos(c*x)*u,p,v,y,d),_.push(m++,m++);_.push(m-1)}if(t.lineWidth){var b=t.points;t.points=[];for(var T=0;T<h+1;T++)t.points.push(i+Math.sin(c*T)*s,n+Math.cos(c*T)*u);(0,o.default)(t,e),t.points=b}};r.default=h},{"../../../const":78,"../../../utils":151,"./buildLine":93}],93:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0;var n=t("../../../math"),o=i(n),s=t("../../../utils"),a=i(s),u=function(t,e){var r=t.points;if(0!==r.length){var i=new o.default.Point(r[0],r[1]),n=new o.default.Point(r[r.length-2],r[r.length-1]);if(i.x===n.x&&i.y===n.y){r=r.slice(),r.pop(),r.pop(),n=new o.default.Point(r[r.length-2],r[r.length-1]);var s=n.x+.5*(i.x-n.x),u=n.y+.5*(i.y-n.y);r.unshift(s,u),r.push(s,u)}var l=e.points,h=e.indices,c=r.length/2,f=r.length,d=l.length/6,p=t.lineWidth/2,v=a.default.hex2rgb(t.lineColor),y=t.lineAlpha,g=v[0]*y,_=v[1]*y,m=v[2]*y,x=void 0,b=void 0,T=void 0,w=void 0,E=void 0,S=void 0,M=void 0,O=void 0,C=void 0,R=void 0,A=void 0,P=void 0,D=void 0,I=void 0,L=void 0,k=void 0,F=void 0,B=void 0,N=void 0,j=void 0,U=void 0,W=void 0,G=void 0;T=r[0],w=r[1],E=r[2],S=r[3],C=-(w-S),R=T-E,G=Math.sqrt(C*C+R*R),C/=G,R/=G,C*=p,R*=p,l.push(T-C,w-R,g,_,m,y),l.push(T+C,w+R,g,_,m,y);for(var X=1;X<c-1;X++)T=r[2*(X-1)],w=r[2*(X-1)+1],E=r[2*X],S=r[2*X+1],M=r[2*(X+1)],O=r[2*(X+1)+1],C=-(w-S),R=T-E,G=Math.sqrt(C*C+R*R),C/=G,R/=G,C*=p,R*=p,A=-(S-O),P=E-M,G=Math.sqrt(A*A+P*P),A/=G,P/=G,A*=p,P*=p,L=-R+w-(-R+S),k=-C+E-(-C+T),F=(-C+T)*(-R+S)-(-C+E)*(-R+w),B=-P+O-(-P+S),N=-A+E-(-A+M),j=(-A+M)*(-P+S)-(-A+E)*(-P+O),U=L*N-B*k,Math.abs(U)<.1?(U+=10.1,l.push(E-C,S-R,g,_,m,y),l.push(E+C,S+R,g,_,m,y)):(x=(k*j-N*F)/U,b=(B*F-L*j)/U,W=(x-E)*(x-E)+(b-S)*(b-S),W>19600?(D=C-A,I=R-P,G=Math.sqrt(D*D+I*I),D/=G,I/=G,D*=p,I*=p,l.push(E-D,S-I),l.push(g,_,m,y),l.push(E+D,S+I),l.push(g,_,m,y),l.push(E-D,S-I),l.push(g,_,m,y),f++):(l.push(x,b),l.push(g,_,m,y),l.push(E-(x-E),S-(b-S)),l.push(g,_,m,y)));T=r[2*(c-2)],w=r[2*(c-2)+1],E=r[2*(c-1)],S=r[2*(c-1)+1],C=-(w-S),R=T-E,G=Math.sqrt(C*C+R*R),C/=G,R/=G,C*=p,R*=p,l.push(E-C,S-R),l.push(g,_,m,y),l.push(E+C,S+R),l.push(g,_,m,y),h.push(d);for(var H=0;H<f;H++)h.push(d++);h.push(d-1)}};r.default=u},{"../../../math":102,"../../../utils":151}],94:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0;var n=t("./buildLine"),o=i(n),s=t("../../../utils"),a=i(s),u=t("earcut"),l=i(u),h=function(t,e){t.points=t.shape.points.slice();var r=t.points;if(t.fill&&r.length>=6){for(var i=[],n=t.holes,s=0;s<n.length;s++){var u=n[s];i.push(r.length/2),r=r.concat(u.points)}var h=e.points,c=e.indices,f=r.length/2,d=a.default.hex2rgb(t.fillColor),p=t.fillAlpha,v=d[0]*p,y=d[1]*p,g=d[2]*p,_=(0,l.default)(r,i,2);if(!_)return;for(var m=h.length/6,x=0;x<_.length;x+=3)c.push(_[x]+m),c.push(_[x]+m),c.push(_[x+1]+m),c.push(_[x+2]+m),c.push(_[x+2]+m);for(var b=0;b<f;b++)h.push(r[2*b],r[2*b+1],v,y,g,p)}t.lineWidth>0&&(0,o.default)(t,e)};r.default=h},{"../../../utils":151,"./buildLine":93,earcut:31}],95:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0;var n=t("./buildLine"),o=i(n),s=t("../../../utils"),a=i(s),u=function(t,e){var r=t.shape,i=r.x,n=r.y,s=r.width,u=r.height;if(t.fill){var l=a.default.hex2rgb(t.fillColor),h=t.fillAlpha,c=l[0]*h,f=l[1]*h,d=l[2]*h,p=e.points,v=e.indices,y=p.length/6;p.push(i,n),p.push(c,f,d,h),p.push(i+s,n),p.push(c,f,d,h),p.push(i,n+u),p.push(c,f,d,h),p.push(i+s,n+u),p.push(c,f,d,h),v.push(y,y,y+1,y+2,y+3,y+3)}if(t.lineWidth){var g=t.points;t.points=[i,n,i+s,n,i+s,n+u,i,n+u,i,n],(0,o.default)(t,e),t.points=g}};r.default=u},{"../../../utils":151,"./buildLine":93}],96:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0;var n=t("earcut"),o=i(n),s=t("./buildLine"),a=i(s),u=t("../../../utils"),l=i(u),h=function(t,e){var r=t.shape,i=r.x,n=r.y,s=r.width,u=r.height,h=r.radius,f=[];if(f.push(i,n+h),c(i,n+u-h,i,n+u,i+h,n+u,f),c(i+s-h,n+u,i+s,n+u,i+s,n+u-h,f),c(i+s,n+h,i+s,n,i+s-h,n,f),c(i+h,n,i,n,i,n+h+1e-10,f),t.fill){for(var d=l.default.hex2rgb(t.fillColor),p=t.fillAlpha,v=d[0]*p,y=d[1]*p,g=d[2]*p,_=e.points,m=e.indices,x=_.length/6,b=(0,o.default)(f,null,2),T=0,w=b.length;T<w;T+=3)m.push(b[T]+x),m.push(b[T]+x),m.push(b[T+1]+x),m.push(b[T+2]+x),m.push(b[T+2]+x);for(var E=0,S=f.length;E<S;E++)_.push(f[E],f[++E],v,y,g,p)}if(t.lineWidth){var M=t.points;t.points=f,(0,a.default)(t,e),t.points=M}},c=function(t,e,r,i,n,o){function s(t,e,r){var i=e-t;return t+i*r}for(var a=arguments.length<=6||void 0===arguments[6]?[]:arguments[6],u=20,l=a,h=void 0,c=void 0,f=void 0,d=void 0,p=void 0,v=void 0,y=0,g=0;y<=u;y++)g=y/u,h=s(t,r,g),c=s(e,i,g),f=s(r,n,g),d=s(i,o,g),p=s(h,f,g),v=s(c,d,g),l.push(p,v);return l};r.default=h},{"../../../utils":151,"./buildLine":93,earcut:31}],97:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0;var n=t("./const"),o=i(n),s=t("./math"),a=i(s),u=t("./utils"),l=i(u),h=t("./ticker"),c=i(h),f=t("./display/DisplayObject"),d=i(f),p=t("./display/Container"),v=i(p),y=t("./display/Transform"),g=i(y),_=t("./display/TransformStatic"),m=i(_),x=t("./display/TransformBase"),b=i(x),T=t("./sprites/Sprite"),w=i(T),E=t("./sprites/canvas/CanvasSpriteRenderer"),S=i(E),M=t("./sprites/canvas/CanvasTinter"),O=i(M),C=t("./sprites/webgl/SpriteRenderer"),R=i(C),A=t("./text/Text"),P=i(A),D=t("./text/TextStyle"),I=i(D),L=t("./graphics/Graphics"),k=i(L),F=t("./graphics/GraphicsData"),B=i(F),N=t("./graphics/webgl/GraphicsRenderer"),j=i(N),U=t("./graphics/canvas/CanvasGraphicsRenderer"),W=i(U),G=t("./textures/Texture"),X=i(G),H=t("./textures/BaseTexture"),z=i(H),V=t("./textures/RenderTexture"),Y=i(V),q=t("./textures/BaseRenderTexture"),K=i(q),Z=t("./textures/VideoBaseTexture"),J=i(Z),Q=t("./textures/TextureUvs"),$=i(Q),tt=t("./renderers/canvas/CanvasRenderer"),et=i(tt),rt=t("./renderers/canvas/utils/CanvasRenderTarget"),it=i(rt),nt=t("./Shader"),ot=i(nt),st=t("./renderers/webgl/WebGLRenderer"),at=i(st),ut=t("./renderers/webgl/managers/WebGLManager"),lt=i(ut),ht=t("./renderers/webgl/utils/ObjectRenderer"),ct=i(ht),ft=t("./renderers/webgl/utils/RenderTarget"),dt=i(ft),pt=t("./renderers/webgl/utils/Quad"),vt=i(pt),yt=t("./renderers/webgl/filters/spriteMask/SpriteMaskFilter"),gt=i(yt),_t=t("./renderers/webgl/filters/Filter"),mt=i(_t),xt=t("pixi-gl-core"),bt=i(xt),Tt=Object.assign(o.default,a.default,{
utils:l.default,ticker:c.default,DisplayObject:d.default,Container:v.default,Transform:g.default,TransformStatic:m.default,TransformBase:b.default,Sprite:w.default,CanvasSpriteRenderer:S.default,CanvasTinter:O.default,SpriteRenderer:R.default,Text:P.default,TextStyle:I.default,Graphics:k.default,GraphicsData:B.default,GraphicsRenderer:j.default,CanvasGraphicsRenderer:W.default,Texture:X.default,BaseTexture:z.default,RenderTexture:Y.default,BaseRenderTexture:K.default,VideoBaseTexture:J.default,TextureUvs:$.default,CanvasRenderer:et.default,CanvasRenderTarget:it.default,Shader:ot.default,WebGLRenderer:at.default,WebGLManager:lt.default,ObjectRenderer:ct.default,RenderTarget:dt.default,Quad:vt.default,SpriteMaskFilter:gt.default,Filter:mt.default,glCore:bt.default,autoDetectRenderer:function(){var t=arguments.length<=0||void 0===arguments[0]?800:arguments[0],e=arguments.length<=1||void 0===arguments[1]?600:arguments[1],r=arguments[2],i=arguments[3];return!i&&Tt.utils.isWebGLSupported()?new Tt.WebGLRenderer(t,e,r):new Tt.CanvasRenderer(t,e,r)}});r.default=Tt},{"./Shader":77,"./const":78,"./display/Container":80,"./display/DisplayObject":81,"./display/Transform":82,"./display/TransformBase":83,"./display/TransformStatic":84,"./graphics/Graphics":85,"./graphics/GraphicsData":86,"./graphics/canvas/CanvasGraphicsRenderer":87,"./graphics/webgl/GraphicsRenderer":89,"./math":102,"./renderers/canvas/CanvasRenderer":109,"./renderers/canvas/utils/CanvasRenderTarget":111,"./renderers/webgl/WebGLRenderer":116,"./renderers/webgl/filters/Filter":118,"./renderers/webgl/filters/spriteMask/SpriteMaskFilter":121,"./renderers/webgl/managers/WebGLManager":125,"./renderers/webgl/utils/ObjectRenderer":126,"./renderers/webgl/utils/Quad":127,"./renderers/webgl/utils/RenderTarget":128,"./sprites/Sprite":133,"./sprites/canvas/CanvasSpriteRenderer":134,"./sprites/canvas/CanvasTinter":135,"./sprites/webgl/SpriteRenderer":137,"./text/Text":139,"./text/TextStyle":140,"./textures/BaseRenderTexture":141,"./textures/BaseTexture":142,"./textures/RenderTexture":143,"./textures/Texture":144,"./textures/TextureUvs":145,"./textures/VideoBaseTexture":146,"./ticker":148,"./utils":151,"pixi-gl-core":7}],98:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t){return t<0?-1:t>0?1:0}function o(){for(var t=0;t<16;t++){var e=[];d.push(e);for(var r=0;r<16;r++)for(var i=n(u[t]*u[r]+h[t]*l[r]),o=n(l[t]*u[r]+c[t]*l[r]),s=n(u[t]*h[r]+h[t]*c[r]),p=n(l[t]*h[r]+c[t]*c[r]),v=0;v<16;v++)if(u[v]===i&&l[v]===o&&h[v]===s&&c[v]===p){e.push(v);break}}for(var y=0;y<16;y++){var g=new a.default;g.set(u[y],l[y],h[y],c[y],0,0),f.push(g)}}r.__esModule=!0;var s=t("./Matrix"),a=i(s),u=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],l=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],h=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],c=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],f=[],d=[];o();var p={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MIRROR_HORIZONTAL:12,uX:function(t){return u[t]},uY:function(t){return l[t]},vX:function(t){return h[t]},vY:function(t){return c[t]},inv:function(t){return 8&t?15&t:7&-t},add:function(t,e){return d[t][e]},sub:function(t,e){return d[t][p.inv(e)]},rotate180:function(t){return 4^t},isSwapWidthHeight:function(t){return 2===(3&t)},byDirection:function(t,e){return 2*Math.abs(t)<=Math.abs(e)?e>=0?p.S:p.N:2*Math.abs(e)<=Math.abs(t)?t>0?p.E:p.W:e>0?t>0?p.SE:p.SW:t>0?p.NE:p.NW},matrixAppendRotationInv:function(t,e,r,i){var n=f[p.inv(e)];r=r||0,i=i||0,n.tx=r,n.ty=i,t.append(n)}};r.default=p},{"./Matrix":99}],99:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}r.__esModule=!0;var o=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),s=t("./Point"),a=i(s),u=function(){function t(){n(this,t),this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this.array=null}return t.prototype.fromArray=function(t){this.a=t[0],this.b=t[1],this.c=t[3],this.d=t[4],this.tx=t[2],this.ty=t[5]},t.prototype.set=function(t,e,r,i,n,o){return this.a=t,this.b=e,this.c=r,this.d=i,this.tx=n,this.ty=o,this},t.prototype.toArray=function(t,e){this.array||(this.array=new Float32Array(9));var r=e||this.array;return t?(r[0]=this.a,r[1]=this.b,r[2]=0,r[3]=this.c,r[4]=this.d,r[5]=0,r[6]=this.tx,r[7]=this.ty,r[8]=1):(r[0]=this.a,r[1]=this.c,r[2]=this.tx,r[3]=this.b,r[4]=this.d,r[5]=this.ty,r[6]=0,r[7]=0,r[8]=1),r},t.prototype.apply=function(t,e){e=e||new a.default;var r=t.x,i=t.y;return e.x=this.a*r+this.c*i+this.tx,e.y=this.b*r+this.d*i+this.ty,e},t.prototype.applyInverse=function(t,e){e=e||new a.default;var r=1/(this.a*this.d+this.c*-this.b),i=t.x,n=t.y;return e.x=this.d*r*i+-this.c*r*n+(this.ty*this.c-this.tx*this.d)*r,e.y=this.a*r*n+-this.b*r*i+(-this.ty*this.a+this.tx*this.b)*r,e},t.prototype.translate=function(t,e){return this.tx+=t,this.ty+=e,this},t.prototype.scale=function(t,e){return this.a*=t,this.d*=e,this.c*=t,this.b*=e,this.tx*=t,this.ty*=e,this},t.prototype.rotate=function(t){var e=Math.cos(t),r=Math.sin(t),i=this.a,n=this.c,o=this.tx;return this.a=i*e-this.b*r,this.b=i*r+this.b*e,this.c=n*e-this.d*r,this.d=n*r+this.d*e,this.tx=o*e-this.ty*r,this.ty=o*r+this.ty*e,this},t.prototype.append=function(t){var e=this.a,r=this.b,i=this.c,n=this.d;return this.a=t.a*e+t.b*i,this.b=t.a*r+t.b*n,this.c=t.c*e+t.d*i,this.d=t.c*r+t.d*n,this.tx=t.tx*e+t.ty*i+this.tx,this.ty=t.tx*r+t.ty*n+this.ty,this},t.prototype.setTransform=function(t,e,r,i,n,o,s,a,u){var l=void 0,h=void 0,c=void 0,f=void 0,d=void 0,p=void 0,v=void 0,y=void 0,g=void 0,_=void 0;return d=Math.sin(s),p=Math.cos(s),v=Math.cos(u),y=Math.sin(u),g=-Math.sin(a),_=Math.cos(a),l=p*n,h=d*n,c=-d*o,f=p*o,this.a=v*l+y*c,this.b=v*h+y*f,this.c=g*l+_*c,this.d=g*h+_*f,this.tx=t+(r*l+i*c),this.ty=e+(r*h+i*f),this},t.prototype.prepend=function(t){var e=this.tx;if(1!==t.a||0!==t.b||0!==t.c||1!==t.d){var r=this.a,i=this.c;this.a=r*t.a+this.b*t.c,this.b=r*t.b+this.b*t.d,this.c=i*t.a+this.d*t.c,this.d=i*t.b+this.d*t.d}return this.tx=e*t.a+this.ty*t.c+t.tx,this.ty=e*t.b+this.ty*t.d+t.ty,this},t.prototype.decompose=function(t){var e=this.a,r=this.b,i=this.c,n=this.d,o=Math.atan2(-i,n),s=Math.atan2(r,e),a=Math.abs(1-o/s);return a<1e-5?(t.rotation=s,e<0&&n>=0&&(t.rotation+=t.rotation<=0?Math.PI:-Math.PI),t.skew.x=t.skew.y=0):(t.skew.x=o,t.skew.y=s),t.scale.x=Math.sqrt(e*e+r*r),t.scale.y=Math.sqrt(i*i+n*n),t.position.x=this.tx,t.position.y=this.ty,t},t.prototype.invert=function(){var t=this.a,e=this.b,r=this.c,i=this.d,n=this.tx,o=t*i-e*r;return this.a=i/o,this.b=-e/o,this.c=-r/o,this.d=t/o,this.tx=(r*this.ty-i*n)/o,this.ty=-(t*this.ty-e*n)/o,this},t.prototype.identity=function(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this},t.prototype.clone=function(){var e=new t;return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e},t.prototype.copy=function(t){return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t},o(t,null,[{key:"IDENTITY",get:function(){return new t}},{key:"TEMP_MATRIX",get:function(){return new t}}]),t}();r.default=u},{"./Point":101}],100:[function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}r.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),o=function(){function t(e,r,n,o){i(this,t),this._x=n||0,this._y=o||0,this.cb=e,this.scope=r}return t.prototype.set=function(t,e){var r=t||0,i=e||(0!==e?r:0);this._x===r&&this._y===i||(this._x=r,this._y=i,this.cb.call(this.scope))},t.prototype.copy=function(t){this._x===t.x&&this._y===t.y||(this._x=t.x,this._y=t.y,this.cb.call(this.scope))},n(t,[{key:"x",get:function(){return this._x},set:function(t){this._x!==t&&(this._x=t,this.cb.call(this.scope))}},{key:"y",get:function(){return this._y},set:function(t){this._y!==t&&(this._y=t,this.cb.call(this.scope))}}]),t}();r.default=o},{}],101:[function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}r.__esModule=!0;var n=function(){function t(e,r){i(this,t),this.x=e||0,this.y=r||0}return t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.copy=function(t){this.set(t.x,t.y)},t.prototype.equals=function(t){return t.x===this.x&&t.y===this.y},t.prototype.set=function(t,e){this.x=t||0,this.y=e||(0!==e?this.x:0)},t}();r.default=n},{}],102:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0;var n=t("./Point"),o=i(n),s=t("./ObservablePoint"),a=i(s),u=t("./Matrix"),l=i(u),h=t("./GroupD8"),c=i(h),f=t("./shapes/Circle"),d=i(f),p=t("./shapes/Ellipse"),v=i(p),y=t("./shapes/Polygon"),g=i(y),_=t("./shapes/Rectangle"),m=i(_),x=t("./shapes/RoundedRectangle"),b=i(x);r.default={Point:o.default,ObservablePoint:a.default,Matrix:l.default,GroupD8:c.default,Circle:d.default,Ellipse:v.default,Polygon:g.default,Rectangle:m.default,RoundedRectangle:b.default}},{"./GroupD8":98,"./Matrix":99,"./ObservablePoint":100,"./Point":101,"./shapes/Circle":103,"./shapes/Ellipse":104,"./shapes/Polygon":105,"./shapes/Rectangle":106,"./shapes/RoundedRectangle":107}],103:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}r.__esModule=!0;var o=t("./Rectangle"),s=i(o),a=t("../../const"),u=i(a),l=function(){function t(){var e=arguments.length<=0||void 0===arguments[0]?0:arguments[0],r=arguments.length<=1||void 0===arguments[1]?0:arguments[1],i=arguments.length<=2||void 0===arguments[2]?0:arguments[2];n(this,t),this.x=e,this.y=r,this.radius=i,this.type=u.default.SHAPES.CIRC}return t.prototype.clone=function(){return new t(this.x,this.y,this.radius)},t.prototype.contains=function(t,e){if(this.radius<=0)return!1;var r=this.radius*this.radius,i=this.x-t,n=this.y-e;return i*=i,n*=n,i+n<=r},t.prototype.getBounds=function(){return new s.default(this.x-this.radius,this.y-this.radius,2*this.radius,2*this.radius)},t}();r.default=l},{"../../const":78,"./Rectangle":106}],104:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}r.__esModule=!0;var o=t("./Rectangle"),s=i(o),a=t("../../const"),u=i(a),l=function(){function t(){var e=arguments.length<=0||void 0===arguments[0]?0:arguments[0],r=arguments.length<=1||void 0===arguments[1]?0:arguments[1],i=arguments.length<=2||void 0===arguments[2]?0:arguments[2],o=arguments.length<=3||void 0===arguments[3]?0:arguments[3];n(this,t),this.x=e,this.y=r,this.width=i,this.height=o,this.type=u.default.SHAPES.ELIP}return t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.contains=function(t,e){if(this.width<=0||this.height<=0)return!1;var r=(t-this.x)/this.width,i=(e-this.y)/this.height;return r*=r,i*=i,r+i<=1},t.prototype.getBounds=function(){return new s.default(this.x-this.width,this.y-this.height,this.width,this.height)},t}();r.default=l},{"../../const":78,"./Rectangle":106}],105:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}r.__esModule=!0;var o=t("../Point"),s=i(o),a=t("../../const"),u=i(a),l=function(){function t(e){n(this,t);var r=e;if(!Array.isArray(r)){r=new Array(arguments.length);for(var i=0;i<r.length;++i)r[i]=arguments[i]}if(r[0]instanceof s.default){for(var o=[],a=0,l=r.length;a<l;a++)o.push(r[a].x,r[a].y);r=o}this.closed=!0,this.points=r,this.type=u.default.SHAPES.POLY}return t.prototype.clone=function(){return new t(this.points.slice())},t.prototype.close=function(){var t=this.points;t[0]===t[t.length-2]&&t[1]===t[t.length-1]||t.push(t[0],t[1])},t.prototype.contains=function(t,e){for(var r=!1,i=this.points.length/2,n=0,o=i-1;n<i;o=n++){var s=this.points[2*n],a=this.points[2*n+1],u=this.points[2*o],l=this.points[2*o+1],h=a>e!=l>e&&t<(u-s)*(e-a)/(l-a)+s;h&&(r=!r)}return r},t}();r.default=l},{"../../const":78,"../Point":101}],106:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}r.__esModule=!0;var o=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),s=t("../../const"),a=i(s),u=function(){function t(){var e=arguments.length<=0||void 0===arguments[0]?0:arguments[0],r=arguments.length<=1||void 0===arguments[1]?0:arguments[1],i=arguments.length<=2||void 0===arguments[2]?0:arguments[2],o=arguments.length<=3||void 0===arguments[3]?0:arguments[3];n(this,t),this.x=e,this.y=r,this.width=i,this.height=o,this.type=a.default.SHAPES.RECT}return t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this},t.prototype.contains=function(t,e){return!(this.width<=0||this.height<=0)&&(t>=this.x&&t<this.x+this.width&&e>=this.y&&e<this.y+this.height)},t.prototype.pad=function(t,e){t=t||0,e=e||(0!==e?t:0),this.x-=t,this.y-=e,this.width+=2*t,this.height+=2*e},t.prototype.fit=function(t){this.x<t.x&&(this.width+=this.x,this.width<0&&(this.width=0),this.x=t.x),this.y<t.y&&(this.height+=this.y,this.height<0&&(this.height=0),this.y=t.y),this.x+this.width>t.x+t.width&&(this.width=t.width-this.x,this.width<0&&(this.width=0)),this.y+this.height>t.y+t.height&&(this.height=t.height-this.y,this.height<0&&(this.height=0))},t.prototype.enlarge=function(e){if(e!==t.EMPTY){var r=Math.min(this.x,e.x),i=Math.max(this.x+this.width,e.x+e.width),n=Math.min(this.y,e.y),o=Math.max(this.y+this.height,e.y+e.height);this.x=r,this.width=i-r,this.y=n,this.height=o-n}},o(t,[{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 t(0,0,0,0)}}]),t}();r.default=u},{"../../const":78}],107:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}r.__esModule=!0;var o=t("../../const"),s=i(o),a=function(){function t(){var e=arguments.length<=0||void 0===arguments[0]?0:arguments[0],r=arguments.length<=1||void 0===arguments[1]?0:arguments[1],i=arguments.length<=2||void 0===arguments[2]?0:arguments[2],o=arguments.length<=3||void 0===arguments[3]?0:arguments[3],a=arguments.length<=4||void 0===arguments[4]?20:arguments[4];n(this,t),this.x=e,this.y=r,this.width=i,this.height=o,this.radius=a,this.type=s.default.SHAPES.RREC}return t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height,this.radius)},t.prototype.contains=function(t,e){return!(this.width<=0||this.height<=0)&&(t>=this.x&&t<=this.x+this.width&&e>=this.y&&e<=this.y+this.height)},t}();r.default=a},{"../../const":78}],108:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}r.__esModule=!0;var a=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),u=t("../utils"),l=i(u),h=t("../math"),c=i(h),f=t("../const"),d=i(f),p=t("../display/Container"),v=i(p),y=t("../textures/RenderTexture"),g=i(y),_=t("eventemitter3"),m=i(_),x=new c.default.Matrix,b=function(t){function e(r,i,s,a){n(this,e);var u=o(this,t.call(this));if(l.default.sayHello(r),a)for(var h in d.default.DEFAULT_RENDER_OPTIONS)"undefined"==typeof a[h]&&(a[h]=d.default.DEFAULT_RENDER_OPTIONS[h]);else a=d.default.DEFAULT_RENDER_OPTIONS;return u.type=d.default.RENDERER_TYPE.UNKNOWN,u.width=i||800,u.height=s||600,u.view=a.view||document.createElement("canvas"),u.resolution=a.resolution,u.transparent=a.transparent,u.autoResize=a.autoResize||!1,u.blendModes=null,u.preserveDrawingBuffer=a.preserveDrawingBuffer,u.clearBeforeRender=a.clearBeforeRender,u.roundPixels=a.roundPixels,u._backgroundColor=0,u._backgroundColorRgba=[0,0,0,0],u._backgroundColorString="#000000",u.backgroundColor=a.backgroundColor||u._backgroundColor,u._tempDisplayObjectParent=new v.default,u._lastObjectRendered=u._tempDisplayObjectParent,u}return s(e,t),e.prototype.resize=function(t,e){this.width=t*this.resolution,this.height=e*this.resolution,this.view.width=this.width,this.view.height=this.height,this.autoResize&&(this.view.style.width=this.width/this.resolution+"px",this.view.style.height=this.height/this.resolution+"px")},e.prototype.generateTexture=function(t,e,r){var i=t.getLocalBounds(),n=g.default.create(0|i.width,0|i.height,e,r);return x.tx=-i.x,x.ty=-i.y,this.render(t,n,!1,x,!0),n},e.prototype.destroy=function(t){t&&this.view.parentNode&&this.view.parentNode.removeChild(this.view),this.type=d.default.RENDERER_TYPE.UNKNOWN,this.width=0,this.height=0,this.view=null,this.resolution=0,this.transparent=!1,this.autoResize=!1,this.blendModes=null,this.preserveDrawingBuffer=!1,this.clearBeforeRender=!1,this.roundPixels=!1,this._backgroundColor=0,this._backgroundColorRgba=null,this._backgroundColorString=null,this.backgroundColor=0,this._tempDisplayObjectParent=null,this._lastObjectRendered=null},a(e,[{key:"backgroundColor",get:function(){return this._backgroundColor},set:function(t){this._backgroundColor=t,this._backgroundColorString=l.default.hex2string(t),l.default.hex2rgb(t,this._backgroundColorRgba)}}]),e}(m.default);r.default=b},{"../const":78,"../display/Container":80,"../math":102,"../textures/RenderTexture":143,"../utils":151,eventemitter3:32}],109:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}r.__esModule=!0;var a=t("../SystemRenderer"),u=i(a),l=t("./utils/CanvasMaskManager"),h=i(l),c=t("./utils/CanvasRenderTarget"),f=i(c),d=t("./utils/mapCanvasBlendModesToPixi"),p=i(d),v=t("../../utils"),y=i(v),g=t("../../const"),_=i(g),m=function(t){function e(r,i){var s=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];n(this,e);var a=o(this,t.call(this,"Canvas",r,i,s));return a.type=_.default.RENDERER_TYPE.CANVAS,a.rootContext=a.view.getContext("2d",{alpha:a.transparent}),a.rootResolution=a.resolution,a.refresh=!0,a.maskManager=new h.default(a),a.smoothProperty="imageSmoothingEnabled",a.rootContext.imageSmoothingEnabled||(a.rootContext.webkitImageSmoothingEnabled?a.smoothProperty="webkitImageSmoothingEnabled":a.rootContext.mozImageSmoothingEnabled?a.smoothProperty="mozImageSmoothingEnabled":a.rootContext.oImageSmoothingEnabled?a.smoothProperty="oImageSmoothingEnabled":a.rootContext.msImageSmoothingEnabled&&(a.smoothProperty="msImageSmoothingEnabled")),a.initPlugins(),a.blendModes=(0,p.default)(),a._activeBlendMode=null,a.context=null,a.renderingToScreen=!1,a.resize(r,i),a}return s(e,t),e.prototype.render=function(t,e,r,i,n){if(this.view){this.renderingToScreen=!e,this.emit("prerender"),e?(e=e.baseTexture||e,e._canvasRenderTarget||(e._canvasRenderTarget=new f.default(e.width,e.height,e.resolution),e.source=e._canvasRenderTarget.canvas,e.valid=!0),this.context=e._canvasRenderTarget.context,this.resolution=e._canvasRenderTarget.resolution):(this.context=this.rootContext,this.resolution=this.rootResolution);var o=this.context;if(e||(this._lastObjectRendered=t),!n){var s=t.parent,a=this._tempDisplayObjectParent.transform.worldTransform;i?i.copy(a):a.identity(),t.parent=this._tempDisplayObjectParent,t.updateTransform(),t.parent=s}o.setTransform(1,0,0,1,0,0),o.globalAlpha=1,o.globalCompositeOperation=this.blendModes[_.default.BLEND_MODES.NORMAL],navigator.isCocoonJS&&this.view.screencanvas&&(o.fillStyle="black",o.clear()),(void 0!==r?r:this.clearBeforeRender)&&this.renderingToScreen&&(this.transparent?o.clearRect(0,0,this.width,this.height):(o.fillStyle=this._backgroundColorString,o.fillRect(0,0,this.width,this.height)));var u=this.context;this.context=o,t.renderCanvas(this),this.context=u,this.emit("postrender")}},e.prototype.setBlendMode=function(t){this._activeBlendMode!==t&&(this.context.globalCompositeOperation=this.blendModes[t])},e.prototype.destroy=function(e){this.destroyPlugins(),t.prototype.destroy.call(this,e),this.context=null,this.refresh=!0,this.maskManager.destroy(),this.maskManager=null,this.smoothProperty=null},e.prototype.resize=function(e,r){t.prototype.resize.call(this,e,r),this.smoothProperty&&(this.rootContext[this.smoothProperty]=_.default.SCALE_MODES.DEFAULT===_.default.SCALE_MODES.LINEAR)},e}(u.default);y.default.pluginTarget.mixin(m),r.default=m},{"../../const":78,"../../utils":151,"../SystemRenderer":108,"./utils/CanvasMaskManager":110,"./utils/CanvasRenderTarget":111,"./utils/mapCanvasBlendModesToPixi":113}],110:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}r.__esModule=!0;var o=t("../../../const"),s=i(o),a=function(){function t(e){n(this,t),this.renderer=e}return t.prototype.pushMask=function(t){var e=this.renderer;e.context.save();var r=t.alpha,i=t.transform.worldTransform,n=e.resolution;e.context.setTransform(i.a*n,i.b*n,i.c*n,i.d*n,i.tx*n,i.ty*n),t._texture||(this.renderGraphicsShape(t),e.context.clip()),t.worldAlpha=r},t.prototype.renderGraphicsShape=function(t){var e=this.renderer.context,r=t.graphicsData.length;if(0!==r){e.beginPath();for(var i=0;i<r;i++){var n=t.graphicsData[i],o=n.shape;if(n.type===s.default.SHAPES.POLY){var a=o.points;e.moveTo(a[0],a[1]);for(var u=1;u<a.length/2;u++)e.lineTo(a[2*u],a[2*u+1]);a[0]===a[a.length-2]&&a[1]===a[a.length-1]&&e.closePath()}else if(n.type===s.default.SHAPES.RECT)e.rect(o.x,o.y,o.width,o.height),e.closePath();else if(n.type===s.default.SHAPES.CIRC)e.arc(o.x,o.y,o.radius,0,2*Math.PI),e.closePath();else if(n.type===s.default.SHAPES.ELIP){var l=2*o.width,h=2*o.height,c=o.x-l/2,f=o.y-h/2,d=.5522848,p=l/2*d,v=h/2*d,y=c+l,g=f+h,_=c+l/2,m=f+h/2;e.moveTo(c,m),e.bezierCurveTo(c,m-v,_-p,f,_,f),e.bezierCurveTo(_+p,f,y,m-v,y,m),e.bezierCurveTo(y,m+v,_+p,g,_,g),e.bezierCurveTo(_-p,g,c,m+v,c,m),e.closePath()}else if(n.type===s.default.SHAPES.RREC){var x=o.x,b=o.y,T=o.width,w=o.height,E=o.radius,S=Math.min(T,w)/2|0;E=E>S?S:E,e.moveTo(x,b+E),e.lineTo(x,b+w-E),e.quadraticCurveTo(x,b+w,x+E,b+w),e.lineTo(x+T-E,b+w),e.quadraticCurveTo(x+T,b+w,x+T,b+w-E),e.lineTo(x+T,b+E),e.quadraticCurveTo(x+T,b,x+T-E,b),e.lineTo(x+E,b),e.quadraticCurveTo(x,b,x,b+E),e.closePath()}}}},t.prototype.popMask=function(t){t.context.restore()},t.prototype.destroy=function(){},t}();r.default=a},{"../../../const":78}],111:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}r.__esModule=!0;var o=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),s=t("../../../const"),a=i(s),u=function(){function t(e,r,i){n(this,t),this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),this.resolution=i||a.default.RESOLUTION,this.resize(e,r)}return t.prototype.clear=function(){this.context.setTransform(1,0,0,1,0,0),this.context.clearRect(0,0,this.canvas.width,this.canvas.height)},t.prototype.resize=function(t,e){this.canvas.width=t*this.resolution,this.canvas.height=e*this.resolution},t.prototype.destroy=function(){this.context=null,this.canvas=null},o(t,[{key:"width",get:function(){return this.canvas.width},set:function(t){this.canvas.width=t}},{key:"height",get:function(){return this.canvas.height},set:function(t){this.canvas.height=t}}]),t}();r.default=u},{"../../../const":78}],112:[function(t,e,r){"use strict";r.__esModule=!0;var i=function(t){var e=document.createElement("canvas");e.width=6,e.height=1;var r=e.getContext("2d");return r.fillStyle=t,r.fillRect(0,0,6,1),e},n=function(){if("undefined"==typeof document)return!1;var t=i("#ff00ff"),e=i("#ffff00"),r=document.createElement("canvas");r.width=6,r.height=1;var n=r.getContext("2d");n.globalCompositeOperation="multiply",n.drawImage(t,0,0),n.drawImage(e,2,0);var o=n.getImageData(2,0,1,1);if(!o)return!1;var s=o.data;return 255===s[0]&&0===s[1]&&0===s[2]};r.default=n},{}],113:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(){var t=arguments.length<=0||void 0===arguments[0]?[]:arguments[0];return(0,u.default)()?(t[s.default.BLEND_MODES.NORMAL]="source-over",t[s.default.BLEND_MODES.ADD]="lighter",t[s.default.BLEND_MODES.MULTIPLY]="multiply",t[s.default.BLEND_MODES.SCREEN]="screen",t[s.default.BLEND_MODES.OVERLAY]="overlay",t[s.default.BLEND_MODES.DARKEN]="darken",t[s.default.BLEND_MODES.LIGHTEN]="lighten",t[s.default.BLEND_MODES.COLOR_DODGE]="color-dodge",t[s.default.BLEND_MODES.COLOR_BURN]="color-burn",t[s.default.BLEND_MODES.HARD_LIGHT]="hard-light",t[s.default.BLEND_MODES.SOFT_LIGHT]="soft-light",t[s.default.BLEND_MODES.DIFFERENCE]="difference",t[s.default.BLEND_MODES.EXCLUSION]="exclusion",t[s.default.BLEND_MODES.HUE]="hue",t[s.default.BLEND_MODES.SATURATION]="saturate",t[s.default.BLEND_MODES.COLOR]="color",t[s.default.BLEND_MODES.LUMINOSITY]="luminosity"):(t[s.default.BLEND_MODES.NORMAL]="source-over",t[s.default.BLEND_MODES.ADD]="lighter",t[s.default.BLEND_MODES.MULTIPLY]="source-over",t[s.default.BLEND_MODES.SCREEN]="source-over",t[s.default.BLEND_MODES.OVERLAY]="source-over",t[s.default.BLEND_MODES.DARKEN]="source-over",t[s.default.BLEND_MODES.LIGHTEN]="source-over",t[s.default.BLEND_MODES.COLOR_DODGE]="source-over",t[s.default.BLEND_MODES.COLOR_BURN]="source-over",t[s.default.BLEND_MODES.HARD_LIGHT]="source-over",t[s.default.BLEND_MODES.SOFT_LIGHT]="source-over",t[s.default.BLEND_MODES.DIFFERENCE]="source-over",t[s.default.BLEND_MODES.EXCLUSION]="source-over",t[s.default.BLEND_MODES.HUE]="source-over",t[s.default.BLEND_MODES.SATURATION]="source-over",t[s.default.BLEND_MODES.COLOR]="source-over",t[s.default.BLEND_MODES.LUMINOSITY]="source-over"),t}r.__esModule=!0;var o=t("../../../const"),s=i(o),a=t("./canUseNewCanvasBlendModes"),u=i(a);r.default=n},{"../../../const":78,"./canUseNewCanvasBlendModes":112}],114:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}r.__esModule=!0;var o=t("../../const"),s=i(o),a=function(){function t(e){n(this,t),this.renderer=e,this.count=0,this.checkCount=0,this.maxIdle=3600,this.checkCountMax=600,this.mode=s.default.GC_MODES.DEFAULT}return t.prototype.update=function(){this.count++,this.mode!==s.default.GC_MODES.MANUAL&&(this.checkCount++,this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run()))},t.prototype.run=function(){for(var t=this.renderer.textureManager,e=t._managedTextures,r=!1,i=0;i<e.length;i++){var n=e[i];!n._glRenderTargets&&this.count-n.touched>this.maxIdle&&(t.destroyTexture(n,!0),e[i]=null,r=!0)}if(r){for(var o=0,s=0;s<e.length;s++)null!==e[s]&&(e[o++]=e[s]);e.length=o}},t.prototype.unload=function(t){var e=this.renderer.textureManager;t._texture&&e.destroyTexture(t._texture,!0);for(var r=t.children.length-1;r>=0;r--)this.unload(t.children[r])},t}();r.default=a},{"../../const":78}],115:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}r.__esModule=!0;var o=t("pixi-gl-core"),s=t("../../const"),a=i(s),u=t("./utils/RenderTarget"),l=i(u),h=t("../../utils"),c=i(h),f=function(){function t(e){n(this,t),this.renderer=e,this.gl=e.gl,this._managedTextures=[]}return t.prototype.bindTexture=function(){},t.prototype.getTexture=function(){},t.prototype.updateTexture=function(t){t=t.baseTexture||t;var e=!!t._glRenderTargets;if(t.hasLoaded){var r=t._glTextures[this.renderer.CONTEXT_UID];if(r)e?t._glRenderTargets[this.renderer.CONTEXT_UID].resize(t.width,t.height):r.upload(t.source);else{if(e){var i=new l.default(this.gl,t.width,t.height,t.scaleMode,t.resolution);i.resize(t.width,t.height),t._glRenderTargets[this.renderer.CONTEXT_UID]=i,r=i.texture}else r=new o.GLTexture(this.gl),r.premultiplyAlpha=!0,r.upload(t.source);t._glTextures[this.renderer.CONTEXT_UID]=r,t.on("update",this.updateTexture,this),t.on("dispose",this.destroyTexture,this),this._managedTextures.push(t),t.isPowerOfTwo?(t.mipmap&&r.enableMipmap(),t.wrapMode===a.default.WRAP_MODES.CLAMP?r.enableWrapClamp():t.wrapMode===a.default.WRAP_MODES.REPEAT?r.enableWrapRepeat():r.enableWrapMirrorRepeat()):r.enableWrapClamp(),t.scaleMode===a.default.SCALE_MODES.NEAREST?r.enableNearestScaling():r.enableLinearScaling()}return r}},t.prototype.destroyTexture=function(t,e){if(t=t.baseTexture||t,t.hasLoaded&&t._glTextures[this.renderer.CONTEXT_UID]&&(t._glTextures[this.renderer.CONTEXT_UID].destroy(),t.off("update",this.updateTexture,this),t.off("dispose",this.destroyTexture,this),delete t._glTextures[this.renderer.CONTEXT_UID],!e)){var r=this._managedTextures.indexOf(t);r!==-1&&c.default.removeItems(this._managedTextures,r,1)}},t.prototype.removeAll=function(){for(var t=0;t<this._managedTextures.length;++t){var e=this._managedTextures[t];e._glTextures[this.renderer.CONTEXT_UID]&&delete e._glTextures[this.renderer.CONTEXT_UID]}},t.prototype.destroy=function(){for(var t=0;t<this._managedTextures.length;++t){var e=this._managedTextures[t];this.destroyTexture(e,!0),e.off("update",this.updateTexture,this),e.off("dispose",this.destroyTexture,this)}this._managedTextures=null},t}();r.default=f},{"../../const":78,"../../utils":151,"./utils/RenderTarget":128,"pixi-gl-core":7}],116:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);
t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}r.__esModule=!0;var a=t("../SystemRenderer"),u=i(a),l=t("./managers/MaskManager"),h=i(l),c=t("./managers/StencilManager"),f=i(c),d=t("./managers/FilterManager"),p=i(d),v=t("./utils/RenderTarget"),y=i(v),g=t("./utils/ObjectRenderer"),_=i(g),m=t("./TextureManager"),x=i(m),b=t("./TextureGarbageCollector"),T=i(b),w=t("./WebGLState"),E=i(w),S=t("pixi-gl-core"),M=i(S),O=t("./utils/mapWebGLDrawModesToPixi"),C=i(O),R=t("./utils/validateContext"),A=i(R),P=t("../../utils"),D=i(P),I=t("../../const"),L=i(I),k=0,F=function(t){function e(r,i){var s=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];n(this,e);var a=o(this,t.call(this,"WebGL",r,i,s));return a.type=L.default.RENDERER_TYPE.WEBGL,a.handleContextLost=a.handleContextLost.bind(a),a.handleContextRestored=a.handleContextRestored.bind(a),a.view.addEventListener("webglcontextlost",a.handleContextLost,!1),a.view.addEventListener("webglcontextrestored",a.handleContextRestored,!1),a._contextOptions={alpha:a.transparent,antialias:s.antialias,premultipliedAlpha:a.transparent&&"notMultiplied"!==a.transparent,stencil:!0,preserveDrawingBuffer:s.preserveDrawingBuffer},a._backgroundColorRgba[3]=a.transparent?0:1,a.maskManager=new h.default(a),a.stencilManager=new f.default(a),a.emptyRenderer=new _.default(a),a.currentRenderer=a.emptyRenderer,a.initPlugins(),s.context&&(0,A.default)(s.context),a.gl=s.context||(0,S.createContext)(a.view,a._contextOptions),a.CONTEXT_UID=k++,a.state=new E.default(a.gl),a.renderingToScreen=!0,a._initContext(),a.filterManager=new p.default(a),a.drawModes=(0,C.default)(a.gl),a._activeShader=null,a._activeRenderTarget=null,a._activeTextureLocation=999,a._activeTexture=null,a.setBlendMode(0),a}return s(e,t),e.prototype._initContext=function(){var t=this.gl;this.textureManager=new x.default(this),this.textureGC=new T.default(this),this.state.resetToDefault(),this.rootRenderTarget=new y.default(t,this.width,this.height,null,this.resolution,(!0)),this.rootRenderTarget.clearColor=this._backgroundColorRgba,this.bindRenderTarget(this.rootRenderTarget),this.emit("context",t),this.resize(this.width,this.height)},e.prototype.render=function(t,e,r,i,n){if(this.renderingToScreen=!e,this.emit("prerender"),this.gl&&!this.gl.isContextLost()){if(e||(this._lastObjectRendered=t),!n){var o=t.parent;t.parent=this._tempDisplayObjectParent,t.updateTransform(),t.parent=o}this.bindRenderTexture(e,i),this.currentRenderer.start(),(void 0!==r?r:this.clearBeforeRender)&&this._activeRenderTarget.clear(),t.renderWebGL(this),this.currentRenderer.flush(),this.textureGC.update(),this.emit("postrender")}},e.prototype.setObjectRenderer=function(t){this.currentRenderer!==t&&(this.currentRenderer.stop(),this.currentRenderer=t,this.currentRenderer.start())},e.prototype.flush=function(){this.setObjectRenderer(this.emptyRenderer)},e.prototype.resize=function(t,e){u.default.prototype.resize.call(this,t,e),this.rootRenderTarget.resize(t,e),this._activeRenderTarget===this.rootRenderTarget&&(this.rootRenderTarget.activate(),this._activeShader&&(this._activeShader.uniforms.projectionMatrix=this.rootRenderTarget.projectionMatrix.toArray(!0)))},e.prototype.setBlendMode=function(t){this.state.setBlendMode(t)},e.prototype.clear=function(t){this._activeRenderTarget.clear(t)},e.prototype.setTransform=function(t){this._activeRenderTarget.transform=t},e.prototype.bindRenderTexture=function(t,e){var r=void 0;if(t){var i=t.baseTexture,n=this.gl;i._glRenderTargets[this.CONTEXT_UID]?(this._activeTextureLocation=i._id,n.activeTexture(n.TEXTURE0+i._id),n.bindTexture(n.TEXTURE_2D,null)):(this.textureManager.updateTexture(i),n.bindTexture(n.TEXTURE_2D,null)),r=i._glRenderTargets[this.CONTEXT_UID],r.setFrame(t.frame)}else r=this.rootRenderTarget;return r.transform=e,this.bindRenderTarget(r),this},e.prototype.bindRenderTarget=function(t){return t!==this._activeRenderTarget&&(this._activeRenderTarget=t,t.activate(),this._activeShader&&(this._activeShader.uniforms.projectionMatrix=t.projectionMatrix.toArray(!0)),this.stencilManager.setMaskStack(t.stencilMaskStack)),this},e.prototype.bindShader=function(t){return this._activeShader!==t&&(this._activeShader=t,t.bind(),t.uniforms.projectionMatrix=this._activeRenderTarget.projectionMatrix.toArray(!0)),this},e.prototype.bindTexture=function(t){var e=arguments.length<=1||void 0===arguments[1]?0:arguments[1];t=t.baseTexture||t;var r=this.gl;return this._activeTextureLocation!==e&&(this._activeTextureLocation=e,r.activeTexture(r.TEXTURE0+e)),this._activeTexture=t,t._glTextures[this.CONTEXT_UID]?(t.touched=this.textureGC.count,t._glTextures[this.CONTEXT_UID].bind()):this.textureManager.updateTexture(t),this},e.prototype.createVao=function(){return new M.default.VertexArrayObject(this.gl,this.state.attribState)},e.prototype.reset=function(){return this.setObjectRenderer(this.emptyRenderer),this._activeShader=null,this._activeRenderTarget=this.rootRenderTarget,this._activeTextureLocation=999,this._activeTexture=null,this.rootRenderTarget.activate(),this.state.resetToDefault(),this},e.prototype.handleContextLost=function(t){t.preventDefault()},e.prototype.handleContextRestored=function(){this._initContext(),this.textureManager.removeAll()},e.prototype.destroy=function(e){this.destroyPlugins(),this.view.removeEventListener("webglcontextlost",this.handleContextLost),this.view.removeEventListener("webglcontextrestored",this.handleContextRestored),this.textureManager.destroy(),t.prototype.destroy.call(this,e),this.uid=0,this.maskManager.destroy(),this.stencilManager.destroy(),this.filterManager.destroy(),this.maskManager=null,this.filterManager=null,this.textureManager=null,this.currentRenderer=null,this.handleContextLost=null,this.handleContextRestored=null,this._contextOptions=null,this.gl.useProgram(null),this.gl.getExtension("WEBGL_lose_context")&&this.gl.getExtension("WEBGL_lose_context").loseContext(),this.gl=null},e}(u.default);D.default.pluginTarget.mixin(F),r.default=F},{"../../const":78,"../../utils":151,"../SystemRenderer":108,"./TextureGarbageCollector":114,"./TextureManager":115,"./WebGLState":117,"./managers/FilterManager":122,"./managers/MaskManager":123,"./managers/StencilManager":124,"./utils/ObjectRenderer":126,"./utils/RenderTarget":128,"./utils/mapWebGLDrawModesToPixi":131,"./utils/validateContext":132,"pixi-gl-core":7}],117:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}r.__esModule=!0;var o=t("./utils/mapWebGLBlendModesToPixi"),s=i(o),a=0,u=1,l=2,h=3,c=4,f=function(){function t(e){n(this,t),this.activeState=new Uint8Array(16),this.defaultState=new Uint8Array(16),this.defaultState[0]=1,this.stackIndex=0,this.stack=[],this.gl=e,this.maxAttribs=e.getParameter(e.MAX_VERTEX_ATTRIBS),this.attribState={tempAttribState:new Array(this.maxAttribs),attribState:new Array(this.maxAttribs)},this.blendModes=(0,s.default)(e),this.nativeVaoExtension=e.getExtension("OES_vertex_array_object")||e.getExtension("MOZ_OES_vertex_array_object")||e.getExtension("WEBKIT_OES_vertex_array_object")}return t.prototype.push=function(){var t=this.stack[++this.stackIndex];t||(t=this.stack[this.stackIndex]=new Uint8Array(16));for(var e=0;e<this.activeState.length;e++)this.activeState[e]=t[e]},t.prototype.pop=function(){var t=this.stack[--this.stackIndex];this.setState(t)},t.prototype.setState=function(t){this.setBlend(t[a]),this.setDepthTest(t[u]),this.setFrontFace(t[l]),this.setCullFace(t[h]),this.setBlendMode(t[c])},t.prototype.setBlend=function(t){this.activeState[a]===t|0||(this.activeState[a]=0|t,this.gl[t?"enable":"disable"](this.gl.BLEND))},t.prototype.setBlendMode=function(t){t!==this.activeState[c]&&(this.activeState[c]=t,this.gl.blendFunc(this.blendModes[t][0],this.blendModes[t][1]))},t.prototype.setDepthTest=function(t){this.activeState[u]===t|0||(this.activeState[u]=0|t,this.gl[t?"enable":"disable"](this.gl.DEPTH_TEST))},t.prototype.setCullFace=function(t){this.activeState[h]===t|0||(this.activeState[h]=0|t,this.gl[t?"enable":"disable"](this.gl.CULL_FACE))},t.prototype.setFrontFace=function(t){this.activeState[l]===t|0||(this.activeState[l]=0|t,this.gl.frontFace(this.gl[t?"CW":"CCW"]))},t.prototype.resetAttributes=function(){for(var t=0;t<this.attribState.tempAttribState.length;t++)this.attribState.tempAttribState[t]=0;for(var e=0;e<this.attribState.attribState.length;e++)this.attribState.attribState[e]=0;for(var r=1;r<this.maxAttribs;r++)this.gl.disableVertexAttribArray(r)},t.prototype.resetToDefault=function(){this.nativeVaoExtension&&this.nativeVaoExtension.bindVertexArrayOES(null),this.resetAttributes();for(var t=0;t<this.activeState.length;t++)this.activeState[t]=32;var e=this.gl;e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,!1),this.setState(this.defaultState)},t}();r.default=f},{"./utils/mapWebGLBlendModesToPixi":130}],118:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}r.__esModule=!0;var o=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),s=t("./extractUniformsFromSrc"),a=i(s),u=t("../../../utils"),l=i(u),h=t("../../../const"),c=i(h),f={},d=function(){function t(e,r,i){n(this,t),this.vertexSrc=e||t.defaultVertexSrc,this.fragmentSrc=r||t.defaultFragmentSrc,this.blendMode=c.default.BLEND_MODES.NORMAL,this.uniformData=i||(0,a.default)(this.vertexSrc,this.fragmentSrc,"projectionMatrix|uSampler"),this.uniforms={};for(var o in this.uniformData)this.uniforms[o]=this.uniformData[o].value;this.glShaders=[],f[this.vertexSrc+this.fragmentSrc]||(f[this.vertexSrc+this.fragmentSrc]=l.default.uid()),this.glShaderKey=f[this.vertexSrc+this.fragmentSrc],this.padding=4,this.resolution=1,this.enabled=!0}return t.prototype.apply=function(t,e,r,i){t.applyFilter(this,e,r,i)},o(t,null,[{key:"defaultVertexSrc",get:function(){return["attribute vec2 aVertexPosition;","attribute vec2 aTextureCoord;","uniform mat3 projectionMatrix;","uniform mat3 filterMatrix;","varying vec2 vTextureCoord;","varying vec2 vFilterCoord;","void main(void){","   gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);","   vFilterCoord = ( filterMatrix * vec3( aTextureCoord, 1.0)  ).xy;","   vTextureCoord = aTextureCoord ;","}"].join("\n")}},{key:"defaultFragmentSrc",get:function(){return["varying vec2 vTextureCoord;","varying vec2 vFilterCoord;","uniform sampler2D uSampler;","uniform sampler2D filterSampler;","void main(void){","   vec4 masky = texture2D(filterSampler, vFilterCoord);","   vec4 sample = texture2D(uSampler, vTextureCoord);","   vec4 color;","   if(mod(vFilterCoord.x, 1.0) > 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")}}]),t}();r.default=d},{"../../../const":78,"../../../utils":151,"./extractUniformsFromSrc":119}],119:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e,r){var i=o(t,r),n=o(e,r);return Object.assign(i,n)}function o(t){for(var e=new RegExp("^(projectionMatrix|uSampler|filterArea)$"),r={},i=void 0,n=t.replace(/\s+/g," ").split(/\s*;\s*/),o=0;o<n.length;o++){var s=n[o].trim();if(s.indexOf("uniform")>-1){var a=s.split(" "),l=a[1],h=a[2],c=1;h.indexOf("[")>-1&&(i=h.split(/\[|\]/),h=i[0],c*=Number(i[1])),h.match(e)||(r[h]={value:u(l,c),name:h,type:l})}}return r}r.__esModule=!0;var s=t("pixi-gl-core"),a=i(s),u=a.default.shader.defaultValue;r.default=n},{"pixi-gl-core":7}],120:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0;var n=t("../../../math"),o=i(n),s=function(t,e,r){var i=t.identity();return i.translate(e.x/r.width,e.y/r.height),i.scale(r.width,r.height),i},a=function(t,e,r){var i=t.identity();i.translate(e.x/r.width,e.y/r.height);var n=r.width/e.width,o=r.height/e.height;return i.scale(n,o),i},u=function(t,e,r,i){var n=i.worldTransform.copy(o.default.Matrix.TEMP_MATRIX),s=i._texture.baseTexture,a=t.identity(),u=r.height/r.width;a.translate(e.x/r.width,e.y/r.height),a.scale(1,u);var l=r.width/s.width,h=r.height/s.height;return n.tx/=s.width*l,n.ty/=s.width*l,n.invert(),a.prepend(n),a.scale(1,1/u),a.scale(l,h),a.translate(i.anchor.x,i.anchor.y),a};r.default={calculateScreenSpaceMatrix:s,calculateNormalizedScreenSpaceMatrix:a,calculateSpriteMatrix:u}},{"../../../math":102}],121:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}r.__esModule=!0;var a=t("../Filter"),u=i(a),l=t("../../../../math"),h=i(l),c=function(t){function e(r){n(this,e);var i=new h.default.Matrix,s=o(this,t.call(this,"#define GLSLIFY 1\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 otherMatrix;\n\nvarying vec2 vMaskCoord;\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n    gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n    vTextureCoord = aTextureCoord;\n    vMaskCoord = ( otherMatrix * vec3( aTextureCoord, 1.0)  ).xy;\n}\n","#define GLSLIFY 1\nvarying vec2 vMaskCoord;\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform float alpha;\nuniform sampler2D mask;\n\nvoid main(void)\n{\n    // check clip! this will stop the mask bleeding out from the edges\n    vec2 text = abs( vMaskCoord - 0.5 );\n    text = step(0.5, text);\n    float clip = 1.0 - max(text.y, text.x);\n    vec4 original = texture2D(uSampler, vTextureCoord);\n    vec4 masky = texture2D(mask, vMaskCoord);\n    original *= (masky.r * masky.a * alpha * clip);\n    gl_FragColor = original;\n}\n"));return r.renderable=!1,s.maskSprite=r,s.maskMatrix=i,s}return s(e,t),e.prototype.apply=function(t,e,r){var i=this.maskSprite;this.uniforms.mask=i._texture,this.uniforms.otherMatrix=t.calculateSpriteMatrix(this.maskMatrix,i),this.uniforms.alpha=i.worldAlpha,t.applyFilter(this,e,r)},e}(u.default);r.default=c},{"../../../../math":102,"../Filter":118}],122:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}r.__esModule=!0;var a=t("./WebGLManager"),u=i(a),l=t("../utils/RenderTarget"),h=i(l),c=t("../utils/Quad"),f=i(c),d=t("../../../math"),p=i(d),v=t("../../../Shader"),y=i(v),g=t("../filters/filterTransforms"),_=i(g),m=t("bit-twiddle"),x=i(m),b=function t(){s(this,t),this.renderTarget=null,this.sourceFrame=new p.default.Rectangle,this.destinationFrame=new p.default.Rectangle,this.filters=[],this.target=null,this.resolution=1},T=function(t){function e(r){s(this,e);var i=n(this,t.call(this,r));return i.gl=i.renderer.gl,i.quad=new f.default(i.gl,r.state.attribState),i.shaderCache={},i.pool={},i.filterData=null,i}return o(e,t),e.prototype.pushFilter=function(t,e){var r=this.renderer,i=this.filterData;if(!i){i=this.renderer._activeRenderTarget.filterStack;var n=new b;n.sourceFrame=n.destinationFrame=this.renderer._activeRenderTarget.size,n.renderTarget=r._activeRenderTarget,this.renderer._activeRenderTarget.filterData=i={index:0,stack:[n]},this.filterData=i}var o=i.stack[++i.index];o||(o=i.stack[i.index]=new b);var s=e[0].resolution,a=0|e[0].padding,u=t.filterArea||t.getBounds(!0),l=o.sourceFrame,h=o.destinationFrame;l.x=(u.x*s|0)/s,l.y=(u.y*s|0)/s,l.width=(u.width*s|0)/s,l.height=(u.height*s|0)/s,i.stack[0].renderTarget.transform||l.fit(i.stack[0].destinationFrame),l.pad(a),h.width=l.width,h.height=l.height;var c=this.getPotRenderTarget(r.gl,l.width,l.height,s);o.target=t,o.filters=e,o.resolution=s,o.renderTarget=c,c.setFrame(h,l),r.bindRenderTarget(c),r.clear()},e.prototype.popFilter=function(){var t=this.filterData,e=t.stack[t.index-1],r=t.stack[t.index];this.quad.map(r.renderTarget.size,r.sourceFrame).upload();var i=r.filters;if(1===i.length)i[0].apply(this,r.renderTarget,e.renderTarget,!1),this.freePotRenderTarget(r.renderTarget);else{var n=r.renderTarget,o=this.getPotRenderTarget(this.renderer.gl,r.sourceFrame.width,r.sourceFrame.height,1);o.setFrame(r.destinationFrame,r.sourceFrame);var s=0;for(s;s<i.length-1;s++){i[s].apply(this,n,o,!0);var a=n;n=o,o=a}i[s].apply(this,n,e.renderTarget,!1),this.freePotRenderTarget(n),this.freePotRenderTarget(o)}t.index--,0===t.index&&(this.filterData=null)},e.prototype.applyFilter=function(t,e,r,i){var n=this.renderer,o=t.glShaders[n.CONTEXT_UID];if(o||(t.glShaderKey?(o=this.shaderCache[t.glShaderKey],o||(o=t.glShaders[n.CONTEXT_UID]=this.shaderCache[t.glShaderKey]=new y.default(this.gl,t.vertexSrc,t.fragmentSrc))):o=t.glShaders[n.CONTEXT_UID]=new y.default(this.gl,t.vertexSrc,t.fragmentSrc),this.quad.initVao(o)),n.bindRenderTarget(r),i){var s=n.gl;s.disable(s.SCISSOR_TEST),n.clear(),s.enable(s.SCISSOR_TEST)}r===n.maskManager.scissorRenderTarget&&n.maskManager.pushScissorMask(null,n.maskManager.scissorData),n.bindShader(o),this.syncUniforms(o,t),e.texture.bind(0),n._activeTextureLocation=0,n.state.setBlendMode(t.blendMode),this.quad.draw()},e.prototype.syncUniforms=function(t,e){var r=e.uniformData,i=e.uniforms,n=1,o=void 0;if(t.uniforms.data.filterArea){o=this.filterData.stack[this.filterData.index];var s=t.uniforms.filterArea;s[0]=o.renderTarget.size.width,s[1]=o.renderTarget.size.height,s[2]=o.sourceFrame.x,s[3]=o.sourceFrame.y,t.uniforms.filterArea=s}if(t.uniforms.data.filterClamp){o=this.filterData.stack[this.filterData.index];var a=t.uniforms.filterClamp;a[0]=.5/o.renderTarget.size.width,a[1]=.5/o.renderTarget.size.height,a[2]=(o.sourceFrame.width-.5)/o.renderTarget.size.width,a[3]=(o.sourceFrame.height-.5)/o.renderTarget.size.height,t.uniforms.filterClamp=a}var u=void 0;for(var l in r)if("sampler2D"===r[l].type){if(t.uniforms[l]=n,i[l].baseTexture)this.renderer.bindTexture(i[l].baseTexture,n);else{var h=this.renderer.gl;this.renderer._activeTextureLocation=h.TEXTURE0+n,h.activeTexture(h.TEXTURE0+n),i[l].texture.bind()}n++}else"mat3"===r[l].type?void 0!==i[l].a?t.uniforms[l]=i[l].toArray(!0):t.uniforms[l]=i[l]:"vec2"===r[l].type?void 0!==i[l].x?(u=t.uniforms[l]||new Float32Array(2),u[0]=i[l].x,u[1]=i[l].y,t.uniforms[l]=u):t.uniforms[l]=i[l]:"float"===r[l].type?t.uniforms.data[l].value!==r[l]&&(t.uniforms[l]=i[l]):t.uniforms[l]=i[l]},e.prototype.getRenderTarget=function(t,e){var r=this.filterData.stack[this.filterData.index],i=this.getPotRenderTarget(this.renderer.gl,r.sourceFrame.width,r.sourceFrame.height,e||r.resolution);return i.setFrame(r.destinationFrame,r.sourceFrame),i},e.prototype.returnRenderTarget=function(t){return this.freePotRenderTarget(t)},e.prototype.calculateScreenSpaceMatrix=function(t){var e=this.filterData.stack[this.filterData.index];return _.default.calculateScreenSpaceMatrix(t,e.sourceFrame,e.renderTarget.size)},e.prototype.calculateNormalizedScreenSpaceMatrix=function(t){var e=this.filterData.stack[this.filterData.index];return _.default.calculateNormalizedScreenSpaceMatrix(t,e.sourceFrame,e.renderTarget.size,e.destinationFrame)},e.prototype.calculateSpriteMatrix=function(t,e){var r=this.filterData.stack[this.filterData.index];return _.default.calculateSpriteMatrix(t,r.sourceFrame,r.renderTarget.size,e)},e.prototype.destroy=function(){this.shaderCache=[],this.emptyPool()},e.prototype.getPotRenderTarget=function(t,e,r,i){e=x.default.nextPow2(e*i),r=x.default.nextPow2(r*i);var n=(65535&e)<<16|65535&r;this.pool[n]||(this.pool[n]=[]);var o=this.pool[n].pop()||new h.default(t,e,r,null,1);return o.resolution=i,o.defaultFrame.width=o.size.width=e/i,o.defaultFrame.height=o.size.height=r/i,o},e.prototype.emptyPool=function(){for(var t in this.pool){var e=this.pool[t];if(e)for(var r=0;r<e.length;r++)e[r].destroy(!0)}this.pool={}},e.prototype.freePotRenderTarget=function(t){var e=t.size.width*t.resolution,r=t.size.height*t.resolution,i=(65535&e)<<16|65535&r;this.pool[i].push(t)},e}(u.default);r.default=T},{"../../../Shader":77,"../../../math":102,"../filters/filterTransforms":120,"../utils/Quad":127,"../utils/RenderTarget":128,"./WebGLManager":125,"bit-twiddle":30}],123:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}r.__esModule=!0;var a=t("./WebGLManager"),u=i(a),l=t("../filters/spriteMask/SpriteMaskFilter"),h=i(l),c=function(t){function e(r){n(this,e);var i=o(this,t.call(this,r));return i.scissor=!1,i.scissorData=null,i.scissorRenderTarget=null,i.enableScissor=!0,i.alphaMaskPool=[],i.alphaMaskIndex=0,i}return s(e,t),e.prototype.pushMask=function(t,e){if(e.texture)this.pushSpriteMask(t,e);else if(this.enableScissor&&!this.scissor&&!this.renderer.stencilManager.stencilMaskStack.length&&e.isFastRect()){var r=e.worldTransform,i=Math.atan2(r.b,r.a);i=Math.round(i*(180/Math.PI)),i%90?this.pushStencilMask(e):this.pushScissorMask(t,e)}else this.pushStencilMask(e)},e.prototype.popMask=function(t,e){e.texture?this.popSpriteMask(t,e):this.enableScissor&&!this.renderer.stencilManager.stencilMaskStack.length?this.popScissorMask(t,e):this.popStencilMask(t,e)},e.prototype.pushSpriteMask=function(t,e){var r=this.alphaMaskPool[this.alphaMaskIndex];r||(r=this.alphaMaskPool[this.alphaMaskIndex]=[new h.default(e)]),r[0].resolution=this.renderer.resolution,r[0].maskSprite=e,t.filterArea=e.getBounds(!0),this.renderer.filterManager.pushFilter(t,r),this.alphaMaskIndex++},e.prototype.popSpriteMask=function(){this.renderer.filterManager.popFilter(),this.alphaMaskIndex--},e.prototype.pushStencilMask=function(t){this.renderer.currentRenderer.stop(),this.renderer.stencilManager.pushStencil(t)},e.prototype.popStencilMask=function(){this.renderer.currentRenderer.stop(),this.renderer.stencilManager.popStencil()},e.prototype.pushScissorMask=function(t,e){e.renderable=!0;var r=this.renderer._activeRenderTarget,i=e.getBounds();i.fit(r.size),e.renderable=!1,this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST);var n=this.renderer.resolution;this.renderer.gl.scissor(i.x*n,(r.root?r.size.height-i.y-i.height:i.y)*n,i.width*n,i.height*n),this.scissorRenderTarget=r,this.scissorData=e,this.scissor=!0},e.prototype.popScissorMask=function(){this.scissorRenderTarget=null,this.scissorData=null,this.scissor=!1;var t=this.renderer.gl;t.disable(t.SCISSOR_TEST)},e}(u.default);r.default=c},{"../filters/spriteMask/SpriteMaskFilter":121,"./WebGLManager":125}],124:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}r.__esModule=!0;var a=t("./WebGLManager"),u=i(a),l=function(t){function e(r){n(this,e);var i=o(this,t.call(this,r));return i.stencilMaskStack=null,i}return s(e,t),e.prototype.setMaskStack=function(t){this.stencilMaskStack=t;var e=this.renderer.gl;0===t.length?e.disable(e.STENCIL_TEST):e.enable(e.STENCIL_TEST)},e.prototype.pushStencil=function(t){this.renderer.setObjectRenderer(this.renderer.plugins.graphics),this.renderer._activeRenderTarget.attachStencilBuffer();var e=this.renderer.gl,r=this.stencilMaskStack;0===r.length&&(e.enable(e.STENCIL_TEST),e.clear(e.STENCIL_BUFFER_BIT),e.stencilFunc(e.ALWAYS,1,1)),r.push(t),e.colorMask(!1,!1,!1,!1),e.stencilOp(e.KEEP,e.KEEP,e.INCR),this.renderer.plugins.graphics.render(t),e.colorMask(!0,!0,!0,!0),e.stencilFunc(e.NOTEQUAL,0,r.length),e.stencilOp(e.KEEP,e.KEEP,e.KEEP)},e.prototype.popStencil=function(){this.renderer.setObjectRenderer(this.renderer.plugins.graphics);var t=this.renderer.gl,e=this.stencilMaskStack,r=e.pop();0===e.length?t.disable(t.STENCIL_TEST):(t.colorMask(!1,!1,!1,!1),t.stencilOp(t.KEEP,t.KEEP,t.DECR),this.renderer.plugins.graphics.render(r),t.colorMask(!0,!0,!0,!0),t.stencilFunc(t.NOTEQUAL,0,e.length),t.stencilOp(t.KEEP,t.KEEP,t.KEEP))},e.prototype.destroy=function(){u.default.prototype.destroy.call(this),this.stencilMaskStack.stencilStack=null},e}(u.default);r.default=l},{"./WebGLManager":125}],125:[function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}r.__esModule=!0;var n=function(){function t(e){i(this,t),this.renderer=e,this.renderer.on("context",this.onContextChange,this)}return t.prototype.onContextChange=function(){},t.prototype.destroy=function(){this.renderer.off("context",this.onContextChange,this),this.renderer=null},t}();r.default=n},{}],126:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}r.__esModule=!0;var a=t("../managers/WebGLManager"),u=i(a),l=function(t){function e(r){return n(this,e),o(this,t.call(this,r))}return s(e,t),e.prototype.start=function(){},e.prototype.stop=function(){this.flush()},e.prototype.flush=function(){},e.prototype.render=function(t){},e}(u.default);r.default=l},{"../managers/WebGLManager":125}],127:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}r.__esModule=!0;var o=t("pixi-gl-core"),s=i(o),a=t("../../../utils/createIndicesForQuads"),u=i(a),l=function(){function t(e,r){n(this,t),this.gl=e,this.vertices=new Float32Array([-1,-1,1,-1,1,1,-1,1]),this.uvs=new Float32Array([0,0,1,0,1,1,0,1]),this.interleaved=new Float32Array(16);for(var i=0;i<4;i++)this.interleaved[4*i]=this.vertices[2*i],this.interleaved[4*i+1]=this.vertices[2*i+1],this.interleaved[4*i+2]=this.uvs[2*i],this.interleaved[4*i+3]=this.uvs[2*i+1];this.indices=(0,u.default)(1),this.vertexBuffer=s.default.GLBuffer.createVertexBuffer(e,this.interleaved,e.STATIC_DRAW),this.indexBuffer=s.default.GLBuffer.createIndexBuffer(e,this.indices,e.STATIC_DRAW),this.vao=new s.default.VertexArrayObject(e,r)}return t.prototype.initVao=function(t){this.vao.clear().addIndex(this.indexBuffer).addAttribute(this.vertexBuffer,t.attributes.aVertexPosition,this.gl.FLOAT,!1,16,0).addAttribute(this.vertexBuffer,t.attributes.aTextureCoord,this.gl.FLOAT,!1,16,8)},t.prototype.map=function(t,e){var r=0,i=0;return this.uvs[0]=r,this.uvs[1]=i,this.uvs[2]=r+e.width/t.width,this.uvs[3]=i,this.uvs[4]=r+e.width/t.width,this.uvs[5]=i+e.height/t.height,this.uvs[6]=r,this.uvs[7]=i+e.height/t.height,r=e.x,i=e.y,this.vertices[0]=r,this.vertices[1]=i,this.vertices[2]=r+e.width,this.vertices[3]=i,this.vertices[4]=r+e.width,this.vertices[5]=i+e.height,this.vertices[6]=r,this.vertices[7]=i+e.height,this},t.prototype.draw=function(){return this.vao.bind().draw(this.gl.TRIANGLES,6,0).unbind(),this},t.prototype.upload=function(){for(var t=0;t<4;t++)this.interleaved[4*t]=this.vertices[2*t],this.interleaved[4*t+1]=this.vertices[2*t+1],this.interleaved[4*t+2]=this.uvs[2*t],this.interleaved[4*t+3]=this.uvs[2*t+1];return this.vertexBuffer.upload(this.interleaved),this},t.prototype.destroy=function(){var t=this.gl;t.deleteBuffer(this.vertexBuffer),t.deleteBuffer(this.indexBuffer)},t}();r.default=l},{"../../../utils/createIndicesForQuads":149,"pixi-gl-core":7}],128:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}r.__esModule=!0;var o=t("../../../math"),s=i(o),a=t("../../../const"),u=i(a),l=t("pixi-gl-core"),h=function(){function t(e,r,i,o,a,h){n(this,t),this.gl=e,this.frameBuffer=null,this.texture=null,this.clearColor=[0,0,0,0],this.size=new s.default.Rectangle(0,0,1,1),this.resolution=a||u.default.RESOLUTION,this.projectionMatrix=new s.default.Matrix,this.transform=null,this.frame=null,this.defaultFrame=new s.default.Rectangle,this.destinationFrame=null,this.sourceFrame=null,this.stencilBuffer=null,this.stencilMaskStack=[],this.filterData=null,this.scaleMode=o||u.default.SCALE_MODES.DEFAULT,this.root=h,this.root?(this.frameBuffer=new l.GLFramebuffer(e,100,100),this.frameBuffer.framebuffer=null):(this.frameBuffer=l.GLFramebuffer.createRGBA(e,100,100),this.scaleMode===u.default.SCALE_MODES.NEAREST?this.frameBuffer.texture.enableNearestScaling():this.frameBuffer.texture.enableLinearScaling(),this.texture=this.frameBuffer.texture),this.setFrame(),this.resize(r,i)}return t.prototype.clear=function(t){var e=t||this.clearColor;this.frameBuffer.clear(e[0],e[1],e[2],e[3])},t.prototype.attachStencilBuffer=function(){this.root||this.frameBuffer.enableStencil()},t.prototype.setFrame=function(t,e){this.destinationFrame=t||this.destinationFrame||this.defaultFrame,this.sourceFrame=e||this.sourceFrame||t},t.prototype.activate=function(){var t=this.gl;this.frameBuffer.bind(),this.calculateProjection(this.destinationFrame,this.sourceFrame),this.transform&&this.projectionMatrix.append(this.transform),this.destinationFrame!==this.sourceFrame?(t.enable(t.SCISSOR_TEST),t.scissor(0|this.destinationFrame.x,0|this.destinationFrame.y,this.destinationFrame.width*this.resolution|0,this.destinationFrame.height*this.resolution|0)):t.disable(t.SCISSOR_TEST),t.viewport(0|this.destinationFrame.x,0|this.destinationFrame.y,this.destinationFrame.width*this.resolution|0,this.destinationFrame.height*this.resolution|0)},t.prototype.calculateProjection=function(t,e){var r=this.projectionMatrix;
e=e||t,r.identity(),this.root?(r.a=1/t.width*2,r.d=-1/t.height*2,r.tx=-1-e.x*r.a,r.ty=1-e.y*r.d):(r.a=1/t.width*2,r.d=1/t.height*2,r.tx=-1-e.x*r.a,r.ty=-1-e.y*r.d)},t.prototype.resize=function(t,e){if(t=0|t,e=0|e,this.size.width!==t||this.size.height!==e){this.size.width=t,this.size.height=e,this.defaultFrame.width=t,this.defaultFrame.height=e,this.frameBuffer.resize(t*this.resolution,e*this.resolution);var r=this.frame||this.size;this.calculateProjection(r)}},t.prototype.destroy=function(){this.frameBuffer.destroy(),this.frameBuffer=null,this.texture=null},t}();r.default=h},{"../../../const":78,"../../../math":102,"pixi-gl-core":7}],129:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t){for(var e="",r=0;r<t;r++)r>0&&(e+="\nelse "),r<t-1&&(e+="if(test == "+r+".0){}");return e}r.__esModule=!0;var o=t("pixi-gl-core"),s=i(o),a=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join("\n"),u=function(t,e){var r=!e;if(r){var i=document.createElement("canvas");i.width=1,i.height=1,e=s.default.createContext(i)}for(var o=e.createShader(e.FRAGMENT_SHADER);;){var u=a.replace(/%forloop%/gi,n(t));if(e.shaderSource(o,u),e.compileShader(o),e.getShaderParameter(o,e.COMPILE_STATUS))break;t=t/2|0}return r&&e.getExtension("WEBGL_lose_context")&&e.getExtension("WEBGL_lose_context").loseContext(),t};r.default=u},{"pixi-gl-core":7}],130:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t){var e=arguments.length<=1||void 0===arguments[1]?[]:arguments[1];return e[s.default.BLEND_MODES.NORMAL]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[s.default.BLEND_MODES.ADD]=[t.ONE,t.DST_ALPHA],e[s.default.BLEND_MODES.MULTIPLY]=[t.DST_COLOR,t.ONE_MINUS_SRC_ALPHA],e[s.default.BLEND_MODES.SCREEN]=[t.ONE,t.ONE_MINUS_SRC_COLOR],e[s.default.BLEND_MODES.OVERLAY]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[s.default.BLEND_MODES.DARKEN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[s.default.BLEND_MODES.LIGHTEN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[s.default.BLEND_MODES.COLOR_DODGE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[s.default.BLEND_MODES.COLOR_BURN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[s.default.BLEND_MODES.HARD_LIGHT]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[s.default.BLEND_MODES.SOFT_LIGHT]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[s.default.BLEND_MODES.DIFFERENCE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[s.default.BLEND_MODES.EXCLUSION]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[s.default.BLEND_MODES.HUE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[s.default.BLEND_MODES.SATURATION]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[s.default.BLEND_MODES.COLOR]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[s.default.BLEND_MODES.LUMINOSITY]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e}r.__esModule=!0;var o=t("../../../const"),s=i(o);r.default=n},{"../../../const":78}],131:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];e[s.default.DRAW_MODES.POINTS]=t.POINTS,e[s.default.DRAW_MODES.LINES]=t.LINES,e[s.default.DRAW_MODES.LINE_LOOP]=t.LINE_LOOP,e[s.default.DRAW_MODES.LINE_STRIP]=t.LINE_STRIP,e[s.default.DRAW_MODES.TRIANGLES]=t.TRIANGLES,e[s.default.DRAW_MODES.TRIANGLE_STRIP]=t.TRIANGLE_STRIP,e[s.default.DRAW_MODES.TRIANGLE_FAN]=t.TRIANGLE_FAN}r.__esModule=!0;var o=t("../../../const"),s=i(o);r.default=n},{"../../../const":78}],132:[function(t,e,r){"use strict";function i(t){var e=t.getContextAttributes();e.stencil||console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly")}r.__esModule=!0,r.default=i},{}],133:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}r.__esModule=!0;var a=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),u=t("../math"),l=i(u),h=t("../textures/Texture"),c=i(h),f=t("../display/Container"),d=i(f),p=t("../utils"),v=i(p),y=t("../const"),g=i(y),_=new l.default.Point,m=function(t){function e(r){n(this,e);var i=o(this,t.call(this));return i.anchor=new l.default.ObservablePoint(i.onAnchorUpdate,i),i._texture=null,i._width=0,i._height=0,i._tint=null,i._tintRGB=null,i.tint=16777215,i.blendMode=g.default.BLEND_MODES.NORMAL,i.shader=null,i.cachedTint=16777215,i.texture=r||c.default.EMPTY,i.vertexData=new Float32Array(8),i.vertexTrimmedData=null,i._transformID=-1,i._textureID=-1,i}return s(e,t),e.prototype._onTextureUpdate=function(){this._textureID=-1,this._width&&(this.scale.x=v.default.sign(this.scale.x)*this._width/this.texture.orig.width),this._height&&(this.scale.y=v.default.sign(this.scale.y)*this._height/this.texture.orig.height)},e.prototype.onAnchorUpdate=function(){this._transformID=-1},e.prototype.calculateVertices=function(){if(this._transformID!==this.transform._worldID||this._textureID!==this._texture._updateID){this._transformID=this.transform._worldID,this._textureID=this._texture._updateID;var t=this._texture,e=this.transform.worldTransform,r=e.a,i=e.b,n=e.c,o=e.d,s=e.tx,a=e.ty,u=this.vertexData,l=t.trim,h=t.orig,c=void 0,f=void 0,d=void 0,p=void 0;l?(f=l.x-this.anchor._x*h.width,c=f+l.width,p=l.y-this.anchor._y*h.height,d=p+l.height):(c=h.width*(1-this.anchor._x),f=h.width*-this.anchor._x,d=h.height*(1-this.anchor._y),p=h.height*-this.anchor._y),u[0]=r*f+n*p+s,u[1]=o*p+i*f+a,u[2]=r*c+n*p+s,u[3]=o*p+i*c+a,u[4]=r*c+n*d+s,u[5]=o*d+i*c+a,u[6]=r*f+n*d+s,u[7]=o*d+i*f+a}},e.prototype.calculateTrimmedVertices=function(){this.vertexTrimmedData||(this.vertexTrimmedData=new Float32Array(8));var t=this._texture,e=this.vertexTrimmedData,r=t.orig,i=this.transform.worldTransform,n=i.a,o=i.b,s=i.c,a=i.d,u=i.tx,l=i.ty,h=void 0,c=void 0,f=void 0,d=void 0;h=r.width*(1-this.anchor._x),c=r.width*-this.anchor._x,f=r.height*(1-this.anchor._y),d=r.height*-this.anchor._y,e[0]=n*c+s*d+u,e[1]=a*d+o*c+l,e[2]=n*h+s*d+u,e[3]=a*d+o*h+l,e[4]=n*h+s*f+u,e[5]=a*f+o*h+l,e[6]=n*c+s*f+u,e[7]=a*f+o*c+l},e.prototype._renderWebGL=function(t){this.calculateVertices(),t.setObjectRenderer(t.plugins.sprite),t.plugins.sprite.render(this)},e.prototype._renderCanvas=function(t){t.plugins.sprite.render(this)},e.prototype._calculateBounds=function(){var t=this._texture.trim,e=this._texture.orig;!t||t.width===e.width&&t.height===e.height?(this.calculateVertices(),this._bounds.addQuad(this.vertexData)):(this.calculateTrimmedVertices(),this._bounds.addQuad(this.vertexTrimmedData))},e.prototype.getLocalBounds=function(t){return 0===this.children.length?(this._bounds.minX=-this._texture.orig.width*this.anchor._x,this._bounds.minY=-this._texture.orig.height*this.anchor._y,this._bounds.maxX=this._texture.orig.width,this._bounds.maxY=this._texture.orig.height,t||(this._localBoundsRect||(this._localBoundsRect=new l.default.Rectangle),t=this._localBoundsRect),this._bounds.getRectangle(t)):d.default.prototype.getLocalBounds.call(this,t)},e.prototype.containsPoint=function(t){this.worldTransform.applyInverse(t,_);var e=this._texture.orig.width,r=this._texture.orig.height,i=-e*this.anchor.x,n=void 0;return _.x>i&&_.x<i+e&&(n=-r*this.anchor.y,_.y>n&&_.y<n+r)},e.prototype.destroy=function(e){t.prototype.destroy.call(this,e),this.anchor=null;var r="boolean"==typeof e?e:e&&e.texture;if(r){var i="boolean"==typeof e?e:e&&e.baseTexture;this._texture.destroy(!!i)}this._texture=null,this.shader=null},e.from=function(t){return new e(c.default.from(t))},e.fromFrame=function(t){var r=v.default.TextureCache[t];if(!r)throw new Error('The frameId "'+t+'" does not exist in the texture cache');return new e(r)},e.fromImage=function(t,r,i){return new e(c.default.fromImage(t,r,i))},a(e,[{key:"width",get:function(){return Math.abs(this.scale.x)*this.texture.orig.width},set:function(t){var e=v.default.sign(this.scale.x)||1;this.scale.x=e*t/this.texture.orig.width,this._width=t}},{key:"height",get:function(){return Math.abs(this.scale.y)*this.texture.orig.height},set:function(t){var e=v.default.sign(this.scale.y)||1;this.scale.y=e*t/this.texture.orig.height,this._height=t}},{key:"tint",get:function(){return this._tint},set:function(t){this._tint=t,this._tintRGB=(t>>16)+(65280&t)+((255&t)<<16)}},{key:"texture",get:function(){return this._texture},set:function(t){this._texture!==t&&(this._texture=t,this.cachedTint=16777215,this._textureID=-1,t&&(t.baseTexture.hasLoaded?this._onTextureUpdate():t.once("update",this._onTextureUpdate,this)))}}]),e}(d.default);r.default=m},{"../const":78,"../display/Container":80,"../math":102,"../textures/Texture":144,"../utils":151}],134:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}r.__esModule=!0;var o=t("../../renderers/canvas/CanvasRenderer"),s=i(o),a=t("../../const"),u=i(a),l=t("../../math"),h=i(l),c=t("./CanvasTinter"),f=i(c),d=new h.default.Matrix,p=function(){function t(e){n(this,t),this.renderer=e}return t.prototype.render=function(t){var e=t._texture,r=this.renderer,i=t.transform.worldTransform,n=void 0,o=void 0,s=e._frame.width,a=e._frame.height;if(!(e.orig.width<=0||e.orig.height<=0)&&e.baseTexture.source&&(r.setBlendMode(t.blendMode),e.valid)){r.context.globalAlpha=t.worldAlpha;var l=e.baseTexture.scaleMode===u.default.SCALE_MODES.LINEAR;r.smoothProperty&&r.context[r.smoothProperty]!==l&&(r.context[r.smoothProperty]=l),e.trim?(n=e.trim.width/2+e.trim.x-t.anchor.x*e.orig.width,o=e.trim.height/2+e.trim.y-t.anchor.y*e.orig.height):(n=(.5-t.anchor.x)*e.orig.width,o=(.5-t.anchor.y)*e.orig.height),e.rotate&&(i.copy(d),i=d,h.default.GroupD8.matrixAppendRotationInv(i,e.rotate,n,o),n=0,o=0),n-=s/2,o-=a/2,r.roundPixels?(r.context.setTransform(i.a,i.b,i.c,i.d,i.tx*r.resolution|0,i.ty*r.resolution|0),n=0|n,o=0|o):r.context.setTransform(i.a,i.b,i.c,i.d,i.tx*r.resolution,i.ty*r.resolution);var c=e.baseTexture.resolution;16777215!==t.tint?(t.cachedTint!==t.tint&&(t.cachedTint=t.tint,t.tintedTexture=f.default.getTintedTexture(t,t.tint)),r.context.drawImage(t.tintedTexture,0,0,s*c,a*c,n*r.resolution,o*r.resolution,s*r.resolution,a*r.resolution)):r.context.drawImage(e.baseTexture.source,e._frame.x*c,e._frame.y*c,s*c,a*c,n*r.resolution,o*r.resolution,s*r.resolution,a*r.resolution)}},t.prototype.destroy=function(){this.renderer=null},t}();s.default.registerPlugin("sprite",p),r.default=p},{"../../const":78,"../../math":102,"../../renderers/canvas/CanvasRenderer":109,"./CanvasTinter":135}],135:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0;var n=t("../../utils"),o=i(n),s=t("../../renderers/canvas/utils/canUseNewCanvasBlendModes"),a=i(s),u={getTintedTexture:function(t,e){var r=t.texture;e=u.roundColor(e);var i="#"+("00000"+(0|e).toString(16)).substr(-6);if(r.tintCache=r.tintCache||{},r.tintCache[i])return r.tintCache[i];var n=u.canvas||document.createElement("canvas");if(u.tintMethod(r,e,n),u.convertTintToImage){var o=new Image;o.src=n.toDataURL(),r.tintCache[i]=o}else r.tintCache[i]=n,u.canvas=null;return n},tintWithMultiply:function(t,e,r){var i=r.getContext("2d"),n=t._frame.clone(),o=t.baseTexture.resolution;n.x*=o,n.y*=o,n.width*=o,n.height*=o,r.width=n.width,r.height=n.height,i.fillStyle="#"+("00000"+(0|e).toString(16)).substr(-6),i.fillRect(0,0,n.width,n.height),i.globalCompositeOperation="multiply",i.drawImage(t.baseTexture.source,n.x,n.y,n.width,n.height,0,0,n.width,n.height),i.globalCompositeOperation="destination-atop",i.drawImage(t.baseTexture.source,n.x,n.y,n.width,n.height,0,0,n.width,n.height)},tintWithOverlay:function(t,e,r){var i=r.getContext("2d"),n=t._frame.clone(),o=t.baseTexture.resolution;n.x*=o,n.y*=o,n.width*=o,n.height*=o,r.width=n.width,r.height=n.height,i.globalCompositeOperation="copy",i.fillStyle="#"+("00000"+(0|e).toString(16)).substr(-6),i.fillRect(0,0,n.width,n.height),i.globalCompositeOperation="destination-atop",i.drawImage(t.baseTexture.source,n.x,n.y,n.width,n.height,0,0,n.width,n.height)},tintWithPerPixel:function(t,e,r){var i=r.getContext("2d"),n=t._frame.clone(),s=t.baseTexture.resolution;n.x*=s,n.y*=s,n.width*=s,n.height*=s,r.width=n.width,r.height=n.height,i.globalCompositeOperation="copy",i.drawImage(t.baseTexture.source,n.x,n.y,n.width,n.height,0,0,n.width,n.height);for(var a=o.default.hex2rgb(e),u=a[0],l=a[1],h=a[2],c=i.getImageData(0,0,n.width,n.height),f=c.data,d=0;d<f.length;d+=4)f[d+0]*=u,f[d+1]*=l,f[d+2]*=h;i.putImageData(c,0,0)},roundColor:function(t){var e=u.cacheStepsPerColorChannel,r=o.default.hex2rgb(t);return r[0]=Math.min(255,r[0]/e*e),r[1]=Math.min(255,r[1]/e*e),r[2]=Math.min(255,r[2]/e*e),o.default.rgb2hex(r)},cacheStepsPerColorChannel:8,convertTintToImage:!1,canUseMultiply:(0,a.default)(),tintMethod:0};u.tintMethod=u.canUseMultiply?u.tintWithMultiply:u.tintWithPerPixel,r.default=u},{"../../renderers/canvas/utils/canUseNewCanvasBlendModes":112,"../../utils":151}],136:[function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}r.__esModule=!0;var n=function(){function t(e){i(this,t),this.vertices=new ArrayBuffer(e),this.float32View=new Float32Array(this.vertices),this.uint32View=new Uint32Array(this.vertices)}return t.prototype.destroy=function(){this.vertices=null,this.positions=null,this.uvs=null,this.colors=null},t}();r.default=n},{}],137:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}r.__esModule=!0;var a=t("../../renderers/webgl/utils/ObjectRenderer"),u=i(a),l=t("../../renderers/webgl/WebGLRenderer"),h=i(l),c=t("../../utils/createIndicesForQuads"),f=i(c),d=t("./generateMultiTextureShader"),p=i(d),v=t("../../renderers/webgl/utils/checkMaxIfStatmentsInShader"),y=i(v),g=t("./BatchBuffer"),_=i(g),m=t("../../const"),x=i(m),b=t("pixi-gl-core"),T=i(b),w=t("bit-twiddle"),E=i(w),S=0,M=function(t){function e(r){n(this,e);var i=o(this,t.call(this,r));i.vertSize=5,i.vertByteSize=4*i.vertSize,i.size=x.default.SPRITE_BATCH_SIZE,i.buffers=[];for(var s=1;s<=E.default.nextPow2(i.size);s*=2){var a=4*s*i.vertByteSize;i.buffers.push(new _.default(a))}i.indices=(0,f.default)(i.size),i.shaders=null,i.currentIndex=0,S=0,i.groups=[];for(var u=0;u<i.size;u++)i.groups[u]={textures:[],textureCount:0,ids:[],size:0,start:0,blend:0};return i.sprites=[],i.vertexBuffers=[],i.vaos=[],i.vaoMax=2,i.vertexCount=0,i.renderer.on("prerender",i.onPrerender,i),i}return s(e,t),e.prototype.onContextChange=function(){var t=this.renderer.gl;this.MAX_TEXTURES=Math.min(t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),x.default.SPRITE_MAX_TEXTURES),this.MAX_TEXTURES=(0,y.default)(this.MAX_TEXTURES,t),this.shaders=new Array(this.MAX_TEXTURES),this.shaders[0]=(0,p.default)(t,1),this.shaders[1]=(0,p.default)(t,2),this.indexBuffer=T.default.GLBuffer.createIndexBuffer(t,this.indices,t.STATIC_DRAW);for(var e=this.shaders[1],r=0;r<this.vaoMax;r++)this.vertexBuffers[r]=T.default.GLBuffer.createVertexBuffer(t,null,t.STREAM_DRAW),this.vaos[r]=this.renderer.createVao().addIndex(this.indexBuffer).addAttribute(this.vertexBuffers[r],e.attributes.aVertexPosition,t.FLOAT,!1,this.vertByteSize,0).addAttribute(this.vertexBuffers[r],e.attributes.aTextureCoord,t.UNSIGNED_SHORT,!0,this.vertByteSize,8).addAttribute(this.vertexBuffers[r],e.attributes.aColor,t.UNSIGNED_BYTE,!0,this.vertByteSize,12).addAttribute(this.vertexBuffers[r],e.attributes.aTextureId,t.FLOAT,!1,this.vertByteSize,16);this.vao=this.vaos[0],this.currentBlendMode=99999},e.prototype.onPrerender=function(){this.vertexCount=0},e.prototype.render=function(t){this.currentIndex>=this.size&&this.flush(),t.texture._uvs&&(this.sprites[this.currentIndex++]=t)},e.prototype.flush=function(){if(0!==this.currentIndex){var t=this.renderer.gl,e=E.default.nextPow2(this.currentIndex),r=E.default.log2(e),i=this.buffers[r],n=this.sprites,o=this.groups,s=i.float32View,a=i.uint32View,u=0,l=void 0,h=void 0,c=1,f=0,d=o[0],v=void 0,y=void 0,g=void 0,_=void 0,m=n[0].blendMode,x=void 0;d.textureCount=0,d.start=0,d.blend=m,S++;var b=void 0;for(b=0;b<this.currentIndex;b++){var w=n[b];if(l=w._texture.baseTexture,m!==w.blendMode&&(m=w.blendMode,h=null,f=this.MAX_TEXTURES,S++),h!==l&&(h=l,l._enabled!==S&&(f===this.MAX_TEXTURES&&(S++,f=0,d.size=b-d.start,d=o[c++],d.textureCount=0,d.blend=m,d.start=b),l._enabled=S,l._id=f,d.textures[d.textureCount++]=l,f++)),v=w.vertexData,y=w._tintRGB+(255*w.worldAlpha<<24),g=w._texture._uvs.uvsUint32,_=l._id,this.renderer.roundPixels){var M=this.renderer.resolution;s[u]=(v[0]*M|0)/M,s[u+1]=(v[1]*M|0)/M,s[u+5]=(v[2]*M|0)/M,s[u+6]=(v[3]*M|0)/M,s[u+10]=(v[4]*M|0)/M,s[u+11]=(v[5]*M|0)/M,s[u+15]=(v[6]*M|0)/M,s[u+16]=(v[7]*M|0)/M}else s[u]=v[0],s[u+1]=v[1],s[u+5]=v[2],s[u+6]=v[3],s[u+10]=v[4],s[u+11]=v[5],s[u+15]=v[6],s[u+16]=v[7];a[u+2]=g[0],a[u+7]=g[1],a[u+12]=g[2],a[u+17]=g[3],a[u+3]=a[u+8]=a[u+13]=a[u+18]=y,s[u+4]=s[u+9]=s[u+14]=s[u+19]=_,u+=20}for(d.size=b-d.start,this.vertexCount++,this.vaoMax<=this.vertexCount&&(this.vaoMax++,x=this.shaders[1],this.vertexBuffers[this.vertexCount]=T.default.GLBuffer.createVertexBuffer(t,null,t.STREAM_DRAW),this.vaos[this.vertexCount]=this.renderer.createVao().addIndex(this.indexBuffer).addAttribute(this.vertexBuffers[this.vertexCount],x.attributes.aVertexPosition,t.FLOAT,!1,this.vertByteSize,0).addAttribute(this.vertexBuffers[this.vertexCount],x.attributes.aTextureCoord,t.UNSIGNED_SHORT,!0,this.vertByteSize,8).addAttribute(this.vertexBuffers[this.vertexCount],x.attributes.aColor,t.UNSIGNED_BYTE,!0,this.vertByteSize,12).addAttribute(this.vertexBuffers[this.vertexCount],x.attributes.aTextureId,t.FLOAT,!1,this.vertByteSize,16)),this.vertexBuffers[this.vertexCount].upload(i.vertices,0),this.vao=this.vaos[this.vertexCount].bind(),b=0;b<c;b++){var O=o[b],C=O.textureCount;x=this.shaders[C-1],x||(x=this.shaders[C-1]=(0,p.default)(t,C)),this.renderer.bindShader(x);for(var R=0;R<C;R++)this.renderer.bindTexture(O.textures[R],R);this.renderer.state.setBlendMode(O.blend),t.drawElements(t.TRIANGLES,6*O.size,t.UNSIGNED_SHORT,6*O.start*2)}this.currentIndex=0}},e.prototype.start=function(){},e.prototype.stop=function(){this.flush(),this.vao.unbind()},e.prototype.destroy=function(){for(var e=0;e<this.vaoMax;e++)this.vertexBuffers[e].destroy(),this.vaos[e].destroy();this.indexBuffer.destroy(),this.renderer.off("prerender",this.onPrerender,this),t.prototype.destroy.call(this);for(var r=0;r<this.shaders.length;r++)this.shaders[r]&&this.shaders[r].destroy();this.vertexBuffers=null,this.vaos=null,this.indexBuffer=null,this.indices=null,this.sprites=null;for(var i=0;i<this.buffers.length;i++)this.buffers[i].destroy()},e}(u.default);h.default.registerPlugin("sprite",M),r.default=M},{"../../const":78,"../../renderers/webgl/WebGLRenderer":116,"../../renderers/webgl/utils/ObjectRenderer":126,"../../renderers/webgl/utils/checkMaxIfStatmentsInShader":129,"../../utils/createIndicesForQuads":149,"./BatchBuffer":136,"./generateMultiTextureShader":138,"bit-twiddle":30,"pixi-gl-core":7}],138:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){var r="#define GLSLIFY 1\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\nattribute vec4 aColor;\nattribute float aTextureId;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\nvarying float vTextureId;\n\nvoid main(void){\n   gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n   vTextureCoord = aTextureCoord;\n   vTextureId = aTextureId;\n   vColor = vec4(aColor.rgb * aColor.a, aColor.a);\n}\n",i=u;i=i.replace(/%count%/gi,e),i=i.replace(/%forloop%/gi,o(e));for(var n=new a.default(t,r,i),s=[],l=0;l<e;l++)s[l]=l;return n.bind(),n.uniforms.uSamplers=s,n}function o(t){var e="";e+="\n",e+="\n";for(var r=0;r<t;r++)r>0&&(e+="\nelse "),r<t-1&&(e+="if(textureId == "+r+".0)"),e+="\n{",e+="\n\tcolor = texture2D(uSamplers["+r+"], vTextureCoord);",e+="\n}";return e+="\n",e+="\n"}r.__esModule=!0;var s=t("../../Shader"),a=i(s),u=["varying vec2 vTextureCoord;","varying vec4 vColor;","varying float vTextureId;","uniform sampler2D uSamplers[%count%];","void main(void){","vec4 color;","float textureId = floor(vTextureId+0.5);","%forloop%","gl_FragColor = color * vColor;","}"].join("\n");r.default=n},{"../../Shader":77}],139:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}r.__esModule=!0;var a=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),u=t("../sprites/Sprite"),l=i(u),h=t("../textures/Texture"),c=i(h),f=t("../math"),d=i(f),p=t("../utils"),v=i(p),y=t("../const"),g=i(y),_=t("./TextStyle"),m=i(_),x={texture:!0,children:!1,baseTexture:!0},b=function(t){function e(r,i){n(this,e);var s=document.createElement("canvas"),a=c.default.fromCanvas(s);a.orig=new d.default.Rectangle,a.trim=new d.default.Rectangle;var u=o(this,t.call(this,a));return u.canvas=s,u.context=u.canvas.getContext("2d"),u.resolution=g.default.RESOLUTION,u._text=null,u._style=null,u._styleListener=null,u._font="",u.text=r,u.style=i,u.localStyleID=-1,u}return s(e,t),e.prototype.updateText=function(t){var e=this._style;if(this.localStyleID!==e.styleID&&(this.dirty=!0,this.localStyleID=e.styleID),this.dirty||!t){var r="number"==typeof e.fontSize?e.fontSize+"px":e.fontSize;this._font=e.fontStyle+" "+e.fontVariant+" "+e.fontWeight+" "+r+" "+e.fontFamily,this.context.font=this._font;for(var i=e.wordWrap?this.wordWrap(this._text):this._text,n=i.split(/(?:\r\n|\r|\n)/),o=new Array(n.length),s=0,a=this.determineFontProperties(this._font),u=0;u<n.length;u++){var l=this.context.measureText(n[u]).width+(n[u].length-1)*e.letterSpacing;o[u]=l,s=Math.max(s,l)}var h=s+e.strokeThickness;e.dropShadow&&(h+=e.dropShadowDistance),h+=2*e.padding,this.canvas.width=Math.ceil((h+this.context.lineWidth)*this.resolution);var c=this.style.lineHeight||a.fontSize+e.strokeThickness,f=Math.max(c,a.fontSize+e.strokeThickness)+(n.length-1)*c;e.dropShadow&&(f+=e.dropShadowDistance),this.canvas.height=Math.ceil((f+2*this._style.padding)*this.resolution),this.context.scale(this.resolution,this.resolution),navigator.isCocoonJS&&this.context.clearRect(0,0,this.canvas.width,this.canvas.height),this.context.font=this._font,this.context.strokeStyle=e.stroke,this.context.lineWidth=e.strokeThickness,this.context.textBaseline=e.textBaseline,this.context.lineJoin=e.lineJoin,this.context.miterLimit=e.miterLimit;var d=void 0,p=void 0;if(e.dropShadow){e.dropShadowBlur>0?(this.context.shadowColor=e.dropShadowColor,this.context.shadowBlur=e.dropShadowBlur):this.context.fillStyle=e.dropShadowColor;for(var v=Math.cos(e.dropShadowAngle)*e.dropShadowDistance,y=Math.sin(e.dropShadowAngle)*e.dropShadowDistance,g=0;g<n.length;g++)d=e.strokeThickness/2,p=e.strokeThickness/2+g*c+a.ascent,"right"===e.align?d+=s-o[g]:"center"===e.align&&(d+=(s-o[g])/2),e.fill&&(this.drawLetterSpacing(n[g],d+v+e.padding,p+y+e.padding),e.stroke&&e.strokeThickness&&(this.context.strokeStyle=e.dropShadowColor,this.drawLetterSpacing(n[g],d+v+e.padding,p+y+e.padding,!0),this.context.strokeStyle=e.stroke))}this.context.fillStyle=this._generateFillStyle(e,n);for(var _=0;_<n.length;_++)d=e.strokeThickness/2,p=e.strokeThickness/2+_*c+a.ascent,"right"===e.align?d+=s-o[_]:"center"===e.align&&(d+=(s-o[_])/2),e.stroke&&e.strokeThickness&&this.drawLetterSpacing(n[_],d+e.padding,p+e.padding,!0),e.fill&&this.drawLetterSpacing(n[_],d+e.padding,p+e.padding);this.updateTexture()}},e.prototype.drawLetterSpacing=function(t,e,r){var i=!(arguments.length<=3||void 0===arguments[3])&&arguments[3],n=this._style,o=n.letterSpacing;if(0===o)return void(i?this.context.strokeText(t,e,r):this.context.fillText(t,e,r));for(var s=String.prototype.split.call(t,""),a=e,u=0,l=void 0;u<t.length;)l=s[u++],i?this.context.strokeText(l,a,r):this.context.fillText(l,a,r),a+=this.context.measureText(l).width+o},e.prototype.updateTexture=function(){var t=this._texture,e=this._style;t.baseTexture.hasLoaded=!0,t.baseTexture.resolution=this.resolution,t.baseTexture.realWidth=this.canvas.width,t.baseTexture.realHeight=this.canvas.height,t.baseTexture.width=this.canvas.width/this.resolution,t.baseTexture.height=this.canvas.height/this.resolution,t.trim.width=t._frame.width=this.canvas.width/this.resolution,t.trim.height=t._frame.height=this.canvas.height/this.resolution,t.trim.x=-e.padding,t.trim.y=-e.padding,t.orig.width=t._frame.width-2*e.padding,t.orig.height=t._frame.height-2*e.padding,this._onTextureUpdate(),t.baseTexture.emit("update",t.baseTexture),this.dirty=!1},e.prototype.renderWebGL=function(e){this.resolution!==e.resolution&&(this.resolution=e.resolution,this.dirty=!0),this.updateText(!0),t.prototype.renderWebGL.call(this,e)},e.prototype._renderCanvas=function(e){this.resolution!==e.resolution&&(this.resolution=e.resolution,this.dirty=!0),this.updateText(!0),t.prototype._renderCanvas.call(this,e)},e.prototype.determineFontProperties=function(t){var r=e.fontPropertiesCache[t];if(!r){r={};var i=e.fontPropertiesCanvas,n=e.fontPropertiesContext;n.font=t;var o=Math.ceil(n.measureText("|MÉq").width),s=Math.ceil(n.measureText("M").width),a=2*s;s=1.4*s|0,i.width=o,i.height=a,n.fillStyle="#f00",n.fillRect(0,0,o,a),n.font=t,n.textBaseline="alphabetic",n.fillStyle="#000",n.fillText("|MÉq",0,s);var u=n.getImageData(0,0,o,a).data,l=u.length,h=4*o,c=0,f=!1,d=void 0;for(d=0;d<s;d++){for(var p=0;p<h;p+=4)if(255!==u[c+p]){f=!0;break}if(f)break;c+=h}for(r.ascent=s-d,c=l-h,f=!1,d=a;d>s;d--){for(var v=0;v<h;v+=4)if(255!==u[c+v]){f=!0;break}if(f)break;c-=h}r.descent=d-s,r.fontSize=r.ascent+r.descent,e.fontPropertiesCache[t]=r}return r},e.prototype.wordWrap=function(t){for(var e="",r=t.split("\n"),i=this._style.wordWrapWidth,n=0;n<r.length;n++){for(var o=i,s=r[n].split(" "),a=0;a<s.length;a++){var u=this.context.measureText(s[a]).width;if(this._style.breakWords&&u>i)for(var l=s[a].split(""),h=0;h<l.length;h++){var c=this.context.measureText(l[h]).width;c>o?(e+="\n"+l[h],o=i-c):(0===h&&(e+=" "),e+=l[h],o-=c)}else{var f=u+this.context.measureText(" ").width;0===a||f>o?(a>0&&(e+="\n"),e+=s[a],o=i-u):(o-=f,e+=" "+s[a])}}n<r.length-1&&(e+="\n")}return e},e.prototype._calculateBounds=function(){this.updateText(!0),this.calculateVertices(),this._bounds.addQuad(this.vertexData)},e.prototype._onStyleChange=function(){this.dirty=!0},e.prototype._generateFillStyle=function(t,e){if(Array.isArray(t.fill)){if(navigator.isCocoonJS)return t.fill[0];var r=void 0,i=void 0,n=void 0,o=void 0,s=this.canvas.width/this.resolution,a=this.canvas.height/this.resolution;if(t.fillGradientType===g.default.TEXT_GRADIENT.LINEAR_VERTICAL){r=this.context.createLinearGradient(s/2,0,s/2,a),i=(t.fill.length+1)*e.length,n=0;for(var u=0;u<e.length;u++){n+=1;for(var l=0;l<t.fill.length;l++)o=n/i,r.addColorStop(o,t.fill[l]),n++}}else{r=this.context.createLinearGradient(0,a/2,s,a/2),i=t.fill.length+1,n=1;for(var h=0;h<t.fill.length;h++)o=n/i,r.addColorStop(o,t.fill[h]),n++}return r}return t.fill},e.prototype.destroy=function(e){"boolean"==typeof e&&(e={children:e}),e=Object.assign({},x,e),t.prototype.destroy.call(this,e),this.context=null,this.canvas=null,this._style=null},a(e,[{key:"width",get:function(){return this.updateText(!0),Math.abs(this.scale.x)*this.texture.orig.width},set:function(t){this.updateText(!0);var e=v.default.sign(this.scale.x)||1;this.scale.x=e*t/this.texture.orig.width,this._width=t}},{key:"height",get:function(){return this.updateText(!0),Math.abs(this.scale.y)*this._texture.orig.height},set:function(t){this.updateText(!0);var e=v.default.sign(this.scale.y)||1;this.scale.y=e*t/this.texture.orig.height,this._height=t}},{key:"style",get:function(){return this._style},set:function(t){t=t||{},t instanceof m.default?this._style=t:this._style=new m.default(t),this.localStyleID=-1,this.dirty=!0}},{key:"text",get:function(){return this._text},set:function(t){t=t||" ",t=t.toString(),this._text!==t&&(this._text=t,this.dirty=!0)}}]),e}(l.default);b.fontPropertiesCache={},b.fontPropertiesCanvas=document.createElement("canvas"),b.fontPropertiesContext=b.fontPropertiesCanvas.getContext("2d"),r.default=b},{"../const":78,"../math":102,"../sprites/Sprite":133,"../textures/Texture":144,"../utils":151,"./TextStyle":140}],140:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t){if("number"==typeof t)return h.default.hex2string(t);if(Array.isArray(t))for(var e=0;e<t.length;++e)"number"==typeof t[e]&&(t[e]=h.default.hex2string(t[e]));return t}r.__esModule=!0;var s=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),a=t("../const"),u=i(a),l=t("../utils"),h=i(l),c=function(){function t(e){n(this,t),this.styleID=0,Object.assign(this,this._defaults,e)}return t.prototype.clone=function(){var e={};for(var r in this._defaults)e[r]=this[r];return new t(e)},t.prototype.reset=function(){Object.assign(this,this._defaults)},s(t,[{key:"_defaults",get:function(){return{align:"left",breakWords:!1,dropShadow:!1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"#000000",dropShadowDistance:5,fill:"black",fillGradientType:u.default.TEXT_GRADIENT.LINEAR_VERTICAL,fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",letterSpacing:0,lineHeight:0,lineJoin:"miter",miterLimit:10,padding:0,stroke:"black",strokeThickness:0,textBaseline:"alphabetic",wordWrap:!1,wordWrapWidth:100}}},{key:"align",get:function(){return this._align},set:function(t){this._align!==t&&(this._align=t,this.styleID++)}},{key:"breakWords",get:function(){return this._breakWords},set:function(t){this._breakWords!==t&&(this._breakWords=t,this.styleID++)}},{key:"dropShadow",get:function(){return this._dropShadow},set:function(t){this._dropShadow!==t&&(this._dropShadow=t,this.styleID++)}},{key:"dropShadowAngle",get:function(){return this._dropShadowAngle},set:function(t){this._dropShadowAngle!==t&&(this._dropShadowAngle=t,this.styleID++);
}},{key:"dropShadowBlur",get:function(){return this._dropShadowBlur},set:function(t){this._dropShadowBlur!==t&&(this._dropShadowBlur=t,this.styleID++)}},{key:"dropShadowColor",get:function(){return this._dropShadowColor},set:function(t){var e=o(t);this._dropShadowColor!==e&&(this._dropShadowColor=e,this.styleID++)}},{key:"dropShadowDistance",get:function(){return this._dropShadowDistance},set:function(t){this._dropShadowDistance!==t&&(this._dropShadowDistance=t,this.styleID++)}},{key:"fill",get:function(){return this._fill},set:function(t){var e=o(t);this._fill!==e&&(this._fill=e,this.styleID++)}},{key:"fillGradientType",get:function(){return this._fillGradientType},set:function(t){this._fillGradientType!==t&&(this._fillGradientType=t,this.styleID++)}},{key:"fontFamily",get:function(){return this._fontFamily},set:function(t){this.fontFamily!==t&&(this._fontFamily=t,this.styleID++)}},{key:"fontSize",get:function(){return this._fontSize},set:function(t){this._fontSize!==t&&(this._fontSize=t,this.styleID++)}},{key:"fontStyle",get:function(){return this._fontStyle},set:function(t){this._fontStyle!==t&&(this._fontStyle=t,this.styleID++)}},{key:"fontVariant",get:function(){return this._fontVariant},set:function(t){this._fontVariant!==t&&(this._fontVariant=t,this.styleID++)}},{key:"fontWeight",get:function(){return this._fontWeight},set:function(t){this._fontWeight!==t&&(this._fontWeight=t,this.styleID++)}},{key:"letterSpacing",get:function(){return this._letterSpacing},set:function(t){this._letterSpacing!==t&&(this._letterSpacing=t,this.styleID++)}},{key:"lineHeight",get:function(){return this._lineHeight},set:function(t){this._lineHeight!==t&&(this._lineHeight=t,this.styleID++)}},{key:"lineJoin",get:function(){return this._lineJoin},set:function(t){this._lineJoin!==t&&(this._lineJoin=t,this.styleID++)}},{key:"miterLimit",get:function(){return this._miterLimit},set:function(t){this._miterLimit!==t&&(this._miterLimit=t,this.styleID++)}},{key:"padding",get:function(){return this._padding},set:function(t){this._padding!==t&&(this._padding=t,this.styleID++)}},{key:"stroke",get:function(){return this._stroke},set:function(t){var e=o(t);this._stroke!==e&&(this._stroke=e,this.styleID++)}},{key:"strokeThickness",get:function(){return this._strokeThickness},set:function(t){this._strokeThickness!==t&&(this._strokeThickness=t,this.styleID++)}},{key:"textBaseline",get:function(){return this._textBaseline},set:function(t){this._textBaseline!==t&&(this._textBaseline=t,this.styleID++)}},{key:"wordWrap",get:function(){return this._wordWrap},set:function(t){this._wordWrap!==t&&(this._wordWrap=t,this.styleID++)}},{key:"wordWrapWidth",get:function(){return this._wordWrapWidth},set:function(t){this._wordWrapWidth!==t&&(this._wordWrapWidth=t,this.styleID++)}}]),t}();r.default=c},{"../const":78,"../utils":151}],141:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}r.__esModule=!0;var a=t("./BaseTexture"),u=i(a),l=t("../const"),h=i(l),c=function(t){function e(){var r=arguments.length<=0||void 0===arguments[0]?100:arguments[0],i=arguments.length<=1||void 0===arguments[1]?100:arguments[1],s=arguments[2],a=arguments[3];n(this,e);var u=o(this,t.call(this,null,s));return u.resolution=a||h.default.RESOLUTION,u.width=r,u.height=i,u.realWidth=u.width*u.resolution,u.realHeight=u.height*u.resolution,u.scaleMode=s||h.default.SCALE_MODES.DEFAULT,u.hasLoaded=!0,u._glRenderTargets=[],u._canvasRenderTarget=null,u.valid=!1,u}return s(e,t),e.prototype.resize=function(t,e){t===this.width&&e===this.height||(this.valid=t>0&&e>0,this.width=t,this.height=e,this.realWidth=this.width*this.resolution,this.realHeight=this.height*this.resolution,this.valid&&this.emit("update",this))},e.prototype.destroy=function(){t.prototype.destroy.call(this,!0),this.renderer=null},e}(u.default);r.default=c},{"../const":78,"./BaseTexture":142}],142:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}r.__esModule=!0;var a=t("../utils"),u=i(a),l=t("../const"),h=i(l),c=t("eventemitter3"),f=i(c),d=t("../utils/determineCrossOrigin"),p=i(d),v=t("bit-twiddle"),y=i(v),g=function(t){function e(r,i,s){n(this,e);var a=o(this,t.call(this));return a.uid=u.default.uid(),a.touched=0,a.resolution=s||h.default.RESOLUTION,a.width=100,a.height=100,a.realWidth=100,a.realHeight=100,a.scaleMode=i||h.default.SCALE_MODES.DEFAULT,a.hasLoaded=!1,a.isLoading=!1,a.source=null,a.premultipliedAlpha=!0,a.imageUrl=null,a.isPowerOfTwo=!1,a.mipmap=h.default.MIPMAP_TEXTURES,a.wrapMode=h.default.WRAP_MODES.DEFAULT,a._glTextures=[],a._enabled=0,a._id=0,r&&a.loadSource(r),a}return s(e,t),e.prototype.update=function(){this.realWidth=this.source.naturalWidth||this.source.videoWidth||this.source.width,this.realHeight=this.source.naturalHeight||this.source.videoHeight||this.source.height,this.width=this.realWidth/this.resolution,this.height=this.realHeight/this.resolution,this.isPowerOfTwo=y.default.isPow2(this.realWidth)&&y.default.isPow2(this.realHeight),this.emit("update",this)},e.prototype.loadSource=function(t){var e=this,r=this.isLoading;this.hasLoaded=!1,this.isLoading=!1,r&&this.source&&(this.source.onload=null,this.source.onerror=null),this.source=t,(this.source.complete||this.source.getContext)&&this.source.width&&this.source.height?this._sourceLoaded():t.getContext||!function(){e.isLoading=!0;var i=e;t.onload=function(){t.onload=null,t.onerror=null,i.isLoading&&(i.isLoading=!1,i._sourceLoaded(),i.emit("loaded",i))},t.onerror=function(){t.onload=null,t.onerror=null,i.isLoading&&(i.isLoading=!1,i.emit("error",i))},t.complete&&t.src&&(e.isLoading=!1,t.onload=null,t.onerror=null,t.width&&t.height?(e._sourceLoaded(),r&&e.emit("loaded",e)):r&&e.emit("error",e))}()},e.prototype._sourceLoaded=function(){this.hasLoaded=!0,this.update()},e.prototype.destroy=function(){this.imageUrl?(delete u.default.BaseTextureCache[this.imageUrl],delete u.default.TextureCache[this.imageUrl],this.imageUrl=null,navigator.isCocoonJS||(this.source.src="")):this.source&&this.source._pixiId&&delete u.default.BaseTextureCache[this.source._pixiId],this.source=null,this.dispose()},e.prototype.dispose=function(){this.emit("dispose",this)},e.prototype.updateSourceImage=function(t){this.source.src=t,this.loadSource(this.source)},e.fromImage=function(t,r,i){var n=u.default.BaseTextureCache[t];if(!n){var o=new Image;void 0===r&&0!==t.indexOf("data:")&&(o.crossOrigin=(0,p.default)(t)),n=new e(o,i),n.imageUrl=t,o.src=t,u.default.BaseTextureCache[t]=n,n.resolution=u.default.getResolutionOfUrl(t)}return n},e.fromCanvas=function(t,r){t._pixiId||(t._pixiId="canvas_"+u.default.uid());var i=u.default.BaseTextureCache[t._pixiId];return i||(i=new e(t,r),u.default.BaseTextureCache[t._pixiId]=i),i},e}(f.default);r.default=g},{"../const":78,"../utils":151,"../utils/determineCrossOrigin":150,"bit-twiddle":30,eventemitter3:32}],143:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}r.__esModule=!0;var a=t("./BaseRenderTexture"),u=i(a),l=t("./Texture"),h=i(l),c=function(t){function e(r,i){n(this,e);var s=null;if(!(r instanceof u.default)){var a=arguments[1],l=arguments[2],h=arguments[3]||0,c=arguments[4]||1;console.warn("v4 RenderTexture now expects a new BaseRenderTexture. Please use RenderTexture.create("+a+", "+l+")"),s=arguments[0],i=null,r=new u.default(a,l,h,c)}var f=o(this,t.call(this,r,i));return f.legacyRenderer=s,f.valid=!0,f._updateUvs(),f}return s(e,t),e.prototype.resize=function(t,e,r){this.valid=t>0&&e>0,this._frame.width=this.orig.width=t,this._frame.height=this.orig.height=e,r||this.baseTexture.resize(t,e),this._updateUvs()},e.create=function(t,r,i,n){return new e(new u.default(t,r,i,n))},e}(h.default);r.default=c},{"./BaseRenderTexture":141,"./Texture":144}],144:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}r.__esModule=!0;var a=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),u=t("./BaseTexture"),l=i(u),h=t("./VideoBaseTexture"),c=i(h),f=t("./TextureUvs"),d=i(f),p=t("eventemitter3"),v=i(p),y=t("../math"),g=i(y),_=t("../utils"),m=i(_),x=function(t){function e(r,i,s,a,u){n(this,e);var l=o(this,t.call(this));if(l.noFrame=!1,i||(l.noFrame=!0,i=new g.default.Rectangle(0,0,1,1)),r instanceof e&&(r=r.baseTexture),l.baseTexture=r,l._frame=i,l.trim=a,l.valid=!1,l.requiresUpdate=!1,l._uvs=null,l.orig=s||i,l._rotate=+(u||0),u===!0)l._rotate=2;else if(l._rotate%2!==0)throw"attempt to use diamond-shaped UVs. If you are sure, set rotation manually";return r.hasLoaded?(l.noFrame&&(i=new g.default.Rectangle(0,0,r.width,r.height),r.on("update",l.onBaseTextureUpdated,l)),l.frame=i):r.once("loaded",l.onBaseTextureLoaded,l),l._updateID=0,l}return s(e,t),e.prototype.update=function(){this.baseTexture.update()},e.prototype.onBaseTextureLoaded=function(t){this._updateID++,this.noFrame?this.frame=new g.default.Rectangle(0,0,t.width,t.height):this.frame=this._frame,this.baseTexture.on("update",this.onBaseTextureUpdated,this),this.emit("update",this)},e.prototype.onBaseTextureUpdated=function(t){this._updateID++,this._frame.width=t.width,this._frame.height=t.height,this.emit("update",this)},e.prototype.destroy=function(t){this.baseTexture&&(t&&(m.default.TextureCache[this.baseTexture.imageUrl]&&delete m.default.TextureCache[this.baseTexture.imageUrl],this.baseTexture.destroy()),this.baseTexture.off("update",this.onBaseTextureUpdated,this),this.baseTexture.off("loaded",this.onBaseTextureLoaded,this),this.baseTexture=null),this._frame=null,this._uvs=null,this.trim=null,this.orig=null,this.valid=!1,this.off("dispose",this.dispose,this),this.off("update",this.update,this)},e.prototype.clone=function(){return new e(this.baseTexture,this.frame,this.orig,this.trim,this.rotate)},e.prototype._updateUvs=function(){this._uvs||(this._uvs=new d.default),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++},e.fromImage=function(t,r,i){var n=m.default.TextureCache[t];return n||(n=new e(l.default.fromImage(t,r,i)),m.default.TextureCache[t]=n),n},e.fromFrame=function(t){var e=m.default.TextureCache[t];if(!e)throw new Error('The frameId "'+t+'" does not exist in the texture cache');return e},e.fromCanvas=function(t,r){return new e(l.default.fromCanvas(t,r))},e.fromVideo=function(t,r){return"string"==typeof t?e.fromVideoUrl(t,r):new e(c.default.fromVideo(t,r))},e.fromVideoUrl=function(t,r){return new e(c.default.fromUrl(t,r))},e.from=function(t){if("string"==typeof t){var r=m.default.TextureCache[t];if(!r){var i=null!==t.match(/\.(mp4|webm|ogg|h264|avi|mov)$/);return i?e.fromVideoUrl(t):e.fromImage(t)}return r}return t instanceof HTMLCanvasElement?e.fromCanvas(t):t instanceof HTMLVideoElement?e.fromVideo(t):t instanceof l.default?new e(l.default):t},e.addTextureToCache=function(t,e){m.default.TextureCache[e]=t},e.removeTextureFromCache=function(t){var e=m.default.TextureCache[t];return delete m.default.TextureCache[t],delete m.default.BaseTextureCache[t],e},a(e,[{key:"frame",get:function(){return this._frame},set:function(t){if(this._frame=t,this.noFrame=!1,t.x+t.width>this.baseTexture.width||t.y+t.height>this.baseTexture.height)throw new Error("Texture Error: frame does not fit inside the base Texture dimensions "+this);this.valid=t&&t.width&&t.height&&this.baseTexture.hasLoaded,this.trim||this.rotate||(this.orig=t),this.valid&&this._updateUvs()}},{key:"rotate",get:function(){return this._rotate},set:function(t){this._rotate=t,this.valid&&this._updateUvs()}},{key:"width",get:function(){return this.orig?this.orig.width:0}},{key:"height",get:function(){return this.orig?this.orig.height:0}}]),e}(v.default);x.EMPTY=new x(new l.default),x.EMPTY.destroy=function(){},x.EMPTY.on=function(){},x.EMPTY.once=function(){},x.EMPTY.emit=function(){},r.default=x},{"../math":102,"../utils":151,"./BaseTexture":142,"./TextureUvs":145,"./VideoBaseTexture":146,eventemitter3:32}],145:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}r.__esModule=!0;var o=t("../math/GroupD8"),s=i(o),a=function(){function t(){n(this,t),this.x0=0,this.y0=0,this.x1=1,this.y1=0,this.x2=1,this.y2=1,this.x3=0,this.y3=1,this.uvsUint32=new Uint32Array(4)}return t.prototype.set=function(t,e,r){var i=e.width,n=e.height;if(r){var o=t.width/2/i,a=t.height/2/n,u=t.x/i+o,l=t.y/n+a;r=s.default.add(r,s.default.NW),this.x0=u+o*s.default.uX(r),this.y0=l+a*s.default.uY(r),r=s.default.add(r,2),this.x1=u+o*s.default.uX(r),this.y1=l+a*s.default.uY(r),r=s.default.add(r,2),this.x2=u+o*s.default.uX(r),this.y2=l+a*s.default.uY(r),r=s.default.add(r,2),this.x3=u+o*s.default.uX(r),this.y3=l+a*s.default.uY(r)}else this.x0=t.x/i,this.y0=t.y/n,this.x1=(t.x+t.width)/i,this.y1=t.y/n,this.x2=(t.x+t.width)/i,this.y2=(t.y+t.height)/n,this.x3=t.x/i,this.y3=(t.y+t.height)/n;this.uvsUint32[0]=(65535*this.y0&65535)<<16|65535*this.x0&65535,this.uvsUint32[1]=(65535*this.y1&65535)<<16|65535*this.x1&65535,this.uvsUint32[2]=(65535*this.y2&65535)<<16|65535*this.x2&65535,this.uvsUint32[3]=(65535*this.y3&65535)<<16|65535*this.x3&65535},t}();r.default=a},{"../math/GroupD8":98}],146:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t,e){e||(e="video/"+t.substr(t.lastIndexOf(".")+1));var r=document.createElement("source");return r.src=t,r.type=e,r}r.__esModule=!0;var u=t("./BaseTexture"),l=i(u),h=t("../utils"),c=i(h),f=function(t){function e(r,i){if(n(this,e),!r)throw new Error("No video source element specified.");(r.readyState===r.HAVE_ENOUGH_DATA||r.readyState===r.HAVE_FUTURE_DATA)&&r.width&&r.height&&(r.complete=!0);var s=o(this,t.call(this,r,i));return s.autoUpdate=!1,s._onUpdate=s._onUpdate.bind(s),s._onCanPlay=s._onCanPlay.bind(s),r.complete||(r.addEventListener("canplay",s._onCanPlay),r.addEventListener("canplaythrough",s._onCanPlay),r.addEventListener("play",s._onPlayStart.bind(s)),r.addEventListener("pause",s._onPlayStop.bind(s))),s.__loaded=!1,s}return s(e,t),e.prototype._onUpdate=function(){this.autoUpdate&&(window.requestAnimationFrame(this._onUpdate),this.update())},e.prototype._onPlayStart=function(){this.hasLoaded||this._onCanPlay(),this.autoUpdate||(window.requestAnimationFrame(this._onUpdate),this.autoUpdate=!0)},e.prototype._onPlayStop=function(){this.autoUpdate=!1},e.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.source.play(),this.__loaded||(this.__loaded=!0,this.emit("loaded",this)))},e.prototype.destroy=function(){this.source&&this.source._pixiId&&(delete c.default.BaseTextureCache[this.source._pixiId],delete this.source._pixiId),t.prototype.destroy.call(this)},e.fromVideo=function(t,r){t._pixiId||(t._pixiId="video_"+c.default.uid());var i=c.default.BaseTextureCache[t._pixiId];return i||(i=new e(t,r),c.default.BaseTextureCache[t._pixiId]=i),i},e.fromUrl=function(t,r){var i=document.createElement("video");if(i.setAttribute("webkit-playsinline",""),i.setAttribute("playsinline",""),Array.isArray(t))for(var n=0;n<t.length;++n)i.appendChild(a(t[n].src||t[n],t[n].mime));else i.appendChild(a(t.src||t,t.mime));return i.load(),i.play(),e.fromVideo(i,r)},e}(l.default);f.fromUrls=f.fromUrl,r.default=f},{"../utils":151,"./BaseTexture":142}],147:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}r.__esModule=!0;var o=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),s=t("../const"),a=i(s),u=t("eventemitter3"),l=i(u),h="tick",c=function(){function t(){var e=this;n(this,t),this._emitter=new l.default,this._requestId=null,this._maxElapsedMS=100,this.autoStart=!1,this.deltaTime=1,this.elapsedMS=1/a.default.TARGET_FPMS,this.lastTime=0,this.speed=1,this.started=!1,this._tick=function(t){e._requestId=null,e.started&&(e.update(t),e.started&&null===e._requestId&&e._emitter.listeners(h,!0)&&(e._requestId=requestAnimationFrame(e._tick)))}}return t.prototype._requestIfNeeded=function(){null===this._requestId&&this._emitter.listeners(h,!0)&&(this.lastTime=performance.now(),this._requestId=requestAnimationFrame(this._tick))},t.prototype._cancelIfNeeded=function(){null!==this._requestId&&(cancelAnimationFrame(this._requestId),this._requestId=null)},t.prototype._startIfPossible=function(){this.started?this._requestIfNeeded():this.autoStart&&this.start()},t.prototype.add=function(t,e){return this._emitter.on(h,t,e),this._startIfPossible(),this},t.prototype.addOnce=function(t,e){return this._emitter.once(h,t,e),this._startIfPossible(),this},t.prototype.remove=function(t,e){return this._emitter.off(h,t,e),this._emitter.listeners(h,!0)||this._cancelIfNeeded(),this},t.prototype.start=function(){this.started||(this.started=!0,this._requestIfNeeded())},t.prototype.stop=function(){this.started&&(this.started=!1,this._cancelIfNeeded())},t.prototype.update=function(t){var e=void 0;t=t||performance.now(),t>this.lastTime?(e=this.elapsedMS=t-this.lastTime,e>this._maxElapsedMS&&(e=this._maxElapsedMS),this.deltaTime=e*a.default.TARGET_FPMS*this.speed,this._emitter.emit(h,this.deltaTime)):this.deltaTime=this.elapsedMS=0,this.lastTime=t},o(t,[{key:"FPS",get:function(){return 1e3/this.elapsedMS}},{key:"minFPS",get:function(){return 1e3/this._maxElapsedMS},set:function(t){var e=Math.min(Math.max(0,t)/1e3,a.default.TARGET_FPMS);this._maxElapsedMS=1/e}}]),t}();r.default=c},{"../const":78,eventemitter3:32}],148:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0;var n=t("./Ticker"),o=i(n),s=new o.default;s.autoStart=!0,r.default={shared:s,Ticker:o.default}},{"./Ticker":147}],149:[function(t,e,r){"use strict";r.__esModule=!0;var i=function(t){for(var e=6*t,r=new Uint16Array(e),i=0,n=0;i<e;i+=6,n+=4)r[i+0]=n+0,r[i+1]=n+1,r[i+2]=n+2,r[i+3]=n+0,r[i+4]=n+2,r[i+5]=n+3;return r};r.default=i},{}],150:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0;var n=t("url"),o=i(n),s=void 0,a=function(t,e){if(0===t.indexOf("data:"))return"";e=e||window.location,s||(s=document.createElement("a")),s.href=t,t=o.default.parse(s.href);var r=!t.port&&""===e.port||t.port===e.port;return t.hostname===e.hostname&&r&&t.protocol===e.protocol?"":"anonymous"};r.default=a},{url:72}],151:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0;var n=t("../const"),o=i(n),s=t("eventemitter3"),a=i(s),u=t("./pluginTarget"),l=i(u),h={_uid:0,_saidHello:!1,EventEmitter:a.default,pluginTarget:l.default,uid:function(){return++h._uid},hex2rgb:function(t,e){return e=e||[],e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255,e},hex2string:function(t){return t=t.toString(16),t="000000".substr(0,6-t.length)+t,"#"+t},rgb2hex:function(t){return(255*t[0]<<16)+(255*t[1]<<8)+255*t[2]},getResolutionOfUrl:function(t){var e=o.default.RETINA_PREFIX.exec(t);return e?parseFloat(e[1]):1},sayHello:function(t){if(!h._saidHello){if(navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var e=["\n %c %c %c Pixi.js "+o.default.VERSION+" - ✰ "+t+" ✰  %c  %c  http://www.pixijs.com/  %c %c ♥%c♥%c♥ \n\n","background: #ff66a5; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff66a5; background: #030307; padding:5px 0;","background: #ff66a5; padding:5px 0;","background: #ffc3dc; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;"];window.console.log.apply(console,e)}else window.console&&window.console.log("Pixi.js "+o.default.VERSION+" - "+t+" - http://www.pixijs.com/");h._saidHello=!0}},isWebGLSupported:function(){var t={stencil:!0,failIfMajorPerformanceCaveat:!0};try{if(!window.WebGLRenderingContext)return!1;var e=document.createElement("canvas"),r=e.getContext("webgl",t)||e.getContext("experimental-webgl",t),i=!(!r||!r.getContextAttributes().stencil);if(r){var n=r.getExtension("WEBGL_lose_context");n&&n.loseContext()}return r=null,i}catch(t){return!1}},sign:function(t){return t?t<0?-1:1:0},removeItems:function(t,e,r){var i=t.length;if(!(e>=i||0===r)){r=e+r>i?i-e:r;for(var n=i-r,o=e;o<n;++o)t[o]=t[o+r];t.length=n}},TextureCache:{},BaseTextureCache:{}};r.default=h},{"../const":78,"./pluginTarget":153,eventemitter3:32}],152:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0;var n=t("ismobilejs"),o=i(n),s=function(t){return o.default.tablet||o.default.phone?2:t};r.default=s},{ismobilejs:33}],153:[function(t,e,r){"use strict";function i(t){t.__plugins={},t.registerPlugin=function(e,r){t.__plugins[e]=r},t.prototype.initPlugins=function(){this.plugins=this.plugins||{};for(var e in t.__plugins)this.plugins[e]=new t.__plugins[e](this)},t.prototype.destroyPlugins=function(){for(var t in this.plugins)this.plugins[t].destroy(),this.plugins[t]=null;this.plugins=null}}r.__esModule=!0,r.default={mixin:function(t){i(t)}}},{}],154:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}var n=t("./core"),o=i(n),s=t("./mesh"),a=i(s),u=t("./particles"),l=i(u),h=t("./extras"),c=i(h),f=t("./filters"),d=i(f);o.default.SpriteBatch=function(){throw new ReferenceError("SpriteBatch does not exist any more, please use the new ParticleContainer instead.")},o.default.AssetLoader=function(){throw new ReferenceError("The loader system was overhauled in pixi v3, please see the new PIXI.loaders.Loader class.")},Object.defineProperties(o.default,{Stage:{get:function(){return o.default.Container}},DisplayObjectContainer:{get:function(){return o.default.Container}},Strip:{get:function(){return a.default.Mesh}},Rope:{get:function(){return a.default.Rope}},ParticleContainer:{get:function(){return l.default.ParticleContainer}},MovieClip:{get:function(){return c.default.MovieClip}},TilingSprite:{get:function(){return c.default.TilingSprite}},BitmapText:{get:function(){return c.default.BitmapText}},blendModes:{get:function(){return o.default.BLEND_MODES}},scaleModes:{get:function(){return o.default.SCALE_MODES}},BaseTextureCache:{get:function(){return o.default.utils.BaseTextureCache}},TextureCache:{get:function(){return o.default.utils.TextureCache}},math:{get:function(){return o.default}},AbstractFilter:{get:function(){return o.default.Filter}},TransformManual:{get:function(){return o.default.TransformBase}}}),o.default.DisplayObject.prototype.generateTexture=function(t,e,r){return t.generateTexture(this,e,r)},o.default.Graphics.prototype.generateTexture=function(t,e){return this.generateCanvasTexture(t,e)},o.default.RenderTexture.prototype.render=function(t,e,r,i){this.legacyRenderer.render(t,this,r,e,!i)},o.default.RenderTexture.prototype.getImage=function(t){return this.legacyRenderer.extract.image(t)},o.default.RenderTexture.prototype.getBase64=function(t){return this.legacyRenderer.extract.base64(t)},o.default.RenderTexture.prototype.getCanvas=function(t){return this.legacyRenderer.extract.canvas(t)},o.default.RenderTexture.prototype.getPixels=function(t){return this.legacyRenderer.pixels(t)},o.default.Sprite.prototype.setTexture=function(t){this.texture=t},c.default.BitmapText.prototype.setText=function(t){this.text=t},o.default.Text.prototype.setText=function(t){this.text=t},o.default.Text.prototype.setStyle=function(t){this.style=t},Object.defineProperties(o.default.TextStyle.prototype,{font:{get:function(){var t="number"==typeof this._fontSize?this._fontSize+"px":this._fontSize;return this._fontStyle+" "+this._fontVariant+" "+this._fontWeight+" "+t+" "+this._fontFamily},set:function(t){t.indexOf("italic")>1?this._fontStyle="italic":t.indexOf("oblique")>-1?this._fontStyle="oblique":this._fontStyle="normal",t.indexOf("small-caps")>-1?this._fontVariant="small-caps":this._fontVariant="normal";var e=t.split(" "),r=-1;this._fontSize=26;for(var i=0;i<e.length;++i)if(e[i].match(/(px|pt|em|%)/)){r=i,this._fontSize=e[i];break}this._fontWeight="normal";for(var n=0;n<r;++n)if(e[n].match(/(bold|bolder|lighter|100|200|300|400|500|600|700|800|900)/)){this._fontWeight=e[n];break}if(r>-1&&r<e.length-1){this._fontFamily="";for(var o=r+1;o<e.length;++o)this._fontFamily+=e[o]+" ";this._fontFamily=this._fontFamily.slice(0,-1)}else this._fontFamily="Arial";this.styleID++}}}),o.default.Texture.prototype.setFrame=function(t){this.frame=t},Object.defineProperties(d.default,{AbstractFilter:{get:function(){return o.default.AbstractFilter}},SpriteMaskFilter:{get:function(){return o.default.SpriteMaskFilter}}}),o.default.utils.uuid=function(){return o.default.utils.uid()},o.default.utils.canUseNewCanvasBlendModes=function(){return o.default.CanvasTinter.canUseMultiply}},{"./core":97,"./extras":164,"./filters":175,"./mesh":191,"./particles":194}],155:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}r.__esModule=!0;var o=t("../../core"),s=i(o),a=new s.default.Rectangle,u=function(){function t(e){n(this,t),this.renderer=e,e.extract=this}return t.prototype.image=function t(e){var t=new Image;return t.src=this.base64(e),t},t.prototype.base64=function(t){return this.canvas(t).toDataURL()},t.prototype.canvas=function(t){var e=this.renderer,r=void 0,i=void 0,n=void 0,o=void 0;t&&(o=t instanceof s.default.RenderTexture?t:e.generateTexture(t)),o?(r=o.baseTexture._canvasRenderTarget.context,i=o.baseTexture._canvasRenderTarget.resolution,n=o.frame):(r=e.rootContext,i=e.rootResolution,n=a,n.width=this.renderer.width,n.height=this.renderer.height);var u=n.width*i,l=n.height*i,h=new s.default.CanvasRenderTarget(u,l),c=r.getImageData(n.x*i,n.y*i,u,l);return h.context.putImageData(c,0,0),h.canvas},t.prototype.pixels=function(t){var e=this.renderer,r=void 0,i=void 0,n=void 0,o=void 0;return t&&(o=t instanceof s.default.RenderTexture?t:e.generateTexture(t)),o?(r=o.baseTexture._canvasRenderTarget.context,i=o.baseTexture._canvasRenderTarget.resolution,n=o.frame):(r=e.rootContext,i=e.rootResolution,n=a,n.width=e.width,n.height=e.height),r.getImageData(0,0,n.width*i,n.height*i).data},t.prototype.destroy=function(){this.renderer.extract=null,this.renderer=null},t}();s.default.CanvasRenderer.registerPlugin("extract",u),r.default=u},{"../../core":97}],156:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0;var n=t("./webgl/WebGLExtract"),o=i(n),s=t("./canvas/CanvasExtract"),a=i(s);r.default={webGL:o.default,canvas:a.default}},{"./canvas/CanvasExtract":155,"./webgl/WebGLExtract":157}],157:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}r.__esModule=!0;var o=t("../../core"),s=i(o),a=new s.default.Rectangle,u=function(){function t(e){n(this,t),this.renderer=e,e.extract=this}return t.prototype.image=function t(e){var t=new Image;return t.src=this.base64(e),t},t.prototype.base64=function(t){return this.canvas(t).toDataURL()},t.prototype.canvas=function(t){var e=this.renderer,r=void 0,i=void 0,n=void 0,o=!1,u=void 0;t&&(u=t instanceof s.default.RenderTexture?t:this.renderer.generateTexture(t)),u?(r=u.baseTexture._glRenderTargets[this.renderer.CONTEXT_UID],i=r.resolution,n=u.frame,o=!1):(r=this.renderer.rootRenderTarget,i=r.resolution,o=!0,n=a,n.width=r.size.width,n.height=r.size.height);var l=n.width*i,h=n.height*i,c=new s.default.CanvasRenderTarget(l,h);if(r){e.bindRenderTarget(r);var f=new Uint8Array(4*l*h),d=e.gl;d.readPixels(n.x*i,n.y*i,l,h,d.RGBA,d.UNSIGNED_BYTE,f);var p=c.context.getImageData(0,0,l,h);p.data.set(f),c.context.putImageData(p,0,0),o&&(c.context.scale(1,-1),c.context.drawImage(c.canvas,0,-h))}return c.canvas},t.prototype.pixels=function(t){var e=this.renderer,r=void 0,i=void 0,n=void 0,o=void 0;t&&(o=t instanceof s.default.RenderTexture?t:this.renderer.generateTexture(t)),o?(r=o.baseTexture._glRenderTargets[this.renderer.CONTEXT_UID],i=r.resolution,n=o.frame):(r=this.renderer.rootRenderTarget,i=r.resolution,n=a,n.width=r.size.width,n.height=r.size.height);var u=n.width*i,l=n.height*i,h=new Uint8Array(4*u*l);if(r){e.bindRenderTarget(r);var c=e.gl;c.readPixels(n.x*i,n.y*i,u,l,c.RGBA,c.UNSIGNED_BYTE,h)}return h},t.prototype.destroy=function(){this.renderer.extract=null,this.renderer=null},t}();s.default.WebGLRenderer.registerPlugin("extract",u),r.default=u},{"../../core":97}],158:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function");
}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}r.__esModule=!0;var a=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),u=t("../core"),l=i(u),h=t("../core/math/ObservablePoint"),c=i(h),f=function(t){function e(r){var i=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];n(this,e);var s=o(this,t.call(this));return s.textWidth=0,s.textHeight=0,s._glyphs=[],s._font={tint:void 0!==i.tint?i.tint:16777215,align:i.align||"left",name:null,size:0},s.font=i.font,s._text=r,s.maxWidth=0,s.maxLineHeight=0,s._anchor=new c.default(s.makeDirty,s,0,0),s.dirty=!1,s.updateText(),s}return s(e,t),e.prototype.updateText=function(){for(var t=e.fonts[this._font.name],r=this._font.size/t.size,i=new l.default.Point,n=[],o=[],s=null,a=0,u=0,h=0,c=-1,f=0,d=0,p=0;p<this.text.length;p++){var v=this.text.charCodeAt(p);if(/(\s)/.test(this.text.charAt(p))&&(c=p,f=a),/(?:\r\n|\r|\n)/.test(this.text.charAt(p)))o.push(a),u=Math.max(u,a),h++,i.x=0,i.y+=t.lineHeight,s=null;else if(c!==-1&&this.maxWidth>0&&i.x*r>this.maxWidth)l.default.utils.removeItems(n,c,p-c),p=c,c=-1,o.push(f),u=Math.max(u,f),h++,i.x=0,i.y+=t.lineHeight,s=null;else{var y=t.chars[v];y&&(s&&y.kerning[s]&&(i.x+=y.kerning[s]),n.push({texture:y.texture,line:h,charCode:v,position:new l.default.Point(i.x+y.xOffset,i.y+y.yOffset)}),a=i.x+(y.texture.width+y.xOffset),i.x+=y.xAdvance,d=Math.max(d,y.yOffset+y.texture.height),s=v)}}o.push(a),u=Math.max(u,a);for(var g=[],_=0;_<=h;_++){var m=0;"right"===this._font.align?m=u-o[_]:"center"===this._font.align&&(m=(u-o[_])/2),g.push(m)}for(var x=n.length,b=this.tint,T=0;T<x;T++){var w=this._glyphs[T];w?w.texture=n[T].texture:(w=new l.default.Sprite(n[T].texture),this._glyphs.push(w)),w.position.x=(n[T].position.x+g[n[T].line])*r,w.position.y=n[T].position.y*r,w.scale.x=w.scale.y=r,w.tint=b,w.parent||this.addChild(w)}for(var E=x;E<this._glyphs.length;++E)this.removeChild(this._glyphs[E]);if(this.textWidth=u*r,this.textHeight=(i.y+t.lineHeight)*r,0!==this.anchor.x||0!==this.anchor.y)for(var S=0;S<x;S++)this._glyphs[S].x-=this.textWidth*this.anchor.x,this._glyphs[S].y-=this.textHeight*this.anchor.y;this.maxLineHeight=d*r},e.prototype.updateTransform=function(){this.validate(),this.containerUpdateTransform()},e.prototype.getLocalBounds=function(){return this.validate(),t.prototype.getLocalBounds.call(this)},e.prototype.validate=function(){this.dirty&&(this.updateText(),this.dirty=!1)},e.prototype.makeDirty=function(){this.dirty=!0},a(e,[{key:"tint",get:function(){return this._font.tint},set:function(t){this._font.tint="number"==typeof t&&t>=0?t:16777215,this.dirty=!0}},{key:"align",get:function(){return this._font.align},set:function(t){this._font.align=t||"left",this.dirty=!0}},{key:"anchor",get:function(){return this._anchor},set:function(t){"number"==typeof t?this._anchor.set(t):this._anchor.copy(t)}},{key:"font",get:function(){return this._font},set:function(t){t&&("string"==typeof t?(t=t.split(" "),this._font.name=1===t.length?t[0]:t.slice(1).join(" "),this._font.size=t.length>=2?parseInt(t[0],10):e.fonts[this._font.name].size):(this._font.name=t.name,this._font.size="number"==typeof t.size?t.size:parseInt(t.size,10)),this.dirty=!0)}},{key:"text",get:function(){return this._text},set:function(t){t=t.toString()||" ",this._text!==t&&(this._text=t,this.dirty=!0)}}]),e}(l.default.Container);r.default=f,f.fonts={}},{"../core":97,"../core/math/ObservablePoint":100}],159:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}r.__esModule=!0;var a=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),u=t("../core"),l=i(u),h=function(t){function e(r){n(this,e);var i=o(this,t.call(this,r[0]instanceof l.default.Texture?r[0]:r[0].texture));return i._textures=null,i._durations=null,i.textures=r,i.animationSpeed=1,i.loop=!0,i.onComplete=null,i._currentTime=0,i.playing=!1,i}return s(e,t),e.prototype.stop=function(){this.playing&&(this.playing=!1,l.default.ticker.shared.remove(this.update,this))},e.prototype.play=function(){this.playing||(this.playing=!0,l.default.ticker.shared.add(this.update,this))},e.prototype.gotoAndStop=function(t){this.stop(),this._currentTime=t,this._texture=this._textures[this.currentFrame],this._textureID=-1},e.prototype.gotoAndPlay=function(t){this._currentTime=t,this.play()},e.prototype.update=function(t){var e=this.animationSpeed*t;if(null!==this._durations){var r=this._currentTime%1*this._durations[this.currentFrame];for(r+=e/60*1e3;r<0;)this._currentTime--,r+=this._durations[this.currentFrame];var i=Math.sign(this.animationSpeed*t);for(this._currentTime=Math.floor(this._currentTime);r>=this._durations[this.currentFrame];)r-=this._durations[this.currentFrame]*i,this._currentTime+=i;this._currentTime+=r/this._durations[this.currentFrame]}else this._currentTime+=e;this._currentTime<0&&!this.loop?(this.gotoAndStop(0),this.onComplete&&this.onComplete()):this._currentTime>=this._textures.length&&!this.loop?(this.gotoAndStop(this._textures.length-1),this.onComplete&&this.onComplete()):(this._texture=this._textures[this.currentFrame],this._textureID=-1)},e.prototype.destroy=function(){this.stop(),t.prototype.destroy.call(this)},e.fromFrames=function(t){for(var r=[],i=0;i<t.length;++i)r.push(l.default.Texture.fromFrame(t[i]));return new e(r)},e.fromImages=function(t){for(var r=[],i=0;i<t.length;++i)r.push(l.default.Texture.fromImage(t[i]));return new e(r)},a(e,[{key:"totalFrames",get:function(){return this._textures.length}},{key:"textures",get:function(){return this._textures},set:function(t){if(t[0]instanceof l.default.Texture)this._textures=t,this._durations=null;else{this._textures=[],this._durations=[];for(var e=0;e<t.length;e++)this._textures.push(t[e].texture),this._durations.push(t[e].time)}}},{key:"currentFrame",get:function(){var t=Math.floor(this._currentTime)%this._textures.length;return t<0&&(t+=this._textures.length),t}}]),e}(l.default.Sprite);r.default=h},{"../core":97}],160:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}r.__esModule=!0;var a=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),u=t("../core"),l=i(u),h=t("../core/textures/Texture"),c=i(h),f=t("../core/sprites/canvas/CanvasTinter"),d=i(f),p=t("./webgl/TilingShader"),v=i(p),y=new Float32Array(4),g=new l.default.Point,_=function(t){function e(r){var i=arguments.length<=1||void 0===arguments[1]?100:arguments[1],s=arguments.length<=2||void 0===arguments[2]?100:arguments[2];n(this,e);var a=o(this,t.call(this,r));return a.tileScale=new l.default.Point(1,1),a.tilePosition=new l.default.Point(0,0),a._width=i,a._height=s,a._uvs=new l.default.TextureUvs,a._canvasPattern=null,a._glDatas=[],a}return s(e,t),e.prototype._onTextureUpdate=function(){},e.prototype._renderWebGL=function(t){var e=this._texture;if(e&&e._uvs){t.flush();var r=t.gl,i=this._glDatas[t.CONTEXT_UID];i||(i={shader:new v.default(r),quad:new l.default.Quad(r)},this._glDatas[t.CONTEXT_UID]=i,i.quad.initVao(i.shader));var n=i.quad.vertices;n[0]=n[6]=this._width*-this.anchor.x,n[1]=n[3]=this._height*-this.anchor.y,n[2]=n[4]=this._width*(1-this.anchor.x),n[5]=n[7]=this._height*(1-this.anchor.y),i.quad.upload(),t.bindShader(i.shader);var o=e._uvs,s=e._frame.width,a=e._frame.height,u=e.baseTexture.width,h=e.baseTexture.height,c=i.shader.uniforms.uPixelSize;c[0]=1/u,c[1]=1/h,i.shader.uniforms.uPixelSize=c;var f=i.shader.uniforms.uFrame;f[0]=o.x0,f[1]=o.y0,f[2]=o.x1-o.x0,f[3]=o.y2-o.y0,i.shader.uniforms.uFrame=f;var d=i.shader.uniforms.uTransform;d[0]=this.tilePosition.x%(s*this.tileScale.x)/this._width,d[1]=this.tilePosition.y%(a*this.tileScale.y)/this._height,d[2]=u/this._width*this.tileScale.x,d[3]=h/this._height*this.tileScale.y,i.shader.uniforms.uTransform=d,i.shader.uniforms.translationMatrix=this.worldTransform.toArray(!0);var p=y;l.default.utils.hex2rgb(this.tint,p),p[3]=this.worldAlpha,i.shader.uniforms.uColor=p,t.bindTexture(this._texture,0),t.state.setBlendMode(this.blendMode),i.quad.draw()}},e.prototype._renderCanvas=function(t){var e=this._texture;if(e.baseTexture.hasLoaded){var r=t.context,i=this.worldTransform,n=t.resolution,o=e.baseTexture,s=this.tilePosition.x/this.tileScale.x%e._frame.width,a=this.tilePosition.y/this.tileScale.y%e._frame.height;if(!this._canvasPattern){var u=new l.default.CanvasRenderTarget(e._frame.width,e._frame.height);16777215!==this.tint?(this.cachedTint!==this.tint&&(this.cachedTint=this.tint,this.tintedTexture=d.default.getTintedTexture(this,this.tint)),u.context.drawImage(this.tintedTexture,0,0)):u.context.drawImage(o.source,-e._frame.x,-e._frame.y),this._canvasPattern=u.context.createPattern(u.canvas,"repeat")}r.globalAlpha=this.worldAlpha,r.setTransform(i.a*n,i.b*n,i.c*n,i.d*n,i.tx*n,i.ty*n),r.scale(this.tileScale.x,this.tileScale.y),r.translate(s+this.anchor.x*-this._width,a+this.anchor.y*-this._height);var h=t.blendModes[this.blendMode];h!==t.context.globalCompositeOperation&&(r.globalCompositeOperation=h),r.fillStyle=this._canvasPattern,r.fillRect(-s,-a,this._width/this.tileScale.x,this._height/this.tileScale.y)}},e.prototype.getBounds=function(){var t=this._width,e=this._height,r=t*(1-this.anchor.x),i=t*-this.anchor.x,n=e*(1-this.anchor.y),o=e*-this.anchor.y,s=this.worldTransform,a=s.a,u=s.b,l=s.c,h=s.d,c=s.tx,f=s.ty,d=a*i+l*o+c,p=h*o+u*i+f,v=a*r+l*o+c,y=h*o+u*r+f,g=a*r+l*n+c,_=h*n+u*r+f,m=a*i+l*n+c,x=h*n+u*i+f,b=void 0,T=void 0,w=void 0,E=void 0;b=d,b=v<b?v:b,b=g<b?g:b,b=m<b?m:b,w=p,w=y<w?y:w,w=_<w?_:w,w=x<w?x:w,T=d,T=v>T?v:T,T=g>T?g:T,T=m>T?m:T,E=p,E=y>E?y:E,E=_>E?_:E,E=x>E?x:E;var S=this._bounds;return S.x=b,S.width=T-b,S.y=w,S.height=E-w,this._currentBounds=S,S},e.prototype.containsPoint=function(t){this.worldTransform.applyInverse(t,g);var e=this._width,r=this._height,i=-e*this.anchor.x;if(g.x>i&&g.x<i+e){var n=-r*this.anchor.y;if(g.y>n&&g.y<n+r)return!0}return!1},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.tileScale=null,this._tileScaleOffset=null,this.tilePosition=null,this._uvs=null},e.from=function(t,r,i){return new e(c.default.from(t),r,i)},e.fromFrame=function(t,r,i){var n=l.default.utils.TextureCache[t];if(!n)throw new Error('The frameId "'+t+'" does not exist in the texture cache '+this);return new e(n,r,i)},e.fromImage=function(t,r,i,n,o){return new e(l.default.Texture.fromImage(t,n,o),r,i)},a(e,[{key:"width",get:function(){return this._width},set:function(t){this._width=t}},{key:"height",get:function(){return this._height},set:function(t){this._height=t}}]),e}(l.default.Sprite);r.default=_},{"../core":97,"../core/sprites/canvas/CanvasTinter":135,"../core/textures/Texture":144,"./webgl/TilingShader":165}],161:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}var n=t("../core"),o=i(n),s=o.default.DisplayObject,a=new o.default.Matrix;s.prototype._cacheAsBitmap=!1,s.prototype._cacheData=!1;var u=function(){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(s.prototype,{cacheAsBitmap:{get:function(){return this._cacheAsBitmap},set:function(t){if(this._cacheAsBitmap!==t){this._cacheAsBitmap=t;var e=void 0;t?(this._cacheData||(this._cacheData=new u),e=this._cacheData,e.originalRenderWebGL=this.renderWebGL,e.originalRenderCanvas=this.renderCanvas,e.originalUpdateTransform=this.updateTransform,e.originalCalculateBounds=this._calculateBounds,e.originalGetLocalBounds=this.getLocalBounds,e.originalDestroy=this.destroy,e.originalContainsPoint=this.containsPoint,e.originalMask=this._mask,e.originalFilterArea=this.filterArea,this.renderWebGL=this._renderCachedWebGL,this.renderCanvas=this._renderCachedCanvas,this.destroy=this._cacheAsBitmapDestroy):(e=this._cacheData,e.sprite&&this._destroyCachedDisplayObject(),this.renderWebGL=e.originalRenderWebGL,this.renderCanvas=e.originalRenderCanvas,this._calculateBounds=e.originalCalculateBounds,this.getLocalBounds=e.originalGetLocalBounds,this.destroy=e.originalDestroy,this.updateTransform=e.originalUpdateTransform,this.containsPoint=e.originalContainsPoint,this._mask=e.originalMask,this.filterArea=e.originalFilterArea)}}}}),s.prototype._renderCachedWebGL=function(t){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObject(t),this._cacheData.sprite._transformID=-1,this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._renderWebGL(t))},s.prototype._initCachedDisplayObject=function(t){if(!this._cacheData||!this._cacheData.sprite){var e=this.alpha;this.alpha=1,t.currentRenderer.flush();var r=this.getLocalBounds().clone();if(this._filters){var i=this._filters[0].padding;r.pad(i)}var n=t._activeRenderTarget,s=t.filterManager.filterStack,u=o.default.RenderTexture.create(0|r.width,0|r.height),l=a;l.tx=-r.x,l.ty=-r.y,this.transform.worldTransform.identity(),this.renderWebGL=this._cacheData.originalRenderWebGL,t.render(this,u,!0,l,!0),t.bindRenderTarget(n),t.filterManager.filterStack=s,this.renderWebGL=this._renderCachedWebGL,this.updateTransform=this.displayObjectUpdateTransform,this._mask=null,this.filterArea=null;var h=new o.default.Sprite(u);h.transform.worldTransform=this.transform.worldTransform,h.anchor.x=-(r.x/r.width),h.anchor.y=-(r.y/r.height),h.alpha=e,h._bounds=this._bounds,this._calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._cacheData.sprite=h,this.transform._parentID=-1,this.updateTransform(),this.containsPoint=h.containsPoint.bind(h)}},s.prototype._renderCachedCanvas=function(t){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObjectCanvas(t),this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite.renderCanvas(t))},s.prototype._initCachedDisplayObjectCanvas=function(t){if(!this._cacheData||!this._cacheData.sprite){var e=this.getLocalBounds(),r=this.alpha;this.alpha=1;var i=t.context,n=new o.default.RenderTexture.create(0|e.width,0|e.height),s=a;this.transform.worldTransform.copy(s),s.invert(),s.tx-=e.x,s.ty-=e.y,this.renderCanvas=this._cacheData.originalRenderCanvas,t.render(this,n,!0,s,!1),t.context=i,this.renderCanvas=this._renderCachedCanvas,this._calculateBounds=this._calculateCachedBounds,this._mask=null,this.filterArea=null;var u=new o.default.Sprite(n);u.transform.worldTransform=this.transform.worldTransform,u.anchor.x=-(e.x/e.width),u.anchor.y=-(e.y/e.height),u._bounds=this._bounds,u.alpha=r,this.updateTransform(),this.updateTransform=this.displayObjectUpdateTransform,this._cacheData.sprite=u,this.containsPoint=u.containsPoint.bind(u)}},s.prototype._calculateCachedBounds=function(){return this._cacheData.sprite._calculateBounds()},s.prototype._getCachedLocalBounds=function(){return this._cacheData.sprite.getLocalBounds()},s.prototype._destroyCachedDisplayObject=function(){this._cacheData.sprite._texture.destroy(!0),this._cacheData.sprite=null},s.prototype._cacheAsBitmapDestroy=function(){this.cacheAsBitmap=!1,this.destroy()}},{"../core":97}],162:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}var n=t("../core"),o=i(n);o.default.DisplayObject.prototype.name=null,o.default.Container.prototype.getChildByName=function(t){for(var e=0;e<this.children.length;e++)if(this.children[e].name===t)return this.children[e];return null}},{"../core":97}],163:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}var n=t("../core"),o=i(n);o.default.DisplayObject.prototype.getGlobalPosition=function(t){return t=t||new o.default.Point,this.parent?(this.displayObjectUpdateTransform(),t.x=this.worldTransform.tx,t.y=this.worldTransform.ty):(t.x=this.position.x,t.y=this.position.y),t}},{"../core":97}],164:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0;var n=t("./MovieClip"),o=i(n),s=t("./TilingSprite"),a=i(s),u=t("./BitmapText"),l=i(u),h=t("./cacheAsBitmap"),c=i(h),f=t("./getChildByName"),d=i(f),p=t("./getGlobalPosition"),v=i(p);r.default={MovieClip:o.default,TilingSprite:a.default,BitmapText:l.default,cacheAsBitmap:c.default,getChildByName:d.default,getGlobalPosition:v.default}},{"./BitmapText":158,"./MovieClip":159,"./TilingSprite":160,"./cacheAsBitmap":161,"./getChildByName":162,"./getGlobalPosition":163}],165:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}r.__esModule=!0;var a=t("../../core/Shader"),u=i(a),l=function(t){function e(r){return n(this,e),o(this,t.call(this,r,"#define GLSLIFY 1\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\n\nuniform vec4 uFrame;\nuniform vec4 uTransform;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n    gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n    vec2 coord = aTextureCoord;\n    coord -= uTransform.xy;\n    coord /= uTransform.zw;\n    vTextureCoord = coord;\n}\n","#define GLSLIFY 1\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec4 uColor;\nuniform vec4 uFrame;\nuniform vec2 uPixelSize;\n\nvoid main(void)\n{\n\n       vec2 coord = mod(vTextureCoord, uFrame.zw);\n       coord = clamp(coord, uPixelSize, uFrame.zw - uPixelSize);\n       coord += uFrame.xy;\n\n       vec4 sample = texture2D(uSampler, coord);\n      vec4 color = vec4(uColor.rgb * uColor.a, uColor.a);\n\n       gl_FragColor = sample * color ;\n}\n"))}return s(e,t),e}(u.default);r.default=l},{"../../core/Shader":77}],166:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}r.__esModule=!0;var a=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),u=t("../../core"),l=i(u),h=t("./BlurXFilter"),c=i(h),f=t("./BlurYFilter"),d=i(f),p=function(t){function e(r,i,s){n(this,e);var a=o(this,t.call(this));return a.blurXFilter=new c.default,a.blurYFilter=new d.default,a.resolution=1,a.padding=0,a.resolution=s||1,a.quality=i||4,a.blur=r||8,a}return s(e,t),e.prototype.apply=function(t,e,r){var i=t.getRenderTarget(!0);this.blurXFilter.apply(t,e,i,!0),this.blurYFilter.apply(t,i,r,!1),t.returnRenderTarget(i)},a(e,[{key:"blur",get:function(){return this.blurXFilter.blur},set:function(t){this.blurXFilter.blur=this.blurYFilter.blur=t,this.padding=2*Math.max(Math.abs(this.blurYFilter.strength),Math.abs(this.blurYFilter.strength))}},{key:"quality",get:function(){return this.blurXFilter.quality},set:function(t){this.blurXFilter.quality=this.blurYFilter.quality=t}},{key:"blurX",get:function(){return this.blurXFilter.blur},set:function(t){this.blurXFilter.blur=t,this.padding=2*Math.max(Math.abs(this.blurYFilter.strength),Math.abs(this.blurYFilter.strength))}},{key:"blurY",get:function(){return this.blurYFilter.blur},set:function(t){this.blurYFilter.blur=t,this.padding=2*Math.max(Math.abs(this.blurYFilter.strength),Math.abs(this.blurYFilter.strength))}}]),e}(l.default.Filter);r.default=p},{"../../core":97,"./BlurXFilter":167,"./BlurYFilter":168}],167:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}r.__esModule=!0;var a=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),u=t("../../core"),l=i(u),h=t("./generateBlurVertSource"),c=i(h),f=t("./generateBlurFragSource"),d=i(f),p=t("./getMaxBlurKernelSize"),v=i(p),y=function(t){function e(r,i,s){n(this,e);var a=(0,c.default)(5,!0),u=(0,d.default)(5),l=o(this,t.call(this,a,u));return l.resolution=s||1,l._quality=0,l.quality=i||4,l.strength=r||8,l.firstRun=!0,l}return s(e,t),e.prototype.apply=function(t,e,r,i){if(this.firstRun){var n=t.renderer.gl,o=(0,v.default)(n);this.vertexSrc=(0,c.default)(o,!0),this.fragmentSrc=(0,d.default)(o),this.firstRun=!1}if(this.uniforms.strength=1/r.size.width*(r.size.width/e.size.width),this.uniforms.strength*=this.strength,this.uniforms.strength/=this.passes,1===this.passes)t.applyFilter(this,e,r,i);else{for(var s=t.getRenderTarget(!0),a=e,u=s,l=0;l<this.passes-1;l++){t.applyFilter(this,a,u,!0);var h=u;u=a,a=h}t.applyFilter(this,a,r,i),t.returnRenderTarget(s)}},a(e,[{key:"blur",get:function(){return this.strength},set:function(t){this.padding=2*Math.abs(t),this.strength=t}},{key:"quality",get:function(){return this._quality},set:function(t){this._quality=t,this.passes=t}}]),e}(l.default.Filter);r.default=y},{"../../core":97,"./generateBlurFragSource":169,"./generateBlurVertSource":170,"./getMaxBlurKernelSize":171}],168:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}r.__esModule=!0;var a=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),u=t("../../core"),l=i(u),h=t("./generateBlurVertSource"),c=i(h),f=t("./generateBlurFragSource"),d=i(f),p=t("./getMaxBlurKernelSize"),v=i(p),y=function(t){function e(r,i,s){n(this,e);var a=(0,c.default)(5,!1),u=(0,d.default)(5),l=o(this,t.call(this,a,u));return l.resolution=s||1,l._quality=0,l.quality=i||4,l.strength=r||8,l.firstRun=!0,l}return s(e,t),e.prototype.apply=function(t,e,r,i){if(this.firstRun){var n=t.renderer.gl,o=(0,v.default)(n);this.vertexSrc=(0,c.default)(o,!1),this.fragmentSrc=(0,d.default)(o),this.firstRun=!1}if(this.uniforms.strength=1/r.size.height*(r.size.height/e.size.height),this.uniforms.strength*=this.strength,this.uniforms.strength/=this.passes,1===this.passes)t.applyFilter(this,e,r,i);else{for(var s=t.getRenderTarget(!0),a=e,u=s,l=0;l<this.passes-1;l++){t.applyFilter(this,a,u,!0);var h=u;u=a,a=h}t.applyFilter(this,a,r,i),t.returnRenderTarget(s)}},a(e,[{key:"blur",get:function(){return this.strength},set:function(t){this.padding=2*Math.abs(t),this.strength=t}},{key:"quality",get:function(){return this._quality},set:function(t){this._quality=t,this.passes=t}}]),e}(l.default.Filter);r.default=y},{"../../core":97,"./generateBlurFragSource":169,"./generateBlurVertSource":170,"./getMaxBlurKernelSize":171}],169:[function(t,e,r){"use strict";r.__esModule=!0;var i={5:[.153388,.221461,.250301],7:[.071303,.131514,.189879,.214607],9:[.028532,.067234,.124009,.179044,.20236],11:[.0093,.028002,.065984,.121703,.175713,.198596],13:[.002406,.009255,.027867,.065666,.121117,.174868,.197641],15:[489e-6,.002403,.009246,.02784,.065602,.120999,.174697,.197448]},n=["varying vec2 vBlurTexCoords[%size%];","uniform sampler2D uSampler;","void main(void)","{","    gl_FragColor = vec4(0.0);","    %blur%","}"].join("\n"),o=function(t){for(var e=i[t],r=e.length,o=n,s="",a="gl_FragColor += texture2D(uSampler, vBlurTexCoords[%index%]) * %value%;",u=void 0,l=0;l<t;l++){var h=a.replace("%index%",l);u=l,l>=r&&(u=t-l-1),h=h.replace("%value%",e[u]),s+=h,s+="\n"}return o=o.replace("%blur%",s),o=o.replace("%size%",t)};r.default=o},{}],170:[function(t,e,r){"use strict";r.__esModule=!0;var i=["attribute vec2 aVertexPosition;","attribute vec2 aTextureCoord;","uniform float strength;","uniform mat3 projectionMatrix;","varying vec2 vBlurTexCoords[%size%];","void main(void)","{","gl_Position = vec4((projectionMatrix * vec3((aVertexPosition), 1.0)).xy, 0.0, 1.0);","%blur%","}"].join("\n"),n=function(t,e){var r=Math.ceil(t/2),n=i,o="",s=void 0;s=e?"vBlurTexCoords[%index%] = aTextureCoord + vec2(%sampleIndex% * strength, 0.0);":"vBlurTexCoords[%index%] = aTextureCoord + vec2(0.0, %sampleIndex% * strength);";for(var a=0;a<t;a++){var u=s.replace("%index%",a);u=u.replace("%sampleIndex%",a-(r-1)+".0"),o+=u,o+="\n"}return n=n.replace("%blur%",o),n=n.replace("%size%",t)};r.default=n},{}],171:[function(t,e,r){"use strict";r.__esModule=!0;var i=function(t){for(var e=t.getParameter(t.MAX_VARYING_VECTORS),r=15;r>e;)r-=2;return r};r.default=i},{}],172:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}r.__esModule=!0;var a=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),u=t("../../core"),l=i(u),h=function(t){function e(){n(this,e);var r=o(this,t.call(this,"#define GLSLIFY 1\nattribute 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}","#define GLSLIFY 1\nvarying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform float m[20];\n\nvoid main(void)\n{\n\n    vec4 c = texture2D(uSampler, vTextureCoord);\n\n    gl_FragColor.r = (m[0] * c.r);\n        gl_FragColor.r += (m[1] * c.g);\n        gl_FragColor.r += (m[2] * c.b);\n        gl_FragColor.r += (m[3] * c.a);\n        gl_FragColor.r += m[4] * c.a;\n\n    gl_FragColor.g = (m[5] * c.r);\n        gl_FragColor.g += (m[6] * c.g);\n        gl_FragColor.g += (m[7] * c.b);\n        gl_FragColor.g += (m[8] * c.a);\n        gl_FragColor.g += m[9] * c.a;\n\n     gl_FragColor.b = (m[10] * c.r);\n        gl_FragColor.b += (m[11] * c.g);\n        gl_FragColor.b += (m[12] * c.b);\n        gl_FragColor.b += (m[13] * c.a);\n        gl_FragColor.b += m[14] * c.a;\n\n     gl_FragColor.a = (m[15] * c.r);\n        gl_FragColor.a += (m[16] * c.g);\n        gl_FragColor.a += (m[17] * c.b);\n        gl_FragColor.a += (m[18] * c.a);\n        gl_FragColor.a += m[19] * c.a;\n\n//    gl_FragColor = vec4(m[0]);\n}\n"));return r.uniforms.m=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],r}return s(e,t),e.prototype._loadMatrix=function(t,e){e=!!e;var r=t;e&&(this._multiply(r,this.uniforms.m,t),r=this._colorMatrix(r)),this.uniforms.m=r},e.prototype._multiply=function(t,e,r){return t[0]=e[0]*r[0]+e[1]*r[5]+e[2]*r[10]+e[3]*r[15],t[1]=e[0]*r[1]+e[1]*r[6]+e[2]*r[11]+e[3]*r[16],t[2]=e[0]*r[2]+e[1]*r[7]+e[2]*r[12]+e[3]*r[17],t[3]=e[0]*r[3]+e[1]*r[8]+e[2]*r[13]+e[3]*r[18],t[4]=e[0]*r[4]+e[1]*r[9]+e[2]*r[14]+e[3]*r[19],t[5]=e[5]*r[0]+e[6]*r[5]+e[7]*r[10]+e[8]*r[15],t[6]=e[5]*r[1]+e[6]*r[6]+e[7]*r[11]+e[8]*r[16],t[7]=e[5]*r[2]+e[6]*r[7]+e[7]*r[12]+e[8]*r[17],t[8]=e[5]*r[3]+e[6]*r[8]+e[7]*r[13]+e[8]*r[18],t[9]=e[5]*r[4]+e[6]*r[9]+e[7]*r[14]+e[8]*r[19],t[10]=e[10]*r[0]+e[11]*r[5]+e[12]*r[10]+e[13]*r[15],t[11]=e[10]*r[1]+e[11]*r[6]+e[12]*r[11]+e[13]*r[16],t[12]=e[10]*r[2]+e[11]*r[7]+e[12]*r[12]+e[13]*r[17],t[13]=e[10]*r[3]+e[11]*r[8]+e[12]*r[13]+e[13]*r[18],t[14]=e[10]*r[4]+e[11]*r[9]+e[12]*r[14]+e[13]*r[19],t[15]=e[15]*r[0]+e[16]*r[5]+e[17]*r[10]+e[18]*r[15],t[16]=e[15]*r[1]+e[16]*r[6]+e[17]*r[11]+e[18]*r[16],t[17]=e[15]*r[2]+e[16]*r[7]+e[17]*r[12]+e[18]*r[17],
t[18]=e[15]*r[3]+e[16]*r[8]+e[17]*r[13]+e[18]*r[18],t[19]=e[15]*r[4]+e[16]*r[9]+e[17]*r[14]+e[18]*r[19],t},e.prototype._colorMatrix=function(t){var e=new Float32Array(t);return e[4]/=255,e[9]/=255,e[14]/=255,e[19]/=255,e},e.prototype.brightness=function(t,e){var r=[t,0,0,0,0,0,t,0,0,0,0,0,t,0,0,0,0,0,1,0];this._loadMatrix(r,e)},e.prototype.greyscale=function(t,e){var r=[t,t,t,0,0,t,t,t,0,0,t,t,t,0,0,0,0,0,1,0];this._loadMatrix(r,e)},e.prototype.blackAndWhite=function(t){var e=[.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0];this._loadMatrix(e,t)},e.prototype.hue=function(t,e){t=(t||0)/180*Math.PI;var r=Math.cos(t),i=Math.sin(t),n=Math.sqrt,o=1/3,s=n(o),a=r+(1-r)*o,u=o*(1-r)-s*i,l=o*(1-r)+s*i,h=o*(1-r)+s*i,c=r+o*(1-r),f=o*(1-r)-s*i,d=o*(1-r)-s*i,p=o*(1-r)+s*i,v=r+o*(1-r),y=[a,u,l,0,0,h,c,f,0,0,d,p,v,0,0,0,0,0,1,0];this._loadMatrix(y,e)},e.prototype.contrast=function(t,e){var r=(t||0)+1,i=-128*(r-1),n=[r,0,0,0,i,0,r,0,0,i,0,0,r,0,i,0,0,0,1,0];this._loadMatrix(n,e)},e.prototype.saturate=function(t,e){var r=2*(t||0)/3+1,i=(r-1)*-.5,n=[r,i,i,0,0,i,r,i,0,0,i,i,r,0,0,0,0,0,1,0];this._loadMatrix(n,e)},e.prototype.desaturate=function(){this.saturate(-1)},e.prototype.negative=function(t){var e=[0,1,1,0,0,1,0,1,0,0,1,1,0,0,0,0,0,0,1,0];this._loadMatrix(e,t)},e.prototype.sepia=function(t){var e=[.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0];this._loadMatrix(e,t)},e.prototype.technicolor=function(t){var e=[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(e,t)},e.prototype.polaroid=function(t){var e=[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(e,t)},e.prototype.toBGR=function(t){var e=[0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0];this._loadMatrix(e,t)},e.prototype.kodachrome=function(t){var e=[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(e,t)},e.prototype.browni=function(t){var e=[.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(e,t)},e.prototype.vintage=function(t){var e=[.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(e,t)},e.prototype.colorTone=function(t,e,r,i,n){t=t||.2,e=e||.15,r=r||16770432,i=i||3375104;var o=(r>>16&255)/255,s=(r>>8&255)/255,a=(255&r)/255,u=(i>>16&255)/255,l=(i>>8&255)/255,h=(255&i)/255,c=[.3,.59,.11,0,0,o,s,a,t,0,u,l,h,e,0,o-u,s-l,a-h,0,0];this._loadMatrix(c,n)},e.prototype.night=function(t,e){t=t||.1;var r=[t*-2,-t,0,0,0,-t,0,t,0,0,0,t,2*t,0,0,0,0,0,1,0];this._loadMatrix(r,e)},e.prototype.predator=function(t,e){var r=[11.224130630493164*t,-4.794486999511719*t,-2.8746118545532227*t,0*t,.40342438220977783*t,-3.6330697536468506*t,9.193157196044922*t,-2.951810836791992*t,0*t,-1.316135048866272*t,-3.2184197902679443*t,-4.2375030517578125*t,7.476448059082031*t,0*t,.8044459223747253*t,0,0,0,1,0];this._loadMatrix(r,e)},e.prototype.lsd=function(t){var e=[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0];this._loadMatrix(e,t)},e.prototype.reset=function(){var t=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0];this._loadMatrix(t,!1)},a(e,[{key:"matrix",get:function(){return this.uniforms.m},set:function(t){this.uniforms.m=t}}]),e}(l.default.Filter);h.prototype.grayscale=h.prototype.greyscale,r.default=h},{"../../core":97}],173:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}r.__esModule=!0;var a=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),u=t("../../core"),l=i(u),h=function(t){function e(r,i){n(this,e);var s=new l.default.Matrix;r.renderable=!1;var a=o(this,t.call(this,"#define GLSLIFY 1\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 filterMatrix;\n\nvarying vec2 vTextureCoord;\nvarying vec2 vFilterCoord;\n\nvoid main(void)\n{\n   gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n   vFilterCoord = ( filterMatrix * vec3( aTextureCoord, 1.0)  ).xy;\n   vTextureCoord = aTextureCoord;\n}","#define GLSLIFY 1\nvarying vec2 vFilterCoord;\nvarying vec2 vTextureCoord;\n\nuniform vec2 scale;\n\nuniform sampler2D uSampler;\nuniform sampler2D mapSampler;\n\nuniform vec4 filterClamp;\n\nvoid main(void)\n{\n   vec4 map =  texture2D(mapSampler, vFilterCoord);\n\n   map -= 0.5;\n   map.xy *= scale;\n\n   gl_FragColor = texture2D(uSampler, clamp(vec2(vTextureCoord.x + map.x, vTextureCoord.y + map.y), filterClamp.xy, filterClamp.zw));\n}\n"));return a.maskSprite=r,a.maskMatrix=s,a.uniforms.mapSampler=r.texture,a.uniforms.filterMatrix=s.toArray(!0),a.uniforms.scale={x:1,y:1},null!==i&&void 0!==i||(i=20),a.scale=new l.default.Point(i,i),a}return s(e,t),e.prototype.apply=function(t,e,r){var i=1/r.destinationFrame.width*(r.size.width/e.size.width);this.uniforms.filterMatrix=t.calculateSpriteMatrix(this.maskMatrix,this.maskSprite),this.uniforms.scale.x=this.scale.x*i,this.uniforms.scale.y=this.scale.y*i,t.applyFilter(this,e,r)},a(e,[{key:"map",get:function(){return this.uniforms.mapSampler},set:function(t){this.uniforms.mapSampler=t}}]),e}(l.default.Filter);r.default=h},{"../../core":97}],174:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}r.__esModule=!0;var a=t("../../core"),u=i(a),l=function(t){function e(){return n(this,e),o(this,t.call(this,"#define GLSLIFY 1\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}",'#define GLSLIFY 1\nvarying 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 s(e,t),e}(u.default.Filter);r.default=l},{"../../core":97}],175:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0;var n=t("./fxaa/FXAAFilter"),o=i(n),s=t("./noise/NoiseFilter"),a=i(s),u=t("./displacement/DisplacementFilter"),l=i(u),h=t("./blur/BlurFilter"),c=i(h),f=t("./blur/BlurXFilter"),d=i(f),p=t("./blur/BlurYFilter"),v=i(p),y=t("./colormatrix/ColorMatrixFilter"),g=i(y),_=t("./void/VoidFilter"),m=i(_);r.default={FXAAFilter:o.default,NoiseFilter:a.default,DisplacementFilter:l.default,BlurFilter:c.default,BlurXFilter:d.default,BlurYFilter:v.default,ColorMatrixFilter:g.default,VoidFilter:m.default}},{"./blur/BlurFilter":166,"./blur/BlurXFilter":167,"./blur/BlurYFilter":168,"./colormatrix/ColorMatrixFilter":172,"./displacement/DisplacementFilter":173,"./fxaa/FXAAFilter":174,"./noise/NoiseFilter":176,"./void/VoidFilter":177}],176:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}r.__esModule=!0;var a=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),u=t("../../core"),l=i(u),h=function(t){function e(){n(this,e);var r=o(this,t.call(this,"#define GLSLIFY 1\nattribute 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#define GLSLIFY 1\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nuniform float noise;\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\n    float diff = (rand(gl_FragCoord.xy) - 0.5) * noise;\n\n    color.r += diff;\n    color.g += diff;\n    color.b += diff;\n\n    gl_FragColor = color;\n}\n"));return r.noise=.5,r}return s(e,t),a(e,[{key:"noise",get:function(){return this.uniforms.noise},set:function(t){this.uniforms.noise=t}}]),e}(l.default.Filter);r.default=h},{"../../core":97}],177:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}r.__esModule=!0;var a=t("../../core"),u=i(a),l=function(t){function e(){n(this,e);var r=o(this,t.call(this,"#define GLSLIFY 1\nattribute 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}","#define GLSLIFY 1\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\n\nvoid main(void)\n{\n   gl_FragColor = texture2D(uSampler, vTextureCoord);\n}\n"));return r.glShaderKey="void",r}return s(e,t),e}(u.default.Filter);r.default=l},{"../../core":97}],178:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}r.__esModule=!0;var o=t("../core"),s=i(o),a=function(){function t(){n(this,t),this.global=new s.default.Point,this.target=null,this.originalEvent=null}return t.prototype.getLocalPosition=function(t,e,r){return t.worldTransform.applyInverse(r||this.global,e)},t}();r.default=a},{"../core":97}],179:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}r.__esModule=!0;var a=t("../core"),u=i(a),l=t("./InteractionData"),h=i(l),c=t("eventemitter3"),f=i(c),d=t("./interactiveTarget"),p=i(d);Object.assign(u.default.DisplayObject.prototype,p.default);var v=function(t){function e(r,i){n(this,e);var s=o(this,t.call(this));return i=i||{},s.renderer=r,s.autoPreventDefault=void 0===i.autoPreventDefault||i.autoPreventDefault,s.interactionFrequency=i.interactionFrequency||10,s.mouse=new h.default,s.mouse.global.set(-999999),s.eventData={stopped:!1,target:null,type:null,data:s.mouse,stopPropagation:function(){this.stopped=!0}},s.interactiveDataPool=[],s.interactionDOMElement=null,s.moveWhenInside=!1,s.eventsAdded=!1,s.onMouseUp=s.onMouseUp.bind(s),s.processMouseUp=s.processMouseUp.bind(s),s.onMouseDown=s.onMouseDown.bind(s),s.processMouseDown=s.processMouseDown.bind(s),s.onMouseMove=s.onMouseMove.bind(s),s.processMouseMove=s.processMouseMove.bind(s),s.onMouseOut=s.onMouseOut.bind(s),s.processMouseOverOut=s.processMouseOverOut.bind(s),s.onMouseOver=s.onMouseOver.bind(s),s.onTouchStart=s.onTouchStart.bind(s),s.processTouchStart=s.processTouchStart.bind(s),s.onTouchEnd=s.onTouchEnd.bind(s),s.processTouchEnd=s.processTouchEnd.bind(s),s.onTouchMove=s.onTouchMove.bind(s),s.processTouchMove=s.processTouchMove.bind(s),s.defaultCursorStyle="inherit",s.currentCursorStyle="inherit",s._tempPoint=new u.default.Point,s.resolution=1,s.setTargetElement(s.renderer.view,s.renderer.resolution),s}return s(e,t),e.prototype.setTargetElement=function(t){var e=arguments.length<=1||void 0===arguments[1]?1:arguments[1];this.removeEvents(),this.interactionDOMElement=t,this.resolution=e,this.addEvents()},e.prototype.addEvents=function(){this.interactionDOMElement&&(u.default.ticker.shared.add(this.update,this),window.navigator.msPointerEnabled&&(this.interactionDOMElement.style["-ms-content-zooming"]="none",this.interactionDOMElement.style["-ms-touch-action"]="none"),window.document.addEventListener("mousemove",this.onMouseMove,!0),this.interactionDOMElement.addEventListener("mousedown",this.onMouseDown,!0),this.interactionDOMElement.addEventListener("mouseout",this.onMouseOut,!0),this.interactionDOMElement.addEventListener("mouseover",this.onMouseOver,!0),this.interactionDOMElement.addEventListener("touchstart",this.onTouchStart,!0),this.interactionDOMElement.addEventListener("touchend",this.onTouchEnd,!0),this.interactionDOMElement.addEventListener("touchmove",this.onTouchMove,!0),window.addEventListener("mouseup",this.onMouseUp,!0),this.eventsAdded=!0)},e.prototype.removeEvents=function(){this.interactionDOMElement&&(u.default.ticker.shared.remove(this.update),window.navigator.msPointerEnabled&&(this.interactionDOMElement.style["-ms-content-zooming"]="",this.interactionDOMElement.style["-ms-touch-action"]=""),window.document.removeEventListener("mousemove",this.onMouseMove,!0),this.interactionDOMElement.removeEventListener("mousedown",this.onMouseDown,!0),this.interactionDOMElement.removeEventListener("mouseout",this.onMouseOut,!0),this.interactionDOMElement.removeEventListener("mouseover",this.onMouseOver,!0),this.interactionDOMElement.removeEventListener("touchstart",this.onTouchStart,!0),this.interactionDOMElement.removeEventListener("touchend",this.onTouchEnd,!0),this.interactionDOMElement.removeEventListener("touchmove",this.onTouchMove,!0),this.interactionDOMElement=null,window.removeEventListener("mouseup",this.onMouseUp,!0),this.eventsAdded=!1)},e.prototype.update=function(t){if(this._deltaTime+=t,!(this._deltaTime<this.interactionFrequency)&&(this._deltaTime=0,this.interactionDOMElement)){if(this.didMove)return void(this.didMove=!1);this.cursor=this.defaultCursorStyle,this.processInteractive(this.mouse.global,this.renderer._lastObjectRendered,this.processMouseOverOut,!0),this.currentCursorStyle!==this.cursor&&(this.currentCursorStyle=this.cursor,this.interactionDOMElement.style.cursor=this.cursor)}},e.prototype.dispatchEvent=function(t,e,r){r.stopped||(r.target=t,r.type=e,t.emit(e,r),t[e]&&t[e](r))},e.prototype.mapPositionToPoint=function(t,e,r){var i=void 0;i=this.interactionDOMElement.parentElement?this.interactionDOMElement.getBoundingClientRect():{x:0,y:0,width:0,height:0},t.x=(e-i.left)*(this.interactionDOMElement.width/i.width)/this.resolution,t.y=(r-i.top)*(this.interactionDOMElement.height/i.height)/this.resolution},e.prototype.processInteractive=function(t,e,r,i,n){if(!e||!e.visible)return!1;n=e.interactive||n;var o=!1,s=n;if(e.hitArea&&(s=!1),i&&e._mask&&(e._mask.containsPoint(t)||(i=!1)),i&&e.filterArea&&(e.filterArea.contains(t.x,t.y)||(i=!1)),e.interactiveChildren)for(var a=e.children,u=a.length-1;u>=0;u--){var l=a[u];if(this.processInteractive(t,l,r,i,s)){if(!l.parent)continue;o=!0,s=!1,i=!1}}return n&&(i&&!o&&(e.hitArea?(e.worldTransform.applyInverse(t,this._tempPoint),o=e.hitArea.contains(this._tempPoint.x,this._tempPoint.y)):e.containsPoint&&(o=e.containsPoint(t))),e.interactive&&r(e,o)),o},e.prototype.onMouseDown=function(t){this.mouse.originalEvent=t,this.eventData.data=this.mouse,this.eventData.stopped=!1,this.mapPositionToPoint(this.mouse.global,t.clientX,t.clientY),this.autoPreventDefault&&this.mouse.originalEvent.preventDefault(),this.processInteractive(this.mouse.global,this.renderer._lastObjectRendered,this.processMouseDown,!0);var e=2===t.button||3===t.which;this.emit(e?"rightdown":"mousedown",this.eventData)},e.prototype.processMouseDown=function(t,e){var r=this.mouse.originalEvent,i=2===r.button||3===r.which;e&&(t[i?"_isRightDown":"_isLeftDown"]=!0,this.dispatchEvent(t,i?"rightdown":"mousedown",this.eventData))},e.prototype.onMouseUp=function(t){this.mouse.originalEvent=t,this.eventData.data=this.mouse,this.eventData.stopped=!1,this.mapPositionToPoint(this.mouse.global,t.clientX,t.clientY),this.processInteractive(this.mouse.global,this.renderer._lastObjectRendered,this.processMouseUp,!0);var e=2===t.button||3===t.which;this.emit(e?"rightup":"mouseup",this.eventData)},e.prototype.processMouseUp=function(t,e){var r=this.mouse.originalEvent,i=2===r.button||3===r.which,n=i?"_isRightDown":"_isLeftDown";e?(this.dispatchEvent(t,i?"rightup":"mouseup",this.eventData),t[n]&&(t[n]=!1,this.dispatchEvent(t,i?"rightclick":"click",this.eventData))):t[n]&&(t[n]=!1,this.dispatchEvent(t,i?"rightupoutside":"mouseupoutside",this.eventData))},e.prototype.onMouseMove=function(t){this.mouse.originalEvent=t,this.eventData.data=this.mouse,this.eventData.stopped=!1,this.mapPositionToPoint(this.mouse.global,t.clientX,t.clientY),this.didMove=!0,this.cursor=this.defaultCursorStyle,this.processInteractive(this.mouse.global,this.renderer._lastObjectRendered,this.processMouseMove,!0),this.emit("mousemove",this.eventData),this.currentCursorStyle!==this.cursor&&(this.currentCursorStyle=this.cursor,this.interactionDOMElement.style.cursor=this.cursor)},e.prototype.processMouseMove=function(t,e){this.processMouseOverOut(t,e),this.moveWhenInside&&!e||this.dispatchEvent(t,"mousemove",this.eventData)},e.prototype.onMouseOut=function(t){this.mouse.originalEvent=t,this.eventData.data=this.mouse,this.eventData.stopped=!1,this.mapPositionToPoint(this.mouse.global,t.clientX,t.clientY),this.interactionDOMElement.style.cursor=this.defaultCursorStyle,this.mapPositionToPoint(this.mouse.global,t.clientX,t.clientY),this.processInteractive(this.mouse.global,this.renderer._lastObjectRendered,this.processMouseOverOut,!1),this.emit("mouseout",this.eventData)},e.prototype.processMouseOverOut=function(t,e){e?(t._over||(t._over=!0,this.dispatchEvent(t,"mouseover",this.eventData)),t.buttonMode&&(this.cursor=t.defaultCursor)):t._over&&(t._over=!1,this.dispatchEvent(t,"mouseout",this.eventData))},e.prototype.onMouseOver=function(t){this.mouse.originalEvent=t,this.eventData.data=this.mouse,this.eventData.stopped=!1,this.emit("mouseover",this.eventData)},e.prototype.onTouchStart=function(t){this.autoPreventDefault&&t.preventDefault();for(var e=t.changedTouches,r=e.length,i=0;i<r;i++){var n=e[i],o=this.getTouchData(n);o.originalEvent=t,this.eventData.data=o,this.eventData.stopped=!1,this.processInteractive(o.global,this.renderer._lastObjectRendered,this.processTouchStart,!0),this.emit("touchstart",this.eventData),this.returnTouchData(o)}},e.prototype.processTouchStart=function(t,e){e&&(t._touchDown=!0,this.dispatchEvent(t,"touchstart",this.eventData))},e.prototype.onTouchEnd=function(t){this.autoPreventDefault&&t.preventDefault();for(var e=t.changedTouches,r=e.length,i=0;i<r;i++){var n=e[i],o=this.getTouchData(n);o.originalEvent=t,this.eventData.data=o,this.eventData.stopped=!1,this.processInteractive(o.global,this.renderer._lastObjectRendered,this.processTouchEnd,!0),this.emit("touchend",this.eventData),this.returnTouchData(o)}},e.prototype.processTouchEnd=function(t,e){e?(this.dispatchEvent(t,"touchend",this.eventData),t._touchDown&&(t._touchDown=!1,this.dispatchEvent(t,"tap",this.eventData))):t._touchDown&&(t._touchDown=!1,this.dispatchEvent(t,"touchendoutside",this.eventData))},e.prototype.onTouchMove=function(t){this.autoPreventDefault&&t.preventDefault();for(var e=t.changedTouches,r=e.length,i=0;i<r;i++){var n=e[i],o=this.getTouchData(n);o.originalEvent=t,this.eventData.data=o,this.eventData.stopped=!1,this.processInteractive(o.global,this.renderer._lastObjectRendered,this.processTouchMove,this.moveWhenInside),this.emit("touchmove",this.eventData),this.returnTouchData(o)}},e.prototype.processTouchMove=function(t,e){this.moveWhenInside&&!e||this.dispatchEvent(t,"touchmove",this.eventData)},e.prototype.getTouchData=function(t){var e=this.interactiveDataPool.pop()||new h.default;return e.identifier=t.identifier,this.mapPositionToPoint(e.global,t.clientX,t.clientY),navigator.isCocoonJS&&(e.global.x=e.global.x/this.resolution,e.global.y=e.global.y/this.resolution),t.globalX=e.global.x,t.globalY=e.global.y,e},e.prototype.returnTouchData=function(t){this.interactiveDataPool.push(t)},e.prototype.destroy=function(){this.removeEvents(),this.removeAllListeners(),this.renderer=null,this.mouse=null,this.eventData=null,this.interactiveDataPool=null,this.interactionDOMElement=null,this.onMouseUp=null,this.processMouseUp=null,this.onMouseDown=null,this.processMouseDown=null,this.onMouseMove=null,this.processMouseMove=null,this.onMouseOut=null,this.processMouseOverOut=null,this.onMouseOver=null,this.onTouchStart=null,this.processTouchStart=null,this.onTouchEnd=null,this.processTouchEnd=null,this.onTouchMove=null,this.processTouchMove=null,this._tempPoint=null},e}(f.default);u.default.WebGLRenderer.registerPlugin("interaction",v),u.default.CanvasRenderer.registerPlugin("interaction",v),r.default=v},{"../core":97,"./InteractionData":178,"./interactiveTarget":181,eventemitter3:32}],180:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0;var n=t("./InteractionData"),o=i(n),s=t("./InteractionManager"),a=i(s),u=t("./interactiveTarget"),l=i(u);r.default={InteractionData:o.default,InteractionManager:a.default,interactiveTarget:l.default}},{"./InteractionData":178,"./InteractionManager":179,"./interactiveTarget":181}],181:[function(t,e,r){"use strict";r.__esModule=!0;var i={interactive:!1,interactiveChildren:!0,hitArea:null,buttonMode:!1,defaultCursor:"pointer",_over:!1,_isLeftDown:!1,_isRightDown:!1,_touchDown:!1};r.default=i},{}],182:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){var r={},i=t.data.getElementsByTagName("info")[0],n=t.data.getElementsByTagName("common")[0];r.font=i.getAttribute("face"),r.size=parseInt(i.getAttribute("size"),10),r.lineHeight=parseInt(n.getAttribute("lineHeight"),10),r.chars={};for(var o=t.data.getElementsByTagName("char"),s=0;s<o.length;s++){var u=parseInt(o[s].getAttribute("id"),10),h=new a.default.Rectangle(parseInt(o[s].getAttribute("x"),10)+e.frame.x,parseInt(o[s].getAttribute("y"),10)+e.frame.y,parseInt(o[s].getAttribute("width"),10),parseInt(o[s].getAttribute("height"),10));r.chars[u]={xOffset:parseInt(o[s].getAttribute("xoffset"),10),yOffset:parseInt(o[s].getAttribute("yoffset"),10),xAdvance:parseInt(o[s].getAttribute("xadvance"),10),kerning:{},texture:new a.default.Texture(e.baseTexture,h)}}for(var c=t.data.getElementsByTagName("kerning"),f=0;f<c.length;f++){var d=parseInt(c[f].getAttribute("first"),10),p=parseInt(c[f].getAttribute("second"),10),v=parseInt(c[f].getAttribute("amount"),10);r.chars[p]&&(r.chars[p].kerning[d]=v)}t.bitmapFont=r,l.default.BitmapText.fonts[r.font]=r}r.__esModule=!0,r.default=function(){return function(t,e){if(!t.data||!t.isXml)return e();if(0===t.data.getElementsByTagName("page").length||0===t.data.getElementsByTagName("info").length||null===t.data.getElementsByTagName("info")[0].getAttribute("face"))return e();var r=t.isDataUrl?"":c.default.dirname(t.url);t.isDataUrl&&("."===r&&(r=""),this.baseUrl&&r&&("/"===this.baseUrl.charAt(this.baseUrl.length-1)&&(r+="/"),r=r.replace(this.baseUrl,""))),r&&"/"!==r.charAt(r.length-1)&&(r+="/");var i=r+t.data.getElementsByTagName("page")[0].getAttribute("file");if(a.default.utils.TextureCache[i])n(t,a.default.utils.TextureCache[i]),e();else{var s={crossOrigin:t.crossOrigin,loadType:o.Resource.LOAD_TYPE.IMAGE,metadata:t.metadata.imageMetadata};this.add(t.name+"_image",i,s,function(r){n(t,r.texture),e()})}}};var o=t("resource-loader"),s=t("../core"),a=i(s),u=t("../extras"),l=i(u),h=t("path"),c=i(h)},{"../core":97,"../extras":164,path:60,"resource-loader":69}],183:[function(t,e,r){
"use strict";function i(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0;var n=t("./loader"),o=i(n),s=t("./bitmapFontParser"),a=i(s),u=t("./spritesheetParser"),l=i(u),h=t("./textureParser"),c=i(h),f=t("resource-loader");r.default={Loader:o.default,bitmapFontParser:a.default,spritesheetParser:l.default,textureParser:c.default,Resource:f.Resource}},{"./bitmapFontParser":182,"./loader":184,"./spritesheetParser":185,"./textureParser":186,"resource-loader":69}],184:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}r.__esModule=!0;var a=t("resource-loader"),u=i(a),l=t("./textureParser"),h=i(l),c=t("./spritesheetParser"),f=i(c),d=t("./bitmapFontParser"),p=i(d),v=function(t){function e(r,i){n(this,e);for(var s=o(this,t.call(this,r,i)),a=0;a<e._pixiMiddleware.length;++a)s.use(e._pixiMiddleware[a]());return s}return s(e,t),e.addPixiMiddleware=function(t){e._pixiMiddleware.push(t)},e}(u.default);v._pixiMiddleware=[u.default.middleware.parsing.blob,h.default,f.default,p.default];var y=u.default.Resource;y.setExtensionXhrType("fnt",y.XHR_RESPONSE_TYPE.DOCUMENT),r.default=v},{"./bitmapFontParser":182,"./spritesheetParser":185,"./textureParser":186,"resource-loader":69}],185:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0,r.default=function(){return function(t,e){var r=void 0,i=t.name+"_image";if(!t.data||!t.isJson||!t.data.frames||this.resources[i])return e();var o={crossOrigin:t.crossOrigin,loadType:n.Resource.LOAD_TYPE.IMAGE,metadata:t.metadata.imageMetadata};r=t.isDataUrl?t.data.meta.image:s.default.dirname(t.url.replace(this.baseUrl,""))+"/"+t.data.meta.image,this.add(i,r,o,function(r){function i(e,i){for(var n=e;n-e<i&&n<h.length;){var o=h[n],s=a[o].frame;if(s){var l=null,f=null,d=new u.default.Rectangle(0,0,a[o].sourceSize.w/c,a[o].sourceSize.h/c);l=a[o].rotated?new u.default.Rectangle(s.x/c,s.y/c,s.h/c,s.w/c):new u.default.Rectangle(s.x/c,s.y/c,s.w/c,s.h/c),a[o].trimmed&&(f=new u.default.Rectangle(a[o].spriteSourceSize.x/c,a[o].spriteSourceSize.y/c,a[o].spriteSourceSize.w/c,a[o].spriteSourceSize.h/c)),t.textures[o]=new u.default.Texture(r.texture.baseTexture,l,d,f,a[o].rotated?2:0),u.default.utils.TextureCache[o]=t.textures[o]}n++}}function n(){return f*l<h.length}function o(t){i(f*l,l),f++,setTimeout(t,0)}function s(){o(function(){n()?s():e()})}t.textures={};var a=t.data.frames,h=Object.keys(a),c=u.default.utils.getResolutionOfUrl(t.url),f=0;h.length<=l?(i(0,l),e()):s()})}};var n=t("resource-loader"),o=t("path"),s=i(o),a=t("../core"),u=i(a),l=1e3},{"../core":97,path:60,"resource-loader":69}],186:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0,r.default=function(){return function(t,e){if(t.data&&t.isImage){var r=new o.default.BaseTexture(t.data,null,o.default.utils.getResolutionOfUrl(t.url));r.imageUrl=t.url,t.texture=new o.default.Texture(r),o.default.utils.BaseTextureCache[t.url]=r,o.default.utils.TextureCache[t.url]=t.texture}e()}};var n=t("../core"),o=i(n)},{"../core":97}],187:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}r.__esModule=!0;var a=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),u=t("../core"),l=i(u),h=t("pixi-gl-core"),c=i(h),f=t("./webgl/MeshShader"),d=i(f),p=new l.default.Point,v=new l.default.Polygon,y=function(t){function e(r,i,s,a,u){n(this,e);var h=o(this,t.call(this));return h._texture=null,h.uvs=s||new Float32Array([0,0,1,0,1,1,0,1]),h.vertices=i||new Float32Array([0,0,100,0,100,100,0,100]),h.indices=a||new Uint16Array([0,1,3,2]),h.dirty=0,h.indexDirty=0,h.blendMode=l.default.BLEND_MODES.NORMAL,h.canvasPadding=0,h.drawMode=u||e.DRAW_MODES.TRIANGLE_MESH,h.texture=r,h.shader=null,h.tintRgb=new Float32Array([1,1,1]),h._glDatas=[],h}return s(e,t),e.prototype._renderWebGL=function(t){t.flush();var r=t.gl,i=this._glDatas[t.CONTEXT_UID];i||(i={shader:new d.default(r),vertexBuffer:c.default.GLBuffer.createVertexBuffer(r,this.vertices,r.STREAM_DRAW),uvBuffer:c.default.GLBuffer.createVertexBuffer(r,this.uvs,r.STREAM_DRAW),indexBuffer:c.default.GLBuffer.createIndexBuffer(r,this.indices,r.STATIC_DRAW),vao:new c.default.VertexArrayObject(r),dirty:this.dirty,indexDirty:this.indexDirty},i.vao=new c.default.VertexArrayObject(r).addIndex(i.indexBuffer).addAttribute(i.vertexBuffer,i.shader.attributes.aVertexPosition,r.FLOAT,!1,8,0).addAttribute(i.uvBuffer,i.shader.attributes.aTextureCoord,r.FLOAT,!1,8,0),this._glDatas[t.CONTEXT_UID]=i),this.dirty!==i.dirty&&(i.dirty=this.dirty,i.uvBuffer.upload()),this.indexDirty!==i.indexDirty&&(i.indexDirty=this.indexDirty,i.indexBuffer.upload()),i.vertexBuffer.upload(),t.bindShader(i.shader),t.bindTexture(this._texture,0),t.state.setBlendMode(this.blendMode),i.shader.uniforms.translationMatrix=this.worldTransform.toArray(!0),i.shader.uniforms.alpha=this.worldAlpha,i.shader.uniforms.tint=this.tintRgb;var n=this.drawMode===e.DRAW_MODES.TRIANGLE_MESH?r.TRIANGLE_STRIP:r.TRIANGLES;i.vao.bind().draw(n,this.indices.length).unbind()},e.prototype._renderCanvas=function(t){var r=t.context,i=this.worldTransform,n=t.resolution;t.roundPixels?r.setTransform(i.a*n,i.b*n,i.c*n,i.d*n,i.tx*n|0,i.ty*n|0):r.setTransform(i.a*n,i.b*n,i.c*n,i.d*n,i.tx*n,i.ty*n),this.drawMode===e.DRAW_MODES.TRIANGLE_MESH?this._renderCanvasTriangleMesh(r):this._renderCanvasTriangles(r)},e.prototype._renderCanvasTriangleMesh=function(t){for(var e=this.vertices,r=this.uvs,i=e.length/2,n=0;n<i-2;n++){var o=2*n;this._renderCanvasDrawTriangle(t,e,r,o,o+2,o+4)}},e.prototype._renderCanvasTriangles=function(t){for(var e=this.vertices,r=this.uvs,i=this.indices,n=i.length,o=0;o<n;o+=3){var s=2*i[o],a=2*i[o+1],u=2*i[o+2];this._renderCanvasDrawTriangle(t,e,r,s,a,u)}},e.prototype._renderCanvasDrawTriangle=function(t,e,r,i,n,o){var s=this._texture.baseTexture,a=s.source,u=s.width,l=s.height,h=e[i],c=e[n],f=e[o],d=e[i+1],p=e[n+1],v=e[o+1],y=r[i]*s.width,g=r[n]*s.width,_=r[o]*s.width,m=r[i+1]*s.height,x=r[n+1]*s.height,b=r[o+1]*s.height;if(this.canvasPadding>0){var T=this.canvasPadding/this.worldTransform.a,w=this.canvasPadding/this.worldTransform.d,E=(h+c+f)/3,S=(d+p+v)/3,M=h-E,O=d-S,C=Math.sqrt(M*M+O*O);h=E+M/C*(C+T),d=S+O/C*(C+w),M=c-E,O=p-S,C=Math.sqrt(M*M+O*O),c=E+M/C*(C+T),p=S+O/C*(C+w),M=f-E,O=v-S,C=Math.sqrt(M*M+O*O),f=E+M/C*(C+T),v=S+O/C*(C+w)}t.save(),t.beginPath(),t.moveTo(h,d),t.lineTo(c,p),t.lineTo(f,v),t.closePath(),t.clip();var R=y*x+m*_+g*b-x*_-m*g-y*b,A=h*x+m*f+c*b-x*f-m*c-h*b,P=y*c+h*_+g*f-c*_-h*g-y*f,D=y*x*f+m*c*_+h*g*b-h*x*_-m*g*f-y*c*b,I=d*x+m*v+p*b-x*v-m*p-d*b,L=y*p+d*_+g*v-p*_-d*g-y*v,k=y*x*v+m*p*_+d*g*b-d*x*_-m*g*v-y*p*b;t.transform(A/R,I/R,P/R,L/R,D/R,k/R),t.drawImage(a,0,0,u*s.resolution,l*s.resolution,0,0,u,l),t.restore()},e.prototype.renderMeshFlat=function(t){var e=this.context,r=t.vertices,i=r.length/2;e.beginPath();for(var n=1;n<i-2;n++){var o=2*n,s=r[o],a=r[o+2],u=r[o+4],l=r[o+1],h=r[o+3],c=r[o+5];e.moveTo(s,l),e.lineTo(a,h),e.lineTo(u,c)}e.fillStyle="#FF0000",e.fill(),e.closePath()},e.prototype._onTextureUpdate=function(){},e.prototype._calculateBounds=function(){this._bounds.addVertices(this.transform,this.vertices,0,this.vertices.length)},e.prototype.containsPoint=function(t){if(!this.getBounds().contains(t.x,t.y))return!1;this.worldTransform.applyInverse(t,p);for(var r=this.vertices,i=v.points,n=this.indices,o=this.indices.length,s=this.drawMode===e.DRAW_MODES.TRIANGLES?3:1,a=0;a+2<o;a+=s){var u=2*n[a],l=2*n[a+1],h=2*n[a+2];if(i[0]=r[u],i[1]=r[u+1],i[2]=r[l],i[3]=r[l+1],i[4]=r[h],i[5]=r[h+1],v.contains(p.x,p.y))return!0}return!1},a(e,[{key:"texture",get:function(){return this._texture},set:function(t){this._texture!==t&&(this._texture=t,t&&(t.baseTexture.hasLoaded?this._onTextureUpdate():t.once("update",this._onTextureUpdate,this)))}},{key:"tint",get:function(){return l.default.utils.rgb2hex(this.tintRgb)},set:function(t){this.tintRgb=l.default.utils.hex2rgb(t,this.tintRgb)}}]),e}(l.default.Container);r.default=y,y.DRAW_MODES={TRIANGLE_MESH:0,TRIANGLES:1}},{"../core":97,"./webgl/MeshShader":192,"pixi-gl-core":7}],188:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}r.__esModule=!0;var a=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),u=t("./Plane"),l=i(u),h=10,c=function(t){function e(r,i,s,a,u){n(this,e);var l=o(this,t.call(this,r,4,4)),c=l.uvs;return c[6]=c[14]=c[22]=c[30]=1,c[25]=c[27]=c[29]=c[31]=1,l._origWidth=r.width,l._origHeight=r.height,l._uvw=1/l._origWidth,l._uvh=1/l._origHeight,l.width=r.width,l.height=r.height,c[2]=c[10]=c[18]=c[26]=l._uvw*i,c[4]=c[12]=c[20]=c[28]=1-l._uvw*a,c[9]=c[11]=c[13]=c[15]=l._uvh*s,c[17]=c[19]=c[21]=c[23]=1-l._uvh*u,l.leftWidth="undefined"!=typeof i?i:h,l.rightWidth="undefined"!=typeof a?a:h,l.topHeight="undefined"!=typeof s?s:h,l.bottomHeight="undefined"!=typeof u?u:h,l}return s(e,t),e.prototype.updateHorizontalVertices=function(){var t=this.vertices;t[9]=t[11]=t[13]=t[15]=this._topHeight,t[17]=t[19]=t[21]=t[23]=this._height-this._bottomHeight,t[25]=t[27]=t[29]=t[31]=this._height},e.prototype.updateVerticalVertices=function(){var t=this.vertices;t[2]=t[10]=t[18]=t[26]=this._leftWidth,t[4]=t[12]=t[20]=t[28]=this._width-this._rightWidth,t[6]=t[14]=t[22]=t[30]=this._width},e.prototype._renderCanvas=function(t){var e=t.context;e.globalAlpha=this.worldAlpha;var r=this.worldTransform,i=t.resolution;t.roundPixels?e.setTransform(r.a*i,r.b*i,r.c*i,r.d*i,r.tx*i|0,r.ty*i|0):e.setTransform(r.a*i,r.b*i,r.c*i,r.d*i,r.tx*i,r.ty*i);var n=this._texture.baseTexture,o=n.source,s=n.width,a=n.height;this.drawSegment(e,o,s,a,0,1,10,11),this.drawSegment(e,o,s,a,2,3,12,13),this.drawSegment(e,o,s,a,4,5,14,15),this.drawSegment(e,o,s,a,8,9,18,19),this.drawSegment(e,o,s,a,10,11,20,21),this.drawSegment(e,o,s,a,12,13,22,23),this.drawSegment(e,o,s,a,16,17,26,27),this.drawSegment(e,o,s,a,18,19,28,29),this.drawSegment(e,o,s,a,20,21,30,31)},e.prototype.drawSegment=function(t,e,r,i,n,o,s,a){var u=this.uvs,l=this.vertices,h=(u[s]-u[n])*r,c=(u[a]-u[o])*i,f=l[s]-l[n],d=l[a]-l[o];h<1&&(h=1),c<1&&(c=1),f<1&&(f=1),d<1&&(d=1),t.drawImage(e,u[n]*r,u[o]*i,h,c,l[n],l[o],f,d)},a(e,[{key:"width",get:function(){return this._width},set:function(t){this._width=t,this.updateVerticalVertices()}},{key:"height",get:function(){return this._height},set:function(t){this._height=t,this.updateHorizontalVertices()}},{key:"leftWidth",get:function(){return this._leftWidth},set:function(t){this._leftWidth=t;var e=this.uvs,r=this.vertices;e[2]=e[10]=e[18]=e[26]=this._uvw*t,r[2]=r[10]=r[18]=r[26]=t,this.dirty=!0}},{key:"rightWidth",get:function(){return this._rightWidth},set:function(t){this._rightWidth=t;var e=this.uvs,r=this.vertices;e[4]=e[12]=e[20]=e[28]=1-this._uvw*t,r[4]=r[12]=r[20]=r[28]=this._width-t,this.dirty=!0}},{key:"topHeight",get:function(){return this._topHeight},set:function(t){this._topHeight=t;var e=this.uvs,r=this.vertices;e[9]=e[11]=e[13]=e[15]=this._uvh*t,r[9]=r[11]=r[13]=r[15]=t,this.dirty=!0}},{key:"bottomHeight",get:function(){return this._bottomHeight},set:function(t){this._bottomHeight=t;var e=this.uvs,r=this.vertices;e[17]=e[19]=e[21]=e[23]=1-this._uvh*t,r[17]=r[19]=r[21]=r[23]=this._height-t,this.dirty=!0}}]),e}(l.default);r.default=c},{"./Plane":189}],189:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}r.__esModule=!0;var a=t("./Mesh"),u=i(a),l=function(t){function e(r,i,s){n(this,e);var a=o(this,t.call(this,r));return a._ready=!0,a.verticesX=i||10,a.verticesY=s||10,a.drawMode=u.default.DRAW_MODES.TRIANGLES,a.refresh(),a}return s(e,t),e.prototype.refresh=function(){for(var t=this.verticesX*this.verticesY,e=[],r=[],i=[],n=[],o=this.texture,s=this.verticesX-1,a=this.verticesY-1,u=o.width/s,l=o.height/a,h=0;h<t;h++){var c=h%this.verticesX,f=h/this.verticesX|0;e.push(c*u,f*l),i.push(o._uvs.x0+(o._uvs.x1-o._uvs.x0)*(c/(this.verticesX-1)),o._uvs.y0+(o._uvs.y3-o._uvs.y0)*(f/(this.verticesY-1)))}for(var d=s*a,p=0;p<d;p++){var v=p%s,y=p/s|0,g=y*this.verticesX+v,_=y*this.verticesX+v+1,m=(y+1)*this.verticesX+v,x=(y+1)*this.verticesX+v+1;n.push(g,_,m),n.push(_,x,m)}this.vertices=new Float32Array(e),this.uvs=new Float32Array(i),this.colors=new Float32Array(r),this.indices=new Uint16Array(n),this.indexDirty=!0},e.prototype._onTextureUpdate=function(){u.default.prototype._onTextureUpdate.call(this),this._ready&&this.refresh()},e}(u.default);r.default=l},{"./Mesh":187}],190:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}r.__esModule=!0;var a=t("./Mesh"),u=i(a),l=t("../core"),h=i(l),c=function(t){function e(r,i){n(this,e);var s=o(this,t.call(this,r));return s.points=i,s.vertices=new Float32Array(4*i.length),s.uvs=new Float32Array(4*i.length),s.colors=new Float32Array(2*i.length),s.indices=new Uint16Array(2*i.length),s._ready=!0,s.refresh(),s}return s(e,t),e.prototype.refresh=function(){var t=this.points;if(!(t.length<1)&&this._texture._uvs){var e=this.uvs,r=this.indices,i=this.colors,n=this._texture._uvs,o=new h.default.Point(n.x0,n.y0),s=new h.default.Point(n.x2-n.x0,n.y2-n.y0);e[0]=0+o.x,e[1]=0+o.y,e[2]=0+o.x,e[3]=1*s.y+o.y,i[0]=1,i[1]=1,r[0]=0,r[1]=1;for(var a=t.length,u=void 0,l=void 0,c=1;c<a;c++)u=4*c,l=c/(a-1),e[u]=l*s.x+o.x,e[u+1]=0+o.y,e[u+2]=l*s.x+o.x,e[u+3]=1*s.y+o.y,u=2*c,i[u]=1,i[u+1]=1,u=2*c,r[u]=u,r[u+1]=u+1;this.dirty=!0,this.indexDirty=!0}},e.prototype._onTextureUpdate=function(){t.prototype._onTextureUpdate.call(this),this._ready&&this.refresh()},e.prototype.updateTransform=function(){var t=this.points;if(!(t.length<1)){for(var e=t[0],r=void 0,i=0,n=0,o=this.vertices,s=t.length,a=void 0,u=void 0,l=void 0,h=void 0,c=void 0,f=0;f<s;f++)a=t[f],u=4*f,r=f<t.length-1?t[f+1]:a,n=-(r.x-e.x),i=r.y-e.y,l=10*(1-f/(s-1)),l>1&&(l=1),h=Math.sqrt(i*i+n*n),c=this._texture.height/2,i/=h,n/=h,i*=c,n*=c,o[u]=a.x+i,o[u+1]=a.y+n,o[u+2]=a.x-i,o[u+3]=a.y-n,e=a;this.containerUpdateTransform()}},e}(u.default);r.default=c},{"../core":97,"./Mesh":187}],191:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0;var n=t("./Mesh"),o=i(n),s=t("./Plane"),a=i(s),u=t("./NineSlicePlane"),l=i(u),h=t("./Rope"),c=i(h),f=t("./webgl/MeshShader"),d=i(f);r.default={Mesh:o.default,Plane:a.default,NineSlicePlane:l.default,Rope:c.default,MeshShader:d.default}},{"./Mesh":187,"./NineSlicePlane":188,"./Plane":189,"./Rope":190,"./webgl/MeshShader":192}],192:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}r.__esModule=!0;var a=t("../../core/Shader"),u=i(a),l=function(t){function e(r){return n(this,e),o(this,t.call(this,r,["attribute vec2 aVertexPosition;","attribute vec2 aTextureCoord;","uniform mat3 translationMatrix;","uniform mat3 projectionMatrix;","varying vec2 vTextureCoord;","void main(void){","   gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);","   vTextureCoord = aTextureCoord;","}"].join("\n"),["varying vec2 vTextureCoord;","uniform float alpha;","uniform vec3 tint;","uniform sampler2D uSampler;","void main(void){","   gl_FragColor = texture2D(uSampler, vTextureCoord) * vec4(tint * alpha, alpha);","}"].join("\n")))}return s(e,t),e}(u.default);r.default=l},{"../../core/Shader":77}],193:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}r.__esModule=!0;var a=t("../core"),u=i(a),l=function(t){function e(r,i,s){n(this,e);var a=o(this,t.call(this));s=s||15e3,r=r||15e3;var l=16384;return s>l&&(s=l),s>r&&(s=r),a._properties=[!1,!0,!1,!1,!1],a._maxSize=r,a._batchSize=s,a._glBuffers=[],a._bufferToUpdate=0,a.interactiveChildren=!1,a.blendMode=u.default.BLEND_MODES.NORMAL,a.roundPixels=!0,a.baseTexture=null,a.setProperties(i),a}return s(e,t),e.prototype.setProperties=function(t){t&&(this._properties[0]="scale"in t?!!t.scale:this._properties[0],this._properties[1]="position"in t?!!t.position:this._properties[1],this._properties[2]="rotation"in t?!!t.rotation:this._properties[2],this._properties[3]="uvs"in t?!!t.uvs:this._properties[3],this._properties[4]="alpha"in t?!!t.alpha:this._properties[4])},e.prototype.updateTransform=function(){this.displayObjectUpdateTransform()},e.prototype.renderWebGL=function(t){var e=this;this.visible&&!(this.worldAlpha<=0)&&this.children.length&&this.renderable&&(this.baseTexture||(this.baseTexture=this.children[0]._texture.baseTexture,this.baseTexture.hasLoaded||this.baseTexture.once("update",function(){return e.onChildrenChange(0)})),t.setObjectRenderer(t.plugins.particle),t.plugins.particle.render(this))},e.prototype.onChildrenChange=function(t){var e=Math.floor(t/this._batchSize);e<this._bufferToUpdate&&(this._bufferToUpdate=e)},e.prototype.renderCanvas=function(t){if(this.visible&&!(this.worldAlpha<=0)&&this.children.length&&this.renderable){var e=t.context,r=this.worldTransform,i=!0,n=0,o=0,s=0,a=0,u=t.blendModes[this.blendMode];u!==e.globalCompositeOperation&&(e.globalCompositeOperation=u),e.globalAlpha=this.worldAlpha,this.displayObjectUpdateTransform();for(var l=0;l<this.children.length;++l){var h=this.children[l];if(h.visible){var c=h.texture.frame;if(e.globalAlpha=this.worldAlpha*h.alpha,h.rotation%(2*Math.PI)===0)i&&(e.setTransform(r.a,r.b,r.c,r.d,r.tx*t.resolution,r.ty*t.resolution),i=!1),n=h.anchor.x*(-c.width*h.scale.x)+h.position.x+.5,o=h.anchor.y*(-c.height*h.scale.y)+h.position.y+.5,s=c.width*h.scale.x,a=c.height*h.scale.y;else{i||(i=!0),h.displayObjectUpdateTransform();var f=h.worldTransform;t.roundPixels?e.setTransform(f.a,f.b,f.c,f.d,f.tx*t.resolution|0,f.ty*t.resolution|0):e.setTransform(f.a,f.b,f.c,f.d,f.tx*t.resolution,f.ty*t.resolution),n=h.anchor.x*-c.width+.5,o=h.anchor.y*-c.height+.5,s=c.width,a=c.height}var d=h.texture.baseTexture.resolution;e.drawImage(h.texture.baseTexture.source,c.x*d,c.y*d,c.width*d,c.height*d,n*d,o*d,s*d,a*d)}}}},e.prototype.destroy=function(){if(t.prototype.destroy.call(this,arguments),this._buffers)for(var e=0;e<this._buffers.length;++e)this._buffers[e].destroy();this._properties=null,this._buffers=null},e}(u.default.Container);r.default=l},{"../core":97}],194:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0;var n=t("./ParticleContainer"),o=i(n),s=t("./webgl/ParticleRenderer"),a=i(s);r.default={ParticleContainer:o.default,ParticleRenderer:a.default}},{"./ParticleContainer":193,"./webgl/ParticleRenderer":196}],195:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}r.__esModule=!0;var o=t("pixi-gl-core"),s=i(o),a=t("../../core/utils/createIndicesForQuads"),u=i(a),l=function(){function t(e,r,i,o){n(this,t),this.gl=e,this.vertSize=2,this.vertByteSize=4*this.vertSize,this.size=o,this.dynamicProperties=[],this.staticProperties=[];for(var s=0;s<r.length;s++){var a=r[s];a={attribute:a.attribute,size:a.size,uploadFunction:a.uploadFunction,offset:a.offset},i[s]?this.dynamicProperties.push(a):this.staticProperties.push(a)}this.staticStride=0,this.staticBuffer=null,this.staticData=null,this.dynamicStride=0,this.dynamicBuffer=null,this.dynamicData=null,this.initBuffers()}return t.prototype.initBuffers=function(){var t=this.gl,e=0,r=void 0;this.indices=(0,u.default)(this.size),this.indexBuffer=s.default.GLBuffer.createIndexBuffer(t,this.indices,t.STATIC_DRAW),this.dynamicStride=0;for(var i=0;i<this.dynamicProperties.length;i++)r=this.dynamicProperties[i],r.offset=e,e+=r.size,this.dynamicStride+=r.size;this.dynamicData=new Float32Array(this.size*this.dynamicStride*4),this.dynamicBuffer=s.default.GLBuffer.createVertexBuffer(t,this.dynamicData,t.STREAM_DRAW);var n=0;this.staticStride=0;for(var o=0;o<this.staticProperties.length;o++)r=this.staticProperties[o],r.offset=n,n+=r.size,this.staticStride+=r.size;this.staticData=new Float32Array(this.size*this.staticStride*4),this.staticBuffer=s.default.GLBuffer.createVertexBuffer(t,this.staticData,t.STATIC_DRAW),this.vao=new s.default.VertexArrayObject(t).addIndex(this.indexBuffer);for(var a=0;a<this.dynamicProperties.length;a++)r=this.dynamicProperties[a],this.vao.addAttribute(this.dynamicBuffer,r.attribute,t.FLOAT,!1,4*this.dynamicStride,4*r.offset);for(var l=0;l<this.staticProperties.length;l++)r=this.staticProperties[l],this.vao.addAttribute(this.staticBuffer,r.attribute,t.FLOAT,!1,4*this.staticStride,4*r.offset)},t.prototype.uploadDynamic=function(t,e,r){for(var i=0;i<this.dynamicProperties.length;i++){var n=this.dynamicProperties[i];n.uploadFunction(t,e,r,this.dynamicData,this.dynamicStride,n.offset)}this.dynamicBuffer.upload()},t.prototype.uploadStatic=function(t,e,r){for(var i=0;i<this.staticProperties.length;i++){var n=this.staticProperties[i];n.uploadFunction(t,e,r,this.staticData,this.staticStride,n.offset)}this.staticBuffer.upload()},t.prototype.bind=function(){this.vao.bind()},t.prototype.destroy=function(){this.dynamicProperties=null,this.dynamicData=null,this.dynamicBuffer.destroy(),this.staticProperties=null,this.staticData=null,this.staticBuffer.destroy()},t}();r.default=l},{"../../core/utils/createIndicesForQuads":149,"pixi-gl-core":7}],196:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}r.__esModule=!0;var a=t("../../core"),u=i(a),l=t("./ParticleShader"),h=i(l),c=t("./ParticleBuffer"),f=i(c),d=function(t){function e(r){n(this,e);var i=o(this,t.call(this,r));return i.shader=null,i.indexBuffer=null,i.properties=null,i.tempMatrix=new u.default.Matrix,i.CONTEXT_UID=0,i}return s(e,t),e.prototype.onContextChange=function(){var t=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.shader=new h.default(t),this.properties=[{attribute:this.shader.attributes.aVertexPosition,size:2,uploadFunction:this.uploadVertices,offset:0},{attribute:this.shader.attributes.aPositionCoord,size:2,uploadFunction:this.uploadPosition,offset:0},{attribute:this.shader.attributes.aRotation,size:1,uploadFunction:this.uploadRotation,offset:0},{attribute:this.shader.attributes.aTextureCoord,size:2,uploadFunction:this.uploadUvs,offset:0},{attribute:this.shader.attributes.aColor,size:1,uploadFunction:this.uploadAlpha,offset:0}]},e.prototype.start=function(){this.renderer.bindShader(this.shader)},e.prototype.render=function(t){var e=t.children,r=t._maxSize,i=t._batchSize,n=e.length;if(0!==n){n>r&&(n=r);var o=t._glBuffers[this.renderer.CONTEXT_UID];o||(o=t._glBuffers[this.renderer.CONTEXT_UID]=this.generateBuffers(t)),this.renderer.setBlendMode(t.blendMode);var s=this.renderer.gl,a=t.worldTransform.copy(this.tempMatrix);a.prepend(this.renderer._activeRenderTarget.projectionMatrix),this.shader.uniforms.projectionMatrix=a.toArray(!0),this.shader.uniforms.uAlpha=t.worldAlpha;var u=e[0]._texture.baseTexture;this.renderer.bindTexture(u);for(var l=0,h=0;l<n;l+=i,h+=1){var c=n-l;c>i&&(c=i);var f=o[h];f.uploadDynamic(e,l,c),t._bufferToUpdate===h&&(f.uploadStatic(e,l,c),t._bufferToUpdate=h+1),f.vao.bind().draw(s.TRIANGLES,6*c).unbind()}}},e.prototype.generateBuffers=function(t){for(var e=this.renderer.gl,r=[],i=t._maxSize,n=t._batchSize,o=t._properties,s=0;s<i;s+=n)r.push(new f.default(e,this.properties,o,n));return r},e.prototype.uploadVertices=function(t,e,r,i,n,o){for(var s=void 0,a=void 0,u=void 0,l=void 0,h=void 0,c=void 0,f=void 0,d=void 0,p=void 0,v=void 0,y=0;y<r;y++)s=t[e+y],a=s._texture,h=s.scale.x,c=s.scale.y,u=a.trim,l=a.orig,u?(d=u.x-s.anchor.x*l.width,f=d+u.width,v=u.y-s.anchor.y*l.height,p=v+u.height):(f=l.width*(1-s.anchor.x),d=l.width*-s.anchor.x,p=l.height*(1-s.anchor.y),v=l.height*-s.anchor.y),i[o]=d*h,i[o+1]=v*c,i[o+n]=f*h,i[o+n+1]=v*c,i[o+2*n]=f*h,i[o+2*n+1]=p*c,i[o+3*n]=d*h,i[o+3*n+1]=p*c,o+=4*n},e.prototype.uploadPosition=function(t,e,r,i,n,o){for(var s=0;s<r;s++){var a=t[e+s].position;i[o]=a.x,i[o+1]=a.y,i[o+n]=a.x,i[o+n+1]=a.y,i[o+2*n]=a.x,i[o+2*n+1]=a.y,i[o+3*n]=a.x,i[o+3*n+1]=a.y,o+=4*n}},e.prototype.uploadRotation=function(t,e,r,i,n,o){for(var s=0;s<r;s++){var a=t[e+s].rotation;i[o]=a,i[o+n]=a,i[o+2*n]=a,i[o+3*n]=a,o+=4*n}},e.prototype.uploadUvs=function(t,e,r,i,n,o){for(var s=0;s<r;s++){var a=t[e+s]._texture._uvs;a?(i[o]=a.x0,i[o+1]=a.y0,i[o+n]=a.x1,i[o+n+1]=a.y1,i[o+2*n]=a.x2,i[o+2*n+1]=a.y2,i[o+3*n]=a.x3,i[o+3*n+1]=a.y3,o+=4*n):(i[o]=0,i[o+1]=0,i[o+n]=0,i[o+n+1]=0,i[o+2*n]=0,i[o+2*n+1]=0,i[o+3*n]=0,i[o+3*n+1]=0,o+=4*n)}},e.prototype.uploadAlpha=function(t,e,r,i,n,o){for(var s=0;s<r;s++){var a=t[e+s].alpha;i[o]=a,i[o+n]=a,i[o+2*n]=a,i[o+3*n]=a,o+=4*n}},e.prototype.destroy=function(){this.renderer.gl&&this.renderer.gl.deleteBuffer(this.indexBuffer),u.default.ObjectRenderer.prototype.destroy.apply(this,arguments),this.shader.destroy(),this.indices=null,this.tempMatrix=null},e}(u.default.ObjectRenderer);r.default=d,u.default.WebGLRenderer.registerPlugin("particle",d)},{"../../core":97,"./ParticleBuffer":195,"./ParticleShader":197}],197:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}r.__esModule=!0;var a=t("../../core/Shader"),u=i(a),l=function(t){function e(r){return n(this,e),o(this,t.call(this,r,["attribute vec2 aVertexPosition;","attribute vec2 aTextureCoord;","attribute float aColor;","attribute vec2 aPositionCoord;","attribute vec2 aScale;","attribute float aRotation;","uniform mat3 projectionMatrix;","varying vec2 vTextureCoord;","varying float vColor;","void main(void){","   vec2 v = aVertexPosition;","   v.x = (aVertexPosition.x) * cos(aRotation) - (aVertexPosition.y) * sin(aRotation);","   v.y = (aVertexPosition.x) * sin(aRotation) + (aVertexPosition.y) * cos(aRotation);","   v = v + aPositionCoord;","   gl_Position = vec4((projectionMatrix * vec3(v, 1.0)).xy, 0.0, 1.0);","   vTextureCoord = aTextureCoord;","   vColor = aColor;","}"].join("\n"),["varying vec2 vTextureCoord;","varying float vColor;","uniform sampler2D uSampler;","uniform float uAlpha;","void main(void){","  vec4 color = texture2D(uSampler, vTextureCoord) * vColor * uAlpha;","  if (color.a == 0.0) discard;","  gl_FragColor = color;","}"].join("\n")))}return s(e,t),e}(u.default);r.default=l},{"../../core/Shader":77}],198:[function(t,e,r){"use strict";Math.sign||(Math.sign=function(t){return t=+t,0===t||isNaN(t)?t:t>0?1:-1})},{}],199:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}var n=t("object-assign"),o=i(n);Object.assign||(Object.assign=o.default)},{"object-assign":59}],200:[function(t,e,r){"use strict";t("./Object.assign"),t("./requestAnimationFrame"),t("./Math.sign"),window.ArrayBuffer||(window.ArrayBuffer=Array),window.Float32Array||(window.Float32Array=Array),window.Uint32Array||(window.Uint32Array=Array),
window.Uint16Array||(window.Uint16Array=Array)},{"./Math.sign":198,"./Object.assign":199,"./requestAnimationFrame":201}],201:[function(t,e,r){(function(t){"use strict";Date.now&&Date.prototype.getTime||(Date.now=function(){return(new Date).getTime()}),t.performance&&t.performance.now||!function(){var e=Date.now();t.performance||(t.performance={}),t.performance.now=function(){return Date.now()-e}}();for(var e=Date.now(),r=["ms","moz","webkit","o"],i=0;i<r.length&&!t.requestAnimationFrame;++i)t.requestAnimationFrame=t[r[i]+"RequestAnimationFrame"],t.cancelAnimationFrame=t[r[i]+"CancelAnimationFrame"]||t[r[i]+"CancelRequestAnimationFrame"];t.requestAnimationFrame||(t.requestAnimationFrame=function(t){if("function"!=typeof t)throw new TypeError(t+"is not a function");var r=Date.now(),i=16+e-r;return i<0&&(i=0),e=r,setTimeout(function(){e=Date.now(),t(performance.now())},i)}),t.cancelAnimationFrame||(t.cancelAnimationFrame=function(t){clearTimeout(t)})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],202:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}r.__esModule=!0;var o=t("../../core"),s=i(o),a=function(){function t(){n(this,t)}return t.prototype.upload=function(t,e){"function"==typeof t&&(e=t,t=null),e()},t.prototype.register=function(){return this},t.prototype.add=function(){return this},t.prototype.destroy=function(){},t}();s.default.CanvasRenderer.registerPlugin("prepare",a),r.default=a},{"../../core":97}],203:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0;var n=t("./webgl/WebGLPrepare"),o=i(n),s=t("./canvas/CanvasPrepare"),a=i(s);r.default={webGL:o.default,canvas:a.default}},{"./canvas/CanvasPrepare":202,"./webgl/WebGLPrepare":204}],204:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){return e instanceof h.default.BaseTexture&&(t.textureManager.updateTexture(e),!0)}function s(t,e){return e instanceof h.default.Graphics&&(t.plugins.graphics.updateGraphics(e),!0)}function a(t,e){if(t instanceof h.default.BaseTexture)return e.indexOf(t)===-1&&e.push(t),!0;if(t._texture&&t._texture instanceof h.default.Texture){var r=t._texture.baseTexture;return e.indexOf(r)===-1&&e.push(r),!0}return!1}function u(t,e){return t instanceof h.default.Graphics&&(e.push(t),!0)}r.__esModule=!0;var l=t("../../core"),h=i(l),c=h.default.ticker.shared,f=function(){function t(e){n(this,t),this.renderer=e,this.queue=[],this.addHooks=[],this.uploadHooks=[],this.completes=[],this.ticking=!1,this.register(a,o).register(u,s)}return t.prototype.upload=function(e,r){"function"==typeof e&&(r=e,e=null),e&&this.add(e),this.queue.length?(this.numLeft=t.UPLOADS_PER_FRAME,this.completes.push(r),this.ticking||(this.ticking=!0,c.add(this.tick,this))):r()},t.prototype.tick=function(){for(;this.queue.length&&this.numLeft>0;){for(var e=this.queue[0],r=!1,i=0,n=this.uploadHooks.length;i<n;i++)if(this.uploadHooks[i](this.renderer,e)){this.numLeft--,this.queue.shift(),r=!0;break}r||this.queue.shift()}if(this.queue.length)this.numLeft=t.UPLOADS_PER_FRAME;else{this.ticking=!1,c.remove(this.tick,this);var o=this.completes.slice(0);this.completes.length=0;for(var s=0,a=o.length;s<a;s++)o[s]()}},t.prototype.register=function(t,e){return t&&this.addHooks.push(t),e&&this.uploadHooks.push(e),this},t.prototype.add=function(t){for(var e=0,r=this.addHooks.length;e<r&&!this.addHooks[e](t,this.queue);e++);if(t instanceof h.default.Container)for(var i=t.children.length-1;i>=0;i--)this.add(t.children[i]);return this},t.prototype.destroy=function(){this.ticking&&c.remove(this.tick,this),this.ticking=!1,this.addHooks=null,this.uploadHooks=null,this.renderer=null,this.completes=null,this.queue=null},t}();f.UPLOADS_PER_FRAME=4,h.default.WebGLRenderer.registerPlugin("prepare",f),r.default=f},{"../../core":97}],205:[function(t,e,r){(function(r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}var n=t("./extras"),o=i(n),s=t("./filters"),a=i(s),u=t("./interaction"),l=i(u),h=t("./loaders"),c=i(h),f=t("./mesh"),d=i(f),p=t("./particles"),v=i(p),y=t("./accessibility"),g=i(y),_=t("./extract"),m=i(_),x=t("./prepare"),b=i(x),T=t("./core"),w=i(T);t("./polyfill");var E=new c.default.Loader;e.exports=Object.assign(w.default,{accessibility:g.default,extract:m.default,extras:o.default,filters:a.default,interaction:l.default,loaders:c.default,loader:E,mesh:d.default,particles:v.default,prepare:b.default}),t("./deprecation"),r.PIXI=w.default}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./accessibility":76,"./core":97,"./deprecation":154,"./extract":156,"./extras":164,"./filters":175,"./interaction":180,"./loaders":183,"./mesh":191,"./particles":194,"./polyfill":200,"./prepare":203}]},{},[205])(205)});
//# sourceMappingURL=pixi.min.js.map