File manager - Edit - /home/c14075/dragmet-ural.ru/www/bitrix/js/main/imageeditor/external/photoeditorsdk/js/photo-editor-sdk.min.js
Back
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.PhotoEditorSDK=t():e.PhotoEditorSDK=t()}("undefined"!=typeof self?self:this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=188)}([function(e,t,n){e.exports={default:n(204),__esModule:!0}},function(e,t,n){e.exports={default:n(218),__esModule:!0}},function(e,t,n){e.exports={default:n(206),__esModule:!0}},function(e,t,n){e.exports={default:n(209),__esModule:!0}},function(e,t,n){e.exports=n(189).default},function(e,t,n){e.exports={default:n(240),__esModule:!0}},function(e,t,n){e.exports={default:n(226),__esModule:!0}},function(e,t,n){"use strict";var r=n(6),i=n.n(r),o=n(0),a=n.n(o),s=n(2),u=n.n(s),l=n(3),c=n.n(l),f=n(1),h=n.n(f),p=n(4),d=(n.n(p),n(297)),_=i.a||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},v=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),a()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),y=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||h()(t)).call(this,e,_({intensity:{type:p.OptionType.NUMBER,default:1,setter:function(e){return this._stack&&this._stack.setIntensity(e),e}},dirty:{type:p.OptionType.BOOLEAN,default:!0}},n)));return r._stack=new d.a(r._options.intensity),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=c()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(u.a?u()(e,t):e.__proto__=t)}(t,p.Configurable),v(t,[{key:"render",value:function(e,t,n){var r=this;return this._stack.render(e,t,n).then(function(e){return r.setDirty(!1),e})}},{key:"setDirtyForRenderer",value:function(e,t){this._stack.setDirtyForRenderer(e,t)}},{key:"disposeRenderTextures",value:function(){this._stack.disposeRenderTextures()}},{key:"dispose",value:function(){this._stack.dispose()}}]),t}();y.identifier=null,y.isIdentity=!1,y.displayName=null,y.PrimitivesStack=d.a,t.a=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(299);n.d(t,"Brightness",function(){return r.a});var i=n(301);n.d(t,"Contrast",function(){return i.a});var o=n(303);n.d(t,"ColorMatrixPrimitive",function(){return o.a});var a=n(305);n.d(t,"Desaturation",function(){return a.a});var s=n(307);n.d(t,"DuoTone",function(){return s.a});var u=n(309);n.d(t,"Gamma",function(){return u.a});var l=n(311);n.d(t,"Glow",function(){return l.a});var c=n(313);n.d(t,"Gobblin",function(){return c.a});var f=n(315);n.d(t,"Grayscale",function(){return f.a});var h=n(164);n.d(t,"LookupTable",function(){return h.a});var p=n(318);n.d(t,"LookupTableImage",function(){return p.a});var d=n(320);n.d(t,"Saturation",function(){return d.a});var _=n(322);n.d(t,"SoftColorOverlay",function(){return _.a});var v=n(324);n.d(t,"ToneCurve",function(){return v.a});var y=n(325);n.d(t,"X400",function(){return y.a});var g=n(327);n.d(t,"ThreeDLookupTableImage",function(){return g.a})},function(e,t){var n=e.exports={version:"2.6.5"};"number"==typeof __e&&(__e=n)},function(e,t,n){"use strict";n.d(t,"a",function(){return h}),n.d(t,"j",function(){return p});var r=n(33),i=n(61),o=n(142),a=n(143),s=n(38),u=n(62),l=n(27),c=n(144),f=n(34);n.d(t,"b",function(){return i.a}),n.d(t,"g",function(){return o.a}),n.d(t,"k",function(){return s.a}),n.d(t,"h",function(){return a.a}),n.d(t,"d",function(){return u.a}),n.d(t,"f",function(){return r.a}),n.d(t,"i",function(){return l.a}),n.d(t,"c",function(){return f}),n.d(t,"e",function(){return c.a});var h=2e3,p=20},function(e,t,n){"use strict";n.d(t,"a",function(){return v});var r=n(0),i=n.n(r),o=n(5),a=n.n(o),s=n(2),u=n.n(s),l=n(3),c=n.n(l),f=n(1),h=n.n(f),p=n(4),d=(n.n(p),n(125),function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}()),_=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||h()(t)).call.apply(e,[this].concat(r)));return o._fragmentSource=null,o._inputTextureSizeMap={},o._inputLogicalSizeMap={},o._inputShapeMap={},o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=c()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(u.a?u()(e,t):e.__proto__=t)}(t,p.Engine.Filter),d(t,[{key:"requiresFloatTextures",value:function(){return!0}},{key:"setTargetTextureSize",value:function(e){this._targetTextureSize=e}},{key:"setTargetLogicalSize",value:function(e){this._targetSize=e}},{key:"setTextureSizeForInputWithName",value:function(e,t){this._inputTextureSizeMap[t]=e}},{key:"setLogicalSizeForInputWithName",value:function(e,t){this._inputLogicalSizeMap[t]=e}},{key:"getShaderForRenderer",value:function(e){return this._fragmentSource||(this._fragmentSource=this._buildFragmentShader()),function e(t,n,r){null===t&&(t=Function.prototype);var i=a()(t,n);if(void 0===i){var o=h()(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0}(t.prototype.__proto__||h()(t.prototype),"getShaderForRenderer",this).call(this,e)}},{key:"outputLogicalShape",value:function(){if(!this._options.outputLogicalShape){var e=this._calculateOutputShape();this._options.outputLogicalShape=e}return this._options.outputLogicalShape}},{key:"_applyWebGL",value:function(e,t,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;o||(o=this.getShaderForRenderer(e));var a=e.getContext(),s={},u=e.getCurrentRenderTarget().getProjectionMatrix().toArray();s.u_projMatrix=u,s.output_texRC=this._targetTextureSize,s.output_sizeRC=this._targetSize,s.output_shape=this.outputLogicalShape(),this._options.inputs.forEach(function(e){try{s[e.name+"_texRC"]=r._inputTextureSizeMap[e.name],s[e.name+"_sizeRC"]=r._inputLogicalSizeMap[e.name],s[e.name+"_shape"]=e.logicalShape}catch(t){throw new Error("Missing texture or logical size for input "+e.name+" in filter "+r.constructor.name+".")}},this),this._updateAdditionalUniforms(o),o.setUniforms(s),o.syncUniforms();var l=t.getBaseTexture(),c=e.getOrCreateGLTexture(l);a.activeTexture(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,c),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,l.getGLRepeat(a,"x")),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,l.getGLRepeat(a,"y")),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,l.getGLFilter(a,"min")),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,l.getGLFilter(a,"mag")),a.bindFramebuffer(a.FRAMEBUFFER,n._framebuffer),i&&a.clear(a.COLOR_BUFFER_BIT),a.drawElements(a.TRIANGLES,6,a.UNSIGNED_SHORT,0)}},{key:"getShaderIdentifier",value:function(){var e=this.outputLogicalShape().length,t=this.getInputs().map(function(e){return e.name+"_"+e.logicalShape.length}).join("");return this.constructor.name+"_"+e+"_"+t+"_"+this._getTensorOperationSource()}},{key:"_updateAdditionalUniforms",value:function(e){}},{key:"_calculateOutputShape",value:function(){return this.getInputs()[0].logicalShape}},{key:"prepareUniforms",value:function(){var e=this;this._uniforms.output_texRC={type:p.UniformType.FLOAT2,value:[0,0]},this._uniforms.output_sizeRC={type:p.UniformType.FLOAT2,value:[0,0]};var t=this._calculateOutputShape();this._uniforms.output_shape={type:2===t.length?p.UniformType.INT2:p.UniformType.INT4,value:t};var n=1,r=[];this.getInputs().forEach(function(t){if(-1!==r.indexOf(t.name))throw new Error("Input names must be unique.");var i=t.name+"_texRC",o=t.name+"_sizeRC",a=t.name+"_shape";switch(e._uniforms[i]={type:p.UniformType.FLOAT2,value:[0,0]},e._uniforms[o]={type:p.UniformType.FLOAT2,value:[0,0]},e._uniforms[a]={type:2===t.logicalShape.length?p.UniformType.INT2:p.UniformType.INT4,value:t.logicalShape},t.type){case v.PREVIOUS:e._uniforms[t.name]={type:p.UniformType.SAMPLER2D,value:0};break;case v.DATA:e._uniforms[t.name]={type:p.UniformType.SAMPLER2D,value:n++}}}),this.getInputs().forEach(function(t){t.type===v.INDEX&&(e._uniforms[t.name]={type:p.UniformType.SAMPLER2D,value:n++})}),delete this._availableUniforms.u_image,delete this._uniforms.u_image}},{key:"_getTensorOperationSource",value:function(){return"\n void main () {\n setOutput(0.0);\n }\n "}},{key:"_buildFragmentShader",value:function(){var e=this,t=n(433),r=this.outputLogicalShape();return 2===r.length?t+=this._create2DOutputInterfaceSnippet():4===r.length&&(t+=this._create4DOutputInterfaceSnippet()),this._options.inputs.forEach(function(n){t+=e._createInputInterfaceSnippet(n)}),t+=this._createOutputSnippet(),t+=this._getTensorOperationSource()}},{key:"_createOutputSnippet",value:function(){return"\n void setOutput(float val) {\n gl_FragColor = vec4(val, 0, 0, 0);\n }\n "}},{key:"_create2DOutputInterfaceSnippet",value:function(){return"\n uniform ivec2 output_shape;\n ivec2 getOutputCoords() {\n vec2 adjustedFragCoord = gl_FragCoord.xy - halfCR;\n int index = int(adjustedFragCoord.y * output_sizeRC.y + adjustedFragCoord.x);\n int r = index / output_shape[1];\n int c = index - r * output_shape[1];\n\n return ivec2(r, c);\n }\n "}},{key:"_create4DOutputInterfaceSnippet",value:function(){return"\n uniform ivec4 output_shape;\n ivec4 getOutputCoords() {\n vec2 adjustedFragCoord = gl_FragCoord.xy - halfCR;\n int index = int(adjustedFragCoord.y * output_sizeRC.y + adjustedFragCoord.x);\n\n int stride2 = output_shape[3];\n int stride1 = output_shape[2] * stride2;\n int stride0 = output_shape[1] * stride1;\n\n int r = index / stride0;\n index -= r * stride0;\n\n int c = index / stride1;\n index -= c * stride1;\n\n int d = index / stride2;\n int d2 = index - d * stride2;\n\n return ivec4(r, c, d, d2);\n }\n "}},{key:"_createInputInterfaceSnippet",value:function(e){var t="",n=e.name,r=e.logicalShape,i=n+"_texRC",o=n+"_sizeRC",a=n+"_shape";return t+="\n uniform sampler2D "+n+";\n uniform vec2 "+i+";\n uniform vec2 "+o+";\n uniform "+(2===r.length?"ivec2":"ivec4")+" "+a+";\n ",t+="\n float get"+this._capitalize(n)+"Flat(int index) {\n vec2 uv = UVfrom1D("+i+", "+o+", index);\n return sampleTexture("+n+", uv);\n }\n ",2===r.length?t+="\n float get"+this._capitalize(n)+"(int row, int col) {\n vec2 uv = UVfrom2D("+i+", "+o+", "+a+"[1], row, col);\n return sampleTexture("+n+", uv);\n }\n ":4===r.length&&(t+="\n float get"+this._capitalize(n)+"(int row, int col, int depth, int depth2) {\n int stride2 = "+a+"[3];\n int stride1 = "+a+"[2] * stride2;\n int stride0 = "+a+"[1] * stride1;\n\n vec2 uv = UVfrom4D("+i+", "+o+", stride0, stride1, stride2, row, col, depth, depth2);\n return sampleTexture("+n+", uv);\n }\n\n float get"+this._capitalize(n)+"(ivec4 coords) {\n return get"+this._capitalize(n)+"(coords.x, coords.y, coords.z, coords.w);\n }\n "),t}},{key:"_capitalize",value:function(e){return e.charAt(0).toUpperCase()+e.slice(1)}},{key:"_getInputWithName",value:function(e){return p.Utils.Array.find(this._options.inputs,function(t){return t.name===e})}}]),t}(),v={PREVIOUS:"previous",INDEX:"index",DATA:"data"};_.prototype.availableOptions={inputs:{type:p.OptionType.ARRAY},outputLogicalShape:{type:p.OptionType.ARRAY},outputTextureDimensions:{type:p.OptionType.ARRAY}},t.b=_},function(e,t,n){var r=n(13),i=n(9),o=n(26),a=n(31),s=n(36),u=function(e,t,n){var l,c,f,h=e&u.F,p=e&u.G,d=e&u.S,_=e&u.P,v=e&u.B,y=e&u.W,g=p?i:i[t]||(i[t]={}),m=g.prototype,b=p?r:d?r[t]:(r[t]||{}).prototype;for(l in p&&(n=t),n)(c=!h&&b&&void 0!==b[l])&&s(g,l)||(f=c?b[l]:n[l],g[l]=p&&"function"!=typeof b[l]?n[l]:v&&c?o(f,r):y&&b[l]==f?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(f):_&&"function"==typeof f?o(Function.call,f):f,_&&((g.virtual||(g.virtual={}))[l]=f,e&u.R&&m&&!m[l]&&a(m,l,f)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,e.exports=u},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){var r=n(92)("wks"),i=n(75),o=n(13).Symbol,a="function"==typeof o;(e.exports=function(e){return r[e]||(r[e]=a&&o[e]||(a?o:i)("Symbol."+e))}).store=r},function(e,t,n){e.exports={default:n(221),__esModule:!0}},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(2),a=n.n(o),s=n(3),u=n.n(s),l=n(1),c=n.n(l),f=n(4),h=(n.n(f),function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}()),p=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||c()(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=u()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(a.a?a()(e,t):e.__proto__=t)}(t,f.Configurable),h(t,[{key:"update",value:function(){}},{key:"getFilter",value:function(){return this._filter}},{key:"dispose",value:function(){this._filter&&(this._filter.dispose(),this._filter=null)}}]),t}();t.a=p},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(0),i=n.n(r),o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._seed=void 0===t?e.TimeSeed():t}return o(e,[{key:"seed",value:function(t){this._seed=void 0===t?e.TimeSeed():t}},{key:"next",value:function(){var t=0|this._seed,n=t/e.SEED_DIVIDER|0,r=t%e.SEED_DIVIDER|0;return(t=e.SEED_LOW_MULTIPLY*r-e.SEED_HIGH_MULTIPLY*n)<=0&&(t+=e.MAX),-1===t&&(t=e.MAX-1),this._seed=t,t}},{key:"nextInRange",value:function(e,t){return void 0===t&&(t=e,e=0),e+this.next()%(t-e+1)}},{key:"nextBool",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this.nextInRange(e+t-1)>=e}},{key:"pickNext",value:function(e){return Array.isArray(e)?e[this.next()%e.length]:null}}],[{key:"TimeSeed",value:function(){return Date.now()}}]),e}();a.MAX=2147483647,a.SEED_DIVIDER=127773,a.SEED_LOW_MULTIPLY=16807,a.SEED_HIGH_MULTIPLY=2836},function(e,t,n){"use strict";n.d(t,"a",function(){return f});var r=n(6),i=n.n(r),o=n(0),a=n.n(o),s=n(4),u=(n.n(s),i.a||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}),l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),a()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=s.Math.Rectangle,f=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.top=t,this.left=n,this.bottom=r,this.right=i}return l(e,[{key:"multiply",value:function(e){this.top*=e,this.left*=e,this.bottom*=e,this.right*=e}},{key:"toObject",value:function(){return u({},this)}},{key:"equals",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Math.abs(e.top-this.top)<=t&&Math.abs(e.left-this.left)<=t&&Math.abs(e.bottom-this.bottom)<=t&&Math.abs(e.right-this.right)<=t}},{key:"scale",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments[1];return void 0===t&&(t=e),this.top*=t,this.bottom*=t,this.left*=e,this.right*=e,this}},{key:"clone",value:function(){return new e(this.top,this.left,this.bottom,this.right)}},{key:"applyToRectangle",value:function(e){return new c(e.x+this.left,e.y+this.top,e.width-this.left-this.right,e.height-this.top-this.bottom)}}],[{key:"ZERO",get:function(){return new e(0,0,0,0)}}]),e}()},function(e,t,n){var r=n(24),i=n(126),o=n(89),a=Object.defineProperty;t.f=n(25)?Object.defineProperty:function(e,t,n){if(r(e),t=o(t,!0),r(n),i)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){e.exports={default:n(211),__esModule:!0}},function(e,t,n){"use strict";n.d(t,"a",function(){return b});var r=n(6),i=n.n(r),o=n(0),a=n.n(o),s=n(2),u=n.n(s),l=n(3),c=n.n(l),f=n(1),h=n.n(f),p=n(4),d=(n.n(p),n(83)),_=n(18),v=n(71),y=n(48),g=i.a||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},m=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),a()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),b=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||h()(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=c()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(u.a?u()(e,t):e.__proto__=t)}(t,d.a),m(t,[{key:"_calculateLayoutElements",value:function(){var e=this.serializeOptions(),t=e.attributes,n=e.imageInsets,r=e.size,i=(e.width,this.getWords().joined(1)[0]||""),o=t.fontIdentifier,a=new v.a({text:i,fontIdentifier:o});a.fitWidth(this._getTextFrame().width);var s=a.getTextMetrics().height+n.top+n.bottom;r.height=s;var u=this._getTextFrame();return[new y.a({text:i,frame:u,font:a})]}}]),t}();b.prototype.availableOptions=g({},d.a.prototype.availableOptions,{imageInsets:{type:p.OptionType.OBJECT,default:new _.a}})},function(e,t,n){"use strict";n.d(t,"a",function(){return g});var r=n(0),i=n.n(r),o=n(2),a=n.n(o),s=n(3),u=n.n(s),l=n(21),c=n.n(l),f=n(84),h=n.n(f),p=n(1),d=n.n(p),_=n(4),v=(n.n(_),function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}()),y=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||d()(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=u()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(a.a?a()(e,t):e.__proto__=t)}(t,_.Configurable),v(t,[{key:"loadImages",value:function(){var e=function(e){return function(){var t=e.apply(this,arguments);return new c.a(function(e,n){return function r(i,o){try{var a=t[i](o),s=a.value}catch(e){return void n(e)}if(!a.done)return c.a.resolve(s).then(function(e){r("next",e)},function(e){r("throw",e)});e(s)}("next")})}}(h.a.mark(function e(t){var n,r,i;return h.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:n=[],r=0;case 2:if(!(r<t.length)){e.next=10;break}return i=t[r],e.next=6,this.addImage(i.path,i.fullPath,i.image);case 6:n.push(i);case 7:r++,e.next=2;break;case 10:return e.abrupt("return",n);case 11:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"addImage",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"anonymous",i=this.getImages();return n?(i[e]={fullPath:t,image:n},c.a.resolve({fullPath:t,image:n})):new c.a(function(o,a){(n=new _.Image).onload=function(){i[e]={fullPath:t,image:n},o({fullPath:t,image:n})},n.crossOrigin=_.Utils.getCrossOriginValue(r),n.onerror=a,n.src=t})}},{key:"getImage",value:function(e){var t=this.getImages()[e];return t?t.image:null}},{key:"getVariation",value:function(e){return this.getFonts()[e]}},{key:"addFont",value:function(e,t){return this.getFonts()[e]=t,t}}]),t}();y.prototype.availableOptions={images:{type:_.OptionType.OBJECT,default:{}},fonts:{type:_.OptionType.OBJECT,default:{}}};var g=new y},function(e,t,n){var r=n(20);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n){e.exports=!n(35)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,n){var r=n(52);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){"use strict";(function(e){function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return s()(e)}var i=n(6),o=n.n(i),a=n(15),s=n.n(a),u=n(42),l=n.n(u),c=n(46),f=n.n(c),h=n(0),p=n.n(h),d=n(21),_=n.n(d),v=n(47),y=n.n(v),g=n(1),m=n.n(g),b=n(60),w=n(231),x=o.a||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},T="function"==typeof f.a&&"symbol"==typeof l.a?function(e){return typeof e}:function(e){return e&&"function"==typeof f.a&&e.constructor===f.a&&e!==f.a.prototype?"symbol":typeof e},k=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),p()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),R=function(){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t)}return k(t,null,[{key:"isArray",value:function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{key:"mapRange",value:function(e,t,n){return(e-t.getMin())*n.getLength()/t.getLength()+n.getMin()}},{key:"isPlainObject",value:function(e){if("object"!==(void 0===e?"undefined":T(e))||!e)return!1;if("function"==typeof m.a){var t=m()(e);return t===Object.prototype||null===t}return"[object Object]"===Object.prototype.toString.call(e)}},{key:"isMobile",value:function(){if("undefined"==typeof navigator)return!1;var e=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4))}},{key:"isBrowser",value:function(){return"undefined"!=typeof window}},{key:"isNode",value:function(){return"undefined"==typeof window&&void 0!==e}},{key:"values",value:function(e){var t=[];for(var n in e)t.push(e[n]);return t}},{key:"generateUUID",value:function(){var e=(new Date).getTime();return void 0!==window.performance&&"function"==typeof window.performance.now&&(e+=window.performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"===t?n:3&n|8).toString(16)})}},{key:"isDOMElement",value:function(e){return"object"===("undefined"==typeof HTMLElement?"undefined":T(HTMLElement))?e instanceof HTMLElement:e&&"object"===(void 0===e?"undefined":T(e))&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName}},{key:"isTouchEvent",value:function(e){return-1!==e.type.indexOf("touch")}},{key:"resizeVectorToFit",value:function(e,t){var n=Math.min(t.x/e.x,t.y/e.y);return e.clone().multiply(n)}},{key:"resizeVectorToFill",value:function(e,t){var n=e.x/e.y;return n>t.x/t.y?t.clone().set(t.y*n,t.y):t.clone().set(t.x,t.x/n)}},{key:"isExtendable",value:function(e){return void 0!==e&&null!==e&&("object"===(void 0===e?"undefined":T(e))||"function"==typeof e)}},{key:"defaults",value:function(e){var t={};for(var n in e)t[n]=e[n];for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];for(var a=0;a<i.length;a++){var s=i[a];for(var u in s)void 0===t[u]&&(t[u]=s[u])}return t}},{key:"deepMerge",value:function(e){for(var n=arguments.length,i=Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];return i.reduce(function e(n,i){if(void 0===i)return e(null,n);if(Array.isArray(i))return[].concat(r(i));if(!t.isPlainObject(i))return i;if(!t.isPlainObject(n))return x({},i);var o=x({},n);return y()(i).forEach(function(t){var r=i[t];void 0!==r&&(o[t]=e(n[t],r))}),o},e)}},{key:"deepDefaults",value:function(e){for(var n=arguments.length,i=Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];var a=[].concat(i).reverse();return t.deepMerge.apply(t,r(a).concat([e]))}},{key:"deepClone",value:function(e){var n={};for(var r in e)t.isExtendable(e[r])?n[r]=t.deepClone(e[r]):n[r]=e[r];return n}},{key:"getDeepProperty",value:function(e,t){return"string"==typeof t?e[t]:Array.isArray(t)?t.reduce(function(e,t){return e?"function"==typeof t?function(e,t){var n=void 0;try{n=t(e)}catch(e){if(!(e instanceof TypeError))throw e}return n}(e,t):e[t]:null},e):void 0}},{key:"extend",value:function(e){var t={};for(var n in e)t[n]=e[n];for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];for(var a=0;a<i.length;a++){var s=i[a];for(var u in s)t[u]=s[u]}return t}},{key:"clone",value:function(e){return this.extend({},e)}},{key:"createBlobURIFromDataURI",value:function(t){var n="undefined"==typeof window?e:window;if(!(n.Blob&&n.URL&&ArrayBuffer&&Uint8Array))return t;for(var r=b.a.decode(t.split(",")[1]),i=t.split(",")[0].split(":")[1].split(";")[0],o=new ArrayBuffer(r.length),a=new Uint8Array(o),s=0;s<r.length;s++)a[s]=r[s];var u=new n.Blob([o],{type:i});return n.URL.createObjectURL(u)}},{key:"getUUID",value:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}},{key:"createCanvas",value:function(){return document.createElement("canvas")}},{key:"convertHtmlImageToRGBACanvas",value:function(e,n){var r=n||t.createCanvas();r.width=e.width,r.height=e.height;var i=r.getContext("2d");return i.clearRect(0,0,r.width,r.height),i.drawImage(e,0,0,e.width,e.height),r}},{key:"isPowerOfTwo",value:function(e){return 0==(e.x&e.x-1)&&0==(e.y&e.y-1)}},{key:"nextLowestPOT",value:function(e){for(var t=1;t<32;t<<=1)e|=e>>t;return e-(e>>1)}},{key:"nextHighestPOT",value:function(e){e--;for(var t=1;t<32;t<<=1)e|=e>>t;return e+1}},{key:"moveArrayItem",value:function(e,t,n){if(n>=e.length)for(var r=n-e.length;1+r--;)e.push(void 0);e.splice(n,0,e.splice(t,1)[0])}},{key:"ensureCanvasDimensions",value:function(e,t){e.width===t.x&&e.height===t.y||(e.width=t.x,e.height=t.y)}},{key:"byteArrayToString",value:function(e){return e.map(function(e){return String.fromCharCode(e)}).join("")}},{key:"clamp",value:function(e,t,n){return Math.max(t,Math.min(e,n))}},{key:"wildCardMatch",value:function(e,t){return new RegExp("^"+t.split("*").join(".*")+"$").test(e)}},{key:"flipObject",value:function(e){var t={};for(var n in e)t[e[n]]=n;return t}},{key:"cloneOptions",value:function(e){var t={};for(var n in e){var r=e[n];Array.isArray(r)?r=r.slice():r.clone&&(r=r.clone()),t[n]=r}return t}},{key:"ISODateString",value:function(e){function t(e){return e<10?"0"+e:e}return e.getUTCFullYear()+"-"+t(e.getUTCMonth()+1)+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())+"Z"}},{key:"getCrossOriginValue",value:function(e){return e?"none"!==e?e:void 0:"anonymous"}},{key:"shallowEqual",value:function(e,t){if(e===t)return!0;if("object"!==(void 0===e?"undefined":T(e))||null===e||"object"!==(void 0===t?"undefined":T(t))||null===t)return!1;var n=y()(e),r=y()(t);if(n.length!==r.length)return!1;for(var i=hasOwnProperty.bind(t),o=0;o<n.length;o++)if(!i(n[o])||e[n[o]]!==t[n[o]])return!1;return!0}},{key:"enableIf",value:function(e,t){return e?t:void 0}},{key:"invariant",value:function(e,t){if(!e)throw new Error(t)}},{key:"executePromises",value:function(e){var t=e.length,n=0,r=[],i=[];return new _.a(function(o,a){var s=function(){++n>=t&&(i.length<=0?o(r):a(i))},u=function(e){r.push(e),s()},l=function(e){i.push(e),s()};e.forEach(function(e){e.then(u).catch(l)})})}}]),t}();R.Array=w.a,t.a=R}).call(t,n(59))},function(e,t,n){e.exports={default:n(232),__esModule:!0}},function(e,t,n){e.exports={default:n(234),__esModule:!0}},function(e,t,n){"use strict";n.d(t,"a",function(){return u});var r=n(0),i=n.n(r),o=n(4),a=(n.n(o),function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}()),s=o.Math.Rectangle,u=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.width=t,this.height=n}return a(e,[{key:"set",value:function(e,t){this.width=e,this.height=t}},{key:"aspect",value:function(){return this.width/this.height}},{key:"rectangle",value:function(e,t){return new s(e,t,this.width,this.height)}},{key:"clone",value:function(){return new e(this.width,this.height)}},{key:"scale",value:function(e,t){return void 0===t&&(t=e),this.width*=e,this.height*=t,this}},{key:"copy",value:function(e){return this.width=e.width,this.height=e.height,this}},{key:"fitInWidthWithOther",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new e;return this.copy(e.fitTwoInWidth(t,this,n)[0]),this}}],[{key:"fitTwoInWidth",value:function(t,n,r){var i=n.width*r.height+n.height*r.width,o=r.height*t/i,a=n.width*o,s=n.height*o;return[new e(a,s),new e(t-a,s)]}}]),e}()},function(e,t,n){var r=n(19),i=n(53);e.exports=n(25)?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(78),i=n(34),o=n(60),a=n(62),s=n(262),u=n(27),l=n(65),c=n(61),f=n(33),h=n(39),p=n(144),d=n(264),_=n(274);n.d(t,"requestAnimationFrame",function(){return _.b}),n.d(t,"cancelAnimationFrame",function(){return _.a}),n.d(t,"Engine",function(){return r.a}),n.d(t,"EventEmitter",function(){return a.a}),n.d(t,"Events",function(){return s.a}),n.d(t,"Utils",function(){return u.a}),n.d(t,"Configurable",function(){return l.a}),n.d(t,"Color",function(){return c.a}),n.d(t,"Constants",function(){return i}),n.d(t,"Log",function(){return f.a}),n.d(t,"Promise",function(){return h.a}),n.d(t,"GLUtils",function(){return p.a}),n.d(t,"Base64",function(){return o.a}),n.d(t,"LicenseChecker",function(){return d.b}),n.d(t,"FreeLicenseChecker",function(){return d.a});var v=n(155);n.d(t,"Vector2",function(){return v.Vector2}),n.d(t,"Vector3",function(){return v.Vector3}),n.d(t,"Range",function(){return v.Range}),n.d(t,"Rectangle",function(){return v.Rectangle}),n.d(t,"Matrix",function(){return v.Matrix}),n.d(t,"ColorMatrix",function(){return v.ColorMatrix}),n.d(t,"CubicBezierCurve",function(){return v.CubicBezierCurve})},function(e,t,n){"use strict";(function(e){function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return o()(e)}var i=n(15),o=n.n(i),a=n(0),s=n.n(a),u=n(224),l=n.n(u),c=n(27),f=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),s()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),h=[{name:"trace",type:"trace",background:"#EEEEEE",color:"#AAAAAA"},{name:"info",type:"log",background:"#BDE5F8",color:"#00529B"},{name:"warn",type:"warn",background:"#FEEFB3",color:"#9F6000"},{name:"error",type:"error",background:"#FFBABA",color:"#D8000C"},{name:"log",type:"log",background:"#EEEEEE",color:"#1f4f6b"}],p=function(){return console&&console.group&&console.groupCollapsed&&console.groupEnd},d=new(function(){function t(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"warn",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:h;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this._levels=[].concat(r(i)),this._maxLevel=this.getLevelIndexByName(n),this._consoleFuncs={trace:function(){var e,t;p()?((e=console).groupCollapsed.apply(e,arguments),console.trace(),console.groupEnd()):(t=console).trace.apply(t,arguments)}},this._levels.forEach(function(t){var n=t.name;e[n]=function(t){for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];e._log.apply(e,[n,t].concat(i))}})}return f(t,[{key:"getLevelIndexByName",value:function(e){return c.a.Array.findIndex(this._levels,function(t){return t.name===e})}},{key:"getLevelObjectByName",value:function(e){return c.a.Array.find(this._levels,function(t){return t.name===e})}},{key:"canLog",value:function(e){var t=this.getLevelIndexByName(e);return!(t<0)&&t>=this._maxLevel}},{key:"setLevel",value:function(e){var t=this.getLevelIndexByName(e);t<0||(this._maxLevel=t)}},{key:"_log",value:function(t,n){for(var i=arguments.length,o=Array(i>2?i-2:0),a=2;a<i;a++)o[a-2]=arguments[a];var s=this.getLevelObjectByName(t);if(s&&this.canLog(t)){s.name;var u,f=s.type,h=s.background,d=s.color,_=o.filter(function(e){return void 0!==e}).map(function(e){return e.toObject?JSON.parse(l()(e.toObject())):e}),v=this._consoleFuncs[f]||console[f]?function(){var e;return(e=console)[f].apply(e,arguments)}:function(){var e;return(e=console).log.apply(e,arguments)},y=_.length,g=function(e,t){return["background: #2D7BFF; line-height: 20px; padding: 4px 0","background: #2B2B2B; color: white; line-height: 20px; padding: 4px 0","background: #2D7BFF; line-height: 20px; padding: 4px 0","background: "+e+"; color: "+t+"; line-height: 20px; padding: 4px 0; font-weight: bold","background: #2B2B2B; color: white; line-height: 20px; padding: 4px 0","background: #2D7BFF; line-height: 20px; padding: 4px 0"]}(h,d);if(!(!e||e&&e.browser)||"undefined"==typeof navigator||!navigator.userAgent.match(/Gecko|WebKit/i)||navigator.userAgent.match(/Trident/)){var m=_.length;return m<=0?void v("PhotoEditorSDK | "+n+" "):1===m&&"string"==typeof _[0]?void v("PhotoEditorSDK | "+n+" | "+_[0]):void v.apply(void 0,["PhotoEditorSDK | "+n+" | "].concat(r(_)))}y<=0?v.apply(void 0,["%c %c PhotoEditorSDK %c %c "+n+" %c %c "].concat(r(g))):1!==y||"string"!=typeof _[0]?p()?((u=console).groupCollapsed.apply(u,["%c %c PhotoEditorSDK %c %c "+n+" %c"].concat(r(c.a.Array.init(g)))),v.apply(void 0,r(_)),console.groupEnd()):v.apply(void 0,["%c %c PhotoEditorSDK %c %c "+n+" %c"].concat(r(c.a.Array.init(g)),r(_))):v.apply(void 0,["%c %c PhotoEditorSDK %c %c "+n+" %c "+_[0]+" %c "].concat(r(g)))}}},{key:"image",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments[1],n=new window.Image,r=function(){var t=n.width,r=n.height;e&&console.log(e),console.log("%c+","\n font-size: 1px;\n padding: 0px "+Math.floor(t/2)+"px;\n line-height: "+r+"px;\n background: url("+n.src+");\n color: transparent;\n background-repeat: no-repeat;\n background-size: "+t+"px "+r+"px;")};return n.onload=r,t instanceof window.HTMLCanvasElement?n.src=t.toDataURL():t instanceof window.Image?(n=t,r()):"string"==typeof t?n.src=t:this.log(e,t),n}},{key:"texture",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments[1];if(t){var n=t.getBaseTexture(),r=n.getRenderers(),i=c.a.Array.find(r,function(e){return e&&"WebGL"===e.constructor.type}),o=n.getFrame(),a=o.width,s=o.height;if(i){var u=i.getContext(),l=n.getGLTextureForRenderer(i);this.logGlTexture(u,l,a,s,e)}else d.image(e,n.getSource())}else this.log(e,"texture: null or undefined")}},{key:"logGlTexture",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:150,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:150,i=arguments[4];e.bindTexture(e.TEXTURE_2D,t);var o=e.createFramebuffer();e.bindFramebuffer(e.FRAMEBUFFER,o),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t,0);var a=new Uint8Array(n*r*4);e.readPixels(0,0,n,r,e.RGBA,e.UNSIGNED_BYTE,a),e.deleteFramebuffer(o);var s=document.createElement("canvas");s.width=n,s.height=r;var u=s.getContext("2d"),l=u.createImageData(n,r);return l.data.set(a),u.putImageData(l,0,0),d.image(i,s)}}]),t}())("warn");t.a=d}).call(t,n(141))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"RenderType",function(){return r}),n.d(t,"ImageFormat",function(){return i}),n.d(t,"OptionType",function(){return o}),n.d(t,"UniformType",function(){return a}),n.d(t,"RendererType",function(){return s});var r={IMAGE:"image",DATAURL:"data-url",BUFFER:"buffer",BLOB:"blob",MSBLOB:"ms-blob"},i={PNG:"image/png",JPEG:"image/jpeg"},o={NUMBER:"number",VECTOR2:"vector2",COLOR_MATRIX:"color-matrix",COLOR:"color",ARRAY:"array",OBJECT:"object",STRING:"string",BOOLEAN:"boolean",CONFIGURABLE:"configurable",IMAGE:"image",FUNCTION:"function",TEXTURE:"texture",ALL:"*"},a={SAMPLER2D:"sampler2d",INT:"i",INT1:"1i",INT2:"2i",INT3:"3i",INT4:"4i",FLOAT:"f",FLOAT1:"1f",FLOAT2:"2f",FLOAT_VECTOR2:"2fv",FLOAT3:"3f",FLOAT4:"4f",MAT3:"mat3",MAT3FV:"mat3fv",MAT4:"mat4"},s={WEBGL:"webgl",CANVAS:"canvas"}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(90),i=n(86);e.exports=function(e){return r(i(e))}},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.x=t,this.y=n,void 0===this.x&&(this.x=0),void 0===this.y&&(this.y=0)}return o(e,[{key:"set",value:function(e,t){return this.x=e,this.y=t,this}},{key:"clone",value:function(){return new e(this.x,this.y)}},{key:"copy",value:function(e){return this.x=e.x,this.y=e.y,this}},{key:"clamp",value:function(t,n){var r=null!==t&&void 0!==t,i=null!==n&&void 0!==n;return t instanceof e||!r||(t=new e(t,t)),n instanceof e||!i||(n=new e(n,n)),r&&(this.x=Math.max(t.x,this.x),this.y=Math.max(t.y,this.y)),i&&(this.x=Math.min(n.x,this.x),this.y=Math.min(n.y,this.y)),this}},{key:"divide",value:function(t,n){return t instanceof e?(this.x/=t.x,this.y/=t.y):(this.x/=t,this.y/=void 0===n?t:n),this}},{key:"subtract",value:function(t,n){return t instanceof e?(this.x-=t.x,this.y-=t.y):(this.x-=t,this.y-=void 0===n?t:n),this}},{key:"multiply",value:function(t,n){return t instanceof e?(this.x*=t.x,this.y*=t.y):(this.x*=t,this.y*=void 0===n?t:n),this}},{key:"add",value:function(t,n){return t instanceof e?(this.x+=t.x,this.y+=t.y):(this.x+=t,this.y+=void 0===n?t:n),this}},{key:"dot",value:function(t,n){return t instanceof e?this.x*t.x+this.y*t.y:this.x*t+this.y*(void 0===n?t:n)}},{key:"equals",value:function(t,n){return t instanceof e?t.x===this.x&&t.y===this.y:t===this.x&&n===this.y}},{key:"flip",value:function(){var e=this.x;return this.x=this.y,this.y=e,this}},{key:"round",value:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},{key:"ceil",value:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}},{key:"floor",value:function(){return this.x=0|this.x,this.y=0|this.y,this}},{key:"abs",value:function(){return this.x=Math.abs(this.x),this.y=Math.abs(this.y),this}},{key:"len",value:function(){return Math.sqrt(this.x*this.x+this.y*this.y)}},{key:"min",value:function(){return Math.min(this.x,this.y)}},{key:"max",value:function(){return Math.max(this.x,this.y)}},{key:"toObject",value:function(){return{x:this.x,y:this.y}}},{key:"toString",value:function(){return"Vector2({ x: "+this.x+", y: "+this.y+" })"}},{key:"roundDecimal",value:function(e){return this.x=parseFloat(this.x.toFixed(e)),this.y=parseFloat(this.y.toFixed(e)),this}},{key:"asArray",value:function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]?[this.y,this.x]:[this.x,this.y]}}],[{key:"fromObject",value:function(t){return new e(t.x,t.y)}},{key:"NULL",get:function(){return new e(0,0)}}]),e}();t.a=a},function(e,t,n){"use strict";(function(e){var r=n(42),i=n.n(r),o=n(46),a=n.n(o),s=n(21),u=n.n(s),l=n(0),c=n.n(l),f=n(250),h=n.n(f),p="function"==typeof a.a&&"symbol"==typeof i.a?function(e){return typeof e}:function(e){return e&&"function"==typeof a.a&&e.constructor===a.a&&e!==a.a.prototype?"symbol":typeof e},d=void 0===e?window:e,_=void 0!==u.a?u.a:function(){function e(e,t){f.add(e,t),l||(l=_(f.drain))}function t(e){var t,n=void 0===e?"undefined":p(e);return null==e||"object"!=n&&"function"!=n||(t=e.then),"function"==typeof t&&t}function n(){for(var e=0;e<this.chain.length;e++)r(this,1===this.state?this.chain[e].success:this.chain[e].failure,this.chain[e]);this.chain.length=0}function r(e,n,r){var i,o;try{!1===n?r.reject(e.msg):(i=!0===n?e.msg:n.call(void 0,e.msg))===r.promise?r.reject(TypeError("Promise-chain cycle")):(o=t(i))?o.call(i,r.resolve,r.reject):r.resolve(i)}catch(e){r.reject(e)}}function i(t){var r=this;r.triggered||(r.triggered=!0,r.def&&(r=r.def),r.msg=t,r.state=2,r.chain.length>0&&e(n,r))}function o(e,t,n,r){for(var i=0;i<t.length;i++)!function(i){e.resolve(t[i]).then(function(e){n(i,e)},r)}(i)}function a(e){this.def=e,this.triggered=!1}function s(r){if("function"!=typeof r)throw TypeError("Not a function");if(0!==this.__NPO__)throw TypeError("Not a promise");this.__NPO__=1;var o=new function(e){this.promise=e,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}(this);this.then=function(t,r){var i={success:"function"!=typeof t||t,failure:"function"==typeof r&&r};return i.promise=new this.constructor(function(e,t){if("function"!=typeof e||"function"!=typeof t)throw TypeError("Not a function");i.resolve=e,i.reject=t}),o.chain.push(i),0!==o.state&&e(n,o),i.promise},this.catch=function(e){return this.then(void 0,e)};try{r.call(void 0,function(r){(function r(o){var s,u=this;if(!u.triggered){u.triggered=!0,u.def&&(u=u.def);try{(s=t(o))?e(function(){var e=new a(u);try{s.call(o,function(){r.apply(e,arguments)},function(){i.apply(e,arguments)})}catch(t){i.call(e,t)}}):(u.msg=o,u.state=1,u.chain.length>0&&e(n,u))}catch(r){i.call(new a(u),r)}}}).call(o,r)},function(e){i.call(o,e)})}catch(r){i.call(o,r)}}var u,l,f,d=Object.prototype.toString,_=void 0!==h.a?function(e){return h()(e)}:setTimeout;try{Object.defineProperty({},"x",{}),u=function(e,t,n,r){return c()(e,t,{value:n,writable:!0,configurable:!1!==r})}}catch(l){u=function(e,t,n){return e[t]=n,e}}f=function(){var e,t,n;return{add:function(r,i){n=new function(e,t){this.fn=e,this.self=t,this.next=void 0}(r,i),t?t.next=n:e=n,t=n,n=void 0},drain:function(){var n=e;for(e=t=l=void 0;n;)n.fn.call(n.self),n=n.next}}}();var v=u({},"constructor",s,!1);return s.prototype=v,u(v,"__NPO__",0,!1),u(s,"resolve",function(e){return e&&"object"==(void 0===e?"undefined":p(e))&&1===e.__NPO__?e:new this(function(t,n){if("function"!=typeof t||"function"!=typeof n)throw TypeError("Not a function");t(e)})}),u(s,"reject",function(e){return new this(function(t,n){if("function"!=typeof t||"function"!=typeof n)throw TypeError("Not a function");n(e)})}),u(s,"all",function(e){var t=this;return"[object Array]"!=d.call(e)?t.reject(TypeError("Not an array")):0===e.length?t.resolve([]):new t(function(n,r){if("function"!=typeof n||"function"!=typeof r)throw TypeError("Not a function");var i=e.length,a=Array(i),s=0;o(t,e,function(e,t){a[e]=t,++s===i&&n(a)},r)})}),u(s,"race",function(e){var t=this;return"[object Array]"!=d.call(e)?t.reject(TypeError("Not an array")):new t(function(n,r){if("function"!=typeof n||"function"!=typeof r)throw TypeError("Not a function");o(t,e,function(e,t){n(t)},r)})}),s}();d.Promise=d.Promise||_,t.a=_}).call(t,n(59))},function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return o()(e)}n.d(t,"a",function(){return c});var i=n(15),o=n.n(i),a=n(0),s=n.n(a),u=n(4),l=(n.n(u),function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),s()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}()),c=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.words=[],t&&this.splitIntoWords(t)}return l(e,[{key:"splitIntoWords",value:function(e){return this.words=e.match(/\S+/g)||[],[].concat(r(this.words))}},{key:"get",value:function(){return[].concat(r(this.words))}},{key:"getWord",value:function(e){return this.words[e]}},{key:"set",value:function(e){return this.words=[].concat(r(e)),this}},{key:"slice",value:function(t,n){return e.fromWords(this.words.slice(t,n))}},{key:"getLowerCase",value:function(){return this.words.map(function(e){return e.toLowerCase()})}},{key:"getUpperCase",value:function(){return this.words.map(function(e){return e.toUpperCase()})}},{key:"size",value:function(){return this.words.length}},{key:"countNumberOfCharacters",value:function(){return this.words.reduce(function(e,t){return e+t.length},0)}},{key:"joined",value:function(e){var t=this,n=this.size(),r=Math.floor(n/e),i=n%e,o=0,a=0;return u.Utils.Array.range(0,e).map(function(e){o=a;var s=r+(e<i?1:0);return a=Math.min(o+s,n),u.Utils.Array.range(o,a).reduce(function(e,n){return e+(n===o?"":" ")+t.words[n]},"")})}}],[{key:"fromWords",value:function(t){var n=new e;return n.words=[].concat(r(t)),n}}]),e}()},function(e,t,n){"use strict";n.d(t,"d",function(){return h}),n.d(t,"c",function(){return p}),n.d(t,"f",function(){return d}),n.d(t,"e",function(){return _}),n.d(t,"b",function(){return y}),n.d(t,"a",function(){return g});var r=n(28),i=n.n(r),o=n(29),a=n.n(o),s=n(4),u=(n.n(s),function(){return function(e,t){if(Array.isArray(e))return e;if(i()(Object(e)))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var s,u=a()(e);!(r=(s=u.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&u.return&&u.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}()),l=s.Math.Rectangle,c=s.Math.Vector2,f=function(e,t,n,r){e.drawImage(t,n.x,n.y,n.width,n.height,r.x,r.y,r.width,r.height)},h=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"source-over",i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];e.save(),e.fillStyle=n.toRGBA(),e.globalCompositeOperation=r,e.fillRect(t.x,t.y,t.width,t.height),i&&(e.strokeStyle=n.toRGBA(),e.strokeWith=1,e.strokeRect(t.x,t.y,t.width,t.height)),e.restore()},p=function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"source-over",o=arguments.length>5&&void 0!==arguments[5]&&arguments[5];e.save(),e.fillStyle=r.toRGBA(),e.globalCompositeOperation=i,n=Math.min(Math.max(n,0),.5*Math.min(t.height,t.width));var a=t.x,s=t.x+t.width,u=t.y,l=t.y+t.height;e.beginPath(),e.moveTo(a+n,u),e.arcTo(s,u,s,l,n),e.arcTo(s,l,a,l,n),e.arcTo(a,l,a,u,n),e.arcTo(a,u,s,u,n),e.closePath(),e.fill(),o&&e.stroke(),e.restore()},d=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:4;e.save(),e.strokeStyle=n.toRGBA(),e.lineWidth=r,e.strokeRect(t.x,t.y,t.width,t.height),e.restore()},_=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"source-over";e.save();var i=t.height/2,o=t.y+i,a=t.x+i,s=t.x+t.width;for(e.fillStyle=n.toRGBA(),e.globalCompositeOperation=r;a<s;)e.beginPath(),e.arc(a,o,i,0,2*Math.PI),e.fill(),a+=4*i;e.restore()},v=function(e,t){var n=t.applyToRectangle(e),r=e.x,i=e.y,o=e.width,a=e.height;return{corners:[l.FromDiagonalPoints(new c(0,0),new c(n.x,n.y)),l.FromDiagonalPoints(new c(0,n.y+n.height),new c(n.x,a)),l.FromDiagonalPoints(new c(n.x+n.width,n.y+n.height),new c(o,a)),l.FromDiagonalPoints(new c(n.x+n.width,0),new c(o,n.y))].map(function(e){return e.translate(r,i)}),bars:[l.FromDiagonalPoints(new c(n.x,0),new c(n.x+n.width,n.y)),l.FromDiagonalPoints(new c(0,n.y),new c(n.x,n.y+n.height)),l.FromDiagonalPoints(new c(n.x,n.y+n.height),new c(n.x+n.width,a)),l.FromDiagonalPoints(new c(n.x+n.width,n.y),new c(o,n.y+n.height))].map(function(e){return e.translate(r,i)}),center:n}},y=function(e,t,n,r){var i=t.naturalWidth||t.width,o=t.naturalHeight||t.height,a=v(new l(0,0,i,o),r),c=v(n,r);f(e,t,a.center,c.center),s.Utils.Array.zip(a.corners,c.corners).forEach(function(n){var r=u(n,2),i=r[0],o=r[1];return f(e,t,i,o)}),s.Utils.Array.zip(a.bars,c.bars).forEach(function(n){var r=u(n,2),i=r[0],o=r[1];return f(e,t,i,o)})},g=function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"source-atop";if(e.save(),r&&(e.globalAlpha=r.a),e.drawImage(t,n.x,n.y,n.width,n.height),r&&(e.globalAlpha=1),r){var o=r.clone();o.a=1,h(e,n,o,i)}e.restore()}},function(e,t,n){e.exports={default:n(190),__esModule:!0}},function(e,t,n){"use strict";var r=n(191)(!0);n(87)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})})},function(e,t){e.exports={}},function(e,t,n){var r=n(86);e.exports=function(e){return Object(r(e))}},function(e,t,n){e.exports={default:n(198),__esModule:!0}},function(e,t,n){e.exports={default:n(229),__esModule:!0}},function(e,t,n){"use strict";n.d(t,"a",function(){return c});var r=n(2),i=n.n(r),o=n(3),a=n.n(o),s=n(1),u=n.n(s),l=n(4);n.n(l);var c=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||u()(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=a()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(i.a?i()(e,t):e.__proto__=t)}(t,l.Configurable),t}();c.prototype.availableOptions={text:{type:l.OptionType.STRING,default:""},frame:{type:l.OptionType.OBJECT,default:null},font:{type:l.OptionType.OBJECT,default:null}}},function(e,t,n){"use strict";n.d(t,"a",function(){return R});var r=n(6),i=n.n(r),o=n(0),a=n.n(o),s=n(5),u=n.n(s),l=n(2),c=n.n(l),f=n(3),h=n.n(f),p=n(1),d=n.n(p),_=n(4),v=(n.n(_),n(69)),y=n(40),g=n(72),m=n(118),b=n(23),w=n(17),x=i.a||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},T=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),a()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),k=function e(t,n,r){null===t&&(t=Function.prototype);var i=u()(t,n);if(void 0===i){var o=d()(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},R=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||d()(t)).call.apply(e,[this].concat(r)));return o._rowType=g.a.Box,o._alignmentRandomizer=new w.a(0),o._isMaskedRandomizer=new w.a(0),o._seedPool.push(o._alignmentRandomizer),o._seedPool.push(o._isMaskedRandomizer),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=h()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(c.a?c()(e,t):e.__proto__=t)}(t,v.a),T(t,[{key:"getImagePaths",value:function(){return[g.a.Box.getImagePath()]}},{key:"_modifiedText",value:function(e){return k(t.prototype.__proto__||d()(t.prototype),"_modifiedText",this).call(this,e).toLowerCase()}},{key:"_modifiedLines",value:function(e){var t=new y.a;return t.set([e.reduce(function(e,t){return e+(""===e?"":"\n")+t.joined(1)[0]},"")]),[t]}},{key:"_layoutRows",value:function(e,n){var r=k(t.prototype.__proto__||d()(t.prototype),"_layoutRows",this).call(this,e,n),i=r[0];if(i&&this.getSquareLayout()){var o=i.getSize();o.height=o.width}return r}},{key:"getAlignment",value:function(){return this._alignmentRandomizer.pickNext(this.constructor.ValidAlignments||t.ValidAlignments)}},{key:"_randomLayoutRow",value:function(e,t,n,r){var i=this.getAlignment(),o=this._rowType,a=b.a.getImage(o.getImagePath());r.setAlignment(i);var s=new m.a({words:e,width:n,attributes:r,image:a,imageInsets:o.insetsForWidth(n),capInsets:o.getCapInsets(),backgroundColor:_.Color.WHITE,centerOffset:0,textScaleFactor:.7,isMasked:this._isMaskedRandomizer.nextBool()});this._rowType===g.a.Box&&(s.serverImageSmoothingFix=!0);var u=s.getSize();return this.getSquareLayout()?u.height=u.width:u.height=Math.max(u.height,u.width*o.getMinimumHeightRatio()),s}}]),t}();R.defaultFontIdentifiers=["imgly_font_galano_grotesque_bold"],R.Alignment={Left:"left",Center:"center",Right:"right"},R.ValidAlignments=[R.Alignment.Left,R.Alignment.Center,R.Alignment.Right],R.identifier="imgly_text_design_masked",R.prototype.availableOptions=x({},v.a.prototype.availableOptions,{fontIdentifiers:{type:_.OptionType.ARRAY,default:R.defaultFontIdentifiers},squareLayout:{type:_.OptionType.BOOLEAN,default:!0}})},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return o(e,null,[{key:"getSizeOfLogicalShape",value:function(e){for(var t=e[0],n=1;n<e.length;n++)t*=e[n];return t}},{key:"getTextureDimensionsForLogicalShape",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2048,r=e.getSizeOfLogicalShape(t);if(t.length<=1&&r<=n)return[r,1];if(2===t.length&&t[0]<=n&&t[1]<=n)return t;if(3===t.length&&t[0]*t[1]<=n&&t[2]<=n)return[t[0]*t[1],t[2]];if(3===t.length&&t[0]<=n&&t[1]*t[2]<=n)return[t[0],t[1]*t[2]];if(4===t.length&&t[0]*t[1]*t[2]<=n&&t[3]<=n)return[t[0]*t[1]*t[2],t[3]];if(4===t.length&&t[0]<=n&&t[1]*t[2]*t[3]<=n)return[t[0],t[1]*t[2]*t[3]];for(var i=Math.floor(Math.sqrt(r));i>1;--i)if(r%i==0)return[i,r/i];return[1,r]}},{key:"isSameShape",value:function(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}}]),e}();t.a=a},function(e,t){e.exports=!0},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var r=n(128),i=n(93);e.exports=Object.keys||function(e){return r(e,i)}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){var r=n(19).f,i=n(36),o=n(14)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},function(e,t,n){n(196);for(var r=n(13),i=n(31),o=n(44),a=n(14)("toStringTag"),s="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),u=0;u<s.length;u++){var l=s[u],c=r[l],f=c&&c.prototype;f&&!f[a]&&i(f,a,l),o[l]=o.Array}},function(e,t,n){var r=n(26),i=n(134),o=n(135),a=n(24),s=n(74),u=n(101),l={},c={};(t=e.exports=function(e,t,n,f,h){var p,d,_,v,y=h?function(){return e}:u(e),g=r(n,f,t?2:1),m=0;if("function"!=typeof y)throw TypeError(e+" is not iterable!");if(o(y)){for(p=s(e.length);p>m;m++)if((v=t?g(a(d=e[m])[0],d[1]):g(e[m]))===l||v===c)return v}else for(_=y.call(e);!(d=_.next()).done;)if((v=i(_,g,d.value,t))===l||v===c)return v}).BREAK=l,t.RETURN=c},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",i={encode:function(e){var t="",n=void 0,i=void 0,o=void 0,a=void 0,s=void 0,u=void 0,l=void 0,c=0;do{a=(n=e[c++])>>2,s=(3&n)<<4|(i=e[c++])>>4,u=(15&i)<<2|(o=e[c++])>>6,l=63&o,isNaN(i)?u=l=64:isNaN(o)&&(l=64),t=t+r.charAt(a)+r.charAt(s)+r.charAt(u)+r.charAt(l),n=i=o="",a=s=u=l=""}while(c<e.length);return t},decode:function(e){var t=void 0,n=void 0,i=void 0,o=void 0,a=void 0,s=void 0,u=0,l=[];if(/[^A-Za-z0-9+\/=]/g.exec(e))throw new Error("There were invalid base64 characters in the input text.\nValid base64 characters are A-Z, a-z, 0-9, '+', '/',and '='\nExpect errors in decoding.");e=e.replace(/[^A-Za-z0-9+\/=]/g,"");do{t=r.indexOf(e.charAt(u++))<<2|(o=r.indexOf(e.charAt(u++)))>>4,n=(15&o)<<4|(a=r.indexOf(e.charAt(u++)))>>2,i=(3&a)<<6|(s=r.indexOf(e.charAt(u++))),l.push(t),64!==a&&l.push(n),64!==s&&l.push(i),t=n=i="",o=a=s=""}while(u<e.length);return l}};t.a=i},function(e,t,n){"use strict";var r=n(28),i=n.n(r),o=n(29),a=n.n(o),s=n(0),u=n.n(s),l=function(){return function(e,t){if(Array.isArray(e))return e;if(i()(Object(e)))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var s,u=a()(e);!(r=(s=u.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&u.return&&u.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),u()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),f=function(){function e(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.r=t,this.g=n,this.b=r,this.a=i}return c(e,[{key:"toRGBA",value:function(){return"rgba("+[Math.round(255*this.r),Math.round(255*this.g),Math.round(255*this.b),this.a.toFixed(2)].join(",")+")"}},{key:"set",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.a;return this.r=e,this.g=t,this.b=n,this.a=r,this}},{key:"toRGB",value:function(){return[Math.round(255*this.r),Math.round(255*this.g),Math.round(255*this.b)]}},{key:"toHex",value:function(){return"#"+[this._componentToHex(Math.round(255*this.r)),this._componentToHex(Math.round(255*this.g)),this._componentToHex(Math.round(255*this.b))].join("")}},{key:"toGLColor",value:function(){return[this.r,this.g,this.b,this.a]}},{key:"toArray",value:function(){return this.toGLColor()}},{key:"toRGBGLColor",value:function(){return[this.r,this.g,this.b]}},{key:"toHSV",value:function(){var e,t=Math.max(this.r,this.g,this.b),n=Math.min(this.r,this.g,this.b),r=void 0,i=t,o=t-n;if(e=0===t?0:o/t,t===n)r=0;else{switch(t){case this.r:r=(this.g-this.b)/o,this.g<this.b&&(r+=6);break;case this.g:r=(this.b-this.r)/o+2;break;case this.b:r=(this.r-this.g)/o+4}r/=6}return[r,e,i]}},{key:"fromHSV",value:function(t,n,r){return this.copy(e.fromHSV(t,n,r)),this}},{key:"clone",value:function(){return new e(this.r,this.g,this.b,this.a)}},{key:"add",value:function(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this.a+=e.a,this}},{key:"minus",value:function(e){return this.r-=e.r,this.g-=e.g,this.b-=e.b,this.a-=e.a,this}},{key:"multiplyScalar",value:function(e){return this.r*=e,this.g*=e,this.b*=e,this.a*=e,this}},{key:"divideScalar",value:function(e){return this.r/=e,this.g/=e,this.b/=e,this.a/=e,this}},{key:"clamp",value:function(e,t){return this.r=Math.min(Math.max(this.r,e),t),this.g=Math.min(Math.max(this.g,e),t),this.b=Math.min(Math.max(this.b,e),t),this.a=Math.min(Math.max(this.a,e),t),this}},{key:"mix",value:function(e,t){return this.r=(1-t)*this.r+t*e.r,this.g=(1-t)*this.g+t*e.g,this.b=(1-t)*this.b+t*e.b,this.a=(1-t)*this.a+t*e.a,this}},{key:"copy",value:function(e){return this.r=e.r,this.g=e.g,this.b=e.b,this.a=e.a,this}},{key:"equals",value:function(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}},{key:"_componentToHex",value:function(e){var t=e.toString(16);return 1===t.length?"0"+t:t}},{key:"toString",value:function(){return"Color("+this.r+", "+this.g+", "+this.b+", "+this.a+")"}}],[{key:"fromHSV",value:function(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=[],a=o[0],s=o[1],u=o[2],l=Math.floor(6*t),c=6*t-l,f=r*(1-n),h=r*(1-c*n),p=r*(1-(1-c)*n);switch(l%6){case 0:a=r,s=p,u=f;break;case 1:a=h,s=r,u=f;break;case 2:a=f,s=r,u=p;break;case 3:a=f,s=h,u=r;break;case 4:a=p,s=f,u=r;break;case 5:a=r,s=f,u=h}return new e(a,s,u,i)}},{key:"fromArray",value:function(t){return new e(t[0],t[1],t[2],t[3])}},{key:"fromHex",value:function(t){var n=t.match(/[0-9A-fa-f]{1,2}/g),r=l(n,3),i=r[0],o=r[1],a=r[2];return new e(parseInt(i,16)/255,parseInt(o,16)/255,parseInt(a,16)/255,1)}},{key:"TRANSPARENT",get:function(){return new e(0,0,0,0)}},{key:"WHITE",get:function(){return new e(1,1,1,1)}},{key:"BLACK",get:function(){return new e(0,0,0,1)}},{key:"RED",get:function(){return new e(1,0,0,1)}},{key:"BLUE",get:function(){return new e(0,0,1,1)}},{key:"GREEN",get:function(){return new e(0,1,0,1)}}]),e}();t.a=f},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(33),a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=12,u=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._maxListeners=s,this._events={},this._pipeDestinations=[]}return a(e,[{key:"pipeEvents",value:function(e){this._pipeDestinations.push(e)}},{key:"unpipeEvents",value:function(e){var t=this._pipeDestinations.indexOf(e);-1!==t&&this._pipeDestinations.splice(t,1)}},{key:"on",value:function(e,t){if(void 0===e)throw new Error("Invalid event type: `"+e+"`");if("function"!=typeof t)throw new TypeError;var n=this._events[e]||(this._events[e]=[]);return-1!==n.indexOf(t)?this:(n.push(t),this._maxListeners&&n.length>this._maxListeners&&(o.a.warn("EventEmitter","Possible memory leak detected, added "+n.length+" `"+e+"` listeners (current limit is "+this._maxListeners+")"),"undefined"!=typeof console&&console.trace()),this)}},{key:"once",value:function(e,t){if(void 0===e)throw new Error("Invalid event type: `"+e+"`");var n=this;return this.on(e,function r(){n.off(e,r),t.apply(null,arguments)})}},{key:"off",value:function(e){if(void 0===e)throw new Error("Invalid event type: `"+e+"`");if(0==(arguments.length<=1?0:arguments.length-1))return this._events[e]=null,this;var t=arguments.length<=1?void 0:arguments[1];if("function"!=typeof t)throw new TypeError;var n=this._events[e];if(!n||!n.length)return this;var r=n.indexOf(t);return-1===r?this:(n.splice(r,1),this)}},{key:"emit",value:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(void 0===e)throw new Error("Invalid event type: `"+e+"`");this._pipeDestinations.forEach(function(t){t.emit.apply(t,[e].concat(n))});var i=this._events[e];return!(!i||!i.length||(i.slice(0).forEach(function(e){return e.apply(null,n)}),0))}},{key:"setMaxListeners",value:function(e){if(parseInt(e,10)!==e)throw new TypeError;this._maxListeners=e}}]),e}();t.a=u},function(e,t,n){"use strict";var r=n(15),i=n.n(r),o=n(0),a=n.n(o),s=n(2),u=n.n(s),l=n(3),c=n.n(l),f=n(1),h=n.n(f),p=n(10),d=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),a()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),_=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||h()(t)).call(this));return n.id=t.id++,n._onSourceLoaded=n._onSourceLoaded.bind(n),n._renderers=[],n._glTextures={},n._source=e,n._dirty=!0,n._glUnit=0,n._mipMapping=!1,n._magFilter=t.DefaultMagFilter,n._minFilter=t.DefaultMinFilter,n._repeatX=t.ClampToEdge,n._repeatY=t.ClampToEdge,n._pixelRatio=1,n._loaded=!1,n._frame=new p.h(0,0,100,100),e&&n._loadSource(),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=c()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(u.a?u()(e,t):e.__proto__=t)}(t,p.d),d(t,[{key:"resizeTo",value:function(e){this._frame.width===e.x&&this._frame.height===e.y||(this._frame.width=e.x,this._frame.height=e.y,this._dirty=!0)}},{key:"_loadSource",value:function(){var e=this._source,t=e.complete,n="Canvas"===e.constructor.name||e.tagName&&"CANVAS"===e.tagName.toUpperCase();if(t||n)return this._onSourceLoaded();e.addEventListener&&e.addEventListener("load",this._onSourceLoaded)}},{key:"_onSourceLoaded",value:function(){this._loaded=!0,this.emit("loaded"),this.update()}},{key:"_updateGLFilters",value:function(){var e=new p.k(this._source.width,this._source.height);p.i.isPowerOfTwo(e)?(p.f.info(this.constructor.name,"Mip-mapping enabled"),this._minFilter=t.TrilinearFilter,this._mipMapping=!0):(this._minFilter=t.LinearFilter,this._mipMapping=!1)}},{key:"update",value:function(){this._frame.width===this._source.width&&this._frame.height===this._source.height||(this._frame=new p.h(0,0,this._source.width,this._source.height),this._dirty=!0),this._updateGLFilters(),this.emit("update")}},{key:"getRenderers",value:function(){return[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return i()(e)}(this._renderers))}},{key:"getGLFilter",value:function(e,t){switch(t){case"min":return this.constructor.getGLFilter(e,this._minFilter);case"mag":return this.constructor.getGLFilter(e,this._magFilter)}}},{key:"isLoaded",value:function(){return this._loaded}},{key:"setLoaded",value:function(e){this._loaded=e}},{key:"getSource",value:function(){return this._source}},{key:"setSource",value:function(e){this._source=e}},{key:"getGLTextureForRenderer",value:function(e){return this._glTextures[e.id]}},{key:"setGLTextureForRenderer",value:function(e,t){this._renderers[t.id]=t,this._glTextures[t.id]=e}},{key:"getFrame",value:function(){return this._frame}},{key:"setFrame",value:function(e){this._frame=e}},{key:"getDimensions",value:function(){return new p.k(this._frame.width,this._frame.height)}},{key:"getPixelRatio",value:function(){return this._pixelRatio}},{key:"setPixelRatio",value:function(e){this._pixelRatio=e}},{key:"getGLUnit",value:function(){return this._glUnit}},{key:"setGLUnit",value:function(e){this._glUnit=e}},{key:"setMinFilter",value:function(e){this._minFilter=e}},{key:"getMinFilter",value:function(){return this._minFilter}},{key:"setMagFilter",value:function(e){this._magFilter=e}},{key:"getMagFilter",value:function(){return this._magFilter}},{key:"setRepeatX",value:function(e){this._repeatX=e}},{key:"getRepeatX",value:function(){return this._repeatX}},{key:"setRepeatY",value:function(e){this._repeatY=e}},{key:"getRepeatY",value:function(){return this._repeatY}},{key:"getGLRepeat",value:function(e,n){switch("x"===n?this.getRepeatX():this.getRepeatY()){case t.ClampToEdge:return e.CLAMP_TO_EDGE;case t.Repeat:return e.REPEAT;case t.MirroredRepeat:return e.MIRRORED_REPEAT}}},{key:"isDirty",value:function(){return this._dirty}},{key:"setDirty",value:function(e){this._dirty=e}},{key:"disposeGLTextures",value:function(){var e=this;this._renderers.forEach(function(t){e.disposeGLTexturesForRenderer(t)})}},{key:"disposeGLTexturesForRenderer",value:function(e){this._glTextures[e.id]&&(e.getContext().deleteTexture(this._glTextures[e.id]),delete this._glTextures[e.id],this._renderers[e.id]||delete this._renderers[e.id])}},{key:"isMipMappingEnabled",value:function(){return this._mipMapping}},{key:"setMipMappingEnabled",value:function(e){this._mipMapping=e}},{key:"dispose",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0],this.disposeGLTextures()}}],[{key:"getGLFilter",value:function(e,n){switch(n){case t.LinearFilter:return e.LINEAR;case t.NearestFilter:return e.NEAREST;case t.BilinearFilter:return e.LINEAR_MIPMAP_NEAREST;case t.TrilinearFilter:return e.LINEAR_MIPMAP_LINEAR}}}]),t}();_.NearestFilter=0,_.LinearFilter=1,_.BilinearFilter=2,_.TrilinearFilter=3,_.DefaultMagFilter=_.NearestFilter,_.DefaultMinFilter=_.LinearFilter,_.ClampToEdge=0,_.Repeat=1,_.MirroredRepeat=2,_.id=0,t.a=_},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(5),a=n.n(o),s=n(2),u=n.n(s),l=n(3),c=n.n(l),f=n(1),h=n.n(f),p=n(10),d=n(65),_=n(108),v=n(107),y=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),g=function e(t,n,r){null===t&&(t=Function.prototype);var i=a()(t,n);if(void 0===i){var o=h()(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0},m=p.c.OptionType,b=p.c.UniformType,w=p.c.RendererType,x=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||h()(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=c()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(u.a?u()(e,t):e.__proto__=t)}(t,d.a),y(t,[{key:"_initOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._shaders=[],this._availableUniforms=v.a.defaultUniforms,this._attributes=v.a.defaultAttributes,this._vertexSource=v.a.defaultVertexSource,this._fragmentSource=v.a.defaultFragmentSource,this._initUniforms(),g(t.prototype.__proto__||h()(t.prototype),"_initOptions",this).call(this,e)}},{key:"_initUniforms",value:function(){for(var e in this._uniforms={},this._availableUniforms){var t=this._availableUniforms[e];this._uniforms[e]={type:t.type,value:t.default||null}}for(var n in this.availableOptions){var r=this.availableOptions[n];r.uniformType?this._uniforms["u_"+n]={type:r.uniformType,value:r.default||null}:p.f.trace(this.constructor.name,"Option `"+n+"` is missing a `uniformType`!")}}},{key:"setOption",value:function(e,n){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];g(t.prototype.__proto__||h()(t.prototype),"setOption",this).call(this,e,n,r);var i=n,o=this.availableOptions[e];if(o.uniformType){var a="u_"+e;switch(o.type){case m.COLOR:o.uniformType===b.FLOAT4?i=n.toGLColor():o.uniformType===b.FLOAT3&&(i=n.toRGBGLColor());break;case m.VECTOR2:i=[n.x,n.y];break;case m.COLOR_MATRIX:i=[n.a,n.b,n.c,n.d,n.f,n.g,n.h,n.i,n.k,n.l,n.m,n.n,n.p,n.q,n.r,n.s];var s=[n.e,n.j,n.o,n.t];this._uniforms[a+"_vec"]={value:s,type:b.FLOAT4}}this.setUniform(a,i)}}},{key:"setUniform",value:function(e,t){arguments.length>2&&void 0!==arguments[2]&&arguments[2],this._uniforms[e].value=t}},{key:"setUniforms",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];for(var n in e)this._uniforms[n].value=e[n],t&&this.syncUniform(n)}},{key:"syncUniform",value:function(e){this._shaders.forEach(function(t){t.syncUniform(e)})}},{key:"syncUniforms",value:function(){this._shaders.forEach(function(e){e.syncUniforms()})}},{key:"getShaderForRenderer",value:function(e){var t=e.getContext(),n=this._shaders[t.id];return n||(n=new _.a(e,this._vertexSource,this._fragmentSource,this._uniforms,this._attributes),this._shaders[t.id]=n),n}},{key:"apply",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];e.isOfType(w.WEBGL)?this._applyWebGL(e,t,n,r):e.isOfType(w.CANVAS)&&this._applyCanvas(e,t,n,r)}},{key:"_applyWebGL",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=e.getContext(),o=this.getShaderForRenderer(e);e.setRenderTarget(n),r&&n.clear(),e.setShader(o);var a=e.getCurrentRenderTarget().getProjectionMatrix().toArray();o.setUniform("u_projMatrix",a),o.syncUniforms(),i.activeTexture(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,t.getTexture()),i.drawElements(i.TRIANGLES,6,i.UNSIGNED_SHORT,0)}},{key:"_applyCanvas",value:function(e,t,n){arguments.length>3&&void 0!==arguments[3]&&arguments[3];var r=t.getCanvas(),i=n.getContext();p.f.warn(this.constructor.name,"`_applyCanvas` is not implemented. Just copying image data from `inputTarget` to `outputTarget`."),i.clearRect(0,0,r.width,r.height),i.drawImage(r,0,0)}},{key:"dispose",value:function(){this._shaders.forEach(function(e){return e.dispose()}),this._shaders=[]}}]),t}();t.a=x},function(e,t,n){"use strict";var r=n(42),i=n.n(r),o=n(46),a=n.n(o),s=n(6),u=n.n(s),l=n(0),c=n.n(l),f=n(2),h=n.n(f),p=n(3),d=n.n(p),_=n(47),v=n.n(_),y=n(1),g=n.n(y),m=n(39),b=n(33),w=n(62),x=n(38),T=n(61),k=n(27),R=n(81),C=n(153),E=n(34),O="function"==typeof a.a&&"symbol"==typeof i.a?function(e){return typeof e}:function(e){return e&&"function"==typeof a.a&&e.constructor===a.a&&e!==a.a.prototype?"symbol":typeof e},S=u.a||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},A=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),c()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),I=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||g()(t)).call(this));return r.availableOptions=r.availableOptions||{},r.availableOptions=k.a.extend(r.availableOptions,n),r._onConfigurableUpdate=r._onConfigurableUpdate.bind(r),r._initOptions(e),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=d()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(h.a?h()(e,t):e.__proto__=t)}(t,w.a),A(t,[{key:"_buildConfigError",value:function(e){var t="";return this.constructor.name&&(t=this.constructor.name+": "),t+=e,new Error(t)}},{key:"_onOptionsChange",value:function(){}},{key:"validateSettings",value:function(){var e=this;return new m.a(function(t,n){for(var r in e.availableOptions)if(e.availableOptions[r].required&&void 0===e._options[r])return n(e._buildConfigError("Option `"+r+"` is required."));t()})}},{key:"_initOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._options={};var n=void 0,r=void 0,i=void 0,o=this;for(n in this.availableOptions){if(i=n.charAt(0).toUpperCase()+n.slice(1),r=this.availableOptions[n],-1===[E.OptionType.STRING,E.OptionType.NUMBER,E.OptionType.BOOLEAN,E.OptionType.OBJECT,E.OptionType.VECTOR2,E.OptionType.COLOR,E.OptionType.CONFIGURABLE,E.OptionType.COLOR_MATRIX,E.OptionType.ARRAY,E.OptionType.IMAGE,E.OptionType.FUNCTION,E.OptionType.ALL].indexOf(r.type))throw this._buildConfigError("Unknown option type: `"+r.type+"`");if(function(e,t){o["set"+i]=function(t,n,r){o.setOption(e,t,n,r)},o["get"+i]=function(){return o.getOption(e)}}(n),r.type===E.OptionType.CONFIGURABLE&&(this._options[n]=new t(void 0,r.structure||{}),this._options[n].on("update",this._onConfigurableUpdate)),!(n in e)||void 0===e[n])if(void 0!==r.default){var a=r.default;"function"==typeof r.default&&(a=r.default()),this["set"+i](a,!1,!0)}else r.type!==E.OptionType.CONFIGURABLE&&(this._options[n]=void 0)}for(n in e){if(void 0===this.availableOptions[n])throw new Error("Invalid option: "+n);void 0!==e[n]&&this["set"+(i=n.charAt(0).toUpperCase()+n.slice(1))](e[n],!1,!0)}}},{key:"set",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];for(var n in e)this.setOption(n,e[n],!1);this._onOptionsChange(),t&&this.emit("update",this,e)}},{key:"getOption",value:function(e){return this._options[e]}},{key:"hasOption",value:function(e){return!!this.availableOptions[e]}},{key:"getOptionDefault",value:function(e){var t=this.availableOptions[e];if(!t)throw new Error("Invalid option: "+e);return t.default}},{key:"resetOptions",value:function(){this.set(this.getDefaultOptions())}},{key:"getDefaultOptions",value:function(){var e={};for(var t in this.availableOptions){var n=this.availableOptions[t].default;void 0!==n&&(e[t]=n)}return e}},{key:"getOptions",value:function(){return S({},this._options)}},{key:"equals",value:function(e){var t=e.getOptions();return this.optionsEqual(t)}},{key:"optionsEqual",value:function(e){for(var t in e){var n=e[t];if(!this._optionEquals(t,n))return!1}return!0}},{key:"_optionEquals",value:function(e,t){if(void 0===this.availableOptions[e])throw new Error("Invalid option: "+e);var n=this.availableOptions[e].type,r=this._options[e];if(r===t)return!0;if(void 0===t||void 0===r)return!1;switch(n){case E.OptionType.OBJECT:return"function"==typeof r.optionsEqual?r.optionsEqual(t._options):r===t;case E.OptionType.STRING:case E.OptionType.NUMBER:case E.OptionType.BOOLEAN:case E.OptionType.FUNCTION:case"*":return r===t;case E.OptionType.VECTOR2:return r.equals(t);case E.OptionType.COLOR:case E.OptionType.COLOR_MATRIX:return t.equals(r);case E.OptionType.CONFIGURABLE:return r.optionsEqual(t);case E.OptionType.ARRAY:return this._arrayOptionEquals(e,t);case E.OptionType.IMAGE:return r.src===t.src}}},{key:"_arrayOptionEquals",value:function(e,n){var r=this._options[e];if(n.length!==r.length)return!1;for(var i=!0,o=0;o<r.length;o++){var a=r[o],s=n[o];if(a instanceof t){if(void 0===s||!a.optionsEqual(s)){i=!1;break}}else if(s!==a){i=!1;break}}return i}},{key:"serializeOptions",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v()(this._options),n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r={};return t.forEach(function(t){if(void 0===e.availableOptions[t])return b.a.warn("Trying to serialize a key that does not exist: "+t);!1!==e.availableOptions[t].serializable&&(r[t]=e.serializeOption(t,n))}),r}},{key:"serializeOption",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.availableOptions[e],r=n.type,i=this._options[e];if(!i)return i;if(!1===n.serializable)throw new Error("Option `"+e+"` is not serializable.");switch(r){case E.OptionType.STRING:case E.OptionType.NUMBER:case E.OptionType.BOOLEAN:case E.OptionType.OBJECT:case E.OptionType.FUNCTION:case E.OptionType.ALL:return i;case E.OptionType.VECTOR2:return t?i.toObject():i.clone();case E.OptionType.COLOR:case E.OptionType.COLOR_MATRIX:return t?i.toArray():i.clone();case E.OptionType.CONFIGURABLE:return i.serializeOptions(void 0,t);case E.OptionType.ARRAY:return i.slice(0);case E.OptionType.IMAGE:return t?i.src:i}}},{key:"setOption",value:function(e,n){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=this.availableOptions[e];if(!o)throw new Error("Invalid option: "+e);if(void 0!==o.setter&&(n=o.setter.call(this,n,i)),void 0!==o.validation&&o.validation(n),null===n||void 0===n){if(o.required)throw this._buildConfigError("Option `"+e+"` is required.");this._options[e]=n}else switch(o.type){case E.OptionType.STRING:if((void 0===n?"undefined":O(n))!==E.OptionType.STRING)throw this._buildConfigError("Option `"+e+"` has to be a string.");var a=o.available;if(void 0!==a&&-1===a.indexOf(n))throw this._buildConfigError("Invalid value for `"+e+"` (valid values are: "+o.available.join(", ")+")");this._options[e]=n;break;case E.OptionType.NUMBER:if((void 0===n?"undefined":O(n))!==E.OptionType.NUMBER)throw this._buildConfigError("Option `"+e+"` has to be a number.");this._options[e]=n;break;case E.OptionType.BOOLEAN:if((void 0===n?"undefined":O(n))!==E.OptionType.BOOLEAN)throw this._buildConfigError("Option `"+e+"` has to be a boolean.");this._options[e]=n;break;case E.OptionType.VECTOR2:if(!(n instanceof x.a||"object"===(void 0===n?"undefined":O(n))&&"x"in n&&"y"in n))throw this._buildConfigError("Option `"+e+"` has to be an instance of Vector2 or an Object holding x and y values.");n instanceof x.a?this._options[e]=n.clone():this._options[e]=x.a.fromObject(n);break;case E.OptionType.COLOR:if(!(n instanceof T.a))throw this._buildConfigError("Option `"+e+"` has to be an instance of Color.");this._options[e]=n;break;case E.OptionType.COLOR_MATRIX:if(!(n instanceof C.a))throw this._buildConfigError("Option `"+e+"` has to be an instance of ColorMatrix.");this._options[e]=n.clone();break;case E.OptionType.FUNCTION:if("function"!=typeof n)throw this._buildConfigError("Option `"+e+"` has to be a function.");this._options[e]=n;break;case E.OptionType.OBJECT:case"*":this._options[e]=n;break;case E.OptionType.IMAGE:if("string"==typeof n){var s=new R.a;s.crossOrigin=k.a.getCrossOriginValue(o.crossOrigin),s.src=n,this._options[e]=s}else{if(!(n instanceof R.a||"undefined"!=typeof HTMLImageElement&&n instanceof HTMLImageElement))throw this._buildConfigError("Option `"+e+"` has to be an Image or String.");this._options[e]=n}break;case E.OptionType.CONFIGURABLE:n instanceof t?this._options[e]=n:this._options[e].set(n);break;case E.OptionType.ARRAY:if(!(n instanceof Array))throw this._buildConfigError("Option `"+e+"` has to be an Array.");this._options[e]=n.slice(0);break;default:throw this._buildConfigError("Unknown option type: `"+o.type+"`")}r&&(this._onOptionsChange(),this.emit("update",this,function(e,t,n){return t in e?c()(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},e,n)))}},{key:"_onConfigurableUpdate",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];this.emit.apply(this,["update"].concat(t))}},{key:"hasChanges",value:function(){var e=this.getDefaultOptions();return!this.optionsEqual(e)}}]),t}();t.a=I},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(2),a=n.n(o),s=n(3),u=n.n(s),l=n(1),c=n.n(l),f=n(4),h=(n.n(f),n(82)),p=n.n(h),d=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),_=f.Math.Vector2,v=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var r=arguments.length,i=Array(r),o=0;o<r;o++)i[o]=arguments[o];var a=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||c()(t)).call.apply(e,[this].concat(i)));return a._fragmentSource=n(295),a._lastBlurRadius=null,a._lastDimensions=new _(0,0),a._blurredRenderTarget=new f.Engine.CanvasRenderTarget(100,100,1),a}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=u()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(a.a?a()(e,t):e.__proto__=t)}(t,f.Engine.Filter),d(t,[{key:"_applyCanvas",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;if("low"!==this._options.blurQuality){var o=t.getCanvas(),a=t.getContext(),s=n.getContext();this._lastBlurRadius===this._options.blurRadius&&s.drawImage(o,0,0);for(var u=a.getImageData(0,0,o.width,o.height),l=s.getImageData(0,0,o.width,o.height),c=this._options.blurRadius,f=this._options.delta,h=0;h<o.width;h++)for(var p=0;p<o.height;p++){var d=4*(h+p*o.width),v=0,y=0,g=0,m=0,b=0;i&&(c=i(h/o.width,p/o.height));for(var w=this._random(h,1-p/o.height),x=-30;x<=30;x++){var T=(x+w-.5)/30,k=1-Math.abs(T),R=f.x*T*c,C=f.y*T*c,E=Math.max(Math.min(h+R,o.width-1),0),O=Math.max(Math.min(p+C,o.height-1),0),S=4*(Math.round(O)*o.width+Math.round(E)),A=u.data[S+3];v+=A*u.data[S]*k,y+=A*u.data[S+1]*k,g+=A*u.data[S+2]*k,m+=A*k,b+=k}v/=b,y/=b,g/=b,m/=b,l.data[d]=v/m,l.data[d+1]=y/m,l.data[d+2]=g/m,l.data[d+3]=m}s.putImageData(l,0,0),this._lastDimensions.copy(new _(o.width,o.height))}else this._renderLQBlur(e,t,n,r)}},{key:"_renderLQBlur",value:function(e,t,n,r){var i=t.getDimensions(),o=!this._lastDimensions.equals(i);this._blurredRenderTarget.setPixelRatio(t.getPixelRatio()),this._blurredRenderTarget.resizeTo(t.getDimensions()),n.setPixelRatio(t.getPixelRatio()),n.resizeTo(t.getDimensions()),(this._lastBlurRadius!==this._options.blurRadius||o)&&(this._blurImage(t),this._lastBlurRadius=this._options.blurRadius),n.getContext().drawImage(this._blurredRenderTarget.getCanvas(),0,0),this._lastDimensions.copy(i)}},{key:"_blurImage",value:function(e){var t=e.getCanvas(),n=e.getContext(),r=new _(t.width,t.height),i=n.getImageData(0,0,t.width,t.height);p.a.stackBlurCanvasRGBA(i,0,0,t.width,t.height,this._options.blurRadius*r.min()),this._blurredRenderTarget.getContext().putImageData(i,0,0)}},{key:"_random",value:function(e,t){var n=12.9898*e+78.233*t,r=n-3.14*Math.floor(n/3.14),i=43758.5453*Math.sin(r);return i-Math.floor(i)}}]),t}();v.prototype.availableOptions={blurRadius:{type:f.OptionType.NUMBER,default:30,uniformType:f.UniformType.FLOAT},delta:{type:f.OptionType.VECTOR2,default:new _(1,1),uniformType:f.UniformType.FLOAT2},texSize:{type:f.OptionType.VECTOR2,default:new _(100,100),uniformType:f.UniformType.FLOAT2},blurQuality:{type:f.OptionType.STRING,default:"low"}},t.a=v},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(5),a=n.n(o),s=n(2),u=n.n(s),l=n(3),c=n.n(l),f=n(1),h=n.n(f),p=n(4),d=(n.n(p),function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}()),_=p.Math.Vector2,v=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||h()(t)).call(this,n));return r._operation=e,r._dirtiness={},r.id=p.Utils.getUUID(),r._renderTextures={},r._identitySprite=new p.Engine.Sprite,r._sprite=new p.Engine.Sprite,r._hitTestSprite=new p.Engine.Sprite,r._renderers=[],r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=c()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(u.a?u()(e,t):e.__proto__=t)}(t,p.Configurable),d(t,[{key:"applyScale",value:function(e){}},{key:"applyRotation",value:function(e){var t=this._operation.getInputDimensions(),n=180*this.getRotation()/Math.PI;n+=e,this.setRotation(n*Math.PI/180);var r=(e+360)%360*Math.PI/180,i=Math.cos(r),o=Math.sin(r),a=this._options.position.clone().subtract(.5).multiply(t),s=new _(a.x*i-a.y*o,a.x*o+a.y*i).divide(t.clone().flip());this.setPosition(new _(.5,.5).add(s))}},{key:"applyFlip",value:function(e){var t=this.getPosition().clone();switch(e){case"horizontal":t.x=1-this._options.position.x;break;case"vertical":t.y=1-this._options.position.y}this.setPosition(t)}},{key:"applyTransform",value:function(e){var t={};t.rotation=e.applyToRotation(this.getRotation()),t.position=e.applyToRelativePoint(this.getPosition()),this._options.dimensions&&(t.dimensions=e.applyToDimensions(this.getDimensions())),this.set(t,!1)}},{key:"getDisplayObject",value:function(){return this._sprite}},{key:"getHitTestDisplayObject",value:function(){return this._sprite}},{key:"_getTexture",value:function(){throw new Error("Sprite#_getTexture is abstract and not implemented in child class.")}},{key:"_prepareRenderTexture",value:function(e){if(this._renderTexture)this._renderTexture.clear();else{var t=this._getTexture();this._renderTextureContainer=new p.Engine.Container,this._renderTextureSprite=new p.Engine.Sprite(t),this._renderTextureContainer.addChild(this._renderTextureSprite),this._renderTexture=this._getRenderTexture(e.getRenderer(),t.getDimensions())}}},{key:"_rendersToRenderTexture",value:function(e){return e.getOptions().smoothDownscaling&&e.getRenderer().isOfType(p.RendererType.WEBGL)}},{key:"_optionEquals",value:function(e,n){return"type"===e||function e(t,n,r){null===t&&(t=Function.prototype);var i=a()(t,n);if(void 0===i){var o=h()(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0}(t.prototype.__proto__||h()(t.prototype),"_optionEquals",this).call(this,e,n)}},{key:"update",value:function(e,t){this._rendersToRenderTexture(e)&&(this._prepareRenderTexture(e),this._renderToRenderTexture(e)),this._updateSprite(t)}},{key:"_updateSprite",value:function(e){var t=this;[this._sprite,this._hitTestSprite].forEach(function(n){if(n.getTexture()){n.setAnchor(t._options.anchor),n.setPosition(t._options.position.clone().multiply(e)),void 0!==t._options.alpha&&n.setAlpha(t._options.alpha);var r=t._options.dimensions;r&&(r=r.clone().multiply(t._operation.getSDK().getTextureScale()),n.setWidth(r.x),n.setHeight(r.y)),n.updateTransform();var i=n.getTexture().getFrame(),o=new _(i.width,i.height);n.setPivot(t._options.pivot.clone().multiply(o)),n.setRotation(t._options.rotation),n.updateTransform()}})}},{key:"_renderToRenderTexture",value:function(e){var t=this._getTexture().getDimensions(),n=this._getRenderTexture(e.getRenderer(),t),r=t.clone();if(this._options.smoothDownscaling&&(r.x=p.Utils.nextHighestPOT(r.x),r.y=p.Utils.nextHighestPOT(r.y)),this._renderTexture.resizeTo(r),this._renderTexture.render(this._renderTextureContainer),this._options.smoothDownscaling){var i=r.clone().subtract(t.x,t.y).divide(r),o=n.getUVs().getUVs();o[0].x=o[3].x=0,o[1].x=o[2].x=1-i.x,o[0].y=o[1].y=0,o[2].y=o[3].y=1-i.y}this._sprite.setTexture(n)}},{key:"isDirtyForRenderer",value:function(e){return e.id in this._dirtiness||(this._dirtiness[e.id]=!0),this._dirtiness[e.id]}},{key:"setDirtyForRenderer",value:function(e,t){this._renderers[t.id]=t,this._dirtiness[t.id]=e}},{key:"setDirty",value:function(e){for(var t in this._dirtiness)this.setDirtyForRenderer(e,this._renderers[t])}},{key:"_getRenderTexture",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new _(100,100);return this._renderTextures[e.id]||(this._renderTextures[e.id]=new p.Engine.RenderTexture(e,t.x,t.y,1)),this._renderTextures[e.id]}},{key:"dispose",value:function(){for(var e in this._renderTextures)this._renderTextures[e].dispose()}},{key:"canBeDuplicated",value:function(){return!0}},{key:"canBeDeleted",value:function(){return!0}},{key:"canMaskCanvas",value:function(){return!1}},{key:"canAdjustPadding",value:function(){return!1}},{key:"canBeTakenToFront",value:function(){return!0}},{key:"canBeFlippedHorizontally",value:function(){return!0}}]),t}();t.a=v},function(e,t,n){"use strict";n.d(t,"a",function(){return S});var r=n(6),i=n.n(r),o=n(15),a=n.n(o),s=n(0),u=n.n(s),l=n(5),c=n.n(l),f=n(2),h=n.n(f),p=n(3),d=n.n(p),_=n(1),v=n.n(_),y=n(4),g=(n.n(y),n(69)),m=n(394),b=n(114),w=n(22),x=n(115),T=n(70),k=n(23),R=n(17),C=i.a||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},E=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),u()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),O=function e(t,n,r){null===t&&(t=Function.prototype);var i=c()(t,n);if(void 0===i){var o=v()(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},S=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||v()(t)).call.apply(e,[this].concat(r)));return o.getImagePaths=function(){var e=o.getBanderoles();return e&&e.map(function(e){return e.getImagePath()})||[]},o.onImagesLoaded=function(){var e=o.getBanderoles();e&&e.forEach(function(e){var t=k.a.getImage(e.getImagePath());t?e.setImage(t):y.Log.warn("TextDesignBlocks#onImagesLoaded: Image not found '"+e.getImagePath()+"'")})},o._rowTypeLessThan3WordsRandomizer=new R.a(0),o._rowTypeMoreThan3WordsRandomizer=new R.a(0),o._banderolesRandomizer=new R.a(0),o._seedPool=[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return a()(e)}(o._seedPool),[o._rowTypeLessThan3WordsRandomizer,o._rowTypeMoreThan3WordsRandomizer,o._banderolesRandomizer]),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=d()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(h.a?h()(e,t):e.__proto__=t)}(t,g.a),E(t,[{key:"_modifiedText",value:function(e){return O(t.prototype.__proto__||v()(t.prototype),"_modifiedText",this).call(this,e).toUpperCase()}},{key:"generateLayoutData",value:function(e,n){return this._options.hasMaskedText=!1,O(t.prototype.__proto__||v()(t.prototype),"generateLayoutData",this).call(this,e,n)}},{key:"_randomLayoutRow",value:function(e,t,n,r){if(e.size()<3){var i=0===this._rowTypeLessThan3WordsRandomizer.nextInRange(0,2);return this._layoutRow(e,n,r,i)}var o=this._rowTypeMoreThan3WordsRandomizer.nextInRange(0,3);switch(o){case 0:return new m.a({words:e,width:n,attributes:r,orientation:m.a.Orientations.Left});case 1:return new m.a({words:e,width:n,attributes:r,orientation:m.a.Orientations.Right});case 2:return this._layoutRow(e,n,r,!0);case 3:return new w.a({words:e,width:n,attributes:r});default:throw new Error("TextDesignBlocks#_randomLayoutRow: Invalid randomValue generated: "+o+".")}}},{key:"_layoutRow",value:function(e,t,n,r){if(this.getHasMaskedText()&&(r=!1),r){this.setHasMaskedText(!0);var i=this._banderolesRandomizer.pickNext(this.getBanderoles()),o=new x.a({words:e,width:t,attributes:new T.a({alignment:"left",fontIdentifier:i.getFontIdentifier()}),image:i.getImage(),imageInsets:i.insetsForWidth(t),capInsets:null,backgroundColor:y.Color.WHITE});return i.getNeedsImageSmoothingFix()&&(o.serverImageSmoothingFix=!0),o}return new w.a({words:e,width:t,attributes:n})}}]),t}();S.defaultFontIdentifiers=["imgly_font_campton_bold"],S.identifier="imgly_text_design_blocks",S.defaultBanderoles=[b.a.Rectangle,b.a.Small],S.prototype.availableOptions=C({},g.a.prototype.availableOptions,{fontIdentifiers:{type:y.OptionType.ARRAY,default:S.defaultFontIdentifiers},relativeLineSpacing:{type:y.OptionType.NUMBER,default:.025/3},hasMaskedText:{type:y.OptionType.BOOLEAN,default:!1},banderoles:{type:y.OptionType.ARRAY,default:S.defaultBanderoles}})},function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return o()(e)}n.d(t,"a",function(){return k});var i=n(15),o=n.n(i),a=n(0),s=n.n(a),u=n(2),l=n.n(u),c=n(3),f=n.n(c),h=n(388),p=n.n(h),d=n(1),_=n.n(d),v=n(4),y=(n.n(v),n(17)),g=n(18),m=n(40),b=n(391),w=n(70),x=n(22),T=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),s()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),k=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||_()(t)).call(this,e));return n._relativeInsets=new g.a,n._background=null,n._fontRandomizer=new y.a(0),n._lineNumberRandomizer=new y.a(0),n._wordsPerLineRandomizer=new y.a(0),n._seedPool=[n._fontRandomizer,n._lineNumberRandomizer,n._wordsPerLineRandomizer],n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=f()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(l.a?l()(e,t):e.__proto__=t)}(t,v.Configurable),T(t,[{key:"seed",value:function(e){this._seedPool.forEach(function(t){return t.seed(e)})}},{key:"getImagePaths",value:function(){return[]}},{key:"onImagesLoaded",value:function(){}},{key:"getMaximumNumberOfTries",value:function(){return 10}},{key:"getMinLineCountOfRandom",value:function(){return 4}},{key:"getRandomAdditionalLinePercentage",value:function(){return.4}},{key:"_fontForRow",value:function(e,t){return this._fontRandomizer.pickNext(this.getFontIdentifiers())}},{key:"_modifiedText",value:function(e){return e.replace("\n"," ").replace("\t"," ")}},{key:"_minimumNumberOfLines",value:function(e){return Math.ceil(Math.sqrt(e.size()))}},{key:"_maximumNumberOfLines",value:function(e){return e.size()}},{key:"_calculatedNumberOfLines",value:function(e){var t=this._minimumNumberOfLines(e);if(e.size()>=this.getMinLineCountOfRandom()){var n=Math.floor(Math.max(1,t*this.getRandomAdditionalLinePercentage()));t+=this._lineNumberRandomizer.nextInRange(0,n)}return Math.min(t,this._maximumNumberOfLines(e))}},{key:"_randomizedNumberOfWordsPerLine",value:function(e,t){var n=this;if(e>t)return v.Log.warn("TextDesign#_randomizedNumberOfWordsPerLine: Invalid number of lines"),t;var r=v.Utils.Array.repeat(1,e);return v.Utils.Array.range(e,t).forEach(function(t){var i=n._wordsPerLineRandomizer.nextInRange(0,e-1);r[i]+=1}),r}},{key:"_textLines",value:function(e){var t=new m.a(e),n=this._calculatedNumberOfLines(t);return this._randomizedNumberOfWordsPerLine(n,t.size()).reduce(function(e,n){return{index:e.index+n,lines:[].concat(r(e.lines),[t.slice(e.index,Math.min(e.index+n,t.size()))])}},{index:0,lines:[]}).lines}},{key:"_validTextLines",value:function(e){var t=this._textLines(e),n=0;do{if((n=v.Utils.Array.findIndex(t,function(e){return e.countNumberOfCharacters()<3}))>=0){var i=t[n-1],o=t[n+1];(i?i.countNumberOfCharacters():p.a)<(o?o.countNumberOfCharacters():p.a)&&i?(i.words=[].concat(r(i.words),r(t[n].words)),t=[].concat(r(t.slice(0,n)),r(t.slice(n+1)))):o&&(o.words=[].concat(r(t[n].words),r(o.words)),t=[].concat(r(t.slice(0,n)),r(t.slice(n+1))))}}while(n>-1&&t.length>1);return t}},{key:"_modifiedLines",value:function(e){return e}},{key:"_getBackground",value:function(){return this._background}},{key:"generateLayoutData",value:function(e,t){var n=this._modifiedText(e),r=this._modifiedLines(this._validTextLines(n)),i=t*(1-this._relativeInsets.left-this._relativeInsets.right),o=this._layoutRows(r,i);return new b.a({text:n,relativeInsets:this._relativeInsets.clone(),relativeLineSpacing:this.getRelativeLineSpacing(),background:this._background||this._getBackground(),lines:r,rows:o,width:t})}},{key:"_layoutRows",value:function(e,t){var n=this;return e.map(function(e,r){return n._randomLayoutRow(e,r,t,new w.a({fontIdentifier:n._fontForRow(r,e)})).layout()})}},{key:"_randomLayoutRow",value:function(e,t,n,r){return new x.a({words:e,width:n,attributes:r})}}]),t}();k.defaultFontIdentifiers=[],k.identifier="textdesign",k.prototype.availableOptions={fontIdentifiers:{type:v.OptionType.ARRAY,default:[]},relativeLineSpacing:{type:v.OptionType.NUMBER,default:0}}},function(e,t,n){"use strict";n.d(t,"a",function(){return c});var r=n(2),i=n.n(r),o=n(3),a=n.n(o),s=n(1),u=n.n(s),l=n(4);n.n(l);var c=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||u()(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=a()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(i.a?i()(e,t):e.__proto__=t)}(t,l.Configurable),t}();c.prototype.availableOptions={tintColor:{type:l.OptionType.COLOR,default:l.Color.BLACK},textColor:{type:l.OptionType.COLOR,default:l.Color.BLACK},alignment:{type:l.OptionType.STRING,default:"left",available:["left","center","right"]},lineSpacing:{type:l.OptionType.NUMBER,default:1},fontIdentifier:{type:l.OptionType.STRING,default:"imgly_font_open_sans_bold"}}},function(e,t,n){"use strict";n.d(t,"a",function(){return b});var r=n(6),i=n.n(r),o=n(0),a=n.n(o),s=n(5),u=n.n(s),l=n(2),c=n.n(l),f=n(3),h=n.n(f),p=n(1),d=n.n(p),_=n(4),v=(n.n(_),n(30)),y=n(23),g=i.a||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},m=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),a()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),b=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||d()(t)).call(this,e)),r=y.a.getVariation(n.getFontIdentifier());return r||_.Log.warn("TextDesignFont: Unable to find font '"+n._fontIdentifier+"'"),n.set({fontVariation:r}),n._metrics=null,n._canvas=_.Utils.createCanvas(),n._context=n._canvas.getContext("2d"),n._isDirty=!0,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=h()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(c.a?c()(e,t):e.__proto__=t)}(t,_.Configurable),m(t,[{key:"_onOptionsChange",value:function(){this._isDirty=!0}},{key:"setOption",value:function(e,n){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];(function e(t,n,r){null===t&&(t=Function.prototype);var i=u()(t,n);if(void 0===i){var o=d()(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0})(t.prototype.__proto__||d()(t.prototype),"setOption",this).call(this,e,n,r,i),"fontIdentifier"!==e||i||this.updateFontVariation()}},{key:"updateFontVariation",value:function(){var e=y.a.getVariation(this.getFontIdentifier());return e||_.Log.warn("TextDesignFont: Unable to find font '"+this._fontIdentifier+"'"),this.setFontVariation(e),e}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._options=g({},this._options,e),this._isDirty=!0}},{key:"_applyTextOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._context,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=g({},this._options,t),r=n.fontSize,i=n.fontVariation,o=n.lineHeight,a=n.textColor,s=n.alignment,u=i.serializeOptions(),l=u.fontStyle,c=u.fontWeight,f=u.fontFamily;e.font=l+" "+c+" "+r+"px / "+o+" "+f,e.fillStyle=a,e.textBaseline="alphabetic",e.textAlign=s||"left"}},{key:"getTextMetrics",value:function(){return this._metrics&&!this._isDirty||this._calculateTextMetrics(),g({},this._metrics)}},{key:"getSizeValue",value:function(){return this._metrics&&!this._isDirty||this._calculateTextMetrics(),new v.a(this._metrics.width,this._metrics.height)}},{key:"fitWidth",value:function(e){if(this.getFontVariation()){this._applyTextOptions(this._context,{fontSize:50});var t=e/this._context.measureText(this.getText()).width,n=Math.floor(50*t);return this.setFontSize(n),this._calculateTextMetrics(),this.getTextMetrics()}_.Log.warn("TextDesignFont#fitText: missing font variation")}},{key:"fitHeight",value:function(e){if(this.getFontVariation()){var t=e/this._calculateTextMetrics({fontSize:50}).height,n=Math.floor(50*t);return this.setFontSize(n),this._calculateTextMetrics(),this.getTextMetrics()}_.Log.warn("TextDesignFont#fitText: missing font variation")}},{key:"_calculateTextMetrics",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this._canvas,n=this._context,r=g({},this._options,e),i=this.getText();this._applyTextOptions(n,r);var o=Math.ceil(n.measureText(i).width),a=Math.floor(o+2*r.fontSize),s=Math.floor(3*r.fontSize);t.width=a,t.height=s;var u=Math.floor(r.fontSize),l=Math.floor(.6*s);this._applyTextOptions(n,r),n.fillText(i,u,l);var c=n.getImageData(0,0,t.width,t.height).data,f=R(c,a,s,l,this._options.excludeAccents),h=k(c,a,s,l,this._options.excludeAccents),p=o,d=f+h;return this._metrics={width:p,height:d,ascender:f,descender:h},this._isDirty=!1,g({},this._metrics)}},{key:"draw",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._context,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];e.save(),this._metrics&&!this._isDirty||this._calculateTextMetrics(),this._applyTextOptions(e,r),e.fillText(this.getText(),t,n+this._metrics.ascender),i&&(E(e,t,n,this._metrics.width,this._metrics.height),C(e,n+this._metrics.ascender,t,t+this._metrics.width)),e.restore()}}]),t}(),w=function(e,t,n,r){var i=n*(4*r)+4*t;return{r:e[i],g:e[i+1],b:e[i+2],a:e[i+3]}},x=function(e){return e.a<=254},T=function(e,t,n){for(var r=!0,i=0;i<n;i++){var o=w(e,i,t,n);if(!x(o)){r=!1;break}}return r},k=function(e,t,n,r){for(var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=0,a=r+1;a<n;a++)if(T(e,a,t)){if(i)break}else o=a-r+1;return o},R=function(e,t,n,r){for(var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=0,a=r-1;a>=0;a--)if(T(e,a,t)){if(i)break}else o=r-a;return o},C=function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"red";e.save(),e.strokeStyle=i,function(e,t,n,r,i){e.beginPath(),e.moveTo(t,n),e.lineTo(r,i),e.stroke()}(e,n,t,r,t),e.restore()},E=function(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"blue";e.save(),e.strokeStyle=o,e.strokeRect(t,n,r,i),e.restore()};b.prototype.availableOptions={text:{type:_.OptionType.STRING,default:""},fontIdentifier:{type:_.OptionType.STRING,default:"imgly_font_open_sans_bold"},fontVariation:{type:_.OptionType.OBJECT,default:null},lineHeight:{type:_.OptionType.NUMBER,default:1},fontSize:{type:_.OptionType.NUMBER,default:22},textColor:{type:_.OptionType.STRING,default:"black"},strokeStyle:{type:_.OptionType.STRING,default:"black"},outlineWidth:{type:_.OptionType.NUMBER,default:0},textBaseline:{type:_.OptionType.STRING,default:"alphabetic"},excludeAccents:{type:_.OptionType.BOOLEAN,default:!1}}},function(e,t,n){"use strict";n.d(t,"a",function(){return d});var r=n(0),i=n.n(r),o=n(2),a=n.n(o),s=n(3),u=n.n(s),l=n(1),c=n.n(l),f=n(4),h=(n.n(f),n(18)),p=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),d=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||c()(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=u()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(a.a?a()(e,t):e.__proto__=t)}(t,f.Configurable),p(t,[{key:"insetsForWidth",value:function(e){return this.getRelativeInsets().clone().scale(e)}}]),t}();d.prototype.availableOptions={imagePath:{type:f.OptionType.STRING,default:""},minimumHeightRatio:{type:f.OptionType.NUMBER,default:0},sizeToFitContent:{type:f.OptionType.BOOLEAN,default:!0},capInsets:{type:f.OptionType.OBJECT,default:new h.a},relativeInsets:{type:f.OptionType.OBJECT,default:new h.a}},d.Box=new d({imagePath:"text-design/images/imgly_text_design_asset_black_background.png",relativeInsets:new h.a(.1,.1,.1,.1)}),d.Badge1=new d({imagePath:"text-design/images/imgly_text_design_asset_badge1.png",relativeInsets:new h.a(.3,.18,.2,.18)}),d.Badge2=new d({imagePath:"text-design/images/imgly_text_design_asset_badge2.png",relativeInsets:new h.a(.3,.18,.2,.18)}),d.Badge3=new d({imagePath:"text-design/images/imgly_text_design_asset_badge3.png",relativeInsets:new h.a(.3,.18,.2,.18)}),d.Badge4=new d({imagePath:"text-design/images/imgly_text_design_asset_badge4.png",relativeInsets:new h.a(.3,.18,.2,.18)}),d.SpeechBubble1=new d({imagePath:"text-design/images/imgly_text_design_asset_speech_bubble_small2.png",relativeInsets:new h.a(.04,.07,.12,.07),capInsets:new h.a(57,171,123,51)}),d.SpeechBubble2=new d({imagePath:"text-design/images/imgly_text_design_asset_speech_bubble3.png",relativeInsets:new h.a(.04,.07,.12,.07),capInsets:new h.a(6,105,87,15)}),d.SpeechBubble3=new d({imagePath:"text-design/images/imgly_text_design_asset_speech_bubble_small.png",relativeInsets:new h.a(.165664675,.2,.165664675,.2),minimumHeightRatio:.7}),d.SpeechBubble4=new d({imagePath:"text-design/images/imgly_text_design_asset_speech_bubble4.png",relativeInsets:new h.a(.124800224,.2,.291200523,.2),minimumHeightRatio:.7}),d.SpeechBubble5=new d({imagePath:"text-design/images/imgly_text_design_asset_speech_bubble5.png",relativeInsets:new h.a(.114892823,.27,.15984926,.27)}),d.Watercolor1=new d({imagePath:"text-design/images/imgly_text_design_asset_watercolor_01.png",minimumHeightRatio:.7,relativeInsets:new h.a(.2,.25,.2,.25)}),d.Watercolor2=new d({imagePath:"text-design/images/imgly_text_design_asset_watercolor_02.png",minimumHeightRatio:.7,relativeInsets:new h.a(.08,.25,.3,.25)}),d.Watercolor3=new d({imagePath:"text-design/images/imgly_text_design_asset_watercolor_03.png",minimumHeightRatio:.7,relativeInsets:new h.a(.1,.2,.15,.2)})},function(e,t,n){var r=n(24),i=n(193),o=n(93),a=n(91)("IE_PROTO"),s=function(){},u=function(){var e,t=n(88)("iframe"),r=o.length;for(t.style.display="none",n(129).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),u=e.F;r--;)delete u.prototype[o[r]];return u()};e.exports=Object.create||function(e,t){var n;return null!==e?(s.prototype=r(e),n=new s,s.prototype=null,n[a]=e):n=u(),void 0===t?n:i(n,t)}},function(e,t,n){var r=n(85),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){var r=n(55),i=n(14)("toStringTag"),o="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?n:o?r(t):"Object"==(a=r(t))&&"function"==typeof t.callee?"Arguments":a}},function(e,t,n){"use strict";var r=n(220),i=n(239),o=n(106),a=n(110),s=n(109),u=n(151),l=n(63),c=n(152),f=n(246),h=n(80),p=n(79),d=n(247),_=n(249),v=n(108),y=n(64),g=n(253),m=n(150),b={WebGLRenderer:i.a,CanvasRenderer:r.a,WebGLFilterManager:a.a,CanvasFilterManager:o.a,DisplayObject:s.a,Container:u.a,BaseTexture:l.a,Texture:c.a,RenderTexture:f.a,WebGLRenderTarget:h.a,CanvasRenderTarget:p.a,Sprite:d.a,Shaders:_.a,Shader:v.a,Filter:y.a,Filters:g,PixelArrayImage:m.a,autoDetectRenderer:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return i.a.isSupported()?new i.a(e,t,n):new r.a(e,t,n)}};t.a=b},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(10),a=n(63),s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=function(){function e(t,n,r,i,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._width=t,this._height=n,this._pixelRatio=r,this._baseTexture=new a.a,this._canvas=i||this._createCanvas(),this._context=o||this._canvas.getContext("2d"),this._baseTexture.setSource(this._canvas),this._canvas.width=this._width*this._pixelRatio,this._canvas.height=this._height*this._pixelRatio,this._filterStack=[{renderTarget:this,filter:[]}]}return s(e,[{key:"_createCanvas",value:function(){return o.i.createCanvas()}},{key:"clear",value:function(){var e=this._context;e.setTransform(1,0,0,1,0,0),e.clearRect(0,0,this._width*this._pixelRatio,this._height*this._pixelRatio)}},{key:"resizeTo",value:function(e){this._baseTexture.resizeTo(e),this._width!==e.x&&(this._width=e.x,this._canvas.width=this._width*this._pixelRatio),this._height!==e.y&&(this._height=e.y,this._canvas.height=this._height*this._pixelRatio)}},{key:"getCanvas",value:function(){return this._canvas}},{key:"getContext",value:function(){return this._context}},{key:"getFilterStack",value:function(){return this._filterStack}},{key:"getWidth",value:function(){return this._width}},{key:"getHeight",value:function(){return this._height}},{key:"getPixelRatio",value:function(){return this._pixelRatio}},{key:"setPixelRatio",value:function(e){this._pixelRatio=e}},{key:"getDimensions",value:function(){return new o.k(this._width,this._height)}},{key:"getBaseTexture",value:function(){return this._baseTexture}},{key:"dispose",value:function(){this._canvas=null,this._context=null}}]),e}();t.a=u},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(10),a=n(63),s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=function(){function e(t,n,r,i){var s=arguments.length>4&&void 0!==arguments[4]&&arguments[4];!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._renderer=t,this._gl=t.getContext(),this._width=n,this._height=r,this._frame=null,this._pixelRatio=i,this._projectionMatrix=new o.g,this._mipMapping=!1,this._baseTexture=new a.a;var u=this._baseTexture.getFrame();u.width=n,u.height=r,this._baseTexture.setPixelRatio(i),this._baseTexture.setLoaded(!0),this._framebuffer=null,this._isRoot=s,this._filterStack=[{renderTarget:this,filter:[]}],s||this._initFrameBuffer()}return s(e,[{key:"resizeTo",value:function(e){this._width=0|e.x,this._height=0|e.y,this._baseTexture.resizeTo(e),this._isRoot||this._resizeTexture(),this._baseTexture.setMinFilter(this._getMinFilter()),this._baseTexture.setMagFilter(this._getMagFilter()),this._calculateProjectionMatrix()}},{key:"_getMinFilter",value:function(){var e=a.a.DefaultMinFilter;return this._mipMapping&&(e=a.a.TrilinearFilter),e}},{key:"_getMagFilter",value:function(){return a.a.DefaultMagFilter}},{key:"_resizeTexture",value:function(){var e=this._gl,t=this._width*this._pixelRatio,n=this._height*this._pixelRatio;this._texture=e.createTexture(),e.bindTexture(e.TEXTURE_2D,this._texture),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,t,n,0,e.RGBA,e.UNSIGNED_BYTE,null),e.bindFramebuffer(e.FRAMEBUFFER,this._framebuffer),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,this._texture,0),this._baseTexture.setGLTextureForRenderer(this._texture,this._renderer),this._renderer._options.debug&&o.e.checkFramebufferStatus("WebGLRenderTarget#_initFramebuffer",e);var r=new o.k(this._width,this._height);o.i.isPowerOfTwo(r)?(o.f.info("WebGLRenderTarget","Mip-mapping enabled"),this._mipMapping=!0):this._mipMapping=!1,this._baseTexture.setMipMappingEnabled(this._mipMapping)}},{key:"activate",value:function(){var e=this._gl;e.bindFramebuffer(e.FRAMEBUFFER,this._framebuffer),this._calculateProjectionMatrix(),e.viewport(0,0,this._width*this._pixelRatio,this._height*this._pixelRatio),e.disable(e.STENCIL_TEST)}},{key:"clear",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.b.TRANSPARENT,t=this._gl;t.bindFramebuffer(t.FRAMEBUFFER,this._framebuffer),this._renderer._options.debug&&o.e.checkFramebufferStatus("WebGLRenderTarget#clear",t),t.clearColor.apply(t,e.toGLColor()),t.clear(t.COLOR_BUFFER_BIT)}},{key:"_calculateProjectionMatrix",value:function(){var e=this._projectionMatrix;e.reset();var t=this._frame||new o.h(0,0,this._width,this._height),n=t.x,r=t.y;this._isRoot?(e.a=1/this._width*2,e.d=-1/this._height*2,e.tx=-1-n*e.a,e.ty=1-r*e.d):(e.a=1/this._width*2,e.d=1/this._height*2,e.tx=-1-n*e.a,e.ty=-1-r*e.d)}},{key:"_initFrameBuffer",value:function(){var e=this._gl;this._framebuffer=e.createFramebuffer(),this._texture=e.createTexture(),e.bindTexture(e.TEXTURE_2D,this._texture),e.bindFramebuffer(e.FRAMEBUFFER,this._framebuffer),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,this._texture,0),this._baseTexture.setGLTextureForRenderer(this._texture,this._renderer),this.resizeTo(new o.k(this._width,this._height)),this._renderer._options.debug&&o.e.checkFramebufferStatus("WebGLRenderTarget#_initFramebuffer",e)}},{key:"getProjectionMatrix",value:function(){return this._projectionMatrix}},{key:"getTexture",value:function(){return this._texture}},{key:"getFrame",value:function(){return this._frame}},{key:"setFrame",value:function(e){this._frame=e}},{key:"getFilterStack",value:function(){return this._filterStack}},{key:"getPixelRatio",value:function(){return this._pixelRatio}},{key:"setPixelRatio",value:function(e){this._pixelRatio=e,this._isRoot||this._resizeTexture()}},{key:"getBaseTexture",value:function(){return this._baseTexture}},{key:"dispose",value:function(){var e=this._gl;this._baseTexture.disposeGLTexturesForRenderer(this._renderer),e.deleteTexture(this._texture),e.deleteFramebuffer(this._framebuffer)}}]),e}();t.a=u},function(e,t,n){"use strict";var r=void 0;r=window.Image,t.a=r},function(e,t,n){"use strict";function r(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var i=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],o=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];e.exports={stackBlurCanvasRGBA:function(e,t,n,a,s,u){if(!(isNaN(u)||u<1)){u|=0;var l,c,f,h,p,d,_,v,y,g,m,b,w,x,T,k,R,C,E,O,S,A,I,F,D,M=e.data,B=u+u+1,L=a-1,P=s-1,N=u+1,U=N*(N+1)/2,z=new r,G=z;for(f=1;f<B;f++)G=G.next=new r,f==N&&(D=G);G.next=z;var j=null,V=null;_=d=0;var W=i[u],H=o[u];for(c=0;c<s;c++){for(k=R=C=E=v=y=g=m=0,b=N*(O=M[d]),w=N*(S=M[d+1]),x=N*(A=M[d+2]),T=N*(I=M[d+3]),v+=U*O,y+=U*S,g+=U*A,m+=U*I,G=z,f=0;f<N;f++)G.r=O,G.g=S,G.b=A,G.a=I,G=G.next;for(f=1;f<N;f++)h=d+((L<f?L:f)<<2),v+=(G.r=O=M[h])*(F=N-f),y+=(G.g=S=M[h+1])*F,g+=(G.b=A=M[h+2])*F,m+=(G.a=I=M[h+3])*F,k+=O,R+=S,C+=A,E+=I,G=G.next;for(j=z,V=D,l=0;l<a;l++)M[d+3]=I=m*W>>H,0!==I?(I=255/I,M[d]=(v*W>>H)*I,M[d+1]=(y*W>>H)*I,M[d+2]=(g*W>>H)*I):M[d]=M[d+1]=M[d+2]=0,v-=b,y-=w,g-=x,m-=T,b-=j.r,w-=j.g,x-=j.b,T-=j.a,h=_+((h=l+u+1)<L?h:L)<<2,v+=k+=j.r=M[h],y+=R+=j.g=M[h+1],g+=C+=j.b=M[h+2],m+=E+=j.a=M[h+3],j=j.next,b+=O=V.r,w+=S=V.g,x+=A=V.b,T+=I=V.a,k-=O,R-=S,C-=A,E-=I,V=V.next,d+=4;_+=a}for(l=0;l<a;l++){for(R=C=E=k=y=g=m=v=0,b=N*(O=M[d=l<<2]),w=N*(S=M[d+1]),x=N*(A=M[d+2]),T=N*(I=M[d+3]),v+=U*O,y+=U*S,g+=U*A,m+=U*I,G=z,f=0;f<N;f++)G.r=O,G.g=S,G.b=A,G.a=I,G=G.next;for(p=a,f=1;f<=u;f++)d=p+l<<2,v+=(G.r=O=M[d])*(F=N-f),y+=(G.g=S=M[d+1])*F,g+=(G.b=A=M[d+2])*F,m+=(G.a=I=M[d+3])*F,k+=O,R+=S,C+=A,E+=I,G=G.next,f<P&&(p+=a);for(d=l,j=z,V=D,c=0;c<s;c++)M[3+(h=d<<2)]=I=m*W>>H,I>0?(I=255/I,M[h]=v*W>>H,M[h+1]=y*W>>H,M[h+2]=g*W>>H):M[h]=M[h+1]=M[h+2]=0,v-=b,y-=w,g-=x,m-=T,b-=j.r,w-=j.g,x-=j.b,T-=j.a,h=l+((h=c+N)<P?h:P)*a<<2,v+=k+=j.r=M[h],y+=R+=j.g=M[h+1],g+=C+=j.b=M[h+2],m+=E+=j.a=M[h+3],j=j.next,b+=O=V.r,w+=S=V.g,x+=A=V.b,T+=I=V.a,k-=O,R-=S,C-=A,E-=I,V=V.next,d+=a}}}}},function(e,t,n){"use strict";n.d(t,"a",function(){return v});var r=n(0),i=n.n(r),o=n(2),a=n.n(o),s=n(3),u=n.n(s),l=n(1),c=n.n(l),f=n(4),h=(n.n(f),n(30)),p=n(70),d=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),_=f.Math.Rectangle,v=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||c()(t)).call(this,e));return n.setSize(new h.a(n.getWidth(),0)),n.serverImageSmoothingFix=!1,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=u()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(a.a?a()(e,t):e.__proto__=t)}(t,f.Configurable),d(t,[{key:"_getFrame",value:function(){var e=this.getSize();return new _(0,0,e.width,e.height)}},{key:"_getTextFrame",value:function(){return this._getFrame()}},{key:"_getTextFrameForElement",value:function(e){return e.getFrame().clone()}},{key:"_calculateLayoutElements",value:function(){f.Log.warn("TextDesignRow is an abstract class.")}},{key:"_getLayoutElements",value:function(){return this._options.elements.length<=0&&this.layout(),this.getElements()}},{key:"_fontSize",value:function(e){return f.Log.warn("TextDesignRow#_fontSize not implemented. @TODO: Is it necessary?"),0}},{key:"layout",value:function(){return this.setElements(this._calculateLayoutElements()),this}},{key:"textFrame",value:function(e,t){return e.getFrame().clone()}},{key:"willRender",value:function(e){}},{key:"didRender",value:function(e){}},{key:"render",value:function(e){var t=this;e.save(),this._getLayoutElements().forEach(function(n){var r=n.serializeOptions(),i=(r.text,r.frame),o=r.font,a=t.getAttributes();o.draw(e,i.x,i.y,{textColor:a.getTextColor().toRGBA(),alignment:a.getAlignment()})}),e.restore()}}]),t}();v.prototype.availableOptions={words:{type:f.OptionType.OBJECT,default:null},width:{type:f.OptionType.NUMBER,default:100},attributes:{type:f.OptionType.CONFIGURABLE,default:new p.a},shearingAngle:{type:f.OptionType.NUMBER,default:0},elements:{type:f.OptionType.ARRAY,default:[]},size:{type:f.OptionType.OBJECT,default:null}}},function(e,t,n){e.exports=n(392)},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){"use strict";var r=n(51),i=n(12),o=n(127),a=n(31),s=n(44),u=n(192),l=n(56),c=n(130),f=n(14)("iterator"),h=!([].keys&&"next"in[].keys()),p=function(){return this};e.exports=function(e,t,n,d,_,v,y){u(n,t,d);var g,m,b,w=function(e){if(!h&&e in R)return R[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},x=t+" Iterator",T="values"==_,k=!1,R=e.prototype,C=R[f]||R["@@iterator"]||_&&R[_],E=C||w(_),O=_?T?w("entries"):E:void 0,S="Array"==t&&R.entries||C;if(S&&(b=c(S.call(new e)))!==Object.prototype&&b.next&&(l(b,x,!0),r||"function"==typeof b[f]||a(b,f,p)),T&&C&&"values"!==C.name&&(k=!0,E=function(){return C.call(this)}),r&&!y||!h&&!k&&R[f]||a(R,f,E),s[t]=E,s[x]=p,_)if(g={values:T?E:w("values"),keys:v?E:w("keys"),entries:O},y)for(m in g)m in R||o(R,m,g[m]);else i(i.P+i.F*(h||k),t,g);return g}},function(e,t,n){var r=n(20),i=n(13).document,o=r(i)&&r(i.createElement);e.exports=function(e){return o?i.createElement(e):{}}},function(e,t,n){var r=n(20);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){var r=n(55);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t,n){var r=n(92)("keys"),i=n(75);e.exports=function(e){return r[e]||(r[e]=i(e))}},function(e,t,n){var r=n(9),i=n(13),o=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n(51)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,n){t.f=n(14)},function(e,t,n){var r=n(75)("meta"),i=n(20),o=n(36),a=n(19).f,s=0,u=Object.isExtensible||function(){return!0},l=!n(35)(function(){return u(Object.preventExtensions({}))}),c=function(e){a(e,r,{value:{i:"O"+ ++s,w:{}}})},f=e.exports={KEY:r,NEED:!1,fastKey:function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!o(e,r)){if(!u(e))return"F";if(!t)return"E";c(e)}return e[r].i},getWeak:function(e,t){if(!o(e,r)){if(!u(e))return!0;if(!t)return!1;c(e)}return e[r].w},onFreeze:function(e){return l&&f.NEED&&u(e)&&!o(e,r)&&c(e),e}}},function(e,t,n){var r=n(13),i=n(9),o=n(51),a=n(94),s=n(19).f;e.exports=function(e){var t=i.Symbol||(i.Symbol=o?{}:r.Symbol||{});"_"==e.charAt(0)||e in t||s(t,e,{value:a.f(e)})}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var r=n(76),i=n(53),o=n(37),a=n(89),s=n(36),u=n(126),l=Object.getOwnPropertyDescriptor;t.f=n(25)?l:function(e,t){if(e=o(e),t=a(t,!0),u)try{return l(e,t)}catch(e){}if(s(e,t))return i(!r.f.call(e,t),e[t])}},function(e,t){},function(e,t){e.exports=function(e,t,n,r){if(!(e instanceof t)||void 0!==r&&r in e)throw TypeError(n+": incorrect invocation!");return e}},function(e,t,n){var r=n(77),i=n(14)("iterator"),o=n(44);e.exports=n(9).getIteratorMethod=function(e){if(void 0!=e)return e[i]||e["@@iterator"]||o[r(e)]}},function(e,t,n){var r,i,o,a=n(26),s=n(213),u=n(129),l=n(88),c=n(13),f=c.process,h=c.setImmediate,p=c.clearImmediate,d=c.MessageChannel,_=c.Dispatch,v=0,y={},g=function(){var e=+this;if(y.hasOwnProperty(e)){var t=y[e];delete y[e],t()}},m=function(e){g.call(e.data)};h&&p||(h=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return y[++v]=function(){s("function"==typeof e?e:Function(e),t)},r(v),v},p=function(e){delete y[e]},"process"==n(55)(f)?r=function(e){f.nextTick(a(g,e,1))}:_&&_.now?r=function(e){_.now(a(g,e,1))}:d?(o=(i=new d).port2,i.port1.onmessage=m,r=a(o.postMessage,o,1)):c.addEventListener&&"function"==typeof postMessage&&!c.importScripts?(r=function(e){c.postMessage(e+"","*")},c.addEventListener("message",m,!1)):r="onreadystatechange"in l("script")?function(e){u.appendChild(l("script")).onreadystatechange=function(){u.removeChild(this),g.call(e)}}:function(e){setTimeout(a(g,e,1),0)}),e.exports={set:h,clear:p}},function(e,t,n){"use strict";var r=n(52);e.exports.f=function(e){return new function(e){var t,n;this.promise=new e(function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r}),this.resolve=r(t),this.reject=r(n)}(e)}},function(e,t,n){var r=n(31);e.exports=function(e,t,n){for(var i in t)n&&e[i]?e[i]=t[i]:r(e,i,t[i]);return e}},function(e,t,n){var r=n(12),i=n(9),o=n(35);e.exports=function(e,t){var n=(i.Object||{})[e]||Object[e],a={};a[e]=t(n),r(r.S+r.F*o(function(){n(1)}),"Object",a)}},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(10),a=n(79),s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._renderer=t,this._filterStack=[{renderTarget:t.getCurrentRenderTarget(),filters:[]}],this._currentFrame=null,this._textures=[],this._textureFrame=new o.h(0,0,t.getWidth(),t.getHeight())}return s(e,[{key:"resizeTo",value:function(e){this._textureFrame.width=e.x,this._textureFrame.height=e.y,this._textures.forEach(function(t){return t.resizeTo(e)})}},{key:"pushFilters",value:function(e,t){var n=e.getBounds();this._currentFrame=n;var r=this._getOrCreateRenderTarget();this._renderer.setRenderTarget(r),this._filterStack.push({renderTarget:r,filters:t}),r.clear()}},{key:"popFilters",value:function(){var e=this._filterStack.pop(),t=e.filters,n=e.renderTarget,r=this._filterStack[this._filterStack.length-1].renderTarget;return 1===t.length?(t[0].apply(this._renderer,n,r),this._textures.push(n)):this._applyFilters(t,n,r),t}},{key:"_applyFilters",value:function(e,t,n){var r=this,i=t,o=this._getOrCreateRenderTarget(!0),a=e[e.length-1];e.forEach(function(e,t){if(e===a)e.apply(r._renderer,i,n);else{e.apply(r._renderer,i,o);var s=i;i=o,o=s}}),this._textures.push(i),this._textures.push(o)}},{key:"_getOrCreateRenderTarget",value:function(e){var t=this._textures.pop();return t||(t=new a.a(this._textureFrame.width,this._textureFrame.height,1)),e&&t.clear(),t}},{key:"setFilterStack",value:function(e){this._filterStack=e}},{key:"dispose",value:function(){}}]),e}();t.a=u},function(e,t,n){"use strict";var r=n(2),i=n.n(r),o=n(3),a=n.n(o),s=n(1),u=n.n(s),l=n(10),c=n(108),f=l.c.UniformType,h=function(e){function t(e,n,r){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=n||t.defaultVertexSource,r=r||t.defaultFragmentSource,function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||u()(t)).call(this,e,n,r,t.defaultUniforms,t.defaultAttributes))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=a()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(i.a?i()(e,t):e.__proto__=t)}(t,c.a),t}();h.defaultVertexSource=n(243),h.defaultFragmentSource=n(244);var p=new l.g;h.defaultUniforms={u_image:{type:f.SAMPLER2D,value:0},u_projMatrix:{type:f.MAT3,value:p.toArray()}},h.defaultAttributes=["a_position","a_texCoord","a_color"],t.a=h},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(47),a=n.n(o),s=n(10),u=n(34),l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=s.f,f=s.i,h=function(){function e(t,n,r,i,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._renderer=t,this._vertexSource=n,this._fragmentSource=r,this._uniforms=i||{},this._uniformLocations={},this._attributes=o||[],this._attributeLocations={},this._onContextChange=this._onContextChange.bind(this),this._renderer.on("context",this._onContextChange),this._init()}return l(e,[{key:"_init",value:function(){this._compile(),this._renderer.getContext().useProgram(this._program),this._cacheUniformLocations(),this._cacheAttributeLocations()}},{key:"_onContextChange",value:function(){this._init()}},{key:"setupBuffers",value:function(e,t){var n=this._renderer.getContext();n.bindBuffer(n.ARRAY_BUFFER,e),n.bindBuffer(n.ELEMENT_ARRAY_BUFFER,t),n.vertexAttribPointer(this._attributeLocations.a_position,2,n.FLOAT,!1,s.j,0),n.vertexAttribPointer(this._attributeLocations.a_texCoord,2,n.FLOAT,!1,s.j,8),n.vertexAttribPointer(this._attributeLocations.a_color,4,n.UNSIGNED_BYTE,!0,s.j,16)}},{key:"syncUniforms",value:function(){var e=this;a()(this._uniforms).forEach(function(t){e.syncUniform(t)})}},{key:"syncUniform",value:function(e){var t=this._renderer.getContext(),n=this._uniforms[e],r=this._uniformLocations[e];switch(n.type){case u.UniformType.SAMPLER2D:t.uniform1i(r,n.value);break;case u.UniformType.INT:case u.UniformType.INT1:t.uniform1i(r,n.value);break;case u.UniformType.INT2:t.uniform2i(r,n.value[0],n.value[1]);break;case u.UniformType.INT3:t.uniform3i(r,n.value[0],n.value[1],n.value[2]);break;case u.UniformType.INT4:t.uniform4i(r,n.value[0],n.value[1],n.value[2],n.value[3]);break;case u.UniformType.FLOAT:case u.UniformType.FLOAT1:t.uniform1f(r,n.value);break;case u.UniformType.FLOAT2:t.uniform2f(r,n.value[0],n.value[1]);break;case u.UniformType.FLOAT3:t.uniform3f(r,n.value[0],n.value[1],n.value[2]);break;case u.UniformType.FLOAT4:t.uniform4f(r,n.value[0],n.value[1],n.value[2],n.value[3]);break;case u.UniformType.FLOAT_VECTOR2:t.uniform2fv(r,n.value);break;case u.UniformType.MAT3:case u.UniformType.MAT3FV:t.uniformMatrix3fv(r,!1,n.value);break;case u.UniformType.MAT4:t.uniformMatrix4fv(r,!1,n.value);break;default:c.warn(this.constructor.name,"Unknown uniform type: "+n.type)}}},{key:"_cacheAttributeLocations",value:function(){var e=this,t=this._renderer.getContext();this._attributes.forEach(function(n){e._attributeLocations[n]=t.getAttribLocation(e._program,n)})}},{key:"_cacheUniformLocations",value:function(){var e=this,t=this._renderer.getContext();a()(this._uniforms).forEach(function(n){e._uniformLocations[n]=t.getUniformLocation(e._program,n)})}},{key:"_addPrecisionToSource",value:function(e){var t=this._renderer.getMaxFloatPrecision(),n="mediump";return f.isMobile()&&"highp"===t&&(n="highp"),"precision "+n+" float;\n"+e}},{key:"_compile",value:function(){var e=this._renderer.getContext(),t=this._compileShader(e.VERTEX_SHADER,this._vertexSource);this._vertexShader=t;var n=this._addPrecisionToSource(this._fragmentSource),r=this._compileShader(e.FRAGMENT_SHADER,n);this._fragmentShader=r;var i=e.createProgram();if(e.attachShader(i,t),e.attachShader(i,r),e.linkProgram(i),e.getProgramParameter(i,e.LINK_STATUS))this._program=i;else{var o=e.getProgramInfoLog(i);e.isContextLost()&&(o="WebGL context lost"),e.deleteProgram(i),c.error(this.constructor.name,"WebGL program linking error: "+o)}}},{key:"_compileShader",value:function(e,t){var n=this._renderer.getContext(),r=n.createShader(e);if(n.shaderSource(r,t),n.compileShader(r),!n.getShaderParameter(r,n.COMPILE_STATUS)){var i=n.getShaderInfoLog(r);n.isContextLost()&&(i="WebGL context lost"),n.deleteShader(r),c.error(this.constructor.name,"WebGL shader compilation error: "+i)}return r}},{key:"setUniform",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this._uniforms[e].value=t,n&&this.syncUniform(e)}},{key:"setUniforms",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];for(var n in e)this._uniforms[n].value=e[n],t&&this.syncUniform(n)}},{key:"getUniforms",value:function(){return this._uniforms}},{key:"getAttributes",value:function(){return this._attributes}},{key:"getAttributeLocations",value:function(){return this._attributeLocations}},{key:"getProgram",value:function(){return this._program}},{key:"dispose",value:function(){var e=this._renderer.getContext();e.deleteProgram(this._program),e.deleteShader(this._vertexShader),e.deleteShader(this._fragmentShader),this._uniforms=null,this._uniformLocations=null,this._attributes=null,this._attributeLocations=null,this._renderer.off("context",this._onContextChange)}}]),e}();t.a=h},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(10),a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._position=new o.k(0,0),this._scale=new o.k(1,1),this._pivot=new o.k(0,0),this._rotation=0,this._lastRotation=null,this._alpha=1,this._visible=!0,this._worldTransform=new o.g,this._parent=null,this._shaders=[],this._boundsNeedUpdate=!0,this._bounds=new o.h(0,0,1,1),this._localBoundsNeedUpdate=!0,this._localBounds=new o.h(0,0,1,1),this._tint=16777215,this._filterRectangle=new o.h(0,0,0,0)}return a(e,[{key:"renderWebGL",value:function(e){o.f.warn(this.constructor.name,"`renderWebGL` is abstract and not implemented in inherited class")}},{key:"renderCanvas",value:function(e){o.f.warn(this.constructor.name,"`renderCanvas` is abstract and not implemented in inherited class")}},{key:"updateTransform",value:function(){var e=this._parent?this._parent.getWorldTransform():o.g.IDENTITY,t=this._worldTransform;this._rotation!==this._lastRotation&&(this._sinRotation=Math.sin(this._rotation),this._cosRotation=Math.cos(this._rotation),this._lastRotation=this._rotation),t.a=this._cosRotation*this._scale.x,t.b=this._sinRotation*this._scale.x,t.c=-this._sinRotation*this._scale.y,t.d=this._cosRotation*this._scale.y,t.tx=this._position.x,t.ty=this._position.y,(this._pivot.x||this._pivot.y)&&(t.tx-=this._pivot.x*t.a+this._pivot.y*t.c,t.ty-=this._pivot.x*t.b+this._pivot.y*t.d),t.multiply(e),this._boundsNeedUpdate=!0,this._localBoundsNeedUpdate=!0}},{key:"addShader",value:function(e){this._shaders.push(e)}},{key:"removeShader",value:function(e){var t=this._shaders.indexOf(e);return-1!==t&&(this._shaders.splice(t,1),!0)}},{key:"removeShaderAt",value:function(e){return!!this._shaders[e]&&(this._shaders.splice(e,1),!0)}},{key:"getBounds",value:function(){return this._bounds.clone()}},{key:"getPosition",value:function(){return this._position}},{key:"setPosition",value:function(e,t){e instanceof o.k?this._position.copy(e):this._position.set(e,t),this._boundsNeedUpdate=!0,this._localBoundsNeedUpdate=!0}},{key:"getScale",value:function(){return this._scale}},{key:"setScale",value:function(e,t){e instanceof o.k?this._scale.copy(e):this._scale.set(e,t),this._boundsNeedUpdate=!0,this._localBoundsNeedUpdate=!0}},{key:"getPivot",value:function(){return this._pivot}},{key:"setPivot",value:function(e,t){e instanceof o.k?this._pivot.copy(e):this._pivot.set(e,t),this._boundsNeedUpdate=!0,this._localBoundsNeedUpdate=!0}},{key:"getRotation",value:function(){return this._rotation}},{key:"setRotation",value:function(e){this._rotation=e,this._boundsNeedUpdate=!0,this._localBoundsNeedUpdate=!0}},{key:"getAlpha",value:function(){return this._alpha}},{key:"setAlpha",value:function(e){this._alpha=e}},{key:"getWorldAlpha",value:function(){return this._parent?this._parent.getAlpha()*this._alpha:this._alpha}},{key:"getWorldTransform",value:function(){return this._worldTransform}},{key:"getParent",value:function(){return this._parent}},{key:"setParent",value:function(e){this._parent=e}},{key:"getFilterRectangle",value:function(){return this._filterRectangle}},{key:"setFilterRectangle",value:function(e){this._filterRectangle.copy(e)}},{key:"getTint",value:function(){return this._tint}},{key:"setTint",value:function(e){this._tint=e}},{key:"isVisible",value:function(){return this._visible}},{key:"setVisible",value:function(e){this._visible=e}}]),e}();t.a=s},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(10),a=n(80),s=n(149),u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=o.c.RendererType,c=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._renderer=t,this._filterStack=[{filters:[]}],this._currentFrame=null,this._renderTargets=[],this._textureFrame=new o.h(0,0,t.getWidth(),t.getHeight()),this._onContextChange=this._onContextChange.bind(this),this._renderer.on("context",this._onContextChange),this._onContextChange()}return u(e,[{key:"resizeTo",value:function(e){this._textureFrame.width=e.x,this._textureFrame.height=e.y,this._renderTargets.forEach(function(t){return t.resizeTo(e)})}},{key:"getFilterStack",value:function(){return this._filterStack}},{key:"setFilterStack",value:function(e){this._filterStack=e}},{key:"_getOrCreateRenderTarget",value:function(e){var t=this._renderTargets.pop();return t||(t=new a.a(this._renderer,this._textureFrame.width,this._textureFrame.height,1)),t.setFrame(this._currentFrame),e&&t.clear(),t}},{key:"pushFilters",value:function(e,t){var n=e.getBounds();this._currentFrame=n;var r=e.getFilterRectangle();r.width>0&&r.height>0&&(this._currentFrame=r);var i=this._getOrCreateRenderTarget();this._renderer.setRenderTarget(i),i.clear(),this._filterStack.push({renderTarget:i,filters:t})}},{key:"popFilters",value:function(){var e=this._filterStack.pop(),t=e.filters,n=e.renderTarget,r=this._filterStack[this._filterStack.length-1].renderTarget;this._quad.map(this._textureFrame,n.getFrame());var i=t[0].getShaderForRenderer(this._renderer),o=this._quad.getVertexBuffer(),a=this._quad.getIndexBuffer(),s=this._renderer.getContext();s.bindBuffer(s.ARRAY_BUFFER,o),s.bindBuffer(s.ELEMENT_ARRAY_BUFFER,a);var u=i.getAttributeLocations();return s.vertexAttribPointer(u.a_position,2,s.FLOAT,!1,0,0),s.vertexAttribPointer(u.a_texCoord,2,s.FLOAT,!1,0,32),s.vertexAttribPointer(u.a_color,4,s.FLOAT,!1,0,64),this._renderer.updateTexture(n.getBaseTexture(),!1),1===t.length?(t[0].apply(this._renderer,n,r),this._renderTargets.push(n)):this._applyFilters(t,n,r),t}},{key:"_applyFilters",value:function(e,t,n){var r=this,i=t,o=this._getOrCreateRenderTarget(!0);this._renderer.updateTexture(o.getBaseTexture(),!1);var a=e[e.length-1];e.forEach(function(e,t){if(e===a)e.apply(r._renderer,i,n,!0);else{e.apply(r._renderer,i,o,!0);var s=i;i=o,o=s}}),this._renderTargets.push(i),this._renderTargets.push(o)}},{key:"_onContextChange",value:function(){this._renderTargets.length=0,this._renderer.isOfType(l.WEBGL)&&(this._quad&&this._quad.dispose(),this._quad=new s.a(this._renderer))}},{key:"dispose",value:function(){this._renderer.off("context",this._onContextChange),this._quad&&this._quad.dispose(),this._renderTargets.forEach(function(e){e.dispose()})}}]),e}();t.a=c},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(60),a=n(112),s=n(27),u=n(113),l=n(279),c=n(280),f=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();s.a.invariant;var h=u.a.MARKERS,p=new RegExp("^data:image/jpeg;base64,","i"),d=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._buf=t,this._stream=new a.a(this._buf),this._stream.setHead(0),this._segments=this._sliceIntoSegments(this._buf),this._exifData=new c.a(this._getMarkerBuffer(h.EXIF)),this._jfifData=new l.a(this._getMarkerBuffer(h.JFIF))}return f(e,[{key:"restoreSegments",value:function(t){var n=e.fromDataURL(t);return n=this.restoreExifTagsToImageData(n),n=this.restoreJfifSegmentToImageData(n),e.toDataURL(n)}},{key:"restoreExifTagsToImageData",value:function(e){if(!this._exifData.isValid())return e;var t=this._sliceIntoSegments(e)[1][0],n=e.slice(0,t),r=e.slice(t),i=n.concat(this._exifData.getBuffer());return i=i.concat(r)}},{key:"restoreJfifSegmentToImageData",value:function(e){if(!this._jfifData.isValid())return e;var t=this._sliceIntoSegments(e),n=this._findSegment(h.JFIF,t);if(!n)return e;var r=n[0],i=n[1],o=e.slice(0,r),a=e.slice(r,i),s=e.slice(i),u=new l.a(a);return u.setDensityX(this._jfifData.getDensityX()),u.setDensityY(this._jfifData.getDensityY()),u.setUnitDensity(this._jfifData.getUnitDensity()),o.concat(a).concat(s)}},{key:"restoreExifTags",value:function(t){var n=e.fromDataURL(t),r=this.restoreExifTagsToImageData(n);return e.toDataURL(r)}},{key:"restoreJfifSegment",value:function(t){if(!this._jfifData.isValid())return t;var n=e.fromDataURL(t),r=this.restoreJfifSegmentToImageData(n);return e.toDataURL(r)}},{key:"setOrientation",value:function(e){return this._exifData.setOrientation(e)}},{key:"_findSegment",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._segments,n=0;n<t.length;n++){var r=t[n][0],i=t[n][1];if(this._stream.setHead(r),this._stream.peekInt16()===e)return[r,i]}return!1}},{key:"_getLastSegment",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._segments;return e[e.length-1]}},{key:"_getMarkerBuffer",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._segments,n=this._findSegment(e,t);if(n){var r=n[0],i=n[1];return this._buf.slice(r,i)}return!1}},{key:"_sliceIntoSegments",value:function(e){for(var t=new a.a(e),n=[];t.getHead()<e.length;){var r=t.readInt16();if(r!==h.SOI){if(r===h.SOS)break;if(!(r>=65280&&r<=65535))throw new Error("Invalid marker: 0x"+r.toString(16));var i=t.readInt16(),o=t.getHead()+i-2;n.push([t.getHead()-4,o]),t.setHead(o)}}return this._stream.setHead(0),n}},{key:"getTags",value:function(){return this._exifData.getTags()}},{key:"getTagData",value:function(){return this._exifData.getTagData()}},{key:"dispose",value:function(){this._buf=[],this._segments=[]}}],[{key:"toDataURL",value:function(e){return"data:image/jpeg;base64,"+o.a.encode(e)}},{key:"fromDataURL",value:function(e){var t=e.replace("data:image/jpeg;base64,","");return o.a.decode(t)}},{key:"isJPEG",value:function(e){return p.test(e)}},{key:"bufferIsJPEG",value:function(e){return"JFIF"===e.slice(6,10).toString()}},{key:"fromBase64String",value:function(t){var n=t.replace("data:image/jpeg;base64,","");return new e(o.a.decode(n))}}]),e}();t.a=d},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._head=0,this._buf=t}return o(e,[{key:"peekInt8",value:function(){return this._buf[this._head]}},{key:"peekInt16",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this._buf[this._head],n=this._buf[this._head+1];return e?(n<<8)+t:(t<<8)+n}},{key:"peekInt24",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this._buf[this._head],n=this._buf[this._head+1],r=this._buf[this._head+2];return e?(r<<16)+(n<<8)+t:(t<<16)+(n<<8)+r}},{key:"peekInt32",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this._buf[this._head],n=this._buf[this._head+1],r=this._buf[this._head+2],i=this._buf[this._head+3];return e?(i<<32)+(r<<16)+(n<<8)+t:(t<<32)+(n<<16)+(r<<8)+i}},{key:"writeInt8",value:function(e){this._buf[this._head]=255&e}},{key:"writeInt16",value:function(e){this._buf[this._head]=e>>8,this._buf[this._head+1]=255&e}},{key:"readInt8",value:function(){var e=this.peekInt8();return this._head+=1,e}},{key:"readInt16",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.peekInt16(e);return this._head+=2,t}},{key:"readInt24",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.peekInt24(e);return this._head+=3,t}},{key:"readInt32",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.peekInt32(e);return this._head+=4,t}},{key:"readString",value:function(e){for(var t="",n=0;n<e;n++){var r=this.readInt8();t+=String.fromCharCode(r)}return t}},{key:"getHead",value:function(){return this._head}},{key:"setHead",value:function(e){this._head=e}}]),e}();t.a=a},function(e,t,n){"use strict";t.a={MARKERS:{SOI:65496,SOS:65498,APP0:65504,APP1:65505,JFIF:65504,EXIF:65505},EXIF_TAGS:{256:"ImageWidth",257:"ImageHeight",34665:"ExifIFDPointer",34853:"GPSInfoIFDPointer",40965:"InteroperabilityIFDPointer",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",274:"Orientation",277:"SamplesPerPixel",284:"PlanarConfiguration",530:"YCbCrSubSampling",531:"YCbCrPositioning",282:"XResolution",283:"YResolution",296:"ResolutionUnit",273:"StripOffsets",278:"RowsPerStrip",279:"StripByteCounts",513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength",301:"TransferFunction",318:"WhitePoint",319:"PrimaryChromaticities",529:"YCbCrCoefficients",532:"ReferenceBlackWhite",306:"DateTime",270:"ImageDescription",271:"Make",272:"Model",305:"Software",315:"Artist",33432:"Copyright"}}},function(e,t,n){"use strict";n.d(t,"a",function(){return d});var r=n(0),i=n.n(r),o=n(2),a=n.n(o),s=n(3),u=n.n(s),l=n(1),c=n.n(l),f=n(4),h=(n.n(f),n(18)),p=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),d=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||c()(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=u()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(a.a?a()(e,t):e.__proto__=t)}(t,f.Configurable),p(t,[{key:"insetsForWidth",value:function(e){return this.getRelativeInsets().clone().scale(e)}}],[{key:"Small",get:function(){return new t({imagePath:"text-design/images/imgly_text_design_asset_banderole_small.png",fontIdentifier:"imgly_font_campton_bold",relativeInsets:new h.a(.05,.2,.05,.2)})}},{key:"Rectangle",get:function(){return new t({imagePath:"text-design/images/imgly_text_design_asset_black_background.png",fontIdentifier:"imgly_font_campton_bold",relativeInsets:new h.a(.05,.05,.05,.05),needsImageSmoothingFix:!0})}},{key:"Celebrate1",get:function(){return new t({imagePath:"text-design/images/imgly_text_design_asset_celebrate_01.png",fontIdentifier:"imgly_font_rasa_500",relativeInsets:new h.a(.05,.2,.05,.2)})}},{key:"Celebrate2",get:function(){return new t({imagePath:"text-design/images/imgly_text_design_asset_celebrate_02.png",fontIdentifier:"imgly_font_rasa_500",relativeInsets:new h.a(.05,.2,.05,.2)})}}]),t}();d.prototype.availableOptions={image:{type:f.OptionType.IMAGE,default:null},imagePath:{type:f.OptionType.STRING,default:null},relativeInsets:{type:f.OptionType.OBJECT,default:new h.a},fontIdentifier:{type:f.OptionType.STRING,default:"imgly_font_open_sans_bold"},needsImageSmoothingFix:{type:f.OptionType.BOOLEAN,default:!1}}},function(e,t,n){"use strict";n.d(t,"a",function(){return x});var r=n(6),i=n.n(r),o=n(0),a=n.n(o),s=n(5),u=n.n(s),l=n(2),c=n.n(l),f=n(3),h=n.n(f),p=n(1),d=n.n(p),_=n(4),v=(n.n(_),n(18)),y=n(22),g=n(41),m=i.a||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},b=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),a()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),w=function e(t,n,r){null===t&&(t=Function.prototype);var i=u()(t,n);if(void 0===i){var o=d()(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},x=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||d()(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=h()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(c.a?c()(e,t):e.__proto__=t)}(t,y.a),b(t,[{key:"_getTextColor",value:function(){return this.getAutoAdjustTextColor()&&!this.getIsMasked()?this.getBackgroundColor().equals(_.Color.WHITE)?_.Color.BLACK:_.Color.WHITE:this.getAttributes().getTextColor().clone()}},{key:"_getTextFrame",value:function(){return this.getImageInsets().applyToRectangle(this._getFrame())}},{key:"_getTextFrameForElement",value:function(e){var n=w(t.prototype.__proto__||d()(t.prototype),"_getTextFrameForElement",this).call(this,e),r=this.getImageInsets();return(this.getIsMasked()||this.getIsUsedInInvertedLayout())&&(n.y-=r.top),n}},{key:"willRender",value:function(e){this.getAttributes().setTextColor(this._getTextColor());var t=this.getImage();if(t){var n=this.getCapInsets(),r=this._getFrame();n&&!n.equals(v.a.ZERO)?Object(g.b)(e,t,r,n):e.drawImage(t,r.x,r.y,r.width,r.height),Object(g.d)(e,r,this.getBackgroundColor(),"source-atop",!0)}(this.getIsMasked()||this.getIsUsedInInvertedLayout())&&t&&(e.save(),e.globalCompositeOperation="destination-out")}},{key:"didRender",value:function(e){w(t.prototype.__proto__||d()(t.prototype),"didRender",this).call(this,e),(this.getIsMasked()||this.getIsUsedInInvertedLayout())&&e.restore()}}]),t}();x.prototype.availableOptions=m({},y.a.prototype.availableOptions,{image:{type:_.OptionType.IMAGE,default:null},capInsets:{type:_.OptionType.OBJECT,default:new v.a},backgroundColor:{type:_.OptionType.COLOR,default:_.Color.WHITE},autoAdjustTextColor:{type:_.OptionType.BOOLEAN,default:!0},isMasked:{type:_.OptionType.BOOLEAN,default:!0},isUsedInInvertedLayout:{type:_.OptionType.BOOLEAN,default:!1}})},function(e,t,n){"use strict";n.d(t,"a",function(){return R});var r=n(6),i=n.n(r),o=n(0),a=n.n(o),s=n(5),u=n.n(s),l=n(2),c=n.n(l),f=n(3),h=n.n(f),p=n(1),d=n.n(p),_=n(4),v=(n.n(_),n(22)),y=n(71),g=n(48),m=n(30),b=n(41),w=i.a||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},x=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),a()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),T=function e(t,n,r){null===t&&(t=Function.prototype);var i=u()(t,n);if(void 0===i){var o=d()(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},k=_.Math.Rectangle,R=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||d()(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=h()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(c.a?c()(e,t):e.__proto__=t)}(t,v.a),x(t,[{key:"getImageSize",value:function(){var e=this.getLeftImage(),t=this.getRightImage(),n=this.getWords(),r=this.getAttributes().getFontIdentifier(),i=e?new m.a(e.width,e.height):new m.a,o=n.joined(1)[0];if(!o)return i;var a=new y.a({text:o,fontIdentifier:r,fontSize:50}).getSizeValue(),s=t?2:1;i.scale(s,1);var u=i.clone().fitInWidthWithOther(this._getFrame().width,a);return u.scale(1/s,1),u}},{key:"_getTextFrame",value:function(){var e=T(t.prototype.__proto__||d()(t.prototype),"_getTextFrame",this).call(this).clone(),n=this.getImageSize(),r=this.getRightImage(),i=this.getImagePosition();return r?(e.x+=n.width,e.width-=2*n.width):i===t.ImagePosition.Left&&(e.x+=n.width),e}},{key:"_calculateLayoutElements",value:function(){var e=T(t.prototype.__proto__||d()(t.prototype),"_calculateLayoutElements",this).call(this),n=this._getFrame(),r=this.getRightImage(),i=this.getImageSize(),o=this.getImagePosition(),a=this._getTextFrame(),s=this.getAttributes().getFontIdentifier(),u=new y.a({text:"stickerClock",fontIdentifier:s});u.fitWidth(this._getTextFrame().width);var l=(new k).set(n.x,n.y,i.width,i.height);if(r||o!==t.ImagePosition.Right||(l.x+=a.width),e.push(new g.a({text:"stickerClock",frame:l,font:u})),r){var c=e[0];if(c){var f=l.clone();f.translate(c.getFrame().width+f.width,0),e.push(new g.a({text:"stickerClock",frame:f,font:u}))}}return e}},{key:"render",value:function(e){var t=this._getLayoutElements(),n=this.getAttributes(),r=n.getTextColor(),i=this.getLeftImage(),o=this.getRightImage(),a=t[0],s=t[1],u=a.serializeOptions().font,l=this._getTextFrameForElement(a);if(u.draw(e,l.x,l.y,{textColor:n.getTextColor().toRGBA(),alignment:n.getAlignment()}),i){var c=s.getFrame();e.drawImage(i,c.x,c.y,c.width,c.height),Object(b.d)(e,c,r,"source-atop")}if(t.length>2){var f=t[2].getFrame().clone();e.drawImage(o,f.x,f.y,f.width,f.height),Object(b.d)(e,f,r,"source-atop")}}}]),t}();R.ImagePosition={Left:"LEFT",right:"RIGHT"},R.prototype.availableOptions=w({},v.a.prototype.availableOptions,{leftImage:{type:_.OptionType.IMAGE,default:null},rightImage:{type:_.OptionType.IMAGE,default:null},imagePosition:{type:_.OptionType.STRING,default:R.ImagePosition.Left,available:[R.ImagePosition.Left,R.ImagePosition.Right]}})},function(e,t,n){"use strict";n.d(t,"a",function(){return T});var r=n(6),i=n.n(r),o=n(0),a=n.n(o),s=n(2),u=n.n(s),l=n(3),c=n.n(l),f=n(1),h=n.n(f),p=n(4),d=(n.n(p),n(83)),_=n(40),v=n(70),y=n(48),g=n(71),m=n(41),b=n(30),w=i.a||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},x=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),a()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),T=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||h()(t)).call.apply(e,[this].concat(r)));return o.setSize(new b.a(o.getWidth(),o.getHeight())),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=c()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(u.a?u()(e,t):e.__proto__=t)}(t,d.a),x(t,[{key:"_getImageFrame",value:function(){var e=this._getTextFrame().clone(),t=this.getImage();if(this.getDrawingModeAspectFit()&&t){var n=Math.min(e.width/t.width,e.height/t.height),r=t.width*n,i=t.height*n;e.x+=(e.width-r)/2,e.y+=(e.height-i)/2,e.width=r,e.height=i}return e}},{key:"_calculateLayoutElements",value:function(){return[new y.a({text:"",frame:this._getImageFrame(),font:new g.a})]}},{key:"render",value:function(e){var t=this.getImage(),n=this._getImageFrame(),r=this.getAttributes().getTextColor();Object(m.a)(e,t,n,r)}}]),t}();T.RowImages={decorative1:"text-design/images/imgly_text_design_asset_decorative_01.png",decorative2:"text-design/images/imgly_text_design_asset_decorative_02.png",decorative3:"text-design/images/imgly_text_design_asset_decorative_05.png",decorative4:"text-design/images/imgly_text_design_asset_decorative_06.png",celebrate1:"text-design/images/imgly_text_design_asset_celebrate_03.png",celebrate2:"text-design/images/imgly_text_design_asset_celebrate_04.png",celebrate3:"text-design/images/imgly_text_design_asset_celebrate_05.png"},T.prototype.availableOptions=w({},d.a.prototype.availableOptions,{words:{type:p.OptionType.OBJECT,default:new _.a},height:{type:p.OptionType.NUMBER,default:0},image:{type:p.OptionType.IMAGE,default:null},imagePath:{type:p.OptionType.STRING,default:T.RowImages.decorative1},drawingModeAspectFit:{type:p.OptionType.BOOLEAN,default:!1},attributes:{type:p.OptionType.CONFIGURABLE,default:new v.a}})},function(e,t,n){"use strict";n.d(t,"a",function(){return b});var r=n(6),i=n.n(r),o=n(0),a=n.n(o),s=n(2),u=n.n(s),l=n(3),c=n.n(l),f=n(1),h=n.n(f),p=n(4),d=(n.n(p),n(115)),_=n(48),v=n(71),y=(n(167),n(400)),g=i.a||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},m=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),a()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),b=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||h()(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=c()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(u.a?u()(e,t):e.__proto__=t)}(t,d.a),m(t,[{key:"_calculateLayoutElements",value:function(){var e=this.getWords(),t=this._getTextFrame(),n=this.getAttributes().getFontIdentifier(),r=this.getImageInsets(),i=new v.a({text:e.getWord(0),fontIdentifier:n});i.fitWidth(t.width);var o=new _.a({text:e.getWord(0),frame:t,font:i});o.setFrame(this._getTextFrameForElement(o));var a=this.getSize();return(this.getSizeToFitContent()||a.height<=1)&&(a.height=r.top+o.getFrame().height+r.bottom),a.height=Math.max(a.height,this.getMinimumHeight()),[o]}},{key:"_getTextFrameForElement",value:function(e){var t=this.getWords().getWord(0),n=this.getAttributes(),r=n.getFontIdentifier(),i=this.getImageInsets(),o=this.getImageInsets().applyToRectangle(this._getFrame()).scale(this.getTextScaleFactor()),a=new y.a({text:t,fontIdentifier:r,alignment:n.getAlignment(),lineHeight:1});a.fitInFrame(o);var s=a.getSize();o.height=s.height;var u=s.height*this.getRowScaleFactor();this.getSizeToFitContent()&&(u+=i.top+i.bottom);var l=this._getFrame(),c=n.getAlignment();if(this.getCenteredVertically())o.y=l.height/2-u/2+i.top;else switch(c){case"left":o.y=l.height-u-i.bottom;break;case"center":o.y=l.height/2-u/2+u*this.getCenterOffset(),o.x=(l.width-o.width)/2;break;case"right":o.x=l.width-o.width-i.right}return o}},{key:"render",value:function(e){var t=this;e.save(),this._getLayoutElements().forEach(function(n){var r=n.serializeOptions(),i=r.text,o=r.frame,a=t.getAttributes(),s=a.getFontIdentifier(),u=new y.a({text:i,fontIdentifier:s,alignment:a.getAlignment(),lineHeight:1,textColor:a.getTextColor().toRGBA()});o=t._getTextFrameForElement(n),u.fitInFrame(o),u.draw(e,o.x,o.y)}),e.restore()}}]),t}();b.prototype.availableOptions=g({},d.a.prototype.availableOptions,{centerOffset:{type:p.OptionType.NUMBER,default:0},sizeToFitContent:{type:p.OptionType.BOOLEAN,default:!1},textScaleFactor:{type:p.OptionType.NUMBER,default:.95},rowScaleFactor:{type:p.OptionType.NUMBER,default:1},minimumHeight:{type:p.OptionType.NUMBER,default:0},centeredVertically:{type:p.OptionType.BOOLEAN,default:!1}})},function(e,t,n){"use strict";n.d(t,"a",function(){return w});var r=n(6),i=n.n(r),o=n(0),a=n.n(o),s=n(5),u=n.n(s),l=n(2),c=n.n(l),f=n(3),h=n.n(f),p=n(1),d=n.n(p),_=n(4),v=(n.n(_),n(72)),y=n(49),g=n(17),m=i.a||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},b=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),a()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),w=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||d()(t)).call.apply(e,[this].concat(r)));return o._possibleRowTypes=[v.a.SpeechBubble1,v.a.SpeechBubble3],o._rowTypesRandomizer=new g.a(0),o._isMaskedRandomizer=new g.a(0),o._seedPool.push(o._rowTypesRandomizer),o._seedPool.push(o._isMaskedRandomizer),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=h()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(c.a?c()(e,t):e.__proto__=t)}(t,y.a),b(t,[{key:"getImagePaths",value:function(){return this._possibleRowTypes.map(function(e){return e.getImagePath()})}},{key:"_rowTypes",value:function(e){return this._possibleRowTypes}},{key:"_randomLayoutRow",value:function(e,n,r,i){this._rowType=this._rowTypesRandomizer.pickNext(this._rowTypes(e)),i.setLineSpacing(.9);var o=function e(t,n,r){null===t&&(t=Function.prototype);var i=u()(t,n);if(void 0===i){var o=d()(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0}(t.prototype.__proto__||d()(t.prototype),"_randomLayoutRow",this).call(this,e,n,r,i);return o.set({textScaleFactor:1,minimumHeight:r*this._rowType.getMinimumHeightRatio(),sizeToFitContent:this._rowType.getSizeToFitContent(),centeredVertically:!0}),o}}]),t}();w.defaultFontIdentifiers=["imgly_font_panton_black_caps","imgly_font_panton_light_caps","imgly_font_panton_black_italic_caps","imgly_font_panton_light_italic_caps"],w.identifier="imgly_text_design_masked_speech_bubble",w.prototype.availableOptions=m({},y.a.prototype.availableOptions,{fontIdentifiers:{type:_.OptionType.ARRAY,default:w.defaultFontIdentifiers},squareLayout:{type:_.OptionType.BOOLEAN,default:!1},alignment:{type:_.OptionType.STRING,default:"left",available:y.a.ValidAlignments}})},function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return f()(e)}n.d(t,"a",function(){return B});var i=n(6),o=n.n(i),a=n(28),s=n.n(a),u=n(29),l=n.n(u),c=n(15),f=n.n(c),h=n(0),p=n.n(h),d=n(5),_=n.n(d),v=n(2),y=n.n(v),g=n(3),m=n.n(g),b=n(1),w=n.n(b),x=n(4),T=(n.n(x),n(69)),k=n(22),R=n(23),C=n(18),E=n(40),O=n(117),S=n(116),A=n(17),I=o.a||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},F=function(){return function(e,t){if(Array.isArray(e))return e;if(s()(Object(e)))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=l()(e);!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),D=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),p()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),M=function e(t,n,r){null===t&&(t=Function.prototype);var i=_()(t,n);if(void 0===i){var o=w()(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},B=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||w()(t)).call.apply(e,[this].concat(r)));return o._relativeInsets=new C.a(0,0,0,0),o._INVALID_FONTS_IF_LESS_THEN_5_CHARS=["imgly_font_montserrat_light"],o._INVALID_FONTS_IF_LESS_THEN_4_CHARS=["imgly_font_montserrat_light","imgly_font_wolesbro"],o._lineCount=0,o._decorativeRowCreated=!1,o._useImageRowRandomizer=new A.a(0),o._rowTypeRandomizer=new A.a(0),o._lineDecorativeTypeRandomizer=new A.a(0),o._seedPool.push(o._useImageRowRandomizer),o._seedPool.push(o._rowTypeRandomizer),o._seedPool.push(o._lineDecorativeTypeRandomizer),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=m()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(y.a?y()(e,t):e.__proto__=t)}(t,T.a),D(t,[{key:"getImagePaths",value:function(){return[].concat(r(t.DecoratorImages),r(t.RowImages))}},{key:"_fontForRow",value:function(e,t){var n=this,r=t.countNumberOfCharacters(),i=this.getFontIdentifiers();return r<4?i=i.filter(function(e){return n._INVALID_FONTS_IF_LESS_THEN_4_CHARS.indexOf(e)<0}):r<5&&(i=i.filter(function(e){return n._INVALID_FONTS_IF_LESS_THEN_5_CHARS.indexOf(e)<0})),i[e%i.length]}},{key:"_modifiedText",value:function(e){return M(t.prototype.__proto__||w()(t.prototype),"_modifiedText",this).call(this,e).toUpperCase()}},{key:"_modifiedLines",value:function(e){return this._lineCount=e.length,e}},{key:"generateLayoutData",value:function(e,n){return this._decorativeRowCreated=!1,M(t.prototype.__proto__||w()(t.prototype),"generateLayoutData",this).call(this,e,n)}},{key:"_randomLayoutRow",value:function(e,t,n,r){var i=e;switch(r.getFontIdentifier()){case"imgly_font_wolesbro":i=(new E.a).set(e.getLowerCase());break;case"imgly_font_permanent_marker":i=(new E.a).set(e.getUpperCase())}var o=this.getDecorativeRowsInTheMiddleOnly()&&(0===t||t===this._lineCount-1);if(this._useImageRowRandomizer.nextBool()||this._decorativeRowCreated||o)return new k.a({words:i,width:n,attributes:r});this._decorativeRowCreated=!0;var a=this._randomDecoratorImages(),s=F(a,2),u=s[0],l=s[1];return new S.a({words:e,width:n,attributes:r,leftImage:u,rightImage:l})}},{key:"_layoutRows",value:function(e,n){var i=M(t.prototype.__proto__||w()(t.prototype),"_layoutRows",this).call(this,e,n);if(!this.getDecorationsVisible())return i;var o=.0625*n,a=new O.a({width:n,height:o,image:R.a.getImage(this._rowTypeRandomizer.pickNext(t.RowImages))}).layout(),s=new O.a({width:n,height:o,image:R.a.getImage(this._rowTypeRandomizer.pickNext(t.RowImages))}).layout();return[a].concat(r(i),[s])}},{key:"_randomDecoratorImages",value:function(){return this._lineDecorativeTypeRandomizer.nextInRange(0,1)?t.DecoratorImages.slice(0,2).map(function(e){return R.a.getImage(e)}):t.DecoratorImages.slice(2).map(function(e){return R.a.getImage(e)})}}]),t}();B.defaultFontIdentifiers=["imgly_font_permanent_marker","imgly_font_wolesbro","imgly_font_wolesbro","imgly_font_montserrat_light"],B.identifier="imgly_text_design_sunshine",B.RowImages=[O.a.RowImages.decorative1,O.a.RowImages.decorative2,O.a.RowImages.decorative3,O.a.RowImages.decorative4],B.DecoratorImages=["text-design/images/imgly_text_design_asset_decorative_03.png","text-design/images/imgly_text_design_asset_decorative_04.png","text-design/images/imgly_text_design_asset_decorative_07.png","text-design/images/imgly_text_design_asset_decorative_08.png"],B.prototype.availableOptions=I({},T.a.prototype.availableOptions,{fontIdentifiers:{type:x.OptionType.ARRAY,default:B.defaultFontIdentifiers},relativeLineSpacing:{type:x.OptionType.NUMBER,default:.025/3*4},decorationsVisible:{type:x.OptionType.BOOLEAN,default:!0},decorativeRowsInTheMiddleOnly:{type:x.OptionType.BOOLEAN,default:!1}})},function(e,t,n){"use strict";n.d(t,"a",function(){return w});var r=n(6),i=n.n(r),o=n(0),a=n.n(o),s=n(2),u=n.n(s),l=n(3),c=n.n(l),f=n(1),h=n.n(f),p=n(4),d=(n.n(p),n(173)),_=n(23),v=n(41),y=n(408),g=i.a||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},m=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),a()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),b=p.Math.Rectangle,w=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||h()(t)).call.apply(e,[this].concat(r)));return o._MAX_TRIES=1e3,o._PRECISION=1e3,o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=c()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(u.a?u()(e,t):e.__proto__=t)}(t,d.a),m(t,[{key:"render",value:function(e,t,n,r,i){var o=this._options,a=o.imagePaths,s=o.relativeParticleSize;if(!(a.length<=0)){var u=t.width/t.height,l=new b(Math.round(n.left*this._PRECISION),Math.round(n.top*this._PRECISION*u),this._PRECISION,this._PRECISION);l.width-=l.x+Math.round(n.right*this._PRECISION),l.height-=l.y+Math.round(n.bottom*this._PRECISION*u);for(var c=[],f=0,h=0;f<this.getParticleCount()&&h<this._MAX_TRIES;){var p=s/2,d=Math.round(p*this._PRECISION),g=Math.round(p*this._PRECISION*u),m=Math.floor(this._PRECISION)-d,w=Math.floor(this._PRECISION)-g,x=i.nextInRange(d,m),T=i.nextInRange(g,w),k=new b(x-d,T-g,2*d,2*g);k.intersects(l)||this.hasCollision(c,k)||(c.push(new y.a({frame:k})),f+=1),h+=1}for(var R=0;R<c.length;R++){var C=c[R],E=i.pickNext(a),O=_.a.getImage(E),S=i.nextInRange(140,230)/255,A=t.width/this._PRECISION,I=t.height/this._PRECISION,F=C.getContentFrame();F.x*=A,F.y*=I,F.width*=A,F.height*=I;var D=r.clone();D.a=S,Object(v.a)(e,O,F,D,"source-atop")}}}},{key:"hasCollision",value:function(e,t){for(var n=0;n<e.length;n++)if(t.intersects(e[n].getFrame()))return!0;return!1}}]),t}();w.prototype.availableOptions=g({},d.a.prototype.availableOptions,{particleCount:{type:p.OptionType.NUMBER,default:50},relativeParticleSize:{type:p.OptionType.NUMBER,default:.08},imagePaths:{type:p.OptionType.ARRAY,default:[]}})},function(e,t,n){e.exports={default:n(419),__esModule:!0}},function(e,t,n){"use strict";var r=n(6),i=n.n(r),o=n(0),a=n.n(o),s=n(2),u=n.n(s),l=n(3),c=n.n(l),f=n(1),h=n.n(f),p=n(4),d=(n.n(p),n(11)),_=n(50),v=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),a()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),y=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||h()(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=c()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(u.a?u()(e,t):e.__proto__=t)}(t,d.b),v(t,[{key:"_calculateOutputShape",value:function(){var e=this._getInputWithName("x").logicalShape;if(4!==e.length)throw new Error("UnpackRGBAFilter expects 4D inputs");var t=e[0];if(3!==e[3])throw new Error("Expected RGB values");if(1!==t)throw new Error("PackRGBAFilter does not support batches of images.");var n=this._options.outputSize;if(2!==n.length)throw new Error("Expected outputSize of length 2");if(n[0]*n[1]!=_.a.getSizeOfLogicalShape(e)/3)throw new Error("Input shape "+e+" can't be broken up into 3 channels.");return n}},{key:"_getTensorOperationSource",value:function(){return"\n void main ()\n {\n ivec2 outputCoords = getOutputCoords();\n int row = outputCoords.x;\n int col = outputCoords.y;\n float r = getX(0, row, col, 0);\n float g = getX(0, row, col, 1);\n float b = getX(0, row, col, 2);\n gl_FragColor = vec4(r, g, b, 1.0);\n }\n "}},{key:"requiresFloatTextures",value:function(){return!1}}]),t}();y.prototype.availableOptions=i()({outputSize:{type:p.OptionType.ARRAY}},d.b.prototype.availableOptions),t.a=y},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return o(e,null,[{key:"calculatePadding",value:function(e,t,n,r,i,o,a){var s=void 0,u=void 0,l=void 0;if("same"===e){var c=((s=Math.ceil(t/r))-1)*r+o-t,f=((u=Math.ceil(n/i))-1)*i+a-n,h=Math.floor(c/2),p=c-h,d=Math.floor(f/2);l={top:h,bottom:p,left:d,right:f-d,type:"SAME"}}else{if("valid"!==e)throw Error("Unknown padding parameter: "+e);l={top:0,bottom:0,left:0,right:0,type:"VALID"},s=Math.ceil((t-o+1)/r),u=Math.ceil((n-a+1)/i)}return{padInfo:l,outHeight:s,outWidth:u}}}]),e}();t.a=a},function(e,t,n){"use strict";function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var i=n(42),o=n.n(i),a=n(46),s=n.n(a),u=n(0),l=n.n(u),c=n(2),f=n.n(c),h=n(3),p=n.n(h),d=n(21),_=n.n(d),v=n(1),y=n.n(v),g=n(32),m=n(156),b=n(159),w=n(111),x=(n(81),n(281)),T=n(158),k="function"==typeof s.a&&"symbol"==typeof o.a?function(e){return typeof e}:function(e){return e&&"function"==typeof s.a&&e.constructor===s.a&&e!==s.a.prototype?"symbol":typeof e},R=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),l()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),C=function(e){return A.byteArrayToString(B.decode(e))},E=g.Rectangle,O=g.Constants,S=g.Engine,A=g.Utils,I=g.EventEmitter,F=g.Events,D=g.Vector2,M=g.Log,B=g.Base64,L=g.Color,P=O.RenderType,N=O.ImageFormat,U=O.RendererType,z=function(e){function t(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o=r(this,(t.__proto__||y()(t)).call(this));o._onOperationUpdate=o._onOperationUpdate.bind(o),o._onContextRestored=o._onContextRestored.bind(o);var a=n(160).version;if(o.version=a,o[C("VG04Z1lHRndhVXRsZVdBZ2IzQjBhVzl1SUdkcGRtVnU=")]=!0,o._preferredRenderer=e,o._options=A.defaults(i,{extensions:{},renderMode:"dynamic",versionCheck:!0,displayWelcomeMessage:!0,image:null,canvas:null,transparent:!1,clearColor:L.TRANSPARENT,textureQuality:1,zoom:1,spriteScale:1,rotation:0,smoothDownscaling:!1,smoothUpscaling:!1,crossOrigin:"anonymous",logLevel:"warn",pixelRatio:"undefined"!=typeof window&&window.devicePixelRatio||1}),o._options.smoothUpscaling&&(S.BaseTexture.DefaultMagFilter=S.BaseTexture.LinearFilter),o._options.extensions=A.defaults(o._options.extensions,{operations:[],controls:[],languages:[]}),M.setLevel(o._options.logLevel),o[C("Wm5KbFpVeHBZMlZ1YzAxdlpHVT0=")]=!1,o[C("X29wdGlvbnM=")][C("bGljZW5zZQ==")]){if(!o._v())return r(o);var s=g[C("TGljZW5zZUNoZWNrZXI=")];o._l=new s(o[C("X29wdGlvbnM=")][C("bGljZW5zZQ==")]),o._cv(!0).then(function(){o._ct()}).catch(function(e){M.error(C("TGljZW5zaW5n"),e.message)})}else o[C("Wm5KbFpVeHBZMlZ1YzAxdlpHVT0=")]=!0,o._l=new(g[C("RnJlZUxpY2Vuc2VDaGVja2Vy")]);o._defaultRenderMode=o._options.renderMode,o._renderMode=o._options.renderMode,o._textureQuality=o._options.textureQuality,o._offset=new D,o._zoom=o._options.zoom,o._spriteScale=o._options.spriteScale,o._rotation=o._options.rotation,o._operations={},o._operationsStack=null,o.setOperationsStack(new b.a),o._container=new S.Container,o._sprite=new S.Sprite,o._container.addChild(o._sprite),o._inputTexture=o._options.inputTexture,o._currentInputTexture=null,o._currentTexture=null,o._resizedTexture=null,o._resizedContainer=new S.Container,o._resizedSprite=new S.Sprite,o._resizedContainer.addChild(o._resizedSprite),o._texturesToDispose=[],o.setSmoothDownscaling(o._options.smoothDownscaling),o._registerOperations(),o._initRenderer();var u=o._renderer.constructor.type;return o._options.displayWelcomeMessage&&M.log("Version:",o.version+" ("+u+") - https://www.photoeditorsdk.com"),o[C("Wm5KbFpVeHBZMlZ1YzAxdlpHVT0=")]&&M.log(C("VGhlIFBob3RvRWRpdG9yIFNESyBpcyBhIGNvbW1lcmNpYWwgcHJvZHVjdC4gQmVmb3JlIGJlaW5nIGFibGUgdG8gdXNlIGl0IHdpdGhvdXQgbGltaXRhdGlvbnMsIHlvdSBuZWVkIHRvIHVubG9jayB0aGUgU0RLIHdpdGggYSBsaWNlbnNlIGZpbGUuIFlvdSBjYW4gb2J0YWluIGEgdGltZS1saW1pdGVkIGV2YWx1YXRpb24gbGljZW5zZSBieSBzdGFydGluZyBhIHRyaWFsIGF0IGh0dHBzOi8vd3d3LnBob3RvZWRpdG9yc2RrLmNvbS91c2Vycy9uZXcgb3IgeW91IGNhbiBwdXJjaGFzZSBhIGxpY2Vuc2UgYnkgcmVxdWVzdGluZyBhIHF1b3RlIGF0IGh0dHBzOi8vd3d3LnBob3RvZWRpdG9yc2RrLmNvbS9wcmljaW5nLgoKQmVjYXVzZSB5b3UgZGlkIG5vdCBzcGVjaWZ5IGEgbGljZW5zZSBmaWxlIHlldCwgdGhlIFNESyB3aWxsIG5vdyBkaXNwbGF5IGEgd2F0ZXJtYXJrIGltYWdlIG9uIHRvcCBvZiBhbnkgcGhvdG9zIHlvdSBkaXNwbGF5IG9yIGV4cG9ydCB3aXRoIGl0LiBGb3IgaW5zdHJ1Y3Rpb25zIGZvciBob3cgdG8gdW5sb2NrIHRoZSBTREssIHBsZWFzZSB2aXNpdCBodHRwczovL2RvY3MucGhvdG9lZGl0b3JzZGsuY29tL2d1aWRlcy9odG1sNS92NC9pbnRyb2R1Y3Rpb24vZ2V0dGluZ19zdGFydGVkLg==")),o._options.image&&o.setImage(o._options.image,o._options.exif),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=p()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(f.a?f()(e,t):e.__proto__=t)}(t,I),R(t,[{key:"_v",value:function(){return!!this[C("X29wdGlvbnM=")][C("bGljZW5zZQ==")]||(M.error(C("TGljZW5zaW5n"),C("Tm8gYGxpY2Vuc2VgIG9wdGlvbiBnaXZlbi4=")),M.error(C("TGljZW5zaW5n"),C("SW4gY2FzZSB5b3UgZG9uJ3QgaGF2ZSBhIGxpY2Vuc2UgeWV0LCBwbGVhc2UgY29udGFjdCBvdXIgc2FsZXMgc3RhZmYgYXQgc2FsZXNAcGhvdG9lZGl0b3JzZGsuY29tIHRvIG9idGFpbiBhIGxpY2Vuc2Ugb3IgbG9nIGluIHRvIHlvdXIgY3VzdG9tZXIgZGFzaGJvYXJkLg==")),!1)}},{key:"_ct",value:function(){this._l.exp()&&(this._l.isExp()?M.error(C("TGljZW5zaW5n"),C("WW91ciB0cmlhbCBsaWNlbnNlIGhhcyBleHBpcmVkLiBQbGVhc2UgY29udGFjdCB1cyBhdCBzYWxlc0BwaG90b2VkaXRvcnNkay5jb20gdG8gb2J0YWluIGEgbGljZW5zZS4=")):M.warn(C("TGljZW5zaW5n"),C("WW91ciB0cmlhbCBsaWNlbnNlIHdpbGwgZXhwaXJlIGluICVkIGRheXMu").replace("%d",this._l.dl())))}},{key:"_cv",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this._l.c().catch(function(n){e[C("VG04Z1lHRndhVXRsZVdBZ2IzQjBhVzl1SUdkcGRtVnU=")]=!1;var r=C("SW52YWxpZCBsaWNlbnNlLg==");throw t&&(r="ELICEXP"===n.code?C("WW91ciB0cmlhbCBsaWNlbnNlIGhhcyBleHBpcmVkLiBQbGVhc2UgY29udGFjdCB1cyBhdCBzYWxlc0BwaG90b2VkaXRvcnNkay5jb20gdG8gb2J0YWluIGEgbGljZW5zZS4="):"ELICINVHOST"===n.code?C("VGhpcyBsaWNlbnNlIGlzIG5vdCB2YWxpZCBmb3IgdGhlIGhvc3RuYW1lIA==")+window.location.hostname+".":"ELICINVPLAT"===n.code?C("VGhpcyBsaWNlbnNlIGlzIG5vdCB2YWxpZCBmb3IgdGhlIGN1cnJlbnQgcGxhdGZvcm0u"):"ELICINVFMT"===n.code?C("SW52YWxpZCBsaWNlbnNlIGZvcm1hdC4gUGxlYXNlIG1ha2Ugc3VyZSB5b3UncmUgcGFzc2luZyB5b3VyIGxpY2Vuc2UgYXMgYSBzdHJpbmcsIG5vdCBhcyBgJGZvcm1hdGAu").replace("$format",k(e._options.license)):C("ELICINV"===n.code?"SW52YWxpZCBsaWNlbnNlISBQbGVhc2UgY29udGFjdCBvdXIgc2FsZXMgc3RhZmYgYXQgc3VwcG9ydEBwaG90b2VkaXRvcnNkay5jb20gdG8gb2J0YWluIGEgbGljZW5zZSBvciBsb2cgaW4gdG8geW91ciBjdXN0b21lciBkYXNoYm9hcmQu":"SW4gY2FzZSB5b3UgZG9uJ3QgaGF2ZSBhIGxpY2Vuc2UgeWV0LCBwbGVhc2UgY29udGFjdCBvdXIgc2FsZXMgc3RhZmYgYXQgc2FsZXNAcGhvdG9lZGl0b3JzZGsuY29tIHRvIG9idGFpbiBhIGxpY2Vuc2Ugb3IgbG9nIGluIHRvIHlvdXIgY3VzdG9tZXIgZGFzaGJvYXJkLg==")),n.message=r,new Error(n)})}},{key:"_t",value:function(){this._l.t()}},{key:"_fl",value:function(){return this[C("Wm5KbFpVeHBZMlZ1YzAxdlpHVT0=")]}},{key:"_onOperationUpdate",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];this.emit.apply(this,[F.OPERATION_UPDATED].concat(t))}},{key:"_onContextRestored",value:function(){M.warn(this.constructor.name,"Trying to re-render after WebGL context has been restored."),this.setAllOperationsToDirty(),this._operationsStack.forEach(function(e){e.disposeRenderTextures()}),this.render()}},{key:"export",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:P.DATAURL,t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:N.PNG,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.8;return this._cv(!0).then(function(){return t.hasChanges()&&t._t(),t._operationsStack.forEach(function(e){e.onBeforeExport()}),new x.a(t,{renderType:e,imageFormat:n,quality:r}).export().then(function(e){return t._operationsStack.forEach(function(e){e.onAfterExport()}),_.a.resolve(e)})})}},{key:"render",value:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(!this._inputTexture)throw new Error("You need to set an image before calling PhotoEditorSDK#render.");var n=this._renderer.getContext();n.startFrame&&n.startFrame();var r=void 0;M.canLog("info")&&(r=new T.a("⚡⚡⚡","Frame rendering")),M.info("⚡⚡⚡","Rendering starts");var i=this._operationsStack;return i.updateDirtinessForRenderer(this._renderer),this._prepareTexture().then(function(t){"export"===e._renderMode&&(t=e._inputTexture),e._currentTexture=t,e._sprite.setTexture(t),e._container.updateTransform()}).then(function(){return i.validateSettings()}).then(function(){return!e._fl()&&e[C("VG04Z1lHRndhVXRsZVdBZ2IzQjBhVzl1SUdkcGRtVnU=")]||(i.getByIdentifier("license-watermark")?i.moveToTop("license-watermark"):e.createOperation("license-watermark")),i.render(e,e._currentTexture)}).then(function(n){var r=n.outputTexture;switch(e._currentTexture=r,e._sprite.setTexture(e._currentTexture),e._renderMode){case"dynamic":var i=e._renderer.getDimensions().clone().divide(2).add(e._offset);e._container.setScale(e._zoom/e.getTextureScale(),e._zoom/e.getTextureScale()),e._container.setPosition(i),e._sprite.setAnchor(.5,.5),e._sprite.setScale(e._spriteScale,e._spriteScale),e._sprite.setRotation(e._rotation);break;case"export":e._container.setScale(1,1),e._container.setPosition(0,0),e._sprite.setAnchor(0,0),e._sprite.setPosition(0,0),e._sprite.setScale(e._spriteScale,e._spriteScale),e._sprite.setRotation(0)}return t&&e._renderer.render(e._container),n}).then(function(t){return r&&r.stop(),n.endFrame&&n.endFrame(),e._disposeTextures(),t})}},{key:"getTextureScale",value:function(){return Math.min(1,this._textureQuality*this._options.pixelRatio)}},{key:"_prepareTexture",value:function(){var e=this;return new _.a(function(t,n){var r=e.getTextureScale();if(1===e._textureQuality)return t(e._inputTexture);var i=e.getInputDimensions().multiply(r).floor(),o=void 0;e._resizedTexture?e._resizedTexture.getDimensions().equals(i)||(e._resizedTexture.resizeTo(i),o=!0):(e._resizedTexture=new S.RenderTexture(e._renderer,i.x,i.y),o=!0),o&&(e._resizedSprite.setScale(r,r),e._resizedSprite.setTexture(e._inputTexture),e._resizedTexture.render(e._resizedContainer)),t(e._resizedTexture)})}},{key:"_registerOperations",value:function(){for(var e in this._operations={},m){var t=m[e];this._operations[t.identifier]=t}this._operations=A.extend(this._operations,this._options.extensions.operations)}},{key:"registerOperations",value:function(e){var t=this;e.forEach(function(e){t._operations[e.identifier]=e})}},{key:"setAllOperationsToDirty",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._operationsStack.setAllToDirty(e)}},{key:"createOperation",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=this._operations[e];if(!r)throw new Error("No operation with identifier `"+e+"` found.");var i=new r(this,t);return n&&this.addOperation(i),i}},{key:"addOperation",value:function(e){this._operationsStack.push(e)}},{key:"removeOperation",value:function(e){this._operationsStack.remove(e)}},{key:"getInputDimensions",value:function(){var e=this._inputTexture.getFrame();return new D(e.width,e.height)}},{key:"getFinalDimensions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.getInputDimensions();return this._operationsStack.forEach(function(e){e.getEnabled()&&(t=e.getNewDimensions(t))}),e&&t.multiply(this._spriteScale),t.floor()}},{key:"getOutputDimensions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.getFinalDimensions(e).clone().multiply(this._zoom).floor()}},{key:"getOutputTextureDimensions",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];var e=this.getTextureScale(),t=this.getInputDimensions().multiply(e).floor();return this._operationsStack.forEach(function(e){t=e.getNewDimensions(t)}),t}},{key:"getCrossOrigin",value:function(){return A.getCrossOrigin(this._options.crossOrigin||"Anonymous")}},{key:"_initRenderer",value:function(){var e={canvas:this._options.canvas,pixelRatio:this._options.pixelRatio,debug:this._options.debug,transparent:this._options.transparent,clearColor:this._options.clearColor},t=void 0,n=void 0;if("dynamic"===this._renderMode&&this._options.canvas){var r=this._options.canvas;t=r.width,n=r.height}else if(this._inputTexture){var i=this.getFinalDimensions();t=i.x,n=i.y}else t=1,n=1;switch(this._preferredRenderer){case U.WEBGL:this._renderer=S.autoDetectRenderer(t,n,e),this._renderer.on("context-restored",this._onContextRestored);break;case U.CANVAS:this._renderer=new S.CanvasRenderer(t,n,e),this._renderer.on("context-restored",this._onContextRestored);break;default:M.warn("PhotoEditorSDK","PhotoEditorSDK Error: Renderer `"+this._preferredRenderer+"` not supported. Falling back to automatically detected renderer."),this._renderer=S.autoDetectRenderer(t,n,e)}}},{key:"resizeTo",value:function(e){this._renderer.resizeTo(e,!0)}},{key:"reset",value:function(){this._operationsStack.clear()}},{key:"parseExif",value:function(e){if(e){var t=e.src,n=null;if(n=t,w.a.isJPEG(t)){var r=null;try{r=w.a.fromBase64String(n)}catch(e){}if(!r)return;return r}}}},{key:"_handleExifOrientation",value:function(){var e=this._exif.getTags();if(e&&e.Orientation){var t=1!==e.Orientation&&2!==e.Orientation,n=-1!==[2,4,5,7].indexOf(e.Orientation);(t||n)&&(this._exifOperation||(this._exifOperation=this.createOperation("exif-orientation")),this._exifOperation.setTags(e),this._exif.setOrientation(1))}}},{key:"hasImage",value:function(){return null!==this._image&&void 0!==this._image}},{key:"getImage",value:function(){return this._image}},{key:"disposeTexture",value:function(e){this._texturesToDispose.push(e)}},{key:"_disposeTextures",value:function(){for(var e=0;e<this._texturesToDispose.length;e++)this._texturesToDispose[e].dispose();this._texturesToDispose=[]}},{key:"setImage",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this._exifOperation&&(this.removeOperation(this._exifOperation),this._exifOperation=null),this._options.image=e,this._image=e,this._exif=t||this.parseExif(e),this._exif&&this._handleExifOrientation();var r=new S.BaseTexture(this._image),i=new E(0,0,this._image.naturalWidth||this._image.width,this._image.naturalHeight||this._image.height);n&&(i.width=n.x,i.height=n.y),this._resizedTexture&&this._resizedTexture.dispose(),this._resizedTexture=null,this._inputTexture&&this.disposeTexture(this._inputTexture.getBaseTexture()),this._inputTexture=new S.Texture(r,i),this._currentTexture=this._inputTexture,this._sprite.clearTexture(!1),this._sprite.setTexture(this._inputTexture),this.emit("new-image"),this.setAllOperationsToDirty(!0)}},{key:"setInputTexture",value:function(e){this._inputTexture=e}},{key:"getCanvas",value:function(){return this._renderer.getCanvas()}},{key:"setCanvas",value:function(e){this._renderer.setCanvas(e)}},{key:"getSprite",value:function(){return this._sprite}},{key:"getContainer",value:function(){return this._container}},{key:"getOperationsStack",value:function(){return this._operationsStack}},{key:"setOperationsStack",value:function(e){this._operationsStack&&this._operationsStack.off(F.OPERATION_UPDATED,this._onOperationUpdate),this._operationsStack=e,this._operationsStack.on(F.OPERATION_UPDATED,this._onOperationUpdate)}},{key:"getOperations",value:function(){return this._operations}},{key:"getRenderer",value:function(){return this._renderer}},{key:"getOffset",value:function(){return this._offset}},{key:"setOffset",value:function(e,t){e instanceof D?this._offset.copy(e):this._offset.set(e,t)}},{key:"getRenderMode",value:function(){return this._renderMode}},{key:"setRenderMode",value:function(e){this._renderMode=e}},{key:"getZoom",value:function(){return this._zoom}},{key:"setZoom",value:function(e){this._zoom=e,this._container.setScale(this._zoom,this._zoom),this._container.updateTransform()}},{key:"getTextureQuality",value:function(){return"export"===this._renderMode?1:this._textureQuality}},{key:"setTextureQuality",value:function(e){e!==this._textureQuality&&this.setAllOperationsToDirty(!0),this._textureQuality=Math.min(1,e),1===this._textureQuality&&this._resizedTexture&&(this._resizedTexture.dispose(),this._resizedTexture=null)}},{key:"getSpriteScale",value:function(){return this._spriteScale}},{key:"setSpriteScale",value:function(e){this._spriteScale=e,this._sprite.setScale(e,e),this._sprite.updateTransform()}},{key:"getPixelRatio",value:function(){return this._options.pixelRatio}},{key:"getExif",value:function(){return this._exif}},{key:"getOptions",value:function(){return this._options}},{key:"getInputTexture",value:function(){return this._inputTexture}},{key:"setSmoothDownscaling",value:function(e){this._options.smoothDownscaling=e,this._sprite.setSmoothDownscaling(e),this._resizedSprite.setSmoothDownscaling(e)}},{key:"setRotation",value:function(e){this._rotation=e}},{key:"getRotation",value:function(){return this._rotation}},{key:"hasChanges",value:function(){return this.getOperationsStack().hasChanges()}},{key:"dispose",value:function(){this._operationsStack.dispose(),this._renderer.dispose(),this._exif&&this._exif.dispose(),this._resizedTexture&&this._resizedTexture.dispose()}}]),t}();t.a=z},function(e,t,n){e.exports=!n(25)&&!n(35)(function(){return 7!=Object.defineProperty(n(88)("div"),"a",{get:function(){return 7}}).a})},function(e,t,n){e.exports=n(31)},function(e,t,n){var r=n(36),i=n(37),o=n(194)(!1),a=n(91)("IE_PROTO");e.exports=function(e,t){var n,s=i(e),u=0,l=[];for(n in s)n!=a&&r(s,n)&&l.push(n);for(;t.length>u;)r(s,n=t[u++])&&(~o(l,n)||l.push(n));return l}},function(e,t,n){var r=n(13).document;e.exports=r&&r.documentElement},function(e,t,n){var r=n(36),i=n(45),o=n(91)("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=i(e),r(e,o)?e[o]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){var r=n(55);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){var r=n(128),i=n(93).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},function(e,t,n){var r=n(24);e.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(t){var o=e.return;throw void 0!==o&&r(o.call(e)),t}}},function(e,t,n){var r=n(44),i=n(14)("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||o[i]===e)}},function(e,t,n){var r=n(24),i=n(52),o=n(14)("species");e.exports=function(e,t){var n,a=r(e).constructor;return void 0===a||void 0==(n=r(a)[o])?t:i(n)}},function(e,t){e.exports=function(e){try{return{e:!1,v:e()}}catch(e){return{e:!0,v:e}}}},function(e,t,n){var r=n(24),i=n(20),o=n(103);e.exports=function(e,t){if(r(e),i(t)&&t.constructor===e)return t;var n=o.f(e);return(0,n.resolve)(t),n.promise}},function(e,t,n){"use strict";var r=n(13),i=n(9),o=n(19),a=n(25),s=n(14)("species");e.exports=function(e){var t="function"==typeof i[e]?i[e]:r[e];a&&t&&!t[s]&&o.f(t,s,{configurable:!0,get:function(){return this}})}},function(e,t,n){var r=n(14)("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var o=[7],a=o[r]();a.next=function(){return{done:n=!0}},o[r]=function(){return a},e(o)}catch(e){}return n}},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function i(e){if(l===setTimeout)return setTimeout(e,0);if((l===n||!l)&&setTimeout)return l=setTimeout,setTimeout(e,0);try{return l(e,0)}catch(t){try{return l.call(null,e,0)}catch(t){return l.call(this,e,0)}}}function o(){d&&h&&(d=!1,h.length?p=h.concat(p):_=-1,p.length&&a())}function a(){if(!d){var e=i(o);d=!0;for(var t=p.length;t;){for(h=p,p=[];++_<t;)h&&h[_].run();_=-1,t=p.length}h=null,d=!1,function(e){if(c===clearTimeout)return clearTimeout(e);if((c===r||!c)&&clearTimeout)return c=clearTimeout,clearTimeout(e);try{c(e)}catch(t){try{return c.call(null,e)}catch(t){return c.call(this,e)}}}(e)}}function s(e,t){this.fun=e,this.array=t}function u(){}var l,c,f=e.exports={};!function(){try{l="function"==typeof setTimeout?setTimeout:n}catch(e){l=n}try{c="function"==typeof clearTimeout?clearTimeout:r}catch(e){c=r}}();var h,p=[],d=!1,_=-1;f.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];p.push(new s(e,t)),1!==p.length||d||i(a)},s.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=u,f.addListener=u,f.once=u,f.off=u,f.removeListener=u,f.removeAllListeners=u,f.emit=u,f.prependListener=u,f.prependOnceListener=u,f.listeners=function(e){return[]},f.binding=function(e){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(e){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(38),a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.reset()}return a(e,[{key:"multiply",value:function(e){var t,n,r,i,o,a;return t=this.a*e.a+this.b*e.c,n=this.a*e.b+this.b*e.d,r=this.c*e.a+this.d*e.c,i=this.c*e.b+this.d*e.d,o=this.tx*e.a+this.ty*e.c+e.tx,a=this.tx*e.b+this.ty*e.d+e.ty,this.a=t,this.b=n,this.c=r,this.d=i,this.tx=o,this.ty=a,this}},{key:"applyToVector",value:function(e){var t=e,n=t.x,r=t.y;return(e=e.clone()).x=this.a*n+this.c*r+this.tx,e.y=this.b*n+this.d*r+this.tx,e}},{key:"applyInverseToVector",value:function(e){var t=1/(this.a*this.d+this.c*-this.b),n=e,r=n.x,i=n.y;return(e=e.clone()).x=this.d*t*r+-this.c*t*i+(this.ty*this.c-this.tx*this.d)*t,e.y=this.a*t*i+-this.b*t*r+(-this.ty*this.a+this.tx*this.b)*t,e}},{key:"rectangleToCoordinates",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new o.a(0,0),n=e.width*(1-t.x),r=e.width*-t.x,i=e.height*(1-t.y),a=e.height*-t.y,s=[];return s.push(new o.a(this.a*r+this.c*a+this.tx,this.d*a+this.b*r+this.ty)),s.push(new o.a(this.a*n+this.c*a+this.tx,this.d*a+this.b*n+this.ty)),s.push(new o.a(this.a*n+this.c*i+this.tx,this.d*i+this.b*n+this.ty)),s.push(new o.a(this.a*r+this.c*i+this.tx,this.d*i+this.b*r+this.ty)),s}},{key:"reset",value:function(){this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0}},{key:"toArray",value:function(){var e=[this.a,this.b,0,this.c,this.d,0,this.tx,this.ty,1];return"undefined"==typeof Float32Array?e:new Float32Array(e)}},{key:"toString",value:function(){return"Matrix({ a: "+this.a+", b: "+this.b+", c: "+this.c+", d: "+this.d+", tx: "+this.tx+", ty: "+this.ty+" })"}}],[{key:"IDENTITY",get:function(){return new e}}]),e}();t.a=s},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(38),a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.x=t,this.y=n,this.width=r,this.height=i}return a(e,[{key:"set",value:function(e,t,n,r){return this.x=e,this.y=t,this.width=n,this.height=r,this}},{key:"clone",value:function(){return new e(this.x,this.y,this.width,this.height)}},{key:"copy",value:function(e){return this.x=e.x,this.y=e.y,this.width=e.width,this.height=e.height,this}},{key:"equals",value:function(t,n,r,i){return t instanceof e?t.x===this.x&&t.y===this.y&&t.width===this.width&&t.height===this.height:t===this.x&&n===this.y&&r===this.width&&i===this.height}},{key:"translate",value:function(e,t){return e instanceof o.a&&(t=e.y,e=e.x),this.x+=e,this.y+=t,this}},{key:"scale",value:function(e,t){return e instanceof o.a?(t=e.y,e=e.x):void 0===t&&(t=e),this.width*=e,this.height*=t,this}},{key:"round",value:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.width=Math.round(this.width),this.height=Math.round(this.height),this}},{key:"getPosition",value:function(){return new o.a(this.x,this.y)}},{key:"getSize",value:function(){return new o.a(this.width,this.height)}},{key:"insetBy",value:function(e,t){return this.x+=e,this.y+=t,this.width-=2*e,this.height-=2*t,this}},{key:"intersects",value:function(e){var t=new o.a(this.x,this.y),n=new o.a(this.x+this.width,this.y+this.height),r=new o.a(e.x,e.y),i=new o.a(e.x+e.width,e.y+e.height);return!(r.x>n.x||t.x>i.x||i.y<t.y||n.y<r.y)}},{key:"toString",value:function(){return"Rectangle({ x: "+this.x+", y: "+this.y+", width: "+this.width+", height: "+this.height+" })"}}],[{key:"FromDiagonalPoints",value:function(t,n){var r=!1;n.x-t.x<0&&(r=!0);var i=r?n:t,o=r?t:n,a=o.x-i.x,s=o.y-i.y;return new e(i.x,i.y,a,s)}}]),e}();t.a=s},function(e,t,n){"use strict";function r(e,t,n){return t in e?o()(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var i=n(0),o=n.n(i),a=n(33),s=n(236);n.n(s),t.a={checkFramebufferStatus:function(e,t){var n,i=t.checkFramebufferStatus(t.FRAMEBUFFER),o=(r(n={},t.FRAMEBUFFER_INCOMPLETE_ATTACHMENT,"Incomplete attachment"),r(n,t.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT,"Missing attachment"),r(n,t.FRAMEBUFFER_INCOMPLETE_DIMENSIONS,"Incomplete dimensions"),r(n,t.FRAMEBUFFER_UNSUPPORTED,"Framebuffer unsupported"),n);i!==t.FRAMEBUFFER_COMPLETE&&a.a.warn(e,"Framebuffer incomplete: "+o[i])},determineGPUName:function(e){var t=null,n=null;e||(e=(n=document.createElement("canvas")).getContext("experimental-webgl")||n.getContext("webgl"));var r=e&&e.getExtension("WEBGL_debug_renderer_info");return r&&(t=e.getParameter(r.UNMASKED_RENDERER_WEBGL),n&&n.remove()),t},isGPUBlacklisted:function(e){return arguments.length>1&&void 0!==arguments[1]&&arguments[1],!1}}},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(10),a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s="undefined"!=typeof window&&window.performance&&window.performance.now?window.performance.now.bind(window.performance):n(146),u=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._context=t,this._tracking=!1;var r=this;for(var i in t)!function(e){"function"==typeof t[e]?n[e]=function(){for(var n=arguments.length,i=Array(n),o=0;o<n;o++)i[o]=arguments[o];var a=t[e];if(!r._tracking)return a.apply(t,i);var u=s(),l=a.apply(t,i),c=s()-u,f={functionName:e,arguments:i,duration:c};return r._trackedCalls.push(f),l}:n._makePropertyWrapper(e)}(i)}return a(e,[{key:"_makePropertyWrapper",value:function(e){if(-1===["_context","_trackedCalls","_tracking"].indexOf(e)){var t=this._context;this.__defineGetter__(e,function(){return t[e]}),this.__defineSetter__(e,function(n){t[e]=n})}}},{key:"startFrame",value:function(){this._tracking=!0,this._trackedCalls=[]}},{key:"endFrame",value:function(){var e="Rendering";o.f.log(e,"Frame rendering results:"),o.f.log(e,"Context calls: "+this._trackedCalls.length);var t={};this._trackedCalls.forEach(function(e){var n=e.functionName,r=e.duration;t[n]=t[n]||{totalDuration:0,calls:0},t[n].totalDuration+=r,t[n].calls++});var n=[];for(var r in t){var i=t[r];i.averageDuration=i.totalDuration/i.calls,n.push({functionName:r,data:i})}n.sort(function(e,t){return t.data.totalDuration-e.data.totalDuration}),(n=n.slice(0,3)).forEach(function(t){o.f.log(e,t.functionName+": "+t.data.calls+" calls, "+t.data.totalDuration.toFixed(2)+"ms")})}}]),e}();t.a=u},function(e,t,n){(function(t){(function(){var n,r,i;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:void 0!==t&&null!==t&&t.hrtime?(e.exports=function(){return(n()-i)/1e6},r=t.hrtime,i=(n=function(){var e;return 1e9*(e=r())[0]+e[1]})()):Date.now?(e.exports=function(){return Date.now()-i},i=Date.now()):(e.exports=function(){return(new Date).getTime()-i},i=(new Date).getTime())}).call(this)}).call(t,n(141))},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(2),a=n.n(o),s=n(3),u=n.n(s),l=n(1),c=n.n(l),f=n(10),h=n(238),p=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),d=function(e){function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||c()(t)).call(this));return i._options=h.a.defaults(r,{pixelRatio:1,transparent:!1,clearColor:f.b.BLACK,debug:!1}),i.setMaxListeners(0),i._width=e||800,i._height=n||600,i._dimensions=new f.k(i._width,i._height),i._maxTextureSize=null,i._pixelRatio=i._options.pixelRatio,i._clearColor=i._options.transparent?f.b.TRANSPARENT:i._options.clearColor||f.b.BLACK,i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=u()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(a.a?a()(e,t):e.__proto__=t)}(t,f.d),p(t,[{key:"setCanvas",value:function(e){var t=this._canvas;this._canvas=e,t!==e&&(this._createContext(),this._onBeforeContext(),this._setupContext()),this.resizeTo(new f.k(this._width,this._height))}},{key:"getCanvas",value:function(){return this._canvas}},{key:"_onBeforeContext",value:function(){}},{key:"resizeTo",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this._width=e.x*this._pixelRatio,this._height=e.y*this._pixelRatio,t&&(this._canvas.width=this._width,this._canvas.height=this._height,this._canvas.style&&(this._canvas.style.width=this._width/this._pixelRatio+"px",this._canvas.style.height=this._height/this._pixelRatio+"px")),this._dimensions=e.clone()}},{key:"_createContext",value:function(){f.f.warn(this.constructor.name,"`_createContext` is abstract and not implemented in inherited class")}},{key:"_setupContext",value:function(){f.f.warn(this.constructor.name,"`_setupContext` is abstract and not implemented in inherited class")}},{key:"render",value:function(e){f.f.warn(this.constructor.name,"`render` is abstract and not implemented in inherited class")}},{key:"getMaxDimensions",value:function(){return null}},{key:"getContext",value:function(){return this._context}},{key:"getWidth",value:function(){return this._dimensions.x}},{key:"getHeight",value:function(){return this._dimensions.y}},{key:"getDimensions",value:function(){return this._dimensions}},{key:"getPixelRatio",value:function(){return this._pixelRatio}},{key:"setPixelRatio",value:function(e){this._pixelRatio=e,this._defaultRenderTarget&&this._defaultRenderTarget.setPixelRatio(e)}},{key:"getMaxTextureSize",value:function(){return this._maxTextureSize}},{key:"getFilterManager",value:function(){return this._filterManager}},{key:"setFilterManager",value:function(e){this._filterManager=e}},{key:"isOfType",value:function(e){return this._type===e}},{key:"dispose",value:function(){f.f.warn(this.constructor.name,"`dispose` is abstract and not implemented in inherited class")}}],[{key:"isSupported",value:function(){return!0}}]),t}();t.a=d},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._renderer=t,this._onContextChange=this._onContextChange.bind(this),this._renderer.on("context",this._onContextChange)}return o(e,[{key:"_onContextChange",value:function(){}},{key:"start",value:function(){}},{key:"stop",value:function(){this.flush()}},{key:"flush",value:function(){}},{key:"dispose",value:function(){this._renderer.off("context",this._onContextChange),this._renderer=null}}]),e}();t.a=a},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._renderer=t,this._context=this._renderer.getContext(),this._vertices=new Float32Array([0,0,100,0,100,100,0,100]),this._uvs=new Float32Array([0,0,1,0,1,1,0,1]),this._indices=new Uint16Array([0,1,2,0,3,2]),this._colors=new Float32Array([1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]),this._initBuffers(),this._uploadBuffers()}return o(e,[{key:"map",value:function(e,t){var n=t.x,r=t.y;this._uvs[2]=t.width/e.width,this._uvs[4]=this._uvs[2],this._uvs[5]=t.height/e.height,this._uvs[7]=this._uvs[5],this._vertices[0]=n,this._vertices[1]=r,this._vertices[2]=n+t.width,this._vertices[3]=r,this._vertices[4]=this._vertices[2],this._vertices[5]=r+t.height,this._vertices[6]=n,this._vertices[7]=this._vertices[5],this._uploadBuffers()}},{key:"_initBuffers",value:function(){var e=this._context;this._vertexBuffer=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,this._vertexBuffer),e.bufferData(e.ARRAY_BUFFER,128,e.DYNAMIC_DRAW),this._indexBuffer=e.createBuffer(),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,this._indexBuffer),e.bufferData(e.ELEMENT_ARRAY_BUFFER,this._indices,e.STATIC_DRAW)}},{key:"_uploadBuffers",value:function(){var e=this._context;e.bindBuffer(e.ARRAY_BUFFER,this._vertexBuffer),e.bufferSubData(e.ARRAY_BUFFER,0,this._vertices),e.bufferSubData(e.ARRAY_BUFFER,32,this._uvs),e.bufferSubData(e.ARRAY_BUFFER,64,this._colors)}},{key:"getVertexBuffer",value:function(){return this._vertexBuffer}},{key:"getIndexBuffer",value:function(){return this._indexBuffer}},{key:"dispose",value:function(){var e=this._context;e.deleteBuffer(this._vertexBuffer),e.deleteBuffer(this._indexBuffer)}}]),e}();t.a=a},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.width=t,this.height=n,this.data=r}return o(e,null,[{key:"fromNodeCanvasImage",value:function(t){var n=new Canvas(t.width,t.height).getContext("2d");n.drawImage(t,0,0);var r=n.getImageData(0,0,t.width,t.height);return new e(t.width,t.height,r.data)}}]),e}();t.a=a},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(5),a=n.n(o),s=n(2),u=n.n(s),l=n(3),c=n.n(l),f=n(1),h=n.n(f),p=n(10),d=n(109),_=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),v=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||h()(t)).call.apply(e,[this].concat(r)));return o._children=[],o._filters=[],o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=c()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(u.a?u()(e,t):e.__proto__=t)}(t,d.a),_(t,[{key:"addFilter",value:function(e){this._filters.push(e)}},{key:"removeFilter",value:function(e){var t=this._filters.indexOf(e);return-1!==t&&(this._filters.splice(t,1),!0)}},{key:"setFilters",value:function(e){this._filters=e}},{key:"addChild",value:function(e){var t=e.getParent();null!==t&&t.removeChild(e),e.setParent(this),this._children.push(e)}},{key:"prependChild",value:function(e){var t=e.getParent();null!==t&&t.removeChild(e),e.setParent(this),this._children.unshift(e)}},{key:"hasChild",value:function(e){return-1!==this._children.indexOf(e)}},{key:"removeChild",value:function(e){var t=this._children.indexOf(e);-1!==t?(this._children.splice(t,1),e.setParent(null)):p.f.info(this.constructor.name,"Tried to remove a child that does not exist")}},{key:"clearChildren",value:function(){this._children=[]}},{key:"renderWebGL",value:function(e){if(this._visible){var t=e.getFilterManager();this._filters&&this._filters.length&&t.pushFilters(this,this._filters),e.getCurrentObjectRenderer().start(),this._renderWebGL(e),this._children.forEach(function(t){t.renderWebGL(e)}),e.getCurrentObjectRenderer().flush(),this._filters&&this._filters.length&&t.popFilters(),e.getCurrentObjectRenderer().start()}}},{key:"_renderWebGL",value:function(e){}},{key:"renderCanvas",value:function(e){if(this._visible){var t=e.getFilterManager();this._filters&&this._filters.length&&t.pushFilters(this,this._filters),this._renderCanvas(e),this._children.forEach(function(t){t.renderCanvas(e)}),this._filters&&this._filters.length&&t.popFilters()}}},{key:"_renderCanvas",value:function(e){}},{key:"updateTransform",value:function(){(function e(t,n,r){null===t&&(t=Function.prototype);var i=a()(t,n);if(void 0===i){var o=h()(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0})(t.prototype.__proto__||h()(t.prototype),"updateTransform",this).call(this),this._children.forEach(function(e){e.updateTransform()})}},{key:"getLocalBounds",value:function(){return this._localBoundsNeedUpdate&&(this._localBoundsNeedUpdate=!1),this._localBounds.clone()}},{key:"getBounds",value:function(){return this._boundsNeedUpdate&&(this._boundsNeedUpdate=!1),this._bounds.clone()}},{key:"getChildren",value:function(){return this._children}},{key:"getFilters",value:function(){return this._filters}},{key:"dispose",value:function(){}}]),t}();t.a=v},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(2),a=n.n(o),s=n(3),u=n.n(s),l=n(1),c=n.n(l),f=n(10),h=n(63),p=n(245),d=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),_=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||c()(t)).call(this));if(!(e instanceof h.a))throw new Error("`baseTexture` should be an instance of BaseTexture");return r._uvs=new p.a,r._frame=n?n.clone():null,r._frameLocked=!!n,r._onBaseTextureLoaded=r._onBaseTextureLoaded.bind(r),r._onBaseTextureUpdated=r._onBaseTextureUpdated.bind(r),r._frame||(r._frame=new f.h(0,0,1,1)),r.setBaseTexture(e),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=u()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(a.a?a()(e,t):e.__proto__=t)}(t,f.d),d(t,[{key:"_onBaseTextureLoaded",value:function(){if(!this._frameLocked){var e=this._baseTexture.getFrame().clone();this.setFrame(e)}this._baseTexture.on("update",this._onBaseTextureUpdated)}},{key:"_onBaseTextureUpdated",value:function(){var e=this._baseTexture.getFrame(),t=e.width,n=e.height;this._frame.width=t,this._frame.height=n,this.emit("update")}},{key:"_updateUVs",value:function(){this._uvs.update(this._frame,this._baseTexture.getFrame())}},{key:"getBaseTexture",value:function(){return this._baseTexture}},{key:"setBaseTexture",value:function(e){if(this._baseTexture=e,this._baseTexture.isLoaded()){var t=e.getFrame(),n=t.width,r=t.height;this._frameLocked||(this._frame=new f.h(0,0,n,r)),this._onBaseTextureLoaded()}else this._baseTexture.once("loaded",this._onBaseTextureLoaded)}},{key:"getFrame",value:function(){return this._frame}},{key:"setFrame",value:function(e){this._frame=e,this._updateUVs()}},{key:"getWidth",value:function(){return this._frame.width}},{key:"getHeight",value:function(){return this._frame.height}},{key:"getUVs",value:function(){return this._uvs}},{key:"getDimensions",value:function(){return new f.k(this._frame.width,this._frame.height)}},{key:"dispose",value:function(){(!(arguments.length>0&&void 0!==arguments[0])||arguments[0])&&this._baseTexture.dispose()}}],[{key:"fromImage",value:function(e){return new t(new h.a(e))}},{key:"fromCanvas",value:function(e){return new t(new h.a(e))}}]),t}();t.a=_},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(61),a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1,u=arguments.length>7&&void 0!==arguments[7]?arguments[7]:0,l=arguments.length>8&&void 0!==arguments[8]?arguments[8]:0,c=arguments.length>9&&void 0!==arguments[9]?arguments[9]:0,f=arguments.length>10&&void 0!==arguments[10]?arguments[10]:0,h=arguments.length>11&&void 0!==arguments[11]?arguments[11]:0,p=arguments.length>12&&void 0!==arguments[12]?arguments[12]:1,d=arguments.length>13&&void 0!==arguments[13]?arguments[13]:0,_=arguments.length>14&&void 0!==arguments[14]?arguments[14]:0,v=arguments.length>15&&void 0!==arguments[15]?arguments[15]:0,y=arguments.length>16&&void 0!==arguments[16]?arguments[16]:0,g=arguments.length>17&&void 0!==arguments[17]?arguments[17]:0,m=arguments.length>18&&void 0!==arguments[18]?arguments[18]:1,b=arguments.length>19&&void 0!==arguments[19]?arguments[19]:0;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.set(t,n,r,i,o,a,s,u,l,c,f,h,p,d,_,v,y,g,m,b)}return a(e,[{key:"set",value:function(e,t,n,r,i,o,a,s,u,l,c,f,h,p,d,_,v,y,g,m){this.a=e,this.b=t,this.c=n,this.d=r,this.e=i,this.f=o,this.g=a,this.h=s,this.i=u,this.j=l,this.k=c,this.l=f,this.m=h,this.n=p,this.o=d,this.p=_,this.q=v,this.r=y,this.s=g,this.t=m}},{key:"reset",value:function(){this.a=1,this.b=0,this.c=0,this.d=0,this.e=0,this.f=0,this.g=1,this.h=0,this.i=0,this.j=0,this.k=0,this.l=0,this.m=1,this.n=0,this.o=0,this.p=0,this.q=0,this.r=0,this.s=1,this.t=0}},{key:"apply",value:function(e){var t=this.a*e.r+this.b*e.g+this.c*e.b+this.d*e.a+this.e,n=this.f*e.r+this.g*e.g+this.h*e.b+this.i*e.a+this.j,r=this.k*e.r+this.l*e.g+this.m*e.b+this.n*e.a+this.o,i=this.p*e.r+this.q*e.g+this.r*e.b+this.s*e.a+this.t;return new o.a(t,n,r,i)}},{key:"multiply",value:function(e){var t,n,r,i,o,a,s,u,l,c,f,h,p,d,_,v,y,g,m,b,w=e,x=this;return t=w.a*x.a+w.b*x.f+w.c*x.k+w.d*x.p,n=w.a*x.b+w.b*x.g+w.c*x.l+w.d*x.q,r=w.a*x.c+w.b*x.h+w.c*x.m+w.d*x.r,i=w.a*x.d+w.b*x.i+w.c*x.n+w.d*x.s,a=w.f*x.a+w.g*x.f+w.h*x.k+w.i*x.p,s=w.f*x.b+w.g*x.g+w.h*x.l+w.i*x.q,u=w.f*x.c+w.g*x.h+w.h*x.m+w.i*x.r,l=w.f*x.d+w.g*x.i+w.h*x.n+w.i*x.s,f=w.k*x.a+w.l*x.f+w.m*x.k+w.n*x.p,h=w.k*x.b+w.l*x.g+w.m*x.l+w.n*x.q,p=w.k*x.c+w.l*x.h+w.m*x.m+w.n*x.r,d=w.k*x.d+w.l*x.i+w.m*x.n+w.n*x.s,v=w.p*x.a+w.q*x.f+w.r*x.k+w.s*x.p,y=w.p*x.b+w.q*x.g+w.r*x.l+w.s*x.q,g=w.p*x.c+w.q*x.h+w.r*x.m+w.s*x.r,m=w.p*x.d+w.q*x.i+w.r*x.n+w.s*x.s,o=w.a*x.e+w.b*x.j+w.c*x.o+w.d*x.t+w.e,c=w.f*x.e+w.g*x.j+w.h*x.o+w.i*x.t+w.j,_=w.k*x.e+w.l*x.j+w.m*x.o+w.n*x.t+w.o,b=w.p*x.e+w.q*x.j+w.r*x.o+w.s*x.t+w.t,this.a=t,this.b=n,this.c=r,this.d=i,this.e=o,this.f=a,this.g=s,this.h=u,this.i=l,this.j=c,this.k=f,this.l=h,this.m=p,this.n=d,this.o=_,this.p=v,this.q=y,this.r=g,this.s=m,this.t=b,this}},{key:"clone",value:function(){var t=new e;return t.set(this.a,this.b,this.c,this.d,this.e,this.f,this.g,this.h,this.i,this.j,this.k,this.l,this.m,this.n,this.o,this.p,this.q,this.r,this.s,this.t),t}},{key:"equals",value:function(e){return this.a===e.a&&this.b===e.b&&this.c===e.c&&this.d===e.d&&this.e===e.e&&this.f===e.f&&this.g===e.g&&this.h===e.h&&this.i===e.i&&this.j===e.j&&this.k===e.k&&this.l===e.l&&this.m===e.m&&this.n===e.n&&this.o===e.o&&this.p===e.p&&this.q===e.q&&this.r===e.r&&this.s===e.s&&this.t===e.t}},{key:"getOffsets",value:function(){return[this.e,this.j,this.o,this.t]}},{key:"toString",value:function(){return"ColorMatrix( "+this.a+", "+this.b+", "+this.c+", "+this.d+", "+this.e+",\n "+this.f+", "+this.g+", "+this.h+", "+this.i+", "+this.j+",\n "+this.k+", "+this.l+", "+this.m+", "+this.n+", "+this.o+",\n "+this.p+", "+this.q+", "+this.r+", "+this.s+", "+this.t+" )"}},{key:"toArray",value:function(){var e=this;return"abcdefghijklmnopqrst".split("").map(function(t){return e[t]})}}],[{key:"createBrightnessMatrix",value:function(t){var n=new e;return n.e=t,n.j=t,n.o=t,n}},{key:"createContrastMatrix",value:function(t){var n=new e,r=(1-t)/2;return n.a=n.g=n.m=t,n.e=n.j=n.o=r,n}},{key:"createSaturationMatrix",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,n=new e,r=1-t,i=.213*r,o=.715*r,a=.072*r;return n.a=i+t,n.b=o,n.c=a,n.f=i,n.g=o+t,n.h=a,n.k=i,n.l=o,n.m=a+t,n}},{key:"createExposureMatrix",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=Math.pow(2,t);return new e(n,0,0,0,0,0,n,0,0,0,0,0,n,0,0,0,0,0,1,0)}},{key:"createLinearMatrix",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=new e;return r.a=r.g=r.m=t,r.e=r.j=r.o=n,r}},{key:"IDENTITY",get:function(){return new e}}]),e}();t.a=s},function(e,t,n){"use strict";(function(e){var r=n(0),i=n.n(r),o=n(39),a=n(266),s=n.n(a),u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l="undefined"!=typeof window?window:e,c=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._url=t,this._parsedUrl=s.a.parse(this._url,!0)}return u(e,[{key:"_isJSONPRequest",value:function(){var e=this._parsedUrl.query;for(var t in e)if("?"===e[t])return!0;return!1}},{key:"load",value:function(){return this._isJSONPRequest()?this._loadJSONP():this._loadJSON()}},{key:"_loadJSON",value:function(){var e=this;return new o.a(function(t,n){var r=void 0;l.XDomainRequest?((r=new l.XDomainRequest).onload=function(){var e=JSON.parse(r.responseText);t(e)},r.onerror=function(e){n(e)},r.open("GET",e._url,!0),r.send()):l.XMLHttpRequest&&((r=new XMLHttpRequest).onreadystatechange=function(e){if(4===r.readyState)if(200===r.status){var i=JSON.parse(r.responseText);t(i)}else n(new Error("HTTP Status "+r.status))},r.open("GET",e._url,!0),r.send())})}},{key:"_loadJSONP",value:function(){var e=this,t=!1,n=!1,r="pesdk"+Math.round(99999999999999*Math.random());return new o.a(function(i,o){var a=e._createJSONPNode(r);l[r]=function(r){e._removeJSONPNode(a),t||(n=!0,i(r))},l.setTimeout(function(){n||(e._removeJSONPNode(a),t=!0,o(new Error("Timeout of 5 seconds exceeded.")))},5e3)})}},{key:"_createJSONPNode",value:function(e){var t=this._buildJSONPUrl(e),n=document.querySelector("head"),r=document.createElement("script");return r.src=t,n.appendChild(r),r}},{key:"_removeJSONPNode",value:function(e){e.parentNode.removeChild(e)}},{key:"_buildJSONPUrl",value:function(e){var t=this._parsedUrl.query,n=null;for(var r in t)if("?"===t[r]){n=r;break}return delete this._parsedUrl.search,t[n]=e,s.a.format(this._parsedUrl)}}]),e}();t.a=c}).call(t,n(59))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(38),i=n(275),o=n(276),a=n(143),s=n(142),u=n(153),l=n(277);n.d(t,"Vector2",function(){return r.a}),n.d(t,"Vector3",function(){return i.a}),n.d(t,"Range",function(){return o.a}),n.d(t,"Rectangle",function(){return a.a}),n.d(t,"Matrix",function(){return s.a}),n.d(t,"ColorMatrix",function(){return u.a}),n.d(t,"CubicBezierCurve",function(){return l.a})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(278);n.d(t,"ExifOrientationOperation",function(){return r.a})},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(2),a=n.n(o),s=n(3),u=n.n(s),l=n(1),c=n.n(l),f=n(34),h=n(39),p=n(33),d=n(78),_=n(65),v=n(158),y=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),g=function(e){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||c()(t)).call(this,n,{enabled:{type:f.OptionType.BOOLEAN,default:!0,serializable:!1}}));return r._sdk=e,r._cacheEnabled=!1,r._dirtiness={},r._sprite=new d.a.Sprite,r._container=new d.a.Container,r._container.addChild(r._sprite),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=u()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(a.a?a()(e,t):e.__proto__=t)}(t,_.a),y(t,[{key:"_onOptionsChange",value:function(){this.setDirty(!0)}},{key:"render",value:function(e){var t=this;if(!this.getEnabled())return p.a.info(this.constructor.name,"Disabled - skipping"),h.a.resolve(e);if(!this._renderTexture){var n=this._sdk.getSprite().getTexture().getFrame();this._renderTexture=new d.a.RenderTexture(this._sdk.getRenderer(),n.width,n.height)}var r=this._sdk.getRenderer(),i=void 0,o=void 0;if(p.a.canLog("info")&&(o=new v.a(this.constructor.name,"Rendering")),this.isDirtyForRenderer(r)){this._sprite.setTexture(e);var a=this.getNewDimensions(e.getDimensions()).floor();this._renderTexture.resizeTo(a),this._renderTexture.clear(),i=this._render(e).then(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return t.setDirtyForRenderer(e,r),t._renderTexture})}else p.a.info(this.constructor.name,"Rendering from cache"),i=h.a.resolve(this._renderTexture);return i.then(function(e){return o&&o.stop(),e})}},{key:"_render",value:function(e){return(this._sdk.getRenderer().isOfType(f.RendererType.WEBGL)?this._renderWebGL.bind(this):this._renderCanvas.bind(this))(e)}},{key:"_renderWebGL",value:function(e){throw new Error("Operation#_renderWebGL is abstract and not implemented in inherited class.")}},{key:"_renderCanvas",value:function(e){throw new Error("Operation#_renderCanvas is abstract and not implemented in inherited class.")}},{key:"getNewDimensions",value:function(e){return e.clone()}},{key:"onBeforeExport",value:function(){this.transform&&this._tempTransformChange&&this.transform(this._tempTransformChange),this._onBeforeExport()}},{key:"onAfterExport",value:function(){this.transform&&this._tempInverseTransformChange&&this.transform(this._tempInverseTransformChange),this._onAfterExport()}},{key:"_onBeforeExport",value:function(){}},{key:"_onAfterExport",value:function(){}},{key:"setTemporaryTransformChange",value:function(e,t){this._tempTransformChange=e,this._tempInverseTransformChange=t}},{key:"reset",value:function(){this._dirty=!0,this._glslPrograms={}}},{key:"isDirtyForRenderer",value:function(e){var t=this._dirtiness[e.id];return void 0===t||t}},{key:"setDirtyForRenderer",value:function(e,t){arguments.length>2&&void 0!==arguments[2]&&arguments[2],this._dirtiness[t.id]=e}},{key:"setDirty",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];for(var n in this._dirtiness)this.setDirtyForRenderer(e,{id:n},t)}},{key:"getSDK",value:function(){return this._sdk}},{key:"getInputDimensions",value:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=this._sdk.getInputDimensions();t&&n.multiply(this._sdk.getZoom()).floor();var r=void 0;return this._sdk.getOperationsStack().forEach(function(t){r||(t!==e?n=t.getNewDimensions(n):r=!0)}),n.floor()}},{key:"clone",value:function(){return new(0,this.constructor)(this._sdk,this.serializeOptions())}},{key:"disposeRenderTextures",value:function(){this._renderTexture&&this._renderTexture.dispose(),this._renderTexture=null}},{key:"dispose",value:function(){this.disposeRenderTextures(),this._sprite.dispose()}}]),t}();g.identifier=null,t.a=g},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(32),a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s="undefined"!=typeof window&&window.performance&&window.performance.now?window.performance.now.bind(window.performance):n(146),u=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._tag=t,this._name=n,this._start=s()}return a(e,[{key:"stop",value:function(){var e=s()-this._start,t=Math.round(1e3/e);o.Log.info(this._tag,this._name+" took "+e.toFixed(2)+"ms ("+t+" FPS)")}}]),e}();t.a=u},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(2),a=n.n(o),s=n(3),u=n.n(s),l=n(1),c=n.n(l),f=n(32),h=n(39),p=n(62),d=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),_=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||c()(t)).call(this));return n._onOperationUpdate=n._onOperationUpdate.bind(n),n._cacheEnabled=!0,n._stack=e,n._stack.forEach(function(e){e.on("update",n._onOperationUpdate)}),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=u()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(a.a?a()(e,t):e.__proto__=t)}(t,p.a),d(t,[{key:"clear",value:function(){var e=this;this.forEach(function(t){return e.remove(t)}),this._stack=[]}},{key:"hasChanges",value:function(){return this._stack.filter(function(e){return!!e}).some(function(e){return e.hasChanges()})}},{key:"_onOperationUpdate",value:function(e,t){this.emit(f.Events.OPERATION_UPDATED,e,t)}},{key:"enableCache",value:function(){this._cacheEnabled=!0}},{key:"disableCache",value:function(){this._cacheEnabled=!1}},{key:"forEach",value:function(e){return this._stack.filter(function(e){return!!e}).forEach(e)}},{key:"render",value:function(e,t){var n=this,r=t,i=this._stack.filter(function(e){return!!e}).filter(function(e){return e.getEnabled()});i.reverse();var o=i.filter(function(t){return!t.isDirtyForRenderer(e.getRenderer())})[0],a=i.indexOf(o);i.reverse();var s=0;-1!==a&&(s=i.length-a-1);for(var u=0;u<s;u++)f.Log.info(this.constructor.name,"Skipping "+i[u].constructor.name);for(var l=h.a.resolve(r),c=s;c<i.length;c++)!function(e){var t=i[e],r=void 0,o=void 0;l=l.then(function(e){return t.render(e).then(function(e){return r&&e!==r&&!n._cacheEnabled&&o.disposeRenderTextures(),r=e,o=t,e})})}(c);return l.then(function(t){return{outputTexture:t,renderDone:!i.some(function(t){return t.isDirtyForRenderer(e.getRenderer())})}})}},{key:"validateSettings",value:function(){return h.a.all(this._stack.filter(function(e){return!!e}).map(function(e){return e.validateSettings()}))}},{key:"setAllToDirty",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.forEach(function(t){return t.setDirty(!0,e)})}},{key:"updateDirtinessForRenderer",value:function(e){for(var t=!1,n=0;n<this._stack.length;n++){var r=this._stack[n];r&&(r.isDirtyForRenderer(e)&&(t=!0),t&&r.setDirtyForRenderer(!0,e))}}},{key:"push",value:function(e){this._stack.push(e),e.on("update",this._onOperationUpdate)}},{key:"pop",value:function(){var e=this._stack.pop();e&&(e.off("update",this._onOperationUpdate),e.dispose())}},{key:"unshift",value:function(e){this._stack.unshift(e),e.on("update",this._onOperationUpdate)}},{key:"clone",value:function(){return new t(this._stack.slice(0))}},{key:"get",value:function(e){return this._stack[e]}},{key:"getByIdentifier",value:function(e){return f.Utils.Array.find(this._stack,function(t){return t&&t.constructor.identifier===e})}},{key:"getIndexByIdentifier",value:function(e){return f.Utils.Array.findIndex(this._stack,function(t){return t&&t.constructor.identifier===e})}},{key:"moveToTop",value:function(e){var t=f.Utils.Array.findIndex(this._stack,function(t){return t&&t.constructor.identifier===e});if(!(t<0||t===this._stack.length-1)){var n=this.getByIdentifier(e);this._stack.splice(t,1),this._stack[this._stack.length]=n}}},{key:"set",value:function(e,t){this._stack[e]&&(this._stack[e].off("update",this._onOperationUpdate),this._stack[e].dispose()),this._stack[e]=t,t.on("update",this._onOperationUpdate)}},{key:"remove",value:function(e){var t=this._stack.indexOf(e);-1!==t&&(this._stack[t]&&(this._stack[t].off("update",this._onOperationUpdate),this._stack[t].dispose()),this._stack.splice(t,1))}},{key:"removeAt",value:function(e){this._stack[e]&&(this._stack[e].off("update",this._onOperationUpdate),this._stack[e].dispose()),delete this._stack[e]}},{key:"getStack",value:function(){return this._stack}},{key:"dispose",value:function(){this.forEach(function(e){e.dispose()})}}]),t}();t.a=_},function(e,t){e.exports={name:"photoeditorsdk",version:"4.21.1",description:"The most comprehensive photo editor SDK for HTML5",repository:"http://github.com/imgly/pesdk-html5",author:"PhotoEditorSDK (img.ly GmbH) <contact@img.ly>",license:"SEE LICENSE IN LICENSE.md",bin:{},scripts:{start:"npm run watch",release:"cross-env PESDK_CLEAN=true PESDK_ASSETS=true PESDK_RELEASE=true webpack -p --progress --colors && cross-env npm run prerender-desktop-css","release:production":"cross-env ENV=production npm run release && rm -rf build/examples/shared","release:test":"cross-env ENV=test PESDK_CLEAN=true PESDK_ASSETS=true webpack && npm run prerender-desktop-css","release:development":"cross-env ENV=development PESDK_CLEAN=true PESDK_ASSETS=true npm run release",lint:"eslint --ext .jsx,.js src/js","lint:test":"eslint --ext .jsx,.js test","lint:sdk":"eslint --ext .jsx,.js src/js/sdk","lint:ui":"eslint --ext .jsx,.js src/js/ui","lint:ui:react-ui":"eslint --ext .jsx,.js src/js/ui/react-ui","lint:ui:desktop-ui":"eslint --ext .jsx,.js src/js/ui/desktop-ui",build:"cross-env PESDK_CLEAN=true PESDK_ASSETS=true webpack",rebuild:"cross-env PESDK_ASSETS=true webpack --progress --color",clean:"rimraf build/* doc/* dist/*",watch:"cross-env PESDK_CLEAN=true PESDK_ASSETS=true PESDK_SERVE=true ENV=development webpack --watch --progress --colors","watch:test":"cross-env PESDK_CLEAN=true PESDK_ASSETS=true ENV=test webpack --watch --progress --colors","watch:production":"cross-env PESDK_CLEAN=true PESDK_ASSETS=true PESDK_SERVE=true webpack --watch --progress --colors",test:"npm run test:sdk && npm run test:ui:react-ui && npm run test:ui:desktop-ui && npm run server","test:sdk":"cross-env ENV=test node_modules/.bin/mocha --require test/sdk/support/modules --require test/sdk/support/helpers test/sdk","test:ui:react-ui":'cross-env ENV=test node --stack-size=65500 node_modules/.bin/mocha --require test/sdk/support/modules --require test/react-ui/support/helpers test/shared/run-server.js "test/react-ui/*.test.js" "test/react-ui/**/*.test.js"',"test:ui:desktop-ui":'cross-env ENV=test node --stack-size=65500 node_modules/.bin/mocha --require test/desktop-ui/support/helpers test/shared/run-server.js "test/desktop-ui/*.test.js" "test/desktop-ui/**/*.test.js"',"test:server":'cross-env ENV=test node --stack-size=65500 node_modules/.bin/mocha --require test/sdk/support/modules --require test/server/support/helpers test/shared/run-server.js "test/server/*.test.js" "test/server/**/*.test.js"',"test:comparison":'cross-env ENV=test node --stack-size=65500 node_modules/.bin/mocha --require test/sdk/support/modules --require test/comparison/support/helpers "test/comparison/*.test.js" "test/comparison/**/*.test.js"',"test:webgl":"cross-env RENDERER=webgl ENV=test node_modules/.bin/mocha --require test/sdk/support/modules --require test/sdk/support/helpers test/sdk",jsdoc:"rimraf doc/photoeditorsdk && jsdoc -c config/jsdoc/jsdoc.json -r","jsdoc:server":"rimraf doc/photoeditorsdk-server && jsdoc -c config/jsdoc/jsdoc.server.json -r","render-filter-previews":"node scripts/run render-filter-previews","prerender-desktop-css":"node scripts/run render-desktop-ui-css",dist:"npm run dist:sdk && npm run dist:server","dist:sdk":"rimraf dist/photoeditorsdk && cp -r build/photoeditorsdk/ dist/photoeditorsdk && find dist/photoeditorsdk -d 2 -name '*.min.*' | sed 'p;s/.min././' | xargs -n2 cp && npm run jsdoc","dist:server":"rimraf dist/photoeditorsdk-server && cp -r build/photoeditorsdk-server/ dist/photoeditorsdk-server && find dist/photoeditorsdk-server -d 2 -name '*.Server.min.*' | sed 'p;s/.min././' | xargs -n2 cp && npm run jsdoc:server","lerna:bootstrap":"$(npm bin)/lerna bootstrap","lerna:publish":"$(npm bin)/lerna publish","clean:remake":"node config/rollup/clean.js","pre:remake":"node config/rollup/pre.js","copy-assets:remake":"node config/rollup/copy-assets.js","clean-assets:remake":"node config/rollup/clean-assets.js","prewatch:remake":"npm run pre:remake","watch:remake":"cross-env ENV=development rollup -c -w","prebuild:remake":"npm run pre:remake","build:remake":"cross-env ENV=production rollup -c","lint:css":"stylelint './packages/**/*.tsx'","lint:remake":"tslint -p tsconfig.json -c tslint.json 'packages/**/*.{ts,tsx}'","test:remake":"jest","e2e:remake":"$(npm bin)/cypress open","deploy:remake":"node config/rollup/deploy-ui.js","build:engine-wrapper":"cross-env ONLY_WRAPPER=true webpack","remake:new-to-old":"rm -rf 'node_modules' && npm i","remake:old-to-new":"npm run remake:new-to-old && npm run build:engine-wrapper && npm run clean-assets:remake && npx lerna clean --yes && npx lerna bootstrap && npm run clean:remake && npm run watch:remake"},devDependencies:{"@svgr/rollup":"^2.4.1","@testing-library/react":"^8.0.4","@types/react":"^16.8.13","@types/react-dom":"^16.8.4","@types/styled-components":"^4.1.14",adonis:"git://github.com/imgly/adonis.git#v1.0.1",ajv:"^5.5.1","babel-core":"^6.26.3","babel-eslint":"^8.2.1","babel-loader":"^7.1.2","babel-minify-webpack-plugin":"^0.2.0","babel-plugin-external-helpers":"^6.22.0","babel-plugin-transform-adonis-hash":"^0.4.0","babel-plugin-transform-class-properties":"^6.19.0","babel-plugin-transform-es2015-classes":"^6.6.4","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-plugin-transform-proto-to-assign":"^6.26.0","babel-plugin-transform-runtime":"^6.6.0","babel-preset-env":"^1.7.0","babel-preset-es2015":"^6.6.0","babel-preset-minify":"^0.2.0","babel-preset-react":"^6.5.0","babel-preset-stage-0":"^6.24.1","babel-preset-stage-3":"^6.24.1","babel-register":"^6.26.0","babel-runtime":"^6.26.0",chai:"^3.4.0","chai-as-promised":"^5.1.0",chalk:"^2.4.1",chromedriver:"^2.37.0","circular-json-es6":"^2.0.2",classnames:"^2.1.3","clean-webpack-plugin":"^0.1.16","compass-mixins":"^0.12.8","copy-webpack-plugin":"^4.5.2","cross-env":"^5.1.1","css-loader":"^0.28.7",cypress:"^3.4.1",del:"^2.0.0",djv:"^1.2.0",eslint:"^4.16.0","eslint-config-standard":"^11.0.0","eslint-plugin-import":"^2.14.0","eslint-plugin-mocha":"^5.0.0","eslint-plugin-node":"^6.0.1","eslint-plugin-promise":"^3.7.0","eslint-plugin-react":"^7.11.1","eslint-plugin-standard":"^3.0.1",express:"^4.16.2","extract-text-webpack-plugin":"^3.0.2","html-webpack-plugin":"^3.2.0",husky:"^1.2.0",inquirer:"^0.11.4","inquirer-path":"^1.0.0-beta5","isomorphic-fetch":"^2.2.1","jaguarjs-jsdoc":"git://github.com/imgly/jaguarjs-jsdoc.git#master",jest:"^24.7.1","jest-dom":"^3.1.3",jsdoc:"^3.6.3","json-loader":"^0.5.7",lerna:"^3.13.4","lint-staged":"^8.1.0","lodash.defaults":"^4.2.0",minimist:"^1.2.0",mkdirp:"^0.5.1","mobx-react-devtools":"^6.1.1",mocha:"^3.5.3",ncp:"^2.0.0",nightwatch:"git://github.com/imgly/nightwatch.git#feature/file-upload-and-multiple-selectors","node-sass":"^4.12.0","node-static":"^0.7.10","optimize-css-assets-webpack-plugin":"^3.2.0","performance-now":"^0.2.0",pixelmatch:"^4.0.2",pngjs:"^3.3.2","preprocess-loader":"^0.3.0","pretty-error":"^2.0.0",prompt:"^1.0.0","prop-types":"^15.6.0","raw-loader":"^0.5.1",react:"^16.8.3","react-dom":"^16.8.3",rembrandt:"^0.1.3",rimraf:"^2.6.2",rollup:"^0.62.0","rollup-plugin-babel":"^3.0.7","rollup-plugin-commonjs":"^9.1.3","rollup-plugin-image":"^1.0.2","rollup-plugin-json":"^4.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-resolve":"^3.3.0","rollup-plugin-peer-deps-external":"^2.2.0","rollup-plugin-postcss":"^1.6.3","rollup-plugin-terser":"^4.0.4","rollup-plugin-typescript2":"^0.20.1","rollup-plugin-url":"^1.4.0","sass-loader":"^6.0.6","selenium-server-standalone-jar":"3.4.0",should:"^4.3.0",sinon:"^1.17.3","sinon-chai":"^2.14.0",standard:"^9.0.2","standard-loader":"^6.0.1","stats.js":"^0.16.0","style-loader":"^0.13.1","styled-components":"^4.2.0",stylelint:"^10.1.0","stylelint-config-recommended":"^2.2.0","stylelint-config-styled-components":"^0.1.1","stylelint-processor-styled-components":"^1.8.0","term-img2":"^2.0.1","transform-loader":"^0.2.2","ts-jest":"^24.0.2",tslint:"^5.14.0","tslint-react":"^3.6.0",typescript:"^2.8.3","uglifyjs-webpack-plugin":"^1.2.5","vinyl-source-stream":"0.1.1",webpack:"^3.12.0","webpack-notifier":"^1.2.1"},standard:{globals:["describe","context","before","beforeEach","after","afterEach","it","expect"],parser:"babel-eslint"},dependencies:{"@types/jest":"^24.0.11",canvas:"^2.1.0",gl:"^4.1.1","jest-axe":"^3.2.0",mobx:"^4.0.0","mobx-react":"^5.0.0",opn:"^5.3.0",request:"^2.88.0",simplebar:"^4.0.0"},peerDependencies:{"prop-types":"^15.5.4",react:"^15.0.0 || ^16.0.0","react-dom":"^15.0.0 || ^16.0.0","styled-components":">= 3"},"lint-staged":{"*.js":["eslint --fix","git add"],"*.jsx":["eslint --fix","git add"],"*.{ts, tsx}":["npm run lint:remake -- --fix","git add"]},husky:{hooks:{"pre-commit":"lint-staged","pre-push":"true"}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(284);n.d(t,"ImageLoader",function(){return r.a});var i=n(154);n.d(t,"JSONLoader",function(){return i.a})},function(e,t,n){"use strict";function r(e,t,n,r,i){return(e-t)*(i-r)/(n-t)+r}var i=n(0),o=n.n(i),a=n(2),s=n.n(a),u=n(3),l=n.n(u),c=n(1),f=n.n(c),h=n(4),p=(n.n(h),function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),o()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}()),d=h.Math.ColorMatrix,_=function(e){return(Math.max(e.r,e.g,e.b)+Math.min(e.r,e.g,e.b))/2},v=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||f()(t)).call(this));return e._fragmentSource=n(287),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=l()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(s.a?s()(e,t):e.__proto__=t)}(t,h.Engine.Filter),p(t,[{key:"_applyCanvas",value:function(e,t,n){arguments.length>3&&void 0!==arguments[3]&&arguments[3];for(var i=t.getCanvas(),o=t.getContext(),a=n.getContext(),s=o.getImageData(0,0,i.width,i.height),u=this._options,l=u.colorMatrix,c=u.gamma,f=u.shadows,p=u.highlights,d=u.whites,v=u.blacks,y=1!==c,g=0!==f||0!==p,m=new h.Color(0,0,0,0),b=0;b<i.width*i.height;b++){var w=4*b;if(m.r=s.data[w]/255,m.g=s.data[w+1]/255,m.b=s.data[w+2]/255,y&&(m.r=Math.pow(m.r,1/Math.max(c,1e-7)),m.g=Math.pow(m.g,1/Math.max(c,1e-7)),m.b=Math.pow(m.b,1/Math.max(c,1e-7))),g){var x=_(m),T=f>=0?h.Utils.clamp(Math.pow(x,1/(f+1))+-.76*Math.pow(x,2/(f+1))-x,0,Math.max(f,1)):-h.Utils.clamp(Math.pow(x,1/(1-f))+-.76*Math.pow(x,2/(1-f))-x,0,Math.max(-f,1)),k=T*x*x,R=T-k,C=x+k+(p<0?h.Utils.clamp(1-Math.pow(1-x,1/(1-p))- -.8*Math.pow(1-x,2/(1-p))-x,-1,0):-h.Utils.clamp(1-Math.pow(1-x,1/(1+p))- -.8*Math.pow(1-x,2/(1+p))-x,-1,0));m.r=h.Utils.clamp(C*((m.r+R)/Math.max(x,1e-7)),0,1),m.g=h.Utils.clamp(C*((m.g+R)/Math.max(x,1e-7)),0,1),m.b=h.Utils.clamp(C*((m.b+R)/Math.max(x,1e-7)),0,1)}(m=l.apply(m).clamp(0,1)).r=r(m.r,0,1,v/2,1+d/2),m.g=r(m.g,0,1,v/2,1+d/2),m.b=r(m.b,0,1,v/2,1+d/2),s.data[w]=255*m.r,s.data[w+1]=255*m.g,s.data[w+2]=255*m.b}a.putImageData(s,0,0)}}]),t}();v.prototype.availableOptions={gamma:{type:h.OptionType.NUMBER,default:1,uniformType:h.UniformType.FLOAT},shadows:{type:h.OptionType.NUMBER,default:0,uniformType:h.UniformType.FLOAT},highlights:{type:h.OptionType.NUMBER,default:1,uniformType:h.UniformType.FLOAT},whites:{type:h.OptionType.NUMBER,default:0,uniformType:h.UniformType.FLOAT},blacks:{type:h.OptionType.NUMBER,default:0,uniformType:h.UniformType.FLOAT},colorMatrix:{type:h.OptionType.COLOR_MATRIX,default:new d,uniformType:h.UniformType.MAT4},colorOffset:{type:h.OptionType.ARRAY,default:[],uniformType:h.UniformType.FLOAT4}},t.a=v},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(5),a=n.n(o),s=n(2),u=n.n(s),l=n(3),c=n.n(l),f=n(1),h=n.n(f),p=n(4),d=(n.n(p),n(7)),_=n(8),v=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),y=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||h()(t)).call.apply(e,[this].concat(r)));return o._stack.push(new _.Brightness({brightness:0})),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=c()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(u.a?u()(e,t):e.__proto__=t)}(t,d.a),v(t,[{key:"render",value:function(e,n,r){return this._stack.isEmpty()&&this._stack.push(new _.Brightness({brightness:0})),function e(t,n,r){null===t&&(t=Function.prototype);var i=a()(t,n);if(void 0===i){var o=h()(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0}(t.prototype.__proto__||h()(t.prototype),"render",this).call(this,e,n,r)}}]),t}();y.isIdentity=!0,y.identifier="identity",t.a=y},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=p()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(f.a?f()(e,t):e.__proto__=t)}var a=n(5),s=n.n(a),u=n(0),l=n.n(u),c=n(2),f=n.n(c),h=n(3),p=n.n(h),d=n(1),_=n.n(d),v=n(4),y=(n.n(v),n(16)),g=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),l()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),m=function(e){function t(){var e;r(this,t);for(var o=arguments.length,a=Array(o),s=0;s<o;s++)a[s]=arguments[s];var u=i(this,(e=t.__proto__||_()(t)).call.apply(e,[this].concat(a)));return u._fragmentSource=n(317),u}return o(t,v.Engine.Filter),g(t,[{key:"_applyCanvas",value:function(e,t,n){arguments.length>3&&void 0!==arguments[3]&&arguments[3];for(var r=t.getCanvas(),i=t.getContext(),o=n.getContext(),a=i.getImageData(0,0,r.width,r.height),s=this._options.lookupTableData,u=0;u<r.width*r.height;u++){var l=4*u,c=a.data[l];a.data[l]=s[4*c];var f=a.data[l+1];a.data[l+1]=s[1+4*f];var h=a.data[l+2];a.data[l+2]=s[2+4*h]}o.putImageData(a,0,0)}}]),t}();m.prototype.availableOptions={lookupTable:{type:v.OptionType.NUMBER,default:1,uniformType:v.UniformType.INT},lookupTableData:{type:v.OptionType.ARRAY,default:[]}};var b=function(e){function t(){var e;r(this,t);for(var n=arguments.length,o=Array(n),a=0;a<n;a++)o[a]=arguments[a];var s=i(this,(e=t.__proto__||_()(t)).call.apply(e,[this].concat(o)));return s._filter=new m({lookupTable:s._options.textureGLUnit}),s._textures={},s._renderers={},s}return o(t,y.a),g(t,[{key:"update",value:function(e){var t=e.getRenderer();t.isOfType(v.RendererType.WEBGL)?this._updateWebGLTexture(e):t.isOfType(v.RendererType.CANVAS)&&this._filter.setLookupTableData(this._options.data)}},{key:"_updateWebGLTexture",value:function(e){if(void 0===this._options.data)throw new Error("LookupTable: No data specified.");var t=new Uint8Array(this._options.data),n=e.getRenderer(),r=n.id;this._renderers[r]=n,this._textures[r]||(this._textures[r]=new v.Engine.BaseTexture);var i=this._textures[r],o=new v.Engine.PixelArrayImage(256,1,t);i.setSource(o),i.setGLUnit(this._options.textureGLUnit),n.isOfType(v.RendererType.WEBGL)&&n.updateTexture(i)}},{key:"dispose",value:function(){for(var e in function e(t,n,r){null===t&&(t=Function.prototype);var i=s()(t,n);if(void 0===i){var o=_()(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0}(t.prototype.__proto__||_()(t.prototype),"dispose",this).call(this),this._textures)this._textures[e].dispose(),delete this._textures[e];delete this._options.data}}]),t}();t.a=b},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(5),a=n.n(o),s=n(2),u=n.n(s),l=n(3),c=n.n(l),f=n(1),h=n.n(f),p=n(4),d=(n.n(p),n(379)),_=n(67),v=n(166),y=n(381),g=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),m=function e(t,n,r){null===t&&(t=Function.prototype);var i=a()(t,n);if(void 0===i){var o=h()(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0},b=p.Math.Vector2,w=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||h()(t)).call.apply(e,[this].concat(r)));return o._persistedPaths=[],o._outputCanvasDirty=!0,o._outputCanvas=p.Utils.createCanvas(),o._outputContext=o._outputCanvas.getContext("2d"),o._persistCanvas=p.Utils.createCanvas(),o._persistContext=o._persistCanvas.getContext("2d"),o._nextCanvas=p.Utils.createCanvas(),o._texture=p.Engine.Texture.fromCanvas(o._outputCanvas),o._sprite.setTexture(o._texture),o._onPathUpdate=o._onPathUpdate.bind(o),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=c()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(u.a?u()(e,t):e.__proto__=t)}(t,_.a),g(t,[{key:"applyFlip",value:function(e){this._options.paths.forEach(function(t){t.forEachControlPoint(function(t){var n=t.getPosition().clone();switch(e){case"horizontal":n.x=1-n.x;break;case"vertical":n.y=1-n.y}t.setPosition(n)}),t.setDirty(!0)}),this._reset()}},{key:"applyRotation",value:function(e){this._options.paths.forEach(function(t){t.forEachControlPoint(function(t){var n=t.getPosition().clone();90===e?(n.flip(),n.x=1-n.x):-90===e&&(n.flip(),n.y=1-n.y),t.setPosition(n)}),t.setDirty(!0)}),this._reset()}},{key:"applyTransform",value:function(e){var t=null;this._options.paths.forEach(function(n){n.forEachControlPoint(function(t){t.setPosition(e.applyToRelativePoint(t.getPosition()))});var r=n.getBrush();r!==t&&(r.setSize(e.applyToRelativeSize(r.getSize())),t=r),n.setDirty(!0)}),this._reset()}},{key:"clearCanvas",value:function(){if(this._outputCanvas){this._outputCanvasDirty=!0;var e=this._outputCanvas,t=e.width,n=e.height;this._outputContext.clearRect(0,0,t,n)}}},{key:"clearPersistCanvas",value:function(){if(this._persistCanvas){var e=this._persistCanvas,t=e.width,n=e.height;this._persistContext.clearRect(0,0,t,n)}}},{key:"serializeOptions",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=m(t.prototype.__proto__||h()(t.prototype),"serializeOptions",this).call(this,e,n);return e||(r.type="brush"),r}},{key:"serializeOption",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return"paths"===e?this._options.paths.map(function(e){return e.serializeOptions(void 0,n)}):m(t.prototype.__proto__||h()(t.prototype),"serializeOption",this).call(this,e,n)}},{key:"createPath",value:function(e){var t=new d.a(this._operation,{brush:e},this._nextCanvas);return t.on("update",this._onPathUpdate),this._options.paths.push(t),this.setDirty(!0),t}},{key:"_onPathUpdate",value:function(){this._operation.setDirty(!0),this.setDirty(!0)}},{key:"_onPathPersist",value:function(e){e.renderToCanvas(this._persistCanvas),this._nextCanvas=e.getCanvas(),this._nextCanvas.getContext("2d").clearRect(0,0,this._nextCanvas.width,this._nextCanvas.height),this._persistedPaths.push(e)}},{key:"_getTexture",value:function(){return this._texture}},{key:"setDirtyForRenderer",value:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];m(t.prototype.__proto__||h()(t.prototype),"setDirtyForRenderer",this).call(this,e,n,r),e&&r&&(this._persistedPaths=[],this._options.paths.forEach(function(e){e.setDirty(!0)}))}},{key:"setDirty",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];for(var n in this._dirtiness)this.setDirtyForRenderer(e,this._renderers[n],t)}},{key:"render",value:function(e){var t=this,n=this._operation.getSDK().getRenderer();this.isDirtyForRenderer(n)&&(p.Utils.ensureCanvasDimensions(this._outputCanvas,e),p.Utils.ensureCanvasDimensions(this._persistCanvas,e),this._options.paths.forEach(function(n){n.render(e),n.getClosed()&&-1===t._persistedPaths.indexOf(n)&&t._onPathPersist(n)}),this.clearCanvas(),this._outputContext.drawImage(this._persistCanvas,0,0),this._options.paths.forEach(function(e){e.getClosed()||e.renderToCanvas(t._outputCanvas)}),this.setDirtyForRenderer(!1,n))}},{key:"update",value:function(e,n){n&&(p.Utils.ensureCanvasDimensions(this._outputCanvas,n),p.Utils.ensureCanvasDimensions(this._persistCanvas,n),this._texture.getBaseTexture().update()),this.render(n);var r=e.getRenderer();r.isOfType(p.RendererType.WEBGL)&&r.updateTexture(this._texture.getBaseTexture()),m(t.prototype.__proto__||h()(t.prototype),"update",this).call(this,e,n)}},{key:"_reset",value:function(){this._persistedPaths=[],this._operation&&this._operation.setDirty(!0),this.setDirty(!0),this.clearCanvas(),this.clearPersistCanvas()}},{key:"getCanvas",value:function(){return this._outputCanvas}},{key:"_createRadialBrush",value:function(){return new y.a}},{key:"_getTempCanvas",value:function(){return this._nextCanvas}},{key:"dispose",value:function(){m(t.prototype.__proto__||h()(t.prototype),"dispose",this).call(this),this._texture&&this._texture.getBaseTexture().dispose()}}]),t}();w.prototype.availableOptions={id:{type:p.OptionType.STRING,default:function(){return p.Utils.getUUID()}},position:{type:p.OptionType.VECTOR2,default:new b(0,0)},scale:{type:p.OptionType.VECTOR2,default:new b(1,1)},anchor:{type:p.OptionType.VECTOR2,default:new b(0,0)},pivot:{type:p.OptionType.VECTOR2,default:new b(0,0)},rotation:{type:p.OptionType.NUMBER,default:0},paths:{type:p.OptionType.ARRAY,default:[],setter:function(e){var t=this;return e=e.map(function(e){if(e instanceof d.a)return e;var n=e.brush,r=e.closed,i=new d.a(t._operation,{brush:n,closed:r},t._nextCanvas);return e.controlPoints.forEach(function(e){i.addControlPoint(e)}),i}),this._reset(),e}}},w.type="brush",w.Brush=v.a,w.Path=d.a,w.Brushes={RadialBrush:y.a},t.a=w},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(2),a=n.n(o),s=n(3),u=n.n(s),l=n(1),c=n.n(l),f=n(4),h=(n.n(f),function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}()),p=f.Math.Vector2,d=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||c()(t)).call.apply(e,[this].concat(r)));return o._lastOptions={},o._lastInputDimensions=new p(0,0),o._brush=null,o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=u()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(a.a?a()(e,t):e.__proto__=t)}(t,f.Configurable),h(t,[{key:"getBrushImage",value:function(e){if(this._brush&&this.optionsEqual(this._lastOptions)&&e.equals(this._lastInputDimensions))return this._brush;var t=this._options,n=t.image,r=t.size;n.width=n.height=Math.ceil(r*e.min());var i=f.Utils.createCanvas();i.width=n.width,i.height=n.height;var o=i.getContext("2d");o.drawImage(n,0,0,i.width,i.height);var a=this._tintImageData(o.getImageData(0,0,i.width,i.height),i.width,i.height);return o.putImageData(a,0,0),this._lastOptions=this.serializeOptions(["size","color"]),this._brush=i,this._lastInputDimensions=e.clone(),i}},{key:"_tintImageData",value:function(e){for(var t=this._options.color,n=0;n<e.data.length;n+=4)e.data[n]+=(255*t.r-e.data[n])*t.a,e.data[n+1]+=(255*t.g-e.data[n+1])*t.a,e.data[n+2]+=(255*t.b-e.data[n+2])*t.a;return e}},{key:"clone",value:function(){return new(0,this.constructor)(this._options)}}]),t}();t.a=d,d.prototype.availableOptions={identifier:{type:f.OptionType.STRING},image:{type:f.OptionType.IMAGE},size:{type:f.OptionType.NUMBER,default:.05},color:{type:f.OptionType.COLOR,default:f.Color.RED}}},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(4),a=(n.n(o),n(168)),s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=o.Math.Vector2,l=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._text=t,this._operation=n,this._textOptions={},this.rotation=0,this._createCanvas(),this._createTexture()}return s(e,[{key:"_createCanvas",value:function(){this._canvas=o.Utils.createCanvas(),this._context=this._canvas.getContext("2d"),this._textSplitter=new a.a(this._context),this._finalCanvas=o.Utils.createCanvas(),this._finalContext=this._finalCanvas.getContext("2d")}},{key:"_createTexture",value:function(){this._texture=o.Engine.Texture.fromCanvas(this._canvas),this._finalTexture=o.Engine.Texture.fromCanvas(this._finalCanvas)}},{key:"_applyTextOptions",value:function(e,t){t.font=this._text.getFontStyle()+" "+this._text.getFontWeight()+" "+e.fontSize+'px "'+this._text.getFontFamily()+'"',t.textBaseline="top",t.textAlign=this._text.getAlignment(),t.fillStyle=this._text.getColor().toRGBA(),t.strokeStyle=this._text.getOutlineColor().toRGBA();var n=this._text.getOutlineWidth();n>0&&(t.lineWidth=n)}},{key:"_buildOutputLines",value:function(e){return this._textSplitter.setText(this._text.getText()),this._textSplitter.setMaxWidth(e),this._textSplitter.getLines().map(function(e){return e.replace(/\s+$/i,"")})}},{key:"_renderTextLine",value:function(e,t){var n=this._text.getAlignment(),r=new u(0,t);switch(n){case"center":r.x=this._canvas.width/2;break;case"right":r.x=this._canvas.width}this._context.fillText(e,r.x,r.y),this._text.getOutlineWidth()>0&&(this._context.miterLimit=2,this._context.strokeText(e,r.x,r.y))}},{key:"update",value:function(e,t){var n=this.calculateFontStyles(e,t);if(n){var r=this._calculateText(e,n,t),i=r.dimensions,o=r.lines;this._renderText(e,i,o,n,t),this._updateFinalTexture()}}},{key:"_updateFinalTexture",value:function(){var e=this._canvas,t=e.width,n=e.height,r=this.rotation,i=Math.cos(r),o=Math.sin(r),a=new u(Math.abs(t*i)+Math.abs(n*o),Math.abs(t*o)+Math.abs(n*i));this._finalCanvas.width=a.x,this._finalCanvas.height=a.y,this._finalContext.save(),this._finalContext.translate(this._finalCanvas.width/2,this._finalCanvas.height/2),this._finalContext.rotate(r),this._finalContext.drawImage(this._canvas,-t/2,-n/2),this._finalContext.restore()}},{key:"_renderText",value:function(e,t,n,r,i){this._canvas.width=t.x,this._canvas.height=t.y,this._text.getMaxHeight()&&(this._canvas.height=Math.min(this._text.getMaxHeight()*i.y,this._canvas.height)),this._context=this._canvas.getContext("2d"),this._context.fillStyle=this._text.getBackgroundColor().toRGBA(),this._context.fillRect(0,0,t.x,t.y),this._applyTextOptions(r,this._context);for(var o=0;o<n.length;o++){var a=n[o];this._renderTextLine(a,r.topPadding+r.lineHeight*o)}}},{key:"calculateFontStyles",value:function(e,t){var n=this._text.getFontFamily(),r=this._text.getFontSize()*t.y,i=this._text.getAbsoluteTextHeight(t),o=i*this._text.getLineHeight(),a={fontFamily:n,fontSize:r,lineHeight:o,topPadding:i*(this._text.getLineHeight()-1)/2};return this._textOptions.fontFamily===n&&this._textOptions.fontSize===r&&this._textOptions.lineHeight===o||(this._textOptions=a),a}},{key:"_calculateText",value:function(e,t,n){var r=this._text.getMaxWidth()*n.x;this._applyTextOptions(t,this._context);var i=new u,o=this._text.getText().split("\n");if(void 0!==r)i.x=r,o=this._buildOutputLines(r);else for(var a=0;a<o.length;a++){var s=o[a];i.x=Math.max(i.x,this._context.measureText(s).width)}var l=t.lineHeight;return i.y=o.length*l,{dimensions:i,lines:o}}},{key:"getTexture",value:function(){return this._texture}},{key:"getFinalTexture",value:function(){return this._finalTexture}},{key:"getDimensions",value:function(e,t){var n=this.calculateFontStyles(e,t);return this._calculateText(e,n,t).dimensions}},{key:"dispose",value:function(){this._measurementElement&&document.body.removeChild(this._measurementElement),this._texture&&(this._texture.getBaseTexture().dispose(),this._texture=null),this._finalTexture&&(this._finalTexture.getBaseTexture().dispose(),this._finalTexture=null)}}]),e}();t.a=l},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._context=t,this._lastFontStyle={}}return o(e,[{key:"getLines",value:function(){for(var e=this,t=[],n=[],r=this._lines.length,i=0;i<r;i++){for(var o=this._lines[i],a=this._buildWords(o),s=a.length,u=0;u<s;u++){var l=a[u],c=n.concat(l).join("").replace(/\s+$/i,"");if(this._getWidth(c)>this._maxWidth){n.length>0&&(t.push(n.join("")),n=[l]);var f=l.replace(/\s+$/i,"");if(this._getWidth(f)>this._maxWidth){var h=this._splitWord(l);t=t.concat(h.lines),h.rest&&(n=[h.rest])}}else n.push(l)}t.push(n.join("")),n=[]}return t.map(function(t){return e._trimLine(t,e._context.textAlign)})}},{key:"_trimLine",value:function(e,t){return e}},{key:"_buildWords",value:function(e){for(var t=[],n="",r=e.length,i=0;i<r;i++){var o=e[i];n+=o," "!==o&&"-"!==o&&i!==r-1||(t.push(n),n="")}return t}},{key:"_splitWord",value:function(e){for(var t={lines:[],rest:null},n=e.length,r=[],i=0;i<n;i++){var o=e[i];this._getWidth(r.concat(o).join(""))>this._maxWidth?(r.length>0&&t.lines.push(r.join("")),r=[o]):r.push(o),i===n-1&&r.length>0&&(t.rest=r.join(""))}return t}},{key:"_fontStyleChanged",value:function(){return this._context.font!==this._lastFontStyle&&(this._lastFontStyle=this._context.font,!0)}},{key:"_getWidth",value:function(e){return this._context.measureText(e).width}},{key:"setText",value:function(e){this._text=e,this._lines=e.split("\n")}},{key:"setMaxWidth",value:function(e){this._maxWidth=e}}]),e}();t.a=a},function(e,t,n){"use strict";n.d(t,"a",function(){return T});var r=n(6),i=n.n(r),o=n(15),a=n.n(o),s=n(0),u=n.n(s),l=n(5),c=n.n(l),f=n(2),h=n.n(f),p=n(3),d=n.n(p),_=n(1),v=n.n(_),y=n(4),g=(n.n(y),n(68)),m=n(170),b=n(22),w=i.a||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},x=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),u()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),T=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||v()(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=d()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(h.a?h()(e,t):e.__proto__=t)}(t,g.a),x(t,[{key:"_layoutRow",value:function(e,t,n,r){return new b.a({words:e,width:t,attributes:n})}},{key:"_layoutRows",value:function(e,n){var r=function e(t,n,r){null===t&&(t=Function.prototype);var i=c()(t,n);if(void 0===i){var o=v()(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0}(t.prototype.__proto__||v()(t.prototype),"_layoutRows",this).call(this,e,n),i=.032*n,o=.08*n,s=new m.a({width:n,height:i,type:m.a.FormType.LongLine,shearingAngle:0}).layout(),u=new m.a({width:n,height:o,type:m.a.FormType.LongAndShortLine,shearingAngle:0}).layout();return[s].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return a()(e)}(r),[u])}}]),t}();T.defaultFontIdentifiers=["imgly_font_summer_font_light"],T.identifier="imgly_text_design_blocks_light",T.prototype.availableOptions=w({},g.a.prototype.availableOptions,{fontIdentifiers:{type:y.OptionType.ARRAY,default:T.defaultFontIdentifiers}})},function(e,t,n){"use strict";n.d(t,"a",function(){return w});var r=n(6),i=n.n(r),o=n(0),a=n.n(o),s=n(2),u=n.n(s),l=n(3),c=n.n(l),f=n(1),h=n.n(f),p=n(4),d=(n.n(p),n(48)),_=n(83),v=n(30),y=n(41),g=i.a||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},m=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),a()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),b=p.Math.Rectangle,w=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||h()(t)).call.apply(e,[this].concat(r)));return o.setSize(new v.a(o.getWidth(),o.getHeight())),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=c()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(u.a?u()(e,t):e.__proto__=t)}(t,_.a),m(t,[{key:"_calculateLayoutElements",value:function(){return[new d.a({frame:this._getTextFrame()})]}},{key:"render",value:function(e){var n=this._getFrame(),r=this.getType(),i=this.getAttributes().getTextColor(),o=n.height/3,a=new b(n.x,n.y,n.width,o),s=new b(n.x,n.y+2*o,n.width,o);switch(r){case t.FormType.Rect:Object(y.d)(e,n,i);break;case t.FormType.DoubleRect:Object(y.d)(e,a,i),Object(y.d)(e,s,i);break;case t.FormType.DoubleRectFirstPunctuated:Object(y.e)(e,a,i),Object(y.d)(e,s,i);break;case t.FormType.DoubleRectSecondPunctuated:Object(y.d)(e,a,i),Object(y.e)(e,s,i);break;case t.FormType.LongLine:var u=n.height/2,l=new b(n.x,n.y,n.width,u);Object(y.c)(e,l,.5*l.height,i);break;case t.FormType.LongAndShortLine:var c=.2*n.height,f=.75*c;a=new b(n.x,n.y+c,n.width,c);var h=n.x+.25*n.width,p=n.y+n.height-f;s=new b(h,p,.5*n.width,f),Object(y.c)(e,a,.5*a.height,i),Object(y.c)(e,s,.5*s.height,i)}}}]),t}();w.FormType={Rect:"RECT",DoubleRect:"DOUBLE_RECT",DoubleRectFirstPunctuated:"DOUBLE_RECT_FIRST_PUNCTUATED",DoubleRectSecondPunctuated:"DOUBLE_RECT_SECOND_PUNCTUATED",LongLine:"LONG_LINE",LongAndShortLine:"LONG_AND_SHORT_LINE"},w.prototype.availableOptions=g({},_.a.prototype.availableOptions,{height:{type:p.OptionType.NUMBER,default:100},type:{type:p.OptionType.STRING,default:w.FormType.Rect,available:p.Utils.values(w.FormType)}})},function(e,t,n){"use strict";n.d(t,"a",function(){return T});var r=n(6),i=n.n(r),o=n(0),a=n.n(o),s=n(5),u=n.n(s),l=n(2),c=n.n(l),f=n(3),h=n.n(f),p=n(1),d=n.n(p),_=n(4),v=(n.n(_),n(68)),y=n(22),g=n(114),m=n(40),b=n(116),w=i.a||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},x=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),a()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),T=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||d()(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=h()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(c.a?c()(e,t):e.__proto__=t)}(t,v.a),x(t,[{key:"_fontForRow",value:function(e,t){var n=this.getFontIdentifiers();return n[e%n.length]}},{key:"_minimumNumberOfLines",value:function(e){return Math.max(Math.floor(.7*function e(t,n,r){null===t&&(t=Function.prototype);var i=u()(t,n);if(void 0===i){var o=d()(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0}(t.prototype.__proto__||d()(t.prototype),"_minimumNumberOfLines",this).call(this,e)),1)}},{key:"_maximumNumberOfLines",value:function(e){return Math.max(Math.floor(e.countNumberOfCharacters()/5),1)}},{key:"_randomLayoutRow",value:function(e,n,r,i){return this._createSingleRow(t.RowType.Single,e,r,i)}},{key:"_createSingleRow",value:function(e,n,r,i){var o=i.getFontIdentifier(),a="imgly_font_amberlight"===o||"imgly_font_handycheera_regular"===o?(new m.a).set(n.getLowerCase()):n;switch(e){case t.RowType.Single:return new y.a({words:a,width:r,attributes:i});case t.RowType.SingleImage:return new b.a({words:a,width:r,attributes:i});default:return _.Log.warn("TextDesignCelebrate#_createSingleRow: Invalid row type '"+e+"'"),null}}}]),t}();T.defaultFontIdentifiers=["imgly_font_handycheera_regular","imgly_font_rasa_regular"],T.defaultBanderoles=[g.a.Celebrate1,g.a.Celebrate2],T.identifier="imgly_text_design_celebrate",T.RowType={Single:"SINGLE",SingleImage:"SINGLE_IMAGE"},T.prototype.availableOptions=w({},v.a.prototype.availableOptions,{relativeLineSpacing:{type:_.OptionType.NUMBER,default:.01875},fontIdentifiers:{type:_.OptionType.ARRAY,default:T.defaultFontIdentifiers},banderoles:{type:_.OptionType.ARRAY,default:T.defaultBanderoles}})},function(e,t,n){"use strict";n.d(t,"a",function(){return R});var r=n(6),i=n.n(r),o=n(0),a=n.n(o),s=n(5),u=n.n(s),l=n(2),c=n.n(l),f=n(3),h=n.n(f),p=n(1),d=n.n(p),_=n(4),v=(n.n(_),n(69)),y=n(22),g=n(18),m=n(398),b=n(40),w=n(17),x=i.a||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},T=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),a()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),k=function e(t,n,r){null===t&&(t=Function.prototype);var i=u()(t,n);if(void 0===i){var o=d()(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},R=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||d()(t)).call.apply(e,[this].concat(r)));return o._relativeInsets=new g.a(.1,.1,.1,.1),o._alreadyContainsARowWithScriptFont=!1,o._backgroundsRandomizer=new w.a(0),o._seedPool.push(o._backgroundsRandomizer),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=h()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(c.a?c()(e,t):e.__proto__=t)}(t,v.a),T(t,[{key:"getImagePaths",value:function(){return _.Utils.Array.flatten(m.a.Backgrounds.map(function(e){return e.getImagePaths()}))}},{key:"_getBackground",value:function(){return this._backgroundsRandomizer.pickNext(m.a.Backgrounds)}},{key:"generateLayoutData",value:function(e,n){return this._alreadyContainsARowWithScriptFont=!1,this._background=this._getBackground(),k(t.prototype.__proto__||d()(t.prototype),"generateLayoutData",this).call(this,e,n)}},{key:"_modifiedText",value:function(e){return k(t.prototype.__proto__||d()(t.prototype),"_modifiedText",this).call(this,e).toUpperCase()}},{key:"_fontForRow",value:function(e,n){var r=k(t.prototype.__proto__||d()(t.prototype),"_fontForRow",this).call(this,e,n);return"imgly_font_petit_formal_script"===r&&(this._alreadyContainsARowWithScriptFont&&(r="imgly_font_bungee_inline"),this._alreadyContainsARowWithScriptFont=!0),r}},{key:"_randomLayoutRow",value:function(e,t,n,r){var i="imgly_font_petit_formal_script"===r.getFontIdentifier();return new y.a({words:i?(new b.a).set(e.getLowerCase()):e,width:n,attributes:r})}}]),t}();R.identifier="imgly_text_design_equal_width",R.defaultFontIdentifiers=["imgly_font_ultra","imgly_font_bungee_inline","imgly_font_petit_formal_script"],R.prototype.availableOptions=x({},v.a.prototype.availableOptions,{fontIdentifiers:{type:_.OptionType.ARRAY,default:R.defaultFontIdentifiers},relativeLineSpacing:{type:_.OptionType.NUMBER,default:.025}})},function(e,t,n){"use strict";n.d(t,"a",function(){return p});var r=n(0),i=n.n(r),o=n(2),a=n.n(o),s=n(3),u=n.n(s),l=n(1),c=n.n(l),f=n(4),h=(n.n(f),function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}()),p=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||c()(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=u()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(a.a?a()(e,t):e.__proto__=t)}(t,f.Configurable),h(t,[{key:"render",value:function(e,t,n,r,i){f.Log.warn("TextDesignBackground#render: Abstract class")}}]),t}();p.prototype.availableOptions={}},function(e,t,n){var r=n(20);e.exports=function(e,t){if(!r(e)||e._t!==t)throw TypeError("Incompatible receiver, "+t+" required!");return e}},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(2),a=n.n(o),s=n(3),u=n.n(s),l=n(1),c=n.n(l),f=n(11),h=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),p=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||c()(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=u()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(a.a?a()(e,t):e.__proto__=t)}(t,f.b),h(t,[{key:"_calculateOutputShape",value:function(){var e=this._getInputWithName("x").logicalShape;if(2!==e.length)throw new Error("UnpackRGBAFilter expects 2D inputs");return[1,e[0],e[1],3]}},{key:"_getTensorOperationSource",value:function(){return"\n void main ()\n {\n // x, y, z, w\n // e.g. [0, 4, 3, 2] (which is the blue channel of the pixel at x: 3, y: 4)\n ivec4 outputCoords = getOutputCoords();\n \n int row = outputCoords.y;\n int col = outputCoords.z;\n int offset = outputCoords.w;\n\n int index = row * int(x_sizeRC.y) + col;\n int logR = index / int(x_sizeRC.y);\n int logC = index - logR * int(x_sizeRC.y);\n vec2 uv = (vec2(logC, logR) + halfCR) / x_texRC.yx;\n vec4 color = texture2D(x, uv);\n\n float component = 0.0;\n if (offset == 0) {\n component = color.r;\n } else if (offset == 1) {\n component = color.g;\n } else if (offset == 2) {\n component = color.b;\n }\n gl_FragColor = vec4(component, 0.0, 0.0, 1.0);\n }\n "}},{key:"requiresFloatTextures",value:function(){return!0}}]),t}();t.a=p},function(e,t,n){"use strict";var r=n(6),i=n.n(r),o=n(0),a=n.n(o),s=n(2),u=n.n(s),l=n(3),c=n.n(l),f=n(1),h=n.n(f),p=n(4),d=(n.n(p),n(11)),_=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),a()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),v=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||h()(t)).call.apply(e,[this].concat(r)));return o._uniforms.blendLeftTopRightBottom={type:p.UniformType.FLOAT4,value:o.availableOptions.blendLeftTopRightBottom.default},o._uniforms.blendRadius={type:p.UniformType.FLOAT,value:o.availableOptions.blendRadius.default},o.prepareUniforms(),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=c()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(u.a?u()(e,t):e.__proto__=t)}(t,d.b),_(t,[{key:"requiresFloatTextures",value:function(){return!1}},{key:"_calculateOutputShape",value:function(){var e=this._getInputWithName("x"),t=this._getInputWithName("y");if(e.logicalShape[0]!==t.logicalShape[0]||e.logicalShape[1]!==t.logicalShape[1])throw new Error("X and Y inputs of "+this.constructor.name+" must have same shape.");return e.logicalShape}},{key:"_updateAdditionalUniforms",value:function(e){e.setUniform("blendLeftTopRightBottom",this.getBlendLeftTopRightBottom()),e.setUniform("blendRadius",this.getBlendRadius())}},{key:"_getTensorOperationSource",value:function(){return"\n uniform vec4 blendLeftTopRightBottom;\n uniform float blendRadius;\n\n void main() {\n vec2 coords = vec2(getOutputCoords());\n\n vec2 blendVertical = vec2(coords.x, x_sizeRC.x - coords.x) / vec2(x_sizeRC.x * blendRadius); // topBlend, bottomBlend\n vec2 blendHorizontal = vec2(coords.y, x_sizeRC.y - coords.y) / vec2(x_sizeRC.y * blendRadius); // leftBlend, rightBlend\n vec4 factorLeftTopRightBottom = clamp(vec4(blendHorizontal.x, blendVertical.x, blendHorizontal.y, blendVertical.y), vec4(0.0), vec4(1.0));\n vec4 maskVector = (vec4(1.0) - blendLeftTopRightBottom) * vec4(2.0); // [0, 1, 1, 1] becomes [2, 0, 0, 0]\n vec4 maskedFactorLeftTopRightBottom = factorLeftTopRightBottom + maskVector; // [0.25, 0.5, 1.0, 1.0] becomes [2.25, 1.0, 1.0]\n float factor = min(min(maskedFactorLeftTopRightBottom.x, maskedFactorLeftTopRightBottom.y), min(maskedFactorLeftTopRightBottom.z, maskedFactorLeftTopRightBottom.w)); // Choose the smallest blending factor\n \n vec2 uv = UVfrom2D(x_texRC, x_sizeRC, int(x_sizeRC.y), int(coords.x), int(coords.y));\n vec4 xColor = texture2D(x, uv);\n vec4 yColor = texture2D(y, uv);\n\n gl_FragColor = mix(yColor, xColor, factor);\n }\n "}}]),t}();v.prototype.availableOptions=i()({blendLeftTopRightBottom:{type:p.OptionType.ARRAY,default:[1,1,1,1]},blendRadius:{type:p.OptionType.NUMBER,default:.2}},d.b.prototype.availableOptions),t.a=v},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(4),a=(n.n(o),function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}()),s=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return a(e,null,[{key:"determineSupportedConfiguration",value:function(t){var n=!1;if(e._cachedConfigs||(e._cachedConfigs={},n=!0),e._cachedConfigs[t.id])return e._cachedConfigs[t.id];var r=t.getExtension("OES_texture_float"),i=t.FLOAT,a=t.getExtension("OES_texture_half_float"),s=null!==a?a.HALF_FLOAT_OES:null,u=null!==r,l=e._canCreateTexture(t,i,t.LUMINANCE),c=null!==a&&e._canCreateTexture(t,s,t.RGBA),f=e._canCreateTexture(t,s,t.LUMINANCE),h=u&&(t.getExtension("WEBGL_color_buffer_float")||e._canBindBuffer(t,i,t.RGBA)),p=e._canBindBuffer(t,i,t.LUMINANCE),d=e._canBindBuffer(t,s,t.LUMINANCE),_=t.FLOAT,v=t.RGBA,y="?";f?(y="Float16 Luminance",_=s,v=t.LUMINANCE):c?(y="Float16 RGBA",_=s):l?(y="Float32 Luminance",v=t.LUMINANCE):y="Float32 RGBA";var g=i,m=t.RGBA,b="?";d?(b="Float16 Luminance",g=s,m=t.LUMINANCE):p?(b="Float32 Luminance",g=i,m=t.LUMINANCE):b="Float32 RGBA",n&&o.Log.info("\nArt Filter configuration:\nWeight Textures: "+y+"\nRender Textures: "+b);var w={environmentSupported:h,weightTextureType:_,weightTextureFormat:v,renderTextureType:g,renderTextureFormat:m};return e._cachedConfigs[t.id]=w,w}},{key:"_canCreateTexture",value:function(e,t,n){var r=e.createTexture();e.bindTexture(e.TEXTURE_2D,r);var i=n===e.RGBA?4:1,o=new Uint16Array(i);t===e.FLOAT&&(o=new Float32Array(i)),1===i&&e.pixelStorei(e.UNPACK_ALIGNMENT,1),e.texImage2D(e.TEXTURE_2D,0,n,1,1,0,n,t,o),e.pixelStorei(e.UNPACK_ALIGNMENT,4);var a=e.isTexture(r),s=e.getError()!==e.NO_ERROR;return e.deleteTexture(r),a&&!s}},{key:"_canBindBuffer",value:function(e,t,n){var r=e.createTexture();e.bindTexture(e.TEXTURE_2D,r),e.texImage2D(e.TEXTURE_2D,0,n,1,1,0,n,t,null);var i=e.createFramebuffer();e.bindFramebuffer(e.FRAMEBUFFER,i),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,r,0);var o=e.checkFramebufferStatus(e.FRAMEBUFFER);return e.deleteTexture(r),e.deleteFramebuffer(i),o===e.FRAMEBUFFER_COMPLETE}}]),e}();t.a=s},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(2),a=n.n(o),s=n(3),u=n.n(s),l=n(1),c=n.n(l),f=n(11),h=n(50),p=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),d=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||c()(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=u()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(a.a?a()(e,t):e.__proto__=t)}(t,f.b),p(t,[{key:"_calculateOutputShape",value:function(){if(2!==this.getInputs().length)throw Error("AddFilter requires two inputs: x and y.");var e=this._getInputWithName("x"),t=this._getInputWithName("y");if(!h.a.isSameShape(e.logicalShape,t.logicalShape))throw Error("AddFilter inputs must have matching input shapes ("+e.logicalShape+" vs. "+t.logicalShape+").");return e.logicalShape}},{key:"_getTensorOperationSource",value:function(){return"\n void main() {\n ivec4 coords = getOutputCoords();\n float xVal = getX(coords.x, coords.y, coords.z, coords.w);\n float yVal = getY(coords.x, coords.y, coords.z, coords.w);\n \n float result = xVal + yVal;\n setOutput(result);\n }\n "}}]),t}();t.a=d},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(2),a=n.n(o),s=n(3),u=n.n(s),l=n(1),c=n.n(l),f=n(11),h=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),p=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||c()(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=u()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(a.a?a()(e,t):e.__proto__=t)}(t,f.b),h(t,[{key:"_calculateOutputShape",value:function(){return this._getInputWithName("x").logicalShape}},{key:"_getTensorOperationSource",value:function(){return"\n void main() {\n ivec4 coords = getOutputCoords();\n float x = getX(coords.x, coords.y, coords.z, coords.w);\n\n // WebGL doesn't offer tanh, taken from TFJS\n float e2x = exp(-2.0 * abs(x));\n float tanh = sign(x) * (1.0 - e2x) / (1.0 + e2x);\n\n float rgbValue = (tanh * 150.0) + 127.5;\n float clamped = clamp(rgbValue, 0.0, 255.0);\n setOutput(clamped / 255.0);\n }\n "}}]),t}();t.a=p},function(e,t,n){"use strict";var r=n(6),i=n.n(r),o=n(28),a=n.n(o),s=n(29),u=n.n(s),l=n(0),c=n.n(l),f=n(2),h=n.n(f),p=n(3),d=n.n(p),_=n(1),v=n.n(_),y=n(4),g=(n.n(y),n(11)),m=n(124),b=function(){return function(e,t){if(Array.isArray(e))return e;if(a()(Object(e)))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=u()(e);!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),w=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),c()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),x=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||v()(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=d()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(h.a?h()(e,t):e.__proto__=t)}(t,g.b),w(t,[{key:"_calculateOutputShape",value:function(){if(2!==this._options.inputs.length)throw Error("Conv2DFilter requires two inputs: x and w.");var e=this._getInputWithName("x"),t=this._getInputWithName("w"),n=b(e.logicalShape,4),r=n[0],i=n[1],o=n[2],a=(n[3],b(t.logicalShape,4)),s=a[0],u=a[1],l=a[3],c=this._options.stride,f=this._options.stride,h=m.a.calculatePadding(this._options.padding,i,o,c,f,s,u),p=h.padInfo,d=h.outHeight,_=h.outWidth;return this._outChannels=l,this._padInfo=p,[r,d,_,this._outChannels]}},{key:"_getTensorOperationSource",value:function(){var e=this._getInputWithName("x").logicalShape[3],t=this._padInfo.top,n=this._padInfo.left,r=4*Math.floor(e/4),i=e%4,o=this._options.stride;return"\n const ivec2 strides = ivec2("+o+", "+o+");\n const ivec2 pads = ivec2("+t+", "+n+");\n\n const int max_filter_iterations = 9; // Required to achieve fixed size loop\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords[0];\n int d2 = coords[3];\n\n ivec2 xRCCorner = coords.yz * strides - pads;\n int xRCorner = xRCCorner.x;\n int xCCorner = xRCCorner.y;\n\n // Convolve x(?, ?, d1) with w(:, :, d1, d2) to get y(yR, yC, d2).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n for (int wR = 0; wR < max_filter_iterations; wR++) {\n if (wR >= w_shape[0]) { break; }\n int xR = xRCorner + wR;\n if (xR < 0 || xR >= x_shape[1]) {\n continue;\n }\n\n for (int wC = 0; wC < max_filter_iterations; wC++) {\n if (wC >= w_shape[1]) { break; }\n int xC = xCCorner + wC;\n\n if (xC < 0 || xC >= x_shape[2]) {\n continue;\n }\n\n for (int d1 = 0; d1 < "+r+"; d1 += 4) {\n vec4 xValues = vec4(\n getX(batch, xR, xC, d1),\n getX(batch, xR, xC, d1 + 1),\n getX(batch, xR, xC, d1 + 2),\n getX(batch, xR, xC, d1 + 3)\n );\n vec4 wValues = vec4(\n getW(wR, wC, d1, d2),\n getW(wR, wC, d1 + 1, d2),\n getW(wR, wC, d1 + 2, d2),\n getW(wR, wC, d1 + 3, d2)\n );\n\n dotProd += dot(xValues, wValues);\n }\n\n if ("+(1===i)+") {\n dotProd +=\n getX(batch, xR, xC, "+r+") *\n getW(wR, wC, "+r+", d2);\n } else if ("+(2===i)+") {\n vec2 xValues = vec2(\n getX(batch, xR, xC, "+r+"),\n getX(batch, xR, xC, "+r+" + 1)\n );\n vec2 wValues = vec2(\n getW(wR, wC, "+r+", d2),\n getW(wR, wC, "+r+" + 1, d2)\n );\n dotProd += dot(xValues, wValues);\n } else if ("+(3===i)+") {\n vec3 xValues = vec3(\n getX(batch, xR, xC, "+r+"),\n getX(batch, xR, xC, "+r+" + 1),\n getX(batch, xR, xC, "+r+" + 2)\n );\n vec3 wValues = vec3(\n getW(wR, wC, "+r+", d2),\n getW(wR, wC, "+r+" + 1, d2),\n getW(wR, wC, "+r+" + 2, d2)\n );\n dotProd += dot(xValues, wValues);\n }\n }\n }\n setOutput(dotProd);\n }"}}]),t}();x.prototype.availableOptions=i()({stride:{type:y.OptionType.NUMBER,default:1},padding:{type:y.OptionType.STRING,default:"same"}},g.b.prototype.availableOptions),t.a=x},function(e,t,n){"use strict";var r=n(6),i=n.n(r),o=n(28),a=n.n(o),s=n(29),u=n.n(s),l=n(0),c=n.n(l),f=n(2),h=n.n(f),p=n(3),d=n.n(p),_=n(1),v=n.n(_),y=n(4),g=(n.n(y),n(11)),m=n(124),b=function(){return function(e,t){if(Array.isArray(e))return e;if(a()(Object(e)))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=u()(e);!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),w=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),c()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),x=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||v()(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=d()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(h.a?h()(e,t):e.__proto__=t)}(t,g.b),w(t,[{key:"_calculateOutputShape",value:function(){if(2!==this.getInputs().length)throw Error("DepthwiseConv2DFilter requires two inputs: x and w.");var e=this._getInputWithName("x"),t=this._getInputWithName("w"),n=b(e.logicalShape,4),r=n[0],i=n[1],o=n[2],a=n[3],s=b(t.logicalShape,4),u=s[0],l=s[1],c=s[3];if(u>9||l>9)throw new Error("Filter heights are limited to 9. Change shader source if larger ones are required.");var f=this._options.stride,h=this._options.stride,p=m.a.calculatePadding(this._options.padding,i,o,f,h,u,l),d=p.padInfo,_=p.outHeight,v=p.outWidth;return this._outChannels=c*a,this._padInfo=d,[r,_,v,this._outChannels]}},{key:"_getTensorOperationSource",value:function(){var e,t=this._padInfo.top,n=this._padInfo.left,r=this._options,i=r.stride,o=r.padMethod;switch(o){case"zero":e="return coords;";break;case"edge":e="return ivec4(clamp(vec4(coords), vec4(0.0), vec4(x_shape - 1)));"}return"\n const ivec2 strides = ivec2("+i+", "+i+");\n const ivec2 pads = ivec2("+t+", "+n+");\n const int max_filter_iterations = 9; // Required to achieve fixed size loop\n\n \n ivec4 convertCoordinatesForPadding(ivec4 coords) {\n "+e+"\n }\n \n\n void main() {\n ivec4 coords = getOutputCoords();\n\n int batch = coords.x;\n ivec2 xRCCorner = coords.yz * strides - pads; // current coordinates in x\n int d2 = coords.w; // current channel index\n int outChannels = w_shape[3] * x_shape[3];\n int d1 = d2; // currently probed channel\n int q = d2 - d1; // current filter index\n\n int xRCorner = xRCCorner.x; // row index\n int xCCorner = xRCCorner.y; // column index\n\n // Convolve x(?, ?, d1) with w(:, :, d1, q) to get y(yR, yC, d2).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n for (int wR = 0; wR < max_filter_iterations; wR++) {\n if (wR >= w_shape[0]) { break; }\n\n int xR = xRCorner + wR; // x row index = current index + offset * y dilation\n "+("zero"===o?"if (xR < 0 || xR >= x_shape[1]) { continue; }":"")+"\n\n for (int wC = 0; wC < max_filter_iterations; wC++) {\n if (wC >= w_shape[1]) { break; }\n\n int xC = xCCorner + wC; // x column index = current index + offset * x dilation\n "+("zero"===o?"if (xC < 0 || xC >= x_shape[2]) { continue; }":"")+"\n\n float xVal = getX(convertCoordinatesForPadding(ivec4(batch, xR, xC, d1))); // Get value at current [batch, y, x, channel]\n float wVal = getW(wR, wC, d1, q); // Get kernel value at current \n dotProd += xVal * wVal;\n }\n }\n setOutput(dotProd);\n }\n "}}]),t}();x.prototype.availableOptions=i()({stride:{type:y.OptionType.NUMBER},padding:{type:y.OptionType.STRING,default:"same"},padMethod:{type:y.OptionType.STRING,default:"zero"}},g.b.prototype.availableOptions),t.a=x},function(e,t,n){"use strict";var r=n(6),i=n.n(r),o=n(28),a=n.n(o),s=n(29),u=n.n(s),l=n(0),c=n.n(l),f=n(2),h=n.n(f),p=n(3),d=n.n(p),_=n(1),v=n.n(_),y=n(4),g=(n.n(y),n(11)),m=n(50),b=function(){return function(e,t){if(Array.isArray(e))return e;if(a()(Object(e)))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=u()(e);!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),w=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),c()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),x=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||v()(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=d()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(h.a?h()(e,t):e.__proto__=t)}(t,g.b),w(t,[{key:"_calculateOutputShape",value:function(){var e=this._getInputWithName("x").logicalShape[0],t=this._options,n=t.batchSize,r=t.windowSize;return[Math.ceil(e/r),n]}},{key:"_getTensorOperationSource",value:function(){var e=this._options.windowSize,t=this._getInputWithName("x").logicalShape[0],n=4*Math.floor(e/4),r=e%4,i="";return t%e>0&&(i="\n if (inIdx < 0 || inIdx >= x_shape[0]) {\n return initalizationValue;\n }\n "),"\n const float initializationValue = 0.0;\n const vec4 ones = vec4(1.0, 1.0, 1.0, 1.0);\n\n float getValue(int batch, int inIdx) {\n "+i+"\n return getX(batch, inIdx);\n }\n\n void main() {\n // row, col\n ivec2 coords = getOutputCoords();\n int batch = coords[1];\n int outIdx = coords[0];\n int inOffset = outIdx * "+e+";\n float sumValue = 0.0;\n\n for (int i = 0; i < "+n+"; i += 4) {\n int inIdx = inOffset + i;\n vec4 values = vec4(\n // row, col\n getValue(inIdx, batch),\n getValue(inIdx + 1, batch),\n getValue(inIdx + 2, batch),\n getValue(inIdx + 3, batch)\n );\n\n sumValue += dot(values, ones);\n }\n\n int inIdx = inOffset + "+n+";\n if ("+(1===r)+") {\n vec4 values = vec4(\n getValue(inIdx, batch),\n initializationValue,\n initializationValue,\n initializationValue\n );\n\n sumValue += dot(values, ones);\n } else if ("+(2===r)+") {\n vec4 values = vec4(\n getValue(inIdx, batch),\n getValue(inIdx + 1, batch),\n initializationValue,\n initializationValue\n );\n\n sumValue += dot(values, ones);\n } else if ("+(3===r)+") {\n vec4 values = vec4(\n getValue(inIdx, batch),\n getValue(inIdx + 1, batch),\n getValue(inIdx + 2, batch),\n initializationValue\n );\n\n sumValue += dot(values, ones);\n }\n setOutput(sumValue);\n }\n "}}],[{key:"addFiltersForReduceSumOperationToGraph",value:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[1,2],i=e.getLogicalShapeAtIndex(n),o=t._computeOutAndReduceShape(i,r),a=b(o,2),s=(a[0],a[1]),u=m.a.getSizeOfLogicalShape(s),l=[u,m.a.getSizeOfLogicalShape(i)/u],c=n===e.getLastIndex(),f={name:"x",logicalShape:l,type:c?g.a.PREVIOUS:g.a.INDEX};c||(f.data=n);var h=t._buildReduceFilter(f);e.addFilter(h,!1);for(var p=h.outputLogicalShape();1!==p[0];){var d={name:"x",type:g.a.PREVIOUS,logicalShape:h.outputLogicalShape()};p=(h=t._buildReduceFilter(d)).outputLogicalShape(),e.addFilter(h)}return e.getLastIndex()}},{key:"_buildReduceFilter",value:function(e){var n=b(e.logicalShape,2),r=n[0],i=n[1];return new t({inputs:[e],windowSize:t._computeWindowSize(r),batchSize:i})}},{key:"_computeWindowSize",value:function(e){if(e<=30)return e;for(var t=Math.floor(Math.sqrt(e));t<e;++t)if(e%t==0)return t;return e}},{key:"_computeOutAndReduceShape",value:function(e,t){for(var n=[],r=e.length,i=0;i<r;i++)-1===t.indexOf(i)&&n.push(e[i]);return[n,t.map(function(t){return e[t]})]}}]),t}();x.prototype.availableOptions=i()({axes:{type:y.OptionType.ARRAY,default:[1,2]},windowSize:{type:y.OptionType.NUMBER},batchSize:{type:y.OptionType.NUMBER}},g.b.prototype.availableOptions),t.a=x},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(2),a=n.n(o),s=n(3),u=n.n(s),l=n(1),c=n.n(l),f=n(11),h=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),p=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||c()(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=u()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(a.a?a()(e,t):e.__proto__=t)}(t,f.b),h(t,[{key:"_calculateOutputShape",value:function(){return this._getInputWithName("x").logicalShape}},{key:"_getTensorOperationSource",value:function(){return"\n void main ()\n {\n ivec4 coords = getOutputCoords();\n float numValuesPerChannel = float(x_shape[1] * x_shape[2]);\n\n // 'Sum' input consists of a single value which holds the sum of all elements in x\n float xSum = getSumFlat(coords.w);\n\n // 'X' is a 4D tensor holding arbitrary float values\n float x = getX(coords.x, coords.y, coords.z, coords.w);\n\n // Calculate the mean\n float mean = xSum / numValuesPerChannel;\n\n // Calculate a single variance component (x_i - mean)^2\n float result = pow((x - mean), 2.0);\n setOutput(result);\n }\n "}}]),t}();t.a=p},function(e,t,n){"use strict";var r=n(6),i=n.n(r),o=n(0),a=n.n(o),s=n(2),u=n.n(s),l=n(3),c=n.n(l),f=n(1),h=n.n(f),p=n(4),d=(n.n(p),n(11)),_=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),a()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),v=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||h()(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=c()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(u.a?u()(e,t):e.__proto__=t)}(t,d.b),_(t,[{key:"_calculateOutputShape",value:function(){var e=this._getInputWithName("x"),t=this._getInputWithName("variance"),n=this._getInputWithName("sum"),r=e.logicalShape[3];if(t.logicalShape[1]!==r||n.logicalShape[1]!==r)throw new Error("Variance and sum input depth must match x inputs channels for InstanceNormReluFilter.");return e.logicalShape}},{key:"_getTensorOperationSource",value:function(){return"\n void main ()\n {\n float numValuesPerChannel = float(x_shape[1] * x_shape[2]);\n ivec4 coords = getOutputCoords();\n float x = getX(coords.x, coords.y, coords.z, coords.w);\n\n // 'variance' input consists of a single value per channel which holds the sum of all values in x reduced by it's mean and squared afterwards\n float nonMeanedVariance = getVarianceFlat(coords.w);\n float variance = nonMeanedVariance / numValuesPerChannel;\n\n // 'sum' input consists of a single value per channel which holds the sum of all elements in x\n float xSum = getSumFlat(coords.w);\n float mean = xSum / numValuesPerChannel;\n\n float netmu = x - mean;\n float sigmaEpsilonSqrt = sqrt(variance + 0.001);\n\n float normalized = netmu / sigmaEpsilonSqrt;\n \n // Calculate the instance normalized value of x\n float shift = getShiftFlat(coords.w);\n float scale = getScaleFlat(coords.w);\n float result = (scale * normalized) + shift;\n\n // If it's not NaN, calculate relu\n "+(this.getAddRelu()?"\n if (isNaN(result)) {\n setOutput(result);\n } else {\n float relu = (result < 0.0) ? 0.0 : result;\n setOutput(relu);\n }\n ":"setOutput(result);")+"\n }\n "}}]),t}();v.prototype.availableOptions=i()({shift:{type:p.OptionType.NUMBER},scale:{type:p.OptionType.NUMBER},addRelu:{type:p.OptionType.BOOLEAN,default:!0}},d.b.prototype.availableOptions),t.a=v},function(e,t,n){"use strict";var r=n(6),i=n.n(r),o=n(28),a=n.n(o),s=n(29),u=n.n(s),l=n(0),c=n.n(l),f=n(2),h=n.n(f),p=n(3),d=n.n(p),_=n(1),v=n.n(_),y=n(4),g=(n.n(y),n(11)),m=function(){return function(e,t){if(Array.isArray(e))return e;if(a()(Object(e)))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=u()(e);!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),b=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),c()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),w=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||v()(t)).call.apply(e,[this].concat(r)));return o._uniforms.sourceSizeRC={type:y.UniformType.FLOAT2,value:[0,0]},o._uniforms.targetSizeRC={type:y.UniformType.FLOAT2,value:[0,0]},o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=d()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(h.a?h()(e,t):e.__proto__=t)}(t,g.b),b(t,[{key:"_calculateOutputShape",value:function(){var e=this._getInputWithName("x"),t=m(e.logicalShape,4),n=t[0],r=t[3],i=m(this._options.size,2);return[n,i[0],i[1],r]}},{key:"_updateAdditionalUniforms",value:function(e){var t=m(this._getInputWithName("x").logicalShape,3),n=(t[0],t[1]),r=t[2],i={targetSizeRC:this.getSize(),sourceSizeRC:[n,r]};e.setUniforms(i)}},{key:"_getTensorOperationSource",value:function(){return"\n uniform vec2 sourceSizeRC;\n uniform vec2 targetSizeRC;\n\n void main() {\n vec2 effectiveInSize = sourceSizeRC - vec2(1.0, 1.0);\n vec2 effectiveOutSize = targetSizeRC - vec2(1.0, 1.0);\n vec2 effectiveInputOverOutputRatioRC = effectiveInSize / effectiveOutSize;\n\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n ivec2 yRC = coords.yz;\n\n // Fractional source index\n vec2 sourceFracIndexRC = vec2(yRC) * effectiveInputOverOutputRatioRC;\n\n // Compute the four integer indices\n ivec2 sourceFloorRC = ivec2(sourceFracIndexRC);\n ivec2 sourceCeilRC = ivec2(min(sourceSizeRC - 1.0, ceil(sourceFracIndexRC)));\n\n float topLeft = getX(b, sourceFloorRC.x, sourceFloorRC.y, d);\n float bottomLeft = getX(b, sourceCeilRC.x, sourceFloorRC.y, d);\n float topRight = getX(b, sourceFloorRC.x, sourceCeilRC.y, d);\n float bottomRight = getX(b, sourceCeilRC.x, sourceCeilRC.y, d);\n\n vec2 fracRC = sourceFracIndexRC - vec2(sourceFloorRC);\n\n float top = topLeft + (topRight - topLeft) * fracRC.y;\n float bottom = bottomLeft + (bottomRight - bottomLeft) * fracRC.y;\n float newValue = top + (bottom - top) * fracRC.x;\n\n setOutput(newValue);\n }\n "}}]),t}();w.prototype.availableOptions=i()({size:{type:y.OptionType.ARRAY,required:!0},alignCorners:{type:y.OptionType.BOOLEAN,default:!0}},g.b.prototype.availableOptions),t.a=w},function(e,t,n){"use strict";var r=n(6),i=n.n(r),o=n(0),a=n.n(o),s=n(2),u=n.n(s),l=n(3),c=n.n(l),f=n(1),h=n.n(f),p=n(11),d=n(4),_=(n.n(d),function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),a()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}()),v=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||h()(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=c()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(u.a?u()(e,t):e.__proto__=t)}(t,p.b),_(t,[{key:"_calculateOutputShape",value:function(){var e=this._options.paddings;if(1===!this.getInputs().length||0===this.getInputs().length)throw new Error("ReflectionPadFilter requires single input.");var t=this.getInputs()[0].logicalShape;if(e.length!==t.length)throw new Error("Not enough or too many paddings for input shape "+t);return e.map(function(e,n){return e[0]+t[n]+e[1]})}},{key:"_getTensorOperationSource",value:function(){var e=this.getInputs()[0].logicalShape.length,t="vec"+e;return"\n i"+t+" start = i"+t+"("+this._options.paddings.map(function(e){return e[0]}).join(",")+");\n\n void main () {\n i"+t+" outC = getOutputCoords();\n "+t+" coordsInInput = "+t+"(outC - start);\n i"+t+" coords = i"+t+"(clamp(coordsInInput, "+t+"(0.0), "+t+"(x_shape - 1)));\n setOutput(getX("+["coords[0]","coords[1]","coords[2]","coords[3]"].slice(0,e).join(",")+"));\n }\n "}}]),t}();v.prototype.availableOptions=i()({paddings:{type:d.OptionType.ARRAY,required:!0}},p.b.prototype.availableOptions),t.a=v},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(2),a=n.n(o),s=n(3),u=n.n(s),l=n(1),c=n.n(l),f=n(11),h=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),p=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||c()(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=u()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(a.a?a()(e,t):e.__proto__=t)}(t,f.b),h(t,[{key:"_calculateOutputShape",value:function(){return this._getInputWithName("x").logicalShape}},{key:"_getTensorOperationSource",value:function(){return"\n float kernel[9];\n vec2 offset[9];\n float factor = 0.1;\n \n void main ()\n {\n kernel[0] = 0.;\n kernel[1] = -1. * factor;\n kernel[2] = 0.;\n kernel[3] = -1. * factor;\n kernel[4] = 1. + 4. * factor;\n kernel[5] = -1. * factor;\n kernel[6] = 0.;\n kernel[7] = -1. * factor;\n kernel[8] = 0.;\n\n float step_w = 1.0 / float(x_sizeRC.y);\n float step_h = 1.0 / float(x_sizeRC.x);\n\n offset[0] = vec2(-step_w, -step_h);\n offset[1] = vec2(0.0, -step_h);\n offset[2] = vec2(step_w, -step_h);\n offset[3] = vec2(-step_w, 0.0);\n offset[4] = vec2(0.0, 0.0);\n offset[5] = vec2(step_w, 0.0);\n offset[6] = vec2(-step_w, step_h);\n offset[7] = vec2(0.0, step_h);\n offset[8] = vec2(step_w, step_h);\n\n vec2 uv = (gl_FragCoord.xy + halfCR) / x_texRC.yx;\n vec4 sum = vec4(0.0);\n for (int i = 0; i < 9; i++) {\n vec4 color = texture2D(x, uv.xy + offset[i]);\n sum += color * kernel[i];\n }\n\n gl_FragColor = sum;\n }\n "}},{key:"requiresFloatTextures",value:function(){return!1}}]),t}();t.a=p},function(e,t,n){e.exports=n(4),n(285)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(125),i=n(282),o=(n.n(i),n(155)),a=n(156),s=n(78),u=n(61),l=n(157),c=n(62),f=n(27),h=n(283),p=n(159),d=n(111),_=n(81),v=n(39),y=n(65),g=n(33),m=n(161),b=n(34),w=n(60);r.a.version=n(160).version,r.a.Math=o,r.a.Operations=a,r.a.Engine=s.a,r.a.Color=u.a,r.a.Operation=l.a,r.a.EventEmitter=c.a,r.a.Utils=f.a,r.a.Env=h.a,r.a.OperationsStack=p.a,r.a.EXIF=d.a,r.a.Image=_.a,r.a.Promise=v.a,r.a.Configurable=y.a,r.a.Log=g.a,r.a.Loaders=m,r.a.RenderType=b.RenderType,r.a.ImageFormat=b.ImageFormat,r.a.OptionType=b.OptionType,r.a.RendererType=b.RendererType,r.a.UniformType=b.UniformType,r.a.Base64=w.a,r.a.UI={},t.default=r.a},function(e,t,n){n(43),n(57),e.exports=n(94).f("iterator")},function(e,t,n){var r=n(85),i=n(86);e.exports=function(e){return function(t,n){var o,a,s=String(i(t)),u=r(n),l=s.length;return u<0||u>=l?e?"":void 0:(o=s.charCodeAt(u))<55296||o>56319||u+1===l||(a=s.charCodeAt(u+1))<56320||a>57343?e?s.charAt(u):o:e?s.slice(u,u+2):a-56320+(o-55296<<10)+65536}}},function(e,t,n){"use strict";var r=n(73),i=n(53),o=n(56),a={};n(31)(a,n(14)("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=r(a,{next:i(1,n)}),o(e,t+" Iterator")}},function(e,t,n){var r=n(19),i=n(24),o=n(54);e.exports=n(25)?Object.defineProperties:function(e,t){i(e);for(var n,a=o(t),s=a.length,u=0;s>u;)r.f(e,n=a[u++],t[n]);return e}},function(e,t,n){var r=n(37),i=n(74),o=n(195);e.exports=function(e){return function(t,n,a){var s,u=r(t),l=i(u.length),c=o(a,l);if(e&&n!=n){for(;l>c;)if((s=u[c++])!=s)return!0}else for(;l>c;c++)if((e||c in u)&&u[c]===n)return e||c||0;return!e&&-1}}},function(e,t,n){var r=n(85),i=Math.max,o=Math.min;e.exports=function(e,t){return(e=r(e))<0?i(e+t,0):o(e,t)}},function(e,t,n){"use strict";var r=n(197),i=n(131),o=n(44),a=n(37);e.exports=n(87)(Array,"Array",function(e,t){this._t=a(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,i(1)):i(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])},"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(e,t){e.exports=function(){}},function(e,t,n){n(199),n(99),n(202),n(203),e.exports=n(9).Symbol},function(e,t,n){"use strict";var r=n(13),i=n(36),o=n(25),a=n(12),s=n(127),u=n(95).KEY,l=n(35),c=n(92),f=n(56),h=n(75),p=n(14),d=n(94),_=n(96),v=n(200),y=n(132),g=n(24),m=n(20),b=n(37),w=n(89),x=n(53),T=n(73),k=n(201),R=n(98),C=n(19),E=n(54),O=R.f,S=C.f,A=k.f,I=r.Symbol,F=r.JSON,D=F&&F.stringify,M=p("_hidden"),B=p("toPrimitive"),L={}.propertyIsEnumerable,P=c("symbol-registry"),N=c("symbols"),U=c("op-symbols"),z=Object.prototype,G="function"==typeof I,j=r.QObject,V=!j||!j.prototype||!j.prototype.findChild,W=o&&l(function(){return 7!=T(S({},"a",{get:function(){return S(this,"a",{value:7}).a}})).a})?function(e,t,n){var r=O(z,t);r&&delete z[t],S(e,t,n),r&&e!==z&&S(z,t,r)}:S,H=function(e){var t=N[e]=T(I.prototype);return t._k=e,t},X=G&&"symbol"==typeof I.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof I},q=function(e,t,n){return e===z&&q(U,t,n),g(e),t=w(t,!0),g(n),i(N,t)?(n.enumerable?(i(e,M)&&e[M][t]&&(e[M][t]=!1),n=T(n,{enumerable:x(0,!1)})):(i(e,M)||S(e,M,x(1,{})),e[M][t]=!0),W(e,t,n)):S(e,t,n)},Y=function(e,t){g(e);for(var n,r=v(t=b(t)),i=0,o=r.length;o>i;)q(e,n=r[i++],t[n]);return e},Q=function(e){var t=L.call(this,e=w(e,!0));return!(this===z&&i(N,e)&&!i(U,e))&&(!(t||!i(this,e)||!i(N,e)||i(this,M)&&this[M][e])||t)},Z=function(e,t){if(e=b(e),t=w(t,!0),e!==z||!i(N,t)||i(U,t)){var n=O(e,t);return!n||!i(N,t)||i(e,M)&&e[M][t]||(n.enumerable=!0),n}},J=function(e){for(var t,n=A(b(e)),r=[],o=0;n.length>o;)i(N,t=n[o++])||t==M||t==u||r.push(t);return r},K=function(e){for(var t,n=e===z,r=A(n?U:b(e)),o=[],a=0;r.length>a;)!i(N,t=r[a++])||n&&!i(z,t)||o.push(N[t]);return o};G||(s((I=function(){if(this instanceof I)throw TypeError("Symbol is not a constructor!");var e=h(arguments.length>0?arguments[0]:void 0),t=function(n){this===z&&t.call(U,n),i(this,M)&&i(this[M],e)&&(this[M][e]=!1),W(this,e,x(1,n))};return o&&V&&W(z,e,{configurable:!0,set:t}),H(e)}).prototype,"toString",function(){return this._k}),R.f=Z,C.f=q,n(133).f=k.f=J,n(76).f=Q,n(97).f=K,o&&!n(51)&&s(z,"propertyIsEnumerable",Q,!0),d.f=function(e){return H(p(e))}),a(a.G+a.W+a.F*!G,{Symbol:I});for(var $="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ee=0;$.length>ee;)p($[ee++]);for(var te=E(p.store),ne=0;te.length>ne;)_(te[ne++]);a(a.S+a.F*!G,"Symbol",{for:function(e){return i(P,e+="")?P[e]:P[e]=I(e)},keyFor:function(e){if(!X(e))throw TypeError(e+" is not a symbol!");for(var t in P)if(P[t]===e)return t},useSetter:function(){V=!0},useSimple:function(){V=!1}}),a(a.S+a.F*!G,"Object",{create:function(e,t){return void 0===t?T(e):Y(T(e),t)},defineProperty:q,defineProperties:Y,getOwnPropertyDescriptor:Z,getOwnPropertyNames:J,getOwnPropertySymbols:K}),F&&a(a.S+a.F*(!G||l(function(){var e=I();return"[null]"!=D([e])||"{}"!=D({a:e})||"{}"!=D(Object(e))})),"JSON",{stringify:function(e){for(var t,n,r=[e],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=t=r[1],(m(t)||void 0!==e)&&!X(e))return y(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!X(t))return t}),r[1]=t,D.apply(F,r)}}),I.prototype[B]||n(31)(I.prototype,B,I.prototype.valueOf),f(I,"Symbol"),f(Math,"Math",!0),f(r.JSON,"JSON",!0)},function(e,t,n){var r=n(54),i=n(97),o=n(76);e.exports=function(e){var t=r(e),n=i.f;if(n)for(var a,s=n(e),u=o.f,l=0;s.length>l;)u.call(e,a=s[l++])&&t.push(a);return t}},function(e,t,n){var r=n(37),i=n(133).f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&"[object Window]"==o.call(e)?function(e){try{return i(e)}catch(e){return a.slice()}}(e):i(r(e))}},function(e,t,n){n(96)("asyncIterator")},function(e,t,n){n(96)("observable")},function(e,t,n){n(205);var r=n(9).Object;e.exports=function(e,t,n){return r.defineProperty(e,t,n)}},function(e,t,n){var r=n(12);r(r.S+r.F*!n(25),"Object",{defineProperty:n(19).f})},function(e,t,n){n(207),e.exports=n(9).Object.setPrototypeOf},function(e,t,n){var r=n(12);r(r.S,"Object",{setPrototypeOf:n(208).set})},function(e,t,n){var r=n(20),i=n(24),o=function(e,t){if(i(e),!r(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,r){try{(r=n(26)(Function.call,n(98).f(Object.prototype,"__proto__").set,2))(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,n){return o(e,n),t?e.__proto__=n:r(e,n),e}}({},!1):void 0),check:o}},function(e,t,n){n(210);var r=n(9).Object;e.exports=function(e,t){return r.create(e,t)}},function(e,t,n){var r=n(12);r(r.S,"Object",{create:n(73)})},function(e,t,n){n(99),n(43),n(57),n(212),n(216),n(217),e.exports=n(9).Promise},function(e,t,n){"use strict";var r,i,o,a,s=n(51),u=n(13),l=n(26),c=n(77),f=n(12),h=n(20),p=n(52),d=n(100),_=n(58),v=n(136),y=n(102).set,g=n(214)(),m=n(103),b=n(137),w=n(215),x=n(138),T=u.TypeError,k=u.process,R=k&&k.versions,C=R&&R.v8||"",E=u.Promise,O="process"==c(k),S=function(){},A=i=m.f,I=!!function(){try{var e=E.resolve(1),t=(e.constructor={})[n(14)("species")]=function(e){e(S,S)};return(O||"function"==typeof PromiseRejectionEvent)&&e.then(S)instanceof t&&0!==C.indexOf("6.6")&&-1===w.indexOf("Chrome/66")}catch(e){}}(),F=function(e){var t;return!(!h(e)||"function"!=typeof(t=e.then))&&t},D=function(e,t){if(!e._n){e._n=!0;var n=e._c;g(function(){for(var r=e._v,i=1==e._s,o=0;n.length>o;)!function(t){var n,o,a,s=i?t.ok:t.fail,u=t.resolve,l=t.reject,c=t.domain;try{s?(i||(2==e._h&&L(e),e._h=1),!0===s?n=r:(c&&c.enter(),n=s(r),c&&(c.exit(),a=!0)),n===t.promise?l(T("Promise-chain cycle")):(o=F(n))?o.call(n,u,l):u(n)):l(r)}catch(e){c&&!a&&c.exit(),l(e)}}(n[o++]);e._c=[],e._n=!1,t&&!e._h&&M(e)})}},M=function(e){y.call(u,function(){var t,n,r,i=e._v,o=B(e);if(o&&(t=b(function(){O?k.emit("unhandledRejection",i,e):(n=u.onunhandledrejection)?n({promise:e,reason:i}):(r=u.console)&&r.error&&r.error("Unhandled promise rejection",i)}),e._h=O||B(e)?2:1),e._a=void 0,o&&t.e)throw t.v})},B=function(e){return 1!==e._h&&0===(e._a||e._c).length},L=function(e){y.call(u,function(){var t;O?k.emit("rejectionHandled",e):(t=u.onrejectionhandled)&&t({promise:e,reason:e._v})})},P=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),D(t,!0))},N=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw T("Promise can't be resolved itself");(t=F(e))?g(function(){var r={_w:n,_d:!1};try{t.call(e,l(N,r,1),l(P,r,1))}catch(e){P.call(r,e)}}):(n._v=e,n._s=1,D(n,!1))}catch(e){P.call({_w:n,_d:!1},e)}}};I||(E=function(e){d(this,E,"Promise","_h"),p(e),r.call(this);try{e(l(N,this,1),l(P,this,1))}catch(e){P.call(this,e)}},(r=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(104)(E.prototype,{then:function(e,t){var n=A(v(this,E));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=O?k.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&D(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),o=function(){var e=new r;this.promise=e,this.resolve=l(N,e,1),this.reject=l(P,e,1)},m.f=A=function(e){return e===E||e===a?new o(e):i(e)}),f(f.G+f.W+f.F*!I,{Promise:E}),n(56)(E,"Promise"),n(139)("Promise"),a=n(9).Promise,f(f.S+f.F*!I,"Promise",{reject:function(e){var t=A(this);return(0,t.reject)(e),t.promise}}),f(f.S+f.F*(s||!I),"Promise",{resolve:function(e){return x(s&&this===a?E:this,e)}}),f(f.S+f.F*!(I&&n(140)(function(e){E.all(e).catch(S)})),"Promise",{all:function(e){var t=this,n=A(t),r=n.resolve,i=n.reject,o=b(function(){var n=[],o=0,a=1;_(e,!1,function(e){var s=o++,u=!1;n.push(void 0),a++,t.resolve(e).then(function(e){u||(u=!0,n[s]=e,--a||r(n))},i)}),--a||r(n)});return o.e&&i(o.v),n.promise},race:function(e){var t=this,n=A(t),r=n.reject,i=b(function(){_(e,!1,function(e){t.resolve(e).then(n.resolve,r)})});return i.e&&r(i.v),n.promise}})},function(e,t){e.exports=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},function(e,t,n){var r=n(13),i=n(102).set,o=r.MutationObserver||r.WebKitMutationObserver,a=r.process,s=r.Promise,u="process"==n(55)(a);e.exports=function(){var e,t,n,l=function(){var r,i;for(u&&(r=a.domain)&&r.exit();e;){i=e.fn,e=e.next;try{i()}catch(r){throw e?n():t=void 0,r}}t=void 0,r&&r.enter()};if(u)n=function(){a.nextTick(l)};else if(!o||r.navigator&&r.navigator.standalone)if(s&&s.resolve){var c=s.resolve(void 0);n=function(){c.then(l)}}else n=function(){i.call(r,l)};else{var f=!0,h=document.createTextNode("");new o(l).observe(h,{characterData:!0}),n=function(){h.data=f=!f}}return function(r){var i={fn:r,next:void 0};t&&(t.next=i),e||(e=i,n()),t=i}}},function(e,t,n){var r=n(13).navigator;e.exports=r&&r.userAgent||""},function(e,t,n){"use strict";var r=n(12),i=n(9),o=n(13),a=n(136),s=n(138);r(r.P+r.R,"Promise",{finally:function(e){var t=a(this,i.Promise||o.Promise),n="function"==typeof e;return this.then(n?function(n){return s(t,e()).then(function(){return n})}:e,n?function(n){return s(t,e()).then(function(){throw n})}:e)}})},function(e,t,n){"use strict";var r=n(12),i=n(103),o=n(137);r(r.S,"Promise",{try:function(e){var t=i.f(this),n=o(e);return(n.e?t.reject:t.resolve)(n.v),t.promise}})},function(e,t,n){n(219),e.exports=n(9).Object.getPrototypeOf},function(e,t,n){var r=n(45),i=n(130);n(105)("getPrototypeOf",function(){return function(e){return i(r(e))}})},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(2),a=n.n(o),s=n(3),u=n.n(s),l=n(1),c=n.n(l),f=n(10),h=n(145),p=n(147),d=n(79),_=n(106),v=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),y=f.c.RendererType,g=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||c()(t)).call.apply(e,[this].concat(r)));return o._type=y.CANVAS,o.setCanvas(o._options.canvas||o._createCanvas()),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=u()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(a.a?a()(e,t):e.__proto__=t)}(t,p.a),v(t,[{key:"_createCanvas",value:function(){return f.i.createCanvas()}},{key:"_createContext",value:function(){var e=this._canvas.getContext("2d");return this._options.debug&&(e=new h.a(e)),this.id=e.id=t.contextId++,this._context=e,e.renderer=this,this.emit("context",e),e}},{key:"_setupContext",value:function(){var e=this._context;"imageSmoothingEnabled"in e?e.imageSmoothingEnabled=!0:["moz","webkit","ms"].forEach(function(t){e[t]&&(e[t]=!0)}),this._defaultRenderTarget=new d.a(this._width,this._height,this._pixelRatio,this._canvas,this._context),this.setRenderTarget(this._defaultRenderTarget),this._filterManager=new _.a(this)}},{key:"render",value:function(e){var t=this._renderTarget.getContext(),n=e.getParent();e.setParent(this._fakeObject),e.updateTransform(),e.setParent(n),t.setTransform(1,0,0,1,0,0),t.globalAlpha=1;var r=this._canvas,i=r.width,o=r.height;t.clearRect(0,0,i,o),0!==this._clearColor.a&&(t.save(),t.fillStyle=this._clearColor.toRGBA(),t.fillRect(0,0,i,o),t.restore()),this.renderDisplayObject(e,this._renderTarget)}},{key:"renderDisplayObject",value:function(e,t){var n=this._renderTarget;this._filterManager.setFilterStack(t.getFilterStack()),this.setRenderTarget(t),e.renderCanvas(this),this.setRenderTarget(n)}},{key:"getCurrentRenderTarget",value:function(){return this._renderTarget}},{key:"setRenderTarget",value:function(e){this._renderTarget=e}},{key:"getContext",value:function(){return this._renderTarget.getContext()}},{key:"dispose",value:function(){this._filterManager.dispose()}}]),t}();g.contextId=0,g.type="Canvas2D",t.a=g},function(e,t,n){n(43),n(222),e.exports=n(9).Array.from},function(e,t,n){"use strict";var r=n(26),i=n(12),o=n(45),a=n(134),s=n(135),u=n(74),l=n(223),c=n(101);i(i.S+i.F*!n(140)(function(e){Array.from(e)}),"Array",{from:function(e){var t,n,i,f,h=o(e),p="function"==typeof this?this:Array,d=arguments.length,_=d>1?arguments[1]:void 0,v=void 0!==_,y=0,g=c(h);if(v&&(_=r(_,d>2?arguments[2]:void 0,2)),void 0==g||p==Array&&s(g))for(n=new p(t=u(h.length));t>y;y++)l(n,y,v?_(h[y],y):h[y]);else for(f=g.call(h),n=new p;!(i=f.next()).done;y++)l(n,y,v?a(f,_,[i.value,y],!0):i.value);return n.length=y,n}})},function(e,t,n){"use strict";var r=n(19),i=n(53);e.exports=function(e,t,n){t in e?r.f(e,t,i(0,n)):e[t]=n}},function(e,t,n){e.exports={default:n(225),__esModule:!0}},function(e,t,n){var r=n(9),i=r.JSON||(r.JSON={stringify:JSON.stringify});e.exports=function(e){return i.stringify.apply(i,arguments)}},function(e,t,n){n(227),e.exports=n(9).Object.assign},function(e,t,n){var r=n(12);r(r.S+r.F,"Object",{assign:n(228)})},function(e,t,n){"use strict";var r=n(54),i=n(97),o=n(76),a=n(45),s=n(90),u=Object.assign;e.exports=!u||n(35)(function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=u({},e)[n]||Object.keys(u({},t)).join("")!=r})?function(e,t){for(var n=a(e),u=arguments.length,l=1,c=i.f,f=o.f;u>l;)for(var h,p=s(arguments[l++]),d=c?r(p).concat(c(p)):r(p),_=d.length,v=0;_>v;)f.call(p,h=d[v++])&&(n[h]=p[h]);return n}:u},function(e,t,n){n(230),e.exports=n(9).Object.keys},function(e,t,n){var r=n(45),i=n(54);n(105)("keys",function(){return function(e){return i(r(e))}})},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return o(e,null,[{key:"head",value:function(e){return e[0]}},{key:"tail",value:function(e){return e.slice(1)}},{key:"last",value:function(e){return e[e.length-1]}},{key:"init",value:function(e){return e.slice(0,e.length-1)}},{key:"remove",value:function(e,t){return e.filter(function(e,n,r){return!t(e,n,r)})}},{key:"findIndex",value:function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1}},{key:"find",value:function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return e[n]}},{key:"flatten",value:function(t){return t.reduce(function(t,n){return t.concat(Array.isArray(n)?e.flatten(n):n)},[])}},{key:"range",value:function(e,t){var n=[];if(t>e)for(var r=e;r<t;r++)n.push(r);return n}},{key:"repeat",value:function(e,t){for(var n=[],r=0;r<t;r++)n[r]=e;return n}},{key:"zip",value:function(e,t){for(var n=Math.min(e.length,t.length),r=[],i=0;i<n;i++)r[i]=[e[i],t[i]];return r}}]),e}();t.a=a},function(e,t,n){n(57),n(43),e.exports=n(233)},function(e,t,n){var r=n(77),i=n(14)("iterator"),o=n(44);e.exports=n(9).isIterable=function(e){var t=Object(e);return void 0!==t[i]||"@@iterator"in t||o.hasOwnProperty(r(t))}},function(e,t,n){n(57),n(43),e.exports=n(235)},function(e,t,n){var r=n(24),i=n(101);e.exports=n(9).getIterator=function(e){var t=i(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return r(t.call(e))}},function(e,t,n){var r;!function(i,o){"use strict";var a="model",s="name",u="type",l="vendor",c="version",f="mobile",h="tablet",p={extend:function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n},has:function(e,t){return"string"==typeof e&&-1!==t.toLowerCase().indexOf(e.toLowerCase())},lowerize:function(e){return e.toLowerCase()},major:function(e){return"string"==typeof e?e.replace(/[^\d\.]/g,"").split(".")[0]:void 0},trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},d={rgx:function(e,t){for(var n,r,i,o,a,s,u=0;u<t.length&&!a;){var l=t[u],c=t[u+1];for(n=r=0;n<l.length&&!a;)if(a=l[n++].exec(e))for(i=0;i<c.length;i++)s=a[++r],"object"==typeof(o=c[i])&&o.length>0?2==o.length?"function"==typeof o[1]?this[o[0]]=o[1].call(this,s):this[o[0]]=o[1]:3==o.length?"function"!=typeof o[1]||o[1].exec&&o[1].test?this[o[0]]=s?s.replace(o[1],o[2]):void 0:this[o[0]]=s?o[1].call(this,s,o[2]):void 0:4==o.length&&(this[o[0]]=s?o[3].call(this,s.replace(o[1],o[2])):void 0):this[o]=s||void 0;u+=2}},str:function(e,t){for(var n in t)if("object"==typeof t[n]&&t[n].length>0){for(var r=0;r<t[n].length;r++)if(p.has(t[n][r],e))return"?"===n?void 0:n}else if(p.has(t[n],e))return"?"===n?void 0:n;return e}},_={browser:{oldsafari:{version:{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}}},device:{amazon:{model:{"Fire Phone":["SD","KF"]}},sprint:{model:{"Evo Shift 4G":"7373KT"},vendor:{HTC:"APA",Sprint:"Sprint"}}},os:{windows:{version:{ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"}}}},v={browser:[[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]+).+version\/([\w\.-]+)/i,/(opera).+version\/([\w\.]+)/i,/(opera)[\/\s]+([\w\.]+)/i],[s,c],[/(opios)[\/\s]+([\w\.]+)/i],[[s,"Opera Mini"],c],[/\s(opr)\/([\w\.]+)/i],[[s,"Opera"],c],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?([\w\.]*)/i,/(avant\s|iemobile|slim|baidu)(?:browser)?[\/\s]?([\w\.]*)/i,/(?:ms|\()(ie)\s([\w\.]+)/i,/(rekonq)\/([\w\.]*)/i,/(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark)\/([\w\.-]+)/i],[s,c],[/(trident).+rv[:\s]([\w\.]+).+like\sgecko/i],[[s,"IE"],c],[/(edge|edgios|edga)\/((\d+)?[\w\.]+)/i],[[s,"Edge"],c],[/(yabrowser)\/([\w\.]+)/i],[[s,"Yandex"],c],[/(puffin)\/([\w\.]+)/i],[[s,"Puffin"],c],[/(focus)\/([\w\.]+)/i],[[s,"Firefox Focus"],c],[/(opt)\/([\w\.]+)/i],[[s,"Opera Touch"],c],[/((?:[\s\/])uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i],[[s,"UCBrowser"],c],[/(comodo_dragon)\/([\w\.]+)/i],[[s,/_/g," "],c],[/(micromessenger)\/([\w\.]+)/i],[[s,"WeChat"],c],[/(brave)\/([\w\.]+)/i],[[s,"Brave"],c],[/(qqbrowserlite)\/([\w\.]+)/i],[s,c],[/(QQ)\/([\d\.]+)/i],[s,c],[/m?(qqbrowser)[\/\s]?([\w\.]+)/i],[s,c],[/(BIDUBrowser)[\/\s]?([\w\.]+)/i],[s,c],[/(2345Explorer)[\/\s]?([\w\.]+)/i],[s,c],[/(MetaSr)[\/\s]?([\w\.]+)/i],[s],[/(LBBROWSER)/i],[s],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[c,[s,"MIUI Browser"]],[/;fbav\/([\w\.]+);/i],[c,[s,"Facebook"]],[/safari\s(line)\/([\w\.]+)/i,/android.+(line)\/([\w\.]+)\/iab/i],[s,c],[/headlesschrome(?:\/([\w\.]+)|\s)/i],[c,[s,"Chrome Headless"]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[s,/(.+)/,"$1 WebView"],c],[/((?:oculus|samsung)browser)\/([\w\.]+)/i],[[s,/(.+(?:g|us))(.+)/,"$1 $2"],c],[/android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)*/i],[c,[s,"Android Browser"]],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[s,c],[/(dolfin)\/([\w\.]+)/i],[[s,"Dolphin"],c],[/((?:android.+)crmo|crios)\/([\w\.]+)/i],[[s,"Chrome"],c],[/(coast)\/([\w\.]+)/i],[[s,"Opera Coast"],c],[/fxios\/([\w\.-]+)/i],[c,[s,"Firefox"]],[/version\/([\w\.]+).+?mobile\/\w+\s(safari)/i],[c,[s,"Mobile Safari"]],[/version\/([\w\.]+).+?(mobile\s?safari|safari)/i],[c,s],[/webkit.+?(gsa)\/([\w\.]+).+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[[s,"GSA"],c],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[s,[c,d.str,_.browser.oldsafari.version]],[/(konqueror)\/([\w\.]+)/i,/(webkit|khtml)\/([\w\.]+)/i],[s,c],[/(navigator|netscape)\/([\w\.-]+)/i],[[s,"Netscape"],c],[/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?([\w\.\+]+)/i,/(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([\w\.-]+)$/i,/(mozilla)\/([\w\.]+).+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir)[\/\s]?([\w\.]+)/i,/(links)\s\(([\w\.]+)/i,/(gobrowser)\/?([\w\.]*)/i,/(ice\s?browser)\/v?([\w\._]+)/i,/(mosaic)[\/\s]([\w\.]+)/i],[s,c]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[["architecture","amd64"]],[/(ia32(?=;))/i],[["architecture",p.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[["architecture","ia32"]],[/windows\s(ce|mobile);\sppc;/i],[["architecture","arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[["architecture",/ower/,"",p.lowerize]],[/(sun4\w)[;\)]/i],[["architecture","sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|arm(?:64|(?=v\d+[;l]))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i],[["architecture",p.lowerize]]],device:[[/\((ipad|playbook);[\w\s\);-]+(rim|apple)/i],[a,l,[u,h]],[/applecoremedia\/[\w\.]+ \((ipad)/],[a,[l,"Apple"],[u,h]],[/(apple\s{0,1}tv)/i],[[a,"Apple TV"],[l,"Apple"]],[/(archos)\s(gamepad2?)/i,/(hp).+(touchpad)/i,/(hp).+(tablet)/i,/(kindle)\/([\w\.]+)/i,/\s(nook)[\w\s]+build\/(\w+)/i,/(dell)\s(strea[kpr\s\d]*[\dko])/i],[l,a,[u,h]],[/(kf[A-z]+)\sbuild\/.+silk\//i],[a,[l,"Amazon"],[u,h]],[/(sd|kf)[0349hijorstuw]+\sbuild\/.+silk\//i],[[a,d.str,_.device.amazon.model],[l,"Amazon"],[u,f]],[/android.+aft([bms])\sbuild/i],[a,[l,"Amazon"],[u,"smarttv"]],[/\((ip[honed|\s\w*]+);.+(apple)/i],[a,l,[u,f]],[/\((ip[honed|\s\w*]+);/i],[a,[l,"Apple"],[u,f]],[/(blackberry)[\s-]?(\w+)/i,/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\s_-]?([\w-]*)/i,/(hp)\s([\w\s]+\w)/i,/(asus)-?(\w+)/i],[l,a,[u,f]],[/\(bb10;\s(\w+)/i],[a,[l,"BlackBerry"],[u,f]],[/android.+(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7|padfone)/i],[a,[l,"Asus"],[u,h]],[/(sony)\s(tablet\s[ps])\sbuild\//i,/(sony)?(?:sgp.+)\sbuild\//i],[[l,"Sony"],[a,"Xperia Tablet"],[u,h]],[/android.+\s([c-g]\d{4}|so[-l]\w+)\sbuild\//i],[a,[l,"Sony"],[u,f]],[/\s(ouya)\s/i,/(nintendo)\s([wids3u]+)/i],[l,a,[u,"console"]],[/android.+;\s(shield)\sbuild/i],[a,[l,"Nvidia"],[u,"console"]],[/(playstation\s[34portablevi]+)/i],[a,[l,"Sony"],[u,"console"]],[/(sprint\s(\w+))/i],[[l,d.str,_.device.sprint.vendor],[a,d.str,_.device.sprint.model],[u,f]],[/(lenovo)\s?(S(?:5000|6000)+(?:[-][\w+]))/i],[l,a,[u,h]],[/(htc)[;_\s-]+([\w\s]+(?=\))|\w+)*/i,/(zte)-(\w*)/i,/(alcatel|geeksphone|lenovo|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i],[l,[a,/_/g," "],[u,f]],[/(nexus\s9)/i],[a,[l,"HTC"],[u,h]],[/d\/huawei([\w\s-]+)[;\)]/i,/(nexus\s6p)/i],[a,[l,"Huawei"],[u,f]],[/(microsoft);\s(lumia[\s\w]+)/i],[l,a,[u,f]],[/[\s\(;](xbox(?:\sone)?)[\s\);]/i],[a,[l,"Microsoft"],[u,"console"]],[/(kin\.[onetw]{3})/i],[[a,/\./g," "],[l,"Microsoft"],[u,f]],[/\s(milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?:?(\s4g)?)[\w\s]+build\//i,/mot[\s-]?(\w*)/i,/(XT\d{3,4}) build\//i,/(nexus\s6)/i],[a,[l,"Motorola"],[u,f]],[/android.+\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[a,[l,"Motorola"],[u,h]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[l,p.trim],[a,p.trim],[u,"smarttv"]],[/hbbtv.+maple;(\d+)/i],[[a,/^/,"SmartTV"],[l,"Samsung"],[u,"smarttv"]],[/\(dtv[\);].+(aquos)/i],[a,[l,"Sharp"],[u,"smarttv"]],[/android.+((sch-i[89]0\d|shw-m380s|gt-p\d{4}|gt-n\d+|sgh-t8[56]9|nexus 10))/i,/((SM-T\w+))/i],[[l,"Samsung"],a,[u,h]],[/smart-tv.+(samsung)/i],[l,[u,"smarttv"],a],[/((s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-\w[\w\d]+))/i,/(sam[sung]*)[\s-]*(\w+-?[\w-]*)/i,/sec-((sgh\w+))/i],[[l,"Samsung"],a,[u,f]],[/sie-(\w*)/i],[a,[l,"Siemens"],[u,f]],[/(maemo|nokia).*(n900|lumia\s\d+)/i,/(nokia)[\s_-]?([\w-]*)/i],[[l,"Nokia"],a,[u,f]],[/android\s3\.[\s\w;-]{10}(a\d{3})/i],[a,[l,"Acer"],[u,h]],[/android.+([vl]k\-?\d{3})\s+build/i],[a,[l,"LG"],[u,h]],[/android\s3\.[\s\w;-]{10}(lg?)-([06cv9]{3,4})/i],[[l,"LG"],a,[u,h]],[/(lg) netcast\.tv/i],[l,a,[u,"smarttv"]],[/(nexus\s[45])/i,/lg[e;\s\/-]+(\w*)/i,/android.+lg(\-?[\d\w]+)\s+build/i],[a,[l,"LG"],[u,f]],[/android.+(ideatab[a-z0-9\-\s]+)/i],[a,[l,"Lenovo"],[u,h]],[/linux;.+((jolla));/i],[l,a,[u,f]],[/((pebble))app\/[\d\.]+\s/i],[l,a,[u,"wearable"]],[/android.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[l,a,[u,f]],[/crkey/i],[[a,"Chromecast"],[l,"Google"]],[/android.+;\s(glass)\s\d/i],[a,[l,"Google"],[u,"wearable"]],[/android.+;\s(pixel c)[\s)]/i],[a,[l,"Google"],[u,h]],[/android.+;\s(pixel( [23])?( xl)?)\s/i],[a,[l,"Google"],[u,f]],[/android.+;\s(\w+)\s+build\/hm\1/i,/android.+(hm[\s\-_]*note?[\s_]*(?:\d\w)?)\s+build/i,/android.+(mi[\s\-_]*(?:one|one[\s_]plus|note lte)?[\s_]*(?:\d?\w?)[\s_]*(?:plus)?)\s+build/i,/android.+(redmi[\s\-_]*(?:note)?(?:[\s_]*[\w\s]+))\s+build/i],[[a,/_/g," "],[l,"Xiaomi"],[u,f]],[/android.+(mi[\s\-_]*(?:pad)(?:[\s_]*[\w\s]+))\s+build/i],[[a,/_/g," "],[l,"Xiaomi"],[u,h]],[/android.+;\s(m[1-5]\snote)\sbuild/i],[a,[l,"Meizu"],[u,h]],[/(mz)-([\w-]{2,})/i],[[l,"Meizu"],a,[u,f]],[/android.+a000(1)\s+build/i,/android.+oneplus\s(a\d{4})\s+build/i],[a,[l,"OnePlus"],[u,f]],[/android.+[;\/]\s*(RCT[\d\w]+)\s+build/i],[a,[l,"RCA"],[u,h]],[/android.+[;\/\s]+(Venue[\d\s]{2,7})\s+build/i],[a,[l,"Dell"],[u,h]],[/android.+[;\/]\s*(Q[T|M][\d\w]+)\s+build/i],[a,[l,"Verizon"],[u,h]],[/android.+[;\/]\s+(Barnes[&\s]+Noble\s+|BN[RT])(V?.*)\s+build/i],[[l,"Barnes & Noble"],a,[u,h]],[/android.+[;\/]\s+(TM\d{3}.*\b)\s+build/i],[a,[l,"NuVision"],[u,h]],[/android.+;\s(k88)\sbuild/i],[a,[l,"ZTE"],[u,h]],[/android.+[;\/]\s*(gen\d{3})\s+build.*49h/i],[a,[l,"Swiss"],[u,f]],[/android.+[;\/]\s*(zur\d{3})\s+build/i],[a,[l,"Swiss"],[u,h]],[/android.+[;\/]\s*((Zeki)?TB.*\b)\s+build/i],[a,[l,"Zeki"],[u,h]],[/(android).+[;\/]\s+([YR]\d{2})\s+build/i,/android.+[;\/]\s+(Dragon[\-\s]+Touch\s+|DT)(\w{5})\sbuild/i],[[l,"Dragon Touch"],a,[u,h]],[/android.+[;\/]\s*(NS-?\w{0,9})\sbuild/i],[a,[l,"Insignia"],[u,h]],[/android.+[;\/]\s*((NX|Next)-?\w{0,9})\s+build/i],[a,[l,"NextBook"],[u,h]],[/android.+[;\/]\s*(Xtreme\_)?(V(1[045]|2[015]|30|40|60|7[05]|90))\s+build/i],[[l,"Voice"],a,[u,f]],[/android.+[;\/]\s*(LVTEL\-)?(V1[12])\s+build/i],[[l,"LvTel"],a,[u,f]],[/android.+;\s(PH-1)\s/i],[a,[l,"Essential"],[u,f]],[/android.+[;\/]\s*(V(100MD|700NA|7011|917G).*\b)\s+build/i],[a,[l,"Envizen"],[u,h]],[/android.+[;\/]\s*(Le[\s\-]+Pan)[\s\-]+(\w{1,9})\s+build/i],[l,a,[u,h]],[/android.+[;\/]\s*(Trio[\s\-]*.*)\s+build/i],[a,[l,"MachSpeed"],[u,h]],[/android.+[;\/]\s*(Trinity)[\-\s]*(T\d{3})\s+build/i],[l,a,[u,h]],[/android.+[;\/]\s*TU_(1491)\s+build/i],[a,[l,"Rotor"],[u,h]],[/android.+(KS(.+))\s+build/i],[a,[l,"Amazon"],[u,h]],[/android.+(Gigaset)[\s\-]+(Q\w{1,9})\s+build/i],[l,a,[u,h]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[u,p.lowerize],l,a],[/(android[\w\.\s\-]{0,9});.+build/i],[a,[l,"Generic"]]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[c,[s,"EdgeHTML"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m)\/([\w\.]+)/i,/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i,/(icab)[\/\s]([23]\.[\d\.]+)/i],[s,c],[/rv\:([\w\.]{1,9}).+(gecko)/i],[c,s]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[s,c],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i,/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i],[s,[c,d.str,_.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[s,"Windows"],[c,d.str,_.os.windows.version]],[/\((bb)(10);/i],[[s,"BlackBerry"],c],[/(blackberry)\w*\/?([\w\.]*)/i,/(tizen)[\/\s]([\w\.]+)/i,/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|contiki)[\/\s-]?([\w\.]*)/i,/linux;.+(sailfish);/i],[s,c],[/(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]*)/i],[[s,"Symbian"],c],[/\((series40);/i],[s],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[s,"Firefox OS"],c],[/(nintendo|playstation)\s([wids34portablevu]+)/i,/(mint)[\/\s\(]?(\w*)/i,/(mageia|vectorlinux)[;\s]/i,/(joli|[kxln]?ubuntu|debian|suse|opensuse|gentoo|(?=\s)arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus)[\/\s-]?(?!chrom)([\w\.-]*)/i,/(hurd|linux)\s?([\w\.]*)/i,/(gnu)\s?([\w\.]*)/i],[s,c],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[s,"Chromium OS"],c],[/(sunos)\s?([\w\.\d]*)/i],[[s,"Solaris"],c],[/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]*)/i],[s,c],[/(haiku)\s(\w+)/i],[s,c],[/cfnetwork\/.+darwin/i,/ip[honead]{2,4}(?:.*os\s([\w]+)\slike\smac|;\sopera)/i],[[c,/_/g,"."],[s,"iOS"]],[/(mac\sos\sx)\s?([\w\s\.]*)/i,/(macintosh|mac(?=_powerpc)\s)/i],[[s,"Mac OS"],[c,/_/g,"."]],[/((?:open)?solaris)[\/\s-]?([\w\.]*)/i,/(aix)\s((\d)(?=\.|\)|\s)[\w\.])*/i,/(plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos|openvms|fuchsia)/i,/(unix)\s?([\w\.]*)/i],[s,c]]},y=function(e,t){if("object"==typeof e&&(t=e,e=void 0),!(this instanceof y))return new y(e,t).getResult();var n=e||(i&&i.navigator&&i.navigator.userAgent?i.navigator.userAgent:""),r=t?p.extend(v,t):v;return this.getBrowser=function(){var e={name:void 0,version:void 0};return d.rgx.call(e,n,r.browser),e.major=p.major(e.version),e},this.getCPU=function(){var e={architecture:void 0};return d.rgx.call(e,n,r.cpu),e},this.getDevice=function(){var e={vendor:void 0,model:void 0,type:void 0};return d.rgx.call(e,n,r.device),e},this.getEngine=function(){var e={name:void 0,version:void 0};return d.rgx.call(e,n,r.engine),e},this.getOS=function(){var e={name:void 0,version:void 0};return d.rgx.call(e,n,r.os),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return n},this.setUA=function(e){return n=e,this},this};y.VERSION="0.7.19",y.BROWSER={NAME:s,MAJOR:"major",VERSION:c},y.CPU={ARCHITECTURE:"architecture"},y.DEVICE={MODEL:a,VENDOR:l,TYPE:u,CONSOLE:"console",MOBILE:f,SMARTTV:"smarttv",TABLET:h,WEARABLE:"wearable",EMBEDDED:"embedded"},y.ENGINE={NAME:s,VERSION:c},y.OS={NAME:s,VERSION:c},void 0!==t?(void 0!==e&&e.exports&&(t=e.exports=y),t.UAParser=y):n(237)?void 0===(r=function(){return y}.call(t,n,t,e))||(e.exports=r):i&&(i.UAParser=y);var g=i&&(i.jQuery||i.Zepto);if(void 0!==g&&!g.ua){var m=new y;g.ua=m.getResult(),g.ua.get=function(){return m.getUA()},g.ua.set=function(e){m.setUA(e);var t=m.getResult();for(var n in t)g.ua[n]=t[n]}}}("object"==typeof window?window:this)},function(e,t){(function(t){e.exports=t}).call(t,{})},function(e,t,n){"use strict";var r={defaults:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i={};for(var o in e)i[o]=e[o];for(var a=0;a<n.length;a++){var s=n[a];for(var u in s)void 0===i[u]&&(i[u]=s[u])}return i},extend:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i={};for(var o in e)i[o]=e[o];for(var a=0;a<n.length;a++){var s=n[a];for(var u in s)i[u]=s[u]}return i}};t.a=r},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(5),a=n.n(o),s=n(2),u=n.n(s),l=n(3),c=n.n(l),f=n(1),h=n.n(f),p=n(10),d=n(147),_=n(80),v=n(148),y=n(242),g=n(107),m=n(109),b=n(110),w=n(145),x=n(150),T=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),k=function e(t,n,r){null===t&&(t=Function.prototype);var i=a()(t,n);if(void 0===i){var o=h()(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0},R=p.c.RendererType,C=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||h()(t)).call.apply(e,[this].concat(r)));return o._type=R.WEBGL,o._textures=[],o._fakeObject=new m.a,o._onContextLost=o._onContextLost.bind(o),o._onContextRestored=o._onContextRestored.bind(o),o.setCanvas(o._options.canvas||p.i.createCanvas()),o._cachedBlitCanvas=p.i.createCanvas(),o.shaders=o._initShaders(),o.renderers=o._initRenderers(),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=c()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(u.a?u()(e,t):e.__proto__=t)}(t,d.a),T(t,[{key:"_onContextLost",value:function(e){e.preventDefault(),p.f.warn(this.constructor.name,"WebGL context has been lost - trying to restore.")}},{key:"_onContextCreationError",value:function(e){e.preventDefault(),p.f.warn(this.constructor.name,"Failed to create WebGL context: "+(e.statusMessage||"Unknown error"))}},{key:"_onContextRestored",value:function(){var e=this;p.f.warn(this.constructor.name,"WebGL context has been restored. Clearing all textures."),this._textures.forEach(function(t){t.disposeGLTexturesForRenderer(e)}),this._createContext(),this._setupContext(),this.emit("context-restored")}},{key:"_onBeforeContext",value:function(){this._filterManager&&this._filterManager.dispose(),this._filterManager=new b.a(this),this._currentObjectRenderer=new v.a(this)}},{key:"setShader",value:function(e){this._currentShader=e,this._context.useProgram(e.getProgram()),this._setAttributesForShader(e)}},{key:"setCanvas",value:function(e){this._canvas&&this._removeContextEventListeners(),k(t.prototype.__proto__||h()(t.prototype),"setCanvas",this).call(this,e),this._canvas.addEventListener&&this._addContextEventListeners()}},{key:"_addContextEventListeners",value:function(){this._canvas.addEventListener("webglcontextlost",this._onContextLost),this._canvas.addEventListener("webglcontextrestored",this._onContextRestored),this._canvas.addEventListener("webglcontextcreationerror",this._onContextCreationError)}},{key:"_removeContextEventListeners",value:function(){this._canvas.removeEventListener("webglcontextlost",this._onContextLost),this._canvas.removeEventListener("webglcontextrestored",this._onContextRestored),this._canvas.removeEventListener("webglcontextcreationerror",this._onContextCreationError)}},{key:"_setAttributesForShader",value:function(e){var t=this._context,n=e.getAttributes(),r=e.getAttributeLocations();n.forEach(function(e){var n=r[e];t.enableVertexAttribArray(n)})}},{key:"_initShaders",value:function(){return{default:new g.a(this)}}},{key:"_initRenderers",value:function(){return{sprite:new y.a(this)}}},{key:"_createContext",value:function(){var e=this._canvas,n=null,r={preserveDrawingBuffer:!0};return n=e.getContext("webgl",r)||e.getContext("experimental-webgl",r),"undefined"!=typeof window&&window.WebGLDebugUtils&&this._options.debug&&(n=window.WebGLDebugUtils.makeDebugContext(n,null,function(e,t){console.error("gl."+e+"("+window.WebGLDebugUtils.glFunctionArgsToString(e,t)+")")})),this._options.debug&&(n=new w.a(n)),this.id=n.id=t.contextId++,this._context=n,n.renderer=this,this._maxTextureSize=n.getParameter(n.MAX_TEXTURE_SIZE),this.emit("context",n),n}},{key:"_setupContext",value:function(){var e=this._context;e.disable(e.DEPTH_TEST),e.disable(e.CULL_FACE),e.enable(e.BLEND),e.blendFunc(e.ONE,e.ONE_MINUS_SRC_ALPHA),this._defaultRenderTarget=new _.a(this,this._width,this._height,this._pixelRatio,!0),this.setRenderTarget(this._defaultRenderTarget),this._getMaxPrecision()}},{key:"_getMaxPrecision",value:function(){var e=this._context,t=e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT);this._maxFloatPrecision=0!==t.precision?"highp":"mediump";var n=e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_INT);this._maxIntPrecision=0!==n.rangeMax?"highp":"lowp"}},{key:"resizeTo",value:function(e){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];k(t.prototype.__proto__||h()(t.prototype),"resizeTo",this).call(this,e,n),this._currentRenderTarget&&this._currentRenderTarget.resizeTo(e)}},{key:"setRenderTarget",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._defaultRenderTarget;this._currentRenderTarget=e,this._currentRenderTarget.activate()}},{key:"setObjectRenderer",value:function(e){this._currentObjectRenderer.stop(),this._currentObjectRenderer=e,this._currentObjectRenderer.start()}},{key:"render",value:function(e){this.setRenderTarget(this._defaultRenderTarget),this._defaultRenderTarget.clear(this._clearColor);var t=e.getParent();e.setParent(this._fakeObject),e.updateTransform(),e.setParent(t),this.renderDisplayObject(e,this._defaultRenderTarget)}},{key:"renderDisplayObject",value:function(e,t){this.setRenderTarget(t),this._filterManager.setFilterStack(t.getFilterStack()),e.renderWebGL(this),this._currentObjectRenderer.flush()}},{key:"clear",value:function(){var e=this._context;e.clearColor.apply(e,this._clearColor.toGLColor()),e.clear(e.COLOR_BUFFER_BIT)}},{key:"save",value:function(){return{renderTarget:this._currentRenderTarget,objectRenderer:this._currentObjectRenderer,filterStack:this._filterManager.getFilterStack()}}},{key:"restore",value:function(e){this.setRenderTarget(e.renderTarget),this._filterManager.setFilterStack(e.filterStack),this._currentObjectRenderer=e.objectRenderer}},{key:"getOrCreateGLTexture",value:function(e){var t=this._context,n=e.getGLTextureForRenderer(this);return n||(n=t.createTexture(),e.setGLTextureForRenderer(n,this),this._textures.push(e)),n}},{key:"updateTexture",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=e.getSource(),r=!!n,i=this._context,o=e.getGLUnit(),a=this.getOrCreateGLTexture(e);if(i.activeTexture(i.TEXTURE0+o),i.bindTexture(i.TEXTURE_2D,a),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),t&&r)if(n instanceof x.a)i.texImage2D(i.TEXTURE_2D,0,i.RGBA,n.width,n.height,0,i.RGBA,i.UNSIGNED_BYTE,n.data);else{var s=p.i.convertHtmlImageToRGBACanvas(n,this._cachedBlitCanvas);i.texImage2D(i.TEXTURE_2D,0,i.RGBA,i.RGBA,i.UNSIGNED_BYTE,s)}e.isMipMappingEnabled()?i.generateMipmap(i.TEXTURE_2D):(i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,e.getGLRepeat(i,"x")),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,e.getGLRepeat(i,"y"))),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,e.getGLFilter(i,"min")),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,e.getGLFilter(i,"mag")),i.activeTexture(i.TEXTURE0)}},{key:"getMaxDimensions",value:function(){var e=p.i.createCanvas(),t=e.getContext("webgl")||e.getContext("experimental-webgl");if(t){var n=t.getParameter(t.MAX_TEXTURE_SIZE),r=t.getExtension("WEBGL_lose_context");return r&&r.loseContext(),n}return null}},{key:"getCurrentRenderTarget",value:function(){return this._currentRenderTarget}},{key:"getCurrentObjectRenderer",value:function(){return this._currentObjectRenderer}},{key:"getMaxFloatPrecision",value:function(){return this._maxFloatPrecision}},{key:"getMaxIntPrecision",value:function(){return this._maxIntPrecision}},{key:"dispose",value:function(){var e=this;for(var t in this._filterManager.dispose(),this._currentObjectRenderer.dispose(),this._defaultRenderTarget.dispose(),this._textures.forEach(function(t){t.disposeGLTexturesForRenderer(e)}),this.shaders)this.shaders[t].dispose(),delete this.shaders[t];this._removeContextEventListeners();var n=this._context.getExtension("WEBGL_lose_context");n&&n.loseContext()}}],[{key:"isSupported",value:function(){var e=p.i.createCanvas();e.addEventListener("webglcontextcreationerror",this.prototype._onContextCreationError);var t=e.getContext("webgl")||e.getContext("experimental-webgl"),n=!!t;if(n){var r=p.e.determineGPUName(t);n&=!p.e.isGPUBlacklisted(r)}return e.removeEventListener("webglcontextcreationerror",this.prototype._onContextCreationError),n}}]),t}();C.contextId=0,C.type="WebGL",t.a=C},function(e,t,n){n(241);var r=n(9).Object;e.exports=function(e,t){return r.getOwnPropertyDescriptor(e,t)}},function(e,t,n){var r=n(37),i=n(98).f;n(105)("getOwnPropertyDescriptor",function(){return function(e,t){return i(r(e),t)}})},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(5),a=n.n(o),s=n(2),u=n.n(s),l=n(3),c=n.n(l),f=n(1),h=n.n(f),p=n(10),d=n(148),_=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),v=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||h()(t)).call.apply(e,[this].concat(r)));o._maxBatchSize=p.a,o._vertices=new ArrayBuffer(4*p.a*p.j),o._positions=new Float32Array(o._vertices),o._colors=new Uint32Array(o._vertices),o._indices=new Uint16Array(6*p.a);for(var a=0,s=0;a<6*p.a;a+=6,s+=4)o._indices[a+0]=s+0,o._indices[a+1]=s+1,o._indices[a+2]=s+2,o._indices[a+3]=s+0,o._indices[a+4]=s+2,o._indices[a+5]=s+3;return o._shaders=[],o._sprites=[],o._currentBatchSize=0,o._currentBaseTexture=null,o._onContextChange(),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=c()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(u.a?u()(e,t):e.__proto__=t)}(t,d.a),_(t,[{key:"render",value:function(e){var t=e.getTexture(),n=t.getFrame(),r=t.getBaseTexture();this._currentBatchSize>=this._maxBatchSize&&(this.flush(),this._currentBaseTexture=r);var i=t.getUVs();if(i){var o=this._currentBatchSize*p.j;this._addVertexCoordinates(e,o,n),this._addTextureUVs(e,o,i),this._addColors(e,o),this._sprites[this._currentBatchSize]=e,this._currentBatchSize++}}},{key:"_addColors",value:function(e,t){var n=this._colors,r=e.getTint(),i=(r>>16)+(65280&r)+((255&r)<<16)+(255*e.getWorldAlpha()<<24);n[t+4]=n[t+9]=n[t+14]=n[t+19]=i}},{key:"_addTextureUVs",value:function(e,t,n){var r=this._positions,i=n.getUVsAt(0);r[t+2]=i.x,r[t+3]=i.y,i=n.getUVsAt(1),r[t+7]=i.x,r[t+8]=i.y,i=n.getUVsAt(2),r[t+12]=i.x,r[t+13]=i.y,i=n.getUVsAt(3),r[t+17]=i.x,r[t+18]=i.y}},{key:"_addVertexCoordinates",value:function(e,t,n){for(var r=this._positions,i=e.getWorldTransform(),o=e.getAnchor(),a=i.rectangleToCoordinates(n,o),s=0;s<4;s++)r[t+5*s]=a[s].x,r[t+5*s+1]=a[s].y}},{key:"_onContextChange",value:function(){var e=this._renderer.getContext();this._shader=this._renderer.shaders.default,this._vertexBuffer=e.createBuffer(),this._indexBuffer=e.createBuffer(),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,this._indexBuffer),e.bufferData(e.ELEMENT_ARRAY_BUFFER,this._indices,e.STATIC_DRAW),e.bindBuffer(e.ARRAY_BUFFER,this._vertexBuffer),e.bufferData(e.ARRAY_BUFFER,this._vertices,e.DYNAMIC_DRAW)}},{key:"start",value:function(){this._shader.setupBuffers(this._vertexBuffer,this._indexBuffer)}},{key:"flush",value:function(){var e=this._renderer,t=e.getContext();if(0!==this._currentBatchSize){if(this._currentBatchSize>.5*p.a)t.bufferSubData(t.ARRAY_BUFFER,0,this._vertices);else{var n=this._positions.subarray(0,this._currentBatchSize*p.j);t.bufferSubData(t.ARRAY_BUFFER,0,n)}for(var r=0,i=null,o=null,a=null,s=null,u=!1,l=null,c=0,f=0,h=this._currentBatchSize;f<h;f++){if(o=(l=this._sprites[f]).getTexture().getBaseTexture(),u=a!==(s=l.getShader()||this._shader),(i!==o||u)&&(this._renderBatch(i,r,c),c=f,r=0,i=o,u)){a=s,e.setShader(a);var d=e.getCurrentRenderTarget().getProjectionMatrix().toArray();a.setUniform("u_projMatrix",d),a.syncUniforms(),t.activeTexture(t.TEXTURE0)}r++}this._renderBatch(i,r,c),this._currentBatchSize=0,this._sprites=[]}}},{key:"_renderBatch",value:function(e,t,n){if(0!==t){var r=this._renderer,i=r.getContext(),o=e.getGLTextureForRenderer(r);o||(o=r.getOrCreateGLTexture(e)),e.isDirty()&&(r.updateTexture(e),e.setDirty(!1)),i.activeTexture(i.TEXTURE0+e.getGLUnit()),i.bindTexture(i.TEXTURE_2D,o);var a=6*t,s=6*n*2;i.drawElements(i.TRIANGLES,a,i.UNSIGNED_SHORT,s)}}},{key:"dispose",value:function(){var e=this._renderer.getContext();e.deleteBuffer(this._vertexBuffer),e.deleteBuffer(this._indexBuffer),this._vertices=null,this._positions=null,this._colors=null,this._indices=null,function e(t,n,r){null===t&&(t=Function.prototype);var i=a()(t,n);if(void 0===i){var o=h()(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0}(t.prototype.__proto__||h()(t.prototype),"dispose",this).call(this)}}]),t}();t.a=v},function(e,t){e.exports="attribute vec2 a_position;\nattribute vec2 a_texCoord;\nattribute vec4 a_color;\nvarying vec2 v_texCoord;\nvarying vec4 v_color;\nuniform mat3 u_projMatrix;\n\nvoid main() {\n gl_Position = vec4((u_projMatrix * vec3(a_position, 1)).xy, 0, 1);\n v_texCoord = a_texCoord;\n v_color = vec4(a_color.rgb * a_color.a, a_color.a);\n}\n"},function(e,t){e.exports="uniform sampler2D u_image;\nvarying vec2 v_texCoord;\nvarying vec4 v_color;\n\nvoid main() {\n gl_FragColor = texture2D(u_image, v_texCoord) * v_color;\n}\n"},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(10),a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._uvs=[new o.k(0,0),new o.k(1,0),new o.k(1,1),new o.k(0,1)]}return a(e,[{key:"update",value:function(e,t){var n=this._uvs[0];n.x=e.x/t.width,n.y=e.y/t.height,(n=this._uvs[1]).x=(e.x+e.width)/t.width,n.y=e.y/t.height,(n=this._uvs[2]).x=(e.x+e.width)/t.width,n.y=(e.y+e.height)/t.height,(n=this._uvs[3]).x=e.x/t.width,n.y=(e.y+e.height)/t.height}},{key:"getUVsAt",value:function(e){return this._uvs[e]}},{key:"getUVs",value:function(){return this._uvs}}]),e}();t.a=s},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(2),a=n.n(o),s=n(3),u=n.n(s),l=n(1),c=n.n(l),f=n(10),h=n(152),p=n(63),d=n(80),_=n(79),v=n(110),y=n(106),g=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),m=f.c.RendererType,b=function(e){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:100,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||c()(t)).call(this,new p.a,new f.h(0,0,n,r)));return o._loaded=!0,o._width=n,o._height=r,o._pixelRatio=i,o._renderer=e,o._setupFilterManager(),o._setupBuffer(),o.setBaseTexture(o._renderTarget.getBaseTexture()),o._updateUVs(),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=u()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(a.a?a()(e,t):e.__proto__=t)}(t,h.a),g(t,[{key:"_setupFilterManager",value:function(){this._renderer.isOfType(m.WEBGL)?this._filterManager=new v.a(this._renderer):this._renderer.isOfType(m.CANVAS)&&(this._filterManager=new y.a(this._renderer)),this._filterManager.resizeTo(new f.k(this._width,this._height))}},{key:"_setupBuffer",value:function(){this._renderer.isOfType(m.WEBGL)?this._setupWebGLRenderTarget():this._renderer.isOfType(m.CANVAS)&&this._setupCanvasRenderTarget()}},{key:"_setupWebGLRenderTarget",value:function(){this._renderTarget=new d.a(this._renderer,this._width,this._height,this._pixelRatio)}},{key:"_setupCanvasRenderTarget",value:function(){this._renderTarget=new _.a(this._width,this._height,this._pixelRatio)}},{key:"clear",value:function(e){this._renderTarget.clear(e)}},{key:"resizeTo",value:function(e){this._width===e.x&&this._height===e.y||(this._width=e.x,this._height=e.y,this._frame.width=e.x,this._frame.height=e.y,this._renderTarget.resizeTo(e),this._filterManager.resizeTo(e))}},{key:"render",value:function(e){if(this._renderer.isOfType(m.WEBGL))this._renderWebGL(e);else{if(!this._renderer.isOfType(m.CANVAS))throw new Error("RenderTexture does not support rendering via "+this._renderer.constructor.name);this._renderCanvas(e)}}},{key:"_renderWebGL",value:function(e){this._renderTarget.activate(),e.getWorldTransform().reset(),e.getChildren().forEach(function(e){e.updateTransform()});var t=this._renderer.getFilterManager();this._renderer.setFilterManager(this._filterManager),this._renderer.renderDisplayObject(e,this._renderTarget),this._renderer.setFilterManager(t)}},{key:"_renderCanvas",value:function(e){e.getWorldTransform().reset(),e.getChildren().forEach(function(e){e.updateTransform()});var t=this._renderer.getFilterManager();this._renderer.setFilterManager(this._filterManager),this._renderer.renderDisplayObject(e,this._renderTarget),this._renderer.setFilterManager(t)}},{key:"getRenderTarget",value:function(){return this._renderTarget}},{key:"dispose",value:function(){this._renderTarget.dispose(),this._filterManager.dispose()}}]),t}();t.a=b},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(2),a=n.n(o),s=n(3),u=n.n(s),l=n(1),c=n.n(l),f=n(10),h=n(151),p=n(248),d=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),_=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||c()(t)).call(this));return n._onTextureUpdate=n._onTextureUpdate.bind(n),n._texture=e,n._shader=null,n._width=0,n._height=0,n._anchor=new f.k(0,0),n._canvasSmoothingEnabled=!0,n.setTexture(e),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=u()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(a.a?a()(e,t):e.__proto__=t)}(t,h.a),d(t,[{key:"_onTextureUpdate",value:function(){this._boundsNeedUpdate=!0,this._localBoundsNeedUpdate=!0}},{key:"_renderWebGL",value:function(e){var t=e.save();this._smoothDownscaling&&(this._potRenderer||(this._potRenderer=new p.a),this._potRenderer.render(e,this,this._texture)),e.restore(t),e.setObjectRenderer(e.renderers.sprite),e.renderers.sprite.render(this)}},{key:"_renderCanvas",value:function(e){var t=this._worldTransform,n=this._texture.getFrame(),r=n.width,i=n.height,o=e.getCurrentRenderTarget().getPixelRatio(),a=this._anchor.x*-r|0,s=this._anchor.y*-i|0,u=e.getContext();u.setTransform(t.a,t.b,t.c,t.d,t.tx*o,t.ty*o),u.globalAlpha=this.getWorldAlpha();var l=this._texture.getBaseTexture(),c=l.getPixelRatio(),f=l.getSource();u.imageSmoothingEnabled=this._canvasSmoothingEnabled,u.drawImage(f,0,0,(f.naturalWidth||r)*c,(f.naturalHeight||i)*c,a*o,s*o,r*o,i*o)}},{key:"isAtPosition",value:function(e){var t=this._worldTransform.applyInverseToVector(e),n=this._texture.getFrame(),r=n.width,i=n.height,o=new f.k(-r,-i);o.multiply(this._anchor);var a=o.clone().add(r,i);return!(t.x<o.x||t.x>a.x||t.y<o.y||t.y>a.y)}},{key:"getLocalBounds",value:function(){if(this._localBoundsNeedUpdate){var e=this._localBounds,t=this._texture.getFrame();e.x=-t.width*this._anchor.x,e.y=-t.height*this._anchor.y,e.width=t.width,e.height=t.height,this._localBoundsNeedUpdate=!1}return this._localBounds.clone()}},{key:"getBounds",value:function(){if(this._boundsNeedUpdate){var e=this._bounds,t=this._texture.getFrame(),n=this._worldTransform,r=this._anchor,i=n.rectangleToCoordinates(t,r),o=i[0].x,a=i[0].y,s=o,u=a;i.forEach(function(e){var t=e.x,n=e.y;o=Math.min(o,t),a=Math.min(a,n),s=Math.max(s,t),u=Math.max(u,n)}),e.x=o,e.width=Math.abs(s-o),e.y=a,e.height=Math.abs(u-a),this._boundsNeedUpdate=!1}return this._bounds.clone()}},{key:"getTexture",value:function(){return this._texture}},{key:"clearTexture",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this._texture&&(this._texture.off("update",this._onTextureUpdate),e&&this._texture.dispose(),this._texture=null,this._potRenderer&&(e&&this._potRenderer.dispose(),this._potRenderer=null))}},{key:"setTexture",value:function(e){e&&(this._texture&&this._texture.off("update",this._onTextureUpdate),this._potRenderer&&this._potRenderer.getRenderTexture().getBaseTexture().setDirty(!0),this._texture=e,e.getBaseTexture().isLoaded()&&this._onTextureUpdate(),e.on("update",this._onTextureUpdate))}},{key:"getShader",value:function(){return this._shader}},{key:"setShader",value:function(e){this._shader=e}},{key:"getWidth",value:function(){return this._width}},{key:"setWidth",value:function(e){this._scale.x=e/this._texture.getFrame().width,this._width=e,this._boundsNeedUpdate=!0,this._localBoundsNeedUpdate=!0}},{key:"getHeight",value:function(){return this._height}},{key:"setHeight",value:function(e){this._scale.y=e/this._texture.getFrame().height,this._height=e,this._boundsNeedUpdate=!0,this._localBoundsNeedUpdate=!0}},{key:"getDimensions",value:function(){return new f.k(this._width,this._height)}},{key:"getAnchor",value:function(){return this._anchor}},{key:"setAnchor",value:function(e,t){e instanceof f.k?this._anchor.copy(e):this._anchor.set(e,t),this._boundsNeedUpdate=!0,this._localBoundsNeedUpdate=!0}},{key:"isSmoothDownscaling",value:function(){return this._smoothDownscaling}},{key:"setSmoothDownscaling",value:function(e){this._smoothDownscaling=e}},{key:"dispose",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this._texture&&this._texture.off("update",this._onTextureUpdate),(e||t)&&this._texture.dispose(t),this._potRenderer&&this._potRenderer.dispose()}}]),t}();t.a=_},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(32),a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._container=new o.Engine.Container,this._sprite=new o.Engine.Sprite,this._container.addChild(this._sprite)}return a(e,[{key:"render",value:function(e,t,n){var r=n.getDimensions(),i=this._getNextHighestPOT(r);this._renderTexture?this._renderTexture.resizeTo(i):this._renderTexture=new o.Engine.RenderTexture(e,i.x,i.y);var a=this._renderTexture.getDimensions();this._sprite.setTexture(n),this._sprite.updateTransform(),this._renderTexture.clear(),this._renderTexture.render(this._container),this._updateSprite(e,t,r,a)}},{key:"_updateSprite",value:function(e,t,n,r){t.setTexture(this._renderTexture),this._renderTexture.setFrame(new o.Rectangle(0,0,n.x,n.y))}},{key:"_getNextHighestPOT",value:function(e){return new o.Vector2(o.Utils.nextHighestPOT(e.x),o.Utils.nextHighestPOT(e.y))}},{key:"getRenderTexture",value:function(){return this._renderTexture}},{key:"dispose",value:function(){this._renderTexture&&(this._renderTexture.dispose(),this._renderTexture=null)}}]),e}();t.a=s},function(e,t,n){"use strict";var r=n(107);t.a={TextureShader:r.a}},function(e,t,n){e.exports={default:n(251),__esModule:!0}},function(e,t,n){n(252),e.exports=n(9).setImmediate},function(e,t,n){var r=n(12),i=n(102);r(r.G+r.B,{setImmediate:i.set,clearImmediate:i.clear})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(254);n.d(t,"UnpremultiplyFilter",function(){return r.a});var i=n(256);n.d(t,"ColorOverlayFilter",function(){return i.a});var o=n(258);n.d(t,"TintFilter",function(){return o.a});var a=n(260);n.d(t,"OverlayFilter",function(){return a.a})},function(e,t,n){"use strict";var r=n(2),i=n.n(r),o=n(3),a=n.n(o),s=n(1),u=n.n(s),l=n(64),c=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||u()(t)).call(this));return e._fragmentSource=n(255),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=a()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(i.a?i()(e,t):e.__proto__=t)}(t,l.a),t}();t.a=c},function(e,t){e.exports="uniform sampler2D u_image;\nvarying vec2 v_texCoord;\nvarying vec4 v_color;\n\nvoid main() {\n vec4 color = texture2D(u_image, v_texCoord);\n gl_FragColor = vec4(color.a > 0. ? color.rgb / color.a : vec3(0), color.a);\n}\n"},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(2),a=n.n(o),s=n(3),u=n.n(s),l=n(1),c=n.n(l),f=n(10),h=n(64),p=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),d=f.c.OptionType,_=f.c.UniformType,v=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var r=arguments.length,i=Array(r),o=0;o<r;o++)i[o]=arguments[o];var a=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||c()(t)).call.apply(e,[this].concat(i)));return a._fragmentSource=n(257),a}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=u()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(a.a?a()(e,t):e.__proto__=t)}(t,h.a),p(t,[{key:"_applyCanvas",value:function(e,t,n){arguments.length>3&&void 0!==arguments[3]&&arguments[3];for(var r=t.getCanvas(),i=t.getContext(),o=n.getContext(),a=this._options.color,s=i.getImageData(0,0,r.width,r.height),u=o.getImageData(0,0,r.width,r.height),l=r.width*r.height,c=new f.b,h=new f.b,p=0;p<4*l;p+=4){c.set(s.data[p]/255,s.data[p+1]/255,s.data[p+2]/255,s.data[p+3]/255),h.set(u.data[p]/255,u.data[p+1]/255,u.data[p+2]/255,u.data[p+3]/255);var d=h.r+c.a*(c.r-h.r);u.data[p]=255*(d+c.a*(a.r-d));var _=h.g+c.a*(c.g-h.g);u.data[p+1]=255*(_+c.a*(a.g-_));var v=h.b+c.a*(c.b-h.b);u.data[p+2]=255*(v+c.a*(a.b-v))}o.putImageData(u,0,0)}}]),t}();v.prototype.availableOptions={color:{type:d.COLOR,default:f.b.WHITE,uniformType:_.FLOAT4}},t.a=v},function(e,t){e.exports="uniform sampler2D u_image;\nvarying vec2 v_texCoord;\nuniform vec4 u_color;\n\nvoid main() {\n vec4 color = texture2D(u_image, v_texCoord);\n gl_FragColor = vec4(mix(color.rgb, u_color.rgb, u_color.a), color.a) * color.a;\n}\n"},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(2),a=n.n(o),s=n(3),u=n.n(s),l=n(1),c=n.n(l),f=n(10),h=n(64),p=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),d=f.c.OptionType,_=f.c.UniformType,v=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var r=arguments.length,i=Array(r),o=0;o<r;o++)i[o]=arguments[o];var a=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||c()(t)).call.apply(e,[this].concat(i)));return a._fragmentSource=n(259),a}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=u()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(a.a?a()(e,t):e.__proto__=t)}(t,h.a),p(t,[{key:"_applyCanvas",value:function(e,n,r){arguments.length>3&&void 0!==arguments[3]&&arguments[3];var i=n.getCanvas(),o=n.getContext(),a=r.getContext(),s=o.getImageData(0,0,i.width,i.height),u=this._options,l=u.mode,c=u.color,h=c.r,p=c.g,d=c.b,_=c.a,v=[.2125,.7154,.0721];switch(l){case t.MODES.SOLID:for(var y=0;y<i.width*i.height;y++){var g=4*y;s.data[g]+=(255*h-s.data[g])*_,s.data[g+1]+=(255*p-s.data[g+1])*_,s.data[g+2]+=(255*d-s.data[g+2])*_}break;case t.MODES.COLORIZED:for(var m=0;m<i.width*i.height;m++){var b=4*m,w=s.data[b]/255*v[0]+s.data[b+1]/255*v[1]+s.data[b+2]/255*v[2],x=new f.b(w*h,w*p,w*d);s.data[b]+=(255*x.r-s.data[b])*_,s.data[b+1]+=(255*x.g-s.data[b+1])*_,s.data[b+2]+=(255*x.b-s.data[b+2])*_}}a.putImageData(s,0,0)}}]),t}();v.MODES={NONE:0,SOLID:1,COLORIZED:2},v.prototype.availableOptions={color:{type:d.COLOR,default:f.b.WHITE,uniformType:_.FLOAT4},mode:{type:d.NUMBER,default:v.MODES.NONE,uniformType:_.INT}},t.a=v},function(e,t){e.exports="uniform sampler2D u_image;\nvarying vec2 v_texCoord;\nuniform vec4 u_color;\nuniform int u_mode;\n\nvec3 W = vec3(0.2125, 0.7154, 0.0721);\n\nvoid main() {\n vec4 color = texture2D(u_image, v_texCoord);\n if (u_mode == 0) {\n gl_FragColor = color * color.a;\n } else if (u_mode == 1) {\n gl_FragColor = vec4(mix(color.rgb, u_color.rgb, u_color.a), color.a) * color.a;\n } else if (u_mode == 2) {\n float luminance = dot(color.rgb, W);\n vec3 colorized = vec3(luminance) * u_color.rgb;\n gl_FragColor = vec4(mix(color.rgb, colorized, u_color.a), color.a) * color.a;\n }\n}\n"},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(2),a=n.n(o),s=n(3),u=n.n(s),l=n(1),c=n.n(l),f=n(10),h=n(64),p=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),d=f.c.OptionType,_=f.c.UniformType,v=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var r=arguments.length,i=Array(r),o=0;o<r;o++)i[o]=arguments[o];var a=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||c()(t)).call.apply(e,[this].concat(i)));return a._fragmentSource=n(261),a._lastImage=null,a}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=u()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(a.a?a()(e,t):e.__proto__=t)}(t,h.a),p(t,[{key:"_applyCanvas",value:function(e,n,r){arguments.length>3&&void 0!==arguments[3]&&arguments[3];for(var i=this._options.overlayTexture.getRenderTarget().getContext(),o=n.getCanvas(),a=n.getContext(),s=r.getContext(),u=a.getImageData(0,0,o.width,o.height),l=i.getImageData(0,0,o.width,o.height),c=this._options,h=c.blendMode,p=c.alpha,d=new f.b,_=new f.b,v=new f.b,y=0;y<o.width*o.height*4;y+=4){d.set(u.data[y]/255,u.data[y+1]/255,u.data[y+2]/255,u.data[y+3]/255),_.set(l.data[y]/255,l.data[y+1]/255,l.data[y+2]/255,l.data[y+3]/255);var g=void 0,m=void 0,b=void 0,w=void 0,x=void 0,T=void 0,k=void 0,R=void 0,C=void 0;switch(h){case t.BLEND_MODES.NORMAL:v.set(d.r+_.a*p*(_.r-d.r),d.g+_.a*p*(_.g-d.g),d.b+_.a*p*(_.b-d.b),d.a);break;case t.BLEND_MODES.OVERLAY:g=1-2*(1-d.r)*(1-_.r),m=2*d.r*_.r,b=g+(d.r<.5?1:0)*(m-g),w=1-2*(1-d.g)*(1-_.g),x=2*d.g*_.g,T=w+(d.g<.5?1:0)*(x-w),k=1-2*(1-d.b)*(1-_.b),R=2*d.b*_.b,C=k+(d.b<.5?1:0)*(R-k),v.set(d.r+_.a*p*(b-d.r),d.g+_.a*p*(T-d.g),d.b+_.a*p*(C-d.b),d.a);break;case t.BLEND_MODES.HARD_LIGHT:g=1-2*(1-_.r)*(1-d.r),m=2*_.r*d.r,b=g+(_.r<.5?1:0)*(m-g),w=1-2*(1-_.g)*(1-d.g),x=2*_.g*d.g,T=w+(_.g<.5?1:0)*(x-w),k=1-2*(1-_.b)*(1-d.b),R=2*_.b*d.b,C=k+(_.b<.5?1:0)*(R-k),v.set(d.r+_.a*p*(b-d.r),d.g+_.a*p*(T-d.g),d.b+_.a*p*(C-d.b),d.a);break;case t.BLEND_MODES.SOFT_LIGHT:g=2*d.r*(1-_.r)+(2*_.r-1)*Math.sqrt(d.r),m=2*d.r*_.r+d.r*d.r*(1-2*_.r),b=g+(_.r<.5?1:0)*(m-g),w=2*d.g*(1-_.g)+(2*_.g-1)*Math.sqrt(d.g),x=2*d.g*_.g+d.g*d.g*(1-2*_.g),T=w+(_.g<.5?1:0)*(x-w),k=2*d.b*(1-_.b)+(2*_.b-1)*Math.sqrt(d.b),R=2*d.b*_.b+d.b*d.b*(1-2*_.b),C=k+(_.b<.5?1:0)*(R-k),v.set(d.r+_.a*p*(b-d.r),d.g+_.a*p*(T-d.g),d.b+_.a*p*(C-d.b),d.a);break;case t.BLEND_MODES.MULTIPLY:b=d.r*_.r,T=d.g*_.g,C=d.b*_.b,v.set(d.r+_.a*p*(b-d.r),d.g+_.a*p*(T-d.g),d.b+_.a*p*(C-d.b),d.a);break;case t.BLEND_MODES.DARKEN:b=Math.min(d.r,_.r),T=Math.min(d.g,_.g),C=Math.min(d.b,_.b),v.set(d.r+_.a*p*(b-d.r),d.g+_.a*p*(T-d.g),d.b+_.a*p*(C-d.b),d.a);break;case t.BLEND_MODES.LIGHTEN:b=Math.max(d.r,_.r),T=Math.max(d.g,_.g),C=Math.max(d.b,_.b),v.set(d.r+_.a*p*(b-d.r),d.g+_.a*p*(T-d.g),d.b+_.a*p*(C-d.b),d.a);break;case t.BLEND_MODES.SCREEN:b=1-(1-d.r)*(1-_.r),T=1-(1-d.g)*(1-_.g),C=1-(1-d.b)*(1-_.b),v.set(d.r+_.a*p*(b-d.r),d.g+_.a*p*(T-d.g),d.b+_.a*p*(C-d.b),d.a);break;case t.BLEND_MODES.COLOR_BURN:b=Math.max(0,Math.min(1,1-(1-d.r)/Math.max(_.r,1e-6))),T=Math.max(0,Math.min(1,1-(1-d.g)/Math.max(_.g,1e-6))),C=Math.max(0,Math.min(1,1-(1-d.b)/Math.max(_.b,1e-6))),v.set(d.r+_.a*p*(b-d.r),d.g+_.a*p*(T-d.g),d.b+_.a*p*(C-d.b),d.a)}u.data[y]=255*v.r,u.data[y+1]=255*v.g,u.data[y+2]=255*v.b,u.data[y+3]=255*v.a}s.putImageData(u,0,0)}}]),t}();v.BLEND_MODES={NORMAL:0,OVERLAY:1,HARD_LIGHT:2,SOFT_LIGHT:3,MULTIPLY:4,DARKEN:5,LIGHTEN:6,SCREEN:7,COLOR_BURN:8},v.prototype.availableOptions={blendMode:{type:d.NUMBER,default:v.BLEND_MODES.NORMAL,uniformType:_.INT},overlayImage:{type:d.NUMBER,required:!0,uniformType:_.SAMPLER2D},overlayTexture:{type:d.OBJECT,required:!0},alpha:{type:d.NUMBER,default:1,uniformType:_.FLOAT}},t.a=v},function(e,t){e.exports="uniform sampler2D u_image;\nvarying vec2 v_texCoord;\nuniform sampler2D u_overlayImage;\nuniform int u_blendMode;\nuniform float u_alpha;\n\nconst float EPSILON = 0.000001;\n\nvec4 overlay(vec4 a, vec4 b) {\n vec3 result = mix(\n 1.0 - 2.0 * (1.0 - a.rgb) * (1.0 - b.rgb),\n 2.0 * a.rgb * b.rgb,\n vec3(a.r < 0.5, a.g < 0.5, a.b < 0.5)\n );\n return mix(a, vec4(result, a.a), u_alpha * b.a);\n}\n\nvec4 hardLight(vec4 b, vec4 a) {\n vec3 result = mix(\n 1.0 - 2.0 * (1.0 - a.rgb) * (1.0 - b.rgb),\n 2.0 * a.rgb * b.rgb,\n vec3(a.r < 0.5, a.g < 0.5, a.b < 0.5)\n );\n return mix(b, vec4(result, b.a), u_alpha * a.a);\n}\n\nvec4 softLight(vec4 a, vec4 b) {\n vec3 result = mix(\n 2.0 * a.rgb * (1.0 - b.rgb) + (2.0 * b.rgb - 1.0) * sqrt(a.rgb),\n 2.0 * a.rgb * b.rgb + a.rgb * a.rgb * (1.0 - 2.0 * b.rgb),\n vec3(b.r < 0.5, b.g < 0.5, b.b < 0.5)\n );\n return mix(a, vec4(result, a.a), u_alpha * b.a);\n}\n\nvec4 multiply(vec4 a, vec4 b) {\n vec3 result = a.rgb * b.rgb;\n return mix(a, vec4(result, a.a), u_alpha * b.a);\n}\n\nvec4 darken(vec4 a, vec4 b) {\n vec3 result = min(a.rgb, b.rgb);\n return mix(a, vec4(result, a.a), u_alpha * b.a);\n}\n\nvec4 lighten(vec4 a, vec4 b) {\n vec3 result = max(a.rgb, b.rgb);\n return mix(a, vec4(result, a.a), u_alpha * b.a);\n}\n\nvec4 screen(vec4 a, vec4 b) {\n vec3 result = 1.0 - (1.0 - a.rgb) * (1.0 - b.rgb);\n return mix(a, vec4(result, a.a), u_alpha * b.a);\n}\n\nvec4 colorBurn(vec4 a, vec4 b) {\n vec3 result = clamp(1.0 - (1.0 - a.rgb) / max(b.rgb, EPSILON), 0.0, 1.0);\n return mix(a, vec4(result, a.a), u_alpha * b.a);\n}\n\nvec4 normal(vec4 a, vec4 b) {\n return mix(a, vec4(b.rgb, a.a), u_alpha * b.a);\n}\n\nvoid main() {\n vec4 color = texture2D(u_image, v_texCoord);\n vec4 overlayColor = texture2D(u_overlayImage, v_texCoord);\n\n vec4 resultColor;\n if (u_blendMode == 0) {\n resultColor = normal(color, overlayColor);\n } else if (u_blendMode == 1) {\n resultColor = overlay(color, overlayColor);\n } else if (u_blendMode == 2) {\n resultColor = hardLight(color, overlayColor);\n } else if (u_blendMode == 3) {\n resultColor = softLight(color, overlayColor);\n } else if (u_blendMode == 4) {\n resultColor = multiply(color, overlayColor);\n } else if (u_blendMode == 5) {\n resultColor = darken(color, overlayColor);\n } else if (u_blendMode == 6) {\n resultColor = lighten(color, overlayColor);\n } else if (u_blendMode == 7) {\n resultColor = screen(color, overlayColor);\n } else if (u_blendMode == 8) {\n resultColor = colorBurn(color, overlayColor);\n }\n gl_FragColor = vec4(resultColor.rgb * resultColor.a, resultColor.a);\n}\n"},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var r={EXPORT:"export",CLOSE:"close",OPERATION_CREATED:"operation:created",OPERATION_UPDATED:"operation:updated",OPERATION_REMOVED:"operation:removed",EDITOR_READY:"editor:ready",WINDOW_RESIZE:"window:resize",ZOOM_DONE:"editor:zoom_done",HISTORY_UNDO:"history:undo",HISTORY_UPDATED:"history:update",FEATURES_DISABLED:"editor:features:disabled",FEATURES_ENABLED:"editor:features:enabled",FEATURES_UPDATED:"editor:features:updated",TRANSFORM_REAPPLY_RATIO:"transform:reapply_ratio"};n(263).a},function(e,t,n){"use strict";t.a=[{defaultName:"Natasha Wescoat",identifier:"imgly_art_filter_june_tree",rootPath:"art-filters/imgly_june_tree",thumbnail:"art-filters/imgly_june_tree/thumbnail.jpg"},{defaultName:"Hive",identifier:"imgly_art_filter_hive",rootPath:"art-filters/imgly_hive",thumbnail:"art-filters/imgly_hive/thumbnail.jpg"},{defaultName:"Udnie",identifier:"imgly_art_filter_udnie",rootPath:"art-filters/imgly_udnie",thumbnail:"art-filters/imgly_udnie/thumbnail.jpg"},{defaultName:"Vince Low",identifier:"imgly_art_filter_vince_low",rootPath:"art-filters/imgly_vince_low",thumbnail:"art-filters/imgly_vince_low/thumbnail.jpg"},{defaultName:"Mosaic",identifier:"imgly_art_filter_mosaic",rootPath:"art-filters/imgly_mosaic",thumbnail:"art-filters/imgly_mosaic/thumbnail.jpg"},{defaultName:"Wave",identifier:"imgly_art_filter_wave",rootPath:"art-filters/imgly_wave",thumbnail:"art-filters/imgly_wave/thumbnail.jpg"},{defaultName:"Malikova Darya",identifier:"imgly_art_filter_watercolor",rootPath:"art-filters/imgly_watercolor",thumbnail:"art-filters/imgly_watercolor/thumbnail.jpg"}]},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",function(){return w});var i=n(42),o=n.n(i),a=n(46),s=n.n(a),u=n(0),l=n.n(u),c=n(21),f=n.n(c),h=n(27),p=n(265),d=n(60),_=n(154),v=n(273),y="function"==typeof s.a&&"symbol"==typeof o.a?function(e){return typeof e}:function(e){return e&&"function"==typeof s.a&&e.constructor===s.a&&e!==s.a.prototype?"symbol":typeof e},g=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),l()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),m=function(e){return h.a.byteArrayToString(d.a.decode(e))},b=function(){function e(t){r(this,e),this._version="2.0",this._l="string"==typeof t?t.trim():t,this._e=this._parseBigInt("65537",10),this._n=this._parseBigInt("681984042382424091378806337544846672160292647422517223678775230983366046720611873368204040735766698395282492937192783016867164773742859209434481353888637963692711665138989982680829529436715362566735813634679619274059040232728883894511099669775400556584329435375723951309340934658571478665059403241851229195311069345899870108307225910988692123234379186643268583453907260879685992156955936561142314233983397819356937109343127504441076920088455337597736475086676246750168976219763398350254797168313954762459542746440628077261880980924552698138857743609502132632199713575442848784271304503226045319991689413234228439044522583790713890093165912455428688507463773064216328753265963237930998706891042679105987175588970202082466871461192706070321938250462103821558100761330890228135620208935801286878657384108721268761878694436895194628411397454202904351577771506916746612289964053490210990342857409030179406810634136188751670648983222653319056818302012063874664196648868156305696644664362171542503665321455971335955948698828939948786720193132672749776162913092000667953299803216404664087988046584107737900256954976744353601826341965438148646041640662195744770544094748295945844184507459808803114917301124088082458306086473490516969815873631",10),this._parseLicense()}return g(e,[{key:"v",value:function(){return this._sigValid()&&!this.isExp()}},{key:"_jsonValid",value:function(){try{this._decLic=JSON.parse(this._l)}catch(e){return this._decLic={},!1}return!0}},{key:"_hostnameValid",value:function(){if("undefined"==typeof window)return!0;if(!this._decLic[m("YXBwX2lkZW50aWZpZXJz")].length)return!0;var e=window.location.hostname,t=!1;return this._decLic[m("YXBwX2lkZW50aWZpZXJz")].forEach(function(n){h.a.wildCardMatch(e,n)&&(t=!0)}),t}},{key:"_platformValid",value:function(){return"HTML5"===this._decLic[m("cGxhdGZvcm0=")]}},{key:"c",value:function(){var e=this;return new f.a(function(t,n){if("string"!==y(e._l)||!e._jsonValid()){var r=new Error;return r.code="ELICINVFMT",n(r)}if(!e._sigValid()){var i=new Error;return i.code="ELICINV",n(i)}if(!e._hostnameValid()){var o=new Error;return o.code="ELICINVHOST",n(o)}if(!e._platformValid()){var a=new Error;return a.code="ELICINVPLAT",n(a)}if(e.isExp()){var s=new Error;return s.code="ELICEXP",n(s)}t()})}},{key:"isToolAllowed",value:function(e){return this._decLic[m("ZmVhdHVyZXM=")]&&-1!==this._decLic[m("ZmVhdHVyZXM=")].indexOf(e)}},{key:"t",value:function(){if(this._decLic.enterprise_license)return f.a.resolve();var e=this._decLic[m("ZG9tYWlucw==")][0]+m(m("TDNSeVlXTnJQMkZ3YVV0bGVUMD0="))+this._decLic[m("YXBpX3Rva2Vu")];return new _.a(e).load()}},{key:"isENT",value:function(){return!!this._decLic&&this._decLic[m("ZW50ZXJwcmlzZV9saWNlbnNl")]}},{key:"_sigValid",value:function(){return this._verify(this._message,this._sig)}},{key:"exp",value:function(){return!!this._decLic[m("ZXhwaXJlc19hdA==")]}},{key:"dl",value:function(){return Math.ceil((this._expAt()-Date.now())/864e5)}},{key:"isExp",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Date.now();return null!==this._decLic[m("ZXhwaXJlc19hdA==")]&&e>this._expAt()}},{key:"_expAt",value:function(){return 1e3*this._decLic[m("ZXhwaXJlc19hdA==")]}},{key:"_verify",value:function(e,t){return this._encodeMessage(e)===this._decodeSignature(t).substr(-64)}},{key:"_encodeMessage",value:function(e){return Object(v.a)(e)}},{key:"_decodeSignature",value:function(e){return e=function(e){return e.map(function(e){return("0"+(255&e).toString(16)).slice(-2)}).join("")}(e=d.a.decode(e)),(e=this._parseBigInt(e,16)).modPowInt(this._e,this._n).toString(16)}},{key:"_parseBigInt",value:function(e,t){return new p.a(e,t)}},{key:"_parseLicense",value:function(){"string"==typeof this._l&&this._jsonValid()&&(this._sig=this._decLic[m("c2lnbmF0dXJl")]||"",delete this._decLic[m("c2lnbmF0dXJl")],this._sig=this._sig.replace(/[^A-Za-z0-9+\/=]/g,""),this._message=this._l.replace(new RegExp(',"'+m("c2lnbmF0dXJl")+'":"([^"]*)"'),""))}}]),e}(),w=function(){function e(){r(this,e)}return g(e,[{key:"v",value:function(){return!0}},{key:"c",value:function(){return f.a.resolve()}},{key:"isToolAllowed",value:function(e){return!0}},{key:"t",value:function(){return f.a.resolve()}},{key:"isENT",value:function(){return!1}},{key:"exp",value:function(){return!1}},{key:"dl",value:function(){return 0}},{key:"isExp",value:function(){return arguments.length>0&&void 0!==arguments[0]?arguments[0]:Date.now(),!1}}]),e}();t.b=b},function(e,t,n){"use strict";function r(e,t,n){null!=e&&("number"==typeof e?this.fromNumber(e,t,n):null==t&&"string"!=typeof e?this.fromString(e,256):this.fromString(e,t))}function i(){return new r(null)}function o(e){return k.charAt(e)}function a(e,t){var n=R[e.charCodeAt(t)];return null==n?-1:n}function s(e){var t=i();return t.fromInt(e),t}function u(e){var t,n=1;return 0!=(t=e>>>16)&&(e=t,n+=16),0!=(t=e>>8)&&(e=t,n+=8),0!=(t=e>>4)&&(e=t,n+=4),0!=(t=e>>2)&&(e=t,n+=2),0!=(t=e>>1)&&(e=t,n+=1),n}function l(e){this.m=e}function c(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}function f(e,t){return e&t}function h(e,t){return e|t}function p(e,t){return e^t}function d(e,t){return e&~t}function _(e){if(0==e)return-1;var t=0;return 0==(65535&e)&&(e>>=16,t+=16),0==(255&e)&&(e>>=8,t+=8),0==(15&e)&&(e>>=4,t+=4),0==(3&e)&&(e>>=2,t+=2),0==(1&e)&&++t,t}function v(e){for(var t=0;0!=e;)e&=e-1,++t;return t}function y(){}function g(e){return e}function m(e){this.r2=i(),this.q3=i(),r.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e),this.m=e}var b,w=w||{};"Microsoft Internet Explorer"==w.appName?(r.prototype.am=function(e,t,n,r,i,o){for(var a=32767&t,s=t>>15;--o>=0;){var u=32767&this[e],l=this[e++]>>15,c=s*u+l*a;i=((u=a*u+((32767&c)<<15)+n[r]+(1073741823&i))>>>30)+(c>>>15)+s*l+(i>>>30),n[r++]=1073741823&u}return i},b=30):"Netscape"!=w.appName?(r.prototype.am=function(e,t,n,r,i,o){for(;--o>=0;){var a=t*this[e++]+n[r]+i;i=Math.floor(a/67108864),n[r++]=67108863&a}return i},b=26):(r.prototype.am=function(e,t,n,r,i,o){for(var a=16383&t,s=t>>14;--o>=0;){var u=16383&this[e],l=this[e++]>>14,c=s*u+l*a;i=((u=a*u+((16383&c)<<14)+n[r]+i)>>28)+(c>>14)+s*l,n[r++]=268435455&u}return i},b=28),r.prototype.DB=b,r.prototype.DM=(1<<b)-1,r.prototype.DV=1<<b,r.prototype.FV=Math.pow(2,52),r.prototype.F1=52-b,r.prototype.F2=2*b-52;var x,T,k="0123456789abcdefghijklmnopqrstuvwxyz",R=new Array;for(x="0".charCodeAt(0),T=0;T<=9;++T)R[x++]=T;for(x="a".charCodeAt(0),T=10;T<36;++T)R[x++]=T;for(x="A".charCodeAt(0),T=10;T<36;++T)R[x++]=T;l.prototype.convert=function(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e},l.prototype.revert=function(e){return e},l.prototype.reduce=function(e){e.divRemTo(this.m,null,e)},l.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},l.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},c.prototype.convert=function(e){var t=i();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(r.ZERO)>0&&this.m.subTo(t,t),t},c.prototype.revert=function(e){var t=i();return e.copyTo(t),this.reduce(t),t},c.prototype.reduce=function(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t<this.m.t;++t){var n=32767&e[t],r=n*this.mpl+((n*this.mph+(e[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(e[n=t+this.m.t]+=this.m.am(0,r,e,t,0,this.m.t);e[n]>=e.DV;)e[n]-=e.DV,e[++n]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},c.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},c.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},r.prototype.copyTo=function(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s},r.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,e>0?this[0]=e:e<-1?this[0]=e+this.DV:this.t=0},r.prototype.fromString=function(e,t){var n;if(16==t)n=4;else if(8==t)n=3;else if(256==t)n=8;else if(2==t)n=1;else if(32==t)n=5;else{if(4!=t)return void this.fromRadix(e,t);n=2}this.t=0,this.s=0;for(var i=e.length,o=!1,s=0;--i>=0;){var u=8==n?255&e[i]:a(e,i);u<0?"-"==e.charAt(i)&&(o=!0):(o=!1,0==s?this[this.t++]=u:s+n>this.DB?(this[this.t-1]|=(u&(1<<this.DB-s)-1)<<s,this[this.t++]=u>>this.DB-s):this[this.t-1]|=u<<s,(s+=n)>=this.DB&&(s-=this.DB))}8==n&&0!=(128&e[0])&&(this.s=-1,s>0&&(this[this.t-1]|=(1<<this.DB-s)-1<<s)),this.clamp(),o&&r.ZERO.subTo(this,this)},r.prototype.clamp=function(){for(var e=this.s&this.DM;this.t>0&&this[this.t-1]==e;)--this.t},r.prototype.dlShiftTo=function(e,t){var n;for(n=this.t-1;n>=0;--n)t[n+e]=this[n];for(n=e-1;n>=0;--n)t[n]=0;t.t=this.t+e,t.s=this.s},r.prototype.drShiftTo=function(e,t){for(var n=e;n<this.t;++n)t[n-e]=this[n];t.t=Math.max(this.t-e,0),t.s=this.s},r.prototype.lShiftTo=function(e,t){var n,r=e%this.DB,i=this.DB-r,o=(1<<i)-1,a=Math.floor(e/this.DB),s=this.s<<r&this.DM;for(n=this.t-1;n>=0;--n)t[n+a+1]=this[n]>>i|s,s=(this[n]&o)<<r;for(n=a-1;n>=0;--n)t[n]=0;t[a]=s,t.t=this.t+a+1,t.s=this.s,t.clamp()},r.prototype.rShiftTo=function(e,t){t.s=this.s;var n=Math.floor(e/this.DB);if(n>=this.t)t.t=0;else{var r=e%this.DB,i=this.DB-r,o=(1<<r)-1;t[0]=this[n]>>r;for(var a=n+1;a<this.t;++a)t[a-n-1]|=(this[a]&o)<<i,t[a-n]=this[a]>>r;r>0&&(t[this.t-n-1]|=(this.s&o)<<i),t.t=this.t-n,t.clamp()}},r.prototype.subTo=function(e,t){for(var n=0,r=0,i=Math.min(e.t,this.t);n<i;)r+=this[n]-e[n],t[n++]=r&this.DM,r>>=this.DB;if(e.t<this.t){for(r-=e.s;n<this.t;)r+=this[n],t[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<e.t;)r-=e[n],t[n++]=r&this.DM,r>>=this.DB;r-=e.s}t.s=r<0?-1:0,r<-1?t[n++]=this.DV+r:r>0&&(t[n++]=r),t.t=n,t.clamp()},r.prototype.multiplyTo=function(e,t){var n=this.abs(),i=e.abs(),o=n.t;for(t.t=o+i.t;--o>=0;)t[o]=0;for(o=0;o<i.t;++o)t[o+n.t]=n.am(0,i[o],t,o,0,n.t);t.s=0,t.clamp(),this.s!=e.s&&r.ZERO.subTo(t,t)},r.prototype.squareTo=function(e){for(var t=this.abs(),n=e.t=2*t.t;--n>=0;)e[n]=0;for(n=0;n<t.t-1;++n){var r=t.am(n,t[n],e,2*n,0,1);(e[n+t.t]+=t.am(n+1,2*t[n],e,2*n+1,r,t.t-n-1))>=t.DV&&(e[n+t.t]-=t.DV,e[n+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(n,t[n],e,2*n,0,1)),e.s=0,e.clamp()},r.prototype.divRemTo=function(e,t,n){var o=e.abs();if(!(o.t<=0)){var a=this.abs();if(a.t<o.t)return null!=t&&t.fromInt(0),void(null!=n&&this.copyTo(n));null==n&&(n=i());var s=i(),l=this.s,c=e.s,f=this.DB-u(o[o.t-1]);f>0?(o.lShiftTo(f,s),a.lShiftTo(f,n)):(o.copyTo(s),a.copyTo(n));var h=s.t,p=s[h-1];if(0!=p){var d=p*(1<<this.F1)+(h>1?s[h-2]>>this.F2:0),_=this.FV/d,v=(1<<this.F1)/d,y=1<<this.F2,g=n.t,m=g-h,b=null==t?i():t;for(s.dlShiftTo(m,b),n.compareTo(b)>=0&&(n[n.t++]=1,n.subTo(b,n)),r.ONE.dlShiftTo(h,b),b.subTo(s,s);s.t<h;)s[s.t++]=0;for(;--m>=0;){var w=n[--g]==p?this.DM:Math.floor(n[g]*_+(n[g-1]+y)*v);if((n[g]+=s.am(0,w,n,m,0,h))<w)for(s.dlShiftTo(m,b),n.subTo(b,n);n[g]<--w;)n.subTo(b,n)}null!=t&&(n.drShiftTo(h,t),l!=c&&r.ZERO.subTo(t,t)),n.t=h,n.clamp(),f>0&&n.rShiftTo(f,n),l<0&&r.ZERO.subTo(n,n)}}},r.prototype.invDigit=function(){if(this.t<1)return 0;var e=this[0];if(0==(1&e))return 0;var t=3&e;return(t=(t=(t=(t=t*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)>0?this.DV-t:-t},r.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},r.prototype.exp=function(e,t){if(e>4294967295||e<1)return r.ONE;var n=i(),o=i(),a=t.convert(this),s=u(e)-1;for(a.copyTo(n);--s>=0;)if(t.sqrTo(n,o),(e&1<<s)>0)t.mulTo(o,a,n);else{var l=n;n=o,o=l}return t.revert(n)},r.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(16==e)t=4;else if(8==e)t=3;else if(2==e)t=1;else if(32==e)t=5;else{if(4!=e)return this.toRadix(e);t=2}var n,r=(1<<t)-1,i=!1,a="",s=this.t,u=this.DB-s*this.DB%t;if(s-- >0)for(u<this.DB&&(n=this[s]>>u)>0&&(i=!0,a=o(n));s>=0;)u<t?(n=(this[s]&(1<<u)-1)<<t-u,n|=this[--s]>>(u+=this.DB-t)):(n=this[s]>>(u-=t)&r,u<=0&&(u+=this.DB,--s)),n>0&&(i=!0),i&&(a+=o(n));return i?a:"0"},r.prototype.negate=function(){var e=i();return r.ZERO.subTo(this,e),e},r.prototype.abs=function(){return this.s<0?this.negate():this},r.prototype.compareTo=function(e){var t=this.s-e.s;if(0!=t)return t;var n=this.t;if(0!=(t=n-e.t))return this.s<0?-t:t;for(;--n>=0;)if(0!=(t=this[n]-e[n]))return t;return 0},r.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+u(this[this.t-1]^this.s&this.DM)},r.prototype.mod=function(e){var t=i();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(r.ZERO)>0&&e.subTo(t,t),t},r.prototype.modPowInt=function(e,t){var n;return n=e<256||t.isEven()?new l(t):new c(t),this.exp(e,n)},r.ZERO=s(0),r.ONE=s(1),y.prototype.convert=g,y.prototype.revert=g,y.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n)},y.prototype.sqrTo=function(e,t){e.squareTo(t)},m.prototype.convert=function(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=i();return e.copyTo(t),this.reduce(t),t},m.prototype.revert=function(e){return e},m.prototype.reduce=function(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)},m.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},m.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)};var C=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],E=(1<<26)/C[C.length-1];r.prototype.chunkSize=function(e){return Math.floor(Math.LN2*this.DB/Math.log(e))},r.prototype.toRadix=function(e){if(null==e&&(e=10),0==this.signum()||e<2||e>36)return"0";var t=this.chunkSize(e),n=Math.pow(e,t),r=s(n),o=i(),a=i(),u="";for(this.divRemTo(r,o,a);o.signum()>0;)u=(n+a.intValue()).toString(e).substr(1)+u,o.divRemTo(r,o,a);return a.intValue().toString(e)+u},r.prototype.fromRadix=function(e,t){this.fromInt(0),null==t&&(t=10);for(var n=this.chunkSize(t),i=Math.pow(t,n),o=!1,s=0,u=0,l=0;l<e.length;++l){var c=a(e,l);c<0?"-"==e.charAt(l)&&0==this.signum()&&(o=!0):(u=t*u+c,++s>=n&&(this.dMultiply(i),this.dAddOffset(u,0),s=0,u=0))}s>0&&(this.dMultiply(Math.pow(t,s)),this.dAddOffset(u,0)),o&&r.ZERO.subTo(this,this)},r.prototype.fromNumber=function(e,t,n){if("number"==typeof t)if(e<2)this.fromInt(1);else for(this.fromNumber(e,n),this.testBit(e-1)||this.bitwiseTo(r.ONE.shiftLeft(e-1),h,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(t);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(r.ONE.shiftLeft(e-1),this);else{var i=new Array,o=7&e;i.length=1+(e>>3),t.nextBytes(i),o>0?i[0]&=(1<<o)-1:i[0]=0,this.fromString(i,256)}},r.prototype.bitwiseTo=function(e,t,n){var r,i,o=Math.min(e.t,this.t);for(r=0;r<o;++r)n[r]=t(this[r],e[r]);if(e.t<this.t){for(i=e.s&this.DM,r=o;r<this.t;++r)n[r]=t(this[r],i);n.t=this.t}else{for(i=this.s&this.DM,r=o;r<e.t;++r)n[r]=t(i,e[r]);n.t=e.t}n.s=t(this.s,e.s),n.clamp()},r.prototype.changeBit=function(e,t){var n=r.ONE.shiftLeft(e);return this.bitwiseTo(n,t,n),n},r.prototype.addTo=function(e,t){for(var n=0,r=0,i=Math.min(e.t,this.t);n<i;)r+=this[n]+e[n],t[n++]=r&this.DM,r>>=this.DB;if(e.t<this.t){for(r+=e.s;n<this.t;)r+=this[n],t[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<e.t;)r+=e[n],t[n++]=r&this.DM,r>>=this.DB;r+=e.s}t.s=r<0?-1:0,r>0?t[n++]=r:r<-1&&(t[n++]=this.DV+r),t.t=n,t.clamp()},r.prototype.dMultiply=function(e){this[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()},r.prototype.dAddOffset=function(e,t){if(0!=e){for(;this.t<=t;)this[this.t++]=0;for(this[t]+=e;this[t]>=this.DV;)this[t]-=this.DV,++t>=this.t&&(this[this.t++]=0),++this[t]}},r.prototype.multiplyLowerTo=function(e,t,n){var r,i=Math.min(this.t+e.t,t);for(n.s=0,n.t=i;i>0;)n[--i]=0;for(r=n.t-this.t;i<r;++i)n[i+this.t]=this.am(0,e[i],n,i,0,this.t);for(r=Math.min(e.t,t);i<r;++i)this.am(0,e[i],n,i,0,t-i);n.clamp()},r.prototype.multiplyUpperTo=function(e,t,n){--t;var r=n.t=this.t+e.t-t;for(n.s=0;--r>=0;)n[r]=0;for(r=Math.max(t-this.t,0);r<e.t;++r)n[this.t+r-t]=this.am(t-r,e[r],n,0,0,this.t+r-t);n.clamp(),n.drShiftTo(1,n)},r.prototype.modInt=function(e){if(e<=0)return 0;var t=this.DV%e,n=this.s<0?e-1:0;if(this.t>0)if(0==t)n=this[0]%e;else for(var r=this.t-1;r>=0;--r)n=(t*n+this[r])%e;return n},r.prototype.millerRabin=function(e){var t=this.subtract(r.ONE),n=t.getLowestSetBit();if(n<=0)return!1;var o=t.shiftRight(n);(e=e+1>>1)>C.length&&(e=C.length);for(var a=i(),s=0;s<e;++s){a.fromInt(C[Math.floor(Math.random()*C.length)]);var u=a.modPow(o,this);if(0!=u.compareTo(r.ONE)&&0!=u.compareTo(t)){for(var l=1;l++<n&&0!=u.compareTo(t);)if(0==(u=u.modPowInt(2,this)).compareTo(r.ONE))return!1;if(0!=u.compareTo(t))return!1}}return!0},r.prototype.clone=function(){var e=i();return this.copyTo(e),e},r.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},r.prototype.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},r.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},r.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},r.prototype.toByteArray=function(){var e=this.t,t=new Array;t[0]=this.s;var n,r=this.DB-e*this.DB%8,i=0;if(e-- >0)for(r<this.DB&&(n=this[e]>>r)!=(this.s&this.DM)>>r&&(t[i++]=n|this.s<<this.DB-r);e>=0;)r<8?(n=(this[e]&(1<<r)-1)<<8-r,n|=this[--e]>>(r+=this.DB-8)):(n=this[e]>>(r-=8)&255,r<=0&&(r+=this.DB,--e)),0!=(128&n)&&(n|=-256),0==i&&(128&this.s)!=(128&n)&&++i,(i>0||n!=this.s)&&(t[i++]=n);return t},r.prototype.equals=function(e){return 0==this.compareTo(e)},r.prototype.min=function(e){return this.compareTo(e)<0?this:e},r.prototype.max=function(e){return this.compareTo(e)>0?this:e},r.prototype.and=function(e){var t=i();return this.bitwiseTo(e,f,t),t},r.prototype.or=function(e){var t=i();return this.bitwiseTo(e,h,t),t},r.prototype.xor=function(e){var t=i();return this.bitwiseTo(e,p,t),t},r.prototype.andNot=function(e){var t=i();return this.bitwiseTo(e,d,t),t},r.prototype.not=function(){for(var e=i(),t=0;t<this.t;++t)e[t]=this.DM&~this[t];return e.t=this.t,e.s=~this.s,e},r.prototype.shiftLeft=function(e){var t=i();return e<0?this.rShiftTo(-e,t):this.lShiftTo(e,t),t},r.prototype.shiftRight=function(e){var t=i();return e<0?this.lShiftTo(-e,t):this.rShiftTo(e,t),t},r.prototype.getLowestSetBit=function(){for(var e=0;e<this.t;++e)if(0!=this[e])return e*this.DB+_(this[e]);return this.s<0?this.t*this.DB:-1},r.prototype.bitCount=function(){for(var e=0,t=this.s&this.DM,n=0;n<this.t;++n)e+=v(this[n]^t);return e},r.prototype.testBit=function(e){var t=Math.floor(e/this.DB);return t>=this.t?0!=this.s:0!=(this[t]&1<<e%this.DB)},r.prototype.setBit=function(e){return this.changeBit(e,h)},r.prototype.clearBit=function(e){return this.changeBit(e,d)},r.prototype.flipBit=function(e){return this.changeBit(e,p)},r.prototype.add=function(e){var t=i();return this.addTo(e,t),t},r.prototype.subtract=function(e){var t=i();return this.subTo(e,t),t},r.prototype.multiply=function(e){var t=i();return this.multiplyTo(e,t),t},r.prototype.divide=function(e){var t=i();return this.divRemTo(e,t,null),t},r.prototype.remainder=function(e){var t=i();return this.divRemTo(e,null,t),t},r.prototype.divideAndRemainder=function(e){var t=i(),n=i();return this.divRemTo(e,t,n),new Array(t,n)},r.prototype.modPow=function(e,t){var n,r,o=e.bitLength(),a=s(1);if(o<=0)return a;n=o<18?1:o<48?3:o<144?4:o<768?5:6,r=o<8?new l(t):t.isEven()?new m(t):new c(t);var f=new Array,h=3,p=n-1,d=(1<<n)-1;if(f[1]=r.convert(this),n>1){var _=i();for(r.sqrTo(f[1],_);h<=d;)f[h]=i(),r.mulTo(_,f[h-2],f[h]),h+=2}var v,y,g=e.t-1,b=!0,w=i();for(o=u(e[g])-1;g>=0;){for(o>=p?v=e[g]>>o-p&d:(v=(e[g]&(1<<o+1)-1)<<p-o,g>0&&(v|=e[g-1]>>this.DB+o-p)),h=n;0==(1&v);)v>>=1,--h;if((o-=h)<0&&(o+=this.DB,--g),b)f[v].copyTo(a),b=!1;else{for(;h>1;)r.sqrTo(a,w),r.sqrTo(w,a),h-=2;h>0?r.sqrTo(a,w):(y=a,a=w,w=y),r.mulTo(w,f[v],a)}for(;g>=0&&0==(e[g]&1<<o);)r.sqrTo(a,w),y=a,a=w,w=y,--o<0&&(o=this.DB-1,--g)}return r.revert(a)},r.prototype.modInverse=function(e){var t=e.isEven();if(this.isEven()&&t||0==e.signum())return r.ZERO;for(var n=e.clone(),i=this.clone(),o=s(1),a=s(0),u=s(0),l=s(1);0!=n.signum();){for(;n.isEven();)n.rShiftTo(1,n),t?(o.isEven()&&a.isEven()||(o.addTo(this,o),a.subTo(e,a)),o.rShiftTo(1,o)):a.isEven()||a.subTo(e,a),a.rShiftTo(1,a);for(;i.isEven();)i.rShiftTo(1,i),t?(u.isEven()&&l.isEven()||(u.addTo(this,u),l.subTo(e,l)),u.rShiftTo(1,u)):l.isEven()||l.subTo(e,l),l.rShiftTo(1,l);n.compareTo(i)>=0?(n.subTo(i,n),t&&o.subTo(u,o),a.subTo(l,a)):(i.subTo(n,i),t&&u.subTo(o,u),l.subTo(a,l))}return 0!=i.compareTo(r.ONE)?r.ZERO:l.compareTo(e)>=0?l.subtract(e):l.signum()<0?(l.addTo(e,l),l.signum()<0?l.add(e):l):l},r.prototype.pow=function(e){return this.exp(e,new y)},r.prototype.gcd=function(e){var t=this.s<0?this.negate():this.clone(),n=e.s<0?e.negate():e.clone();if(t.compareTo(n)<0){var r=t;t=n,n=r}var i=t.getLowestSetBit(),o=n.getLowestSetBit();if(o<0)return t;for(i<o&&(o=i),o>0&&(t.rShiftTo(o,t),n.rShiftTo(o,n));t.signum()>0;)(i=t.getLowestSetBit())>0&&t.rShiftTo(i,t),(i=n.getLowestSetBit())>0&&n.rShiftTo(i,n),t.compareTo(n)>=0?(t.subTo(n,t),t.rShiftTo(1,t)):(n.subTo(t,n),n.rShiftTo(1,n));return o>0&&n.lShiftTo(o,n),n},r.prototype.isProbablePrime=function(e){var t,n=this.abs();if(1==n.t&&n[0]<=C[C.length-1]){for(t=0;t<C.length;++t)if(n[0]==C[t])return!0;return!1}if(n.isEven())return!1;for(t=1;t<C.length;){for(var r=C[t],i=t+1;i<C.length&&r<E;)r*=C[i++];for(r=n.modInt(r);t<i;)if(r%C[t++]==0)return!1}return n.millerRabin(e)},r.prototype.square=function(){var e=i();return this.squareTo(e),e},t.a=r},function(e,t,n){"use strict";function r(){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 i(e,t,n){if(e&&a.isObject(e)&&e instanceof r)return e;var i=new r;return i.parse(e,t,n),i}var o=n(267),a=n(269);t.parse=i,t.resolve=function(e,t){return i(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?i(e,!1,!0).resolveObject(t):t},t.format=function(e){return a.isString(e)&&(e=i(e)),e instanceof r?e.format():r.prototype.format.call(e)},t.Url=r;var s=/^([a-z0-9.+-]+:)/i,u=/:[0-9]*$/,l=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),f=["'"].concat(c),h=["%","/","?",";","#"].concat(f),p=["/","?","#"],d=/^[+a-z0-9A-Z_-]{0,63}$/,_=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,v={javascript:!0,"javascript:":!0},y={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},m=n(270);r.prototype.parse=function(e,t,n){if(!a.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var r=e.indexOf("?"),i=-1!==r&&r<e.indexOf("#")?"?":"#",u=e.split(i);u[0]=u[0].replace(/\\/g,"/");var c=e=u.join(i);if(c=c.trim(),!n&&1===e.split("#").length){var b=l.exec(c);if(b)return this.path=c,this.href=c,this.pathname=b[1],b[2]?(this.search=b[2],this.query=t?m.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var w=s.exec(c);if(w){var x=(w=w[0]).toLowerCase();this.protocol=x,c=c.substr(w.length)}if(n||w||c.match(/^\/\/[^@\/]+@[^@\/]+/)){var T="//"===c.substr(0,2);!T||w&&y[w]||(c=c.substr(2),this.slashes=!0)}if(!y[w]&&(T||w&&!g[w])){for(var k,R,C=-1,E=0;E<p.length;E++)-1!==(O=c.indexOf(p[E]))&&(-1===C||O<C)&&(C=O);for(-1!==(R=-1===C?c.lastIndexOf("@"):c.lastIndexOf("@",C))&&(k=c.slice(0,R),c=c.slice(R+1),this.auth=decodeURIComponent(k)),C=-1,E=0;E<h.length;E++){var O;-1!==(O=c.indexOf(h[E]))&&(-1===C||O<C)&&(C=O)}-1===C&&(C=c.length),this.host=c.slice(0,C),c=c.slice(C),this.parseHost(),this.hostname=this.hostname||"";var S="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!S)for(var A=this.hostname.split(/\./),I=(E=0,A.length);E<I;E++){var F=A[E];if(F&&!F.match(d)){for(var D="",M=0,B=F.length;M<B;M++)F.charCodeAt(M)>127?D+="x":D+=F[M];if(!D.match(d)){var L=A.slice(0,E),P=A.slice(E+1),N=F.match(_);N&&(L.push(N[1]),P.unshift(N[2])),P.length&&(c="/"+P.join(".")+c),this.hostname=L.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),S||(this.hostname=o.toASCII(this.hostname));var U=this.port?":"+this.port:"",z=this.hostname||"";this.host=z+U,this.href+=this.host,S&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==c[0]&&(c="/"+c))}if(!v[x])for(E=0,I=f.length;E<I;E++){var G=f[E];if(-1!==c.indexOf(G)){var j=encodeURIComponent(G);j===G&&(j=escape(G)),c=c.split(G).join(j)}}var V=c.indexOf("#");-1!==V&&(this.hash=c.substr(V),c=c.slice(0,V));var W=c.indexOf("?");if(-1!==W?(this.search=c.substr(W),this.query=c.substr(W+1),t&&(this.query=m.parse(this.query)),c=c.slice(0,W)):t&&(this.search="",this.query={}),c&&(this.pathname=c),g[x]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){U=this.pathname||"";var H=this.search||"";this.path=U+H}return this.href=this.format(),this},r.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",n=this.pathname||"",r=this.hash||"",i=!1,o="";this.host?i=e+this.host:this.hostname&&(i=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&a.isObject(this.query)&&Object.keys(this.query).length&&(o=m.stringify(this.query));var s=this.search||o&&"?"+o||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||g[t])&&!1!==i?(i="//"+(i||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):i||(i=""),r&&"#"!==r.charAt(0)&&(r="#"+r),s&&"?"!==s.charAt(0)&&(s="?"+s),t+i+(n=n.replace(/[?#]/g,function(e){return encodeURIComponent(e)}))+(s=s.replace("#","%23"))+r},r.prototype.resolve=function(e){return this.resolveObject(i(e,!1,!0)).format()},r.prototype.resolveObject=function(e){if(a.isString(e)){var t=new r;t.parse(e,!1,!0),e=t}for(var n=new r,i=Object.keys(this),o=0;o<i.length;o++){var s=i[o];n[s]=this[s]}if(n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var u=Object.keys(e),l=0;l<u.length;l++){var c=u[l];"protocol"!==c&&(n[c]=e[c])}return g[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!g[e.protocol]){for(var f=Object.keys(e),h=0;h<f.length;h++){var p=f[h];n[p]=e[p]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||y[e.protocol])n.pathname=e.pathname;else{for(var d=(e.pathname||"").split("/");d.length&&!(e.host=d.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==d[0]&&d.unshift(""),d.length<2&&d.unshift(""),n.pathname=d.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var _=n.pathname||"",v=n.search||"";n.path=_+v}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var m=n.pathname&&"/"===n.pathname.charAt(0),b=e.host||e.pathname&&"/"===e.pathname.charAt(0),w=b||m||n.host&&e.pathname,x=w,T=n.pathname&&n.pathname.split("/")||[],k=(d=e.pathname&&e.pathname.split("/")||[],n.protocol&&!g[n.protocol]);if(k&&(n.hostname="",n.port=null,n.host&&(""===T[0]?T[0]=n.host:T.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===d[0]?d[0]=e.host:d.unshift(e.host)),e.host=null),w=w&&(""===d[0]||""===T[0])),b)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,T=d;else if(d.length)T||(T=[]),T.pop(),T=T.concat(d),n.search=e.search,n.query=e.query;else if(!a.isNullOrUndefined(e.search))return k&&(n.hostname=n.host=T.shift(),(S=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=S.shift(),n.host=n.hostname=S.shift())),n.search=e.search,n.query=e.query,a.isNull(n.pathname)&&a.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n;if(!T.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var R=T.slice(-1)[0],C=(n.host||e.host||T.length>1)&&("."===R||".."===R)||""===R,E=0,O=T.length;O>=0;O--)"."===(R=T[O])?T.splice(O,1):".."===R?(T.splice(O,1),E++):E&&(T.splice(O,1),E--);if(!w&&!x)for(;E--;E)T.unshift("..");!w||""===T[0]||T[0]&&"/"===T[0].charAt(0)||T.unshift(""),C&&"/"!==T.join("/").substr(-1)&&T.push("");var S,A=""===T[0]||T[0]&&"/"===T[0].charAt(0);return k&&(n.hostname=n.host=A?"":T.length?T.shift():"",(S=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=S.shift(),n.host=n.hostname=S.shift())),(w=w||n.host&&T.length)&&!A&&T.unshift(""),T.length?n.pathname=T.join("/"):(n.pathname=null,n.path=null),a.isNull(n.pathname)&&a.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},r.prototype.parseHost=function(){var e=this.host,t=u.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,n){(function(e,r){var i;!function(r){function o(e){throw new RangeError(O[e])}function a(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function s(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+a((e=e.replace(E,".")).split("."),t).join(".")}function u(e){for(var t,n,r=[],i=0,o=e.length;i<o;)(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<o?56320==(64512&(n=e.charCodeAt(i++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),i--):r.push(t);return r}function l(e){return a(e,function(e){var t="";return e>65535&&(t+=I((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=I(e)}).join("")}function c(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:y}function f(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function h(e,t,n){var r=0;for(e=n?A(e/w):e>>1,e+=A(e/t);e>S*m>>1;r+=y)e=A(e/S);return A(r+(S+1)*e/(e+b))}function p(e){var t,n,r,i,a,s,u,f,p,d,_=[],b=e.length,w=0,R=T,C=x;for((n=e.lastIndexOf(k))<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&o("not-basic"),_.push(e.charCodeAt(r));for(i=n>0?n+1:0;i<b;){for(a=w,s=1,u=y;i>=b&&o("invalid-input"),((f=c(e.charCodeAt(i++)))>=y||f>A((v-w)/s))&&o("overflow"),w+=f*s,!(f<(p=u<=C?g:u>=C+m?m:u-C));u+=y)s>A(v/(d=y-p))&&o("overflow"),s*=d;C=h(w-a,t=_.length+1,0==a),A(w/t)>v-R&&o("overflow"),R+=A(w/t),w%=t,_.splice(w++,0,R)}return l(_)}function d(e){var t,n,r,i,a,s,l,c,p,d,_,b,w,R,C,E=[];for(b=(e=u(e)).length,t=T,n=0,a=x,s=0;s<b;++s)(_=e[s])<128&&E.push(I(_));for(r=i=E.length,i&&E.push(k);r<b;){for(l=v,s=0;s<b;++s)(_=e[s])>=t&&_<l&&(l=_);for(l-t>A((v-n)/(w=r+1))&&o("overflow"),n+=(l-t)*w,t=l,s=0;s<b;++s)if((_=e[s])<t&&++n>v&&o("overflow"),_==t){for(c=n,p=y;!(c<(d=p<=a?g:p>=a+m?m:p-a));p+=y)C=c-d,R=y-d,E.push(I(f(d+C%R,0))),c=A(C/R);E.push(I(f(c,0))),a=h(n,w,r==i),n=0,++r}++n,++t}return E.join("")}"object"==typeof t&&t&&t.nodeType,"object"==typeof e&&e&&e.nodeType;var _,v=2147483647,y=36,g=1,m=26,b=38,w=700,x=72,T=128,k="-",R=/^xn--/,C=/[^\x20-\x7E]/,E=/[\x2E\u3002\uFF0E\uFF61]/g,O={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},S=y-g,A=Math.floor,I=String.fromCharCode;_={version:"1.4.1",ucs2:{decode:u,encode:l},decode:p,encode:d,toASCII:function(e){return s(e,function(e){return C.test(e)?"xn--"+d(e):e})},toUnicode:function(e){return s(e,function(e){return R.test(e)?p(e.slice(4).toLowerCase()):e})}},void 0===(i=function(){return _}.call(t,n,t,e))||(e.exports=i)}()}).call(t,n(268)(e),n(59))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},function(e,t,n){"use strict";t.decode=t.parse=n(271),t.encode=t.stringify=n(272)},function(e,t,n){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,n,o){t=t||"&",n=n||"=";var a={};if("string"!=typeof e||0===e.length)return a;var s=/\+/g;e=e.split(t);var u=1e3;o&&"number"==typeof o.maxKeys&&(u=o.maxKeys);var l=e.length;u>0&&l>u&&(l=u);for(var c=0;c<l;++c){var f,h,p,d,_=e[c].replace(s,"%20"),v=_.indexOf(n);v>=0?(f=_.substr(0,v),h=_.substr(v+1)):(f=_,h=""),p=decodeURIComponent(f),d=decodeURIComponent(h),r(a,p)?i(a[p])?a[p].push(d):a[p]=[a[p],d]:a[p]=d}return a};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,n){"use strict";function r(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r<e.length;r++)n.push(t(e[r],r));return n}var i=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,n,s){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?r(a(e),function(a){var s=encodeURIComponent(i(a))+n;return o(e[a])?r(e[a],function(e){return s+encodeURIComponent(i(e))}).join(t):s+encodeURIComponent(i(e[a]))}).join(t):s?encodeURIComponent(i(s))+n+encodeURIComponent(i(e)):""};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},a=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t}},function(e,t,n){"use strict";function r(e){function t(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function n(e,t){return e>>>t|e<<32-t}function r(e,t){return e>>>t}function i(e,t,n){return e&t^~e&n}function o(e,t,n){return e&t^e&n^t&n}function a(e){return n(e,2)^n(e,13)^n(e,22)}function s(e){return n(e,6)^n(e,11)^n(e,25)}function u(e){return n(e,7)^n(e,18)^r(e,3)}function l(e){return n(e,17)^n(e,19)^r(e,10)}return function(e){for(var t="0123456789abcdef",n="",r=0;r<4*e.length;r++)n+=t.charAt(e[r>>2]>>8*(3-r%4)+4&15)+t.charAt(e[r>>2]>>8*(3-r%4)&15);return n}(function(e,n){var r,c,f,h,p,d,_,v,y,g,m=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),b=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),w=new Array(64);e[n>>5]|=128<<24-n%32,e[15+(n+64>>9<<4)]=n;for(var x=0;x<e.length;x+=16){r=b[0],c=b[1],f=b[2],h=b[3],p=b[4],d=b[5],_=b[6],v=b[7];for(var T=0;T<64;T++)w[T]=T<16?e[T+x]:t(t(t(l(w[T-2]),w[T-7]),u(w[T-15])),w[T-16]),y=t(t(t(t(v,s(p)),i(p,d,_)),m[T]),w[T]),g=t(a(r),o(r,c,f)),v=_,_=d,d=p,p=t(h,y),h=f,f=c,c=r,r=t(y,g);b[0]=t(r,b[0]),b[1]=t(c,b[1]),b[2]=t(f,b[2]),b[3]=t(h,b[3]),b[4]=t(p,b[4]),b[5]=t(d,b[5]),b[6]=t(_,b[6]),b[7]=t(v,b[7])}return b}(function(e){for(var t=Array(),n=0;n<8*e.length;n+=8)t[n>>5]|=(255&e.charCodeAt(n/8))<<24-n%32;return t}(e=function(e){e=e.replace(/\r\n/g,"\n");for(var t="",n=0;n<e.length;n++){var r=e.charCodeAt(n);r<128?t+=String.fromCharCode(r):r>127&&r<2048?(t+=String.fromCharCode(r>>6|192),t+=String.fromCharCode(63&r|128)):(t+=String.fromCharCode(r>>12|224),t+=String.fromCharCode(r>>6&63|128),t+=String.fromCharCode(63&r|128))}return t}(e)),8*e.length))}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";(function(e){n.d(t,"b",function(){return i}),n.d(t,"a",function(){return o});for(var r="undefined"==typeof window?e:window,i=r.requestAnimationFrame,o=r.cancelAnimationFrame,a=0,s=["ms","moz","webkit","o"],u=0;u<s.length&&!i;++u)i=r[s[u]+"RequestAnimationFrame"],o=r[s[u]+"CancelAnimationFrame"]||r[s[u]+"CancelRequestAnimationFrame"];i&&(i=i.bind(r)),o&&(o=o.bind(r)),i||(i=function(e,t){var n=(new Date).getTime(),r=Math.max(0,16-(n-a)),i=setTimeout(function(){e(n+r)},r);return a=n+r,i}),o||(o=function(e){clearTimeout(e)})}).call(t,n(59))},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.x=t,this.y=n,this.z=r,void 0===this.x&&(this.x=0),void 0===this.y&&(this.y=0),void 0===this.z&&(this.z=0)}return o(e,[{key:"set",value:function(e,t,n){return this.x=e,this.y=t,this.z=n,this}},{key:"clone",value:function(){return new e(this.x,this.y,this.z)}},{key:"copy",value:function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}},{key:"clamp",value:function(t,n){var r=null!==t&&void 0!==t,i=null!==n&&void 0!==n;return t instanceof e||!r||(t=new e(t,t,t)),n instanceof e||!i||(n=new e(n,n,n)),r&&(this.x=Math.max(t.x,this.x),this.y=Math.max(t.y,this.y),this.z=Math.max(t.z,this.z)),i&&(this.x=Math.min(n.x,this.x),this.y=Math.min(n.y,this.y),this.z=Math.min(n.z,this.z)),this}},{key:"divide",value:function(t){return t instanceof e?(this.x/=t.x,this.y/=t.y,this.z/=t.z):(this.x/=t,this.y/=t,this.z/=t),this}},{key:"subtract",value:function(t){return t instanceof e?(this.x-=t.x,this.y-=t.y,this.z-=t.z):(this.x-=t,this.y-=t,this.z-=t),this}},{key:"multiply",value:function(t){return t instanceof e?(this.x*=t.x,this.y*=t.y,this.z*=t.z):(this.x*=t,this.y*=t,this.z*=t),this}},{key:"add",value:function(t){return t instanceof e?(this.x+=t.x,this.y+=t.y,this.z+=t.z):(this.x+=t,this.y+=t,this.z+=t),this}},{key:"equals",value:function(t){return t instanceof e?t.x===this.x&&t.y===this.y&&t.z===this.z:t===this.x&&t===this.y&&t===this.z}},{key:"round",value:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}},{key:"ceil",value:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}},{key:"floor",value:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}},{key:"fract",value:function(){return this.x=this.x%1,this.y=this.y%1,this.z=this.z%1,this}},{key:"toInt",value:function(){return this.x=0|this.x,this.y=0|this.y,this.z=0|this.z,this}},{key:"abs",value:function(){return this.x=Math.abs(this.x),this.y=Math.abs(this.y),this.z=Math.abs(this.z),this}},{key:"len",value:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}},{key:"min",value:function(){return Math.min(Math.min(this.x,this.y),this.z)}},{key:"max",value:function(){return Math.max(Math.max(this.x,this.y),this.z)}},{key:"toObject",value:function(){return{x:this.x,y:this.y,z:this.z}}},{key:"toString",value:function(){return"Vector3({ x: "+this.x+", y: "+this.y+", z: "+this.z+" })"}},{key:"roundDecimal",value:function(e){return this.x=parseFloat(this.x.toFixed(e)),this.y=parseFloat(this.y.toFixed(e)),this.z=parseFloat(this.z.toFixed(e)),this}}],[{key:"fromObject",value:function(t){return new e(t.x,t.y,t.z)}},{key:"NULL",get:function(){return new e(0,0,0)}}]),e}();t.a=a},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.min=t,this.max=n}return o(e,[{key:"getMin",value:function(){return this.min}},{key:"getMax",value:function(){return this.max}},{key:"getLength",value:function(){return this.max-this.min}},{key:"contains",value:function(e){return this.min<=e&&e<=this.max}}]),e}();t.a=a},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(38),a=n(33),s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new o.a(0,0),n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new o.a(1,1),r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new o.a(2,-1),i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new o.a(2,0);!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._p0=t.clone(),this._p1=n.clone(),this._p2=r.clone(),this._p3=i.clone(),this._segments=[],this._length=-1,this._sample=[]}return s(e,[{key:"set",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new o.a(0,0),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new o.a(1,1),n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new o.a(2,1),r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new o.a(2,0);this._p0=e.clone(),this._p1=t.clone(),this._p2=n.clone(),this._p3=r.clone()}},{key:"getLength",value:function(){return this._length}},{key:"calculateSegments",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,t=0,n=0,r=[],i=1/e,o=this._p0.clone(),a=1;a<=e;a++){var s=[];s.push({t:t,s:n,point:o}),t+=i,t=Math.min(t,1);var u=this.evalAt(t);n+=u.clone().subtract(o).len(),s.push({t:t,s:n,point:u}),r.push(s),o=u}return this._segments=r,this._length=n,n}},{key:"evalAt",value:function(e){e=this.normalizeParameter(e);var t=this._p0.clone().multiply(Math.pow(1-e,3)),n=this._p1.clone().multiply(3*(1-e)*(1-e)*e),r=this._p2.clone().multiply(3*(1-e)*e*e),i=this._p3.clone().multiply(e*e*e);return t.add(n).add(r).add(i)}},{key:"isInSegment",value:function(e,t){return(e=this.normalizeArcLength(e))>=t[0].s&&e<=t[1].s}},{key:"getArcLengthSegment",value:function(e){e=this.normalizeArcLength(e);for(var t=0;t<this._segments.length;t++){var n=this._segments[t];if(this.isInSegment(e,n))return n}return null}},{key:"normalizeArcLength",value:function(e){return Math.max(Math.min(this._length,e),0)}},{key:"normalizeParameter",value:function(e){return Math.max(Math.min(1,e),0)}},{key:"getParameterForArcLength",value:function(e){var t=this.normalizeArcLength(e),n=this.getArcLengthSegment(t);if(!n)return a.a.warn("CubicBezierCurve#getParameterForArcLength","Segment not found."),-1;var r=(t-n[1].s)/(n[0].s-n[1].s);return r*n[0].t+(1-r)*n[1].t}},{key:"evalAtArcLength",value:function(e){return this.evalAt(this.getParameterForArcLength(e))}},{key:"approximateAtArcLength",value:function(e){var t=this.normalizeArcLength(e),n=this.getArcLengthSegment(t);if(!n)return-1;var r=(t-n[1].s)/(n[0].s-n[1].s);return n[0].point.clone().multiply(r).add(n[1].point.clone().multiply(1-r))}},{key:"parameterSample",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,t=1/e,n=[],r=0,i=0;i<=e+1;i++)n.push(this.evalAt(r)),r+=t;return this._sample=n,[].concat(n)}},{key:"arcLengthApproxSample",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=this._length/e,i=[],o=0,a=t?1:0;a<e+1;a++)i.push(this.approximateAtArcLength(o)),o+=r;return n&&i.pop(),this._sample=i,[].concat(i)}}]),e}();t.a=u},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(2),a=n.n(o),s=n(3),u=n.n(s),l=n(1),c=n.n(l),f=n(32),h=n(39),p=n(38),d=n(157),_=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),v=f.Constants.OptionType,y=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||c()(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=u()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(a.a?a()(e,t):e.__proto__=t)}(t,d.a),_(t,[{key:"_getRotation",value:function(){var e=0;switch(this.getTags().Orientation){case 7:case 8:e=-90;break;case 3:case 4:e=-180;break;case 5:case 6:e=90}return e}},{key:"_getFlipVertically",value:function(){return-1!==[5,7].indexOf(this.getTags().Orientation)}},{key:"_getFlipHorizontally",value:function(){return-1!==[2,4].indexOf(this.getTags().Orientation)}},{key:"_getFinalOptions",value:function(){return{rotation:this._getRotation(),flipVertically:this._getFlipVertically(),flipHorizontally:this._getFlipHorizontally()}}},{key:"_render",value:function(e){var t=this._getFinalOptions(),n=t.rotation%360*(Math.PI/180);this._sprite.setScale(t.flipHorizontally?-1:1,t.flipVertically?-1:1),this._sprite.setRotation(n),this._sprite.setAnchor(.5,.5),this._sprite.updateTransform();var r=this._sprite.getBounds();return this._renderTexture.resizeTo(new p.a(r.width,r.height)),this._sprite.setPosition(this._renderTexture.getDimensions().divide(2)),this._renderTexture.render(this._container),h.a.resolve()}},{key:"getNewDimensions",value:function(e){var t=this._getFinalOptions();return e=e.clone(),t.rotation%180&&e.flip(),e}},{key:"applyTo",value:function(e){var t=this._getFinalOptions(),n=f.Utils.createCanvas();90===Math.abs(t.rotation%180)?(n.width=e.height,n.height=e.width):(n.width=e.width,n.height=e.height);var r=n.getContext("2d"),i=t.rotation*Math.PI/180,o=.5*(n.width-e.width),a=.5*(n.height-e.height);return r.translate(o,a),r.translate(.5*e.width,.5*e.height),r.rotate(i),r.translate(-.5*e.width,-.5*e.height),t.flipVertically&&(r.translate(0,e.height),r.scale(1,-1)),t.flipHorizontally&&(r.translate(e.width,0),r.scale(-1,1)),r.drawImage(e,0,0),n}}]),t}();y.identifier="exif-orientation",y.prototype.availableOptions={tags:{type:v.OBJECT,default:{}}},t.a=y},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(112),a=n(113),s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=a.a.MARKERS,l=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._buf=t,this._stream=new o.a(this._buf),this._stream.setHead(0)}return s(e,[{key:"isValid",value:function(){if(this._stream.setHead(0),this._stream.readInt16()!==u.APP0)return!1;if(!(this._stream.readInt16()>=16))return!1;var e=this._stream.readString(4),t=this._stream.readInt8();return"JFIF"===e&&0===t}},{key:"setUnitDensity",value:function(e){this._stream.setHead(11),this._stream.writeInt8(e)}},{key:"setDensityX",value:function(e){this._stream.setHead(12),this._stream.writeInt16(e)}},{key:"setDensityY",value:function(e){this._stream.setHead(14),this._stream.writeInt16(e)}},{key:"getUnitDensity",value:function(){return this._stream.setHead(11),this._stream.readInt8()}},{key:"getDensityX",value:function(){return this._stream.setHead(12),this._stream.readInt16()}},{key:"getDensityY",value:function(){return this._stream.setHead(14),this._stream.readInt16()}},{key:"getBuffer",value:function(){return this._buf}}]),e}();t.a=l},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(112),a=n(113),s=n(27),u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=s.a.invariant,c=a.a.MARKERS,f=a.a.EXIF_TAGS,h=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._buf=t,this._stream=new o.a(this._buf),this._stream.setHead(0),this._parse()}return u(e,[{key:"isValid",value:function(){return this._stream.setHead(0),this._stream.readInt16()===c.EXIF&&this._stream.readInt16()>0&&"Exif"===this._stream.readString(4)}},{key:"_parse",value:function(){if(this.isValid()){this._stream.setHead(10);var e=this._stream.getHead(),t=!1,n=this._stream.readInt16();18761===n?t=!1:19789===n?t=!0:l(!1,"Invalid TIFF data: No endian type found"),l(42===this._stream.readInt16(!t),"Invalid TIFF data: No 0x002A");var r=this._stream.readInt32(!t);l(r>=8,"Invalid TIFF data: First IFD offset < 8");var i=e+r,o=this._readTags(this._stream,e,i,t);this._tags=o.tags,this._tagData=o.tagData}}},{key:"getTags",value:function(){return this._tags}},{key:"getTagData",value:function(){return this._tagData}},{key:"setOrientation",value:function(e){if(this._tagData.Orientation){var t=this._tagData.Orientation.entryOffset;this._stream.setHead(t+8),this._stream.writeInt16(e)}}},{key:"_readTags",value:function(e,t,n,r){e.setHead(n);for(var i=e.readInt16(!r),o={},a=[],s=0;s<i;s++){var u=n+12*s+2;e.setHead(u);var l=e.readInt16(!r),c=void 0,h=void 0,p=void 0;if(f[l]){l=f[l],c=e.readInt16(!r),h=e.readInt32(!r),p=e.readInt32(!r)+t;var d=null;switch(c){case 1:case 7:if(1===h)d=e.readInt8(!r);else{d=[];for(var _=0;_<h;_++)d.push(e.readInt8(!r))}break;case 2:e.setHead(h>4?p:u+8),d=e.readString(h);break;case 3:if(e.setHead(h>2?p:u+8),1===h)d=e.readInt16(!r);else{d=[];for(var v=0;v<h;v++)d.push(e.readInt16(!r))}break;case 4:case 9:if(e.setHead(h>1?p:u+8),1===h)d=e.readInt32(!r);else{d=[];for(var y=0;y<h;y++)d.push(e.readInt32(!r))}break;case 5:case 10:if(e.setHead(p),1===h)d=e.readInt32(!r)/e.readInt32(!r);else{d=[];for(var g=0;g<h;g++){var m=e.readInt32(!r)/e.readInt32(!r);d.push(m)}}}o[l]=d,a[l]={value:d,numValues:h,entryOffset:u,valueOffset:p,type:c}}}return{tags:o,tagData:a}}},{key:"getBuffer",value:function(){return this._buf}}]),e}();t.a=h},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(2),a=n.n(o),s=n(3),u=n.n(s),l=n(21),c=n.n(l),f=n(1),h=n.n(f),p=n(34),d=n(78),_=n(27),v=n(81),y=n(111),g=n(65),m=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),b=function(e){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||h()(t)).call(this,n));return r._sdk=e,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=u()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(a.a?a()(e,t):e.__proto__=t)}(t,g.a),m(t,[{key:"export",value:function(){var e=this,t=this._options.imageFormat;return this.validateSettings().then(function(){return e._prepareSDK().then(function(t){return function t(n){return n.renderDone?n:e._sdk.render().then(function(e){return t(e)})}(t)})}).then(function(t){var n=t.outputTexture,r=(t.renderDone,e._sdk.getRenderer()),i=r.getCanvas();return r.isOfType(p.RendererType.WEBGL)&&(i=e._createCanvasFromTexture(n)),e._encodeImageFormat(i)}).then(function(n){return e._restoreExifMetadata(n,t)}).then(function(t){return e._restoreSDK().then(function(){return t})})}},{key:"_restoreExifMetadata",value:function(e,t,n){if(t===p.ImageFormat.JPEG){var r=this._sdk.getImage(),i=y.a.isJPEG(r.src),o=y.a.isJPEG(e);if(i&&o){var a=this._sdk.getExif();a&&(e=a.restoreSegments(e))}}return c.a.resolve(e)}},{key:"_encodeAsDataURL",value:function(e,t,n){return _.a.isBrowser?c.a.resolve(e.toDataURL(t,n)):new c.a(function(r,i){e.toDataURL(t,n,function(e,t){e?i(e):r(t)})})}},{key:"_encodeAsHTMLImage",value:function(e,t,n){return this._encodeAsDataURL(e).then(function(e){var t=new v.a;return t.src=e,c.a.resolve(t)})}},{key:"_encodeAsBuffer",value:function(e,t,n){return c.a.reject(new Error("Unsupported platform for RenderType"))}},{key:"_encodeAsMSBlob",value:function(e,t,n){return c.a.resolve(e.msToBlob())}},{key:"_encodeAsBLOB",value:function(e,t,n){return new c.a(function(r,i){e.toBlob(function(e){r(e)},t,n)})}},{key:"_encodeImageFormat",value:function(e){var t=this._options,n=t.renderType,r=t.imageFormat,i=t.quality;switch(n){case p.RenderType.IMAGE:return this._encodeAsHTMLImage(e,r,i);case p.RenderType.DATAURL:return this._encodeAsDataURL(e,r,i);case p.RenderType.BUFFER:return this._encodeAsBuffer(e,r,i);case p.RenderType.MSBLOB:return this._encodeAsMSBlob(e,r,i);case p.RenderType.BLOB:return this._encodeAsBLOB(e,r,i)}return c.a.reject(new Error("Unsupported RenderType: "+n+"!"))}},{key:"_prepareSDK",value:function(){var e=this._sdk.getRenderer();this._sdkSettings={dimensions:e.getDimensions().clone(),textureQuality:this._sdk.getTextureQuality(),pixelRatio:this._sdk.getPixelRatio(),renderMode:this._sdk.getRenderMode()},this._sdk.setRenderMode("export"),this._sdk.setTextureQuality(1);var t=e.isOfType(p.RendererType.CANVAS);e.setPixelRatio(1),e.resizeTo(this._sdk.getFinalDimensions(),t),this._sdk.setAllOperationsToDirty(!0);var n=this._sdk.getOperationsStack();return n.forEach(function(e){e.disposeRenderTextures()}),n.disableCache(),this._sdk.render()}},{key:"_restoreSDK",value:function(){this._sdk.getOperationsStack().enableCache(),this._sdk.setRenderMode(this._sdkSettings.renderMode);var e=this._sdk.getRenderer(),t=e.isOfType(p.RendererType.CANVAS);return e.setPixelRatio(this._sdkSettings.pixelRatio),e.resizeTo(this._sdkSettings.dimensions,t),this._sdk.setTextureQuality(this._sdkSettings.textureQuality),this._sdk.setAllOperationsToDirty(!0),this._sdk.render()}},{key:"_createCanvasFromTexture",value:function(e){var t=this._sdk.getRenderer(),n=this._sdk.getFinalDimensions(),r=this._sdk.getRenderer().getContext(),i=r.createFramebuffer();r.bindFramebuffer(r.FRAMEBUFFER,i);var o=e.getBaseTexture().getGLTextureForRenderer(t);r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,o,0);var a=new Uint8Array(n.x*n.y*4);r.readPixels(0,0,n.x,n.y,r.RGBA,r.UNSIGNED_BYTE,a);var s=void 0;if(this._checkPixelsForTransparency(a)){var u=new d.a.Sprite(e);u.setFilters([new d.a.Filters.UnpremultiplyFilter]);var l=new d.a.Container;l.addChild(u),(s=new d.a.RenderTexture(t,n.x,n.y)).render(l);var c=s.getBaseTexture().getGLTextureForRenderer(t);r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,c,0),r.readPixels(0,0,n.x,n.y,r.RGBA,r.UNSIGNED_BYTE,a),t.setRenderTarget(),s.dispose()}var f=_.a.createCanvas();f.width=n.x,f.height=n.y;var h=f.getContext("2d"),p=h.createImageData(n.x,n.y);return p.data.set(a),h.putImageData(p,0,0),r.deleteFramebuffer(i),f}},{key:"_checkPixelsForTransparency",value:function(e){for(var t=this._sdk.getFinalDimensions(),n=t.x*t.y*4,r=3;r<n;r+=4)if(255!==e[r])return!0;return!1}}]),t}();b.prototype.availableOptions={renderType:{type:p.OptionType.STRING,available:_.a.values(p.RenderType),default:p.RenderType.IMAGE},imageFormat:{type:p.OptionType.STRING,available:_.a.values(p.ImageFormat),default:p.ImageFormat.PNG},quality:{type:p.OptionType.NUMBER,default:.8}},t.a=b},function(e,t){Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function(e){if(null==this)throw new TypeError('"this" is null or not defined');var t=Object(this),n=t.length>>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var r=arguments[1],i=0;i<n;){var o=t[i];if(e.call(r,o,i,t))return i;i++}return-1},configurable:!0,writable:!0})},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return o(e,null,[{key:"current",value:function(){return"production"}},{key:"isTest",value:function(){return!1}},{key:"isDevelopment",value:function(){return!1}},{key:"isProduction",value:function(){return!0}}]),e}();t.a=a},function(e,t,n){"use strict";var r=n(28),i=n.n(r),o=n(29),a=n.n(o),s=n(21),u=n.n(s),l=function(){return function(e,t){if(Array.isArray(e))return e;if(i()(Object(e)))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var s,u=a()(e);!(r=(s=u.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&u.return&&u.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();t.a={load:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{cors:!0,value:"anonymous"};return(e.substr(0,5),u.a.resolve([e,e])).then(function(e){var r=l(e,2),i=r[0],o=r[1];return t._createAndLoadImage(i,o,n)})},_createAndLoadImage:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{cors:!0,value:"anonymous"};return new u.a(function(e,i){var o=new u.a(function(e,n){var i=new window.Image;i.addEventListener("load",function(){e(i)}),i.addEventListener("error",function(){n(new Error("Failed to load image at "+t))}),r.cors&&(i.crossOrigin=r.value),i.src=t}),a=new u.a(function(e,i){n._loadAsDataURL(t,r).then(function(t){var n=new window.Image;n.addEventListener("load",function(){e(n)}),n.src=t,n.rawSource=t}).catch(function(t){o.then(function(t){return e(t)})})});return n._stringEndsWith(t,".svg")?o.then(function(t){return e(t)}):a.then(function(t){return e(t)})})},_stringEndsWith:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length;return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t},_loadAsDataURL:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{cors:!0,value:"anonymus"};return new u.a(function(n,r){var i=new XMLHttpRequest;i.onload=function(){var e=new FileReader;e.onloadend=function(){e.error&&r(e.error),n(e.result)},e.readAsDataURL(i.response)},i.open("GET",e),i.responseType="blob",i.withCredentials=t.cors&&"use-credentials"===t.value,i.send()})},loadXHR:function(e,t){return new u.a(function(n,r){var i=void 0;window.XDomainRequest?(i=new window.XDomainRequest,t&&i.overrideMimeType(t),i.onload=function(){n(i)},i.onerror=function(e){r(e)}):window.XMLHttpRequest&&(i=new window.XMLHttpRequest,t&&i.overrideMimeType(t),i.onreadystatechange=function(e){4===i.readyState&&(200===i.status?n(i):r(new Error("HTTP Status "+i.status)))}),i.open("GET",e,!0),i.send()})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4),i=n.n(r),o=n(286),a=n(294),s=n(296),u=n(362),l=n(363),c=n(367),f=n(370),h=n(373),p=n(374),d=n(375),_=n(378),v=n(384),y=n(413),g=n(415),m=n(416),b=n(440),w=[o.a,a.a,s.a,u.a,l.a,c.a,f.a,h.a,p.a,d.a,_.a,v.a,y.a,g.a,m.a,b.a];i.a.AllOperations=w,t.default=w},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(5),a=n.n(o),s=n(2),u=n.n(s),l=n(3),c=n.n(l),f=n(1),h=n.n(f),p=n(4),d=n.n(p),_=n(162),v=n(288),y=n(290),g=n(292),m=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),b=p.Math.ColorMatrix,w=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||h()(t)).call.apply(e,[this].concat(r)));return o._clarityFilter=new v.a,o._temperatureFilter=new y.a,o._sharpnessFilter=new g.a,o._filter=new _.a,o._sprite.setFilters([o._clarityFilter,o._temperatureFilter,o._filter]),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=c()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(u.a?u()(e,t):e.__proto__=t)}(t,p.Operation),m(t,[{key:"_render",value:function(e){var t=e.getDimensions();t.x=1/t.x,t.y=1/t.y;var n=new b;n.multiply(b.createSaturationMatrix(-.3*this._options.clarity+1)),n.multiply(b.createContrastMatrix(.1*this._options.clarity+1)),this._clarityFilter.set({clarity:this._options.clarity,pixelDimension:t,colorMatrix:n,colorOffset:n.getOffsets()}),this._temperatureFilter.set({temperature:this._options.temperature}),this._sharpnessFilter.set({sharpness:this._options.sharpness,pixelDimension:t});var r=new b;r.multiply(b.createExposureMatrix(this._options.exposure)),r.multiply(b.createSaturationMatrix(this._options.saturation+1)),r.multiply(b.createContrastMatrix((this._options.contrast>0?2*this._options.contrast:this._options.contrast)+1)),r.multiply(b.createBrightnessMatrix(this._options.brightness)),this._filter.set({gamma:this._options.gamma,shadows:this._options.shadows,highlights:this._options.highlights,whites:this._options.whites,blacks:this._options.blacks,colorMatrix:r,colorOffset:r.getOffsets()});var i=[];return 0!==this._options.clarity&&i.push(this._clarityFilter),0!==this._options.sharpness&&i.push(this._sharpnessFilter),0!==this._options.temperature&&i.push(this._temperatureFilter),i.push(this._filter),this._sprite.setFilters(i),this._renderTexture.render(this._container),p.Promise.resolve()}},{key:"dispose",value:function(){(function e(t,n,r){null===t&&(t=Function.prototype);var i=a()(t,n);if(void 0===i){var o=h()(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0})(t.prototype.__proto__||h()(t.prototype),"dispose",this).call(this),this._filter.dispose(),this._clarityFilter.dispose(),this._temperatureFilter.dispose(),this._sharpnessFilter.dispose()}}]),t}();w.identifier="adjustments",w.prototype.availableOptions={brightness:{type:p.OptionType.NUMBER,default:0,minValue:-1,midValue:0,maxValue:1},saturation:{type:p.OptionType.NUMBER,default:0,minValue:-1,midValue:0,maxValue:1},contrast:{type:p.OptionType.NUMBER,default:0,minValue:-1,midValue:0,maxValue:1},gamma:{type:p.OptionType.NUMBER,default:1,minValue:.5,midValue:1,maxValue:2},exposure:{type:p.OptionType.NUMBER,default:0,minValue:-1,midValue:0,maxValue:1},shadows:{type:p.OptionType.NUMBER,default:0,minValue:-2,midValue:0,maxValue:2},highlights:{type:p.OptionType.NUMBER,default:0,minValue:-1,midValue:0,maxValue:1},clarity:{type:p.OptionType.NUMBER,default:0,minValue:-1,midValue:0,maxValue:1},whites:{type:p.OptionType.NUMBER,default:0,minValue:-1,midValue:0,maxValue:1},blacks:{type:p.OptionType.NUMBER,default:0,minValue:-1,midValue:0,maxValue:1},temperature:{type:p.OptionType.NUMBER,default:0,minValue:-1,midValue:0,maxValue:1},sharpness:{type:p.OptionType.NUMBER,default:0,minValue:-1,midValue:0,maxValue:1}},d.a.Operations.AdjustmentsOperation=w,t.a=w},function(e,t){e.exports="precision highp float;\n\nvarying vec2 v_texCoord;\nuniform sampler2D u_image;\n\nuniform float u_gamma;\nuniform float u_shadows;\nuniform float u_highlights;\nuniform float u_whites;\nuniform float u_blacks;\n\nuniform mat4 u_colorMatrix;\nuniform vec4 u_colorOffset;\n\nconst float EPSILON = 0.0000001;\n\nfloat calculateLuminance(vec3 rgb) {\n // This is the luminance calculation part of the RGB to HSL formular.\n vec4 p = mix(\n vec4(rgb.gb, 0.0, -1.0 / 3.0),\n vec4(rgb.bg, -1.0, 2.0 / 3.0),\n vec4(rgb.g < rgb.b)\n );\n\n vec4 q = mix(\n vec4(rgb.r, p.yzx),\n vec4(p.xyw, rgb.r),\n vec4(rgb.r < p.x)\n );\n\n float croma = q.x - min(q.w, q.y);\n float luminance = q.x - croma * 0.5;\n return luminance;\n}\n\nvec3 map(vec3 x, float in_min, float in_max, float out_min, float out_max){\n return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;\n}\n\nvoid main() {\n\n vec4 color = clamp(texture2D(u_image, v_texCoord), 0.0, 1.0);\n color.rgb /= max(color.a, EPSILON); // Revert premultiplied alpha\n\n // Apply gamma\n if (u_gamma != 1.0) {\n color.rgb = pow(color.rgb, vec3(1.0 / max(u_gamma, EPSILON)));\n }\n\n // Apply shadows and highlights\n float luminance = calculateLuminance(color.rgb);\n\n float shadow = u_shadows >= 0.0\n ? clamp(\n pow(luminance, 1.0 / (u_shadows + 1.0))\n + pow(luminance, 2.0 / (u_shadows + 1.0)) * -0.76\n - luminance\n , 0.0, max(u_shadows, 1.0))\n : -clamp(\n pow(luminance, 1.0 / (-u_shadows + 1.0))\n + pow(luminance, 2.0 / (-u_shadows + 1.0)) * -0.76\n - luminance\n , 0.0, max(-u_shadows, 1.0));\n\n float highlight = u_highlights < 0.0\n ? clamp(\n 1.0\n - pow(1.0 - luminance, 1.0 / (1.0 - u_highlights))\n - pow(1.0 - luminance, 2.0 / (1.0 - u_highlights)) * -0.8\n - luminance\n , -1.0, 0.0)\n : -clamp(\n 1.0\n - pow(1.0 - luminance, 1.0 / (1.0 + u_highlights))\n - pow(1.0 - luminance, 2.0 / (1.0 + u_highlights)) * -0.8\n - luminance\n , -1.0, 0.0);\n\n // Bright color need more contrast and dark color need more brightness.\n // This is to keep saturatation because the color information of a dark colors is lost.\n float shadowContrast = shadow * luminance * luminance;\n float shadowBrightness = shadow - shadowContrast;\n\n float offset = luminance + shadowContrast + highlight;\n color.rgb = clamp(offset * ((color.rgb + shadowBrightness) / max(luminance, EPSILON)), 0.0, 1.0);\n \n // Apply Color Matrix\n color.rgb = clamp(color * u_colorMatrix + u_colorOffset, 0.0, 1.0).rgb;\n color.rgb = map(color.rgb, 0.0, 1.0, u_blacks / 2.0, 1.0 + u_whites / 2.0);\n color = clamp(color, 0.0, 1.0);\n color.rgb *= color.a; // Reset premultiplied alpha\n\n gl_FragColor = color;\n}\n"},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(2),a=n.n(o),s=n(3),u=n.n(s),l=n(1),c=n.n(l),f=n(4),h=(n.n(f),function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}()),p=f.Math.Vector2,d=f.Math.ColorMatrix,_=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||c()(t)).call(this));return e._fragmentSource=n(289),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=u()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(a.a?a()(e,t):e.__proto__=t)}(t,f.Engine.Filter),h(t,[{key:"_applyCanvas",value:function(e,t,n){arguments.length>3&&void 0!==arguments[3]&&arguments[3];var r=n.getContext(),i=t.getCanvas(),o=t.getContext(),a=this._options.clarity,s=this._options.colorMatrix,u=new f.Color(this._options.colorOffset[0],this._options.colorOffset[1],this._options.colorOffset[2],this._options.colorOffset[3]),l=i.width,c=i.height,h=o.getImageData(0,0,l,c),p=r.createImageData(l,c);this.canvasShader(h,p,a,s,u),r.putImageData(p,0,0)}},{key:"canvasShader",value:function(e,t,n,r,i){for(var o=function(e,t,n){return Math.min(Math.max(e,t),n)},a=function(e,t,n){var r=o((n-e)/(t-e),0,1);return r*r*(3-2*r)},s=4*e.width,u=e.data.length,l=u-1,c=e.data,h=t.data,p=new f.Color,d=function(e){return c[e=(e=e<0?0:e)>l?l:e]},_=0;_<u;_+=4){var v=d(_+0),y=d(_+1),g=d(_+2),m=d(_+3),b=(v+d(_-4-s+0)+d(_-4+0)+d(_-4+s+0)+d(_-s+0)+d(_+s+0)+d(_+4-s+0)+d(_+4+0)+d(_+4+s))/2295,w=(y+d(_-4-s+1)+d(_-4+1)+d(_-4+s+1)+d(_-s+1)+d(_+s+1)+d(_+4-s+1)+d(_+4+1)+d(_+4+s+1))/2295,x=(g+d(_-4-s+2)+d(_-4+2)+d(_-4+s+2)+d(_-s+2)+d(_+s+2)+d(_+4-s+2)+d(_+4+2)+d(_+4+s+2))/2295,T=(m+d(_-4-s+3)+d(_-4+3)+d(_-4+s+3)+d(_-s+3)+d(_+s+3)+d(_+4-s+3)+d(_+4+3)+d(_+4+s+3))/2295;m/=255;var k=o(.3*(v/=255)+.59*(y/=255)+.1*(g/=255),.111111,.999999),R=Math.min(a(1-k,0,.11),a(k,0,.11)),C=3.7*n*R,E=Math.pow(2,.27*n*R),O=o(v+o((v-b)*C,0,10),0,1)*E,S=o(y+o((y-w)*C,0,10),0,1)*E,A=o(g+o((g-x)*C,0,10),0,1)*E,I=o(m+o((m-T)*C,0,10),0,1);p.set(O,S,A,I);var F=r.apply(p).clamp(0,1);h[_+0]=255*F.r,h[_+1]=255*F.g,h[_+2]=255*F.b,h[_+3]=255*F.a}}}]),t}();_.prototype.availableOptions={clarity:{type:f.OptionType.NUMBER,default:0,uniformType:f.UniformType.FLOAT},pixelDimension:{type:f.OptionType.VECTOR2,default:new p(100,100),uniformType:f.UniformType.FLOAT2},colorMatrix:{type:f.OptionType.COLOR_MATRIX,default:new d,uniformType:f.UniformType.MAT4},colorOffset:{type:f.OptionType.ARRAY,default:[],uniformType:f.UniformType.FLOAT4}},t.a=_},function(e,t){e.exports="precision mediump float;\n\n// Input Image with config WRAP_S and WRAP_T: CLAMP_TO_EDGE\nuniform sampler2D u_image;\n\n// Size of one pixel == vec2(1.0 / u_image.width, 1.0 / u_image.height)\nuniform vec2 u_pixelDimension;\n\n// Range (-1.0 - 1.0)\nuniform float u_clarity;\n\nvarying vec2 v_texCoord;\n\nuniform mat4 u_colorMatrix;\nuniform vec4 u_colorOffset;\n\nconst float EPSILON = 0.000001;\n\nvec4 unpremultiply(vec4 col) {\n col.rgb /= max(col.a, EPSILON);\n return col;\n}\n\nvoid main() {\n vec4 color = texture2D(u_image, v_texCoord);\n color = unpremultiply(color);\n\n // L = Left, R = Right, C = Center, T = Top, B = Bottom\n vec4 colLB = texture2D(u_image, v_texCoord + vec2(-u_pixelDimension.x, -u_pixelDimension.y));\n vec4 colLC = texture2D(u_image, v_texCoord + vec2(-u_pixelDimension.x, 0.0));\n vec4 colLT = texture2D(u_image, v_texCoord + vec2(-u_pixelDimension.x, u_pixelDimension.y));\n\n vec4 colCL = texture2D(u_image, v_texCoord + vec2( 0.0, -u_pixelDimension.y));\n vec4 colCR = texture2D(u_image, v_texCoord + vec2( 0.0, u_pixelDimension.y));\n \n vec4 colRB = texture2D(u_image, v_texCoord + vec2( u_pixelDimension.x, -u_pixelDimension.y));\n vec4 colRC = texture2D(u_image, v_texCoord + vec2( u_pixelDimension.x, 0.0));\n vec4 colRT = texture2D(u_image, v_texCoord + vec2( u_pixelDimension.x, u_pixelDimension.y));\n\n vec4 mergedColor = color;\n mergedColor.rgb += unpremultiply(colLB).rgb + unpremultiply(colLC).rgb + unpremultiply(colLT).rgb;\n mergedColor.rgb += unpremultiply(colCL).rgb + unpremultiply(colCR).rgb;\n mergedColor.rgb += unpremultiply(colRB).rgb + unpremultiply(colRC).rgb + unpremultiply(colRT).rgb;\n\n mergedColor /= 9.0;\n\n float grayValue = clamp(color.r * 0.3 + color.g * 0.59 + color.b * 0.1, 0.111111, 0.999999);\n // 1.0 and 0.0 result in white not black, therefore we clamp\n\n // Here we create a function that will map values below 0.1 to 0. Values above 0.2 will be mapped to 1,\n // and for values between 0.1 and 0.2 it will produce a gradient.\n // The funtion is mirror at 0.5, meaning values between 0.8 and 0.9 will result in a decending gradient.\n // And values above 0.9 will be mapped to 0.\n float frequenceFactor = min(smoothstep(1.0 - grayValue, 0.0, 0.11), smoothstep(grayValue, 0.0, 0.11));\n\n // here we apply the high pass filter. Its strength is determined by the uniform ,\n // and the frequence factor. That means the only the mid tones are affected by this filter.\n // Clarity input is ranging from -1 to 1. But we want to strengthen the effect.\n // Therefore we see this little magic number '3.7'.\n color.rgb = clamp(color + clamp((color - mergedColor) * u_clarity * 3.7 * frequenceFactor, 0.0, 10.0), 0.0, 1.0).rgb;\n\n // apply exposure but only to the mid tones.\n color.rgb = color.rgb * pow(2.0, u_clarity * 0.27 * frequenceFactor);\n\n // apply contrast and desaturation matrix\n color.rgb = clamp(color * u_colorMatrix + u_colorOffset, 0.0, 1.0).rgb;\n\n color.rgb *= color.a; // Premultiply alpha\n\n gl_FragColor = clamp(color, 0.0, 1.0);\n}\n"},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(2),a=n.n(o),s=n(3),u=n.n(s),l=n(1),c=n.n(l),f=n(4),h=(n.n(f),function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}());f.Math.Vector3;var p=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||c()(t)).call(this));return e._fragmentSource=n(291),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=u()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(a.a?a()(e,t):e.__proto__=t)}(t,f.Engine.Filter),h(t,[{key:"_applyCanvas",value:function(e,t,n){arguments.length>3&&void 0!==arguments[3]&&arguments[3];var r=n.getContext(),i=t.getCanvas(),o=t.getContext(),a=this._options.temperature,s=i.width,u=i.height,l=o.getImageData(0,0,s,u),c=r.createImageData(s,u);this.canvasShader(l,c,a),r.putImageData(c,0,0)}},{key:"canvasShader",value:function(e,t,n){for(var r=function(e,t,n){return e*(1-n)+t*n},i=function(e,t){return[e[0]*t[0]+e[3]*t[1]+e[6]*t[2],e[1]*t[0]+e[4]*t[1]+e[7]*t[2],e[2]*t[0]+e[5]*t[1]+e[8]*t[2]]},o=e.data.length,a=o-1,s=e.data,u=t.data,l=function(e){return s[e=(e=e<0?0:e)>a?a:e]},c=[.93,.54,0],f=[.299,.587,.114,.596,-.274,-.322,.212,-.523,.311],h=[1,.956,.621,1,-.272,-.647,1,-1.105,1.702],p=0;p<o;p+=4){var d=l(p+0)/255,_=l(p+1)/255,v=l(p+2)/255,y=l(p+3)/255,g=i(f,[d,_,v]);g.z=function(e,t,n){return Math.min(Math.max(e,t),n)}(g.z+0,-.5226,.5226);var m=i(h,g),b=[m[0]<.5?2*m[0]*c[0]:1-2*(1-m[0])*(1-c[0]),m[1]<.5?2*m[1]*c[1]:1-2*(1-m[1])*(1-c[1]),m[2]<.5?2*m[2]*c[2]:1-2*(1-m[2])*(1-c[2])];u[p+0]=255*r(m[0],b[0],n),u[p+1]=255*r(m[1],b[1],n),u[p+2]=255*r(m[2],b[2],n),u[p+3]=255*y}}}]),t}();p.prototype.availableOptions={temperature:{type:f.OptionType.NUMBER,default:0,uniformType:f.UniformType.FLOAT}},t.a=p},function(e,t){e.exports="precision mediump float;\n\n// Input Image with config WRAP_S and WRAP_T: CLAMP_TO_EDGE\nuniform sampler2D u_image;\n\n// Range (-1.0 - 1.0)\nuniform float u_temperature;\n\nconst lowp vec3 warmFilter = vec3(0.93, 0.54, 0.0);\n\nconst mediump mat3 RGBtoYIQ = mat3(0.299, 0.587, 0.114, 0.596, -0.274, -0.322, 0.212, -0.523, 0.311);\nconst mediump mat3 YIQtoRGB = mat3(1.0, 0.956, 0.621, 1.0, -0.272, -0.647, 1.0, -1.105, 1.702);\n\nconst float EPSILON = 0.0000001;\n\nvarying vec2 v_texCoord;\nvoid main() {\n float temperature = u_temperature;\n const float tint = 0.0;\n vec4 source = texture2D(u_image, v_texCoord);\n\n source.rgb /= max(source.a, EPSILON); // Revert premultiplied alpha\n\n vec3 yiq = RGBtoYIQ * source.rgb;\n yiq.b = clamp(yiq.b + tint*0.5226*0.1, -0.5226, 0.5226);\n vec3 rgb = YIQtoRGB * yiq;\n\n vec3 processed = mix(\n (1.0 - 2.0 * (1.0 - rgb) * (1.0 - warmFilter)),\n (2.0 * rgb * warmFilter),\n vec3(rgb.r < 0.5, rgb.g < 0.5, rgb.b < 0.5)\n );\n\n vec4 color = vec4(mix(rgb, processed, temperature), source.a);\n\n color.rgb *= color.a; // Premultiply alpha again\n\n gl_FragColor = color;\n}\n"},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(2),a=n.n(o),s=n(3),u=n.n(s),l=n(1),c=n.n(l),f=n(4),h=(n.n(f),function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}()),p=f.Math.Vector2,d=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||c()(t)).call(this));return e._fragmentSource=n(293),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=u()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(a.a?a()(e,t):e.__proto__=t)}(t,f.Engine.Filter),h(t,[{key:"_applyCanvas",value:function(e,t,n){arguments.length>3&&void 0!==arguments[3]&&arguments[3];var r=n.getContext(),i=t.getCanvas(),o=t.getContext(),a=this._options.sharpness,s=i.width,u=i.height,l=o.getImageData(0,0,s,u),c=r.createImageData(s,u);this.canvasShader(l,c,a),r.putImageData(c,0,0)}},{key:"canvasShader",value:function(e,t,n){for(var r=function(e,t,n){return Math.min(Math.max(e,t),n)},i=e.width,o=e.height,a=e.data,s=t.data,u=function(e){return r(a[e]/255,0,1)},l=function(e,t){var n=r(e,0,i-1),a=r(t,0,o-1);return 4*(n+i*a)},c=[],f=[],h=[-1,0,0,1],p=[0,-1,1,0],d=n>0?-1:.2,_=n>0?5:.2,v=Math.abs(n),y=0;y<i;y++)for(var g=0;g<o;g++){var m=l(y,g);c[0]=u(m+0),c[1]=u(m+1),c[2]=u(m+2),c[3]=u(m+3),f[0]=_*c[0]*c[3],f[1]=_*c[1]*c[3],f[2]=_*c[2]*c[3],f[3]=_*c[3];for(var b=0;b<4;b++){var w=l(y+h[b],g+p[b]),x=u(w+3);f[3]+=d*x;for(var T=0;T<3;T++)f[T]+=d*u(w+T)*x}for(var k=0;k<3;k++)f[k]/=Math.max(f[3],1e-6),f[k]=r(f[k],0,1);f[3]=r(f[3],0,1);for(var R=0;R<4;R++)c[R]=r(function(e,t,n){return e*(1-n)+t*n}(c[R],f[R],v),0,1),s[m+R]=255*c[R]}}}]),t}();d.prototype.availableOptions={sharpness:{type:f.OptionType.NUMBER,default:0,uniformType:f.UniformType.FLOAT},pixelDimension:{type:f.OptionType.VECTOR2,default:new p(100,100),uniformType:f.UniformType.FLOAT2}},t.a=d},function(e,t){e.exports="varying vec2 v_texCoord;\nuniform sampler2D u_image;\nuniform vec2 u_pixelDimension;\nuniform float u_sharpness;\n \nconst float EPSILON = 0.000001;\n \nvoid main() {\n vec4 color = clamp(texture2D(u_image, v_texCoord), 0.0, 1.0);\n\n float factor = mix(0.2, -1.0, float(u_sharpness > 0.0));\n vec4 sharpenedColor = mix(0.2, 5.0, float(u_sharpness > 0.0)) * color;\n \n sharpenedColor += factor * clamp(texture2D(u_image, v_texCoord + u_pixelDimension * vec2(-1.0, 0.0)), 0.0, 1.0);\n sharpenedColor += factor * clamp(texture2D(u_image, v_texCoord + u_pixelDimension * vec2( 0.0, -1.0)), 0.0, 1.0);\n sharpenedColor += factor * clamp(texture2D(u_image, v_texCoord + u_pixelDimension * vec2( 0.0, 1.0)), 0.0, 1.0);\n sharpenedColor += factor * clamp(texture2D(u_image, v_texCoord + u_pixelDimension * vec2( 1.0, 0.0)), 0.0, 1.0);\n \n color.rgb /= max(color.a, EPSILON); // unpremultiply\n sharpenedColor.rgb /= max(sharpenedColor.a, EPSILON); // unpremultiply\n \n sharpenedColor = clamp(sharpenedColor, 0.0, 1.0);\n \n color = clamp(mix(color, sharpenedColor, abs(u_sharpness)), 0.0, 1.0);\n \n gl_FragColor = vec4(color.rgb * color.a, color.a); // premultiply\n}"},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(5),a=n.n(o),s=n(2),u=n.n(s),l=n(3),c=n.n(l),f=n(1),h=n.n(f),p=n(4),d=n.n(p),_=n(66),v=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),y=p.Math.Vector2,g=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||h()(t)).call.apply(e,[this].concat(r)));o._lastBlurRadius=o._options.blurRadius;var a={blurQuality:{type:p.OptionType.STRING}};return o._horizontalFilter=new _.a({},a),o._verticalFilter=new _.a({},a),o._sprite.setFilters([o._horizontalFilter,o._verticalFilter]),o._horizontalFilter.setDelta(new y(.5,.5)),o._verticalFilter.setDelta(new y(-.5,.5)),o._filter=new _.a({},a),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=c()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(u.a?u()(e,t):e.__proto__=t)}(t,p.Operation),v(t,[{key:"_renderWebGL",value:function(e){return this._renderBlur(e)}},{key:"_renderCanvas",value:function(e){return this._options.highQualityCanvasBlur?this._renderBlur(e):this._renderLQCanvasBlur(e)}},{key:"_renderBlur",value:function(e){var t=e.getDimensions(),n=t.min(),r={blurRadius:this._options.blurRadius*n,texSize:t,blurQuality:"high"};return this._horizontalFilter.set(r),this._verticalFilter.set(r),this._renderTexture.render(this._container),p.Promise.resolve()}},{key:"_renderLQCanvasBlur",value:function(e){var t=this._options.blurRadius,n=e.getDimensions();return this._filter.set({blurRadius:t,texSize:n,blurQuality:"low"}),this._sprite.setFilters([this._filter]),this._renderTexture.render(this._container),p.Promise.resolve()}},{key:"transform",value:function(e){var t=this.getBlurRadius(),n=e.applyToRelativeSize(t);this.set({blurRadius:n},!1)}},{key:"dispose",value:function(){(function e(t,n,r){null===t&&(t=Function.prototype);var i=a()(t,n);if(void 0===i){var o=h()(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0})(t.prototype.__proto__||h()(t.prototype),"dispose",this).call(this),this._filter.dispose(),this._verticalFilter.dispose(),this._horizontalFilter.dispose()}},{key:"hasChanges",value:function(){return!0}}]),t}();g.identifier="blur",g.prototype.availableOptions={blurRadius:{type:p.OptionType.NUMBER,default:.025},highQualityCanvasBlur:{type:p.OptionType.BOOLEAN,default:!1}},d.a.Operations.BlurOperation=g,t.a=g},function(e,t){e.exports="/*\n * Based on evanw's glfx.js tilt shift shader:\n * https://github.com/evanw/glfx.js/blob/master/src/filters/blur/tiltshift.js\n * @license\n */\n\nuniform sampler2D u_image;\nuniform float u_blurRadius;\nuniform vec2 u_delta;\nuniform vec2 u_texSize;\nvarying vec2 v_texCoord;\n\nfloat random(vec2 co)\n{\n highp float a = 12.9898;\n highp float b = 78.233;\n highp float c = 43758.5453;\n highp float dt = dot(co.xy,vec2(a,b));\n highp float sn = mod(dt, 3.14);\n return fract(sin(sn) * c);\n}\n\nvoid main() {\n vec4 color = vec4(0.0);\n float total = 0.0;\n\n float offset = random(gl_FragCoord.xy / u_texSize.xy);\n float radius = u_blurRadius;\n\n const float steps = 30.0;\n\n for (float t = -steps; t <= steps; t++) {\n float percent = (t + offset - 0.5) / steps;\n float weight = 1.0 - abs(percent);\n\n // Somehow `sample` is a keyword in headless-gl\n vec4 _sample = texture2D(u_image, v_texCoord + u_delta * percent * radius / u_texSize);\n\n color += _sample * weight;\n total += weight;\n }\n\n gl_FragColor = color / total;\n}\n"},function(e,t,n){"use strict";var r=n(6),i=n.n(r),o=n(0),a=n.n(o),s=n(5),u=n.n(s),l=n(2),c=n.n(l),f=n(3),h=n.n(f),p=n(1),d=n.n(p),_=n(4),v=n.n(_),y=n(163),g=n(8),m=n(329),b=n(7),w=i.a||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},x=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),a()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),T=function e(t,n,r){null===t&&(t=Function.prototype);var i=u()(t,n);if(void 0===i){var o=d()(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},k=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||d()(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=h()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(c.a?c()(e,t):e.__proto__=t)}(t,_.Operation),x(t,[{key:"_render",value:function(e){return this._selectedFilter.render(this._sdk,e,this._renderTexture)}},{key:"render",value:function(e){return this._selectedFilter.getDirty()&&this.setDirty(!0),this.getEnabled()?T(t.prototype.__proto__||d()(t.prototype),"render",this).call(this,e):(this.setDirtyForRenderer(!1,this._sdk.getRenderer()),_.Promise.resolve(e))}},{key:"setDirtyForRenderer",value:function(e,n){T(t.prototype.__proto__||d()(t.prototype),"setDirtyForRenderer",this).call(this,e,n),this._selectedFilter.setDirtyForRenderer(e,n)}},{key:"disposeRenderTextures",value:function(){T(t.prototype.__proto__||d()(t.prototype),"disposeRenderTextures",this).call(this),this._selectedFilter&&this._selectedFilter.disposeRenderTextures()}},{key:"dispose",value:function(){T(t.prototype.__proto__||d()(t.prototype),"dispose",this).call(this),this._selectedFilter&&this._selectedFilter.dispose()}},{key:"restoreSnapshot",value:function(e){var t=w({},e);if(delete t.filter,e.filter){var n=e.filter.constructor;"3d-lut"===n.identifier?this.setFilter(new n({image:e.filter.getImage(),resolution:e.filter.getResolution(),horizontalTileCount:e.filter.getHorizontalTileCount(),verticalTileCount:e.filter.getVerticalTileCount()})):"duotone"===n.identifier?this.setFilter(new n({lightColor:e.filter.getLightColor(),darkColor:e.filter.getDarkColor(),intensity:e.filter.getIntensity()})):this.setFilter(new n)}this.set(t)}},{key:"resetToDefaultFilterIntensity",value:function(){var e=this._selectedFilter&&this._selectedFilter.availableOptions,t=e&&e.intensity.default;this.setIntensity(t||1)}}]),t}();k.identifier="filter",k.prototype.availableOptions={identifier:{type:_.OptionType.STRING,default:"identity"},intensity:{type:_.OptionType.NUMBER,default:1,setter:function(e){return this._selectedFilter&&this._selectedFilter.setIntensity(e),e}},filter:{type:_.OptionType.OBJECT,default:new y.a,setter:function(e){return this._selectedFilter&&(this._selectedFilter.dispose(),this._selectedFilter=null),this._selectedFilter=e,void 0!==this._options.intensity&&this._selectedFilter.set({intensity:this._options.intensity}),e}}},k.FilterPrimitives=g,k.Filters=m,k.Filter=b.a,v.a.Operations.FilterOperation=k,t.a=k},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=n(0),o=n.n(i),a=n(2),s=n.n(a),u=n(3),l=n.n(u),c=n(1),f=n.n(c),h=n(4),p=(n.n(h),function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),o()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}()),d=function(e){function t(){r(this,t);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||f()(t)).call(this));return e._fragmentSource=n(298),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=l()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(s.a?s()(e,t):e.__proto__=t)}(t,h.Engine.Filter),p(t,[{key:"_applyCanvas",value:function(e,t,n){arguments.length>3&&void 0!==arguments[3]&&arguments[3];var r=t.getCanvas(),i=n.getContext(),o=this._options.filteredCanvas;i.save(),i.globalAlpha=1-this._options.intensity,i.drawImage(r,0,0),i.globalAlpha=this._options.intensity,i.drawImage(o,0,0),i.restore()}}]),t}();d.prototype.availableOptions={filteredImage:{type:h.OptionType.NUMBER,default:1,uniformType:h.UniformType.INT},filteredCanvas:{type:h.OptionType.OBJECT,default:null},intensity:{type:h.OptionType.NUMBER,default:1,uniformType:h.UniformType.FLOAT}};var _=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;r(this,e),this._intensity=t,this._stack=[],this._dirtiness={},this._renderTextures={},this._container=new h.Engine.Container,this._sprite=new h.Engine.Sprite,this._container.addChild(this._sprite),this._blendFilter=new d}return p(e,[{key:"push",value:function(e){this._stack.push(e)}},{key:"clear",value:function(){this._stack=[]}},{key:"render",value:function(e,t,n){if(this.isEmpty())return h.Promise.resolve();var r=e.getRenderer();this._sprite.setTexture(t);var i=this._renderTextures[r.id];if(!i){var o=e.getSprite().getTexture().getFrame();i=new h.Engine.RenderTexture(e.getRenderer(),o.width,o.height),this._renderTextures[r.id]=i}var a=n.getDimensions();i.resizeTo(a);var s=this.isDirtyForRenderer(r);if(s){this._stack.forEach(function(t){t.update(e)});var u=this._stack.map(function(e){return e.getFilter()});this._sprite.setFilters(u),i.render(this._container),this.setDirtyForRenderer(!1,r)}if(this._blendFilter.setIntensity(this._intensity),r.isOfType(h.RendererType.CANVAS))this._blendFilter.setFilteredCanvas(i.getRenderTarget().getCanvas());else if(r.isOfType(h.RendererType.WEBGL)){var l=i.getBaseTexture();l.setGLUnit(this._blendFilter.getFilteredImage()),r.updateTexture(l,!1)}return this._sprite.setFilters([this._blendFilter]),n.clear(h.Color.TRANSPARENT),n.render(this._container),s&&this.disposeRenderTextures(),h.Promise.resolve()}},{key:"setIntensity",value:function(e){this._intensity=e}},{key:"isEmpty",value:function(){return 0===this._stack.length}},{key:"isDirtyForRenderer",value:function(e){return e.id in this._dirtiness||(this._dirtiness[e.id]=!0),this._dirtiness[e.id]}},{key:"setDirtyForRenderer",value:function(e,t){this._dirtiness[t.id]=e}},{key:"setDirty",value:function(e){for(var t in this._dirtiness)this._dirtiness[t]=e}},{key:"disposeRenderTextures",value:function(){for(var e in this._renderTextures)this._renderTextures[e].dispose(),delete this._renderTextures[e]}},{key:"dispose",value:function(){this.disposeRenderTextures(),this._stack.forEach(function(e){return e.dispose()}),this._stack=[],this._blendFilter.dispose(),this._sprite.dispose()}}]),e}();t.a=_},function(e,t){e.exports="varying vec2 v_texCoord;\nuniform sampler2D u_image;\nuniform sampler2D u_filteredImage;\nuniform float u_intensity;\n\nvoid main() {\n vec4 color0 = texture2D(u_image, v_texCoord);\n vec4 color1 = texture2D(u_filteredImage, v_texCoord);\n gl_FragColor = mix(color0, color1, u_intensity);\n}\n"},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=f()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(l.a?l()(e,t):e.__proto__=t)}var a=n(0),s=n.n(a),u=n(2),l=n.n(u),c=n(3),f=n.n(c),h=n(1),p=n.n(h),d=n(4),_=(n.n(d),n(16)),v=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),s()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),y=function(e){function t(){r(this,t);var e=i(this,(t.__proto__||p()(t)).call(this));return e._fragmentSource=n(300),e}return o(t,d.Engine.Filter),v(t,[{key:"_applyCanvas",value:function(e,t,n){arguments.length>3&&void 0!==arguments[3]&&arguments[3];var r=t.getCanvas(),i=t.getContext(),o=n.getContext(),a=i.getImageData(0,0,r.width,r.height),s=this._options.brightness;if(0!==s){s*=255;for(var u=0;u<r.width*r.height;u++){var l=4*u;a.data[l]+=s,a.data[l+1]+=s,a.data[l+2]+=s}o.putImageData(a,0,0)}else o.putImageData(a,0,0)}}]),t}();y.prototype.availableOptions={brightness:{type:d.OptionType.NUMBER,default:0,uniformType:d.UniformType.FLOAT}};var g=function(e){function t(){var e;r(this,t);for(var n=arguments.length,o=Array(n),a=0;a<n;a++)o[a]=arguments[a];var s=i(this,(e=t.__proto__||p()(t)).call.apply(e,[this].concat(o)));return s._filter=new y,s}return o(t,_.a),v(t,[{key:"update",value:function(){this._filter.setBrightness(this._options.brightness)}}]),t}();g.prototype.availableOptions=y.prototype.availableOptions,t.a=g},function(e,t){e.exports="varying vec2 v_texCoord;\nuniform sampler2D u_image;\nuniform float u_brightness;\n\nvoid main() {\n vec4 texColor = texture2D(u_image, v_texCoord);\n gl_FragColor = vec4((texColor.rgb + vec3(u_brightness) * texColor.a), texColor.a);;\n}\n"},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=f()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(l.a?l()(e,t):e.__proto__=t)}var a=n(0),s=n.n(a),u=n(2),l=n.n(u),c=n(3),f=n.n(c),h=n(1),p=n.n(h),d=n(4),_=(n.n(d),n(16)),v=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),s()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),y=function(e){function t(){r(this,t);var e=i(this,(t.__proto__||p()(t)).call(this));return e._fragmentSource=n(302),e}return o(t,d.Engine.Filter),v(t,[{key:"_applyCanvas",value:function(e,t,n){arguments.length>3&&void 0!==arguments[3]&&arguments[3];var r=t.getCanvas(),i=t.getContext(),o=n.getContext(),a=i.getImageData(0,0,r.width,r.height),s=this._options.contrast;if(1!==s){for(var u=0;u<r.width*r.height;u++){var l=4*u;a.data[l]=(a.data[l]-127)*s+127,a.data[l+1]=(a.data[l+1]-127)*s+127,a.data[l+2]=(a.data[l+2]-127)*s+127}o.putImageData(a,0,0)}}}]),t}();y.prototype.availableOptions={contrast:{type:d.OptionType.NUMBER,default:1,uniformType:d.UniformType.FLOAT}};var g=function(e){function t(){var e;r(this,t);for(var n=arguments.length,o=Array(n),a=0;a<n;a++)o[a]=arguments[a];var s=i(this,(e=t.__proto__||p()(t)).call.apply(e,[this].concat(o)));return s._filter=new y,s}return o(t,_.a),v(t,[{key:"update",value:function(){this._filter.setContrast(this._options.contrast)}}]),t}();g.prototype.availableOptions=y.prototype.availableOptions,t.a=g},function(e,t){e.exports="varying vec2 v_texCoord;\nuniform sampler2D u_image;\nuniform float u_contrast;\n\nvoid main() {\n vec4 texColor = texture2D(u_image, v_texCoord);\n gl_FragColor = vec4(((texColor.rgb - vec3(0.5)) * u_contrast + vec3(0.5) * texColor.a), texColor.a);\n}\n"},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=f()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(l.a?l()(e,t):e.__proto__=t)}var a=n(0),s=n.n(a),u=n(2),l=n.n(u),c=n(3),f=n.n(c),h=n(1),p=n.n(h),d=n(4),_=(n.n(d),n(16)),v=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),s()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),y=d.Math.ColorMatrix,g=function(e){function t(){r(this,t);var e=i(this,(t.__proto__||p()(t)).call(this));return e._fragmentSource=n(304),e}return o(t,d.Engine.Filter),v(t,[{key:"_applyCanvas",value:function(e,t,n){arguments.length>3&&void 0!==arguments[3]&&arguments[3];for(var r=t.getCanvas(),i=t.getContext(),o=n.getContext(),a=i.getImageData(0,0,r.width,r.height),s=this._options.colorMatrix,u=new d.Color(0,0,0,0),l=0;l<r.width*r.height;l++){var c=4*l;u.r=a.data[c]/255,u.g=a.data[c+1]/255,u.b=a.data[c+2]/255,u=s.apply(u),a.data[c]=255*u.r,a.data[c+1]=255*u.g,a.data[c+2]=255*u.b}o.putImageData(a,0,0)}}]),t}();g.prototype.availableOptions={colorMatrix:{type:d.OptionType.COLOR_MATRIX,default:new y,uniformType:d.UniformType.MAT4},colorMatrixOffset:{type:d.OptionType.ARRAY,default:[],uniformType:d.UniformType.FLOAT4}};var m=function(e){function t(){var e;r(this,t);for(var n=arguments.length,o=Array(n),a=0;a<n;a++)o[a]=arguments[a];var s=i(this,(e=t.__proto__||p()(t)).call.apply(e,[this].concat(o)));return s._filter=new g,s}return o(t,_.a),v(t,[{key:"update",value:function(){this._filter.setColorMatrix(this._options.colorMatrix)}}]),t}();m.prototype.availableOptions=g.prototype.availableOptions,t.a=m},function(e,t){e.exports="varying vec2 v_texCoord;\nuniform sampler2D u_image;\nuniform mat4 u_colorMatrix;\nuniform vec4 u_colorMatrixOffset;\n\nvoid main() {\n vec4 texColor = texture2D(u_image, v_texCoord);\n gl_FragColor = texColor * u_colorMatrix + u_colorMatrixOffset;\n}\n"},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=f()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(l.a?l()(e,t):e.__proto__=t)}var a=n(0),s=n.n(a),u=n(2),l=n.n(u),c=n(3),f=n.n(c),h=n(1),p=n.n(h),d=n(4),_=(n.n(d),n(16)),v=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),s()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),y=function(e){function t(){r(this,t);var e=i(this,(t.__proto__||p()(t)).call(this));return e._fragmentSource=n(306),e}return o(t,d.Engine.Filter),v(t,[{key:"_applyCanvas",value:function(e,t,n){arguments.length>3&&void 0!==arguments[3]&&arguments[3];for(var r=t.getCanvas(),i=t.getContext(),o=n.getContext(),a=i.getImageData(0,0,r.width,r.height),s=[.3,.59,.11],u=this._options.desaturation,l=0;l<r.width*r.height;l++){var c=4*l,f=s[0]*a.data[c]/255+s[1]*a.data[c+1]/255+s[2]*a.data[c+2]/255;a.data[c]+=(255*f-a.data[c])*u,a.data[c+1]+=(255*f-a.data[c+1])*u,a.data[c+2]+=(255*f-a.data[c+2])*u}o.putImageData(a,0,0)}}]),t}();y.prototype.availableOptions={desaturation:{type:d.OptionType.NUMBER,default:1,uniformType:d.UniformType.FLOAT}};var g=function(e){function t(){var e;r(this,t);for(var n=arguments.length,o=Array(n),a=0;a<n;a++)o[a]=arguments[a];var s=i(this,(e=t.__proto__||p()(t)).call.apply(e,[this].concat(o)));return s._filter=new y,s}return o(t,_.a),v(t,[{key:"update",value:function(){this._filter.setDesaturation(this._options.desaturation)}}]),t}();g.prototype.availableOptions=y.prototype.availableOptions,t.a=g},function(e,t){e.exports="varying vec2 v_texCoord;\nuniform sampler2D u_image;\nuniform float u_desaturation;\n\nvoid main() {\n vec4 texColor = texture2D(u_image, v_texCoord);\n vec3 grayXfer = vec3(0.3, 0.59, 0.11);\n vec3 gray = vec3(dot(grayXfer, texColor.xyz));\n gl_FragColor = vec4(mix(texColor.xyz, gray, u_desaturation) * texColor.a, texColor.a);\n}\n"},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=f()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(l.a?l()(e,t):e.__proto__=t)}var a=n(0),s=n.n(a),u=n(2),l=n.n(u),c=n(3),f=n.n(c),h=n(1),p=n.n(h),d=n(4),_=(n.n(d),n(16)),v=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),s()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),y=function(e){function t(){r(this,t);var e=i(this,(t.__proto__||p()(t)).call(this));return e._fragmentSource=n(308),e}return o(t,d.Engine.Filter),v(t,[{key:"_applyCanvas",value:function(e,t,n){arguments.length>3&&void 0!==arguments[3]&&arguments[3];for(var r=t.getCanvas(),i=t.getContext(),o=n.getContext(),a=i.getImageData(0,0,r.width,r.height),s=this._options,u=s.lightColor,l=s.darkColor,c=s.intensity,f=0;f<r.width*r.height;f++){var h=4*f,p=a.data[h]/255,_=a.data[h+1]/255,v=a.data[h+2]/255,y=a.data[h+3]/255,g=new d.Color(p,_,v,y),m=this._duoToneKernel(g,u,l,c);a.data[h]=255*m.r,a.data[h+1]=255*m.g,a.data[h+2]=255*m.b,a.data[h+3]=255*m.a}o.putImageData(a,0,0)}},{key:"_duoToneKernel",value:function(e,t,n,r){if(e.clone().clamp(0,1),r>0){var i=Math.max(r+1,1e-7);e.r=1-Math.pow(1-e.r,i),e.g=1-Math.pow(1-e.g,i),e.b=1-Math.pow(1-e.b,i)}else{var o=Math.max(1-r,1e-7);e.r=Math.pow(e.r,o),e.g=Math.pow(e.g,o),e.b=Math.pow(e.b,o)}var a=.2126*e.r+.7152*e.g+.0722*e.b,s=Math.min(Math.max(a,0),1),u=n.clone().mix(t,s);return u.a*=e.a,u}}]),t}();y.prototype.availableOptions={lightColor:{type:d.OptionType.COLOR,default:d.Color.RED,uniformType:d.UniformType.FLOAT4},darkColor:{type:d.OptionType.COLOR,default:d.Color.BLACK,uniformType:d.UniformType.FLOAT4},intensity:{type:d.OptionType.NUMBER,default:.5,uniformType:d.UniformType.FLOAT}};var g=function(e){function t(){var e;r(this,t);for(var n=arguments.length,o=Array(n),a=0;a<n;a++)o[a]=arguments[a];var s=i(this,(e=t.__proto__||p()(t)).call.apply(e,[this].concat(o)));return s._filter=new y,s}return o(t,_.a),v(t,[{key:"update",value:function(){this._filter.setLightColor(this._options.lightColor),this._filter.setDarkColor(this._options.darkColor);var e=2*this._options.intensity-1;this._filter.setIntensity(e)}}]),t}();g.prototype.availableOptions=y.prototype.availableOptions,t.a=g},function(e,t){e.exports='precision highp float;\n\nuniform sampler2D u_image;\nuniform vec4 u_lightColor;\nuniform vec4 u_darkColor;\nuniform float u_intensity;\nvarying vec2 v_texCoord;\n\nconst float EPSILON = 0.0000001;\nconst vec3 GRAYSCALE_WEIGHTS = vec3(0.2126, 0.7152, 0.0722);\n\nvec4 duotoneKernel(vec4 sampledCol, vec4 light, vec4 dark, float intensity) {\n vec4 color = clamp(sampledCol, 0.0, 1.0);\n color.rgb /= max(color.a, EPSILON);\n color = clamp(color, 0.0, 1.0); // necessary to get rid of all extended sRGB issues with OpenGL ES\n \n // Apply intensity as "symmetric gamma"\n if (intensity > 0.0) {\n color.rgb = 1.0 - pow(1.0 - color.rgb, vec3(max(intensity + 1.0, EPSILON)));\n } else {\n color.rgb = pow(color.rgb, vec3(max(-intensity + 1.0, EPSILON)));\n }\n \n // Colorimetric (perceptual luminance-preserving) RGB to grayscale conversion\n // https://en.wikipedia.org/wiki/Grayscale#Colorimetric_(perceptual_luminance-preserving)_conversion_to_grayscale\n float luminance = dot(GRAYSCALE_WEIGHTS, color.rgb);\n \n // Apply DuoTone\n vec4 duotone = mix(dark, light, clamp(luminance, 0.0, 1.0));\n duotone.a *= color.a;\n \n duotone.rgb *= duotone.a;\n\n return duotone;\n}\n\nvoid main() {\n vec4 texColor = texture2D(u_image, v_texCoord);\n gl_FragColor = duotoneKernel(texColor, u_lightColor, u_darkColor, u_intensity);\n}'},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=f()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(l.a?l()(e,t):e.__proto__=t)}var a=n(0),s=n.n(a),u=n(2),l=n.n(u),c=n(3),f=n.n(c),h=n(1),p=n.n(h),d=n(4),_=(n.n(d),n(16)),v=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),s()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),y=function(e){function t(){r(this,t);var e=i(this,(t.__proto__||p()(t)).call(this));return e._fragmentSource=n(310),e}return o(t,d.Engine.Filter),v(t,[{key:"_applyCanvas",value:function(e,t,n){arguments.length>3&&void 0!==arguments[3]&&arguments[3];for(var r=t.getCanvas(),i=t.getContext(),o=n.getContext(),a=i.getImageData(0,0,r.width,r.height),s=this._options.gamma,u=new Float32Array(256),l=0;l<256;l++)u[l]=255*Math.pow(l/255,s.r);for(var c=new Float32Array(256),f=0;f<256;f++)c[f]=255*Math.pow(f/255,s.g);for(var h=new Float32Array(256),p=0;p<256;p++)h[p]=255*Math.pow(p/255,s.b);for(var d=0;d<r.width*r.height;d++){var _=4*d;a.data[_]=u[a.data[_]],a.data[_+1]=c[a.data[_+1]],a.data[_+2]=h[a.data[_+2]]}o.putImageData(a,0,0)}}]),t}();y.prototype.availableOptions={gamma:{type:d.OptionType.COLOR,default:d.Color.WHITE,uniformType:d.UniformType.FLOAT3}};var g=function(e){function t(){var e;r(this,t);for(var n=arguments.length,o=Array(n),a=0;a<n;a++)o[a]=arguments[a];var s=i(this,(e=t.__proto__||p()(t)).call.apply(e,[this].concat(o)));return s._filter=new y,s}return o(t,_.a),v(t,[{key:"update",value:function(){this._filter.setGamma(this._options.gamma)}}]),t}();g.prototype.availableOptions=y.prototype.availableOptions,t.a=g},function(e,t){e.exports="varying vec2 v_texCoord;\nuniform sampler2D u_image;\nuniform vec3 u_gamma;\n\nvoid main() {\n vec4 texColor = texture2D(u_image, v_texCoord);\n vec3 rgb = vec3(texColor.r, texColor.g, texColor.b);\n rgb = pow(rgb, u_gamma);\n gl_FragColor = vec4(rgb * texColor.a, texColor.a);;\n}\n"},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=f()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(l.a?l()(e,t):e.__proto__=t)}var a=n(0),s=n.n(a),u=n(2),l=n.n(u),c=n(3),f=n.n(c),h=n(1),p=n.n(h),d=n(4),_=(n.n(d),n(16)),v=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),s()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),y=function(e){function t(){r(this,t);var e=i(this,(t.__proto__||p()(t)).call(this));return e._fragmentSource=n(312),e}return o(t,d.Engine.Filter),v(t,[{key:"_applyCanvas",value:function(e,t,n){arguments.length>3&&void 0!==arguments[3]&&arguments[3];for(var r,i=t.getCanvas(),o=t.getContext(),a=n.getContext(),s=o.getImageData(0,0,i.width,i.height),u=this._options.color,l=0;l<i.width;l++)for(var c=0;c<i.height;c++){var f=4*(i.width*c+l),h=(l/i.width-.5)/.75,p=(c/i.height-.5)/.75;r=1-(h*h+p*p),r=Math.min(Math.max(r,.1),1),s.data[f]=s.data[f]*(r*u.r),s.data[f+1]=s.data[f+1]*(r*u.g),s.data[f+2]=s.data[f+2]*(r*u.b),s.data[f+3]=255}a.putImageData(s,0,0)}}]),t}();y.prototype.availableOptions={color:{type:d.OptionType.COLOR,default:d.Color.WHITE,uniformType:d.UniformType.FLOAT3}};var g=function(e){function t(){var e;r(this,t);for(var n=arguments.length,o=Array(n),a=0;a<n;a++)o[a]=arguments[a];var s=i(this,(e=t.__proto__||p()(t)).call.apply(e,[this].concat(o)));return s._filter=new y,s}return o(t,_.a),v(t,[{key:"update",value:function(){this._filter.setColor(this._options.color)}}]),t}();g.prototype.availableOptions=y.prototype.availableOptions,t.a=g},function(e,t){e.exports="varying vec2 v_texCoord;\nuniform sampler2D u_image;\n\nuniform vec3 u_color;\n\nvoid main() {\n vec4 texColor = texture2D(u_image, v_texCoord);\n\n vec2 textureCoord = v_texCoord - vec2(0.5, 0.5);\n textureCoord /= 0.75;\n\n float d = 1.0 - dot(textureCoord, textureCoord);\n d = clamp(d, 0.2, 1.0);\n vec3 newColor = texColor.rgb * d * u_color.rgb;\n gl_FragColor = vec4(vec3(newColor) * texColor.a, texColor.a);\n}\n"},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=f()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(l.a?l()(e,t):e.__proto__=t)}var a=n(0),s=n.n(a),u=n(2),l=n.n(u),c=n(3),f=n.n(c),h=n(1),p=n.n(h),d=n(4),_=(n.n(d),n(16)),v=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),s()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),y=function(e){function t(){r(this,t);var e=i(this,(t.__proto__||p()(t)).call(this));return e._fragmentSource=n(314),e}return o(t,d.Engine.Filter),v(t,[{key:"_applyCanvas",value:function(e,t,n){arguments.length>3&&void 0!==arguments[3]&&arguments[3];for(var r=t.getCanvas(),i=t.getContext(),o=n.getContext(),a=i.getImageData(0,0,r.width,r.height),s=0;s<r.width;s++)for(var u=0;u<r.height;u++){var l=4*(r.width*u+s);a.data[l+2]=.33*a.data[l+1],a.data[l]=.6*a.data[l],a.data[l+2]+=.33*a.data[l],a.data[l+1]=.7*a.data[l+1],a.data[l+3]=255}o.putImageData(a,0,0)}}]),t}(),g=function(e){function t(){var e;r(this,t);for(var n=arguments.length,o=Array(n),a=0;a<n;a++)o[a]=arguments[a];var s=i(this,(e=t.__proto__||p()(t)).call.apply(e,[this].concat(o)));return s._filter=new y,s}return o(t,_.a),t}();t.a=g},function(e,t){e.exports="varying vec2 v_texCoord;\nuniform sampler2D u_image;\n\nvoid main() {\n vec4 texColor = texture2D(u_image, v_texCoord);\n texColor.b = texColor.g * 0.33;\n texColor.r = texColor.r * 0.6;\n texColor.b += texColor.r * 0.33;\n texColor.g = texColor.g * 0.7;\n gl_FragColor = texColor;\n}\n"},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=f()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(l.a?l()(e,t):e.__proto__=t)}var a=n(0),s=n.n(a),u=n(2),l=n.n(u),c=n(3),f=n.n(c),h=n(1),p=n.n(h),d=n(4),_=(n.n(d),n(16)),v=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),s()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),y=function(e){function t(){r(this,t);var e=i(this,(t.__proto__||p()(t)).call(this));return e._fragmentSource=n(316),e}return o(t,d.Engine.Filter),v(t,[{key:"_applyCanvas",value:function(e,t,n){arguments.length>3&&void 0!==arguments[3]&&arguments[3];for(var r=t.getCanvas(),i=t.getContext(),o=n.getContext(),a=i.getImageData(0,0,r.width,r.height),s=0;s<r.width;s++)for(var u=0;u<r.height;u++){var l=4*(r.width*u+s),c=.2125*a.data[l]+.7154*a.data[l+1]+.0721*a.data[l+2];a.data[l]=c,a.data[l+1]=c,a.data[l+2]=c}o.putImageData(a,0,0)}}]),t}(),g=function(e){function t(){var e;r(this,t);for(var n=arguments.length,o=Array(n),a=0;a<n;a++)o[a]=arguments[a];var s=i(this,(e=t.__proto__||p()(t)).call.apply(e,[this].concat(o)));return s._filter=new y,s}return o(t,_.a),t}();t.a=g},function(e,t){e.exports="varying vec2 v_texCoord;\nuniform sampler2D u_image;\nvec3 W = vec3(0.2125, 0.7154, 0.0721);\n\nvoid main() {\n vec4 texColor = texture2D(u_image, v_texCoord);\n float luminance = dot(texColor.rgb, W);\n gl_FragColor = vec4(vec3(luminance) * texColor.a, texColor.a);\n}\n"},function(e,t){e.exports="varying vec2 v_texCoord;\nuniform sampler2D u_image;\nuniform sampler2D u_lookupTable;\n\nvoid main() {\n vec4 texColor = texture2D(u_image, v_texCoord);\n float r = texture2D(u_lookupTable, vec2(texColor.r, 0.0)).r;\n float g = texture2D(u_lookupTable, vec2(texColor.g, 0.0)).g;\n float b = texture2D(u_lookupTable, vec2(texColor.b, 0.0)).b;\n\n gl_FragColor = vec4(vec3(r, g, b) * texColor.a, texColor.a);\n}\n"},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=p()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(f.a?f()(e,t):e.__proto__=t)}var a=n(5),s=n.n(a),u=n(0),l=n.n(u),c=n(2),f=n.n(c),h=n(3),p=n.n(h),d=n(1),_=n.n(d),v=n(4),y=(n.n(v),n(16)),g=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),l()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),m=v.Math.Vector2,b=function(e){function t(){r(this,t);var e=i(this,(t.__proto__||_()(t)).call(this));return e._precomputeQuads(),e._fragmentSource=n(319),e}return o(t,v.Engine.Filter),g(t,[{key:"_precomputeQuads",value:function(){this._quads=[];for(var e=0;e<256;e++){var t=e/255*63,n=new m;n.y=.125*(0|t)|0,n.x=(0|t)-8*n.y,this._quads.push(n)}}},{key:"_applyCanvas",value:function(e,t,n){arguments.length>3&&void 0!==arguments[3]&&arguments[3];for(var r=t.getCanvas(),i=t.getContext(),o=n.getContext(),a=this._options.lookupTableImage,s=this._createImageCanvas(a).getContext("2d"),u=i.getImageData(0,0,r.width,r.height),l=s.getImageData(0,0,a.width,a.height),c=new m,f=0;f<r.width*r.height*4;f+=4){var h=u.data[f],p=u.data[f+1],d=u.data[f+2],_=u.data[f+3]/255,v=this._quads[d];c.x=64*v.x,c.y=64*v.y,c.x+=Math.floor(h/4),c.y+=Math.floor(p/4);var y=4*(a.width*c.y+c.x)|0,g=l.data[y];g=h*(1-_)+g*_;var b=l.data[y+1];b=p*(1-_)+b*_;var w=l.data[y+2];w=d*(1-_)+w*_,u.data[f]=g,u.data[f+1]=b,u.data[f+2]=w}o.putImageData(u,0,0)}},{key:"_createImageCanvas",value:function(e){var t=v.Utils.createCanvas();return t.width=e.width,t.height=e.height,t.getContext("2d").drawImage(e,0,0),t}}]),t}();b.prototype.availableOptions={lookupTable:{type:v.OptionType.NUMBER,default:3,uniformType:v.UniformType.INT},lookupTableImage:{type:v.OptionType.IMAGE,uniformType:null}};var w=function(e){function t(){var e;r(this,t);for(var n=arguments.length,o=Array(n),a=0;a<n;a++)o[a]=arguments[a];var s=i(this,(e=t.__proto__||_()(t)).call.apply(e,[this].concat(o)));return s._filter=new b,s._textures={},s}return o(t,y.a),g(t,[{key:"update",value:function(e){var t=e.getRenderer();t.isOfType(v.RendererType.WEBGL)?this._updateWebGLTexture(e):t.isOfType(v.RendererType.CANVAS)&&this._filter.setLookupTableImage(this._options.image)}},{key:"_updateWebGLTexture",value:function(e){var t=e.getRenderer(),n=t.id;this._textures[n]||(this._textures[n]=new v.Engine.BaseTexture);var r=this._textures[n];r.setSource(this._options.image),r.setGLUnit(3),t.updateTexture(r)}},{key:"dispose",value:function(){for(var e in function e(t,n,r){null===t&&(t=Function.prototype);var i=s()(t,n);if(void 0===i){var o=_()(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0}(t.prototype.__proto__||_()(t.prototype),"dispose",this).call(this),this._textures)delete this._textures[e]}}]),t}();w.prototype.availableOptions={image:{type:v.OptionType.IMAGE}},t.a=w},function(e,t){e.exports="/**\n * Based off of GPUImage's LookupFilter:\n * https://github.com/BradLarson/GPUImage/blob/master/framework/Source/GPUImageLookupFilter.m\n */\n\nvarying vec2 v_texCoord;\nuniform sampler2D u_image;\nuniform sampler2D u_lookupTable;\n\nvoid main() {\n vec4 texColor = texture2D(u_image, v_texCoord);\n float blueColor = texColor.b * 63.0;\n\n vec2 quad1;\n quad1.y = floor(floor(blueColor) / 8.0);\n quad1.x = floor(blueColor) - (quad1.y * 8.0);\n\n vec2 quad2;\n quad2.y = floor(ceil(blueColor) / 8.0);\n quad2.x = ceil(blueColor) - (quad2.y * 8.0);\n\n vec2 texCoord1;\n texCoord1.x = (quad1.x * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * texColor.r);\n texCoord1.y = (quad1.y * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * texColor.g);\n\n vec2 texCoord2;\n texCoord2.x = (quad2.x * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * texColor.r);\n texCoord2.y = (quad2.y * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * texColor.g);\n\n vec4 newColor1 = texture2D(u_lookupTable, texCoord1);\n vec4 newColor2 = texture2D(u_lookupTable, texCoord2);\n\n vec4 newColor = mix(newColor1, newColor2, fract(blueColor));\n gl_FragColor = mix(texColor, vec4(newColor.rgb, texColor.w), texColor.a);\n}\n"},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=f()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(l.a?l()(e,t):e.__proto__=t)}var a=n(0),s=n.n(a),u=n(2),l=n.n(u),c=n(3),f=n.n(c),h=n(1),p=n.n(h),d=n(4),_=(n.n(d),n(16)),v=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),s()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),y=function(e){function t(){r(this,t);var e=i(this,(t.__proto__||p()(t)).call(this));return e._fragmentSource=n(321),e}return o(t,d.Engine.Filter),v(t,[{key:"_applyCanvas",value:function(e,t,n){arguments.length>3&&void 0!==arguments[3]&&arguments[3];for(var r=t.getCanvas(),i=t.getContext(),o=n.getContext(),a=i.getImageData(0,0,r.width,r.height),s=this._options.saturation,u=0;u<r.width;u++)for(var l=0;l<r.height;l++){var c=4*(r.width*l+u),f=.2125*a.data[c]+.7154*a.data[c+1]+.0721*a.data[c+2];a.data[c]=f*(1-s)+a.data[c]*s,a.data[c+1]=f*(1-s)+a.data[c+1]*s,a.data[c+2]=f*(1-s)+a.data[c+2]*s}o.putImageData(a,0,0)}}]),t}();y.prototype.availableOptions={saturation:{type:d.OptionType.NUMBER,default:0,uniformType:d.UniformType.FLOAT}};var g=function(e){function t(){var e;r(this,t);for(var n=arguments.length,o=Array(n),a=0;a<n;a++)o[a]=arguments[a];var s=i(this,(e=t.__proto__||p()(t)).call.apply(e,[this].concat(o)));return s._filter=new y,s}return o(t,_.a),v(t,[{key:"update",value:function(){this._filter.setSaturation(this._options.saturation)}}]),t}();g.prototype.availableOptions=y.prototype.availableOptions,t.a=g},function(e,t){e.exports="varying vec2 v_texCoord;\nuniform sampler2D u_image;\nuniform float u_saturation;\n\nconst vec3 luminanceWeighting = vec3(0.2125, 0.7154, 0.0721);\n\nvoid main() {\n vec4 texColor = texture2D(u_image, v_texCoord);\n float luminance = dot(texColor.rgb, luminanceWeighting);\n\n vec3 greyScaleColor = vec3(luminance);\n\n gl_FragColor = vec4(mix(greyScaleColor, texColor.rgb, u_saturation) * texColor.a, texColor.a);\n}\n"},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=f()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(l.a?l()(e,t):e.__proto__=t)}var a=n(0),s=n.n(a),u=n(2),l=n.n(u),c=n(3),f=n.n(c),h=n(1),p=n.n(h),d=n(4),_=(n.n(d),n(16)),v=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),s()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),y=function(e){function t(){r(this,t);var e=i(this,(t.__proto__||p()(t)).call(this));return e._fragmentSource=n(323),e}return o(t,d.Engine.Filter),v(t,[{key:"_applyCanvas",value:function(e,t,n){arguments.length>3&&void 0!==arguments[3]&&arguments[3];for(var r=t.getCanvas(),i=t.getContext(),o=n.getContext(),a=i.getImageData(0,0,r.width,r.height),s=0;s<r.width;s++)for(var u=0;u<r.height;u++){var l=4*(r.width*u+s);a.data[l]=Math.max(255*this._options.color.r,a.data[l]),a.data[l+1]=Math.max(255*this._options.color.g,a.data[l+1]),a.data[l+2]=Math.max(255*this._options.color.b,a.data[l+2])}o.putImageData(a,0,0)}}]),t}();y.prototype.availableOptions={color:{type:d.OptionType.COLOR,default:d.Color.WHITE,uniformType:d.UniformType.FLOAT3}};var g=function(e){function t(){var e;r(this,t);for(var n=arguments.length,o=Array(n),a=0;a<n;a++)o[a]=arguments[a];var s=i(this,(e=t.__proto__||p()(t)).call.apply(e,[this].concat(o)));return s._filter=new y,s}return o(t,_.a),v(t,[{key:"update",value:function(){this._filter.setColor(this._options.color)}}]),t}();g.prototype.availableOptions=y.prototype.availableOptions,t.a=g},function(e,t){e.exports="varying vec2 v_texCoord;\nuniform sampler2D u_image;\nuniform vec3 u_color;\n\nvoid main() {\n vec4 texColor = texture2D(u_image, v_texCoord);\n vec4 overlayVec4 = vec4(u_color, texColor.a);\n gl_FragColor = max(overlayVec4 * texColor.a, texColor);\n}\n"},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(2),a=n.n(o),s=n(3),u=n.n(s),l=n(1),c=n.n(l),f=n(4),h=(n.n(f),n(164)),p=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),d=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||c()(t)).call.apply(e,[this].concat(r)));return o._options.rgbControlPoints||(o._options.rgbControlPoints={red:o._options.controlPoints,green:o._options.controlPoints,blue:o._options.controlPoints}),o._updateLookupTable(),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=u()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(a.a?a()(e,t):e.__proto__=t)}(t,h.a),p(t,[{key:"_updateLookupTable",value:function(){var e=this._calculateSplineCurve(this._options.rgbControlPoints.red),t=this._calculateSplineCurve(this._options.rgbControlPoints.green),n=this._calculateSplineCurve(this._options.rgbControlPoints.blue);this._options.data=this._buildLookupTable(e,t,n)}},{key:"_buildLookupTable",value:function(e,t,n){for(var r=[],i=0;i<256;i++)r.push(Math.min(Math.max(i+e[i],0),255)),r.push(Math.min(Math.max(i+t[i],0),255)),r.push(Math.min(Math.max(i+n[i],0),255)),r.push(255);return r}},{key:"_calculateSplineCurve",value:function(e){e=e.sort(function(e,t){return e[0]>t[0]});var t,n=this._getSplineCurve(e),r=n[0];if(r[0]>0)for(t=0;t<r[0];t++)n.unshift([0,0]);var i=[];for(t=0;t<n.length;t++){var o=n[t],a=[o[0],o[0]],s=Math.sqrt(Math.pow(a[0]-o[0],2)+Math.pow(a[1]-o[1],2));a[1]>o[1]&&(s=-s),i.push(s)}return i}},{key:"_getSplineCurve",value:function(e){var t,n=this._secondDerivative(e),r=n.length,i=[];for(t=0;t<r;t++)i[t]=n[t];var o=[];for(t=0;t<r-1;t++)for(var a=e[t],s=e[t+1],u=a[0];u<s[0];u++){var l=(u-a[0])/(s[0]-a[0]),c=1-l,f=l,h=s[0]-a[0],p=c*a[1]+f*s[1]+h*h/6*((c*c*c-c)*i[t]+(f*f*f-f)*i[t+1]);p>255?p=255:p<0&&(p=0),o.push([u,p])}return 255===o.length&&o.push(e[e.length-1]),o}},{key:"_secondDerivative",value:function(e){var t=e.length;if(t<=0||1===t)return null;var n,r,i=[],o=[];for(i[0]=[0,1,0],n=1;n<t-1;n++){var a=e[n-1],s=e[n],u=e[n+1];i[n]=i[n]||[],i[n][0]=(s[0]-a[0])/6,i[n][1]=(u[0]-a[0])/3,i[n][2]=(u[0]-s[0])/6,o[n]=(u[1]-s[1])/(u[0]-s[0])-(s[1]-a[1])/(s[0]-a[0])}for(o[0]=0,o[t-1]=0,i[t-1]=[0,1,0],n=1;n<t;n++)r=i[1][0]/i[n-1][1],i[n][1]-=r*i[n-1][2],i[n][0]=0,o[n]-=r*o[n-1];for(n=t-2;n>0;n--)r=i[n][2]/i[n+1][1],i[n][1]-=r*i[n+1][0],i[n][2]=0,o[n]-=r*o[n+1];var l=[];for(n=0;n<t;n++)l[n]=o[n]/i[n][1];return l}}]),t}();d.prototype.availableOptions={rgbControlPoints:{type:f.OptionType.OBJECT},controlPoints:{type:f.OptionType.ARRAY,default:[]},textureGLUnit:{type:f.OptionType.NUMBER,default:1}},t.a=d},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=f()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(l.a?l()(e,t):e.__proto__=t)}var a=n(0),s=n.n(a),u=n(2),l=n.n(u),c=n(3),f=n.n(c),h=n(1),p=n.n(h),d=n(4),_=(n.n(d),n(16)),v=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),s()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),y=function(e){function t(){r(this,t);var e=i(this,(t.__proto__||p()(t)).call(this));return e._fragmentSource=n(326),e}return o(t,d.Engine.Filter),v(t,[{key:"_applyCanvas",value:function(e,t,n){arguments.length>3&&void 0!==arguments[3]&&arguments[3];for(var r=t.getCanvas(),i=t.getContext(),o=n.getContext(),a=i.getImageData(0,0,r.width,r.height),s=0;s<r.width;s++)for(var u=0;u<r.height;u++){var l=4*(r.width*u+s),c=a.data[l]/255*.3+a.data[l+1]/255*.3+a.data[l+2]/255*.3;c-=.2,c=Math.max(0,Math.min(1,c)),c+=.15,c*=1.4,c*=255,a.data[l]=c,a.data[l+1]=c,a.data[l+2]=c}o.putImageData(a,0,0)}}]),t}(),g=function(e){function t(){var e;r(this,t);for(var n=arguments.length,o=Array(n),a=0;a<n;a++)o[a]=arguments[a];var s=i(this,(e=t.__proto__||p()(t)).call.apply(e,[this].concat(o)));return s._filter=new y,s}return o(t,_.a),t}();t.a=g},function(e,t){e.exports="varying vec2 v_texCoord;\nuniform sampler2D u_image;\n\nvoid main() {\n vec4 texColor = texture2D(u_image, v_texCoord);\n float gray = texColor.r * 0.3 + texColor.g * 0.3 + texColor.b * 0.3;\n gray -= 0.2;\n gray = clamp(gray, 0.0, 1.0);\n gray += 0.15;\n gray *= 1.4;\n gl_FragColor = vec4(vec3(gray) * texColor.a, texColor.a);\n}\n"},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=p()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(f.a?f()(e,t):e.__proto__=t)}var a=n(5),s=n.n(a),u=n(0),l=n.n(u),c=n(2),f=n.n(c),h=n(3),p=n.n(h),d=n(1),_=n.n(d),v=n(4),y=(n.n(v),n(16)),g=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),l()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),m=v.Math.Vector2,b=v.Math.Vector3,w=function(e){function t(){r(this,t);var e=i(this,(t.__proto__||_()(t)).call(this));return e._precomputeQuads(),e._fragmentSource=n(328),e}return o(t,v.Engine.Filter),g(t,[{key:"_precomputeQuads",value:function(){this._quads=[];for(var e=0;e<256;e++){var t=e/255*63,n=new m;n.y=.125*(0|t)|0,n.x=(0|t)-8*n.y,this._quads.push(n)}}},{key:"_applyCanvas",value:function(e,t,n){arguments.length>3&&void 0!==arguments[3]&&arguments[3];for(var r=this._options,i=r.resolution,o=r.horizontalTileCount,a=r.verticalTileCount,s=t.getCanvas(),u=t.getContext(),l=n.getContext(),c=this._options.lookupTableImage,f=this._createImageCanvas(c).getContext("2d"),h=u.getImageData(0,0,s.width,s.height),p=f.getImageData(0,0,c.width,c.height),d=new b(i/o-1|0,i/a-1|0,o*a-1|0),_=new v.Color,y=new v.Color,g=new v.Color,w=new v.Color,x=new v.Color,T=new v.Color,k=new v.Color,R=new v.Color,C=new m,E=new m,O=function(e,t,n,r){e.r=t.r*(1-r)+n.r*r,e.g=t.g*(1-r)+n.g*r,e.b=t.b*(1-r)+n.b*r},S=function(e,t,n){var r=4*((n=.5+n|0)*i+(t=.5+t|0));e.r=p.data[r]/255,e.g=p.data[r+1]/255,e.b=p.data[r+2]/255,e.a=p.data[r+3]/255},A=new v.Color,I=new v.Color,F=function(e,t,n,r,i,o,a){O(A,t,r,o),O(I,n,i,o),O(e,A,I,a)},D=new m(i,i).divide(o,a).floor(),M=0;M<s.width*s.height*4;M+=4){_.set(h.data[M]/255,h.data[M+1]/255,h.data[M+2]/255,h.data[M+3]/255);var B=new b(_.r*d.x,_.g*d.y,_.b*d.z),L=B.clone().floor().toInt(),P=B.clone().ceil().toInt(),N=B.clone().fract();C.y=L.z/o|0,C.x=L.z-C.y*o|0,E.y=P.z/o|0,E.x=P.z-E.y*o|0,C.multiply(D),E.multiply(D),S(x,C.x+L.x,C.y+L.y),S(T,C.x+L.x,C.y+P.y),S(k,C.x+P.x,C.y+L.y),S(R,C.x+P.x,C.y+P.y),F(g,x,T,k,R,N.x,N.y),S(x,E.x+L.x,E.y+L.y),S(T,E.x+L.x,E.y+P.y),S(k,E.x+P.x,E.y+L.y),S(R,E.x+P.x,E.y+P.y),F(w,x,T,k,R,N.x,N.y),O(y,g,w,N.z),h.data[M]=Math.ceil(255*y.r),h.data[M+1]=Math.ceil(255*y.g),h.data[M+2]=Math.ceil(255*y.b)}l.putImageData(h,0,0)}},{key:"_createImageCanvas",value:function(e){var t=v.Utils.createCanvas();return t.width=e.width,t.height=e.height,t.getContext("2d").drawImage(e,0,0),t}}]),t}();w.prototype.availableOptions={lookupTable:{type:v.OptionType.NUMBER,default:3,uniformType:v.UniformType.INT},lookupTableImage:{type:v.OptionType.IMAGE,uniformType:null},resolution:{type:v.OptionType.NUMBER,default:128,uniformType:v.UniformType.FLOAT},horizontalTileCount:{type:v.OptionType.NUMBER,default:5,uniformType:v.UniformType.FLOAT},verticalTileCount:{type:v.OptionType.NUMBER,default:5,uniformType:v.UniformType.FLOAT}};var x=function(e){function t(){var e;r(this,t);for(var n=arguments.length,o=Array(n),a=0;a<n;a++)o[a]=arguments[a];var s=i(this,(e=t.__proto__||_()(t)).call.apply(e,[this].concat(o)));return s._filter=new w,s._textures={},s}return o(t,y.a),g(t,[{key:"update",value:function(e){var t=e.getRenderer();t.isOfType(v.RendererType.WEBGL)?this._updateWebGLTexture(e):t.isOfType(v.RendererType.CANVAS)&&this._filter.setLookupTableImage(this._options.image);var n=this._options,r=n.resolution,i=n.verticalTileCount,o=n.horizontalTileCount;this._filter.set({resolution:r,verticalTileCount:i,horizontalTileCount:o})}},{key:"_updateWebGLTexture",value:function(e){var t=e.getRenderer(),n=t.id;this._textures[n]||(this._textures[n]=new v.Engine.BaseTexture);var r=this._textures[n];r.setSource(this._options.image),r.setGLUnit(3),r.setMinFilter(v.Engine.BaseTexture.NearestFilter),t.updateTexture(r)}},{key:"dispose",value:function(){for(var e in function e(t,n,r){null===t&&(t=Function.prototype);var i=s()(t,n);if(void 0===i){var o=_()(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0}(t.prototype.__proto__||_()(t.prototype),"dispose",this).call(this),this._textures)delete this._textures[e]}}]),t}();x.prototype.availableOptions={image:{type:v.OptionType.IMAGE},resolution:{type:v.OptionType.NUMBER,default:128},horizontalTileCount:{type:v.OptionType.NUMBER,default:5},verticalTileCount:{type:v.OptionType.NUMBER,default:5}},t.a=x},function(e,t){e.exports="precision highp float;\n\nuniform sampler2D u_image;\n\nuniform sampler2D u_lookupTable;\n\nuniform float u_resolution; // Texture-Resolution, must be power of 2: 64, 128, 256, 512, 1024, 2048, 4096\nuniform float u_horizontalTileCount; // Horizontal Blue Tiles\nuniform float u_verticalTileCount; // Vertical Blue Tiles\n\nvarying vec2 v_texCoord;\n\nconst float EPSILON = 0.000001;\n\n// Try to get the exact pixel of the lut map image\nvec3 lutColor(int texPosX, int texPosY) {\n return texture2D(u_lookupTable, (0.5 / u_resolution) + vec2(float(texPosX), float(texPosY)) / u_resolution).rgb;\n}\n\nvec3 bilinearInterpolate(vec3 cRfGf, vec3 cRfGc, vec3 cRcGf, vec3 cRcGc, float redFract, float greenFract) {\n return mix(mix(cRfGf, cRcGf, redFract), mix(cRfGc, cRcGc, redFract), greenFract);\n}\n\nvoid main() {\n vec4 inputColor = clamp(texture2D(u_image, v_texCoord.xy), 0.0, 1.0);\n\n vec3 sourceColor = vec3(inputColor.rgb / max(inputColor.a, EPSILON)); \n\n vec3 ranges = vec3(\n floor(u_resolution / u_horizontalTileCount - 1.0),\n floor(u_resolution / u_verticalTileCount - 1.0),\n floor(u_horizontalTileCount * u_horizontalTileCount - 1.0)\n );\n \n vec3 tmp = sourceColor * ranges;\n ivec3 floors = ivec3(tmp);\n ivec3 ceils = ivec3(ceil(tmp));\n vec3 fracts = fract(tmp);\n\n // Map tile index to tile pixel pos.\n ivec2 pixelsPerTile = ivec2(\n u_resolution / u_horizontalTileCount, \n u_resolution / u_verticalTileCount\n );\n\n ivec2 tileFloor; // Blue tile index\n tileFloor.y = floors.z / int(u_horizontalTileCount);\n tileFloor.x = (floors.z - (tileFloor.y * int(u_horizontalTileCount)));\n\n ivec2 tileCeil; // Blue tile index\n tileCeil.y = ceils.z / int(u_horizontalTileCount);\n tileCeil.x = (ceils.z - (tileCeil.y * int(u_horizontalTileCount)));\n \n tileFloor *= pixelsPerTile;\n tileCeil *= pixelsPerTile; \n \n \n // Interpolate between red and green\n vec3 lutColorFB = bilinearInterpolate(\n lutColor(tileFloor.x + floors.x, tileFloor.y + floors.y),\n lutColor(tileFloor.x + floors.x, tileFloor.y + ceils.y),\n lutColor(tileFloor.x + ceils.x, tileFloor.y + floors.y),\n lutColor(tileFloor.x + ceils.x, tileFloor.y + ceils.y),\n fracts.x, fracts.y\n );\n vec3 lutColorCB = bilinearInterpolate(\n lutColor(tileCeil.x + floors.x, tileCeil.y + floors.y),\n lutColor(tileCeil.x + floors.x, tileCeil.y + ceils.y),\n lutColor(tileCeil.x + ceils.x, tileCeil.y + floors.y),\n lutColor(tileCeil.x + ceils.x, tileCeil.y + ceils.y),\n fracts.x, fracts.y\n );\n\n // Interpolate between the blue values\n vec3 interpolation = mix(lutColorFB, lutColorCB, fracts.z);\n\n // Round Color Values to prevent that for ex. 254.999999 is cutting to 254 instead of 255;\n interpolation = clamp(floor(interpolation * 255. + .5) / 255., 0.0, 1.0);\n\n gl_FragColor = vec4(interpolation.rgb * inputColor.a, inputColor.a);\n}\n"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(163);n.d(t,"IdentityFilter",function(){return r.a});var i=n(330);n.d(t,"A15Filter",function(){return i.a});var o=n(331);n.d(t,"BreezeFilter",function(){return o.a});var a=n(332);n.d(t,"BWFilter",function(){return a.a});var s=n(333);n.d(t,"BWHardFilter",function(){return s.a});var u=n(334);n.d(t,"CelsiusFilter",function(){return u.a});var l=n(335);n.d(t,"ChestFilter",function(){return l.a});var c=n(336);n.d(t,"DuoToneFilter",function(){return c.a});var f=n(337);n.d(t,"FixieFilter",function(){return f.a});var h=n(338);n.d(t,"FoodFilter",function(){return h.a});var p=n(339);n.d(t,"FridgeFilter",function(){return p.a});var d=n(340);n.d(t,"FrontFilter",function(){return d.a});var _=n(341);n.d(t,"GlamFilter",function(){return _.a});var v=n(342);n.d(t,"GobblinFilter",function(){return v.a});var y=n(343);n.d(t,"K1Filter",function(){return y.a});var g=n(344);n.d(t,"K2Filter",function(){return g.a});var m=n(345);n.d(t,"K6Filter",function(){return m.a});var b=n(346);n.d(t,"KDynamicFilter",function(){return b.a});var w=n(347);n.d(t,"LeninFilter",function(){return w.a});var x=n(348);n.d(t,"LomoFilter",function(){return x.a});var T=n(349);n.d(t,"MellowFilter",function(){return T.a});var k=n(350);n.d(t,"MetalFilter",function(){return k.a});var R=n(351);n.d(t,"MorningFilter",function(){return R.a});var C=n(352);n.d(t,"OrchidFilter",function(){return C.a});var E=n(353);n.d(t,"PolaFilter",function(){return E.a});var O=n(354);n.d(t,"Pola669Filter",function(){return O.a});var S=n(355);n.d(t,"QuoziFilter",function(){return S.a});var A=n(356);n.d(t,"SemiredFilter",function(){return A.a});var I=n(357);n.d(t,"SunnyFilter",function(){return I.a});var F=n(358);n.d(t,"TexasFilter",function(){return F.a});var D=n(359);n.d(t,"X400Filter",function(){return D.a});var M=n(360);n.d(t,"LUTFilter",function(){return M.a});var B=n(361);n.d(t,"ThreeDLUTFilter",function(){return B.a})},function(e,t,n){"use strict";var r=n(2),i=n.n(r),o=n(3),a=n.n(o),s=n(1),u=n.n(s),l=n(7),c=n(8),f=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||u()(t)).call.apply(e,[this].concat(r)));return o._stack.push(new c.Contrast({contrast:.63})),o._stack.push(new c.Brightness({brightness:.12})),o._stack.push(new c.ToneCurve({rgbControlPoints:{red:[[0,38],[94,94],[148,142],[175,187],[255,255]],green:[[0,0],[77,53],[171,190],[255,255]],blue:[[0,10],[48,85],[174,228],[255,255]]}})),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=a()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(i.a?i()(e,t):e.__proto__=t)}(t,l.a),t}();f.identifier="a15",t.a=f},function(e,t,n){"use strict";var r=n(2),i=n.n(r),o=n(3),a=n.n(o),s=n(1),u=n.n(s),l=n(7),c=n(8),f=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||u()(t)).call.apply(e,[this].concat(r)));return o._stack.push(new c.Desaturation({desaturation:.5})),o._stack.push(new c.ToneCurve({rgbControlPoints:{red:[[0,0],[170,170],[212,219],[234,242],[255,255]],green:[[0,0],[170,168],[234,231],[255,255]],blue:[[0,0],[170,170],[212,208],[255,255]]}})),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=a()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(i.a?i()(e,t):e.__proto__=t)}(t,l.a),t}();f.identifier="breeze",t.a=f},function(e,t,n){"use strict";var r=n(2),i=n.n(r),o=n(3),a=n.n(o),s=n(1),u=n.n(s),l=n(7),c=n(8),f=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||u()(t)).call.apply(e,[this].concat(r)));return o._stack.push(new c.Grayscale),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=a()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(i.a?i()(e,t):e.__proto__=t)}(t,l.a),t}();f.identifier="bw",t.a=f},function(e,t,n){"use strict";var r=n(2),i=n.n(r),o=n(3),a=n.n(o),s=n(1),u=n.n(s),l=n(7),c=n(8),f=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||u()(t)).call.apply(e,[this].concat(r)));return o._stack.push(new c.Grayscale),o._stack.push(new c.Contrast({contrast:1.5})),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=a()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(i.a?i()(e,t):e.__proto__=t)}(t,l.a),t}();f.identifier="bwhard",t.a=f},function(e,t,n){"use strict";var r=n(2),i=n.n(r),o=n(3),a=n.n(o),s=n(1),u=n.n(s),l=n(7),c=n(8),f=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||u()(t)).call.apply(e,[this].concat(r)));return o._stack.push(new c.ToneCurve({rgbControlPoints:{red:[[0,69],[55,110],[202,230],[255,255]],green:[[0,44],[89,93],[185,141],[255,189]],blue:[[0,76],[39,82],[218,138],[255,171]]}})),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=a()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(i.a?i()(e,t):e.__proto__=t)}(t,l.a),t}();f.identifier="celsius",t.a=f},function(e,t,n){"use strict";var r=n(2),i=n.n(r),o=n(3),a=n.n(o),s=n(1),u=n.n(s),l=n(7),c=n(8),f=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||u()(t)).call.apply(e,[this].concat(r)));return o._stack.push(new c.ToneCurve({rgbControlPoints:{red:[[0,0],[44,44],[124,143],[221,204],[255,255]],green:[[0,0],[130,127],[213,199],[255,255]],blue:[[0,0],[51,52],[219,204],[255,255]]}})),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=a()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(i.a?i()(e,t):e.__proto__=t)}(t,l.a),t}();f.identifier="chest",t.a=f},function(e,t,n){"use strict";var r=n(2),i=n.n(r),o=n(3),a=n.n(o),s=n(1),u=n.n(s),l=n(4),c=(n.n(l),n(7)),f=n(8),h=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||u()(t)).call.apply(e,[this].concat(r,[{intensity:{type:l.OptionType.NUMBER,default:.5,required:!0,setter:function(e){return this._filterPrimitive&&(this._filterPrimitive.setIntensity(e),this._stack.setIntensity(1)),this._dirty=!0,e}}}])));return o._filterPrimitive=new f.DuoTone({lightColor:o._options.lightColor||l.Color.WHITE,darkColor:o._options.darkColor||l.Color.BLACK,intensity:o._options.intensity||.5}),o._stack.push(o._filterPrimitive),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=a()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(i.a?i()(e,t):e.__proto__=t)}(t,c.a),t}();h.prototype.availableOptions={lightColor:{type:l.OptionType.COLOR,default:l.Color.WHITE,required:!0,setter:function(e){return this._filterPrimitive&&this._filterPrimitive.setLightColor(e),this.setDirty&&this.setDirty(!0),e}},darkColor:{type:l.OptionType.COLOR,default:l.Color.BLACK,required:!0,setter:function(e){return this._filterPrimitive&&this._filterPrimitive.setDarkColor(e),this.setDirty&&this.setDirty(!0),e}},intensity:{type:l.OptionType.NUMBER,default:.5,required:!0}},h.identifier="duotone",t.a=h},function(e,t,n){"use strict";var r=n(2),i=n.n(r),o=n(3),a=n.n(o),s=n(1),u=n.n(s),l=n(7),c=n(8),f=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||u()(t)).call.apply(e,[this].concat(r)));return o._stack.push(new c.ToneCurve({rgbControlPoints:{red:[[0,0],[44,28],[63,48],[128,132],[235,248],[255,255]],green:[[0,0],[20,10],[60,45],[190,209],[211,231],[255,255]],blue:[[0,31],[41,62],[150,142],[234,212],[255,224]]}})),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=a()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(i.a?i()(e,t):e.__proto__=t)}(t,l.a),t}();f.identifier="fixie",t.a=f},function(e,t,n){"use strict";var r=n(2),i=n.n(r),o=n(3),a=n.n(o),s=n(1),u=n.n(s),l=n(7),c=n(8),f=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||u()(t)).call.apply(e,[this].concat(r)));return o._stack.push(new c.Saturation({saturation:1.35})),o._stack.push(new c.Contrast({contrast:1.1})),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=a()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(i.a?i()(e,t):e.__proto__=t)}(t,l.a),t}();f.identifier="food",t.a=f},function(e,t,n){"use strict";var r=n(2),i=n.n(r),o=n(3),a=n.n(o),s=n(1),u=n.n(s),l=n(7),c=n(8),f=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||u()(t)).call.apply(e,[this].concat(r)));return o._stack.push(new c.ToneCurve({rgbControlPoints:{red:[[0,9],[21,11],[45,24],[255,220]],green:[[0,12],[21,21],[42,42],[150,150],[170,173],[255,210]],blue:[[0,28],[43,72],[128,185],[255,220]]}})),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=a()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(i.a?i()(e,t):e.__proto__=t)}(t,l.a),t}();f.identifier="fridge",t.a=f},function(e,t,n){"use strict";var r=n(2),i=n.n(r),o=n(3),a=n.n(o),s=n(1),u=n.n(s),l=n(7),c=n(8),f=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||u()(t)).call.apply(e,[this].concat(r)));return o._stack.push(new c.ToneCurve({rgbControlPoints:{red:[[0,65],[28,67],[67,113],[125,183],[187,217],[255,229]],green:[[0,52],[42,59],[104,134],[169,209],[255,240]],blue:[[0,52],[65,68],[93,104],[150,153],[255,198]]}})),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=a()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(i.a?i()(e,t):e.__proto__=t)}(t,l.a),t}();f.identifier="front",t.a=f},function(e,t,n){"use strict";var r=n(2),i=n.n(r),o=n(3),a=n.n(o),s=n(1),u=n.n(s),l=n(7),c=n(8),f=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||u()(t)).call.apply(e,[this].concat(r)));return o._stack.push(new c.Contrast({contrast:1.1})),o._stack.push(new c.ToneCurve({rgbControlPoints:{red:[[0,0],[94,74],[181,205],[255,255]],green:[[0,0],[127,127],[255,255]],blue:[[0,0],[102,73],[227,213],[255,255]]}})),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=a()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(i.a?i()(e,t):e.__proto__=t)}(t,l.a),t}();f.identifier="glam",t.a=f},function(e,t,n){"use strict";var r=n(2),i=n.n(r),o=n(3),a=n.n(o),s=n(1),u=n.n(s),l=n(7),c=n(8),f=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||u()(t)).call.apply(e,[this].concat(r)));return o._stack.push(new c.Gobblin),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=a()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(i.a?i()(e,t):e.__proto__=t)}(t,l.a),t}();f.identifier="gobblin",t.a=f},function(e,t,n){"use strict";var r=n(2),i=n.n(r),o=n(3),a=n.n(o),s=n(1),u=n.n(s),l=n(7),c=n(8),f=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||u()(t)).call.apply(e,[this].concat(r)));return o._stack.push(new c.ToneCurve({controlPoints:[[0,0],[53,32],[91,80],[176,205],[255,255]]})),o._stack.push(new c.Saturation({saturation:.9})),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=a()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(i.a?i()(e,t):e.__proto__=t)}(t,l.a),t}();f.identifier="k1",t.a=f},function(e,t,n){"use strict";var r=n(2),i=n.n(r),o=n(3),a=n.n(o),s=n(1),u=n.n(s),l=n(4),c=(n.n(l),n(7)),f=n(8),h=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||u()(t)).call.apply(e,[this].concat(r)));return o._stack.push(new f.ToneCurve({controlPoints:[[0,0],[54,33],[77,82],[94,103],[122,126],[177,193],[229,232],[255,255]]})),o._stack.push(new f.SoftColorOverlay({color:new l.Color(40/255,40/255,40/255)})),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=a()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(i.a?i()(e,t):e.__proto__=t)}(t,c.a),t}();h.identifier="k2",t.a=h},function(e,t,n){"use strict";var r=n(2),i=n.n(r),o=n(3),a=n.n(o),s=n(1),u=n.n(s),l=n(7),c=n(8),f=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||u()(t)).call.apply(e,[this].concat(r)));return o._stack.push(new c.Saturation({saturation:.5})),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=a()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(i.a?i()(e,t):e.__proto__=t)}(t,l.a),t}();f.identifier="k6",t.a=f},function(e,t,n){"use strict";var r=n(2),i=n.n(r),o=n(3),a=n.n(o),s=n(1),u=n.n(s),l=n(7),c=n(8),f=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||u()(t)).call.apply(e,[this].concat(r)));return o._stack.push(new c.ToneCurve({controlPoints:[[0,0],[17,27],[46,69],[90,112],[156,200],[203,243],[255,255]]})),o._stack.push(new c.Saturation({saturation:.7})),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=a()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(i.a?i()(e,t):e.__proto__=t)}(t,l.a),t}();f.identifier="kdynamic",t.a=f},function(e,t,n){"use strict";var r=n(2),i=n.n(r),o=n(3),a=n.n(o),s=n(1),u=n.n(s),l=n(7),c=n(8),f=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||u()(t)).call.apply(e,[this].concat(r)));return o._stack.push(new c.Desaturation({desaturation:.4})),o._stack.push(new c.ToneCurve({rgbControlPoints:{red:[[0,20],[40,20],[106,111],[129,153],[190,223],[255,255]],green:[[0,20],[40,20],[62,41],[106,108],[132,159],[203,237],[255,255]],blue:[[0,40],[40,40],[73,60],[133,160],[191,297],[203,237],[237,239],[255,255]]}})),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=a()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(i.a?i()(e,t):e.__proto__=t)}(t,l.a),t}();f.identifier="lenin",t.a=f},function(e,t,n){"use strict";var r=n(2),i=n.n(r),o=n(3),a=n.n(o),s=n(1),u=n.n(s),l=n(7),c=n(8),f=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||u()(t)).call.apply(e,[this].concat(r)));return o._stack.push(new c.ToneCurve({controlPoints:[[0,0],[87,20],[131,156],[183,205],[255,200]]})),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=a()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(i.a?i()(e,t):e.__proto__=t)}(t,l.a),t}();f.identifier="lomo",t.a=f},function(e,t,n){"use strict";var r=n(2),i=n.n(r),o=n(3),a=n.n(o),s=n(1),u=n.n(s),l=n(7),c=n(8),f=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||u()(t)).call.apply(e,[this].concat(r)));return o._stack.push(new c.ToneCurve({rgbControlPoints:{red:[[0,0],[41,84],[87,134],[255,255]],green:[[0,0],[255,216]],blue:[[0,0],[255,131]]}})),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=a()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(i.a?i()(e,t):e.__proto__=t)}(t,l.a),t}();f.identifier="mellow",t.a=f},function(e,t,n){"use strict";var r=n(2),i=n.n(r),o=n(3),a=n.n(o),s=n(1),u=n.n(s),l=n(4),c=(n.n(l),n(7)),f=n(8),h=l.Math.ColorMatrix,p=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||u()(t)).call.apply(e,[this].concat(r))),a=new h(.8158218291630716,0,0,0,-.01779810181190647,0,.8098360655737704,0,0,.0916393442622953,0,0,.4596336773932402,0,.12760574782432707,0,0,0,1,0);o._stack.push(new f.ColorMatrixPrimitive({colorMatrix:a}));var s=new l.Color(.8,.6,.9);return o._stack.push(new f.Gamma({gamma:s})),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=a()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(i.a?i()(e,t):e.__proto__=t)}(t,c.a),t}();p.identifier="metal",t.a=p},function(e,t,n){"use strict";var r=n(2),i=n.n(r),o=n(3),a=n.n(o),s=n(1),u=n.n(s),l=n(7),c=n(8),f=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||u()(t)).call.apply(e,[this].concat(r)));return o._stack.push(new c.ToneCurve({rgbControlPoints:{red:[[0,40],[255,230]],green:[[0,10],[255,225]],blue:[[0,20],[255,181]]}})),o._stack.push(new c.Glow),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=a()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(i.a?i()(e,t):e.__proto__=t)}(t,l.a),t}();f.identifier="morning",t.a=f},function(e,t,n){"use strict";var r=n(2),i=n.n(r),o=n(3),a=n.n(o),s=n(1),u=n.n(s),l=n(7),c=n(8),f=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||u()(t)).call.apply(e,[this].concat(r)));return o._stack.push(new c.ToneCurve({rgbControlPoints:{red:[[0,0],[115,130],[195,215],[255,255]],green:[[0,0],[148,153],[172,215],[255,255]],blue:[[0,46],[58,75],[178,205],[255,255]]},textureGLUnit:2})),o._stack.push(new c.ToneCurve({controlPoints:[[0,0],[117,151],[189,217],[255,255]],textureGLUnit:3})),o._stack.push(new c.Desaturation({desaturation:.65})),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=a()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(i.a?i()(e,t):e.__proto__=t)}(t,l.a),t}();f.identifier="orchid",t.a=f},function(e,t,n){"use strict";var r=n(2),i=n.n(r),o=n(3),a=n.n(o),s=n(1),u=n.n(s),l=n(7),c=n(8),f=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||u()(t)).call.apply(e,[this].concat(r)));return o._stack.push(new c.ToneCurve({rgbControlPoints:{red:[[0,0],[94,74],[181,205],[255,255]],green:[[0,0],[34,34],[99,76],[176,190],[255,255]],blue:[[0,0],[102,73],[227,213],[255,255]]}})),o._stack.push(new c.Saturation({saturation:.8})),o._stack.push(new c.Contrast({contrast:1.5})),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=a()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(i.a?i()(e,t):e.__proto__=t)}(t,l.a),t}();f.identifier="pola",t.a=f},function(e,t,n){"use strict";var r=n(2),i=n.n(r),o=n(3),a=n.n(o),s=n(1),u=n.n(s),l=n(7),c=n(8),f=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||u()(t)).call.apply(e,[this].concat(r)));return o._stack.push(new c.ToneCurve({rgbControlPoints:{red:[[0,0],[56,18],[196,209],[255,255]],green:[[0,38],[71,84],[255,255]],blue:[[0,0],[131,133],[204,211],[255,255]]}})),o._stack.push(new c.Saturation({saturation:.8})),o._stack.push(new c.Contrast({contrast:1.5})),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=a()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(i.a?i()(e,t):e.__proto__=t)}(t,l.a),t}();f.identifier="pola669",t.a=f},function(e,t,n){"use strict";var r=n(2),i=n.n(r),o=n(3),a=n.n(o),s=n(1),u=n.n(s),l=n(7),c=n(8),f=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||u()(t)).call.apply(e,[this].concat(r)));return o._stack.push(new c.Desaturation({desaturation:.65})),o._stack.push(new c.ToneCurve({rgbControlPoints:{red:[[0,50],[40,78],[118,170],[181,211],[255,255]],green:[[0,27],[28,45],[109,157],[157,195],[179,208],[206,212],[255,240]],blue:[[0,50],[12,55],[46,103],[103,162],[194,182],[241,201],[255,219]]}})),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=a()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(i.a?i()(e,t):e.__proto__=t)}(t,l.a),t}();f.identifier="quozi",t.a=f},function(e,t,n){"use strict";var r=n(2),i=n.n(r),o=n(3),a=n.n(o),s=n(1),u=n.n(s),l=n(7),c=n(8),f=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||u()(t)).call.apply(e,[this].concat(r)));return o._stack.push(new c.ToneCurve({rgbControlPoints:{red:[[0,129],[75,153],[181,227],[255,255]],green:[[0,8],[111,85],[212,158],[255,226]],blue:[[0,5],[75,22],[193,90],[255,229]]}})),o._stack.push(new c.Glow),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=a()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(i.a?i()(e,t):e.__proto__=t)}(t,l.a),t}();f.identifier="semired",t.a=f},function(e,t,n){"use strict";var r=n(2),i=n.n(r),o=n(3),a=n.n(o),s=n(1),u=n.n(s),l=n(7),c=n(8),f=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||u()(t)).call.apply(e,[this].concat(r)));return o._stack.push(new c.ToneCurve({rgbControlPoints:{red:[[0,0],[62,82],[141,154],[255,255]],green:[[0,39],[56,96],[192,176],[255,255]],blue:[[0,0],[174,99],[255,235]]},textureGLUnit:2})),o._stack.push(new c.ToneCurve({controlPoints:[[0,0],[55,20],[158,191],[255,255]],textureGLUnit:3})),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=a()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(i.a?i()(e,t):e.__proto__=t)}(t,l.a),t}();f.identifier="sunny",t.a=f},function(e,t,n){"use strict";var r=n(2),i=n.n(r),o=n(3),a=n.n(o),s=n(1),u=n.n(s),l=n(7),c=n(8),f=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||u()(t)).call.apply(e,[this].concat(r)));return o._stack.push(new c.ToneCurve({rgbControlPoints:{red:[[0,72],[89,99],[176,212],[255,237]],green:[[0,49],[255,192]],blue:[[0,72],[255,151]]}})),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=a()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(i.a?i()(e,t):e.__proto__=t)}(t,l.a),t}();f.identifier="texas",t.a=f},function(e,t,n){"use strict";var r=n(2),i=n.n(r),o=n(3),a=n.n(o),s=n(1),u=n.n(s),l=n(7),c=n(8),f=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||u()(t)).call.apply(e,[this].concat(r)));return o._stack.push(new c.X400),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=a()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(i.a?i()(e,t):e.__proto__=t)}(t,l.a),t}();f.identifier="x400",t.a=f},function(e,t,n){"use strict";var r=n(2),i=n.n(r),o=n(3),a=n.n(o),s=n(1),u=n.n(s),l=n(4),c=(n.n(l),n(7)),f=n(8),h=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||u()(t)).call.apply(e,[this].concat(r)));return o._lutPrimitive=new f.LookupTableImage({image:o._options.image}),o._stack.push(o._lutPrimitive),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=a()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(i.a?i()(e,t):e.__proto__=t)}(t,c.a),t}();h.prototype.availableOptions={image:{type:l.OptionType.IMAGE,required:!0,setter:function(e){return this._lutPrimitive&&this._lutPrimitive.setImage(e),this.setDirty(!0),e}}},h.identifier="lut",t.a=h},function(e,t,n){"use strict";var r=n(2),i=n.n(r),o=n(3),a=n.n(o),s=n(1),u=n.n(s),l=n(4),c=(n.n(l),n(7)),f=n(8),h=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||u()(t)).call.apply(e,[this].concat(r))),a=o._options,s=a.image,l=a.resolution,c=a.verticalTileCount,h=a.horizontalTileCount;return o._lutPrimitive=new f.ThreeDLookupTableImage({image:s,resolution:l,verticalTileCount:c,horizontalTileCount:h}),o._stack.push(o._lutPrimitive),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=a()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(i.a?i()(e,t):e.__proto__=t)}(t,c.a),t}();h.prototype.availableOptions={image:{type:l.OptionType.IMAGE,required:!0,setter:function(e){return this._lutPrimitive&&this._lutPrimitive.setImage(e),this.setDirty(!0),e}},resolution:{type:l.OptionType.NUMBER,default:128},horizontalTileCount:{type:l.OptionType.NUMBER,default:5},verticalTileCount:{type:l.OptionType.NUMBER,default:5}},h.identifier="3d-lut",t.a=h},function(e,t,n){"use strict";var r=n(42),i=n.n(r),o=n(46),a=n.n(o),s=n(0),u=n.n(s),l=n(5),c=n.n(l),f=n(2),h=n.n(f),p=n(3),d=n.n(p),_=n(1),v=n.n(_),y=n(4),g=n.n(y),m="function"==typeof a.a&&"symbol"==typeof i.a?function(e){return typeof e}:function(e){return e&&"function"==typeof a.a&&e.constructor===a.a&&e!==a.a.prototype?"symbol":typeof e},b=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),u()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),w=y.Math.Vector2,x=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||v()(t)).call.apply(e,[this].concat(r)));return o._colorOverlayFilter=new y.Engine.Filters.ColorOverlayFilter({color:o.getTintColor()}),o._frameContainer=new y.Engine.Container,o._resetSprites(),o._options.frame&&o._createSpritesForFrame(o._options.frame),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=d()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(h.a?h()(e,t):e.__proto__=t)}(t,y.Operation),b(t,[{key:"_resetSprites",value:function(){this._spriteGroups={top:{},left:{},right:{},bottom:{}},this._sprites=[],this._repeatSprites={top:[],left:[],right:[],bottom:[]}}},{key:"_createSpritesForFrame",value:function(e){var t=this;if(!e)return this._disposeSprites();var n=e.imageGroups,r=e.layoutMode;this._layoutMode=r||"horizontal-inside",this._disposeSprites(),["top","left","right","bottom"].forEach(function(e){void 0!==n[e]&&["start","mid","end"].forEach(function(r){if(void 0!==n[e][r]){var i=n[e][r];"image"in i&&(i=i.image);var o=y.Engine.Texture.fromImage(i),a=new y.Engine.Sprite(o);t._spriteGroups[e][r]=a,t._sprites.push(a),t._frameContainer.addChild(a)}})})}},{key:"_render",value:function(e){var t=this._renderTexture.getDimensions();return this._options.frame&&(this._colorOverlayFilter.setColor(this.getTintColor()),this._updateSprites(e)),this._frameRenderTexture?this._frameRenderTexture.resizeTo(t):(this._frameRenderTexture=new y.Engine.RenderTexture(this._sdk.getRenderer(),t.x,t.y),this._frameSprite=new y.Engine.Sprite(this._frameRenderTexture),this._container.addChild(this._frameSprite)),this._frameSprite.setAlpha(this._options.alpha),this._options.frame&&this._options.frame.tintable?this._frameSprite.setFilters([this._colorOverlayFilter]):this._frameSprite.setFilters([]),this._frameRenderTexture.clear(),this._frameRenderTexture.render(this._frameContainer),this._renderTexture.render(this._container),y.Promise.resolve()}},{key:"_updateSprites",value:function(e){var t=e.getDimensions();this._frameWidth=Math.ceil(e.getDimensions().min()*this._options.scale),this._updateHorizontalSpriteGroup(e,"top",0),this._updateHorizontalSpriteGroup(e,"bottom",t.y-this._frameWidth),this._updateVerticalSpriteGroup(e,"left",0),this._updateVerticalSpriteGroup(e,"right",t.x-this._frameWidth)}},{key:"_updateHorizontalSpriteGroup",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=e.getDimensions(),i="vertical-inside"===this._layoutMode,o=this._spriteGroups[t].start,a=this._spriteGroups[t].mid,s=this._spriteGroups[t].end,u=0,l=0,c=void 0,f=void 0;if(o){f=(c=o.getTexture().getDimensions()).y/c.x,u=Math.floor(this._frameWidth/f);var h=new w(0,n);h.x=i?this._frameWidth:0,o.setPosition(h),o.setHeight(this._frameWidth),o.setWidth(u)}if(s){f=(c=s.getTexture().getDimensions()).y/c.x,l=Math.floor(this._frameWidth*f);var p=new w(r.x-l,n);p.x-=i?this._frameWidth:0,s.setPosition(p),s.setHeight(this._frameWidth),s.setWidth(l)}if(a){f=(c=a.getTexture().getDimensions()).y/c.x;var d=new w(u,n),_=r.x-u-l;if(i&&(d.x+=this._frameWidth,_-=2*this._frameWidth),a.setPosition(d),a.setWidth(_),a.setHeight(this._frameWidth),"repeat"===this._options.frame.imageGroups[t].mid.mode){var v=this._frameWidth/f,y=Math.ceil(_/v),g=0;if(-1!==y){var m=Math.round(_/y);a.setWidth(m),g+=m,this._ensureRepeatSpritesExist(y-1,t,a);for(var b=0;b<y-1;b++){m=Math.round((_-g)/(y-b-1));var x=this._repeatSprites[t][b],T=d.clone().add(g,0).floor();x.setPosition(T),x.setWidth(m),x.setHeight(this._frameWidth),g+=m}}}}}},{key:"_ensureRepeatSpritesExist",value:function(e,t,n){var r=this;n.getTexture().setMaxListeners(e+1);var i=this._repeatSprites[t].length;if(e>i)for(var o=e-i,a=0;a<o;a++){var s=new y.Engine.Sprite(n.getTexture());this._repeatSprites[t].push(s),this._frameContainer.addChild(s),this._sprites.push(s)}else e<i&&this._repeatSprites[t].splice(e).forEach(function(e){var t=r._sprites.indexOf(e);-1!==t&&(r._sprites.splice(t,1),r._frameContainer.removeChild(e),e.dispose())})}},{key:"_updateVerticalSpriteGroup",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=e.getDimensions(),i="horizontal-inside"===this._layoutMode,o=this._spriteGroups[t].start,a=this._spriteGroups[t].mid,s=this._spriteGroups[t].end,u=0,l=0,c=void 0,f=void 0;if(o){f=(c=o.getTexture().getDimensions()).y/c.x,u=Math.floor(this._frameWidth*f);var h=new w(n,0);h.y=i?this._frameWidth:0,o.setPosition(h),o.setWidth(this._frameWidth),o.setHeight(u)}if(s){f=(c=s.getTexture().getDimensions()).y/c.x,l=Math.floor(this._frameWidth*f);var p=new w(n,r.y-l);p.y-=i?this._frameWidth:0,s.setPosition(p),s.setWidth(this._frameWidth),s.setHeight(l)}if(a){f=(c=a.getTexture().getDimensions()).y/c.x;var d=new w(n,u),_=r.y-u-l;if(i&&(d.y+=this._frameWidth,_-=2*this._frameWidth),a.setPosition(d),a.setHeight(_),a.setWidth(this._frameWidth),"repeat"===this._options.frame.imageGroups[t].mid.mode){var v=this._frameWidth*f,y=Math.ceil(_/v),g=0;if(-1!==y){var m=Math.round(_/y);a.setHeight(m),g+=m,this._ensureRepeatSpritesExist(y-1,t,a);for(var b=0;b<y-1;b++){m=Math.round((_-g)/(y-b-1));var x=this._repeatSprites[t][b],T=d.clone().add(0,g).floor();x.setPosition(T),x.setHeight(m),x.setWidth(this._frameWidth),g+=m}}}}}},{key:"_disposeSprites",value:function(){var e=this;this._sprites.forEach(function(t){e._frameContainer.removeChild(t),t.getTexture().getBaseTexture().dispose(),t.dispose()}),this._resetSprites()}},{key:"dispose",value:function(){(function e(t,n,r){null===t&&(t=Function.prototype);var i=c()(t,n);if(void 0===i){var o=v()(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0})(t.prototype.__proto__||v()(t.prototype),"dispose",this).call(this),this._disposeSprites()}}],[{key:"validateFrame",value:function(e){if(e){var t=e.imageGroups,n=e.layoutMode;if("string"!=typeof e.identifier)throw new Error("Frame needs a property `identifier` of type String.");if("object"!==m(e.imageGroups))throw new Error("Frame needs a property `imageGroups` of type Object.");var r=function(e){var n=t[e],r=n.start,i=n.end,o=n.mid;if(void 0!==t[e]){if("object"!==m(t[e]))throw new Error("Frame: `imageGroups."+e+"` needs to be of type Object.");if(void 0!==r&&!(r instanceof y.Image||"undefined"!=typeof HTMLImageElement&&r instanceof HTMLImageElement))throw new Error("Frame: `imageGroups."+e+".start` needs to be of type Image.");if(void 0!==o&&!(r instanceof y.Image||"undefined"!=typeof HTMLImageElement&&r instanceof HTMLImageElement)&&"object"!==(void 0===o?"undefined":m(o)))throw new Error("Frame: `imageGroups."+e+".mid` needs to be of type Image or Object.");if(void 0!==i&&!(i instanceof y.Image||"undefined"!=typeof HTMLImageElement&&i instanceof HTMLImageElement))throw new Error("Frame: `imageGroups."+e+".end` needs to be of type Image.")}};if(void 0!==n&&-1===["vertical-inside","horizontal-inside"].indexOf(n))throw new Error("Frame: `layoutMode` must be one of vertical-inside, horizontal-inside");if("undefined"!=typeof tintable&&"boolean"!=typeof tintable)throw new Error("Frame: `tintable` needs to be of type Boolean.");r("top"),r("left"),r("right"),r("bottom")}}}]),t}();x.identifier="frame",x.prototype.availableOptions={frame:{type:y.OptionType.OBJECT,validation:x.validateFrame,setter:function(e,t){return t||this._createSpritesForFrame(e),e},default:null},alpha:{type:y.OptionType.NUMBER,default:1},tintColor:{type:y.OptionType.COLOR,default:new y.Color(1,1,1,0)},scale:{type:y.OptionType.NUMBER,default:.1}},g.a.Operations.FrameOperation=x,t.a=x},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(2),a=n.n(o),s=n(3),u=n.n(s),l=n(1),c=n.n(l),f=n(4),h=n.n(f),p=n(364),d=n(366),_=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),v=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||c()(t)).call.apply(e,[this].concat(r)));return o._applyWatermarkFilter=function(){return o._watermarkFilter||(o._watermarkFilter=new p.a({watermarkImage:o._watermarkImage})),o._sprite.setFilters([o._watermarkFilter]),o._renderTexture.render(o._container),f.Promise.resolve()},o._loadWatermarkImage=function(){return o._watermarkImage?f.Promise.resolve():new f.Promise(function(e,t){o._watermarkImage=new f.Image,o._watermarkImage.onload=e,o._watermarkImage.src=d.a})},o._watermarkFilter=null,o._watermarkImage=null,o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=u()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(a.a?a()(e,t):e.__proto__=t)}(t,f.Operation),_(t,[{key:"_render",value:function(e){return this._loadWatermarkImage().then(this._applyWatermarkFilter)}}]),t}();v.identifier="license-watermark",v.prototype.availableOptions={},h.a.Operations.LicenseWatermarkOperation=v,t.a=v},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(2),a=n.n(o),s=n(3),u=n.n(s),l=n(1),c=n.n(l),f=n(4),h=(n.n(f),function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}()),p=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var r=arguments.length,i=Array(r),o=0;o<r;o++)i[o]=arguments[o];var a=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||c()(t)).call.apply(e,[this].concat(i)));return a._fragmentSource=n(365),a}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=u()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(a.a?a()(e,t):e.__proto__=t)}(t,f.Engine.Filter),h(t,[{key:"_applyWebGL",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=e.getContext(),o=(i.canvas,this.getShaderForRenderer(e)),a=t.getFrame();this._createWatermarkCanvas(a.width,a.height);var s=f.Engine.Texture.fromCanvas(this._watermarkCanvas),u=s.getBaseTexture();e.updateTexture(u),u.setGLUnit(1),e.setRenderTarget(n),r&&n.clear(),e.setShader(o);var l=e.getCurrentRenderTarget().getProjectionMatrix().toArray();o.setUniform("u_projMatrix",l),o.syncUniforms(),i.uniform1i(i.getUniformLocation(o.getProgram(),"u_watermarkTex"),1),i.activeTexture(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,t.getTexture()),i.activeTexture(i.TEXTURE1),i.bindTexture(i.TEXTURE_2D,u.getGLTextureForRenderer(e)),i.drawElements(i.TRIANGLES,6,i.UNSIGNED_SHORT,0),s.dispose()}},{key:"_createWatermarkCanvas",value:function(e,t){var n=this._options.watermarkImage,r=f.Utils.createCanvas();r.width=e,r.height=t;var i=r.getContext("2d"),o=void 0,a=void 0,s=void 0;e>t?(o=e/n.width,s=(t-n.height*o)/2,a=0):(o=t/n.height,s=0,a=(e-n.width*o)/2),i.drawImage(n,0,0,n.width,n.height,a,s,n.width*o,n.height*o),this._watermarkCanvas=r,this._watermarkContext=i}},{key:"_applyCanvas",value:function(e,t,n){arguments.length>3&&void 0!==arguments[3]&&arguments[3];var r=t.getCanvas(),i=t.getContext(),o=n.getContext();this._options.watermarkImage,this._createWatermarkCanvas(r.width,r.height);for(var a=i.getImageData(0,0,r.width,r.height),s=this._watermarkContext.getImageData(0,0,r.width,r.height),u=new f.Color,l=new f.Color,c=new f.Color,h=0;h<r.width*r.height*4;h+=4)u.set(a.data[h]/255,a.data[h+1]/255,a.data[h+2]/255,a.data[h+3]/255),l.set(s.data[h]/255,s.data[h+1]/255,s.data[h+2]/255,s.data[h+3]/255),l.r>.8?c.copy(u.clone().mix(l,.3)):c.copy(u),a.data[h]=255*c.r,a.data[h+1]=255*c.g,a.data[h+2]=255*c.b,a.data[h+3]=255*c.a;o.putImageData(a,0,0)}}]),t}();p.prototype.availableOptions={watermarkImage:{type:f.OptionType.OBJECT,required:!0}},t.a=p},function(e,t){e.exports="uniform sampler2D u_image;\nuniform sampler2D u_watermarkTex;\n\nvarying vec2 v_texCoord;\n\n\nvoid main() {\n vec4 color = texture2D(u_image, v_texCoord);\n vec4 watermarkColor = texture2D(u_watermarkTex, v_texCoord);\n\n if (watermarkColor.r > 0.8) {\n gl_FragColor = mix(color, watermarkColor, 0.3);\n } else {\n gl_FragColor = color;\n }\n}\n"},function(e,t,n){"use strict";t.a="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAMAAADDpiTIAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTM4IDc5LjE1OTgyNCwgMjAxNi8wOS8xNC0wMTowOTowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTcgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MDA4NDFGODc4N0ZCMTFFOEFCRjZEQ0E4MkRCQzYyNjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MDA4NDFGODg4N0ZCMTFFOEFCRjZEQ0E4MkRCQzYyNjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowMDg0MUY4NTg3RkIxMUU4QUJGNkRDQTgyREJDNjI2MiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowMDg0MUY4Njg3RkIxMUU4QUJGNkRDQTgyREJDNjI2MiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Ppk6b2UAAAASUExURQAAAP///8zMzDMzM2ZmZpmZmer1GSkAABunSURBVHja7F3rgt6mDlzr8v6v3O5ukqaJbQSS0GDjn+c0+9lomBkJEB8fD3tEPvbz5ocO3oPw6vgfx+aA9z56HBsBL37k+H50D8UrHz6OjYAd/42ANxvAjYC3G8BfD+0ReacB3AjYBmAj4IXPcfJQVVFQaFuQSgNYiwBW2uxTbADrEMDyA4p7RaLUABYhgP8D4i5H1xrAAgT8mvzbgWIYgLkI4D9VaGtAuQGYiAD5G4NbAxAEYAoCvmz/rkJAVQAmxoKvCGhrAIABSEeAXP/81oDiDDAfASx36NvFQAgDkIcA1kLh2U+HAKTMx1b4twlAyADTEMBUgLn9DAtAcDyYCo3HfroywAQEiFl2tgbgCEAYAuzh34lgUQaokheRnvBvE1BjAOiuNiATw79NQE0GyB9JCOgN/zYBJQIgd/+nIybcH/5tAgoEQO/hMYqAofBvDZgvANTOEAYWh1mPYwNgCQFgQ45Is8K/TcB0ARBTlaAPAY7wbxNQJgD3oevIz+3WX8+YYmtAlQDEIMAcfhI+p6WtAVUCcI8AEzWzPfyXvLQBME8A1F4ssiDA7P1Ibn5tV4PnCUBPubA9NcUafr79N9sEFArALY3flwOs4q/ceDPaGhD+aJev44Fk0Mr+ym2+2QCYIwDUSxg38iyD4T8FwK4EzHGA/BGFAKP3V7ZBZ5uAUgG4n9EyXPhTtmJtA2CGA6RBR89j5k+5g562CZggADJEG395dHaGf5uAIgfYrraoJRUQb/i3CUh/OkpAtoKQ9k1/5W6F2gBId4AmkqWGEZTOqp/domwTkOwA1fFvf8bHMv1NRb3tAqFKAFYEGKY/yShH7fWgXAcovn/+ObMNub+Mk9Q2AakOkLwAOgK83wZAnQNk91+IEf9tApAdYCsVCBD/XQoqcYAU8UdC9/XKdoHfbCs8gwAk5K9EiP82AX9NNSJhxiKATiNIEgPUF5qAX8NAGgMCiTp4I3nsv13gxTwg8usBhTVg0Azvf//35eUACGACCTx6SVnsf/mqLzQB5wEbBgEHUrTJCGog9l8JALo9QxVD2xQYoqjpf/7tGwBOIuDgo9eS2ttpu0CDzvYRgUaHSdOm//kffx0ALDJL5iJLNAHcAtRfttu1QHPBzSgGGt96gbOm/3aBvdWWthhwRvcdyWvtuAHQu+7awACl9F7RvKY+2wX2L7rdYCCFAD6MXWY2ACYB4AYDlDRROU0EZBeDx9oqnmIgiwDMjYZCoPWyNICP4cdy5D6KUTVJBLYLdADgz/oAZ3n1a6LShL+7ATAqBZrZf5OTROD1LlAO9/OjIpNKAGki8HoA0BHwfElBKgF8jJ4232nADAB80UAuAWSJwOvTgCgA5BXrGmql4QCglwOAhKJQoTPAKuED8B86fnvkt+f3//15ScDn97MQHAEMNh0acYGi9P1YtO/7UZUl8XAtgcxKWATgPnM8QwO/0SDLYIFvx9OJgfghoPjf0TQD9BMJqwHgj25c42KgU17X9UMBNGcGwjJ1II4aJZ7zvqO/xHFm14oDQBhYd0UOYCAnm4o5dzg7+L/DAAsDHZXQXgzwLM3q9IFTaH/6uGRkwT4M0DzO6vixoPzWQwEfCwOgBwNpFXXHr5VH/wEA+DDe0ZD3naOHT4uZH3OpabASbiBSmQlaw+8JRPThLMD4UkgLAzz1pVuvDRN+tIuJXIuhd5yauqTae/wIJ/xwFoCd3H05tDz5rW9GFin8cJsN2B26cxpIxrnYKQAr/HD7zSTgDaXA6lopgMHC/0gAaMFnim1sFS38cLuNAhokcInQWXRH4KY/3n7DgE3RFQpgoQD2Tf9f+3z+t//r/4+IdmwdgtxxHAAAquE5akwvGY770HaeH4jQFhoYHgC9weOie9hPA+yY/t+r9THx+cLCKRDgNhwHAKAK5nRDsNIZ+5yNGitcSeMHgFbBXK5toHbEXvM26axwHYEfAFQGc7rgHnPuTzK9XsmPA0DhV8q5DbTRf+bMv34/OAvgPxdV+JV8utamtujXMJQ+DwCVXzmY6CuX4ZMXAIC6ASCFb1+t+68DQO1XDnS4mze2uoAFcG8HKDY6ghv+Re6kcwOg9isZN/yLXEjl3g9S3GGnQwNmG/A1bqPxAqC6vYZZA+ZvxaQNACAKEISRRWw+5QVA+X0LBJT4N7mJnweA8iZ7Ajn9V0kCHwAAhpz+H8tcTC7hAKD6gUYY9VVuJXYCAKDHnmKew1pEARIAoABTDWDxbYWVwBwACBAA6kR3kSTQDQCpFzqGPIari1gAbwQB7t1UyBMYtIgF8AKgvtc+Qx7AWEYB4gGAkgUK2rCC3kKxOgAEswvHMgqwPAAwT+CuowCrA0AxD+CuowCLA4Ax47+QAiwOAELk/6UUYG0ABDYOf2cV6MO9HFwLAALtwLGQAiwNAFQCWEkBVgYAAxaAllOAlQGgmA5wLQVYGACwBLCUAngX9AsBQKgEsJQCrAsAVAe4mAJ493TVLQejpoBFXROrAFC2IWQpAgBWAO+23qotYbAO8LxtzQfw41NxLgIAbAq4mgIsCgBcAlhNARIAIEWjjEEADGpNJwJgwufiOsDFigABmXxJIQA2BTzdogZtAd2ZfAUAzveBQYymLKcArUz+99sRQAAA7ADXs4CnmP3tGgz6+woN+r5CI4ZAnpUCrlcE+BhrtvnzYo1/cTC/FMjA93DoakWAz/tfD9cznwGAHeDHsZACfM7ejquOeloxvzUFXMYCfoX+SHto+iRDGWV8C3h1k9E6AAB2gOAW8Cv2x5Rn9r3xKD4L1gJOjH02AGgxAqhXAD6/2zv1yUM9sgO8UCcpfLvJE3/CjEROAT+gGlUmG/0iAEATgMD0Kq1g/SkhgXaA9x1L50GAEW5MT4oJcgrYbFo9AwJVmj+JAhYmgAkQqOf9dF+GnALa1tT00byfTQHQDtB4hWXKtVVQUz9xYkKngOZF9WAIMGT0U6T5CQTwDQFeg/h/bglSVZHPPUKnm4Sun1c5wL5dNUFuUJOCLtcbAH/SDkt7K4FOmGIwS21aYZI1NvByG/SBaiNvAsi1AhwTehVmnw7RBB9IjyKAICtA3tAzx8xS1mwKwHaAg1PRbQWkatbPV2jkfWAOMZbpwPua9utVaYGPAvm02KkDhBD7CRyN7QDP4WnN0V06YL85O39fSmadDtsB8tXbMaXrAFVP/CkUwNAO8DwI329ng4BDB7Q98bl0HAidXBIJoAMCEjs3ZrH+JKGWZQnADoFhEiCM4GemgoydAkr7q00Q0Lifr7owK4kCsFPAJgF8h8li1sZGCokdU7h6xRTwhPYsENCoFyCo2aAJfxM7BTzHvOaQAD+cAlZ0gBeQZ00hAUJySPHTldZzgNfwNLjBfhKAooBwwX4QAVitgEa8RJlHCk4FV3SADXhqeE1AoLKk2KRdF3SALXgarID6x7xskoRyNjgBjDqetg70kQBUJhjq2lbcBybj/3QU5Qw1TQKX7lbcB2aEZzsf0GUpIE63sVNA8sGzqQMdMoDVmyZMuBWaADRl3g7+McKngKMOSBPNbt9XchgJCNZUiaFu6BSQYzZ2aJQXxKKAEPO2YjeI/iFvkoA+hwJo/t+YrHJDIy4xMoDllwNm74r9wMboqUkCsiAF+PUbeR+YBJ+FlAAZ4IdRAPI+MA4/Dd0iAYsMKBYFOBkc2QFyxjm/VjrAq1GAMxUEdoCccxi+RQLyKgoAPgp0GSj326nTCCxBATSDPkriH3EAhnxGAIwCODilgSCAy/jHoFNdCECjgOFU8GKdleufy3wtyp6IywgsQQHqnQeQD6dTjGX0GMw6DzI5rxd/ySZOYzjBKGDQy9Fy8dcJ88YEADQKGMrmZLn4R4/w3bZhHqAPAaMAehgBxM8wHfYaa1CAPIsABCf+eBTQvaazoAOMvhhOPVBDo4DuVd0FU8CvL2KM+ONRQO/x2WPVJ6otizP+eMsofT6QjuPdEFC31VCwgnCXD5Rj6ccPAfLXGuAooGdJgI7j1RAIiD/edvoOCtBj/cdjB0Pif2G80Sjg7IX4eMQzCgEOir+lcyHmkoAeD3mkNP4XA46fCvLxmGeg3RsHrjXBbaixpYJ0POhRros/3pY6kw+U41lPwDmo4bgtmQqef720n3N+kZyn455WLYs/3rZ6AwWMZ6+T4W6/q9d3ut/F23AHa5q2xPPG0ysfZgw43t+p27qED9QYzqqAu/VGqKL4412y0KAAX+JSkvbYaKAtA5QR/+VSQWfeUpT2mGiAR8s/zg9Yygd64VoGd0sHeBlL/70AFjQRuNkd5hfxOrizp+mnRNeT29oCeVDIb+Mr0x4e7veXGn9fJ9OpPjAieqWL4E0IaK/9D8GuFs6KLp6O4O/iygcPHO7Pjv8qIsAxlbzqtKcBAe2x/1HAFTQROJ/qQTlc+QrY/cFe7fiPw2CLJgIdK/4cxS/1LucMAXLMiP/VgIO1D4wCKUDl41YH1DYOofe+womAdR0tvNSEQAJqiv8E1S0UAckSgEapCcMJSFv+o00LnAhQGgF8oLSX1XsEyDEx/ldvUycCnEcAMCtgcvdlk+N/NeXq1gRy7s9FSQWbKKcjP/03vYwAU0B4qWn+Rw7tcJapU67MBkjmOMCcixtAAM99F7CbJYNeDGczZO8xJ+LZpKugFMAJ4/4BjwAteBWBpADN+OOKjgAtGfEqG8CZSgi0GVKr7V9rxMtsgGZOBaDNkAoS/8s3ITgKoKw/XqN3VGz/miNeZQRl+k6oIqwbEECV411mBClxMJAoIPaW+Iy8S6AogBP/eI3l5XL5b1kRBqIAyhz0Irnj6tFvkhDSzJBMxDMU2VXbv3J7pJM9QF3OI6jyXzwwaRRAaI63MAlXhDrkZKsmaEi/hKRU/TAIAmhiJbCWArjGfnFKP6PsYeE0AsBb/aAS2OEgIMMHMiDVXcNS5/8k0tBkpIKKmPNWpKbdfXcVZlQyaQ9tHxTBxH9OVcKUCmr4MANvhtWZcMNDQHQqaNC9MgqQeSJwb/8FSSGDU0HYlHeqCHBjmgsQQcamgibhqzsWN2nM22ePBGh+RKaCtsQX7lgcT4y/NP+b2UYgMhU0Oh+09gg0L/5s4UqIA/WZlS+0HjmhI25tPaE42UCYDzSnPnA9cubEX+1+SespgGO5D1sEdH78GwggqaYAiplcinZ7Tmrrvj5lV5SqUIwPvEgn0LqmZ/Zv7e08pyiFwYhU8BJFaF3T01r33ZX/LmLZ7HDL61DAZZzhbs+hHB94G//hytkkCPh5+uYvrHGXsibGXz3OeY4QuK3azR+Ao4CM+5yGL54w5E4zMoLUG0PgLtCa1RjFBHVL+YyESyiAfN8v4aWmVLhLSfytW0ezzYCPpxsyv+hdyiHx59Hhm00DHqvWRM+CF6nGlECNDs5aRE3FgMMbN+P7aB8YsbRrP0GQh4Fxnjb8S7RUMNCWSMyyZ8cmUkp6hn/MwB2rXaQaEv++z5OhfaS4T9aAg/nAyM1d+qT4Sx7nZvpALoz/aIdjyIfyOBch7THkf2MO9zE6wOm5d1LaI6Xxf4wOaHruneUDqTj+tuuwVyQApDbSd5wkxfF/BAQ0vNQ0zwdSefwfAIHs3BuBAm4ce4SsLQ0BmbQGk5QKOsATaWvWhQAl597ZqaBAxP9zuBZNCjk394agAHUt/z67LqDTlmGzKEBh4v8x2GkClQBW2R3Gw/Gfe9R8LQeIuSQgA++jARsA/Lnmcg5wpVSQxyelvDv+7e9HSwX7KaCRn+mrDQANglpWooBppzovf4cAnmETrMtTQNOaSeKbFXumADe3BgWMF4K/xiGCBHhaqhHHTjwObMaigDEvExokQo6/axov0TPCUQyK+R5Fjr9PyJ9BAS0j4DzSycj679VxtFSQxl6ntYdTw2kJJf7eCKL5QBl9nQYCHAmhQsffzeH6DAow9HiJFQDCiL9/bxfaQaFhCmgu1gySwHiZpS4FnMshKBTQPsyhYSOMEv8QBacFKIBd0XKQACMngEEenh9DAYY1e40YYRQDGMXeYD7QQwFtGeirCQi0AYwib7RUkFxf1SYBdo4MigGIs29gB4XE91kcd1uWQhuAwAQOTOi8b9Pcxm80g4wtAIHSDZYKipeQ2vs3TXgiaAEIVW6sJQF2f1lbBmh0iQlFAGJjBuYD1f9pAZ1/CVoAgllb8Smg89sMTV6UJ44waAq4EAVkdHqSKR57AQJAwzuHvIyBBK6tgEILQMKExVoSoJiXMZDAhRVgbAeYAE8sCpCg0pSl3ZuaLxHSBxMAmumlqA+0NHdQ4whjO0BCRFUoBYx9oYUE/rIC+i4HCGd7+PzUH0eO1x0EPB1r1ksBwSjg3+BT9L4+6oSArucAI/Sp3gfeBN83B03dHX5BgN+WAkKkgq3g+77S1unrBwT0bSlgufdlIdMBfM9n2ro8fUJgRQIIClJBKvg58e3dFzh86pxAQN+XAtb4QLZO/Cg9ctwC8NRVQNskgYh9SByGu/3BEED2GlX6Ghj3cf6cakcy86SngOkME3JDmjP0YeUOWpgAJmj01fCQMo9HXvyhD6x30LIEMMGl3zXEo08UcE/gP+d8bIc1zeM5fAKYUqprb6omEvkMLp/H/N/5/jnhKaW1XtAF7n0d4J92FGicAv6GgqllXVTwIy9r7YHAqwgA9bYsCr+13ewGUQhg2jZFekH0e9wgyirAtPV6rMbolHlTuwUC2ASQgk56+tTvgsCjukGE+8BVp74dAigEMHW3hr4l+AYIQBNAVoWK3xP8JgT4hQRQB4CK4N9DAKQKPHvDJtUYvtLZJgRMALO3bNP8ic+QLEvvJICJpQCqnvj3qAd+tVRw8stif/XNIAQwf8M+vyv2lzIrwASg838yKPQCF/tLzDMsNLPfjRIi37edBIFmH3EpSBgAnKv9uKFHt4Alp3blbDT4azf3IBDAAYBrAWvOa/Ed53xt+1I9u8VS9Wu3mCwHAFwLWNO5g32CyMsBAFYBis5ssw90jLuqZudZDAtYtUJB7wKAohJAWSv3cADoagRAqC82ZzKFA4CQASCoFrCudxv5KJHWAgCqBSxsV6dvAgCsAhQ27ZE3AQBVASrbdvGbAECYBFDauO9NAEAtApS27nwTAATTAtZ27nSWcpYCAKgC1LbvfhEAQBWguHGrs5anC60GgZaBi6/weBEAMBWgunPzewDAkEWA+t7tPhVfaEcIpgLU397wGgBAKgDA5Q1vAQCkAiDcW/0WACBWgQRgX63TBK4DAEAFEIST6m8BAKACXPVn+dgAeIUCEEavGmcpeBkAoCnAZfvK2W/lXA1cBQBoCiAwJ6vkHQAAUwDF6Van7wCAIinAXffi6W9F7wAAAa0EC9ThWueC/iIAYCAFUKiOtd6THYsAAEcBms3rdQPgyQrQbstG5S8kzqkFCACUJNB0d8Xc8fMGcA0AgCSBtq6Mc5FJrwAARBnQenXN1Ddzn+6lFQBwNvTTFcDemp/XBgDgtnCAJLDnEkuphaU+DwDlSWDfNbYz383N4EsAoDgJ7L7FmBfixhUAUKsAAzfZz0OnuPlnBQBIHcuyDHXb5HW4cQUAlCWBpmtrqdIG+tOjRQEgM6Jvmvxc2bYmQBwXAECBBWBj9A/i872BkyggID1aAACTLYA5+D/jXHiFkd8CrNAncGIS2BP87+n/+ZTZwABuXKFT6BQL8NlWvbO/vt4Q8ZxpFKAACwCAL641oa9+9+yP/NfdCv0Xq8j9G/Ia3LhAs2hp3nDzfb1RDxz4+yaF4Us1/hhoqqGAiF0SC9wX0BOi/12I8eP5N9I/nv+uzjicD0kbo1yhAN2/+jAATHrU8o4Vd4X0/yj+lkCGCz+xTaakQBvleQAQtPCfjnHFqnBI53T8HWEEzv5lFHBOjequBG8A3IWfu3LV6Rbwm6Ie1SqYVwj/VTikaGBINgDitf+eXKdfGSKet10IAIps/ZovqoXSaMMAPAAInfuLKEBssOX+t6atAGOmSqb6QIp5e/i1IF4k+le1gCwfyEHfAL8WJLW2j/3vmiMCGoRj+KUACVi5GQp+XzZ9Q8sEQoznH7REd4CBvRrzg39NAVJPANcYWOm2gO+NG9lAEM8Wk/OXQ3JGf+aGtA4AfgeC5gGB4wMTb6sljOAWuzn4DyD83NQTCQZJoOZwEYgray4MgL/BIPrfhqDWjiH93CnEEj5djxk+UOKczkMAcAGJkye7DiYzRCDQ7h5PBUDZWhjli0BubURfDgCvCeYEb2kgAO060ZJngjYALnwgJRMAfww1MjjWywLT7ZQkgCp0Yt3gK4IG3gWAjMWw5Iuk9P6Ps24A+ABAOSGKEoH25kN2ScG7koCcPJgz7bVp76EDAxsAARwoef7avPt41A5sAESIoKbJa8/m4yEM6MsAICkTlbNmV+/xg34MyMsAkLQpMutKUeqPWScGeAMgRAUpZX4N7jvtwcDbAJCzHHbdW5bjYWX6k9a84G0eMMcFStIA+zaef26o2gCw2GrvcpAmueyAoydNMXgfAML3hEiazdaQiN2LgbwOAMEu0FCK5zoC+PmXromANwBcAJBEn0WhinLhCN4HgEgXyJlOO+Hc0QkINgAco6Cp5VbKKdz+HwTv84BxLjD5VilNPHPyubv+vQCIMQGd+zA44C1jPfunMaTXLQVdDS0H0EgsAuacO+UXWoAIEzCw/YIiAPbKcE0BQBe1ju3C6yPbXbWb6wJ7hnZ0E6a6f2MTAIALNLA/uVOBWYeOtwb0Ti5L+PnDjYBZbQc2ADrX2MlG9OxMBeY1HnnpM3YBt8n7yW2SSDacbQcIaAJM4f/VjkU8ySBtB4hXCtLOgq+OpwKyHSCcCTAVfv7fjYlGEXBhIHbQkgGgzvD/2VyaR9eFaDtArFKQreyr1pnciqVsB1jkAtkRfmJzKBsImNBvZD92E2Bc9JFO48hbAAABIKPhv75boB8BWwBgTID5ZI10G7rrgtAWABQTYF7xlZGU7nJO0y4BQJgAc/h14IKWGwRsAYCoBJjDb6nsS8fuAN5ndwBMgNjv5hn9oSsEbAGoNQFHT/jt81KtCNDtAKsTQXtbhZ4Le40I2AJQDoAjI/x3P6VbAKBMQKD360fAFgAAExDo/Yy/JQ08bgEA0wCSYLTJ7X+wBQALADQ8IaWBANoCgG8CSFJ+Ta4NwBYAIBNAkoU32QKArwEkiYxzUX3aawDJj84M/0f/mcJtAEA0gGQ64rYATAEATQ1/JwK2AECYAIo14roFYKlEkLgAczsDRDEByjWsswUAQQNIefpv7oNgMIkgSQnqtgHA0ABKFWBD8rEzwEoN0Ozp10TANgB1GkAygX1bCNgCUKUBOmno7xGwM8CJAKAJvr8TAdsAlJgA5TLkbQNQ+Mg85TciYBuA2SaAtGTMeXcCwMgDykb8FAHbALy7CrENwLsRsOP/cgRsA/g+C7IN4EbANoAbAdsAbATs+L/2kW0ANwK2AXz1w4+L/z8CDADebzi4XHs84QAAAABJRU5ErkJggg=="},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(5),a=n.n(o),s=n(2),u=n.n(s),l=n(3),c=n.n(l),f=n(1),h=n.n(f),p=n(4),d=n.n(p),_=n(368),v=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),y=p.Math.Vector2,g=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||h()(t)).call.apply(e,[this].concat(r)));o._lastBlurRadius=o._options.blurRadius,o._lastControlPoint1=o._options.controlPoint1.clone(),o._lastControlPoint2=o._options.controlPoint2.clone();var a={blurQuality:{type:p.OptionType.STRING}};return o._horizontalFilter=new _.a({},a),o._verticalFilter=new _.a({},a),o._sprite.setFilters([o._horizontalFilter,o._verticalFilter]),o._horizontalFilter.setDelta(new y(.5,.5)),o._verticalFilter.setDelta(new y(-.5,.5)),o._filter=new _.a({},a),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=c()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(u.a?u()(e,t):e.__proto__=t)}(t,p.Operation),v(t,[{key:"rotate",value:function(e){var t=this._options.controlPoint1,n=this._options.controlPoint2;90===e?(t.flip(),t.x=1-t.x,n.flip(),n.x=1-n.x):-90===e&&(t.flip(),t.y=1-t.y,n.flip(),n.y=1-n.y),this.set({controlPoint1:t,controlPoint2:n})}},{key:"flip",value:function(e){var t=this._options.controlPoint1,n=this._options.controlPoint2;switch(e){case"horizontal":t.x=1-t.x,n.x=1-n.x;break;case"vertical":t.y=1-t.y,n.y=1-n.y}this.set({controlPoint1:t,controlPoint2:n})}},{key:"transform",value:function(e){var t=this,n={};["controlPoint1","controlPoint2"].forEach(function(r){var i=t.getOption(r);n[r]=e.applyToRelativePoint(i)}),["blurRadius"].forEach(function(r){var i=t.getOption(r);n[r]=e.applyToRelativeSize(i)}),this.set(n,!1)}},{key:"_renderWebGL",value:function(e){return this._renderBlur(e)}},{key:"_renderCanvas",value:function(e){return this._options.highQualityCanvasBlur?this._renderBlur(e):this._renderLQCanvasBlur(e)}},{key:"_renderBlur",value:function(e){var t=e.getDimensions(),n=t.min(),r=this._options,i=r.blurRadius,o=r.controlPoint1,a=r.controlPoint2,s={blurRadius:i*n,controlPoint1:o.clone(),controlPoint2:a.clone(),texSize:t,blurQuality:"high"};return this._horizontalFilter.set(s),this._verticalFilter.set(s),this._renderTexture.render(this._container),p.Promise.resolve()}},{key:"_renderLQCanvasBlur",value:function(e){var t=e.getDimensions(),n=this._options,r=n.blurRadius,i=n.controlPoint1,o=n.controlPoint2;return this._filter.set({blurRadius:r,controlPoint1:i.clone(),controlPoint2:o.clone(),texSize:t,blurQuality:"low"}),this._sprite.setFilters([this._filter]),this._renderTexture.render(this._container),p.Promise.resolve()}},{key:"dispose",value:function(){(function e(t,n,r){null===t&&(t=Function.prototype);var i=a()(t,n);if(void 0===i){var o=h()(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0})(t.prototype.__proto__||h()(t.prototype),"dispose",this).call(this),this._filter.dispose(),this._verticalFilter.dispose(),this._horizontalFilter.dispose()}},{key:"hasChanges",value:function(){return!0}}]),t}();g.identifier="linear-focus",g.prototype.availableOptions={controlPoint1:{type:p.OptionType.VECTOR2,default:new y(0,.5)},controlPoint2:{type:p.OptionType.VECTOR2,default:new y(1,.5)},blurRadius:{type:p.OptionType.NUMBER,default:.025},highQualityCanvasBlur:{type:p.OptionType.BOOLEAN,default:!1}},d.a.Operations.LinearFocusOperation=g,t.a=g},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(5),a=n.n(o),s=n(2),u=n.n(s),l=n(3),c=n.n(l),f=n(1),h=n.n(f),p=n(4),d=(n.n(p),n(82)),_=n.n(d),v=n(66),y=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),g=p.Math.Vector2,m=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var r=arguments.length,i=Array(r),o=0;o<r;o++)i[o]=arguments[o];var a=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||h()(t)).call.apply(e,[this].concat(i)));return a._fragmentSource=n(369),a._lastBlurRadius=null,a._lastControlPoint1=new g,a._lastControlPoint2=new g,a._blurFilter=new v.a,a._blurredRenderTarget=new p.Engine.CanvasRenderTarget(100,100,1),a._maskRenderTarget=new p.Engine.CanvasRenderTarget(100,100,1),a}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=c()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(u.a?u()(e,t):e.__proto__=t)}(t,p.Engine.Filter),y(t,[{key:"_applyCanvas",value:function(e,t,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("low"!==this._options.blurQuality){var o=t.getDimensions(),a=!n.getDimensions().equals(o);if(t.getBaseTexture().isDirty()||this._lastBlurRadius!==this._options.blurRadius||a){var s=new g(this._options.delta.x,this._options.delta.y);this._blurFilter.setDelta(s);var u={blurRadius:this._options.blurRadius,texSize:o},l=function(e,t,n){return Math.min(Math.max(e,t),n)},c=this._options.controlPoint2.clone().subtract(this._options.controlPoint1.clone()),f=this._options.blurRadius;this._blurFilter.set(u),this._blurFilter._applyCanvas(e,t,n,i,function(e,t){return function(e,t,n){var r=l((n-0)/1,0,1);return r*r*(3-2*r)}(0,0,Math.abs(l(new g(e,t).subtract(r._options.controlPoint1).dot(c)/c.dot(c),0,1)))*f}),this._lastBlurRadius=this._options.blurRadius}}else this._renderLQBlur(e,t,n,i)}},{key:"_renderLQBlur",value:function(e,t,n){arguments.length>3&&void 0!==arguments[3]&&arguments[3];var r=t.getDimensions(),i=!this._blurredRenderTarget.getDimensions().equals(r);this._blurredRenderTarget.setPixelRatio(t.getPixelRatio()),this._blurredRenderTarget.resizeTo(t.getDimensions()),this._maskRenderTarget.setPixelRatio(t.getPixelRatio()),this._maskRenderTarget.resizeTo(t.getDimensions());var o=!this._lastControlPoint1.equals(this._options.controlPoint1)||!this._lastControlPoint2.equals(this._options.controlPoint2)||i,a=t.getBaseTexture().isDirty()||this._lastBlurRadius!==this._options.blurRadius||i;o&&(this._renderMask(),this._lastControlPoint1=this._options.controlPoint1.clone(),this._lastControlPoint2=this._options.controlPoint2.clone()),a&&(this._blurImage(t),this._lastBlurRadius=this._options.blurRadius),this._applyMask(t,n)}},{key:"_blurImage",value:function(e){var t=e.getCanvas(),n=e.getContext(),r=new g(t.width,t.height),i=n.getImageData(0,0,t.width,t.height);_.a.stackBlurCanvasRGBA(i,0,0,t.width,t.height,this._options.blurRadius*r.min()),this._blurredRenderTarget.getContext().putImageData(i,0,0)}},{key:"_renderMask",value:function(){var e=this._maskRenderTarget.getCanvas(),t=this._maskRenderTarget.getContext(),n=new g(e.width,e.height),r=this._options.controlPoint1.clone().multiply(n),i=this._options.controlPoint2.clone().multiply(n),o=t.createLinearGradient(r.x,r.y,i.x,i.y);o.addColorStop(0,"#FFFFFF"),o.addColorStop(1,"#000000"),t.fillStyle=o,t.fillRect(0,0,e.width,e.height)}},{key:"_applyMask",value:function(e,t){for(var n=t.getContext(),r=e.getCanvas(),i=e.getContext(),o=this._blurredRenderTarget.getContext(),a=this._maskRenderTarget.getContext(),s=i.getImageData(0,0,r.width,r.height),u=s.data,l=o.getImageData(0,0,r.width,r.height).data,c=a.getImageData(0,0,r.width,r.height).data,f=void 0,h=0;h<r.width*r.height*4;h+=4)f=c[h]/255,u[h]=f*u[h]+(1-f)*l[h],u[h+1]=f*u[h+1]+(1-f)*l[h+1],u[h+2]=f*u[h+2]+(1-f)*l[h+2];n.putImageData(s,0,0)}},{key:"dispose",value:function(){(function e(t,n,r){null===t&&(t=Function.prototype);var i=a()(t,n);if(void 0===i){var o=h()(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0})(t.prototype.__proto__||h()(t.prototype),"dispose",this).call(this),this._blurFilter.dispose()}}]),t}();m.prototype.availableOptions={blurRadius:{type:p.OptionType.NUMBER,default:30,uniformType:p.UniformType.FLOAT},controlPoint1:{type:p.OptionType.VECTOR2,default:new g(0,.5),uniformType:p.UniformType.FLOAT2},controlPoint2:{type:p.OptionType.VECTOR2,default:new g(1,.5),uniformType:p.UniformType.FLOAT2},delta:{type:p.OptionType.VECTOR2,default:new g(1,1),uniformType:p.UniformType.FLOAT2},texSize:{type:p.OptionType.VECTOR2,default:new g(100,100),uniformType:p.UniformType.FLOAT2}},t.a=m},function(e,t){e.exports="/*!\n * Based on evanw's glfx.js tilt shift shader:\n * https://github.com/evanw/glfx.js/blob/master/src/filters/blur/tiltshift.js\n */\n\nuniform sampler2D u_image;\nuniform float u_blurRadius;\nuniform vec2 u_controlPoint1;\nuniform vec2 u_controlPoint2;\nuniform vec2 u_delta;\nuniform vec2 u_texSize;\nvarying vec2 v_texCoord;\n\nfloat random(vec2 co)\n{\n highp float a = 12.9898;\n highp float b = 78.233;\n highp float c = 43758.5453;\n highp float dt = dot(co.xy,vec2(a,b));\n highp float sn = mod(dt, 3.14);\n return fract(sin(sn) * c);\n}\n\nvoid main() {\n vec4 color = vec4(0.0);\n float total = 0.0;\n\n vec2 vector = u_controlPoint2 - u_controlPoint1;\n float offset = random(gl_FragCoord.xy / u_texSize.xy);\n\n float radius = smoothstep(0.0, 1.0,\n abs(\n clamp(dot(v_texCoord - u_controlPoint1, vector) / dot(vector, vector), 0.0, 1.0)\n )\n ) * u_blurRadius;\n\n for (float t = -30.0; t <= 30.0; t++) {\n float percent = (t + offset - 0.5) / 30.0;\n float weight = 1.0 - abs(percent);\n vec4 _sample = texture2D(u_image, v_texCoord + u_delta * percent * radius / u_texSize);\n\n color += _sample * weight;\n total += weight;\n }\n\n gl_FragColor = color / total;\n}\n"},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(5),a=n.n(o),s=n(2),u=n.n(s),l=n(3),c=n.n(l),f=n(1),h=n.n(f),p=n(4),d=n.n(p),_=n(371),v=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),y=p.Math.Vector2,g=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||h()(t)).call.apply(e,[this].concat(r)));o._lastBlurRadius=o._options.blurRadius,o._lastSize=o._options.size,o._lastGradientSize=o._options.gradientSize;var a={blurQuality:{type:p.OptionType.STRING}};return o._horizontalFilter=new _.a({},a),o._verticalFilter=new _.a({},a),o._sprite.setFilters([o._horizontalFilter,o._verticalFilter]),o._horizontalFilter.setDelta(new y(.5,.5)),o._verticalFilter.setDelta(new y(-.5,.5)),o._filter=new _.a({},a),o._renderBlur.bind(o),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=c()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(u.a?u()(e,t):e.__proto__=t)}(t,p.Operation),v(t,[{key:"rotate",value:function(e){var t=this._options.start,n=this._options.end;90===e?(t.flip(),t.x=1-t.x,n.flip(),n.x=1-n.x):-90===e&&(t.flip(),t.y=1-t.y,n.flip(),n.y=1-n.y),this.set({start:t,end:n})}},{key:"flip",value:function(e){var t=this._options.start,n=this._options.end;switch(e){case"horizontal":t.x=1-t.x,n.x=1-n.x;break;case"vertical":t.y=1-t.y,n.y=1-n.y}this.set({start:t,end:n})}},{key:"transform",value:function(e){var t=this,n={};["start","end"].forEach(function(r){var i=t.getOption(r);n[r]=e.applyToRelativePoint(i)}),["blurRadius","size","gradientSize"].forEach(function(r){var i=t.getOption(r);n[r]=e.applyToRelativeSize(i)}),this.set(n,!1)}},{key:"_renderWebGL",value:function(e){return this._renderBlur(e)}},{key:"_renderCanvas",value:function(e){return this._options.highQualityCanvasBlur?this._renderBlur(e):this._renderLQCanvasBlur(e)}},{key:"_renderBlur",value:function(e){var t=e.getDimensions(),n=t.min(),r=this._options.start.clone(),i=this._options.end.clone(),o=this._options,a={blurRadius:o.blurRadius*n,size:o.size*n,gradientSize:o.gradientSize*n,start:r.clone().multiply(t),end:i.clone().multiply(t),texSize:t,blurQuality:"high"};return this._horizontalFilter.set(a),this._verticalFilter.set(a),this._renderTexture.render(this._container),p.Promise.resolve()}},{key:"_renderLQCanvasBlur",value:function(e){var t=e.getDimensions(),n=this._options,r=n.blurRadius,i=n.size,o=n.gradientSize,a=n.start,s=n.end;return this._filter.set({blurRadius:r,gradientSize:o,size:i,start:a.clone(),end:s.clone(),texSize:t,blurQuality:"low"}),this._sprite.setFilters([this._filter]),this._renderTexture.render(this._container),p.Promise.resolve()}},{key:"dispose",value:function(){(function e(t,n,r){null===t&&(t=Function.prototype);var i=a()(t,n);if(void 0===i){var o=h()(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0})(t.prototype.__proto__||h()(t.prototype),"dispose",this).call(this),this._filter.dispose(),this._verticalFilter.dispose(),this._horizontalFilter.dispose()}},{key:"hasChanges",value:function(){return!0}}]),t}();g.identifier="mirrored-focus",g.prototype.availableOptions={start:{type:p.OptionType.VECTOR2,default:new y(0,.5)},end:{type:p.OptionType.VECTOR2,default:new y(1,.5)},blurRadius:{type:p.OptionType.NUMBER,default:.025},size:{type:p.OptionType.NUMBER,default:.1},gradientSize:{type:p.OptionType.NUMBER,default:.1},highQualityCanvasBlur:{type:p.OptionType.BOOLEAN,default:!1}},d.a.Operations.MirroredFocusOperation=g,t.a=g},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(5),a=n.n(o),s=n(2),u=n.n(s),l=n(3),c=n.n(l),f=n(1),h=n.n(f),p=n(4),d=(n.n(p),n(82)),_=n.n(d),v=n(66),y=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),g=p.Math.Vector2,m=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var r=arguments.length,i=Array(r),o=0;o<r;o++)i[o]=arguments[o];var a=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||h()(t)).call.apply(e,[this].concat(i)));return a._fragmentSource=n(372),a._lastBlurRadius=null,a._lastGradientRadius=null,a._lastStart=new g,a._lastEnd=new g,a._blurFilter=new v.a,a._blurredRenderTarget=new p.Engine.CanvasRenderTarget(100,100,1),a._maskRenderTarget=new p.Engine.CanvasRenderTarget(100,100,1),a}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=c()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(u.a?u()(e,t):e.__proto__=t)}(t,p.Engine.Filter),y(t,[{key:"_applyCanvas",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("low"!==this._options.blurQuality){var i=t.getDimensions(),o=!n.getDimensions().equals(i);if(t.getBaseTexture().isDirty()||this._lastBlurRadius!==this._options.blurRadius||o){var a=new g(this._options.delta.x,this._options.delta.y);this._blurFilter.setDelta(a);var s={blurRadius:this._options.blurRadius,texSize:i},u=function(e,t,n){var r=function(e,t,n){return Math.min(Math.max(e,0),1)}((n-e)/(t-e));return r*r*(3-2*r)},l=this._options,c=l.blurRadius,f=l.gradientSize,h=l.size,p=l.start,d=l.end,_=l.texSize,v=new g(p.y-d.y,d.x-p.x);v.divide(v.len()),this._blurFilter.set(s),this._blurFilter._applyCanvas(e,t,n,r,function(e,t){return u(0,1,(Math.abs(_.clone().multiply(e,t).subtract(p).dot(v))-h)/f)*c}),this._lastBlurRadius=this._options.blurRadius}}else this._renderLQBlur(e,t,n,r)}},{key:"_renderLQBlur",value:function(e,t,n){arguments.length>3&&void 0!==arguments[3]&&arguments[3];var r=t.getDimensions(),i=!this._blurredRenderTarget.getDimensions().equals(r);this._blurredRenderTarget.setPixelRatio(t.getPixelRatio()),this._blurredRenderTarget.resizeTo(t.getDimensions()),this._maskRenderTarget.setPixelRatio(t.getPixelRatio()),this._maskRenderTarget.resizeTo(t.getDimensions());var o=!this._lastStart.equals(this._options.start)||!this._lastEnd.equals(this._options.end)||this._lastGradientRadius!==this._options.size||i,a=t.getBaseTexture().isDirty()||this._lastBlurRadius!==this._options.blurRadius||i;o&&(this._renderMask(),this._lastStart=this._options.start.clone(),this._lastEnd=this._options.end.clone(),this._lastGradientRadius=this._options.size),a&&(this._blurImage(t),this._lastBlurRadius=this._options.blurRadius),this._applyMask(t,n)}},{key:"_blurImage",value:function(e){var t=e.getCanvas(),n=e.getContext(),r=new g(t.width,t.height),i=n.getImageData(0,0,t.width,t.height);_.a.stackBlurCanvasRGBA(i,0,0,t.width,t.height,this._options.blurRadius*r.min()),this._blurredRenderTarget.getContext().putImageData(i,0,0)}},{key:"_renderMask",value:function(){var e=this._maskRenderTarget.getCanvas(),t=this._maskRenderTarget.getContext(),n=this._maskRenderTarget.getPixelRatio(),r=new g(e.width,e.height),i=this._options.size*r.min()*n,o=this._options.gradientSize*r.min()*n,a=this._options.start.clone().multiply(r),s=this._options.end.clone().multiply(r).clone().subtract(a),u=a.clone().add(s.clone().divide(2)),l=s.len(),c=s.clone().divide(l),f=u.clone().add((i+o)*c.y,-(i+o)*c.x),h=u.clone().add(-(i+o)*c.y,(i+o)*c.x),p=t.createLinearGradient(f.x,f.y,h.x,h.y),d=h.clone().subtract(f).len();p.addColorStop(0,"#000000"),p.addColorStop(o/2/d,"#FFFFFF"),p.addColorStop(1-o/2/d,"#FFFFFF"),p.addColorStop(1,"#000000"),t.fillStyle=p,t.fillRect(0,0,e.width,e.height)}},{key:"_applyMask",value:function(e,t){for(var n=t.getContext(),r=e.getCanvas(),i=e.getContext(),o=this._blurredRenderTarget.getContext(),a=this._maskRenderTarget.getContext(),s=i.getImageData(0,0,r.width,r.height),u=s.data,l=o.getImageData(0,0,r.width,r.height).data,c=a.getImageData(0,0,r.width,r.height).data,f=void 0,h=0;h<r.width*r.height*4;h+=4)f=c[h]/255,u[h]=f*u[h]+(1-f)*l[h],u[h+1]=f*u[h+1]+(1-f)*l[h+1],u[h+2]=f*u[h+2]+(1-f)*l[h+2];n.putImageData(s,0,0)}},{key:"dispose",value:function(){(function e(t,n,r){null===t&&(t=Function.prototype);var i=a()(t,n);if(void 0===i){var o=h()(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0})(t.prototype.__proto__||h()(t.prototype),"dispose",this).call(this),this._blurFilter.dispose()}}]),t}();m.prototype.availableOptions={blurRadius:{type:p.OptionType.NUMBER,default:30,uniformType:p.UniformType.FLOAT},size:{type:p.OptionType.NUMBER,default:50,uniformType:p.UniformType.FLOAT},gradientSize:{type:p.OptionType.NUMBER,default:50,uniformType:p.UniformType.FLOAT},start:{type:p.OptionType.VECTOR2,default:new g(0,.5),uniformType:p.UniformType.FLOAT2},end:{type:p.OptionType.VECTOR2,default:new g(1,.5),uniformType:p.UniformType.FLOAT2},delta:{type:p.OptionType.VECTOR2,default:new g(1,1),uniformType:p.UniformType.FLOAT2},texSize:{type:p.OptionType.VECTOR2,default:new g(100,100),uniformType:p.UniformType.FLOAT2}},t.a=m},function(e,t){e.exports="/*\n * Based on evanw's glfx.js tilt shift shader:\n * https://github.com/evanw/glfx.js/blob/master/src/filters/blur/tiltshift.js\n * @license\n */\n\nuniform sampler2D u_image;\nuniform float u_blurRadius;\nuniform float u_gradientSize;\nuniform float u_size;\nuniform vec2 u_start;\nuniform vec2 u_end;\nuniform vec2 u_delta;\nuniform vec2 u_texSize;\nvarying vec2 v_texCoord;\n\nfloat random(vec2 co)\n{\n highp float a = 12.9898;\n highp float b = 78.233;\n highp float c = 43758.5453;\n highp float dt = dot(co.xy,vec2(a,b));\n highp float sn = mod(dt, 3.14);\n return fract(sin(sn) * c);\n}\n\nvoid main() {\n vec4 color = vec4(0.0);\n float total = 0.0;\n\n float offset = random(gl_FragCoord.xy / u_texSize.xy);\n\n vec2 normal = normalize(vec2(u_start.y - u_end.y, u_end.x - u_start.x));\n float radius = smoothstep(0.0, 1.0,\n (abs(\n dot(v_texCoord * u_texSize - u_start, normal)\n ) - u_size) / u_gradientSize\n ) * u_blurRadius;\n\n for (float t = -30.0; t <= 30.0; t++) {\n float percent = (t + offset - 0.5) / 30.0;\n float weight = 1.0 - abs(percent);\n vec4 _sample = texture2D(u_image, v_texCoord + u_delta * percent * radius / u_texSize);\n\n color += _sample * weight;\n total += weight;\n }\n\n gl_FragColor = color / total;\n}\n"},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(2),a=n.n(o),s=n(3),u=n.n(s),l=n(1),c=n.n(l),f=n(4),h=n.n(f),p=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),d=f.Math.Vector2,_=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||c()(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=u()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(a.a?a()(e,t):e.__proto__=t)}(t,f.Operation),p(t,[{key:"_render",value:function(e){var t=this._options.rotation%360,n=t*(Math.PI/180),r=90===t||270===t,i=this._options.flipHorizontally!==this._options.flipVertically,o=r&&i?!this._options.flipVertically:this._options.flipVertically,a=r&&i?!this._options.flipHorizontally:this._options.flipHorizontally;this._sprite.setScale(a?-1:1,o?-1:1),this._sprite.setRotation(n),this._sprite.setAnchor(.5,.5),this._sprite.updateTransform();var s=this._sprite.getBounds();return this._renderTexture.resizeTo(new d(s.width,s.height)),this._sprite.setPosition(this._renderTexture.getDimensions().divide(2).round()),this._renderTexture.render(this._container),f.Promise.resolve()}},{key:"getNewDimensions",value:function(e){return e=e.clone(),this._options.rotation%180&&e.flip(),e}},{key:"flip",value:function(e){var t=this._options.rotation;switch(90!==t&&270!==t||(e="vertical"===e?"horizontal":"vertical"),e){case"vertical":this.setFlipVertically(!this.getFlipVertically());break;case"horizontal":this.setFlipHorizontally(!this.getFlipHorizontally())}}}]),t}();_.identifier="orientation",_.prototype.availableOptions={rotation:{type:f.OptionType.NUMBER,default:0,validation:function(e){if(e%90!=0)throw new Error("OrientationOperation: `rotation` has to be a multiple of 90.")},setter:function(e){return(e+360)%360}},flipVertically:{type:f.OptionType.BOOLEAN,default:!1},flipHorizontally:{type:f.OptionType.BOOLEAN,default:!1}},h.a.Operations.OrientationOperation=_,t.a=_},function(e,t,n){"use strict";var r=n(47),i=n.n(r),o=n(0),a=n.n(o),s=n(5),u=n.n(s),l=n(2),c=n.n(l),f=n(3),h=n.n(f),p=n(1),d=n.n(p),_=n(4),v=n.n(_),y=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),a()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),g=function e(t,n,r){null===t&&(t=Function.prototype);var i=u()(t,n);if(void 0===i){var o=d()(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},m=_.Engine.Filters.OverlayFilter,b=_.Math.Vector2,w=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||d()(t)).call.apply(e,[this].concat(r)));return o._overlayTexture=_.Engine.Texture.fromImage(o._options.image),o._overlayContainer=new _.Engine.Container,o._overlaySprite=new _.Engine.Sprite,o._overlaySprite.setTexture(o._overlayTexture),o._overlaySprite.setAnchor(0,0),o._overlayContainer.addChild(o._overlaySprite),o._overlayFilter=new _.Engine.Filters.OverlayFilter({overlayImage:o._overlayTexture.getBaseTexture().getGLUnit(),overlayTexture:o._overlayTexture}),o._sprite.setFilters([o._overlayFilter]),o._renderedOverlaySprite=new _.Engine.Sprite,o._renderedOverlayContainer=new _.Engine.Container,o._renderedOverlayContainer.addChild(o._renderedOverlaySprite),o._overlayRendered=!1,o._lastInputDimensions=new b(0,0),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=h()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(c.a?c()(e,t):e.__proto__=t)}(t,_.Operation),y(t,[{key:"setOption",value:function(e,n){if(g(t.prototype.__proto__||d()(t.prototype),"setOption",this).call(this,e,n),"image"===e&&n&&this._sdk){var r=this._sdk.getRenderer(),i=this._overlayTexture.getBaseTexture();i.setSource(n),r.isOfType(_.RendererType.WEBGL)&&r.updateTexture(i),this._overlayRendered=!1}}},{key:"_render",value:function(e){var t=e.getDimensions(),n=this._options,r=n.image,i=n.alpha,o=n.blendMode;return r?(this._overlayRendered&&this._lastInputDimensions.equals(t)||(this._renderOverlayToRenderTexture(e),this._overlayRendered=!0,this._lastInputDimensions.copy(t)),this._overlayFilter.set({blendMode:o,overlayImage:this._overlayRenderTexture.getBaseTexture().getGLUnit(),overlayTexture:this._overlayRenderTexture,alpha:i}),this._sprite.setFilters([this._overlayFilter]),this._renderTexture.render(this._container),_.Promise.resolve()):(this._sprite.setFilters([]),this._renderTexture.render(this._container),_.Promise.resolve())}},{key:"_renderOverlayToRenderTexture",value:function(e){var t=this._sdk.getRenderer(),n=e.getDimensions();this._overlayRenderTexture||(this._overlayRenderTexture=new _.Engine.RenderTexture(t,n.x,n.y),this._renderedOverlaySprite.setTexture(this._overlayRenderTexture));var r=this._options.image,i=r.width,o=r.height,a=_.Utils.resizeVectorToFill(new b(i,o),n);this._overlaySprite.setWidth(a.x),this._overlaySprite.setHeight(a.y);var s=this._overlayRenderTexture.getBaseTexture();t.isOfType(_.RendererType.WEBGL)&&(s.setGLUnit(4),t.updateTexture(s,!1)),this._overlayRenderTexture.resizeTo(n),this._overlayRenderTexture.render(this._overlayContainer)}},{key:"dispose",value:function(){g(t.prototype.__proto__||d()(t.prototype),"dispose",this).call(this),this._overlaySprite.dispose()}}]),t}();w.identifier="overlay",w.BLEND_MODES=m.BLEND_MODES,w.prototype.availableOptions={identifier:{type:_.OptionType.STRING},image:{type:_.OptionType.IMAGE},blendMode:{type:_.OptionType.NUMBER,default:m.BLEND_MODES.MULTIPLY,available:i()(m.BLEND_MODES).map(function(e){return m.BLEND_MODES[e]})},alpha:{type:_.OptionType.NUMBER,default:1}},v.a.Operations.OverlayOperation=w,t.a=w},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(5),a=n.n(o),s=n(2),u=n.n(s),l=n(3),c=n.n(l),f=n(1),h=n.n(f),p=n(4),d=n.n(p),_=n(376),v=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),y=p.Math.Vector2,g=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||h()(t)).call.apply(e,[this].concat(r)));o._lastBlurRadius=o._options.blurRadius,o._lastGradientRadius=o._options.gradientRadius;var a={blurQuality:{type:p.OptionType.STRING}};return o._horizontalFilter=new _.a({},a),o._verticalFilter=new _.a({},a),o._sprite.setFilters([o._horizontalFilter,o._verticalFilter]),o._horizontalFilter.setDelta(new y(.5,.5)),o._verticalFilter.setDelta(new y(-.5,.5)),o._filter=new _.a({},a),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=c()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(u.a?u()(e,t):e.__proto__=t)}(t,p.Operation),v(t,[{key:"rotate",value:function(e){var t=this._options.position;90===e?(t.flip(),t.x=1-t.x):-90===e&&(t.flip(),t.y=1-t.y),this.set({position:t})}},{key:"flip",value:function(e){var t=this._options.position;switch(e){case"horizontal":t.x=1-t.x;break;case"vertical":t.y=1-t.y}this.set({position:t})}},{key:"transform",value:function(e){var t=this,n={},r=this.getPosition();n.position=e.applyToRelativePoint(r),["radius","blurRadius","gradientRadius"].forEach(function(r){var i=t.getOption(r);n[r]=e.applyToRelativeSize(i)}),this.set(n,!1)}},{key:"_renderWebGL",value:function(e){return this._renderBlur(e)}},{key:"_renderCanvas",value:function(e){return this._options.highQualityCanvasBlur?this._renderBlur(e):this._renderLQCanvasBlur(e)}},{key:"_renderBlur",value:function(e){var t=e.getDimensions(),n=t.min(),r=this._options,i=r.position,o={blurRadius:r.blurRadius*n,radius:r.radius*n,gradientRadius:r.gradientRadius*n,position:i.clone().multiply(t),texSize:t,blurQuality:"high"};return this._horizontalFilter.set(o),this._verticalFilter.set(o),this._renderTexture.render(this._container),p.Promise.resolve()}},{key:"_renderLQCanvasBlur",value:function(e){var t=this._options,n=t.blurRadius,r=t.radius,i=t.gradientRadius,o=t.position,a=e.getDimensions();return this._filter.set({blurRadius:n,radius:r,gradientRadius:i,position:o,texSize:a,blurQuality:"low"}),this._sprite.setFilters([this._filter]),this._renderTexture.render(this._container),p.Promise.resolve()}},{key:"dispose",value:function(){(function e(t,n,r){null===t&&(t=Function.prototype);var i=a()(t,n);if(void 0===i){var o=h()(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0})(t.prototype.__proto__||h()(t.prototype),"dispose",this).call(this),this._filter.dispose(),this._verticalFilter.dispose(),this._horizontalFilter.dispose()}},{key:"hasChanges",value:function(){return!0}}]),t}();g.identifier="radial-focus",g.prototype.availableOptions={position:{type:p.OptionType.VECTOR2,default:new y(.5,.5)},radius:{type:p.OptionType.NUMBER,default:.25},gradientRadius:{type:p.OptionType.NUMBER,default:.125},blurRadius:{type:p.OptionType.NUMBER,default:.025},highQualityCanvasBlur:{type:p.OptionType.BOOLEAN,default:!1}},d.a.Operations.RadialFocusOperation=g,t.a=g},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(5),a=n.n(o),s=n(2),u=n.n(s),l=n(3),c=n.n(l),f=n(1),h=n.n(f),p=n(4),d=(n.n(p),n(82)),_=n.n(d),v=n(66),y=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),g=p.Math.Vector2,m=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var r=arguments.length,i=Array(r),o=0;o<r;o++)i[o]=arguments[o];var a=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||h()(t)).call.apply(e,[this].concat(i)));return a._fragmentSource=n(377),a._lastBlurRadius=null,a._lastGradientRadius=null,a._lastPosition=new g,a._blurFilter=new v.a,a._blurredRenderTarget=new p.Engine.CanvasRenderTarget(100,100,1),a._maskRenderTarget=new p.Engine.CanvasRenderTarget(100,100,1),a}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=c()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(u.a?u()(e,t):e.__proto__=t)}(t,p.Engine.Filter),y(t,[{key:"_applyCanvas",value:function(e,t,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("low"!==this._options.blurQuality){var o=t.getDimensions(),a=!n.getDimensions().equals(o),s=this._options,u=s.blurRadius,l=s.position,c=s.texSize,f=s.gradientRadius;if(t.getBaseTexture().isDirty()||this._lastBlurRadius!==u||a){var h=new g(this._options.delta.x,this._options.delta.y);this._blurFilter.setDelta(h);var p={blurRadius:u,texSize:o},d=function(e,t,n){var r=function(e,t,n){return Math.min(Math.max(e,0),1)}((n-e)/(t-e));return r*r*(3-2*r)};this._blurFilter.set(p),this._blurFilter._applyCanvas(e,t,n,i,function(e,t){return d(0,1,(Math.abs(c.clone().multiply(e,t).subtract(l).len())-r._options.radius)/(2*f))*u}),this._lastBlurRadius=u}}else this._renderLQBlur(e,t,n,i)}},{key:"_renderLQBlur",value:function(e,t,n){arguments.length>3&&void 0!==arguments[3]&&arguments[3];var r=t.getDimensions(),i=!this._blurredRenderTarget.getDimensions().equals(r);this._blurredRenderTarget.setPixelRatio(t.getPixelRatio()),this._blurredRenderTarget.resizeTo(t.getDimensions()),this._maskRenderTarget.setPixelRatio(t.getPixelRatio()),this._maskRenderTarget.resizeTo(t.getDimensions());var o=!this._lastPosition.equals(this._options.position)||this._lastGradientRadius!==this._options.gradientRadius||i,a=t.getBaseTexture().isDirty()||this._lastBlurRadius!==this._options.blurRadius||i;o&&(this._renderMask(),this._lastPosition=this._options.position.clone(),this._lastGradientRadius=this._options.gradientRadius),a&&(this._blurImage(t),this._lastBlurRadius=this._options.blurRadius),this._applyMask(t,n)}},{key:"_blurImage",value:function(e){var t=e.getCanvas(),n=e.getContext(),r=new g(t.width,t.height),i=n.getImageData(0,0,t.width,t.height);_.a.stackBlurCanvasRGBA(i,0,0,t.width,t.height,this._options.blurRadius*r.min()),this._blurredRenderTarget.getContext().putImageData(i,0,0)}},{key:"_renderMask",value:function(){var e=this._maskRenderTarget.getCanvas(),t=this._maskRenderTarget.getContext(),n=new g(e.width,e.height),r=this._maskRenderTarget.getPixelRatio(),i=this._options.position.clone().multiply(n),o=this._options,a=o.radius,s=o.gradientRadius;a*=e.height,s*=e.height;var u=t.createRadialGradient(i.x,i.y,0,i.x,i.y,(a+s)*r);u.addColorStop(0,"#FFFFFF"),u.addColorStop(a/(a+s),"#FFFFFF"),u.addColorStop(1,"#000000"),t.fillStyle=u,t.fillRect(0,0,n.x,n.y)}},{key:"_applyMask",value:function(e,t){for(var n=t.getContext(),r=e.getCanvas(),i=e.getContext(),o=this._blurredRenderTarget.getContext(),a=this._maskRenderTarget.getContext(),s=i.getImageData(0,0,r.width,r.height),u=s.data,l=o.getImageData(0,0,r.width,r.height).data,c=a.getImageData(0,0,r.width,r.height).data,f=void 0,h=0;h<r.width*r.height*4;h+=4)f=c[h]/255,u[h]=f*u[h]+(1-f)*l[h],u[h+1]=f*u[h+1]+(1-f)*l[h+1],u[h+2]=f*u[h+2]+(1-f)*l[h+2];n.putImageData(s,0,0)}},{key:"dispose",value:function(){(function e(t,n,r){null===t&&(t=Function.prototype);var i=a()(t,n);if(void 0===i){var o=h()(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0})(t.prototype.__proto__||h()(t.prototype),"dispose",this).call(this),this._blurFilter.dispose()}}]),t}();m.prototype.availableOptions={blurRadius:{type:p.OptionType.NUMBER,default:30,uniformType:p.UniformType.FLOAT},radius:{type:p.OptionType.NUMBER,default:50,uniformType:p.UniformType.FLOAT},gradientRadius:{type:p.OptionType.NUMBER,default:25,uniformType:p.UniformType.FLOAT},position:{type:p.OptionType.VECTOR2,default:new g(.5,.5),uniformType:p.UniformType.FLOAT2},delta:{type:p.OptionType.VECTOR2,default:new g(1,1),uniformType:p.UniformType.FLOAT2},texSize:{type:p.OptionType.VECTOR2,default:new g(100,100),uniformType:p.UniformType.FLOAT2}},t.a=m},function(e,t){e.exports="/*\n * Based on evanw's glfx.js tilt shift shader:\n * https://github.com/evanw/glfx.js/blob/master/src/filters/blur/tiltshift.js\n * @license\n */\n\nuniform sampler2D u_image;\nuniform float u_radius;\nuniform float u_blurRadius;\nuniform float u_gradientRadius;\nuniform vec2 u_position;\nuniform vec2 u_delta;\nuniform vec2 u_texSize;\nvarying vec2 v_texCoord;\n\nconst float blurSteps = 30.0;\nconst float EPSILON = 0.000000001;\n\nfloat random(vec2 co)\n{\n highp float a = 12.9898;\n highp float b = 78.233;\n highp float c = 43758.5453;\n highp float dt = dot(co.xy,vec2(a,b));\n highp float sn = mod(dt, 3.14);\n return fract(sin(sn) * c);\n}\n\nvoid main() {\n vec4 color = vec4(0.0);\n float total = 0.0;\n\n vec2 coord = v_texCoord * u_texSize;\n vec2 diff = coord - u_position;\n float dist = sqrt(diff.x * diff.x + diff.y * diff.y);\n\n float blurPercentage = smoothstep( \n 0.0, 1.0,\n (abs(dist) - u_radius) / u_gradientRadius\n );\n\n float radius = blurPercentage * u_blurRadius;\n float offset = random(gl_FragCoord.xy / u_texSize.xy);\n\n for (float t = -blurSteps; t <= blurSteps; t++) {\n float percent = (t + offset - 0.5) / blurSteps;\n float weight = 1.0 - abs(percent);\n vec4 _sample = texture2D(u_image, v_texCoord + u_delta * percent * radius / u_texSize);\n\n color += _sample * weight;\n total += weight;\n }\n\n gl_FragColor = color / max(total, EPSILON);\n}\n"},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(5),a=n.n(o),s=n(2),u=n.n(s),l=n(3),c=n.n(l),f=n(1),h=n.n(f),p=n(4),d=n.n(p),_=n(165),v=n(66),y=n(382),g=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),m=function e(t,n,r){null===t&&(t=Function.prototype);var i=a()(t,n);if(void 0===i){var o=h()(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0},b=p.Math.Vector2,w=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||h()(t)).call.apply(e,[this].concat(r))),a=o._sdk.getRenderer();o._lastBlurRadius=null,o._blurredRenderTexture=new p.Engine.RenderTexture(a,100,100,1),o._maskRenderTexture=new p.Engine.RenderTexture(a,100,100,1),o._brushSprite=new _.a(o),o._brushSpriteContainer=new p.Engine.Container;var s=o._brushSprite.getDisplayObject();if(o._brushSpriteContainer.addChild(s),o._outputSprite=new p.Engine.Sprite,o._outputContainer=new p.Engine.Container,o._outputContainer.addChild(o._outputSprite),o._maskFilter=new y.a,a.isOfType(p.RendererType.WEBGL)){o._horizontalFilter=new v.a,o._verticalFilter=new v.a,o._sprite.setFilters([o._horizontalFilter,o._verticalFilter]),o._horizontalFilter.setDelta(new b(1,1)),o._verticalFilter.setDelta(new b(-1,1));var u=o._maskRenderTexture.getBaseTexture();u.setGLUnit(o._maskFilter.getMaskImage()),a.updateTexture(u,!1),(u=o._blurredRenderTexture.getBaseTexture()).setGLUnit(o._maskFilter.getFilterImage()),a.updateTexture(u,!1)}else a.isOfType(p.RendererType.CANVAS)&&(o._blurFilter=new v.a,o._sprite.setFilters([o._blurFilter]),o._maskFilter.setMaskCanvas(o._maskRenderTexture.getRenderTarget().getCanvas()),o._maskFilter.setFilterCanvas(o._blurredRenderTexture.getRenderTarget().getCanvas()));return o._outputSprite.setFilters([o._maskFilter]),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=c()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(u.a?u()(e,t):e.__proto__=t)}(t,p.Operation),g(t,[{key:"flip",value:function(e){this._brushSprite.applyFlip(e),this.setDirty(!0,!0),this._lastBlurRadius=null}},{key:"rotate",value:function(e){this._brushSprite.applyRotation(e),this.setDirty(!0,!0),this._lastBlurRadius=null}},{key:"transform",value:function(e,t){this._brushSprite.applyTransform(e,t),this.setDirty(!0,!0),this._lastBlurRadius=null}},{key:"_render",value:function(e){return this._renderBlur(e),this._renderMask(e),this._outputSprite.setTexture(e),this._renderTexture.render(this._outputContainer),p.Promise.resolve()}},{key:"_renderMask",value:function(e){var t=e.getDimensions();this._maskRenderTexture.getDimensions().equals(t)||this._maskRenderTexture.resizeTo(t),this._brushSprite.update(this._sdk,t),this._maskRenderTexture.clear(p.Color.BLACK),this._maskRenderTexture.render(this._brushSpriteContainer);var n=this._sdk.getRenderer();n.isOfType(p.RendererType.WEBGL)&&n.updateTexture(this._maskRenderTexture.getBaseTexture(),!1)}},{key:"_renderBlur",value:function(e){var t=e.getDimensions(),n=this._blurredRenderTexture.getDimensions();n.equals(t)||this._blurredRenderTexture.resizeTo(t);var r=this._options.blurRadius;if(this._lastBlurRadius!==r||!n.equals(t)){var i=this._sdk.getRenderer(),o=void 0;i.isOfType(p.RendererType.WEBGL)?(o={blurRadius:r*t.min(),texSize:t},this._horizontalFilter.set(o),this._verticalFilter.set(o)):i.isOfType(p.RendererType.CANVAS)&&(o={blurRadius:r},this._blurFilter.set(o)),this._blurredRenderTexture.render(this._container),this._lastBlurRadius=r}var a=this._sdk.getRenderer();a.isOfType(p.RendererType.WEBGL)&&a.updateTexture(this._blurredRenderTexture.getBaseTexture(),!1)}},{key:"getBrush",value:function(){return this._brushSprite}},{key:"createPath",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=new _.a.Brushes.RadialBrush({size:e,hardness:t,color:p.Color.WHITE}),r=this._brushSprite.createPath(n);return this._options.paths.push(r),this.setDirty(!0),r}},{key:"setDirtyForRenderer",value:function(e,n,r){m(t.prototype.__proto__||h()(t.prototype),"setDirtyForRenderer",this).call(this,e,n,r),this._brushSprite.setDirtyForRenderer(e,n,r)}},{key:"dispose",value:function(){m(t.prototype.__proto__||h()(t.prototype),"dispose",this).call(this),this._sdk.getRenderer().isOfType(p.RendererType.WEBGL)?(this._verticalFilter.dispose(),this._horizontalFilter.dispose()):this._blurFilter.dispose(),this._brushSprite.dispose(),this._maskFilter.dispose(),this._blurredRenderTexture.dispose(),this._maskRenderTexture.dispose()}},{key:"hasChanges",value:function(){return!0}}]),t}();w.identifier="selective-blur",w.prototype.availableOptions={blurRadius:{type:p.OptionType.NUMBER,default:.05},paths:{type:p.OptionType.ARRAY,default:[],setter:function(e){return this._brushSprite&&this._brushSprite.setPaths(e),e}}},d.a.Operations.SelectiveBlurOperation=w,t.a=w},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(5),a=n.n(o),s=n(2),u=n.n(s),l=n(3),c=n.n(l),f=n(1),h=n.n(f),p=n(4),d=(n.n(p),n(380)),_=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),v=function e(t,n,r){null===t&&(t=Function.prototype);var i=a()(t,n);if(void 0===i){var o=h()(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0},y=function(e){function t(e,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||h()(t)).call(this,n));return i._operation=e,i._canvas=r||p.Utils.createCanvas(),i._context=i._canvas.getContext("2d"),i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=c()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(u.a?u()(e,t):e.__proto__=t)}(t,p.Configurable),_(t,[{key:"serializeOption",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return"controlPoints"===e?this._options.controlPoints.map(function(e){var t=e.getPosition();return n?t.toObject():t.clone()}):v(t.prototype.__proto__||h()(t.prototype),"serializeOption",this).call(this,e,n)}},{key:"_optionEquals",value:function(e,n){if("controlPoints"===e){for(var r=this._options.controlPoints,i=0,o=r.length;i<o;i++)if(!r[i].getPosition().equals(n[i]))return!1;return!0}return v(t.prototype.__proto__||h()(t.prototype),"_optionEquals",this).call(this,e,n)}},{key:"render",value:function(e){var t=this._options,n=t.controlPoints,r=t.size;if(!(n.length<2)){var i=this.getBrush(),o=i&&i.getHardness?i.getHardness():1;p.Utils.ensureCanvasDimensions(this._canvas,e),this._brush&&this._lastBrushSize===r&&e.equals(this._brushInputDimensions)||(this._brushInputDimensions=e.clone(),this._lastBrushSize=r);for(var a=void 0,s=void 0,u=void 0,l=void 0,c=0;c<n.length;c++)a=n[c-2],s=n[c-1],u=n[c],l=n[c+1],u.renderToCanvas(this._options.brush.getBrushImage(e),this._canvas,a,s,l,o)}}},{key:"_createBrush",value:function(e){var t=this._options,n=t.size,r=t.hardness,i=t.color,o=p.Utils.createCanvas();o.width=o.height=Math.ceil(n*e.min());var a=o.getContext("2d");if((i=i.clone()).a=1,1===o.width)a.fillStyle=i.toRGBA(),a.fillRect(0,0,1,1);else{var s=a.createRadialGradient(o.width/2,o.height/2,Math.min(o.width/2-1,o.width/2*r),o.width/2,o.height/2,o.width/2);s.addColorStop(0,i.toRGBA());var u=i.clone();u.a=0,s.addColorStop(1,u.toRGBA()),a.fillStyle=s,a.fillRect(0,0,o.width,o.height)}return o}},{key:"addControlPoint",value:function(e){var t=new d.a(this,e);this._options.controlPoints.push(t),this.emit("update",this)}},{key:"getCanvas",value:function(){return this._canvas}},{key:"setCanvas",value:function(e){this._canvas=e,this._context=e.getContext("2d")}},{key:"setDirty",value:function(){this._context.clearRect(0,0,this._canvas.width,this._canvas.height),this._options.controlPoints.forEach(function(e){e.setDirty()})}},{key:"forEachControlPoint",value:function(e){this._options.controlPoints.forEach(e)}},{key:"renderToCanvas",value:function(e){var t=e.getContext("2d");t.save(),t.globalAlpha=this._options.brush.getColor().a,t.drawImage(this._canvas,0,0),t.restore()}},{key:"getCanvasDimensions",value:function(){return this._canvasDimensions}}]),t}();y.prototype.availableOptions={id:{type:p.OptionType.STRING,default:function(){return p.Utils.getUUID()}},brush:{type:p.OptionType.OBJECT,required:!0},controlPoints:{type:p.OptionType.ARRAY,default:[]},closed:{type:p.OptionType.BOOLEAN,default:!1}},t.a=y},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(4),a=(n.n(o),function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}()),s=o.Math.Vector2,u=o.Math.CubicBezierCurve,l=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._path=t,this._drawnCanvases=[],this._position=n,this._smooth=r}return a(e,[{key:"getBezierCurve",value:function(e,t,n,r){if(!t)return null;var i=void 0,o=void 0;r?(i=(r.x-t.x)/this._smooth,o=(r.y-t.y)/this._smooth):(i=(n.x-t.x)/this._smooth,o=(n.y-t.y)/this._smooth);var a=void 0,s=void 0;e?(a=(n.x-e.x)/this._smooth,s=(n.y-e.y)/this._smooth):(a=(n.x-t.x)/this._smooth,s=(n.y-t.y)/this._smooth);var l=t.clone().add(a,s),c=n.clone().subtract(i,o);return new u(t,l,c,n)}},{key:"renderToCanvas",value:function(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1;if(-1===this._drawnCanvases.indexOf(t)){var a=new s(t.width,t.height),u=t.getContext("2d"),l=this._position.clone().multiply(a),c=r?r.getPosition().clone().multiply(a):null,f=n?n.getPosition().clone().multiply(a):null,h=i?i.getPosition().clone().multiply(a):null,p=(l.clone().subtract(c).len(),e.width/10),d=this.getBezierCurve(f,c,l,h),_=void 0;if(d){d.calculateSegments(20);var v=d.getLength();_=d.arcLengthApproxSample(Math.ceil(v/p))}else _=[l];for(var y=0;y<_.length;y++){var g=_[y],m=.5*e.width/(2*p);m=1/(1+(m*=1-o)),u.globalAlpha=m,u.drawImage(e,g.x-e.width/2,g.y-e.height/2,e.width,e.height)}u.globalAlpha=1,this._drawnCanvases.push(t)}}},{key:"setPosition",value:function(e){this._position=e}},{key:"getPosition",value:function(){return this._position.clone()}},{key:"setDirty",value:function(){this._drawnCanvases=[]}}]),e}();t.a=l},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(2),a=n.n(o),s=n(3),u=n.n(s),l=n(1),c=n.n(l),f=n(4),h=(n.n(f),n(166)),p=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),d=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||c()(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=u()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(a.a?a()(e,t):e.__proto__=t)}(t,h.a),p(t,[{key:"getBrushImage",value:function(e){if(this._brush&&this.optionsEqual(this._lastOptions)&&e.equals(this._lastInputDimensions))return this._brush;var t=this._options,n=t.size,r=t.hardness,i=t.color,o=f.Utils.createCanvas();o.width=o.height=Math.ceil(n*e.min());var a=o.getContext("2d");if((i=i.clone()).a=1,1===o.width)a.fillStyle=i.toRGBA(),a.fillRect(0,0,1,1);else{var s=a.createRadialGradient(o.width/2,o.height/2,Math.min(o.width/2-1,o.width/2*r),o.width/2,o.height/2,o.width/2);s.addColorStop(0,i.toRGBA());var u=i.clone();u.a=0,s.addColorStop(1,u.toRGBA()),a.fillStyle=s,a.fillRect(0,0,o.width,o.height)}return this._lastOptions=this.serializeOptions(["size","color","hardness"]),this._brush=o,this._lastInputDimensions=e.clone(),o}}]),t}();t.a=d,d.identifier="imgly_brush_radial",d.prototype.availableOptions=f.Utils.extend(h.a.prototype.availableOptions,{hardness:{type:f.OptionType.NUMBER,default:1}})},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(2),a=n.n(o),s=n(3),u=n.n(s),l=n(1),c=n.n(l),f=n(4),h=(n.n(f),function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}()),p=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||c()(t)).call(this));return e._fragmentSource=n(383),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=u()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(a.a?a()(e,t):e.__proto__=t)}(t,f.Engine.Filter),h(t,[{key:"_applyCanvas",value:function(e,t,n){arguments.length>3&&void 0!==arguments[3]&&arguments[3];for(var r=t.getCanvas(),i=t.getContext(),o=n.getContext(),a=this._options,s=a.maskCanvas,u=a.filterCanvas,l=s.getContext("2d"),c=u.getContext("2d"),f=l.getImageData(0,0,r.width,r.height).data,h=i.getImageData(0,0,r.width,r.height),p=h.data,d=c.getImageData(0,0,r.width,r.height).data,_=void 0,v=0;v<r.width*r.height*4;v+=4)_=f[v]/255,p[v]=_*d[v]+(1-_)*p[v],p[v+1]=_*d[v+1]+(1-_)*p[v+1],p[v+2]=_*d[v+2]+(1-_)*p[v+2];o.putImageData(h,0,0)}}]),t}();p.prototype.availableOptions={maskImage:{type:f.OptionType.NUMBER,default:1,uniformType:f.UniformType.INT},maskCanvas:{type:f.OptionType.OBJECT,default:null},filterImage:{type:f.OptionType.NUMBER,default:2,uniformType:f.UniformType.INT},filterCanvas:{type:f.OptionType.OBJECT,default:null}},t.a=p},function(e,t){e.exports="varying vec2 v_texCoord;\nuniform sampler2D u_image;\nuniform sampler2D u_filterImage;\nuniform sampler2D u_maskImage;\n\nvoid main() {\n vec4 color0 = texture2D(u_image, v_texCoord);\n vec4 color1 = texture2D(u_filterImage, v_texCoord);\n vec4 mask = texture2D(u_maskImage, v_texCoord);\n gl_FragColor = mix(color0, color1, mask);\n}\n"},function(e,t,n){"use strict";var r=n(6),i=n.n(r),o=n(0),a=n.n(o),s=n(5),u=n.n(s),l=n(2),c=n.n(l),f=n(3),h=n.n(f),p=n(1),d=n.n(p),_=n(4),v=n.n(_),y=n(67),g=n(385),m=n(386),b=n(165),w=n(387),x=i.a||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},T=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),a()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),k=function e(t,n,r){null===t&&(t=Function.prototype);var i=u()(t,n);if(void 0===i){var o=d()(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},R=_.Math.Vector2,C=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||d()(t)).call.apply(e,[this].concat(r)));return o.setSmoothDownscaling(o._sdk.getOptions().smoothDownscaling),o._onSpriteUpdate=o._onSpriteUpdate.bind(o),o._maskCanvas=_.Utils.createCanvas(),o._options.sprites.slice().forEach(function(e){o.removeSprite(e),o.addSprite(e)}),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=h()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(c.a?c()(e,t):e.__proto__=t)}(t,_.Operation),T(t,[{key:"getSpritesOfType",value:function(e){return this._options.sprites.filter(function(t){return t instanceof e})}},{key:"rotate",value:function(e){this._options.sprites.forEach(function(t){t.applyRotation(e)})}},{key:"flip",value:function(e){this._options.sprites.forEach(function(t){t.applyFlip(e)})}},{key:"_onSpriteUpdate",value:function(e,t){this.emit("update",this),this.setDirty(!0)}},{key:"_applyRotation",value:function(e,t){this._options.sprites.forEach(function(n){return n.applyRotation(e,t)})}},{key:"transform",value:function(e){this._options.sprites.forEach(function(t){return t.applyTransform(e)})}},{key:"scale",value:function(e){this._options.sprites.forEach(function(t){return t.applyScale(e)})}},{key:"serializeOption",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return"sprites"===e?this._options.sprites.map(function(e){return e.serializeOptions(void 0,n)}):k(t.prototype.__proto__||d()(t.prototype),"serializeOption",this).call(this,e,n)}},{key:"createSticker",value:function(e){return new g.a(this,e)}},{key:"createText",value:function(e){return new m.a(this,e)}},{key:"createBrush",value:function(e){return new b.a(this,e)}},{key:"createTextDesign",value:function(e){return new w.a(this,e)}},{key:"addSprite",value:function(e){this._options.sprites.push(e);var t=this.getSmoothDownscaling();e.setSmoothDownscaling&&e.setSmoothDownscaling(t),this._container.addChild(e.getDisplayObject()),this.setDirty(!0),e.on("update",this._onSpriteUpdate),this.emit("update",this,this._options.sprites)}},{key:"removeSprite",value:function(e){var t=this._options.sprites,n=t.indexOf(e);return-1!==n&&(e.off("update",this._onSpriteUpdate),this._container.removeChild(e.getDisplayObject()),t.splice(n,1),this.setDirty(!0),!0)}},{key:"_getOrientatedStageSize",value:function(){var e=this._sdk.getSprite().getTexture().getFrame(),t=this._sdk.getOperationsStack().getByIdentifier("orientation"),n=t?t.getRotation():0;return 270===n||90===n?new R(e.height,e.width):new R(e.width,e.height)}},{key:"_render",value:function(e){var t=this,n=this._container,r=this._options.sprites,i=e.getDimensions().clone().floor(),o=new _.Engine.Container;return o.addChild(this._sprite),_.Promise.all(r.map(function(e){return e.validateSettings()})).then(function(){r.forEach(function(e){return e.update(t._sdk,i)})}).then(function(){t._renderTexture.clear(),r.forEach(function(e){e.getInverted&&e.getInverted()?(t._renderTexture.render(o),t._renderTexture.render(t._renderMaskedSprite(e.getDisplayObject(),e.getColor?e.getColor():_.Color.WHITE,e.getPadding?e.getPadding():-1)),o=new _.Engine.Container):o.addChild(e.getDisplayObject())}),t._renderTexture.render(o),n.addChild(t._sprite),r.forEach(function(e){return n.addChild(e.getDisplayObject())})})}},{key:"_renderMaskedSprite",value:function(e,t,n){var r=this._maskCanvas,i=e.getWorldTransform(),o=this._getOrientatedStageSize();_.Utils.ensureCanvasDimensions(r,o);var a=r.getContext("2d");if(a.clearRect(0,0,r.width,r.height),a.save(),a.fillStyle=t.toRGBA(),n<0)a.fillRect(0,0,o.x,o.y);else{var s=e.getWidth()/e.getScale().x,u=e.getHeight()/e.getScale().y,l=s*n;a.transform(i.a,i.b,i.c,i.d,i.tx,i.ty),a.fillRect(-l,-l,s+2*l,u+2*l)}a.restore(),a.save(),a.globalCompositeOperation="destination-out",e._renderCanvas({getCurrentRenderTarget:function(){return{getPixelRatio:function(){return 1}}},getContext:function(){return a}}),a.restore();var c=new _.Engine.Container,f=new _.Engine.Sprite(_.Engine.Texture.fromCanvas(r));return c.addChild(f),c}},{key:"takeSpriteToFront",value:function(e){var t=this._options.sprites,n=t.indexOf(e);if(-1!==n){_.Utils.moveArrayItem(t,n,t.length-1);var r=e.getDisplayObject();this._container.removeChild(r),this._container.addChild(r),this.setDirty(!0)}}},{key:"getSpritesAtPosition",value:function(e,t){var n=this,r=[];this._options.sprites.forEach(function(e){return e.update(n._sdk,t)});var i=this._sdk.getSprite(),o=i.getWorldTransform().applyInverseToVector(e),a=i.getTexture().getFrame(),s=a.width,u=a.height,l=i.getAnchor().clone().multiply(-s,-u);o.subtract(l);for(var c=this._options.sprites.slice(0).reverse(),f=0,h=c.length;f<h;f++){var p=c[f];p.getHitTestDisplayObject().isAtPosition(o)&&r.push(p)}return r}},{key:"setDirtyForRenderer",value:function(e,n,r){k(t.prototype.__proto__||d()(t.prototype),"setDirtyForRenderer",this).call(this,e,n,r),this._options.sprites.forEach(function(t){t.setDirtyForRenderer(e,n,r)})}},{key:"dispose",value:function(){k(t.prototype.__proto__||d()(t.prototype),"dispose",this).call(this),this._options.sprites.forEach(function(e){e.dispose()})}}]),t}();C.StickerSprite=g.a,C.TextSprite=m.a,C.BrushSprite=b.a,C.TextDesignSprite=w.a,C.identifier="sprite",C.prototype.availableOptions={sprites:{type:_.OptionType.ARRAY,default:[],setter:function(e,t){var n=this;return e=e.map(function(e,t){if(e instanceof y.a)return e;var r=x({},e);switch(delete r.type,e.type){case"text":return new m.a(n,r);case"sticker":return new g.a(n,r);case"brush":return new b.a(n,r);case"textdesign":return new w.a(n,r);default:_.Log.error(n.constructor.name,"Invalid sprite type: "+e.type)}}),t||(this._options.sprites&&this._options.sprites.slice().forEach(function(e){e.dispose(),n.removeSprite(e)}),e.forEach(function(e){n.addSprite(e)})),e}},smoothDownscaling:{type:_.OptionType.BOOLEAN,default:!1}},v.a.Operations.SpriteOperation=C,t.a=C},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(5),a=n.n(o),s=n(2),u=n.n(s),l=n(3),c=n.n(l),f=n(1),h=n.n(f),p=n(4),d=(n.n(p),n(67)),_=n(162),v=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),y=function e(t,n,r){null===t&&(t=Function.prototype);var i=a()(t,n);if(void 0===i){var o=h()(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0},g=p.Math.Vector2,m=p.Math.ColorMatrix,b=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||h()(t)).call.apply(e,[this].concat(r))),a=o._options.image,s=a.src||a.filePath;return o._isSVG=s&&!!s.match(/\w+\.svg(?=\?|$)/i),o._isSVG&&(o._canvas=p.Utils.createCanvas(),o._context=o._canvas.getContext("2d"),o._options.smoothDownscaling=!1),a&&o._onImageUpdate(),o._tintFilter=new p.Engine.Filters.TintFilter,o._adjustmentsFilter=new _.a,o._lastRenderedDimensions=g.NULL,o._lastRenderedInputDimensions=g.NULL,o._onOptionsChange=o._onOptionsChange.bind(o),o._options.adjustments.on("update",o._onOptionsChange),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=c()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(u.a?u()(e,t):e.__proto__=t)}(t,d.a),v(t,[{key:"applyScale",value:function(e){this.setDimensions(this.getDimensions().multiply(e))}},{key:"serializeOptions",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=y(t.prototype.__proto__||h()(t.prototype),"serializeOptions",this).call(this,e,n);return e||(r.type="sticker"),r}},{key:"_rendersToRenderTexture",value:function(e){return this._options.smoothDownscaling&&!this._isSVG&&e.getRenderer().isOfType(p.RendererType.WEBGL)||this._hasAdjustments()||"none"!==this._options.tintMode}},{key:"_getTexture",value:function(){return this._inputTexture}},{key:"update",value:function(e,t){var n=this._options,r=n.dimensions,i=n.image;if(r.equals(g.NULL)&&r.set(i.width,i.height),this._sprite.setSmoothDownscaling(!this._isSVG&&this.getSmoothDownscaling()),(!this._lastRenderedInputDimensions.equals(t)||!this._lastRenderedDimensions.equals(r)||this._lastRenderedImage!==i)&&this._isSVG&&e.getRenderer().isOfType(p.RendererType.WEBGL)){var o=i.width/i.height;if(r.x>r.y){var a=Math.min(r.x,4096);i.width=a,i.height=a/o}else{var s=Math.min(r.x,4096);i.width=s*o,i.height=s}this._canvas.width=i.width,this._canvas.height=i.height,this._context.clearRect(0,0,i.width,i.height),this._context.drawImage(i,0,0,i.width,i.height),this._inputTexture.getBaseTexture().update()}this._rendersToRenderTexture(e)&&this._prepareRenderTexture(e);var u=[];if(this._rendersToRenderTexture(e)){if(this._hasAdjustments()){u.push(this._adjustmentsFilter);var l=this._options.adjustments,c=new m;c.multiply(m.createBrightnessMatrix(l.getBrightness())),c.multiply(m.createSaturationMatrix(l.getSaturation())),c.multiply(m.createContrastMatrix(l.getContrast())),this._adjustmentsFilter.set({colorMatrix:c})}this._options.tintMode&&"none"!==this._options.tintMode&&(u.push(this._tintFilter),this._tintFilter.set({mode:p.Engine.Filters.TintFilter.MODES[this._options.tintMode.toUpperCase()],color:this._options.tintColor})),this._renderTextureSprite.setFilters(u)}this._rendersToRenderTexture(e)?this._renderToRenderTexture(e):this._sprite.setTexture(this._inputTexture),this._updateSprite(t),this._applyFlip(),this._lastRenderedDimensions.copy(r),this._lastRenderedInputDimensions.copy(t),this._lastRenderedImage=i}},{key:"_applyFlip",value:function(){var e=this._sprite.getScale();this._options.flipVertically&&(e.y*=-1),this._options.flipHorizontally&&(e.x*=-1),this._sprite.setScale(e)}},{key:"applyFlip",value:function(e){y(t.prototype.__proto__||h()(t.prototype),"applyFlip",this).call(this,e);var n={rotation:this._options.rotation},r=n.rotation/Math.PI*180*-1;switch(n.rotation=r*Math.PI/180,e){case"horizontal":n.flipHorizontally=!this._options.flipHorizontally,this.set(n);break;case"vertical":n.flipVertically=!this._options.flipVertically,this.set(n)}}},{key:"_hasAdjustments",value:function(){var e=this._options.adjustments;return 0!==e.getBrightness()||1!==e.getSaturation()||1!==e.getContrast()}},{key:"_onImageUpdate",value:function(){var e=this._options.image,t=this._operation.getSDK().getRenderer();this._isSVG&&t.isOfType(p.RendererType.WEBGL)&&(e=this._canvas),this._inputTexture=p.Engine.Texture.fromImage(e),this._identitySprite.setTexture(this._inputTexture),this._sprite.setTexture(this._inputTexture),this._renderTexture&&(this._renderTextureSprite.setTexture(this._inputTexture),this._renderTexture.resizeTo(this._inputTexture.getDimensions())),this.setDirty(!0)}},{key:"scalesUniformly",value:function(){return"keepAspect"===this._options.resizeMode}},{key:"setOption",value:function(e,n){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];y(t.prototype.__proto__||h()(t.prototype),"setOption",this).call(this,e,n,r),"image"===e&&this._identitySprite&&this._onImageUpdate()}},{key:"_onOptionsChange",value:function(){var e=this._dirtiness;for(var t in e)e[t]=!0}},{key:"dispose",value:function(){y(t.prototype.__proto__||h()(t.prototype),"dispose",this).call(this),this._inputTexture&&this._inputTexture.getBaseTexture().dispose(),this._inputTexture=null,this._options.adjustments.off("updated",this._onOptionsChange)}}]),t}();b.prototype.availableOptions={id:{type:p.OptionType.STRING,default:function(){return p.Utils.getUUID()}},identifier:{type:p.OptionType.STRING,default:""},image:{type:p.OptionType.IMAGE,required:!0},position:{type:p.OptionType.VECTOR2,default:g.NULL},dimensions:{type:p.OptionType.VECTOR2,default:g.NULL},anchor:{type:p.OptionType.VECTOR2,default:new g(0,0)},pivot:{type:p.OptionType.VECTOR2,default:new g(.5,.5)},rotation:{type:p.OptionType.NUMBER,default:0},flipHorizontally:{type:p.OptionType.BOOLEAN,default:!1},flipVertically:{type:p.OptionType.BOOLEAN,default:!1},smoothDownscaling:{type:p.OptionType.BOOLEAN,default:!1},tintColor:{type:p.OptionType.COLOR,default:p.Color.WHITE},tintMode:{type:p.OptionType.STRING,default:"none",available:["none","solid","colorized"]},resizeMode:{type:p.OptionType.STRING,default:"keepAspect",available:["keepAspect","unrestricted"]},alpha:{type:p.OptionType.NUMBER,default:1},adjustments:{type:p.OptionType.CONFIGURABLE,structure:{brightness:{type:p.OptionType.NUMBER,default:0},saturation:{type:p.OptionType.NUMBER,default:1},contrast:{type:p.OptionType.NUMBER,default:1}}}},b.type="sticker",t.a=b},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(5),a=n.n(o),s=n(2),u=n.n(s),l=n(3),c=n.n(l),f=n(1),h=n.n(f),p=n(4),d=(n.n(p),n(67)),_=n(167),v=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),y=function e(t,n,r){null===t&&(t=Function.prototype);var i=a()(t,n);if(void 0===i){var o=h()(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0},g=p.Math.Vector2,m=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||h()(t)).call.apply(e,[this].concat(r)));return o._textRenderer=new _.a(o,o._operation),o._textRenderer.rotation=o.getRotation(),o._sprite.setTexture(o._textRenderer.getFinalTexture()),o._hitTestSprite.setTexture(o._textRenderer.getTexture()),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=c()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(u.a?u()(e,t):e.__proto__=t)}(t,d.a),v(t,[{key:"serializeOptions",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=y(t.prototype.__proto__||h()(t.prototype),"serializeOptions",this).call(this,e,n);return e||(r.type="text"),r}},{key:"getDOMStyle",value:function(e,t){var n=this.getFontSize()*t.y;return{fontWeight:this._options.fontWeight,fontSize:n+"px",fontStyle:this._options.fontStyle,fontFamily:this._options.fontFamily,lineHeight:this.getAbsoluteTextHeight(t)*this.getLineHeight()+"px",color:this._options.color.toRGBA(),backgroundColor:this._options.backgroundColor.toRGBA(),textAlign:this._options.alignment}}},{key:"getAbsoluteTextHeight",value:function(e){var t=this.getFontSize()*e.y,n=this.getTextMetrics();if(n){var r=1/n.unitsPerEm*t,i=n.ascender*r,o=n.descender*r;return i+Math.abs(o)}return t*this.getLineHeight()*1.1}},{key:"getDimensions",value:function(e,t){return this._textRenderer.getDimensions(e,t)}},{key:"applyFlip",value:function(e){y(t.prototype.__proto__||h()(t.prototype),"applyFlip",this).call(this,e);var n=this._options.rotation;switch(e){case"horizontal":n+=2*(Math.PI-n),this.setRotation(n);break;case"vertical":n+=2*(Math.PI/2-n),this.setRotation(n)}}},{key:"applyTransform",value:function(e){y(t.prototype.__proto__||h()(t.prototype),"applyTransform",this).call(this,e),this.set({fontSize:e.scaleSize(this.getFontSize(),"y"),maxWidth:e.scaleSize(this.getMaxWidth(),"x")},!1)}},{key:"applyRotation",value:function(e){y(t.prototype.__proto__||h()(t.prototype),"applyRotation",this).call(this,e);var n=(e+360)%360,r=this._operation.getInputDimensions();90!==n&&270!==n||(this.setMaxWidth(this.getMaxWidth()/r.x*r.y),this.setFontSize(this.getFontSize()/r.y*r.x))}},{key:"setOption",value:function(e,n){if("rotation"===e)return this._options.rotation=n,this._textRenderer&&(this._textRenderer.rotation=n),this._rotation=n,void this.emit("update");y(t.prototype.__proto__||h()(t.prototype),"setOption",this).call(this,e,n)}},{key:"getOption",value:function(e){return"rotation"===e?this._rotation:y(t.prototype.__proto__||h()(t.prototype),"getOption",this).call(this,e)}},{key:"getHitTestDisplayObject",value:function(){return this._hitTestSprite}},{key:"update",value:function(e,n){if(this._sprite.setVisible(this._options.visible),this._options.visible){this._textRenderer.update(e,n);var r=this._textRenderer.getFinalTexture();r.getBaseTexture().update();var i=e.getRenderer();i.isOfType(p.RendererType.WEBGL)&&i.updateTexture(r.getBaseTexture()),y(t.prototype.__proto__||h()(t.prototype),"update",this).call(this,e,n),this._sprite.setRotation(0),this._textRenderer.getTexture().getBaseTexture().update(),this._hitTestSprite.setRotation(this._rotation),this._hitTestSprite.updateTransform()}}},{key:"_getTexture",value:function(){return this._textRenderer.getFinalTexture()}},{key:"dispose",value:function(){y(t.prototype.__proto__||h()(t.prototype),"dispose",this).call(this),this._textRenderer.dispose()}},{key:"canBeFlippedHorizontally",value:function(){return!1}},{key:"canAdjustPadding",value:function(){return!1}}]),t}();m.prototype.availableOptions={id:{type:p.OptionType.STRING,default:function(){return p.Utils.getUUID()}},fontSize:{type:p.OptionType.NUMBER,default:.1},characterSpacing:{type:p.OptionType.NUMBER,default:0},lineHeight:{type:p.OptionType.NUMBER,default:1.1},fontIdentifier:{type:p.OptionType.STRING},fontFamily:{type:p.OptionType.STRING,default:"Times New Roman"},fontWeight:{type:p.OptionType.ALL,default:"normal"},fontStyle:{type:p.OptionType.STRING,default:"normal"},textMetrics:{type:p.OptionType.OBJECT,default:null},outlineWidth:{type:p.OptionType.NUMBER,default:0},outlineColor:{type:p.OptionType.COLOR,default:p.Color.BLACK},alignment:{type:p.OptionType.STRING,default:"left",available:["left","center","right"]},verticalAlignment:{type:p.OptionType.STRING,default:"top",available:["top","center","bottom"]},color:{type:p.OptionType.COLOR,default:new p.Color(1,0,0,1)},backgroundColor:{type:p.OptionType.COLOR,default:p.Color.TRANSPARENT},position:{type:p.OptionType.VECTOR2,default:new g(.5,.5)},anchor:{type:p.OptionType.VECTOR2,default:new g(0,0)},pivot:{type:p.OptionType.VECTOR2,default:new g(.5,.5)},rotation:{type:p.OptionType.NUMBER,default:0},text:{type:p.OptionType.STRING,required:!0},maxWidth:{type:p.OptionType.NUMBER,default:.5},maxHeight:{type:p.OptionType.NUMBER,default:0},visible:{type:p.OptionType.BOOLEAN,default:!0}},m.type="text",t.a=m},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(5),a=n.n(o),s=n(2),u=n.n(s),l=n(3),c=n.n(l),f=n(1),h=n.n(f),p=n(4),d=(n.n(p),n(67)),_=n(17),v=n(68),y=n(395),g=n(169),m=n(396),b=n(171),w=n(397),x=n(172),T=n(399),k=n(49),R=n(401),C=n(119),E=n(402),O=n(403),S=n(404),A=n(120),I=n(405),F=n(406),D=n(411),M=n(23),B=n(412),L=n(30),P=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),N=function e(t,n,r){null===t&&(t=Function.prototype);var i=a()(t,n);if(void 0===i){var o=h()(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0},U=p.Math.Vector2,z=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||h()(t)).call(this,e,n));return r._renderer=new B.a,r._canvas=p.Utils.createCanvas(),r._context=r._canvas.getContext("2d"),r._texture=p.Engine.Texture.fromCanvas(r._canvas),r._sprite.setTexture(r._texture),r._aspect=1,r.getSeed()<0&&r.setSeed(_.a.TimeSeed()),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=c()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(u.a?u()(e,t):e.__proto__=t)}(t,d.a),P(t,[{key:"seed",value:function(e){this.setSeed(e||_.a.TimeSeed())}},{key:"_updateLayout",value:function(){var e=this.getLayout();return e?(this._renderer.createLayout(e,this.getText(),this.getSeed()),this._aspect=this._renderer.calculateAspect(),this._isLayoutDirty=!1,!0):null}},{key:"applyTransform",value:function(e){N(t.prototype.__proto__||h()(t.prototype),"applyTransform",this).call(this,e);var n={};this._options.dimensions&&(n.width=e.applyToRelativeSize(this.getWidth())),this.set(n,!1)}},{key:"applyFlip",value:function(e){N(t.prototype.__proto__||h()(t.prototype),"applyFlip",this).call(this,e);var n=this._options.rotation;switch(e){case"horizontal":n+=2*(Math.PI-n),this.setRotation(n);break;case"vertical":n+=2*(Math.PI/2-n),this.setRotation(n)}}},{key:"update",value:function(e,n){if(!this._isLayoutDirty||this._updateLayout()){var r=this.getWidth()*n.min()/e.getTextureScale(),i=r/this._aspect,o=new U(r,i);o.clamp(new U(1,1),new U(1/0,1/0)),p.Utils.ensureCanvasDimensions(this._canvas,o),this._context.clearRect(0,0,this._canvas.width,this._canvas.height),this._renderer.draw(this._context,new L.a(o.x,o.y),this.getColor(),this.getInverted()),this.setDimensions(o),this._texture.getBaseTexture().update();var a=e.getRenderer();a.isOfType(p.RendererType.WEBGL)&&a.updateTexture(this._texture.getBaseTexture()),N(t.prototype.__proto__||h()(t.prototype),"update",this).call(this,e,n)}}},{key:"_optionEquals",value:function(e,n){if("layout"===e){var r=this._options.layout;return!(!r&&n||!n&&r||!n.constructor||!r.constructor||r.constructor.identifier!==n.constructor.identifier)}return N(t.prototype.__proto__||h()(t.prototype),"_optionEquals",this).call(this,e,n)}},{key:"serializeOptions",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e&&this.getPadding()<0){var r=e.indexOf("padding");r>-1&&e.splice(r,1)}var i=N(t.prototype.__proto__||h()(t.prototype),"serializeOptions",this).call(this,e,n);return e||(i.type="textdesign"),i}},{key:"_getTexture",value:function(){return this._texture}},{key:"canBeFlippedHorizontally",value:function(){return!1}},{key:"canBeDuplicated",value:function(){return!0}},{key:"canMaskCanvas",value:function(){return!0}},{key:"canAdjustPadding",value:function(){return!0}}]),t}();z.Layouts={TextDesignBlocks:v.a,TextDesignBlocksCondensed:y.a,TextDesignBlocksLight:g.a,TextDesignCelebrate:b.a,TextDesignCelebrateSimple:w.a,TextDesignEqualWidth:x.a,TextDesignEqualWidthFat:T.a,TextDesignMasked:k.a,TextDesignMaskedBadge:R.a,TextDesignMaskedSpeechBubble:C.a,TextDesignMaskedSpeechBubbleComic:E.a,TextDesignMultiline:O.a,TextDesignWatercolor:S.a,TextDesignSunshine:A.a,TextDesignParticles:F.a,TextDesignRotated:D.a},z.LegacyLayouts={TextDesignBlocksLightV310:m.a,TextDesignSunshineV310:I.a},z.AssetManager=M.a,z.prototype.availableOptions={id:{type:p.OptionType.STRING,default:function(){return p.Utils.getUUID()}},position:{type:p.OptionType.VECTOR2,default:new U(.5,.5)},dimensions:{type:p.OptionType.VECTOR2,default:U.NULL},anchor:{type:p.OptionType.VECTOR2,default:new U(0,0)},pivot:{type:p.OptionType.VECTOR2,default:new U(.5,.5)},rotation:{type:p.OptionType.NUMBER,default:0},flipHorizontally:{type:p.OptionType.BOOLEAN,default:!1},flipVertically:{type:p.OptionType.BOOLEAN,default:!1},layout:{type:p.OptionType.OBJECT,default:null,setter:function(e){return this._isLayoutDirty=!0,e}},text:{type:p.OptionType.STRING,default:"",setter:function(e){return this._isLayoutDirty=!0,e}},color:{type:p.OptionType.COLOR,default:p.Color.BLACK},padding:{type:p.OptionType.NUMBER,default:.01,minValue:.01},width:{type:p.OptionType.NUMBER,default:.8},inverted:{type:p.OptionType.BOOLEAN,default:!1},seed:{type:p.OptionType.NUMBER,default:-1}},t.a=z},function(e,t,n){e.exports={default:n(389),__esModule:!0}},function(e,t,n){n(390),e.exports=9007199254740991},function(e,t,n){var r=n(12);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(e,t,n){"use strict";n.d(t,"a",function(){return _});var r=n(0),i=n.n(r),o=n(2),a=n.n(o),s=n(3),u=n.n(s),l=n(1),c=n.n(l),f=n(4),h=(n.n(f),n(18)),p=n(30),d=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),_=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||c()(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=u()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(a.a?a()(e,t):e.__proto__=t)}(t,f.Configurable),d(t,[{key:"getSize",value:function(){var e=this.getRows(),t=this.getWidth(),n=e.length-1,r=e.reduce(function(e,t){return e+t.getSize().height},0);r+=(n+1)*this.getRelativeLineSpacing()*t;var i=this.getRelativeInsets().clone().scale(t);return r+=i.top+i.bottom,new p.a(t,r)}}]),t}();_.prototype.availableOptions={text:{type:f.OptionType.STRING,default:""},lines:{type:f.OptionType.ARRAY,default:[]},relativeInsets:{type:f.OptionType.OBJECT,default:new h.a},relativeLineSpacing:{type:f.OptionType.NUMBER,default:0},rows:{type:f.OptionType.OBJECT,default:[]},background:{type:f.OptionType.OBJECT,default:null},width:{type:f.OptionType.NUMBER,default:0}}},function(e,t,n){var r=function(){return this}()||Function("return this")(),i=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,o=i&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,e.exports=n(393),i)r.regeneratorRuntime=o;else try{delete r.regeneratorRuntime}catch(e){r.regeneratorRuntime=void 0}},function(e,t){!function(t){"use strict";function n(e,t,n,o){var a=t&&t.prototype instanceof i?t:i,s=Object.create(a.prototype),u=new h(o||[]);return s._invoke=function(e,t,n){var i=k;return function(o,a){if(i===C)throw new Error("Generator is already running");if(i===E){if("throw"===o)throw a;return d()}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=l(s,n);if(u){if(u===O)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===k)throw i=E,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=C;var c=r(e,t,n);if("normal"===c.type){if(i=n.done?E:R,c.arg===O)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=E,n.method="throw",n.arg=c.arg)}}}(e,n,u),s}function r(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function i(){}function o(){}function a(){}function s(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function u(e){var t;this._invoke=function(n,i){function o(){return new Promise(function(t,o){!function t(n,i,o,a){var s=r(e[n],e,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==typeof l&&y.call(l,"__await")?Promise.resolve(l.__await).then(function(e){t("next",e,o,a)},function(e){t("throw",e,o,a)}):Promise.resolve(l).then(function(e){u.value=e,o(u)},a)}a(s.arg)}(n,i,t,o)})}return t=t?t.then(o,o):o()}}function l(e,t){var n=e.iterator[t.method];if(n===_){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=_,l(e,t),"throw"===t.method))return O;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return O}var i=r(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,O;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=_),t.delegate=null,O):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,O)}function c(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function f(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function h(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(c,this),this.reset(!0)}function p(e){if(e){var t=e[m];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(y.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=_,t.done=!0,t};return r.next=r}}return{next:d}}function d(){return{value:_,done:!0}}var _,v=Object.prototype,y=v.hasOwnProperty,g="function"==typeof Symbol?Symbol:{},m=g.iterator||"@@iterator",b=g.asyncIterator||"@@asyncIterator",w=g.toStringTag||"@@toStringTag",x="object"==typeof e,T=t.regeneratorRuntime;if(T)x&&(e.exports=T);else{(T=t.regeneratorRuntime=x?e.exports:{}).wrap=n;var k="suspendedStart",R="suspendedYield",C="executing",E="completed",O={},S={};S[m]=function(){return this};var A=Object.getPrototypeOf,I=A&&A(A(p([])));I&&I!==v&&y.call(I,m)&&(S=I);var F=a.prototype=i.prototype=Object.create(S);o.prototype=F.constructor=a,a.constructor=o,a[w]=o.displayName="GeneratorFunction",T.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===o||"GeneratorFunction"===(t.displayName||t.name))},T.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,a):(e.__proto__=a,w in e||(e[w]="GeneratorFunction")),e.prototype=Object.create(F),e},T.awrap=function(e){return{__await:e}},s(u.prototype),u.prototype[b]=function(){return this},T.AsyncIterator=u,T.async=function(e,t,r,i){var o=new u(n(e,t,r,i));return T.isGeneratorFunction(t)?o:o.next().then(function(e){return e.done?e.value:o.next()})},s(F),F[w]="Generator",F[m]=function(){return this},F.toString=function(){return"[object Generator]"},T.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},T.values=p,h.prototype={constructor:h,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=_,this.done=!1,this.delegate=null,this.method="next",this.arg=_,this.tryEntries.forEach(f),!e)for(var t in this)"t"===t.charAt(0)&&y.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=_)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){function t(t,r){return o.type="throw",o.arg=e,n.next=t,r&&(n.method="next",n.arg=_),!!r}if(this.done)throw e;for(var n=this,r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r],o=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var a=y.call(i,"catchLoc"),s=y.call(i,"finallyLoc");if(a&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&y.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=e,o.arg=t,i?(this.method="next",this.next=i.finallyLoc,O):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),O},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),f(n),O}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;f(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:p(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=_),O}}}}(function(){return this}()||Function("return this")())},function(e,t,n){"use strict";n.d(t,"a",function(){return b});var r=n(6),i=n.n(r),o=n(0),a=n.n(o),s=n(2),u=n.n(s),l=n(3),c=n.n(l),f=n(1),h=n.n(f),p=n(4),d=(n.n(p),n(83)),_=n(71),v=n(48),y=i.a||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},g=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),a()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),m=p.Math.Rectangle,b=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||h()(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=c()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(u.a?u()(e,t):e.__proto__=t)}(t,d.a),g(t,[{key:"_calculateLayoutElements",value:function(){if(this.getWords().size()<=0)return[];var e=this.serializeOptions(),n=e.orientation,r=e.width,i=e.size,o=e.relativeRowOffset,a=e.attributes.fontIdentifier,s=this.getWords().joined(3),u=n===t.Orientations.Left?[s[0],s[1],s[2]]:[s[1],s[2],s[0]],l=p.Utils.Array.range(0,2).map(function(e){return new _.a({text:u[e],fontIdentifier:a,fontSize:60})}),c=l.map(function(e){return e.getSizeValue()}),f=c[0].width>c[1].width?0:1,h=(f+1)%2;l[h].fitWidth(c[f].width),c[h]=l[h].getSizeValue();var d=(c[h].height+c[f].height)/(1-o),y=new _.a({text:u[2],fontIdentifier:a});y.fitHeight(d);var g=y.getSizeValue().width,b=c[f].width,w=r/(g+b),x=w*g,T=w*b,k=w*d,R=o*k;i.set(r,k);var C=p.Utils.Array.range(0,3).map(function(e){return new _.a({text:u[e],fontIdentifier:a})});C[0].fitWidth(T),C[1].fitWidth(T),C[2].fitWidth(x);var E=n===t.Orientations.Left?0:x,O=[E,E,n===t.Orientations.Left?T:0],S=[0,C[0].getSizeValue().height+R,0],A=C.map(function(e,t){return new m(O[t],S[t],e.getSizeValue().width,e.getSizeValue().height)});return C.map(function(e,t){return new v.a({text:u[t],font:C[t],frame:A[t]})})}}]),t}();b.Orientations={Right:"RIGHT",Left:"LEFT"},b.prototype.availableOptions=y({},d.a.prototype.availableOptions,{orientation:{type:p.OptionType.STRING,default:b.Orientations.Left,available:[b.Orientations.Right,b.Orientations.Left]},relativeRowOffset:{type:p.OptionType.NUMBER,default:.05}})},function(e,t,n){"use strict";n.d(t,"a",function(){return w});var r=n(6),i=n.n(r),o=n(0),a=n.n(o),s=n(5),u=n.n(s),l=n(2),c=n.n(l),f=n(3),h=n.n(f),p=n(1),d=n.n(p),_=n(4),v=(n.n(_),n(68)),y=n(22),g=i.a||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},m=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),a()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),b=function e(t,n,r){null===t&&(t=Function.prototype);var i=u()(t,n);if(void 0===i){var o=d()(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},w=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||d()(t)).call.apply(e,[this].concat(r)));return o._exclusiveFont=null,o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=h()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(c.a?c()(e,t):e.__proto__=t)}(t,v.a),m(t,[{key:"generateLayoutData",value:function(e,n){return this._exclusiveFont=this._fontRandomizer.pickNext(this.getFontIdentifiers()),b(t.prototype.__proto__||d()(t.prototype),"generateLayoutData",this).call(this,e,n)}},{key:"_fontForRow",value:function(e,n){return this._exclusiveFont||b(t.prototype.__proto__||d()(t.prototype),"_fontForRow",this).call(this,e,n)}},{key:"_layoutRow",value:function(e,t,n,r){return new y.a({words:e,width:t,attributes:n})}}]),t}();w.defaultFontIdentifiers=["imgly_font_ostrich_sans_heavy","imgly_font_ostrich_sans_bold","imgly_font_ostrich_sans_black"],w.identifier="imgly_text_design_blocks_condensed",w.prototype.availableOptions=g({},v.a.prototype.availableOptions,{fontIdentifiers:{type:_.OptionType.ARRAY,default:w.defaultFontIdentifiers}})},function(e,t,n){"use strict";n.d(t,"a",function(){return m});var r=n(6),i=n.n(r),o=n(0),a=n.n(o),s=n(2),u=n.n(s),l=n(3),c=n.n(l),f=n(1),h=n.n(f),p=n(4),d=(n.n(p),n(169)),_=n(70),v=n(22),y=i.a||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},g=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),a()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),m=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||h()(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=c()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(u.a?u()(e,t):e.__proto__=t)}(t,d.a),g(t,[{key:"_layoutRows",value:function(e,t){var n=this;return e.map(function(e,r){return n._randomLayoutRow(e,r,t,new _.a({fontIdentifier:n._fontForRow(r,e)})).layout()})}},{key:"_layoutRow",value:function(e,t,n,r){return new v.a({words:e,width:t,attributes:n})}}]),t}();m.defaultFontIdentifiers=["imgly_font_summer_font_light"],m.identifier="imgly_text_design_blocks_light-v3_1_0",m.prototype.availableOptions=y({},d.a.prototype.availableOptions,{fontIdentifiers:{type:p.OptionType.ARRAY,default:m.defaultFontIdentifiers}})},function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return s()(e)}n.d(t,"a",function(){return C});var i=n(6),o=n.n(i),a=n(15),s=n.n(a),u=n(0),l=n.n(u),c=n(5),f=n.n(c),h=n(2),p=n.n(h),d=n(3),_=n.n(d),v=n(1),y=n.n(v),g=n(4),m=(n.n(g),n(68),n(22),n(114),n(40),n(116),n(171)),b=n(117),w=n(23),x=n(17),T=o.a||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},k=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),l()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),R=function e(t,n,r){null===t&&(t=Function.prototype);var i=f()(t,n);if(void 0===i){var o=y()(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},C=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,i=Array(n),o=0;o<n;o++)i[o]=arguments[o];var a=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||y()(t)).call.apply(e,[this].concat(i)));return a.getImagePaths=function(){var e=a.getBanderoles();return[].concat(r(e&&e.map(function(e){return e.getImagePath()})||[]),r(a._celebrateTypes))},a.onImagesLoaded=function(){var e=a.getBanderoles();e&&e.forEach(function(e){var t=w.a.getImage(e.getImagePath());t?e.setImage(t):g.Log.warn("TextDesignBlocks#onImagesLoaded: Image not found '"+e.getImagePath()+"'")})},a._celebrateTypes=[b.a.RowImages.celebrate1,b.a.RowImages.celebrate2,b.a.RowImages.celebrate3],a._exclusiveFont=null,a._typeRandomizer=new x.a(0),a._useMaskedRandomizer=new x.a(0),a._seedPool.push(a._typeRandomizer),a._seedPool.push(a._useMaskedRandomizer),a}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=_()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(p.a?p()(e,t):e.__proto__=t)}(t,m.a),k(t,[{key:"_fontForRow",value:function(e,t){var n=this.getFontIdentifiers();return n[e%(n.length-1)]}},{key:"_layoutRows",value:function(e,n){var i=this._typeRandomizer.pickNext(this._celebrateTypes),o=w.a.getImage(i);return o||g.Log.warn("TextDesignCelebrateSimple#_layoutRows: Image not fount '"+i+"'"),[new b.a({width:n,height:.5*n,drawingModeAspectFit:!0,image:o}).layout()].concat(r(R(t.prototype.__proto__||y()(t.prototype),"_layoutRows",this).call(this,e,n)))}},{key:"_randomLayoutRow",value:function(e,n,r,i){var o=e.countNumberOfCharacters();o<4&&i.setFontIdentifier("imgly_font_rasa_regular");var a=this._useMaskedRandomizer.nextBool(2,1);return o<13&&a&&!this.getHasMaskedText()?this._layoutRow(e,r,i,!0):R(t.prototype.__proto__||y()(t.prototype),"_randomLayoutRow",this).call(this,e,n,r,i)}}]),t}();C.identifier="imgly_text_design_celebrate_simple",C.defaultFontIdentifiers=["imgly_font_amberlight","imgly_font_rasa_regular","imgly_font_rasa_500"],C.prototype.availableOptions=T({},m.a.prototype.availableOptions,{fontIdentifiers:{type:g.OptionType.ARRAY,default:C.defaultFontIdentifiers}})},function(e,t,n){"use strict";n.d(t,"a",function(){return y});var r=n(0),i=n.n(r),o=n(2),a=n.n(o),s=n(3),u=n.n(s),l=n(1),c=n.n(l),f=n(4),h=(n.n(f),n(173)),p=n(23),d=n(41),_=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),v=f.Math.Rectangle,y=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||c()(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=u()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(a.a?a()(e,t):e.__proto__=t)}(t,h.a),_(t,[{key:"getImagePaths",value:function(){var e=this._options;return[e.topImagePath,e.bottomImagePath,e.leftImagePath,e.rightImagePath].filter(function(e){return""!==e})}},{key:"render",value:function(e,t,n,r,i){var o=n.clone().scale(t.width),a=t.rectangle(0,0),s=p.a.getImage(this.getTopImagePath()),u=p.a.getImage(this.getLeftImagePath()),l=p.a.getImage(this.getRightImagePath()),c=p.a.getImage(this.getBottomImagePath());if(s){var f=s.width/s.height,h=o.top*this.getTopImageFillRate(),_=h*f,y=a.width/2,g=new v(y-_/2,0,_,h);Object(d.a)(e,s,g,r)}if(c){var m=c.width/c.height,b=o.bottom*this.getBottomImageFillRate(),w=b*m,x=a.width/2,T=new v(x-w/2,a.height-b,w,b);Object(d.a)(e,c,T,r)}if(u){var k=u.width/u.height,R=o.left*this.getLeftImageFillRate(),C=R/k,E=a.height/2,O=new v(0,E-C/2,R,C);Object(d.a)(e,u,O,r)}if(l){var S=l.width/l.height,A=o.right*this.getRightImageFillRate(),I=A/S,F=a.height/2-I/2,D=new v(a.width-A,F,A,I);Object(d.a)(e,l,D,r)}}}]),t}();y.prototype.availableOptions={topImagePath:{type:f.OptionType.STRING,default:""},leftImagePath:{type:f.OptionType.STRING,default:""},bottomImagePath:{type:f.OptionType.STRING,default:""},rightImagePath:{type:f.OptionType.STRING,default:""},topImageFillRate:{type:f.OptionType.NUMBER,default:1},leftImageFillRate:{type:f.OptionType.NUMBER,default:1},bottomImageFillRate:{type:f.OptionType.NUMBER,default:1},rightImageFillRate:{type:f.OptionType.NUMBER,default:1}},y.Backgrounds=[new y({topImagePath:"text-design/images/imgly_xib_image_text_design_equal_width_background1_1.png",leftImagePath:"text-design/images/imgly_xib_image_text_design_equal_width_background1_2.png",rightImagePath:"text-design/images/imgly_xib_image_text_design_equal_width_background1_2.png",bottomImagePath:"text-design/images/imgly_xib_image_text_design_equal_width_background1_3.png",topImageFillRate:.8,leftImageFillRate:.6,rightImageFillRate:.6,bottomImageFillRate:.8}),new y({leftImagePath:"text-design/images/imgly_xib_image_text_design_equal_width_background2_1.png",rightImagePath:"text-design/images/imgly_xib_image_text_design_equal_width_background2_1.png",bottomImagePath:"text-design/images/imgly_xib_image_text_design_equal_width_background2_2.png",leftImageFillRate:.6,rightImageFillRate:.6,bottomImageFillRate:.6}),new y({topImagePath:"text-design/images/imgly_xib_image_text_design_equal_width_background3_1.png",bottomImagePath:"text-design/images/imgly_xib_image_text_design_equal_width_background3_2.png",topImageFillRate:.6,bottomImageFillRate:.6}),new y({topImagePath:"text-design/images/imgly_xib_image_text_design_equal_width_background4_1.png",leftImagePath:"text-design/images/imgly_xib_image_text_design_equal_width_background4_3.png",rightImagePath:"text-design/images/imgly_xib_image_text_design_equal_width_background4_3.png",bottomImagePath:"text-design/images/imgly_xib_image_text_design_equal_width_background4_2.png",topImageFillRate:.1,leftImageFillRate:.6,rightImageFillRate:.6,bottomImageFillRate:.6})]},function(e,t,n){"use strict";n.d(t,"a",function(){return g});var r=n(6),i=n.n(r),o=n(0),a=n.n(o),s=n(2),u=n.n(s),l=n(3),c=n.n(l),f=n(1),h=n.n(f),p=n(4),d=(n.n(p),n(172)),_=n(18),v=i.a||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},y=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),a()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),g=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||h()(t)).call.apply(e,[this].concat(r)));return o._relativeInsets=new _.a,o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=c()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(u.a?u()(e,t):e.__proto__=t)}(t,d.a),y(t,[{key:"_getBackground",value:function(){return null}}]),t}();g.defaultFontIdentifiers=["imgly_font_ultra"],g.identifier="imgly_text_design_equal_width_fat",g.prototype.availableOptions=v({},d.a.prototype.availableOptions,{fontIdentifiers:{type:p.OptionType.ARRAY,default:g.defaultFontIdentifiers}})},function(e,t,n){"use strict";n.d(t,"a",function(){return x});var r=n(6),i=n.n(r),o=n(0),a=n.n(o),s=n(5),u=n.n(s),l=n(2),c=n.n(l),f=n(3),h=n.n(f),p=n(1),d=n.n(p),_=n(4),v=(n.n(_),n(23)),y=n(168),g=n(30),m=i.a||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},b=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),a()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),w=_.Math.Vector2,x=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||d()(t)).call(this,e));return n._textOptions={},n._createCanvas(),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=h()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(c.a?c()(e,t):e.__proto__=t)}(t,_.Configurable),b(t,[{key:"_createCanvas",value:function(){this._canvas=_.Utils.createCanvas(),this._context=this._canvas.getContext("2d"),this._textSplitter=new y.a(this._context),this._finalCanvas=_.Utils.createCanvas(),this._finalContext=this._finalCanvas.getContext("2d"),this.updateFontVariation()}},{key:"setOption",value:function(e,n){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];(function e(t,n,r){null===t&&(t=Function.prototype);var i=u()(t,n);if(void 0===i){var o=d()(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0})(t.prototype.__proto__||d()(t.prototype),"setOption",this).call(this,e,n,r,i),"fontIdentifier"!==e||i||this.updateFontVariation()}},{key:"updateFontVariation",value:function(){var e=v.a.getVariation(this.getFontIdentifier());return e||_.Log.warn("TextDesignFont: Unable to find font '"+this._fontIdentifier+"'"),this.setFontVariation(e),e}},{key:"_applyTextOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._context,n=m({},this._options,e),r=n.fontSize,i=n.fontVariation,o=(n.lineHeight,n.textColor),a=n.alignment,s=i.serializeOptions(),u=s.fontStyle,l=s.fontWeight,c=s.fontFamily;t.font=u+" "+l+" "+r+'px "'+c+'"',t.fillStyle=o,t.textBaseline="top",t.textAlign=a||"left"}},{key:"_buildOutputLines",value:function(e){return this._textSplitter.setText(this.getText()),this._textSplitter.setMaxWidth(e),this._textSplitter.getLines()}},{key:"_renderTextLine",value:function(e,t){var n=this.getAlignment(),r=new w(0,t);switch(n){case"center":r.x=this._canvas.width/2;break;case"right":r.x=this._canvas.width}this._context.fillText(e,r.x,r.y)}},{key:"update",value:function(){var e=this.calculateFontStyles();if(e){var t=this._calculateText(e),n=t.dimensions,r=t.lines;this._dimensions=n,this._renderText(n,r,e)}}},{key:"draw",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;this.update(),e.drawImage(this._canvas,t,n,this._dimensions.x,this._dimensions.y)}},{key:"_renderText",value:function(e,t,n){this._canvas.width=e.x,this._canvas.height=e.y,this._context=this._canvas.getContext("2d"),this._applyTextOptions(n,this._context);for(var r=0;r<t.length;r++){var i=t[r];this._renderTextLine(i,n.topPadding+n.lineHeight*r)}}},{key:"getFontFamily",value:function(){return this.getFontVariation().getFontFamily()}},{key:"calculateFontStyles",value:function(){var e=this.getFontFamily(),t=this.getFontSize(),n=this.getAbsoluteTextHeight(),r={fontFamily:e,fontSize:t,textHeight:n,lineHeight:n*this.getLineHeight(),topPadding:n*(this.getLineHeight()-1)/2};return this._textOptions=m({},r),r}},{key:"getTextMetrics",value:function(){return this.getFontVariation().getTextMetrics()}},{key:"getAbsoluteTextHeight",value:function(){var e=this.getFontSize(),t=this.getTextMetrics();if(t){var n=1/t.unitsPerEm*e,r=t.ascender*n,i=t.descender*n;return r+Math.abs(i)}return e*this.getLineHeight()*1.1}},{key:"_calculateText",value:function(e){this._applyTextOptions(e,this._context);for(var t=new w,n=this.getText().split("\n"),r=0;r<n.length;r++){var i=n[r];t.x=Math.max(t.x,this._context.measureText(i).width)}var o=e.lineHeight;return t.y=n.length*o,{dimensions:t,lines:n}}},{key:"getDimensions",value:function(){var e=this.calculateFontStyles();return this._calculateText(e).dimensions}},{key:"fitMaxHeight",value:function(){this.update();var e=this.getDimensions();this.getText().split("\n"),this.getMaxHeight(),e.y}},{key:"fitMaxWidth",value:function(){var e=this.getDimensions().x,t=this.getMaxWidth()/e;this.setFontSize(this.getFontSize()*t),this._textOptions.fontSize=this.getFontSize()}},{key:"fitInFrame",value:function(e){this.setMaxWidth(e.width),this.setMaxHeight(e.height),this.fitMaxWidth(),this.fitMaxHeight()}},{key:"getSize",value:function(){var e=this.getDimensions();return new g.a(e.x,e.y)}}]),t}();x.prototype.availableOptions={text:{type:_.OptionType.STRING,default:""},fontIdentifier:{type:_.OptionType.STRING,default:"imgly_font_open_sans_bold"},fontVariation:{type:_.OptionType.OBJECT,default:null},lineHeight:{type:_.OptionType.NUMBER,default:1},fontSize:{type:_.OptionType.NUMBER,default:22},textColor:{type:_.OptionType.STRING,default:"black"},strokeStyle:{type:_.OptionType.STRING,default:"black"},outlineWidth:{type:_.OptionType.NUMBER,default:0},textBaseline:{type:_.OptionType.STRING,default:"alphabetic"},excludeAccents:{type:_.OptionType.BOOLEAN,default:!0},maxWidth:{type:_.OptionType.NUMBER,default:100},maxHeight:{type:_.OptionType.NUMBER,default:0},alignment:{type:_.OptionType.STRING,default:"left",available:["left","center","right"]}}},function(e,t,n){"use strict";n.d(t,"a",function(){return w});var r=n(6),i=n.n(r),o=n(0),a=n.n(o),s=n(5),u=n.n(s),l=n(2),c=n.n(l),f=n(3),h=n.n(f),p=n(1),d=n.n(p),_=n(4),v=(n.n(_),n(72)),y=n(49),g=n(17),m=i.a||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},b=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),a()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),w=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||d()(t)).call.apply(e,[this].concat(r)));return o._possibleRowTypes=[v.a.Badge1,v.a.Badge2,v.a.Badge3,v.a.Badge4],o._rowTypesRandomizer=new g.a(0),o._isMaskedRandomizer=new g.a(0),o._seedPool.push(o._rowTypesRandomizer),o._seedPool.push(o._isMaskedRandomizer),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=h()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(c.a?c()(e,t):e.__proto__=t)}(t,y.a),b(t,[{key:"getImagePaths",value:function(){return this._possibleRowTypes.map(function(e){return e.getImagePath()})}},{key:"_randomLayoutRow",value:function(e,n,r,i){this._rowType=this._rowTypesRandomizer.pickNext(this._possibleRowTypes),i.setLineSpacing(.9);var o=function e(t,n,r){null===t&&(t=Function.prototype);var i=u()(t,n);if(void 0===i){var o=d()(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0}(t.prototype.__proto__||d()(t.prototype),"_randomLayoutRow",this).call(this,e,n,r,i);return o.set({textScaleFactor:.9}),o}}]),t}();w.defaultFontIdentifiers=["imgly_font_campton_bold"],w.identifier="imgly_text_design_masked_badge",w.ValidAlignments=[y.a.Alignment.Center],w.prototype.availableOptions=m({},y.a.prototype.availableOptions,{fontIdentifiers:{type:_.OptionType.ARRAY,default:w.defaultFontIdentifiers}})},function(e,t,n){"use strict";n.d(t,"a",function(){return g});var r=n(6),i=n.n(r),o=n(0),a=n.n(o),s=n(2),u=n.n(s),l=n(3),c=n.n(l),f=n(1),h=n.n(f),p=n(4),d=(n.n(p),n(72)),_=(n(49),n(119)),v=i.a||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},y=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),a()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),g=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||h()(t)).call.apply(e,[this].concat(r)));return o._possibleRowTypes=[d.a.SpeechBubble2,d.a.SpeechBubble4,d.a.SpeechBubble2,d.a.SpeechBubble4,d.a.SpeechBubble5],o._possibleRowTypesForMin15=o._possibleRowTypes.slice(0,2),o._possibleRowTypesForMax14=o._possibleRowTypes.slice(2),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=c()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(u.a?u()(e,t):e.__proto__=t)}(t,_.a),y(t,[{key:"_rowTypes",value:function(e){return e.countNumberOfCharacters()<15?this._possibleRowTypesForMax14:this._possibleRowTypesForMin15}}]),t}();g.defaultFontIdentifiers=["imgly_font_gagalin_regular"],g.identifier="imgly_text_design_masked_speech_bubble_comic",g.prototype.availableOptions=v({},_.a.prototype.availableOptions,{fontIdentifiers:{type:p.OptionType.ARRAY,default:g.defaultFontIdentifiers}})},function(e,t,n){"use strict";n.d(t,"a",function(){return b});var r=n(6),i=n.n(r),o=n(0),a=n.n(o),s=n(5),u=n.n(s),l=n(2),c=n.n(l),f=n(3),h=n.n(f),p=n(1),d=n.n(p),_=n(4),v=(n.n(_),n(49)),y=n(118),g=i.a||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},m=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),a()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),b=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||d()(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=h()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(c.a?c()(e,t):e.__proto__=t)}(t,v.a),m(t,[{key:"_modifiedText",value:function(e){return function e(t,n,r){null===t&&(t=Function.prototype);var i=u()(t,n);if(void 0===i){var o=d()(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0}(t.prototype.__proto__||d()(t.prototype),"_modifiedText",this).call(this,e).toUpperCase()}},{key:"_randomLayoutRow",value:function(e,t,n,r){var i=this._alignmentRandomizer.pickNext(v.a.ValidAlignments);return r.setAlignment(i),new y.a({words:e,width:n,attributes:r,image:null,backgroundColor:_.Color.WHITE,centerOffset:0,sizeToFitContent:!0,isMasked:!1,autoAdjustTextColor:!1})}}]),t}();b.defaultFontIdentifiers=["imgly_font_abril_fatface_regular"],b.identifier="imgly_text_design_multiline",b.prototype.availableOptions=g({},v.a.prototype.availableOptions,{fontIdentifiers:{type:_.OptionType.ARRAY,default:b.defaultFontIdentifiers}})},function(e,t,n){"use strict";n.d(t,"a",function(){return v});var r=n(6),i=n.n(r),o=n(2),a=n.n(o),s=n(3),u=n.n(s),l=n(1),c=n.n(l),f=n(4),h=(n.n(f),n(72)),p=n(49),d=n(119),_=i.a||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},v=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||c()(t)).call.apply(e,[this].concat(r)));return o._possibleRowTypes=[h.a.Watercolor1,h.a.Watercolor2,h.a.Watercolor3],o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=u()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(a.a?a()(e,t):e.__proto__=t)}(t,d.a),t}();v.defaultFontIdentifiers=["imgly_font_permanent_marker","imgly_font_wolesbro","imgly_font_wolesbro"],v.identifier="imgly_text_design_watercolor",v.prototype.availableOptions=_({},d.a.prototype.availableOptions,{fontIdentifiers:{type:f.OptionType.ARRAY,default:v.defaultFontIdentifiers},alignment:{type:f.OptionType.STRING,default:p.a.Alignment.Center,available:p.a.ValidAlignments}})},function(e,t,n){"use strict";n.d(t,"a",function(){return b});var r=n(15),i=n.n(r),o=n(0),a=n.n(o),s=n(5),u=n.n(s),l=n(2),c=n.n(l),f=n(3),h=n.n(f),p=n(1),d=n.n(p),_=n(120),v=n(23),y=n(18),g=n(117),m=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),a()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),b=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||d()(t)).call.apply(e,[this].concat(r)));return o._relativeInsets=new y.a(0,.3,0,.3),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=h()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(c.a?c()(e,t):e.__proto__=t)}(t,_.a),m(t,[{key:"_layoutRows",value:function(e,n){var r=function e(t,n,r){null===t&&(t=Function.prototype);var i=u()(t,n);if(void 0===i){var o=d()(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0}(t.prototype.__proto__||d()(t.prototype),"_layoutRows",this).call(this,e,n);if(!this.getDecorationsVisible())return r;var o=new g.a({width:n,height:25,image:v.a.getImage(this._rowTypeRandomizer.pickNext(_.a.RowImages))}).layout(),a=new g.a({width:n,height:25,image:v.a.getImage(this._rowTypeRandomizer.pickNext(_.a.RowImages))}).layout();return[o].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return i()(e)}(r),[a])}}]),t}();b.identifier="imgly_text_design_sunshine-v3_1_0"},function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return s()(e)}n.d(t,"a",function(){return C});var i=n(6),o=n.n(i),a=n(15),s=n.n(a),u=n(0),l=n.n(u),c=n(2),f=n.n(c),h=n(3),p=n.n(h),d=n(1),_=n.n(d),v=n(4),y=(n.n(v),n(23)),g=n(18),m=n(120),b=n(407),w=n(409),x=n(410),T=n(17),k=o.a||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},R=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),l()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),C=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||_()(t)).call.apply(e,[this].concat(r)));return o._relativeInsets=new g.a(.3,.3,.3,.3),o._backgroundRandomizer=new T.a(0),o._decoTypeRandomizer=new T.a(0),o._seedPool.push(o._backgroundRandomizer),o._seedPool.push(o._decoTypeRandomizer),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=p()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(f.a?f()(e,t):e.__proto__=t)}(t,m.a),R(t,[{key:"getImagePaths",value:function(){return[].concat(r(m.a.RowImages),r(v.Utils.Array.flatten(t.Backgrounds.map(function(e){return e.getImagePaths()}))),r(t.DecoratorImages))}},{key:"_getBackground",value:function(){return this._backgroundRandomizer.pickNext(t.Backgrounds)}},{key:"_randomDecoratorImages",value:function(){switch(this._decoTypeRandomizer.nextInRange(0,2)){case 0:return t.DecoratorImages.slice(0,2).map(function(e){return y.a.getImage(e)});case 1:case 2:return t.DecoratorImages.slice(2).map(function(e){return y.a.getImage(e)});default:return v.Log.warn("TextDesignParticles#_randomDecoratorImages: Number generated not in valid range."),t.DecoratorImages.slice(2).map(function(e){return y.a.getImage(e)})}}}]),t}();C.defaultFontIdentifiers=["imgly_font_permanent_marker","imgly_font_wolesbro","imgly_font_wolesbro","imgly_font_montserrat_light"],C.identifier="imgly_text_design_particles",C.Backgrounds=[new b.a,new w.a,new x.a],C.DecoratorImages=["text-design/images/imgly_text_design_particle_holder_01.png","text-design/images/imgly_text_design_particle_holder_02.png","text-design/images/imgly_text_design_particle_holder_03.png","text-design/images/imgly_text_design_particle_holder_04.png"],C.prototype.availableOptions=k({},m.a.prototype.availableOptions,{fontIdentifiers:{type:v.OptionType.ARRAY,default:C.defaultFontIdentifiers},decorationsVisible:{type:v.OptionType.BOOLEAN,default:!1},decorativeRowsInTheMiddleOnly:{type:v.OptionType.BOOLEAN,default:!0}})},function(e,t,n){"use strict";n.d(t,"a",function(){return v});var r=n(15),i=n.n(r),o=n(6),a=n.n(o),s=n(2),u=n.n(s),l=n(3),c=n.n(l),f=n(1),h=n.n(f),p=n(4),d=(n.n(p),n(121)),_=a.a||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},v=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||h()(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=c()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(u.a?u()(e,t):e.__proto__=t)}(t,d.a),t}();v.Images=["text-design/images/imgly_text_design_particle_brush_01.png","text-design/images/imgly_text_design_particle_brush_02.png","text-design/images/imgly_text_design_particle_brush_03.png","text-design/images/imgly_text_design_particle_brush_04.png","text-design/images/imgly_text_design_particle_brush_05.png","text-design/images/imgly_text_design_particle_brush_06.png","text-design/images/imgly_text_design_particle_brush_07.png","text-design/images/imgly_text_design_particle_brush_08.png","text-design/images/imgly_text_design_particle_brush_09.png","text-design/images/imgly_text_design_particle_brush_10.png"],v.prototype.availableOptions=_({},d.a.prototype.availableOptions,{imagePaths:{type:p.OptionType.ARRAY,default:[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return i()(e)}(v.Images))},relativeParticleSize:{type:p.OptionType.NUMBER,default:.12}})},function(e,t,n){"use strict";n.d(t,"a",function(){return d});var r=n(0),i=n.n(r),o=n(2),a=n.n(o),s=n(3),u=n.n(s),l=n(1),c=n.n(l),f=n(4),h=(n.n(f),function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}()),p=f.Math.Rectangle,d=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||c()(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=u()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(a.a?a()(e,t):e.__proto__=t)}(t,f.Configurable),h(t,[{key:"getContentFrame",value:function(){var e=this.getFrame().clone(),t=.1*e.width;return e.insetBy(t,t)}},{key:"intersects",value:function(e){return this.getFrame().intersects(e.getFrame())}}]),t}();d.prototype.availableOptions={frame:{type:f.OptionType.OBJECT,default:new p}}},function(e,t,n){"use strict";n.d(t,"a",function(){return v});var r=n(15),i=n.n(r),o=n(6),a=n.n(o),s=n(2),u=n.n(s),l=n(3),c=n.n(l),f=n(1),h=n.n(f),p=n(4),d=(n.n(p),n(121)),_=a.a||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},v=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||h()(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=c()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(u.a?u()(e,t):e.__proto__=t)}(t,d.a),t}();v.Images=["text-design/images/imgly_text_design_particle_circle_01.png","text-design/images/imgly_text_design_particle_circle_02.png","text-design/images/imgly_text_design_particle_circle_03.png","text-design/images/imgly_text_design_particle_circle_04.png","text-design/images/imgly_text_design_particle_circle_05.png","text-design/images/imgly_text_design_particle_circle_06.png","text-design/images/imgly_text_design_particle_circle_07.png","text-design/images/imgly_text_design_particle_circle_08.png","text-design/images/imgly_text_design_particle_circle_09.png","text-design/images/imgly_text_design_particle_circle_10.png"],v.prototype.availableOptions=_({},d.a.prototype.availableOptions,{imagePaths:{type:p.OptionType.ARRAY,default:[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return i()(e)}(v.Images))},relativeParticleSize:{type:p.OptionType.NUMBER,default:.12}})},function(e,t,n){"use strict";n.d(t,"a",function(){return v});var r=n(15),i=n.n(r),o=n(6),a=n.n(o),s=n(2),u=n.n(s),l=n(3),c=n.n(l),f=n(1),h=n.n(f),p=n(4),d=(n.n(p),n(121)),_=a.a||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},v=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||h()(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=c()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(u.a?u()(e,t):e.__proto__=t)}(t,d.a),t}();v.Images=["text-design/images/imgly_text_design_particle_triangle_01.png","text-design/images/imgly_text_design_particle_triangle_02.png","text-design/images/imgly_text_design_particle_triangle_03.png","text-design/images/imgly_text_design_particle_triangle_04.png","text-design/images/imgly_text_design_particle_triangle_05.png","text-design/images/imgly_text_design_particle_triangle_06.png","text-design/images/imgly_text_design_particle_triangle_07.png","text-design/images/imgly_text_design_particle_triangle_08.png","text-design/images/imgly_text_design_particle_triangle_09.png","text-design/images/imgly_text_design_particle_triangle_10.png"],v.prototype.availableOptions=_({},d.a.prototype.availableOptions,{imagePaths:{type:p.OptionType.ARRAY,default:[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return i()(e)}(v.Images))}})},function(e,t,n){"use strict";n.d(t,"a",function(){return R});var r=n(6),i=n.n(r),o=n(15),a=n.n(o),s=n(0),u=n.n(s),l=n(5),c=n.n(l),f=n(2),h=n.n(f),p=n(3),d=n.n(p),_=n(1),v=n.n(_),y=n(4),g=(n.n(y),n(69)),m=n(18),b=n(170),w=n(17),x=i.a||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},T=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),u()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),k=function e(t,n,r){null===t&&(t=Function.prototype);var i=c()(t,n);if(void 0===i){var o=v()(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},R=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||v()(t)).call.apply(e,[this].concat(r)));return o._relativeInsets=new m.a(.1,0,0,0),o._rowTypeRandomizer=new w.a(0),o._seedPool.push(o._rowTypeRandomizer),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=d()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(h.a?h()(e,t):e.__proto__=t)}(t,g.a),T(t,[{key:"_modifiedText",value:function(e){return k(t.prototype.__proto__||v()(t.prototype),"_modifiedText",this).call(this,e).toUpperCase()}},{key:"_randomLayoutRow",value:function(e,n,r,i){var o=k(t.prototype.__proto__||v()(t.prototype),"_randomLayoutRow",this).call(this,e,n,r,i);return o.setShearingAngle(this.getShearingAngle()),o}},{key:"_layoutRows",value:function(e,n){var r=k(t.prototype.__proto__||v()(t.prototype),"_layoutRows",this).call(this,e,n),i=y.Utils.values(b.a.FormType),o=new b.a({width:n,height:30,type:this._rowTypeRandomizer.pickNext(i),shearingAngle:this.getShearingAngle()}).layout(),s=new b.a({width:n,height:30,type:this._rowTypeRandomizer.pickNext(i),shearingAngle:this.getShearingAngle()}).layout();return[o].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return a()(e)}(r),[s])}}]),t}();R.defaultFontIdentifiers=["imgly_font_campton_bold"],R.identifier="imgly_text_design_rotated",R.prototype.availableOptions=x({},g.a.prototype.availableOptions,{fontIdentifiers:{type:y.OptionType.ARRAY,default:R.defaultFontIdentifiers},relativeLineSpacing:{type:y.OptionType.NUMBER,default:.025/3},shearingAngle:{type:y.OptionType.NUMBER,default:-.1}})},function(e,t,n){"use strict";n.d(t,"a",function(){return p});var r=n(0),i=n.n(r),o=n(4),a=(n.n(o),n(30)),s=n(115),u=n(41),l=n(17),c=n(118),f=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),h=o.Math.Rectangle,p=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._layoutData=null,this._layout=null,this._text="",this._seed=0,this._debugMode=!1,this.randomizer=new l.a}return f(e,[{key:"createLayout",value:function(e,t,n){this._layout=e,this._text=t,this._seed=n,e.seed(n),this._layoutData=e.generateLayoutData(t,1e3)}},{key:"calculateAspect",value:function(){return this._layoutData?this._layoutData.getSize().aspect():(o.Log.warn("TextDesignRenderer#calculateAspect: No layout data"),1)}},{key:"draw",value:function(e,t,n,r){var i=this,l=new a.a(1e3,1e3/t.aspect()),f=t.width/1e3,p=this._layoutData.getRelativeInsets().clone().scale(l.width),d=this._layoutData.getRelativeLineSpacing()*l.width,_=p.top;e.save(),this.randomizer.seed(this._seed);var v=this._layoutData.getBackground();v&&v.render(e,t,this._layoutData.getRelativeInsets(),r?o.Color.WHITE:n,this.randomizer),e.scale(f,f),this._layoutData.getRows().forEach(function(t){e.save();var a=t.getAttributes();if(e.transform(1,t.getShearingAngle(),0,1,p.left,_),a.setTextColor(r?o.Color.WHITE:n.clone()),a.setTintColor(r?o.Color.WHITE:n.clone()),(t instanceof s.a||t instanceof c.a)&&(t.setBackgroundColor(r?o.Color.WHITE:n.clone()),t.setIsUsedInInvertedLayout(r)),i._debugMode&&(t._debugMode=!0),t.willRender(e),t.render(e),t.didRender(e),i._debugMode){var l=t._getFrame(),f=t._getTextFrame();Object(u.f)(e,l,o.Color.GREEN),Object(u.f)(e,f,o.Color.BLUE),t._getLayoutElements().forEach(function(n){var r=n.getFrame(),i=t._getTextFrameForElement(n);Object(u.f)(e,r,new o.Color(1,1,0)),Object(u.f)(e,i,new o.Color(0,1,1))})}_+=t.getSize().height+d,e.restore()}),this._debugMode&&Object(u.f)(e,new h(0,0,l.width,l.height),o.Color.RED),e.restore()}}]),e}()},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(2),a=n.n(o),s=n(3),u=n.n(s),l=n(1),c=n.n(l),f=n(4),h=n.n(f),p=n(414),d=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),_=f.Math.Vector2,v=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||c()(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=u()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(a.a?a()(e,t):e.__proto__=t)}(t,f.Operation),d(t,[{key:"_render",value:function(e){this._sprite.setRotation(0);var t=e.getDimensions(),n=this._options,r=n.start,i=n.end,o=n.rotation,a=n.textureScale,s=i.clone().subtract(r).clone().divide(2),u=r.clone().add(s),l=this.calculateScale()*a,c=t.clone().multiply(l).multiply(s);return this._sprite.setAnchor(u),this._sprite.setRotation(o),this._sprite.setScale(l,l),this._sprite.setPosition(c),this._renderTexture.render(this._container),f.Promise.resolve()}},{key:"calculateScale",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._options.rotation,t=this.getInputDimensions(!1),n=new _(Math.abs(t.x*Math.cos(e))+Math.abs(t.y*Math.sin(e)),Math.abs(t.x*Math.sin(e))+Math.abs(t.y*Math.cos(e))),r=t.clone().subtract(n.clone()).divide(2).abs();return r.y>r.x?2*r.y/t.y+1:2*r.x/t.x+1}},{key:"getNewDimensions",value:function(e){var t=this._options,n=t.start,r=t.end,i=t.textureScale,o=this.calculateScale();return e.clone().multiply(i*o).multiply(r.clone().subtract(n)).round()}},{key:"flip",value:function(e){var t=this._options,n=t.start,r=t.end,i=n.clone();"horizontal"===e?(n.set(1-r.x,n.y),r.set(1-i.x,r.y)):"vertical"===e&&(n.set(n.x,1-r.y),r.set(r.x,1-i.y))}},{key:"rotate",value:function(e){for(var t=this._options,n=t.start,r=t.end,i=(e+360)%360,o=Math.floor(i/90),a=0;a<o;a++){var s=n.clone();n.set(1-r.y,s.x),r.set(1-s.y,r.x)}}},{key:"_onBeforeExport",value:function(){this._wasEnabledBeforeExport=this.getEnabled(),this.setEnabled(!0)}},{key:"_onAfterExport",value:function(){this.setEnabled(this._wasEnabledBeforeExport,!0)}}]),t}();v.identifier="transform",v.prototype.availableOptions={start:{type:f.OptionType.VECTOR2,default:new _(0,0)},end:{type:f.OptionType.VECTOR2,default:new _(1,1)},textureScale:{type:f.OptionType.NUMBER,default:1},rotation:{type:f.OptionType.NUMBER,default:0}},v.TransformChange=p.a,h.a.Operations.TransformOperation=v,t.a=v},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(4),a=(n.n(o),function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}()),s=o.Math.Vector2,u=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._options=n,this._oldOptions={start:t.getStart().clone(),end:t.getEnd().clone(),rotation:t.getRotation(),textureScale:t.getTextureScale()},this._inputDimensions=t.getInputDimensions(!1),this._rotationDelta=n.rotation-t.getRotation(),this._deltaCos=Math.cos(this._rotationDelta),this._deltaSin=Math.sin(this._rotationDelta),this._oldAbsoluteSize=this._oldOptions.end.clone().subtract(this._oldOptions.start).multiply(this._inputDimensions),this._newAbsoluteSize=n.end.clone().subtract(n.start).multiply(this._inputDimensions),this._absoluteStartDiff=this._oldOptions.start.clone().subtract(n.start).multiply(this._inputDimensions),this._scaleRatio=t.calculateScale(n.rotation)/t.calculateScale(),this._sizeFactor=this._newAbsoluteSize.clone().divide(this._oldAbsoluteSize),this._textureScaleFactor=this._options.textureScale/t.getTextureScale()}return a(e,[{key:"applyToRelativePoint",value:function(e){var t=this._oldOptions.start,n=this._oldOptions.end,r=t.clone().add(n.clone().subtract(t).divide(2)).multiply(this._inputDimensions),i=e.clone().multiply(this._oldAbsoluteSize).subtract(this._oldAbsoluteSize.clone().divide(2)),o=r.clone().add(i).clone().subtract(this._inputDimensions.clone().divide(2)),a=new s(o.x*this._deltaCos-o.y*this._deltaSin,o.x*this._deltaSin+o.y*this._deltaCos),u=this._inputDimensions.clone().divide(2).add(a),l=this._options.start.clone().multiply(this._inputDimensions);return u.clone().subtract(l).divide(this._newAbsoluteSize)}},{key:"applyToRelativeSize",value:function(e){return e*this._oldAbsoluteSize.min()/this._newAbsoluteSize.min()}},{key:"applyToDimensions",value:function(e){return e=e.clone().multiply(this._scaleRatio),this._options.textureScale&&e.multiply(this._textureScaleFactor),e}},{key:"scaleSize",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"y";return e/this._sizeFactor[t]}},{key:"applyToRotation",value:function(e){return(e+this._rotationDelta)%(2*Math.PI)}},{key:"invert",value:function(){var e=this._options.start.clone(),t=this._options.end.clone(),n=this._inputDimensions,r=-this._rotationDelta,i=Math.cos(r),o=Math.sin(r),a=this._oldAbsoluteSize,u=this._newAbsoluteSize,l=e.clone().subtract(t).multiply(n),c=1/this._scaleRatio,f=new s(1/this._sizeFactor.x,1/this._sizeFactor.y),h=1/this._textureScaleFactor,p=this._oldOptions;return this._oldOptions=this._options,this._options=p,this._inputDimensions=n,this._rotationDelta=r,this._deltaCos=i,this._deltaSin=o,this._oldAbsoluteSize=u,this._newAbsoluteSize=a,this._absoluteStartDiff=l,this._scaleRatio=c,this._sizeFactor=f,this._textureScaleFactor=h,this}}]),e}();t.a=u},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(5),a=n.n(o),s=n(2),u=n.n(s),l=n(3),c=n.n(l),f=n(1),h=n.n(f),p=n(4),d=n.n(p),_=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),v=p.Math.Vector2,y=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||h()(t)).call.apply(e,[this].concat(r)));return o._watermarkSprite=new p.Engine.Sprite,o._watermarkSprite.setAnchor(.5,.5),o._container.addChild(o._watermarkSprite),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=c()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(u.a?u()(e,t):e.__proto__=t)}(t,p.Operation),_(t,[{key:"_render",value:function(e){this._watermarkTexture||(this._watermarkTexture=p.Engine.Texture.fromImage(this._options.image),this._watermarkSprite.setTexture(this._watermarkTexture));var t=e.getDimensions(),n=this._options.image,r=n.width,i=n.height,o=p.Utils.resizeVectorToFit(new v(r,i),t);return this._watermarkSprite.setPosition(t.clone().divide(2)),this._watermarkSprite.setWidth(o.x),this._watermarkSprite.setHeight(o.y),this._renderTexture.render(this._container),p.Promise.resolve()}},{key:"dispose",value:function(){(function e(t,n,r){null===t&&(t=Function.prototype);var i=a()(t,n);if(void 0===i){var o=h()(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0})(t.prototype.__proto__||h()(t.prototype),"dispose",this).call(this),this._watermarkSprite.dispose()}}]),t}();y.identifier="watermark",y.prototype.availableOptions={image:{type:p.OptionType.OBJECT,required:!0}},d.a.Operations.WatermarkOperation=y,t.a=y},function(e,t,n){"use strict";var r=n(47),i=n.n(r),o=n(5),a=n.n(o),s=n(0),u=n.n(s),l=n(2),c=n.n(l),f=n(3),h=n.n(f),p=n(84),d=n.n(p),_=n(1),v=n.n(_),y=n(4),g=n.n(y),m=n(417),b=n(34),w=n(177),x=n(437),T=function e(t,n,r){null===t&&(t=Function.prototype);var i=a()(t,n);if(void 0===i){var o=v()(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0},k=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),u()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),R=y.Engine.Filters.OverlayFilter,C=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||v()(t)).call.apply(e,[this].concat(r)));return o._renderStart=null,o._renderedOverlaySprite=new y.Engine.Sprite,o._renderedOverlayContainer=new y.Engine.Container,o._renderedOverlayContainer.addChild(o._renderedOverlaySprite),o._overlayFilter=new R,o._overlayFilter.getShaderForRenderer(o._sdk.getRenderer()),o._sdk.on("new-image",o._onNewImage.bind(o)),o._prepareRenderTargets(),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=h()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(c.a?c()(e,t):e.__proto__=t)}(t,y.Operation),k(t,null,[{key:"isSupported",value:function(e){if(e.getRenderer().isOfType(b.RendererType.WEBGL)){var t=e.getRenderer().getContext(),n=w.a.determineSupportedConfiguration(t).environmentSupported,r=!y.Utils.isMobile();return n&&r}return!1}}]),k(t,[{key:"setOption",value:function(e,n){var r=this;if("styleTransferModel"===e){var i=this._options.styleTransferModel;i&&i!==n&&this._renderInputImageIntoOverlayTarget()}if(T(t.prototype.__proto__||v()(t.prototype),"setOption",this).call(this,e,n),"identifier"===e||"styleTransferModel"===e){var o=this._options.styleTransferModel;o&&o.onWeightsUpdated(function(){r._renderInputImageIntoOverlayTarget()})}}},{key:"_onNewImage",value:function(){this.dispose(),this._prepareRenderTargets();var e=this.getStyleTransferModel();e&&e.updateInputDimensions(this._exifAdjustedInputDimensions)}},{key:"_prepareRenderTargets",value:function(){var e=this._sdk.getRenderer(),t=e.getContext(),n=this._sdk.getInputTexture(),r=n.getDimensions(),i=this._sdk.getOperationsStack().getByIdentifier("exif-orientation");if(i){r=i.getNewDimensions(r);var o=new y.Engine.WebGLRenderTarget(e,r.x,r.y,1);o.setFrame(new y.Math.Rectangle(0,0,r.x,r.y));var a=e.getOrCreateGLTexture(o.getBaseTexture()),s=i.applyTo(this._sdk.getImage());t.bindTexture(t.TEXTURE_2D,a),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,s),this._modelInputTarget=o}else{var u=new y.Engine.WebGLRenderTarget(e,r.x,r.y,1);u.setFrame(new y.Math.Rectangle(0,0,r.x,r.y)),u._baseTexture=n.getBaseTexture();var l=u._baseTexture.getGLTextureForRenderer(e);l||(l=t.createTexture(),u._baseTexture.setGLTextureForRenderer(l,e)),u._texture=l,t.bindTexture(t.TEXTURE_2D,l),t.bindFramebuffer(t.FRAMEBUFFER,u._framebuffer),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,l,0),this._modelInputTarget=u}this._overlayRenderTexture=new y.Engine.RenderTexture(e,r.x,r.y);var c=this._overlayRenderTexture.getBaseTexture();c.setGLUnit(5),this._sdk.getRenderer().updateTexture(c,!1),this._overlayRenderTarget=this._overlayRenderTexture.getRenderTarget(),this._renderedOverlaySprite.setTexture(this._overlayRenderTexture),this._exifAdjustedInputDimensions=r,this._renderInputImageIntoOverlayTarget()}},{key:"_renderInputImageIntoOverlayTarget",value:function(){var e=this._sdk.getRenderer().getContext(),t=this._modelInputTarget.getFrame().getSize();this._modelInputTarget.activate(),e.bindTexture(e.TEXTURE_2D,this._overlayRenderTarget.getTexture()),e.copyTexImage2D(e.TEXTURE_2D,0,e.RGBA,0,0,t.x,t.y,0)}},{key:"_render",value:function(){var e=function(e){return function(){var t=e.apply(this,arguments);return new y.Promise(function(e,n){return function r(i,o){try{var a=t[i](o),s=a.value}catch(e){return void n(e)}if(!a.done)return y.Promise.resolve(s).then(function(e){r("next",e)},function(e){r("throw",e)});e(s)}("next")})}}(d.a.mark(function e(t){var n,r,i,o;return d.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this._options,r=n.intensity,i=n.blendMode,o=this.getStyleTransferModel()){e.next=6;break}return this._sprite.setFilters([]),this._renderTexture.render(this._container),e.abrupt("return",y.Promise.resolve());case 6:if(!o.isDisposed()){e.next=9;break}return e.next=9,o.initGraph(this._sdk.getRenderer());case 9:if(!o.isDirty()){e.next=12;break}return e.next=12,o.execute(this._sdk.getRenderer(),this._modelInputTarget,this._overlayRenderTarget);case 12:return this._overlayFilter.set({blendMode:i,overlayImage:this._overlayRenderTarget.getBaseTexture().getGLUnit(),overlayTexture:this._overlayRenderTexture,alpha:r}),this._sprite.setFilters([this._overlayFilter]),this._renderTexture.render(this._container),e.abrupt("return",y.Promise.resolve(o.isDirty()));case 16:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"dispose",value:function(){if(T(t.prototype.__proto__||v()(t.prototype),"dispose",this).call(this),this._renderedOverlaySprite.dispose(),this._overlayFilter.dispose(),this._overlayRenderTarget.dispose(),this._modelInputTarget){var e=this._modelInputTarget._framebuffer;this._sdk.getRenderer().getContext().deleteFramebuffer(e),this._modelInputTarget=null}var n=this._options.styleTransferModel;n&&n.dispose()}}]),t}();C.identifier="artfilter",C.prototype.availableOptions={identifier:{type:y.OptionType.STRING,default:""},styleTransferModel:{type:y.OptionType.OBJECT,default:null},intensity:{type:y.OptionType.NUMBER,default:1},blendMode:{type:y.OptionType.NUMBER,default:R.BLEND_MODES.NORMAL,available:i()(R.BLEND_MODES).map(function(e){return R.BLEND_MODES[e]})}},C.StyleTransferModel=m.a,C.TensorFilters=x.a,g.a.Operations.ArtFilterOperation=C,t.a=C},function(e,t,n){"use strict";function r(e){return function(){var t=e.apply(this,arguments);return new y.a(function(e,n){return function r(i,o){try{var a=t[i](o),s=a.value}catch(e){return void n(e)}if(!a.done)return y.a.resolve(s).then(function(e){r("next",e)},function(e){r("throw",e)});e(s)}("next")})}}var i=n(28),o=n.n(i),a=n(29),s=n.n(a),u=n(0),l=n.n(u),c=n(2),f=n.n(c),h=n(3),p=n.n(h),d=n(84),_=n.n(d),v=n(21),y=n.n(v),g=n(1),m=n.n(g),b=n(4),w=(n.n(b),n(418)),x=n(436),T=n(178),k=n(179),R=n(180),C=n(181),E=n(182),O=n(183),S=n(184),A=n(185),I=n(11),F=n(32),D=n(161),M=n(50),B=n(124),L=n(186),P=n(187),N=n(123),U=function(){return function(e,t){if(Array.isArray(e))return e;if(o()(Object(e)))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,u=s()(e);!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&u.return&&u.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),z=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),l()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),G=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments[1];!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||m()(t)).call(this,e));return r._onWeightsUpdatedCallback=null,r._finalConvIndex=-1,r._tilingController=n,r._disposed=!1,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=p()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(f.a?f()(e,t):e.__proto__=t)}(t,b.Configurable),z(t,[{key:"isDirty",value:function(){return!this._tilingController||!this._tilingController.hasRenderedAllTiles()}},{key:"isDisposed",value:function(){return null===this._graph}},{key:"isReady",value:function(){return!this.isDisposed()&&this._graph.isFinished()}},{key:"getTilingController",value:function(){return this._tilingController}},{key:"onWeightsUpdated",value:function(e){this._onWeightsUpdatedCallback=e}}],[{key:"createWithOptions",value:function(e,n,r){var i=e.tileEdgeLength||t.prototype.availableOptions.tileEdgeLength.default,o=e.overlappingFactor||t.prototype.availableOptions.overlappingFactor.default,a=new t(e,new x.a(n,i,o));return a.initGraph(r).then(function(){return a})}}]),z(t,[{key:"updateInputDimensions",value:function(e){var n=this._options.tileEdgeLength||t.prototype.availableOptions.tileEdgeLength.default,r=this._options.overlappingFactor||t.prototype.availableOptions.overlappingFactor.default;this._tilingController=new x.a(e,n,r)}},{key:"updateWithWeightsFromURL",value:function(){var e=r(_.a.mark(function e(t){var n,r,i,o,a,s,u,l;return _.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=new D.JSONLoader(t),e.next=3,n.load();case 3:if(r=e.sent){e.next=6;break}return e.abrupt("return",y.a.reject(new Error("Could not load weight map from "+t)));case 6:for(i=0;r["transform/residual/res_"+(i+1)+"/conv1/depthwise_weights"];)i++;if(o=r["transform/expand/final_conv/depthwise_weights"].logicalShape,a=this._graph._filterStack[this._finalConvIndex]._getInputWithName("w").logicalShape,s=M.a.isSameShape(a,o),u=this._residualBlockCount===i,l=this,!s||!u){e.next=17;break}return e.abrupt("return",this._graph.updateWeights(r).then(function(){l._onWeightsUpdatedCallback&&l._onWeightsUpdatedCallback(),l.getTilingController().reset()}));case 17:return e.abrupt("return",y.a.reject(new Error("Model architectures differ.")));case 18:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"execute",value:function(e,t,n){var r=this._tilingController,i=this._graph,o=r.getNextTileIndex();if(!i.isFinished())throw new Error("Can't execute an unfinished graph.");var a=this._tilingController.getOriginalInputCoordinatesForTileAtIndex(o),s=a.x,u=a.y,l=a.height,c=a.width,f=new F.Rectangle(s,u,c,l),h=this._tilingController.getBlendLeftTopRightBottomForTile(o),p=this._tilingController.getTilingConfiguration().overlappingFactor;return i.render(e,t,n,f,h,p).then(function(){r.markTileAsRendered(o)})}},{key:"initGraph",value:function(){var e=r(_.a.mark(function e(t){var n,r,i,o,a,s,u,l,c,f=this;return _.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=this._options,r=n.weightURL,i=n.tileEdgeLength,o=this.getTilingController(),a=o.calculateMaximumTileDimensions(),s=o.getOriginalInputCoordinatesForTileAtIndex(0).getSize(),u=new D.JSONLoader(r),e.next=7,u.load();case 7:for(l=e.sent,c=0;l["transform/residual/res_"+(c+1)+"/conv1/depthwise_weights"];)c++;return this._residualBlockCount=c,this._graph=new w.a(t,l,a,i),this._graph.addFilter(new A.a({inputs:[{name:"x",type:I.a.PREVIOUS}],size:[i,i]})),this._addStyleTransferOperationsToGraph(this._graph,l,s),e.abrupt("return",this._graph.load(t).then(function(){f._tilingController.reset()}));case 15:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"_addStyleTransferOperationsToGraph",value:function(e,t,n){this._weightMap=t;for(var r=this._addDepthwiseSeparableConvolution("transform/contract/conv1",e,1,1,"same"),i=this._addDepthwiseSeparableConvolution("transform/contract/conv2",e,r,2,"same"),o=this._addDepthwiseSeparableConvolution("transform/contract/conv3",e,i,2,"same"),a=1;a<=this._residualBlockCount;a++){var s="transform/residual/res_"+a;o=this._addResidualBlock(s,e,o)}var u=this._addUpsampling("transform/expand/up_1",e,o),l=this._addUpsampling("transform/expand/up_2",e,u);this._addDepthwiseSeparableConvolution("transform/expand/final_conv",e,l,1,"same",!1),e.addFilter(new k.a({inputs:[{name:"x",type:I.a.PREVIOUS}]}));var c=e.addFilter(new A.a({inputs:[{name:"x",type:I.a.PREVIOUS}],size:[n.y,n.x]})),f=this._addEdgePadding(e,c,3,1),h=this._addPackFilterToStack(e,f);this._addSharpening(e,h),this._weightMap=null}},{key:"_addDepthwiseSeparableConvolution",value:function(e,t,n,r,i){var o=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],a=e+"/depthwise_weights",s=e+"/pointwise_weights",u=t.getLastIndex()===n,l=t.addFilter(new C.a({inputs:[{name:"x",type:u?I.a.PREVIOUS:I.a.DATA,data:n},{name:"w",type:I.a.DATA,data:a}],stride:r,padding:"same",padMethod:"edge"}));a.indexOf("final_conv")>=0&&(this._finalConvIndex=l);var c=t.addFilter(new R.a({inputs:[{name:"x",type:I.a.PREVIOUS},{name:"w",type:I.a.DATA,data:s}],stride:1,padding:"valid"})),f=E.a.addFiltersForReduceSumOperationToGraph(t,c,[1,2]),h=t.addFilter(new O.a({inputs:[{name:"sum",type:I.a.PREVIOUS},{name:"x",type:I.a.INDEX,data:c}]}));E.a.addFiltersForReduceSumOperationToGraph(t,h,[1,2]);var p=e+"/instance_norm/shift",d=e+"/instance_norm/scale";return t.addFilter(new S.a({inputs:[{name:"variance",type:I.a.PREVIOUS},{name:"sum",type:I.a.INDEX,data:f},{name:"x",type:I.a.INDEX,data:c},{name:"shift",type:I.a.DATA,data:p},{name:"scale",type:I.a.DATA,data:d}],addRelu:o})),t.getLastIndex()}},{key:"_addResidualBlock",value:function(e,t,n){var r=this._addDepthwiseSeparableConvolution(e+"/conv1",t,n,1,"same"),i=this._addDepthwiseSeparableConvolution(e+"/conv2",t,r,1,"same",!1),o=t.getLastIndex()===i;return t.addFilter(new T.a({inputs:[{name:"x",type:I.a.INDEX,data:n},{name:"y",type:o?I.a.PREVIOUS:I.a.INDEX,data:i}]})),t.getLastIndex()}},{key:"_addUpsampling",value:function(e,t,n){var r=t.getLogicalShapeAtIndex(n),i=U(r,3),o=(i[0],i[1]),a=i[2],s=t.getLastIndex()===n,u=t.addFilter(new A.a({inputs:[{name:"x",type:s?I.a.PREVIOUS:I.a.INDEX,data:n}],size:[2*o,2*a]}));return this._addDepthwiseSeparableConvolution(e+"/conv",t,u,1,"same")}},{key:"_addEdgePadding",value:function(e,t,n,r){var i=e.getLogicalShapeAtIndex(t),o=U(i,4),a=o[1],s=o[2],u=(o[3],e.getLastIndex()===t),l=B.a.calculatePadding("same",a,s,r,r,n,n).padInfo,c=[[0,0],[l.top,l.bottom],[l.left,l.right],[0,0]];return e.addFilter(new L.a({inputs:[{name:"x",type:u?I.a.PREVIOUS:I.a.INDEX,data:t}],paddings:c}))}},{key:"_addPackFilterToStack",value:function(e,t){var n=e.getLogicalShapeAtIndex(t),r=e.getLastIndex()===t,i=new N.a({inputs:[{name:"x",type:r?I.a.PREVIOUS:I.a.INDEX,data:t}],outputSize:n.slice(1,3)});if(3===n[3])return e.addFilter(i);throw new Error("Couldn't add pack filter due to channel count mismatch (expected RGB output).")}},{key:"_addSharpening",value:function(e,t){var n=e.getLastIndex()===t;e.addFilter(new P.a({inputs:[{name:"x",type:n?I.a.PREVIOUS:I.a.INDEX,data:t}]}))}},{key:"dispose",value:function(){this._graph&&this._graph.dispose(),this._graph=null}}]),t}();G.prototype.availableOptions={weightURL:{type:b.OptionType.STRING,required:!0},tileEdgeLength:{type:b.OptionType.NUMBER,default:256},overlappingFactor:{type:b.OptionType.NUMBER,default:.4}},t.a=G},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(84),a=n.n(o),s=n(47),u=n.n(s),l=n(21),c=n.n(l),f=n(122),h=n.n(f),p=n(32),d=n(11),_=n(175),v=n(50),y=n(4),g=(n.n(y),n(123),n(10)),m=n(149),b=n(176),w=n(434),x=n(435),T=n(177),k=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),R=function(){function e(t,n,r,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._measurePerformance=!1,this._filterStack=[],this._intermediateReadDependencies=[],this._intermediateWriteDependencies=[],this._finished=!1,this._renderer=t,this._gl=t.getContext();var o=T.a.determineSupportedConfiguration(this._gl);this._renderTargetManager=new w.b(t,o),this._textureManager=new x.a(t,o),this._weightMap=n,this._shaderCache=new h.a,this._inputTileDimensions=r,this._inferenceEdgeLength=i,this._featheredMaskFilter=new b.a({inputs:[{name:"x",type:d.a.PREVIOUS,logicalShape:[r.y,r.x]},{name:"y",type:d.a.INDEX,logicalShape:[r.y,r.x]}]}),this._setupRGBAUnpackFilter()}return k(e,[{key:"addFilter",value:function(e){var t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this._finished)throw new Error("Can't add filters to an already finished graph.");var r=this._filterStack.length,i=r-1,o=this._filterStack[i];return this._filterStack.push(e),this._intermediateReadDependencies.push([]),this._intermediateWriteDependencies.push([]),e.getInputs().forEach(function(a,s,u){switch(a.type){case d.a.PREVIOUS:n&&(a.logicalShape=o.outputLogicalShape());break;case d.a.INDEX:if(a.data===i)throw new Error("Accessing the previous filter through indexing is not supported. Use InputType.PREVIOUS instead.");var l=t._filterStack[a.data];if(!l)throw new Error("Indexed input does not exist: "+a.data+" for input "+a.name+" in "+e.constructor.name+" at "+r+".");n&&(a.logicalShape=l.outputLogicalShape()),t._intermediateReadDependencies[r].push(a),t._intermediateWriteDependencies[a.data].push(r);break;case d.a.DATA:var c=a.data,f=t._weightMap[c];u[s].logicalShape=f.logicalShape,u[s].data=new Float32Array(f.data),u[s].key=c,delete t._weightMap[c]}},this),e.prepareUniforms(),r}},{key:"load",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._measurePerformance;this._renderer=e,this._gl=e.getContext();var r=this._gl,i=r.getParameter(r.MAX_TEXTURE_IMAGE_UNITS);this._maxRequiredTextureDimensions=this._calculateMaximumIntermediateTextureDimensions();var o=this;return c.a.resolve().then(function(){return o._loadTextures(n)}).then(function(){return o._compileShaders(e,i,n)}).then(function(){return o._prepareRenderTargets(n)}).then(function(){return o._intermediateResults=o._filterStack.map(function(){return null}),o._quad=new m.a(e),t._weightMap=null,o._finished=!0,o}).then(function(){n&&(performance.measure("texture_loading","begin_texture_loading","finish_texture_loading"),performance.measure("shader_compilation","begin_shader_compilation","finish_shader_compilation"),performance.measure("target_preparation","begin_target_preparation","finish_target_preparation"),performance.getEntriesByType("measure").forEach(function(e){console.log(e.name+": "+e.duration+"ms"),performance.clearMarks(),performance.clearMeasures()}))})}},{key:"dispose",value:function(){this._disposed||(this._textureManager.dispose(),this._renderTargetManager.dispose(),this._shaderCache.forEach(function(e){e.dispose()}),this._textureManager=null,this._renderTargetManager=null,this._shaderCache=null,this._intermediateReadDependencies=null,this._intermediateWriteDependencies=null,this._filterStack=null,this._disposed=!0)}},{key:"_loadTextures",value:function(e){var t=this;e&&performance.mark("begin_texture_loading");var n=[];return this._filterStack.forEach(function(e,r){n.push(t._textureManager.createAndLoadTexturesForFilter(e,r))},this),c.a.all(n).then(function(){e&&performance.mark("finish_texture_loading")})}},{key:"_compileShaders",value:function(e,t,n){var r=this;n&&performance.mark("begin_shader_compilation");var i=[];return this._filterStack.concat([this._featheredMaskFilter]).forEach(function(n,o){if(o<r._filterStack.length){var a=1+n.getInputs().filter(function(e){return e.type===d.a.DATA}).length+r._intermediateReadDependencies[o].length;if(a>t)throw new Error("This environment does only offer support for "+t+", but filter "+n.constructor.name+" requires "+a+".")}var s=n.getShaderIdentifier(),u=r;r._shaderCache.has(s)||i.push(new c.a(function(t){var r=n.getShaderForRenderer(e);if(!r)throw new Error("Could not compile filter: "+n.constructor.name+"!");u._shaderCache.set(s,r),e.getContext().finish(),t(r)}))}),c.a.all(i).then(function(){n&&performance.mark("finish_shader_compilation")})}},{key:"_prepareRenderTargets",value:function(e){var t=this;e&&performance.mark("begin_target_preparation");var n=this._maxRequiredTextureDimensions,r=this._inputTileDimensions;return c.a.resolve().then(function(e){return t._renderTargetManager.prebuildRenderTargets(5,n,w.a.FLOAT)}).then(function(e){return t._renderTargetManager.prebuildRenderTargets(3,r,w.a.INT)}).then(function(t){e&&performance.mark("finish_target_preparation")})}},{key:"isFinished",value:function(){return this._finished}},{key:"updateWeights",value:function(e){var t=this;return this._finished?(this._filterStack.forEach(function(n,r,i){var o=!1;n.getInputs().forEach(function(t,n){if(t.type===d.a.DATA&&t.key){var a=e[t.key];if(!a)return;i[r].getInputs()[n].data=new Float32Array(a.data),o=!0,delete e[t.key]}}),o&&t._textureManager.updateTexturesForFilter(n,r)}),0===!u()(e).length&&c.a.reject(new Error("Not all weights in the given weight map were in use.")),c.a.resolve()):c.a.reject(new Error("Graph hasn't been loaded. Unable to update weights."))}},{key:"render",value:function(){var e=function(e){return function(){var t=e.apply(this,arguments);return new c.a(function(e,n){return function r(i,o){try{var a=t[i](o),s=a.value}catch(e){return void n(e)}if(!a.done)return c.a.resolve(s).then(function(e){r("next",e)},function(e){r("throw",e)});e(s)}("next")})}}(a.a.mark(function e(t,n,r,i,o,s){var u,l,f,h,_,y,m,b,x,T,k,R,C,E=this,O=arguments.length>6&&void 0!==arguments[6]?arguments[6]:this._measurePerformance;return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._disposed){e.next=2;break}return e.abrupt("return",c.a.resolve(r));case 2:if(O&&performance.mark("begin_render"),u=this._gl,O&&performance.mark("begin_preparation"),this._featheredMaskFilter.setBlendLeftTopRightBottom(o),this._featheredMaskFilter.setBlendRadius(.5*s),l=this._maxRequiredTextureDimensions,f=this._renderTargetManager.popRenderTarget(this._inputTileDimensions,w.a.INT),h=this._renderTargetManager.popRenderTarget(l,w.a.FLOAT),_=this._renderTargetManager.popRenderTarget(this._inputTileDimensions,w.a.INT),this._copyTextureContents(n,f,i,p.Vector2.NULL),this._copyTextureContents(r,_,i,p.Vector2.NULL),y=this._filterStack[0],m=y.getInputs()[0].name,b=i.height,x=i.width,T=[b,x],y.setTextureSizeForInputWithName(this._inputTileDimensions.asArray(!0),m),y.setLogicalSizeForInputWithName(T,m),O&&performance.mark("finish_preparation"),k=new g.h,R=new g.h,this._filterStack.forEach(function(e,n){var r=1;O&&performance.mark("begin_conversion_"+n);var i=e.requiresFloatTextures()?w.a.FLOAT:w.a.INT,o=n===E.getLastIndex()?E._inputTileDimensions:E._maxRequiredTextureDimensions,a=E._renderTargetManager.getFormatOfRenderTarget(h);null===h?h=E._renderTargetManager.popRenderTarget(o,i):a!==i&&(E._renderTargetManager.pushRenderTarget(h),h=E._renderTargetManager.popRenderTarget(o,i)),O&&performance.mark("finish_conversion_"+n);var s=f.getFrame().getSize().asArray(!0),l=h.getFrame().getSize().asArray(!0),c=p.Utils.Array.find(e.getInputs(),function(e){return e.type===d.a.PREVIOUS});void 0!==c&&(e.setTextureSizeForInputWithName(s,c.name),e.setLogicalSizeForInputWithName(T,c.name)),O&&performance.mark("begin_suppl_"+n+"_prep"),r+=E._textureManager.bindTexturesForFilter(e,n,r),O&&performance.mark("finish_suppl_"+n+"_prep"),O&&performance.mark("begin_intermediate_"+n+"_prep");var _=E._intermediateReadDependencies[n];E._bindIntermediateReadDependencies(e,_,r),O&&performance.mark("finish_intermediate_"+n+"_prep");var y=f.getFrame(),g=h.getFrame();y.equals(k)&&g.equals(R)||(E._quad.map(y,g),E._configureVertexAttributesForShader(e.getShaderForRenderer(t)),k=y,R=g),t.setRenderTarget(h);var m=v.a.getTextureDimensionsForLogicalShape(e.outputLogicalShape());e.setTargetTextureSize(l),e.setTargetLogicalSize(m),u.viewport(0,0,m[1],m[0]),O&&performance.mark("begin_filter_"+n);var b=E._shaderCache.get(e.getShaderIdentifier());u.useProgram(b.getProgram()),e._applyWebGL(t,f,h,!0,b),O&&performance.mark("finish_filter_"+n),O&&performance.mark("begin_postprocess_"+n),E._storeIntermediateResultsIfNeeded(f,n,T,s)&&(f=null),_.forEach(function(e){var t=E._intermediateResults[e.data];t&&0===t.pendingReads&&(E._renderTargetManager.pushRenderTarget(t.target),E._intermediateResults.slice(e.data,1))},E);var x=h;h=f,f=x,T=m,O&&performance.mark("finish_postprocess_"+n)},this),O&&performance.mark("begin_masking"),this._renderTargetManager.pushRenderTarget(h),h=this._renderTargetManager.popRenderTarget(this._inputTileDimensions,w.a.INT),this._applyFeatheredMasking(t,f,_,h,[b,x],o),O&&performance.mark("finish_masking"),O&&performance.mark("begin_out_copy"),this._copyTextureContents(h,r,new g.h(0,0,x,b),i.getPosition()),O&&performance.mark("finish_out_copy"),this._renderTargetManager.pushRenderTarget(f),this._renderTargetManager.pushRenderTarget(h),this._renderTargetManager.pushRenderTarget(_),O&&performance.mark("finish_render"),O){for(performance.measure("total","begin_render","finish_render"),performance.measure("preparation","begin_preparation","finish_preparation"),performance.measure("masking","begin_masking","finish_masking"),performance.measure("out_copy","begin_out_copy","finish_out_copy"),C=0;C<this._filterStack.length;C++)performance.measure("conversion_"+C,"begin_conversion_"+C,"finish_conversion_"+C),performance.measure("suppl_"+C+"_prep","begin_suppl_"+C+"_prep","finish_suppl_"+C+"_prep"),performance.measure("intermediate_"+C+"_prep","begin_intermediate_"+C+"_prep","finish_intermediate_"+C+"_prep"),performance.measure("filter_"+C+"_"+this._filterStack[C].constructor.name,"begin_filter_"+C,"finish_filter_"+C),performance.measure("postprocess_"+C,"begin_postprocess_"+C,"finish_postprocess_"+C);performance.getEntriesByType("measure").forEach(function(e){e.duration>50&&console.log(e.name+": "+e.duration+"ms")}),performance.clearMarks(),performance.clearMeasures()}return e.abrupt("return",c.a.resolve(r));case 37:case"end":return e.stop()}},e,this)}));return function(t,n,r,i,o,a){return e.apply(this,arguments)}}()},{key:"_applyFeatheredMasking",value:function(e,t,n,r,i){var o=this._gl;o.activeTexture(o.TEXTURE0+1),o.bindTexture(o.TEXTURE_2D,n.getTexture()),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MIN_FILTER,o.NEAREST),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MAG_FILTER,o.NEAREST),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_S,o.CLAMP_TO_EDGE),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_T,o.CLAMP_TO_EDGE);var a=r.getFrame().getSize().asArray(!0);this._featheredMaskFilter.setTargetTextureSize(a),this._featheredMaskFilter.setTargetLogicalSize(i),this._featheredMaskFilter.setTextureSizeForInputWithName(a,"x"),this._featheredMaskFilter.setLogicalSizeForInputWithName(i,"x"),this._featheredMaskFilter.setTextureSizeForInputWithName(a,"y"),this._featheredMaskFilter.setLogicalSizeForInputWithName(i,"y");var s=this._featheredMaskFilter.getShaderIdentifier(),u=this._shaderCache.get(s);o.useProgram(u.getProgram()),this._featheredMaskFilter._applyWebGL(e,t,r,!0,u)}},{key:"_copyTextureContents",value:function(e,t,n,r){var i=this._gl;e.activate(),i.bindTexture(i.TEXTURE_2D,t.getTexture()),i.copyTexSubImage2D(i.TEXTURE_2D,0,r.x,r.y,n.x,n.y,n.width,n.height)}},{key:"_bindIntermediateReadDependencies",value:function(e,t,n){var r=this,i=this._gl,o=n;t.forEach(function(t){var n=r._intermediateResults[t.data];i.activeTexture(i.TEXTURE0+o),i.bindTexture(i.TEXTURE_2D,n.target.getTexture()),e.setTextureSizeForInputWithName(n.textureSize,t.name),e.setLogicalSizeForInputWithName(n.logicalSize,t.name),n.pendingReads--,o++})}},{key:"_configureVertexAttributesForShader",value:function(e){var t=this._gl,n=this._quad.getVertexBuffer(),r=this._quad.getIndexBuffer();t.bindBuffer(t.ARRAY_BUFFER,n),t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,r);var i=e.getAttributeLocations();t.vertexAttribPointer(i.a_position,2,t.FLOAT,!1,0,0),t.vertexAttribPointer(i.a_texCoord,2,t.FLOAT,!1,0,32),t.vertexAttribPointer(i.a_color,4,t.FLOAT,!1,0,64)}},{key:"_storeIntermediateResultsIfNeeded",value:function(e,t,n,r){var i=t-1;return i>=0&&this._intermediateWriteDependencies[i].length>0&&(this._intermediateResults[i]={target:e,pendingReads:this._intermediateWriteDependencies[i].length,textureSize:r,logicalSize:n},!0)}},{key:"getInitialInputLogicalShape",value:function(){return this._filterStack[0].outputLogicalShape()}},{key:"getLastFilterLogicalShape",value:function(){return this.getLogicalShapeAtIndex(this._filterStack.length-1)}},{key:"getFilterCount",value:function(){return this._filterStack.length}},{key:"getLastIndex",value:function(){return this._filterStack.length-1}},{key:"getLogicalShapeAtIndex",value:function(e){return this._filterStack[e].outputLogicalShape()}},{key:"getDebugDescription",value:function(){var e=this,t="",n=0,r=0;return this._filterStack.forEach(function(i,o){var a=i.constructor.name,s=i._options.inputs.map(function(e){return e.name+": ["+e.logicalShape+"]"}).join(", "),u="Out: ["+i.outputLogicalShape()+"]",l="["+e._supplementaryTextures[o].map(function(e){return e.loadedTexture.getGLUnit()+": "+e.loadedTexture.id}).join(", ")+"]",c="R: ["+e._intermediateReadDependencies[o].map(function(e){return e.data}).join(", ")+"] | W: ["+e._intermediateWriteDependencies[o].join(", ")+"]";t+="["+o+"] - "+a+" | "+s+" | "+u+" | "+l+" | "+c+"\n",n+=e._intermediateReadDependencies[o].length,r+=e._supplementaryTextures[o].length}),t+="Max intermediate texture size: "+this._maxRequiredTextureDimensions+"\n",t+="Required render targets: "+(n+2)+"\n",t+="Required weight textures: "+r}},{key:"_setupRGBAUnpackFilter",value:function(){var e=this._inputTileDimensions,t=[e.y,e.x],n=new _.a({inputs:[{name:"x",logicalShape:t,type:d.a.PREVIOUS}]});this.addFilter(n,!1)}},{key:"_removeLastFilter",value:function(){this._filterStack.pop(),this._supplementaryTextures.pop(),this._intermediateReadDependencies.pop(),this._intermediateWriteDependencies.pop()}},{key:"_calculateMaximumIntermediateTextureDimensions",value:function(){var e=new p.Vector2(this._inputTileDimensions.x,this._inputTileDimensions.y);return this._filterStack.forEach(function(t){var n=v.a.getTextureDimensionsForLogicalShape(t.outputLogicalShape());n[1]>e.x&&(e.x=n[1]),n[0]>e.y&&(e.y=n[0])}),e}}]),e}();t.a=R},function(e,t,n){n(99),n(43),n(57),n(420),n(426),n(429),n(431),e.exports=n(9).Map},function(e,t,n){"use strict";var r=n(421),i=n(174);e.exports=n(422)("Map",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{get:function(e){var t=r.getEntry(i(this,"Map"),e);return t&&t.v},set:function(e,t){return r.def(i(this,"Map"),0===e?0:e,t)}},r,!0)},function(e,t,n){"use strict";var r=n(19).f,i=n(73),o=n(104),a=n(26),s=n(100),u=n(58),l=n(87),c=n(131),f=n(139),h=n(25),p=n(95).fastKey,d=n(174),_=h?"_s":"size",v=function(e,t){var n,r=p(t);if("F"!==r)return e._i[r];for(n=e._f;n;n=n.n)if(n.k==t)return n};e.exports={getConstructor:function(e,t,n,l){var c=e(function(e,r){s(e,c,t,"_i"),e._t=t,e._i=i(null),e._f=void 0,e._l=void 0,e[_]=0,void 0!=r&&u(r,n,e[l],e)});return o(c.prototype,{clear:function(){for(var e=d(this,t),n=e._i,r=e._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete n[r.i];e._f=e._l=void 0,e[_]=0},delete:function(e){var n=d(this,t),r=v(n,e);if(r){var i=r.n,o=r.p;delete n._i[r.i],r.r=!0,o&&(o.n=i),i&&(i.p=o),n._f==r&&(n._f=i),n._l==r&&(n._l=o),n[_]--}return!!r},forEach:function(e){d(this,t);for(var n,r=a(e,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(r(n.v,n.k,this);n&&n.r;)n=n.p},has:function(e){return!!v(d(this,t),e)}}),h&&r(c.prototype,"size",{get:function(){return d(this,t)[_]}}),c},def:function(e,t,n){var r,i,o=v(e,t);return o?o.v=n:(e._l=o={i:i=p(t,!0),k:t,v:n,p:r=e._l,n:void 0,r:!1},e._f||(e._f=o),r&&(r.n=o),e[_]++,"F"!==i&&(e._i[i]=o)),e},getEntry:v,setStrong:function(e,t,n){l(e,t,function(e,n){this._t=d(e,t),this._k=n,this._l=void 0},function(){for(var e=this._k,t=this._l;t&&t.r;)t=t.p;return this._t&&(this._l=t=t?t.n:this._t._f)?c(0,"keys"==e?t.k:"values"==e?t.v:[t.k,t.v]):(this._t=void 0,c(1))},n?"entries":"values",!n,!0),f(t)}}},function(e,t,n){"use strict";var r=n(13),i=n(12),o=n(95),a=n(35),s=n(31),u=n(104),l=n(58),c=n(100),f=n(20),h=n(56),p=n(19).f,d=n(423)(0),_=n(25);e.exports=function(e,t,n,v,y,g){var m=r[e],b=m,w=y?"set":"add",x=b&&b.prototype,T={};return _&&"function"==typeof b&&(g||x.forEach&&!a(function(){(new b).entries().next()}))?(b=t(function(t,n){c(t,b,e,"_c"),t._c=new m,void 0!=n&&l(n,y,t[w],t)}),d("add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON".split(","),function(e){var t="add"==e||"set"==e;e in x&&(!g||"clear"!=e)&&s(b.prototype,e,function(n,r){if(c(this,b,e),!t&&g&&!f(n))return"get"==e&&void 0;var i=this._c[e](0===n?0:n,r);return t?this:i})}),g||p(b.prototype,"size",{get:function(){return this._c.size}})):(b=v.getConstructor(t,e,y,w),u(b.prototype,n),o.NEED=!0),h(b,e),T[e]=b,i(i.G+i.W+i.F,T),g||v.setStrong(b,e,y),b}},function(e,t,n){var r=n(26),i=n(90),o=n(45),a=n(74),s=n(424);e.exports=function(e,t){var n=1==e,u=2==e,l=3==e,c=4==e,f=6==e,h=5==e||f,p=t||s;return function(t,s,d){for(var _,v,y=o(t),g=i(y),m=r(s,d,3),b=a(g.length),w=0,x=n?p(t,b):u?p(t,0):void 0;b>w;w++)if((h||w in g)&&(v=m(_=g[w],w,y),e))if(n)x[w]=v;else if(v)switch(e){case 3:return!0;case 5:return _;case 6:return w;case 2:x.push(_)}else if(c)return!1;return f?-1:l||c?c:x}}},function(e,t,n){var r=n(425);e.exports=function(e,t){return new(r(e))(t)}},function(e,t,n){var r=n(20),i=n(132),o=n(14)("species");e.exports=function(e){var t;return i(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!i(t.prototype)||(t=void 0),r(t)&&null===(t=t[o])&&(t=void 0)),void 0===t?Array:t}},function(e,t,n){var r=n(12);r(r.P+r.R,"Map",{toJSON:n(427)("Map")})},function(e,t,n){var r=n(77),i=n(428);e.exports=function(e){return function(){if(r(this)!=e)throw TypeError(e+"#toJSON isn't generic");return i(this)}}},function(e,t,n){var r=n(58);e.exports=function(e,t){var n=[];return r(e,!1,n.push,n,t),n}},function(e,t,n){n(430)("Map")},function(e,t,n){"use strict";var r=n(12);e.exports=function(e){r(r.S,e,{of:function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];return new this(t)}})}},function(e,t,n){n(432)("Map")},function(e,t,n){"use strict";var r=n(12),i=n(52),o=n(26),a=n(58);e.exports=function(e){r(r.S,e,{from:function(e){var t,n,r,s,u=arguments[1];return i(this),(t=void 0!==u)&&i(u),void 0==e?new this:(n=[],t?(r=0,s=o(u,arguments[2],2),a(e,!1,function(e){n.push(s(e,r++))})):a(e,!1,n.push,n),new this(n))}})}},function(e,t){e.exports="varying vec2 v_texCoord;\n\n// Added to the calculated (x,y) texture coordinates, to actually sample the 'center' of a pixel\nconst vec2 halfCR = vec2(0.5, 0.5);\n\n// A uniform holding the dimensions (height/rows, width/cols) of the texture we're rendering to\nuniform vec2 output_texRC;\n\n// A uniform holding the virtual output dimensions when rendering to larger textures. This allows\n// making use of the viewport and only two very large textures to perform all tensor rendering.\nuniform vec2 output_sizeRC;\n\nbool isNaN(float val) {\n return (val < 0.0 || 0.0 < val || val == 0.0) ? false : true;\n}\n\nbool hasNaN(vec4 values) {\n vec4 v1 = values * values;\n vec4 v2 = values * values;\n return any(notEqual(v1, v2));\n}\n\nfloat getNaN(vec4 values) {\n return dot(vec4(1), values);\n}\n\nint round(float value) {\n return int(floor(value + 0.5));\n}\n\nint imod(int x, int y) {\n return x - y * (x / y);\n}\n\n//Based on the work of Dave Hoskins\n//https://www.shadertoy.com/view/4djSRW\n#define HASHSCALE1 443.8975\nfloat random(float seed){\n vec2 p = v_texCoord * seed;\n vec3 p3 = fract(vec3(p.xyx) * HASHSCALE1);\n p3 += dot(p3, p3.yzx + 19.19);\n return fract((p3.x + p3.y) * p3.z);\n}\n\nvec2 UVfrom1D(vec2 texNumRC, vec2 sizeRC, int index) {\n int logR = index / int(sizeRC.y);\n int logC = index - logR * int(sizeRC.y);\n return (vec2(logC, logR) + halfCR) / texNumRC.yx;\n}\n\nvec2 UVfrom2D(vec2 texNumRC, vec2 sizeRC, int numC, int row, int col) {\n // Calculate x & y in logical size\n int index = row * numC + col;\n int logR = index / int(sizeRC.y);\n int logC = index - logR * int(sizeRC.y);\n\n // Return relative positions of row & col in texture size\n return (vec2(logC, logR) + halfCR) / texNumRC.yx;\n}\n\nvec2 UVfrom4D(vec2 texNumRC, vec2 sizeRC, int stride0,\n int stride1, int stride2, int row, int col, int depth,\n int depth2) {\n // Explicitly use integer operations as dot() only works on floats.\n int index = row * stride0 + col * stride1 + depth * stride2 + depth2;\n int logR = index / int(sizeRC.y);\n int logC = index - logR * int(sizeRC.y);\n\n return (vec2(logC, logR) + halfCR) / texNumRC.yx;\n}\n\nfloat sampleTexture(sampler2D textureSampler, vec2 uv) {\n return texture2D(textureSampler, uv).r;\n}\n"},function(e,t,n){"use strict";n.d(t,"a",function(){return p});var r=n(0),i=n.n(r),o=n(21),a=n.n(o),s=n(122),u=n.n(s),l=n(4),c=(n.n(l),n(32)),f=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),h=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._targetTextureFormatMap=new u.a,this._floatTargetPool=[],this._intTargetPool=[],this._renderer=t,this._internalFloatType=n.renderTextureType,this._internalFloatTextureFormat=n.renderTextureFormat}return f(e,[{key:"prebuildRenderTargets",value:function(e,t,n){for(var r=this,i=[],o=0;o<e;o++)i.push(new a.a(function(e){var i=r._createRenderTarget(t,n),o=r._uniqueIDForTarget(i);r._targetTextureFormatMap.set(o,n),r.pushRenderTarget(i),e()}));return a.a.all(i)}},{key:"pushRenderTarget",value:function(e){var t=this._uniqueIDForTarget(e),n=this._targetTextureFormatMap.get(t);if(n)switch(n){case p.FLOAT:this._floatTargetPool.push(e);break;case p.INT:this._intTargetPool.push(e)}}},{key:"popRenderTarget",value:function(e,t){var n=null;t===p.FLOAT?n=this._extractTargetFromPool(this._floatTargetPool,e):t===p.INT&&(n=this._extractTargetFromPool(this._intTargetPool,e)),n||(n=this._createRenderTarget(e,t));var r=this._uniqueIDForTarget(n);return this._targetTextureFormatMap.set(r,t),n}},{key:"getFormatOfRenderTarget",value:function(e){return null===e?null:this._targetTextureFormatMap.get(e._baseTexture.id)}},{key:"dispose",value:function(){this._targetTextureFormatMap.clear(),this._floatTargetPool.forEach(function(e){e.dispose()}),this._floatTargetPool=null,this._intTargetPool.forEach(function(e){e.dispose()}),this._intTargetPool=null}},{key:"_uniqueIDForTarget",value:function(e){return null===e?null:null!==e.getBaseTexture()?e.getBaseTexture().id:null}},{key:"_extractTargetFromPool",value:function(e,t){var n=e.filter(function(e){var n=e.getFrame().getSize();return n.x===t.x&&n.y&&t.y}).shift();if(n){var r=e.indexOf(n);e.splice(r,1)}return n}},{key:"_createRenderTarget",value:function(e,t){var n=new l.Engine.WebGLRenderTarget(this._renderer,e.x,e.y,1);n.getBaseTexture().setMinFilter(l.Engine.BaseTexture.NearestFilter),n.getBaseTexture().setMagFilter(l.Engine.BaseTexture.NearestFilter),n.getBaseTexture().setMipMappingEnabled(!1),n.setFrame(new c.Rectangle(0,0,e.x,e.y));var r=this._renderer.getContext();r.bindTexture(r.TEXTURE_2D,n.getBaseTexture().getGLTextureForRenderer(this._renderer));var i=t===p.FLOAT?this._internalFloatType:r.UNSIGNED_BYTE,o=t===p.FLOAT?this._internalFloatTextureFormat:r.RGBA;return r.texImage2D(r.TEXTURE_2D,0,o,e.x,e.y,0,o,i,null),n}}]),e}(),p={FLOAT:"float",INT:"int"};t.b=h},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(21),a=n.n(o),s=n(122),u=n.n(s),l=n(11),c=n(50),f=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),h=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._filterInputToTextureMap=new u.a,this._renderer=t;var r=this._renderer.getContext();this._internalFloatType=n.weightTextureType,this._internalFloatTextureFormat=n.weightTextureFormat,this._numChannels=n.weightTextureFormat===r.RGBA?4:1,this._internalFloatType!==r.FLOAT&&this._prepareFloatConversionTables()}return f(e,[{key:"createAndLoadTexturesForFilter",value:function(e,t){var n=this;return new a.a(function(r){e.getInputs().forEach(function(r,i){if(r.type===l.a.DATA){var o=r.data,a=r.logicalShape,s=n._createTexture(),u=n._uploadDataToTexture(s,o,a,n._numChannels),c=t+"_"+r.name;n._filterInputToTextureMap.set(c,u),n._renderer.getContext().flush(),e.getInputs()[i].data=null}}),r()})}},{key:"bindTexturesForFilter",value:function(e,t,n){var r=this,i=this._renderer.getContext(),o=0;return e.getInputs().forEach(function(a,s){if(a.type===l.a.DATA){var u=r._filterInputToTextureMap.get(t+"_"+a.name),c=u.texture,f=u.size;if(!c)throw new Error("Missing texture for filter "+s+".");i.activeTexture(i.TEXTURE0+n+o),i.bindTexture(i.TEXTURE_2D,c),e.setTextureSizeForInputWithName(f,a.name),e.setLogicalSizeForInputWithName(f,a.name),o++}}),o}},{key:"updateTexturesForFilter",value:function(e,t){var n=this;e.getInputs().forEach(function(e){if(e.type===l.a.DATA&&null!==e.data){var r=n._filterInputToTextureMap.get(t+"_"+e.name).texture;n._uploadDataToTexture(r,e.data,e.logicalShape,n._numChannels)}},this)}},{key:"dispose",value:function(){var e=this._renderer.getContext();this._filterInputToTextureMap.forEach(function(t){"undefined"!==t&&e.deleteTexture(t.texture)}),this._filterInputToTextureMap.clear()}},{key:"_createTexture",value:function(){var e=this._renderer.getContext(),t=e.createTexture();return e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),t}},{key:"_uploadDataToTexture",value:function(e,t,n,r){var i=c.a.getTextureDimensionsForLogicalShape(n),o=c.a.getSizeOfLogicalShape(n);if(t.length!==o)throw new Error("Not enough or too many values ("+t.length+") for shape "+n+".");var a=this._renderer.getContext(),s=this._internalFloatType!==a.FLOAT,u=this._createArrayBufferForUpload(t,i,r,s);return a.bindTexture(a.TEXTURE_2D,e),a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),1===r&&a.pixelStorei(a.UNPACK_ALIGNMENT,1),a.texImage2D(a.TEXTURE_2D,0,this._internalFloatTextureFormat,i[1],i[0],0,this._internalFloatTextureFormat,this._internalFloatType,u),a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),a.pixelStorei(a.UNPACK_ALIGNMENT,4),{texture:e,size:i}}},{key:"_createArrayBufferForUpload",value:function(e,t,n,r){if(1===n&&!1===r)return e;for(var i=t[0]*t[1]*n,o=r?new Uint16Array(i):new Float32Array(i),a=4===n,s=0,u=0;u<e.length;u++)o[s]=r?this._toHalfFloat(e[u]):e[u],a&&(o[s+3]=1),s+=n;return o}},{key:"_prepareFloatConversionTables",value:function(){var e=new ArrayBuffer(4);this._floatView=new Float32Array(e),this._uint32View=new Uint32Array(e);for(var t=new Uint32Array(512),n=new Uint32Array(512),r=0;r<256;++r){var i=r-127;i<-27?(t[0|r]=0,t[256|r]=32768,n[0|r]=24,n[256|r]=24):i<-14?(t[0|r]=1024>>-i-14,t[256|r]=1024>>-i-14|32768,n[0|r]=-i-1,n[256|r]=-i-1):i<=15?(t[0|r]=i+15<<10,t[256|r]=i+15<<10|32768,n[0|r]=13,n[256|r]=13):i<128?(t[0|r]=31744,t[256|r]=64512,n[0|r]=24,n[256|r]=24):(t[0|r]=31744,t[256|r]=64512,n[0|r]=13,n[256|r]=13)}this._baseTable=t,this._shiftTable=n}},{key:"_toHalfFloat",value:function(e){this._floatView[0]=e;var t=this._uint32View[0],n=t>>23&511;return this._baseTable[n]+((8388607&t)>>this._shiftTable[n])}}]),e}();t.a=h},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(4),a=(n.n(o),function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}()),s=o.Math.Vector2,u=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:256,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.4;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._renderedTileIndices=[],this._unrenderedTileIndices=[],this._originalInputDimensions=t,this._tilingConfiguration=this._calculateTilingConfiguration(t,n,r),this._unrenderedTileIndices=this._generateSpiralingTileIndices(this._tilingConfiguration),this._maskCache={}}return a(e,[{key:"_generateRandomTileIndices",value:function(e){for(var t=this,n=e.totalTileCount,r=function(){return Math.floor(Math.random()*t._tilingConfiguration.totalTileCount)},i=[];i.length<n;){for(var o=r();i.indexOf(o)>-1;)o=r();i.push(o)}return i}},{key:"_generateSpiralingTileIndices",value:function(e){var t=e.numHorizontalTiles,n=e.numVerticalTiles;return this._generateSpiralingIndicies(t,n)}},{key:"_generateSpiralingIndicies",value:function(e,t){for(var n=[],r=0,i=0,o=[0,-1],a=e%2==0,s=t%2==0,u=Math.floor(e/2)-a,l=Math.floor(t/2)-s,c=Math.pow(Math.max(e,t),2);c>0;c--)-e/2<r&&r<=e/2&&-t/2<i&&i<=t/2&&n.push((l+i)*e+(u+r)),(r===i||r<0&&r===-i||r>0&&r===1-i)&&(o=[-o[1],o[0]]),r+=o[0],i+=o[1];return n.reverse()}},{key:"calculateMaximumTileDimensions",value:function(){for(var e=this._tilingConfiguration.totalTileCount,t=new s(0,0),n=0;n<e;n++){var r=this.getOriginalInputCoordinatesForTileAtIndex(n).getSize();t.x=Math.max(r.x,t.x),t.y=Math.max(r.y,t.y)}return t}},{key:"reset",value:function(){var e=this._tilingConfiguration,t=e.tileEdgeLength,n=e.overlappingFactor;this._tilingConfiguration=this._calculateTilingConfiguration(this._originalInputDimensions,t,n),this._unrenderedTileIndices=this._generateSpiralingTileIndices(this._tilingConfiguration),this._renderedTileIndices=[],this._nextTileIndex=null}},{key:"getOriginalInputDimensions",value:function(){return this._originalInputDimensions}},{key:"getNextTileIndex",value:function(){return this.hasRenderedAllTiles()?-1:(this._nextTileIndex||(this._nextTileIndex=this._unrenderedTileIndices.pop()),this._nextTileIndex)}},{key:"getTilingConfiguration",value:function(){return this._tilingConfiguration}},{key:"getRenderedTileCount",value:function(){return this._renderedTileIndices.length}},{key:"getRenderingProgress",value:function(){return this.getRenderedTileCount()/this._tilingConfiguration.totalTileCount}},{key:"getTileCoordinates",value:function(e){return{rowIndex:Math.floor(e/this._tilingConfiguration.numHorizontalTiles),columnIndex:Math.floor(e%this._tilingConfiguration.numHorizontalTiles)}}},{key:"getOriginalInputCoordinatesForTileAtIndex",value:function(e){var t=this._tilingConfiguration,n=t.tileEdgeLength,r=t.overlappingFactor,i=t.fittedInputDimensions,a=t.numHorizontalTiles,s=t.numVerticalTiles,u=this.getTileCoordinates(e),l=u.rowIndex,c=u.columnIndex,f=Math.ceil(l*(n*(1-r))),h=Math.ceil(c*(n*(1-r))),p=this._originalInputDimensions.x/i.x,d=this._originalInputDimensions.y/i.y,_=Math.ceil(f*d),v=Math.ceil(h*p),y=Math.ceil(n*d),g=Math.ceil(n*p);return l===s-1&&_+y<this._originalInputDimensions.y&&(_+=this._originalInputDimensions.y-(_+y)),c===a-1&&v+g<this._originalInputDimensions.x&&(v+=this._originalInputDimensions.x-(v+g)),new o.Math.Rectangle(v,_,g,y)}},{key:"hasRenderedAllTiles",value:function(){return!(!this._tilingConfiguration||!this._renderedTileIndices)&&this._tilingConfiguration.totalTileCount-this._renderedTileIndices.length==0}},{key:"markTileAsRendered",value:function(){null!==this._nextTileIndex&&(!this._renderedTileIndices.indexOf(this._nextTileIndex)>-1&&this._renderedTileIndices.push(this._nextTileIndex),this._nextTileIndex=null)}},{key:"_calculateTilingConfiguration",value:function(e,t,n){var r=Math.ceil((1-n)*t),i=Math.ceil((e.x-t)/r)*r,a=t+i,s=Math.ceil((e.y-t)/r)*r,u=t+s,l=new o.Math.Vector2(a,u),c=Math.max(1,1+Math.round(s/r)),f=Math.max(1,1+Math.round(i/r));return{tileEdgeLength:t,overlappingFactor:n,fittedInputDimensions:l,numVerticalTiles:c,numHorizontalTiles:f,totalTileCount:c*f}}},{key:"getBlendLeftTopRightBottomForTile",value:function(e){var t=this.getTileCoordinates(e),n=t.rowIndex,r=t.columnIndex,i=this._tilingConfiguration,o=i.numVerticalTiles,a=i.numHorizontalTiles;return[0!==r?1:0,0!==n?1:0,r!==a-1?1:0,n!==o-1?1:0]}}]),e}();t.a=u},function(e,t,n){"use strict";var r=n(178),i=n(181),o=n(180),a=n(186),s=n(438),u=n(176),l=n(179),c=n(184),f=n(123),h=n(182),p=n(439),d=n(185),_=n(187),v=n(11),y=n(175),g=n(183),m={AddFilter:r.a,Conv2DDepthwiseFilter:i.a,Conv2DFilter:o.a,EdgePadFilter:a.a,EncodeFloatFilter:s.a,FeatheredMaskingFilter:u.a,FinalizeStyleFilter:l.a,InstanceNormReluFilter:c.a,PackRGBAFilter:f.a,ReduceSumFilter:h.a,ReflectionPadFilter:p.a,ResizeBilinearFilter:d.a,SharpenFilter:_.a,TensorFilter:v.b,UnpackRGBAFilter:y.a,VariancePreparationFilter:g.a};t.a=m},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(2),a=n.n(o),s=n(3),u=n.n(s),l=n(1),c=n.n(l),f=n(11),h=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),p=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||c()(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=u()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(a.a?a()(e,t):e.__proto__=t)}(t,f.b),h(t,[{key:"_calculateOutputShape",value:function(){return this._options.inputs[0].logicalShape}},{key:"_getTensorOperationSource",value:function(){var e="\nconst float FLOAT_MAX = 1.70141184e38;\nconst float FLOAT_MIN = 1.17549435e-38;\n\nlowp vec4 encode_float(highp float v) {\n if (isNaN(v)) {\n return vec4(255, 255, 255, 255);\n }\n\n highp float av = abs(v);\n\n if(av < FLOAT_MIN) {\n return vec4(0.0, 0.0, 0.0, 0.0);\n } else if(v > FLOAT_MAX) {\n return vec4(0.0, 0.0, 128.0, 127.0) / 255.0;\n } else if(v < -FLOAT_MAX) {\n return vec4(0.0, 0.0, 128.0, 255.0) / 255.0;\n }\n\n highp vec4 c = vec4(0,0,0,0);\n\n highp float e = floor(log2(av));\n highp float m = exp2(fract(log2(av))) - 1.0;\n\n c[2] = floor(128.0 * m);\n m -= c[2] / 128.0;\n c[1] = floor(32768.0 * m);\n m -= c[1] / 32768.0;\n c[0] = floor(8388608.0 * m);\n\n highp float ebias = e + 127.0;\n c[3] = floor(ebias / 2.0);\n ebias -= c[3] * 2.0;\n c[2] += floor(ebias) * 128.0;\n\n c[3] += 128.0 * step(0.0, -v);\n\n return c / 255.0;\n}\n ";return 4===this._options.inputs[0].logicalShape.length?e+="\nvoid main ()\n{\n ivec4 coords = getOutputCoords();\n float xVal = getX(coords.x, coords.y, coords.z, coords.w);\n gl_FragColor = encode_float(xVal);\n}\n ":e+="\nvoid main ()\n{\n ivec2 coords = getOutputCoords();\n float xVal = getX(coords.x, coords.y);\n gl_FragColor = encode_float(xVal);\n}\n ",e}}]),t}();t.a=p},function(e,t,n){"use strict";var r=n(6),i=n.n(r),o=n(0),a=n.n(o),s=n(2),u=n.n(s),l=n(3),c=n.n(l),f=n(1),h=n.n(f),p=n(11),d=n(4),_=(n.n(d),function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),a()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}()),v=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||h()(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=c()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(u.a?u()(e,t):e.__proto__=t)}(t,p.b),_(t,[{key:"_calculateOutputShape",value:function(){var e=this._options.paddings;if(1===!this.getInputs().length||0===this.getInputs().length)throw new Error("ReflectionPadFilter requires single input.");var t=this.getInputs()[0].logicalShape;if(e.length!==t.length)throw new Error("Not enough or too many paddings for input shape "+t);return e.map(function(e,n){return e[0]+t[n]+e[1]})}},{key:"_getTensorOperationSource",value:function(){var e=this.getInputs()[0].logicalShape.length,t=this._options.paddings.map(function(e){return e[0]}).join(","),n=this._options.paddings.map(function(e){return e[1]}).join(","),r="\n int reflectedIndexInInputForPadBefore(int coord, int start) {\n return int(abs(float(start - coord)));\n }\n\n int reflectedIndexInInputForPadAfter(int coord, int start,\n int length, int afterPad) {\n int indexInPad = coord - start - length;\n int index = length - indexInPad - 2;\n return index;\n }\n ",i="\n ivec2 get2DCoordinates(\n ivec2 outC,\n ivec2 coords,\n ivec2 start,\n ivec2 end,\n ivec2 afterPad,\n int height,\n int width) {\n\n if (any(lessThan(outC, start)) || any(greaterThanEqual(outC, end))) {\n // Select non-padding rows\n if (outC.x >= start.x && outC.x < start.x + height) {\n // Select before pad columns\n if (outC.y < start.y) {\n int yIndex =\n reflectedIndexInInputForPadBefore(outC.y, start.y);\n return ivec2(coords.x, yIndex);\n // Select after pad columns\n } else if (outC.y >= start.y + width) {\n int yIndex =\n reflectedIndexInInputForPadAfter(outC.y, start.y,\n width, afterPad.y);\n return ivec2(coords.x, yIndex);\n }\n\n // Select top and bottom rows, but only non-padding columns\n } else if (outC.y >= start.y && outC.y < start.y + height) {\n // Select top padding rows\n if (outC.x < start.x) {\n int xIndex =\n reflectedIndexInInputForPadBefore(outC.x, start.x);\n return ivec2(xIndex, coords.y);\n // Select bottom padding rows\n } else {\n int xIndex =\n reflectedIndexInInputForPadAfter(outC.x, start.x, height,\n afterPad.x);\n return ivec2(xIndex, coords.y);\n }\n\n // Handle diagonal corner cases\n } else if (outC.x < start.x && outC.y < end.y) { // Top Left\n ivec2 index = outC - start;\n vec2 absIndex = vec2(abs(float(index.x)), abs(float(index.y)));\n return ivec2(int(absIndex.x), int(absIndex.y));\n } else if (outC.x < start.x && outC.y >= end.y) { // Top Right\n int targetCol =\n reflectedIndexInInputForPadAfter(outC.y, start.y, width,\n afterPad.y);\n int targetRow =\n reflectedIndexInInputForPadBefore(outC.x, start.x);\n return ivec2(targetRow, targetCol);\n } else if (outC.x >= end.x && outC.y < end.y) { // Bottom Left\n int targetRow =\n reflectedIndexInInputForPadAfter(outC.x, start.x, height,\n afterPad.x);\n int targetCol =\n reflectedIndexInInputForPadBefore(outC.y, start.y);\n return ivec2(targetRow, targetCol);\n } else if (outC.x >= end.x && outC.y >= end.y) { // Bottom Right\n int targetRow =\n reflectedIndexInInputForPadAfter(outC.x, start.x, height,\n afterPad.x);\n int targetCol =\n reflectedIndexInInputForPadAfter(outC.y, start.y, width,\n afterPad.y);\n return ivec2(targetRow, targetCol);\n }\n } else {\n return coords;\n }\n }\n ";return 1===e?"\n int start = "+t+";\n int end = start + x_shape;\n int width = x_shape[0];\n int afterPad = "+n+";\n\n "+r+"\n\n void main() {\n int outC = getOutputCoords();\n if (outC < start) {\n int index = reflectedIndexInInputForPadBefore(outC, start);\n setOutput(getX(index));\n } else if (outC >= end) {\n int index =\n reflectedIndexInInputForPadAfter(outC, start, width, afterPad);\n setOutput(getX(index));\n } else {\n setOutput(getX(outC - start));\n }\n }\n ":2===e?"\n ivec2 start = ivec2("+t+");\n ivec2 end = start + x_shape;\n ivec2 afterPad = ivec2("+n+");\n int height = x_shape[0];\n int width = x_shape[1];\n\n "+r+"\n "+i+"\n\n void main() {\n ivec2 outC = getOutputCoords();\n ivec2 coords = outC - start;\n ivec2 coordsInSrcVec = get2DCoordinates(\n outC,\n coords,\n start,\n end,\n afterPad,\n height,\n width\n );\n setOutput(getX(coordsInSrcVec.x, coordsInSrcVec.y));\n }\n ":4===e?"\n ivec4 start = ivec4("+t+");\n ivec4 end = start + x_shape;\n ivec4 afterPad = ivec4("+n+");\n int length = x_shape[0];\n\n "+r+"\n "+i+"\n \n ivec3 get3DCoordinates(\n ivec3 outC,\n ivec3 coords,\n ivec3 start,\n ivec3 end,\n ivec3 afterPad,\n int length,\n int height,\n int width) {\n if (any(lessThan(outC, start))\n || any(greaterThanEqual(outC, end))) {\n\n // Calculate the current positions inner indices in the original\n // input tensor\n ivec2 innerIndices = get2DCoordinates(\n ivec2(outC.y, outC.z),\n ivec2(coords.y, coords.z),\n ivec2(start.y, start.z),\n ivec2(end.y, end.z),\n ivec2(afterPad.y, afterPad.z),\n height,\n width\n );\n\n if (outC.x < start.x) {\n int outerIndex =\n reflectedIndexInInputForPadBefore(outC.x, start.x);\n return ivec3(outerIndex, innerIndices.x, innerIndices.y);\n } else if (outC.x >= end.x) {\n int outerIndex = reflectedIndexInInputForPadAfter(\n outC.x, start.x, length, afterPad.x);\n return ivec3(outerIndex, innerIndices.x, innerIndices.y);\n } else {\n return ivec3(coords.x, innerIndices.x, innerIndices.y);\n }\n } else {\n return coords;\n }\n }\n \n\n void main() {\n ivec4 outC = getOutputCoords();\n ivec4 coords = outC - start; // Coords in input\n\n if (any(lessThan(outC, start))\n || any(greaterThanEqual(outC, end))) {\n\n ivec3 innerIndices = get3DCoordinates(\n ivec3(outC.y, outC.z, outC.w),\n ivec3(coords.y, coords.z, coords.w),\n ivec3(start.y, start.z, start.w),\n ivec3(end.y, end.z, end.w),\n ivec3(afterPad.y, afterPad.z, afterPad.w),\n x_shape[1],\n x_shape[2],\n x_shape[3]\n );\n\n if (outC.x < start.x) {\n int outerIndex =\n reflectedIndexInInputForPadBefore(outC.x, start.x);\n setOutput(getX(\n outerIndex,\n innerIndices.x,\n innerIndices.y,\n innerIndices.z\n ));\n } else if (outC.x >= end.x) {\n int outerIndex = reflectedIndexInInputForPadAfter(\n outC.x, start.x, length, afterPad.x);\n setOutput(getX(\n outerIndex,\n innerIndices.x,\n innerIndices.y,\n innerIndices.z\n ));\n } else {\n setOutput(getX(\n coords.x,\n innerIndices.x,\n innerIndices.y,\n innerIndices.z));\n }\n } else {\n setOutput(getX(coords.x, coords.y, coords.z, coords.w));\n }\n }\n ":void 0}}]),t}();v.prototype.availableOptions=i()({paddings:{type:d.OptionType.ARRAY,required:!0}},p.b.prototype.availableOptions),t.a=v},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(2),a=n.n(o),s=n(3),u=n.n(s),l=n(1),c=n.n(l),f=n(4),h=n.n(f),p=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),i()(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),d=f.Math.Vector2,_=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(e=t.__proto__||c()(t)).call.apply(e,[this].concat(r)));return o._flipContainer=new f.Engine.Container,o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=u()(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(a.a?a()(e,t):e.__proto__=t)}(t,f.Operation),p(t,[{key:"_render",value:function(e){var t=this._options,n=t.position,r=t.rotation,i=t.scale,o=t.pivot,a=t.outputResolution,s=t.flipHorizontally,u=t.flipVertically;if(this._renderTexture.resizeTo(a),this._sprite.setRotation(r),this._sprite.setPosition(n),this._sprite.setPivot(o),this._sprite.setScale(i),s||u){var l=this._renderTexture.getDimensions();this._flipRenderTexture?this._flipRenderTexture.resizeTo(l):(this._flipRenderTexture=new f.Engine.RenderTexture(this._sdk.getRenderer(),l.x,l.y),this._flipSprite=new f.Engine.Sprite(this._flipRenderTexture),this._flipContainer.addChild(this._flipSprite));var c=s?-1:1,h=u?-1:1;this._flipSprite.setScale(c,h),this._flipSprite.setPivot(0,0),this._flipSprite.setPosition(l.x*(1-c)*.5,l.y*(1-h)*.5),this._flipRenderTexture.clear(),this._flipRenderTexture.render(this._container),this._renderTexture.render(this._flipContainer)}else this._renderTexture.render(this._container);return f.Promise.resolve()}},{key:"getNewDimensions",value:function(e){return this._options.outputResolution}}]),t}();_.identifier="output",_.prototype.availableOptions={position:{type:f.OptionType.VECTOR2,default:new d(0,0)},rotation:{type:f.OptionType.NUMBER,default:0},scale:{type:f.OptionType.VECTOR2,default:new d(1,1)},pivot:{type:f.OptionType.VECTOR2,default:new d(0,0)},outputResolution:{type:f.OptionType.VECTOR2,default:new d(100,100)},flipHorizontally:{type:f.OptionType.BOOLEAN,default:!1},flipVertically:{type:f.OptionType.BOOLEAN,default:!1}},h.a.Operations.OutputOperation=_,t.a=_}])}); //# sourceMappingURL=photo-editor-sdk.map.js
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.28 |
proxy
|
phpinfo
|
Settings